From 51967f146d79bb57f79a82645828151d6dc12aec Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 13 Dec 2018 23:15:20 -0800 Subject: [PATCH] [AutoPR network/resource-manager] Revert "Swagger changes for App Gw Server Variables APIs" (#4456) * Regenerate azure-cognitiveservices-luis-runtime * Update azure-cognitiveservices-luis-runtime to 1.1.1 * Generate azure-arm-sqlvirtualmachine * Fix README.md issues in LUIS runtime * Regenerate azure-cognitiveservices-luis-authoring * Update azure-cognitiveservices-luis-authoring to 2.0.0 * Update generator version to use * Regenerate azure-arm-containerregistry * Update azure-arm-containerregistry to 4.3.0 * Generate azure-cognitiveservices-qnamaker * Regenerate azure-arm-logic * Update azure-arm-logic to 4.2.0 * Regenerate azure-cognitiveservices-customvision-training * Regenerate azure-cognitiveservices-customvision-prediction * Update azure-cognitiveservices-customvision-training to 2.0.0 * Update azure-cognitiveservices-customvision-prediction to 2.0.0 * Add component governance (#4315) * Regenerate azure-cognitiveservices-autosuggest * Regenerate azure-cognitiveservices-customimagesearch * Update azure-cognitiveservices-customimagesearch to 1.0.0 * Regenerate azure-cognitiveservices-customsearch * Update azure-cognitiveservices-customsearch to 2.0.0 * Remove old azure-cognitiveservices-customsearch client files * Regenerate azure-cognitiveservices-entitysearch * Regenerate azure-cognitiveservices-imagesearch * Fix test * Fix test * Regenerate azure-cognitiveservices-newssearch * Regenerate azure-cognitiveservices-spellcheck * Fix test * Fix test * Regenerate azure-cognitiveservices-videosearch * Regenerate azure-cognitiveservices-visualsearch * Regenerate azure-cognitiveservices-websearch * Fix test * Regenerate azure-servicefabric * Update azure-servicefabric to 3.0.0 * Regenerate azure-arm-sqlvirtualmachine * Update azure-arm-sqlvirtualmachine to 2.0.0 * Regenerate azure-cognitiveservices-contentmoderator * Update azure-cognitiveservices-contentmoderator to 4.1.1 * Made msiEndpoint and msiSecret optional * Generate azure-cognitiveservices-localsearch * Revert KeyVault version to 3.0.4 (#4326) - Version was accidentally incremented in https://github.com/Azure/azure-sdk-for-node/commit/a0443627390d6bdee9450bba37294ea69f394c9e#diff-34ec7e8370f59c8b845594c62c3e960e * Regenerate azure-arm-hdinsight * Update azure-arm-hdinsight to 0.11.0 * Update auto generated SDK for new SDK * Update test cases to use 2018-12-01 api version * Regenerate azure-arm-mediaservices * Update azure-arm-mediaservices to 4.1.1 * Update azure-arm-mediaservices to 5.0.0 * Use new autorest generator * Generated from f2e0fa789dbdbdb599809b597bf3c778be91e9d7 Revert "Swagger changes for App Gw Server Variables APIs (#4345)" This reverts commit 1a5e0f4e76a901d9813609370a7e8571c253dffc. --- .azure-pipelines/client.yml | 6 + .../batch/lib/batchServiceClient.d.ts | 6 +- lib/services/batch/lib/batchServiceClient.js | 15 +- .../accountListNodeAgentSkusNextOptions.js | 14 +- .../models/accountListNodeAgentSkusOptions.js | 26 +- .../models/accountListNodeAgentSkusResult.js | 2 +- .../accountListPoolNodeCountsNextOptions.js | 14 +- .../accountListPoolNodeCountsOptions.js | 24 +- .../batch/lib/models/affinityInformation.js | 4 +- .../batch/lib/models/applicationGetOptions.js | 16 +- .../lib/models/applicationListNextOptions.js | 14 +- .../lib/models/applicationListOptions.js | 22 +- .../batch/lib/models/applicationListResult.js | 2 +- .../lib/models/applicationPackageReference.js | 4 +- .../batch/lib/models/applicationSummary.js | 6 +- .../lib/models/authenticationTokenSettings.js | 2 +- .../batch/lib/models/autoPoolSpecification.js | 247 +- lib/services/batch/lib/models/autoScaleRun.js | 14 +- .../batch/lib/models/autoScaleRunError.js | 8 +- .../batch/lib/models/autoUserSpecification.js | 6 +- lib/services/batch/lib/models/batchError.js | 12 +- .../batch/lib/models/batchErrorDetail.js | 4 +- lib/services/batch/lib/models/certificate.js | 30 +- .../batch/lib/models/certificateAddOptions.js | 16 +- .../lib/models/certificateAddParameter.js | 16 +- .../certificateCancelDeletionOptions.js | 16 +- .../models/certificateDeleteMethodOptions.js | 16 +- .../batch/lib/models/certificateGetOptions.js | 18 +- .../lib/models/certificateListNextOptions.js | 14 +- .../lib/models/certificateListOptions.js | 28 +- .../batch/lib/models/certificateListResult.js | 2 +- .../batch/lib/models/certificateReference.js | 31 +- lib/services/batch/lib/models/cloudJob.js | 621 +- ...stPreparationAndReleaseTaskStatusResult.js | 2 +- .../batch/lib/models/cloudJobListResult.js | 2 +- .../batch/lib/models/cloudJobSchedule.js | 583 +- .../lib/models/cloudJobScheduleListResult.js | 2 +- lib/services/batch/lib/models/cloudPool.js | 312 +- .../batch/lib/models/cloudPoolListResult.js | 2 +- .../lib/models/cloudServiceConfiguration.js | 30 +- lib/services/batch/lib/models/cloudTask.js | 313 +- .../batch/lib/models/cloudTaskListResult.js | 2 +- .../lib/models/cloudTaskListSubtasksResult.js | 2 +- lib/services/batch/lib/models/computeNode.js | 185 +- .../lib/models/computeNodeAddUserOptions.js | 16 +- .../models/computeNodeDeleteUserOptions.js | 16 +- .../computeNodeDisableSchedulingOptions.js | 16 +- .../computeNodeEnableSchedulingOptions.js | 16 +- .../computeNodeEndpointConfiguration.js | 2 +- .../batch/lib/models/computeNodeError.js | 6 +- .../batch/lib/models/computeNodeGetOptions.js | 18 +- .../computeNodeGetRemoteDesktopOptions.js | 16 +- ...omputeNodeGetRemoteLoginSettingsOptions.js | 16 +- ...computeNodeGetRemoteLoginSettingsResult.js | 6 +- .../lib/models/computeNodeInformation.js | 18 +- .../lib/models/computeNodeListNextOptions.js | 14 +- .../lib/models/computeNodeListOptions.js | 27 +- .../batch/lib/models/computeNodeListResult.js | 2 +- .../lib/models/computeNodeRebootOptions.js | 16 +- .../lib/models/computeNodeReimageOptions.js | 16 +- .../models/computeNodeUpdateUserOptions.js | 16 +- ...omputeNodeUploadBatchServiceLogsOptions.js | 16 +- .../batch/lib/models/computeNodeUser.js | 12 +- .../lib/models/containerConfiguration.js | 4 +- .../batch/lib/models/containerRegistry.js | 6 +- lib/services/batch/lib/models/dataDisk.js | 20 +- .../lib/models/deleteCertificateError.js | 17 +- .../batch/lib/models/environmentSetting.js | 4 +- lib/services/batch/lib/models/errorMessage.js | 4 +- .../batch/lib/models/exitCodeMapping.js | 18 +- .../batch/lib/models/exitCodeRangeMapping.js | 20 +- .../batch/lib/models/exitConditions.js | 32 +- lib/services/batch/lib/models/exitOptions.js | 4 +- .../fileDeleteFromComputeNodeOptions.js | 16 +- .../lib/models/fileDeleteFromTaskOptions.js | 16 +- .../models/fileGetFromComputeNodeOptions.js | 30 +- .../lib/models/fileGetFromTaskOptions.js | 30 +- ...fileGetPropertiesFromComputeNodeOptions.js | 26 +- .../fileGetPropertiesFromTaskOptions.js | 26 +- .../fileListFromComputeNodeNextOptions.js | 14 +- .../models/fileListFromComputeNodeOptions.js | 25 +- .../lib/models/fileListFromTaskNextOptions.js | 14 +- .../lib/models/fileListFromTaskOptions.js | 25 +- .../batch/lib/models/fileProperties.js | 13 +- .../batch/lib/models/imageReference.js | 15 +- .../batch/lib/models/inboundEndpoint.js | 14 +- .../batch/lib/models/inboundNATPool.js | 16 +- lib/services/batch/lib/models/index.d.ts | 18409 +++------ lib/services/batch/lib/models/index.js | 5 +- .../batch/lib/models/jobAddOptions.js | 16 +- .../batch/lib/models/jobAddParameter.js | 547 +- .../batch/lib/models/jobConstraints.js | 16 +- .../lib/models/jobDeleteMethodOptions.js | 30 +- .../batch/lib/models/jobDisableOptions.js | 30 +- .../batch/lib/models/jobDisableParameter.js | 4 +- .../batch/lib/models/jobEnableOptions.js | 30 +- .../lib/models/jobExecutionInformation.js | 26 +- .../jobGetAllLifetimeStatisticsOptions.js | 16 +- .../batch/lib/models/jobGetOptions.js | 34 +- .../lib/models/jobGetTaskCountsOptions.js | 16 +- .../jobListFromJobScheduleNextOptions.js | 14 +- .../models/jobListFromJobScheduleOptions.js | 29 +- .../batch/lib/models/jobListNextOptions.js | 14 +- .../batch/lib/models/jobListOptions.js | 29 +- ...parationAndReleaseTaskStatusNextOptions.js | 14 +- ...tPreparationAndReleaseTaskStatusOptions.js | 27 +- .../batch/lib/models/jobManagerTask.js | 85 +- .../lib/models/jobNetworkConfiguration.js | 61 + .../batch/lib/models/jobPatchOptions.js | 30 +- .../batch/lib/models/jobPatchParameter.js | 244 +- ...ationAndReleaseTaskExecutionInformation.js | 116 +- .../batch/lib/models/jobPreparationTask.js | 79 +- .../jobPreparationTaskExecutionInformation.js | 62 +- .../batch/lib/models/jobReleaseTask.js | 74 +- .../jobReleaseTaskExecutionInformation.js | 51 +- .../batch/lib/models/jobScheduleAddOptions.js | 16 +- .../lib/models/jobScheduleAddParameter.js | 513 +- .../models/jobScheduleDeleteMethodOptions.js | 30 +- .../lib/models/jobScheduleDisableOptions.js | 30 +- .../lib/models/jobScheduleEnableOptions.js | 30 +- .../models/jobScheduleExecutionInformation.js | 18 +- .../lib/models/jobScheduleExistsOptions.js | 30 +- .../batch/lib/models/jobScheduleGetOptions.js | 34 +- .../lib/models/jobScheduleListNextOptions.js | 14 +- .../lib/models/jobScheduleListOptions.js | 30 +- .../lib/models/jobSchedulePatchOptions.js | 30 +- .../lib/models/jobSchedulePatchParameter.js | 505 +- .../batch/lib/models/jobScheduleStatistics.js | 44 +- .../lib/models/jobScheduleTerminateOptions.js | 30 +- .../lib/models/jobScheduleUpdateOptions.js | 30 +- .../lib/models/jobScheduleUpdateParameter.js | 501 +- .../batch/lib/models/jobSchedulingError.js | 12 +- .../batch/lib/models/jobSpecification.js | 509 +- .../batch/lib/models/jobStatistics.js | 45 +- .../batch/lib/models/jobTerminateOptions.js | 30 +- .../batch/lib/models/jobTerminateParameter.js | 2 +- .../batch/lib/models/jobUpdateOptions.js | 30 +- .../batch/lib/models/jobUpdateParameter.js | 239 +- .../lib/models/linuxUserConfiguration.js | 25 +- lib/services/batch/lib/models/metadataItem.js | 4 +- .../batch/lib/models/multiInstanceSettings.js | 8 +- .../batch/lib/models/nameValuePair.js | 4 +- .../batch/lib/models/networkConfiguration.js | 43 +- .../lib/models/networkSecurityGroupRule.js | 16 +- .../batch/lib/models/nodeAgentInformation.js | 6 +- lib/services/batch/lib/models/nodeAgentSku.js | 6 +- lib/services/batch/lib/models/nodeCounts.js | 29 +- .../models/nodeDisableSchedulingParameter.js | 2 +- lib/services/batch/lib/models/nodeFile.js | 21 +- .../batch/lib/models/nodeFileListResult.js | 2 +- .../batch/lib/models/nodeRebootParameter.js | 2 +- .../batch/lib/models/nodeReimageParameter.js | 4 +- .../batch/lib/models/nodeRemoveParameter.js | 8 +- .../lib/models/nodeUpdateUserParameter.js | 6 +- lib/services/batch/lib/models/oSDisk.js | 57 - lib/services/batch/lib/models/outputFile.js | 18 +- .../outputFileBlobContainerDestination.js | 4 +- .../batch/lib/models/outputFileDestination.js | 14 +- .../lib/models/outputFileUploadOptions.js | 2 +- .../batch/lib/models/poolAddOptions.js | 16 +- .../batch/lib/models/poolAddParameter.js | 230 +- .../lib/models/poolDeleteMethodOptions.js | 30 +- .../lib/models/poolDisableAutoScaleOptions.js | 16 +- .../lib/models/poolEnableAutoScaleOptions.js | 30 +- .../models/poolEnableAutoScaleParameter.js | 27 +- .../lib/models/poolEndpointConfiguration.js | 2 +- .../models/poolEvaluateAutoScaleOptions.js | 16 +- .../models/poolEvaluateAutoScaleParameter.js | 2 +- .../batch/lib/models/poolExistsOptions.js | 30 +- .../poolGetAllLifetimeStatisticsOptions.js | 16 +- .../batch/lib/models/poolGetOptions.js | 34 +- .../batch/lib/models/poolInformation.js | 265 +- .../batch/lib/models/poolListNextOptions.js | 14 +- .../batch/lib/models/poolListOptions.js | 29 +- .../models/poolListUsageMetricsNextOptions.js | 14 +- .../lib/models/poolListUsageMetricsOptions.js | 30 +- .../lib/models/poolListUsageMetricsResult.js | 2 +- .../batch/lib/models/poolNodeCounts.js | 63 +- .../lib/models/poolNodeCountsListResult.js | 2 +- .../batch/lib/models/poolPatchOptions.js | 30 +- .../batch/lib/models/poolPatchParameter.js | 56 +- .../lib/models/poolRemoveNodesOptions.js | 30 +- .../batch/lib/models/poolResizeOptions.js | 30 +- .../batch/lib/models/poolResizeParameter.js | 8 +- .../batch/lib/models/poolSpecification.js | 230 +- .../batch/lib/models/poolStatistics.js | 42 +- .../batch/lib/models/poolStopResizeOptions.js | 30 +- .../lib/models/poolUpdatePropertiesOptions.js | 16 +- .../models/poolUpdatePropertiesParameter.js | 54 +- .../batch/lib/models/poolUpgradeOSOptions.js | 120 - .../batch/lib/models/poolUsageMetrics.js | 34 +- lib/services/batch/lib/models/recentJob.js | 4 +- lib/services/batch/lib/models/resizeError.js | 10 +- lib/services/batch/lib/models/resourceFile.js | 79 +- .../batch/lib/models/resourceStatistics.js | 32 +- lib/services/batch/lib/models/schedule.js | 8 +- lib/services/batch/lib/models/startTask.js | 48 +- .../batch/lib/models/startTaskInformation.js | 75 +- .../batch/lib/models/subtaskInformation.js | 74 +- .../lib/models/taskAddCollectionOptions.js | 16 +- .../lib/models/taskAddCollectionParameter.js | 4 +- .../lib/models/taskAddCollectionResult.js | 3 +- .../batch/lib/models/taskAddOptions.js | 16 +- .../batch/lib/models/taskAddParameter.js | 177 +- .../batch/lib/models/taskAddResult.js | 32 +- .../batch/lib/models/taskConstraints.js | 22 +- .../taskContainerExecutionInformation.js | 8 +- .../batch/lib/models/taskContainerSettings.js | 18 +- lib/services/batch/lib/models/taskCounts.js | 12 +- .../lib/models/taskDeleteMethodOptions.js | 30 +- .../batch/lib/models/taskDependencies.js | 6 +- .../lib/models/taskExecutionInformation.js | 52 +- .../lib/models/taskFailureInformation.js | 10 +- .../batch/lib/models/taskGetOptions.js | 34 +- lib/services/batch/lib/models/taskIdRange.js | 4 +- .../batch/lib/models/taskInformation.js | 92 +- .../batch/lib/models/taskListNextOptions.js | 14 +- .../batch/lib/models/taskListOptions.js | 29 +- .../lib/models/taskListSubtasksOptions.js | 18 +- .../batch/lib/models/taskReactivateOptions.js | 30 +- .../batch/lib/models/taskSchedulingPolicy.js | 2 +- .../batch/lib/models/taskStatistics.js | 27 +- .../batch/lib/models/taskTerminateOptions.js | 30 +- .../batch/lib/models/taskUpdateOptions.js | 30 +- .../batch/lib/models/taskUpdateParameter.js | 15 +- .../uploadBatchServiceLogsConfiguration.js | 16 +- .../models/uploadBatchServiceLogsResult.js | 6 +- .../batch/lib/models/usageStatistics.js | 8 +- lib/services/batch/lib/models/userAccount.js | 34 +- lib/services/batch/lib/models/userIdentity.js | 23 +- .../lib/models/virtualMachineConfiguration.js | 61 +- .../batch/lib/models/windowsConfiguration.js | 2 +- .../lib/models/windowsUserConfiguration.js | 56 + lib/services/batch/lib/operations/account.js | 8 + .../batch/lib/operations/application.js | 8 + .../lib/operations/certificateOperations.js | 20 + .../lib/operations/computeNodeOperations.js | 54 +- lib/services/batch/lib/operations/file.js | 32 + lib/services/batch/lib/operations/index.d.ts | 1132 +- lib/services/batch/lib/operations/job.js | 562 +- .../batch/lib/operations/jobSchedule.js | 733 +- lib/services/batch/lib/operations/pool.js | 699 +- lib/services/batch/lib/operations/task.js | 123 +- lib/services/batch/package.json | 2 +- .../lib/autoSuggestClient.d.ts | 448 + .../lib/autoSuggestClient.js | 871 + .../lib/models/action.js | 8 +- .../lib/models/creativeWork.js | 38 +- .../lib/models/errorModel.js | 16 +- .../lib/models/errorResponse.js | 4 +- .../lib/models/identifiable.js | 2 +- .../lib/models/index.d.ts | 300 +- .../lib/models/queryContext.js | 18 +- .../lib/models/response.js | 12 +- .../lib/models/responseBase.js | 2 +- .../lib/models/searchAction.js | 6 +- .../lib/models/searchResultsAnswer.js | 26 +- .../lib/models/suggestions.js | 2 +- .../lib/models/suggestionsSuggestionGroup.js | 6 +- .../lib/models/thing.js | 2 +- .../cognitiveServicesAutoSuggest/package.json | 10 +- .../lib/models/aPIError.js | 6 +- .../lib/models/address.js | 6 +- .../lib/models/body.js | 6 +- .../lib/models/bodyModel.js | 4 +- .../lib/models/candidate.js | 4 +- .../lib/models/classification.js | 14 +- .../lib/models/classificationCategory1.js | 2 +- .../lib/models/classificationCategory2.js | 2 +- .../lib/models/classificationCategory3.js | 2 +- .../lib/models/content.js | 2 +- .../lib/models/createReviewBodyItem.js | 10 +- .../createReviewBodyItemMetadataItem.js | 4 +- .../lib/models/createVideoReviewsBodyItem.js | 17 +- .../createVideoReviewsBodyItemMetadataItem.js | 4 +- ...eateVideoReviewsBodyItemVideoFramesItem.js | 10 +- ...iewsBodyItemVideoFramesItemMetadataItem.js | 4 +- ...emVideoFramesItemReviewerResultTagsItem.js | 4 +- .../lib/models/detectedLanguage.js | 12 +- .../lib/models/detectedTerms.js | 12 +- .../lib/models/email.js | 10 +- .../lib/models/errorModel.js | 4 +- .../lib/models/evaluate.js | 25 +- .../lib/models/face.js | 8 +- .../lib/models/foundFaces.js | 20 +- .../lib/models/frame.js | 8 +- .../lib/models/frames.js | 4 +- .../lib/models/iPA.js | 6 +- .../lib/models/image.js | 14 +- .../lib/models/imageAdditionalInfoItem.js | 4 +- .../lib/models/imageIds.js | 14 +- .../lib/models/imageList.js | 8 +- .../lib/models/index.d.ts | 1182 +- .../lib/models/job.js | 18 +- .../lib/models/jobExecutionReportDetails.js | 4 +- .../lib/models/jobId.js | 2 +- .../lib/models/jobListResult.js | 2 +- .../lib/models/keyValuePair.js | 4 +- .../lib/models/match.js | 10 +- .../lib/models/matchResponse.js | 16 +- .../lib/models/oCR.js | 20 +- .../lib/models/pII.js | 10 +- .../lib/models/phone.js | 8 +- .../lib/models/refreshIndex.js | 16 +- .../lib/models/review.js | 20 +- .../lib/models/sSN.js | 4 +- .../lib/models/screen.js | 63 +- .../lib/models/status.js | 6 +- .../lib/models/tag.js | 4 +- .../lib/models/termList.js | 8 +- .../lib/models/terms.js | 26 +- .../lib/models/termsData.js | 14 +- .../lib/models/termsInList.js | 2 +- .../lib/models/termsPaging.js | 8 +- .../models/transcriptModerationBodyItem.js | 4 +- .../transcriptModerationBodyItemTermsItem.js | 4 +- .../lib/models/videoFrameBodyItem.js | 8 +- .../models/videoFrameBodyItemMetadataItem.js | 4 +- ...ideoFrameBodyItemReviewerResultTagsItem.js | 4 +- .../package.json | 4 +- .../lib/customImageSearchClient.d.ts | 55 + .../lib/customImageSearchClient.js | 64 + .../lib/models/creativeWork.js | 6 +- .../lib/models/errorModel.js | 16 +- .../lib/models/errorResponse.js | 4 +- .../lib/models/identifiable.js | 2 +- .../lib/models/imageObject.js | 10 +- .../lib/models/images.js | 4 +- .../lib/models/index.d.ts | 307 +- .../lib/models/mediaObject.js | 14 +- .../lib/models/query.js | 33 +- .../lib/models/response.js | 4 +- .../lib/models/responseBase.js | 2 +- .../lib/models/searchResultsAnswer.js | 6 +- .../lib/models/thing.js | 25 +- .../lib/operations/customInstance.js | 24 +- .../lib/operations/index.d.ts | 14 +- .../package.json | 12 +- .../lib/customSearchClient.d.ts | 55 + ...archAPIClient.js => customSearchClient.js} | 27 +- .../lib/models/index.d.ts | 354 +- .../lib/operations/customInstance.js | 6 +- .../lib/operations/index.d.ts | 2 +- .../package.json | 8 +- .../cognitiveServicesLocalSearch/LICENSE.txt | 21 + .../cognitiveServicesLocalSearch/README.md | 61 + .../lib/localSearchClient.d.ts} | 8 +- .../lib/localSearchClient.js} | 18 +- .../lib/models/action.js | 439 + .../lib/models/answer.js | 143 + .../lib/models/creativeWork.js | 451 + .../models/entitiesEntityPresentationInfo.js | 124 + .../lib/models/errorModel.js | 121 + .../lib/models/errorResponse.js | 165 + .../lib/models/geoCoordinates.js | 82 + .../lib/models/identifiable.js | 70 + .../lib/models/index.d.ts | 392 + .../lib/models/index.js | 58 + .../lib/models/intangible.js | 174 + .../lib/models/place.js | 260 + .../lib/models/places.js | 195 + .../lib/models/postalAddress.js | 309 + .../lib/models/queryContext.js | 142 + .../lib/models/response.js | 151 + .../lib/models/responseBase.js} | 32 +- .../lib/models/searchAction.js | 479 + .../lib/models/searchResponse.js | 275 + .../lib/models/searchResultsAnswer.js | 211 + .../lib/models/structuredValue.js | 172 + .../lib/models/thing.js | 195 + .../lib/operations/index.d.ts | 435 + .../lib/operations/index.js | 17 + .../lib/operations/local.js | 891 + .../cognitiveServicesLocalSearch/package.json | 24 + .../cognitiveServicesQnAMaker/LICENSE.txt | 21 + .../cognitiveServicesQnAMaker/README.md | 44 + .../lib/models/alterationsDTO.js | 59 + .../lib/models/createKbDTO.js | 104 + .../lib/models/createKbInputDTO.js | 92 + .../lib/models/deleteKbContentsDTO.js | 75 + .../lib/models/endpointKeysDTO.js | 76 + .../lib/models/errorModel.js | 105 + .../lib/models/errorResponse.js | 54 + .../lib/models/errorResponseError.js | 92 + .../lib/models/fileDTO.js | 65 + .../lib/models/index.d.ts | 452 + .../lib/models/index.js | 44 + .../lib/models/innerErrorModel.js | 65 + .../lib/models/knowledgebaseDTO.js | 136 + .../lib/models/knowledgebasesDTO.js | 60 + .../lib/models/metadataDTO.js | 68 + .../lib/models/operation.js | 106 + .../lib/models/qnADTO.js | 107 + .../lib/models/qnADocumentsDTO.js | 60 + .../lib/models/replaceKbDTO.js | 61 + .../lib/models/updateKbContentsDTO.js | 85 + .../lib/models/updateKbOperationDTO.js | 73 + .../lib/models/updateKbOperationDTOAdd.js | 92 + .../lib/models/updateKbOperationDTODelete.js | 76 + .../lib/models/updateKbOperationDTOUpdate.js | 84 + .../lib/models/updateMetadataDTO.js | 78 + .../lib/models/updateQnaDTO.js | 96 + .../lib/models/updateQnaDTOMetadata.js | 78 + .../lib/models/updateQnaDTOQuestions.js | 76 + .../lib/models/updateQuestionsDTO.js | 75 + .../lib/models/wordAlterationsDTO.js | 60 + .../lib/operations/alterations.js | 433 + .../lib/operations/endpointKeys.js | 430 + .../lib/operations/index.d.ts | 864 + .../lib/operations/index.js | 20 + .../lib/operations/knowledgebase.js | 1825 + .../lib/operations/operations.js | 234 + .../lib/qnAMakerClient.d.ts} | 17 +- .../lib/qnAMakerClient.js | 67 + .../cognitiveServicesQnAMaker/package.json | 24 + .../lib/models/answer.js | 2 +- .../lib/models/article.js | 2 +- .../lib/models/computation.js | 4 +- .../lib/models/creativeWork.js | 6 +- .../lib/models/errorModel.js | 16 +- .../lib/models/errorResponse.js | 4 +- .../lib/models/identifiable.js | 2 +- .../lib/models/imageObject.js | 2 +- .../lib/models/images.js | 10 +- .../lib/models/index.d.ts | 837 +- .../lib/models/mediaObject.js | 9 +- .../lib/models/news.js | 4 +- .../lib/models/places.js | 2 +- .../lib/models/query.js | 21 +- .../lib/models/queryContext.js | 16 +- .../lib/models/rankingRankingGroup.js | 2 +- .../lib/models/rankingRankingItem.js | 22 +- .../lib/models/rankingRankingResponse.js | 15 +- .../relatedSearchesRelatedSearchAnswer.js | 3 +- .../lib/models/response.js | 2 +- .../lib/models/responseBase.js | 2 +- .../lib/models/searchResponse.js | 122 +- .../lib/models/searchResultsAnswer.js | 32 +- .../lib/models/spellSuggestions.js | 4 +- .../lib/models/thing.js | 13 +- .../lib/models/timeZone.js | 14 +- .../lib/models/timeZoneTimeZoneInformation.js | 6 +- .../lib/models/videoObject.js | 21 +- .../lib/models/videos.js | 8 +- .../lib/models/webMetaTag.js | 4 +- .../lib/models/webPage.js | 24 +- .../lib/models/webWebAnswer.js | 4 +- .../lib/models/webWebGrouping.js | 4 +- .../lib/operations/index.d.ts | 2 +- .../lib/operations/web.js | 6 +- .../lib/webSearchClient.d.ts} | 26 +- .../lib/webSearchClient.js | 64 + .../cognitiveServicesWebSearch/package.json | 10 +- .../containerRegistryManagement/README.md | 33 +- .../lib/models/actor.js | 2 +- .../lib/models/agentProperties.js | 2 +- .../lib/models/argument.js | 6 +- .../lib/models/authInfo.js | 13 +- .../lib/models/authInfoUpdateParameters.js | 11 +- .../lib/models/baseImageDependency.js | 10 +- .../lib/models/baseImageTrigger.js | 6 +- .../baseImageTriggerUpdateParameters.js | 6 +- .../lib/models/callbackConfig.js | 6 +- .../lib/models/dockerBuildRequest.js | 34 +- .../lib/models/dockerBuildStep.js | 12 +- .../models/dockerBuildStepUpdateParameters.js | 12 +- .../lib/models/encodedTaskRunRequest.js | 30 +- .../lib/models/encodedTaskStep.js | 8 +- .../models/encodedTaskStepUpdateParameters.js | 8 +- .../lib/models/event.js | 85 +- .../lib/models/eventContent.js | 59 +- .../lib/models/eventInfo.js | 2 +- .../lib/models/eventListResult.js | 2 +- .../lib/models/eventRequestMessage.js | 68 +- .../lib/models/eventResponseMessage.js | 10 +- .../lib/models/fileTaskRunRequest.js | 32 +- .../lib/models/fileTaskStep.js | 8 +- .../models/fileTaskStepUpdateParameters.js | 10 +- .../lib/models/imageDescriptor.js | 8 +- .../lib/models/imageUpdateTrigger.js | 7 +- .../lib/models/importImageParameters.js | 31 +- .../lib/models/importSource.js | 16 +- .../lib/models/importSourceCredentials.js | 4 +- .../lib/models/index.d.ts | 2425 +- .../lib/models/index.js | 2 + .../lib/models/networkRuleSet.js | 71 + .../lib/models/operationDefinition.js | 27 +- .../lib/models/operationDisplayDefinition.js | 8 +- .../lib/models/operationListResult.js | 2 +- .../operationMetricSpecificationDefinition.js | 12 +- ...operationServiceSpecificationDefinition.js | 4 +- .../lib/models/platformProperties.js | 6 +- .../lib/models/platformUpdateParameters.js | 6 +- .../lib/models/proxyResource.js | 6 +- .../lib/models/quarantinePolicy.js | 2 +- .../models/regenerateCredentialParameters.js | 2 +- .../lib/models/registry.js | 47 +- .../models/registryListCredentialsResult.js | 4 +- .../lib/models/registryListResult.js | 2 +- .../lib/models/registryNameCheckRequest.js | 4 +- .../lib/models/registryNameStatus.js | 6 +- .../lib/models/registryPassword.js | 4 +- .../lib/models/registryPolicies.js | 13 +- .../lib/models/registryUpdateParameters.js | 35 +- .../lib/models/registryUsage.js | 10 +- .../lib/models/registryUsageListResult.js | 2 +- .../lib/models/replication.js | 10 +- .../lib/models/replicationListResult.js | 2 +- .../lib/models/replicationUpdateParameters.js | 2 +- .../lib/models/request.js | 17 +- .../lib/models/resource.js | 10 +- .../lib/models/run.js | 78 +- .../lib/models/runFilter.js | 22 +- .../lib/models/runGetLogResult.js | 4 +- .../lib/models/runListResult.js | 2 +- .../lib/models/runRequest.js | 4 +- .../lib/models/runUpdateParameters.js | 2 +- .../lib/models/setValue.js | 8 +- .../lib/models/sku.js | 6 +- .../lib/models/source.js | 4 +- .../lib/models/sourceProperties.js | 23 +- .../lib/models/sourceTrigger.js | 40 +- .../lib/models/sourceTriggerDescriptor.js | 14 +- .../models/sourceTriggerUpdateParameters.js | 38 +- .../lib/models/sourceUpdateParameters.js | 24 +- .../lib/models/sourceUploadDefinition.js | 4 +- .../lib/models/status.js | 8 +- .../lib/models/storageAccountProperties.js | 2 +- .../lib/models/target.js | 18 +- .../lib/models/task.js | 57 +- .../lib/models/taskListResult.js | 2 +- .../lib/models/taskRunRequest.js | 6 +- .../lib/models/taskStepProperties.js | 10 +- .../lib/models/taskStepUpdateParameters.js | 8 +- .../lib/models/taskUpdateParameters.js | 54 +- .../lib/models/triggerProperties.js | 12 +- .../lib/models/triggerUpdateParameters.js | 12 +- .../lib/models/trustPolicy.js | 6 +- .../lib/models/virtualNetworkRule.js | 53 + .../lib/models/webhook.js | 18 +- .../lib/models/webhookCreateParameters.js | 22 +- .../lib/models/webhookListResult.js | 2 +- .../lib/models/webhookUpdateParameters.js | 22 +- .../lib/operations/index.d.ts | 80 + .../lib/operations/registries.js | 198 + .../lib/operations/replications.js | 30 + .../lib/operations/runs.js | 30 + .../lib/operations/tasks.js | 36 + .../lib/operations/webhooks.js | 48 + .../containerRegistryManagement/package.json | 4 +- .../customVision/prediction/README.md | 50 + .../prediction/lib/models/boundingBox.js | 8 +- .../prediction/lib/models/imagePrediction.js | 12 +- .../prediction/lib/models/imageUrl.js | 2 +- .../prediction/lib/models/index.d.ts | 45 +- .../prediction/lib/models/prediction.js | 18 +- .../prediction/lib/predictionAPIClient.d.ts | 6 +- .../prediction/lib/predictionAPIClient.js | 37 +- .../customVision/prediction/package.json | 6 +- lib/services/customVision/training/README.md | 44 + .../training/lib/models/boundingBox.js | 12 +- .../training/lib/models/domain.js | 15 +- .../training/lib/models/exportModel.js | 22 +- .../customVision/training/lib/models/image.js | 45 +- .../training/lib/models/imageCreateResult.js | 37 +- .../training/lib/models/imageCreateSummary.js | 9 +- .../lib/models/imageFileCreateBatch.js | 8 +- .../lib/models/imageFileCreateEntry.js | 14 +- .../training/lib/models/imageIdCreateBatch.js | 8 +- .../training/lib/models/imageIdCreateEntry.js | 11 +- .../training/lib/models/imagePerformance.js | 31 +- .../training/lib/models/imagePrediction.js | 17 +- .../training/lib/models/imageRegion.js | 24 +- .../lib/models/imageRegionCreateBatch.js | 5 +- .../lib/models/imageRegionCreateEntry.js | 21 +- .../lib/models/imageRegionCreateResult.js | 27 +- .../lib/models/imageRegionCreateSummary.js | 11 +- .../lib/models/imageRegionProposal.js | 11 +- .../training/lib/models/imageTag.js | 9 +- .../lib/models/imageTagCreateBatch.js | 8 +- .../lib/models/imageTagCreateEntry.js | 9 +- .../lib/models/imageTagCreateSummary.js | 11 +- .../training/lib/models/imageUrl.js | 3 +- .../lib/models/imageUrlCreateBatch.js | 8 +- .../lib/models/imageUrlCreateEntry.js | 11 +- .../training/lib/models/index.d.ts | 868 +- .../customVision/training/lib/models/index.js | 26 +- .../training/lib/models/iteration.js | 46 +- .../lib/models/iterationPerformance.js | 30 +- .../training/lib/models/prediction.js | 21 +- .../lib/models/predictionQueryResult.js | 25 +- .../training/lib/models/predictionQueryTag.js | 9 +- .../lib/models/predictionQueryToken.js | 29 +- .../training/lib/models/project.js | 34 +- .../training/lib/models/projectSettings.js | 12 +- .../training/lib/models/region.js | 15 +- .../training/lib/models/regionProposal.js | 15 +- .../lib/models/storedImagePrediction.js | 45 +- .../customVision/training/lib/models/tag.js | 24 +- .../training/lib/models/tagPerformance.js | 29 +- .../training/lib/trainingAPIClient.d.ts | 1524 +- .../training/lib/trainingAPIClient.js | 3990 +- .../customVision/training/package.json | 8 +- ...APIClient.d.ts => entitySearchClient.d.ts} | 24 +- ...archAPIClient.js => entitySearchClient.js} | 27 +- .../entitySearch/lib/models/airport.js | 4 +- .../lib/models/contractualRulesAttribution.js | 2 +- .../models/contractualRulesContractualRule.js | 6 +- .../contractualRulesLicenseAttribution.js | 4 +- .../models/contractualRulesLinkAttribution.js | 6 +- .../contractualRulesMediaAttribution.js | 6 +- .../models/contractualRulesTextAttribution.js | 4 +- .../entitySearch/lib/models/creativeWork.js | 6 +- .../entitySearch/lib/models/entities.js | 6 +- .../models/entitiesEntityPresentationInfo.js | 8 +- .../entitySearch/lib/models/errorModel.js | 16 +- .../entitySearch/lib/models/errorResponse.js | 4 +- lib/services/entitySearch/lib/models/hotel.js | 4 +- .../entitySearch/lib/models/identifiable.js | 2 +- .../entitySearch/lib/models/imageObject.js | 2 +- .../entitySearch/lib/models/index.d.ts | 699 +- .../entitySearch/lib/models/localBusiness.js | 8 +- .../entitySearch/lib/models/mediaObject.js | 9 +- .../entitySearch/lib/models/movieTheater.js | 2 +- lib/services/entitySearch/lib/models/place.js | 36 +- .../entitySearch/lib/models/places.js | 2 +- .../entitySearch/lib/models/postalAddress.js | 28 +- .../entitySearch/lib/models/queryContext.js | 14 +- .../entitySearch/lib/models/response.js | 6 +- .../entitySearch/lib/models/responseBase.js | 2 +- .../entitySearch/lib/models/restaurant.js | 8 +- .../entitySearch/lib/models/searchResponse.js | 34 +- .../lib/models/searchResultsAnswer.js | 22 +- lib/services/entitySearch/lib/models/thing.js | 29 +- .../lib/operations/entitiesOperations.js | 6 +- .../entitySearch/lib/operations/index.d.ts | 2 +- lib/services/entitySearch/package.json | 16 +- lib/services/hdInsightManagement/README.md | 33 +- .../lib/models/application.js | 38 +- .../lib/models/applicationGetEndpoint.js | 6 +- .../lib/models/applicationGetHttpsEndpoint.js | 8 +- .../lib/models/applicationListResult.js | 4 +- .../lib/models/applicationProperties.js | 26 +- .../hdInsightManagement/lib/models/cluster.js | 100 +- .../models/clusterCreateParametersExtended.js | 92 +- .../lib/models/clusterCreateProperties.js | 74 +- .../lib/models/clusterDefinition.js | 10 +- .../models/clusterDiskEncryptionParameters.js | 71 + .../lib/models/clusterGetProperties.js | 85 +- .../lib/models/clusterIdentity.js | 10 +- ...sterIdentityUserAssignedIdentitiesValue.js | 5 +- ...clusterListPersistedScriptActionsResult.js | 4 +- .../lib/models/clusterListResult.js | 2 +- ...sterListRuntimeScriptActionDetailResult.js | 4 +- .../lib/models/clusterMonitoringRequest.js | 4 +- .../lib/models/clusterMonitoringResponse.js | 6 +- .../lib/models/clusterPatchParameters.js | 2 +- .../lib/models/clusterResizeParameters.js | 2 +- .../lib/models/computeProfile.js | 2 +- .../lib/models/connectivityEndpoint.js | 8 +- .../lib/models/dataDisksGroups.js | 8 +- .../lib/models/diskEncryptionProperties.js | 90 + .../lib/models/errorResponse.js | 4 +- .../hdInsightManagement/lib/models/errors.js | 4 +- .../models/executeScriptActionParameters.js | 6 +- .../lib/models/extension.js | 6 +- .../lib/models/hardwareProfile.js | 2 +- .../hdInsightManagement/lib/models/index.d.ts | 1309 +- .../hdInsightManagement/lib/models/index.js | 2 + .../lib/models/linuxOperatingSystemProfile.js | 8 +- .../lib/models/localizedName.js | 5 +- .../lib/models/operation.js | 12 +- .../lib/models/operationDisplay.js | 7 +- .../lib/models/operationListResult.js | 4 +- .../lib/models/operationResource.js | 8 +- .../lib/models/osProfile.js | 11 +- .../lib/models/quotaInfo.js | 2 +- .../lib/models/resource.js | 6 +- .../hdInsightManagement/lib/models/role.js | 34 +- .../lib/models/runtimeScriptAction.js | 10 +- .../lib/models/runtimeScriptActionDetail.js | 16 +- .../lib/models/scriptAction.js | 6 +- .../scriptActionExecutionHistoryList.js | 2 +- .../models/scriptActionExecutionSummary.js | 4 +- .../scriptActionPersistedGetResponseSpec.js | 10 +- .../lib/models/scriptActionsList.js | 2 +- .../lib/models/securityProfile.js | 20 +- .../lib/models/sshProfile.js | 2 +- .../lib/models/sshPublicKey.js | 2 +- .../lib/models/storageAccount.js | 12 +- .../lib/models/storageProfile.js | 2 +- .../lib/models/trackedResource.js | 4 +- .../hdInsightManagement/lib/models/usage.js | 14 +- .../lib/models/usagesListResult.js | 2 +- .../lib/models/virtualNetworkProfile.js | 4 +- .../lib/operations/clusters.js | 578 + .../lib/operations/index.d.ts | 248 + lib/services/hdInsightManagement/package.json | 4 +- .../imageSearch/lib/imageSearchClient.d.ts | 55 + ...earchAPIClient.js => imageSearchClient.js} | 27 +- .../imageSearch/lib/models/aggregateOffer.js | 2 +- .../imageSearch/lib/models/aggregateRating.js | 2 +- .../imageSearch/lib/models/creativeWork.js | 8 +- .../imageSearch/lib/models/errorModel.js | 16 +- .../imageSearch/lib/models/errorResponse.js | 4 +- .../imageSearch/lib/models/identifiable.js | 2 +- .../imageSearch/lib/models/imageGallery.js | 10 +- .../imageSearch/lib/models/imageInsights.js | 118 +- .../lib/models/imageInsightsImageCaption.js | 8 +- .../imageSearch/lib/models/imageObject.js | 34 +- .../imageSearch/lib/models/imageTagsModule.js | 10 +- lib/services/imageSearch/lib/models/images.js | 18 +- .../lib/models/imagesImageMetadata.js | 12 +- .../imageSearch/lib/models/imagesModule.js | 4 +- .../imageSearch/lib/models/index.d.ts | 1183 +- .../imageSearch/lib/models/insightsTag.js | 4 +- .../imageSearch/lib/models/mediaObject.js | 15 +- .../lib/models/normalizedRectangle.js | 8 +- lib/services/imageSearch/lib/models/offer.js | 52 +- lib/services/imageSearch/lib/models/person.js | 5 +- .../lib/models/pivotSuggestions.js | 6 +- .../imageSearch/lib/models/propertiesItem.js | 4 +- lib/services/imageSearch/lib/models/query.js | 49 +- lib/services/imageSearch/lib/models/rating.js | 4 +- lib/services/imageSearch/lib/models/recipe.js | 12 +- .../imageSearch/lib/models/recipesModule.js | 4 +- .../lib/models/recognizedEntitiesModule.js | 4 +- .../lib/models/recognizedEntity.js | 65 +- .../lib/models/recognizedEntityGroup.js | 6 +- .../lib/models/recognizedEntityRegion.js | 12 +- .../lib/models/relatedCollectionsModule.js | 4 +- .../lib/models/relatedSearchesModule.js | 4 +- .../imageSearch/lib/models/response.js | 4 +- .../imageSearch/lib/models/responseBase.js | 2 +- .../lib/models/searchResultsAnswer.js | 6 +- lib/services/imageSearch/lib/models/thing.js | 51 +- .../imageSearch/lib/models/trendingImages.js | 4 +- .../lib/models/trendingImagesCategory.js | 14 +- .../lib/models/trendingImagesTile.js | 90 +- .../lib/operations/imagesOperations.js | 14 +- .../imageSearch/lib/operations/index.d.ts | 2 +- lib/services/imageSearch/package.json | 14 +- lib/services/keyVault/package.json | 2 +- lib/services/logicManagement/README.md | 33 +- .../lib/logicManagementClient.d.ts | 2 + .../lib/logicManagementClient.js | 2 + .../aS2AcknowledgementConnectionSettings.js | 12 +- .../lib/models/aS2AgreementContent.js | 260 +- .../lib/models/aS2EnvelopeSettings.js | 10 +- .../lib/models/aS2ErrorSettings.js | 6 +- .../lib/models/aS2MdnSettings.js | 26 +- .../models/aS2MessageConnectionSettings.js | 12 +- .../lib/models/aS2OneWayAgreement.js | 150 +- .../lib/models/aS2ProtocolSettings.js | 128 +- .../lib/models/aS2SecuritySettings.js | 30 +- .../lib/models/aS2ValidationSettings.js | 28 +- .../lib/models/agreementContent.js | 1093 +- .../artifactContentPropertiesDefinition.js | 22 +- .../lib/models/artifactProperties.js | 6 +- .../lib/models/assemblyDefinition.js | 10 +- .../lib/models/assemblyProperties.js | 8 +- .../lib/models/azureResourceErrorInfo.js | 4 +- .../lib/models/b2BPartnerContent.js | 2 +- .../lib/models/batchConfiguration.js | 47 +- .../models/batchConfigurationProperties.js | 37 +- .../lib/models/batchReleaseCriteria.js | 28 +- .../lib/models/businessIdentity.js | 4 +- .../logicManagement/lib/models/callbackUrl.js | 2 +- .../logicManagement/lib/models/contentHash.js | 4 +- .../logicManagement/lib/models/contentLink.js | 14 +- .../logicManagement/lib/models/correlation.js | 2 +- .../models/edifactAcknowledgementSettings.js | 28 +- .../lib/models/edifactAgreementContent.js | 412 +- .../lib/models/edifactDelimiterOverride.js | 26 +- .../lib/models/edifactEnvelopeOverride.js | 33 +- .../lib/models/edifactEnvelopeSettings.js | 108 +- .../lib/models/edifactFramingSettings.js | 26 +- .../lib/models/edifactMessageFilter.js | 2 +- .../lib/models/edifactMessageIdentifier.js | 4 +- .../lib/models/edifactOneWayAgreement.js | 215 +- .../lib/models/edifactProcessingSettings.js | 12 +- .../lib/models/edifactProtocolSettings.js | 253 +- .../lib/models/edifactSchemaReference.js | 15 +- .../lib/models/edifactValidationOverride.js | 16 +- .../lib/models/edifactValidationSettings.js | 26 +- .../logicManagement/lib/models/errorInfo.js | 2 +- .../lib/models/errorProperties.js | 4 +- .../lib/models/errorResponse.js | 6 +- .../logicManagement/lib/models/expression.js | 12 +- .../lib/models/expressionRoot.js | 2 +- .../lib/models/expressionTraces.js | 2 +- .../generateUpgradedDefinitionParameters.js | 2 +- .../lib/models/getCallbackUrlParameters.js | 4 +- .../logicManagement/lib/models/index.d.ts | 9270 +---- .../logicManagement/lib/models/index.js | 5 + .../lib/models/integrationAccount.js | 6 +- .../lib/models/integrationAccountAgreement.js | 1041 +- .../integrationAccountAgreementFilter.js | 2 +- .../integrationAccountAgreementListResult.js | 2 +- .../models/integrationAccountCertificate.js | 22 +- ...integrationAccountCertificateListResult.js | 2 +- .../models/integrationAccountListResult.js | 2 +- .../lib/models/integrationAccountMap.js | 34 +- .../lib/models/integrationAccountMapFilter.js | 5 +- .../models/integrationAccountMapListResult.js | 2 +- ...ionAccountMapPropertiesParametersSchema.js | 2 +- .../lib/models/integrationAccountPartner.js | 14 +- .../models/integrationAccountPartnerFilter.js | 2 +- .../integrationAccountPartnerListResult.js | 2 +- .../lib/models/integrationAccountSchema.js | 36 +- .../models/integrationAccountSchemaFilter.js | 4 +- .../integrationAccountSchemaListResult.js | 2 +- .../lib/models/integrationAccountSession.js | 6 +- .../models/integrationAccountSessionFilter.js | 2 +- .../integrationAccountSessionListResult.js | 2 +- .../lib/models/integrationAccountSku.js | 2 +- .../logicManagement/lib/models/jsonSchema.js | 4 +- .../logicManagement/lib/models/keyVaultKey.js | 11 +- .../lib/models/keyVaultKeyAttributes.js | 6 +- .../lib/models/keyVaultKeyCollection.js | 2 +- .../lib/models/keyVaultKeyReference.js | 12 +- .../models/keyVaultKeyReferenceKeyVault.js | 6 +- .../lib/models/keyVaultReference.js | 1 - .../lib/models/listKeyVaultKeysDefinition.js | 4 +- .../logicManagement/lib/models/operation.js | 13 +- .../lib/models/operationDisplay.js | 8 +- .../lib/models/operationListResult.js | 2 +- .../lib/models/operationResult.js | 46 +- .../lib/models/operationResultProperties.js | 14 +- .../lib/models/partnerContent.js | 4 +- .../lib/models/recurrenceSchedule.js | 10 +- .../models/recurrenceScheduleOccurrence.js | 4 +- .../lib/models/regenerateActionParameter.js | 2 +- .../lib/models/repetitionIndex.js | 4 +- .../logicManagement/lib/models/request.js | 69 + .../lib/models/requestHistory.js | 131 + .../lib/models/requestHistoryListResult.js | 67 + .../lib/models/requestHistoryProperties.js | 96 + .../logicManagement/lib/models/resource.js | 10 +- .../lib/models/resourceReference.js | 7 +- .../logicManagement/lib/models/response.js | 79 + .../lib/models/retryHistory.js | 18 +- .../lib/models/runActionCorrelation.js | 2 +- .../lib/models/runCorrelation.js | 4 +- .../models/setTriggerStateActionDefinition.js | 59 +- .../logicManagement/lib/models/sku.js | 10 +- .../logicManagement/lib/models/subResource.js | 2 +- .../lib/models/trackingEvent.js | 12 +- .../lib/models/trackingEventErrorInfo.js | 4 +- .../lib/models/trackingEventsDefinition.js | 6 +- .../logicManagement/lib/models/workflow.js | 38 +- .../lib/models/workflowFilter.js | 5 +- .../lib/models/workflowListResult.js | 2 +- .../lib/models/workflowOutputParameter.js | 2 +- .../lib/models/workflowParameter.js | 12 +- .../logicManagement/lib/models/workflowRun.js | 169 +- .../lib/models/workflowRunAction.js | 58 +- .../lib/models/workflowRunActionFilter.js | 2 +- .../lib/models/workflowRunActionListResult.js | 2 +- .../workflowRunActionRepetitionDefinition.js | 62 +- .../lib/models/workflowRunFilter.js | 2 +- .../lib/models/workflowRunListResult.js | 2 +- .../lib/models/workflowRunTrigger.js | 60 +- .../lib/models/workflowTrigger.js | 52 +- .../lib/models/workflowTriggerCallbackUrl.js | 22 +- .../lib/models/workflowTriggerFilter.js | 2 +- .../lib/models/workflowTriggerHistory.js | 64 +- .../models/workflowTriggerHistoryFilter.js | 4 +- .../workflowTriggerHistoryListResult.js | 2 +- .../workflowTriggerListCallbackUrlQueries.js | 10 +- .../lib/models/workflowTriggerListResult.js | 2 +- .../lib/models/workflowTriggerRecurrence.js | 22 +- .../lib/models/workflowVersion.js | 34 +- .../lib/models/workflowVersionListResult.js | 2 +- .../lib/models/x12AcknowledgementSettings.js | 40 +- .../lib/models/x12AgreementContent.js | 384 +- .../lib/models/x12DelimiterOverrides.js | 20 +- .../lib/models/x12EnvelopeOverride.js | 22 +- .../lib/models/x12EnvelopeSettings.js | 56 +- .../lib/models/x12FramingSettings.js | 16 +- .../lib/models/x12MessageFilter.js | 2 +- .../lib/models/x12MessageIdentifier.js | 2 +- .../lib/models/x12OneWayAgreement.js | 211 +- .../lib/models/x12ProcessingSettings.js | 14 +- .../lib/models/x12ProtocolSettings.js | 212 +- .../lib/models/x12SchemaReference.js | 8 +- .../lib/models/x12SecuritySettings.js | 8 +- .../lib/models/x12ValidationOverride.js | 16 +- .../lib/models/x12ValidationSettings.js | 26 +- .../logicManagement/lib/operations/index.d.ts | 444 + .../logicManagement/lib/operations/index.js | 2 + .../lib/operations/integrationAccounts.js | 6 + ...lowRunActionRepetitionsRequestHistories.js | 782 + .../workflowRunActionRequestHistories.js | 762 + .../lib/operations/workflows.js | 30 + lib/services/logicManagement/package.json | 4 +- lib/services/luis/authoring/README.md | 16 +- .../authoring/lib/lUISAuthoringClient.d.ts | 1 + .../luis/authoring/lib/lUISAuthoringClient.js | 1 + .../lib/models/appVersionSettingObject.js | 60 + .../lib/models/applicationCreateObject.js | 12 +- .../lib/models/applicationInfoResponse.js | 22 +- .../lib/models/applicationPublishObject.js | 13 +- .../models/applicationSettingUpdateObject.js | 2 +- .../lib/models/applicationSettings.js | 6 +- .../lib/models/applicationUpdateObject.js | 4 +- .../authoring/lib/models/availableCulture.js | 4 +- .../models/availablePrebuiltEntityModel.js | 6 +- .../authoring/lib/models/batchLabelExample.js | 14 +- .../luis/authoring/lib/models/childEntity.js | 4 +- .../luis/authoring/lib/models/closedList.js | 6 +- .../lib/models/closedListEntityExtractor.js | 20 +- .../lib/models/closedListModelCreateObject.js | 4 +- .../lib/models/closedListModelPatchObject.js | 2 +- .../lib/models/closedListModelUpdateObject.js | 4 +- .../lib/models/collaboratorsArray.js | 2 +- .../models/compositeChildModelCreateObject.js | 2 +- .../lib/models/compositeEntityExtractor.js | 20 +- .../lib/models/compositeEntityModel.js | 4 +- .../lib/models/customPrebuiltModel.js | 23 +- .../luis/authoring/lib/models/endpointInfo.js | 14 +- .../lib/models/enqueueTrainingResponse.js | 6 +- .../lib/models/entitiesSuggestionExample.js | 8 +- .../authoring/lib/models/entityExtractor.js | 23 +- .../luis/authoring/lib/models/entityLabel.js | 8 +- .../authoring/lib/models/entityLabelObject.js | 6 +- .../authoring/lib/models/entityModelInfo.js | 2 +- .../authoring/lib/models/entityPrediction.js | 10 +- .../luis/authoring/lib/models/entityRole.js | 4 +- .../lib/models/entityRoleCreateObject.js | 2 +- .../lib/models/entityRoleUpdateObject.js | 2 +- .../authoring/lib/models/errorResponse.js | 2 +- .../lib/models/exampleLabelObject.js | 7 +- .../authoring/lib/models/explicitListItem.js | 4 +- .../models/explicitListItemCreateObject.js | 2 +- .../models/explicitListItemUpdateObject.js | 2 +- .../authoring/lib/models/featureInfoObject.js | 6 +- .../lib/models/featuresResponseObject.js | 4 +- .../lib/models/hierarchicalChildEntity.js | 4 +- .../hierarchicalChildModelCreateObject.js | 2 +- .../hierarchicalChildModelUpdateObject.js | 2 +- .../lib/models/hierarchicalEntityExtractor.js | 20 +- .../lib/models/hierarchicalEntityModel.js | 4 +- .../authoring/lib/models/hierarchicalModel.js | 12 +- .../luis/authoring/lib/models/index.d.ts | 1919 +- .../luis/authoring/lib/models/index.js | 1 + .../authoring/lib/models/intentClassifier.js | 5 +- .../authoring/lib/models/intentPrediction.js | 4 +- .../lib/models/intentsSuggestionExample.js | 8 +- .../luis/authoring/lib/models/jSONEntity.js | 8 +- .../authoring/lib/models/jSONModelFeature.js | 12 +- .../authoring/lib/models/jSONRegexFeature.js | 7 +- .../authoring/lib/models/jSONUtterance.js | 6 +- .../lib/models/labelExampleResponse.js | 4 +- .../authoring/lib/models/labelTextObject.js | 4 +- .../authoring/lib/models/labeledUtterance.js | 14 +- .../luis/authoring/lib/models/luisApp.js | 30 +- .../authoring/lib/models/modelCreateObject.js | 2 +- .../luis/authoring/lib/models/modelInfo.js | 16 +- .../authoring/lib/models/modelInfoResponse.js | 31 +- .../lib/models/modelTrainingDetails.js | 12 +- .../authoring/lib/models/modelTrainingInfo.js | 15 +- .../authoring/lib/models/modelUpdateObject.js | 2 +- .../authoring/lib/models/operationError.js | 4 +- .../authoring/lib/models/operationStatus.js | 4 +- .../luis/authoring/lib/models/patternAny.js | 6 +- .../lib/models/patternAnyEntityExtractor.js | 20 +- .../lib/models/patternAnyModelCreateObject.js | 4 +- .../lib/models/patternAnyModelUpdateObject.js | 4 +- .../lib/models/patternCreateObject.js | 4 +- .../lib/models/patternFeatureInfo.js | 2 +- .../luis/authoring/lib/models/patternRule.js | 5 +- .../lib/models/patternRuleCreateObject.js | 5 +- .../authoring/lib/models/patternRuleInfo.js | 7 +- .../lib/models/patternRuleUpdateObject.js | 7 +- .../lib/models/patternUpdateObject.js | 8 +- .../lib/models/personalAssistantsResponse.js | 4 +- .../lib/models/phraseListFeatureInfo.js | 8 +- .../lib/models/phraselistCreateObject.js | 12 +- .../lib/models/phraselistUpdateObject.js | 14 +- .../authoring/lib/models/prebuiltDomain.js | 12 +- .../models/prebuiltDomainCreateBaseObject.js | 2 +- .../lib/models/prebuiltDomainCreateObject.js | 4 +- .../lib/models/prebuiltDomainItem.js | 6 +- .../models/prebuiltDomainModelCreateObject.js | 4 +- .../lib/models/prebuiltDomainObject.js | 4 +- .../authoring/lib/models/prebuiltEntity.js | 4 +- .../lib/models/prebuiltEntityExtractor.js | 18 +- .../lib/models/publishSettingUpdateObject.js | 8 +- .../authoring/lib/models/publishSettings.js | 13 +- .../luis/authoring/lib/models/regexEntity.js | 6 +- .../lib/models/regexEntityExtractor.js | 20 +- .../lib/models/regexModelCreateObject.js | 4 +- .../lib/models/regexModelUpdateObject.js | 4 +- .../authoring/lib/models/subClosedList.js | 4 +- .../lib/models/subClosedListResponse.js | 2 +- .../authoring/lib/models/taskUpdateObject.js | 2 +- .../authoring/lib/models/userAccessList.js | 4 +- .../authoring/lib/models/userCollaborator.js | 2 +- .../luis/authoring/lib/models/versionInfo.js | 27 +- .../lib/models/wordListBaseUpdateObject.js | 4 +- .../authoring/lib/models/wordListObject.js | 4 +- .../luis/authoring/lib/operations/apps.js | 9 - .../luis/authoring/lib/operations/index.d.ts | 150 +- .../luis/authoring/lib/operations/index.js | 1 + .../luis/authoring/lib/operations/settings.js | 516 + lib/services/luis/authoring/package.json | 4 +- lib/services/luis/runtime/README.md | 16 +- .../luis/runtime/lib/models/aPIError.js | 4 +- .../runtime/lib/models/compositeChildModel.js | 4 +- .../lib/models/compositeEntityModel.js | 6 +- .../luis/runtime/lib/models/entityModel.js | 8 +- .../lib/models/entityWithResolution.js | 3 +- .../runtime/lib/models/entityWithScore.js | 3 +- .../luis/runtime/lib/models/index.d.ts | 157 +- .../luis/runtime/lib/models/intentModel.js | 4 +- .../luis/runtime/lib/models/luisResult.js | 32 +- .../luis/runtime/lib/models/sentiment.js | 4 +- lib/services/luis/runtime/package.json | 4 +- .../mediaServicesManagement/README.md | 33 +- .../lib/models/aacAudio.js | 5 +- .../lib/models/accountFilter.js | 28 +- .../lib/models/accountFilterCollection.js | 5 +- .../lib/models/akamaiAccessControl.js | 2 +- .../akamaiSignatureHeaderAuthenticationKey.js | 7 +- .../lib/models/apiError.js | 12 +- .../lib/models/asset.js | 19 +- .../lib/models/assetCollection.js | 5 +- .../lib/models/assetContainerSas.js | 2 +- .../lib/models/assetFileEncryptionMetadata.js | 6 +- .../lib/models/assetFilter.js | 28 +- .../lib/models/assetFilterCollection.js | 5 +- .../lib/models/assetStreamingLocator.js | 16 +- .../lib/models/audio.js | 8 +- .../lib/models/audioAnalyzerPreset.js | 6 +- .../models/builtInStandardEncoderPreset.js | 5 +- .../lib/models/cbcsDrmConfiguration.js | 16 +- .../lib/models/cencDrmConfiguration.js | 10 +- .../lib/models/checkNameAvailabilityInput.js | 4 +- .../lib/models/codec.js | 6 +- .../lib/models/commonEncryptionCbcs.js | 47 +- .../lib/models/commonEncryptionCenc.js | 38 +- .../lib/models/contentKeyPolicy.js | 10 +- .../lib/models/contentKeyPolicyCollection.js | 5 +- .../models/contentKeyPolicyConfiguration.js | 2 +- .../contentKeyPolicyFairPlayConfiguration.js | 15 +- .../lib/models/contentKeyPolicyOption.js | 14 +- .../contentKeyPolicyPlayReadyConfiguration.js | 4 +- ...dyContentEncryptionKeyFromKeyIdentifier.js | 2 +- ...entKeyPolicyPlayReadyContentKeyLocation.js | 2 +- ...eadyExplicitAnalogTelevisionRestriction.js | 4 +- .../contentKeyPolicyPlayReadyLicense.js | 63 +- .../contentKeyPolicyPlayReadyPlayRight.js | 37 +- .../lib/models/contentKeyPolicyProperties.js | 10 +- .../lib/models/contentKeyPolicyRestriction.js | 2 +- .../contentKeyPolicyRestrictionTokenKey.js | 2 +- .../lib/models/contentKeyPolicyRsaTokenKey.js | 4 +- .../contentKeyPolicySymmetricTokenKey.js | 2 +- .../lib/models/contentKeyPolicyTokenClaim.js | 4 +- .../contentKeyPolicyTokenRestriction.js | 19 +- .../contentKeyPolicyWidevineConfiguration.js | 2 +- ...contentKeyPolicyX509CertificateTokenKey.js | 2 +- .../lib/models/crossSiteAccessPolicies.js | 4 +- .../lib/models/defaultKey.js | 4 +- .../lib/models/deinterlace.js | 13 +- .../lib/models/enabledProtocols.js | 8 +- .../entityNameAvailabilityCheckOutput.js | 6 +- .../lib/models/envelopeEncryption.js | 30 +- .../models/filterTrackPropertyCondition.js | 12 +- .../lib/models/filterTrackSelection.js | 2 +- .../lib/models/filters.js | 31 +- .../lib/models/firstQuality.js | 2 +- .../lib/models/format.js | 4 +- .../lib/models/h264Layer.js | 28 +- .../lib/models/h264Video.js | 20 +- .../mediaServicesManagement/lib/models/hls.js | 4 +- .../lib/models/iPAccessControl.js | 2 +- .../lib/models/iPRange.js | 6 +- .../lib/models/image.js | 15 +- .../lib/models/index.d.ts | 3625 +- .../mediaServicesManagement/lib/models/job.js | 28 +- .../lib/models/jobCollection.js | 5 +- .../lib/models/jobError.js | 21 +- .../lib/models/jobErrorDetail.js | 4 +- .../lib/models/jobInput.js | 2 +- .../lib/models/jobInputAsset.js | 2 +- .../lib/models/jobInputClip.js | 6 +- .../lib/models/jobInputHttp.js | 2 +- .../lib/models/jobInputs.js | 4 +- .../lib/models/jobOutput.js | 52 +- .../lib/models/jobOutputAsset.js | 5 +- .../lib/models/jpgImage.js | 5 +- .../lib/models/jpgLayer.js | 2 +- .../lib/models/layer.js | 17 +- .../lib/models/listContainerSasInput.js | 7 +- .../lib/models/listContentKeysResponse.js | 2 +- .../lib/models/listPathsResponse.js | 4 +- .../models/listStreamingLocatorsResponse.js | 2 +- .../lib/models/liveEvent.js | 70 +- .../lib/models/liveEventActionInput.js | 2 +- .../lib/models/liveEventEncoding.js | 8 +- .../lib/models/liveEventEndpoint.js | 4 +- .../lib/models/liveEventInput.js | 18 +- .../lib/models/liveEventInputAccessControl.js | 4 +- .../lib/models/liveEventListResult.js | 4 +- .../lib/models/liveEventPreview.js | 19 +- .../models/liveEventPreviewAccessControl.js | 4 +- .../lib/models/liveOutput.js | 24 +- .../lib/models/liveOutputListResult.js | 4 +- .../lib/models/location.js | 2 +- .../lib/models/mediaService.js | 5 +- .../lib/models/mediaServiceCollection.js | 5 +- .../lib/models/metric.js | 20 +- .../lib/models/metricDimension.js | 6 +- .../lib/models/metricProperties.js | 6 +- .../lib/models/multiBitrateFormat.js | 2 +- .../lib/models/noEncryption.js | 12 +- .../lib/models/oDataError.js | 8 +- .../lib/models/operation.js | 20 +- .../lib/models/operationCollection.js | 5 +- .../lib/models/operationDisplay.js | 9 +- .../lib/models/outputFile.js | 12 +- .../lib/models/overlay.js | 16 +- .../lib/models/pngImage.js | 5 +- .../lib/models/presentationTimeRange.js | 28 +- .../lib/models/preset.js | 2 +- .../lib/models/provider.js | 2 +- .../lib/models/rectangle.js | 14 +- .../lib/models/resource.js | 6 +- .../lib/models/serviceSpecification.js | 2 +- .../lib/models/standardEncoderPreset.js | 34 +- .../lib/models/storageAccount.js | 7 +- .../storageEncryptedAssetDecryptionData.js | 4 +- .../lib/models/streamingEndpoint.js | 47 +- .../models/streamingEndpointAccessControl.js | 8 +- .../lib/models/streamingEndpointListResult.js | 4 +- .../lib/models/streamingEntityScaleUnit.js | 2 +- .../lib/models/streamingLocator.js | 20 +- .../lib/models/streamingLocatorCollection.js | 5 +- .../lib/models/streamingLocatorContentKey.js | 17 +- .../lib/models/streamingPath.js | 12 +- .../lib/models/streamingPolicy.js | 153 +- .../lib/models/streamingPolicyCollection.js | 5 +- .../lib/models/streamingPolicyContentKey.js | 6 +- .../lib/models/streamingPolicyContentKeys.js | 9 +- .../streamingPolicyFairPlayConfiguration.js | 6 +- .../streamingPolicyPlayReadyConfiguration.js | 6 +- .../streamingPolicyWidevineConfiguration.js | 4 +- .../lib/models/subscriptionMediaService.js | 5 +- .../subscriptionMediaServiceCollection.js | 5 +- .../lib/models/syncStorageKeysInput.js | 2 +- .../lib/models/trackPropertyCondition.js | 12 +- .../lib/models/trackSelection.js | 2 +- .../lib/models/trackedResource.js | 4 +- .../lib/models/transform.js | 12 +- .../lib/models/transformCollection.js | 5 +- .../lib/models/transformOutput.js | 16 +- .../lib/models/video.js | 11 +- .../lib/models/videoAnalyzerPreset.js | 11 +- .../lib/models/videoLayer.js | 26 +- .../lib/models/videoOverlay.js | 34 +- .../lib/operations/accountFilters.js | 114 +- .../lib/operations/assetFilters.js | 114 +- .../lib/operations/index.d.ts | 236 +- .../lib/operations/jobs.js | 56 +- .../lib/operations/liveEvents.js | 24 +- .../lib/operations/streamingLocators.js | 6 +- .../lib/operations/streamingPolicies.js | 12 +- .../lib/operations/transforms.js | 44 +- .../mediaServicesManagement/package.json | 4 +- lib/services/newsSearch/lib/models/answer.js | 2 +- lib/services/newsSearch/lib/models/article.js | 2 +- .../newsSearch/lib/models/creativeWork.js | 30 +- .../newsSearch/lib/models/errorModel.js | 16 +- .../newsSearch/lib/models/errorResponse.js | 4 +- .../newsSearch/lib/models/identifiable.js | 2 +- .../newsSearch/lib/models/imageObject.js | 2 +- lib/services/newsSearch/lib/models/index.d.ts | 374 +- .../newsSearch/lib/models/mediaObject.js | 7 +- lib/services/newsSearch/lib/models/news.js | 4 +- .../newsSearch/lib/models/newsArticle.js | 8 +- .../newsSearch/lib/models/newsTopic.js | 24 +- lib/services/newsSearch/lib/models/query.js | 23 +- .../newsSearch/lib/models/response.js | 2 +- .../newsSearch/lib/models/responseBase.js | 2 +- .../lib/models/searchResultsAnswer.js | 6 +- lib/services/newsSearch/lib/models/thing.js | 15 +- .../newsSearch/lib/models/trendingTopics.js | 2 +- .../newsSearch/lib/models/videoObject.js | 21 +- ...chAPIClient.d.ts => newsSearchClient.d.ts} | 24 +- ...SearchAPIClient.js => newsSearchClient.js} | 27 +- .../newsSearch/lib/operations/index.d.ts | 46 +- .../lib/operations/newsOperations.js | 80 +- lib/services/newsSearch/package.json | 14 +- lib/services/serviceFabric/README.md | 5 +- .../addRemoveReplicaScalingMechanism.js | 89 + ...applicationContainerInstanceExitedEvent.js | 194 + .../lib/models/applicationCreatedEvent.js | 7 + .../lib/models/applicationDeletedEvent.js | 7 + .../lib/models/applicationEvent.js | 7 + .../lib/models/applicationHealthPolicy.js | 4 +- .../models/applicationHealthPolicyMapItem.js | 4 +- .../applicationHealthReportExpiredEvent.js | 7 + .../models/applicationNewHealthReportEvent.js | 169 + .../models/applicationProcessExitedEvent.js | 194 + .../models/applicationResourceDescription.js | 97 +- .../lib/models/applicationScopedVolume.js | 87 + ...plicationScopedVolumeCreationParameters.js | 66 + ...eationParametersServiceFabricVolumeDisk.js | 78 + .../applicationUpgradeCompletedEvent.js | 121 + .../models/applicationUpgradeDescription.js | 4 +- .../applicationUpgradeDomainCompletedEvent.js | 146 + .../models/applicationUpgradeProgressInfo.js | 4 +- ...pplicationUpgradeRollbackCompletedEvent.js | 129 + .../applicationUpgradeRollbackStartedEvent.js | 138 + .../models/applicationUpgradeStartedEvent.js | 145 + .../applicationUpgradeUpdateDescription.js | 4 +- .../lib/models/autoScalingMechanism.js | 59 + .../lib/models/autoScalingMetric.js | 59 + .../lib/models/autoScalingPolicy.js | 84 + .../lib/models/autoScalingResourceMetric.js | 70 + .../lib/models/autoScalingTrigger.js | 58 + .../lib/models/averageLoadScalingTrigger.js | 107 + ...ternalMonitoringPipelineSinkDescription.js | 120 + .../serviceFabric/lib/models/backupInfo.js | 18 +- .../lib/models/backupPolicyDescription.js | 17 + .../lib/models/backupProgressInfo.js | 9 +- .../models/basicRetentionPolicyDescription.js | 86 + .../chaosCodePackageRestartScheduledEvent.js | 145 + .../models/chaosNodeRestartScheduledEvent.js | 120 + ...chaosPartitionPrimaryMoveScheduledEvent.js | 136 + ...aosPartitionSecondaryMoveScheduledEvent.js | 144 + .../chaosReplicaRemovalScheduledEvent.js | 127 + .../chaosReplicaRestartScheduledEvent.js | 127 + .../lib/models/chaosStartedEvent.js | 7 + .../lib/models/chaosStoppedEvent.js | 7 + .../clusterConfigurationUpgradeDescription.js | 15 +- .../serviceFabric/lib/models/clusterEvent.js | 7 + .../models/clusterHealthReportExpiredEvent.js | 7 + .../lib/models/clusterNewHealthReportEvent.js | 154 + .../models/clusterUpgradeCompletedEvent.js | 106 + .../clusterUpgradeDomainCompletedEvent.js | 122 + .../clusterUpgradeRollbackCompletedEvent.js | 114 + .../clusterUpgradeRollbackStartedEvent.js | 114 + .../lib/models/clusterUpgradeStartedEvent.js | 129 + .../lib/models/clusterVersion.js | 52 + .../composeDeploymentUpgradeDescription.js | 4 +- .../composeDeploymentUpgradeProgressInfo.js | 4 +- .../models/containerCodePackageProperties.js | 72 +- .../lib/models/containerInstanceEvent.js | 7 + ...oyedApplicationHealthReportExpiredEvent.js | 7 + ...deployedApplicationNewHealthReportEvent.js | 177 + ...dServicePackageHealthReportExpiredEvent.js | 195 + ...loyedServicePackageNewHealthReportEvent.js | 195 + .../lib/models/disableBackupDescription.js | 55 + .../serviceFabric/lib/models/endpointRef.js | 52 + .../serviceFabric/lib/models/fabricError.js | 3 +- .../lib/models/fabricErrorError.js | 3 +- .../serviceFabric/lib/models/fabricEvent.js | 8 + .../lib/models/gatewayDestination.js | 69 + .../lib/models/gatewayResourceDescription.js | 150 + .../lib/models/healthInformation.js | 2 +- .../serviceFabric/lib/models/httpConfig.js | 77 + .../lib/models/httpHostConfig.js | 70 + .../lib/models/httpRouteConfig.js | 84 + .../lib/models/httpRouteMatchHeader.js | 69 + .../lib/models/httpRouteMatchPath.js | 70 + .../lib/models/httpRouteMatchRule.js | 73 + .../lib/models/imageRegistryCredential.js | 4 +- .../serviceFabric/lib/models/index.d.ts | 2070 +- .../serviceFabric/lib/models/index.js | 244 +- .../inlinedValueSecretResourceProperties.js | 95 + .../lib/models/loadMetricReport.js | 12 +- .../lib/models/loadMetricReportInfo.js | 13 +- .../models/localNetworkResourceProperties.js | 94 + .../serviceFabric/lib/models/networkRef.js | 19 +- .../lib/models/networkResourceDescription.js | 73 + .../lib/models/networkResourceProperties.js | 89 + .../models/networkResourcePropertiesBase.js | 59 + .../lib/models/nodeAbortedEvent.js | 7 + .../lib/models/nodeAddedToClusterEvent.js | 144 + .../lib/models/nodeClosedEvent.js | 120 + .../models/nodeDeactivateCompletedEvent.js | 128 + .../lib/models/nodeDeactivateStartedEvent.js | 120 + .../serviceFabric/lib/models/nodeDownEvent.js | 7 + .../serviceFabric/lib/models/nodeEvent.js | 7 + .../models/nodeHealthReportExpiredEvent.js | 7 + .../lib/models/nodeNewHealthReportEvent.js | 169 + .../lib/models/nodeOpenFailedEvent.js | 7 + .../lib/models/nodeOpenSucceededEvent.js | 160 + .../lib/models/nodeRemovedFromClusterEvent.js | 144 + .../serviceFabric/lib/models/nodeUpEvent.js | 7 + ...pagedApplicationResourceDescriptionList.js | 75 + .../pagedGatewayResourceDescriptionList.js | 75 + .../pagedNetworkResourceDescriptionList.js | 75 + .../pagedSecretResourceDescriptionList.js | 75 + ...pagedSecretValueResourceDescriptionList.js | 76 + .../pagedServiceReplicaDescriptionList.js | 76 + .../pagedServiceResourceDescriptionList.js | 9 +- .../pagedVolumeResourceDescriptionList.js | 75 + .../lib/models/partitionAnalysisEvent.js | 7 + .../partitionBackupConfigurationInfo.js | 7 +- .../lib/models/partitionBackupEntity.js | 7 +- .../lib/models/partitionEvent.js | 7 + .../partitionHealthReportExpiredEvent.js | 7 + .../models/partitionNewHealthReportEvent.js | 161 + .../partitionPrimaryMoveAnalysisEvent.js | 7 + .../lib/models/partitionReconfiguredEvent.js | 200 + .../lib/models/reliableCollectionsRef.js | 64 + .../serviceFabric/lib/models/replicaEvent.js | 7 + .../lib/models/restoreProgressInfo.js | 9 +- .../lib/models/retentionPolicyDescription.js | 58 + .../lib/models/secretResourceDescription.js | 77 + .../lib/models/secretResourceProperties.js | 99 + .../models/secretResourcePropertiesBase.js | 58 + .../serviceFabric/lib/models/secretValue.js | 52 + .../lib/models/secretValueProperties.js | 52 + .../models/secretValueResourceDescription.js | 61 + .../lib/models/serviceCreatedEvent.js | 7 + .../lib/models/serviceDeletedEvent.js | 7 + .../serviceFabric/lib/models/serviceEvent.js | 7 + .../models/serviceHealthReportExpiredEvent.js | 7 + .../lib/models/serviceNewHealthReportEvent.js | 169 + .../lib/models/serviceProperties.js | 119 + .../lib/models/serviceReplicaDescription.js | 101 + .../lib/models/serviceReplicaProperties.js | 4 +- .../lib/models/serviceResourceDescription.js | 70 +- .../lib/models/serviceTypeHealthPolicy.js | 6 +- .../models/serviceTypeHealthPolicyMapItem.js | 6 +- .../serviceFabric/lib/models/setting.js | 4 +- ...statefulReplicaHealthReportExpiredEvent.js | 7 + .../statefulReplicaNewHealthReportEvent.js | 176 + .../models/statefulServicePartitionInfo.js | 27 +- ...tatelessReplicaHealthReportExpiredEvent.js | 7 + .../statelessReplicaNewHealthReportEvent.js | 168 + .../serviceFabric/lib/models/tcpConfig.js | 77 + .../lib/models/volumeReference.js | 70 + .../lib/models/volumeResourceDescription.js | 38 +- .../serviceFabric/lib/operations/index.d.ts | 2240 ++ .../serviceFabric/lib/operations/index.js | 25 + .../lib/operations/meshApplication.js | 1001 + .../lib/operations/meshCodePackage.js | 291 + .../lib/operations/meshGateway.js | 986 + .../lib/operations/meshNetwork.js | 950 + .../lib/operations/meshSecret.js | 962 + .../lib/operations/meshSecretValue.js | 1225 + .../lib/operations/meshService.js | 476 + .../lib/operations/meshServiceReplica.js | 499 + .../lib/operations/meshVolume.js | 966 + .../lib/serviceFabricClient.d.ts | 1137 +- .../serviceFabric/lib/serviceFabricClient.js | 31841 ++++++++-------- lib/services/serviceFabric/package.json | 4 +- .../spellCheck/lib/models/errorModel.js | 16 +- .../spellCheck/lib/models/errorResponse.js | 4 +- .../spellCheck/lib/models/identifiable.js | 2 +- lib/services/spellCheck/lib/models/index.d.ts | 125 +- .../spellCheck/lib/models/responseBase.js | 2 +- .../spellCheck/lib/models/spellCheck.js | 2 +- .../lib/models/spellingFlaggedToken.js | 12 +- .../lib/models/spellingTokenSuggestion.js | 6 +- ...ckAPIClient.d.ts => spellCheckClient.d.ts} | 24 +- ...lCheckAPIClient.js => spellCheckClient.js} | 31 +- lib/services/spellCheck/package.json | 12 +- .../sqlvirtualmachineManagement/LICENSE.txt | 21 + .../sqlvirtualmachineManagement/README.md | 46 + .../additionalFeaturesServerConfigurations.js | 53 + .../lib/models/autoBackupSettings.js | 152 + .../lib/models/autoPatchingSettings.js | 81 + .../lib/models/availabilityGroupListener.js | 124 + .../availabilityGroupListenerListResult.js | 69 + .../lib/models/index.d.ts | 581 + .../lib/models/index.js | 47 + .../lib/models/keyVaultCredentialSettings.js | 88 + .../lib/models/loadBalancerConfiguration.js | 100 + .../lib/models/operation.js | 99 + .../lib/models/operationDisplay.js | 84 + .../lib/models/operationListResult.js | 69 + .../lib/models/privateIPAddress.js | 61 + .../lib/models/proxyResource.js | 72 + .../lib/models/resource.js | 75 + .../lib/models/resourceIdentity.js | 72 + .../serverConfigurationsManagementSettings.js | 103 + .../models/sqlConnectivityUpdateSettings.js | 79 + .../lib/models/sqlStorageUpdateSettings.js | 70 + .../lib/models/sqlVirtualMachine.js | 310 + .../lib/models/sqlVirtualMachineGroup.js | 180 + .../sqlVirtualMachineGroupListResult.js | 69 + .../models/sqlVirtualMachineGroupUpdate.js | 59 + .../lib/models/sqlVirtualMachineListResult.js | 69 + .../lib/models/sqlVirtualMachineUpdate.js | 59 + .../models/sqlWorkloadTypeUpdateSettings.js | 53 + .../lib/models/trackedResource.js | 95 + .../lib/models/wsfcDomainCredentials.js | 72 + .../lib/models/wsfcDomainProfile.js | 117 + .../operations/availabilityGroupListeners.js | 1697 + .../lib/operations/index.d.ts | 2936 ++ .../lib/operations/index.js | 20 + .../lib/operations/operations.js | 449 + .../lib/operations/sqlVirtualMachineGroups.js | 2689 ++ .../lib/operations/sqlVirtualMachines.js | 3454 ++ .../sqlVirtualMachineManagementClient.d.ts | 65 + .../lib/sqlVirtualMachineManagementClient.js | 88 + .../sqlvirtualmachineManagement/package.json | 25 + lib/services/videoSearch/lib/models/answer.js | 2 +- .../videoSearch/lib/models/creativeWork.js | 6 +- .../videoSearch/lib/models/errorModel.js | 16 +- .../videoSearch/lib/models/errorResponse.js | 4 +- .../videoSearch/lib/models/identifiable.js | 2 +- .../videoSearch/lib/models/imageObject.js | 2 +- .../videoSearch/lib/models/index.d.ts | 385 +- .../videoSearch/lib/models/mediaObject.js | 9 +- .../lib/models/pivotSuggestions.js | 6 +- lib/services/videoSearch/lib/models/query.js | 23 +- .../videoSearch/lib/models/queryContext.js | 16 +- .../videoSearch/lib/models/response.js | 2 +- .../videoSearch/lib/models/responseBase.js | 2 +- .../lib/models/searchResultsAnswer.js | 8 +- lib/services/videoSearch/lib/models/thing.js | 15 +- .../videoSearch/lib/models/trendingVideos.js | 4 +- .../lib/models/trendingVideosCategory.js | 6 +- .../lib/models/trendingVideosSubcategory.js | 6 +- .../lib/models/trendingVideosTile.js | 22 +- .../videoSearch/lib/models/videoDetails.js | 28 +- .../videoSearch/lib/models/videoObject.js | 21 +- lib/services/videoSearch/lib/models/videos.js | 10 +- .../videoSearch/lib/models/videosModule.js | 4 +- .../videoSearch/lib/operations/index.d.ts | 2 +- .../lib/operations/videosOperations.js | 14 +- .../lib/videoSearchClient.d.ts} | 26 +- ...earchAPIClient.js => videoSearchClient.js} | 27 +- lib/services/videoSearch/package.json | 14 +- .../visualSearch/lib/models/action.js | 10 +- .../visualSearch/lib/models/aggregateOffer.js | 2 +- .../lib/models/aggregateRating.js | 2 +- .../visualSearch/lib/models/creativeWork.js | 8 +- .../visualSearch/lib/models/cropArea.js | 16 +- .../visualSearch/lib/models/errorModel.js | 16 +- .../visualSearch/lib/models/errorResponse.js | 4 +- .../visualSearch/lib/models/filters.js | 2 +- .../visualSearch/lib/models/identifiable.js | 2 +- .../visualSearch/lib/models/imageAction.js | 2 +- .../visualSearch/lib/models/imageInfo.js | 26 +- .../visualSearch/lib/models/imageKnowledge.js | 40 +- .../lib/models/imageModuleAction.js | 4 +- .../visualSearch/lib/models/imageObject.js | 32 +- .../lib/models/imageRecipesAction.js | 4 +- .../lib/models/imageRelatedSearchesAction.js | 4 +- .../lib/models/imageShoppingSourcesAction.js | 4 +- .../visualSearch/lib/models/imageTag.js | 78 +- .../visualSearch/lib/models/imageTagRegion.js | 57 +- .../lib/models/imagesImageMetadata.js | 8 +- .../visualSearch/lib/models/imagesModule.js | 2 +- .../visualSearch/lib/models/index.d.ts | 1111 +- .../lib/models/knowledgeRequest.js | 4 +- .../visualSearch/lib/models/mediaObject.js | 14 +- .../lib/models/normalizedQuadrilateral.js | 24 +- lib/services/visualSearch/lib/models/offer.js | 52 +- .../visualSearch/lib/models/person.js | 5 +- .../visualSearch/lib/models/point2D.js | 4 +- .../visualSearch/lib/models/propertiesItem.js | 4 +- lib/services/visualSearch/lib/models/query.js | 40 +- .../visualSearch/lib/models/rating.js | 4 +- .../visualSearch/lib/models/recipe.js | 12 +- .../visualSearch/lib/models/recipesModule.js | 2 +- .../lib/models/relatedSearchesModule.js | 2 +- .../visualSearch/lib/models/response.js | 6 +- .../visualSearch/lib/models/responseBase.js | 2 +- lib/services/visualSearch/lib/models/thing.js | 49 +- .../lib/models/visualSearchRequest.js | 31 +- .../visualSearch/lib/operations/images.js | 6 +- .../visualSearch/lib/operations/index.d.ts | 2 +- ...APIClient.d.ts => visualSearchClient.d.ts} | 24 +- ...archAPIClient.js => visualSearchClient.js} | 27 +- lib/services/visualSearch/package.json | 10 +- runtime/ms-rest-azure/index.d.ts | 4 +- swagger_to_sdk_config.json | 2 +- ...should_add_a_pool_with_a_Data_Disk.nock.js | 82 +- ...ustom_image_and_get_expected_error.nock.js | 26 +- ...s_should_add_a_pool_with_an_osDisk.nock.js | 102 - ...ndpoint_configuration_successfully.nock.js | 38 +- ...l_with_vnet_and_get_expected_error.nock.js | 26 +- ...ion_package_reference_successfully.nock.js | 66 +- ...ser_to_a_compute_node_successfully.nock.js | 30 +- ...d_add_new_certificate_successfully.nock.js | 30 +- ...a_job_schedule_exists_successfully.nock.js | 30 +- ...heck_that_pool_exists_successfully.nock.js | 30 +- ...ons_should_count_tasks_sucessfully.nock.js | 26 +- ..._create_a_job_schdule_successfully.nock.js | 38 +- ...s_should_create_a_job_successfully.nock.js | 38 +- ...uld_create_a_new_pool_successfully.nock.js | 38 +- ..._application_licenses_successfully.nock.js | 110 +- ..._create_a_second_pool_successfully.nock.js | 38 +- ...ask_with_output_files_successfully.nock.js | 38 +- ..._should_create_a_task_successfully.nock.js | 38 +- ..._with_a_user_identity_successfully.nock.js | 66 +- ...cation_token_settings_successfully.nock.js | 66 +- ...th_container_settings_successfully.nock.js | 86 +- ..._with_exit_conditions_successfully.nock.js | 114 +- ..._delete_a_certificate_successfully.nock.js | 22 +- ...e_a_compute_node_user_successfully.nock.js | 22 +- ...delete_a_job_schedule_successfully.nock.js | 22 +- ...s_should_delete_a_job_successfully.nock.js | 22 +- ..._should_delete_a_pool_successfully.nock.js | 22 +- ..._delete_a_second_pool_successfully.nock.js | 22 +- ..._delete_a_second_task_successfully.nock.js | 22 +- ..._should_delete_a_task_successfully.nock.js | 22 +- ...delete_file_from_node_successfully.nock.js | 22 +- ...delete_file_from_task_successfully.nock.js | 22 +- ...isable_a_job_schedule_successfully.nock.js | 34 +- ..._should_disable_a_job_successfully.nock.js | 34 +- ...uld_disable_autoscale_successfully.nock.js | 34 +- ...ing_on_a_compute_node_successfully.nock.js | 26 +- ...enable_a_job_schedule_successfully.nock.js | 34 +- ...s_should_enable_a_job_successfully.nock.js | 34 +- ...ould_enable_autoscale_successfully.nock.js | 34 +- ...ing_on_a_compute_node_successfully.nock.js | 26 +- ...aluate_pool_autoscale_successfully.nock.js | 30 +- ...l_to_cancel_deleting_a_certificate.nock.js | 26 +- ...fail_to_delete_a_non-existant_pool.nock.js | 26 +- ...evaluate_invalid_autoscale_formula.nock.js | 30 +- ...uld_fail_to_job_preprelease_status.nock.js | 26 +- ...ail_to_list_pools_with_invalid_max.nock.js | 26 +- ...upload_pool_node_logs_at_paas_pool.nock.js | 26 +- ...hould_get_a_compute_node_reference.nock.js | 26 +- ...d_get_a_job_reference_successfully.nock.js | 34 +- ...ob_schedule_reference_successfully.nock.js | 34 +- ..._get_a_pool_reference_successfully.nock.js | 34 +- ..._reference_with_odata_successfully.nock.js | 34 +- ...a_remote_desktop_file_successfully.nock.js | 26 +- ...et_all_job_statistics_successfully.nock.js | 26 +- ...application_reference_successfully.nock.js | 36 +- ...certificate_reference_successfully.nock.js | 26 +- ...ld_get_file_from_node_successfully.nock.js | 38 +- ...ld_get_file_from_task_successfully.nock.js | 38 +- ..._properties_from_node_successfully.nock.js | 90 +- ..._properties_from_task_successfully.nock.js | 38 +- ...hould_get_pool_lifetime_statistics.nock.js | 26 +- ..._get_pool_node_counts_successfully.nock.js | 26 +- ...ld_get_task_reference_successfully.nock.js | 34 +- ...ndpoint_configuration_successfully.nock.js | 26 +- ...uld_list_a_maximum_number_of_pools.nock.js | 46 +- ...should_list_all_tasks_successfully.nock.js | 26 +- ...uld_list_applications_successfully.nock.js | 36 +- ...uld_list_certificates_successfully.nock.js | 26 +- ...ld_list_compute_nodes_successfully.nock.js | 26 +- ...les_from_compute_node_successfully.nock.js | 26 +- ..._list_files_from_task_successfully.nock.js | 26 +- ...ld_list_job_schedules_successfully.nock.js | 26 +- ...obs_from_job_schedule_successfully.nock.js | 26 +- ...ions_should_list_jobs_successfully.nock.js | 26 +- ...d_list_node_agent_sku_successfully.nock.js | 26 +- ...uld_list_pools_according_to_filter.nock.js | 26 +- ...ns_should_list_pools_usage_metrics.nock.js | 26 +- ..._should_list_pools_without_filters.nock.js | 26 +- ...should_list_sub_tasks_successfully.nock.js | 26 +- ..._patch_a_job_schedule_successfully.nock.js | 34 +- ...ns_should_patch_a_job_successfully.nock.js | 34 +- ...patch_pool_parameters_successfully.nock.js | 34 +- ...rm_AAD_authentication_successfully.nock.js | 40 +- ...re-list_compute_nodes_successfully.nock.js | 26 +- ...uld_reactivate_a_task_successfully.nock.js | 30 +- ...reboot_a_compute_node_successfully.nock.js | 26 +- ...eimage_a_compute_node_successfully.nock.js | 26 +- ..._remove_nodes_in_pool_successfully.nock.js | 34 +- ...d_start_pool_resizing_successfully.nock.js | 34 +- ...ld_stop_pool_resizing_successfully.nock.js | 34 +- ...minate_a_job_schedule_successfully.nock.js | 34 +- ...hould_terminate_a_job_successfully.nock.js | 34 +- ...ould_terminate_a_task_successfully.nock.js | 34 +- ...update_a_job_schedule_successfully.nock.js | 34 +- ...s_should_update_a_job_successfully.nock.js | 34 +- ..._should_update_a_task_successfully.nock.js | 34 +- ...pdate_pool_parameters_successfully.nock.js | 34 +- ...ool_target_OS_version_successfully.nock.js | 42 - .../suite.batchservice-tests.nock.js | 6 +- test/services/batch/batchClient-tests.js | 50 +- .../spellCheckAPIClient-tests.js | 4 +- .../entitySearch-tests.js | 2 +- .../imageSearch-tests.js | 2 +- .../newsSearch-tests.js | 4 +- .../videoSearch-tests.js | 5 +- .../webSearch-tests.js | 5 +- 1582 files changed, 104273 insertions(+), 68732 deletions(-) create mode 100644 lib/services/batch/lib/models/jobNetworkConfiguration.js delete mode 100644 lib/services/batch/lib/models/oSDisk.js delete mode 100644 lib/services/batch/lib/models/poolUpgradeOSOptions.js create mode 100644 lib/services/batch/lib/models/windowsUserConfiguration.js create mode 100644 lib/services/cognitiveServicesAutoSuggest/lib/autoSuggestClient.d.ts create mode 100644 lib/services/cognitiveServicesAutoSuggest/lib/autoSuggestClient.js create mode 100644 lib/services/cognitiveServicesCustomImageSearch/lib/customImageSearchClient.d.ts create mode 100644 lib/services/cognitiveServicesCustomImageSearch/lib/customImageSearchClient.js create mode 100644 lib/services/cognitiveServicesCustomSearch/lib/customSearchClient.d.ts rename lib/services/cognitiveServicesCustomSearch/lib/{customSearchAPIClient.js => customSearchClient.js} (67%) create mode 100644 lib/services/cognitiveServicesLocalSearch/LICENSE.txt create mode 100644 lib/services/cognitiveServicesLocalSearch/README.md rename lib/services/{cognitiveServicesWebSearch/lib/webSearchAPIClient.d.ts => cognitiveServicesLocalSearch/lib/localSearchClient.d.ts} (86%) rename lib/services/{cognitiveServicesWebSearch/lib/webSearchAPIClient.js => cognitiveServicesLocalSearch/lib/localSearchClient.js} (79%) create mode 100644 lib/services/cognitiveServicesLocalSearch/lib/models/action.js create mode 100644 lib/services/cognitiveServicesLocalSearch/lib/models/answer.js create mode 100644 lib/services/cognitiveServicesLocalSearch/lib/models/creativeWork.js create mode 100644 lib/services/cognitiveServicesLocalSearch/lib/models/entitiesEntityPresentationInfo.js create mode 100644 lib/services/cognitiveServicesLocalSearch/lib/models/errorModel.js create mode 100644 lib/services/cognitiveServicesLocalSearch/lib/models/errorResponse.js create mode 100644 lib/services/cognitiveServicesLocalSearch/lib/models/geoCoordinates.js create mode 100644 lib/services/cognitiveServicesLocalSearch/lib/models/identifiable.js create mode 100644 lib/services/cognitiveServicesLocalSearch/lib/models/index.d.ts create mode 100644 lib/services/cognitiveServicesLocalSearch/lib/models/index.js create mode 100644 lib/services/cognitiveServicesLocalSearch/lib/models/intangible.js create mode 100644 lib/services/cognitiveServicesLocalSearch/lib/models/place.js create mode 100644 lib/services/cognitiveServicesLocalSearch/lib/models/places.js create mode 100644 lib/services/cognitiveServicesLocalSearch/lib/models/postalAddress.js create mode 100644 lib/services/cognitiveServicesLocalSearch/lib/models/queryContext.js create mode 100644 lib/services/cognitiveServicesLocalSearch/lib/models/response.js rename lib/services/{batch/lib/models/poolUpgradeOSParameter.js => cognitiveServicesLocalSearch/lib/models/responseBase.js} (51%) create mode 100644 lib/services/cognitiveServicesLocalSearch/lib/models/searchAction.js create mode 100644 lib/services/cognitiveServicesLocalSearch/lib/models/searchResponse.js create mode 100644 lib/services/cognitiveServicesLocalSearch/lib/models/searchResultsAnswer.js create mode 100644 lib/services/cognitiveServicesLocalSearch/lib/models/structuredValue.js create mode 100644 lib/services/cognitiveServicesLocalSearch/lib/models/thing.js create mode 100644 lib/services/cognitiveServicesLocalSearch/lib/operations/index.d.ts create mode 100644 lib/services/cognitiveServicesLocalSearch/lib/operations/index.js create mode 100644 lib/services/cognitiveServicesLocalSearch/lib/operations/local.js create mode 100644 lib/services/cognitiveServicesLocalSearch/package.json create mode 100644 lib/services/cognitiveServicesQnAMaker/LICENSE.txt create mode 100644 lib/services/cognitiveServicesQnAMaker/README.md create mode 100644 lib/services/cognitiveServicesQnAMaker/lib/models/alterationsDTO.js create mode 100644 lib/services/cognitiveServicesQnAMaker/lib/models/createKbDTO.js create mode 100644 lib/services/cognitiveServicesQnAMaker/lib/models/createKbInputDTO.js create mode 100644 lib/services/cognitiveServicesQnAMaker/lib/models/deleteKbContentsDTO.js create mode 100644 lib/services/cognitiveServicesQnAMaker/lib/models/endpointKeysDTO.js create mode 100644 lib/services/cognitiveServicesQnAMaker/lib/models/errorModel.js create mode 100644 lib/services/cognitiveServicesQnAMaker/lib/models/errorResponse.js create mode 100644 lib/services/cognitiveServicesQnAMaker/lib/models/errorResponseError.js create mode 100644 lib/services/cognitiveServicesQnAMaker/lib/models/fileDTO.js create mode 100644 lib/services/cognitiveServicesQnAMaker/lib/models/index.d.ts create mode 100644 lib/services/cognitiveServicesQnAMaker/lib/models/index.js create mode 100644 lib/services/cognitiveServicesQnAMaker/lib/models/innerErrorModel.js create mode 100644 lib/services/cognitiveServicesQnAMaker/lib/models/knowledgebaseDTO.js create mode 100644 lib/services/cognitiveServicesQnAMaker/lib/models/knowledgebasesDTO.js create mode 100644 lib/services/cognitiveServicesQnAMaker/lib/models/metadataDTO.js create mode 100644 lib/services/cognitiveServicesQnAMaker/lib/models/operation.js create mode 100644 lib/services/cognitiveServicesQnAMaker/lib/models/qnADTO.js create mode 100644 lib/services/cognitiveServicesQnAMaker/lib/models/qnADocumentsDTO.js create mode 100644 lib/services/cognitiveServicesQnAMaker/lib/models/replaceKbDTO.js create mode 100644 lib/services/cognitiveServicesQnAMaker/lib/models/updateKbContentsDTO.js create mode 100644 lib/services/cognitiveServicesQnAMaker/lib/models/updateKbOperationDTO.js create mode 100644 lib/services/cognitiveServicesQnAMaker/lib/models/updateKbOperationDTOAdd.js create mode 100644 lib/services/cognitiveServicesQnAMaker/lib/models/updateKbOperationDTODelete.js create mode 100644 lib/services/cognitiveServicesQnAMaker/lib/models/updateKbOperationDTOUpdate.js create mode 100644 lib/services/cognitiveServicesQnAMaker/lib/models/updateMetadataDTO.js create mode 100644 lib/services/cognitiveServicesQnAMaker/lib/models/updateQnaDTO.js create mode 100644 lib/services/cognitiveServicesQnAMaker/lib/models/updateQnaDTOMetadata.js create mode 100644 lib/services/cognitiveServicesQnAMaker/lib/models/updateQnaDTOQuestions.js create mode 100644 lib/services/cognitiveServicesQnAMaker/lib/models/updateQuestionsDTO.js create mode 100644 lib/services/cognitiveServicesQnAMaker/lib/models/wordAlterationsDTO.js create mode 100644 lib/services/cognitiveServicesQnAMaker/lib/operations/alterations.js create mode 100644 lib/services/cognitiveServicesQnAMaker/lib/operations/endpointKeys.js create mode 100644 lib/services/cognitiveServicesQnAMaker/lib/operations/index.d.ts create mode 100644 lib/services/cognitiveServicesQnAMaker/lib/operations/index.js create mode 100644 lib/services/cognitiveServicesQnAMaker/lib/operations/knowledgebase.js create mode 100644 lib/services/cognitiveServicesQnAMaker/lib/operations/operations.js rename lib/services/{imageSearch/lib/imageSearchAPIClient.d.ts => cognitiveServicesQnAMaker/lib/qnAMakerClient.d.ts} (67%) create mode 100644 lib/services/cognitiveServicesQnAMaker/lib/qnAMakerClient.js create mode 100644 lib/services/cognitiveServicesQnAMaker/package.json rename lib/services/{videoSearch/lib/videoSearchAPIClient.d.ts => cognitiveServicesWebSearch/lib/webSearchClient.d.ts} (56%) create mode 100644 lib/services/cognitiveServicesWebSearch/lib/webSearchClient.js create mode 100644 lib/services/containerRegistryManagement/lib/models/networkRuleSet.js create mode 100644 lib/services/containerRegistryManagement/lib/models/virtualNetworkRule.js create mode 100644 lib/services/customVision/prediction/README.md create mode 100644 lib/services/customVision/training/README.md rename lib/services/entitySearch/lib/{entitySearchAPIClient.d.ts => entitySearchClient.d.ts} (57%) rename lib/services/entitySearch/lib/{entitySearchAPIClient.js => entitySearchClient.js} (67%) create mode 100644 lib/services/hdInsightManagement/lib/models/clusterDiskEncryptionParameters.js create mode 100644 lib/services/hdInsightManagement/lib/models/diskEncryptionProperties.js create mode 100644 lib/services/imageSearch/lib/imageSearchClient.d.ts rename lib/services/imageSearch/lib/{imageSearchAPIClient.js => imageSearchClient.js} (67%) create mode 100644 lib/services/logicManagement/lib/models/request.js create mode 100644 lib/services/logicManagement/lib/models/requestHistory.js create mode 100644 lib/services/logicManagement/lib/models/requestHistoryListResult.js create mode 100644 lib/services/logicManagement/lib/models/requestHistoryProperties.js create mode 100644 lib/services/logicManagement/lib/models/response.js create mode 100644 lib/services/logicManagement/lib/operations/workflowRunActionRepetitionsRequestHistories.js create mode 100644 lib/services/logicManagement/lib/operations/workflowRunActionRequestHistories.js create mode 100644 lib/services/luis/authoring/lib/models/appVersionSettingObject.js create mode 100644 lib/services/luis/authoring/lib/operations/settings.js rename lib/services/newsSearch/lib/{newsSearchAPIClient.d.ts => newsSearchClient.d.ts} (58%) rename lib/services/newsSearch/lib/{newsSearchAPIClient.js => newsSearchClient.js} (68%) create mode 100644 lib/services/serviceFabric/lib/models/addRemoveReplicaScalingMechanism.js create mode 100644 lib/services/serviceFabric/lib/models/applicationContainerInstanceExitedEvent.js create mode 100644 lib/services/serviceFabric/lib/models/applicationNewHealthReportEvent.js create mode 100644 lib/services/serviceFabric/lib/models/applicationProcessExitedEvent.js create mode 100644 lib/services/serviceFabric/lib/models/applicationScopedVolume.js create mode 100644 lib/services/serviceFabric/lib/models/applicationScopedVolumeCreationParameters.js create mode 100644 lib/services/serviceFabric/lib/models/applicationScopedVolumeCreationParametersServiceFabricVolumeDisk.js create mode 100644 lib/services/serviceFabric/lib/models/applicationUpgradeCompletedEvent.js create mode 100644 lib/services/serviceFabric/lib/models/applicationUpgradeDomainCompletedEvent.js create mode 100644 lib/services/serviceFabric/lib/models/applicationUpgradeRollbackCompletedEvent.js create mode 100644 lib/services/serviceFabric/lib/models/applicationUpgradeRollbackStartedEvent.js create mode 100644 lib/services/serviceFabric/lib/models/applicationUpgradeStartedEvent.js create mode 100644 lib/services/serviceFabric/lib/models/autoScalingMechanism.js create mode 100644 lib/services/serviceFabric/lib/models/autoScalingMetric.js create mode 100644 lib/services/serviceFabric/lib/models/autoScalingPolicy.js create mode 100644 lib/services/serviceFabric/lib/models/autoScalingResourceMetric.js create mode 100644 lib/services/serviceFabric/lib/models/autoScalingTrigger.js create mode 100644 lib/services/serviceFabric/lib/models/averageLoadScalingTrigger.js create mode 100644 lib/services/serviceFabric/lib/models/azureInternalMonitoringPipelineSinkDescription.js create mode 100644 lib/services/serviceFabric/lib/models/basicRetentionPolicyDescription.js create mode 100644 lib/services/serviceFabric/lib/models/chaosCodePackageRestartScheduledEvent.js create mode 100644 lib/services/serviceFabric/lib/models/chaosNodeRestartScheduledEvent.js create mode 100644 lib/services/serviceFabric/lib/models/chaosPartitionPrimaryMoveScheduledEvent.js create mode 100644 lib/services/serviceFabric/lib/models/chaosPartitionSecondaryMoveScheduledEvent.js create mode 100644 lib/services/serviceFabric/lib/models/chaosReplicaRemovalScheduledEvent.js create mode 100644 lib/services/serviceFabric/lib/models/chaosReplicaRestartScheduledEvent.js create mode 100644 lib/services/serviceFabric/lib/models/clusterNewHealthReportEvent.js create mode 100644 lib/services/serviceFabric/lib/models/clusterUpgradeCompletedEvent.js create mode 100644 lib/services/serviceFabric/lib/models/clusterUpgradeDomainCompletedEvent.js create mode 100644 lib/services/serviceFabric/lib/models/clusterUpgradeRollbackCompletedEvent.js create mode 100644 lib/services/serviceFabric/lib/models/clusterUpgradeRollbackStartedEvent.js create mode 100644 lib/services/serviceFabric/lib/models/clusterUpgradeStartedEvent.js create mode 100644 lib/services/serviceFabric/lib/models/clusterVersion.js create mode 100644 lib/services/serviceFabric/lib/models/deployedApplicationNewHealthReportEvent.js create mode 100644 lib/services/serviceFabric/lib/models/deployedServicePackageHealthReportExpiredEvent.js create mode 100644 lib/services/serviceFabric/lib/models/deployedServicePackageNewHealthReportEvent.js create mode 100644 lib/services/serviceFabric/lib/models/disableBackupDescription.js create mode 100644 lib/services/serviceFabric/lib/models/endpointRef.js create mode 100644 lib/services/serviceFabric/lib/models/gatewayDestination.js create mode 100644 lib/services/serviceFabric/lib/models/gatewayResourceDescription.js create mode 100644 lib/services/serviceFabric/lib/models/httpConfig.js create mode 100644 lib/services/serviceFabric/lib/models/httpHostConfig.js create mode 100644 lib/services/serviceFabric/lib/models/httpRouteConfig.js create mode 100644 lib/services/serviceFabric/lib/models/httpRouteMatchHeader.js create mode 100644 lib/services/serviceFabric/lib/models/httpRouteMatchPath.js create mode 100644 lib/services/serviceFabric/lib/models/httpRouteMatchRule.js create mode 100644 lib/services/serviceFabric/lib/models/inlinedValueSecretResourceProperties.js create mode 100644 lib/services/serviceFabric/lib/models/localNetworkResourceProperties.js create mode 100644 lib/services/serviceFabric/lib/models/networkResourceDescription.js create mode 100644 lib/services/serviceFabric/lib/models/networkResourceProperties.js create mode 100644 lib/services/serviceFabric/lib/models/networkResourcePropertiesBase.js create mode 100644 lib/services/serviceFabric/lib/models/nodeAddedToClusterEvent.js create mode 100644 lib/services/serviceFabric/lib/models/nodeClosedEvent.js create mode 100644 lib/services/serviceFabric/lib/models/nodeDeactivateCompletedEvent.js create mode 100644 lib/services/serviceFabric/lib/models/nodeDeactivateStartedEvent.js create mode 100644 lib/services/serviceFabric/lib/models/nodeNewHealthReportEvent.js create mode 100644 lib/services/serviceFabric/lib/models/nodeOpenSucceededEvent.js create mode 100644 lib/services/serviceFabric/lib/models/nodeRemovedFromClusterEvent.js create mode 100644 lib/services/serviceFabric/lib/models/pagedApplicationResourceDescriptionList.js create mode 100644 lib/services/serviceFabric/lib/models/pagedGatewayResourceDescriptionList.js create mode 100644 lib/services/serviceFabric/lib/models/pagedNetworkResourceDescriptionList.js create mode 100644 lib/services/serviceFabric/lib/models/pagedSecretResourceDescriptionList.js create mode 100644 lib/services/serviceFabric/lib/models/pagedSecretValueResourceDescriptionList.js create mode 100644 lib/services/serviceFabric/lib/models/pagedServiceReplicaDescriptionList.js create mode 100644 lib/services/serviceFabric/lib/models/pagedVolumeResourceDescriptionList.js create mode 100644 lib/services/serviceFabric/lib/models/partitionNewHealthReportEvent.js create mode 100644 lib/services/serviceFabric/lib/models/partitionReconfiguredEvent.js create mode 100644 lib/services/serviceFabric/lib/models/reliableCollectionsRef.js create mode 100644 lib/services/serviceFabric/lib/models/retentionPolicyDescription.js create mode 100644 lib/services/serviceFabric/lib/models/secretResourceDescription.js create mode 100644 lib/services/serviceFabric/lib/models/secretResourceProperties.js create mode 100644 lib/services/serviceFabric/lib/models/secretResourcePropertiesBase.js create mode 100644 lib/services/serviceFabric/lib/models/secretValue.js create mode 100644 lib/services/serviceFabric/lib/models/secretValueProperties.js create mode 100644 lib/services/serviceFabric/lib/models/secretValueResourceDescription.js create mode 100644 lib/services/serviceFabric/lib/models/serviceNewHealthReportEvent.js create mode 100644 lib/services/serviceFabric/lib/models/serviceProperties.js create mode 100644 lib/services/serviceFabric/lib/models/serviceReplicaDescription.js create mode 100644 lib/services/serviceFabric/lib/models/statefulReplicaNewHealthReportEvent.js create mode 100644 lib/services/serviceFabric/lib/models/statelessReplicaNewHealthReportEvent.js create mode 100644 lib/services/serviceFabric/lib/models/tcpConfig.js create mode 100644 lib/services/serviceFabric/lib/models/volumeReference.js create mode 100644 lib/services/serviceFabric/lib/operations/index.d.ts create mode 100644 lib/services/serviceFabric/lib/operations/index.js create mode 100644 lib/services/serviceFabric/lib/operations/meshApplication.js create mode 100644 lib/services/serviceFabric/lib/operations/meshCodePackage.js create mode 100644 lib/services/serviceFabric/lib/operations/meshGateway.js create mode 100644 lib/services/serviceFabric/lib/operations/meshNetwork.js create mode 100644 lib/services/serviceFabric/lib/operations/meshSecret.js create mode 100644 lib/services/serviceFabric/lib/operations/meshSecretValue.js create mode 100644 lib/services/serviceFabric/lib/operations/meshService.js create mode 100644 lib/services/serviceFabric/lib/operations/meshServiceReplica.js create mode 100644 lib/services/serviceFabric/lib/operations/meshVolume.js rename lib/services/spellCheck/lib/{spellCheckAPIClient.d.ts => spellCheckClient.d.ts} (97%) rename lib/services/spellCheck/lib/{spellCheckAPIClient.js => spellCheckClient.js} (98%) create mode 100644 lib/services/sqlvirtualmachineManagement/LICENSE.txt create mode 100644 lib/services/sqlvirtualmachineManagement/README.md create mode 100644 lib/services/sqlvirtualmachineManagement/lib/models/additionalFeaturesServerConfigurations.js create mode 100644 lib/services/sqlvirtualmachineManagement/lib/models/autoBackupSettings.js create mode 100644 lib/services/sqlvirtualmachineManagement/lib/models/autoPatchingSettings.js create mode 100644 lib/services/sqlvirtualmachineManagement/lib/models/availabilityGroupListener.js create mode 100644 lib/services/sqlvirtualmachineManagement/lib/models/availabilityGroupListenerListResult.js create mode 100644 lib/services/sqlvirtualmachineManagement/lib/models/index.d.ts create mode 100644 lib/services/sqlvirtualmachineManagement/lib/models/index.js create mode 100644 lib/services/sqlvirtualmachineManagement/lib/models/keyVaultCredentialSettings.js create mode 100644 lib/services/sqlvirtualmachineManagement/lib/models/loadBalancerConfiguration.js create mode 100644 lib/services/sqlvirtualmachineManagement/lib/models/operation.js create mode 100644 lib/services/sqlvirtualmachineManagement/lib/models/operationDisplay.js create mode 100644 lib/services/sqlvirtualmachineManagement/lib/models/operationListResult.js create mode 100644 lib/services/sqlvirtualmachineManagement/lib/models/privateIPAddress.js create mode 100644 lib/services/sqlvirtualmachineManagement/lib/models/proxyResource.js create mode 100644 lib/services/sqlvirtualmachineManagement/lib/models/resource.js create mode 100644 lib/services/sqlvirtualmachineManagement/lib/models/resourceIdentity.js create mode 100644 lib/services/sqlvirtualmachineManagement/lib/models/serverConfigurationsManagementSettings.js create mode 100644 lib/services/sqlvirtualmachineManagement/lib/models/sqlConnectivityUpdateSettings.js create mode 100644 lib/services/sqlvirtualmachineManagement/lib/models/sqlStorageUpdateSettings.js create mode 100644 lib/services/sqlvirtualmachineManagement/lib/models/sqlVirtualMachine.js create mode 100644 lib/services/sqlvirtualmachineManagement/lib/models/sqlVirtualMachineGroup.js create mode 100644 lib/services/sqlvirtualmachineManagement/lib/models/sqlVirtualMachineGroupListResult.js create mode 100644 lib/services/sqlvirtualmachineManagement/lib/models/sqlVirtualMachineGroupUpdate.js create mode 100644 lib/services/sqlvirtualmachineManagement/lib/models/sqlVirtualMachineListResult.js create mode 100644 lib/services/sqlvirtualmachineManagement/lib/models/sqlVirtualMachineUpdate.js create mode 100644 lib/services/sqlvirtualmachineManagement/lib/models/sqlWorkloadTypeUpdateSettings.js create mode 100644 lib/services/sqlvirtualmachineManagement/lib/models/trackedResource.js create mode 100644 lib/services/sqlvirtualmachineManagement/lib/models/wsfcDomainCredentials.js create mode 100644 lib/services/sqlvirtualmachineManagement/lib/models/wsfcDomainProfile.js create mode 100644 lib/services/sqlvirtualmachineManagement/lib/operations/availabilityGroupListeners.js create mode 100644 lib/services/sqlvirtualmachineManagement/lib/operations/index.d.ts create mode 100644 lib/services/sqlvirtualmachineManagement/lib/operations/index.js create mode 100644 lib/services/sqlvirtualmachineManagement/lib/operations/operations.js create mode 100644 lib/services/sqlvirtualmachineManagement/lib/operations/sqlVirtualMachineGroups.js create mode 100644 lib/services/sqlvirtualmachineManagement/lib/operations/sqlVirtualMachines.js create mode 100644 lib/services/sqlvirtualmachineManagement/lib/sqlVirtualMachineManagementClient.d.ts create mode 100644 lib/services/sqlvirtualmachineManagement/lib/sqlVirtualMachineManagementClient.js create mode 100644 lib/services/sqlvirtualmachineManagement/package.json rename lib/services/{cognitiveServicesCustomSearch/lib/customSearchAPIClient.d.ts => videoSearch/lib/videoSearchClient.d.ts} (58%) rename lib/services/videoSearch/lib/{videoSearchAPIClient.js => videoSearchClient.js} (67%) rename lib/services/visualSearch/lib/{visualSearchAPIClient.d.ts => visualSearchClient.d.ts} (57%) rename lib/services/visualSearch/lib/{visualSearchAPIClient.js => visualSearchClient.js} (67%) delete mode 100644 test/recordings/batchservice-tests/Batch_Service_operations_should_add_a_pool_with_an_osDisk.nock.js delete mode 100644 test/recordings/batchservice-tests/Batch_Service_operations_should_update_pool_target_OS_version_successfully.nock.js diff --git a/.azure-pipelines/client.yml b/.azure-pipelines/client.yml index 32ef5f7584..05e25c7d4d 100644 --- a/.azure-pipelines/client.yml +++ b/.azure-pipelines/client.yml @@ -61,6 +61,12 @@ jobs: workingDirectory: '$(source.path)' displayName: 'npm audit' + - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0 + # ComponentGovernance is currently unable to run on pull requests of public projects. Running on non-PR + # builds should be sufficient. + condition: and(succeededOrFailed(), ne(variables['Build.Reason'], 'PullRequest')) + displayName: 'Component Detection' + - template: client.test.yml parameters: name: Linux diff --git a/lib/services/batch/lib/batchServiceClient.d.ts b/lib/services/batch/lib/batchServiceClient.d.ts index 825d1ba626..3f7a14a55e 100644 --- a/lib/services/batch/lib/batchServiceClient.d.ts +++ b/lib/services/batch/lib/batchServiceClient.d.ts @@ -21,7 +21,7 @@ export default class BatchServiceClient extends AzureServiceClient { * @class * @param {credentials} credentials - Credentials needed for the client to connect to Azure. * - * @param {string} [baseUri] - The base URI of the service. + * @param {string} batchUrl - The base URL for all Azure Batch service requests. * * @param {object} [options] - The parameter options * @@ -39,12 +39,14 @@ export default class BatchServiceClient extends AzureServiceClient { * @param {boolean} [options.generateClientRequestId] - Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. * */ - constructor(credentials: ServiceClientCredentials, baseUri?: string, options?: AzureServiceClientOptions); + constructor(credentials: ServiceClientCredentials, batchUrl: string, options?: AzureServiceClientOptions); credentials: ServiceClientCredentials; apiVersion: string; + batchUrl: string; + acceptLanguage: string; longRunningOperationRetryTimeout: number; diff --git a/lib/services/batch/lib/batchServiceClient.js b/lib/services/batch/lib/batchServiceClient.js index ce9a90d1da..a88b069fc9 100644 --- a/lib/services/batch/lib/batchServiceClient.js +++ b/lib/services/batch/lib/batchServiceClient.js @@ -27,7 +27,7 @@ class BatchServiceClient extends ServiceClient { /** * Create a BatchServiceClient. * @param {credentials} credentials - Credentials needed for the client to connect to Azure. - * @param {string} [baseUri] - The base URI of the service. + * @param {string} batchUrl - The base URL for all Azure Batch service requests. * @param {object} [options] - The parameter options * @param {Array} [options.filters] - Filters to be added to the request pipeline * @param {object} [options.requestOptions] - Options for the underlying request object @@ -37,24 +37,25 @@ class BatchServiceClient extends ServiceClient { * @param {number} [options.longRunningOperationRetryTimeout] - The retry timeout in seconds for Long Running Operations. Default value is 30. * @param {boolean} [options.generateClientRequestId] - Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ - constructor(credentials, baseUri, options) { + constructor(credentials, batchUrl, options) { if (credentials === null || credentials === undefined) { throw new Error('\'credentials\' cannot be null.'); } + if (batchUrl === null || batchUrl === undefined) { + throw new Error('\'batchUrl\' cannot be null.'); + } if (!options) options = {}; super(credentials, options); - this.apiVersion = '2018-08-01.7.0'; + this.apiVersion = '2018-12-01.8.0'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.generateClientRequestId = true; - this.baseUri = baseUri; - if (!this.baseUri) { - this.baseUri = 'https://batch.core.windows.net'; - } + this.baseUri = '{batchUrl}'; this.credentials = credentials; + this.batchUrl = batchUrl; let packageInfo = this.getPackageJsonInfo(__dirname); this.addUserAgentInfo(`${packageInfo.name}/${packageInfo.version}`); diff --git a/lib/services/batch/lib/models/accountListNodeAgentSkusNextOptions.js b/lib/services/batch/lib/models/accountListNodeAgentSkusNextOptions.js index 51fa533a4d..4a5806dd39 100644 --- a/lib/services/batch/lib/models/accountListNodeAgentSkusNextOptions.js +++ b/lib/services/batch/lib/models/accountListNodeAgentSkusNextOptions.js @@ -17,14 +17,14 @@ class AccountListNodeAgentSkusNextOptions { /** * Create a AccountListNodeAgentSkusNextOptions. - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/accountListNodeAgentSkusOptions.js b/lib/services/batch/lib/models/accountListNodeAgentSkusOptions.js index b44ada4f83..718803121d 100644 --- a/lib/services/batch/lib/models/accountListNodeAgentSkusOptions.js +++ b/lib/services/batch/lib/models/accountListNodeAgentSkusOptions.js @@ -17,23 +17,23 @@ class AccountListNodeAgentSkusOptions { /** * Create a AccountListNodeAgentSkusOptions. - * @member {string} [filter] An OData $filter clause. For more information on - * constructing this filter, see + * @property {string} [filter] An OData $filter clause. For more information + * on constructing this filter, see * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-node-agent-skus. - * @member {number} [maxResults] The maximum number of items to return in the - * response. A maximum of 1000 results will be returned. Default value: 1000 - * . - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [maxResults] The maximum number of items to return in + * the response. A maximum of 1000 results will be returned. Default value: + * 1000 . + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/accountListNodeAgentSkusResult.js b/lib/services/batch/lib/models/accountListNodeAgentSkusResult.js index 4ceb5e27c4..e12abaa634 100644 --- a/lib/services/batch/lib/models/accountListNodeAgentSkusResult.js +++ b/lib/services/batch/lib/models/accountListNodeAgentSkusResult.js @@ -16,7 +16,7 @@ class AccountListNodeAgentSkusResult extends Array { /** * Create a AccountListNodeAgentSkusResult. - * @member {string} [odatanextLink] + * @property {string} [odatanextLink] */ constructor() { super(); diff --git a/lib/services/batch/lib/models/accountListPoolNodeCountsNextOptions.js b/lib/services/batch/lib/models/accountListPoolNodeCountsNextOptions.js index eb1235963f..07a87f6cde 100644 --- a/lib/services/batch/lib/models/accountListPoolNodeCountsNextOptions.js +++ b/lib/services/batch/lib/models/accountListPoolNodeCountsNextOptions.js @@ -17,14 +17,14 @@ class AccountListPoolNodeCountsNextOptions { /** * Create a AccountListPoolNodeCountsNextOptions. - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/accountListPoolNodeCountsOptions.js b/lib/services/batch/lib/models/accountListPoolNodeCountsOptions.js index 4218d720d9..3343388be4 100644 --- a/lib/services/batch/lib/models/accountListPoolNodeCountsOptions.js +++ b/lib/services/batch/lib/models/accountListPoolNodeCountsOptions.js @@ -17,22 +17,22 @@ class AccountListPoolNodeCountsOptions { /** * Create a AccountListPoolNodeCountsOptions. - * @member {string} [filter] An OData $filter clause. For more information on - * constructing this filter, see + * @property {string} [filter] An OData $filter clause. For more information + * on constructing this filter, see * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch. - * @member {number} [maxResults] The maximum number of items to return in the - * response. Default value: 10 . - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [maxResults] The maximum number of items to return in + * the response. Default value: 10 . + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/affinityInformation.js b/lib/services/batch/lib/models/affinityInformation.js index a8e35b9993..5824935447 100644 --- a/lib/services/batch/lib/models/affinityInformation.js +++ b/lib/services/batch/lib/models/affinityInformation.js @@ -18,8 +18,8 @@ class AffinityInformation { /** * Create a AffinityInformation. - * @member {string} affinityId An opaque string representing the location of - * a compute node or a task that has run previously. You can pass the + * @property {string} affinityId An opaque string representing the location + * of a compute node or a task that has run previously. You can pass the * affinityId of a compute node to indicate that this task needs to run on * that compute node. Note that this is just a soft affinity. If the target * node is busy or unavailable at the time the task is scheduled, then the diff --git a/lib/services/batch/lib/models/applicationGetOptions.js b/lib/services/batch/lib/models/applicationGetOptions.js index 547320700d..75c6101d55 100644 --- a/lib/services/batch/lib/models/applicationGetOptions.js +++ b/lib/services/batch/lib/models/applicationGetOptions.js @@ -17,17 +17,17 @@ class ApplicationGetOptions { /** * Create a ApplicationGetOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/applicationListNextOptions.js b/lib/services/batch/lib/models/applicationListNextOptions.js index 8586e4d4a7..36a56d5697 100644 --- a/lib/services/batch/lib/models/applicationListNextOptions.js +++ b/lib/services/batch/lib/models/applicationListNextOptions.js @@ -17,14 +17,14 @@ class ApplicationListNextOptions { /** * Create a ApplicationListNextOptions. - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/applicationListOptions.js b/lib/services/batch/lib/models/applicationListOptions.js index aa8b410ba8..f98a4248eb 100644 --- a/lib/services/batch/lib/models/applicationListOptions.js +++ b/lib/services/batch/lib/models/applicationListOptions.js @@ -17,20 +17,20 @@ class ApplicationListOptions { /** * Create a ApplicationListOptions. - * @member {number} [maxResults] The maximum number of items to return in the - * response. A maximum of 1000 applications can be returned. Default value: - * 1000 . - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [maxResults] The maximum number of items to return in + * the response. A maximum of 1000 applications can be returned. Default + * value: 1000 . + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/applicationListResult.js b/lib/services/batch/lib/models/applicationListResult.js index c37062d546..cdca36fd35 100644 --- a/lib/services/batch/lib/models/applicationListResult.js +++ b/lib/services/batch/lib/models/applicationListResult.js @@ -16,7 +16,7 @@ class ApplicationListResult extends Array { /** * Create a ApplicationListResult. - * @member {string} [odatanextLink] + * @property {string} [odatanextLink] */ constructor() { super(); diff --git a/lib/services/batch/lib/models/applicationPackageReference.js b/lib/services/batch/lib/models/applicationPackageReference.js index 18c11c8218..0b1ae1179d 100644 --- a/lib/services/batch/lib/models/applicationPackageReference.js +++ b/lib/services/batch/lib/models/applicationPackageReference.js @@ -18,8 +18,8 @@ class ApplicationPackageReference { /** * Create a ApplicationPackageReference. - * @member {string} applicationId The ID of the application to deploy. - * @member {string} [version] The version of the application to deploy. If + * @property {string} applicationId The ID of the application to deploy. + * @property {string} [version] The version of the application to deploy. If * omitted, the default version is deployed. If this is omitted on a pool, * and no default version is specified for this application, the request * fails with the error code InvalidApplicationPackageReferences and HTTP diff --git a/lib/services/batch/lib/models/applicationSummary.js b/lib/services/batch/lib/models/applicationSummary.js index c6f5010c95..e50b29f729 100644 --- a/lib/services/batch/lib/models/applicationSummary.js +++ b/lib/services/batch/lib/models/applicationSummary.js @@ -18,10 +18,10 @@ class ApplicationSummary { /** * Create a ApplicationSummary. - * @member {string} id A string that uniquely identifies the application + * @property {string} id A string that uniquely identifies the application * within the account. - * @member {string} displayName The display name for the application. - * @member {array} versions The list of available versions of the + * @property {string} displayName The display name for the application. + * @property {array} versions The list of available versions of the * application. */ constructor() { diff --git a/lib/services/batch/lib/models/authenticationTokenSettings.js b/lib/services/batch/lib/models/authenticationTokenSettings.js index 6e1c88b4f4..a8569668b7 100644 --- a/lib/services/batch/lib/models/authenticationTokenSettings.js +++ b/lib/services/batch/lib/models/authenticationTokenSettings.js @@ -18,7 +18,7 @@ class AuthenticationTokenSettings { /** * Create a AuthenticationTokenSettings. - * @member {array} [access] The Batch resources to which the token grants + * @property {array} [access] The Batch resources to which the token grants * access. The authentication token grants access to a limited set of Batch * service operations. Currently the only supported value for the access * property is 'job', which grants access to all operations related to the diff --git a/lib/services/batch/lib/models/autoPoolSpecification.js b/lib/services/batch/lib/models/autoPoolSpecification.js index 6eaa4518c0..b58eff8353 100644 --- a/lib/services/batch/lib/models/autoPoolSpecification.js +++ b/lib/services/batch/lib/models/autoPoolSpecification.js @@ -18,29 +18,29 @@ class AutoPoolSpecification { /** * Create a AutoPoolSpecification. - * @member {string} [autoPoolIdPrefix] A prefix to be added to the unique + * @property {string} [autoPoolIdPrefix] A prefix to be added to the unique * identifier when a pool is automatically created. The Batch service assigns * each auto pool a unique identifier on creation. To distinguish between * pools created for different purposes, you can specify this element to add * a prefix to the ID that is assigned. The prefix can be up to 20 characters * long. - * @member {string} poolLifetimeOption The minimum lifetime of created auto + * @property {string} poolLifetimeOption The minimum lifetime of created auto * pools, and how multiple jobs on a schedule are assigned to pools. Possible * values include: 'jobSchedule', 'job' - * @member {boolean} [keepAlive] Whether to keep an auto pool alive after its - * lifetime expires. If false, the Batch service deletes the pool once its - * lifetime (as determined by the poolLifetimeOption setting) expires; that - * is, when the job or job schedule completes. If true, the Batch service - * does not delete the pool automatically. It is up to the user to delete - * auto pools created with this option. - * @member {object} [pool] The pool specification for the auto pool. - * @member {string} [pool.displayName] The display name need not be unique + * @property {boolean} [keepAlive] Whether to keep an auto pool alive after + * its lifetime expires. If false, the Batch service deletes the pool once + * its lifetime (as determined by the poolLifetimeOption setting) expires; + * that is, when the job or job schedule completes. If true, the Batch + * service does not delete the pool automatically. It is up to the user to + * delete auto pools created with this option. + * @property {object} [pool] The pool specification for the auto pool. + * @property {string} [pool.displayName] The display name need not be unique * and can contain any Unicode characters up to a maximum length of 1024. - * @member {string} [pool.vmSize] For information about available sizes of + * @property {string} [pool.vmSize] For information about available sizes of * virtual machines in pools, see Choose a VM size for compute nodes in an * Azure Batch pool * (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). - * @member {object} [pool.cloudServiceConfiguration] This property must be + * @property {object} [pool.cloudServiceConfiguration] This property must be * specified if the pool needs to be created with Azure PaaS VMs. This * property and virtualMachineConfiguration are mutually exclusive and one of * the properties must be specified. If neither is specified then the Batch @@ -48,54 +48,42 @@ class AutoPoolSpecification { * HTTP status code is 400 (Bad Request). This property cannot be specified * if the Batch account was created with its poolAllocationMode property set * to 'UserSubscription'. - * @member {string} [pool.cloudServiceConfiguration.osFamily] Possible values - * are: + * @property {string} [pool.cloudServiceConfiguration.osFamily] Possible + * values are: * 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. * 3 - OS Family 3, equivalent to Windows Server 2012. * 4 - OS Family 4, equivalent to Windows Server 2012 R2. * 5 - OS Family 5, equivalent to Windows Server 2016. For more information, * see Azure Guest OS Releases * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). - * @member {string} [pool.cloudServiceConfiguration.targetOSVersion] The - * default value is * which specifies the latest operating system version for - * the specified OS family. - * @member {string} [pool.cloudServiceConfiguration.currentOSVersion] This - * may differ from targetOSVersion if the pool state is Upgrading. In this - * case some virtual machines may be on the targetOSVersion and some may be - * on the currentOSVersion during the upgrade process. Once all virtual - * machines have upgraded, currentOSVersion is updated to be the same as - * targetOSVersion. - * @member {object} [pool.virtualMachineConfiguration] This property must be - * specified if the pool needs to be created with Azure IaaS VMs. This + * @property {string} [pool.cloudServiceConfiguration.osVersion] The default + * value is * which specifies the latest operating system version for the + * specified OS family. + * @property {object} [pool.virtualMachineConfiguration] This property must + * be specified if the pool needs to be created with Azure IaaS VMs. This * property and cloudServiceConfiguration are mutually exclusive and one of * the properties must be specified. If neither is specified then the Batch * service returns an error; if you are calling the REST API directly, the * HTTP status code is 400 (Bad Request). - * @member {object} [pool.virtualMachineConfiguration.imageReference] - * @member {string} + * @property {object} [pool.virtualMachineConfiguration.imageReference] + * @property {string} * [pool.virtualMachineConfiguration.imageReference.publisher] For example, * Canonical or MicrosoftWindowsServer. - * @member {string} [pool.virtualMachineConfiguration.imageReference.offer] + * @property {string} [pool.virtualMachineConfiguration.imageReference.offer] * For example, UbuntuServer or WindowsServer. - * @member {string} [pool.virtualMachineConfiguration.imageReference.sku] For - * example, 14.04.0-LTS or 2012-R2-Datacenter. - * @member {string} [pool.virtualMachineConfiguration.imageReference.version] - * A value of 'latest' can be specified to select the latest version of an - * image. If omitted, the default is 'latest'. - * @member {string} + * @property {string} [pool.virtualMachineConfiguration.imageReference.sku] + * For example, 14.04.0-LTS or 2012-R2-Datacenter. + * @property {string} + * [pool.virtualMachineConfiguration.imageReference.version] A value of + * 'latest' can be specified to select the latest version of an image. If + * omitted, the default is 'latest'. + * @property {string} * [pool.virtualMachineConfiguration.imageReference.virtualMachineImageId] * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as - * the Azure Batch account. For information about the firewall settings for - * the Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * @member {object} [pool.virtualMachineConfiguration.osDisk] - * @member {string} [pool.virtualMachineConfiguration.osDisk.caching] The - * default value for caching is readwrite. For information about the caching - * options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' - * @member {string} [pool.virtualMachineConfiguration.nodeAgentSKUId] The + * the Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. + * @property {string} [pool.virtualMachineConfiguration.nodeAgentSKUId] The * Batch node agent is a program that runs on each node in the pool, and * provides the command-and-control interface between the node and the Batch * service. There are different implementations of the node agent, known as @@ -103,119 +91,111 @@ class AutoPoolSpecification { * which matches the selected image reference. To get the list of supported * node agent SKUs along with their list of verified image references, see * the 'List supported node agent SKUs' operation. - * @member {object} [pool.virtualMachineConfiguration.windowsConfiguration] - * This property must not be specified if the imageReference or osDisk - * property specifies a Linux OS image. - * @member {boolean} + * @property {object} [pool.virtualMachineConfiguration.windowsConfiguration] + * This property must not be specified if the imageReference property + * specifies a Linux OS image. + * @property {boolean} * [pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] * If omitted, the default value is true. - * @member {array} [pool.virtualMachineConfiguration.dataDisks] This property - * must be specified if the compute nodes in the pool need to have empty data - * disks attached to them. This cannot be updated. Each node gets its own - * disk (the disk is not a file share). Existing disks cannot be attached, - * each attached disk is empty. When the node is removed from the pool, the - * disk and all data associated with it is also deleted. The disk is not - * formatted after being attached, it must be formatted before use - for more - * information see + * @property {array} [pool.virtualMachineConfiguration.dataDisks] This + * property must be specified if the compute nodes in the pool need to have + * empty data disks attached to them. This cannot be updated. Each node gets + * its own disk (the disk is not a file share). Existing disks cannot be + * attached, each attached disk is empty. When the node is removed from the + * pool, the disk and all data associated with it is also deleted. The disk + * is not formatted after being attached, it must be formatted before use - + * for more information see * https://docs.microsoft.com/en-us/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux * and * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. - * @member {string} [pool.virtualMachineConfiguration.licenseType] This only - * applies to images that contain the Windows operating system, and should - * only be used when you hold valid on-premises licenses for the nodes which - * will be deployed. If omitted, no on-premises licensing discount is + * @property {string} [pool.virtualMachineConfiguration.licenseType] This + * only applies to images that contain the Windows operating system, and + * should only be used when you hold valid on-premises licenses for the nodes + * which will be deployed. If omitted, no on-premises licensing discount is * applied. Values are: * * Windows_Server - The on-premises license is for Windows Server. * Windows_Client - The on-premises license is for Windows Client. - * @member {object} [pool.virtualMachineConfiguration.containerConfiguration] - * If specified, setup is performed on each node in the pool to allow tasks - * to run in containers. All regular tasks and job manager tasks run on this - * pool must specify the containerSettings property, and all other tasks may - * specify it. - * @member {array} + * @property {object} + * [pool.virtualMachineConfiguration.containerConfiguration] If specified, + * setup is performed on each node in the pool to allow tasks to run in + * containers. All regular tasks and job manager tasks run on this pool must + * specify the containerSettings property, and all other tasks may specify + * it. + * @property {array} * [pool.virtualMachineConfiguration.containerConfiguration.containerImageNames] * This is the full image reference, as would be specified to "docker pull". * An image will be sourced from the default Docker registry unless the image * is fully qualified with an alternative registry. - * @member {array} + * @property {array} * [pool.virtualMachineConfiguration.containerConfiguration.containerRegistries] * If any images must be downloaded from a private registry which requires * credentials, then those credentials must be provided here. - * @member {number} [pool.maxTasksPerNode] The default value is 1. The + * @property {number} [pool.maxTasksPerNode] The default value is 1. The * maximum value of this setting depends on the size of the compute nodes in * the pool (the vmSize setting). - * @member {object} [pool.taskSchedulingPolicy] - * @member {string} [pool.taskSchedulingPolicy.nodeFillType] Possible values - * include: 'spread', 'pack' - * @member {moment.duration} [pool.resizeTimeout] This timeout applies only + * @property {object} [pool.taskSchedulingPolicy] + * @property {string} [pool.taskSchedulingPolicy.nodeFillType] Possible + * values include: 'spread', 'pack' + * @property {moment.duration} [pool.resizeTimeout] This timeout applies only * to manual scaling; it has no effect when enableAutoScale is set to true. * The default value is 15 minutes. The minimum value is 5 minutes. If you * specify a value less than 5 minutes, the Batch service rejects the request * with an error; if you are calling the REST API directly, the HTTP status * code is 400 (Bad Request). - * @member {number} [pool.targetDedicatedNodes] This property must not be + * @property {number} [pool.targetDedicatedNodes] This property must not be * specified if enableAutoScale is set to true. If enableAutoScale is set to * false, then you must set either targetDedicatedNodes, * targetLowPriorityNodes, or both. - * @member {number} [pool.targetLowPriorityNodes] This property must not be + * @property {number} [pool.targetLowPriorityNodes] This property must not be * specified if enableAutoScale is set to true. If enableAutoScale is set to * false, then you must set either targetDedicatedNodes, * targetLowPriorityNodes, or both. - * @member {boolean} [pool.enableAutoScale] If false, at least one of + * @property {boolean} [pool.enableAutoScale] If false, at least one of * targetDedicateNodes and targetLowPriorityNodes must be specified. If true, * the autoScaleFormula element is required. The pool automatically resizes * according to the formula. The default value is false. - * @member {string} [pool.autoScaleFormula] This property must not be + * @property {string} [pool.autoScaleFormula] This property must not be * specified if enableAutoScale is set to false. It is required if * enableAutoScale is set to true. The formula is checked for validity before * the pool is created. If the formula is not valid, the Batch service * rejects the request with detailed error information. - * @member {moment.duration} [pool.autoScaleEvaluationInterval] The default + * @property {moment.duration} [pool.autoScaleEvaluationInterval] The default * value is 15 minutes. The minimum and maximum value are 5 minutes and 168 * hours respectively. If you specify a value less than 5 minutes or greater * than 168 hours, the Batch service rejects the request with an invalid * property value error; if you are calling the REST API directly, the HTTP * status code is 400 (Bad Request). - * @member {boolean} [pool.enableInterNodeCommunication] Enabling inter-node - * communication limits the maximum size of the pool due to deployment - * restrictions on the nodes of the pool. This may result in the pool not - * reaching its desired size. The default value is false. - * @member {object} [pool.networkConfiguration] - * @member {string} [pool.networkConfiguration.subnetId] The virtual network - * must be in the same region and subscription as the Azure Batch account. - * The specified subnet should have enough free IP addresses to accommodate - * the number of nodes in the pool. If the subnet doesn't have enough free IP - * addresses, the pool will partially allocate compute nodes, and a resize - * error will occur. The 'MicrosoftAzureBatch' service principal must have - * the 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) - * role for the specified VNet. The specified subnet must allow communication - * from the Azure Batch service to be able to schedule tasks on the compute - * nodes. This can be verified by checking if the specified VNet has any - * associated Network Security Groups (NSG). If communication to the compute - * nodes in the specified subnet is denied by an NSG, then the Batch service - * will set the state of the compute nodes to unusable. For pools created - * with virtualMachineConfiguration only ARM virtual networks + * @property {boolean} [pool.enableInterNodeCommunication] Enabling + * inter-node communication limits the maximum size of the pool due to + * deployment restrictions on the nodes of the pool. This may result in the + * pool not reaching its desired size. The default value is false. + * @property {object} [pool.networkConfiguration] + * @property {string} [pool.networkConfiguration.subnetId] This is of the + * form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. + * The virtual network must be in the same region and subscription as the + * Azure Batch account. The specified subnet should have enough free IP + * addresses to accommodate the number of nodes in the pool. If the subnet + * doesn't have enough free IP addresses, the pool will partially allocate + * compute nodes, and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks * ('Microsoft.Network/virtualNetworks') are supported, but for pools created * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security - * Groups (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 - * for Windows. For pools created with a cloud service configuration, enable - * ports 10100, 20100, and 30100. Also enable outbound connections to Azure - * Storage on port 443. For more details see: + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration - * @member {object} [pool.networkConfiguration.endpointConfiguration] Pool + * @property {string} [pool.networkConfiguration.dynamicVNetAssignmentScope] + * Possible values include: 'none', 'job' + * @property {object} [pool.networkConfiguration.endpointConfiguration] Pool * endpoint configuration is only supported on pools with the * virtualMachineConfiguration property. - * @member {array} + * @property {array} * [pool.networkConfiguration.endpointConfiguration.inboundNATPools] The * maximum number of inbound NAT pools per Batch pool is 5. If the maximum * number of inbound NAT pools is exceeded the request fails with HTTP status * code 400. - * @member {object} [pool.startTask] - * @member {string} [pool.startTask.commandLine] The command line does not + * @property {object} [pool.startTask] + * @property {string} [pool.startTask.commandLine] The command line does not * run under a shell, and therefore cannot take advantage of shell features * such as environment variable expansion. If you want to take advantage of * such features, you should invoke the shell in the command line, for @@ -224,41 +204,42 @@ class AutoPoolSpecification { * path (relative to the task working directory), or use the Batch provided * environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [pool.startTask.containerSettings] When this is + * @property {object} [pool.startTask.containerSettings] When this is * specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR * (the root of Azure Batch directories on the node) are mapped into the * container, all task environment variables are mapped into the container, * and the task command line is executed in the container. - * @member {string} [pool.startTask.containerSettings.containerRunOptions] + * @property {string} [pool.startTask.containerSettings.containerRunOptions] * These additional options are supplied as arguments to the "docker create" * command, in addition to those controlled by the Batch Service. - * @member {string} [pool.startTask.containerSettings.imageName] This is the - * full image reference, as would be specified to "docker pull". If no tag is - * provided as part of the image name, the tag ":latest" is used as a + * @property {string} [pool.startTask.containerSettings.imageName] This is + * the full image reference, as would be specified to "docker pull". If no + * tag is provided as part of the image name, the tag ":latest" is used as a * default. - * @member {object} [pool.startTask.containerSettings.registry] This setting - * can be omitted if was already provided at pool creation. - * @member {string} + * @property {object} [pool.startTask.containerSettings.registry] This + * setting can be omitted if was already provided at pool creation. + * @property {string} * [pool.startTask.containerSettings.registry.registryServer] If omitted, the * default is "docker.io". - * @member {string} [pool.startTask.containerSettings.registry.userName] - * @member {string} [pool.startTask.containerSettings.registry.password] - * @member {array} [pool.startTask.resourceFiles] Files listed under this + * @property {string} [pool.startTask.containerSettings.registry.userName] + * @property {string} [pool.startTask.containerSettings.registry.password] + * @property {array} [pool.startTask.resourceFiles] Files listed under this * element are located in the task's working directory. - * @member {array} [pool.startTask.environmentSettings] - * @member {object} [pool.startTask.userIdentity] If omitted, the task runs + * @property {array} [pool.startTask.environmentSettings] + * @property {object} [pool.startTask.userIdentity] If omitted, the task runs * as a non-administrative user unique to the task. - * @member {string} [pool.startTask.userIdentity.userName] The userName and + * @property {string} [pool.startTask.userIdentity.userName] The userName and * autoUser properties are mutually exclusive; you must specify one but not * both. - * @member {object} [pool.startTask.userIdentity.autoUser] The userName and + * @property {object} [pool.startTask.userIdentity.autoUser] The userName and * autoUser properties are mutually exclusive; you must specify one but not * both. - * @member {string} [pool.startTask.userIdentity.autoUser.scope] The default - * value is task. Possible values include: 'task', 'pool' - * @member {string} [pool.startTask.userIdentity.autoUser.elevationLevel] The - * default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {number} [pool.startTask.maxTaskRetryCount] The Batch service + * @property {string} [pool.startTask.userIdentity.autoUser.scope] The + * default value is task. Possible values include: 'task', 'pool' + * @property {string} [pool.startTask.userIdentity.autoUser.elevationLevel] + * The default value is nonAdmin. Possible values include: 'nonAdmin', + * 'admin' + * @property {number} [pool.startTask.maxTaskRetryCount] The Batch service * retries a task if its exit code is nonzero. Note that this value * specifically controls the number of retries. The Batch service will try * the task once, and may then retry up to this limit. For example, if the @@ -266,7 +247,7 @@ class AutoPoolSpecification { * try and 3 retries). If the maximum retry count is 0, the Batch service * does not retry the task. If the maximum retry count is -1, the Batch * service retries the task without limit. - * @member {boolean} [pool.startTask.waitForSuccess] If true and the start + * @property {boolean} [pool.startTask.waitForSuccess] If true and the start * task fails on a compute node, the Batch service retries the start task up * to its maximum retry count (maxTaskRetryCount). If the task has still not * completed successfully after all retries, then the Batch service marks the @@ -276,7 +257,7 @@ class AutoPoolSpecification { * other tasks can start executing on the compute node while the start task * is still running; and even if the start task fails, new tasks will * continue to be scheduled on the node. The default is false. - * @member {array} [pool.certificateReferences] For Windows compute nodes, + * @property {array} [pool.certificateReferences] For Windows compute nodes, * the Batch service installs the certificates to the specified certificate * store and location. For Linux compute nodes, the certificates are stored * in a directory inside the task working directory and an environment @@ -284,15 +265,15 @@ class AutoPoolSpecification { * this location. For certificates with visibility of 'remoteUser', a 'certs' * directory is created in the user's home directory (e.g., * /home/{user-name}/certs) and certificates are placed in that directory. - * @member {array} [pool.applicationPackageReferences] - * @member {array} [pool.applicationLicenses] The list of application + * @property {array} [pool.applicationPackageReferences] + * @property {array} [pool.applicationLicenses] The list of application * licenses must be a subset of available Batch service application licenses. * If a license is requested which is not supported, pool creation will fail. * The permitted licenses available on the pool are 'maya', 'vray', '3dsmax', * 'arnold'. An additional charge applies for each application license added * to the pool. - * @member {array} [pool.userAccounts] - * @member {array} [pool.metadata] The Batch service does not assign any + * @property {array} [pool.userAccounts] + * @property {array} [pool.metadata] The Batch service does not assign any * meaning to metadata; it is solely for the use of user code. */ constructor() { diff --git a/lib/services/batch/lib/models/autoScaleRun.js b/lib/services/batch/lib/models/autoScaleRun.js index 254a6c5b0e..e6ebe0cb2f 100644 --- a/lib/services/batch/lib/models/autoScaleRun.js +++ b/lib/services/batch/lib/models/autoScaleRun.js @@ -18,16 +18,16 @@ class AutoScaleRun { /** * Create a AutoScaleRun. - * @member {date} timestamp The time at which the autoscale formula was last - * evaluated. - * @member {string} [results] The final values of all variables used in the + * @property {date} timestamp The time at which the autoscale formula was + * last evaluated. + * @property {string} [results] The final values of all variables used in the * evaluation of the autoscale formula. Each variable value is returned in * the form $variable=value, and variables are separated by semicolons. - * @member {object} [error] Details of the error encountered evaluating the + * @property {object} [error] Details of the error encountered evaluating the * autoscale formula on the pool, if the evaluation was unsuccessful. - * @member {string} [error.code] - * @member {string} [error.message] - * @member {array} [error.values] + * @property {string} [error.code] + * @property {string} [error.message] + * @property {array} [error.values] */ constructor() { } diff --git a/lib/services/batch/lib/models/autoScaleRunError.js b/lib/services/batch/lib/models/autoScaleRunError.js index a592752b48..37515faa7b 100644 --- a/lib/services/batch/lib/models/autoScaleRunError.js +++ b/lib/services/batch/lib/models/autoScaleRunError.js @@ -18,12 +18,12 @@ class AutoScaleRunError { /** * Create a AutoScaleRunError. - * @member {string} [code] An identifier for the autoscale error. Codes are + * @property {string} [code] An identifier for the autoscale error. Codes are * invariant and are intended to be consumed programmatically. - * @member {string} [message] A message describing the autoscale error, + * @property {string} [message] A message describing the autoscale error, * intended to be suitable for display in a user interface. - * @member {array} [values] A list of additional error details related to the - * autoscale error. + * @property {array} [values] A list of additional error details related to + * the autoscale error. */ constructor() { } diff --git a/lib/services/batch/lib/models/autoUserSpecification.js b/lib/services/batch/lib/models/autoUserSpecification.js index 72ffd4cf97..00a73fa772 100644 --- a/lib/services/batch/lib/models/autoUserSpecification.js +++ b/lib/services/batch/lib/models/autoUserSpecification.js @@ -18,9 +18,9 @@ class AutoUserSpecification { /** * Create a AutoUserSpecification. - * @member {string} [scope] The scope for the auto user. The default value is - * task. Possible values include: 'task', 'pool' - * @member {string} [elevationLevel] The elevation level of the auto user. + * @property {string} [scope] The scope for the auto user. The default value + * is task. Possible values include: 'task', 'pool' + * @property {string} [elevationLevel] The elevation level of the auto user. * The default value is nonAdmin. Possible values include: 'nonAdmin', * 'admin' */ diff --git a/lib/services/batch/lib/models/batchError.js b/lib/services/batch/lib/models/batchError.js index 7a62e6066c..c26fe66787 100644 --- a/lib/services/batch/lib/models/batchError.js +++ b/lib/services/batch/lib/models/batchError.js @@ -17,13 +17,13 @@ class BatchError { /** * Create a BatchError. - * @member {string} [code] An identifier for the error. Codes are invariant + * @property {string} [code] An identifier for the error. Codes are invariant * and are intended to be consumed programmatically. - * @member {object} [message] A message describing the error, intended to be - * suitable for display in a user interface. - * @member {string} [message.lang] - * @member {string} [message.value] - * @member {array} [values] A collection of key-value pairs containing + * @property {object} [message] A message describing the error, intended to + * be suitable for display in a user interface. + * @property {string} [message.lang] + * @property {string} [message.value] + * @property {array} [values] A collection of key-value pairs containing * additional details about the error. */ constructor() { diff --git a/lib/services/batch/lib/models/batchErrorDetail.js b/lib/services/batch/lib/models/batchErrorDetail.js index 5049e0b4d7..119e8055ed 100644 --- a/lib/services/batch/lib/models/batchErrorDetail.js +++ b/lib/services/batch/lib/models/batchErrorDetail.js @@ -18,9 +18,9 @@ class BatchErrorDetail { /** * Create a BatchErrorDetail. - * @member {string} [key] An identifier specifying the meaning of the Value + * @property {string} [key] An identifier specifying the meaning of the Value * property. - * @member {string} [value] The additional information included with the + * @property {string} [value] The additional information included with the * error response. */ constructor() { diff --git a/lib/services/batch/lib/models/certificate.js b/lib/services/batch/lib/models/certificate.js index 7215771723..6d35b4b1de 100644 --- a/lib/services/batch/lib/models/certificate.js +++ b/lib/services/batch/lib/models/certificate.js @@ -18,32 +18,32 @@ class Certificate { /** * Create a Certificate. - * @member {string} [thumbprint] The X.509 thumbprint of the certificate. + * @property {string} [thumbprint] The X.509 thumbprint of the certificate. * This is a sequence of up to 40 hex digits. - * @member {string} [thumbprintAlgorithm] The algorithm used to derive the + * @property {string} [thumbprintAlgorithm] The algorithm used to derive the * thumbprint. - * @member {string} [url] The URL of the certificate. - * @member {string} [state] The current state of the certificate. Possible + * @property {string} [url] The URL of the certificate. + * @property {string} [state] The current state of the certificate. Possible * values include: 'active', 'deleting', 'deleteFailed' - * @member {date} [stateTransitionTime] The time at which the certificate + * @property {date} [stateTransitionTime] The time at which the certificate * entered its current state. - * @member {string} [previousState] The previous state of the certificate. + * @property {string} [previousState] The previous state of the certificate. * This property is not set if the certificate is in its initial active * state. Possible values include: 'active', 'deleting', 'deleteFailed' - * @member {date} [previousStateTransitionTime] The time at which the + * @property {date} [previousStateTransitionTime] The time at which the * certificate entered its previous state. This property is not set if the * certificate is in its initial Active state. - * @member {string} [publicData] The public part of the certificate as a + * @property {string} [publicData] The public part of the certificate as a * base-64 encoded .cer file. - * @member {object} [deleteCertificateError] The error that occurred on the + * @property {object} [deleteCertificateError] The error that occurred on the * last attempt to delete this certificate. This property is set only if the * certificate is in the DeleteFailed state. - * @member {string} [deleteCertificateError.code] - * @member {string} [deleteCertificateError.message] - * @member {array} [deleteCertificateError.values] This list includes details - * such as the active pools and nodes referencing this certificate. However, - * if a large number of resources reference the certificate, the list - * contains only about the first hundred. + * @property {string} [deleteCertificateError.code] + * @property {string} [deleteCertificateError.message] + * @property {array} [deleteCertificateError.values] This list includes + * details such as the active pools and nodes referencing this certificate. + * However, if a large number of resources reference the certificate, the + * list contains only about the first hundred. */ constructor() { } diff --git a/lib/services/batch/lib/models/certificateAddOptions.js b/lib/services/batch/lib/models/certificateAddOptions.js index 32f473428f..8c3bad52b4 100644 --- a/lib/services/batch/lib/models/certificateAddOptions.js +++ b/lib/services/batch/lib/models/certificateAddOptions.js @@ -17,17 +17,17 @@ class CertificateAddOptions { /** * Create a CertificateAddOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/certificateAddParameter.js b/lib/services/batch/lib/models/certificateAddParameter.js index 5cba8cc33a..453a8718bb 100644 --- a/lib/services/batch/lib/models/certificateAddParameter.js +++ b/lib/services/batch/lib/models/certificateAddParameter.js @@ -18,16 +18,16 @@ class CertificateAddParameter { /** * Create a CertificateAddParameter. - * @member {string} thumbprint The X.509 thumbprint of the certificate. This - * is a sequence of up to 40 hex digits (it may include spaces but these are - * removed). - * @member {string} thumbprintAlgorithm The algorithm used to derive the + * @property {string} thumbprint The X.509 thumbprint of the certificate. + * This is a sequence of up to 40 hex digits (it may include spaces but these + * are removed). + * @property {string} thumbprintAlgorithm The algorithm used to derive the * thumbprint. This must be sha1. - * @member {string} data The base64-encoded contents of the certificate. The - * maximum size is 10KB. - * @member {string} [certificateFormat] The format of the certificate data. + * @property {string} data The base64-encoded contents of the certificate. + * The maximum size is 10KB. + * @property {string} [certificateFormat] The format of the certificate data. * Possible values include: 'pfx', 'cer' - * @member {string} [password] The password to access the certificate's + * @property {string} [password] The password to access the certificate's * private key. This is required if the certificate format is pfx. It should * be omitted if the certificate format is cer. */ diff --git a/lib/services/batch/lib/models/certificateCancelDeletionOptions.js b/lib/services/batch/lib/models/certificateCancelDeletionOptions.js index a49180d9f4..d4ae52a9f9 100644 --- a/lib/services/batch/lib/models/certificateCancelDeletionOptions.js +++ b/lib/services/batch/lib/models/certificateCancelDeletionOptions.js @@ -17,17 +17,17 @@ class CertificateCancelDeletionOptions { /** * Create a CertificateCancelDeletionOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/certificateDeleteMethodOptions.js b/lib/services/batch/lib/models/certificateDeleteMethodOptions.js index c02d276b20..60ee4179ef 100644 --- a/lib/services/batch/lib/models/certificateDeleteMethodOptions.js +++ b/lib/services/batch/lib/models/certificateDeleteMethodOptions.js @@ -17,17 +17,17 @@ class CertificateDeleteMethodOptions { /** * Create a CertificateDeleteMethodOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/certificateGetOptions.js b/lib/services/batch/lib/models/certificateGetOptions.js index 258d13d73c..cd97ed6f90 100644 --- a/lib/services/batch/lib/models/certificateGetOptions.js +++ b/lib/services/batch/lib/models/certificateGetOptions.js @@ -17,18 +17,18 @@ class CertificateGetOptions { /** * Create a CertificateGetOptions. - * @member {string} [select] An OData $select clause. - * @member {number} [timeout] The maximum time that the server can spend + * @property {string} [select] An OData $select clause. + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/certificateListNextOptions.js b/lib/services/batch/lib/models/certificateListNextOptions.js index f9e6b6062b..f44b6d28c1 100644 --- a/lib/services/batch/lib/models/certificateListNextOptions.js +++ b/lib/services/batch/lib/models/certificateListNextOptions.js @@ -17,14 +17,14 @@ class CertificateListNextOptions { /** * Create a CertificateListNextOptions. - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/certificateListOptions.js b/lib/services/batch/lib/models/certificateListOptions.js index b344dd1ac4..b7beef0920 100644 --- a/lib/services/batch/lib/models/certificateListOptions.js +++ b/lib/services/batch/lib/models/certificateListOptions.js @@ -17,24 +17,24 @@ class CertificateListOptions { /** * Create a CertificateListOptions. - * @member {string} [filter] An OData $filter clause. For more information on - * constructing this filter, see + * @property {string} [filter] An OData $filter clause. For more information + * on constructing this filter, see * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-certificates. - * @member {string} [select] An OData $select clause. - * @member {number} [maxResults] The maximum number of items to return in the - * response. A maximum of 1000 certificates can be returned. Default value: - * 1000 . - * @member {number} [timeout] The maximum time that the server can spend + * @property {string} [select] An OData $select clause. + * @property {number} [maxResults] The maximum number of items to return in + * the response. A maximum of 1000 certificates can be returned. Default + * value: 1000 . + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/certificateListResult.js b/lib/services/batch/lib/models/certificateListResult.js index 4eb9a31d48..b1f826297f 100644 --- a/lib/services/batch/lib/models/certificateListResult.js +++ b/lib/services/batch/lib/models/certificateListResult.js @@ -16,7 +16,7 @@ class CertificateListResult extends Array { /** * Create a CertificateListResult. - * @member {string} [odatanextLink] + * @property {string} [odatanextLink] */ constructor() { super(); diff --git a/lib/services/batch/lib/models/certificateReference.js b/lib/services/batch/lib/models/certificateReference.js index 832367c7c9..fc0cf76d61 100644 --- a/lib/services/batch/lib/models/certificateReference.js +++ b/lib/services/batch/lib/models/certificateReference.js @@ -18,28 +18,29 @@ class CertificateReference { /** * Create a CertificateReference. - * @member {string} thumbprint The thumbprint of the certificate. - * @member {string} thumbprintAlgorithm The algorithm with which the + * @property {string} thumbprint The thumbprint of the certificate. + * @property {string} thumbprintAlgorithm The algorithm with which the * thumbprint is associated. This must be sha1. - * @member {string} [storeLocation] The location of the certificate store on - * the compute node into which to install the certificate. The default value - * is currentuser. This property is applicable only for pools configured with - * Windows nodes (that is, created with cloudServiceConfiguration, or with - * virtualMachineConfiguration using a Windows image reference). For Linux - * compute nodes, the certificates are stored in a directory inside the task - * working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is - * supplied to the task to query for this location. For certificates with - * visibility of 'remoteUser', a 'certs' directory is created in the user's - * home directory (e.g., /home/{user-name}/certs) and certificates are placed - * in that directory. Possible values include: 'currentUser', 'localMachine' - * @member {string} [storeName] The name of the certificate store on the + * @property {string} [storeLocation] The location of the certificate store + * on the compute node into which to install the certificate. The default + * value is currentuser. This property is applicable only for pools + * configured with Windows nodes (that is, created with + * cloudServiceConfiguration, or with virtualMachineConfiguration using a + * Windows image reference). For Linux compute nodes, the certificates are + * stored in a directory inside the task working directory and an environment + * variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for + * this location. For certificates with visibility of 'remoteUser', a 'certs' + * directory is created in the user's home directory (e.g., + * /home/{user-name}/certs) and certificates are placed in that directory. + * Possible values include: 'currentUser', 'localMachine' + * @property {string} [storeName] The name of the certificate store on the * compute node into which to install the certificate. This property is * applicable only for pools configured with Windows nodes (that is, created * with cloudServiceConfiguration, or with virtualMachineConfiguration using * a Windows image reference). Common store names include: My, Root, CA, * Trust, Disallowed, TrustedPeople, TrustedPublisher, AuthRoot, AddressBook, * but any custom store name can also be used. The default value is My. - * @member {array} [visibility] Which user accounts on the compute node + * @property {array} [visibility] Which user accounts on the compute node * should have access to the private data of the certificate. You can specify * more than one visibility in this collection. The default is all accounts. */ diff --git a/lib/services/batch/lib/models/cloudJob.js b/lib/services/batch/lib/models/cloudJob.js index 38bb738ae6..850e8b5a0e 100644 --- a/lib/services/batch/lib/models/cloudJob.js +++ b/lib/services/batch/lib/models/cloudJob.js @@ -17,59 +17,59 @@ class CloudJob { /** * Create a CloudJob. - * @member {string} [id] A string that uniquely identifies the job within the - * account. The ID is case-preserving and case-insensitive (that is, you may - * not have two IDs within an account that differ only by case). - * @member {string} [displayName] The display name for the job. - * @member {boolean} [usesTaskDependencies] Whether tasks in the job can + * @property {string} [id] A string that uniquely identifies the job within + * the account. The ID is case-preserving and case-insensitive (that is, you + * may not have two IDs within an account that differ only by case). + * @property {string} [displayName] The display name for the job. + * @property {boolean} [usesTaskDependencies] Whether tasks in the job can * define dependencies on each other. The default is false. - * @member {string} [url] The URL of the job. - * @member {string} [eTag] The ETag of the job. This is an opaque string. You - * can use it to detect whether the job has changed between requests. In + * @property {string} [url] The URL of the job. + * @property {string} [eTag] The ETag of the job. This is an opaque string. + * You can use it to detect whether the job has changed between requests. In * particular, you can be pass the ETag when updating a job to specify that * your changes should take effect only if nobody else has modified the job * in the meantime. - * @member {date} [lastModified] The last modified time of the job. This is + * @property {date} [lastModified] The last modified time of the job. This is * the last time at which the job level data, such as the job state or * priority, changed. It does not factor in task-level changes such as adding * new tasks or tasks changing state. - * @member {date} [creationTime] The creation time of the job. - * @member {string} [state] The current state of the job. Possible values + * @property {date} [creationTime] The creation time of the job. + * @property {string} [state] The current state of the job. Possible values * include: 'active', 'disabling', 'disabled', 'enabling', 'terminating', * 'completed', 'deleting' - * @member {date} [stateTransitionTime] The time at which the job entered its - * current state. - * @member {string} [previousState] The previous state of the job. This + * @property {date} [stateTransitionTime] The time at which the job entered + * its current state. + * @property {string} [previousState] The previous state of the job. This * property is not set if the job is in its initial Active state. Possible * values include: 'active', 'disabling', 'disabled', 'enabling', * 'terminating', 'completed', 'deleting' - * @member {date} [previousStateTransitionTime] The time at which the job + * @property {date} [previousStateTransitionTime] The time at which the job * entered its previous state. This property is not set if the job is in its * initial Active state. - * @member {number} [priority] The priority of the job. Priority values can + * @property {number} [priority] The priority of the job. Priority values can * range from -1000 to 1000, with -1000 being the lowest priority and 1000 * being the highest priority. The default value is 0. - * @member {object} [constraints] The execution constraints for the job. - * @member {moment.duration} [constraints.maxWallClockTime] If the job does + * @property {object} [constraints] The execution constraints for the job. + * @property {moment.duration} [constraints.maxWallClockTime] If the job does * not complete within the time limit, the Batch service terminates it and * any tasks that are still running. In this case, the termination reason * will be MaxWallClockTimeExpiry. If this property is not specified, there * is no time limit on how long the job may run. - * @member {number} [constraints.maxTaskRetryCount] Note that this value + * @property {number} [constraints.maxTaskRetryCount] Note that this value * specifically controls the number of retries. The Batch service will try * each task once, and may then retry up to this limit. For example, if the * maximum retry count is 3, Batch tries a task up to 4 times (one initial * try and 3 retries). If the maximum retry count is 0, the Batch service * does not retry tasks. If the maximum retry count is -1, the Batch service * retries tasks without limit. The default value is 0 (no retries). - * @member {object} [jobManagerTask] Details of a Job Manager task to be + * @property {object} [jobManagerTask] Details of a Job Manager task to be * launched when the job is started. - * @member {string} [jobManagerTask.id] The ID can contain any combination of - * alphanumeric characters including hyphens and underscores and cannot + * @property {string} [jobManagerTask.id] The ID can contain any combination + * of alphanumeric characters including hyphens and underscores and cannot * contain more than 64 characters. - * @member {string} [jobManagerTask.displayName] It need not be unique and + * @property {string} [jobManagerTask.displayName] It need not be unique and * can contain any Unicode characters up to a maximum length of 1024. - * @member {string} [jobManagerTask.commandLine] The command line does not + * @property {string} [jobManagerTask.commandLine] The command line does not * run under a shell, and therefore cannot take advantage of shell features * such as environment variable expansion. If you want to take advantage of * such features, you should invoke the shell in the command line, for @@ -78,57 +78,55 @@ class CloudJob { * path (relative to the task working directory), or use the Batch provided * environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [jobManagerTask.containerSettings] If the pool that will - * run this task has containerConfiguration set, this must be set as well. If - * the pool that will run this task doesn't have containerConfiguration set, - * this must not be set. When this is specified, all directories recursively - * below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on - * the node) are mapped into the container, all task environment variables - * are mapped into the container, and the task command line is executed in - * the container. - * @member {string} [jobManagerTask.containerSettings.containerRunOptions] + * @property {object} [jobManagerTask.containerSettings] If the pool that + * will run this task has containerConfiguration set, this must be set as + * well. If the pool that will run this task doesn't have + * containerConfiguration set, this must not be set. When this is specified, + * all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of + * Azure Batch directories on the node) are mapped into the container, all + * task environment variables are mapped into the container, and the task + * command line is executed in the container. + * @property {string} [jobManagerTask.containerSettings.containerRunOptions] * These additional options are supplied as arguments to the "docker create" * command, in addition to those controlled by the Batch Service. - * @member {string} [jobManagerTask.containerSettings.imageName] This is the - * full image reference, as would be specified to "docker pull". If no tag is - * provided as part of the image name, the tag ":latest" is used as a + * @property {string} [jobManagerTask.containerSettings.imageName] This is + * the full image reference, as would be specified to "docker pull". If no + * tag is provided as part of the image name, the tag ":latest" is used as a * default. - * @member {object} [jobManagerTask.containerSettings.registry] This setting - * can be omitted if was already provided at pool creation. - * @member {string} + * @property {object} [jobManagerTask.containerSettings.registry] This + * setting can be omitted if was already provided at pool creation. + * @property {string} * [jobManagerTask.containerSettings.registry.registryServer] If omitted, the * default is "docker.io". - * @member {string} [jobManagerTask.containerSettings.registry.userName] - * @member {string} [jobManagerTask.containerSettings.registry.password] - * @member {array} [jobManagerTask.resourceFiles] Files listed under this + * @property {string} [jobManagerTask.containerSettings.registry.userName] + * @property {string} [jobManagerTask.containerSettings.registry.password] + * @property {array} [jobManagerTask.resourceFiles] Files listed under this * element are located in the task's working directory. There is a maximum * size for the list of resource files. When the max size is exceeded, the * request will fail and the response error code will be * RequestEntityTooLarge. If this occurs, the collection of ResourceFiles * must be reduced in size. This can be achieved using .zip files, * Application Packages, or Docker Containers. - * @member {array} [jobManagerTask.outputFiles] For multi-instance tasks, the - * files will only be uploaded from the compute node on which the primary + * @property {array} [jobManagerTask.outputFiles] For multi-instance tasks, + * the files will only be uploaded from the compute node on which the primary * task is executed. - * @member {array} [jobManagerTask.environmentSettings] - * @member {object} [jobManagerTask.constraints] - * @member {moment.duration} [jobManagerTask.constraints.maxWallClockTime] If - * this is not specified, there is no time limit on how long the task may + * @property {array} [jobManagerTask.environmentSettings] + * @property {object} [jobManagerTask.constraints] + * @property {moment.duration} [jobManagerTask.constraints.maxWallClockTime] + * If this is not specified, there is no time limit on how long the task may * run. - * @member {moment.duration} [jobManagerTask.constraints.retentionTime] The - * default is infinite, i.e. the task directory will be retained until the - * compute node is removed or reimaged. - * @member {number} [jobManagerTask.constraints.maxTaskRetryCount] Note that - * this value specifically controls the number of retries for the task + * @property {moment.duration} [jobManagerTask.constraints.retentionTime] The + * default is 7 days, i.e. the task directory will be retained for 7 days + * unless the compute node is removed or the job is deleted. + * @property {number} [jobManagerTask.constraints.maxTaskRetryCount] Note + * that this value specifically controls the number of retries for the task * executable due to a nonzero exit code. The Batch service will try the task * once, and may then retry up to this limit. For example, if the maximum * retry count is 3, Batch tries the task up to 4 times (one initial try and * 3 retries). If the maximum retry count is 0, the Batch service does not * retry the task after the first attempt. If the maximum retry count is -1, - * the Batch service retries the task without limit. Resource files and - * application packages are only downloaded again if the task is retried on a - * new compute node. - * @member {boolean} [jobManagerTask.killJobOnCompletion] If true, when the + * the Batch service retries the task without limit. + * @property {boolean} [jobManagerTask.killJobOnCompletion] If true, when the * Job Manager task completes, the Batch service marks the job as complete. * If any tasks are still running at this time (other than Job Release), * those tasks are terminated. If false, the completion of the Job Manager @@ -141,32 +139,33 @@ class CloudJob { * and using the Job Manager task only to create the tasks for the job (not * to monitor progress), then it is important to set killJobOnCompletion to * false. - * @member {object} [jobManagerTask.userIdentity] If omitted, the task runs + * @property {object} [jobManagerTask.userIdentity] If omitted, the task runs * as a non-administrative user unique to the task. - * @member {string} [jobManagerTask.userIdentity.userName] The userName and + * @property {string} [jobManagerTask.userIdentity.userName] The userName and * autoUser properties are mutually exclusive; you must specify one but not * both. - * @member {object} [jobManagerTask.userIdentity.autoUser] The userName and + * @property {object} [jobManagerTask.userIdentity.autoUser] The userName and * autoUser properties are mutually exclusive; you must specify one but not * both. - * @member {string} [jobManagerTask.userIdentity.autoUser.scope] The default - * value is task. Possible values include: 'task', 'pool' - * @member {string} [jobManagerTask.userIdentity.autoUser.elevationLevel] The - * default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {boolean} [jobManagerTask.runExclusive] If true, no other tasks + * @property {string} [jobManagerTask.userIdentity.autoUser.scope] The + * default value is task. Possible values include: 'task', 'pool' + * @property {string} [jobManagerTask.userIdentity.autoUser.elevationLevel] + * The default value is nonAdmin. Possible values include: 'nonAdmin', + * 'admin' + * @property {boolean} [jobManagerTask.runExclusive] If true, no other tasks * will run on the same compute node for as long as the Job Manager is * running. If false, other tasks can run simultaneously with the Job Manager * on a compute node. The Job Manager task counts normally against the node's * concurrent task limit, so this is only relevant if the node allows * multiple concurrent tasks. The default value is true. - * @member {array} [jobManagerTask.applicationPackageReferences] Application - * packages are downloaded and deployed to a shared directory, not the task - * working directory. Therefore, if a referenced package is already on the - * compute node, and is up to date, then it is not re-downloaded; the - * existing copy on the compute node is used. If a referenced application - * package cannot be installed, for example because the package has been - * deleted or because download failed, the task fails. - * @member {object} [jobManagerTask.authenticationTokenSettings] If this + * @property {array} [jobManagerTask.applicationPackageReferences] + * Application packages are downloaded and deployed to a shared directory, + * not the task working directory. Therefore, if a referenced package is + * already on the compute node, and is up to date, then it is not + * re-downloaded; the existing copy on the compute node is used. If a + * referenced application package cannot be installed, for example because + * the package has been deleted or because download failed, the task fails. + * @property {object} [jobManagerTask.authenticationTokenSettings] If this * property is set, the Batch service provides the task with an * authentication token which can be used to authenticate Batch service * operations without requiring an account access key. The token is provided @@ -174,17 +173,17 @@ class CloudJob { * that the task can carry out using the token depend on the settings. For * example, a task can request job permissions in order to add other tasks to * the job, or check the status of the job or of other tasks under the job. - * @member {array} [jobManagerTask.authenticationTokenSettings.access] The + * @property {array} [jobManagerTask.authenticationTokenSettings.access] The * authentication token grants access to a limited set of Batch service * operations. Currently the only supported value for the access property is * 'job', which grants access to all operations related to the job which * contains the task. - * @member {boolean} [jobManagerTask.allowLowPriorityNode] The default value - * is true. - * @member {object} [jobPreparationTask] The Job Preparation task. The Job + * @property {boolean} [jobManagerTask.allowLowPriorityNode] The default + * value is true. + * @property {object} [jobPreparationTask] The Job Preparation task. The Job * Preparation task is a special task run on each node before any other task * of the job. - * @member {string} [jobPreparationTask.id] The ID can contain any + * @property {string} [jobPreparationTask.id] The ID can contain any * combination of alphanumeric characters including hyphens and underscores * and cannot contain more than 64 characters. If you do not specify this * property, the Batch service assigns a default value of 'jobpreparation'. @@ -192,7 +191,7 @@ class CloudJob { * If you try to submit a task with the same id, the Batch service rejects * the request with error code TaskIdSameAsJobPreparationTask; if you are * calling the REST API directly, the HTTP status code is 409 (Conflict). - * @member {string} [jobPreparationTask.commandLine] The command line does + * @property {string} [jobPreparationTask.commandLine] The command line does * not run under a shell, and therefore cannot take advantage of shell * features such as environment variable expansion. If you want to take * advantage of such features, you should invoke the shell in the command @@ -201,55 +200,55 @@ class CloudJob { * use a relative path (relative to the task working directory), or use the * Batch provided environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [jobPreparationTask.containerSettings] When this is + * @property {object} [jobPreparationTask.containerSettings] When this is * specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR * (the root of Azure Batch directories on the node) are mapped into the * container, all task environment variables are mapped into the container, * and the task command line is executed in the container. - * @member {string} + * @property {string} * [jobPreparationTask.containerSettings.containerRunOptions] These * additional options are supplied as arguments to the "docker create" * command, in addition to those controlled by the Batch Service. - * @member {string} [jobPreparationTask.containerSettings.imageName] This is - * the full image reference, as would be specified to "docker pull". If no + * @property {string} [jobPreparationTask.containerSettings.imageName] This + * is the full image reference, as would be specified to "docker pull". If no * tag is provided as part of the image name, the tag ":latest" is used as a * default. - * @member {object} [jobPreparationTask.containerSettings.registry] This + * @property {object} [jobPreparationTask.containerSettings.registry] This * setting can be omitted if was already provided at pool creation. - * @member {string} + * @property {string} * [jobPreparationTask.containerSettings.registry.registryServer] If omitted, * the default is "docker.io". - * @member {string} [jobPreparationTask.containerSettings.registry.userName] - * @member {string} [jobPreparationTask.containerSettings.registry.password] - * @member {array} [jobPreparationTask.resourceFiles] Files listed under this - * element are located in the task's working directory. There is a maximum - * size for the list of resource files. When the max size is exceeded, the - * request will fail and the response error code will be + * @property {string} + * [jobPreparationTask.containerSettings.registry.userName] + * @property {string} + * [jobPreparationTask.containerSettings.registry.password] + * @property {array} [jobPreparationTask.resourceFiles] Files listed under + * this element are located in the task's working directory. There is a + * maximum size for the list of resource files. When the max size is + * exceeded, the request will fail and the response error code will be * RequestEntityTooLarge. If this occurs, the collection of ResourceFiles * must be reduced in size. This can be achieved using .zip files, * Application Packages, or Docker Containers. - * @member {array} [jobPreparationTask.environmentSettings] - * @member {object} [jobPreparationTask.constraints] - * @member {moment.duration} + * @property {array} [jobPreparationTask.environmentSettings] + * @property {object} [jobPreparationTask.constraints] + * @property {moment.duration} * [jobPreparationTask.constraints.maxWallClockTime] If this is not * specified, there is no time limit on how long the task may run. - * @member {moment.duration} [jobPreparationTask.constraints.retentionTime] - * The default is infinite, i.e. the task directory will be retained until - * the compute node is removed or reimaged. - * @member {number} [jobPreparationTask.constraints.maxTaskRetryCount] Note + * @property {moment.duration} [jobPreparationTask.constraints.retentionTime] + * The default is 7 days, i.e. the task directory will be retained for 7 days + * unless the compute node is removed or the job is deleted. + * @property {number} [jobPreparationTask.constraints.maxTaskRetryCount] Note * that this value specifically controls the number of retries for the task * executable due to a nonzero exit code. The Batch service will try the task * once, and may then retry up to this limit. For example, if the maximum * retry count is 3, Batch tries the task up to 4 times (one initial try and * 3 retries). If the maximum retry count is 0, the Batch service does not * retry the task after the first attempt. If the maximum retry count is -1, - * the Batch service retries the task without limit. Resource files and - * application packages are only downloaded again if the task is retried on a - * new compute node. - * @member {boolean} [jobPreparationTask.waitForSuccess] If true and the Job - * Preparation task fails on a compute node, the Batch service retries the - * Job Preparation task up to its maximum retry count (as specified in the - * constraints element). If the task has still not completed successfully + * the Batch service retries the task without limit. + * @property {boolean} [jobPreparationTask.waitForSuccess] If true and the + * Job Preparation task fails on a compute node, the Batch service retries + * the Job Preparation task up to its maximum retry count (as specified in + * the constraints element). If the task has still not completed successfully * after all retries, then the Batch service will not schedule tasks of the * job to the compute node. The compute node remains active and eligible to * run tasks of other jobs. If false, the Batch service will not wait for the @@ -257,38 +256,38 @@ class CloudJob { * start executing on the compute node while the Job Preparation task is * still running; and even if the Job Preparation task fails, new tasks will * continue to be scheduled on the node. The default value is true. - * @member {object} [jobPreparationTask.userIdentity] If omitted, the task + * @property {object} [jobPreparationTask.userIdentity] If omitted, the task * runs as a non-administrative user unique to the task on Windows nodes, or - * a a non-administrative user unique to the pool on Linux nodes. - * @member {string} [jobPreparationTask.userIdentity.userName] The userName + * a non-administrative user unique to the pool on Linux nodes. + * @property {string} [jobPreparationTask.userIdentity.userName] The userName * and autoUser properties are mutually exclusive; you must specify one but * not both. - * @member {object} [jobPreparationTask.userIdentity.autoUser] The userName + * @property {object} [jobPreparationTask.userIdentity.autoUser] The userName * and autoUser properties are mutually exclusive; you must specify one but * not both. - * @member {string} [jobPreparationTask.userIdentity.autoUser.scope] The + * @property {string} [jobPreparationTask.userIdentity.autoUser.scope] The * default value is task. Possible values include: 'task', 'pool' - * @member {string} [jobPreparationTask.userIdentity.autoUser.elevationLevel] - * The default value is nonAdmin. Possible values include: 'nonAdmin', - * 'admin' - * @member {boolean} [jobPreparationTask.rerunOnNodeRebootAfterSuccess] The + * @property {string} + * [jobPreparationTask.userIdentity.autoUser.elevationLevel] The default + * value is nonAdmin. Possible values include: 'nonAdmin', 'admin' + * @property {boolean} [jobPreparationTask.rerunOnNodeRebootAfterSuccess] The * Job Preparation task is always rerun if a compute node is reimaged, or if * the Job Preparation task did not complete (e.g. because the reboot * occurred while the task was running). Therefore, you should always write a * Job Preparation task to be idempotent and to behave correctly if run * multiple times. The default value is true. - * @member {object} [jobReleaseTask] The Job Release task. The Job Release + * @property {object} [jobReleaseTask] The Job Release task. The Job Release * task is a special task run at the end of the job on each node that has run * any other task of the job. - * @member {string} [jobReleaseTask.id] The ID can contain any combination of - * alphanumeric characters including hyphens and underscores and cannot + * @property {string} [jobReleaseTask.id] The ID can contain any combination + * of alphanumeric characters including hyphens and underscores and cannot * contain more than 64 characters. If you do not specify this property, the * Batch service assigns a default value of 'jobrelease'. No other task in * the job can have the same ID as the Job Release task. If you try to submit * a task with the same id, the Batch service rejects the request with error * code TaskIdSameAsJobReleaseTask; if you are calling the REST API directly, * the HTTP status code is 409 (Conflict). - * @member {string} [jobReleaseTask.commandLine] The command line does not + * @property {string} [jobReleaseTask.commandLine] The command line does not * run under a shell, and therefore cannot take advantage of shell features * such as environment variable expansion. If you want to take advantage of * such features, you should invoke the shell in the command line, for @@ -297,58 +296,59 @@ class CloudJob { * path (relative to the task working directory), or use the Batch provided * environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [jobReleaseTask.containerSettings] When this is + * @property {object} [jobReleaseTask.containerSettings] When this is * specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR * (the root of Azure Batch directories on the node) are mapped into the * container, all task environment variables are mapped into the container, * and the task command line is executed in the container. - * @member {string} [jobReleaseTask.containerSettings.containerRunOptions] + * @property {string} [jobReleaseTask.containerSettings.containerRunOptions] * These additional options are supplied as arguments to the "docker create" * command, in addition to those controlled by the Batch Service. - * @member {string} [jobReleaseTask.containerSettings.imageName] This is the - * full image reference, as would be specified to "docker pull". If no tag is - * provided as part of the image name, the tag ":latest" is used as a + * @property {string} [jobReleaseTask.containerSettings.imageName] This is + * the full image reference, as would be specified to "docker pull". If no + * tag is provided as part of the image name, the tag ":latest" is used as a * default. - * @member {object} [jobReleaseTask.containerSettings.registry] This setting - * can be omitted if was already provided at pool creation. - * @member {string} + * @property {object} [jobReleaseTask.containerSettings.registry] This + * setting can be omitted if was already provided at pool creation. + * @property {string} * [jobReleaseTask.containerSettings.registry.registryServer] If omitted, the * default is "docker.io". - * @member {string} [jobReleaseTask.containerSettings.registry.userName] - * @member {string} [jobReleaseTask.containerSettings.registry.password] - * @member {array} [jobReleaseTask.resourceFiles] Files listed under this + * @property {string} [jobReleaseTask.containerSettings.registry.userName] + * @property {string} [jobReleaseTask.containerSettings.registry.password] + * @property {array} [jobReleaseTask.resourceFiles] Files listed under this * element are located in the task's working directory. - * @member {array} [jobReleaseTask.environmentSettings] - * @member {moment.duration} [jobReleaseTask.maxWallClockTime] - * @member {moment.duration} [jobReleaseTask.retentionTime] The default is - * infinite, i.e. the task directory will be retained until the compute node - * is removed or reimaged. - * @member {object} [jobReleaseTask.userIdentity] If omitted, the task runs + * @property {array} [jobReleaseTask.environmentSettings] + * @property {moment.duration} [jobReleaseTask.maxWallClockTime] + * @property {moment.duration} [jobReleaseTask.retentionTime] The default is + * 7 days, i.e. the task directory will be retained for 7 days unless the + * compute node is removed or the job is deleted. + * @property {object} [jobReleaseTask.userIdentity] If omitted, the task runs * as a non-administrative user unique to the task. - * @member {string} [jobReleaseTask.userIdentity.userName] The userName and + * @property {string} [jobReleaseTask.userIdentity.userName] The userName and * autoUser properties are mutually exclusive; you must specify one but not * both. - * @member {object} [jobReleaseTask.userIdentity.autoUser] The userName and + * @property {object} [jobReleaseTask.userIdentity.autoUser] The userName and * autoUser properties are mutually exclusive; you must specify one but not * both. - * @member {string} [jobReleaseTask.userIdentity.autoUser.scope] The default - * value is task. Possible values include: 'task', 'pool' - * @member {string} [jobReleaseTask.userIdentity.autoUser.elevationLevel] The - * default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {array} [commonEnvironmentSettings] The list of common environment - * variable settings. These environment variables are set for all tasks in - * the job (including the Job Manager, Job Preparation and Job Release - * tasks). Individual tasks can override an environment setting specified - * here by specifying the same setting name with a different value. - * @member {object} [poolInfo] The pool settings associated with the job. - * @member {string} [poolInfo.poolId] You must ensure that the pool + * @property {string} [jobReleaseTask.userIdentity.autoUser.scope] The + * default value is task. Possible values include: 'task', 'pool' + * @property {string} [jobReleaseTask.userIdentity.autoUser.elevationLevel] + * The default value is nonAdmin. Possible values include: 'nonAdmin', + * 'admin' + * @property {array} [commonEnvironmentSettings] The list of common + * environment variable settings. These environment variables are set for all + * tasks in the job (including the Job Manager, Job Preparation and Job + * Release tasks). Individual tasks can override an environment setting + * specified here by specifying the same setting name with a different value. + * @property {object} [poolInfo] The pool settings associated with the job. + * @property {string} [poolInfo.poolId] You must ensure that the pool * referenced by this property exists. If the pool does not exist at the time * the Batch service tries to schedule a job, no tasks for the job will run * until you create a pool with that id. Note that the Batch service will not * reject the job request; it will simply not run tasks until the pool * exists. You must specify either the pool ID or the auto pool * specification, but not both. - * @member {object} [poolInfo.autoPoolSpecification] If auto pool creation + * @property {object} [poolInfo.autoPoolSpecification] If auto pool creation * fails, the Batch service moves the job to a completed state, and the pool * creation error is set in the job's scheduling error property. The Batch * service manages the lifetime (both creation and, unless keepAlive is @@ -356,28 +356,28 @@ class CloudJob { * lifetime of the auto pool while the job is active will result in * unexpected behavior. You must specify either the pool ID or the auto pool * specification, but not both. - * @member {string} [poolInfo.autoPoolSpecification.autoPoolIdPrefix] The + * @property {string} [poolInfo.autoPoolSpecification.autoPoolIdPrefix] The * Batch service assigns each auto pool a unique identifier on creation. To * distinguish between pools created for different purposes, you can specify * this element to add a prefix to the ID that is assigned. The prefix can be * up to 20 characters long. - * @member {string} [poolInfo.autoPoolSpecification.poolLifetimeOption] + * @property {string} [poolInfo.autoPoolSpecification.poolLifetimeOption] * Possible values include: 'jobSchedule', 'job' - * @member {boolean} [poolInfo.autoPoolSpecification.keepAlive] If false, the - * Batch service deletes the pool once its lifetime (as determined by the + * @property {boolean} [poolInfo.autoPoolSpecification.keepAlive] If false, + * the Batch service deletes the pool once its lifetime (as determined by the * poolLifetimeOption setting) expires; that is, when the job or job schedule * completes. If true, the Batch service does not delete the pool * automatically. It is up to the user to delete auto pools created with this * option. - * @member {object} [poolInfo.autoPoolSpecification.pool] - * @member {string} [poolInfo.autoPoolSpecification.pool.displayName] The + * @property {object} [poolInfo.autoPoolSpecification.pool] + * @property {string} [poolInfo.autoPoolSpecification.pool.displayName] The * display name need not be unique and can contain any Unicode characters up * to a maximum length of 1024. - * @member {string} [poolInfo.autoPoolSpecification.pool.vmSize] For + * @property {string} [poolInfo.autoPoolSpecification.pool.vmSize] For * information about available sizes of virtual machines in pools, see Choose * a VM size for compute nodes in an Azure Batch pool * (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration] This * property must be specified if the pool needs to be created with Azure PaaS * VMs. This property and virtualMachineConfiguration are mutually exclusive @@ -386,7 +386,7 @@ class CloudJob { * directly, the HTTP status code is 400 (Bad Request). This property cannot * be specified if the Batch account was created with its poolAllocationMode * property set to 'UserSubscription'. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osFamily] * Possible values are: * 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. @@ -395,55 +395,39 @@ class CloudJob { * 5 - OS Family 5, equivalent to Windows Server 2016. For more information, * see Azure Guest OS Releases * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). - * @member {string} - * [poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] + * @property {string} + * [poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osVersion] * The default value is * which specifies the latest operating system version * for the specified OS family. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.currentOSVersion] - * This may differ from targetOSVersion if the pool state is Upgrading. In - * this case some virtual machines may be on the targetOSVersion and some may - * be on the currentOSVersion during the upgrade process. Once all virtual - * machines have upgraded, currentOSVersion is updated to be the same as - * targetOSVersion. - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration] This * property must be specified if the pool needs to be created with Azure IaaS * VMs. This property and cloudServiceConfiguration are mutually exclusive * and one of the properties must be specified. If neither is specified then * the Batch service returns an error; if you are calling the REST API * directly, the HTTP status code is 400 (Bad Request). - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference] - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.publisher] * For example, Canonical or MicrosoftWindowsServer. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.offer] * For example, UbuntuServer or WindowsServer. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.sku] * For example, 14.04.0-LTS or 2012-R2-Datacenter. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.version] * A value of 'latest' can be specified to select the latest version of an * image. If omitted, the default is 'latest'. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.virtualMachineImageId] * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as - * the Azure Batch account. For information about the firewall settings for - * the Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * @member {object} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * @member {string} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The default value for caching is readwrite. For information about the - * caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' - * @member {string} + * the Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. + * @property {string} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId] * The Batch node agent is a program that runs on each node in the pool, and * provides the command-and-control interface between the node and the Batch @@ -452,14 +436,14 @@ class CloudJob { * which matches the selected image reference. To get the list of supported * node agent SKUs along with their list of verified image references, see * the 'List supported node agent SKUs' operation. - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] - * This property must not be specified if the imageReference or osDisk - * property specifies a Linux OS image. - * @member {boolean} + * This property must not be specified if the imageReference property + * specifies a Linux OS image. + * @property {boolean} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] * If omitted, the default value is true. - * @member {array} + * @property {array} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.dataDisks] * This property must be specified if the compute nodes in the pool need to * have empty data disks attached to them. This cannot be updated. Each node @@ -471,7 +455,7 @@ class CloudJob { * https://docs.microsoft.com/en-us/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux * and * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.licenseType] * This only applies to images that contain the Windows operating system, and * should only be used when you hold valid on-premises licenses for the nodes @@ -480,106 +464,98 @@ class CloudJob { * * Windows_Server - The on-premises license is for Windows Server. * Windows_Client - The on-premises license is for Windows Client. - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration] * If specified, setup is performed on each node in the pool to allow tasks * to run in containers. All regular tasks and job manager tasks run on this * pool must specify the containerSettings property, and all other tasks may * specify it. - * @member {array} + * @property {array} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration.containerImageNames] * This is the full image reference, as would be specified to "docker pull". * An image will be sourced from the default Docker registry unless the image * is fully qualified with an alternative registry. - * @member {array} + * @property {array} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration.containerRegistries] * If any images must be downloaded from a private registry which requires * credentials, then those credentials must be provided here. - * @member {number} [poolInfo.autoPoolSpecification.pool.maxTasksPerNode] The - * default value is 1. The maximum value of this setting depends on the size - * of the compute nodes in the pool (the vmSize setting). - * @member {object} + * @property {number} [poolInfo.autoPoolSpecification.pool.maxTasksPerNode] + * The default value is 1. The maximum value of this setting depends on the + * size of the compute nodes in the pool (the vmSize setting). + * @property {object} * [poolInfo.autoPoolSpecification.pool.taskSchedulingPolicy] - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.taskSchedulingPolicy.nodeFillType] * Possible values include: 'spread', 'pack' - * @member {moment.duration} + * @property {moment.duration} * [poolInfo.autoPoolSpecification.pool.resizeTimeout] This timeout applies * only to manual scaling; it has no effect when enableAutoScale is set to * true. The default value is 15 minutes. The minimum value is 5 minutes. If * you specify a value less than 5 minutes, the Batch service rejects the * request with an error; if you are calling the REST API directly, the HTTP * status code is 400 (Bad Request). - * @member {number} + * @property {number} * [poolInfo.autoPoolSpecification.pool.targetDedicatedNodes] This property * must not be specified if enableAutoScale is set to true. If * enableAutoScale is set to false, then you must set either * targetDedicatedNodes, targetLowPriorityNodes, or both. - * @member {number} + * @property {number} * [poolInfo.autoPoolSpecification.pool.targetLowPriorityNodes] This property * must not be specified if enableAutoScale is set to true. If * enableAutoScale is set to false, then you must set either * targetDedicatedNodes, targetLowPriorityNodes, or both. - * @member {boolean} [poolInfo.autoPoolSpecification.pool.enableAutoScale] If - * false, at least one of targetDedicateNodes and targetLowPriorityNodes must - * be specified. If true, the autoScaleFormula element is required. The pool - * automatically resizes according to the formula. The default value is + * @property {boolean} [poolInfo.autoPoolSpecification.pool.enableAutoScale] + * If false, at least one of targetDedicateNodes and targetLowPriorityNodes + * must be specified. If true, the autoScaleFormula element is required. The + * pool automatically resizes according to the formula. The default value is * false. - * @member {string} [poolInfo.autoPoolSpecification.pool.autoScaleFormula] + * @property {string} [poolInfo.autoPoolSpecification.pool.autoScaleFormula] * This property must not be specified if enableAutoScale is set to false. It * is required if enableAutoScale is set to true. The formula is checked for * validity before the pool is created. If the formula is not valid, the * Batch service rejects the request with detailed error information. - * @member {moment.duration} + * @property {moment.duration} * [poolInfo.autoPoolSpecification.pool.autoScaleEvaluationInterval] The * default value is 15 minutes. The minimum and maximum value are 5 minutes * and 168 hours respectively. If you specify a value less than 5 minutes or * greater than 168 hours, the Batch service rejects the request with an * invalid property value error; if you are calling the REST API directly, * the HTTP status code is 400 (Bad Request). - * @member {boolean} + * @property {boolean} * [poolInfo.autoPoolSpecification.pool.enableInterNodeCommunication] * Enabling inter-node communication limits the maximum size of the pool due * to deployment restrictions on the nodes of the pool. This may result in * the pool not reaching its desired size. The default value is false. - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.networkConfiguration] - * @member {string} - * [poolInfo.autoPoolSpecification.pool.networkConfiguration.subnetId] The - * virtual network must be in the same region and subscription as the Azure - * Batch account. The specified subnet should have enough free IP addresses - * to accommodate the number of nodes in the pool. If the subnet doesn't have - * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must - * allow communication from the Azure Batch service to be able to schedule - * tasks on the compute nodes. This can be verified by checking if the - * specified VNet has any associated Network Security Groups (NSG). If - * communication to the compute nodes in the specified subnet is denied by an - * NSG, then the Batch service will set the state of the compute nodes to - * unusable. For pools created with virtualMachineConfiguration only ARM - * virtual networks ('Microsoft.Network/virtualNetworks') are supported, but - * for pools created with cloudServiceConfiguration both ARM and classic - * virtual networks are supported. If the specified VNet has any associated - * Network Security Groups (NSG), then a few reserved system ports must be - * enabled for inbound communication. For pools created with a virtual - * machine configuration, enable ports 29876 and 29877, as well as port 22 - * for Linux and port 3389 for Windows. For pools created with a cloud - * service configuration, enable ports 10100, 20100, and 30100. Also enable - * outbound connections to Azure Storage on port 443. For more details see: + * @property {string} + * [poolInfo.autoPoolSpecification.pool.networkConfiguration.subnetId] This + * is of the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. + * The virtual network must be in the same region and subscription as the + * Azure Batch account. The specified subnet should have enough free IP + * addresses to accommodate the number of nodes in the pool. If the subnet + * doesn't have enough free IP addresses, the pool will partially allocate + * compute nodes, and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks + * ('Microsoft.Network/virtualNetworks') are supported, but for pools created + * with cloudServiceConfiguration both ARM and classic virtual networks are + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration - * @member {object} + * @property {string} + * [poolInfo.autoPoolSpecification.pool.networkConfiguration.dynamicVNetAssignmentScope] + * Possible values include: 'none', 'job' + * @property {object} * [poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] * Pool endpoint configuration is only supported on pools with the * virtualMachineConfiguration property. - * @member {array} + * @property {array} * [poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration.inboundNATPools] * The maximum number of inbound NAT pools per Batch pool is 5. If the * maximum number of inbound NAT pools is exceeded the request fails with * HTTP status code 400. - * @member {object} [poolInfo.autoPoolSpecification.pool.startTask] - * @member {string} + * @property {object} [poolInfo.autoPoolSpecification.pool.startTask] + * @property {string} * [poolInfo.autoPoolSpecification.pool.startTask.commandLine] The command * line does not run under a shell, and therefore cannot take advantage of * shell features such as environment variable expansion. If you want to take @@ -589,56 +565,56 @@ class CloudJob { * use a relative path (relative to the task working directory), or use the * Batch provided environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings] When * this is specified, all directories recursively below the * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) * are mapped into the container, all task environment variables are mapped * into the container, and the task command line is executed in the * container. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.containerRunOptions] * These additional options are supplied as arguments to the "docker create" * command, in addition to those controlled by the Batch Service. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.imageName] * This is the full image reference, as would be specified to "docker pull". * If no tag is provided as part of the image name, the tag ":latest" is used * as a default. - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry] * This setting can be omitted if was already provided at pool creation. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.registryServer] * If omitted, the default is "docker.io". - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.userName] - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.password] - * @member {array} + * @property {array} * [poolInfo.autoPoolSpecification.pool.startTask.resourceFiles] Files listed * under this element are located in the task's working directory. - * @member {array} + * @property {array} * [poolInfo.autoPoolSpecification.pool.startTask.environmentSettings] - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity] If omitted, * the task runs as a non-administrative user unique to the task. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity.userName] The * userName and autoUser properties are mutually exclusive; you must specify * one but not both. - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser] The * userName and autoUser properties are mutually exclusive; you must specify * one but not both. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser.scope] * The default value is task. Possible values include: 'task', 'pool' - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser.elevationLevel] * The default value is nonAdmin. Possible values include: 'nonAdmin', * 'admin' - * @member {number} + * @property {number} * [poolInfo.autoPoolSpecification.pool.startTask.maxTaskRetryCount] The * Batch service retries a task if its exit code is nonzero. Note that this * value specifically controls the number of retries. The Batch service will @@ -647,7 +623,7 @@ class CloudJob { * initial try and 3 retries). If the maximum retry count is 0, the Batch * service does not retry the task. If the maximum retry count is -1, the * Batch service retries the task without limit. - * @member {boolean} + * @property {boolean} * [poolInfo.autoPoolSpecification.pool.startTask.waitForSuccess] If true and * the start task fails on a compute node, the Batch service retries the * start task up to its maximum retry count (maxTaskRetryCount). If the task @@ -659,7 +635,7 @@ class CloudJob { * node while the start task is still running; and even if the start task * fails, new tasks will continue to be scheduled on the node. The default is * false. - * @member {array} + * @property {array} * [poolInfo.autoPoolSpecification.pool.certificateReferences] For Windows * compute nodes, the Batch service installs the certificates to the * specified certificate store and location. For Linux compute nodes, the @@ -669,53 +645,64 @@ class CloudJob { * 'remoteUser', a 'certs' directory is created in the user's home directory * (e.g., /home/{user-name}/certs) and certificates are placed in that * directory. - * @member {array} + * @property {array} * [poolInfo.autoPoolSpecification.pool.applicationPackageReferences] - * @member {array} [poolInfo.autoPoolSpecification.pool.applicationLicenses] - * The list of application licenses must be a subset of available Batch - * service application licenses. If a license is requested which is not - * supported, pool creation will fail. The permitted licenses available on - * the pool are 'maya', 'vray', '3dsmax', 'arnold'. An additional charge - * applies for each application license added to the pool. - * @member {array} [poolInfo.autoPoolSpecification.pool.userAccounts] - * @member {array} [poolInfo.autoPoolSpecification.pool.metadata] The Batch + * @property {array} + * [poolInfo.autoPoolSpecification.pool.applicationLicenses] The list of + * application licenses must be a subset of available Batch service + * application licenses. If a license is requested which is not supported, + * pool creation will fail. The permitted licenses available on the pool are + * 'maya', 'vray', '3dsmax', 'arnold'. An additional charge applies for each + * application license added to the pool. + * @property {array} [poolInfo.autoPoolSpecification.pool.userAccounts] + * @property {array} [poolInfo.autoPoolSpecification.pool.metadata] The Batch * service does not assign any meaning to metadata; it is solely for the use * of user code. - * @member {string} [onAllTasksComplete] The action the Batch service should - * take when all tasks in the job are in the completed state. The default is - * noaction. Possible values include: 'noAction', 'terminateJob' - * @member {string} [onTaskFailure] The action the Batch service should take - * when any task in the job fails. A task is considered to have failed if has - * a failureInfo. A failureInfo is set if the task completes with a non-zero - * exit code after exhausting its retry count, or if there was an error - * starting the task, for example due to a resource file download error. The - * default is noaction. Possible values include: 'noAction', + * @property {string} [onAllTasksComplete] The action the Batch service + * should take when all tasks in the job are in the completed state. The + * default is noaction. Possible values include: 'noAction', 'terminateJob' + * @property {string} [onTaskFailure] The action the Batch service should + * take when any task in the job fails. A task is considered to have failed + * if has a failureInfo. A failureInfo is set if the task completes with a + * non-zero exit code after exhausting its retry count, or if there was an + * error starting the task, for example due to a resource file download + * error. The default is noaction. Possible values include: 'noAction', * 'performExitOptionsJobAction' - * @member {array} [metadata] A list of name-value pairs associated with the - * job as metadata. The Batch service does not assign any meaning to + * @property {object} [networkConfiguration] The network configuration for + * the job. + * @property {string} [networkConfiguration.subnetId] This is only supported + * for jobs running on VirtualMachineConfiguration pools. This is of the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. + * The virtual network must be in the same region and subscription as the + * Azure Batch account. The specified subnet should have enough free IP + * addresses to accommodate the number of nodes which will run tasks from the + * job. For more details, see + * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + * @property {array} [metadata] A list of name-value pairs associated with + * the job as metadata. The Batch service does not assign any meaning to * metadata; it is solely for the use of user code. - * @member {object} [executionInfo] The execution information for the job. - * @member {date} [executionInfo.startTime] This is the time at which the job - * was created. - * @member {date} [executionInfo.endTime] This property is set only if the + * @property {object} [executionInfo] The execution information for the job. + * @property {date} [executionInfo.startTime] This is the time at which the + * job was created. + * @property {date} [executionInfo.endTime] This property is set only if the * job is in the completed state. - * @member {string} [executionInfo.poolId] This element contains the actual + * @property {string} [executionInfo.poolId] This element contains the actual * pool where the job is assigned. When you get job details from the service, * they also contain a poolInfo element, which contains the pool * configuration data from when the job was added or updated. That poolInfo * element may also contain a poolId element. If it does, the two IDs are the * same. If it does not, it means the job ran on an auto pool, and this * property contains the ID of that auto pool. - * @member {object} [executionInfo.schedulingError] This property is not set - * if there was no error starting the job. - * @member {string} [executionInfo.schedulingError.category] Possible values - * include: 'userError', 'serverError' - * @member {string} [executionInfo.schedulingError.code] - * @member {string} [executionInfo.schedulingError.message] - * @member {array} [executionInfo.schedulingError.details] - * @member {string} [executionInfo.terminateReason] This property is set only - * if the job is in the completed state. If the Batch service terminates the - * job, it sets the reason as follows: JMComplete - the Job Manager task + * @property {object} [executionInfo.schedulingError] This property is not + * set if there was no error starting the job. + * @property {string} [executionInfo.schedulingError.category] Possible + * values include: 'userError', 'serverError' + * @property {string} [executionInfo.schedulingError.code] + * @property {string} [executionInfo.schedulingError.message] + * @property {array} [executionInfo.schedulingError.details] + * @property {string} [executionInfo.terminateReason] This property is set + * only if the job is in the completed state. If the Batch service terminates + * the job, it sets the reason as follows: JMComplete - the Job Manager task * completed, and killJobOnCompletion was set to true. MaxWallClockTimeExpiry * - the job reached its maxWallClockTime constraint. TerminateJobSchedule - * the job ran as part of a schedule, and the schedule terminated. @@ -725,30 +712,30 @@ class CloudJob { * task in the job failed with an exit condition that specified a jobAction * of terminatejob. Any other string is a user-defined reason specified in a * call to the 'Terminate a job' operation. - * @member {object} [stats] Resource usage statistics for the entire lifetime - * of the job. The statistics may not be immediately available. The Batch - * service performs periodic roll-up of statistics. The typical delay is - * about 30 minutes. - * @member {string} [stats.url] - * @member {date} [stats.startTime] - * @member {date} [stats.lastUpdateTime] - * @member {moment.duration} [stats.userCPUTime] - * @member {moment.duration} [stats.kernelCPUTime] - * @member {moment.duration} [stats.wallClockTime] The wall clock time is the - * elapsed time from when the task started running on a compute node to when - * it finished (or to the last time the statistics were updated, if the task - * had not finished by then). If a task was retried, this includes the wall - * clock time of all the task retries. - * @member {number} [stats.readIOps] - * @member {number} [stats.writeIOps] - * @member {number} [stats.readIOGiB] - * @member {number} [stats.writeIOGiB] - * @member {number} [stats.numSucceededTasks] A task completes successfully + * @property {object} [stats] Resource usage statistics for the entire + * lifetime of the job. The statistics may not be immediately available. The + * Batch service performs periodic roll-up of statistics. The typical delay + * is about 30 minutes. + * @property {string} [stats.url] + * @property {date} [stats.startTime] + * @property {date} [stats.lastUpdateTime] + * @property {moment.duration} [stats.userCPUTime] + * @property {moment.duration} [stats.kernelCPUTime] + * @property {moment.duration} [stats.wallClockTime] The wall clock time is + * the elapsed time from when the task started running on a compute node to + * when it finished (or to the last time the statistics were updated, if the + * task had not finished by then). If a task was retried, this includes the + * wall clock time of all the task retries. + * @property {number} [stats.readIOps] + * @property {number} [stats.writeIOps] + * @property {number} [stats.readIOGiB] + * @property {number} [stats.writeIOGiB] + * @property {number} [stats.numSucceededTasks] A task completes successfully * if it returns exit code 0. - * @member {number} [stats.numFailedTasks] A task fails if it exhausts its + * @property {number} [stats.numFailedTasks] A task fails if it exhausts its * maximum retry count without returning exit code 0. - * @member {number} [stats.numTaskRetries] - * @member {moment.duration} [stats.waitTime] The wait time for a task is + * @property {number} [stats.numTaskRetries] + * @property {moment.duration} [stats.waitTime] The wait time for a task is * defined as the elapsed time between the creation of the task and the start * of task execution. (If the task is retried due to failures, the wait time * is the time to the most recent task execution.) This value is only @@ -929,6 +916,14 @@ class CloudJob { allowedValues: [ 'noAction', 'performExitOptionsJobAction' ] } }, + networkConfiguration: { + required: false, + serializedName: 'networkConfiguration', + type: { + name: 'Composite', + className: 'JobNetworkConfiguration' + } + }, metadata: { required: false, serializedName: 'metadata', diff --git a/lib/services/batch/lib/models/cloudJobListPreparationAndReleaseTaskStatusResult.js b/lib/services/batch/lib/models/cloudJobListPreparationAndReleaseTaskStatusResult.js index c7622b60c3..8c65b93607 100644 --- a/lib/services/batch/lib/models/cloudJobListPreparationAndReleaseTaskStatusResult.js +++ b/lib/services/batch/lib/models/cloudJobListPreparationAndReleaseTaskStatusResult.js @@ -17,7 +17,7 @@ class CloudJobListPreparationAndReleaseTaskStatusResult extends Array { /** * Create a CloudJobListPreparationAndReleaseTaskStatusResult. - * @member {string} [odatanextLink] + * @property {string} [odatanextLink] */ constructor() { super(); diff --git a/lib/services/batch/lib/models/cloudJobListResult.js b/lib/services/batch/lib/models/cloudJobListResult.js index 62f3cf2e78..17692fde86 100644 --- a/lib/services/batch/lib/models/cloudJobListResult.js +++ b/lib/services/batch/lib/models/cloudJobListResult.js @@ -16,7 +16,7 @@ class CloudJobListResult extends Array { /** * Create a CloudJobListResult. - * @member {string} [odatanextLink] + * @property {string} [odatanextLink] */ constructor() { super(); diff --git a/lib/services/batch/lib/models/cloudJobSchedule.js b/lib/services/batch/lib/models/cloudJobSchedule.js index 9f94e078ec..c73c2f7dfb 100644 --- a/lib/services/batch/lib/models/cloudJobSchedule.js +++ b/lib/services/batch/lib/models/cloudJobSchedule.js @@ -18,40 +18,41 @@ class CloudJobSchedule { /** * Create a CloudJobSchedule. - * @member {string} [id] A string that uniquely identifies the schedule + * @property {string} [id] A string that uniquely identifies the schedule * within the account. - * @member {string} [displayName] The display name for the schedule. - * @member {string} [url] The URL of the job schedule. - * @member {string} [eTag] The ETag of the job schedule. This is an opaque + * @property {string} [displayName] The display name for the schedule. + * @property {string} [url] The URL of the job schedule. + * @property {string} [eTag] The ETag of the job schedule. This is an opaque * string. You can use it to detect whether the job schedule has changed * between requests. In particular, you can be pass the ETag with an Update * Job Schedule request to specify that your changes should take effect only * if nobody else has modified the schedule in the meantime. - * @member {date} [lastModified] The last modified time of the job schedule. - * This is the last time at which the schedule level data, such as the job - * specification or recurrence information, changed. It does not factor in - * job-level changes such as new jobs being created or jobs changing state. - * @member {date} [creationTime] The creation time of the job schedule. - * @member {string} [state] The current state of the job schedule. Possible + * @property {date} [lastModified] The last modified time of the job + * schedule. This is the last time at which the schedule level data, such as + * the job specification or recurrence information, changed. It does not + * factor in job-level changes such as new jobs being created or jobs + * changing state. + * @property {date} [creationTime] The creation time of the job schedule. + * @property {string} [state] The current state of the job schedule. Possible * values include: 'active', 'completed', 'disabled', 'terminating', * 'deleting' - * @member {date} [stateTransitionTime] The time at which the job schedule + * @property {date} [stateTransitionTime] The time at which the job schedule * entered the current state. - * @member {string} [previousState] The previous state of the job schedule. + * @property {string} [previousState] The previous state of the job schedule. * This property is not present if the job schedule is in its initial active * state. Possible values include: 'active', 'completed', 'disabled', * 'terminating', 'deleting' - * @member {date} [previousStateTransitionTime] The time at which the job + * @property {date} [previousStateTransitionTime] The time at which the job * schedule entered its previous state. This property is not present if the * job schedule is in its initial active state. - * @member {object} [schedule] The schedule according to which jobs will be + * @property {object} [schedule] The schedule according to which jobs will be * created. - * @member {date} [schedule.doNotRunUntil] If you do not specify a + * @property {date} [schedule.doNotRunUntil] If you do not specify a * doNotRunUntil time, the schedule becomes ready to create jobs immediately. - * @member {date} [schedule.doNotRunAfter] If you do not specify a + * @property {date} [schedule.doNotRunAfter] If you do not specify a * doNotRunAfter time, and you are creating a recurring job schedule, the job * schedule will remain active until you explicitly terminate it. - * @member {moment.duration} [schedule.startWindow] If a job is not created + * @property {moment.duration} [schedule.startWindow] If a job is not created * within the startWindow interval, then the 'opportunity' is lost; no job * will be created until the next recurrence of the schedule. If the schedule * is recurring, and the startWindow is longer than the recurrence interval, @@ -61,7 +62,7 @@ class CloudJobSchedule { * minute. If you specify a lower value, the Batch service rejects the * schedule with an error; if you are calling the REST API directly, the HTTP * status code is 400 (Bad Request). - * @member {moment.duration} [schedule.recurrenceInterval] Because a job + * @property {moment.duration} [schedule.recurrenceInterval] Because a job * schedule can have at most one active job under it at any given time, if it * is time to create a new job under a job schedule, but the previous job is * still running, the Batch service will not create the new job until the @@ -77,34 +78,46 @@ class CloudJobSchedule { * minute. If you specify a lower value, the Batch service rejects the * schedule with an error; if you are calling the REST API directly, the HTTP * status code is 400 (Bad Request). - * @member {object} [jobSpecification] The details of the jobs to be created - * on this schedule. - * @member {number} [jobSpecification.priority] Priority values can range + * @property {object} [jobSpecification] The details of the jobs to be + * created on this schedule. + * @property {number} [jobSpecification.priority] Priority values can range * from -1000 to 1000, with -1000 being the lowest priority and 1000 being * the highest priority. The default value is 0. This priority is used as the * default for all jobs under the job schedule. You can update a job's * priority after it has been created using by using the update job API. - * @member {string} [jobSpecification.displayName] The name need not be + * @property {string} [jobSpecification.displayName] The name need not be * unique and can contain any Unicode characters up to a maximum length of * 1024. - * @member {boolean} [jobSpecification.usesTaskDependencies] - * @member {string} [jobSpecification.onAllTasksComplete] Note that if a job - * contains no tasks, then all tasks are considered complete. This option is - * therefore most commonly used with a Job Manager task; if you want to use - * automatic job termination without a Job Manager, you should initially set - * onAllTasksComplete to noaction and update the job properties to set + * @property {boolean} [jobSpecification.usesTaskDependencies] + * @property {string} [jobSpecification.onAllTasksComplete] Note that if a + * job contains no tasks, then all tasks are considered complete. This option + * is therefore most commonly used with a Job Manager task; if you want to + * use automatic job termination without a Job Manager, you should initially + * set onAllTasksComplete to noaction and update the job properties to set * onAllTasksComplete to terminatejob once you have finished adding tasks. * The default is noaction. Possible values include: 'noAction', * 'terminateJob' - * @member {string} [jobSpecification.onTaskFailure] The default is noaction. - * Possible values include: 'noAction', 'performExitOptionsJobAction' - * @member {object} [jobSpecification.constraints] - * @member {moment.duration} [jobSpecification.constraints.maxWallClockTime] - * If the job does not complete within the time limit, the Batch service - * terminates it and any tasks that are still running. In this case, the - * termination reason will be MaxWallClockTimeExpiry. If this property is not - * specified, there is no time limit on how long the job may run. - * @member {number} [jobSpecification.constraints.maxTaskRetryCount] Note + * @property {string} [jobSpecification.onTaskFailure] The default is + * noaction. Possible values include: 'noAction', + * 'performExitOptionsJobAction' + * @property {object} [jobSpecification.networkConfiguration] + * @property {string} [jobSpecification.networkConfiguration.subnetId] This + * is only supported for jobs running on VirtualMachineConfiguration pools. + * This is of the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. + * The virtual network must be in the same region and subscription as the + * Azure Batch account. The specified subnet should have enough free IP + * addresses to accommodate the number of nodes which will run tasks from the + * job. For more details, see + * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + * @property {object} [jobSpecification.constraints] + * @property {moment.duration} + * [jobSpecification.constraints.maxWallClockTime] If the job does not + * complete within the time limit, the Batch service terminates it and any + * tasks that are still running. In this case, the termination reason will be + * MaxWallClockTimeExpiry. If this property is not specified, there is no + * time limit on how long the job may run. + * @property {number} [jobSpecification.constraints.maxTaskRetryCount] Note * that this value specifically controls the number of retries. The Batch * service will try each task once, and may then retry up to this limit. For * example, if the maximum retry count is 3, Batch tries a task up to 4 times @@ -112,27 +125,27 @@ class CloudJobSchedule { * Batch service does not retry tasks. If the maximum retry count is -1, the * Batch service retries tasks without limit. The default value is 0 (no * retries). - * @member {object} [jobSpecification.jobManagerTask] If the job does not + * @property {object} [jobSpecification.jobManagerTask] If the job does not * specify a Job Manager task, the user must explicitly add tasks to the job * using the Task API. If the job does specify a Job Manager task, the Batch * service creates the Job Manager task when the job is created, and will try * to schedule the Job Manager task before scheduling other tasks in the job. - * @member {string} [jobSpecification.jobManagerTask.id] The ID can contain + * @property {string} [jobSpecification.jobManagerTask.id] The ID can contain * any combination of alphanumeric characters including hyphens and * underscores and cannot contain more than 64 characters. - * @member {string} [jobSpecification.jobManagerTask.displayName] It need not - * be unique and can contain any Unicode characters up to a maximum length of - * 1024. - * @member {string} [jobSpecification.jobManagerTask.commandLine] The command - * line does not run under a shell, and therefore cannot take advantage of - * shell features such as environment variable expansion. If you want to take - * advantage of such features, you should invoke the shell in the command - * line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c - * MyCommand" in Linux. If the command line refers to file paths, it should - * use a relative path (relative to the task working directory), or use the - * Batch provided environment variable + * @property {string} [jobSpecification.jobManagerTask.displayName] It need + * not be unique and can contain any Unicode characters up to a maximum + * length of 1024. + * @property {string} [jobSpecification.jobManagerTask.commandLine] The + * command line does not run under a shell, and therefore cannot take + * advantage of shell features such as environment variable expansion. If you + * want to take advantage of such features, you should invoke the shell in + * the command line, for example using "cmd /c MyCommand" in Windows or + * "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, + * it should use a relative path (relative to the task working directory), or + * use the Batch provided environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [jobSpecification.jobManagerTask.containerSettings] If + * @property {object} [jobSpecification.jobManagerTask.containerSettings] If * the pool that will run this task has containerConfiguration set, this must * be set as well. If the pool that will run this task doesn't have * containerConfiguration set, this must not be set. When this is specified, @@ -140,45 +153,45 @@ class CloudJobSchedule { * Azure Batch directories on the node) are mapped into the container, all * task environment variables are mapped into the container, and the task * command line is executed in the container. - * @member {string} + * @property {string} * [jobSpecification.jobManagerTask.containerSettings.containerRunOptions] * These additional options are supplied as arguments to the "docker create" * command, in addition to those controlled by the Batch Service. - * @member {string} + * @property {string} * [jobSpecification.jobManagerTask.containerSettings.imageName] This is the * full image reference, as would be specified to "docker pull". If no tag is * provided as part of the image name, the tag ":latest" is used as a * default. - * @member {object} + * @property {object} * [jobSpecification.jobManagerTask.containerSettings.registry] This setting * can be omitted if was already provided at pool creation. - * @member {string} + * @property {string} * [jobSpecification.jobManagerTask.containerSettings.registry.registryServer] * If omitted, the default is "docker.io". - * @member {string} + * @property {string} * [jobSpecification.jobManagerTask.containerSettings.registry.userName] - * @member {string} + * @property {string} * [jobSpecification.jobManagerTask.containerSettings.registry.password] - * @member {array} [jobSpecification.jobManagerTask.resourceFiles] Files + * @property {array} [jobSpecification.jobManagerTask.resourceFiles] Files * listed under this element are located in the task's working directory. * There is a maximum size for the list of resource files. When the max size * is exceeded, the request will fail and the response error code will be * RequestEntityTooLarge. If this occurs, the collection of ResourceFiles * must be reduced in size. This can be achieved using .zip files, * Application Packages, or Docker Containers. - * @member {array} [jobSpecification.jobManagerTask.outputFiles] For + * @property {array} [jobSpecification.jobManagerTask.outputFiles] For * multi-instance tasks, the files will only be uploaded from the compute * node on which the primary task is executed. - * @member {array} [jobSpecification.jobManagerTask.environmentSettings] - * @member {object} [jobSpecification.jobManagerTask.constraints] - * @member {moment.duration} + * @property {array} [jobSpecification.jobManagerTask.environmentSettings] + * @property {object} [jobSpecification.jobManagerTask.constraints] + * @property {moment.duration} * [jobSpecification.jobManagerTask.constraints.maxWallClockTime] If this is * not specified, there is no time limit on how long the task may run. - * @member {moment.duration} + * @property {moment.duration} * [jobSpecification.jobManagerTask.constraints.retentionTime] The default is - * infinite, i.e. the task directory will be retained until the compute node - * is removed or reimaged. - * @member {number} + * 7 days, i.e. the task directory will be retained for 7 days unless the + * compute node is removed or the job is deleted. + * @property {number} * [jobSpecification.jobManagerTask.constraints.maxTaskRetryCount] Note that * this value specifically controls the number of retries for the task * executable due to a nonzero exit code. The Batch service will try the task @@ -186,14 +199,12 @@ class CloudJobSchedule { * retry count is 3, Batch tries the task up to 4 times (one initial try and * 3 retries). If the maximum retry count is 0, the Batch service does not * retry the task after the first attempt. If the maximum retry count is -1, - * the Batch service retries the task without limit. Resource files and - * application packages are only downloaded again if the task is retried on a - * new compute node. - * @member {boolean} [jobSpecification.jobManagerTask.killJobOnCompletion] If - * true, when the Job Manager task completes, the Batch service marks the job - * as complete. If any tasks are still running at this time (other than Job - * Release), those tasks are terminated. If false, the completion of the Job - * Manager task does not affect the job status. In this case, you should + * the Batch service retries the task without limit. + * @property {boolean} [jobSpecification.jobManagerTask.killJobOnCompletion] + * If true, when the Job Manager task completes, the Batch service marks the + * job as complete. If any tasks are still running at this time (other than + * Job Release), those tasks are terminated. If false, the completion of the + * Job Manager task does not affect the job status. In this case, you should * either use the onAllTasksComplete attribute to terminate the job, or have * a client or user terminate the job explicitly. An example of this is if * the Job Manager creates a set of tasks but then takes no further role in @@ -202,27 +213,27 @@ class CloudJobSchedule { * and using the Job Manager task only to create the tasks for the job (not * to monitor progress), then it is important to set killJobOnCompletion to * false. - * @member {object} [jobSpecification.jobManagerTask.userIdentity] If + * @property {object} [jobSpecification.jobManagerTask.userIdentity] If * omitted, the task runs as a non-administrative user unique to the task. - * @member {string} [jobSpecification.jobManagerTask.userIdentity.userName] + * @property {string} [jobSpecification.jobManagerTask.userIdentity.userName] * The userName and autoUser properties are mutually exclusive; you must * specify one but not both. - * @member {object} [jobSpecification.jobManagerTask.userIdentity.autoUser] + * @property {object} [jobSpecification.jobManagerTask.userIdentity.autoUser] * The userName and autoUser properties are mutually exclusive; you must * specify one but not both. - * @member {string} + * @property {string} * [jobSpecification.jobManagerTask.userIdentity.autoUser.scope] The default * value is task. Possible values include: 'task', 'pool' - * @member {string} + * @property {string} * [jobSpecification.jobManagerTask.userIdentity.autoUser.elevationLevel] The * default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {boolean} [jobSpecification.jobManagerTask.runExclusive] If true, - * no other tasks will run on the same compute node for as long as the Job - * Manager is running. If false, other tasks can run simultaneously with the - * Job Manager on a compute node. The Job Manager task counts normally + * @property {boolean} [jobSpecification.jobManagerTask.runExclusive] If + * true, no other tasks will run on the same compute node for as long as the + * Job Manager is running. If false, other tasks can run simultaneously with + * the Job Manager on a compute node. The Job Manager task counts normally * against the node's concurrent task limit, so this is only relevant if the * node allows multiple concurrent tasks. The default value is true. - * @member {array} + * @property {array} * [jobSpecification.jobManagerTask.applicationPackageReferences] Application * packages are downloaded and deployed to a shared directory, not the task * working directory. Therefore, if a referenced package is already on the @@ -230,7 +241,7 @@ class CloudJobSchedule { * existing copy on the compute node is used. If a referenced application * package cannot be installed, for example because the package has been * deleted or because download failed, the task fails. - * @member {object} + * @property {object} * [jobSpecification.jobManagerTask.authenticationTokenSettings] If this * property is set, the Batch service provides the task with an * authentication token which can be used to authenticate Batch service @@ -239,18 +250,19 @@ class CloudJobSchedule { * that the task can carry out using the token depend on the settings. For * example, a task can request job permissions in order to add other tasks to * the job, or check the status of the job or of other tasks under the job. - * @member {array} + * @property {array} * [jobSpecification.jobManagerTask.authenticationTokenSettings.access] The * authentication token grants access to a limited set of Batch service * operations. Currently the only supported value for the access property is * 'job', which grants access to all operations related to the job which * contains the task. - * @member {boolean} [jobSpecification.jobManagerTask.allowLowPriorityNode] + * @property {boolean} [jobSpecification.jobManagerTask.allowLowPriorityNode] * The default value is true. - * @member {object} [jobSpecification.jobPreparationTask] If a job has a Job - * Preparation task, the Batch service will run the Job Preparation task on a - * compute node before starting any tasks of that job on that compute node. - * @member {string} [jobSpecification.jobPreparationTask.id] The ID can + * @property {object} [jobSpecification.jobPreparationTask] If a job has a + * Job Preparation task, the Batch service will run the Job Preparation task + * on a compute node before starting any tasks of that job on that compute + * node. + * @property {string} [jobSpecification.jobPreparationTask.id] The ID can * contain any combination of alphanumeric characters including hyphens and * underscores and cannot contain more than 64 characters. If you do not * specify this property, the Batch service assigns a default value of @@ -259,7 +271,7 @@ class CloudJobSchedule { * service rejects the request with error code * TaskIdSameAsJobPreparationTask; if you are calling the REST API directly, * the HTTP status code is 409 (Conflict). - * @member {string} [jobSpecification.jobPreparationTask.commandLine] The + * @property {string} [jobSpecification.jobPreparationTask.commandLine] The * command line does not run under a shell, and therefore cannot take * advantage of shell features such as environment variable expansion. If you * want to take advantage of such features, you should invoke the shell in @@ -268,48 +280,49 @@ class CloudJobSchedule { * it should use a relative path (relative to the task working directory), or * use the Batch provided environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [jobSpecification.jobPreparationTask.containerSettings] + * @property {object} [jobSpecification.jobPreparationTask.containerSettings] * When this is specified, all directories recursively below the * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) * are mapped into the container, all task environment variables are mapped * into the container, and the task command line is executed in the * container. - * @member {string} + * @property {string} * [jobSpecification.jobPreparationTask.containerSettings.containerRunOptions] * These additional options are supplied as arguments to the "docker create" * command, in addition to those controlled by the Batch Service. - * @member {string} + * @property {string} * [jobSpecification.jobPreparationTask.containerSettings.imageName] This is * the full image reference, as would be specified to "docker pull". If no * tag is provided as part of the image name, the tag ":latest" is used as a * default. - * @member {object} + * @property {object} * [jobSpecification.jobPreparationTask.containerSettings.registry] This * setting can be omitted if was already provided at pool creation. - * @member {string} + * @property {string} * [jobSpecification.jobPreparationTask.containerSettings.registry.registryServer] * If omitted, the default is "docker.io". - * @member {string} + * @property {string} * [jobSpecification.jobPreparationTask.containerSettings.registry.userName] - * @member {string} + * @property {string} * [jobSpecification.jobPreparationTask.containerSettings.registry.password] - * @member {array} [jobSpecification.jobPreparationTask.resourceFiles] Files - * listed under this element are located in the task's working directory. - * There is a maximum size for the list of resource files. When the max size - * is exceeded, the request will fail and the response error code will be - * RequestEntityTooLarge. If this occurs, the collection of ResourceFiles - * must be reduced in size. This can be achieved using .zip files, - * Application Packages, or Docker Containers. - * @member {array} [jobSpecification.jobPreparationTask.environmentSettings] - * @member {object} [jobSpecification.jobPreparationTask.constraints] - * @member {moment.duration} + * @property {array} [jobSpecification.jobPreparationTask.resourceFiles] + * Files listed under this element are located in the task's working + * directory. There is a maximum size for the list of resource files. When + * the max size is exceeded, the request will fail and the response error + * code will be RequestEntityTooLarge. If this occurs, the collection of + * ResourceFiles must be reduced in size. This can be achieved using .zip + * files, Application Packages, or Docker Containers. + * @property {array} + * [jobSpecification.jobPreparationTask.environmentSettings] + * @property {object} [jobSpecification.jobPreparationTask.constraints] + * @property {moment.duration} * [jobSpecification.jobPreparationTask.constraints.maxWallClockTime] If this * is not specified, there is no time limit on how long the task may run. - * @member {moment.duration} + * @property {moment.duration} * [jobSpecification.jobPreparationTask.constraints.retentionTime] The - * default is infinite, i.e. the task directory will be retained until the - * compute node is removed or reimaged. - * @member {number} + * default is 7 days, i.e. the task directory will be retained for 7 days + * unless the compute node is removed or the job is deleted. + * @property {number} * [jobSpecification.jobPreparationTask.constraints.maxTaskRetryCount] Note * that this value specifically controls the number of retries for the task * executable due to a nonzero exit code. The Batch service will try the task @@ -317,11 +330,9 @@ class CloudJobSchedule { * retry count is 3, Batch tries the task up to 4 times (one initial try and * 3 retries). If the maximum retry count is 0, the Batch service does not * retry the task after the first attempt. If the maximum retry count is -1, - * the Batch service retries the task without limit. Resource files and - * application packages are only downloaded again if the task is retried on a - * new compute node. - * @member {boolean} [jobSpecification.jobPreparationTask.waitForSuccess] If - * true and the Job Preparation task fails on a compute node, the Batch + * the Batch service retries the task without limit. + * @property {boolean} [jobSpecification.jobPreparationTask.waitForSuccess] + * If true and the Job Preparation task fails on a compute node, the Batch * service retries the Job Preparation task up to its maximum retry count (as * specified in the constraints element). If the task has still not completed * successfully after all retries, then the Batch service will not schedule @@ -332,40 +343,40 @@ class CloudJobSchedule { * Preparation task is still running; and even if the Job Preparation task * fails, new tasks will continue to be scheduled on the node. The default * value is true. - * @member {object} [jobSpecification.jobPreparationTask.userIdentity] If + * @property {object} [jobSpecification.jobPreparationTask.userIdentity] If * omitted, the task runs as a non-administrative user unique to the task on - * Windows nodes, or a a non-administrative user unique to the pool on Linux + * Windows nodes, or a non-administrative user unique to the pool on Linux * nodes. - * @member {string} + * @property {string} * [jobSpecification.jobPreparationTask.userIdentity.userName] The userName * and autoUser properties are mutually exclusive; you must specify one but * not both. - * @member {object} + * @property {object} * [jobSpecification.jobPreparationTask.userIdentity.autoUser] The userName * and autoUser properties are mutually exclusive; you must specify one but * not both. - * @member {string} + * @property {string} * [jobSpecification.jobPreparationTask.userIdentity.autoUser.scope] The * default value is task. Possible values include: 'task', 'pool' - * @member {string} + * @property {string} * [jobSpecification.jobPreparationTask.userIdentity.autoUser.elevationLevel] * The default value is nonAdmin. Possible values include: 'nonAdmin', * 'admin' - * @member {boolean} + * @property {boolean} * [jobSpecification.jobPreparationTask.rerunOnNodeRebootAfterSuccess] The * Job Preparation task is always rerun if a compute node is reimaged, or if * the Job Preparation task did not complete (e.g. because the reboot * occurred while the task was running). Therefore, you should always write a * Job Preparation task to be idempotent and to behave correctly if run * multiple times. The default value is true. - * @member {object} [jobSpecification.jobReleaseTask] The primary purpose of - * the Job Release task is to undo changes to compute nodes made by the Job - * Preparation task. Example activities include deleting local files, or + * @property {object} [jobSpecification.jobReleaseTask] The primary purpose + * of the Job Release task is to undo changes to compute nodes made by the + * Job Preparation task. Example activities include deleting local files, or * shutting down services that were started as part of job preparation. A Job * Release task cannot be specified without also specifying a Job Preparation * task for the job. The Batch service runs the Job Release task on the * compute nodes that have run the Job Preparation task. - * @member {string} [jobSpecification.jobReleaseTask.id] The ID can contain + * @property {string} [jobSpecification.jobReleaseTask.id] The ID can contain * any combination of alphanumeric characters including hyphens and * underscores and cannot contain more than 64 characters. If you do not * specify this property, the Batch service assigns a default value of @@ -374,108 +385,109 @@ class CloudJobSchedule { * service rejects the request with error code TaskIdSameAsJobReleaseTask; if * you are calling the REST API directly, the HTTP status code is 409 * (Conflict). - * @member {string} [jobSpecification.jobReleaseTask.commandLine] The command - * line does not run under a shell, and therefore cannot take advantage of - * shell features such as environment variable expansion. If you want to take - * advantage of such features, you should invoke the shell in the command - * line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c - * MyCommand" in Linux. If the command line refers to file paths, it should - * use a relative path (relative to the task working directory), or use the - * Batch provided environment variable + * @property {string} [jobSpecification.jobReleaseTask.commandLine] The + * command line does not run under a shell, and therefore cannot take + * advantage of shell features such as environment variable expansion. If you + * want to take advantage of such features, you should invoke the shell in + * the command line, for example using "cmd /c MyCommand" in Windows or + * "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, + * it should use a relative path (relative to the task working directory), or + * use the Batch provided environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [jobSpecification.jobReleaseTask.containerSettings] When - * this is specified, all directories recursively below the + * @property {object} [jobSpecification.jobReleaseTask.containerSettings] + * When this is specified, all directories recursively below the * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) * are mapped into the container, all task environment variables are mapped * into the container, and the task command line is executed in the * container. - * @member {string} + * @property {string} * [jobSpecification.jobReleaseTask.containerSettings.containerRunOptions] * These additional options are supplied as arguments to the "docker create" * command, in addition to those controlled by the Batch Service. - * @member {string} + * @property {string} * [jobSpecification.jobReleaseTask.containerSettings.imageName] This is the * full image reference, as would be specified to "docker pull". If no tag is * provided as part of the image name, the tag ":latest" is used as a * default. - * @member {object} + * @property {object} * [jobSpecification.jobReleaseTask.containerSettings.registry] This setting * can be omitted if was already provided at pool creation. - * @member {string} + * @property {string} * [jobSpecification.jobReleaseTask.containerSettings.registry.registryServer] * If omitted, the default is "docker.io". - * @member {string} + * @property {string} * [jobSpecification.jobReleaseTask.containerSettings.registry.userName] - * @member {string} + * @property {string} * [jobSpecification.jobReleaseTask.containerSettings.registry.password] - * @member {array} [jobSpecification.jobReleaseTask.resourceFiles] Files + * @property {array} [jobSpecification.jobReleaseTask.resourceFiles] Files * listed under this element are located in the task's working directory. - * @member {array} [jobSpecification.jobReleaseTask.environmentSettings] - * @member {moment.duration} + * @property {array} [jobSpecification.jobReleaseTask.environmentSettings] + * @property {moment.duration} * [jobSpecification.jobReleaseTask.maxWallClockTime] - * @member {moment.duration} [jobSpecification.jobReleaseTask.retentionTime] - * The default is infinite, i.e. the task directory will be retained until - * the compute node is removed or reimaged. - * @member {object} [jobSpecification.jobReleaseTask.userIdentity] If + * @property {moment.duration} + * [jobSpecification.jobReleaseTask.retentionTime] The default is 7 days, + * i.e. the task directory will be retained for 7 days unless the compute + * node is removed or the job is deleted. + * @property {object} [jobSpecification.jobReleaseTask.userIdentity] If * omitted, the task runs as a non-administrative user unique to the task. - * @member {string} [jobSpecification.jobReleaseTask.userIdentity.userName] + * @property {string} [jobSpecification.jobReleaseTask.userIdentity.userName] * The userName and autoUser properties are mutually exclusive; you must * specify one but not both. - * @member {object} [jobSpecification.jobReleaseTask.userIdentity.autoUser] + * @property {object} [jobSpecification.jobReleaseTask.userIdentity.autoUser] * The userName and autoUser properties are mutually exclusive; you must * specify one but not both. - * @member {string} + * @property {string} * [jobSpecification.jobReleaseTask.userIdentity.autoUser.scope] The default * value is task. Possible values include: 'task', 'pool' - * @member {string} + * @property {string} * [jobSpecification.jobReleaseTask.userIdentity.autoUser.elevationLevel] The * default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {array} [jobSpecification.commonEnvironmentSettings] Individual + * @property {array} [jobSpecification.commonEnvironmentSettings] Individual * tasks can override an environment setting specified here by specifying the * same setting name with a different value. - * @member {object} [jobSpecification.poolInfo] - * @member {string} [jobSpecification.poolInfo.poolId] You must ensure that + * @property {object} [jobSpecification.poolInfo] + * @property {string} [jobSpecification.poolInfo.poolId] You must ensure that * the pool referenced by this property exists. If the pool does not exist at * the time the Batch service tries to schedule a job, no tasks for the job * will run until you create a pool with that id. Note that the Batch service * will not reject the job request; it will simply not run tasks until the * pool exists. You must specify either the pool ID or the auto pool * specification, but not both. - * @member {object} [jobSpecification.poolInfo.autoPoolSpecification] If auto - * pool creation fails, the Batch service moves the job to a completed state, - * and the pool creation error is set in the job's scheduling error property. - * The Batch service manages the lifetime (both creation and, unless - * keepAlive is specified, deletion) of the auto pool. Any user actions that - * affect the lifetime of the auto pool while the job is active will result - * in unexpected behavior. You must specify either the pool ID or the auto - * pool specification, but not both. - * @member {string} + * @property {object} [jobSpecification.poolInfo.autoPoolSpecification] If + * auto pool creation fails, the Batch service moves the job to a completed + * state, and the pool creation error is set in the job's scheduling error + * property. The Batch service manages the lifetime (both creation and, + * unless keepAlive is specified, deletion) of the auto pool. Any user + * actions that affect the lifetime of the auto pool while the job is active + * will result in unexpected behavior. You must specify either the pool ID or + * the auto pool specification, but not both. + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.autoPoolIdPrefix] The * Batch service assigns each auto pool a unique identifier on creation. To * distinguish between pools created for different purposes, you can specify * this element to add a prefix to the ID that is assigned. The prefix can be * up to 20 characters long. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.poolLifetimeOption] * Possible values include: 'jobSchedule', 'job' - * @member {boolean} + * @property {boolean} * [jobSpecification.poolInfo.autoPoolSpecification.keepAlive] If false, the * Batch service deletes the pool once its lifetime (as determined by the * poolLifetimeOption setting) expires; that is, when the job or job schedule * completes. If true, the Batch service does not delete the pool * automatically. It is up to the user to delete auto pools created with this * option. - * @member {object} [jobSpecification.poolInfo.autoPoolSpecification.pool] - * @member {string} + * @property {object} [jobSpecification.poolInfo.autoPoolSpecification.pool] + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.displayName] The * display name need not be unique and can contain any Unicode characters up * to a maximum length of 1024. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.vmSize] For * information about available sizes of virtual machines in pools, see Choose * a VM size for compute nodes in an Azure Batch pool * (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration] * This property must be specified if the pool needs to be created with Azure * PaaS VMs. This property and virtualMachineConfiguration are mutually @@ -484,7 +496,7 @@ class CloudJobSchedule { * REST API directly, the HTTP status code is 400 (Bad Request). This * property cannot be specified if the Batch account was created with its * poolAllocationMode property set to 'UserSubscription'. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osFamily] * Possible values are: * 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. @@ -493,55 +505,39 @@ class CloudJobSchedule { * 5 - OS Family 5, equivalent to Windows Server 2016. For more information, * see Azure Guest OS Releases * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] + * @property {string} + * [jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osVersion] * The default value is * which specifies the latest operating system version * for the specified OS family. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.currentOSVersion] - * This may differ from targetOSVersion if the pool state is Upgrading. In - * this case some virtual machines may be on the targetOSVersion and some may - * be on the currentOSVersion during the upgrade process. Once all virtual - * machines have upgraded, currentOSVersion is updated to be the same as - * targetOSVersion. - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration] * This property must be specified if the pool needs to be created with Azure * IaaS VMs. This property and cloudServiceConfiguration are mutually * exclusive and one of the properties must be specified. If neither is * specified then the Batch service returns an error; if you are calling the * REST API directly, the HTTP status code is 400 (Bad Request). - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference] - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.publisher] * For example, Canonical or MicrosoftWindowsServer. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.offer] * For example, UbuntuServer or WindowsServer. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.sku] * For example, 14.04.0-LTS or 2012-R2-Datacenter. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.version] * A value of 'latest' can be specified to select the latest version of an * image. If omitted, the default is 'latest'. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.virtualMachineImageId] * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as - * the Azure Batch account. For information about the firewall settings for - * the Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The default value for caching is readwrite. For information about the - * caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' - * @member {string} + * the Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId] * The Batch node agent is a program that runs on each node in the pool, and * provides the command-and-control interface between the node and the Batch @@ -550,14 +546,14 @@ class CloudJobSchedule { * which matches the selected image reference. To get the list of supported * node agent SKUs along with their list of verified image references, see * the 'List supported node agent SKUs' operation. - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] - * This property must not be specified if the imageReference or osDisk - * property specifies a Linux OS image. - * @member {boolean} + * This property must not be specified if the imageReference property + * specifies a Linux OS image. + * @property {boolean} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] * If omitted, the default value is true. - * @member {array} + * @property {array} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.dataDisks] * This property must be specified if the compute nodes in the pool need to * have empty data disks attached to them. This cannot be updated. Each node @@ -569,7 +565,7 @@ class CloudJobSchedule { * https://docs.microsoft.com/en-us/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux * and * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.licenseType] * This only applies to images that contain the Windows operating system, and * should only be used when you hold valid on-premises licenses for the nodes @@ -578,110 +574,102 @@ class CloudJobSchedule { * * Windows_Server - The on-premises license is for Windows Server. * Windows_Client - The on-premises license is for Windows Client. - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration] * If specified, setup is performed on each node in the pool to allow tasks * to run in containers. All regular tasks and job manager tasks run on this * pool must specify the containerSettings property, and all other tasks may * specify it. - * @member {array} + * @property {array} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration.containerImageNames] * This is the full image reference, as would be specified to "docker pull". * An image will be sourced from the default Docker registry unless the image * is fully qualified with an alternative registry. - * @member {array} + * @property {array} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration.containerRegistries] * If any images must be downloaded from a private registry which requires * credentials, then those credentials must be provided here. - * @member {number} + * @property {number} * [jobSpecification.poolInfo.autoPoolSpecification.pool.maxTasksPerNode] The * default value is 1. The maximum value of this setting depends on the size * of the compute nodes in the pool (the vmSize setting). - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.taskSchedulingPolicy] - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.taskSchedulingPolicy.nodeFillType] * Possible values include: 'spread', 'pack' - * @member {moment.duration} + * @property {moment.duration} * [jobSpecification.poolInfo.autoPoolSpecification.pool.resizeTimeout] This * timeout applies only to manual scaling; it has no effect when * enableAutoScale is set to true. The default value is 15 minutes. The * minimum value is 5 minutes. If you specify a value less than 5 minutes, * the Batch service rejects the request with an error; if you are calling * the REST API directly, the HTTP status code is 400 (Bad Request). - * @member {number} + * @property {number} * [jobSpecification.poolInfo.autoPoolSpecification.pool.targetDedicatedNodes] * This property must not be specified if enableAutoScale is set to true. If * enableAutoScale is set to false, then you must set either * targetDedicatedNodes, targetLowPriorityNodes, or both. - * @member {number} + * @property {number} * [jobSpecification.poolInfo.autoPoolSpecification.pool.targetLowPriorityNodes] * This property must not be specified if enableAutoScale is set to true. If * enableAutoScale is set to false, then you must set either * targetDedicatedNodes, targetLowPriorityNodes, or both. - * @member {boolean} + * @property {boolean} * [jobSpecification.poolInfo.autoPoolSpecification.pool.enableAutoScale] If * false, at least one of targetDedicateNodes and targetLowPriorityNodes must * be specified. If true, the autoScaleFormula element is required. The pool * automatically resizes according to the formula. The default value is * false. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.autoScaleFormula] * This property must not be specified if enableAutoScale is set to false. It * is required if enableAutoScale is set to true. The formula is checked for * validity before the pool is created. If the formula is not valid, the * Batch service rejects the request with detailed error information. - * @member {moment.duration} + * @property {moment.duration} * [jobSpecification.poolInfo.autoPoolSpecification.pool.autoScaleEvaluationInterval] * The default value is 15 minutes. The minimum and maximum value are 5 * minutes and 168 hours respectively. If you specify a value less than 5 * minutes or greater than 168 hours, the Batch service rejects the request * with an invalid property value error; if you are calling the REST API * directly, the HTTP status code is 400 (Bad Request). - * @member {boolean} + * @property {boolean} * [jobSpecification.poolInfo.autoPoolSpecification.pool.enableInterNodeCommunication] * Enabling inter-node communication limits the maximum size of the pool due * to deployment restrictions on the nodes of the pool. This may result in * the pool not reaching its desired size. The default value is false. - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration] - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.subnetId] + * This is of the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. * The virtual network must be in the same region and subscription as the * Azure Batch account. The specified subnet should have enough free IP * addresses to accommodate the number of nodes in the pool. If the subnet * doesn't have enough free IP addresses, the pool will partially allocate - * compute nodes, and a resize error will occur. The 'MicrosoftAzureBatch' - * service principal must have the 'Classic Virtual Machine Contributor' - * Role-Based Access Control (RBAC) role for the specified VNet. The - * specified subnet must allow communication from the Azure Batch service to - * be able to schedule tasks on the compute nodes. This can be verified by - * checking if the specified VNet has any associated Network Security Groups - * (NSG). If communication to the compute nodes in the specified subnet is - * denied by an NSG, then the Batch service will set the state of the compute - * nodes to unusable. For pools created with virtualMachineConfiguration only - * ARM virtual networks ('Microsoft.Network/virtualNetworks') are supported, - * but for pools created with cloudServiceConfiguration both ARM and classic - * virtual networks are supported. If the specified VNet has any associated - * Network Security Groups (NSG), then a few reserved system ports must be - * enabled for inbound communication. For pools created with a virtual - * machine configuration, enable ports 29876 and 29877, as well as port 22 - * for Linux and port 3389 for Windows. For pools created with a cloud - * service configuration, enable ports 10100, 20100, and 30100. Also enable - * outbound connections to Azure Storage on port 443. For more details see: + * compute nodes, and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks + * ('Microsoft.Network/virtualNetworks') are supported, but for pools created + * with cloudServiceConfiguration both ARM and classic virtual networks are + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration - * @member {object} + * @property {string} + * [jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.dynamicVNetAssignmentScope] + * Possible values include: 'none', 'job' + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] * Pool endpoint configuration is only supported on pools with the * virtualMachineConfiguration property. - * @member {array} + * @property {array} * [jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration.inboundNATPools] * The maximum number of inbound NAT pools per Batch pool is 5. If the * maximum number of inbound NAT pools is exceeded the request fails with * HTTP status code 400. - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask] - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.commandLine] * The command line does not run under a shell, and therefore cannot take * advantage of shell features such as environment variable expansion. If you @@ -691,57 +679,57 @@ class CloudJobSchedule { * it should use a relative path (relative to the task working directory), or * use the Batch provided environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings] * When this is specified, all directories recursively below the * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) * are mapped into the container, all task environment variables are mapped * into the container, and the task command line is executed in the * container. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.containerRunOptions] * These additional options are supplied as arguments to the "docker create" * command, in addition to those controlled by the Batch Service. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.imageName] * This is the full image reference, as would be specified to "docker pull". * If no tag is provided as part of the image name, the tag ":latest" is used * as a default. - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry] * This setting can be omitted if was already provided at pool creation. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.registryServer] * If omitted, the default is "docker.io". - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.userName] - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.password] - * @member {array} + * @property {array} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.resourceFiles] * Files listed under this element are located in the task's working * directory. - * @member {array} + * @property {array} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.environmentSettings] - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.userIdentity] * If omitted, the task runs as a non-administrative user unique to the task. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.userIdentity.userName] * The userName and autoUser properties are mutually exclusive; you must * specify one but not both. - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser] * The userName and autoUser properties are mutually exclusive; you must * specify one but not both. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser.scope] * The default value is task. Possible values include: 'task', 'pool' - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser.elevationLevel] * The default value is nonAdmin. Possible values include: 'nonAdmin', * 'admin' - * @member {number} + * @property {number} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.maxTaskRetryCount] * The Batch service retries a task if its exit code is nonzero. Note that * this value specifically controls the number of retries. The Batch service @@ -750,7 +738,7 @@ class CloudJobSchedule { * initial try and 3 retries). If the maximum retry count is 0, the Batch * service does not retry the task. If the maximum retry count is -1, the * Batch service retries the task without limit. - * @member {boolean} + * @property {boolean} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.waitForSuccess] * If true and the start task fails on a compute node, the Batch service * retries the start task up to its maximum retry count (maxTaskRetryCount). @@ -762,7 +750,7 @@ class CloudJobSchedule { * node while the start task is still running; and even if the start task * fails, new tasks will continue to be scheduled on the node. The default is * false. - * @member {array} + * @property {array} * [jobSpecification.poolInfo.autoPoolSpecification.pool.certificateReferences] * For Windows compute nodes, the Batch service installs the certificates to * the specified certificate store and location. For Linux compute nodes, the @@ -772,61 +760,62 @@ class CloudJobSchedule { * 'remoteUser', a 'certs' directory is created in the user's home directory * (e.g., /home/{user-name}/certs) and certificates are placed in that * directory. - * @member {array} + * @property {array} * [jobSpecification.poolInfo.autoPoolSpecification.pool.applicationPackageReferences] - * @member {array} + * @property {array} * [jobSpecification.poolInfo.autoPoolSpecification.pool.applicationLicenses] * The list of application licenses must be a subset of available Batch * service application licenses. If a license is requested which is not * supported, pool creation will fail. The permitted licenses available on * the pool are 'maya', 'vray', '3dsmax', 'arnold'. An additional charge * applies for each application license added to the pool. - * @member {array} + * @property {array} * [jobSpecification.poolInfo.autoPoolSpecification.pool.userAccounts] - * @member {array} + * @property {array} * [jobSpecification.poolInfo.autoPoolSpecification.pool.metadata] The Batch * service does not assign any meaning to metadata; it is solely for the use * of user code. - * @member {array} [jobSpecification.metadata] The Batch service does not + * @property {array} [jobSpecification.metadata] The Batch service does not * assign any meaning to metadata; it is solely for the use of user code. - * @member {object} [executionInfo] Information about jobs that have been and - * will be run under this schedule. - * @member {date} [executionInfo.nextRunTime] This property is meaningful + * @property {object} [executionInfo] Information about jobs that have been + * and will be run under this schedule. + * @property {date} [executionInfo.nextRunTime] This property is meaningful * only if the schedule is in the active state when the time comes around. * For example, if the schedule is disabled, no job will be created at * nextRunTime unless the job is enabled before then. - * @member {object} [executionInfo.recentJob] This property is present only + * @property {object} [executionInfo.recentJob] This property is present only * if the at least one job has run under the schedule. - * @member {string} [executionInfo.recentJob.id] - * @member {string} [executionInfo.recentJob.url] - * @member {date} [executionInfo.endTime] This property is set only if the + * @property {string} [executionInfo.recentJob.id] + * @property {string} [executionInfo.recentJob.url] + * @property {date} [executionInfo.endTime] This property is set only if the * job schedule is in the completed state. - * @member {array} [metadata] A list of name-value pairs associated with the - * schedule as metadata. The Batch service does not assign any meaning to + * @property {array} [metadata] A list of name-value pairs associated with + * the schedule as metadata. The Batch service does not assign any meaning to * metadata; it is solely for the use of user code. - * @member {object} [stats] The lifetime resource usage statistics for the + * @property {object} [stats] The lifetime resource usage statistics for the * job schedule. The statistics may not be immediately available. The Batch * service performs periodic roll-up of statistics. The typical delay is * about 30 minutes. - * @member {string} [stats.url] - * @member {date} [stats.startTime] - * @member {date} [stats.lastUpdateTime] - * @member {moment.duration} [stats.userCPUTime] - * @member {moment.duration} [stats.kernelCPUTime] - * @member {moment.duration} [stats.wallClockTime] The wall clock time is the - * elapsed time from when the task started running on a compute node to when - * it finished (or to the last time the statistics were updated, if the task - * had not finished by then). If a task was retried, this includes the wall - * clock time of all the task retries. - * @member {number} [stats.readIOps] - * @member {number} [stats.writeIOps] - * @member {number} [stats.readIOGiB] - * @member {number} [stats.writeIOGiB] - * @member {number} [stats.numSucceededTasks] - * @member {number} [stats.numFailedTasks] - * @member {number} [stats.numTaskRetries] - * @member {moment.duration} [stats.waitTime] This value is only reported in - * the account lifetime statistics; it is not included in the job statistics. + * @property {string} [stats.url] + * @property {date} [stats.startTime] + * @property {date} [stats.lastUpdateTime] + * @property {moment.duration} [stats.userCPUTime] + * @property {moment.duration} [stats.kernelCPUTime] + * @property {moment.duration} [stats.wallClockTime] The wall clock time is + * the elapsed time from when the task started running on a compute node to + * when it finished (or to the last time the statistics were updated, if the + * task had not finished by then). If a task was retried, this includes the + * wall clock time of all the task retries. + * @property {number} [stats.readIOps] + * @property {number} [stats.writeIOps] + * @property {number} [stats.readIOGiB] + * @property {number} [stats.writeIOGiB] + * @property {number} [stats.numSucceededTasks] + * @property {number} [stats.numFailedTasks] + * @property {number} [stats.numTaskRetries] + * @property {moment.duration} [stats.waitTime] This value is only reported + * in the account lifetime statistics; it is not included in the job + * statistics. */ constructor() { } diff --git a/lib/services/batch/lib/models/cloudJobScheduleListResult.js b/lib/services/batch/lib/models/cloudJobScheduleListResult.js index a8e4714989..0714338fc6 100644 --- a/lib/services/batch/lib/models/cloudJobScheduleListResult.js +++ b/lib/services/batch/lib/models/cloudJobScheduleListResult.js @@ -16,7 +16,7 @@ class CloudJobScheduleListResult extends Array { /** * Create a CloudJobScheduleListResult. - * @member {string} [odatanextLink] + * @property {string} [odatanextLink] */ constructor() { super(); diff --git a/lib/services/batch/lib/models/cloudPool.js b/lib/services/batch/lib/models/cloudPool.js index 341105cc6e..eca6e31f3a 100644 --- a/lib/services/batch/lib/models/cloudPool.js +++ b/lib/services/batch/lib/models/cloudPool.js @@ -17,86 +17,74 @@ class CloudPool { /** * Create a CloudPool. - * @member {string} [id] A string that uniquely identifies the pool within + * @property {string} [id] A string that uniquely identifies the pool within * the account. The ID can contain any combination of alphanumeric characters * including hyphens and underscores, and cannot contain more than 64 * characters. The ID is case-preserving and case-insensitive (that is, you * may not have two IDs within an account that differ only by case). - * @member {string} [displayName] The display name for the pool. The display - * name need not be unique and can contain any Unicode characters up to a - * maximum length of 1024. - * @member {string} [url] The URL of the pool. - * @member {string} [eTag] The ETag of the pool. This is an opaque string. + * @property {string} [displayName] The display name for the pool. The + * display name need not be unique and can contain any Unicode characters up + * to a maximum length of 1024. + * @property {string} [url] The URL of the pool. + * @property {string} [eTag] The ETag of the pool. This is an opaque string. * You can use it to detect whether the pool has changed between requests. In * particular, you can be pass the ETag when updating a pool to specify that * your changes should take effect only if nobody else has modified the pool * in the meantime. - * @member {date} [lastModified] The last modified time of the pool. This is - * the last time at which the pool level data, such as the + * @property {date} [lastModified] The last modified time of the pool. This + * is the last time at which the pool level data, such as the * targetDedicatedNodes or enableAutoscale settings, changed. It does not * factor in node-level changes such as a compute node changing state. - * @member {date} [creationTime] The creation time of the pool. - * @member {string} [state] The current state of the pool. Possible values - * include: 'active', 'deleting', 'upgrading' - * @member {date} [stateTransitionTime] The time at which the pool entered + * @property {date} [creationTime] The creation time of the pool. + * @property {string} [state] The current state of the pool. Possible values + * include: 'active', 'deleting' + * @property {date} [stateTransitionTime] The time at which the pool entered * its current state. - * @member {string} [allocationState] Whether the pool is resizing. Possible - * values include: 'steady', 'resizing', 'stopping' - * @member {date} [allocationStateTransitionTime] The time at which the pool - * entered its current allocation state. - * @member {string} [vmSize] The size of virtual machines in the pool. All + * @property {string} [allocationState] Whether the pool is resizing. + * Possible values include: 'steady', 'resizing', 'stopping' + * @property {date} [allocationStateTransitionTime] The time at which the + * pool entered its current allocation state. + * @property {string} [vmSize] The size of virtual machines in the pool. All * virtual machines in a pool are the same size. For information about * available sizes of virtual machines in pools, see Choose a VM size for * compute nodes in an Azure Batch pool * (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). - * @member {object} [cloudServiceConfiguration] The cloud service + * @property {object} [cloudServiceConfiguration] The cloud service * configuration for the pool. This property and virtualMachineConfiguration * are mutually exclusive and one of the properties must be specified. This * property cannot be specified if the Batch account was created with its * poolAllocationMode property set to 'UserSubscription'. - * @member {string} [cloudServiceConfiguration.osFamily] Possible values are: + * @property {string} [cloudServiceConfiguration.osFamily] Possible values + * are: * 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. * 3 - OS Family 3, equivalent to Windows Server 2012. * 4 - OS Family 4, equivalent to Windows Server 2012 R2. * 5 - OS Family 5, equivalent to Windows Server 2016. For more information, * see Azure Guest OS Releases * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). - * @member {string} [cloudServiceConfiguration.targetOSVersion] The default - * value is * which specifies the latest operating system version for the - * specified OS family. - * @member {string} [cloudServiceConfiguration.currentOSVersion] This may - * differ from targetOSVersion if the pool state is Upgrading. In this case - * some virtual machines may be on the targetOSVersion and some may be on the - * currentOSVersion during the upgrade process. Once all virtual machines - * have upgraded, currentOSVersion is updated to be the same as - * targetOSVersion. - * @member {object} [virtualMachineConfiguration] The virtual machine + * @property {string} [cloudServiceConfiguration.osVersion] The default value + * is * which specifies the latest operating system version for the specified + * OS family. + * @property {object} [virtualMachineConfiguration] The virtual machine * configuration for the pool. This property and cloudServiceConfiguration * are mutually exclusive and one of the properties must be specified. - * @member {object} [virtualMachineConfiguration.imageReference] - * @member {string} [virtualMachineConfiguration.imageReference.publisher] + * @property {object} [virtualMachineConfiguration.imageReference] + * @property {string} [virtualMachineConfiguration.imageReference.publisher] * For example, Canonical or MicrosoftWindowsServer. - * @member {string} [virtualMachineConfiguration.imageReference.offer] For + * @property {string} [virtualMachineConfiguration.imageReference.offer] For * example, UbuntuServer or WindowsServer. - * @member {string} [virtualMachineConfiguration.imageReference.sku] For + * @property {string} [virtualMachineConfiguration.imageReference.sku] For * example, 14.04.0-LTS or 2012-R2-Datacenter. - * @member {string} [virtualMachineConfiguration.imageReference.version] A + * @property {string} [virtualMachineConfiguration.imageReference.version] A * value of 'latest' can be specified to select the latest version of an * image. If omitted, the default is 'latest'. - * @member {string} + * @property {string} * [virtualMachineConfiguration.imageReference.virtualMachineImageId] This * property is mutually exclusive with other ImageReference properties. The * virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * @member {object} [virtualMachineConfiguration.osDisk] - * @member {string} [virtualMachineConfiguration.osDisk.caching] The default - * value for caching is readwrite. For information about the caching options - * see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' - * @member {string} [virtualMachineConfiguration.nodeAgentSKUId] The Batch + * Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. + * @property {string} [virtualMachineConfiguration.nodeAgentSKUId] The Batch * node agent is a program that runs on each node in the pool, and provides * the command-and-control interface between the node and the Batch service. * There are different implementations of the node agent, known as SKUs, for @@ -104,14 +92,14 @@ class CloudPool { * matches the selected image reference. To get the list of supported node * agent SKUs along with their list of verified image references, see the * 'List supported node agent SKUs' operation. - * @member {object} [virtualMachineConfiguration.windowsConfiguration] This - * property must not be specified if the imageReference or osDisk property - * specifies a Linux OS image. - * @member {boolean} + * @property {object} [virtualMachineConfiguration.windowsConfiguration] This + * property must not be specified if the imageReference property specifies a + * Linux OS image. + * @property {boolean} * [virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] * If omitted, the default value is true. - * @member {array} [virtualMachineConfiguration.dataDisks] This property must - * be specified if the compute nodes in the pool need to have empty data + * @property {array} [virtualMachineConfiguration.dataDisks] This property + * must be specified if the compute nodes in the pool need to have empty data * disks attached to them. This cannot be updated. Each node gets its own * disk (the disk is not a file share). Existing disks cannot be attached, * each attached disk is empty. When the node is removed from the pool, the @@ -121,7 +109,7 @@ class CloudPool { * https://docs.microsoft.com/en-us/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux * and * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. - * @member {string} [virtualMachineConfiguration.licenseType] This only + * @property {string} [virtualMachineConfiguration.licenseType] This only * applies to images that contain the Windows operating system, and should * only be used when you hold valid on-premises licenses for the nodes which * will be deployed. If omitted, no on-premises licensing discount is @@ -129,99 +117,89 @@ class CloudPool { * * Windows_Server - The on-premises license is for Windows Server. * Windows_Client - The on-premises license is for Windows Client. - * @member {object} [virtualMachineConfiguration.containerConfiguration] If + * @property {object} [virtualMachineConfiguration.containerConfiguration] If * specified, setup is performed on each node in the pool to allow tasks to * run in containers. All regular tasks and job manager tasks run on this * pool must specify the containerSettings property, and all other tasks may * specify it. - * @member {array} + * @property {array} * [virtualMachineConfiguration.containerConfiguration.containerImageNames] * This is the full image reference, as would be specified to "docker pull". * An image will be sourced from the default Docker registry unless the image * is fully qualified with an alternative registry. - * @member {array} + * @property {array} * [virtualMachineConfiguration.containerConfiguration.containerRegistries] * If any images must be downloaded from a private registry which requires * credentials, then those credentials must be provided here. - * @member {moment.duration} [resizeTimeout] The timeout for allocation of + * @property {moment.duration} [resizeTimeout] The timeout for allocation of * compute nodes to the pool. This is the timeout for the most recent resize * operation. (The initial sizing when the pool is created counts as a * resize.) The default value is 15 minutes. - * @member {array} [resizeErrors] A list of errors encountered while + * @property {array} [resizeErrors] A list of errors encountered while * performing the last resize on the pool. This property is set only if one * or more errors occurred during the last pool resize, and only when the * pool allocationState is Steady. - * @member {number} [currentDedicatedNodes] The number of dedicated compute + * @property {number} [currentDedicatedNodes] The number of dedicated compute * nodes currently in the pool. - * @member {number} [currentLowPriorityNodes] The number of low-priority + * @property {number} [currentLowPriorityNodes] The number of low-priority * compute nodes currently in the pool. Low-priority compute nodes which have * been preempted are included in this count. - * @member {number} [targetDedicatedNodes] The desired number of dedicated + * @property {number} [targetDedicatedNodes] The desired number of dedicated * compute nodes in the pool. - * @member {number} [targetLowPriorityNodes] The desired number of + * @property {number} [targetLowPriorityNodes] The desired number of * low-priority compute nodes in the pool. - * @member {boolean} [enableAutoScale] Whether the pool size should + * @property {boolean} [enableAutoScale] Whether the pool size should * automatically adjust over time. If false, at least one of * targetDedicateNodes and targetLowPriorityNodes must be specified. If true, * the autoScaleFormula property is required and the pool automatically * resizes according to the formula. The default value is false. - * @member {string} [autoScaleFormula] A formula for the desired number of + * @property {string} [autoScaleFormula] A formula for the desired number of * compute nodes in the pool. This property is set only if the pool * automatically scales, i.e. enableAutoScale is true. - * @member {moment.duration} [autoScaleEvaluationInterval] The time interval - * at which to automatically adjust the pool size according to the autoscale - * formula. This property is set only if the pool automatically scales, i.e. - * enableAutoScale is true. - * @member {object} [autoScaleRun] The results and errors from the last + * @property {moment.duration} [autoScaleEvaluationInterval] The time + * interval at which to automatically adjust the pool size according to the + * autoscale formula. This property is set only if the pool automatically + * scales, i.e. enableAutoScale is true. + * @property {object} [autoScaleRun] The results and errors from the last * execution of the autoscale formula. This property is set only if the pool * automatically scales, i.e. enableAutoScale is true. - * @member {date} [autoScaleRun.timestamp] - * @member {string} [autoScaleRun.results] Each variable value is returned in - * the form $variable=value, and variables are separated by semicolons. - * @member {object} [autoScaleRun.error] - * @member {string} [autoScaleRun.error.code] - * @member {string} [autoScaleRun.error.message] - * @member {array} [autoScaleRun.error.values] - * @member {boolean} [enableInterNodeCommunication] Whether the pool permits - * direct communication between nodes. This imposes restrictions on which - * nodes can be assigned to the pool. Specifying this value can reduce the - * chance of the requested number of nodes to be allocated in the pool. - * @member {object} [networkConfiguration] The network configuration for the - * pool. - * @member {string} [networkConfiguration.subnetId] The virtual network must - * be in the same region and subscription as the Azure Batch account. The - * specified subnet should have enough free IP addresses to accommodate the - * number of nodes in the pool. If the subnet doesn't have enough free IP - * addresses, the pool will partially allocate compute nodes, and a resize - * error will occur. The 'MicrosoftAzureBatch' service principal must have - * the 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) - * role for the specified VNet. The specified subnet must allow communication - * from the Azure Batch service to be able to schedule tasks on the compute - * nodes. This can be verified by checking if the specified VNet has any - * associated Network Security Groups (NSG). If communication to the compute - * nodes in the specified subnet is denied by an NSG, then the Batch service - * will set the state of the compute nodes to unusable. For pools created - * with virtualMachineConfiguration only ARM virtual networks + * @property {date} [autoScaleRun.timestamp] + * @property {string} [autoScaleRun.results] Each variable value is returned + * in the form $variable=value, and variables are separated by semicolons. + * @property {object} [autoScaleRun.error] + * @property {string} [autoScaleRun.error.code] + * @property {string} [autoScaleRun.error.message] + * @property {array} [autoScaleRun.error.values] + * @property {boolean} [enableInterNodeCommunication] Whether the pool + * permits direct communication between nodes. This imposes restrictions on + * which nodes can be assigned to the pool. Specifying this value can reduce + * the chance of the requested number of nodes to be allocated in the pool. + * @property {object} [networkConfiguration] The network configuration for + * the pool. + * @property {string} [networkConfiguration.subnetId] This is of the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. + * The virtual network must be in the same region and subscription as the + * Azure Batch account. The specified subnet should have enough free IP + * addresses to accommodate the number of nodes in the pool. If the subnet + * doesn't have enough free IP addresses, the pool will partially allocate + * compute nodes, and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks * ('Microsoft.Network/virtualNetworks') are supported, but for pools created * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security - * Groups (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 - * for Windows. For pools created with a cloud service configuration, enable - * ports 10100, 20100, and 30100. Also enable outbound connections to Azure - * Storage on port 443. For more details see: + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration - * @member {object} [networkConfiguration.endpointConfiguration] Pool + * @property {string} [networkConfiguration.dynamicVNetAssignmentScope] + * Possible values include: 'none', 'job' + * @property {object} [networkConfiguration.endpointConfiguration] Pool * endpoint configuration is only supported on pools with the * virtualMachineConfiguration property. - * @member {array} + * @property {array} * [networkConfiguration.endpointConfiguration.inboundNATPools] The maximum * number of inbound NAT pools per Batch pool is 5. If the maximum number of * inbound NAT pools is exceeded the request fails with HTTP status code 400. - * @member {object} [startTask] A task specified to run on each compute node - * as it joins the pool. - * @member {string} [startTask.commandLine] The command line does not run + * @property {object} [startTask] A task specified to run on each compute + * node as it joins the pool. + * @property {string} [startTask.commandLine] The command line does not run * under a shell, and therefore cannot take advantage of shell features such * as environment variable expansion. If you want to take advantage of such * features, you should invoke the shell in the command line, for example @@ -230,48 +208,48 @@ class CloudPool { * (relative to the task working directory), or use the Batch provided * environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [startTask.containerSettings] When this is specified, all - * directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of + * @property {object} [startTask.containerSettings] When this is specified, + * all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of * Azure Batch directories on the node) are mapped into the container, all * task environment variables are mapped into the container, and the task * command line is executed in the container. - * @member {string} [startTask.containerSettings.containerRunOptions] These + * @property {string} [startTask.containerSettings.containerRunOptions] These * additional options are supplied as arguments to the "docker create" * command, in addition to those controlled by the Batch Service. - * @member {string} [startTask.containerSettings.imageName] This is the full - * image reference, as would be specified to "docker pull". If no tag is + * @property {string} [startTask.containerSettings.imageName] This is the + * full image reference, as would be specified to "docker pull". If no tag is * provided as part of the image name, the tag ":latest" is used as a * default. - * @member {object} [startTask.containerSettings.registry] This setting can + * @property {object} [startTask.containerSettings.registry] This setting can * be omitted if was already provided at pool creation. - * @member {string} [startTask.containerSettings.registry.registryServer] If - * omitted, the default is "docker.io". - * @member {string} [startTask.containerSettings.registry.userName] - * @member {string} [startTask.containerSettings.registry.password] - * @member {array} [startTask.resourceFiles] Files listed under this element - * are located in the task's working directory. - * @member {array} [startTask.environmentSettings] - * @member {object} [startTask.userIdentity] If omitted, the task runs as a + * @property {string} [startTask.containerSettings.registry.registryServer] + * If omitted, the default is "docker.io". + * @property {string} [startTask.containerSettings.registry.userName] + * @property {string} [startTask.containerSettings.registry.password] + * @property {array} [startTask.resourceFiles] Files listed under this + * element are located in the task's working directory. + * @property {array} [startTask.environmentSettings] + * @property {object} [startTask.userIdentity] If omitted, the task runs as a * non-administrative user unique to the task. - * @member {string} [startTask.userIdentity.userName] The userName and + * @property {string} [startTask.userIdentity.userName] The userName and * autoUser properties are mutually exclusive; you must specify one but not * both. - * @member {object} [startTask.userIdentity.autoUser] The userName and + * @property {object} [startTask.userIdentity.autoUser] The userName and * autoUser properties are mutually exclusive; you must specify one but not * both. - * @member {string} [startTask.userIdentity.autoUser.scope] The default value - * is task. Possible values include: 'task', 'pool' - * @member {string} [startTask.userIdentity.autoUser.elevationLevel] The + * @property {string} [startTask.userIdentity.autoUser.scope] The default + * value is task. Possible values include: 'task', 'pool' + * @property {string} [startTask.userIdentity.autoUser.elevationLevel] The * default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {number} [startTask.maxTaskRetryCount] The Batch service retries a - * task if its exit code is nonzero. Note that this value specifically + * @property {number} [startTask.maxTaskRetryCount] The Batch service retries + * a task if its exit code is nonzero. Note that this value specifically * controls the number of retries. The Batch service will try the task once, * and may then retry up to this limit. For example, if the maximum retry * count is 3, Batch tries the task up to 4 times (one initial try and 3 * retries). If the maximum retry count is 0, the Batch service does not * retry the task. If the maximum retry count is -1, the Batch service * retries the task without limit. - * @member {boolean} [startTask.waitForSuccess] If true and the start task + * @property {boolean} [startTask.waitForSuccess] If true and the start task * fails on a compute node, the Batch service retries the start task up to * its maximum retry count (maxTaskRetryCount). If the task has still not * completed successfully after all retries, then the Batch service marks the @@ -281,7 +259,7 @@ class CloudPool { * other tasks can start executing on the compute node while the start task * is still running; and even if the start task fails, new tasks will * continue to be scheduled on the node. The default is false. - * @member {array} [certificateReferences] The list of certificates to be + * @property {array} [certificateReferences] The list of certificates to be * installed on each compute node in the pool. For Windows compute nodes, the * Batch service installs the certificates to the specified certificate store * and location. For Linux compute nodes, the certificates are stored in a @@ -290,48 +268,48 @@ class CloudPool { * location. For certificates with visibility of 'remoteUser', a 'certs' * directory is created in the user's home directory (e.g., * /home/{user-name}/certs) and certificates are placed in that directory. - * @member {array} [applicationPackageReferences] The list of application + * @property {array} [applicationPackageReferences] The list of application * packages to be installed on each compute node in the pool. - * @member {array} [applicationLicenses] The list of application licenses the - * Batch service will make available on each compute node in the pool. The - * list of application licenses must be a subset of available Batch service - * application licenses. If a license is requested which is not supported, - * pool creation will fail. - * @member {number} [maxTasksPerNode] The maximum number of tasks that can + * @property {array} [applicationLicenses] The list of application licenses + * the Batch service will make available on each compute node in the pool. + * The list of application licenses must be a subset of available Batch + * service application licenses. If a license is requested which is not + * supported, pool creation will fail. + * @property {number} [maxTasksPerNode] The maximum number of tasks that can * run concurrently on a single compute node in the pool. - * @member {object} [taskSchedulingPolicy] How tasks are distributed across + * @property {object} [taskSchedulingPolicy] How tasks are distributed across * compute nodes in a pool. - * @member {string} [taskSchedulingPolicy.nodeFillType] Possible values + * @property {string} [taskSchedulingPolicy.nodeFillType] Possible values * include: 'spread', 'pack' - * @member {array} [userAccounts] The list of user accounts to be created on - * each node in the pool. - * @member {array} [metadata] A list of name-value pairs associated with the - * pool as metadata. - * @member {object} [stats] Utilization and resource usage statistics for the - * entire lifetime of the pool. The statistics may not be immediately + * @property {array} [userAccounts] The list of user accounts to be created + * on each node in the pool. + * @property {array} [metadata] A list of name-value pairs associated with + * the pool as metadata. + * @property {object} [stats] Utilization and resource usage statistics for + * the entire lifetime of the pool. The statistics may not be immediately * available. The Batch service performs periodic roll-up of statistics. The * typical delay is about 30 minutes. - * @member {string} [stats.url] - * @member {date} [stats.startTime] - * @member {date} [stats.lastUpdateTime] - * @member {object} [stats.usageStats] - * @member {date} [stats.usageStats.startTime] - * @member {date} [stats.usageStats.lastUpdateTime] - * @member {moment.duration} [stats.usageStats.dedicatedCoreTime] - * @member {object} [stats.resourceStats] - * @member {date} [stats.resourceStats.startTime] - * @member {date} [stats.resourceStats.lastUpdateTime] - * @member {number} [stats.resourceStats.avgCPUPercentage] - * @member {number} [stats.resourceStats.avgMemoryGiB] - * @member {number} [stats.resourceStats.peakMemoryGiB] - * @member {number} [stats.resourceStats.avgDiskGiB] - * @member {number} [stats.resourceStats.peakDiskGiB] - * @member {number} [stats.resourceStats.diskReadIOps] - * @member {number} [stats.resourceStats.diskWriteIOps] - * @member {number} [stats.resourceStats.diskReadGiB] - * @member {number} [stats.resourceStats.diskWriteGiB] - * @member {number} [stats.resourceStats.networkReadGiB] - * @member {number} [stats.resourceStats.networkWriteGiB] + * @property {string} [stats.url] + * @property {date} [stats.startTime] + * @property {date} [stats.lastUpdateTime] + * @property {object} [stats.usageStats] + * @property {date} [stats.usageStats.startTime] + * @property {date} [stats.usageStats.lastUpdateTime] + * @property {moment.duration} [stats.usageStats.dedicatedCoreTime] + * @property {object} [stats.resourceStats] + * @property {date} [stats.resourceStats.startTime] + * @property {date} [stats.resourceStats.lastUpdateTime] + * @property {number} [stats.resourceStats.avgCPUPercentage] + * @property {number} [stats.resourceStats.avgMemoryGiB] + * @property {number} [stats.resourceStats.peakMemoryGiB] + * @property {number} [stats.resourceStats.avgDiskGiB] + * @property {number} [stats.resourceStats.peakDiskGiB] + * @property {number} [stats.resourceStats.diskReadIOps] + * @property {number} [stats.resourceStats.diskWriteIOps] + * @property {number} [stats.resourceStats.diskReadGiB] + * @property {number} [stats.resourceStats.diskWriteGiB] + * @property {number} [stats.resourceStats.networkReadGiB] + * @property {number} [stats.resourceStats.networkWriteGiB] */ constructor() { } @@ -397,7 +375,7 @@ class CloudPool { serializedName: 'state', type: { name: 'Enum', - allowedValues: [ 'active', 'deleting', 'upgrading' ] + allowedValues: [ 'active', 'deleting' ] } }, stateTransitionTime: { diff --git a/lib/services/batch/lib/models/cloudPoolListResult.js b/lib/services/batch/lib/models/cloudPoolListResult.js index 9e9413c972..e285c05f80 100644 --- a/lib/services/batch/lib/models/cloudPoolListResult.js +++ b/lib/services/batch/lib/models/cloudPoolListResult.js @@ -16,7 +16,7 @@ class CloudPoolListResult extends Array { /** * Create a CloudPoolListResult. - * @member {string} [odatanextLink] + * @property {string} [odatanextLink] */ constructor() { super(); diff --git a/lib/services/batch/lib/models/cloudServiceConfiguration.js b/lib/services/batch/lib/models/cloudServiceConfiguration.js index 8123ab17b6..b8fb73a5b0 100644 --- a/lib/services/batch/lib/models/cloudServiceConfiguration.js +++ b/lib/services/batch/lib/models/cloudServiceConfiguration.js @@ -18,25 +18,17 @@ class CloudServiceConfiguration { /** * Create a CloudServiceConfiguration. - * @member {string} osFamily The Azure Guest OS family to be installed on the - * virtual machines in the pool. Possible values are: + * @property {string} osFamily The Azure Guest OS family to be installed on + * the virtual machines in the pool. Possible values are: * 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. * 3 - OS Family 3, equivalent to Windows Server 2012. * 4 - OS Family 4, equivalent to Windows Server 2012 R2. * 5 - OS Family 5, equivalent to Windows Server 2016. For more information, * see Azure Guest OS Releases * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). - * @member {string} [targetOSVersion] The Azure Guest OS version to be - * installed on the virtual machines in the pool. The default value is * - * which specifies the latest operating system version for the specified OS - * family. - * @member {string} [currentOSVersion] The Azure Guest OS Version currently - * installed on the virtual machines in the pool. This may differ from - * targetOSVersion if the pool state is Upgrading. In this case some virtual - * machines may be on the targetOSVersion and some may be on the - * currentOSVersion during the upgrade process. Once all virtual machines - * have upgraded, currentOSVersion is updated to be the same as - * targetOSVersion. + * @property {string} [osVersion] The Azure Guest OS version to be installed + * on the virtual machines in the pool. The default value is * which + * specifies the latest operating system version for the specified OS family. */ constructor() { } @@ -62,17 +54,9 @@ class CloudServiceConfiguration { name: 'String' } }, - targetOSVersion: { + osVersion: { required: false, - serializedName: 'targetOSVersion', - type: { - name: 'String' - } - }, - currentOSVersion: { - required: false, - readOnly: true, - serializedName: 'currentOSVersion', + serializedName: 'osVersion', type: { name: 'String' } diff --git a/lib/services/batch/lib/models/cloudTask.js b/lib/services/batch/lib/models/cloudTask.js index 22bc13ab31..fe128682b0 100644 --- a/lib/services/batch/lib/models/cloudTask.js +++ b/lib/services/batch/lib/models/cloudTask.js @@ -28,89 +28,89 @@ class CloudTask { /** * Create a CloudTask. - * @member {string} [id] A string that uniquely identifies the task within + * @property {string} [id] A string that uniquely identifies the task within * the job. The ID can contain any combination of alphanumeric characters * including hyphens and underscores, and cannot contain more than 64 * characters. - * @member {string} [displayName] A display name for the task. The display + * @property {string} [displayName] A display name for the task. The display * name need not be unique and can contain any Unicode characters up to a * maximum length of 1024. - * @member {string} [url] The URL of the task. - * @member {string} [eTag] The ETag of the task. This is an opaque string. + * @property {string} [url] The URL of the task. + * @property {string} [eTag] The ETag of the task. This is an opaque string. * You can use it to detect whether the task has changed between requests. In * particular, you can be pass the ETag when updating a task to specify that * your changes should take effect only if nobody else has modified the task * in the meantime. - * @member {date} [lastModified] The last modified time of the task. - * @member {date} [creationTime] The creation time of the task. - * @member {object} [exitConditions] How the Batch service should respond + * @property {date} [lastModified] The last modified time of the task. + * @property {date} [creationTime] The creation time of the task. + * @property {object} [exitConditions] How the Batch service should respond * when the task completes. - * @member {array} [exitConditions.exitCodes] - * @member {array} [exitConditions.exitCodeRanges] - * @member {object} [exitConditions.preProcessingError] - * @member {string} [exitConditions.preProcessingError.jobAction] The default - * is none for exit code 0 and terminate for all other exit conditions. If - * the job's onTaskFailed property is noaction, then specifying this property - * returns an error and the add task request fails with an invalid property - * value error; if you are calling the REST API directly, the HTTP status - * code is 400 (Bad Request). Possible values include: 'none', 'disable', - * 'terminate' - * @member {string} [exitConditions.preProcessingError.dependencyAction] The - * default is 'satisfy' for exit code 0, and 'block' for all other exit + * @property {array} [exitConditions.exitCodes] + * @property {array} [exitConditions.exitCodeRanges] + * @property {object} [exitConditions.preProcessingError] + * @property {string} [exitConditions.preProcessingError.jobAction] The + * default is none for exit code 0 and terminate for all other exit + * conditions. If the job's onTaskFailed property is noaction, then + * specifying this property returns an error and the add task request fails + * with an invalid property value error; if you are calling the REST API + * directly, the HTTP status code is 400 (Bad Request). Possible values + * include: 'none', 'disable', 'terminate' + * @property {string} [exitConditions.preProcessingError.dependencyAction] + * The default is 'satisfy' for exit code 0, and 'block' for all other exit * conditions. If the job's usesTaskDependencies property is set to false, * then specifying the dependencyAction property returns an error and the add * task request fails with an invalid property value error; if you are * calling the REST API directly, the HTTP status code is 400 (Bad Request). * Possible values include: 'satisfy', 'block' - * @member {object} [exitConditions.fileUploadError] If the task exited with - * an exit code that was specified via exitCodes or exitCodeRanges, and then - * encountered a file upload error, then the action specified by the exit - * code takes precedence. - * @member {string} [exitConditions.fileUploadError.jobAction] The default is - * none for exit code 0 and terminate for all other exit conditions. If the - * job's onTaskFailed property is noaction, then specifying this property + * @property {object} [exitConditions.fileUploadError] If the task exited + * with an exit code that was specified via exitCodes or exitCodeRanges, and + * then encountered a file upload error, then the action specified by the + * exit code takes precedence. + * @property {string} [exitConditions.fileUploadError.jobAction] The default + * is none for exit code 0 and terminate for all other exit conditions. If + * the job's onTaskFailed property is noaction, then specifying this property * returns an error and the add task request fails with an invalid property * value error; if you are calling the REST API directly, the HTTP status * code is 400 (Bad Request). Possible values include: 'none', 'disable', * 'terminate' - * @member {string} [exitConditions.fileUploadError.dependencyAction] The + * @property {string} [exitConditions.fileUploadError.dependencyAction] The * default is 'satisfy' for exit code 0, and 'block' for all other exit * conditions. If the job's usesTaskDependencies property is set to false, * then specifying the dependencyAction property returns an error and the add * task request fails with an invalid property value error; if you are * calling the REST API directly, the HTTP status code is 400 (Bad Request). * Possible values include: 'satisfy', 'block' - * @member {object} [exitConditions.default] This value is used if the task + * @property {object} [exitConditions.default] This value is used if the task * exits with any nonzero exit code not listed in the exitCodes or * exitCodeRanges collection, with a pre-processing error if the * preProcessingError property is not present, or with a file upload error if * the fileUploadError property is not present. If you want non-default - * behaviour on exit code 0, you must list it explicitly using the exitCodes + * behavior on exit code 0, you must list it explicitly using the exitCodes * or exitCodeRanges collection. - * @member {string} [exitConditions.default.jobAction] The default is none + * @property {string} [exitConditions.default.jobAction] The default is none * for exit code 0 and terminate for all other exit conditions. If the job's * onTaskFailed property is noaction, then specifying this property returns * an error and the add task request fails with an invalid property value * error; if you are calling the REST API directly, the HTTP status code is * 400 (Bad Request). Possible values include: 'none', 'disable', 'terminate' - * @member {string} [exitConditions.default.dependencyAction] The default is - * 'satisfy' for exit code 0, and 'block' for all other exit conditions. If - * the job's usesTaskDependencies property is set to false, then specifying - * the dependencyAction property returns an error and the add task request - * fails with an invalid property value error; if you are calling the REST - * API directly, the HTTP status code is 400 (Bad Request). Possible values - * include: 'satisfy', 'block' - * @member {string} [state] The current state of the task. Possible values + * @property {string} [exitConditions.default.dependencyAction] The default + * is 'satisfy' for exit code 0, and 'block' for all other exit conditions. + * If the job's usesTaskDependencies property is set to false, then + * specifying the dependencyAction property returns an error and the add task + * request fails with an invalid property value error; if you are calling the + * REST API directly, the HTTP status code is 400 (Bad Request). Possible + * values include: 'satisfy', 'block' + * @property {string} [state] The current state of the task. Possible values * include: 'active', 'preparing', 'running', 'completed' - * @member {date} [stateTransitionTime] The time at which the task entered + * @property {date} [stateTransitionTime] The time at which the task entered * its current state. - * @member {string} [previousState] The previous state of the task. This + * @property {string} [previousState] The previous state of the task. This * property is not set if the task is in its initial Active state. Possible * values include: 'active', 'preparing', 'running', 'completed' - * @member {date} [previousStateTransitionTime] The time at which the task + * @property {date} [previousStateTransitionTime] The time at which the task * entered its previous state. This property is not set if the task is in its * initial Active state. - * @member {string} [commandLine] The command line of the task. For + * @property {string} [commandLine] The command line of the task. For * multi-instance tasks, the command line is executed as the primary task, * after the primary task and all subtasks have finished executing the * coordination command line. The command line does not run under a shell, @@ -121,8 +121,8 @@ class CloudTask { * line refers to file paths, it should use a relative path (relative to the * task working directory), or use the Batch provided environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [containerSettings] The settings for the container under - * which the task runs. If the pool that will run this task has + * @property {object} [containerSettings] The settings for the container + * under which the task runs. If the pool that will run this task has * containerConfiguration set, this must be set as well. If the pool that * will run this task doesn't have containerConfiguration set, this must not * be set. When this is specified, all directories recursively below the @@ -130,19 +130,19 @@ class CloudTask { * are mapped into the container, all task environment variables are mapped * into the container, and the task command line is executed in the * container. - * @member {string} [containerSettings.containerRunOptions] These additional - * options are supplied as arguments to the "docker create" command, in - * addition to those controlled by the Batch Service. - * @member {string} [containerSettings.imageName] This is the full image + * @property {string} [containerSettings.containerRunOptions] These + * additional options are supplied as arguments to the "docker create" + * command, in addition to those controlled by the Batch Service. + * @property {string} [containerSettings.imageName] This is the full image * reference, as would be specified to "docker pull". If no tag is provided * as part of the image name, the tag ":latest" is used as a default. - * @member {object} [containerSettings.registry] This setting can be omitted - * if was already provided at pool creation. - * @member {string} [containerSettings.registry.registryServer] If omitted, + * @property {object} [containerSettings.registry] This setting can be + * omitted if was already provided at pool creation. + * @property {string} [containerSettings.registry.registryServer] If omitted, * the default is "docker.io". - * @member {string} [containerSettings.registry.userName] - * @member {string} [containerSettings.registry.password] - * @member {array} [resourceFiles] A list of files that the Batch service + * @property {string} [containerSettings.registry.userName] + * @property {string} [containerSettings.registry.password] + * @property {array} [resourceFiles] A list of files that the Batch service * will download to the compute node before running the command line. For * multi-instance tasks, the resource files will only be downloaded to the * compute node on which the primary task is executed. There is a maximum @@ -151,155 +151,154 @@ class CloudTask { * RequestEntityTooLarge. If this occurs, the collection of ResourceFiles * must be reduced in size. This can be achieved using .zip files, * Application Packages, or Docker Containers. - * @member {array} [outputFiles] A list of files that the Batch service will - * upload from the compute node after running the command line. For + * @property {array} [outputFiles] A list of files that the Batch service + * will upload from the compute node after running the command line. For * multi-instance tasks, the files will only be uploaded from the compute * node on which the primary task is executed. - * @member {array} [environmentSettings] A list of environment variable + * @property {array} [environmentSettings] A list of environment variable * settings for the task. - * @member {object} [affinityInfo] A locality hint that can be used by the + * @property {object} [affinityInfo] A locality hint that can be used by the * Batch service to select a compute node on which to start the new task. - * @member {string} [affinityInfo.affinityId] You can pass the affinityId of - * a compute node to indicate that this task needs to run on that compute + * @property {string} [affinityInfo.affinityId] You can pass the affinityId + * of a compute node to indicate that this task needs to run on that compute * node. Note that this is just a soft affinity. If the target node is busy * or unavailable at the time the task is scheduled, then the task will be * scheduled elsewhere. - * @member {object} [constraints] The execution constraints that apply to + * @property {object} [constraints] The execution constraints that apply to * this task. - * @member {moment.duration} [constraints.maxWallClockTime] If this is not + * @property {moment.duration} [constraints.maxWallClockTime] If this is not * specified, there is no time limit on how long the task may run. - * @member {moment.duration} [constraints.retentionTime] The default is - * infinite, i.e. the task directory will be retained until the compute node - * is removed or reimaged. - * @member {number} [constraints.maxTaskRetryCount] Note that this value + * @property {moment.duration} [constraints.retentionTime] The default is 7 + * days, i.e. the task directory will be retained for 7 days unless the + * compute node is removed or the job is deleted. + * @property {number} [constraints.maxTaskRetryCount] Note that this value * specifically controls the number of retries for the task executable due to * a nonzero exit code. The Batch service will try the task once, and may * then retry up to this limit. For example, if the maximum retry count is 3, * Batch tries the task up to 4 times (one initial try and 3 retries). If the * maximum retry count is 0, the Batch service does not retry the task after * the first attempt. If the maximum retry count is -1, the Batch service - * retries the task without limit. Resource files and application packages - * are only downloaded again if the task is retried on a new compute node. - * @member {object} [userIdentity] The user identity under which the task + * retries the task without limit. + * @property {object} [userIdentity] The user identity under which the task * runs. If omitted, the task runs as a non-administrative user unique to the * task. - * @member {string} [userIdentity.userName] The userName and autoUser + * @property {string} [userIdentity.userName] The userName and autoUser * properties are mutually exclusive; you must specify one but not both. - * @member {object} [userIdentity.autoUser] The userName and autoUser + * @property {object} [userIdentity.autoUser] The userName and autoUser * properties are mutually exclusive; you must specify one but not both. - * @member {string} [userIdentity.autoUser.scope] The default value is task. - * Possible values include: 'task', 'pool' - * @member {string} [userIdentity.autoUser.elevationLevel] The default value - * is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {object} [executionInfo] Information about the execution of the + * @property {string} [userIdentity.autoUser.scope] The default value is + * task. Possible values include: 'task', 'pool' + * @property {string} [userIdentity.autoUser.elevationLevel] The default + * value is nonAdmin. Possible values include: 'nonAdmin', 'admin' + * @property {object} [executionInfo] Information about the execution of the * task. - * @member {date} [executionInfo.startTime] 'Running' corresponds to the + * @property {date} [executionInfo.startTime] 'Running' corresponds to the * running state, so if the task specifies resource files or application * packages, then the start time reflects the time at which the task started * downloading or deploying these. If the task has been restarted or retried, * this is the most recent time at which the task started running. This * property is present only for tasks that are in the running or completed * state. - * @member {date} [executionInfo.endTime] This property is set only if the + * @property {date} [executionInfo.endTime] This property is set only if the * task is in the Completed state. - * @member {number} [executionInfo.exitCode] This property is set only if the - * task is in the completed state. In general, the exit code for a process - * reflects the specific convention implemented by the application developer - * for that process. If you use the exit code value to make decisions in your - * code, be sure that you know the exit code convention used by the - * application process. However, if the Batch service terminates the task - * (due to timeout, or user termination via the API) you may see an operating - * system-defined exit code. - * @member {object} [executionInfo.containerInfo] This property is set only + * @property {number} [executionInfo.exitCode] This property is set only if + * the task is in the completed state. In general, the exit code for a + * process reflects the specific convention implemented by the application + * developer for that process. If you use the exit code value to make + * decisions in your code, be sure that you know the exit code convention + * used by the application process. However, if the Batch service terminates + * the task (due to timeout, or user termination via the API) you may see an + * operating system-defined exit code. + * @property {object} [executionInfo.containerInfo] This property is set only * if the task runs in a container context. - * @member {string} [executionInfo.containerInfo.containerId] - * @member {string} [executionInfo.containerInfo.state] This is the state of - * the container according to the Docker service. It is equivalent to the + * @property {string} [executionInfo.containerInfo.containerId] + * @property {string} [executionInfo.containerInfo.state] This is the state + * of the container according to the Docker service. It is equivalent to the * status field returned by "docker inspect". - * @member {string} [executionInfo.containerInfo.error] This is the detailed - * error string from the Docker service, if available. It is equivalent to - * the error field returned by "docker inspect". - * @member {object} [executionInfo.failureInfo] This property is set only if - * the task is in the completed state and encountered a failure. - * @member {string} [executionInfo.failureInfo.category] Possible values + * @property {string} [executionInfo.containerInfo.error] This is the + * detailed error string from the Docker service, if available. It is + * equivalent to the error field returned by "docker inspect". + * @property {object} [executionInfo.failureInfo] This property is set only + * if the task is in the completed state and encountered a failure. + * @property {string} [executionInfo.failureInfo.category] Possible values * include: 'userError', 'serverError' - * @member {string} [executionInfo.failureInfo.code] - * @member {string} [executionInfo.failureInfo.message] - * @member {array} [executionInfo.failureInfo.details] - * @member {number} [executionInfo.retryCount] Task application failures + * @property {string} [executionInfo.failureInfo.code] + * @property {string} [executionInfo.failureInfo.message] + * @property {array} [executionInfo.failureInfo.details] + * @property {number} [executionInfo.retryCount] Task application failures * (non-zero exit code) are retried, pre-processing errors (the task could * not be run) and file upload errors are not retried. The Batch service will * retry the task up to the limit specified by the constraints. - * @member {date} [executionInfo.lastRetryTime] This element is present only - * if the task was retried (i.e. retryCount is nonzero). If present, this is - * typically the same as startTime, but may be different if the task has been - * restarted for reasons other than retry; for example, if the compute node - * was rebooted during a retry, then the startTime is updated but the - * lastRetryTime is not. - * @member {number} [executionInfo.requeueCount] When the user removes nodes - * from a pool (by resizing/shrinking the pool) or when the job is being - * disabled, the user can specify that running tasks on the nodes be requeued - * for execution. This count tracks how many times the task has been requeued - * for these reasons. - * @member {date} [executionInfo.lastRequeueTime] This property is set only + * @property {date} [executionInfo.lastRetryTime] This element is present + * only if the task was retried (i.e. retryCount is nonzero). If present, + * this is typically the same as startTime, but may be different if the task + * has been restarted for reasons other than retry; for example, if the + * compute node was rebooted during a retry, then the startTime is updated + * but the lastRetryTime is not. + * @property {number} [executionInfo.requeueCount] When the user removes + * nodes from a pool (by resizing/shrinking the pool) or when the job is + * being disabled, the user can specify that running tasks on the nodes be + * requeued for execution. This count tracks how many times the task has been + * requeued for these reasons. + * @property {date} [executionInfo.lastRequeueTime] This property is set only * if the requeueCount is nonzero. - * @member {string} [executionInfo.result] If the value is 'failed', then the - * details of the failure can be found in the failureInfo property. Possible - * values include: 'success', 'failure' - * @member {object} [nodeInfo] Information about the compute node on which + * @property {string} [executionInfo.result] If the value is 'failed', then + * the details of the failure can be found in the failureInfo property. + * Possible values include: 'success', 'failure' + * @property {object} [nodeInfo] Information about the compute node on which * the task ran. - * @member {string} [nodeInfo.affinityId] - * @member {string} [nodeInfo.nodeUrl] - * @member {string} [nodeInfo.poolId] - * @member {string} [nodeInfo.nodeId] - * @member {string} [nodeInfo.taskRootDirectory] - * @member {string} [nodeInfo.taskRootDirectoryUrl] - * @member {object} [multiInstanceSettings] An object that indicates that the - * task is a multi-instance task, and contains information about how to run - * the multi-instance task. - * @member {number} [multiInstanceSettings.numberOfInstances] If omitted, the - * default is 1. - * @member {string} [multiInstanceSettings.coordinationCommandLine] A typical - * coordination command line launches a background service and verifies that - * the service is ready to process inter-node messages. - * @member {array} [multiInstanceSettings.commonResourceFiles] The difference - * between common resource files and task resource files is that common - * resource files are downloaded for all subtasks including the primary, - * whereas task resource files are downloaded only for the primary. Also note - * that these resource files are not downloaded to the task working + * @property {string} [nodeInfo.affinityId] + * @property {string} [nodeInfo.nodeUrl] + * @property {string} [nodeInfo.poolId] + * @property {string} [nodeInfo.nodeId] + * @property {string} [nodeInfo.taskRootDirectory] + * @property {string} [nodeInfo.taskRootDirectoryUrl] + * @property {object} [multiInstanceSettings] An object that indicates that + * the task is a multi-instance task, and contains information about how to + * run the multi-instance task. + * @property {number} [multiInstanceSettings.numberOfInstances] If omitted, + * the default is 1. + * @property {string} [multiInstanceSettings.coordinationCommandLine] A + * typical coordination command line launches a background service and + * verifies that the service is ready to process inter-node messages. + * @property {array} [multiInstanceSettings.commonResourceFiles] The + * difference between common resource files and task resource files is that + * common resource files are downloaded for all subtasks including the + * primary, whereas task resource files are downloaded only for the primary. + * Also note that these resource files are not downloaded to the task working * directory, but instead are downloaded to the task root directory (one * directory above the working directory). There is a maximum size for the * list of resource files. When the max size is exceeded, the request will * fail and the response error code will be RequestEntityTooLarge. If this * occurs, the collection of ResourceFiles must be reduced in size. This can * be achieved using .zip files, Application Packages, or Docker Containers. - * @member {object} [stats] Resource usage statistics for the task. - * @member {string} [stats.url] - * @member {date} [stats.startTime] - * @member {date} [stats.lastUpdateTime] - * @member {moment.duration} [stats.userCPUTime] - * @member {moment.duration} [stats.kernelCPUTime] - * @member {moment.duration} [stats.wallClockTime] The wall clock time is the - * elapsed time from when the task started running on a compute node to when - * it finished (or to the last time the statistics were updated, if the task - * had not finished by then). If the task was retried, this includes the wall - * clock time of all the task retries. - * @member {number} [stats.readIOps] - * @member {number} [stats.writeIOps] - * @member {number} [stats.readIOGiB] - * @member {number} [stats.writeIOGiB] - * @member {moment.duration} [stats.waitTime] - * @member {object} [dependsOn] The tasks that this task depends on. This + * @property {object} [stats] Resource usage statistics for the task. + * @property {string} [stats.url] + * @property {date} [stats.startTime] + * @property {date} [stats.lastUpdateTime] + * @property {moment.duration} [stats.userCPUTime] + * @property {moment.duration} [stats.kernelCPUTime] + * @property {moment.duration} [stats.wallClockTime] The wall clock time is + * the elapsed time from when the task started running on a compute node to + * when it finished (or to the last time the statistics were updated, if the + * task had not finished by then). If the task was retried, this includes the + * wall clock time of all the task retries. + * @property {number} [stats.readIOps] + * @property {number} [stats.writeIOps] + * @property {number} [stats.readIOGiB] + * @property {number} [stats.writeIOGiB] + * @property {moment.duration} [stats.waitTime] + * @property {object} [dependsOn] The tasks that this task depends on. This * task will not be scheduled until all tasks that it depends on have * completed successfully. If any of those tasks fail and exhaust their retry * counts, this task will never be scheduled. - * @member {array} [dependsOn.taskIds] The taskIds collection is limited to + * @property {array} [dependsOn.taskIds] The taskIds collection is limited to * 64000 characters total (i.e. the combined length of all task IDs). If the * taskIds collection exceeds the maximum length, the Add Task request fails * with error code TaskDependencyListTooLong. In this case consider using * task ID ranges instead. - * @member {array} [dependsOn.taskIdRanges] - * @member {array} [applicationPackageReferences] A list of application + * @property {array} [dependsOn.taskIdRanges] + * @property {array} [applicationPackageReferences] A list of application * packages that the Batch service will deploy to the compute node before * running the command line. Application packages are downloaded and deployed * to a shared directory, not the task working directory. Therefore, if a @@ -307,7 +306,7 @@ class CloudTask { * it is not re-downloaded; the existing copy on the compute node is used. If * a referenced application package cannot be installed, for example because * the package has been deleted or because download failed, the task fails. - * @member {object} [authenticationTokenSettings] The settings for an + * @property {object} [authenticationTokenSettings] The settings for an * authentication token that the task can use to perform Batch service * operations. If this property is set, the Batch service provides the task * with an authentication token which can be used to authenticate Batch @@ -317,7 +316,7 @@ class CloudTask { * settings. For example, a task can request job permissions in order to add * other tasks to the job, or check the status of the job or of other tasks * under the job. - * @member {array} [authenticationTokenSettings.access] The authentication + * @property {array} [authenticationTokenSettings.access] The authentication * token grants access to a limited set of Batch service operations. * Currently the only supported value for the access property is 'job', which * grants access to all operations related to the job which contains the diff --git a/lib/services/batch/lib/models/cloudTaskListResult.js b/lib/services/batch/lib/models/cloudTaskListResult.js index ce9c005566..ca7bb8c0f7 100644 --- a/lib/services/batch/lib/models/cloudTaskListResult.js +++ b/lib/services/batch/lib/models/cloudTaskListResult.js @@ -16,7 +16,7 @@ class CloudTaskListResult extends Array { /** * Create a CloudTaskListResult. - * @member {string} [odatanextLink] + * @property {string} [odatanextLink] */ constructor() { super(); diff --git a/lib/services/batch/lib/models/cloudTaskListSubtasksResult.js b/lib/services/batch/lib/models/cloudTaskListSubtasksResult.js index fccfbcd1d1..f24b36f580 100644 --- a/lib/services/batch/lib/models/cloudTaskListSubtasksResult.js +++ b/lib/services/batch/lib/models/cloudTaskListSubtasksResult.js @@ -17,7 +17,7 @@ class CloudTaskListSubtasksResult { /** * Create a CloudTaskListSubtasksResult. - * @member {array} [value] The list of subtasks. + * @property {array} [value] The list of subtasks. */ constructor() { } diff --git a/lib/services/batch/lib/models/computeNode.js b/lib/services/batch/lib/models/computeNode.js index 52292e2f8b..06638c3f1b 100644 --- a/lib/services/batch/lib/models/computeNode.js +++ b/lib/services/batch/lib/models/computeNode.js @@ -17,55 +17,58 @@ class ComputeNode { /** * Create a ComputeNode. - * @member {string} [id] The ID of the compute node. Every node that is added - * to a pool is assigned a unique ID. Whenever a node is removed from a pool, - * all of its local files are deleted, and the ID is reclaimed and could be - * reused for new nodes. - * @member {string} [url] The URL of the compute node. - * @member {string} [state] The current state of the compute node. The + * @property {string} [id] The ID of the compute node. Every node that is + * added to a pool is assigned a unique ID. Whenever a node is removed from a + * pool, all of its local files are deleted, and the ID is reclaimed and + * could be reused for new nodes. + * @property {string} [url] The URL of the compute node. + * @property {string} [state] The current state of the compute node. The * low-priority node has been preempted. Tasks which were running on the node * when it was pre-empted will be rescheduled when another node becomes * available. Possible values include: 'idle', 'rebooting', 'reimaging', * 'running', 'unusable', 'creating', 'starting', 'waitingForStartTask', * 'startTaskFailed', 'unknown', 'leavingPool', 'offline', 'preempted' - * @member {string} [schedulingState] Whether the compute node is available + * @property {string} [schedulingState] Whether the compute node is available * for task scheduling. Possible values include: 'enabled', 'disabled' - * @member {date} [stateTransitionTime] The time at which the compute node + * @property {date} [stateTransitionTime] The time at which the compute node * entered its current state. - * @member {date} [lastBootTime] The time at which the compute node was - * started. This property may not be present if the node state is unusable. - * @member {date} [allocationTime] The time at which this compute node was - * allocated to the pool. - * @member {string} [ipAddress] The IP address that other compute nodes can + * @property {date} [lastBootTime] The last time at which the compute node + * was started. This property may not be present if the node state is + * unusable. + * @property {date} [allocationTime] The time at which this compute node was + * allocated to the pool. This is the time when the node was initially + * allocated and doesn't change once set. It is not updated when the node is + * service healed or preempted. + * @property {string} [ipAddress] The IP address that other compute nodes can * use to communicate with this compute node. Every node that is added to a * pool is assigned a unique IP address. Whenever a node is removed from a * pool, all of its local files are deleted, and the IP address is reclaimed * and could be reused for new nodes. - * @member {string} [affinityId] An identifier which can be passed when + * @property {string} [affinityId] An identifier which can be passed when * adding a task to request that the task be scheduled on this node. Note * that this is just a soft affinity. If the target node is busy or * unavailable at the time the task is scheduled, then the task will be * scheduled elsewhere. - * @member {string} [vmSize] The size of the virtual machine hosting the + * @property {string} [vmSize] The size of the virtual machine hosting the * compute node. For information about available sizes of virtual machines in * pools, see Choose a VM size for compute nodes in an Azure Batch pool * (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). - * @member {number} [totalTasksRun] The total number of job tasks completed + * @property {number} [totalTasksRun] The total number of job tasks completed * on the compute node. This includes Job Manager tasks and normal tasks, but * not Job Preparation, Job Release or Start tasks. - * @member {number} [runningTasksCount] The total number of currently running - * job tasks on the compute node. This includes Job Manager tasks and normal - * tasks, but not Job Preparation, Job Release or Start tasks. - * @member {number} [totalTasksSucceeded] The total number of job tasks which - * completed successfully (with exitCode 0) on the compute node. This + * @property {number} [runningTasksCount] The total number of currently + * running job tasks on the compute node. This includes Job Manager tasks and + * normal tasks, but not Job Preparation, Job Release or Start tasks. + * @property {number} [totalTasksSucceeded] The total number of job tasks + * which completed successfully (with exitCode 0) on the compute node. This * includes Job Manager tasks and normal tasks, but not Job Preparation, Job * Release or Start tasks. - * @member {array} [recentTasks] A list of tasks whose state has recently + * @property {array} [recentTasks] A list of tasks whose state has recently * changed. This property is present only if at least one task has run on * this node since it was assigned to the pool. - * @member {object} [startTask] The task specified to run on the compute node - * as it joins the pool. - * @member {string} [startTask.commandLine] The command line does not run + * @property {object} [startTask] The task specified to run on the compute + * node as it joins the pool. + * @property {string} [startTask.commandLine] The command line does not run * under a shell, and therefore cannot take advantage of shell features such * as environment variable expansion. If you want to take advantage of such * features, you should invoke the shell in the command line, for example @@ -74,48 +77,48 @@ class ComputeNode { * (relative to the task working directory), or use the Batch provided * environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [startTask.containerSettings] When this is specified, all - * directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of + * @property {object} [startTask.containerSettings] When this is specified, + * all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of * Azure Batch directories on the node) are mapped into the container, all * task environment variables are mapped into the container, and the task * command line is executed in the container. - * @member {string} [startTask.containerSettings.containerRunOptions] These + * @property {string} [startTask.containerSettings.containerRunOptions] These * additional options are supplied as arguments to the "docker create" * command, in addition to those controlled by the Batch Service. - * @member {string} [startTask.containerSettings.imageName] This is the full - * image reference, as would be specified to "docker pull". If no tag is + * @property {string} [startTask.containerSettings.imageName] This is the + * full image reference, as would be specified to "docker pull". If no tag is * provided as part of the image name, the tag ":latest" is used as a * default. - * @member {object} [startTask.containerSettings.registry] This setting can + * @property {object} [startTask.containerSettings.registry] This setting can * be omitted if was already provided at pool creation. - * @member {string} [startTask.containerSettings.registry.registryServer] If - * omitted, the default is "docker.io". - * @member {string} [startTask.containerSettings.registry.userName] - * @member {string} [startTask.containerSettings.registry.password] - * @member {array} [startTask.resourceFiles] Files listed under this element - * are located in the task's working directory. - * @member {array} [startTask.environmentSettings] - * @member {object} [startTask.userIdentity] If omitted, the task runs as a + * @property {string} [startTask.containerSettings.registry.registryServer] + * If omitted, the default is "docker.io". + * @property {string} [startTask.containerSettings.registry.userName] + * @property {string} [startTask.containerSettings.registry.password] + * @property {array} [startTask.resourceFiles] Files listed under this + * element are located in the task's working directory. + * @property {array} [startTask.environmentSettings] + * @property {object} [startTask.userIdentity] If omitted, the task runs as a * non-administrative user unique to the task. - * @member {string} [startTask.userIdentity.userName] The userName and + * @property {string} [startTask.userIdentity.userName] The userName and * autoUser properties are mutually exclusive; you must specify one but not * both. - * @member {object} [startTask.userIdentity.autoUser] The userName and + * @property {object} [startTask.userIdentity.autoUser] The userName and * autoUser properties are mutually exclusive; you must specify one but not * both. - * @member {string} [startTask.userIdentity.autoUser.scope] The default value - * is task. Possible values include: 'task', 'pool' - * @member {string} [startTask.userIdentity.autoUser.elevationLevel] The + * @property {string} [startTask.userIdentity.autoUser.scope] The default + * value is task. Possible values include: 'task', 'pool' + * @property {string} [startTask.userIdentity.autoUser.elevationLevel] The * default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {number} [startTask.maxTaskRetryCount] The Batch service retries a - * task if its exit code is nonzero. Note that this value specifically + * @property {number} [startTask.maxTaskRetryCount] The Batch service retries + * a task if its exit code is nonzero. Note that this value specifically * controls the number of retries. The Batch service will try the task once, * and may then retry up to this limit. For example, if the maximum retry * count is 3, Batch tries the task up to 4 times (one initial try and 3 * retries). If the maximum retry count is 0, the Batch service does not * retry the task. If the maximum retry count is -1, the Batch service * retries the task without limit. - * @member {boolean} [startTask.waitForSuccess] If true and the start task + * @property {boolean} [startTask.waitForSuccess] If true and the start task * fails on a compute node, the Batch service retries the start task up to * its maximum retry count (maxTaskRetryCount). If the task has still not * completed successfully after all retries, then the Batch service marks the @@ -125,77 +128,77 @@ class ComputeNode { * other tasks can start executing on the compute node while the start task * is still running; and even if the start task fails, new tasks will * continue to be scheduled on the node. The default is false. - * @member {object} [startTaskInfo] Runtime information about the execution + * @property {object} [startTaskInfo] Runtime information about the execution * of the start task on the compute node. - * @member {string} [startTaskInfo.state] Possible values include: 'running', - * 'completed' - * @member {date} [startTaskInfo.startTime] This value is reset every time + * @property {string} [startTaskInfo.state] Possible values include: + * 'running', 'completed' + * @property {date} [startTaskInfo.startTime] This value is reset every time * the task is restarted or retried (that is, this is the most recent time at * which the start task started running). - * @member {date} [startTaskInfo.endTime] This is the end time of the most + * @property {date} [startTaskInfo.endTime] This is the end time of the most * recent run of the start task, if that run has completed (even if that run * failed and a retry is pending). This element is not present if the start * task is currently running. - * @member {number} [startTaskInfo.exitCode] This property is set only if the - * start task is in the completed state. In general, the exit code for a + * @property {number} [startTaskInfo.exitCode] This property is set only if + * the start task is in the completed state. In general, the exit code for a * process reflects the specific convention implemented by the application * developer for that process. If you use the exit code value to make * decisions in your code, be sure that you know the exit code convention * used by the application process. However, if the Batch service terminates * the start task (due to timeout, or user termination via the API) you may * see an operating system-defined exit code. - * @member {object} [startTaskInfo.containerInfo] This property is set only + * @property {object} [startTaskInfo.containerInfo] This property is set only * if the task runs in a container context. - * @member {string} [startTaskInfo.containerInfo.containerId] - * @member {string} [startTaskInfo.containerInfo.state] This is the state of - * the container according to the Docker service. It is equivalent to the + * @property {string} [startTaskInfo.containerInfo.containerId] + * @property {string} [startTaskInfo.containerInfo.state] This is the state + * of the container according to the Docker service. It is equivalent to the * status field returned by "docker inspect". - * @member {string} [startTaskInfo.containerInfo.error] This is the detailed - * error string from the Docker service, if available. It is equivalent to - * the error field returned by "docker inspect". - * @member {object} [startTaskInfo.failureInfo] This property is set only if - * the task is in the completed state and encountered a failure. - * @member {string} [startTaskInfo.failureInfo.category] Possible values + * @property {string} [startTaskInfo.containerInfo.error] This is the + * detailed error string from the Docker service, if available. It is + * equivalent to the error field returned by "docker inspect". + * @property {object} [startTaskInfo.failureInfo] This property is set only + * if the task is in the completed state and encountered a failure. + * @property {string} [startTaskInfo.failureInfo.category] Possible values * include: 'userError', 'serverError' - * @member {string} [startTaskInfo.failureInfo.code] - * @member {string} [startTaskInfo.failureInfo.message] - * @member {array} [startTaskInfo.failureInfo.details] - * @member {number} [startTaskInfo.retryCount] Task application failures + * @property {string} [startTaskInfo.failureInfo.code] + * @property {string} [startTaskInfo.failureInfo.message] + * @property {array} [startTaskInfo.failureInfo.details] + * @property {number} [startTaskInfo.retryCount] Task application failures * (non-zero exit code) are retried, pre-processing errors (the task could * not be run) and file upload errors are not retried. The Batch service will * retry the task up to the limit specified by the constraints. - * @member {date} [startTaskInfo.lastRetryTime] This element is present only - * if the task was retried (i.e. retryCount is nonzero). If present, this is - * typically the same as startTime, but may be different if the task has been - * restarted for reasons other than retry; for example, if the compute node - * was rebooted during a retry, then the startTime is updated but the - * lastRetryTime is not. - * @member {string} [startTaskInfo.result] If the value is 'failed', then the - * details of the failure can be found in the failureInfo property. Possible - * values include: 'success', 'failure' - * @member {array} [certificateReferences] The list of certificates installed - * on the compute node. For Windows compute nodes, the Batch service installs - * the certificates to the specified certificate store and location. For - * Linux compute nodes, the certificates are stored in a directory inside the - * task working directory and an environment variable + * @property {date} [startTaskInfo.lastRetryTime] This element is present + * only if the task was retried (i.e. retryCount is nonzero). If present, + * this is typically the same as startTime, but may be different if the task + * has been restarted for reasons other than retry; for example, if the + * compute node was rebooted during a retry, then the startTime is updated + * but the lastRetryTime is not. + * @property {string} [startTaskInfo.result] If the value is 'failed', then + * the details of the failure can be found in the failureInfo property. + * Possible values include: 'success', 'failure' + * @property {array} [certificateReferences] The list of certificates + * installed on the compute node. For Windows compute nodes, the Batch + * service installs the certificates to the specified certificate store and + * location. For Linux compute nodes, the certificates are stored in a + * directory inside the task working directory and an environment variable * AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this * location. For certificates with visibility of 'remoteUser', a 'certs' * directory is created in the user's home directory (e.g., * /home/{user-name}/certs) and certificates are placed in that directory. - * @member {array} [errors] The list of errors that are currently being + * @property {array} [errors] The list of errors that are currently being * encountered by the compute node. - * @member {boolean} [isDedicated] Whether this compute node is a dedicated + * @property {boolean} [isDedicated] Whether this compute node is a dedicated * node. If false, the node is a low-priority node. - * @member {object} [endpointConfiguration] The endpoint configuration for + * @property {object} [endpointConfiguration] The endpoint configuration for * the compute node. - * @member {array} [endpointConfiguration.inboundEndpoints] - * @member {object} [nodeAgentInfo] Information about the node agent version - * and the time the node upgraded to a new version. - * @member {string} [nodeAgentInfo.version] This version number can be + * @property {array} [endpointConfiguration.inboundEndpoints] + * @property {object} [nodeAgentInfo] Information about the node agent + * version and the time the node upgraded to a new version. + * @property {string} [nodeAgentInfo.version] This version number can be * checked against the node agent release notes located at * https://github.com/Azure/Batch/blob/master/changelogs/nodeagent/CHANGELOG.md. - * @member {date} [nodeAgentInfo.lastUpdateTime] This is the most recent time - * that the node agent was updated to a new version. + * @property {date} [nodeAgentInfo.lastUpdateTime] This is the most recent + * time that the node agent was updated to a new version. */ constructor() { } diff --git a/lib/services/batch/lib/models/computeNodeAddUserOptions.js b/lib/services/batch/lib/models/computeNodeAddUserOptions.js index 50f65be709..04d092ae99 100644 --- a/lib/services/batch/lib/models/computeNodeAddUserOptions.js +++ b/lib/services/batch/lib/models/computeNodeAddUserOptions.js @@ -17,17 +17,17 @@ class ComputeNodeAddUserOptions { /** * Create a ComputeNodeAddUserOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/computeNodeDeleteUserOptions.js b/lib/services/batch/lib/models/computeNodeDeleteUserOptions.js index 1fd52818c8..eb67500f00 100644 --- a/lib/services/batch/lib/models/computeNodeDeleteUserOptions.js +++ b/lib/services/batch/lib/models/computeNodeDeleteUserOptions.js @@ -17,17 +17,17 @@ class ComputeNodeDeleteUserOptions { /** * Create a ComputeNodeDeleteUserOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/computeNodeDisableSchedulingOptions.js b/lib/services/batch/lib/models/computeNodeDisableSchedulingOptions.js index dd7c2b5149..cd3a837fbe 100644 --- a/lib/services/batch/lib/models/computeNodeDisableSchedulingOptions.js +++ b/lib/services/batch/lib/models/computeNodeDisableSchedulingOptions.js @@ -17,17 +17,17 @@ class ComputeNodeDisableSchedulingOptions { /** * Create a ComputeNodeDisableSchedulingOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/computeNodeEnableSchedulingOptions.js b/lib/services/batch/lib/models/computeNodeEnableSchedulingOptions.js index 7e0e1786e3..6c953ecac3 100644 --- a/lib/services/batch/lib/models/computeNodeEnableSchedulingOptions.js +++ b/lib/services/batch/lib/models/computeNodeEnableSchedulingOptions.js @@ -17,17 +17,17 @@ class ComputeNodeEnableSchedulingOptions { /** * Create a ComputeNodeEnableSchedulingOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/computeNodeEndpointConfiguration.js b/lib/services/batch/lib/models/computeNodeEndpointConfiguration.js index a9fec5f081..635a95b6e3 100644 --- a/lib/services/batch/lib/models/computeNodeEndpointConfiguration.js +++ b/lib/services/batch/lib/models/computeNodeEndpointConfiguration.js @@ -17,7 +17,7 @@ class ComputeNodeEndpointConfiguration { /** * Create a ComputeNodeEndpointConfiguration. - * @member {array} inboundEndpoints The list of inbound endpoints that are + * @property {array} inboundEndpoints The list of inbound endpoints that are * accessible on the compute node. */ constructor() { diff --git a/lib/services/batch/lib/models/computeNodeError.js b/lib/services/batch/lib/models/computeNodeError.js index 36882f6b95..9bf86e453b 100644 --- a/lib/services/batch/lib/models/computeNodeError.js +++ b/lib/services/batch/lib/models/computeNodeError.js @@ -17,11 +17,11 @@ class ComputeNodeError { /** * Create a ComputeNodeError. - * @member {string} [code] An identifier for the compute node error. Codes + * @property {string} [code] An identifier for the compute node error. Codes * are invariant and are intended to be consumed programmatically. - * @member {string} [message] A message describing the compute node error, + * @property {string} [message] A message describing the compute node error, * intended to be suitable for display in a user interface. - * @member {array} [errorDetails] The list of additional error details + * @property {array} [errorDetails] The list of additional error details * related to the compute node error. */ constructor() { diff --git a/lib/services/batch/lib/models/computeNodeGetOptions.js b/lib/services/batch/lib/models/computeNodeGetOptions.js index 754c25cb36..3a1104477a 100644 --- a/lib/services/batch/lib/models/computeNodeGetOptions.js +++ b/lib/services/batch/lib/models/computeNodeGetOptions.js @@ -17,18 +17,18 @@ class ComputeNodeGetOptions { /** * Create a ComputeNodeGetOptions. - * @member {string} [select] An OData $select clause. - * @member {number} [timeout] The maximum time that the server can spend + * @property {string} [select] An OData $select clause. + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/computeNodeGetRemoteDesktopOptions.js b/lib/services/batch/lib/models/computeNodeGetRemoteDesktopOptions.js index 65cfb2f3f2..e84a8f12a0 100644 --- a/lib/services/batch/lib/models/computeNodeGetRemoteDesktopOptions.js +++ b/lib/services/batch/lib/models/computeNodeGetRemoteDesktopOptions.js @@ -17,17 +17,17 @@ class ComputeNodeGetRemoteDesktopOptions { /** * Create a ComputeNodeGetRemoteDesktopOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/computeNodeGetRemoteLoginSettingsOptions.js b/lib/services/batch/lib/models/computeNodeGetRemoteLoginSettingsOptions.js index cd6515f5e4..deb091cda9 100644 --- a/lib/services/batch/lib/models/computeNodeGetRemoteLoginSettingsOptions.js +++ b/lib/services/batch/lib/models/computeNodeGetRemoteLoginSettingsOptions.js @@ -17,17 +17,17 @@ class ComputeNodeGetRemoteLoginSettingsOptions { /** * Create a ComputeNodeGetRemoteLoginSettingsOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/computeNodeGetRemoteLoginSettingsResult.js b/lib/services/batch/lib/models/computeNodeGetRemoteLoginSettingsResult.js index 9aabced135..df58b9cb6a 100644 --- a/lib/services/batch/lib/models/computeNodeGetRemoteLoginSettingsResult.js +++ b/lib/services/batch/lib/models/computeNodeGetRemoteLoginSettingsResult.js @@ -17,9 +17,9 @@ class ComputeNodeGetRemoteLoginSettingsResult { /** * Create a ComputeNodeGetRemoteLoginSettingsResult. - * @member {string} remoteLoginIPAddress The IP address used for remote login - * to the compute node. - * @member {number} remoteLoginPort The port used for remote login to the + * @property {string} remoteLoginIPAddress The IP address used for remote + * login to the compute node. + * @property {number} remoteLoginPort The port used for remote login to the * compute node. */ constructor() { diff --git a/lib/services/batch/lib/models/computeNodeInformation.js b/lib/services/batch/lib/models/computeNodeInformation.js index 1e656577ef..9ba1008961 100644 --- a/lib/services/batch/lib/models/computeNodeInformation.js +++ b/lib/services/batch/lib/models/computeNodeInformation.js @@ -17,15 +17,15 @@ class ComputeNodeInformation { /** * Create a ComputeNodeInformation. - * @member {string} [affinityId] An identifier for the compute node on which - * the task ran, which can be passed when adding a task to request that the - * task be scheduled on this compute node. - * @member {string} [nodeUrl] The URL of the node on which the task ran. . - * @member {string} [poolId] The ID of the pool on which the task ran. - * @member {string} [nodeId] The ID of the node on which the task ran. - * @member {string} [taskRootDirectory] The root directory of the task on the - * compute node. - * @member {string} [taskRootDirectoryUrl] The URL to the root directory of + * @property {string} [affinityId] An identifier for the compute node on + * which the task ran, which can be passed when adding a task to request that + * the task be scheduled on this compute node. + * @property {string} [nodeUrl] The URL of the node on which the task ran. . + * @property {string} [poolId] The ID of the pool on which the task ran. + * @property {string} [nodeId] The ID of the node on which the task ran. + * @property {string} [taskRootDirectory] The root directory of the task on + * the compute node. + * @property {string} [taskRootDirectoryUrl] The URL to the root directory of * the task on the compute node. */ constructor() { diff --git a/lib/services/batch/lib/models/computeNodeListNextOptions.js b/lib/services/batch/lib/models/computeNodeListNextOptions.js index 728b6d2fa7..60a3979ae2 100644 --- a/lib/services/batch/lib/models/computeNodeListNextOptions.js +++ b/lib/services/batch/lib/models/computeNodeListNextOptions.js @@ -17,14 +17,14 @@ class ComputeNodeListNextOptions { /** * Create a ComputeNodeListNextOptions. - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/computeNodeListOptions.js b/lib/services/batch/lib/models/computeNodeListOptions.js index 886f9bc23b..aa989158a8 100644 --- a/lib/services/batch/lib/models/computeNodeListOptions.js +++ b/lib/services/batch/lib/models/computeNodeListOptions.js @@ -17,23 +17,24 @@ class ComputeNodeListOptions { /** * Create a ComputeNodeListOptions. - * @member {string} [filter] An OData $filter clause. For more information on - * constructing this filter, see + * @property {string} [filter] An OData $filter clause. For more information + * on constructing this filter, see * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-nodes-in-a-pool. - * @member {string} [select] An OData $select clause. - * @member {number} [maxResults] The maximum number of items to return in the - * response. A maximum of 1000 nodes can be returned. Default value: 1000 . - * @member {number} [timeout] The maximum time that the server can spend + * @property {string} [select] An OData $select clause. + * @property {number} [maxResults] The maximum number of items to return in + * the response. A maximum of 1000 nodes can be returned. Default value: 1000 + * . + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/computeNodeListResult.js b/lib/services/batch/lib/models/computeNodeListResult.js index 194f7068be..66375f2392 100644 --- a/lib/services/batch/lib/models/computeNodeListResult.js +++ b/lib/services/batch/lib/models/computeNodeListResult.js @@ -16,7 +16,7 @@ class ComputeNodeListResult extends Array { /** * Create a ComputeNodeListResult. - * @member {string} [odatanextLink] + * @property {string} [odatanextLink] */ constructor() { super(); diff --git a/lib/services/batch/lib/models/computeNodeRebootOptions.js b/lib/services/batch/lib/models/computeNodeRebootOptions.js index 1ab5ddb763..2cd4c3c7ac 100644 --- a/lib/services/batch/lib/models/computeNodeRebootOptions.js +++ b/lib/services/batch/lib/models/computeNodeRebootOptions.js @@ -17,17 +17,17 @@ class ComputeNodeRebootOptions { /** * Create a ComputeNodeRebootOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/computeNodeReimageOptions.js b/lib/services/batch/lib/models/computeNodeReimageOptions.js index cf2498028f..83f17abcbe 100644 --- a/lib/services/batch/lib/models/computeNodeReimageOptions.js +++ b/lib/services/batch/lib/models/computeNodeReimageOptions.js @@ -17,17 +17,17 @@ class ComputeNodeReimageOptions { /** * Create a ComputeNodeReimageOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/computeNodeUpdateUserOptions.js b/lib/services/batch/lib/models/computeNodeUpdateUserOptions.js index 5be43b9db5..4ee42a1af6 100644 --- a/lib/services/batch/lib/models/computeNodeUpdateUserOptions.js +++ b/lib/services/batch/lib/models/computeNodeUpdateUserOptions.js @@ -17,17 +17,17 @@ class ComputeNodeUpdateUserOptions { /** * Create a ComputeNodeUpdateUserOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/computeNodeUploadBatchServiceLogsOptions.js b/lib/services/batch/lib/models/computeNodeUploadBatchServiceLogsOptions.js index b84666aa52..ed3ace6d95 100644 --- a/lib/services/batch/lib/models/computeNodeUploadBatchServiceLogsOptions.js +++ b/lib/services/batch/lib/models/computeNodeUploadBatchServiceLogsOptions.js @@ -17,17 +17,17 @@ class ComputeNodeUploadBatchServiceLogsOptions { /** * Create a ComputeNodeUploadBatchServiceLogsOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/computeNodeUser.js b/lib/services/batch/lib/models/computeNodeUser.js index f7dc170d58..d98a5436e0 100644 --- a/lib/services/batch/lib/models/computeNodeUser.js +++ b/lib/services/batch/lib/models/computeNodeUser.js @@ -17,18 +17,18 @@ class ComputeNodeUser { /** * Create a ComputeNodeUser. - * @member {string} name The user name of the account. - * @member {boolean} [isAdmin] Whether the account should be an administrator - * on the compute node. The default value is false. - * @member {date} [expiryTime] The time at which the account should expire. + * @property {string} name The user name of the account. + * @property {boolean} [isAdmin] Whether the account should be an + * administrator on the compute node. The default value is false. + * @property {date} [expiryTime] The time at which the account should expire. * If omitted, the default is 1 day from the current time. For Linux compute * nodes, the expiryTime has a precision up to a day. - * @member {string} [password] The password of the account. The password is + * @property {string} [password] The password of the account. The password is * required for Windows nodes (those created with * 'cloudServiceConfiguration', or created with 'virtualMachineConfiguration' * using a Windows image reference). For Linux compute nodes, the password * can optionally be specified along with the sshPublicKey property. - * @member {string} [sshPublicKey] The SSH public key that can be used for + * @property {string} [sshPublicKey] The SSH public key that can be used for * remote login to the compute node. The public key should be compatible with * OpenSSH encoding and should be base 64 encoded. This property can be * specified only for Linux nodes. If this is specified for a Windows node, diff --git a/lib/services/batch/lib/models/containerConfiguration.js b/lib/services/batch/lib/models/containerConfiguration.js index bf22b4ff77..53e3b2806f 100644 --- a/lib/services/batch/lib/models/containerConfiguration.js +++ b/lib/services/batch/lib/models/containerConfiguration.js @@ -17,11 +17,11 @@ class ContainerConfiguration { /** * Create a ContainerConfiguration. - * @member {array} [containerImageNames] The collection of container image + * @property {array} [containerImageNames] The collection of container image * names. This is the full image reference, as would be specified to "docker * pull". An image will be sourced from the default Docker registry unless * the image is fully qualified with an alternative registry. - * @member {array} [containerRegistries] Additional private registries from + * @property {array} [containerRegistries] Additional private registries from * which containers can be pulled. If any images must be downloaded from a * private registry which requires credentials, then those credentials must * be provided here. diff --git a/lib/services/batch/lib/models/containerRegistry.js b/lib/services/batch/lib/models/containerRegistry.js index 77cdf09c70..474dd98ce2 100644 --- a/lib/services/batch/lib/models/containerRegistry.js +++ b/lib/services/batch/lib/models/containerRegistry.js @@ -17,10 +17,10 @@ class ContainerRegistry { /** * Create a ContainerRegistry. - * @member {string} [registryServer] The registry URL. If omitted, the + * @property {string} [registryServer] The registry URL. If omitted, the * default is "docker.io". - * @member {string} userName The user name to log into the registry server. - * @member {string} password The password to log into the registry server. + * @property {string} userName The user name to log into the registry server. + * @property {string} password The password to log into the registry server. */ constructor() { } diff --git a/lib/services/batch/lib/models/dataDisk.js b/lib/services/batch/lib/models/dataDisk.js index 5bbb1e9de8..03efcd92d5 100644 --- a/lib/services/batch/lib/models/dataDisk.js +++ b/lib/services/batch/lib/models/dataDisk.js @@ -18,18 +18,18 @@ class DataDisk { /** * Create a DataDisk. - * @member {number} lun The logical unit number. The lun is used to uniquely - * identify each data disk. If attaching multiple disks, each should have a - * distinct lun. - * @member {string} [caching] The type of caching to be enabled for the data - * disks. The default value for caching is readwrite. For information about - * the caching options see: + * @property {number} lun The logical unit number. The lun is used to + * uniquely identify each data disk. If attaching multiple disks, each should + * have a distinct lun. + * @property {string} [caching] The type of caching to be enabled for the + * data disks. The default value for caching is readwrite. For information + * about the caching options see: * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. * Possible values include: 'none', 'readOnly', 'readWrite' - * @member {number} diskSizeGB The initial disk size in gigabytes. - * @member {string} [storageAccountType] The storage account type to be used - * for the data disk. If omitted, the default is "standard_lrs". Possible - * values include: 'StandardLRS', 'PremiumLRS' + * @property {number} diskSizeGB The initial disk size in gigabytes. + * @property {string} [storageAccountType] The storage account type to be + * used for the data disk. If omitted, the default is "standard_lrs". + * Possible values include: 'StandardLRS', 'PremiumLRS' */ constructor() { } diff --git a/lib/services/batch/lib/models/deleteCertificateError.js b/lib/services/batch/lib/models/deleteCertificateError.js index 8e5f8229d1..f3ec87e643 100644 --- a/lib/services/batch/lib/models/deleteCertificateError.js +++ b/lib/services/batch/lib/models/deleteCertificateError.js @@ -18,15 +18,16 @@ class DeleteCertificateError { /** * Create a DeleteCertificateError. - * @member {string} [code] An identifier for the certificate deletion error. - * Codes are invariant and are intended to be consumed programmatically. - * @member {string} [message] A message describing the certificate deletion + * @property {string} [code] An identifier for the certificate deletion + * error. Codes are invariant and are intended to be consumed + * programmatically. + * @property {string} [message] A message describing the certificate deletion * error, intended to be suitable for display in a user interface. - * @member {array} [values] A list of additional error details related to the - * certificate deletion error. This list includes details such as the active - * pools and nodes referencing this certificate. However, if a large number - * of resources reference the certificate, the list contains only about the - * first hundred. + * @property {array} [values] A list of additional error details related to + * the certificate deletion error. This list includes details such as the + * active pools and nodes referencing this certificate. However, if a large + * number of resources reference the certificate, the list contains only + * about the first hundred. */ constructor() { } diff --git a/lib/services/batch/lib/models/environmentSetting.js b/lib/services/batch/lib/models/environmentSetting.js index ec9e7842c4..c2a0647326 100644 --- a/lib/services/batch/lib/models/environmentSetting.js +++ b/lib/services/batch/lib/models/environmentSetting.js @@ -17,8 +17,8 @@ class EnvironmentSetting { /** * Create a EnvironmentSetting. - * @member {string} name The name of the environment variable. - * @member {string} [value] The value of the environment variable. + * @property {string} name The name of the environment variable. + * @property {string} [value] The value of the environment variable. */ constructor() { } diff --git a/lib/services/batch/lib/models/errorMessage.js b/lib/services/batch/lib/models/errorMessage.js index 982b23457a..adecf89091 100644 --- a/lib/services/batch/lib/models/errorMessage.js +++ b/lib/services/batch/lib/models/errorMessage.js @@ -17,8 +17,8 @@ class ErrorMessage { /** * Create a ErrorMessage. - * @member {string} [lang] The language code of the error message. - * @member {string} [value] The text of the message. + * @property {string} [lang] The language code of the error message. + * @property {string} [value] The text of the message. */ constructor() { } diff --git a/lib/services/batch/lib/models/exitCodeMapping.js b/lib/services/batch/lib/models/exitCodeMapping.js index eb0f31a4e3..c329d4cfb9 100644 --- a/lib/services/batch/lib/models/exitCodeMapping.js +++ b/lib/services/batch/lib/models/exitCodeMapping.js @@ -18,16 +18,16 @@ class ExitCodeMapping { /** * Create a ExitCodeMapping. - * @member {number} code A process exit code. - * @member {object} exitOptions How the Batch service should respond if the + * @property {number} code A process exit code. + * @property {object} exitOptions How the Batch service should respond if the * task exits with this exit code. - * @member {string} [exitOptions.jobAction] The default is none for exit code - * 0 and terminate for all other exit conditions. If the job's onTaskFailed - * property is noaction, then specifying this property returns an error and - * the add task request fails with an invalid property value error; if you - * are calling the REST API directly, the HTTP status code is 400 (Bad - * Request). Possible values include: 'none', 'disable', 'terminate' - * @member {string} [exitOptions.dependencyAction] The default is 'satisfy' + * @property {string} [exitOptions.jobAction] The default is none for exit + * code 0 and terminate for all other exit conditions. If the job's + * onTaskFailed property is noaction, then specifying this property returns + * an error and the add task request fails with an invalid property value + * error; if you are calling the REST API directly, the HTTP status code is + * 400 (Bad Request). Possible values include: 'none', 'disable', 'terminate' + * @property {string} [exitOptions.dependencyAction] The default is 'satisfy' * for exit code 0, and 'block' for all other exit conditions. If the job's * usesTaskDependencies property is set to false, then specifying the * dependencyAction property returns an error and the add task request fails diff --git a/lib/services/batch/lib/models/exitCodeRangeMapping.js b/lib/services/batch/lib/models/exitCodeRangeMapping.js index f11c7af958..5c137b2970 100644 --- a/lib/services/batch/lib/models/exitCodeRangeMapping.js +++ b/lib/services/batch/lib/models/exitCodeRangeMapping.js @@ -18,17 +18,17 @@ class ExitCodeRangeMapping { /** * Create a ExitCodeRangeMapping. - * @member {number} start The first exit code in the range. - * @member {number} end The last exit code in the range. - * @member {object} exitOptions How the Batch service should respond if the + * @property {number} start The first exit code in the range. + * @property {number} end The last exit code in the range. + * @property {object} exitOptions How the Batch service should respond if the * task exits with an exit code in the range start to end (inclusive). - * @member {string} [exitOptions.jobAction] The default is none for exit code - * 0 and terminate for all other exit conditions. If the job's onTaskFailed - * property is noaction, then specifying this property returns an error and - * the add task request fails with an invalid property value error; if you - * are calling the REST API directly, the HTTP status code is 400 (Bad - * Request). Possible values include: 'none', 'disable', 'terminate' - * @member {string} [exitOptions.dependencyAction] The default is 'satisfy' + * @property {string} [exitOptions.jobAction] The default is none for exit + * code 0 and terminate for all other exit conditions. If the job's + * onTaskFailed property is noaction, then specifying this property returns + * an error and the add task request fails with an invalid property value + * error; if you are calling the REST API directly, the HTTP status code is + * 400 (Bad Request). Possible values include: 'none', 'disable', 'terminate' + * @property {string} [exitOptions.dependencyAction] The default is 'satisfy' * for exit code 0, and 'block' for all other exit conditions. If the job's * usesTaskDependencies property is set to false, then specifying the * dependencyAction property returns an error and the add task request fails diff --git a/lib/services/batch/lib/models/exitConditions.js b/lib/services/batch/lib/models/exitConditions.js index c6fa31a831..4d4cd105ad 100644 --- a/lib/services/batch/lib/models/exitConditions.js +++ b/lib/services/batch/lib/models/exitConditions.js @@ -18,57 +18,57 @@ class ExitConditions { /** * Create a ExitConditions. - * @member {array} [exitCodes] A list of individual task exit codes and how + * @property {array} [exitCodes] A list of individual task exit codes and how * the Batch service should respond to them. - * @member {array} [exitCodeRanges] A list of task exit code ranges and how + * @property {array} [exitCodeRanges] A list of task exit code ranges and how * the Batch service should respond to them. - * @member {object} [preProcessingError] How the Batch service should respond - * if the task fails to start due to an error. - * @member {string} [preProcessingError.jobAction] The default is none for + * @property {object} [preProcessingError] How the Batch service should + * respond if the task fails to start due to an error. + * @property {string} [preProcessingError.jobAction] The default is none for * exit code 0 and terminate for all other exit conditions. If the job's * onTaskFailed property is noaction, then specifying this property returns * an error and the add task request fails with an invalid property value * error; if you are calling the REST API directly, the HTTP status code is * 400 (Bad Request). Possible values include: 'none', 'disable', 'terminate' - * @member {string} [preProcessingError.dependencyAction] The default is + * @property {string} [preProcessingError.dependencyAction] The default is * 'satisfy' for exit code 0, and 'block' for all other exit conditions. If * the job's usesTaskDependencies property is set to false, then specifying * the dependencyAction property returns an error and the add task request * fails with an invalid property value error; if you are calling the REST * API directly, the HTTP status code is 400 (Bad Request). Possible values * include: 'satisfy', 'block' - * @member {object} [fileUploadError] How the Batch service should respond if - * a file upload error occurs. If the task exited with an exit code that was - * specified via exitCodes or exitCodeRanges, and then encountered a file + * @property {object} [fileUploadError] How the Batch service should respond + * if a file upload error occurs. If the task exited with an exit code that + * was specified via exitCodes or exitCodeRanges, and then encountered a file * upload error, then the action specified by the exit code takes precedence. - * @member {string} [fileUploadError.jobAction] The default is none for exit - * code 0 and terminate for all other exit conditions. If the job's + * @property {string} [fileUploadError.jobAction] The default is none for + * exit code 0 and terminate for all other exit conditions. If the job's * onTaskFailed property is noaction, then specifying this property returns * an error and the add task request fails with an invalid property value * error; if you are calling the REST API directly, the HTTP status code is * 400 (Bad Request). Possible values include: 'none', 'disable', 'terminate' - * @member {string} [fileUploadError.dependencyAction] The default is + * @property {string} [fileUploadError.dependencyAction] The default is * 'satisfy' for exit code 0, and 'block' for all other exit conditions. If * the job's usesTaskDependencies property is set to false, then specifying * the dependencyAction property returns an error and the add task request * fails with an invalid property value error; if you are calling the REST * API directly, the HTTP status code is 400 (Bad Request). Possible values * include: 'satisfy', 'block' - * @member {object} [default] How the Batch service should respond if the + * @property {object} [default] How the Batch service should respond if the * task fails with an exit condition not covered by any of the other * properties. This value is used if the task exits with any nonzero exit * code not listed in the exitCodes or exitCodeRanges collection, with a * pre-processing error if the preProcessingError property is not present, or * with a file upload error if the fileUploadError property is not present. - * If you want non-default behaviour on exit code 0, you must list it + * If you want non-default behavior on exit code 0, you must list it * explicitly using the exitCodes or exitCodeRanges collection. - * @member {string} [default.jobAction] The default is none for exit code 0 + * @property {string} [default.jobAction] The default is none for exit code 0 * and terminate for all other exit conditions. If the job's onTaskFailed * property is noaction, then specifying this property returns an error and * the add task request fails with an invalid property value error; if you * are calling the REST API directly, the HTTP status code is 400 (Bad * Request). Possible values include: 'none', 'disable', 'terminate' - * @member {string} [default.dependencyAction] The default is 'satisfy' for + * @property {string} [default.dependencyAction] The default is 'satisfy' for * exit code 0, and 'block' for all other exit conditions. If the job's * usesTaskDependencies property is set to false, then specifying the * dependencyAction property returns an error and the add task request fails diff --git a/lib/services/batch/lib/models/exitOptions.js b/lib/services/batch/lib/models/exitOptions.js index 9b3bb458eb..0edfacf4fa 100644 --- a/lib/services/batch/lib/models/exitOptions.js +++ b/lib/services/batch/lib/models/exitOptions.js @@ -18,7 +18,7 @@ class ExitOptions { /** * Create a ExitOptions. - * @member {string} [jobAction] An action to take on the job containing the + * @property {string} [jobAction] An action to take on the job containing the * task, if the task completes with the given exit condition and the job's * onTaskFailed property is 'performExitOptionsJobAction'. The default is * none for exit code 0 and terminate for all other exit conditions. If the @@ -27,7 +27,7 @@ class ExitOptions { * value error; if you are calling the REST API directly, the HTTP status * code is 400 (Bad Request). Possible values include: 'none', 'disable', * 'terminate' - * @member {string} [dependencyAction] An action that the Batch service + * @property {string} [dependencyAction] An action that the Batch service * performs on tasks that depend on this task. The default is 'satisfy' for * exit code 0, and 'block' for all other exit conditions. If the job's * usesTaskDependencies property is set to false, then specifying the diff --git a/lib/services/batch/lib/models/fileDeleteFromComputeNodeOptions.js b/lib/services/batch/lib/models/fileDeleteFromComputeNodeOptions.js index faa5345454..6c376b95a2 100644 --- a/lib/services/batch/lib/models/fileDeleteFromComputeNodeOptions.js +++ b/lib/services/batch/lib/models/fileDeleteFromComputeNodeOptions.js @@ -17,17 +17,17 @@ class FileDeleteFromComputeNodeOptions { /** * Create a FileDeleteFromComputeNodeOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/fileDeleteFromTaskOptions.js b/lib/services/batch/lib/models/fileDeleteFromTaskOptions.js index 2ce0af06f9..9cbc0086bf 100644 --- a/lib/services/batch/lib/models/fileDeleteFromTaskOptions.js +++ b/lib/services/batch/lib/models/fileDeleteFromTaskOptions.js @@ -17,17 +17,17 @@ class FileDeleteFromTaskOptions { /** * Create a FileDeleteFromTaskOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/fileGetFromComputeNodeOptions.js b/lib/services/batch/lib/models/fileGetFromComputeNodeOptions.js index ea2c540205..f31041ef5d 100644 --- a/lib/services/batch/lib/models/fileGetFromComputeNodeOptions.js +++ b/lib/services/batch/lib/models/fileGetFromComputeNodeOptions.js @@ -17,24 +17,24 @@ class FileGetFromComputeNodeOptions { /** * Create a FileGetFromComputeNodeOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ocpRange] The byte range to be retrieved. The default is - * to retrieve the entire file. The format is bytes=startRange-endRange. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. + * @property {string} [ocpRange] The byte range to be retrieved. The default + * is to retrieve the entire file. The format is bytes=startRange-endRange. + * @property {date} [ifModifiedSince] A timestamp indicating the last + * modified time of the resource known to the client. The operation will be + * performed only if the resource on the service has been modified since the + * specified time. + * @property {date} [ifUnmodifiedSince] A timestamp indicating the last * modified time of the resource known to the client. The operation will be * performed only if the resource on the service has not been modified since * the specified time. diff --git a/lib/services/batch/lib/models/fileGetFromTaskOptions.js b/lib/services/batch/lib/models/fileGetFromTaskOptions.js index 190dbfe023..9bfe21c38a 100644 --- a/lib/services/batch/lib/models/fileGetFromTaskOptions.js +++ b/lib/services/batch/lib/models/fileGetFromTaskOptions.js @@ -17,24 +17,24 @@ class FileGetFromTaskOptions { /** * Create a FileGetFromTaskOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ocpRange] The byte range to be retrieved. The default is - * to retrieve the entire file. The format is bytes=startRange-endRange. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. + * @property {string} [ocpRange] The byte range to be retrieved. The default + * is to retrieve the entire file. The format is bytes=startRange-endRange. + * @property {date} [ifModifiedSince] A timestamp indicating the last + * modified time of the resource known to the client. The operation will be + * performed only if the resource on the service has been modified since the + * specified time. + * @property {date} [ifUnmodifiedSince] A timestamp indicating the last * modified time of the resource known to the client. The operation will be * performed only if the resource on the service has not been modified since * the specified time. diff --git a/lib/services/batch/lib/models/fileGetPropertiesFromComputeNodeOptions.js b/lib/services/batch/lib/models/fileGetPropertiesFromComputeNodeOptions.js index 199eb0df63..48fa29b1bc 100644 --- a/lib/services/batch/lib/models/fileGetPropertiesFromComputeNodeOptions.js +++ b/lib/services/batch/lib/models/fileGetPropertiesFromComputeNodeOptions.js @@ -17,22 +17,22 @@ class FileGetPropertiesFromComputeNodeOptions { /** * Create a FileGetPropertiesFromComputeNodeOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. + * @property {date} [ifModifiedSince] A timestamp indicating the last + * modified time of the resource known to the client. The operation will be + * performed only if the resource on the service has been modified since the + * specified time. + * @property {date} [ifUnmodifiedSince] A timestamp indicating the last * modified time of the resource known to the client. The operation will be * performed only if the resource on the service has not been modified since * the specified time. diff --git a/lib/services/batch/lib/models/fileGetPropertiesFromTaskOptions.js b/lib/services/batch/lib/models/fileGetPropertiesFromTaskOptions.js index 8bfb841abe..9e4a374e9a 100644 --- a/lib/services/batch/lib/models/fileGetPropertiesFromTaskOptions.js +++ b/lib/services/batch/lib/models/fileGetPropertiesFromTaskOptions.js @@ -17,22 +17,22 @@ class FileGetPropertiesFromTaskOptions { /** * Create a FileGetPropertiesFromTaskOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. + * @property {date} [ifModifiedSince] A timestamp indicating the last + * modified time of the resource known to the client. The operation will be + * performed only if the resource on the service has been modified since the + * specified time. + * @property {date} [ifUnmodifiedSince] A timestamp indicating the last * modified time of the resource known to the client. The operation will be * performed only if the resource on the service has not been modified since * the specified time. diff --git a/lib/services/batch/lib/models/fileListFromComputeNodeNextOptions.js b/lib/services/batch/lib/models/fileListFromComputeNodeNextOptions.js index 5d38496aaa..dca1fd3115 100644 --- a/lib/services/batch/lib/models/fileListFromComputeNodeNextOptions.js +++ b/lib/services/batch/lib/models/fileListFromComputeNodeNextOptions.js @@ -17,14 +17,14 @@ class FileListFromComputeNodeNextOptions { /** * Create a FileListFromComputeNodeNextOptions. - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/fileListFromComputeNodeOptions.js b/lib/services/batch/lib/models/fileListFromComputeNodeOptions.js index 46da36e364..d7259ab1c0 100644 --- a/lib/services/batch/lib/models/fileListFromComputeNodeOptions.js +++ b/lib/services/batch/lib/models/fileListFromComputeNodeOptions.js @@ -17,22 +17,23 @@ class FileListFromComputeNodeOptions { /** * Create a FileListFromComputeNodeOptions. - * @member {string} [filter] An OData $filter clause. For more information on - * constructing this filter, see + * @property {string} [filter] An OData $filter clause. For more information + * on constructing this filter, see * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-compute-node-files. - * @member {number} [maxResults] The maximum number of items to return in the - * response. A maximum of 1000 files can be returned. Default value: 1000 . - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [maxResults] The maximum number of items to return in + * the response. A maximum of 1000 files can be returned. Default value: 1000 + * . + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/fileListFromTaskNextOptions.js b/lib/services/batch/lib/models/fileListFromTaskNextOptions.js index 30a2d2d95f..c6b2770901 100644 --- a/lib/services/batch/lib/models/fileListFromTaskNextOptions.js +++ b/lib/services/batch/lib/models/fileListFromTaskNextOptions.js @@ -17,14 +17,14 @@ class FileListFromTaskNextOptions { /** * Create a FileListFromTaskNextOptions. - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/fileListFromTaskOptions.js b/lib/services/batch/lib/models/fileListFromTaskOptions.js index 6f8d5e23c3..8352c9738d 100644 --- a/lib/services/batch/lib/models/fileListFromTaskOptions.js +++ b/lib/services/batch/lib/models/fileListFromTaskOptions.js @@ -17,22 +17,23 @@ class FileListFromTaskOptions { /** * Create a FileListFromTaskOptions. - * @member {string} [filter] An OData $filter clause. For more information on - * constructing this filter, see + * @property {string} [filter] An OData $filter clause. For more information + * on constructing this filter, see * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-task-files. - * @member {number} [maxResults] The maximum number of items to return in the - * response. A maximum of 1000 files can be returned. Default value: 1000 . - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [maxResults] The maximum number of items to return in + * the response. A maximum of 1000 files can be returned. Default value: 1000 + * . + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/fileProperties.js b/lib/services/batch/lib/models/fileProperties.js index 5880433078..ac321537d9 100644 --- a/lib/services/batch/lib/models/fileProperties.js +++ b/lib/services/batch/lib/models/fileProperties.js @@ -17,12 +17,13 @@ class FileProperties { /** * Create a FileProperties. - * @member {date} [creationTime] The file creation time. The creation time is - * not returned for files on Linux compute nodes. - * @member {date} lastModified The time at which the file was last modified. - * @member {number} contentLength The length of the file. - * @member {string} [contentType] The content type of the file. - * @member {string} [fileMode] The file mode attribute in octal format. The + * @property {date} [creationTime] The file creation time. The creation time + * is not returned for files on Linux compute nodes. + * @property {date} lastModified The time at which the file was last + * modified. + * @property {number} contentLength The length of the file. + * @property {string} [contentType] The content type of the file. + * @property {string} [fileMode] The file mode attribute in octal format. The * file mode is returned only for files on Linux compute nodes. */ constructor() { diff --git a/lib/services/batch/lib/models/imageReference.js b/lib/services/batch/lib/models/imageReference.js index 0f98dcd772..3b674ebe88 100644 --- a/lib/services/batch/lib/models/imageReference.js +++ b/lib/services/batch/lib/models/imageReference.js @@ -20,24 +20,23 @@ class ImageReference { /** * Create a ImageReference. - * @member {string} [publisher] The publisher of the Azure Virtual Machines + * @property {string} [publisher] The publisher of the Azure Virtual Machines * Marketplace image. For example, Canonical or MicrosoftWindowsServer. - * @member {string} [offer] The offer type of the Azure Virtual Machines + * @property {string} [offer] The offer type of the Azure Virtual Machines * Marketplace image. For example, UbuntuServer or WindowsServer. - * @member {string} [sku] The SKU of the Azure Virtual Machines Marketplace + * @property {string} [sku] The SKU of the Azure Virtual Machines Marketplace * image. For example, 14.04.0-LTS or 2012-R2-Datacenter. - * @member {string} [version] The version of the Azure Virtual Machines + * @property {string} [version] The version of the Azure Virtual Machines * Marketplace image. A value of 'latest' can be specified to select the * latest version of an image. If omitted, the default is 'latest'. - * @member {string} [virtualMachineImageId] The ARM resource identifier of + * @property {string} [virtualMachineImageId] The ARM resource identifier of * the virtual machine image. Computes nodes of the pool will be created * using this custom image. This is of the form * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}. * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as - * the Azure Batch account. For information about the firewall settings for - * the Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + * the Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. */ constructor() { } diff --git a/lib/services/batch/lib/models/inboundEndpoint.js b/lib/services/batch/lib/models/inboundEndpoint.js index f5bf0aff19..a0c0476a6f 100644 --- a/lib/services/batch/lib/models/inboundEndpoint.js +++ b/lib/services/batch/lib/models/inboundEndpoint.js @@ -17,15 +17,15 @@ class InboundEndpoint { /** * Create a InboundEndpoint. - * @member {string} name The name of the endpoint. - * @member {string} protocol The protocol of the endpoint. Possible values + * @property {string} name The name of the endpoint. + * @property {string} protocol The protocol of the endpoint. Possible values * include: 'tcp', 'udp' - * @member {string} publicIPAddress The public IP address of the compute + * @property {string} publicIPAddress The public IP address of the compute * node. - * @member {string} publicFQDN The public fully qualified domain name for the - * compute node. - * @member {number} frontendPort The public port number of the endpoint. - * @member {number} backendPort The backend port number of the endpoint. + * @property {string} publicFQDN The public fully qualified domain name for + * the compute node. + * @property {number} frontendPort The public port number of the endpoint. + * @property {number} backendPort The backend port number of the endpoint. */ constructor() { } diff --git a/lib/services/batch/lib/models/inboundNATPool.js b/lib/services/batch/lib/models/inboundNATPool.js index c8b5c45610..1bf53cf768 100644 --- a/lib/services/batch/lib/models/inboundNATPool.js +++ b/lib/services/batch/lib/models/inboundNATPool.js @@ -18,32 +18,32 @@ class InboundNATPool { /** * Create a InboundNATPool. - * @member {string} name The name of the endpoint. The name must be unique + * @property {string} name The name of the endpoint. The name must be unique * within a Batch pool, can contain letters, numbers, underscores, periods, * and hyphens. Names must start with a letter or number, must end with a * letter, number, or underscore, and cannot exceed 77 characters. If any * invalid values are provided the request fails with HTTP status code 400. - * @member {string} protocol The protocol of the endpoint. Possible values + * @property {string} protocol The protocol of the endpoint. Possible values * include: 'tcp', 'udp' - * @member {number} backendPort The port number on the compute node. This + * @property {number} backendPort The port number on the compute node. This * must be unique within a Batch pool. Acceptable values are between 1 and * 65535 except for 22, 3389, 29876 and 29877 as these are reserved. If any * reserved values are provided the request fails with HTTP status code 400. - * @member {number} frontendPortRangeStart The first port number in the range - * of external ports that will be used to provide inbound access to the + * @property {number} frontendPortRangeStart The first port number in the + * range of external ports that will be used to provide inbound access to the * backendPort on individual compute nodes. Acceptable values range between 1 * and 65534 except ports from 50000 to 55000 which are reserved. All ranges * within a pool must be distinct and cannot overlap. Each range must contain * at least 40 ports. If any reserved or overlapping values are provided the * request fails with HTTP status code 400. - * @member {number} frontendPortRangeEnd The last port number in the range of - * external ports that will be used to provide inbound access to the + * @property {number} frontendPortRangeEnd The last port number in the range + * of external ports that will be used to provide inbound access to the * backendPort on individual compute nodes. Acceptable values range between 1 * and 65534 except ports from 50000 to 55000 which are reserved by the Batch * service. All ranges within a pool must be distinct and cannot overlap. * Each range must contain at least 40 ports. If any reserved or overlapping * values are provided the request fails with HTTP status code 400. - * @member {array} [networkSecurityGroupRules] A list of network security + * @property {array} [networkSecurityGroupRules] A list of network security * group rules that will be applied to the endpoint. The maximum number of * rules that can be specified across all the endpoints on a Batch pool is * 25. If no network security group rules are specified, a default rule will diff --git a/lib/services/batch/lib/models/index.d.ts b/lib/services/batch/lib/models/index.d.ts index dcee8ff640..0c52790ca0 100644 --- a/lib/services/batch/lib/models/index.d.ts +++ b/lib/services/batch/lib/models/index.d.ts @@ -1,15230 +1,8153 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { BaseResource } from 'ms-rest-azure'; -import { CloudError } from 'ms-rest-azure'; -import * as moment from 'moment'; +import { BaseResource, CloudError } from "ms-rest-azure"; +import * as moment from "moment"; -export { BaseResource } from 'ms-rest-azure'; -export { CloudError } from 'ms-rest-azure'; +export { + BaseResource, + CloudError +}; /** - * @class - * Initializes a new instance of the PoolUsageMetrics class. - * @constructor * @summary Usage metrics for a pool across an aggregation interval. - * - * @member {string} poolId The ID of the pool whose metrics are aggregated in - * this entry. - * @member {date} startTime The start time of the aggregation interval covered - * by this entry. - * @member {date} endTime The end time of the aggregation interval covered by - * this entry. - * @member {string} vmSize The size of virtual machines in the pool. All VMs in - * a pool are the same size. For information about available sizes of virtual - * machines in pools, see Choose a VM size for compute nodes in an Azure Batch - * pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). - * @member {number} totalCoreHours The total core hours used in the pool during - * this aggregation interval. - * @member {number} dataIngressGiB The cross data center network ingress to the - * pool during this interval, in GiB. - * @member {number} dataEgressGiB The cross data center network egress from the - * pool during this interval, in GiB. */ export interface PoolUsageMetrics { + /** + * @summary The ID of the pool whose metrics are aggregated in this entry. + */ poolId: string; + /** + * @summary The start time of the aggregation interval covered by this entry. + */ startTime: Date; + /** + * @summary The end time of the aggregation interval covered by this entry. + */ endTime: Date; + /** + * @summary The size of virtual machines in the pool. All VMs in a pool are the same size. + * @description For information about available sizes of virtual machines in pools, see Choose a + * VM size for compute nodes in an Azure Batch pool + * (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). + */ vmSize: string; + /** + * @summary The total core hours used in the pool during this aggregation interval. + */ totalCoreHours: number; - dataIngressGiB: number; - dataEgressGiB: number; } /** - * @class - * Initializes a new instance of the ImageReference class. - * @constructor - * @summary A reference to an Azure Virtual Machines Marketplace image or a - * custom Azure Virtual Machine image. To get the list of all Azure Marketplace - * image references verified by Azure Batch, see the 'List node agent SKUs' - * operation. - * - * @member {string} [publisher] The publisher of the Azure Virtual Machines - * Marketplace image. For example, Canonical or MicrosoftWindowsServer. - * @member {string} [offer] The offer type of the Azure Virtual Machines - * Marketplace image. For example, UbuntuServer or WindowsServer. - * @member {string} [sku] The SKU of the Azure Virtual Machines Marketplace - * image. For example, 14.04.0-LTS or 2012-R2-Datacenter. - * @member {string} [version] The version of the Azure Virtual Machines - * Marketplace image. A value of 'latest' can be specified to select the latest - * version of an image. If omitted, the default is 'latest'. - * @member {string} [virtualMachineImageId] The ARM resource identifier of the - * virtual machine image. Computes nodes of the pool will be created using this - * custom image. This is of the form - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}. - * This property is mutually exclusive with other ImageReference properties. - * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + * @summary A reference to an Azure Virtual Machines Marketplace image or a custom Azure Virtual + * Machine image. To get the list of all Azure Marketplace image references verified by Azure + * Batch, see the 'List node agent SKUs' operation. */ export interface ImageReference { + /** + * @summary The publisher of the Azure Virtual Machines Marketplace image. + * @description For example, Canonical or MicrosoftWindowsServer. + */ publisher?: string; + /** + * @summary The offer type of the Azure Virtual Machines Marketplace image. + * @description For example, UbuntuServer or WindowsServer. + */ offer?: string; + /** + * @summary The SKU of the Azure Virtual Machines Marketplace image. + * @description For example, 14.04.0-LTS or 2012-R2-Datacenter. + */ sku?: string; + /** + * @summary The version of the Azure Virtual Machines Marketplace image. + * @description A value of 'latest' can be specified to select the latest version of an image. If + * omitted, the default is 'latest'. + */ version?: string; + /** + * @summary The ARM resource identifier of the virtual machine image. Computes nodes of the pool + * will be created using this custom image. This is of the form + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName} + * @description This property is mutually exclusive with other ImageReference properties. The + * virtual machine image must be in the same region and subscription as the Azure Batch account. + * For more details, see https://docs.microsoft.com/azure/batch/batch-custom-images. + */ virtualMachineImageId?: string; } /** - * @class - * Initializes a new instance of the NodeAgentSku class. - * @constructor * @summary A node agent SKU supported by the Batch service. - * - * The Batch node agent is a program that runs on each node in the pool, and - * provides the command-and-control interface between the node and the Batch - * service. There are different implementations of the node agent, known as - * SKUs, for different operating systems. - * - * @member {string} [id] The ID of the node agent SKU. - * @member {array} [verifiedImageReferences] The list of Azure Marketplace - * images verified to be compatible with this node agent SKU. This collection - * is not exhaustive (the node agent may be compatible with other images). - * @member {string} [osType] The type of operating system (e.g. Windows or - * Linux) compatible with the node agent SKU. Possible values include: 'linux', - * 'windows' + * @description The Batch node agent is a program that runs on each node in the pool, and provides + * the command-and-control interface between the node and the Batch service. There are different + * implementations of the node agent, known as SKUs, for different operating systems. */ export interface NodeAgentSku { + /** + * @summary The ID of the node agent SKU. + */ id?: string; + /** + * @summary The list of Azure Marketplace images verified to be compatible with this node agent + * SKU. + * @description This collection is not exhaustive (the node agent may be compatible with other + * images). + */ verifiedImageReferences?: ImageReference[]; + /** + * @summary The type of operating system (e.g. Windows or Linux) compatible with the node agent + * SKU. + * @description Possible values include: 'linux', 'windows' + */ osType?: string; } /** - * @class - * Initializes a new instance of the AuthenticationTokenSettings class. - * @constructor - * @summary The settings for an authentication token that the task can use to - * perform Batch service operations. - * - * @member {array} [access] The Batch resources to which the token grants - * access. The authentication token grants access to a limited set of Batch - * service operations. Currently the only supported value for the access - * property is 'job', which grants access to all operations related to the job - * which contains the task. + * @summary The settings for an authentication token that the task can use to perform Batch service + * operations. */ export interface AuthenticationTokenSettings { + /** + * @summary The Batch resources to which the token grants access. + * @description The authentication token grants access to a limited set of Batch service + * operations. Currently the only supported value for the access property is 'job', which grants + * access to all operations related to the job which contains the task. + */ access?: string[]; } /** - * @class - * Initializes a new instance of the UsageStatistics class. - * @constructor * @summary Statistics related to pool usage information. - * - * @member {date} startTime The start time of the time range covered by the - * statistics. - * @member {date} lastUpdateTime The time at which the statistics were last - * updated. All statistics are limited to the range between startTime and - * lastUpdateTime. - * @member {moment.duration} dedicatedCoreTime The aggregated wall-clock time - * of the dedicated compute node cores being part of the pool. */ export interface UsageStatistics { + /** + * @summary The start time of the time range covered by the statistics. + */ startTime: Date; + /** + * @summary The time at which the statistics were last updated. All statistics are limited to the + * range between startTime and lastUpdateTime. + */ lastUpdateTime: Date; + /** + * @summary The aggregated wall-clock time of the dedicated compute node cores being part of the + * pool. + */ dedicatedCoreTime: moment.Duration; } /** - * @class - * Initializes a new instance of the ResourceStatistics class. - * @constructor - * @summary Statistics related to resource consumption by compute nodes in a - * pool. - * - * @member {date} startTime The start time of the time range covered by the - * statistics. - * @member {date} lastUpdateTime The time at which the statistics were last - * updated. All statistics are limited to the range between startTime and - * lastUpdateTime. - * @member {number} avgCPUPercentage The average CPU usage across all nodes in - * the pool (percentage per node). - * @member {number} avgMemoryGiB The average memory usage in GiB across all - * nodes in the pool. - * @member {number} peakMemoryGiB The peak memory usage in GiB across all nodes - * in the pool. - * @member {number} avgDiskGiB The average used disk space in GiB across all - * nodes in the pool. - * @member {number} peakDiskGiB The peak used disk space in GiB across all - * nodes in the pool. - * @member {number} diskReadIOps The total number of disk read operations - * across all nodes in the pool. - * @member {number} diskWriteIOps The total number of disk write operations - * across all nodes in the pool. - * @member {number} diskReadGiB The total amount of data in GiB of disk reads - * across all nodes in the pool. - * @member {number} diskWriteGiB The total amount of data in GiB of disk writes - * across all nodes in the pool. - * @member {number} networkReadGiB The total amount of data in GiB of network - * reads across all nodes in the pool. - * @member {number} networkWriteGiB The total amount of data in GiB of network - * writes across all nodes in the pool. + * @summary Statistics related to resource consumption by compute nodes in a pool. */ export interface ResourceStatistics { + /** + * @summary The start time of the time range covered by the statistics. + */ startTime: Date; + /** + * @summary The time at which the statistics were last updated. All statistics are limited to the + * range between startTime and lastUpdateTime. + */ lastUpdateTime: Date; + /** + * @summary The average CPU usage across all nodes in the pool (percentage per node). + */ avgCPUPercentage: number; + /** + * @summary The average memory usage in GiB across all nodes in the pool. + */ avgMemoryGiB: number; + /** + * @summary The peak memory usage in GiB across all nodes in the pool. + */ peakMemoryGiB: number; + /** + * @summary The average used disk space in GiB across all nodes in the pool. + */ avgDiskGiB: number; + /** + * @summary The peak used disk space in GiB across all nodes in the pool. + */ peakDiskGiB: number; + /** + * @summary The total number of disk read operations across all nodes in the pool. + */ diskReadIOps: number; + /** + * @summary The total number of disk write operations across all nodes in the pool. + */ diskWriteIOps: number; + /** + * @summary The total amount of data in GiB of disk reads across all nodes in the pool. + */ diskReadGiB: number; + /** + * @summary The total amount of data in GiB of disk writes across all nodes in the pool. + */ diskWriteGiB: number; + /** + * @summary The total amount of data in GiB of network reads across all nodes in the pool. + */ networkReadGiB: number; + /** + * @summary The total amount of data in GiB of network writes across all nodes in the pool. + */ networkWriteGiB: number; } /** - * @class - * Initializes a new instance of the PoolStatistics class. - * @constructor - * @summary Contains utilization and resource usage statistics for the lifetime - * of a pool. - * - * @member {string} url The URL for the statistics. - * @member {date} startTime The start time of the time range covered by the - * statistics. - * @member {date} lastUpdateTime The time at which the statistics were last - * updated. All statistics are limited to the range between startTime and - * lastUpdateTime. - * @member {object} [usageStats] Statistics related to pool usage, such as the - * amount of core-time used. - * @member {date} [usageStats.startTime] - * @member {date} [usageStats.lastUpdateTime] - * @member {moment.duration} [usageStats.dedicatedCoreTime] - * @member {object} [resourceStats] Statistics related to resource consumption - * by compute nodes in the pool. - * @member {date} [resourceStats.startTime] - * @member {date} [resourceStats.lastUpdateTime] - * @member {number} [resourceStats.avgCPUPercentage] - * @member {number} [resourceStats.avgMemoryGiB] - * @member {number} [resourceStats.peakMemoryGiB] - * @member {number} [resourceStats.avgDiskGiB] - * @member {number} [resourceStats.peakDiskGiB] - * @member {number} [resourceStats.diskReadIOps] - * @member {number} [resourceStats.diskWriteIOps] - * @member {number} [resourceStats.diskReadGiB] - * @member {number} [resourceStats.diskWriteGiB] - * @member {number} [resourceStats.networkReadGiB] - * @member {number} [resourceStats.networkWriteGiB] + * @summary Contains utilization and resource usage statistics for the lifetime of a pool. */ export interface PoolStatistics { + /** + * @summary The URL for the statistics. + */ url: string; + /** + * @summary The start time of the time range covered by the statistics. + */ startTime: Date; + /** + * @summary The time at which the statistics were last updated. All statistics are limited to the + * range between startTime and lastUpdateTime. + */ lastUpdateTime: Date; + /** + * @summary Statistics related to pool usage, such as the amount of core-time used. + */ usageStats?: UsageStatistics; + /** + * @summary Statistics related to resource consumption by compute nodes in the pool. + */ resourceStats?: ResourceStatistics; } /** - * @class - * Initializes a new instance of the JobStatistics class. - * @constructor * @summary Resource usage statistics for a job. - * - * @member {string} url The URL of the statistics. - * @member {date} startTime The start time of the time range covered by the - * statistics. - * @member {date} lastUpdateTime The time at which the statistics were last - * updated. All statistics are limited to the range between startTime and - * lastUpdateTime. - * @member {moment.duration} userCPUTime The total user mode CPU time (summed - * across all cores and all compute nodes) consumed by all tasks in the job. - * @member {moment.duration} kernelCPUTime The total kernel mode CPU time - * (summed across all cores and all compute nodes) consumed by all tasks in the - * job. - * @member {moment.duration} wallClockTime The total wall clock time of all - * tasks in the job. The wall clock time is the elapsed time from when the - * task started running on a compute node to when it finished (or to the last - * time the statistics were updated, if the task had not finished by then). If - * a task was retried, this includes the wall clock time of all the task - * retries. - * @member {number} readIOps The total number of disk read operations made by - * all tasks in the job. - * @member {number} writeIOps The total number of disk write operations made by - * all tasks in the job. - * @member {number} readIOGiB The total amount of data in GiB read from disk by - * all tasks in the job. - * @member {number} writeIOGiB The total amount of data in GiB written to disk - * by all tasks in the job. - * @member {number} numSucceededTasks The total number of tasks successfully - * completed in the job during the given time range. A task completes - * successfully if it returns exit code 0. - * @member {number} numFailedTasks The total number of tasks in the job that - * failed during the given time range. A task fails if it exhausts its maximum - * retry count without returning exit code 0. - * @member {number} numTaskRetries The total number of retries on all the tasks - * in the job during the given time range. - * @member {moment.duration} waitTime The total wait time of all tasks in the - * job. The wait time for a task is defined as the elapsed time between the - * creation of the task and the start of task execution. (If the task is - * retried due to failures, the wait time is the time to the most recent task - * execution.) This value is only reported in the account lifetime statistics; - * it is not included in the job statistics. */ export interface JobStatistics { + /** + * @summary The URL of the statistics. + */ url: string; + /** + * @summary The start time of the time range covered by the statistics. + */ startTime: Date; + /** + * @summary The time at which the statistics were last updated. All statistics are limited to the + * range between startTime and lastUpdateTime. + */ lastUpdateTime: Date; + /** + * @summary The total user mode CPU time (summed across all cores and all compute nodes) consumed + * by all tasks in the job. + */ userCPUTime: moment.Duration; + /** + * @summary The total kernel mode CPU time (summed across all cores and all compute nodes) + * consumed by all tasks in the job. + */ kernelCPUTime: moment.Duration; + /** + * @summary The total wall clock time of all tasks in the job. + * @description The wall clock time is the elapsed time from when the task started running on a + * compute node to when it finished (or to the last time the statistics were updated, if the task + * had not finished by then). If a task was retried, this includes the wall clock time of all the + * task retries. + */ wallClockTime: moment.Duration; + /** + * @summary The total number of disk read operations made by all tasks in the job. + */ readIOps: number; + /** + * @summary The total number of disk write operations made by all tasks in the job. + */ writeIOps: number; + /** + * @summary The total amount of data in GiB read from disk by all tasks in the job. + */ readIOGiB: number; + /** + * @summary The total amount of data in GiB written to disk by all tasks in the job. + */ writeIOGiB: number; + /** + * @summary The total number of tasks successfully completed in the job during the given time + * range. + * @description A task completes successfully if it returns exit code 0. + */ numSucceededTasks: number; + /** + * @summary The total number of tasks in the job that failed during the given time range. + * @description A task fails if it exhausts its maximum retry count without returning exit code + * 0. + */ numFailedTasks: number; + /** + * @summary The total number of retries on all the tasks in the job during the given time range. + */ numTaskRetries: number; + /** + * @summary The total wait time of all tasks in the job. + * @description The wait time for a task is defined as the elapsed time between the creation of + * the task and the start of task execution. (If the task is retried due to failures, the wait + * time is the time to the most recent task execution.) This value is only reported in the + * account lifetime statistics; it is not included in the job statistics. + */ waitTime: moment.Duration; } /** - * @class - * Initializes a new instance of the NameValuePair class. - * @constructor * @summary Represents a name-value pair. - * - * @member {string} [name] The name in the name-value pair. - * @member {string} [value] The value in the name-value pair. */ export interface NameValuePair { + /** + * @summary The name in the name-value pair. + */ name?: string; + /** + * @summary The value in the name-value pair. + */ value?: string; } /** - * @class - * Initializes a new instance of the DeleteCertificateError class. - * @constructor - * @summary An error encountered by the Batch service when deleting a - * certificate. - * - * @member {string} [code] An identifier for the certificate deletion error. - * Codes are invariant and are intended to be consumed programmatically. - * @member {string} [message] A message describing the certificate deletion - * error, intended to be suitable for display in a user interface. - * @member {array} [values] A list of additional error details related to the - * certificate deletion error. This list includes details such as the active - * pools and nodes referencing this certificate. However, if a large number of - * resources reference the certificate, the list contains only about the first - * hundred. + * @summary An error encountered by the Batch service when deleting a certificate. */ export interface DeleteCertificateError { + /** + * @summary An identifier for the certificate deletion error. Codes are invariant and are + * intended to be consumed programmatically. + */ code?: string; + /** + * @summary A message describing the certificate deletion error, intended to be suitable for + * display in a user interface. + */ message?: string; + /** + * @summary A list of additional error details related to the certificate deletion error. + * @description This list includes details such as the active pools and nodes referencing this + * certificate. However, if a large number of resources reference the certificate, the list + * contains only about the first hundred. + */ values?: NameValuePair[]; } /** - * @class - * Initializes a new instance of the Certificate class. - * @constructor - * A certificate that can be installed on compute nodes and can be used to - * authenticate operations on the machine. - * - * @member {string} [thumbprint] The X.509 thumbprint of the certificate. This - * is a sequence of up to 40 hex digits. - * @member {string} [thumbprintAlgorithm] The algorithm used to derive the - * thumbprint. - * @member {string} [url] The URL of the certificate. - * @member {string} [state] The current state of the certificate. Possible - * values include: 'active', 'deleting', 'deleteFailed' - * @member {date} [stateTransitionTime] The time at which the certificate - * entered its current state. - * @member {string} [previousState] The previous state of the certificate. This - * property is not set if the certificate is in its initial active state. - * Possible values include: 'active', 'deleting', 'deleteFailed' - * @member {date} [previousStateTransitionTime] The time at which the - * certificate entered its previous state. This property is not set if the - * certificate is in its initial Active state. - * @member {string} [publicData] The public part of the certificate as a - * base-64 encoded .cer file. - * @member {object} [deleteCertificateError] The error that occurred on the - * last attempt to delete this certificate. This property is set only if the - * certificate is in the DeleteFailed state. - * @member {string} [deleteCertificateError.code] - * @member {string} [deleteCertificateError.message] - * @member {array} [deleteCertificateError.values] This list includes details - * such as the active pools and nodes referencing this certificate. However, if - * a large number of resources reference the certificate, the list contains - * only about the first hundred. + * A certificate that can be installed on compute nodes and can be used to authenticate operations + * on the machine. */ export interface Certificate { + /** + * @summary The X.509 thumbprint of the certificate. This is a sequence of up to 40 hex digits. + */ thumbprint?: string; + /** + * @summary The algorithm used to derive the thumbprint. + */ thumbprintAlgorithm?: string; + /** + * @summary The URL of the certificate. + */ url?: string; + /** + * @summary The current state of the certificate. + * @description Possible values include: 'active', 'deleting', 'deleteFailed' + */ state?: string; + /** + * @summary The time at which the certificate entered its current state. + */ stateTransitionTime?: Date; + /** + * @summary The previous state of the certificate. + * @description This property is not set if the certificate is in its initial active state. + * Possible values include: 'active', 'deleting', 'deleteFailed' + */ previousState?: string; + /** + * @summary The time at which the certificate entered its previous state. + * @description This property is not set if the certificate is in its initial Active state. + */ previousStateTransitionTime?: Date; + /** + * @summary The public part of the certificate as a base-64 encoded .cer file. + */ publicData?: string; + /** + * @summary The error that occurred on the last attempt to delete this certificate. + * @description This property is set only if the certificate is in the DeleteFailed state. + */ deleteCertificateError?: DeleteCertificateError; } /** - * @class - * Initializes a new instance of the ApplicationPackageReference class. - * @constructor - * @summary A reference to an application package to be deployed to compute - * nodes. - * - * @member {string} applicationId The ID of the application to deploy. - * @member {string} [version] The version of the application to deploy. If - * omitted, the default version is deployed. If this is omitted on a pool, and - * no default version is specified for this application, the request fails with - * the error code InvalidApplicationPackageReferences and HTTP status code 409. - * If this is omitted on a task, and no default version is specified for this - * application, the task fails with a pre-processing error. + * @summary A reference to an application package to be deployed to compute nodes. */ export interface ApplicationPackageReference { + /** + * @summary The ID of the application to deploy. + */ applicationId: string; + /** + * @summary The version of the application to deploy. If omitted, the default version is + * deployed. + * @description If this is omitted on a pool, and no default version is specified for this + * application, the request fails with the error code InvalidApplicationPackageReferences and + * HTTP status code 409. If this is omitted on a task, and no default version is specified for + * this application, the task fails with a pre-processing error. + */ version?: string; } /** - * @class - * Initializes a new instance of the ApplicationSummary class. - * @constructor - * @summary Contains information about an application in an Azure Batch - * account. - * - * @member {string} id A string that uniquely identifies the application within - * the account. - * @member {string} displayName The display name for the application. - * @member {array} versions The list of available versions of the application. + * @summary Contains information about an application in an Azure Batch account. */ export interface ApplicationSummary { + /** + * @summary A string that uniquely identifies the application within the account. + */ id: string; + /** + * @summary The display name for the application. + */ displayName: string; + /** + * @summary The list of available versions of the application. + */ versions: string[]; } /** - * @class - * Initializes a new instance of the CertificateAddParameter class. - * @constructor - * @summary A certificate that can be installed on compute nodes and can be - * used to authenticate operations on the machine. - * - * @member {string} thumbprint The X.509 thumbprint of the certificate. This is - * a sequence of up to 40 hex digits (it may include spaces but these are - * removed). - * @member {string} thumbprintAlgorithm The algorithm used to derive the - * thumbprint. This must be sha1. - * @member {string} data The base64-encoded contents of the certificate. The - * maximum size is 10KB. - * @member {string} [certificateFormat] The format of the certificate data. - * Possible values include: 'pfx', 'cer' - * @member {string} [password] The password to access the certificate's private - * key. This is required if the certificate format is pfx. It should be omitted - * if the certificate format is cer. + * @summary A certificate that can be installed on compute nodes and can be used to authenticate + * operations on the machine. */ export interface CertificateAddParameter { + /** + * @summary The X.509 thumbprint of the certificate. This is a sequence of up to 40 hex digits + * (it may include spaces but these are removed). + */ thumbprint: string; + /** + * @summary The algorithm used to derive the thumbprint. This must be sha1. + */ thumbprintAlgorithm: string; + /** + * @summary The base64-encoded contents of the certificate. The maximum size is 10KB. + */ data: string; + /** + * @summary The format of the certificate data. + * @description Possible values include: 'pfx', 'cer' + */ certificateFormat?: string; + /** + * @summary The password to access the certificate's private key. + * @description This is required if the certificate format is pfx. It should be omitted if the + * certificate format is cer. + */ password?: string; } /** - * @class - * Initializes a new instance of the FileProperties class. - * @constructor * @summary The properties of a file on a compute node. - * - * @member {date} [creationTime] The file creation time. The creation time is - * not returned for files on Linux compute nodes. - * @member {date} lastModified The time at which the file was last modified. - * @member {number} contentLength The length of the file. - * @member {string} [contentType] The content type of the file. - * @member {string} [fileMode] The file mode attribute in octal format. The - * file mode is returned only for files on Linux compute nodes. */ export interface FileProperties { + /** + * @summary The file creation time. + * @description The creation time is not returned for files on Linux compute nodes. + */ creationTime?: Date; + /** + * @summary The time at which the file was last modified. + */ lastModified: Date; + /** + * @summary The length of the file. + */ contentLength: number; + /** + * @summary The content type of the file. + */ contentType?: string; + /** + * @summary The file mode attribute in octal format. + * @description The file mode is returned only for files on Linux compute nodes. + */ fileMode?: string; } /** - * @class - * Initializes a new instance of the NodeFile class. - * @constructor * @summary Information about a file or directory on a compute node. - * - * @member {string} [name] The file path. - * @member {string} [url] The URL of the file. - * @member {boolean} [isDirectory] Whether the object represents a directory. - * @member {object} [properties] The file properties. - * @member {date} [properties.creationTime] The creation time is not returned - * for files on Linux compute nodes. - * @member {date} [properties.lastModified] - * @member {number} [properties.contentLength] - * @member {string} [properties.contentType] - * @member {string} [properties.fileMode] The file mode is returned only for - * files on Linux compute nodes. */ export interface NodeFile { + /** + * @summary The file path. + */ name?: string; + /** + * @summary The URL of the file. + */ url?: string; + /** + * @summary Whether the object represents a directory. + */ isDirectory?: boolean; + /** + * @summary The file properties. + */ properties?: FileProperties; } /** - * @class - * Initializes a new instance of the Schedule class. - * @constructor * @summary The schedule according to which jobs will be created - * - * @member {date} [doNotRunUntil] The earliest time at which any job may be - * created under this job schedule. If you do not specify a doNotRunUntil time, - * the schedule becomes ready to create jobs immediately. - * @member {date} [doNotRunAfter] A time after which no job will be created - * under this job schedule. The schedule will move to the completed state as - * soon as this deadline is past and there is no active job under this job - * schedule. If you do not specify a doNotRunAfter time, and you are creating a - * recurring job schedule, the job schedule will remain active until you - * explicitly terminate it. - * @member {moment.duration} [startWindow] The time interval, starting from the - * time at which the schedule indicates a job should be created, within which a - * job must be created. If a job is not created within the startWindow - * interval, then the 'opportunity' is lost; no job will be created until the - * next recurrence of the schedule. If the schedule is recurring, and the - * startWindow is longer than the recurrence interval, then this is equivalent - * to an infinite startWindow, because the job that is 'due' in one - * recurrenceInterval is not carried forward into the next recurrence interval. - * The default is infinite. The minimum value is 1 minute. If you specify a - * lower value, the Batch service rejects the schedule with an error; if you - * are calling the REST API directly, the HTTP status code is 400 (Bad - * Request). - * @member {moment.duration} [recurrenceInterval] The time interval between the - * start times of two successive jobs under the job schedule. A job schedule - * can have at most one active job under it at any given time. Because a job - * schedule can have at most one active job under it at any given time, if it - * is time to create a new job under a job schedule, but the previous job is - * still running, the Batch service will not create the new job until the - * previous job finishes. If the previous job does not finish within the - * startWindow period of the new recurrenceInterval, then no new job will be - * scheduled for that interval. For recurring jobs, you should normally specify - * a jobManagerTask in the jobSpecification. If you do not use jobManagerTask, - * you will need an external process to monitor when jobs are created, add - * tasks to the jobs and terminate the jobs ready for the next recurrence. The - * default is that the schedule does not recur: one job is created, within the - * startWindow after the doNotRunUntil time, and the schedule is complete as - * soon as that job finishes. The minimum value is 1 minute. If you specify a - * lower value, the Batch service rejects the schedule with an error; if you - * are calling the REST API directly, the HTTP status code is 400 (Bad - * Request). */ export interface Schedule { + /** + * @summary The earliest time at which any job may be created under this job schedule. + * @description If you do not specify a doNotRunUntil time, the schedule becomes ready to create + * jobs immediately. + */ doNotRunUntil?: Date; + /** + * @summary A time after which no job will be created under this job schedule. The schedule will + * move to the completed state as soon as this deadline is past and there is no active job under + * this job schedule. + * @description If you do not specify a doNotRunAfter time, and you are creating a recurring job + * schedule, the job schedule will remain active until you explicitly terminate it. + */ doNotRunAfter?: Date; + /** + * @summary The time interval, starting from the time at which the schedule indicates a job + * should be created, within which a job must be created. + * @description If a job is not created within the startWindow interval, then the 'opportunity' + * is lost; no job will be created until the next recurrence of the schedule. If the schedule is + * recurring, and the startWindow is longer than the recurrence interval, then this is equivalent + * to an infinite startWindow, because the job that is 'due' in one recurrenceInterval is not + * carried forward into the next recurrence interval. The default is infinite. The minimum value + * is 1 minute. If you specify a lower value, the Batch service rejects the schedule with an + * error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). + */ startWindow?: moment.Duration; + /** + * @summary The time interval between the start times of two successive jobs under the job + * schedule. A job schedule can have at most one active job under it at any given time. + * @description Because a job schedule can have at most one active job under it at any given + * time, if it is time to create a new job under a job schedule, but the previous job is still + * running, the Batch service will not create the new job until the previous job finishes. If the + * previous job does not finish within the startWindow period of the new recurrenceInterval, then + * no new job will be scheduled for that interval. For recurring jobs, you should normally + * specify a jobManagerTask in the jobSpecification. If you do not use jobManagerTask, you will + * need an external process to monitor when jobs are created, add tasks to the jobs and terminate + * the jobs ready for the next recurrence. The default is that the schedule does not recur: one + * job is created, within the startWindow after the doNotRunUntil time, and the schedule is + * complete as soon as that job finishes. The minimum value is 1 minute. If you specify a lower + * value, the Batch service rejects the schedule with an error; if you are calling the REST API + * directly, the HTTP status code is 400 (Bad Request). + */ recurrenceInterval?: moment.Duration; } /** - * @class - * Initializes a new instance of the JobConstraints class. - * @constructor * @summary The execution constraints for a job. - * - * @member {moment.duration} [maxWallClockTime] The maximum elapsed time that - * the job may run, measured from the time the job is created. If the job does - * not complete within the time limit, the Batch service terminates it and any - * tasks that are still running. In this case, the termination reason will be - * MaxWallClockTimeExpiry. If this property is not specified, there is no time - * limit on how long the job may run. - * @member {number} [maxTaskRetryCount] The maximum number of times each task - * may be retried. The Batch service retries a task if its exit code is - * nonzero. Note that this value specifically controls the number of retries. - * The Batch service will try each task once, and may then retry up to this - * limit. For example, if the maximum retry count is 3, Batch tries a task up - * to 4 times (one initial try and 3 retries). If the maximum retry count is 0, - * the Batch service does not retry tasks. If the maximum retry count is -1, - * the Batch service retries tasks without limit. The default value is 0 (no - * retries). */ export interface JobConstraints { + /** + * @summary The maximum elapsed time that the job may run, measured from the time the job is + * created. + * @description If the job does not complete within the time limit, the Batch service terminates + * it and any tasks that are still running. In this case, the termination reason will be + * MaxWallClockTimeExpiry. If this property is not specified, there is no time limit on how long + * the job may run. + */ maxWallClockTime?: moment.Duration; + /** + * @summary The maximum number of times each task may be retried. The Batch service retries a + * task if its exit code is nonzero. + * @description Note that this value specifically controls the number of retries. The Batch + * service will try each task once, and may then retry up to this limit. For example, if the + * maximum retry count is 3, Batch tries a task up to 4 times (one initial try and 3 retries). If + * the maximum retry count is 0, the Batch service does not retry tasks. If the maximum retry + * count is -1, the Batch service retries tasks without limit. The default value is 0 (no + * retries). + */ maxTaskRetryCount?: number; } /** - * @class - * Initializes a new instance of the ContainerRegistry class. - * @constructor + * @summary The network configuration for the job. + */ +export interface JobNetworkConfiguration { + /** + * @summary The ARM resource identifier of the virtual network subnet which nodes running tasks + * from the job will join for the duration of the task. + * @description This is only supported for jobs running on VirtualMachineConfiguration pools. + * This is of the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. + * The virtual network must be in the same region and subscription as the Azure Batch account. + * The specified subnet should have enough free IP addresses to accommodate the number of nodes + * which will run tasks from the job. For more details, see + * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + */ + subnetId: string; +} + +/** * @summary A private container registry. - * - * @member {string} [registryServer] The registry URL. If omitted, the default - * is "docker.io". - * @member {string} userName The user name to log into the registry server. - * @member {string} password The password to log into the registry server. */ export interface ContainerRegistry { + /** + * @summary The registry URL. + * @description If omitted, the default is "docker.io". + */ registryServer?: string; + /** + * @summary The user name to log into the registry server. + */ userName: string; + /** + * @summary The password to log into the registry server. + */ password: string; } /** - * @class - * Initializes a new instance of the TaskContainerSettings class. - * @constructor * @summary The container settings for a task. - * - * @member {string} [containerRunOptions] Additional options to the container - * create command. These additional options are supplied as arguments to the - * "docker create" command, in addition to those controlled by the Batch - * Service. - * @member {string} imageName The image to use to create the container in which - * the task will run. This is the full image reference, as would be specified - * to "docker pull". If no tag is provided as part of the image name, the tag - * ":latest" is used as a default. - * @member {object} [registry] The private registry which contains the - * container image. This setting can be omitted if was already provided at pool - * creation. - * @member {string} [registry.registryServer] If omitted, the default is - * "docker.io". - * @member {string} [registry.userName] - * @member {string} [registry.password] */ export interface TaskContainerSettings { + /** + * @summary Additional options to the container create command. + * @description These additional options are supplied as arguments to the "docker create" + * command, in addition to those controlled by the Batch Service. + */ containerRunOptions?: string; + /** + * @summary The image to use to create the container in which the task will run. + * @description This is the full image reference, as would be specified to "docker pull". If no + * tag is provided as part of the image name, the tag ":latest" is used as a default. + */ imageName: string; + /** + * @summary The private registry which contains the container image. + * @description This setting can be omitted if was already provided at pool creation. + */ registry?: ContainerRegistry; } /** - * @class - * Initializes a new instance of the ResourceFile class. - * @constructor - * @summary A file to be downloaded from Azure blob storage to a compute node. - * - * @member {string} blobSource The URL of the file within Azure Blob Storage. - * This URL must be readable using anonymous access; that is, the Batch service - * does not present any credentials when downloading the blob. There are two - * ways to get such a URL for a blob in Azure storage: include a Shared Access - * Signature (SAS) granting read permissions on the blob, or set the ACL for - * the blob or its container to allow public access. - * @member {string} filePath The location on the compute node to which to - * download the file, relative to the task's working directory. - * @member {string} [fileMode] The file permission mode attribute in octal - * format. This property applies only to files being downloaded to Linux - * compute nodes. It will be ignored if it is specified for a resourceFile - * which will be downloaded to a Windows node. If this property is not - * specified for a Linux node, then a default value of 0770 is applied to the - * file. + * @summary A single file or multiple files to be downloaded to a compute node. */ export interface ResourceFile { - blobSource: string; - filePath: string; + /** + * @summary The storage container name in the auto storage account. + * @description The autoStorageContainerName, storageContainerUrl and httpUrl properties are + * mutually exclusive and one of them must be specified. + */ + autoStorageContainerName?: string; + /** + * @summary The URL of the blob container within Azure Blob Storage. + * @description The autoStorageContainerName, storageContainerUrl and httpUrl properties are + * mutually exclusive and one of them must be specified. This URL must be readable and listable + * using anonymous access; that is, the Batch service does not present any credentials when + * downloading blobs from the container. There are two ways to get such a URL for a container in + * Azure storage: include a Shared Access Signature (SAS) granting read permissions on the + * container, or set the ACL for the container to allow public access. + */ + storageContainerUrl?: string; + /** + * @summary The URL of the file to download. + * @description The autoStorageContainerName, storageContainerUrl and httpUrl properties are + * mutually exclusive and one of them must be specified. If the URL points to Azure Blob Storage, + * it must be readable using anonymous access; that is, the Batch service does not present any + * credentials when downloading the blob. There are two ways to get such a URL for a blob in + * Azure storage: include a Shared Access Signature (SAS) granting read permissions on the blob, + * or set the ACL for the blob or its container to allow public access. + */ + httpUrl?: string; + /** + * @summary The blob prefix to use when downloading blobs from an Azure Storage container. Only + * the blobs whose names begin with the specified prefix will be downloaded. + * @description The property is valid only when autoStorageContainerName or storageContainerUrl + * is used. This prefix can be a partial filename or a subdirectory. If a prefix is not + * specified, all the files in the container will be downloaded. + */ + blobPrefix?: string; + /** + * @summary The location on the compute node to which to download the file(s), relative to the + * task's working directory. + * @description If the httpUrl property is specified, the filePath is required and describes the + * path which the file will be downloaded to, including the filename. Otherwise, if the + * autoStorageContainerName or storageContainerUrl property is specified, filePath is optional + * and is the directory to download the files to. In the case where filePath is used as a + * directory, any directory structure already associated with the input data will be retained in + * full and appended to the specified filePath directory. The specified relative path cannot + * break out of the task's working directory (for example by using '..'). + */ + filePath?: string; + /** + * @summary The file permission mode attribute in octal format. + * @description This property applies only to files being downloaded to Linux compute nodes. It + * will be ignored if it is specified for a resourceFile which will be downloaded to a Windows + * node. If this property is not specified for a Linux node, then a default value of 0770 is + * applied to the file. + */ fileMode?: string; } /** - * @class - * Initializes a new instance of the EnvironmentSetting class. - * @constructor * @summary An environment variable to be set on a task process. - * - * @member {string} name The name of the environment variable. - * @member {string} [value] The value of the environment variable. */ export interface EnvironmentSetting { + /** + * @summary The name of the environment variable. + */ name: string; + /** + * @summary The value of the environment variable. + */ value?: string; } /** - * @class - * Initializes a new instance of the ExitOptions class. - * @constructor - * @summary Specifies how the Batch service responds to a particular exit - * condition. - * - * @member {string} [jobAction] An action to take on the job containing the - * task, if the task completes with the given exit condition and the job's - * onTaskFailed property is 'performExitOptionsJobAction'. The default is none - * for exit code 0 and terminate for all other exit conditions. If the job's - * onTaskFailed property is noaction, then specifying this property returns an - * error and the add task request fails with an invalid property value error; - * if you are calling the REST API directly, the HTTP status code is 400 (Bad - * Request). Possible values include: 'none', 'disable', 'terminate' - * @member {string} [dependencyAction] An action that the Batch service - * performs on tasks that depend on this task. The default is 'satisfy' for - * exit code 0, and 'block' for all other exit conditions. If the job's - * usesTaskDependencies property is set to false, then specifying the - * dependencyAction property returns an error and the add task request fails - * with an invalid property value error; if you are calling the REST API - * directly, the HTTP status code is 400 (Bad Request). Possible values - * include: 'satisfy', 'block' + * @summary Specifies how the Batch service responds to a particular exit condition. */ export interface ExitOptions { + /** + * @summary An action to take on the job containing the task, if the task completes with the + * given exit condition and the job's onTaskFailed property is 'performExitOptionsJobAction'. + * @description The default is none for exit code 0 and terminate for all other exit conditions. + * If the job's onTaskFailed property is noaction, then specifying this property returns an error + * and the add task request fails with an invalid property value error; if you are calling the + * REST API directly, the HTTP status code is 400 (Bad Request). Possible values include: 'none', + * 'disable', 'terminate' + */ jobAction?: string; + /** + * @summary An action that the Batch service performs on tasks that depend on this task. + * @description The default is 'satisfy' for exit code 0, and 'block' for all other exit + * conditions. If the job's usesTaskDependencies property is set to false, then specifying the + * dependencyAction property returns an error and the add task request fails with an invalid + * property value error; if you are calling the REST API directly, the HTTP status code is 400 + * (Bad Request). Possible values include: 'satisfy', 'block' + */ dependencyAction?: string; } /** - * @class - * Initializes a new instance of the ExitCodeMapping class. - * @constructor - * @summary How the Batch service should respond if a task exits with a - * particular exit code. - * - * @member {number} code A process exit code. - * @member {object} exitOptions How the Batch service should respond if the - * task exits with this exit code. - * @member {string} [exitOptions.jobAction] The default is none for exit code 0 - * and terminate for all other exit conditions. If the job's onTaskFailed - * property is noaction, then specifying this property returns an error and the - * add task request fails with an invalid property value error; if you are - * calling the REST API directly, the HTTP status code is 400 (Bad Request). - * Possible values include: 'none', 'disable', 'terminate' - * @member {string} [exitOptions.dependencyAction] The default is 'satisfy' for - * exit code 0, and 'block' for all other exit conditions. If the job's - * usesTaskDependencies property is set to false, then specifying the - * dependencyAction property returns an error and the add task request fails - * with an invalid property value error; if you are calling the REST API - * directly, the HTTP status code is 400 (Bad Request). Possible values - * include: 'satisfy', 'block' + * @summary How the Batch service should respond if a task exits with a particular exit code. */ export interface ExitCodeMapping { + /** + * @summary A process exit code. + */ code: number; + /** + * @summary How the Batch service should respond if the task exits with this exit code. + */ exitOptions: ExitOptions; } /** - * @class - * Initializes a new instance of the ExitCodeRangeMapping class. - * @constructor - * @summary A range of exit codes and how the Batch service should respond to - * exit codes within that range. - * - * @member {number} start The first exit code in the range. - * @member {number} end The last exit code in the range. - * @member {object} exitOptions How the Batch service should respond if the - * task exits with an exit code in the range start to end (inclusive). - * @member {string} [exitOptions.jobAction] The default is none for exit code 0 - * and terminate for all other exit conditions. If the job's onTaskFailed - * property is noaction, then specifying this property returns an error and the - * add task request fails with an invalid property value error; if you are - * calling the REST API directly, the HTTP status code is 400 (Bad Request). - * Possible values include: 'none', 'disable', 'terminate' - * @member {string} [exitOptions.dependencyAction] The default is 'satisfy' for - * exit code 0, and 'block' for all other exit conditions. If the job's - * usesTaskDependencies property is set to false, then specifying the - * dependencyAction property returns an error and the add task request fails - * with an invalid property value error; if you are calling the REST API - * directly, the HTTP status code is 400 (Bad Request). Possible values - * include: 'satisfy', 'block' + * @summary A range of exit codes and how the Batch service should respond to exit codes within + * that range. */ export interface ExitCodeRangeMapping { + /** + * @summary The first exit code in the range. + */ start: number; + /** + * @summary The last exit code in the range. + */ end: number; + /** + * @summary How the Batch service should respond if the task exits with an exit code in the range + * start to end (inclusive). + */ exitOptions: ExitOptions; } /** - * @class - * Initializes a new instance of the ExitConditions class. - * @constructor - * @summary Specifies how the Batch service should respond when the task - * completes. - * - * @member {array} [exitCodes] A list of individual task exit codes and how the - * Batch service should respond to them. - * @member {array} [exitCodeRanges] A list of task exit code ranges and how the - * Batch service should respond to them. - * @member {object} [preProcessingError] How the Batch service should respond - * if the task fails to start due to an error. - * @member {string} [preProcessingError.jobAction] The default is none for exit - * code 0 and terminate for all other exit conditions. If the job's - * onTaskFailed property is noaction, then specifying this property returns an - * error and the add task request fails with an invalid property value error; - * if you are calling the REST API directly, the HTTP status code is 400 (Bad - * Request). Possible values include: 'none', 'disable', 'terminate' - * @member {string} [preProcessingError.dependencyAction] The default is - * 'satisfy' for exit code 0, and 'block' for all other exit conditions. If the - * job's usesTaskDependencies property is set to false, then specifying the - * dependencyAction property returns an error and the add task request fails - * with an invalid property value error; if you are calling the REST API - * directly, the HTTP status code is 400 (Bad Request). Possible values - * include: 'satisfy', 'block' - * @member {object} [fileUploadError] How the Batch service should respond if a - * file upload error occurs. If the task exited with an exit code that was - * specified via exitCodes or exitCodeRanges, and then encountered a file - * upload error, then the action specified by the exit code takes precedence. - * @member {string} [fileUploadError.jobAction] The default is none for exit - * code 0 and terminate for all other exit conditions. If the job's - * onTaskFailed property is noaction, then specifying this property returns an - * error and the add task request fails with an invalid property value error; - * if you are calling the REST API directly, the HTTP status code is 400 (Bad - * Request). Possible values include: 'none', 'disable', 'terminate' - * @member {string} [fileUploadError.dependencyAction] The default is 'satisfy' - * for exit code 0, and 'block' for all other exit conditions. If the job's - * usesTaskDependencies property is set to false, then specifying the - * dependencyAction property returns an error and the add task request fails - * with an invalid property value error; if you are calling the REST API - * directly, the HTTP status code is 400 (Bad Request). Possible values - * include: 'satisfy', 'block' - * @member {object} [default] How the Batch service should respond if the task - * fails with an exit condition not covered by any of the other properties. - * This value is used if the task exits with any nonzero exit code not listed - * in the exitCodes or exitCodeRanges collection, with a pre-processing error - * if the preProcessingError property is not present, or with a file upload - * error if the fileUploadError property is not present. If you want - * non-default behaviour on exit code 0, you must list it explicitly using the - * exitCodes or exitCodeRanges collection. - * @member {string} [default.jobAction] The default is none for exit code 0 and - * terminate for all other exit conditions. If the job's onTaskFailed property - * is noaction, then specifying this property returns an error and the add task - * request fails with an invalid property value error; if you are calling the - * REST API directly, the HTTP status code is 400 (Bad Request). Possible - * values include: 'none', 'disable', 'terminate' - * @member {string} [default.dependencyAction] The default is 'satisfy' for - * exit code 0, and 'block' for all other exit conditions. If the job's - * usesTaskDependencies property is set to false, then specifying the - * dependencyAction property returns an error and the add task request fails - * with an invalid property value error; if you are calling the REST API - * directly, the HTTP status code is 400 (Bad Request). Possible values - * include: 'satisfy', 'block' + * @summary Specifies how the Batch service should respond when the task completes. */ export interface ExitConditions { + /** + * @summary A list of individual task exit codes and how the Batch service should respond to + * them. + */ exitCodes?: ExitCodeMapping[]; + /** + * @summary A list of task exit code ranges and how the Batch service should respond to them. + */ exitCodeRanges?: ExitCodeRangeMapping[]; + /** + * @summary How the Batch service should respond if the task fails to start due to an error. + */ preProcessingError?: ExitOptions; + /** + * @summary How the Batch service should respond if a file upload error occurs. + * @description If the task exited with an exit code that was specified via exitCodes or + * exitCodeRanges, and then encountered a file upload error, then the action specified by the + * exit code takes precedence. + */ fileUploadError?: ExitOptions; + /** + * @summary How the Batch service should respond if the task fails with an exit condition not + * covered by any of the other properties. + * @description This value is used if the task exits with any nonzero exit code not listed in the + * exitCodes or exitCodeRanges collection, with a pre-processing error if the preProcessingError + * property is not present, or with a file upload error if the fileUploadError property is not + * present. If you want non-default behavior on exit code 0, you must list it explicitly using + * the exitCodes or exitCodeRanges collection. + */ default?: ExitOptions; } /** - * @class - * Initializes a new instance of the AutoUserSpecification class. - * @constructor - * @summary Specifies the parameters for the auto user that runs a task on the - * Batch service. - * - * @member {string} [scope] The scope for the auto user. The default value is - * task. Possible values include: 'task', 'pool' - * @member {string} [elevationLevel] The elevation level of the auto user. The - * default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' + * @summary Specifies the parameters for the auto user that runs a task on the Batch service. */ export interface AutoUserSpecification { + /** + * @summary The scope for the auto user + * @description The default value is task. Possible values include: 'task', 'pool' + */ scope?: string; + /** + * @summary The elevation level of the auto user. + * @description The default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' + */ elevationLevel?: string; } /** - * @class - * Initializes a new instance of the UserIdentity class. - * @constructor * @summary The definition of the user identity under which the task is run. - * - * Specify either the userName or autoUser property, but not both. On - * CloudServiceConfiguration pools, this user is logged in with the INTERACTIVE - * flag. On Windows VirtualMachineConfiguration pools, this user is logged in - * with the BATCH flag. - * - * @member {string} [userName] The name of the user identity under which the - * task is run. The userName and autoUser properties are mutually exclusive; - * you must specify one but not both. - * @member {object} [autoUser] The auto user under which the task is run. The - * userName and autoUser properties are mutually exclusive; you must specify - * one but not both. - * @member {string} [autoUser.scope] The default value is task. Possible values - * include: 'task', 'pool' - * @member {string} [autoUser.elevationLevel] The default value is nonAdmin. - * Possible values include: 'nonAdmin', 'admin' + * @description Specify either the userName or autoUser property, but not both. */ export interface UserIdentity { + /** + * @summary The name of the user identity under which the task is run. + * @description The userName and autoUser properties are mutually exclusive; you must specify one + * but not both. + */ userName?: string; + /** + * @summary The auto user under which the task is run. + * @description The userName and autoUser properties are mutually exclusive; you must specify one + * but not both. + */ autoUser?: AutoUserSpecification; } /** - * @class - * Initializes a new instance of the LinuxUserConfiguration class. - * @constructor * @summary Properties used to create a user account on a Linux node. - * - * @member {number} [uid] The user ID of the user account. The uid and gid - * properties must be specified together or not at all. If not specified the - * underlying operating system picks the uid. - * @member {number} [gid] The group ID for the user account. The uid and gid - * properties must be specified together or not at all. If not specified the - * underlying operating system picks the gid. - * @member {string} [sshPrivateKey] The SSH private key for the user account. - * The private key must not be password protected. The private key is used to - * automatically configure asymmetric-key based authentication for SSH between - * nodes in a Linux pool when the pool's enableInterNodeCommunication property - * is true (it is ignored if enableInterNodeCommunication is false). It does - * this by placing the key pair into the user's .ssh directory. If not - * specified, password-less SSH is not configured between nodes (no - * modification of the user's .ssh directory is done). */ export interface LinuxUserConfiguration { + /** + * @summary The user ID of the user account. + * @description The uid and gid properties must be specified together or not at all. If not + * specified the underlying operating system picks the uid. + */ uid?: number; + /** + * @summary The group ID for the user account. + * @description The uid and gid properties must be specified together or not at all. If not + * specified the underlying operating system picks the gid. + */ gid?: number; + /** + * @summary The SSH private key for the user account. + * @description The private key must not be password protected. The private key is used to + * automatically configure asymmetric-key based authentication for SSH between nodes in a Linux + * pool when the pool's enableInterNodeCommunication property is true (it is ignored if + * enableInterNodeCommunication is false). It does this by placing the key pair into the user's + * .ssh directory. If not specified, password-less SSH is not configured between nodes (no + * modification of the user's .ssh directory is done). + */ sshPrivateKey?: string; } /** - * @class - * Initializes a new instance of the UserAccount class. - * @constructor - * @summary Properties used to create a user used to execute tasks on an Azure - * Batch node. - * - * @member {string} name The name of the user account. - * @member {string} password The password for the user account. - * @member {string} [elevationLevel] The elevation level of the user account. - * The default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {object} [linuxUserConfiguration] The Linux-specific user - * configuration for the user account. This property is ignored if specified on - * a Windows pool. If not specified, the user is created with the default - * options. - * @member {number} [linuxUserConfiguration.uid] The uid and gid properties - * must be specified together or not at all. If not specified the underlying - * operating system picks the uid. - * @member {number} [linuxUserConfiguration.gid] The uid and gid properties - * must be specified together or not at all. If not specified the underlying - * operating system picks the gid. - * @member {string} [linuxUserConfiguration.sshPrivateKey] The private key must - * not be password protected. The private key is used to automatically - * configure asymmetric-key based authentication for SSH between nodes in a - * Linux pool when the pool's enableInterNodeCommunication property is true (it - * is ignored if enableInterNodeCommunication is false). It does this by - * placing the key pair into the user's .ssh directory. If not specified, - * password-less SSH is not configured between nodes (no modification of the - * user's .ssh directory is done). + * @summary Properties used to create a user account on a Windows node. + */ +export interface WindowsUserConfiguration { + /** + * @summary The login mode for the user. + * @description The default value for VirtualMachineConfiguration pools is batch and for + * CloudServiceConfiguration pools is interactive. Possible values include: 'batch', + * 'interactive' + */ + loginMode?: string; +} + +/** + * @summary Properties used to create a user used to execute tasks on an Azure Batch node. */ export interface UserAccount { + /** + * @summary The name of the user account. + */ name: string; + /** + * @summary The password for the user account. + */ password: string; + /** + * @summary The elevation level of the user account. + * @description The default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' + */ elevationLevel?: string; + /** + * @summary The Linux-specific user configuration for the user account. + * @description This property is ignored if specified on a Windows pool. If not specified, the + * user is created with the default options. + */ linuxUserConfiguration?: LinuxUserConfiguration; + /** + * @summary The Windows-specific user configuration for the user account. + * @description This property can only be specified if the user is on a Windows pool. If not + * specified and on a Windows pool, the user is created with the default options. + */ + windowsUserConfiguration?: WindowsUserConfiguration; } /** - * @class - * Initializes a new instance of the TaskConstraints class. - * @constructor * @summary Execution constraints to apply to a task. - * - * @member {moment.duration} [maxWallClockTime] The maximum elapsed time that - * the task may run, measured from the time the task starts. If the task does - * not complete within the time limit, the Batch service terminates it. If this - * is not specified, there is no time limit on how long the task may run. - * @member {moment.duration} [retentionTime] The minimum time to retain the - * task directory on the compute node where it ran, from the time it completes - * execution. After this time, the Batch service may delete the task directory - * and all its contents. The default is infinite, i.e. the task directory will - * be retained until the compute node is removed or reimaged. - * @member {number} [maxTaskRetryCount] The maximum number of times the task - * may be retried. The Batch service retries a task if its exit code is - * nonzero. Note that this value specifically controls the number of retries - * for the task executable due to a nonzero exit code. The Batch service will - * try the task once, and may then retry up to this limit. For example, if the - * maximum retry count is 3, Batch tries the task up to 4 times (one initial - * try and 3 retries). If the maximum retry count is 0, the Batch service does - * not retry the task after the first attempt. If the maximum retry count is - * -1, the Batch service retries the task without limit. Resource files and - * application packages are only downloaded again if the task is retried on a - * new compute node. */ export interface TaskConstraints { + /** + * @summary The maximum elapsed time that the task may run, measured from the time the task + * starts. If the task does not complete within the time limit, the Batch service terminates it. + * @description If this is not specified, there is no time limit on how long the task may run. + */ maxWallClockTime?: moment.Duration; + /** + * @summary The minimum time to retain the task directory on the compute node where it ran, from + * the time it completes execution. After this time, the Batch service may delete the task + * directory and all its contents. + * @description The default is 7 days, i.e. the task directory will be retained for 7 days unless + * the compute node is removed or the job is deleted. + */ retentionTime?: moment.Duration; + /** + * @summary The maximum number of times the task may be retried. The Batch service retries a task + * if its exit code is nonzero. + * @description Note that this value specifically controls the number of retries for the task + * executable due to a nonzero exit code. The Batch service will try the task once, and may then + * retry up to this limit. For example, if the maximum retry count is 3, Batch tries the task up + * to 4 times (one initial try and 3 retries). If the maximum retry count is 0, the Batch service + * does not retry the task after the first attempt. If the maximum retry count is -1, the Batch + * service retries the task without limit. + */ maxTaskRetryCount?: number; } /** - * @class - * Initializes a new instance of the OutputFileBlobContainerDestination class. - * @constructor - * @summary Specifies a file upload destination within an Azure blob storage - * container. - * - * @member {string} [path] The destination blob or virtual directory within the - * Azure Storage container. If filePattern refers to a specific file (i.e. - * contains no wildcards), then path is the name of the blob to which to upload - * that file. If filePattern contains one or more wildcards (and therefore may - * match multiple files), then path is the name of the blob virtual directory - * (which is prepended to each blob name) to which to upload the file(s). If - * omitted, file(s) are uploaded to the root of the container with a blob name - * matching their file name. - * @member {string} containerUrl The URL of the container within Azure Blob - * Storage to which to upload the file(s). The URL must include a Shared Access - * Signature (SAS) granting write permissions to the container. + * @summary Specifies a file upload destination within an Azure blob storage container. */ export interface OutputFileBlobContainerDestination { + /** + * @summary The destination blob or virtual directory within the Azure Storage container. + * @description If filePattern refers to a specific file (i.e. contains no wildcards), then path + * is the name of the blob to which to upload that file. If filePattern contains one or more + * wildcards (and therefore may match multiple files), then path is the name of the blob virtual + * directory (which is prepended to each blob name) to which to upload the file(s). If omitted, + * file(s) are uploaded to the root of the container with a blob name matching their file name. + */ path?: string; + /** + * @summary The URL of the container within Azure Blob Storage to which to upload the file(s). + * @description The URL must include a Shared Access Signature (SAS) granting write permissions + * to the container. + */ containerUrl: string; } /** - * @class - * Initializes a new instance of the OutputFileDestination class. - * @constructor * @summary The destination to which a file should be uploaded. - * - * @member {object} [container] A location in Azure blob storage to which files - * are uploaded. - * @member {string} [container.path] If filePattern refers to a specific file - * (i.e. contains no wildcards), then path is the name of the blob to which to - * upload that file. If filePattern contains one or more wildcards (and - * therefore may match multiple files), then path is the name of the blob - * virtual directory (which is prepended to each blob name) to which to upload - * the file(s). If omitted, file(s) are uploaded to the root of the container - * with a blob name matching their file name. - * @member {string} [container.containerUrl] The URL must include a Shared - * Access Signature (SAS) granting write permissions to the container. */ export interface OutputFileDestination { + /** + * @summary A location in Azure blob storage to which files are uploaded. + */ container?: OutputFileBlobContainerDestination; } /** - * @class - * Initializes a new instance of the OutputFileUploadOptions class. - * @constructor - * @summary Details about an output file upload operation, including under what - * conditions to perform the upload. - * - * @member {string} uploadCondition The conditions under which the task output - * file or set of files should be uploaded. The default is taskcompletion. - * Possible values include: 'taskSuccess', 'taskFailure', 'taskCompletion' + * @summary Details about an output file upload operation, including under what conditions to + * perform the upload. */ export interface OutputFileUploadOptions { + /** + * @summary The conditions under which the task output file or set of files should be uploaded. + * @description The default is taskcompletion. Possible values include: 'taskSuccess', + * 'taskFailure', 'taskCompletion' + */ uploadCondition: string; } /** - * @class - * Initializes a new instance of the OutputFile class. - * @constructor - * @summary A specification for uploading files from an Azure Batch node to - * another location after the Batch service has finished executing the task - * process. - * - * @member {string} filePattern A pattern indicating which file(s) to upload. - * Both relative and absolute paths are supported. Relative paths are relative - * to the task working directory. The following wildcards are supported: * - * matches 0 or more characters (for example pattern abc* would match abc or - * abcdef), ** matches any directory, ? matches any single character, [abc] - * matches one character in the brackets, and [a-c] matches one character in - * the range. Brackets can include a negation to match any character not - * specified (for example [!abc] matches any character but a, b, or c). If a - * file name starts with "." it is ignored by default but may be matched by - * specifying it explicitly (for example *.gif will not match .a.gif, but - * .*.gif will). A simple example: **\*.txt matches any file that does not - * start in '.' and ends with .txt in the task working directory or any - * subdirectory. If the filename contains a wildcard character it can be - * escaped using brackets (for example abc[*] would match a file named abc*). - * Note that both \ and / are treated as directory separators on Windows, but - * only / is on Linux. Environment variables (%var% on Windows or $var on - * Linux) are expanded prior to the pattern being applied. - * @member {object} destination The destination for the output file(s). - * @member {object} [destination.container] - * @member {string} [destination.container.path] If filePattern refers to a - * specific file (i.e. contains no wildcards), then path is the name of the - * blob to which to upload that file. If filePattern contains one or more - * wildcards (and therefore may match multiple files), then path is the name of - * the blob virtual directory (which is prepended to each blob name) to which - * to upload the file(s). If omitted, file(s) are uploaded to the root of the - * container with a blob name matching their file name. - * @member {string} [destination.container.containerUrl] The URL must include a - * Shared Access Signature (SAS) granting write permissions to the container. - * @member {object} uploadOptions Additional options for the upload operation, - * including under what conditions to perform the upload. - * @member {string} [uploadOptions.uploadCondition] The default is - * taskcompletion. Possible values include: 'taskSuccess', 'taskFailure', - * 'taskCompletion' + * @summary A specification for uploading files from an Azure Batch node to another location after + * the Batch service has finished executing the task process. */ export interface OutputFile { + /** + * @summary A pattern indicating which file(s) to upload. + * @description Both relative and absolute paths are supported. Relative paths are relative to + * the task working directory. The following wildcards are supported: * matches 0 or more + * characters (for example pattern abc* would match abc or abcdef), ** matches any directory, ? + * matches any single character, [abc] matches one character in the brackets, and [a-c] matches + * one character in the range. Brackets can include a negation to match any character not + * specified (for example [!abc] matches any character but a, b, or c). If a file name starts + * with "." it is ignored by default but may be matched by specifying it explicitly (for example + * *.gif will not match .a.gif, but .*.gif will). A simple example: **\*.txt matches any file + * that does not start in '.' and ends with .txt in the task working directory or any + * subdirectory. If the filename contains a wildcard character it can be escaped using brackets + * (for example abc[*] would match a file named abc*). Note that both \ and / are treated as + * directory separators on Windows, but only / is on Linux. Environment variables (%var% on + * Windows or $var on Linux) are expanded prior to the pattern being applied. + */ filePattern: string; + /** + * @summary The destination for the output file(s). + */ destination: OutputFileDestination; + /** + * @summary Additional options for the upload operation, including under what conditions to + * perform the upload. + */ uploadOptions: OutputFileUploadOptions; } /** - * @class - * Initializes a new instance of the JobManagerTask class. - * @constructor * @summary Specifies details of a Job Manager task. - * - * The Job Manager task is automatically started when the job is created. The - * Batch service tries to schedule the Job Manager task before any other tasks - * in the job. When shrinking a pool, the Batch service tries to preserve - * compute nodes where Job Manager tasks are running for as long as possible - * (that is, nodes running 'normal' tasks are removed before nodes running Job - * Manager tasks). When a Job Manager task fails and needs to be restarted, the - * system tries to schedule it at the highest priority. If there are no idle - * nodes available, the system may terminate one of the running tasks in the - * pool and return it to the queue in order to make room for the Job Manager - * task to restart. Note that a Job Manager task in one job does not have - * priority over tasks in other jobs. Across jobs, only job level priorities - * are observed. For example, if a Job Manager in a priority 0 job needs to be - * restarted, it will not displace tasks of a priority 1 job. Batch will retry - * tasks when a recovery operation is triggered on a compute node. Examples of - * recovery operations include (but are not limited to) when an unhealthy - * compute node is rebooted or a compute node disappeared due to host failure. - * Retries due to recovery operations are independent of and are not counted - * against the maxTaskRetryCount. Even if the maxTaskRetryCount is 0, an - * internal retry due to a recovery operation may occur. Because of this, all - * tasks should be idempotent. This means tasks need to tolerate being - * interrupted and restarted without causing any corruption or duplicate data. - * The best practice for long running tasks is to use some form of - * checkpointing. - * - * @member {string} id A string that uniquely identifies the Job Manager task - * within the job. The ID can contain any combination of alphanumeric - * characters including hyphens and underscores and cannot contain more than 64 - * characters. - * @member {string} [displayName] The display name of the Job Manager task. It - * need not be unique and can contain any Unicode characters up to a maximum - * length of 1024. - * @member {string} commandLine The command line of the Job Manager task. The - * command line does not run under a shell, and therefore cannot take advantage - * of shell features such as environment variable expansion. If you want to - * take advantage of such features, you should invoke the shell in the command - * line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c - * MyCommand" in Linux. If the command line refers to file paths, it should use - * a relative path (relative to the task working directory), or use the Batch - * provided environment variable - * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [containerSettings] The settings for the container under - * which the Job Manager task runs. If the pool that will run this task has - * containerConfiguration set, this must be set as well. If the pool that will - * run this task doesn't have containerConfiguration set, this must not be set. - * When this is specified, all directories recursively below the - * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are - * mapped into the container, all task environment variables are mapped into - * the container, and the task command line is executed in the container. - * @member {string} [containerSettings.containerRunOptions] These additional - * options are supplied as arguments to the "docker create" command, in - * addition to those controlled by the Batch Service. - * @member {string} [containerSettings.imageName] This is the full image - * reference, as would be specified to "docker pull". If no tag is provided as - * part of the image name, the tag ":latest" is used as a default. - * @member {object} [containerSettings.registry] This setting can be omitted if - * was already provided at pool creation. - * @member {string} [containerSettings.registry.registryServer] If omitted, the - * default is "docker.io". - * @member {string} [containerSettings.registry.userName] - * @member {string} [containerSettings.registry.password] - * @member {array} [resourceFiles] A list of files that the Batch service will - * download to the compute node before running the command line. Files listed - * under this element are located in the task's working directory. There is a - * maximum size for the list of resource files. When the max size is exceeded, - * the request will fail and the response error code will be - * RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must - * be reduced in size. This can be achieved using .zip files, Application - * Packages, or Docker Containers. - * @member {array} [outputFiles] A list of files that the Batch service will - * upload from the compute node after running the command line. For - * multi-instance tasks, the files will only be uploaded from the compute node - * on which the primary task is executed. - * @member {array} [environmentSettings] A list of environment variable - * settings for the Job Manager task. - * @member {object} [constraints] Constraints that apply to the Job Manager - * task. - * @member {moment.duration} [constraints.maxWallClockTime] If this is not - * specified, there is no time limit on how long the task may run. - * @member {moment.duration} [constraints.retentionTime] The default is - * infinite, i.e. the task directory will be retained until the compute node is - * removed or reimaged. - * @member {number} [constraints.maxTaskRetryCount] Note that this value - * specifically controls the number of retries for the task executable due to a - * nonzero exit code. The Batch service will try the task once, and may then - * retry up to this limit. For example, if the maximum retry count is 3, Batch - * tries the task up to 4 times (one initial try and 3 retries). If the maximum - * retry count is 0, the Batch service does not retry the task after the first - * attempt. If the maximum retry count is -1, the Batch service retries the - * task without limit. Resource files and application packages are only - * downloaded again if the task is retried on a new compute node. - * @member {boolean} [killJobOnCompletion] Whether completion of the Job - * Manager task signifies completion of the entire job. If true, when the Job - * Manager task completes, the Batch service marks the job as complete. If any - * tasks are still running at this time (other than Job Release), those tasks - * are terminated. If false, the completion of the Job Manager task does not - * affect the job status. In this case, you should either use the - * onAllTasksComplete attribute to terminate the job, or have a client or user - * terminate the job explicitly. An example of this is if the Job Manager - * creates a set of tasks but then takes no further role in their execution. - * The default value is true. If you are using the onAllTasksComplete and - * onTaskFailure attributes to control job lifetime, and using the Job Manager - * task only to create the tasks for the job (not to monitor progress), then it - * is important to set killJobOnCompletion to false. - * @member {object} [userIdentity] The user identity under which the Job - * Manager task runs. If omitted, the task runs as a non-administrative user - * unique to the task. - * @member {string} [userIdentity.userName] The userName and autoUser - * properties are mutually exclusive; you must specify one but not both. - * @member {object} [userIdentity.autoUser] The userName and autoUser - * properties are mutually exclusive; you must specify one but not both. - * @member {string} [userIdentity.autoUser.scope] The default value is task. - * Possible values include: 'task', 'pool' - * @member {string} [userIdentity.autoUser.elevationLevel] The default value is - * nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {boolean} [runExclusive] Whether the Job Manager task requires - * exclusive use of the compute node where it runs. If true, no other tasks - * will run on the same compute node for as long as the Job Manager is running. - * If false, other tasks can run simultaneously with the Job Manager on a - * compute node. The Job Manager task counts normally against the node's - * concurrent task limit, so this is only relevant if the node allows multiple - * concurrent tasks. The default value is true. - * @member {array} [applicationPackageReferences] A list of application - * packages that the Batch service will deploy to the compute node before - * running the command line. Application packages are downloaded and deployed - * to a shared directory, not the task working directory. Therefore, if a - * referenced package is already on the compute node, and is up to date, then - * it is not re-downloaded; the existing copy on the compute node is used. If a - * referenced application package cannot be installed, for example because the - * package has been deleted or because download failed, the task fails. - * @member {object} [authenticationTokenSettings] The settings for an - * authentication token that the task can use to perform Batch service - * operations. If this property is set, the Batch service provides the task - * with an authentication token which can be used to authenticate Batch service - * operations without requiring an account access key. The token is provided - * via the AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations - * that the task can carry out using the token depend on the settings. For - * example, a task can request job permissions in order to add other tasks to - * the job, or check the status of the job or of other tasks under the job. - * @member {array} [authenticationTokenSettings.access] The authentication - * token grants access to a limited set of Batch service operations. Currently - * the only supported value for the access property is 'job', which grants - * access to all operations related to the job which contains the task. - * @member {boolean} [allowLowPriorityNode] Whether the Job Manager task may - * run on a low-priority compute node. The default value is true. + * @description The Job Manager task is automatically started when the job is created. The Batch + * service tries to schedule the Job Manager task before any other tasks in the job. When shrinking + * a pool, the Batch service tries to preserve compute nodes where Job Manager tasks are running + * for as long as possible (that is, nodes running 'normal' tasks are removed before nodes running + * Job Manager tasks). When a Job Manager task fails and needs to be restarted, the system tries to + * schedule it at the highest priority. If there are no idle nodes available, the system may + * terminate one of the running tasks in the pool and return it to the queue in order to make room + * for the Job Manager task to restart. Note that a Job Manager task in one job does not have + * priority over tasks in other jobs. Across jobs, only job level priorities are observed. For + * example, if a Job Manager in a priority 0 job needs to be restarted, it will not displace tasks + * of a priority 1 job. Batch will retry tasks when a recovery operation is triggered on a compute + * node. Examples of recovery operations include (but are not limited to) when an unhealthy compute + * node is rebooted or a compute node disappeared due to host failure. Retries due to recovery + * operations are independent of and are not counted against the maxTaskRetryCount. Even if the + * maxTaskRetryCount is 0, an internal retry due to a recovery operation may occur. Because of + * this, all tasks should be idempotent. This means tasks need to tolerate being interrupted and + * restarted without causing any corruption or duplicate data. The best practice for long running + * tasks is to use some form of checkpointing. */ export interface JobManagerTask { + /** + * @summary A string that uniquely identifies the Job Manager task within the job. + * @description The ID can contain any combination of alphanumeric characters including hyphens + * and underscores and cannot contain more than 64 characters. + */ id: string; + /** + * @summary The display name of the Job Manager task. + * @description It need not be unique and can contain any Unicode characters up to a maximum + * length of 1024. + */ displayName?: string; + /** + * @summary The command line of the Job Manager task. + * @description The command line does not run under a shell, and therefore cannot take advantage + * of shell features such as environment variable expansion. If you want to take advantage of + * such features, you should invoke the shell in the command line, for example using "cmd /c + * MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file + * paths, it should use a relative path (relative to the task working directory), or use the + * Batch provided environment variable + * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + */ commandLine: string; + /** + * @summary The settings for the container under which the Job Manager task runs. + * @description If the pool that will run this task has containerConfiguration set, this must be + * set as well. If the pool that will run this task doesn't have containerConfiguration set, this + * must not be set. When this is specified, all directories recursively below the + * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the + * container, all task environment variables are mapped into the container, and the task command + * line is executed in the container. + */ containerSettings?: TaskContainerSettings; + /** + * @summary A list of files that the Batch service will download to the compute node before + * running the command line. + * @description Files listed under this element are located in the task's working directory. + * There is a maximum size for the list of resource files. When the max size is exceeded, the + * request will fail and the response error code will be RequestEntityTooLarge. If this occurs, + * the collection of ResourceFiles must be reduced in size. This can be achieved using .zip + * files, Application Packages, or Docker Containers. + */ resourceFiles?: ResourceFile[]; + /** + * @summary A list of files that the Batch service will upload from the compute node after + * running the command line. + * @description For multi-instance tasks, the files will only be uploaded from the compute node + * on which the primary task is executed. + */ outputFiles?: OutputFile[]; + /** + * @summary A list of environment variable settings for the Job Manager task. + */ environmentSettings?: EnvironmentSetting[]; + /** + * @summary Constraints that apply to the Job Manager task. + */ constraints?: TaskConstraints; + /** + * @summary Whether completion of the Job Manager task signifies completion of the entire job. + * @description If true, when the Job Manager task completes, the Batch service marks the job as + * complete. If any tasks are still running at this time (other than Job Release), those tasks + * are terminated. If false, the completion of the Job Manager task does not affect the job + * status. In this case, you should either use the onAllTasksComplete attribute to terminate the + * job, or have a client or user terminate the job explicitly. An example of this is if the Job + * Manager creates a set of tasks but then takes no further role in their execution. The default + * value is true. If you are using the onAllTasksComplete and onTaskFailure attributes to control + * job lifetime, and using the Job Manager task only to create the tasks for the job (not to + * monitor progress), then it is important to set killJobOnCompletion to false. + */ killJobOnCompletion?: boolean; + /** + * @summary The user identity under which the Job Manager task runs. + * @description If omitted, the task runs as a non-administrative user unique to the task. + */ userIdentity?: UserIdentity; + /** + * @summary Whether the Job Manager task requires exclusive use of the compute node where it + * runs. + * @description If true, no other tasks will run on the same compute node for as long as the Job + * Manager is running. If false, other tasks can run simultaneously with the Job Manager on a + * compute node. The Job Manager task counts normally against the node's concurrent task limit, + * so this is only relevant if the node allows multiple concurrent tasks. The default value is + * true. + */ runExclusive?: boolean; + /** + * @summary A list of application packages that the Batch service will deploy to the compute node + * before running the command line. + * @description Application packages are downloaded and deployed to a shared directory, not the + * task working directory. Therefore, if a referenced package is already on the compute node, and + * is up to date, then it is not re-downloaded; the existing copy on the compute node is used. If + * a referenced application package cannot be installed, for example because the package has been + * deleted or because download failed, the task fails. + */ applicationPackageReferences?: ApplicationPackageReference[]; + /** + * @summary The settings for an authentication token that the task can use to perform Batch + * service operations. + * @description If this property is set, the Batch service provides the task with an + * authentication token which can be used to authenticate Batch service operations without + * requiring an account access key. The token is provided via the AZ_BATCH_AUTHENTICATION_TOKEN + * environment variable. The operations that the task can carry out using the token depend on the + * settings. For example, a task can request job permissions in order to add other tasks to the + * job, or check the status of the job or of other tasks under the job. + */ authenticationTokenSettings?: AuthenticationTokenSettings; + /** + * @summary Whether the Job Manager task may run on a low-priority compute node. + * @description The default value is true. + */ allowLowPriorityNode?: boolean; } /** - * @class - * Initializes a new instance of the JobPreparationTask class. - * @constructor - * @summary A Job Preparation task to run before any tasks of the job on any - * given compute node. - * - * You can use Job Preparation to prepare a compute node to run tasks for the - * job. Activities commonly performed in Job Preparation include: Downloading - * common resource files used by all the tasks in the job. The Job Preparation - * task can download these common resource files to the shared location on the - * compute node. (AZ_BATCH_NODE_ROOT_DIR\shared), or starting a local service - * on the compute node so that all tasks of that job can communicate with it. - * If the Job Preparation task fails (that is, exhausts its retry count before - * exiting with exit code 0), Batch will not run tasks of this job on the - * compute node. The node remains ineligible to run tasks of this job until it - * is reimaged. The node remains active and can be used for other jobs. The Job - * Preparation task can run multiple times on the same compute node. Therefore, - * you should write the Job Preparation task to handle re-execution. If the - * compute node is rebooted, the Job Preparation task is run again on the node - * before scheduling any other task of the job, if - * rerunOnNodeRebootAfterSuccess is true or if the Job Preparation task did not - * previously complete. If the compute node is reimaged, the Job Preparation - * task is run again before scheduling any task of the job. Batch will retry - * tasks when a recovery operation is triggered on a compute node. Examples of - * recovery operations include (but are not limited to) when an unhealthy - * compute node is rebooted or a compute node disappeared due to host failure. - * Retries due to recovery operations are independent of and are not counted - * against the maxTaskRetryCount. Even if the maxTaskRetryCount is 0, an - * internal retry due to a recovery operation may occur. Because of this, all - * tasks should be idempotent. This means tasks need to tolerate being - * interrupted and restarted without causing any corruption or duplicate data. - * The best practice for long running tasks is to use some form of - * checkpointing. - * - * @member {string} [id] A string that uniquely identifies the Job Preparation - * task within the job. The ID can contain any combination of alphanumeric - * characters including hyphens and underscores and cannot contain more than 64 - * characters. If you do not specify this property, the Batch service assigns a - * default value of 'jobpreparation'. No other task in the job can have the - * same ID as the Job Preparation task. If you try to submit a task with the - * same id, the Batch service rejects the request with error code - * TaskIdSameAsJobPreparationTask; if you are calling the REST API directly, - * the HTTP status code is 409 (Conflict). - * @member {string} commandLine The command line of the Job Preparation task. - * The command line does not run under a shell, and therefore cannot take - * advantage of shell features such as environment variable expansion. If you - * want to take advantage of such features, you should invoke the shell in the - * command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c - * MyCommand" in Linux. If the command line refers to file paths, it should use - * a relative path (relative to the task working directory), or use the Batch - * provided environment variable - * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [containerSettings] The settings for the container under - * which the Job Preparation task runs. When this is specified, all directories - * recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch - * directories on the node) are mapped into the container, all task environment - * variables are mapped into the container, and the task command line is - * executed in the container. - * @member {string} [containerSettings.containerRunOptions] These additional - * options are supplied as arguments to the "docker create" command, in - * addition to those controlled by the Batch Service. - * @member {string} [containerSettings.imageName] This is the full image - * reference, as would be specified to "docker pull". If no tag is provided as - * part of the image name, the tag ":latest" is used as a default. - * @member {object} [containerSettings.registry] This setting can be omitted if - * was already provided at pool creation. - * @member {string} [containerSettings.registry.registryServer] If omitted, the - * default is "docker.io". - * @member {string} [containerSettings.registry.userName] - * @member {string} [containerSettings.registry.password] - * @member {array} [resourceFiles] A list of files that the Batch service will - * download to the compute node before running the command line. Files listed - * under this element are located in the task's working directory. There is a - * maximum size for the list of resource files. When the max size is exceeded, - * the request will fail and the response error code will be - * RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must - * be reduced in size. This can be achieved using .zip files, Application - * Packages, or Docker Containers. - * @member {array} [environmentSettings] A list of environment variable - * settings for the Job Preparation task. - * @member {object} [constraints] Constraints that apply to the Job Preparation - * task. - * @member {moment.duration} [constraints.maxWallClockTime] If this is not - * specified, there is no time limit on how long the task may run. - * @member {moment.duration} [constraints.retentionTime] The default is - * infinite, i.e. the task directory will be retained until the compute node is - * removed or reimaged. - * @member {number} [constraints.maxTaskRetryCount] Note that this value - * specifically controls the number of retries for the task executable due to a - * nonzero exit code. The Batch service will try the task once, and may then - * retry up to this limit. For example, if the maximum retry count is 3, Batch - * tries the task up to 4 times (one initial try and 3 retries). If the maximum - * retry count is 0, the Batch service does not retry the task after the first - * attempt. If the maximum retry count is -1, the Batch service retries the - * task without limit. Resource files and application packages are only - * downloaded again if the task is retried on a new compute node. - * @member {boolean} [waitForSuccess] Whether the Batch service should wait for - * the Job Preparation task to complete successfully before scheduling any - * other tasks of the job on the compute node. A Job Preparation task has - * completed successfully if it exits with exit code 0. If true and the Job - * Preparation task fails on a compute node, the Batch service retries the Job - * Preparation task up to its maximum retry count (as specified in the - * constraints element). If the task has still not completed successfully after - * all retries, then the Batch service will not schedule tasks of the job to - * the compute node. The compute node remains active and eligible to run tasks - * of other jobs. If false, the Batch service will not wait for the Job - * Preparation task to complete. In this case, other tasks of the job can start - * executing on the compute node while the Job Preparation task is still - * running; and even if the Job Preparation task fails, new tasks will continue - * to be scheduled on the node. The default value is true. - * @member {object} [userIdentity] The user identity under which the Job - * Preparation task runs. If omitted, the task runs as a non-administrative - * user unique to the task on Windows nodes, or a a non-administrative user - * unique to the pool on Linux nodes. - * @member {string} [userIdentity.userName] The userName and autoUser - * properties are mutually exclusive; you must specify one but not both. - * @member {object} [userIdentity.autoUser] The userName and autoUser - * properties are mutually exclusive; you must specify one but not both. - * @member {string} [userIdentity.autoUser.scope] The default value is task. - * Possible values include: 'task', 'pool' - * @member {string} [userIdentity.autoUser.elevationLevel] The default value is - * nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {boolean} [rerunOnNodeRebootAfterSuccess] Whether the Batch service - * should rerun the Job Preparation task after a compute node reboots. The Job - * Preparation task is always rerun if a compute node is reimaged, or if the - * Job Preparation task did not complete (e.g. because the reboot occurred - * while the task was running). Therefore, you should always write a Job - * Preparation task to be idempotent and to behave correctly if run multiple - * times. The default value is true. + * @summary A Job Preparation task to run before any tasks of the job on any given compute node. + * @description You can use Job Preparation to prepare a compute node to run tasks for the job. + * Activities commonly performed in Job Preparation include: Downloading common resource files used + * by all the tasks in the job. The Job Preparation task can download these common resource files + * to the shared location on the compute node. (AZ_BATCH_NODE_ROOT_DIR\shared), or starting a local + * service on the compute node so that all tasks of that job can communicate with it. If the Job + * Preparation task fails (that is, exhausts its retry count before exiting with exit code 0), + * Batch will not run tasks of this job on the compute node. The node remains ineligible to run + * tasks of this job until it is reimaged. The node remains active and can be used for other jobs. + * The Job Preparation task can run multiple times on the same compute node. Therefore, you should + * write the Job Preparation task to handle re-execution. If the compute node is rebooted, the Job + * Preparation task is run again on the node before scheduling any other task of the job, if + * rerunOnNodeRebootAfterSuccess is true or if the Job Preparation task did not previously + * complete. If the compute node is reimaged, the Job Preparation task is run again before + * scheduling any task of the job. Batch will retry tasks when a recovery operation is triggered on + * a compute node. Examples of recovery operations include (but are not limited to) when an + * unhealthy compute node is rebooted or a compute node disappeared due to host failure. Retries + * due to recovery operations are independent of and are not counted against the maxTaskRetryCount. + * Even if the maxTaskRetryCount is 0, an internal retry due to a recovery operation may occur. + * Because of this, all tasks should be idempotent. This means tasks need to tolerate being + * interrupted and restarted without causing any corruption or duplicate data. The best practice + * for long running tasks is to use some form of checkpointing. */ export interface JobPreparationTask { + /** + * @summary A string that uniquely identifies the Job Preparation task within the job. + * @description The ID can contain any combination of alphanumeric characters including hyphens + * and underscores and cannot contain more than 64 characters. If you do not specify this + * property, the Batch service assigns a default value of 'jobpreparation'. No other task in the + * job can have the same ID as the Job Preparation task. If you try to submit a task with the + * same id, the Batch service rejects the request with error code TaskIdSameAsJobPreparationTask; + * if you are calling the REST API directly, the HTTP status code is 409 (Conflict). + */ id?: string; + /** + * @summary The command line of the Job Preparation task. + * @description The command line does not run under a shell, and therefore cannot take advantage + * of shell features such as environment variable expansion. If you want to take advantage of + * such features, you should invoke the shell in the command line, for example using "cmd /c + * MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file + * paths, it should use a relative path (relative to the task working directory), or use the + * Batch provided environment variable + * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + */ commandLine: string; + /** + * @summary The settings for the container under which the Job Preparation task runs. + * @description When this is specified, all directories recursively below the + * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the + * container, all task environment variables are mapped into the container, and the task command + * line is executed in the container. + */ containerSettings?: TaskContainerSettings; + /** + * @summary A list of files that the Batch service will download to the compute node before + * running the command line. + * @description Files listed under this element are located in the task's working directory. + * There is a maximum size for the list of resource files. When the max size is exceeded, the + * request will fail and the response error code will be RequestEntityTooLarge. If this occurs, + * the collection of ResourceFiles must be reduced in size. This can be achieved using .zip + * files, Application Packages, or Docker Containers. + */ resourceFiles?: ResourceFile[]; + /** + * @summary A list of environment variable settings for the Job Preparation task. + */ environmentSettings?: EnvironmentSetting[]; + /** + * @summary Constraints that apply to the Job Preparation task. + */ constraints?: TaskConstraints; + /** + * @summary Whether the Batch service should wait for the Job Preparation task to complete + * successfully before scheduling any other tasks of the job on the compute node. A Job + * Preparation task has completed successfully if it exits with exit code 0. + * @description If true and the Job Preparation task fails on a compute node, the Batch service + * retries the Job Preparation task up to its maximum retry count (as specified in the + * constraints element). If the task has still not completed successfully after all retries, then + * the Batch service will not schedule tasks of the job to the compute node. The compute node + * remains active and eligible to run tasks of other jobs. If false, the Batch service will not + * wait for the Job Preparation task to complete. In this case, other tasks of the job can start + * executing on the compute node while the Job Preparation task is still running; and even if the + * Job Preparation task fails, new tasks will continue to be scheduled on the node. The default + * value is true. + */ waitForSuccess?: boolean; + /** + * @summary The user identity under which the Job Preparation task runs. + * @description If omitted, the task runs as a non-administrative user unique to the task on + * Windows nodes, or a non-administrative user unique to the pool on Linux nodes. + */ userIdentity?: UserIdentity; + /** + * @summary Whether the Batch service should rerun the Job Preparation task after a compute node + * reboots. + * @description The Job Preparation task is always rerun if a compute node is reimaged, or if the + * Job Preparation task did not complete (e.g. because the reboot occurred while the task was + * running). Therefore, you should always write a Job Preparation task to be idempotent and to + * behave correctly if run multiple times. The default value is true. + */ rerunOnNodeRebootAfterSuccess?: boolean; } /** - * @class - * Initializes a new instance of the JobReleaseTask class. - * @constructor - * @summary A Job Release task to run on job completion on any compute node - * where the job has run. - * - * The Job Release task runs when the job ends, because of one of the - * following: The user calls the Terminate Job API, or the Delete Job API while - * the job is still active, the job's maximum wall clock time constraint is - * reached, and the job is still active, or the job's Job Manager task - * completed, and the job is configured to terminate when the Job Manager - * completes. The Job Release task runs on each compute node where tasks of the - * job have run and the Job Preparation task ran and completed. If you reimage - * a compute node after it has run the Job Preparation task, and the job ends - * without any further tasks of the job running on that compute node (and hence - * the Job Preparation task does not re-run), then the Job Release task does - * not run on that node. If a compute node reboots while the Job Release task - * is still running, the Job Release task runs again when the compute node - * starts up. The job is not marked as complete until all Job Release tasks - * have completed. The Job Release task runs in the background. It does not - * occupy a scheduling slot; that is, it does not count towards the - * maxTasksPerNode limit specified on the pool. - * - * @member {string} [id] A string that uniquely identifies the Job Release task - * within the job. The ID can contain any combination of alphanumeric - * characters including hyphens and underscores and cannot contain more than 64 - * characters. If you do not specify this property, the Batch service assigns a - * default value of 'jobrelease'. No other task in the job can have the same ID - * as the Job Release task. If you try to submit a task with the same id, the - * Batch service rejects the request with error code - * TaskIdSameAsJobReleaseTask; if you are calling the REST API directly, the - * HTTP status code is 409 (Conflict). - * @member {string} commandLine The command line of the Job Release task. The - * command line does not run under a shell, and therefore cannot take advantage - * of shell features such as environment variable expansion. If you want to - * take advantage of such features, you should invoke the shell in the command - * line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c - * MyCommand" in Linux. If the command line refers to file paths, it should use - * a relative path (relative to the task working directory), or use the Batch - * provided environment variable - * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [containerSettings] The settings for the container under - * which the Job Release task runs. When this is specified, all directories - * recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch - * directories on the node) are mapped into the container, all task environment - * variables are mapped into the container, and the task command line is - * executed in the container. - * @member {string} [containerSettings.containerRunOptions] These additional - * options are supplied as arguments to the "docker create" command, in - * addition to those controlled by the Batch Service. - * @member {string} [containerSettings.imageName] This is the full image - * reference, as would be specified to "docker pull". If no tag is provided as - * part of the image name, the tag ":latest" is used as a default. - * @member {object} [containerSettings.registry] This setting can be omitted if - * was already provided at pool creation. - * @member {string} [containerSettings.registry.registryServer] If omitted, the - * default is "docker.io". - * @member {string} [containerSettings.registry.userName] - * @member {string} [containerSettings.registry.password] - * @member {array} [resourceFiles] A list of files that the Batch service will - * download to the compute node before running the command line. There is a - * maximum size for the list of resource files. When the max size is exceeded, - * the request will fail and the response error code will be - * RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must - * be reduced in size. This can be achieved using .zip files, Application - * Packages, or Docker Containers. Files listed under this element are located - * in the task's working directory. - * @member {array} [environmentSettings] A list of environment variable - * settings for the Job Release task. - * @member {moment.duration} [maxWallClockTime] The maximum elapsed time that - * the Job Release task may run on a given compute node, measured from the time - * the task starts. If the task does not complete within the time limit, the - * Batch service terminates it. The default value is 15 minutes. You may not - * specify a timeout longer than 15 minutes. If you do, the Batch service - * rejects it with an error; if you are calling the REST API directly, the HTTP - * status code is 400 (Bad Request). - * @member {moment.duration} [retentionTime] The minimum time to retain the - * task directory for the Job Release task on the compute node. After this - * time, the Batch service may delete the task directory and all its contents. - * The default is infinite, i.e. the task directory will be retained until the - * compute node is removed or reimaged. - * @member {object} [userIdentity] The user identity under which the Job - * Release task runs. If omitted, the task runs as a non-administrative user - * unique to the task. - * @member {string} [userIdentity.userName] The userName and autoUser - * properties are mutually exclusive; you must specify one but not both. - * @member {object} [userIdentity.autoUser] The userName and autoUser - * properties are mutually exclusive; you must specify one but not both. - * @member {string} [userIdentity.autoUser.scope] The default value is task. - * Possible values include: 'task', 'pool' - * @member {string} [userIdentity.autoUser.elevationLevel] The default value is - * nonAdmin. Possible values include: 'nonAdmin', 'admin' + * @summary A Job Release task to run on job completion on any compute node where the job has run. + * @description The Job Release task runs when the job ends, because of one of the following: The + * user calls the Terminate Job API, or the Delete Job API while the job is still active, the job's + * maximum wall clock time constraint is reached, and the job is still active, or the job's Job + * Manager task completed, and the job is configured to terminate when the Job Manager completes. + * The Job Release task runs on each compute node where tasks of the job have run and the Job + * Preparation task ran and completed. If you reimage a compute node after it has run the Job + * Preparation task, and the job ends without any further tasks of the job running on that compute + * node (and hence the Job Preparation task does not re-run), then the Job Release task does not + * run on that node. If a compute node reboots while the Job Release task is still running, the Job + * Release task runs again when the compute node starts up. The job is not marked as complete until + * all Job Release tasks have completed. The Job Release task runs in the background. It does not + * occupy a scheduling slot; that is, it does not count towards the maxTasksPerNode limit specified + * on the pool. */ export interface JobReleaseTask { + /** + * @summary A string that uniquely identifies the Job Release task within the job. + * @description The ID can contain any combination of alphanumeric characters including hyphens + * and underscores and cannot contain more than 64 characters. If you do not specify this + * property, the Batch service assigns a default value of 'jobrelease'. No other task in the job + * can have the same ID as the Job Release task. If you try to submit a task with the same id, + * the Batch service rejects the request with error code TaskIdSameAsJobReleaseTask; if you are + * calling the REST API directly, the HTTP status code is 409 (Conflict). + */ id?: string; + /** + * @summary The command line of the Job Release task. + * @description The command line does not run under a shell, and therefore cannot take advantage + * of shell features such as environment variable expansion. If you want to take advantage of + * such features, you should invoke the shell in the command line, for example using "cmd /c + * MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file + * paths, it should use a relative path (relative to the task working directory), or use the + * Batch provided environment variable + * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + */ commandLine: string; + /** + * @summary The settings for the container under which the Job Release task runs. + * @description When this is specified, all directories recursively below the + * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the + * container, all task environment variables are mapped into the container, and the task command + * line is executed in the container. + */ containerSettings?: TaskContainerSettings; + /** + * @summary A list of files that the Batch service will download to the compute node before + * running the command line. There is a maximum size for the list of resource files. When the + * max size is exceeded, the request will fail and the response error code will be + * RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in + * size. This can be achieved using .zip files, Application Packages, or Docker Containers. + * @description Files listed under this element are located in the task's working directory. + */ resourceFiles?: ResourceFile[]; + /** + * @summary A list of environment variable settings for the Job Release task. + */ environmentSettings?: EnvironmentSetting[]; + /** + * @summary The maximum elapsed time that the Job Release task may run on a given compute node, + * measured from the time the task starts. If the task does not complete within the time limit, + * the Batch service terminates it. The default value is 15 minutes. You may not specify a + * timeout longer than 15 minutes. If you do, the Batch service rejects it with an error; if you + * are calling the REST API directly, the HTTP status code is 400 (Bad Request). + */ maxWallClockTime?: moment.Duration; + /** + * @summary The minimum time to retain the task directory for the Job Release task on the compute + * node. After this time, the Batch service may delete the task directory and all its contents. + * @description The default is 7 days, i.e. the task directory will be retained for 7 days unless + * the compute node is removed or the job is deleted. + */ retentionTime?: moment.Duration; + /** + * @summary The user identity under which the Job Release task runs. + * @description If omitted, the task runs as a non-administrative user unique to the task. + */ userIdentity?: UserIdentity; } /** - * @class - * Initializes a new instance of the TaskSchedulingPolicy class. - * @constructor * @summary Specifies how tasks should be distributed across compute nodes. - * - * @member {string} nodeFillType How tasks are distributed across compute nodes - * in a pool. Possible values include: 'spread', 'pack' */ export interface TaskSchedulingPolicy { + /** + * @summary How tasks are distributed across compute nodes in a pool. + * @description Possible values include: 'spread', 'pack' + */ nodeFillType: string; } /** - * @class - * Initializes a new instance of the StartTask class. - * @constructor - * @summary A task which is run when a compute node joins a pool in the Azure - * Batch service, or when the compute node is rebooted or reimaged. - * - * Batch will retry tasks when a recovery operation is triggered on a compute - * node. Examples of recovery operations include (but are not limited to) when - * an unhealthy compute node is rebooted or a compute node disappeared due to - * host failure. Retries due to recovery operations are independent of and are - * not counted against the maxTaskRetryCount. Even if the maxTaskRetryCount is - * 0, an internal retry due to a recovery operation may occur. Because of this, - * all tasks should be idempotent. This means tasks need to tolerate being - * interrupted and restarted without causing any corruption or duplicate data. - * The best practice for long running tasks is to use some form of - * checkpointing. - * - * @member {string} commandLine The command line of the start task. The command - * line does not run under a shell, and therefore cannot take advantage of - * shell features such as environment variable expansion. If you want to take - * advantage of such features, you should invoke the shell in the command line, - * for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in - * Linux. If the command line refers to file paths, it should use a relative - * path (relative to the task working directory), or use the Batch provided - * environment variable - * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [containerSettings] The settings for the container under - * which the start task runs. When this is specified, all directories - * recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch - * directories on the node) are mapped into the container, all task environment - * variables are mapped into the container, and the task command line is - * executed in the container. - * @member {string} [containerSettings.containerRunOptions] These additional - * options are supplied as arguments to the "docker create" command, in - * addition to those controlled by the Batch Service. - * @member {string} [containerSettings.imageName] This is the full image - * reference, as would be specified to "docker pull". If no tag is provided as - * part of the image name, the tag ":latest" is used as a default. - * @member {object} [containerSettings.registry] This setting can be omitted if - * was already provided at pool creation. - * @member {string} [containerSettings.registry.registryServer] If omitted, the - * default is "docker.io". - * @member {string} [containerSettings.registry.userName] - * @member {string} [containerSettings.registry.password] - * @member {array} [resourceFiles] A list of files that the Batch service will - * download to the compute node before running the command line. There is a - * maximum size for the list of resource files. When the max size is exceeded, - * the request will fail and the response error code will be - * RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must - * be reduced in size. This can be achieved using .zip files, Application - * Packages, or Docker Containers. Files listed under this element are located - * in the task's working directory. - * @member {array} [environmentSettings] A list of environment variable - * settings for the start task. - * @member {object} [userIdentity] The user identity under which the start task - * runs. If omitted, the task runs as a non-administrative user unique to the - * task. - * @member {string} [userIdentity.userName] The userName and autoUser - * properties are mutually exclusive; you must specify one but not both. - * @member {object} [userIdentity.autoUser] The userName and autoUser - * properties are mutually exclusive; you must specify one but not both. - * @member {string} [userIdentity.autoUser.scope] The default value is task. - * Possible values include: 'task', 'pool' - * @member {string} [userIdentity.autoUser.elevationLevel] The default value is - * nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {number} [maxTaskRetryCount] The maximum number of times the task - * may be retried. The Batch service retries a task if its exit code is - * nonzero. Note that this value specifically controls the number of retries. - * The Batch service will try the task once, and may then retry up to this - * limit. For example, if the maximum retry count is 3, Batch tries the task up - * to 4 times (one initial try and 3 retries). If the maximum retry count is 0, - * the Batch service does not retry the task. If the maximum retry count is -1, - * the Batch service retries the task without limit. - * @member {boolean} [waitForSuccess] Whether the Batch service should wait for - * the start task to complete successfully (that is, to exit with exit code 0) - * before scheduling any tasks on the compute node. If true and the start task - * fails on a compute node, the Batch service retries the start task up to its - * maximum retry count (maxTaskRetryCount). If the task has still not completed - * successfully after all retries, then the Batch service marks the compute - * node unusable, and will not schedule tasks to it. This condition can be - * detected via the node state and failure info details. If false, the Batch - * service will not wait for the start task to complete. In this case, other - * tasks can start executing on the compute node while the start task is still - * running; and even if the start task fails, new tasks will continue to be - * scheduled on the node. The default is false. + * @summary A task which is run when a compute node joins a pool in the Azure Batch service, or + * when the compute node is rebooted or reimaged. + * @description Batch will retry tasks when a recovery operation is triggered on a compute node. + * Examples of recovery operations include (but are not limited to) when an unhealthy compute node + * is rebooted or a compute node disappeared due to host failure. Retries due to recovery + * operations are independent of and are not counted against the maxTaskRetryCount. Even if the + * maxTaskRetryCount is 0, an internal retry due to a recovery operation may occur. Because of + * this, all tasks should be idempotent. This means tasks need to tolerate being interrupted and + * restarted without causing any corruption or duplicate data. The best practice for long running + * tasks is to use some form of checkpointing. */ export interface StartTask { + /** + * @summary The command line of the start task. + * @description The command line does not run under a shell, and therefore cannot take advantage + * of shell features such as environment variable expansion. If you want to take advantage of + * such features, you should invoke the shell in the command line, for example using "cmd /c + * MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file + * paths, it should use a relative path (relative to the task working directory), or use the + * Batch provided environment variable + * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + */ commandLine: string; + /** + * @summary The settings for the container under which the start task runs. + * @description When this is specified, all directories recursively below the + * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the + * container, all task environment variables are mapped into the container, and the task command + * line is executed in the container. + */ containerSettings?: TaskContainerSettings; + /** + * @summary A list of files that the Batch service will download to the compute node before + * running the command line. There is a maximum size for the list of resource files. When the + * max size is exceeded, the request will fail and the response error code will be + * RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in + * size. This can be achieved using .zip files, Application Packages, or Docker Containers. + * @description Files listed under this element are located in the task's working directory. + */ resourceFiles?: ResourceFile[]; + /** + * @summary A list of environment variable settings for the start task. + */ environmentSettings?: EnvironmentSetting[]; + /** + * @summary The user identity under which the start task runs. + * @description If omitted, the task runs as a non-administrative user unique to the task. + */ userIdentity?: UserIdentity; + /** + * @summary The maximum number of times the task may be retried. + * @description The Batch service retries a task if its exit code is nonzero. Note that this + * value specifically controls the number of retries. The Batch service will try the task once, + * and may then retry up to this limit. For example, if the maximum retry count is 3, Batch tries + * the task up to 4 times (one initial try and 3 retries). If the maximum retry count is 0, the + * Batch service does not retry the task. If the maximum retry count is -1, the Batch service + * retries the task without limit. + */ maxTaskRetryCount?: number; + /** + * @summary Whether the Batch service should wait for the start task to complete successfully + * (that is, to exit with exit code 0) before scheduling any tasks on the compute node. + * @description If true and the start task fails on a compute node, the Batch service retries the + * start task up to its maximum retry count (maxTaskRetryCount). If the task has still not + * completed successfully after all retries, then the Batch service marks the compute node + * unusable, and will not schedule tasks to it. This condition can be detected via the node state + * and failure info details. If false, the Batch service will not wait for the start task to + * complete. In this case, other tasks can start executing on the compute node while the start + * task is still running; and even if the start task fails, new tasks will continue to be + * scheduled on the node. The default is false. + */ waitForSuccess?: boolean; } /** - * @class - * Initializes a new instance of the CertificateReference class. - * @constructor - * @summary A reference to a certificate to be installed on compute nodes in a - * pool. - * - * @member {string} thumbprint The thumbprint of the certificate. - * @member {string} thumbprintAlgorithm The algorithm with which the thumbprint - * is associated. This must be sha1. - * @member {string} [storeLocation] The location of the certificate store on - * the compute node into which to install the certificate. The default value is - * currentuser. This property is applicable only for pools configured with - * Windows nodes (that is, created with cloudServiceConfiguration, or with - * virtualMachineConfiguration using a Windows image reference). For Linux - * compute nodes, the certificates are stored in a directory inside the task - * working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is - * supplied to the task to query for this location. For certificates with - * visibility of 'remoteUser', a 'certs' directory is created in the user's - * home directory (e.g., /home/{user-name}/certs) and certificates are placed - * in that directory. Possible values include: 'currentUser', 'localMachine' - * @member {string} [storeName] The name of the certificate store on the - * compute node into which to install the certificate. This property is - * applicable only for pools configured with Windows nodes (that is, created - * with cloudServiceConfiguration, or with virtualMachineConfiguration using a - * Windows image reference). Common store names include: My, Root, CA, Trust, - * Disallowed, TrustedPeople, TrustedPublisher, AuthRoot, AddressBook, but any - * custom store name can also be used. The default value is My. - * @member {array} [visibility] Which user accounts on the compute node should - * have access to the private data of the certificate. You can specify more - * than one visibility in this collection. The default is all accounts. + * @summary A reference to a certificate to be installed on compute nodes in a pool. */ export interface CertificateReference { + /** + * @summary The thumbprint of the certificate. + */ thumbprint: string; + /** + * @summary The algorithm with which the thumbprint is associated. This must be sha1. + */ thumbprintAlgorithm: string; + /** + * @summary The location of the certificate store on the compute node into which to install the + * certificate. + * @description The default value is currentuser. This property is applicable only for pools + * configured with Windows nodes (that is, created with cloudServiceConfiguration, or with + * virtualMachineConfiguration using a Windows image reference). For Linux compute nodes, the + * certificates are stored in a directory inside the task working directory and an environment + * variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For + * certificates with visibility of 'remoteUser', a 'certs' directory is created in the user's + * home directory (e.g., /home/{user-name}/certs) and certificates are placed in that directory. + * Possible values include: 'currentUser', 'localMachine' + */ storeLocation?: string; + /** + * @summary The name of the certificate store on the compute node into which to install the + * certificate. + * @description This property is applicable only for pools configured with Windows nodes (that + * is, created with cloudServiceConfiguration, or with virtualMachineConfiguration using a + * Windows image reference). Common store names include: My, Root, CA, Trust, Disallowed, + * TrustedPeople, TrustedPublisher, AuthRoot, AddressBook, but any custom store name can also be + * used. The default value is My. + */ storeName?: string; + /** + * @summary Which user accounts on the compute node should have access to the private data of the + * certificate. + * @description You can specify more than one visibility in this collection. The default is all + * accounts. + */ visibility?: string[]; } /** - * @class - * Initializes a new instance of the MetadataItem class. - * @constructor * @summary A name-value pair associated with a Batch service resource. - * - * The Batch service does not assign any meaning to this metadata; it is solely - * for the use of user code. - * - * @member {string} name The name of the metadata item. - * @member {string} value The value of the metadata item. + * @description The Batch service does not assign any meaning to this metadata; it is solely for + * the use of user code. */ export interface MetadataItem { + /** + * @summary The name of the metadata item. + */ name: string; + /** + * @summary The value of the metadata item. + */ value: string; } /** - * @class - * Initializes a new instance of the CloudServiceConfiguration class. - * @constructor - * @summary The configuration for nodes in a pool based on the Azure Cloud - * Services platform. - * - * @member {string} osFamily The Azure Guest OS family to be installed on the - * virtual machines in the pool. Possible values are: - * 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. - * 3 - OS Family 3, equivalent to Windows Server 2012. - * 4 - OS Family 4, equivalent to Windows Server 2012 R2. - * 5 - OS Family 5, equivalent to Windows Server 2016. For more information, - * see Azure Guest OS Releases - * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). - * @member {string} [targetOSVersion] The Azure Guest OS version to be - * installed on the virtual machines in the pool. The default value is * which - * specifies the latest operating system version for the specified OS family. - * @member {string} [currentOSVersion] The Azure Guest OS Version currently - * installed on the virtual machines in the pool. This may differ from - * targetOSVersion if the pool state is Upgrading. In this case some virtual - * machines may be on the targetOSVersion and some may be on the - * currentOSVersion during the upgrade process. Once all virtual machines have - * upgraded, currentOSVersion is updated to be the same as targetOSVersion. + * @summary The configuration for nodes in a pool based on the Azure Cloud Services platform. */ export interface CloudServiceConfiguration { + /** + * @summary The Azure Guest OS family to be installed on the virtual machines in the pool. + * @description Possible values are: + * 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. + * 3 - OS Family 3, equivalent to Windows Server 2012. + * 4 - OS Family 4, equivalent to Windows Server 2012 R2. + * 5 - OS Family 5, equivalent to Windows Server 2016. For more information, see Azure Guest OS + * Releases + * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). + */ osFamily: string; - targetOSVersion?: string; - readonly currentOSVersion?: string; -} - -/** - * @class - * Initializes a new instance of the OSDisk class. - * @constructor - * @summary Settings for the operating system disk of the virtual machine. - * - * @member {string} [caching] The type of caching to enable for the OS disk. - * The default value for caching is readwrite. For information about the - * caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' - */ -export interface OSDisk { - caching?: string; + /** + * @summary The Azure Guest OS version to be installed on the virtual machines in the pool. + * @description The default value is * which specifies the latest operating system version for + * the specified OS family. + */ + osVersion?: string; } /** - * @class - * Initializes a new instance of the WindowsConfiguration class. - * @constructor * @summary Windows operating system settings to apply to the virtual machine. - * - * @member {boolean} [enableAutomaticUpdates] Whether automatic updates are - * enabled on the virtual machine. If omitted, the default value is true. */ export interface WindowsConfiguration { + /** + * @summary Whether automatic updates are enabled on the virtual machine. + * @description If omitted, the default value is true. + */ enableAutomaticUpdates?: boolean; } /** - * @class - * Initializes a new instance of the DataDisk class. - * @constructor - * @summary Settings which will be used by the data disks associated to compute - * nodes in the pool. - * - * @member {number} lun The logical unit number. The lun is used to uniquely - * identify each data disk. If attaching multiple disks, each should have a - * distinct lun. - * @member {string} [caching] The type of caching to be enabled for the data - * disks. The default value for caching is readwrite. For information about the - * caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' - * @member {number} diskSizeGB The initial disk size in gigabytes. - * @member {string} [storageAccountType] The storage account type to be used - * for the data disk. If omitted, the default is "standard_lrs". Possible - * values include: 'StandardLRS', 'PremiumLRS' + * @summary Settings which will be used by the data disks associated to compute nodes in the pool. */ export interface DataDisk { + /** + * @summary The logical unit number. + * @description The lun is used to uniquely identify each data disk. If attaching multiple disks, + * each should have a distinct lun. + */ lun: number; + /** + * @summary The type of caching to be enabled for the data disks. + * @description The default value for caching is readwrite. For information about the caching + * options see: + * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. + * Possible values include: 'none', 'readOnly', 'readWrite' + */ caching?: string; + /** + * @summary The initial disk size in gigabytes. + */ diskSizeGB: number; + /** + * @summary The storage account type to be used for the data disk. + * @description If omitted, the default is "standard_lrs". Possible values include: + * 'StandardLRS', 'PremiumLRS' + */ storageAccountType?: string; } /** - * @class - * Initializes a new instance of the ContainerConfiguration class. - * @constructor * @summary The configuration for container-enabled pools. - * - * @member {array} [containerImageNames] The collection of container image - * names. This is the full image reference, as would be specified to "docker - * pull". An image will be sourced from the default Docker registry unless the - * image is fully qualified with an alternative registry. - * @member {array} [containerRegistries] Additional private registries from - * which containers can be pulled. If any images must be downloaded from a - * private registry which requires credentials, then those credentials must be - * provided here. */ export interface ContainerConfiguration { + /** + * @summary The collection of container image names. + * @description This is the full image reference, as would be specified to "docker pull". An + * image will be sourced from the default Docker registry unless the image is fully qualified + * with an alternative registry. + */ containerImageNames?: string[]; + /** + * @summary Additional private registries from which containers can be pulled. + * @description If any images must be downloaded from a private registry which requires + * credentials, then those credentials must be provided here. + */ containerRegistries?: ContainerRegistry[]; } /** - * @class - * Initializes a new instance of the VirtualMachineConfiguration class. - * @constructor - * @summary The configuration for compute nodes in a pool based on the Azure - * Virtual Machines infrastructure. - * - * @member {object} imageReference A reference to the Azure Virtual Machines - * Marketplace image or the custom Virtual Machine image to use. - * @member {string} [imageReference.publisher] For example, Canonical or - * MicrosoftWindowsServer. - * @member {string} [imageReference.offer] For example, UbuntuServer or - * WindowsServer. - * @member {string} [imageReference.sku] For example, 14.04.0-LTS or - * 2012-R2-Datacenter. - * @member {string} [imageReference.version] A value of 'latest' can be - * specified to select the latest version of an image. If omitted, the default - * is 'latest'. - * @member {string} [imageReference.virtualMachineImageId] This property is - * mutually exclusive with other ImageReference properties. The virtual machine - * image must be in the same region and subscription as the Azure Batch - * account. For information about the firewall settings for the Batch node - * agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * @member {object} [osDisk] Settings for the operating system disk of the - * Virtual Machine. - * @member {string} [osDisk.caching] The default value for caching is - * readwrite. For information about the caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' - * @member {string} nodeAgentSKUId The SKU of the Batch node agent to be - * provisioned on compute nodes in the pool. The Batch node agent is a program - * that runs on each node in the pool, and provides the command-and-control - * interface between the node and the Batch service. There are different - * implementations of the node agent, known as SKUs, for different operating - * systems. You must specify a node agent SKU which matches the selected image - * reference. To get the list of supported node agent SKUs along with their - * list of verified image references, see the 'List supported node agent SKUs' - * operation. - * @member {object} [windowsConfiguration] Windows operating system settings on - * the virtual machine. This property must not be specified if the - * imageReference or osDisk property specifies a Linux OS image. - * @member {boolean} [windowsConfiguration.enableAutomaticUpdates] If omitted, - * the default value is true. - * @member {array} [dataDisks] The configuration for data disks attached to the - * comptue nodes in the pool. This property must be specified if the compute - * nodes in the pool need to have empty data disks attached to them. This - * cannot be updated. Each node gets its own disk (the disk is not a file - * share). Existing disks cannot be attached, each attached disk is empty. When - * the node is removed from the pool, the disk and all data associated with it - * is also deleted. The disk is not formatted after being attached, it must be - * formatted before use - for more information see - * https://docs.microsoft.com/en-us/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux - * and - * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. - * @member {string} [licenseType] The type of on-premises license to be used - * when deploying the operating system. This only applies to images that - * contain the Windows operating system, and should only be used when you hold - * valid on-premises licenses for the nodes which will be deployed. If omitted, - * no on-premises licensing discount is applied. Values are: - * - * Windows_Server - The on-premises license is for Windows Server. - * Windows_Client - The on-premises license is for Windows Client. - * @member {object} [containerConfiguration] The container configuration for - * the pool. If specified, setup is performed on each node in the pool to allow - * tasks to run in containers. All regular tasks and job manager tasks run on - * this pool must specify the containerSettings property, and all other tasks - * may specify it. - * @member {array} [containerConfiguration.containerImageNames] This is the - * full image reference, as would be specified to "docker pull". An image will - * be sourced from the default Docker registry unless the image is fully - * qualified with an alternative registry. - * @member {array} [containerConfiguration.containerRegistries] If any images - * must be downloaded from a private registry which requires credentials, then - * those credentials must be provided here. + * @summary The configuration for compute nodes in a pool based on the Azure Virtual Machines + * infrastructure. */ export interface VirtualMachineConfiguration { + /** + * @summary A reference to the Azure Virtual Machines Marketplace image or the custom Virtual + * Machine image to use. + */ imageReference: ImageReference; - osDisk?: OSDisk; + /** + * @summary The SKU of the Batch node agent to be provisioned on compute nodes in the pool. + * @description The Batch node agent is a program that runs on each node in the pool, and + * provides the command-and-control interface between the node and the Batch service. There are + * different implementations of the node agent, known as SKUs, for different operating systems. + * You must specify a node agent SKU which matches the selected image reference. To get the list + * of supported node agent SKUs along with their list of verified image references, see the 'List + * supported node agent SKUs' operation. + */ nodeAgentSKUId: string; + /** + * @summary Windows operating system settings on the virtual machine. + * @description This property must not be specified if the imageReference property specifies a + * Linux OS image. + */ windowsConfiguration?: WindowsConfiguration; + /** + * @summary The configuration for data disks attached to the comptue nodes in the pool. + * @description This property must be specified if the compute nodes in the pool need to have + * empty data disks attached to them. This cannot be updated. Each node gets its own disk (the + * disk is not a file share). Existing disks cannot be attached, each attached disk is empty. + * When the node is removed from the pool, the disk and all data associated with it is also + * deleted. The disk is not formatted after being attached, it must be formatted before use - for + * more information see + * https://docs.microsoft.com/en-us/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux + * and + * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. + */ dataDisks?: DataDisk[]; + /** + * @summary The type of on-premises license to be used when deploying the operating system. + * @description This only applies to images that contain the Windows operating system, and should + * only be used when you hold valid on-premises licenses for the nodes which will be deployed. If + * omitted, no on-premises licensing discount is applied. Values are: + * + * Windows_Server - The on-premises license is for Windows Server. + * Windows_Client - The on-premises license is for Windows Client. + + */ licenseType?: string; + /** + * @summary The container configuration for the pool. + * @description If specified, setup is performed on each node in the pool to allow tasks to run + * in containers. All regular tasks and job manager tasks run on this pool must specify the + * containerSettings property, and all other tasks may specify it. + */ containerConfiguration?: ContainerConfiguration; } /** - * @class - * Initializes a new instance of the NetworkSecurityGroupRule class. - * @constructor * @summary A network security group rule to apply to an inbound endpoint. - * - * @member {number} priority The priority for this rule. Priorities within a - * pool must be unique and are evaluated in order of priority. The lower the - * number the higher the priority. For example, rules could be specified with - * order numbers of 150, 250, and 350. The rule with the order number of 150 - * takes precedence over the rule that has an order of 250. Allowed priorities - * are 150 to 3500. If any reserved or duplicate values are provided the - * request fails with HTTP status code 400. - * @member {string} access The action that should be taken for a specified IP - * address, subnet range or tag. Possible values include: 'allow', 'deny' - * @member {string} sourceAddressPrefix The source address prefix or tag to - * match for the rule. Valid values are a single IP address (i.e. 10.10.10.10), - * IP subnet (i.e. 192.168.1.0/24), default tag, or * (for all addresses). If - * any other values are provided the request fails with HTTP status code 400. */ export interface NetworkSecurityGroupRule { + /** + * @summary The priority for this rule. + * @description Priorities within a pool must be unique and are evaluated in order of priority. + * The lower the number the higher the priority. For example, rules could be specified with order + * numbers of 150, 250, and 350. The rule with the order number of 150 takes precedence over the + * rule that has an order of 250. Allowed priorities are 150 to 3500. If any reserved or + * duplicate values are provided the request fails with HTTP status code 400. + */ priority: number; + /** + * @summary The action that should be taken for a specified IP address, subnet range or tag. + * @description Possible values include: 'allow', 'deny' + */ access: string; + /** + * @summary The source address prefix or tag to match for the rule. + * @description Valid values are a single IP address (i.e. 10.10.10.10), IP subnet (i.e. + * 192.168.1.0/24), default tag, or * (for all addresses). If any other values are provided the + * request fails with HTTP status code 400. + */ sourceAddressPrefix: string; } /** - * @class - * Initializes a new instance of the InboundNATPool class. - * @constructor - * @summary A inbound NAT pool that can be used to address specific ports on - * compute nodes in a Batch pool externally. - * - * @member {string} name The name of the endpoint. The name must be unique - * within a Batch pool, can contain letters, numbers, underscores, periods, and - * hyphens. Names must start with a letter or number, must end with a letter, - * number, or underscore, and cannot exceed 77 characters. If any invalid - * values are provided the request fails with HTTP status code 400. - * @member {string} protocol The protocol of the endpoint. Possible values - * include: 'tcp', 'udp' - * @member {number} backendPort The port number on the compute node. This must - * be unique within a Batch pool. Acceptable values are between 1 and 65535 - * except for 22, 3389, 29876 and 29877 as these are reserved. If any reserved - * values are provided the request fails with HTTP status code 400. - * @member {number} frontendPortRangeStart The first port number in the range - * of external ports that will be used to provide inbound access to the - * backendPort on individual compute nodes. Acceptable values range between 1 - * and 65534 except ports from 50000 to 55000 which are reserved. All ranges - * within a pool must be distinct and cannot overlap. Each range must contain - * at least 40 ports. If any reserved or overlapping values are provided the - * request fails with HTTP status code 400. - * @member {number} frontendPortRangeEnd The last port number in the range of - * external ports that will be used to provide inbound access to the - * backendPort on individual compute nodes. Acceptable values range between 1 - * and 65534 except ports from 50000 to 55000 which are reserved by the Batch - * service. All ranges within a pool must be distinct and cannot overlap. Each - * range must contain at least 40 ports. If any reserved or overlapping values - * are provided the request fails with HTTP status code 400. - * @member {array} [networkSecurityGroupRules] A list of network security group - * rules that will be applied to the endpoint. The maximum number of rules that - * can be specified across all the endpoints on a Batch pool is 25. If no - * network security group rules are specified, a default rule will be created - * to allow inbound access to the specified backendPort. If the maximum number - * of network security group rules is exceeded the request fails with HTTP - * status code 400. + * @summary A inbound NAT pool that can be used to address specific ports on compute nodes in a + * Batch pool externally. */ export interface InboundNATPool { + /** + * @summary The name of the endpoint. + * @description The name must be unique within a Batch pool, can contain letters, numbers, + * underscores, periods, and hyphens. Names must start with a letter or number, must end with a + * letter, number, or underscore, and cannot exceed 77 characters. If any invalid values are + * provided the request fails with HTTP status code 400. + */ name: string; + /** + * @summary The protocol of the endpoint. + * @description Possible values include: 'tcp', 'udp' + */ protocol: string; + /** + * @summary The port number on the compute node. + * @description This must be unique within a Batch pool. Acceptable values are between 1 and + * 65535 except for 22, 3389, 29876 and 29877 as these are reserved. If any reserved values are + * provided the request fails with HTTP status code 400. + */ backendPort: number; + /** + * @summary The first port number in the range of external ports that will be used to provide + * inbound access to the backendPort on individual compute nodes. + * @description Acceptable values range between 1 and 65534 except ports from 50000 to 55000 + * which are reserved. All ranges within a pool must be distinct and cannot overlap. Each range + * must contain at least 40 ports. If any reserved or overlapping values are provided the request + * fails with HTTP status code 400. + */ frontendPortRangeStart: number; + /** + * @summary The last port number in the range of external ports that will be used to provide + * inbound access to the backendPort on individual compute nodes. + * @description Acceptable values range between 1 and 65534 except ports from 50000 to 55000 + * which are reserved by the Batch service. All ranges within a pool must be distinct and cannot + * overlap. Each range must contain at least 40 ports. If any reserved or overlapping values are + * provided the request fails with HTTP status code 400. + */ frontendPortRangeEnd: number; + /** + * @summary A list of network security group rules that will be applied to the endpoint. + * @description The maximum number of rules that can be specified across all the endpoints on a + * Batch pool is 25. If no network security group rules are specified, a default rule will be + * created to allow inbound access to the specified backendPort. If the maximum number of network + * security group rules is exceeded the request fails with HTTP status code 400. + */ networkSecurityGroupRules?: NetworkSecurityGroupRule[]; } /** - * @class - * Initializes a new instance of the PoolEndpointConfiguration class. - * @constructor * @summary The endpoint configuration for a pool. - * - * @member {array} inboundNATPools A list of inbound NAT pools that can be used - * to address specific ports on an individual compute node externally. The - * maximum number of inbound NAT pools per Batch pool is 5. If the maximum - * number of inbound NAT pools is exceeded the request fails with HTTP status - * code 400. */ export interface PoolEndpointConfiguration { + /** + * @summary A list of inbound NAT pools that can be used to address specific ports on an + * individual compute node externally. + * @description The maximum number of inbound NAT pools per Batch pool is 5. If the maximum + * number of inbound NAT pools is exceeded the request fails with HTTP status code 400. + */ inboundNATPools: InboundNATPool[]; } /** - * @class - * Initializes a new instance of the NetworkConfiguration class. - * @constructor * The network configuration for a pool. - * - * @member {string} [subnetId] The ARM resource identifier of the virtual - * network subnet which the compute nodes of the pool will join. This is of the - * form - * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. - * The virtual network must be in the same region and subscription as the Azure - * Batch account. The specified subnet should have enough free IP addresses to - * accommodate the number of nodes in the pool. If the subnet doesn't have - * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks - * ('Microsoft.Network/virtualNetworks') are supported, but for pools created - * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration - * @member {object} [endpointConfiguration] The configuration for endpoints on - * compute nodes in the Batch pool. Pool endpoint configuration is only - * supported on pools with the virtualMachineConfiguration property. - * @member {array} [endpointConfiguration.inboundNATPools] The maximum number - * of inbound NAT pools per Batch pool is 5. If the maximum number of inbound - * NAT pools is exceeded the request fails with HTTP status code 400. */ export interface NetworkConfiguration { + /** + * @summary The ARM resource identifier of the virtual network subnet which the compute nodes of + * the pool will join. + * @description This is of the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. + * The virtual network must be in the same region and subscription as the Azure Batch account. + * The specified subnet should have enough free IP addresses to accommodate the number of nodes + * in the pool. If the subnet doesn't have enough free IP addresses, the pool will partially + * allocate compute nodes, and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks ('Microsoft.Network/virtualNetworks') + * are supported, but for pools created with cloudServiceConfiguration both ARM and classic + * virtual networks are supported. For more details, see: + * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration + */ subnetId?: string; + /** + * @summary The scope of dynamic vnet assignment. + * @description Possible values include: 'none', 'job' + */ + dynamicVNetAssignmentScope?: string; + /** + * @summary The configuration for endpoints on compute nodes in the Batch pool. + * @description Pool endpoint configuration is only supported on pools with the + * virtualMachineConfiguration property. + */ endpointConfiguration?: PoolEndpointConfiguration; } /** - * @class - * Initializes a new instance of the PoolSpecification class. - * @constructor * @summary Specification for creating a new pool. - * - * @member {string} [displayName] The display name for the pool. The display - * name need not be unique and can contain any Unicode characters up to a - * maximum length of 1024. - * @member {string} vmSize The size of the virtual machines in the pool. All - * virtual machines in a pool are the same size. For information about - * available sizes of virtual machines in pools, see Choose a VM size for - * compute nodes in an Azure Batch pool - * (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). - * @member {object} [cloudServiceConfiguration] The cloud service configuration - * for the pool. This property must be specified if the pool needs to be - * created with Azure PaaS VMs. This property and virtualMachineConfiguration - * are mutually exclusive and one of the properties must be specified. If - * neither is specified then the Batch service returns an error; if you are - * calling the REST API directly, the HTTP status code is 400 (Bad Request). - * This property cannot be specified if the Batch account was created with its - * poolAllocationMode property set to 'UserSubscription'. - * @member {string} [cloudServiceConfiguration.osFamily] Possible values are: - * 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. - * 3 - OS Family 3, equivalent to Windows Server 2012. - * 4 - OS Family 4, equivalent to Windows Server 2012 R2. - * 5 - OS Family 5, equivalent to Windows Server 2016. For more information, - * see Azure Guest OS Releases - * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). - * @member {string} [cloudServiceConfiguration.targetOSVersion] The default - * value is * which specifies the latest operating system version for the - * specified OS family. - * @member {string} [cloudServiceConfiguration.currentOSVersion] This may - * differ from targetOSVersion if the pool state is Upgrading. In this case - * some virtual machines may be on the targetOSVersion and some may be on the - * currentOSVersion during the upgrade process. Once all virtual machines have - * upgraded, currentOSVersion is updated to be the same as targetOSVersion. - * @member {object} [virtualMachineConfiguration] The virtual machine - * configuration for the pool. This property must be specified if the pool - * needs to be created with Azure IaaS VMs. This property and - * cloudServiceConfiguration are mutually exclusive and one of the properties - * must be specified. If neither is specified then the Batch service returns an - * error; if you are calling the REST API directly, the HTTP status code is 400 - * (Bad Request). - * @member {object} [virtualMachineConfiguration.imageReference] - * @member {string} [virtualMachineConfiguration.imageReference.publisher] For - * example, Canonical or MicrosoftWindowsServer. - * @member {string} [virtualMachineConfiguration.imageReference.offer] For - * example, UbuntuServer or WindowsServer. - * @member {string} [virtualMachineConfiguration.imageReference.sku] For - * example, 14.04.0-LTS or 2012-R2-Datacenter. - * @member {string} [virtualMachineConfiguration.imageReference.version] A - * value of 'latest' can be specified to select the latest version of an image. - * If omitted, the default is 'latest'. - * @member {string} - * [virtualMachineConfiguration.imageReference.virtualMachineImageId] This - * property is mutually exclusive with other ImageReference properties. The - * virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * @member {object} [virtualMachineConfiguration.osDisk] - * @member {string} [virtualMachineConfiguration.osDisk.caching] The default - * value for caching is readwrite. For information about the caching options - * see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' - * @member {string} [virtualMachineConfiguration.nodeAgentSKUId] The Batch node - * agent is a program that runs on each node in the pool, and provides the - * command-and-control interface between the node and the Batch service. There - * are different implementations of the node agent, known as SKUs, for - * different operating systems. You must specify a node agent SKU which matches - * the selected image reference. To get the list of supported node agent SKUs - * along with their list of verified image references, see the 'List supported - * node agent SKUs' operation. - * @member {object} [virtualMachineConfiguration.windowsConfiguration] This - * property must not be specified if the imageReference or osDisk property - * specifies a Linux OS image. - * @member {boolean} - * [virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] If - * omitted, the default value is true. - * @member {array} [virtualMachineConfiguration.dataDisks] This property must - * be specified if the compute nodes in the pool need to have empty data disks - * attached to them. This cannot be updated. Each node gets its own disk (the - * disk is not a file share). Existing disks cannot be attached, each attached - * disk is empty. When the node is removed from the pool, the disk and all data - * associated with it is also deleted. The disk is not formatted after being - * attached, it must be formatted before use - for more information see - * https://docs.microsoft.com/en-us/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux - * and - * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. - * @member {string} [virtualMachineConfiguration.licenseType] This only applies - * to images that contain the Windows operating system, and should only be used - * when you hold valid on-premises licenses for the nodes which will be - * deployed. If omitted, no on-premises licensing discount is applied. Values - * are: - * - * Windows_Server - The on-premises license is for Windows Server. - * Windows_Client - The on-premises license is for Windows Client. - * @member {object} [virtualMachineConfiguration.containerConfiguration] If - * specified, setup is performed on each node in the pool to allow tasks to run - * in containers. All regular tasks and job manager tasks run on this pool must - * specify the containerSettings property, and all other tasks may specify it. - * @member {array} - * [virtualMachineConfiguration.containerConfiguration.containerImageNames] - * This is the full image reference, as would be specified to "docker pull". An - * image will be sourced from the default Docker registry unless the image is - * fully qualified with an alternative registry. - * @member {array} - * [virtualMachineConfiguration.containerConfiguration.containerRegistries] If - * any images must be downloaded from a private registry which requires - * credentials, then those credentials must be provided here. - * @member {number} [maxTasksPerNode] The maximum number of tasks that can run - * concurrently on a single compute node in the pool. The default value is 1. - * The maximum value of this setting depends on the size of the compute nodes - * in the pool (the vmSize setting). - * @member {object} [taskSchedulingPolicy] How tasks are distributed across - * compute nodes in a pool. - * @member {string} [taskSchedulingPolicy.nodeFillType] Possible values - * include: 'spread', 'pack' - * @member {moment.duration} [resizeTimeout] The timeout for allocation of - * compute nodes to the pool. This timeout applies only to manual scaling; it - * has no effect when enableAutoScale is set to true. The default value is 15 - * minutes. The minimum value is 5 minutes. If you specify a value less than 5 - * minutes, the Batch service rejects the request with an error; if you are - * calling the REST API directly, the HTTP status code is 400 (Bad Request). - * @member {number} [targetDedicatedNodes] The desired number of dedicated - * compute nodes in the pool. This property must not be specified if - * enableAutoScale is set to true. If enableAutoScale is set to false, then you - * must set either targetDedicatedNodes, targetLowPriorityNodes, or both. - * @member {number} [targetLowPriorityNodes] The desired number of low-priority - * compute nodes in the pool. This property must not be specified if - * enableAutoScale is set to true. If enableAutoScale is set to false, then you - * must set either targetDedicatedNodes, targetLowPriorityNodes, or both. - * @member {boolean} [enableAutoScale] Whether the pool size should - * automatically adjust over time. If false, at least one of - * targetDedicateNodes and targetLowPriorityNodes must be specified. If true, - * the autoScaleFormula element is required. The pool automatically resizes - * according to the formula. The default value is false. - * @member {string} [autoScaleFormula] The formula for the desired number of - * compute nodes in the pool. This property must not be specified if - * enableAutoScale is set to false. It is required if enableAutoScale is set to - * true. The formula is checked for validity before the pool is created. If the - * formula is not valid, the Batch service rejects the request with detailed - * error information. - * @member {moment.duration} [autoScaleEvaluationInterval] The time interval at - * which to automatically adjust the pool size according to the autoscale - * formula. The default value is 15 minutes. The minimum and maximum value are - * 5 minutes and 168 hours respectively. If you specify a value less than 5 - * minutes or greater than 168 hours, the Batch service rejects the request - * with an invalid property value error; if you are calling the REST API - * directly, the HTTP status code is 400 (Bad Request). - * @member {boolean} [enableInterNodeCommunication] Whether the pool permits - * direct communication between nodes. Enabling inter-node communication limits - * the maximum size of the pool due to deployment restrictions on the nodes of - * the pool. This may result in the pool not reaching its desired size. The - * default value is false. - * @member {object} [networkConfiguration] The network configuration for the - * pool. - * @member {string} [networkConfiguration.subnetId] The virtual network must be - * in the same region and subscription as the Azure Batch account. The - * specified subnet should have enough free IP addresses to accommodate the - * number of nodes in the pool. If the subnet doesn't have enough free IP - * addresses, the pool will partially allocate compute nodes, and a resize - * error will occur. The 'MicrosoftAzureBatch' service principal must have the - * 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) role - * for the specified VNet. The specified subnet must allow communication from - * the Azure Batch service to be able to schedule tasks on the compute nodes. - * This can be verified by checking if the specified VNet has any associated - * Network Security Groups (NSG). If communication to the compute nodes in the - * specified subnet is denied by an NSG, then the Batch service will set the - * state of the compute nodes to unusable. For pools created with - * virtualMachineConfiguration only ARM virtual networks - * ('Microsoft.Network/virtualNetworks') are supported, but for pools created - * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration - * @member {object} [networkConfiguration.endpointConfiguration] Pool endpoint - * configuration is only supported on pools with the - * virtualMachineConfiguration property. - * @member {array} [networkConfiguration.endpointConfiguration.inboundNATPools] - * The maximum number of inbound NAT pools per Batch pool is 5. If the maximum - * number of inbound NAT pools is exceeded the request fails with HTTP status - * code 400. - * @member {object} [startTask] A task to run on each compute node as it joins - * the pool. The task runs when the node is added to the pool or when the node - * is restarted. - * @member {string} [startTask.commandLine] The command line does not run under - * a shell, and therefore cannot take advantage of shell features such as - * environment variable expansion. If you want to take advantage of such - * features, you should invoke the shell in the command line, for example using - * "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the - * command line refers to file paths, it should use a relative path (relative - * to the task working directory), or use the Batch provided environment - * variable - * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [startTask.containerSettings] When this is specified, all - * directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure - * Batch directories on the node) are mapped into the container, all task - * environment variables are mapped into the container, and the task command - * line is executed in the container. - * @member {string} [startTask.containerSettings.containerRunOptions] These - * additional options are supplied as arguments to the "docker create" command, - * in addition to those controlled by the Batch Service. - * @member {string} [startTask.containerSettings.imageName] This is the full - * image reference, as would be specified to "docker pull". If no tag is - * provided as part of the image name, the tag ":latest" is used as a default. - * @member {object} [startTask.containerSettings.registry] This setting can be - * omitted if was already provided at pool creation. - * @member {string} [startTask.containerSettings.registry.registryServer] If - * omitted, the default is "docker.io". - * @member {string} [startTask.containerSettings.registry.userName] - * @member {string} [startTask.containerSettings.registry.password] - * @member {array} [startTask.resourceFiles] Files listed under this element - * are located in the task's working directory. - * @member {array} [startTask.environmentSettings] - * @member {object} [startTask.userIdentity] If omitted, the task runs as a - * non-administrative user unique to the task. - * @member {string} [startTask.userIdentity.userName] The userName and autoUser - * properties are mutually exclusive; you must specify one but not both. - * @member {object} [startTask.userIdentity.autoUser] The userName and autoUser - * properties are mutually exclusive; you must specify one but not both. - * @member {string} [startTask.userIdentity.autoUser.scope] The default value - * is task. Possible values include: 'task', 'pool' - * @member {string} [startTask.userIdentity.autoUser.elevationLevel] The - * default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {number} [startTask.maxTaskRetryCount] The Batch service retries a - * task if its exit code is nonzero. Note that this value specifically controls - * the number of retries. The Batch service will try the task once, and may - * then retry up to this limit. For example, if the maximum retry count is 3, - * Batch tries the task up to 4 times (one initial try and 3 retries). If the - * maximum retry count is 0, the Batch service does not retry the task. If the - * maximum retry count is -1, the Batch service retries the task without limit. - * @member {boolean} [startTask.waitForSuccess] If true and the start task - * fails on a compute node, the Batch service retries the start task up to its - * maximum retry count (maxTaskRetryCount). If the task has still not completed - * successfully after all retries, then the Batch service marks the compute - * node unusable, and will not schedule tasks to it. This condition can be - * detected via the node state and failure info details. If false, the Batch - * service will not wait for the start task to complete. In this case, other - * tasks can start executing on the compute node while the start task is still - * running; and even if the start task fails, new tasks will continue to be - * scheduled on the node. The default is false. - * @member {array} [certificateReferences] A list of certificates to be - * installed on each compute node in the pool. For Windows compute nodes, the - * Batch service installs the certificates to the specified certificate store - * and location. For Linux compute nodes, the certificates are stored in a - * directory inside the task working directory and an environment variable - * AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this - * location. For certificates with visibility of 'remoteUser', a 'certs' - * directory is created in the user's home directory (e.g., - * /home/{user-name}/certs) and certificates are placed in that directory. - * @member {array} [applicationPackageReferences] The list of application - * packages to be installed on each compute node in the pool. - * @member {array} [applicationLicenses] The list of application licenses the - * Batch service will make available on each compute node in the pool. The list - * of application licenses must be a subset of available Batch service - * application licenses. If a license is requested which is not supported, pool - * creation will fail. The permitted licenses available on the pool are 'maya', - * 'vray', '3dsmax', 'arnold'. An additional charge applies for each - * application license added to the pool. - * @member {array} [userAccounts] The list of user accounts to be created on - * each node in the pool. - * @member {array} [metadata] A list of name-value pairs associated with the - * pool as metadata. The Batch service does not assign any meaning to metadata; - * it is solely for the use of user code. */ export interface PoolSpecification { + /** + * @summary The display name for the pool. + * @description The display name need not be unique and can contain any Unicode characters up to + * a maximum length of 1024. + */ displayName?: string; + /** + * @summary The size of the virtual machines in the pool. All virtual machines in a pool are the + * same size. + * @description For information about available sizes of virtual machines in pools, see Choose a + * VM size for compute nodes in an Azure Batch pool + * (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). + */ vmSize: string; + /** + * @summary The cloud service configuration for the pool. + * @description This property must be specified if the pool needs to be created with Azure PaaS + * VMs. This property and virtualMachineConfiguration are mutually exclusive and one of the + * properties must be specified. If neither is specified then the Batch service returns an error; + * if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). This + * property cannot be specified if the Batch account was created with its poolAllocationMode + * property set to 'UserSubscription'. + */ cloudServiceConfiguration?: CloudServiceConfiguration; + /** + * @summary The virtual machine configuration for the pool. + * @description This property must be specified if the pool needs to be created with Azure IaaS + * VMs. This property and cloudServiceConfiguration are mutually exclusive and one of the + * properties must be specified. If neither is specified then the Batch service returns an error; + * if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). + */ virtualMachineConfiguration?: VirtualMachineConfiguration; + /** + * @summary The maximum number of tasks that can run concurrently on a single compute node in the + * pool. + * @description The default value is 1. The maximum value of this setting depends on the size of + * the compute nodes in the pool (the vmSize setting). + */ maxTasksPerNode?: number; + /** + * @summary How tasks are distributed across compute nodes in a pool. + */ taskSchedulingPolicy?: TaskSchedulingPolicy; + /** + * @summary The timeout for allocation of compute nodes to the pool. + * @description This timeout applies only to manual scaling; it has no effect when + * enableAutoScale is set to true. The default value is 15 minutes. The minimum value is 5 + * minutes. If you specify a value less than 5 minutes, the Batch service rejects the request + * with an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad + * Request). + */ resizeTimeout?: moment.Duration; + /** + * @summary The desired number of dedicated compute nodes in the pool. + * @description This property must not be specified if enableAutoScale is set to true. If + * enableAutoScale is set to false, then you must set either targetDedicatedNodes, + * targetLowPriorityNodes, or both. + */ targetDedicatedNodes?: number; + /** + * @summary The desired number of low-priority compute nodes in the pool. + * @description This property must not be specified if enableAutoScale is set to true. If + * enableAutoScale is set to false, then you must set either targetDedicatedNodes, + * targetLowPriorityNodes, or both. + */ targetLowPriorityNodes?: number; + /** + * @summary Whether the pool size should automatically adjust over time. + * @description If false, at least one of targetDedicateNodes and targetLowPriorityNodes must be + * specified. If true, the autoScaleFormula element is required. The pool automatically resizes + * according to the formula. The default value is false. + */ enableAutoScale?: boolean; + /** + * @summary The formula for the desired number of compute nodes in the pool. + * @description This property must not be specified if enableAutoScale is set to false. It is + * required if enableAutoScale is set to true. The formula is checked for validity before the + * pool is created. If the formula is not valid, the Batch service rejects the request with + * detailed error information. + */ autoScaleFormula?: string; + /** + * @summary The time interval at which to automatically adjust the pool size according to the + * autoscale formula. + * @description The default value is 15 minutes. The minimum and maximum value are 5 minutes and + * 168 hours respectively. If you specify a value less than 5 minutes or greater than 168 hours, + * the Batch service rejects the request with an invalid property value error; if you are calling + * the REST API directly, the HTTP status code is 400 (Bad Request). + */ autoScaleEvaluationInterval?: moment.Duration; + /** + * @summary Whether the pool permits direct communication between nodes. + * @description Enabling inter-node communication limits the maximum size of the pool due to + * deployment restrictions on the nodes of the pool. This may result in the pool not reaching its + * desired size. The default value is false. + */ enableInterNodeCommunication?: boolean; + /** + * @summary The network configuration for the pool. + */ networkConfiguration?: NetworkConfiguration; + /** + * @summary A task to run on each compute node as it joins the pool. The task runs when the node + * is added to the pool or when the node is restarted. + */ startTask?: StartTask; + /** + * @summary A list of certificates to be installed on each compute node in the pool. + * @description For Windows compute nodes, the Batch service installs the certificates to the + * specified certificate store and location. For Linux compute nodes, the certificates are stored + * in a directory inside the task working directory and an environment variable + * AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For certificates + * with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory + * (e.g., /home/{user-name}/certs) and certificates are placed in that directory. + */ certificateReferences?: CertificateReference[]; + /** + * @summary The list of application packages to be installed on each compute node in the pool. + */ applicationPackageReferences?: ApplicationPackageReference[]; + /** + * @summary The list of application licenses the Batch service will make available on each + * compute node in the pool. + * @description The list of application licenses must be a subset of available Batch service + * application licenses. If a license is requested which is not supported, pool creation will + * fail. The permitted licenses available on the pool are 'maya', 'vray', '3dsmax', 'arnold'. An + * additional charge applies for each application license added to the pool. + */ applicationLicenses?: string[]; + /** + * @summary The list of user accounts to be created on each node in the pool. + */ userAccounts?: UserAccount[]; + /** + * @summary A list of name-value pairs associated with the pool as metadata. + * @description The Batch service does not assign any meaning to metadata; it is solely for the + * use of user code. + */ metadata?: MetadataItem[]; } /** - * @class - * Initializes a new instance of the AutoPoolSpecification class. - * @constructor - * @summary Specifies characteristics for a temporary 'auto pool'. The Batch - * service will create this auto pool when the job is submitted. - * - * @member {string} [autoPoolIdPrefix] A prefix to be added to the unique - * identifier when a pool is automatically created. The Batch service assigns - * each auto pool a unique identifier on creation. To distinguish between pools - * created for different purposes, you can specify this element to add a prefix - * to the ID that is assigned. The prefix can be up to 20 characters long. - * @member {string} poolLifetimeOption The minimum lifetime of created auto - * pools, and how multiple jobs on a schedule are assigned to pools. Possible - * values include: 'jobSchedule', 'job' - * @member {boolean} [keepAlive] Whether to keep an auto pool alive after its - * lifetime expires. If false, the Batch service deletes the pool once its - * lifetime (as determined by the poolLifetimeOption setting) expires; that is, - * when the job or job schedule completes. If true, the Batch service does not - * delete the pool automatically. It is up to the user to delete auto pools - * created with this option. - * @member {object} [pool] The pool specification for the auto pool. - * @member {string} [pool.displayName] The display name need not be unique and - * can contain any Unicode characters up to a maximum length of 1024. - * @member {string} [pool.vmSize] For information about available sizes of - * virtual machines in pools, see Choose a VM size for compute nodes in an - * Azure Batch pool - * (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). - * @member {object} [pool.cloudServiceConfiguration] This property must be - * specified if the pool needs to be created with Azure PaaS VMs. This property - * and virtualMachineConfiguration are mutually exclusive and one of the - * properties must be specified. If neither is specified then the Batch service - * returns an error; if you are calling the REST API directly, the HTTP status - * code is 400 (Bad Request). This property cannot be specified if the Batch - * account was created with its poolAllocationMode property set to - * 'UserSubscription'. - * @member {string} [pool.cloudServiceConfiguration.osFamily] Possible values - * are: - * 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. - * 3 - OS Family 3, equivalent to Windows Server 2012. - * 4 - OS Family 4, equivalent to Windows Server 2012 R2. - * 5 - OS Family 5, equivalent to Windows Server 2016. For more information, - * see Azure Guest OS Releases - * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). - * @member {string} [pool.cloudServiceConfiguration.targetOSVersion] The - * default value is * which specifies the latest operating system version for - * the specified OS family. - * @member {string} [pool.cloudServiceConfiguration.currentOSVersion] This may - * differ from targetOSVersion if the pool state is Upgrading. In this case - * some virtual machines may be on the targetOSVersion and some may be on the - * currentOSVersion during the upgrade process. Once all virtual machines have - * upgraded, currentOSVersion is updated to be the same as targetOSVersion. - * @member {object} [pool.virtualMachineConfiguration] This property must be - * specified if the pool needs to be created with Azure IaaS VMs. This property - * and cloudServiceConfiguration are mutually exclusive and one of the - * properties must be specified. If neither is specified then the Batch service - * returns an error; if you are calling the REST API directly, the HTTP status - * code is 400 (Bad Request). - * @member {object} [pool.virtualMachineConfiguration.imageReference] - * @member {string} [pool.virtualMachineConfiguration.imageReference.publisher] - * For example, Canonical or MicrosoftWindowsServer. - * @member {string} [pool.virtualMachineConfiguration.imageReference.offer] For - * example, UbuntuServer or WindowsServer. - * @member {string} [pool.virtualMachineConfiguration.imageReference.sku] For - * example, 14.04.0-LTS or 2012-R2-Datacenter. - * @member {string} [pool.virtualMachineConfiguration.imageReference.version] A - * value of 'latest' can be specified to select the latest version of an image. - * If omitted, the default is 'latest'. - * @member {string} - * [pool.virtualMachineConfiguration.imageReference.virtualMachineImageId] This - * property is mutually exclusive with other ImageReference properties. The - * virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * @member {object} [pool.virtualMachineConfiguration.osDisk] - * @member {string} [pool.virtualMachineConfiguration.osDisk.caching] The - * default value for caching is readwrite. For information about the caching - * options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' - * @member {string} [pool.virtualMachineConfiguration.nodeAgentSKUId] The Batch - * node agent is a program that runs on each node in the pool, and provides the - * command-and-control interface between the node and the Batch service. There - * are different implementations of the node agent, known as SKUs, for - * different operating systems. You must specify a node agent SKU which matches - * the selected image reference. To get the list of supported node agent SKUs - * along with their list of verified image references, see the 'List supported - * node agent SKUs' operation. - * @member {object} [pool.virtualMachineConfiguration.windowsConfiguration] - * This property must not be specified if the imageReference or osDisk property - * specifies a Linux OS image. - * @member {boolean} - * [pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] - * If omitted, the default value is true. - * @member {array} [pool.virtualMachineConfiguration.dataDisks] This property - * must be specified if the compute nodes in the pool need to have empty data - * disks attached to them. This cannot be updated. Each node gets its own disk - * (the disk is not a file share). Existing disks cannot be attached, each - * attached disk is empty. When the node is removed from the pool, the disk and - * all data associated with it is also deleted. The disk is not formatted after - * being attached, it must be formatted before use - for more information see - * https://docs.microsoft.com/en-us/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux - * and - * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. - * @member {string} [pool.virtualMachineConfiguration.licenseType] This only - * applies to images that contain the Windows operating system, and should only - * be used when you hold valid on-premises licenses for the nodes which will be - * deployed. If omitted, no on-premises licensing discount is applied. Values - * are: - * - * Windows_Server - The on-premises license is for Windows Server. - * Windows_Client - The on-premises license is for Windows Client. - * @member {object} [pool.virtualMachineConfiguration.containerConfiguration] - * If specified, setup is performed on each node in the pool to allow tasks to - * run in containers. All regular tasks and job manager tasks run on this pool - * must specify the containerSettings property, and all other tasks may specify - * it. - * @member {array} - * [pool.virtualMachineConfiguration.containerConfiguration.containerImageNames] - * This is the full image reference, as would be specified to "docker pull". An - * image will be sourced from the default Docker registry unless the image is - * fully qualified with an alternative registry. - * @member {array} - * [pool.virtualMachineConfiguration.containerConfiguration.containerRegistries] - * If any images must be downloaded from a private registry which requires - * credentials, then those credentials must be provided here. - * @member {number} [pool.maxTasksPerNode] The default value is 1. The maximum - * value of this setting depends on the size of the compute nodes in the pool - * (the vmSize setting). - * @member {object} [pool.taskSchedulingPolicy] - * @member {string} [pool.taskSchedulingPolicy.nodeFillType] Possible values - * include: 'spread', 'pack' - * @member {moment.duration} [pool.resizeTimeout] This timeout applies only to - * manual scaling; it has no effect when enableAutoScale is set to true. The - * default value is 15 minutes. The minimum value is 5 minutes. If you specify - * a value less than 5 minutes, the Batch service rejects the request with an - * error; if you are calling the REST API directly, the HTTP status code is 400 - * (Bad Request). - * @member {number} [pool.targetDedicatedNodes] This property must not be - * specified if enableAutoScale is set to true. If enableAutoScale is set to - * false, then you must set either targetDedicatedNodes, - * targetLowPriorityNodes, or both. - * @member {number} [pool.targetLowPriorityNodes] This property must not be - * specified if enableAutoScale is set to true. If enableAutoScale is set to - * false, then you must set either targetDedicatedNodes, - * targetLowPriorityNodes, or both. - * @member {boolean} [pool.enableAutoScale] If false, at least one of - * targetDedicateNodes and targetLowPriorityNodes must be specified. If true, - * the autoScaleFormula element is required. The pool automatically resizes - * according to the formula. The default value is false. - * @member {string} [pool.autoScaleFormula] This property must not be specified - * if enableAutoScale is set to false. It is required if enableAutoScale is set - * to true. The formula is checked for validity before the pool is created. If - * the formula is not valid, the Batch service rejects the request with - * detailed error information. - * @member {moment.duration} [pool.autoScaleEvaluationInterval] The default - * value is 15 minutes. The minimum and maximum value are 5 minutes and 168 - * hours respectively. If you specify a value less than 5 minutes or greater - * than 168 hours, the Batch service rejects the request with an invalid - * property value error; if you are calling the REST API directly, the HTTP - * status code is 400 (Bad Request). - * @member {boolean} [pool.enableInterNodeCommunication] Enabling inter-node - * communication limits the maximum size of the pool due to deployment - * restrictions on the nodes of the pool. This may result in the pool not - * reaching its desired size. The default value is false. - * @member {object} [pool.networkConfiguration] - * @member {string} [pool.networkConfiguration.subnetId] The virtual network - * must be in the same region and subscription as the Azure Batch account. The - * specified subnet should have enough free IP addresses to accommodate the - * number of nodes in the pool. If the subnet doesn't have enough free IP - * addresses, the pool will partially allocate compute nodes, and a resize - * error will occur. The 'MicrosoftAzureBatch' service principal must have the - * 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) role - * for the specified VNet. The specified subnet must allow communication from - * the Azure Batch service to be able to schedule tasks on the compute nodes. - * This can be verified by checking if the specified VNet has any associated - * Network Security Groups (NSG). If communication to the compute nodes in the - * specified subnet is denied by an NSG, then the Batch service will set the - * state of the compute nodes to unusable. For pools created with - * virtualMachineConfiguration only ARM virtual networks - * ('Microsoft.Network/virtualNetworks') are supported, but for pools created - * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration - * @member {object} [pool.networkConfiguration.endpointConfiguration] Pool - * endpoint configuration is only supported on pools with the - * virtualMachineConfiguration property. - * @member {array} - * [pool.networkConfiguration.endpointConfiguration.inboundNATPools] The - * maximum number of inbound NAT pools per Batch pool is 5. If the maximum - * number of inbound NAT pools is exceeded the request fails with HTTP status - * code 400. - * @member {object} [pool.startTask] - * @member {string} [pool.startTask.commandLine] The command line does not run - * under a shell, and therefore cannot take advantage of shell features such as - * environment variable expansion. If you want to take advantage of such - * features, you should invoke the shell in the command line, for example using - * "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the - * command line refers to file paths, it should use a relative path (relative - * to the task working directory), or use the Batch provided environment - * variable - * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [pool.startTask.containerSettings] When this is specified, - * all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of - * Azure Batch directories on the node) are mapped into the container, all task - * environment variables are mapped into the container, and the task command - * line is executed in the container. - * @member {string} [pool.startTask.containerSettings.containerRunOptions] - * These additional options are supplied as arguments to the "docker create" - * command, in addition to those controlled by the Batch Service. - * @member {string} [pool.startTask.containerSettings.imageName] This is the - * full image reference, as would be specified to "docker pull". If no tag is - * provided as part of the image name, the tag ":latest" is used as a default. - * @member {object} [pool.startTask.containerSettings.registry] This setting - * can be omitted if was already provided at pool creation. - * @member {string} [pool.startTask.containerSettings.registry.registryServer] - * If omitted, the default is "docker.io". - * @member {string} [pool.startTask.containerSettings.registry.userName] - * @member {string} [pool.startTask.containerSettings.registry.password] - * @member {array} [pool.startTask.resourceFiles] Files listed under this - * element are located in the task's working directory. - * @member {array} [pool.startTask.environmentSettings] - * @member {object} [pool.startTask.userIdentity] If omitted, the task runs as - * a non-administrative user unique to the task. - * @member {string} [pool.startTask.userIdentity.userName] The userName and - * autoUser properties are mutually exclusive; you must specify one but not - * both. - * @member {object} [pool.startTask.userIdentity.autoUser] The userName and - * autoUser properties are mutually exclusive; you must specify one but not - * both. - * @member {string} [pool.startTask.userIdentity.autoUser.scope] The default - * value is task. Possible values include: 'task', 'pool' - * @member {string} [pool.startTask.userIdentity.autoUser.elevationLevel] The - * default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {number} [pool.startTask.maxTaskRetryCount] The Batch service - * retries a task if its exit code is nonzero. Note that this value - * specifically controls the number of retries. The Batch service will try the - * task once, and may then retry up to this limit. For example, if the maximum - * retry count is 3, Batch tries the task up to 4 times (one initial try and 3 - * retries). If the maximum retry count is 0, the Batch service does not retry - * the task. If the maximum retry count is -1, the Batch service retries the - * task without limit. - * @member {boolean} [pool.startTask.waitForSuccess] If true and the start task - * fails on a compute node, the Batch service retries the start task up to its - * maximum retry count (maxTaskRetryCount). If the task has still not completed - * successfully after all retries, then the Batch service marks the compute - * node unusable, and will not schedule tasks to it. This condition can be - * detected via the node state and failure info details. If false, the Batch - * service will not wait for the start task to complete. In this case, other - * tasks can start executing on the compute node while the start task is still - * running; and even if the start task fails, new tasks will continue to be - * scheduled on the node. The default is false. - * @member {array} [pool.certificateReferences] For Windows compute nodes, the - * Batch service installs the certificates to the specified certificate store - * and location. For Linux compute nodes, the certificates are stored in a - * directory inside the task working directory and an environment variable - * AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this - * location. For certificates with visibility of 'remoteUser', a 'certs' - * directory is created in the user's home directory (e.g., - * /home/{user-name}/certs) and certificates are placed in that directory. - * @member {array} [pool.applicationPackageReferences] - * @member {array} [pool.applicationLicenses] The list of application licenses - * must be a subset of available Batch service application licenses. If a - * license is requested which is not supported, pool creation will fail. The - * permitted licenses available on the pool are 'maya', 'vray', '3dsmax', - * 'arnold'. An additional charge applies for each application license added to - * the pool. - * @member {array} [pool.userAccounts] - * @member {array} [pool.metadata] The Batch service does not assign any - * meaning to metadata; it is solely for the use of user code. + * @summary Specifies characteristics for a temporary 'auto pool'. The Batch service will create + * this auto pool when the job is submitted. */ export interface AutoPoolSpecification { + /** + * @summary A prefix to be added to the unique identifier when a pool is automatically created. + * @description The Batch service assigns each auto pool a unique identifier on creation. To + * distinguish between pools created for different purposes, you can specify this element to add + * a prefix to the ID that is assigned. The prefix can be up to 20 characters long. + */ autoPoolIdPrefix?: string; + /** + * @summary The minimum lifetime of created auto pools, and how multiple jobs on a schedule are + * assigned to pools. + * @description Possible values include: 'jobSchedule', 'job' + */ poolLifetimeOption: string; + /** + * @summary Whether to keep an auto pool alive after its lifetime expires. + * @description If false, the Batch service deletes the pool once its lifetime (as determined by + * the poolLifetimeOption setting) expires; that is, when the job or job schedule completes. If + * true, the Batch service does not delete the pool automatically. It is up to the user to delete + * auto pools created with this option. + */ keepAlive?: boolean; + /** + * @summary The pool specification for the auto pool. + */ pool?: PoolSpecification; } /** - * @class - * Initializes a new instance of the PoolInformation class. - * @constructor * @summary Specifies how a job should be assigned to a pool. - * - * @member {string} [poolId] The ID of an existing pool. All the tasks of the - * job will run on the specified pool. You must ensure that the pool referenced - * by this property exists. If the pool does not exist at the time the Batch - * service tries to schedule a job, no tasks for the job will run until you - * create a pool with that id. Note that the Batch service will not reject the - * job request; it will simply not run tasks until the pool exists. You must - * specify either the pool ID or the auto pool specification, but not both. - * @member {object} [autoPoolSpecification] Characteristics for a temporary - * 'auto pool'. The Batch service will create this auto pool when the job is - * submitted. If auto pool creation fails, the Batch service moves the job to a - * completed state, and the pool creation error is set in the job's scheduling - * error property. The Batch service manages the lifetime (both creation and, - * unless keepAlive is specified, deletion) of the auto pool. Any user actions - * that affect the lifetime of the auto pool while the job is active will - * result in unexpected behavior. You must specify either the pool ID or the - * auto pool specification, but not both. - * @member {string} [autoPoolSpecification.autoPoolIdPrefix] The Batch service - * assigns each auto pool a unique identifier on creation. To distinguish - * between pools created for different purposes, you can specify this element - * to add a prefix to the ID that is assigned. The prefix can be up to 20 - * characters long. - * @member {string} [autoPoolSpecification.poolLifetimeOption] Possible values - * include: 'jobSchedule', 'job' - * @member {boolean} [autoPoolSpecification.keepAlive] If false, the Batch - * service deletes the pool once its lifetime (as determined by the - * poolLifetimeOption setting) expires; that is, when the job or job schedule - * completes. If true, the Batch service does not delete the pool - * automatically. It is up to the user to delete auto pools created with this - * option. - * @member {object} [autoPoolSpecification.pool] - * @member {string} [autoPoolSpecification.pool.displayName] The display name - * need not be unique and can contain any Unicode characters up to a maximum - * length of 1024. - * @member {string} [autoPoolSpecification.pool.vmSize] For information about - * available sizes of virtual machines in pools, see Choose a VM size for - * compute nodes in an Azure Batch pool - * (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). - * @member {object} [autoPoolSpecification.pool.cloudServiceConfiguration] This - * property must be specified if the pool needs to be created with Azure PaaS - * VMs. This property and virtualMachineConfiguration are mutually exclusive - * and one of the properties must be specified. If neither is specified then - * the Batch service returns an error; if you are calling the REST API - * directly, the HTTP status code is 400 (Bad Request). This property cannot be - * specified if the Batch account was created with its poolAllocationMode - * property set to 'UserSubscription'. - * @member {string} - * [autoPoolSpecification.pool.cloudServiceConfiguration.osFamily] Possible - * values are: - * 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. - * 3 - OS Family 3, equivalent to Windows Server 2012. - * 4 - OS Family 4, equivalent to Windows Server 2012 R2. - * 5 - OS Family 5, equivalent to Windows Server 2016. For more information, - * see Azure Guest OS Releases - * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). - * @member {string} - * [autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] The - * default value is * which specifies the latest operating system version for - * the specified OS family. - * @member {string} - * [autoPoolSpecification.pool.cloudServiceConfiguration.currentOSVersion] This - * may differ from targetOSVersion if the pool state is Upgrading. In this case - * some virtual machines may be on the targetOSVersion and some may be on the - * currentOSVersion during the upgrade process. Once all virtual machines have - * upgraded, currentOSVersion is updated to be the same as targetOSVersion. - * @member {object} [autoPoolSpecification.pool.virtualMachineConfiguration] - * This property must be specified if the pool needs to be created with Azure - * IaaS VMs. This property and cloudServiceConfiguration are mutually exclusive - * and one of the properties must be specified. If neither is specified then - * the Batch service returns an error; if you are calling the REST API - * directly, the HTTP status code is 400 (Bad Request). - * @member {object} - * [autoPoolSpecification.pool.virtualMachineConfiguration.imageReference] - * @member {string} - * [autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.publisher] - * For example, Canonical or MicrosoftWindowsServer. - * @member {string} - * [autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.offer] - * For example, UbuntuServer or WindowsServer. - * @member {string} - * [autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.sku] - * For example, 14.04.0-LTS or 2012-R2-Datacenter. - * @member {string} - * [autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.version] - * A value of 'latest' can be specified to select the latest version of an - * image. If omitted, the default is 'latest'. - * @member {string} - * [autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.virtualMachineImageId] - * This property is mutually exclusive with other ImageReference properties. - * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * @member {object} - * [autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * @member {string} - * [autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] The - * default value for caching is readwrite. For information about the caching - * options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' - * @member {string} - * [autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId] The - * Batch node agent is a program that runs on each node in the pool, and - * provides the command-and-control interface between the node and the Batch - * service. There are different implementations of the node agent, known as - * SKUs, for different operating systems. You must specify a node agent SKU - * which matches the selected image reference. To get the list of supported - * node agent SKUs along with their list of verified image references, see the - * 'List supported node agent SKUs' operation. - * @member {object} - * [autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] - * This property must not be specified if the imageReference or osDisk property - * specifies a Linux OS image. - * @member {boolean} - * [autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] - * If omitted, the default value is true. - * @member {array} - * [autoPoolSpecification.pool.virtualMachineConfiguration.dataDisks] This - * property must be specified if the compute nodes in the pool need to have - * empty data disks attached to them. This cannot be updated. Each node gets - * its own disk (the disk is not a file share). Existing disks cannot be - * attached, each attached disk is empty. When the node is removed from the - * pool, the disk and all data associated with it is also deleted. The disk is - * not formatted after being attached, it must be formatted before use - for - * more information see - * https://docs.microsoft.com/en-us/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux - * and - * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. - * @member {string} - * [autoPoolSpecification.pool.virtualMachineConfiguration.licenseType] This - * only applies to images that contain the Windows operating system, and should - * only be used when you hold valid on-premises licenses for the nodes which - * will be deployed. If omitted, no on-premises licensing discount is applied. - * Values are: - * - * Windows_Server - The on-premises license is for Windows Server. - * Windows_Client - The on-premises license is for Windows Client. - * @member {object} - * [autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration] - * If specified, setup is performed on each node in the pool to allow tasks to - * run in containers. All regular tasks and job manager tasks run on this pool - * must specify the containerSettings property, and all other tasks may specify - * it. - * @member {array} - * [autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration.containerImageNames] - * This is the full image reference, as would be specified to "docker pull". An - * image will be sourced from the default Docker registry unless the image is - * fully qualified with an alternative registry. - * @member {array} - * [autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration.containerRegistries] - * If any images must be downloaded from a private registry which requires - * credentials, then those credentials must be provided here. - * @member {number} [autoPoolSpecification.pool.maxTasksPerNode] The default - * value is 1. The maximum value of this setting depends on the size of the - * compute nodes in the pool (the vmSize setting). - * @member {object} [autoPoolSpecification.pool.taskSchedulingPolicy] - * @member {string} - * [autoPoolSpecification.pool.taskSchedulingPolicy.nodeFillType] Possible - * values include: 'spread', 'pack' - * @member {moment.duration} [autoPoolSpecification.pool.resizeTimeout] This - * timeout applies only to manual scaling; it has no effect when - * enableAutoScale is set to true. The default value is 15 minutes. The minimum - * value is 5 minutes. If you specify a value less than 5 minutes, the Batch - * service rejects the request with an error; if you are calling the REST API - * directly, the HTTP status code is 400 (Bad Request). - * @member {number} [autoPoolSpecification.pool.targetDedicatedNodes] This - * property must not be specified if enableAutoScale is set to true. If - * enableAutoScale is set to false, then you must set either - * targetDedicatedNodes, targetLowPriorityNodes, or both. - * @member {number} [autoPoolSpecification.pool.targetLowPriorityNodes] This - * property must not be specified if enableAutoScale is set to true. If - * enableAutoScale is set to false, then you must set either - * targetDedicatedNodes, targetLowPriorityNodes, or both. - * @member {boolean} [autoPoolSpecification.pool.enableAutoScale] If false, at - * least one of targetDedicateNodes and targetLowPriorityNodes must be - * specified. If true, the autoScaleFormula element is required. The pool - * automatically resizes according to the formula. The default value is false. - * @member {string} [autoPoolSpecification.pool.autoScaleFormula] This property - * must not be specified if enableAutoScale is set to false. It is required if - * enableAutoScale is set to true. The formula is checked for validity before - * the pool is created. If the formula is not valid, the Batch service rejects - * the request with detailed error information. - * @member {moment.duration} - * [autoPoolSpecification.pool.autoScaleEvaluationInterval] The default value - * is 15 minutes. The minimum and maximum value are 5 minutes and 168 hours - * respectively. If you specify a value less than 5 minutes or greater than 168 - * hours, the Batch service rejects the request with an invalid property value - * error; if you are calling the REST API directly, the HTTP status code is 400 - * (Bad Request). - * @member {boolean} [autoPoolSpecification.pool.enableInterNodeCommunication] - * Enabling inter-node communication limits the maximum size of the pool due to - * deployment restrictions on the nodes of the pool. This may result in the - * pool not reaching its desired size. The default value is false. - * @member {object} [autoPoolSpecification.pool.networkConfiguration] - * @member {string} [autoPoolSpecification.pool.networkConfiguration.subnetId] - * The virtual network must be in the same region and subscription as the Azure - * Batch account. The specified subnet should have enough free IP addresses to - * accommodate the number of nodes in the pool. If the subnet doesn't have - * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks - * ('Microsoft.Network/virtualNetworks') are supported, but for pools created - * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration - * @member {object} - * [autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] Pool - * endpoint configuration is only supported on pools with the - * virtualMachineConfiguration property. - * @member {array} - * [autoPoolSpecification.pool.networkConfiguration.endpointConfiguration.inboundNATPools] - * The maximum number of inbound NAT pools per Batch pool is 5. If the maximum - * number of inbound NAT pools is exceeded the request fails with HTTP status - * code 400. - * @member {object} [autoPoolSpecification.pool.startTask] - * @member {string} [autoPoolSpecification.pool.startTask.commandLine] The - * command line does not run under a shell, and therefore cannot take advantage - * of shell features such as environment variable expansion. If you want to - * take advantage of such features, you should invoke the shell in the command - * line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c - * MyCommand" in Linux. If the command line refers to file paths, it should use - * a relative path (relative to the task working directory), or use the Batch - * provided environment variable - * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [autoPoolSpecification.pool.startTask.containerSettings] - * When this is specified, all directories recursively below the - * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are - * mapped into the container, all task environment variables are mapped into - * the container, and the task command line is executed in the container. - * @member {string} - * [autoPoolSpecification.pool.startTask.containerSettings.containerRunOptions] - * These additional options are supplied as arguments to the "docker create" - * command, in addition to those controlled by the Batch Service. - * @member {string} - * [autoPoolSpecification.pool.startTask.containerSettings.imageName] This is - * the full image reference, as would be specified to "docker pull". If no tag - * is provided as part of the image name, the tag ":latest" is used as a - * default. - * @member {object} - * [autoPoolSpecification.pool.startTask.containerSettings.registry] This - * setting can be omitted if was already provided at pool creation. - * @member {string} - * [autoPoolSpecification.pool.startTask.containerSettings.registry.registryServer] - * If omitted, the default is "docker.io". - * @member {string} - * [autoPoolSpecification.pool.startTask.containerSettings.registry.userName] - * @member {string} - * [autoPoolSpecification.pool.startTask.containerSettings.registry.password] - * @member {array} [autoPoolSpecification.pool.startTask.resourceFiles] Files - * listed under this element are located in the task's working directory. - * @member {array} [autoPoolSpecification.pool.startTask.environmentSettings] - * @member {object} [autoPoolSpecification.pool.startTask.userIdentity] If - * omitted, the task runs as a non-administrative user unique to the task. - * @member {string} - * [autoPoolSpecification.pool.startTask.userIdentity.userName] The userName - * and autoUser properties are mutually exclusive; you must specify one but not - * both. - * @member {object} - * [autoPoolSpecification.pool.startTask.userIdentity.autoUser] The userName - * and autoUser properties are mutually exclusive; you must specify one but not - * both. - * @member {string} - * [autoPoolSpecification.pool.startTask.userIdentity.autoUser.scope] The - * default value is task. Possible values include: 'task', 'pool' - * @member {string} - * [autoPoolSpecification.pool.startTask.userIdentity.autoUser.elevationLevel] - * The default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {number} [autoPoolSpecification.pool.startTask.maxTaskRetryCount] - * The Batch service retries a task if its exit code is nonzero. Note that this - * value specifically controls the number of retries. The Batch service will - * try the task once, and may then retry up to this limit. For example, if the - * maximum retry count is 3, Batch tries the task up to 4 times (one initial - * try and 3 retries). If the maximum retry count is 0, the Batch service does - * not retry the task. If the maximum retry count is -1, the Batch service - * retries the task without limit. - * @member {boolean} [autoPoolSpecification.pool.startTask.waitForSuccess] If - * true and the start task fails on a compute node, the Batch service retries - * the start task up to its maximum retry count (maxTaskRetryCount). If the - * task has still not completed successfully after all retries, then the Batch - * service marks the compute node unusable, and will not schedule tasks to it. - * This condition can be detected via the node state and failure info details. - * If false, the Batch service will not wait for the start task to complete. In - * this case, other tasks can start executing on the compute node while the - * start task is still running; and even if the start task fails, new tasks - * will continue to be scheduled on the node. The default is false. - * @member {array} [autoPoolSpecification.pool.certificateReferences] For - * Windows compute nodes, the Batch service installs the certificates to the - * specified certificate store and location. For Linux compute nodes, the - * certificates are stored in a directory inside the task working directory and - * an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to - * query for this location. For certificates with visibility of 'remoteUser', a - * 'certs' directory is created in the user's home directory (e.g., - * /home/{user-name}/certs) and certificates are placed in that directory. - * @member {array} [autoPoolSpecification.pool.applicationPackageReferences] - * @member {array} [autoPoolSpecification.pool.applicationLicenses] The list of - * application licenses must be a subset of available Batch service application - * licenses. If a license is requested which is not supported, pool creation - * will fail. The permitted licenses available on the pool are 'maya', 'vray', - * '3dsmax', 'arnold'. An additional charge applies for each application - * license added to the pool. - * @member {array} [autoPoolSpecification.pool.userAccounts] - * @member {array} [autoPoolSpecification.pool.metadata] The Batch service does - * not assign any meaning to metadata; it is solely for the use of user code. */ export interface PoolInformation { + /** + * @summary The ID of an existing pool. All the tasks of the job will run on the specified pool. + * @description You must ensure that the pool referenced by this property exists. If the pool + * does not exist at the time the Batch service tries to schedule a job, no tasks for the job + * will run until you create a pool with that id. Note that the Batch service will not reject the + * job request; it will simply not run tasks until the pool exists. You must specify either the + * pool ID or the auto pool specification, but not both. + */ poolId?: string; + /** + * @summary Characteristics for a temporary 'auto pool'. The Batch service will create this auto + * pool when the job is submitted. + * @description If auto pool creation fails, the Batch service moves the job to a completed + * state, and the pool creation error is set in the job's scheduling error property. The Batch + * service manages the lifetime (both creation and, unless keepAlive is specified, deletion) of + * the auto pool. Any user actions that affect the lifetime of the auto pool while the job is + * active will result in unexpected behavior. You must specify either the pool ID or the auto + * pool specification, but not both. + */ autoPoolSpecification?: AutoPoolSpecification; } /** - * @class - * Initializes a new instance of the JobSpecification class. - * @constructor * @summary Specifies details of the jobs to be created on a schedule. - * - * @member {number} [priority] The priority of jobs created under this - * schedule. Priority values can range from -1000 to 1000, with -1000 being the - * lowest priority and 1000 being the highest priority. The default value is 0. - * This priority is used as the default for all jobs under the job schedule. - * You can update a job's priority after it has been created using by using the - * update job API. - * @member {string} [displayName] The display name for jobs created under this - * schedule. The name need not be unique and can contain any Unicode characters - * up to a maximum length of 1024. - * @member {boolean} [usesTaskDependencies] Whether tasks in the job can define - * dependencies on each other. The default is false. - * @member {string} [onAllTasksComplete] The action the Batch service should - * take when all tasks in a job created under this schedule are in the - * completed state. Note that if a job contains no tasks, then all tasks are - * considered complete. This option is therefore most commonly used with a Job - * Manager task; if you want to use automatic job termination without a Job - * Manager, you should initially set onAllTasksComplete to noaction and update - * the job properties to set onAllTasksComplete to terminatejob once you have - * finished adding tasks. The default is noaction. Possible values include: - * 'noAction', 'terminateJob' - * @member {string} [onTaskFailure] The action the Batch service should take - * when any task fails in a job created under this schedule. A task is - * considered to have failed if it have failed if has a failureInfo. A - * failureInfo is set if the task completes with a non-zero exit code after - * exhausting its retry count, or if there was an error starting the task, for - * example due to a resource file download error. The default is noaction. - * Possible values include: 'noAction', 'performExitOptionsJobAction' - * @member {object} [constraints] The execution constraints for jobs created - * under this schedule. - * @member {moment.duration} [constraints.maxWallClockTime] If the job does not - * complete within the time limit, the Batch service terminates it and any - * tasks that are still running. In this case, the termination reason will be - * MaxWallClockTimeExpiry. If this property is not specified, there is no time - * limit on how long the job may run. - * @member {number} [constraints.maxTaskRetryCount] Note that this value - * specifically controls the number of retries. The Batch service will try each - * task once, and may then retry up to this limit. For example, if the maximum - * retry count is 3, Batch tries a task up to 4 times (one initial try and 3 - * retries). If the maximum retry count is 0, the Batch service does not retry - * tasks. If the maximum retry count is -1, the Batch service retries tasks - * without limit. The default value is 0 (no retries). - * @member {object} [jobManagerTask] The details of a Job Manager task to be - * launched when a job is started under this schedule. If the job does not - * specify a Job Manager task, the user must explicitly add tasks to the job - * using the Task API. If the job does specify a Job Manager task, the Batch - * service creates the Job Manager task when the job is created, and will try - * to schedule the Job Manager task before scheduling other tasks in the job. - * @member {string} [jobManagerTask.id] The ID can contain any combination of - * alphanumeric characters including hyphens and underscores and cannot contain - * more than 64 characters. - * @member {string} [jobManagerTask.displayName] It need not be unique and can - * contain any Unicode characters up to a maximum length of 1024. - * @member {string} [jobManagerTask.commandLine] The command line does not run - * under a shell, and therefore cannot take advantage of shell features such as - * environment variable expansion. If you want to take advantage of such - * features, you should invoke the shell in the command line, for example using - * "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the - * command line refers to file paths, it should use a relative path (relative - * to the task working directory), or use the Batch provided environment - * variable - * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [jobManagerTask.containerSettings] If the pool that will - * run this task has containerConfiguration set, this must be set as well. If - * the pool that will run this task doesn't have containerConfiguration set, - * this must not be set. When this is specified, all directories recursively - * below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the - * node) are mapped into the container, all task environment variables are - * mapped into the container, and the task command line is executed in the - * container. - * @member {string} [jobManagerTask.containerSettings.containerRunOptions] - * These additional options are supplied as arguments to the "docker create" - * command, in addition to those controlled by the Batch Service. - * @member {string} [jobManagerTask.containerSettings.imageName] This is the - * full image reference, as would be specified to "docker pull". If no tag is - * provided as part of the image name, the tag ":latest" is used as a default. - * @member {object} [jobManagerTask.containerSettings.registry] This setting - * can be omitted if was already provided at pool creation. - * @member {string} [jobManagerTask.containerSettings.registry.registryServer] - * If omitted, the default is "docker.io". - * @member {string} [jobManagerTask.containerSettings.registry.userName] - * @member {string} [jobManagerTask.containerSettings.registry.password] - * @member {array} [jobManagerTask.resourceFiles] Files listed under this - * element are located in the task's working directory. There is a maximum size - * for the list of resource files. When the max size is exceeded, the request - * will fail and the response error code will be RequestEntityTooLarge. If this - * occurs, the collection of ResourceFiles must be reduced in size. This can be - * achieved using .zip files, Application Packages, or Docker Containers. - * @member {array} [jobManagerTask.outputFiles] For multi-instance tasks, the - * files will only be uploaded from the compute node on which the primary task - * is executed. - * @member {array} [jobManagerTask.environmentSettings] - * @member {object} [jobManagerTask.constraints] - * @member {moment.duration} [jobManagerTask.constraints.maxWallClockTime] If - * this is not specified, there is no time limit on how long the task may run. - * @member {moment.duration} [jobManagerTask.constraints.retentionTime] The - * default is infinite, i.e. the task directory will be retained until the - * compute node is removed or reimaged. - * @member {number} [jobManagerTask.constraints.maxTaskRetryCount] Note that - * this value specifically controls the number of retries for the task - * executable due to a nonzero exit code. The Batch service will try the task - * once, and may then retry up to this limit. For example, if the maximum retry - * count is 3, Batch tries the task up to 4 times (one initial try and 3 - * retries). If the maximum retry count is 0, the Batch service does not retry - * the task after the first attempt. If the maximum retry count is -1, the - * Batch service retries the task without limit. Resource files and application - * packages are only downloaded again if the task is retried on a new compute - * node. - * @member {boolean} [jobManagerTask.killJobOnCompletion] If true, when the Job - * Manager task completes, the Batch service marks the job as complete. If any - * tasks are still running at this time (other than Job Release), those tasks - * are terminated. If false, the completion of the Job Manager task does not - * affect the job status. In this case, you should either use the - * onAllTasksComplete attribute to terminate the job, or have a client or user - * terminate the job explicitly. An example of this is if the Job Manager - * creates a set of tasks but then takes no further role in their execution. - * The default value is true. If you are using the onAllTasksComplete and - * onTaskFailure attributes to control job lifetime, and using the Job Manager - * task only to create the tasks for the job (not to monitor progress), then it - * is important to set killJobOnCompletion to false. - * @member {object} [jobManagerTask.userIdentity] If omitted, the task runs as - * a non-administrative user unique to the task. - * @member {string} [jobManagerTask.userIdentity.userName] The userName and - * autoUser properties are mutually exclusive; you must specify one but not - * both. - * @member {object} [jobManagerTask.userIdentity.autoUser] The userName and - * autoUser properties are mutually exclusive; you must specify one but not - * both. - * @member {string} [jobManagerTask.userIdentity.autoUser.scope] The default - * value is task. Possible values include: 'task', 'pool' - * @member {string} [jobManagerTask.userIdentity.autoUser.elevationLevel] The - * default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {boolean} [jobManagerTask.runExclusive] If true, no other tasks will - * run on the same compute node for as long as the Job Manager is running. If - * false, other tasks can run simultaneously with the Job Manager on a compute - * node. The Job Manager task counts normally against the node's concurrent - * task limit, so this is only relevant if the node allows multiple concurrent - * tasks. The default value is true. - * @member {array} [jobManagerTask.applicationPackageReferences] Application - * packages are downloaded and deployed to a shared directory, not the task - * working directory. Therefore, if a referenced package is already on the - * compute node, and is up to date, then it is not re-downloaded; the existing - * copy on the compute node is used. If a referenced application package cannot - * be installed, for example because the package has been deleted or because - * download failed, the task fails. - * @member {object} [jobManagerTask.authenticationTokenSettings] If this - * property is set, the Batch service provides the task with an authentication - * token which can be used to authenticate Batch service operations without - * requiring an account access key. The token is provided via the - * AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations that the - * task can carry out using the token depend on the settings. For example, a - * task can request job permissions in order to add other tasks to the job, or - * check the status of the job or of other tasks under the job. - * @member {array} [jobManagerTask.authenticationTokenSettings.access] The - * authentication token grants access to a limited set of Batch service - * operations. Currently the only supported value for the access property is - * 'job', which grants access to all operations related to the job which - * contains the task. - * @member {boolean} [jobManagerTask.allowLowPriorityNode] The default value is - * true. - * @member {object} [jobPreparationTask] The Job Preparation task for jobs - * created under this schedule. If a job has a Job Preparation task, the Batch - * service will run the Job Preparation task on a compute node before starting - * any tasks of that job on that compute node. - * @member {string} [jobPreparationTask.id] The ID can contain any combination - * of alphanumeric characters including hyphens and underscores and cannot - * contain more than 64 characters. If you do not specify this property, the - * Batch service assigns a default value of 'jobpreparation'. No other task in - * the job can have the same ID as the Job Preparation task. If you try to - * submit a task with the same id, the Batch service rejects the request with - * error code TaskIdSameAsJobPreparationTask; if you are calling the REST API - * directly, the HTTP status code is 409 (Conflict). - * @member {string} [jobPreparationTask.commandLine] The command line does not - * run under a shell, and therefore cannot take advantage of shell features - * such as environment variable expansion. If you want to take advantage of - * such features, you should invoke the shell in the command line, for example - * using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If - * the command line refers to file paths, it should use a relative path - * (relative to the task working directory), or use the Batch provided - * environment variable - * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [jobPreparationTask.containerSettings] When this is - * specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the - * root of Azure Batch directories on the node) are mapped into the container, - * all task environment variables are mapped into the container, and the task - * command line is executed in the container. - * @member {string} [jobPreparationTask.containerSettings.containerRunOptions] - * These additional options are supplied as arguments to the "docker create" - * command, in addition to those controlled by the Batch Service. - * @member {string} [jobPreparationTask.containerSettings.imageName] This is - * the full image reference, as would be specified to "docker pull". If no tag - * is provided as part of the image name, the tag ":latest" is used as a - * default. - * @member {object} [jobPreparationTask.containerSettings.registry] This - * setting can be omitted if was already provided at pool creation. - * @member {string} - * [jobPreparationTask.containerSettings.registry.registryServer] If omitted, - * the default is "docker.io". - * @member {string} [jobPreparationTask.containerSettings.registry.userName] - * @member {string} [jobPreparationTask.containerSettings.registry.password] - * @member {array} [jobPreparationTask.resourceFiles] Files listed under this - * element are located in the task's working directory. There is a maximum - * size for the list of resource files. When the max size is exceeded, the - * request will fail and the response error code will be RequestEntityTooLarge. - * If this occurs, the collection of ResourceFiles must be reduced in size. - * This can be achieved using .zip files, Application Packages, or Docker - * Containers. - * @member {array} [jobPreparationTask.environmentSettings] - * @member {object} [jobPreparationTask.constraints] - * @member {moment.duration} [jobPreparationTask.constraints.maxWallClockTime] - * If this is not specified, there is no time limit on how long the task may - * run. - * @member {moment.duration} [jobPreparationTask.constraints.retentionTime] The - * default is infinite, i.e. the task directory will be retained until the - * compute node is removed or reimaged. - * @member {number} [jobPreparationTask.constraints.maxTaskRetryCount] Note - * that this value specifically controls the number of retries for the task - * executable due to a nonzero exit code. The Batch service will try the task - * once, and may then retry up to this limit. For example, if the maximum retry - * count is 3, Batch tries the task up to 4 times (one initial try and 3 - * retries). If the maximum retry count is 0, the Batch service does not retry - * the task after the first attempt. If the maximum retry count is -1, the - * Batch service retries the task without limit. Resource files and application - * packages are only downloaded again if the task is retried on a new compute - * node. - * @member {boolean} [jobPreparationTask.waitForSuccess] If true and the Job - * Preparation task fails on a compute node, the Batch service retries the Job - * Preparation task up to its maximum retry count (as specified in the - * constraints element). If the task has still not completed successfully after - * all retries, then the Batch service will not schedule tasks of the job to - * the compute node. The compute node remains active and eligible to run tasks - * of other jobs. If false, the Batch service will not wait for the Job - * Preparation task to complete. In this case, other tasks of the job can start - * executing on the compute node while the Job Preparation task is still - * running; and even if the Job Preparation task fails, new tasks will continue - * to be scheduled on the node. The default value is true. - * @member {object} [jobPreparationTask.userIdentity] If omitted, the task runs - * as a non-administrative user unique to the task on Windows nodes, or a a - * non-administrative user unique to the pool on Linux nodes. - * @member {string} [jobPreparationTask.userIdentity.userName] The userName and - * autoUser properties are mutually exclusive; you must specify one but not - * both. - * @member {object} [jobPreparationTask.userIdentity.autoUser] The userName and - * autoUser properties are mutually exclusive; you must specify one but not - * both. - * @member {string} [jobPreparationTask.userIdentity.autoUser.scope] The - * default value is task. Possible values include: 'task', 'pool' - * @member {string} [jobPreparationTask.userIdentity.autoUser.elevationLevel] - * The default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {boolean} [jobPreparationTask.rerunOnNodeRebootAfterSuccess] The Job - * Preparation task is always rerun if a compute node is reimaged, or if the - * Job Preparation task did not complete (e.g. because the reboot occurred - * while the task was running). Therefore, you should always write a Job - * Preparation task to be idempotent and to behave correctly if run multiple - * times. The default value is true. - * @member {object} [jobReleaseTask] The Job Release task for jobs created - * under this schedule. The primary purpose of the Job Release task is to undo - * changes to compute nodes made by the Job Preparation task. Example - * activities include deleting local files, or shutting down services that were - * started as part of job preparation. A Job Release task cannot be specified - * without also specifying a Job Preparation task for the job. The Batch - * service runs the Job Release task on the compute nodes that have run the Job - * Preparation task. - * @member {string} [jobReleaseTask.id] The ID can contain any combination of - * alphanumeric characters including hyphens and underscores and cannot contain - * more than 64 characters. If you do not specify this property, the Batch - * service assigns a default value of 'jobrelease'. No other task in the job - * can have the same ID as the Job Release task. If you try to submit a task - * with the same id, the Batch service rejects the request with error code - * TaskIdSameAsJobReleaseTask; if you are calling the REST API directly, the - * HTTP status code is 409 (Conflict). - * @member {string} [jobReleaseTask.commandLine] The command line does not run - * under a shell, and therefore cannot take advantage of shell features such as - * environment variable expansion. If you want to take advantage of such - * features, you should invoke the shell in the command line, for example using - * "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the - * command line refers to file paths, it should use a relative path (relative - * to the task working directory), or use the Batch provided environment - * variable - * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [jobReleaseTask.containerSettings] When this is specified, - * all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of - * Azure Batch directories on the node) are mapped into the container, all task - * environment variables are mapped into the container, and the task command - * line is executed in the container. - * @member {string} [jobReleaseTask.containerSettings.containerRunOptions] - * These additional options are supplied as arguments to the "docker create" - * command, in addition to those controlled by the Batch Service. - * @member {string} [jobReleaseTask.containerSettings.imageName] This is the - * full image reference, as would be specified to "docker pull". If no tag is - * provided as part of the image name, the tag ":latest" is used as a default. - * @member {object} [jobReleaseTask.containerSettings.registry] This setting - * can be omitted if was already provided at pool creation. - * @member {string} [jobReleaseTask.containerSettings.registry.registryServer] - * If omitted, the default is "docker.io". - * @member {string} [jobReleaseTask.containerSettings.registry.userName] - * @member {string} [jobReleaseTask.containerSettings.registry.password] - * @member {array} [jobReleaseTask.resourceFiles] Files listed under this - * element are located in the task's working directory. - * @member {array} [jobReleaseTask.environmentSettings] - * @member {moment.duration} [jobReleaseTask.maxWallClockTime] - * @member {moment.duration} [jobReleaseTask.retentionTime] The default is - * infinite, i.e. the task directory will be retained until the compute node is - * removed or reimaged. - * @member {object} [jobReleaseTask.userIdentity] If omitted, the task runs as - * a non-administrative user unique to the task. - * @member {string} [jobReleaseTask.userIdentity.userName] The userName and - * autoUser properties are mutually exclusive; you must specify one but not - * both. - * @member {object} [jobReleaseTask.userIdentity.autoUser] The userName and - * autoUser properties are mutually exclusive; you must specify one but not - * both. - * @member {string} [jobReleaseTask.userIdentity.autoUser.scope] The default - * value is task. Possible values include: 'task', 'pool' - * @member {string} [jobReleaseTask.userIdentity.autoUser.elevationLevel] The - * default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {array} [commonEnvironmentSettings] A list of common environment - * variable settings. These environment variables are set for all tasks in jobs - * created under this schedule (including the Job Manager, Job Preparation and - * Job Release tasks). Individual tasks can override an environment setting - * specified here by specifying the same setting name with a different value. - * @member {object} poolInfo The pool on which the Batch service runs the tasks - * of jobs created under this schedule. - * @member {string} [poolInfo.poolId] You must ensure that the pool referenced - * by this property exists. If the pool does not exist at the time the Batch - * service tries to schedule a job, no tasks for the job will run until you - * create a pool with that id. Note that the Batch service will not reject the - * job request; it will simply not run tasks until the pool exists. You must - * specify either the pool ID or the auto pool specification, but not both. - * @member {object} [poolInfo.autoPoolSpecification] If auto pool creation - * fails, the Batch service moves the job to a completed state, and the pool - * creation error is set in the job's scheduling error property. The Batch - * service manages the lifetime (both creation and, unless keepAlive is - * specified, deletion) of the auto pool. Any user actions that affect the - * lifetime of the auto pool while the job is active will result in unexpected - * behavior. You must specify either the pool ID or the auto pool - * specification, but not both. - * @member {string} [poolInfo.autoPoolSpecification.autoPoolIdPrefix] The Batch - * service assigns each auto pool a unique identifier on creation. To - * distinguish between pools created for different purposes, you can specify - * this element to add a prefix to the ID that is assigned. The prefix can be - * up to 20 characters long. - * @member {string} [poolInfo.autoPoolSpecification.poolLifetimeOption] - * Possible values include: 'jobSchedule', 'job' - * @member {boolean} [poolInfo.autoPoolSpecification.keepAlive] If false, the - * Batch service deletes the pool once its lifetime (as determined by the - * poolLifetimeOption setting) expires; that is, when the job or job schedule - * completes. If true, the Batch service does not delete the pool - * automatically. It is up to the user to delete auto pools created with this - * option. - * @member {object} [poolInfo.autoPoolSpecification.pool] - * @member {string} [poolInfo.autoPoolSpecification.pool.displayName] The - * display name need not be unique and can contain any Unicode characters up to - * a maximum length of 1024. - * @member {string} [poolInfo.autoPoolSpecification.pool.vmSize] For - * information about available sizes of virtual machines in pools, see Choose a - * VM size for compute nodes in an Azure Batch pool - * (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). - * @member {object} - * [poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration] This - * property must be specified if the pool needs to be created with Azure PaaS - * VMs. This property and virtualMachineConfiguration are mutually exclusive - * and one of the properties must be specified. If neither is specified then - * the Batch service returns an error; if you are calling the REST API - * directly, the HTTP status code is 400 (Bad Request). This property cannot be - * specified if the Batch account was created with its poolAllocationMode - * property set to 'UserSubscription'. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osFamily] - * Possible values are: - * 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. - * 3 - OS Family 3, equivalent to Windows Server 2012. - * 4 - OS Family 4, equivalent to Windows Server 2012 R2. - * 5 - OS Family 5, equivalent to Windows Server 2016. For more information, - * see Azure Guest OS Releases - * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). - * @member {string} - * [poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] - * The default value is * which specifies the latest operating system version - * for the specified OS family. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.currentOSVersion] - * This may differ from targetOSVersion if the pool state is Upgrading. In this - * case some virtual machines may be on the targetOSVersion and some may be on - * the currentOSVersion during the upgrade process. Once all virtual machines - * have upgraded, currentOSVersion is updated to be the same as - * targetOSVersion. - * @member {object} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration] This - * property must be specified if the pool needs to be created with Azure IaaS - * VMs. This property and cloudServiceConfiguration are mutually exclusive and - * one of the properties must be specified. If neither is specified then the - * Batch service returns an error; if you are calling the REST API directly, - * the HTTP status code is 400 (Bad Request). - * @member {object} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference] - * @member {string} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.publisher] - * For example, Canonical or MicrosoftWindowsServer. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.offer] - * For example, UbuntuServer or WindowsServer. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.sku] - * For example, 14.04.0-LTS or 2012-R2-Datacenter. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.version] - * A value of 'latest' can be specified to select the latest version of an - * image. If omitted, the default is 'latest'. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.virtualMachineImageId] - * This property is mutually exclusive with other ImageReference properties. - * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * @member {object} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * @member {string} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The default value for caching is readwrite. For information about the - * caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' - * @member {string} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId] - * The Batch node agent is a program that runs on each node in the pool, and - * provides the command-and-control interface between the node and the Batch - * service. There are different implementations of the node agent, known as - * SKUs, for different operating systems. You must specify a node agent SKU - * which matches the selected image reference. To get the list of supported - * node agent SKUs along with their list of verified image references, see the - * 'List supported node agent SKUs' operation. - * @member {object} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] - * This property must not be specified if the imageReference or osDisk property - * specifies a Linux OS image. - * @member {boolean} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] - * If omitted, the default value is true. - * @member {array} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.dataDisks] - * This property must be specified if the compute nodes in the pool need to - * have empty data disks attached to them. This cannot be updated. Each node - * gets its own disk (the disk is not a file share). Existing disks cannot be - * attached, each attached disk is empty. When the node is removed from the - * pool, the disk and all data associated with it is also deleted. The disk is - * not formatted after being attached, it must be formatted before use - for - * more information see - * https://docs.microsoft.com/en-us/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux - * and - * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.licenseType] - * This only applies to images that contain the Windows operating system, and - * should only be used when you hold valid on-premises licenses for the nodes - * which will be deployed. If omitted, no on-premises licensing discount is - * applied. Values are: - * - * Windows_Server - The on-premises license is for Windows Server. - * Windows_Client - The on-premises license is for Windows Client. - * @member {object} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration] - * If specified, setup is performed on each node in the pool to allow tasks to - * run in containers. All regular tasks and job manager tasks run on this pool - * must specify the containerSettings property, and all other tasks may specify - * it. - * @member {array} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration.containerImageNames] - * This is the full image reference, as would be specified to "docker pull". An - * image will be sourced from the default Docker registry unless the image is - * fully qualified with an alternative registry. - * @member {array} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration.containerRegistries] - * If any images must be downloaded from a private registry which requires - * credentials, then those credentials must be provided here. - * @member {number} [poolInfo.autoPoolSpecification.pool.maxTasksPerNode] The - * default value is 1. The maximum value of this setting depends on the size of - * the compute nodes in the pool (the vmSize setting). - * @member {object} [poolInfo.autoPoolSpecification.pool.taskSchedulingPolicy] - * @member {string} - * [poolInfo.autoPoolSpecification.pool.taskSchedulingPolicy.nodeFillType] - * Possible values include: 'spread', 'pack' - * @member {moment.duration} - * [poolInfo.autoPoolSpecification.pool.resizeTimeout] This timeout applies - * only to manual scaling; it has no effect when enableAutoScale is set to - * true. The default value is 15 minutes. The minimum value is 5 minutes. If - * you specify a value less than 5 minutes, the Batch service rejects the - * request with an error; if you are calling the REST API directly, the HTTP - * status code is 400 (Bad Request). - * @member {number} [poolInfo.autoPoolSpecification.pool.targetDedicatedNodes] - * This property must not be specified if enableAutoScale is set to true. If - * enableAutoScale is set to false, then you must set either - * targetDedicatedNodes, targetLowPriorityNodes, or both. - * @member {number} - * [poolInfo.autoPoolSpecification.pool.targetLowPriorityNodes] This property - * must not be specified if enableAutoScale is set to true. If enableAutoScale - * is set to false, then you must set either targetDedicatedNodes, - * targetLowPriorityNodes, or both. - * @member {boolean} [poolInfo.autoPoolSpecification.pool.enableAutoScale] If - * false, at least one of targetDedicateNodes and targetLowPriorityNodes must - * be specified. If true, the autoScaleFormula element is required. The pool - * automatically resizes according to the formula. The default value is false. - * @member {string} [poolInfo.autoPoolSpecification.pool.autoScaleFormula] This - * property must not be specified if enableAutoScale is set to false. It is - * required if enableAutoScale is set to true. The formula is checked for - * validity before the pool is created. If the formula is not valid, the Batch - * service rejects the request with detailed error information. - * @member {moment.duration} - * [poolInfo.autoPoolSpecification.pool.autoScaleEvaluationInterval] The - * default value is 15 minutes. The minimum and maximum value are 5 minutes and - * 168 hours respectively. If you specify a value less than 5 minutes or - * greater than 168 hours, the Batch service rejects the request with an - * invalid property value error; if you are calling the REST API directly, the - * HTTP status code is 400 (Bad Request). - * @member {boolean} - * [poolInfo.autoPoolSpecification.pool.enableInterNodeCommunication] Enabling - * inter-node communication limits the maximum size of the pool due to - * deployment restrictions on the nodes of the pool. This may result in the - * pool not reaching its desired size. The default value is false. - * @member {object} [poolInfo.autoPoolSpecification.pool.networkConfiguration] - * @member {string} - * [poolInfo.autoPoolSpecification.pool.networkConfiguration.subnetId] The - * virtual network must be in the same region and subscription as the Azure - * Batch account. The specified subnet should have enough free IP addresses to - * accommodate the number of nodes in the pool. If the subnet doesn't have - * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks - * ('Microsoft.Network/virtualNetworks') are supported, but for pools created - * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration - * @member {object} - * [poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] - * Pool endpoint configuration is only supported on pools with the - * virtualMachineConfiguration property. - * @member {array} - * [poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration.inboundNATPools] - * The maximum number of inbound NAT pools per Batch pool is 5. If the maximum - * number of inbound NAT pools is exceeded the request fails with HTTP status - * code 400. - * @member {object} [poolInfo.autoPoolSpecification.pool.startTask] - * @member {string} [poolInfo.autoPoolSpecification.pool.startTask.commandLine] - * The command line does not run under a shell, and therefore cannot take - * advantage of shell features such as environment variable expansion. If you - * want to take advantage of such features, you should invoke the shell in the - * command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c - * MyCommand" in Linux. If the command line refers to file paths, it should use - * a relative path (relative to the task working directory), or use the Batch - * provided environment variable - * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} - * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings] When this - * is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR - * (the root of Azure Batch directories on the node) are mapped into the - * container, all task environment variables are mapped into the container, and - * the task command line is executed in the container. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.containerRunOptions] - * These additional options are supplied as arguments to the "docker create" - * command, in addition to those controlled by the Batch Service. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.imageName] - * This is the full image reference, as would be specified to "docker pull". If - * no tag is provided as part of the image name, the tag ":latest" is used as a - * default. - * @member {object} - * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry] - * This setting can be omitted if was already provided at pool creation. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.registryServer] - * If omitted, the default is "docker.io". - * @member {string} - * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.userName] - * @member {string} - * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.password] - * @member {array} - * [poolInfo.autoPoolSpecification.pool.startTask.resourceFiles] Files listed - * under this element are located in the task's working directory. - * @member {array} - * [poolInfo.autoPoolSpecification.pool.startTask.environmentSettings] - * @member {object} - * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity] If omitted, the - * task runs as a non-administrative user unique to the task. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity.userName] The - * userName and autoUser properties are mutually exclusive; you must specify - * one but not both. - * @member {object} - * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser] The - * userName and autoUser properties are mutually exclusive; you must specify - * one but not both. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser.scope] - * The default value is task. Possible values include: 'task', 'pool' - * @member {string} - * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser.elevationLevel] - * The default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {number} - * [poolInfo.autoPoolSpecification.pool.startTask.maxTaskRetryCount] The Batch - * service retries a task if its exit code is nonzero. Note that this value - * specifically controls the number of retries. The Batch service will try the - * task once, and may then retry up to this limit. For example, if the maximum - * retry count is 3, Batch tries the task up to 4 times (one initial try and 3 - * retries). If the maximum retry count is 0, the Batch service does not retry - * the task. If the maximum retry count is -1, the Batch service retries the - * task without limit. - * @member {boolean} - * [poolInfo.autoPoolSpecification.pool.startTask.waitForSuccess] If true and - * the start task fails on a compute node, the Batch service retries the start - * task up to its maximum retry count (maxTaskRetryCount). If the task has - * still not completed successfully after all retries, then the Batch service - * marks the compute node unusable, and will not schedule tasks to it. This - * condition can be detected via the node state and failure info details. If - * false, the Batch service will not wait for the start task to complete. In - * this case, other tasks can start executing on the compute node while the - * start task is still running; and even if the start task fails, new tasks - * will continue to be scheduled on the node. The default is false. - * @member {array} [poolInfo.autoPoolSpecification.pool.certificateReferences] - * For Windows compute nodes, the Batch service installs the certificates to - * the specified certificate store and location. For Linux compute nodes, the - * certificates are stored in a directory inside the task working directory and - * an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to - * query for this location. For certificates with visibility of 'remoteUser', a - * 'certs' directory is created in the user's home directory (e.g., - * /home/{user-name}/certs) and certificates are placed in that directory. - * @member {array} - * [poolInfo.autoPoolSpecification.pool.applicationPackageReferences] - * @member {array} [poolInfo.autoPoolSpecification.pool.applicationLicenses] - * The list of application licenses must be a subset of available Batch service - * application licenses. If a license is requested which is not supported, pool - * creation will fail. The permitted licenses available on the pool are 'maya', - * 'vray', '3dsmax', 'arnold'. An additional charge applies for each - * application license added to the pool. - * @member {array} [poolInfo.autoPoolSpecification.pool.userAccounts] - * @member {array} [poolInfo.autoPoolSpecification.pool.metadata] The Batch - * service does not assign any meaning to metadata; it is solely for the use of - * user code. - * @member {array} [metadata] A list of name-value pairs associated with each - * job created under this schedule as metadata. The Batch service does not - * assign any meaning to metadata; it is solely for the use of user code. */ export interface JobSpecification { + /** + * @summary The priority of jobs created under this schedule. + * @description Priority values can range from -1000 to 1000, with -1000 being the lowest + * priority and 1000 being the highest priority. The default value is 0. This priority is used as + * the default for all jobs under the job schedule. You can update a job's priority after it has + * been created using by using the update job API. + */ priority?: number; + /** + * @summary The display name for jobs created under this schedule. + * @description The name need not be unique and can contain any Unicode characters up to a + * maximum length of 1024. + */ displayName?: string; + /** + * @summary Whether tasks in the job can define dependencies on each other. The default is false. + */ usesTaskDependencies?: boolean; + /** + * @summary The action the Batch service should take when all tasks in a job created under this + * schedule are in the completed state. + * @description Note that if a job contains no tasks, then all tasks are considered complete. + * This option is therefore most commonly used with a Job Manager task; if you want to use + * automatic job termination without a Job Manager, you should initially set onAllTasksComplete + * to noaction and update the job properties to set onAllTasksComplete to terminatejob once you + * have finished adding tasks. The default is noaction. Possible values include: 'noAction', + * 'terminateJob' + */ onAllTasksComplete?: string; + /** + * @summary The action the Batch service should take when any task fails in a job created under + * this schedule. A task is considered to have failed if it have failed if has a failureInfo. A + * failureInfo is set if the task completes with a non-zero exit code after exhausting its retry + * count, or if there was an error starting the task, for example due to a resource file download + * error. + * @description The default is noaction. Possible values include: 'noAction', + * 'performExitOptionsJobAction' + */ onTaskFailure?: string; + /** + * @summary The network configuration for the job. + */ + networkConfiguration?: JobNetworkConfiguration; + /** + * @summary The execution constraints for jobs created under this schedule. + */ constraints?: JobConstraints; + /** + * @summary The details of a Job Manager task to be launched when a job is started under this + * schedule. + * @description If the job does not specify a Job Manager task, the user must explicitly add + * tasks to the job using the Task API. If the job does specify a Job Manager task, the Batch + * service creates the Job Manager task when the job is created, and will try to schedule the Job + * Manager task before scheduling other tasks in the job. + */ jobManagerTask?: JobManagerTask; + /** + * @summary The Job Preparation task for jobs created under this schedule. + * @description If a job has a Job Preparation task, the Batch service will run the Job + * Preparation task on a compute node before starting any tasks of that job on that compute node. + */ jobPreparationTask?: JobPreparationTask; + /** + * @summary The Job Release task for jobs created under this schedule. + * @description The primary purpose of the Job Release task is to undo changes to compute nodes + * made by the Job Preparation task. Example activities include deleting local files, or shutting + * down services that were started as part of job preparation. A Job Release task cannot be + * specified without also specifying a Job Preparation task for the job. The Batch service runs + * the Job Release task on the compute nodes that have run the Job Preparation task. + */ jobReleaseTask?: JobReleaseTask; + /** + * @summary A list of common environment variable settings. These environment variables are set + * for all tasks in jobs created under this schedule (including the Job Manager, Job Preparation + * and Job Release tasks). + * @description Individual tasks can override an environment setting specified here by specifying + * the same setting name with a different value. + */ commonEnvironmentSettings?: EnvironmentSetting[]; + /** + * @summary The pool on which the Batch service runs the tasks of jobs created under this + * schedule. + */ poolInfo: PoolInformation; + /** + * @summary A list of name-value pairs associated with each job created under this schedule as + * metadata. + * @description The Batch service does not assign any meaning to metadata; it is solely for the + * use of user code. + */ metadata?: MetadataItem[]; } /** - * @class - * Initializes a new instance of the RecentJob class. - * @constructor - * @summary Information about the most recent job to run under the job - * schedule. - * - * @member {string} [id] The ID of the job. - * @member {string} [url] The URL of the job. + * @summary Information about the most recent job to run under the job schedule. */ export interface RecentJob { + /** + * @summary The ID of the job. + */ id?: string; + /** + * @summary The URL of the job. + */ url?: string; } /** - * @class - * Initializes a new instance of the JobScheduleExecutionInformation class. - * @constructor - * @summary Contains information about jobs that have been and will be run - * under a job schedule. - * - * @member {date} [nextRunTime] The next time at which a job will be created - * under this schedule. This property is meaningful only if the schedule is in - * the active state when the time comes around. For example, if the schedule is - * disabled, no job will be created at nextRunTime unless the job is enabled - * before then. - * @member {object} [recentJob] Information about the most recent job under the - * job schedule. This property is present only if the at least one job has run - * under the schedule. - * @member {string} [recentJob.id] - * @member {string} [recentJob.url] - * @member {date} [endTime] The time at which the schedule ended. This property - * is set only if the job schedule is in the completed state. + * @summary Contains information about jobs that have been and will be run under a job schedule. */ export interface JobScheduleExecutionInformation { + /** + * @summary The next time at which a job will be created under this schedule. + * @description This property is meaningful only if the schedule is in the active state when the + * time comes around. For example, if the schedule is disabled, no job will be created at + * nextRunTime unless the job is enabled before then. + */ nextRunTime?: Date; + /** + * @summary Information about the most recent job under the job schedule. + * @description This property is present only if the at least one job has run under the schedule. + */ recentJob?: RecentJob; + /** + * @summary The time at which the schedule ended. + * @description This property is set only if the job schedule is in the completed state. + */ endTime?: Date; } /** - * @class - * Initializes a new instance of the JobScheduleStatistics class. - * @constructor * @summary Resource usage statistics for a job schedule. - * - * @member {string} url The URL of the statistics. - * @member {date} startTime The start time of the time range covered by the - * statistics. - * @member {date} lastUpdateTime The time at which the statistics were last - * updated. All statistics are limited to the range between startTime and - * lastUpdateTime. - * @member {moment.duration} userCPUTime The total user mode CPU time (summed - * across all cores and all compute nodes) consumed by all tasks in all jobs - * created under the schedule. - * @member {moment.duration} kernelCPUTime The total kernel mode CPU time - * (summed across all cores and all compute nodes) consumed by all tasks in all - * jobs created under the schedule. - * @member {moment.duration} wallClockTime The total wall clock time of all the - * tasks in all the jobs created under the schedule. The wall clock time is the - * elapsed time from when the task started running on a compute node to when it - * finished (or to the last time the statistics were updated, if the task had - * not finished by then). If a task was retried, this includes the wall clock - * time of all the task retries. - * @member {number} readIOps The total number of disk read operations made by - * all tasks in all jobs created under the schedule. - * @member {number} writeIOps The total number of disk write operations made by - * all tasks in all jobs created under the schedule. - * @member {number} readIOGiB The total gibibytes read from disk by all tasks - * in all jobs created under the schedule. - * @member {number} writeIOGiB The total gibibytes written to disk by all tasks - * in all jobs created under the schedule. - * @member {number} numSucceededTasks The total number of tasks successfully - * completed during the given time range in jobs created under the schedule. A - * task completes successfully if it returns exit code 0. - * @member {number} numFailedTasks The total number of tasks that failed during - * the given time range in jobs created under the schedule. A task fails if it - * exhausts its maximum retry count without returning exit code 0. - * @member {number} numTaskRetries The total number of retries during the given - * time range on all tasks in all jobs created under the schedule. - * @member {moment.duration} waitTime The total wait time of all tasks in all - * jobs created under the schedule. The wait time for a task is defined as the - * elapsed time between the creation of the task and the start of task - * execution. (If the task is retried due to failures, the wait time is the - * time to the most recent task execution.). This value is only reported in the - * account lifetime statistics; it is not included in the job statistics. */ export interface JobScheduleStatistics { + /** + * @summary The URL of the statistics. + */ url: string; + /** + * @summary The start time of the time range covered by the statistics. + */ startTime: Date; + /** + * @summary The time at which the statistics were last updated. All statistics are limited to the + * range between startTime and lastUpdateTime. + */ lastUpdateTime: Date; + /** + * @summary The total user mode CPU time (summed across all cores and all compute nodes) consumed + * by all tasks in all jobs created under the schedule. + */ userCPUTime: moment.Duration; + /** + * @summary The total kernel mode CPU time (summed across all cores and all compute nodes) + * consumed by all tasks in all jobs created under the schedule. + */ kernelCPUTime: moment.Duration; + /** + * @summary The total wall clock time of all the tasks in all the jobs created under the + * schedule. + * @description The wall clock time is the elapsed time from when the task started running on a + * compute node to when it finished (or to the last time the statistics were updated, if the task + * had not finished by then). If a task was retried, this includes the wall clock time of all the + * task retries. + */ wallClockTime: moment.Duration; + /** + * @summary The total number of disk read operations made by all tasks in all jobs created under + * the schedule. + */ readIOps: number; + /** + * @summary The total number of disk write operations made by all tasks in all jobs created under + * the schedule. + */ writeIOps: number; + /** + * @summary The total gibibytes read from disk by all tasks in all jobs created under the + * schedule. + */ readIOGiB: number; + /** + * @summary The total gibibytes written to disk by all tasks in all jobs created under the + * schedule. + */ writeIOGiB: number; + /** + * @summary The total number of tasks successfully completed during the given time range in jobs + * created under the schedule. A task completes successfully if it returns exit code 0. + */ numSucceededTasks: number; + /** + * @summary The total number of tasks that failed during the given time range in jobs created + * under the schedule. A task fails if it exhausts its maximum retry count without returning exit + * code 0. + */ numFailedTasks: number; + /** + * @summary The total number of retries during the given time range on all tasks in all jobs + * created under the schedule. + */ numTaskRetries: number; + /** + * @summary The total wait time of all tasks in all jobs created under the schedule. The wait + * time for a task is defined as the elapsed time between the creation of the task and the start + * of task execution. (If the task is retried due to failures, the wait time is the time to the + * most recent task execution.) + * @description This value is only reported in the account lifetime statistics; it is not + * included in the job statistics. + */ waitTime: moment.Duration; } /** - * @class - * Initializes a new instance of the CloudJobSchedule class. - * @constructor - * @summary A job schedule that allows recurring jobs by specifying when to run - * jobs and a specification used to create each job. - * - * @member {string} [id] A string that uniquely identifies the schedule within - * the account. - * @member {string} [displayName] The display name for the schedule. - * @member {string} [url] The URL of the job schedule. - * @member {string} [eTag] The ETag of the job schedule. This is an opaque - * string. You can use it to detect whether the job schedule has changed - * between requests. In particular, you can be pass the ETag with an Update Job - * Schedule request to specify that your changes should take effect only if - * nobody else has modified the schedule in the meantime. - * @member {date} [lastModified] The last modified time of the job schedule. - * This is the last time at which the schedule level data, such as the job - * specification or recurrence information, changed. It does not factor in - * job-level changes such as new jobs being created or jobs changing state. - * @member {date} [creationTime] The creation time of the job schedule. - * @member {string} [state] The current state of the job schedule. Possible - * values include: 'active', 'completed', 'disabled', 'terminating', 'deleting' - * @member {date} [stateTransitionTime] The time at which the job schedule - * entered the current state. - * @member {string} [previousState] The previous state of the job schedule. - * This property is not present if the job schedule is in its initial active - * state. Possible values include: 'active', 'completed', 'disabled', - * 'terminating', 'deleting' - * @member {date} [previousStateTransitionTime] The time at which the job - * schedule entered its previous state. This property is not present if the job - * schedule is in its initial active state. - * @member {object} [schedule] The schedule according to which jobs will be - * created. - * @member {date} [schedule.doNotRunUntil] If you do not specify a - * doNotRunUntil time, the schedule becomes ready to create jobs immediately. - * @member {date} [schedule.doNotRunAfter] If you do not specify a - * doNotRunAfter time, and you are creating a recurring job schedule, the job - * schedule will remain active until you explicitly terminate it. - * @member {moment.duration} [schedule.startWindow] If a job is not created - * within the startWindow interval, then the 'opportunity' is lost; no job will - * be created until the next recurrence of the schedule. If the schedule is - * recurring, and the startWindow is longer than the recurrence interval, then - * this is equivalent to an infinite startWindow, because the job that is 'due' - * in one recurrenceInterval is not carried forward into the next recurrence - * interval. The default is infinite. The minimum value is 1 minute. If you - * specify a lower value, the Batch service rejects the schedule with an error; - * if you are calling the REST API directly, the HTTP status code is 400 (Bad - * Request). - * @member {moment.duration} [schedule.recurrenceInterval] Because a job - * schedule can have at most one active job under it at any given time, if it - * is time to create a new job under a job schedule, but the previous job is - * still running, the Batch service will not create the new job until the - * previous job finishes. If the previous job does not finish within the - * startWindow period of the new recurrenceInterval, then no new job will be - * scheduled for that interval. For recurring jobs, you should normally specify - * a jobManagerTask in the jobSpecification. If you do not use jobManagerTask, - * you will need an external process to monitor when jobs are created, add - * tasks to the jobs and terminate the jobs ready for the next recurrence. The - * default is that the schedule does not recur: one job is created, within the - * startWindow after the doNotRunUntil time, and the schedule is complete as - * soon as that job finishes. The minimum value is 1 minute. If you specify a - * lower value, the Batch service rejects the schedule with an error; if you - * are calling the REST API directly, the HTTP status code is 400 (Bad - * Request). - * @member {object} [jobSpecification] The details of the jobs to be created on - * this schedule. - * @member {number} [jobSpecification.priority] Priority values can range from - * -1000 to 1000, with -1000 being the lowest priority and 1000 being the - * highest priority. The default value is 0. This priority is used as the - * default for all jobs under the job schedule. You can update a job's priority - * after it has been created using by using the update job API. - * @member {string} [jobSpecification.displayName] The name need not be unique - * and can contain any Unicode characters up to a maximum length of 1024. - * @member {boolean} [jobSpecification.usesTaskDependencies] - * @member {string} [jobSpecification.onAllTasksComplete] Note that if a job - * contains no tasks, then all tasks are considered complete. This option is - * therefore most commonly used with a Job Manager task; if you want to use - * automatic job termination without a Job Manager, you should initially set - * onAllTasksComplete to noaction and update the job properties to set - * onAllTasksComplete to terminatejob once you have finished adding tasks. The - * default is noaction. Possible values include: 'noAction', 'terminateJob' - * @member {string} [jobSpecification.onTaskFailure] The default is noaction. - * Possible values include: 'noAction', 'performExitOptionsJobAction' - * @member {object} [jobSpecification.constraints] - * @member {moment.duration} [jobSpecification.constraints.maxWallClockTime] If - * the job does not complete within the time limit, the Batch service - * terminates it and any tasks that are still running. In this case, the - * termination reason will be MaxWallClockTimeExpiry. If this property is not - * specified, there is no time limit on how long the job may run. - * @member {number} [jobSpecification.constraints.maxTaskRetryCount] Note that - * this value specifically controls the number of retries. The Batch service - * will try each task once, and may then retry up to this limit. For example, - * if the maximum retry count is 3, Batch tries a task up to 4 times (one - * initial try and 3 retries). If the maximum retry count is 0, the Batch - * service does not retry tasks. If the maximum retry count is -1, the Batch - * service retries tasks without limit. The default value is 0 (no retries). - * @member {object} [jobSpecification.jobManagerTask] If the job does not - * specify a Job Manager task, the user must explicitly add tasks to the job - * using the Task API. If the job does specify a Job Manager task, the Batch - * service creates the Job Manager task when the job is created, and will try - * to schedule the Job Manager task before scheduling other tasks in the job. - * @member {string} [jobSpecification.jobManagerTask.id] The ID can contain any - * combination of alphanumeric characters including hyphens and underscores and - * cannot contain more than 64 characters. - * @member {string} [jobSpecification.jobManagerTask.displayName] It need not - * be unique and can contain any Unicode characters up to a maximum length of - * 1024. - * @member {string} [jobSpecification.jobManagerTask.commandLine] The command - * line does not run under a shell, and therefore cannot take advantage of - * shell features such as environment variable expansion. If you want to take - * advantage of such features, you should invoke the shell in the command line, - * for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in - * Linux. If the command line refers to file paths, it should use a relative - * path (relative to the task working directory), or use the Batch provided - * environment variable - * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [jobSpecification.jobManagerTask.containerSettings] If the - * pool that will run this task has containerConfiguration set, this must be - * set as well. If the pool that will run this task doesn't have - * containerConfiguration set, this must not be set. When this is specified, - * all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of - * Azure Batch directories on the node) are mapped into the container, all task - * environment variables are mapped into the container, and the task command - * line is executed in the container. - * @member {string} - * [jobSpecification.jobManagerTask.containerSettings.containerRunOptions] - * These additional options are supplied as arguments to the "docker create" - * command, in addition to those controlled by the Batch Service. - * @member {string} - * [jobSpecification.jobManagerTask.containerSettings.imageName] This is the - * full image reference, as would be specified to "docker pull". If no tag is - * provided as part of the image name, the tag ":latest" is used as a default. - * @member {object} - * [jobSpecification.jobManagerTask.containerSettings.registry] This setting - * can be omitted if was already provided at pool creation. - * @member {string} - * [jobSpecification.jobManagerTask.containerSettings.registry.registryServer] - * If omitted, the default is "docker.io". - * @member {string} - * [jobSpecification.jobManagerTask.containerSettings.registry.userName] - * @member {string} - * [jobSpecification.jobManagerTask.containerSettings.registry.password] - * @member {array} [jobSpecification.jobManagerTask.resourceFiles] Files listed - * under this element are located in the task's working directory. There is a - * maximum size for the list of resource files. When the max size is exceeded, - * the request will fail and the response error code will be - * RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must - * be reduced in size. This can be achieved using .zip files, Application - * Packages, or Docker Containers. - * @member {array} [jobSpecification.jobManagerTask.outputFiles] For - * multi-instance tasks, the files will only be uploaded from the compute node - * on which the primary task is executed. - * @member {array} [jobSpecification.jobManagerTask.environmentSettings] - * @member {object} [jobSpecification.jobManagerTask.constraints] - * @member {moment.duration} - * [jobSpecification.jobManagerTask.constraints.maxWallClockTime] If this is - * not specified, there is no time limit on how long the task may run. - * @member {moment.duration} - * [jobSpecification.jobManagerTask.constraints.retentionTime] The default is - * infinite, i.e. the task directory will be retained until the compute node is - * removed or reimaged. - * @member {number} - * [jobSpecification.jobManagerTask.constraints.maxTaskRetryCount] Note that - * this value specifically controls the number of retries for the task - * executable due to a nonzero exit code. The Batch service will try the task - * once, and may then retry up to this limit. For example, if the maximum retry - * count is 3, Batch tries the task up to 4 times (one initial try and 3 - * retries). If the maximum retry count is 0, the Batch service does not retry - * the task after the first attempt. If the maximum retry count is -1, the - * Batch service retries the task without limit. Resource files and application - * packages are only downloaded again if the task is retried on a new compute - * node. - * @member {boolean} [jobSpecification.jobManagerTask.killJobOnCompletion] If - * true, when the Job Manager task completes, the Batch service marks the job - * as complete. If any tasks are still running at this time (other than Job - * Release), those tasks are terminated. If false, the completion of the Job - * Manager task does not affect the job status. In this case, you should either - * use the onAllTasksComplete attribute to terminate the job, or have a client - * or user terminate the job explicitly. An example of this is if the Job - * Manager creates a set of tasks but then takes no further role in their - * execution. The default value is true. If you are using the - * onAllTasksComplete and onTaskFailure attributes to control job lifetime, and - * using the Job Manager task only to create the tasks for the job (not to - * monitor progress), then it is important to set killJobOnCompletion to false. - * @member {object} [jobSpecification.jobManagerTask.userIdentity] If omitted, - * the task runs as a non-administrative user unique to the task. - * @member {string} [jobSpecification.jobManagerTask.userIdentity.userName] The - * userName and autoUser properties are mutually exclusive; you must specify - * one but not both. - * @member {object} [jobSpecification.jobManagerTask.userIdentity.autoUser] The - * userName and autoUser properties are mutually exclusive; you must specify - * one but not both. - * @member {string} - * [jobSpecification.jobManagerTask.userIdentity.autoUser.scope] The default - * value is task. Possible values include: 'task', 'pool' - * @member {string} - * [jobSpecification.jobManagerTask.userIdentity.autoUser.elevationLevel] The - * default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {boolean} [jobSpecification.jobManagerTask.runExclusive] If true, no - * other tasks will run on the same compute node for as long as the Job Manager - * is running. If false, other tasks can run simultaneously with the Job - * Manager on a compute node. The Job Manager task counts normally against the - * node's concurrent task limit, so this is only relevant if the node allows - * multiple concurrent tasks. The default value is true. - * @member {array} - * [jobSpecification.jobManagerTask.applicationPackageReferences] Application - * packages are downloaded and deployed to a shared directory, not the task - * working directory. Therefore, if a referenced package is already on the - * compute node, and is up to date, then it is not re-downloaded; the existing - * copy on the compute node is used. If a referenced application package cannot - * be installed, for example because the package has been deleted or because - * download failed, the task fails. - * @member {object} - * [jobSpecification.jobManagerTask.authenticationTokenSettings] If this - * property is set, the Batch service provides the task with an authentication - * token which can be used to authenticate Batch service operations without - * requiring an account access key. The token is provided via the - * AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations that the - * task can carry out using the token depend on the settings. For example, a - * task can request job permissions in order to add other tasks to the job, or - * check the status of the job or of other tasks under the job. - * @member {array} - * [jobSpecification.jobManagerTask.authenticationTokenSettings.access] The - * authentication token grants access to a limited set of Batch service - * operations. Currently the only supported value for the access property is - * 'job', which grants access to all operations related to the job which - * contains the task. - * @member {boolean} [jobSpecification.jobManagerTask.allowLowPriorityNode] The - * default value is true. - * @member {object} [jobSpecification.jobPreparationTask] If a job has a Job - * Preparation task, the Batch service will run the Job Preparation task on a - * compute node before starting any tasks of that job on that compute node. - * @member {string} [jobSpecification.jobPreparationTask.id] The ID can contain - * any combination of alphanumeric characters including hyphens and underscores - * and cannot contain more than 64 characters. If you do not specify this - * property, the Batch service assigns a default value of 'jobpreparation'. No - * other task in the job can have the same ID as the Job Preparation task. If - * you try to submit a task with the same id, the Batch service rejects the - * request with error code TaskIdSameAsJobPreparationTask; if you are calling - * the REST API directly, the HTTP status code is 409 (Conflict). - * @member {string} [jobSpecification.jobPreparationTask.commandLine] The - * command line does not run under a shell, and therefore cannot take advantage - * of shell features such as environment variable expansion. If you want to - * take advantage of such features, you should invoke the shell in the command - * line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c - * MyCommand" in Linux. If the command line refers to file paths, it should use - * a relative path (relative to the task working directory), or use the Batch - * provided environment variable - * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [jobSpecification.jobPreparationTask.containerSettings] - * When this is specified, all directories recursively below the - * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are - * mapped into the container, all task environment variables are mapped into - * the container, and the task command line is executed in the container. - * @member {string} - * [jobSpecification.jobPreparationTask.containerSettings.containerRunOptions] - * These additional options are supplied as arguments to the "docker create" - * command, in addition to those controlled by the Batch Service. - * @member {string} - * [jobSpecification.jobPreparationTask.containerSettings.imageName] This is - * the full image reference, as would be specified to "docker pull". If no tag - * is provided as part of the image name, the tag ":latest" is used as a - * default. - * @member {object} - * [jobSpecification.jobPreparationTask.containerSettings.registry] This - * setting can be omitted if was already provided at pool creation. - * @member {string} - * [jobSpecification.jobPreparationTask.containerSettings.registry.registryServer] - * If omitted, the default is "docker.io". - * @member {string} - * [jobSpecification.jobPreparationTask.containerSettings.registry.userName] - * @member {string} - * [jobSpecification.jobPreparationTask.containerSettings.registry.password] - * @member {array} [jobSpecification.jobPreparationTask.resourceFiles] Files - * listed under this element are located in the task's working directory. - * There is a maximum size for the list of resource files. When the max size - * is exceeded, the request will fail and the response error code will be - * RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must - * be reduced in size. This can be achieved using .zip files, Application - * Packages, or Docker Containers. - * @member {array} [jobSpecification.jobPreparationTask.environmentSettings] - * @member {object} [jobSpecification.jobPreparationTask.constraints] - * @member {moment.duration} - * [jobSpecification.jobPreparationTask.constraints.maxWallClockTime] If this - * is not specified, there is no time limit on how long the task may run. - * @member {moment.duration} - * [jobSpecification.jobPreparationTask.constraints.retentionTime] The default - * is infinite, i.e. the task directory will be retained until the compute node - * is removed or reimaged. - * @member {number} - * [jobSpecification.jobPreparationTask.constraints.maxTaskRetryCount] Note - * that this value specifically controls the number of retries for the task - * executable due to a nonzero exit code. The Batch service will try the task - * once, and may then retry up to this limit. For example, if the maximum retry - * count is 3, Batch tries the task up to 4 times (one initial try and 3 - * retries). If the maximum retry count is 0, the Batch service does not retry - * the task after the first attempt. If the maximum retry count is -1, the - * Batch service retries the task without limit. Resource files and application - * packages are only downloaded again if the task is retried on a new compute - * node. - * @member {boolean} [jobSpecification.jobPreparationTask.waitForSuccess] If - * true and the Job Preparation task fails on a compute node, the Batch service - * retries the Job Preparation task up to its maximum retry count (as specified - * in the constraints element). If the task has still not completed - * successfully after all retries, then the Batch service will not schedule - * tasks of the job to the compute node. The compute node remains active and - * eligible to run tasks of other jobs. If false, the Batch service will not - * wait for the Job Preparation task to complete. In this case, other tasks of - * the job can start executing on the compute node while the Job Preparation - * task is still running; and even if the Job Preparation task fails, new tasks - * will continue to be scheduled on the node. The default value is true. - * @member {object} [jobSpecification.jobPreparationTask.userIdentity] If - * omitted, the task runs as a non-administrative user unique to the task on - * Windows nodes, or a a non-administrative user unique to the pool on Linux - * nodes. - * @member {string} [jobSpecification.jobPreparationTask.userIdentity.userName] - * The userName and autoUser properties are mutually exclusive; you must - * specify one but not both. - * @member {object} [jobSpecification.jobPreparationTask.userIdentity.autoUser] - * The userName and autoUser properties are mutually exclusive; you must - * specify one but not both. - * @member {string} - * [jobSpecification.jobPreparationTask.userIdentity.autoUser.scope] The - * default value is task. Possible values include: 'task', 'pool' - * @member {string} - * [jobSpecification.jobPreparationTask.userIdentity.autoUser.elevationLevel] - * The default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {boolean} - * [jobSpecification.jobPreparationTask.rerunOnNodeRebootAfterSuccess] The Job - * Preparation task is always rerun if a compute node is reimaged, or if the - * Job Preparation task did not complete (e.g. because the reboot occurred - * while the task was running). Therefore, you should always write a Job - * Preparation task to be idempotent and to behave correctly if run multiple - * times. The default value is true. - * @member {object} [jobSpecification.jobReleaseTask] The primary purpose of - * the Job Release task is to undo changes to compute nodes made by the Job - * Preparation task. Example activities include deleting local files, or - * shutting down services that were started as part of job preparation. A Job - * Release task cannot be specified without also specifying a Job Preparation - * task for the job. The Batch service runs the Job Release task on the compute - * nodes that have run the Job Preparation task. - * @member {string} [jobSpecification.jobReleaseTask.id] The ID can contain any - * combination of alphanumeric characters including hyphens and underscores and - * cannot contain more than 64 characters. If you do not specify this property, - * the Batch service assigns a default value of 'jobrelease'. No other task in - * the job can have the same ID as the Job Release task. If you try to submit a - * task with the same id, the Batch service rejects the request with error code - * TaskIdSameAsJobReleaseTask; if you are calling the REST API directly, the - * HTTP status code is 409 (Conflict). - * @member {string} [jobSpecification.jobReleaseTask.commandLine] The command - * line does not run under a shell, and therefore cannot take advantage of - * shell features such as environment variable expansion. If you want to take - * advantage of such features, you should invoke the shell in the command line, - * for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in - * Linux. If the command line refers to file paths, it should use a relative - * path (relative to the task working directory), or use the Batch provided - * environment variable - * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [jobSpecification.jobReleaseTask.containerSettings] When - * this is specified, all directories recursively below the - * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are - * mapped into the container, all task environment variables are mapped into - * the container, and the task command line is executed in the container. - * @member {string} - * [jobSpecification.jobReleaseTask.containerSettings.containerRunOptions] - * These additional options are supplied as arguments to the "docker create" - * command, in addition to those controlled by the Batch Service. - * @member {string} - * [jobSpecification.jobReleaseTask.containerSettings.imageName] This is the - * full image reference, as would be specified to "docker pull". If no tag is - * provided as part of the image name, the tag ":latest" is used as a default. - * @member {object} - * [jobSpecification.jobReleaseTask.containerSettings.registry] This setting - * can be omitted if was already provided at pool creation. - * @member {string} - * [jobSpecification.jobReleaseTask.containerSettings.registry.registryServer] - * If omitted, the default is "docker.io". - * @member {string} - * [jobSpecification.jobReleaseTask.containerSettings.registry.userName] - * @member {string} - * [jobSpecification.jobReleaseTask.containerSettings.registry.password] - * @member {array} [jobSpecification.jobReleaseTask.resourceFiles] Files listed - * under this element are located in the task's working directory. - * @member {array} [jobSpecification.jobReleaseTask.environmentSettings] - * @member {moment.duration} [jobSpecification.jobReleaseTask.maxWallClockTime] - * @member {moment.duration} [jobSpecification.jobReleaseTask.retentionTime] - * The default is infinite, i.e. the task directory will be retained until the - * compute node is removed or reimaged. - * @member {object} [jobSpecification.jobReleaseTask.userIdentity] If omitted, - * the task runs as a non-administrative user unique to the task. - * @member {string} [jobSpecification.jobReleaseTask.userIdentity.userName] The - * userName and autoUser properties are mutually exclusive; you must specify - * one but not both. - * @member {object} [jobSpecification.jobReleaseTask.userIdentity.autoUser] The - * userName and autoUser properties are mutually exclusive; you must specify - * one but not both. - * @member {string} - * [jobSpecification.jobReleaseTask.userIdentity.autoUser.scope] The default - * value is task. Possible values include: 'task', 'pool' - * @member {string} - * [jobSpecification.jobReleaseTask.userIdentity.autoUser.elevationLevel] The - * default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {array} [jobSpecification.commonEnvironmentSettings] Individual - * tasks can override an environment setting specified here by specifying the - * same setting name with a different value. - * @member {object} [jobSpecification.poolInfo] - * @member {string} [jobSpecification.poolInfo.poolId] You must ensure that the - * pool referenced by this property exists. If the pool does not exist at the - * time the Batch service tries to schedule a job, no tasks for the job will - * run until you create a pool with that id. Note that the Batch service will - * not reject the job request; it will simply not run tasks until the pool - * exists. You must specify either the pool ID or the auto pool specification, - * but not both. - * @member {object} [jobSpecification.poolInfo.autoPoolSpecification] If auto - * pool creation fails, the Batch service moves the job to a completed state, - * and the pool creation error is set in the job's scheduling error property. - * The Batch service manages the lifetime (both creation and, unless keepAlive - * is specified, deletion) of the auto pool. Any user actions that affect the - * lifetime of the auto pool while the job is active will result in unexpected - * behavior. You must specify either the pool ID or the auto pool - * specification, but not both. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.autoPoolIdPrefix] The Batch - * service assigns each auto pool a unique identifier on creation. To - * distinguish between pools created for different purposes, you can specify - * this element to add a prefix to the ID that is assigned. The prefix can be - * up to 20 characters long. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.poolLifetimeOption] - * Possible values include: 'jobSchedule', 'job' - * @member {boolean} - * [jobSpecification.poolInfo.autoPoolSpecification.keepAlive] If false, the - * Batch service deletes the pool once its lifetime (as determined by the - * poolLifetimeOption setting) expires; that is, when the job or job schedule - * completes. If true, the Batch service does not delete the pool - * automatically. It is up to the user to delete auto pools created with this - * option. - * @member {object} [jobSpecification.poolInfo.autoPoolSpecification.pool] - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.displayName] The - * display name need not be unique and can contain any Unicode characters up to - * a maximum length of 1024. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.vmSize] For - * information about available sizes of virtual machines in pools, see Choose a - * VM size for compute nodes in an Azure Batch pool - * (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration] - * This property must be specified if the pool needs to be created with Azure - * PaaS VMs. This property and virtualMachineConfiguration are mutually - * exclusive and one of the properties must be specified. If neither is - * specified then the Batch service returns an error; if you are calling the - * REST API directly, the HTTP status code is 400 (Bad Request). This property - * cannot be specified if the Batch account was created with its - * poolAllocationMode property set to 'UserSubscription'. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osFamily] - * Possible values are: - * 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. - * 3 - OS Family 3, equivalent to Windows Server 2012. - * 4 - OS Family 4, equivalent to Windows Server 2012 R2. - * 5 - OS Family 5, equivalent to Windows Server 2016. For more information, - * see Azure Guest OS Releases - * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] - * The default value is * which specifies the latest operating system version - * for the specified OS family. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.currentOSVersion] - * This may differ from targetOSVersion if the pool state is Upgrading. In this - * case some virtual machines may be on the targetOSVersion and some may be on - * the currentOSVersion during the upgrade process. Once all virtual machines - * have upgraded, currentOSVersion is updated to be the same as - * targetOSVersion. - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration] - * This property must be specified if the pool needs to be created with Azure - * IaaS VMs. This property and cloudServiceConfiguration are mutually exclusive - * and one of the properties must be specified. If neither is specified then - * the Batch service returns an error; if you are calling the REST API - * directly, the HTTP status code is 400 (Bad Request). - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference] - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.publisher] - * For example, Canonical or MicrosoftWindowsServer. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.offer] - * For example, UbuntuServer or WindowsServer. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.sku] - * For example, 14.04.0-LTS or 2012-R2-Datacenter. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.version] - * A value of 'latest' can be specified to select the latest version of an - * image. If omitted, the default is 'latest'. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.virtualMachineImageId] - * This property is mutually exclusive with other ImageReference properties. - * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The default value for caching is readwrite. For information about the - * caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId] - * The Batch node agent is a program that runs on each node in the pool, and - * provides the command-and-control interface between the node and the Batch - * service. There are different implementations of the node agent, known as - * SKUs, for different operating systems. You must specify a node agent SKU - * which matches the selected image reference. To get the list of supported - * node agent SKUs along with their list of verified image references, see the - * 'List supported node agent SKUs' operation. - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] - * This property must not be specified if the imageReference or osDisk property - * specifies a Linux OS image. - * @member {boolean} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] - * If omitted, the default value is true. - * @member {array} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.dataDisks] - * This property must be specified if the compute nodes in the pool need to - * have empty data disks attached to them. This cannot be updated. Each node - * gets its own disk (the disk is not a file share). Existing disks cannot be - * attached, each attached disk is empty. When the node is removed from the - * pool, the disk and all data associated with it is also deleted. The disk is - * not formatted after being attached, it must be formatted before use - for - * more information see - * https://docs.microsoft.com/en-us/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux - * and - * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.licenseType] - * This only applies to images that contain the Windows operating system, and - * should only be used when you hold valid on-premises licenses for the nodes - * which will be deployed. If omitted, no on-premises licensing discount is - * applied. Values are: - * - * Windows_Server - The on-premises license is for Windows Server. - * Windows_Client - The on-premises license is for Windows Client. - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration] - * If specified, setup is performed on each node in the pool to allow tasks to - * run in containers. All regular tasks and job manager tasks run on this pool - * must specify the containerSettings property, and all other tasks may specify - * it. - * @member {array} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration.containerImageNames] - * This is the full image reference, as would be specified to "docker pull". An - * image will be sourced from the default Docker registry unless the image is - * fully qualified with an alternative registry. - * @member {array} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration.containerRegistries] - * If any images must be downloaded from a private registry which requires - * credentials, then those credentials must be provided here. - * @member {number} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.maxTasksPerNode] The - * default value is 1. The maximum value of this setting depends on the size of - * the compute nodes in the pool (the vmSize setting). - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.taskSchedulingPolicy] - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.taskSchedulingPolicy.nodeFillType] - * Possible values include: 'spread', 'pack' - * @member {moment.duration} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.resizeTimeout] This - * timeout applies only to manual scaling; it has no effect when - * enableAutoScale is set to true. The default value is 15 minutes. The minimum - * value is 5 minutes. If you specify a value less than 5 minutes, the Batch - * service rejects the request with an error; if you are calling the REST API - * directly, the HTTP status code is 400 (Bad Request). - * @member {number} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.targetDedicatedNodes] - * This property must not be specified if enableAutoScale is set to true. If - * enableAutoScale is set to false, then you must set either - * targetDedicatedNodes, targetLowPriorityNodes, or both. - * @member {number} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.targetLowPriorityNodes] - * This property must not be specified if enableAutoScale is set to true. If - * enableAutoScale is set to false, then you must set either - * targetDedicatedNodes, targetLowPriorityNodes, or both. - * @member {boolean} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.enableAutoScale] If - * false, at least one of targetDedicateNodes and targetLowPriorityNodes must - * be specified. If true, the autoScaleFormula element is required. The pool - * automatically resizes according to the formula. The default value is false. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.autoScaleFormula] This - * property must not be specified if enableAutoScale is set to false. It is - * required if enableAutoScale is set to true. The formula is checked for - * validity before the pool is created. If the formula is not valid, the Batch - * service rejects the request with detailed error information. - * @member {moment.duration} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.autoScaleEvaluationInterval] - * The default value is 15 minutes. The minimum and maximum value are 5 minutes - * and 168 hours respectively. If you specify a value less than 5 minutes or - * greater than 168 hours, the Batch service rejects the request with an - * invalid property value error; if you are calling the REST API directly, the - * HTTP status code is 400 (Bad Request). - * @member {boolean} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.enableInterNodeCommunication] - * Enabling inter-node communication limits the maximum size of the pool due to - * deployment restrictions on the nodes of the pool. This may result in the - * pool not reaching its desired size. The default value is false. - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration] - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.subnetId] - * The virtual network must be in the same region and subscription as the Azure - * Batch account. The specified subnet should have enough free IP addresses to - * accommodate the number of nodes in the pool. If the subnet doesn't have - * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks - * ('Microsoft.Network/virtualNetworks') are supported, but for pools created - * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] - * Pool endpoint configuration is only supported on pools with the - * virtualMachineConfiguration property. - * @member {array} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration.inboundNATPools] - * The maximum number of inbound NAT pools per Batch pool is 5. If the maximum - * number of inbound NAT pools is exceeded the request fails with HTTP status - * code 400. - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask] - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.commandLine] - * The command line does not run under a shell, and therefore cannot take - * advantage of shell features such as environment variable expansion. If you - * want to take advantage of such features, you should invoke the shell in the - * command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c - * MyCommand" in Linux. If the command line refers to file paths, it should use - * a relative path (relative to the task working directory), or use the Batch - * provided environment variable - * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings] - * When this is specified, all directories recursively below the - * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are - * mapped into the container, all task environment variables are mapped into - * the container, and the task command line is executed in the container. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.containerRunOptions] - * These additional options are supplied as arguments to the "docker create" - * command, in addition to those controlled by the Batch Service. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.imageName] - * This is the full image reference, as would be specified to "docker pull". If - * no tag is provided as part of the image name, the tag ":latest" is used as a - * default. - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry] - * This setting can be omitted if was already provided at pool creation. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.registryServer] - * If omitted, the default is "docker.io". - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.userName] - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.password] - * @member {array} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.resourceFiles] - * Files listed under this element are located in the task's working directory. - * @member {array} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.environmentSettings] - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.userIdentity] - * If omitted, the task runs as a non-administrative user unique to the task. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.userIdentity.userName] - * The userName and autoUser properties are mutually exclusive; you must - * specify one but not both. - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser] - * The userName and autoUser properties are mutually exclusive; you must - * specify one but not both. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser.scope] - * The default value is task. Possible values include: 'task', 'pool' - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser.elevationLevel] - * The default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {number} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.maxTaskRetryCount] - * The Batch service retries a task if its exit code is nonzero. Note that this - * value specifically controls the number of retries. The Batch service will - * try the task once, and may then retry up to this limit. For example, if the - * maximum retry count is 3, Batch tries the task up to 4 times (one initial - * try and 3 retries). If the maximum retry count is 0, the Batch service does - * not retry the task. If the maximum retry count is -1, the Batch service - * retries the task without limit. - * @member {boolean} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.waitForSuccess] - * If true and the start task fails on a compute node, the Batch service - * retries the start task up to its maximum retry count (maxTaskRetryCount). If - * the task has still not completed successfully after all retries, then the - * Batch service marks the compute node unusable, and will not schedule tasks - * to it. This condition can be detected via the node state and failure info - * details. If false, the Batch service will not wait for the start task to - * complete. In this case, other tasks can start executing on the compute node - * while the start task is still running; and even if the start task fails, new - * tasks will continue to be scheduled on the node. The default is false. - * @member {array} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.certificateReferences] - * For Windows compute nodes, the Batch service installs the certificates to - * the specified certificate store and location. For Linux compute nodes, the - * certificates are stored in a directory inside the task working directory and - * an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to - * query for this location. For certificates with visibility of 'remoteUser', a - * 'certs' directory is created in the user's home directory (e.g., - * /home/{user-name}/certs) and certificates are placed in that directory. - * @member {array} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.applicationPackageReferences] - * @member {array} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.applicationLicenses] - * The list of application licenses must be a subset of available Batch service - * application licenses. If a license is requested which is not supported, pool - * creation will fail. The permitted licenses available on the pool are 'maya', - * 'vray', '3dsmax', 'arnold'. An additional charge applies for each - * application license added to the pool. - * @member {array} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.userAccounts] - * @member {array} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.metadata] The Batch - * service does not assign any meaning to metadata; it is solely for the use of - * user code. - * @member {array} [jobSpecification.metadata] The Batch service does not - * assign any meaning to metadata; it is solely for the use of user code. - * @member {object} [executionInfo] Information about jobs that have been and - * will be run under this schedule. - * @member {date} [executionInfo.nextRunTime] This property is meaningful only - * if the schedule is in the active state when the time comes around. For - * example, if the schedule is disabled, no job will be created at nextRunTime - * unless the job is enabled before then. - * @member {object} [executionInfo.recentJob] This property is present only if - * the at least one job has run under the schedule. - * @member {string} [executionInfo.recentJob.id] - * @member {string} [executionInfo.recentJob.url] - * @member {date} [executionInfo.endTime] This property is set only if the job - * schedule is in the completed state. - * @member {array} [metadata] A list of name-value pairs associated with the - * schedule as metadata. The Batch service does not assign any meaning to - * metadata; it is solely for the use of user code. - * @member {object} [stats] The lifetime resource usage statistics for the job - * schedule. The statistics may not be immediately available. The Batch service - * performs periodic roll-up of statistics. The typical delay is about 30 - * minutes. - * @member {string} [stats.url] - * @member {date} [stats.startTime] - * @member {date} [stats.lastUpdateTime] - * @member {moment.duration} [stats.userCPUTime] - * @member {moment.duration} [stats.kernelCPUTime] - * @member {moment.duration} [stats.wallClockTime] The wall clock time is the - * elapsed time from when the task started running on a compute node to when it - * finished (or to the last time the statistics were updated, if the task had - * not finished by then). If a task was retried, this includes the wall clock - * time of all the task retries. - * @member {number} [stats.readIOps] - * @member {number} [stats.writeIOps] - * @member {number} [stats.readIOGiB] - * @member {number} [stats.writeIOGiB] - * @member {number} [stats.numSucceededTasks] - * @member {number} [stats.numFailedTasks] - * @member {number} [stats.numTaskRetries] - * @member {moment.duration} [stats.waitTime] This value is only reported in - * the account lifetime statistics; it is not included in the job statistics. + * @summary A job schedule that allows recurring jobs by specifying when to run jobs and a + * specification used to create each job. */ export interface CloudJobSchedule { + /** + * @summary A string that uniquely identifies the schedule within the account. + */ id?: string; + /** + * @summary The display name for the schedule. + */ displayName?: string; + /** + * @summary The URL of the job schedule. + */ url?: string; + /** + * @summary The ETag of the job schedule. + * @description This is an opaque string. You can use it to detect whether the job schedule has + * changed between requests. In particular, you can be pass the ETag with an Update Job Schedule + * request to specify that your changes should take effect only if nobody else has modified the + * schedule in the meantime. + */ eTag?: string; + /** + * @summary The last modified time of the job schedule. + * @description This is the last time at which the schedule level data, such as the job + * specification or recurrence information, changed. It does not factor in job-level changes such + * as new jobs being created or jobs changing state. + */ lastModified?: Date; + /** + * @summary The creation time of the job schedule. + */ creationTime?: Date; + /** + * @summary The current state of the job schedule. + * @description Possible values include: 'active', 'completed', 'disabled', 'terminating', + * 'deleting' + */ state?: string; + /** + * @summary The time at which the job schedule entered the current state. + */ stateTransitionTime?: Date; + /** + * @summary The previous state of the job schedule. + * @description This property is not present if the job schedule is in its initial active state. + * Possible values include: 'active', 'completed', 'disabled', 'terminating', 'deleting' + */ previousState?: string; + /** + * @summary The time at which the job schedule entered its previous state. + * @description This property is not present if the job schedule is in its initial active state. + */ previousStateTransitionTime?: Date; + /** + * @summary The schedule according to which jobs will be created. + */ schedule?: Schedule; + /** + * @summary The details of the jobs to be created on this schedule. + */ jobSpecification?: JobSpecification; + /** + * @summary Information about jobs that have been and will be run under this schedule. + */ executionInfo?: JobScheduleExecutionInformation; + /** + * @summary A list of name-value pairs associated with the schedule as metadata. + * @description The Batch service does not assign any meaning to metadata; it is solely for the + * use of user code. + */ metadata?: MetadataItem[]; + /** + * @summary The lifetime resource usage statistics for the job schedule. The statistics may not + * be immediately available. The Batch service performs periodic roll-up of statistics. The + * typical delay is about 30 minutes. + */ stats?: JobScheduleStatistics; } /** - * @class - * Initializes a new instance of the JobScheduleAddParameter class. - * @constructor - * @summary A job schedule that allows recurring jobs by specifying when to run - * jobs and a specification used to create each job. - * - * @member {string} id A string that uniquely identifies the schedule within - * the account. The ID can contain any combination of alphanumeric characters - * including hyphens and underscores, and cannot contain more than 64 - * characters. The ID is case-preserving and case-insensitive (that is, you may - * not have two IDs within an account that differ only by case). - * @member {string} [displayName] The display name for the schedule. The - * display name need not be unique and can contain any Unicode characters up to - * a maximum length of 1024. - * @member {object} schedule The schedule according to which jobs will be - * created. - * @member {date} [schedule.doNotRunUntil] If you do not specify a - * doNotRunUntil time, the schedule becomes ready to create jobs immediately. - * @member {date} [schedule.doNotRunAfter] If you do not specify a - * doNotRunAfter time, and you are creating a recurring job schedule, the job - * schedule will remain active until you explicitly terminate it. - * @member {moment.duration} [schedule.startWindow] If a job is not created - * within the startWindow interval, then the 'opportunity' is lost; no job will - * be created until the next recurrence of the schedule. If the schedule is - * recurring, and the startWindow is longer than the recurrence interval, then - * this is equivalent to an infinite startWindow, because the job that is 'due' - * in one recurrenceInterval is not carried forward into the next recurrence - * interval. The default is infinite. The minimum value is 1 minute. If you - * specify a lower value, the Batch service rejects the schedule with an error; - * if you are calling the REST API directly, the HTTP status code is 400 (Bad - * Request). - * @member {moment.duration} [schedule.recurrenceInterval] Because a job - * schedule can have at most one active job under it at any given time, if it - * is time to create a new job under a job schedule, but the previous job is - * still running, the Batch service will not create the new job until the - * previous job finishes. If the previous job does not finish within the - * startWindow period of the new recurrenceInterval, then no new job will be - * scheduled for that interval. For recurring jobs, you should normally specify - * a jobManagerTask in the jobSpecification. If you do not use jobManagerTask, - * you will need an external process to monitor when jobs are created, add - * tasks to the jobs and terminate the jobs ready for the next recurrence. The - * default is that the schedule does not recur: one job is created, within the - * startWindow after the doNotRunUntil time, and the schedule is complete as - * soon as that job finishes. The minimum value is 1 minute. If you specify a - * lower value, the Batch service rejects the schedule with an error; if you - * are calling the REST API directly, the HTTP status code is 400 (Bad - * Request). - * @member {object} jobSpecification The details of the jobs to be created on - * this schedule. - * @member {number} [jobSpecification.priority] Priority values can range from - * -1000 to 1000, with -1000 being the lowest priority and 1000 being the - * highest priority. The default value is 0. This priority is used as the - * default for all jobs under the job schedule. You can update a job's priority - * after it has been created using by using the update job API. - * @member {string} [jobSpecification.displayName] The name need not be unique - * and can contain any Unicode characters up to a maximum length of 1024. - * @member {boolean} [jobSpecification.usesTaskDependencies] - * @member {string} [jobSpecification.onAllTasksComplete] Note that if a job - * contains no tasks, then all tasks are considered complete. This option is - * therefore most commonly used with a Job Manager task; if you want to use - * automatic job termination without a Job Manager, you should initially set - * onAllTasksComplete to noaction and update the job properties to set - * onAllTasksComplete to terminatejob once you have finished adding tasks. The - * default is noaction. Possible values include: 'noAction', 'terminateJob' - * @member {string} [jobSpecification.onTaskFailure] The default is noaction. - * Possible values include: 'noAction', 'performExitOptionsJobAction' - * @member {object} [jobSpecification.constraints] - * @member {moment.duration} [jobSpecification.constraints.maxWallClockTime] If - * the job does not complete within the time limit, the Batch service - * terminates it and any tasks that are still running. In this case, the - * termination reason will be MaxWallClockTimeExpiry. If this property is not - * specified, there is no time limit on how long the job may run. - * @member {number} [jobSpecification.constraints.maxTaskRetryCount] Note that - * this value specifically controls the number of retries. The Batch service - * will try each task once, and may then retry up to this limit. For example, - * if the maximum retry count is 3, Batch tries a task up to 4 times (one - * initial try and 3 retries). If the maximum retry count is 0, the Batch - * service does not retry tasks. If the maximum retry count is -1, the Batch - * service retries tasks without limit. The default value is 0 (no retries). - * @member {object} [jobSpecification.jobManagerTask] If the job does not - * specify a Job Manager task, the user must explicitly add tasks to the job - * using the Task API. If the job does specify a Job Manager task, the Batch - * service creates the Job Manager task when the job is created, and will try - * to schedule the Job Manager task before scheduling other tasks in the job. - * @member {string} [jobSpecification.jobManagerTask.id] The ID can contain any - * combination of alphanumeric characters including hyphens and underscores and - * cannot contain more than 64 characters. - * @member {string} [jobSpecification.jobManagerTask.displayName] It need not - * be unique and can contain any Unicode characters up to a maximum length of - * 1024. - * @member {string} [jobSpecification.jobManagerTask.commandLine] The command - * line does not run under a shell, and therefore cannot take advantage of - * shell features such as environment variable expansion. If you want to take - * advantage of such features, you should invoke the shell in the command line, - * for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in - * Linux. If the command line refers to file paths, it should use a relative - * path (relative to the task working directory), or use the Batch provided - * environment variable - * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [jobSpecification.jobManagerTask.containerSettings] If the - * pool that will run this task has containerConfiguration set, this must be - * set as well. If the pool that will run this task doesn't have - * containerConfiguration set, this must not be set. When this is specified, - * all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of - * Azure Batch directories on the node) are mapped into the container, all task - * environment variables are mapped into the container, and the task command - * line is executed in the container. - * @member {string} - * [jobSpecification.jobManagerTask.containerSettings.containerRunOptions] - * These additional options are supplied as arguments to the "docker create" - * command, in addition to those controlled by the Batch Service. - * @member {string} - * [jobSpecification.jobManagerTask.containerSettings.imageName] This is the - * full image reference, as would be specified to "docker pull". If no tag is - * provided as part of the image name, the tag ":latest" is used as a default. - * @member {object} - * [jobSpecification.jobManagerTask.containerSettings.registry] This setting - * can be omitted if was already provided at pool creation. - * @member {string} - * [jobSpecification.jobManagerTask.containerSettings.registry.registryServer] - * If omitted, the default is "docker.io". - * @member {string} - * [jobSpecification.jobManagerTask.containerSettings.registry.userName] - * @member {string} - * [jobSpecification.jobManagerTask.containerSettings.registry.password] - * @member {array} [jobSpecification.jobManagerTask.resourceFiles] Files listed - * under this element are located in the task's working directory. There is a - * maximum size for the list of resource files. When the max size is exceeded, - * the request will fail and the response error code will be - * RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must - * be reduced in size. This can be achieved using .zip files, Application - * Packages, or Docker Containers. - * @member {array} [jobSpecification.jobManagerTask.outputFiles] For - * multi-instance tasks, the files will only be uploaded from the compute node - * on which the primary task is executed. - * @member {array} [jobSpecification.jobManagerTask.environmentSettings] - * @member {object} [jobSpecification.jobManagerTask.constraints] - * @member {moment.duration} - * [jobSpecification.jobManagerTask.constraints.maxWallClockTime] If this is - * not specified, there is no time limit on how long the task may run. - * @member {moment.duration} - * [jobSpecification.jobManagerTask.constraints.retentionTime] The default is - * infinite, i.e. the task directory will be retained until the compute node is - * removed or reimaged. - * @member {number} - * [jobSpecification.jobManagerTask.constraints.maxTaskRetryCount] Note that - * this value specifically controls the number of retries for the task - * executable due to a nonzero exit code. The Batch service will try the task - * once, and may then retry up to this limit. For example, if the maximum retry - * count is 3, Batch tries the task up to 4 times (one initial try and 3 - * retries). If the maximum retry count is 0, the Batch service does not retry - * the task after the first attempt. If the maximum retry count is -1, the - * Batch service retries the task without limit. Resource files and application - * packages are only downloaded again if the task is retried on a new compute - * node. - * @member {boolean} [jobSpecification.jobManagerTask.killJobOnCompletion] If - * true, when the Job Manager task completes, the Batch service marks the job - * as complete. If any tasks are still running at this time (other than Job - * Release), those tasks are terminated. If false, the completion of the Job - * Manager task does not affect the job status. In this case, you should either - * use the onAllTasksComplete attribute to terminate the job, or have a client - * or user terminate the job explicitly. An example of this is if the Job - * Manager creates a set of tasks but then takes no further role in their - * execution. The default value is true. If you are using the - * onAllTasksComplete and onTaskFailure attributes to control job lifetime, and - * using the Job Manager task only to create the tasks for the job (not to - * monitor progress), then it is important to set killJobOnCompletion to false. - * @member {object} [jobSpecification.jobManagerTask.userIdentity] If omitted, - * the task runs as a non-administrative user unique to the task. - * @member {string} [jobSpecification.jobManagerTask.userIdentity.userName] The - * userName and autoUser properties are mutually exclusive; you must specify - * one but not both. - * @member {object} [jobSpecification.jobManagerTask.userIdentity.autoUser] The - * userName and autoUser properties are mutually exclusive; you must specify - * one but not both. - * @member {string} - * [jobSpecification.jobManagerTask.userIdentity.autoUser.scope] The default - * value is task. Possible values include: 'task', 'pool' - * @member {string} - * [jobSpecification.jobManagerTask.userIdentity.autoUser.elevationLevel] The - * default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {boolean} [jobSpecification.jobManagerTask.runExclusive] If true, no - * other tasks will run on the same compute node for as long as the Job Manager - * is running. If false, other tasks can run simultaneously with the Job - * Manager on a compute node. The Job Manager task counts normally against the - * node's concurrent task limit, so this is only relevant if the node allows - * multiple concurrent tasks. The default value is true. - * @member {array} - * [jobSpecification.jobManagerTask.applicationPackageReferences] Application - * packages are downloaded and deployed to a shared directory, not the task - * working directory. Therefore, if a referenced package is already on the - * compute node, and is up to date, then it is not re-downloaded; the existing - * copy on the compute node is used. If a referenced application package cannot - * be installed, for example because the package has been deleted or because - * download failed, the task fails. - * @member {object} - * [jobSpecification.jobManagerTask.authenticationTokenSettings] If this - * property is set, the Batch service provides the task with an authentication - * token which can be used to authenticate Batch service operations without - * requiring an account access key. The token is provided via the - * AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations that the - * task can carry out using the token depend on the settings. For example, a - * task can request job permissions in order to add other tasks to the job, or - * check the status of the job or of other tasks under the job. - * @member {array} - * [jobSpecification.jobManagerTask.authenticationTokenSettings.access] The - * authentication token grants access to a limited set of Batch service - * operations. Currently the only supported value for the access property is - * 'job', which grants access to all operations related to the job which - * contains the task. - * @member {boolean} [jobSpecification.jobManagerTask.allowLowPriorityNode] The - * default value is true. - * @member {object} [jobSpecification.jobPreparationTask] If a job has a Job - * Preparation task, the Batch service will run the Job Preparation task on a - * compute node before starting any tasks of that job on that compute node. - * @member {string} [jobSpecification.jobPreparationTask.id] The ID can contain - * any combination of alphanumeric characters including hyphens and underscores - * and cannot contain more than 64 characters. If you do not specify this - * property, the Batch service assigns a default value of 'jobpreparation'. No - * other task in the job can have the same ID as the Job Preparation task. If - * you try to submit a task with the same id, the Batch service rejects the - * request with error code TaskIdSameAsJobPreparationTask; if you are calling - * the REST API directly, the HTTP status code is 409 (Conflict). - * @member {string} [jobSpecification.jobPreparationTask.commandLine] The - * command line does not run under a shell, and therefore cannot take advantage - * of shell features such as environment variable expansion. If you want to - * take advantage of such features, you should invoke the shell in the command - * line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c - * MyCommand" in Linux. If the command line refers to file paths, it should use - * a relative path (relative to the task working directory), or use the Batch - * provided environment variable - * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [jobSpecification.jobPreparationTask.containerSettings] - * When this is specified, all directories recursively below the - * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are - * mapped into the container, all task environment variables are mapped into - * the container, and the task command line is executed in the container. - * @member {string} - * [jobSpecification.jobPreparationTask.containerSettings.containerRunOptions] - * These additional options are supplied as arguments to the "docker create" - * command, in addition to those controlled by the Batch Service. - * @member {string} - * [jobSpecification.jobPreparationTask.containerSettings.imageName] This is - * the full image reference, as would be specified to "docker pull". If no tag - * is provided as part of the image name, the tag ":latest" is used as a - * default. - * @member {object} - * [jobSpecification.jobPreparationTask.containerSettings.registry] This - * setting can be omitted if was already provided at pool creation. - * @member {string} - * [jobSpecification.jobPreparationTask.containerSettings.registry.registryServer] - * If omitted, the default is "docker.io". - * @member {string} - * [jobSpecification.jobPreparationTask.containerSettings.registry.userName] - * @member {string} - * [jobSpecification.jobPreparationTask.containerSettings.registry.password] - * @member {array} [jobSpecification.jobPreparationTask.resourceFiles] Files - * listed under this element are located in the task's working directory. - * There is a maximum size for the list of resource files. When the max size - * is exceeded, the request will fail and the response error code will be - * RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must - * be reduced in size. This can be achieved using .zip files, Application - * Packages, or Docker Containers. - * @member {array} [jobSpecification.jobPreparationTask.environmentSettings] - * @member {object} [jobSpecification.jobPreparationTask.constraints] - * @member {moment.duration} - * [jobSpecification.jobPreparationTask.constraints.maxWallClockTime] If this - * is not specified, there is no time limit on how long the task may run. - * @member {moment.duration} - * [jobSpecification.jobPreparationTask.constraints.retentionTime] The default - * is infinite, i.e. the task directory will be retained until the compute node - * is removed or reimaged. - * @member {number} - * [jobSpecification.jobPreparationTask.constraints.maxTaskRetryCount] Note - * that this value specifically controls the number of retries for the task - * executable due to a nonzero exit code. The Batch service will try the task - * once, and may then retry up to this limit. For example, if the maximum retry - * count is 3, Batch tries the task up to 4 times (one initial try and 3 - * retries). If the maximum retry count is 0, the Batch service does not retry - * the task after the first attempt. If the maximum retry count is -1, the - * Batch service retries the task without limit. Resource files and application - * packages are only downloaded again if the task is retried on a new compute - * node. - * @member {boolean} [jobSpecification.jobPreparationTask.waitForSuccess] If - * true and the Job Preparation task fails on a compute node, the Batch service - * retries the Job Preparation task up to its maximum retry count (as specified - * in the constraints element). If the task has still not completed - * successfully after all retries, then the Batch service will not schedule - * tasks of the job to the compute node. The compute node remains active and - * eligible to run tasks of other jobs. If false, the Batch service will not - * wait for the Job Preparation task to complete. In this case, other tasks of - * the job can start executing on the compute node while the Job Preparation - * task is still running; and even if the Job Preparation task fails, new tasks - * will continue to be scheduled on the node. The default value is true. - * @member {object} [jobSpecification.jobPreparationTask.userIdentity] If - * omitted, the task runs as a non-administrative user unique to the task on - * Windows nodes, or a a non-administrative user unique to the pool on Linux - * nodes. - * @member {string} [jobSpecification.jobPreparationTask.userIdentity.userName] - * The userName and autoUser properties are mutually exclusive; you must - * specify one but not both. - * @member {object} [jobSpecification.jobPreparationTask.userIdentity.autoUser] - * The userName and autoUser properties are mutually exclusive; you must - * specify one but not both. - * @member {string} - * [jobSpecification.jobPreparationTask.userIdentity.autoUser.scope] The - * default value is task. Possible values include: 'task', 'pool' - * @member {string} - * [jobSpecification.jobPreparationTask.userIdentity.autoUser.elevationLevel] - * The default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {boolean} - * [jobSpecification.jobPreparationTask.rerunOnNodeRebootAfterSuccess] The Job - * Preparation task is always rerun if a compute node is reimaged, or if the - * Job Preparation task did not complete (e.g. because the reboot occurred - * while the task was running). Therefore, you should always write a Job - * Preparation task to be idempotent and to behave correctly if run multiple - * times. The default value is true. - * @member {object} [jobSpecification.jobReleaseTask] The primary purpose of - * the Job Release task is to undo changes to compute nodes made by the Job - * Preparation task. Example activities include deleting local files, or - * shutting down services that were started as part of job preparation. A Job - * Release task cannot be specified without also specifying a Job Preparation - * task for the job. The Batch service runs the Job Release task on the compute - * nodes that have run the Job Preparation task. - * @member {string} [jobSpecification.jobReleaseTask.id] The ID can contain any - * combination of alphanumeric characters including hyphens and underscores and - * cannot contain more than 64 characters. If you do not specify this property, - * the Batch service assigns a default value of 'jobrelease'. No other task in - * the job can have the same ID as the Job Release task. If you try to submit a - * task with the same id, the Batch service rejects the request with error code - * TaskIdSameAsJobReleaseTask; if you are calling the REST API directly, the - * HTTP status code is 409 (Conflict). - * @member {string} [jobSpecification.jobReleaseTask.commandLine] The command - * line does not run under a shell, and therefore cannot take advantage of - * shell features such as environment variable expansion. If you want to take - * advantage of such features, you should invoke the shell in the command line, - * for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in - * Linux. If the command line refers to file paths, it should use a relative - * path (relative to the task working directory), or use the Batch provided - * environment variable - * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [jobSpecification.jobReleaseTask.containerSettings] When - * this is specified, all directories recursively below the - * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are - * mapped into the container, all task environment variables are mapped into - * the container, and the task command line is executed in the container. - * @member {string} - * [jobSpecification.jobReleaseTask.containerSettings.containerRunOptions] - * These additional options are supplied as arguments to the "docker create" - * command, in addition to those controlled by the Batch Service. - * @member {string} - * [jobSpecification.jobReleaseTask.containerSettings.imageName] This is the - * full image reference, as would be specified to "docker pull". If no tag is - * provided as part of the image name, the tag ":latest" is used as a default. - * @member {object} - * [jobSpecification.jobReleaseTask.containerSettings.registry] This setting - * can be omitted if was already provided at pool creation. - * @member {string} - * [jobSpecification.jobReleaseTask.containerSettings.registry.registryServer] - * If omitted, the default is "docker.io". - * @member {string} - * [jobSpecification.jobReleaseTask.containerSettings.registry.userName] - * @member {string} - * [jobSpecification.jobReleaseTask.containerSettings.registry.password] - * @member {array} [jobSpecification.jobReleaseTask.resourceFiles] Files listed - * under this element are located in the task's working directory. - * @member {array} [jobSpecification.jobReleaseTask.environmentSettings] - * @member {moment.duration} [jobSpecification.jobReleaseTask.maxWallClockTime] - * @member {moment.duration} [jobSpecification.jobReleaseTask.retentionTime] - * The default is infinite, i.e. the task directory will be retained until the - * compute node is removed or reimaged. - * @member {object} [jobSpecification.jobReleaseTask.userIdentity] If omitted, - * the task runs as a non-administrative user unique to the task. - * @member {string} [jobSpecification.jobReleaseTask.userIdentity.userName] The - * userName and autoUser properties are mutually exclusive; you must specify - * one but not both. - * @member {object} [jobSpecification.jobReleaseTask.userIdentity.autoUser] The - * userName and autoUser properties are mutually exclusive; you must specify - * one but not both. - * @member {string} - * [jobSpecification.jobReleaseTask.userIdentity.autoUser.scope] The default - * value is task. Possible values include: 'task', 'pool' - * @member {string} - * [jobSpecification.jobReleaseTask.userIdentity.autoUser.elevationLevel] The - * default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {array} [jobSpecification.commonEnvironmentSettings] Individual - * tasks can override an environment setting specified here by specifying the - * same setting name with a different value. - * @member {object} [jobSpecification.poolInfo] - * @member {string} [jobSpecification.poolInfo.poolId] You must ensure that the - * pool referenced by this property exists. If the pool does not exist at the - * time the Batch service tries to schedule a job, no tasks for the job will - * run until you create a pool with that id. Note that the Batch service will - * not reject the job request; it will simply not run tasks until the pool - * exists. You must specify either the pool ID or the auto pool specification, - * but not both. - * @member {object} [jobSpecification.poolInfo.autoPoolSpecification] If auto - * pool creation fails, the Batch service moves the job to a completed state, - * and the pool creation error is set in the job's scheduling error property. - * The Batch service manages the lifetime (both creation and, unless keepAlive - * is specified, deletion) of the auto pool. Any user actions that affect the - * lifetime of the auto pool while the job is active will result in unexpected - * behavior. You must specify either the pool ID or the auto pool - * specification, but not both. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.autoPoolIdPrefix] The Batch - * service assigns each auto pool a unique identifier on creation. To - * distinguish between pools created for different purposes, you can specify - * this element to add a prefix to the ID that is assigned. The prefix can be - * up to 20 characters long. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.poolLifetimeOption] - * Possible values include: 'jobSchedule', 'job' - * @member {boolean} - * [jobSpecification.poolInfo.autoPoolSpecification.keepAlive] If false, the - * Batch service deletes the pool once its lifetime (as determined by the - * poolLifetimeOption setting) expires; that is, when the job or job schedule - * completes. If true, the Batch service does not delete the pool - * automatically. It is up to the user to delete auto pools created with this - * option. - * @member {object} [jobSpecification.poolInfo.autoPoolSpecification.pool] - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.displayName] The - * display name need not be unique and can contain any Unicode characters up to - * a maximum length of 1024. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.vmSize] For - * information about available sizes of virtual machines in pools, see Choose a - * VM size for compute nodes in an Azure Batch pool - * (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration] - * This property must be specified if the pool needs to be created with Azure - * PaaS VMs. This property and virtualMachineConfiguration are mutually - * exclusive and one of the properties must be specified. If neither is - * specified then the Batch service returns an error; if you are calling the - * REST API directly, the HTTP status code is 400 (Bad Request). This property - * cannot be specified if the Batch account was created with its - * poolAllocationMode property set to 'UserSubscription'. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osFamily] - * Possible values are: - * 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. - * 3 - OS Family 3, equivalent to Windows Server 2012. - * 4 - OS Family 4, equivalent to Windows Server 2012 R2. - * 5 - OS Family 5, equivalent to Windows Server 2016. For more information, - * see Azure Guest OS Releases - * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] - * The default value is * which specifies the latest operating system version - * for the specified OS family. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.currentOSVersion] - * This may differ from targetOSVersion if the pool state is Upgrading. In this - * case some virtual machines may be on the targetOSVersion and some may be on - * the currentOSVersion during the upgrade process. Once all virtual machines - * have upgraded, currentOSVersion is updated to be the same as - * targetOSVersion. - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration] - * This property must be specified if the pool needs to be created with Azure - * IaaS VMs. This property and cloudServiceConfiguration are mutually exclusive - * and one of the properties must be specified. If neither is specified then - * the Batch service returns an error; if you are calling the REST API - * directly, the HTTP status code is 400 (Bad Request). - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference] - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.publisher] - * For example, Canonical or MicrosoftWindowsServer. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.offer] - * For example, UbuntuServer or WindowsServer. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.sku] - * For example, 14.04.0-LTS or 2012-R2-Datacenter. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.version] - * A value of 'latest' can be specified to select the latest version of an - * image. If omitted, the default is 'latest'. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.virtualMachineImageId] - * This property is mutually exclusive with other ImageReference properties. - * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The default value for caching is readwrite. For information about the - * caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId] - * The Batch node agent is a program that runs on each node in the pool, and - * provides the command-and-control interface between the node and the Batch - * service. There are different implementations of the node agent, known as - * SKUs, for different operating systems. You must specify a node agent SKU - * which matches the selected image reference. To get the list of supported - * node agent SKUs along with their list of verified image references, see the - * 'List supported node agent SKUs' operation. - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] - * This property must not be specified if the imageReference or osDisk property - * specifies a Linux OS image. - * @member {boolean} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] - * If omitted, the default value is true. - * @member {array} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.dataDisks] - * This property must be specified if the compute nodes in the pool need to - * have empty data disks attached to them. This cannot be updated. Each node - * gets its own disk (the disk is not a file share). Existing disks cannot be - * attached, each attached disk is empty. When the node is removed from the - * pool, the disk and all data associated with it is also deleted. The disk is - * not formatted after being attached, it must be formatted before use - for - * more information see - * https://docs.microsoft.com/en-us/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux - * and - * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.licenseType] - * This only applies to images that contain the Windows operating system, and - * should only be used when you hold valid on-premises licenses for the nodes - * which will be deployed. If omitted, no on-premises licensing discount is - * applied. Values are: - * - * Windows_Server - The on-premises license is for Windows Server. - * Windows_Client - The on-premises license is for Windows Client. - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration] - * If specified, setup is performed on each node in the pool to allow tasks to - * run in containers. All regular tasks and job manager tasks run on this pool - * must specify the containerSettings property, and all other tasks may specify - * it. - * @member {array} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration.containerImageNames] - * This is the full image reference, as would be specified to "docker pull". An - * image will be sourced from the default Docker registry unless the image is - * fully qualified with an alternative registry. - * @member {array} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration.containerRegistries] - * If any images must be downloaded from a private registry which requires - * credentials, then those credentials must be provided here. - * @member {number} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.maxTasksPerNode] The - * default value is 1. The maximum value of this setting depends on the size of - * the compute nodes in the pool (the vmSize setting). - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.taskSchedulingPolicy] - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.taskSchedulingPolicy.nodeFillType] - * Possible values include: 'spread', 'pack' - * @member {moment.duration} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.resizeTimeout] This - * timeout applies only to manual scaling; it has no effect when - * enableAutoScale is set to true. The default value is 15 minutes. The minimum - * value is 5 minutes. If you specify a value less than 5 minutes, the Batch - * service rejects the request with an error; if you are calling the REST API - * directly, the HTTP status code is 400 (Bad Request). - * @member {number} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.targetDedicatedNodes] - * This property must not be specified if enableAutoScale is set to true. If - * enableAutoScale is set to false, then you must set either - * targetDedicatedNodes, targetLowPriorityNodes, or both. - * @member {number} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.targetLowPriorityNodes] - * This property must not be specified if enableAutoScale is set to true. If - * enableAutoScale is set to false, then you must set either - * targetDedicatedNodes, targetLowPriorityNodes, or both. - * @member {boolean} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.enableAutoScale] If - * false, at least one of targetDedicateNodes and targetLowPriorityNodes must - * be specified. If true, the autoScaleFormula element is required. The pool - * automatically resizes according to the formula. The default value is false. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.autoScaleFormula] This - * property must not be specified if enableAutoScale is set to false. It is - * required if enableAutoScale is set to true. The formula is checked for - * validity before the pool is created. If the formula is not valid, the Batch - * service rejects the request with detailed error information. - * @member {moment.duration} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.autoScaleEvaluationInterval] - * The default value is 15 minutes. The minimum and maximum value are 5 minutes - * and 168 hours respectively. If you specify a value less than 5 minutes or - * greater than 168 hours, the Batch service rejects the request with an - * invalid property value error; if you are calling the REST API directly, the - * HTTP status code is 400 (Bad Request). - * @member {boolean} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.enableInterNodeCommunication] - * Enabling inter-node communication limits the maximum size of the pool due to - * deployment restrictions on the nodes of the pool. This may result in the - * pool not reaching its desired size. The default value is false. - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration] - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.subnetId] - * The virtual network must be in the same region and subscription as the Azure - * Batch account. The specified subnet should have enough free IP addresses to - * accommodate the number of nodes in the pool. If the subnet doesn't have - * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks - * ('Microsoft.Network/virtualNetworks') are supported, but for pools created - * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] - * Pool endpoint configuration is only supported on pools with the - * virtualMachineConfiguration property. - * @member {array} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration.inboundNATPools] - * The maximum number of inbound NAT pools per Batch pool is 5. If the maximum - * number of inbound NAT pools is exceeded the request fails with HTTP status - * code 400. - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask] - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.commandLine] - * The command line does not run under a shell, and therefore cannot take - * advantage of shell features such as environment variable expansion. If you - * want to take advantage of such features, you should invoke the shell in the - * command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c - * MyCommand" in Linux. If the command line refers to file paths, it should use - * a relative path (relative to the task working directory), or use the Batch - * provided environment variable - * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings] - * When this is specified, all directories recursively below the - * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are - * mapped into the container, all task environment variables are mapped into - * the container, and the task command line is executed in the container. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.containerRunOptions] - * These additional options are supplied as arguments to the "docker create" - * command, in addition to those controlled by the Batch Service. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.imageName] - * This is the full image reference, as would be specified to "docker pull". If - * no tag is provided as part of the image name, the tag ":latest" is used as a - * default. - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry] - * This setting can be omitted if was already provided at pool creation. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.registryServer] - * If omitted, the default is "docker.io". - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.userName] - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.password] - * @member {array} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.resourceFiles] - * Files listed under this element are located in the task's working directory. - * @member {array} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.environmentSettings] - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.userIdentity] - * If omitted, the task runs as a non-administrative user unique to the task. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.userIdentity.userName] - * The userName and autoUser properties are mutually exclusive; you must - * specify one but not both. - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser] - * The userName and autoUser properties are mutually exclusive; you must - * specify one but not both. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser.scope] - * The default value is task. Possible values include: 'task', 'pool' - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser.elevationLevel] - * The default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {number} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.maxTaskRetryCount] - * The Batch service retries a task if its exit code is nonzero. Note that this - * value specifically controls the number of retries. The Batch service will - * try the task once, and may then retry up to this limit. For example, if the - * maximum retry count is 3, Batch tries the task up to 4 times (one initial - * try and 3 retries). If the maximum retry count is 0, the Batch service does - * not retry the task. If the maximum retry count is -1, the Batch service - * retries the task without limit. - * @member {boolean} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.waitForSuccess] - * If true and the start task fails on a compute node, the Batch service - * retries the start task up to its maximum retry count (maxTaskRetryCount). If - * the task has still not completed successfully after all retries, then the - * Batch service marks the compute node unusable, and will not schedule tasks - * to it. This condition can be detected via the node state and failure info - * details. If false, the Batch service will not wait for the start task to - * complete. In this case, other tasks can start executing on the compute node - * while the start task is still running; and even if the start task fails, new - * tasks will continue to be scheduled on the node. The default is false. - * @member {array} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.certificateReferences] - * For Windows compute nodes, the Batch service installs the certificates to - * the specified certificate store and location. For Linux compute nodes, the - * certificates are stored in a directory inside the task working directory and - * an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to - * query for this location. For certificates with visibility of 'remoteUser', a - * 'certs' directory is created in the user's home directory (e.g., - * /home/{user-name}/certs) and certificates are placed in that directory. - * @member {array} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.applicationPackageReferences] - * @member {array} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.applicationLicenses] - * The list of application licenses must be a subset of available Batch service - * application licenses. If a license is requested which is not supported, pool - * creation will fail. The permitted licenses available on the pool are 'maya', - * 'vray', '3dsmax', 'arnold'. An additional charge applies for each - * application license added to the pool. - * @member {array} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.userAccounts] - * @member {array} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.metadata] The Batch - * service does not assign any meaning to metadata; it is solely for the use of - * user code. - * @member {array} [jobSpecification.metadata] The Batch service does not - * assign any meaning to metadata; it is solely for the use of user code. - * @member {array} [metadata] A list of name-value pairs associated with the - * schedule as metadata. The Batch service does not assign any meaning to - * metadata; it is solely for the use of user code. + * @summary A job schedule that allows recurring jobs by specifying when to run jobs and a + * specification used to create each job. */ export interface JobScheduleAddParameter { + /** + * @summary A string that uniquely identifies the schedule within the account. + * @description The ID can contain any combination of alphanumeric characters including hyphens + * and underscores, and cannot contain more than 64 characters. The ID is case-preserving and + * case-insensitive (that is, you may not have two IDs within an account that differ only by + * case). + */ id: string; + /** + * @summary The display name for the schedule. + * @description The display name need not be unique and can contain any Unicode characters up to + * a maximum length of 1024. + */ displayName?: string; + /** + * @summary The schedule according to which jobs will be created. + */ schedule: Schedule; + /** + * @summary The details of the jobs to be created on this schedule. + */ jobSpecification: JobSpecification; + /** + * @summary A list of name-value pairs associated with the schedule as metadata. + * @description The Batch service does not assign any meaning to metadata; it is solely for the + * use of user code. + */ metadata?: MetadataItem[]; } /** - * @class - * Initializes a new instance of the JobSchedulingError class. - * @constructor * @summary An error encountered by the Batch service when scheduling a job. - * - * @member {string} category The category of the job scheduling error. Possible - * values include: 'userError', 'serverError' - * @member {string} [code] An identifier for the job scheduling error. Codes - * are invariant and are intended to be consumed programmatically. - * @member {string} [message] A message describing the job scheduling error, - * intended to be suitable for display in a user interface. - * @member {array} [details] A list of additional error details related to the - * scheduling error. */ export interface JobSchedulingError { + /** + * @summary The category of the job scheduling error. + * @description Possible values include: 'userError', 'serverError' + */ category: string; + /** + * @summary An identifier for the job scheduling error. Codes are invariant and are intended to + * be consumed programmatically. + */ code?: string; + /** + * @summary A message describing the job scheduling error, intended to be suitable for display in + * a user interface. + */ message?: string; + /** + * @summary A list of additional error details related to the scheduling error. + */ details?: NameValuePair[]; } /** - * @class - * Initializes a new instance of the JobExecutionInformation class. - * @constructor - * @summary Contains information about the execution of a job in the Azure - * Batch service. - * - * @member {date} startTime The start time of the job. This is the time at - * which the job was created. - * @member {date} [endTime] The completion time of the job. This property is - * set only if the job is in the completed state. - * @member {string} [poolId] The ID of the pool to which this job is assigned. - * This element contains the actual pool where the job is assigned. When you - * get job details from the service, they also contain a poolInfo element, - * which contains the pool configuration data from when the job was added or - * updated. That poolInfo element may also contain a poolId element. If it - * does, the two IDs are the same. If it does not, it means the job ran on an - * auto pool, and this property contains the ID of that auto pool. - * @member {object} [schedulingError] Details of any error encountered by the - * service in starting the job. This property is not set if there was no error - * starting the job. - * @member {string} [schedulingError.category] Possible values include: - * 'userError', 'serverError' - * @member {string} [schedulingError.code] - * @member {string} [schedulingError.message] - * @member {array} [schedulingError.details] - * @member {string} [terminateReason] A string describing the reason the job - * ended. This property is set only if the job is in the completed state. If - * the Batch service terminates the job, it sets the reason as follows: - * JMComplete - the Job Manager task completed, and killJobOnCompletion was set - * to true. MaxWallClockTimeExpiry - the job reached its maxWallClockTime - * constraint. TerminateJobSchedule - the job ran as part of a schedule, and - * the schedule terminated. AllTasksComplete - the job's onAllTasksComplete - * attribute is set to terminatejob, and all tasks in the job are complete. - * TaskFailed - the job's onTaskFailure attribute is set to - * performExitOptionsJobAction, and a task in the job failed with an exit - * condition that specified a jobAction of terminatejob. Any other string is a - * user-defined reason specified in a call to the 'Terminate a job' operation. + * @summary Contains information about the execution of a job in the Azure Batch service. */ export interface JobExecutionInformation { + /** + * @summary The start time of the job. + * @description This is the time at which the job was created. + */ startTime: Date; + /** + * @summary The completion time of the job. + * @description This property is set only if the job is in the completed state. + */ endTime?: Date; + /** + * @summary The ID of the pool to which this job is assigned. + * @description This element contains the actual pool where the job is assigned. When you get job + * details from the service, they also contain a poolInfo element, which contains the pool + * configuration data from when the job was added or updated. That poolInfo element may also + * contain a poolId element. If it does, the two IDs are the same. If it does not, it means the + * job ran on an auto pool, and this property contains the ID of that auto pool. + */ poolId?: string; + /** + * @summary Details of any error encountered by the service in starting the job. + * @description This property is not set if there was no error starting the job. + */ schedulingError?: JobSchedulingError; + /** + * @summary A string describing the reason the job ended. + * @description This property is set only if the job is in the completed state. If the Batch + * service terminates the job, it sets the reason as follows: JMComplete - the Job Manager task + * completed, and killJobOnCompletion was set to true. MaxWallClockTimeExpiry - the job reached + * its maxWallClockTime constraint. TerminateJobSchedule - the job ran as part of a schedule, and + * the schedule terminated. AllTasksComplete - the job's onAllTasksComplete attribute is set to + * terminatejob, and all tasks in the job are complete. TaskFailed - the job's onTaskFailure + * attribute is set to performExitOptionsJobAction, and a task in the job failed with an exit + * condition that specified a jobAction of terminatejob. Any other string is a user-defined + * reason specified in a call to the 'Terminate a job' operation. + */ terminateReason?: string; } /** - * @class - * Initializes a new instance of the CloudJob class. - * @constructor * @summary An Azure Batch job. - * - * @member {string} [id] A string that uniquely identifies the job within the - * account. The ID is case-preserving and case-insensitive (that is, you may - * not have two IDs within an account that differ only by case). - * @member {string} [displayName] The display name for the job. - * @member {boolean} [usesTaskDependencies] Whether tasks in the job can define - * dependencies on each other. The default is false. - * @member {string} [url] The URL of the job. - * @member {string} [eTag] The ETag of the job. This is an opaque string. You - * can use it to detect whether the job has changed between requests. In - * particular, you can be pass the ETag when updating a job to specify that - * your changes should take effect only if nobody else has modified the job in - * the meantime. - * @member {date} [lastModified] The last modified time of the job. This is the - * last time at which the job level data, such as the job state or priority, - * changed. It does not factor in task-level changes such as adding new tasks - * or tasks changing state. - * @member {date} [creationTime] The creation time of the job. - * @member {string} [state] The current state of the job. Possible values - * include: 'active', 'disabling', 'disabled', 'enabling', 'terminating', - * 'completed', 'deleting' - * @member {date} [stateTransitionTime] The time at which the job entered its - * current state. - * @member {string} [previousState] The previous state of the job. This - * property is not set if the job is in its initial Active state. Possible - * values include: 'active', 'disabling', 'disabled', 'enabling', - * 'terminating', 'completed', 'deleting' - * @member {date} [previousStateTransitionTime] The time at which the job - * entered its previous state. This property is not set if the job is in its - * initial Active state. - * @member {number} [priority] The priority of the job. Priority values can - * range from -1000 to 1000, with -1000 being the lowest priority and 1000 - * being the highest priority. The default value is 0. - * @member {object} [constraints] The execution constraints for the job. - * @member {moment.duration} [constraints.maxWallClockTime] If the job does not - * complete within the time limit, the Batch service terminates it and any - * tasks that are still running. In this case, the termination reason will be - * MaxWallClockTimeExpiry. If this property is not specified, there is no time - * limit on how long the job may run. - * @member {number} [constraints.maxTaskRetryCount] Note that this value - * specifically controls the number of retries. The Batch service will try each - * task once, and may then retry up to this limit. For example, if the maximum - * retry count is 3, Batch tries a task up to 4 times (one initial try and 3 - * retries). If the maximum retry count is 0, the Batch service does not retry - * tasks. If the maximum retry count is -1, the Batch service retries tasks - * without limit. The default value is 0 (no retries). - * @member {object} [jobManagerTask] Details of a Job Manager task to be - * launched when the job is started. - * @member {string} [jobManagerTask.id] The ID can contain any combination of - * alphanumeric characters including hyphens and underscores and cannot contain - * more than 64 characters. - * @member {string} [jobManagerTask.displayName] It need not be unique and can - * contain any Unicode characters up to a maximum length of 1024. - * @member {string} [jobManagerTask.commandLine] The command line does not run - * under a shell, and therefore cannot take advantage of shell features such as - * environment variable expansion. If you want to take advantage of such - * features, you should invoke the shell in the command line, for example using - * "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the - * command line refers to file paths, it should use a relative path (relative - * to the task working directory), or use the Batch provided environment - * variable - * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [jobManagerTask.containerSettings] If the pool that will - * run this task has containerConfiguration set, this must be set as well. If - * the pool that will run this task doesn't have containerConfiguration set, - * this must not be set. When this is specified, all directories recursively - * below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the - * node) are mapped into the container, all task environment variables are - * mapped into the container, and the task command line is executed in the - * container. - * @member {string} [jobManagerTask.containerSettings.containerRunOptions] - * These additional options are supplied as arguments to the "docker create" - * command, in addition to those controlled by the Batch Service. - * @member {string} [jobManagerTask.containerSettings.imageName] This is the - * full image reference, as would be specified to "docker pull". If no tag is - * provided as part of the image name, the tag ":latest" is used as a default. - * @member {object} [jobManagerTask.containerSettings.registry] This setting - * can be omitted if was already provided at pool creation. - * @member {string} [jobManagerTask.containerSettings.registry.registryServer] - * If omitted, the default is "docker.io". - * @member {string} [jobManagerTask.containerSettings.registry.userName] - * @member {string} [jobManagerTask.containerSettings.registry.password] - * @member {array} [jobManagerTask.resourceFiles] Files listed under this - * element are located in the task's working directory. There is a maximum size - * for the list of resource files. When the max size is exceeded, the request - * will fail and the response error code will be RequestEntityTooLarge. If this - * occurs, the collection of ResourceFiles must be reduced in size. This can be - * achieved using .zip files, Application Packages, or Docker Containers. - * @member {array} [jobManagerTask.outputFiles] For multi-instance tasks, the - * files will only be uploaded from the compute node on which the primary task - * is executed. - * @member {array} [jobManagerTask.environmentSettings] - * @member {object} [jobManagerTask.constraints] - * @member {moment.duration} [jobManagerTask.constraints.maxWallClockTime] If - * this is not specified, there is no time limit on how long the task may run. - * @member {moment.duration} [jobManagerTask.constraints.retentionTime] The - * default is infinite, i.e. the task directory will be retained until the - * compute node is removed or reimaged. - * @member {number} [jobManagerTask.constraints.maxTaskRetryCount] Note that - * this value specifically controls the number of retries for the task - * executable due to a nonzero exit code. The Batch service will try the task - * once, and may then retry up to this limit. For example, if the maximum retry - * count is 3, Batch tries the task up to 4 times (one initial try and 3 - * retries). If the maximum retry count is 0, the Batch service does not retry - * the task after the first attempt. If the maximum retry count is -1, the - * Batch service retries the task without limit. Resource files and application - * packages are only downloaded again if the task is retried on a new compute - * node. - * @member {boolean} [jobManagerTask.killJobOnCompletion] If true, when the Job - * Manager task completes, the Batch service marks the job as complete. If any - * tasks are still running at this time (other than Job Release), those tasks - * are terminated. If false, the completion of the Job Manager task does not - * affect the job status. In this case, you should either use the - * onAllTasksComplete attribute to terminate the job, or have a client or user - * terminate the job explicitly. An example of this is if the Job Manager - * creates a set of tasks but then takes no further role in their execution. - * The default value is true. If you are using the onAllTasksComplete and - * onTaskFailure attributes to control job lifetime, and using the Job Manager - * task only to create the tasks for the job (not to monitor progress), then it - * is important to set killJobOnCompletion to false. - * @member {object} [jobManagerTask.userIdentity] If omitted, the task runs as - * a non-administrative user unique to the task. - * @member {string} [jobManagerTask.userIdentity.userName] The userName and - * autoUser properties are mutually exclusive; you must specify one but not - * both. - * @member {object} [jobManagerTask.userIdentity.autoUser] The userName and - * autoUser properties are mutually exclusive; you must specify one but not - * both. - * @member {string} [jobManagerTask.userIdentity.autoUser.scope] The default - * value is task. Possible values include: 'task', 'pool' - * @member {string} [jobManagerTask.userIdentity.autoUser.elevationLevel] The - * default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {boolean} [jobManagerTask.runExclusive] If true, no other tasks will - * run on the same compute node for as long as the Job Manager is running. If - * false, other tasks can run simultaneously with the Job Manager on a compute - * node. The Job Manager task counts normally against the node's concurrent - * task limit, so this is only relevant if the node allows multiple concurrent - * tasks. The default value is true. - * @member {array} [jobManagerTask.applicationPackageReferences] Application - * packages are downloaded and deployed to a shared directory, not the task - * working directory. Therefore, if a referenced package is already on the - * compute node, and is up to date, then it is not re-downloaded; the existing - * copy on the compute node is used. If a referenced application package cannot - * be installed, for example because the package has been deleted or because - * download failed, the task fails. - * @member {object} [jobManagerTask.authenticationTokenSettings] If this - * property is set, the Batch service provides the task with an authentication - * token which can be used to authenticate Batch service operations without - * requiring an account access key. The token is provided via the - * AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations that the - * task can carry out using the token depend on the settings. For example, a - * task can request job permissions in order to add other tasks to the job, or - * check the status of the job or of other tasks under the job. - * @member {array} [jobManagerTask.authenticationTokenSettings.access] The - * authentication token grants access to a limited set of Batch service - * operations. Currently the only supported value for the access property is - * 'job', which grants access to all operations related to the job which - * contains the task. - * @member {boolean} [jobManagerTask.allowLowPriorityNode] The default value is - * true. - * @member {object} [jobPreparationTask] The Job Preparation task. The Job - * Preparation task is a special task run on each node before any other task of - * the job. - * @member {string} [jobPreparationTask.id] The ID can contain any combination - * of alphanumeric characters including hyphens and underscores and cannot - * contain more than 64 characters. If you do not specify this property, the - * Batch service assigns a default value of 'jobpreparation'. No other task in - * the job can have the same ID as the Job Preparation task. If you try to - * submit a task with the same id, the Batch service rejects the request with - * error code TaskIdSameAsJobPreparationTask; if you are calling the REST API - * directly, the HTTP status code is 409 (Conflict). - * @member {string} [jobPreparationTask.commandLine] The command line does not - * run under a shell, and therefore cannot take advantage of shell features - * such as environment variable expansion. If you want to take advantage of - * such features, you should invoke the shell in the command line, for example - * using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If - * the command line refers to file paths, it should use a relative path - * (relative to the task working directory), or use the Batch provided - * environment variable - * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [jobPreparationTask.containerSettings] When this is - * specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the - * root of Azure Batch directories on the node) are mapped into the container, - * all task environment variables are mapped into the container, and the task - * command line is executed in the container. - * @member {string} [jobPreparationTask.containerSettings.containerRunOptions] - * These additional options are supplied as arguments to the "docker create" - * command, in addition to those controlled by the Batch Service. - * @member {string} [jobPreparationTask.containerSettings.imageName] This is - * the full image reference, as would be specified to "docker pull". If no tag - * is provided as part of the image name, the tag ":latest" is used as a - * default. - * @member {object} [jobPreparationTask.containerSettings.registry] This - * setting can be omitted if was already provided at pool creation. - * @member {string} - * [jobPreparationTask.containerSettings.registry.registryServer] If omitted, - * the default is "docker.io". - * @member {string} [jobPreparationTask.containerSettings.registry.userName] - * @member {string} [jobPreparationTask.containerSettings.registry.password] - * @member {array} [jobPreparationTask.resourceFiles] Files listed under this - * element are located in the task's working directory. There is a maximum - * size for the list of resource files. When the max size is exceeded, the - * request will fail and the response error code will be RequestEntityTooLarge. - * If this occurs, the collection of ResourceFiles must be reduced in size. - * This can be achieved using .zip files, Application Packages, or Docker - * Containers. - * @member {array} [jobPreparationTask.environmentSettings] - * @member {object} [jobPreparationTask.constraints] - * @member {moment.duration} [jobPreparationTask.constraints.maxWallClockTime] - * If this is not specified, there is no time limit on how long the task may - * run. - * @member {moment.duration} [jobPreparationTask.constraints.retentionTime] The - * default is infinite, i.e. the task directory will be retained until the - * compute node is removed or reimaged. - * @member {number} [jobPreparationTask.constraints.maxTaskRetryCount] Note - * that this value specifically controls the number of retries for the task - * executable due to a nonzero exit code. The Batch service will try the task - * once, and may then retry up to this limit. For example, if the maximum retry - * count is 3, Batch tries the task up to 4 times (one initial try and 3 - * retries). If the maximum retry count is 0, the Batch service does not retry - * the task after the first attempt. If the maximum retry count is -1, the - * Batch service retries the task without limit. Resource files and application - * packages are only downloaded again if the task is retried on a new compute - * node. - * @member {boolean} [jobPreparationTask.waitForSuccess] If true and the Job - * Preparation task fails on a compute node, the Batch service retries the Job - * Preparation task up to its maximum retry count (as specified in the - * constraints element). If the task has still not completed successfully after - * all retries, then the Batch service will not schedule tasks of the job to - * the compute node. The compute node remains active and eligible to run tasks - * of other jobs. If false, the Batch service will not wait for the Job - * Preparation task to complete. In this case, other tasks of the job can start - * executing on the compute node while the Job Preparation task is still - * running; and even if the Job Preparation task fails, new tasks will continue - * to be scheduled on the node. The default value is true. - * @member {object} [jobPreparationTask.userIdentity] If omitted, the task runs - * as a non-administrative user unique to the task on Windows nodes, or a a - * non-administrative user unique to the pool on Linux nodes. - * @member {string} [jobPreparationTask.userIdentity.userName] The userName and - * autoUser properties are mutually exclusive; you must specify one but not - * both. - * @member {object} [jobPreparationTask.userIdentity.autoUser] The userName and - * autoUser properties are mutually exclusive; you must specify one but not - * both. - * @member {string} [jobPreparationTask.userIdentity.autoUser.scope] The - * default value is task. Possible values include: 'task', 'pool' - * @member {string} [jobPreparationTask.userIdentity.autoUser.elevationLevel] - * The default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {boolean} [jobPreparationTask.rerunOnNodeRebootAfterSuccess] The Job - * Preparation task is always rerun if a compute node is reimaged, or if the - * Job Preparation task did not complete (e.g. because the reboot occurred - * while the task was running). Therefore, you should always write a Job - * Preparation task to be idempotent and to behave correctly if run multiple - * times. The default value is true. - * @member {object} [jobReleaseTask] The Job Release task. The Job Release task - * is a special task run at the end of the job on each node that has run any - * other task of the job. - * @member {string} [jobReleaseTask.id] The ID can contain any combination of - * alphanumeric characters including hyphens and underscores and cannot contain - * more than 64 characters. If you do not specify this property, the Batch - * service assigns a default value of 'jobrelease'. No other task in the job - * can have the same ID as the Job Release task. If you try to submit a task - * with the same id, the Batch service rejects the request with error code - * TaskIdSameAsJobReleaseTask; if you are calling the REST API directly, the - * HTTP status code is 409 (Conflict). - * @member {string} [jobReleaseTask.commandLine] The command line does not run - * under a shell, and therefore cannot take advantage of shell features such as - * environment variable expansion. If you want to take advantage of such - * features, you should invoke the shell in the command line, for example using - * "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the - * command line refers to file paths, it should use a relative path (relative - * to the task working directory), or use the Batch provided environment - * variable - * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [jobReleaseTask.containerSettings] When this is specified, - * all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of - * Azure Batch directories on the node) are mapped into the container, all task - * environment variables are mapped into the container, and the task command - * line is executed in the container. - * @member {string} [jobReleaseTask.containerSettings.containerRunOptions] - * These additional options are supplied as arguments to the "docker create" - * command, in addition to those controlled by the Batch Service. - * @member {string} [jobReleaseTask.containerSettings.imageName] This is the - * full image reference, as would be specified to "docker pull". If no tag is - * provided as part of the image name, the tag ":latest" is used as a default. - * @member {object} [jobReleaseTask.containerSettings.registry] This setting - * can be omitted if was already provided at pool creation. - * @member {string} [jobReleaseTask.containerSettings.registry.registryServer] - * If omitted, the default is "docker.io". - * @member {string} [jobReleaseTask.containerSettings.registry.userName] - * @member {string} [jobReleaseTask.containerSettings.registry.password] - * @member {array} [jobReleaseTask.resourceFiles] Files listed under this - * element are located in the task's working directory. - * @member {array} [jobReleaseTask.environmentSettings] - * @member {moment.duration} [jobReleaseTask.maxWallClockTime] - * @member {moment.duration} [jobReleaseTask.retentionTime] The default is - * infinite, i.e. the task directory will be retained until the compute node is - * removed or reimaged. - * @member {object} [jobReleaseTask.userIdentity] If omitted, the task runs as - * a non-administrative user unique to the task. - * @member {string} [jobReleaseTask.userIdentity.userName] The userName and - * autoUser properties are mutually exclusive; you must specify one but not - * both. - * @member {object} [jobReleaseTask.userIdentity.autoUser] The userName and - * autoUser properties are mutually exclusive; you must specify one but not - * both. - * @member {string} [jobReleaseTask.userIdentity.autoUser.scope] The default - * value is task. Possible values include: 'task', 'pool' - * @member {string} [jobReleaseTask.userIdentity.autoUser.elevationLevel] The - * default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {array} [commonEnvironmentSettings] The list of common environment - * variable settings. These environment variables are set for all tasks in the - * job (including the Job Manager, Job Preparation and Job Release tasks). - * Individual tasks can override an environment setting specified here by - * specifying the same setting name with a different value. - * @member {object} [poolInfo] The pool settings associated with the job. - * @member {string} [poolInfo.poolId] You must ensure that the pool referenced - * by this property exists. If the pool does not exist at the time the Batch - * service tries to schedule a job, no tasks for the job will run until you - * create a pool with that id. Note that the Batch service will not reject the - * job request; it will simply not run tasks until the pool exists. You must - * specify either the pool ID or the auto pool specification, but not both. - * @member {object} [poolInfo.autoPoolSpecification] If auto pool creation - * fails, the Batch service moves the job to a completed state, and the pool - * creation error is set in the job's scheduling error property. The Batch - * service manages the lifetime (both creation and, unless keepAlive is - * specified, deletion) of the auto pool. Any user actions that affect the - * lifetime of the auto pool while the job is active will result in unexpected - * behavior. You must specify either the pool ID or the auto pool - * specification, but not both. - * @member {string} [poolInfo.autoPoolSpecification.autoPoolIdPrefix] The Batch - * service assigns each auto pool a unique identifier on creation. To - * distinguish between pools created for different purposes, you can specify - * this element to add a prefix to the ID that is assigned. The prefix can be - * up to 20 characters long. - * @member {string} [poolInfo.autoPoolSpecification.poolLifetimeOption] - * Possible values include: 'jobSchedule', 'job' - * @member {boolean} [poolInfo.autoPoolSpecification.keepAlive] If false, the - * Batch service deletes the pool once its lifetime (as determined by the - * poolLifetimeOption setting) expires; that is, when the job or job schedule - * completes. If true, the Batch service does not delete the pool - * automatically. It is up to the user to delete auto pools created with this - * option. - * @member {object} [poolInfo.autoPoolSpecification.pool] - * @member {string} [poolInfo.autoPoolSpecification.pool.displayName] The - * display name need not be unique and can contain any Unicode characters up to - * a maximum length of 1024. - * @member {string} [poolInfo.autoPoolSpecification.pool.vmSize] For - * information about available sizes of virtual machines in pools, see Choose a - * VM size for compute nodes in an Azure Batch pool - * (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). - * @member {object} - * [poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration] This - * property must be specified if the pool needs to be created with Azure PaaS - * VMs. This property and virtualMachineConfiguration are mutually exclusive - * and one of the properties must be specified. If neither is specified then - * the Batch service returns an error; if you are calling the REST API - * directly, the HTTP status code is 400 (Bad Request). This property cannot be - * specified if the Batch account was created with its poolAllocationMode - * property set to 'UserSubscription'. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osFamily] - * Possible values are: - * 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. - * 3 - OS Family 3, equivalent to Windows Server 2012. - * 4 - OS Family 4, equivalent to Windows Server 2012 R2. - * 5 - OS Family 5, equivalent to Windows Server 2016. For more information, - * see Azure Guest OS Releases - * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). - * @member {string} - * [poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] - * The default value is * which specifies the latest operating system version - * for the specified OS family. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.currentOSVersion] - * This may differ from targetOSVersion if the pool state is Upgrading. In this - * case some virtual machines may be on the targetOSVersion and some may be on - * the currentOSVersion during the upgrade process. Once all virtual machines - * have upgraded, currentOSVersion is updated to be the same as - * targetOSVersion. - * @member {object} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration] This - * property must be specified if the pool needs to be created with Azure IaaS - * VMs. This property and cloudServiceConfiguration are mutually exclusive and - * one of the properties must be specified. If neither is specified then the - * Batch service returns an error; if you are calling the REST API directly, - * the HTTP status code is 400 (Bad Request). - * @member {object} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference] - * @member {string} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.publisher] - * For example, Canonical or MicrosoftWindowsServer. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.offer] - * For example, UbuntuServer or WindowsServer. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.sku] - * For example, 14.04.0-LTS or 2012-R2-Datacenter. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.version] - * A value of 'latest' can be specified to select the latest version of an - * image. If omitted, the default is 'latest'. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.virtualMachineImageId] - * This property is mutually exclusive with other ImageReference properties. - * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * @member {object} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * @member {string} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The default value for caching is readwrite. For information about the - * caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' - * @member {string} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId] - * The Batch node agent is a program that runs on each node in the pool, and - * provides the command-and-control interface between the node and the Batch - * service. There are different implementations of the node agent, known as - * SKUs, for different operating systems. You must specify a node agent SKU - * which matches the selected image reference. To get the list of supported - * node agent SKUs along with their list of verified image references, see the - * 'List supported node agent SKUs' operation. - * @member {object} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] - * This property must not be specified if the imageReference or osDisk property - * specifies a Linux OS image. - * @member {boolean} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] - * If omitted, the default value is true. - * @member {array} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.dataDisks] - * This property must be specified if the compute nodes in the pool need to - * have empty data disks attached to them. This cannot be updated. Each node - * gets its own disk (the disk is not a file share). Existing disks cannot be - * attached, each attached disk is empty. When the node is removed from the - * pool, the disk and all data associated with it is also deleted. The disk is - * not formatted after being attached, it must be formatted before use - for - * more information see - * https://docs.microsoft.com/en-us/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux - * and - * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.licenseType] - * This only applies to images that contain the Windows operating system, and - * should only be used when you hold valid on-premises licenses for the nodes - * which will be deployed. If omitted, no on-premises licensing discount is - * applied. Values are: - * - * Windows_Server - The on-premises license is for Windows Server. - * Windows_Client - The on-premises license is for Windows Client. - * @member {object} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration] - * If specified, setup is performed on each node in the pool to allow tasks to - * run in containers. All regular tasks and job manager tasks run on this pool - * must specify the containerSettings property, and all other tasks may specify - * it. - * @member {array} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration.containerImageNames] - * This is the full image reference, as would be specified to "docker pull". An - * image will be sourced from the default Docker registry unless the image is - * fully qualified with an alternative registry. - * @member {array} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration.containerRegistries] - * If any images must be downloaded from a private registry which requires - * credentials, then those credentials must be provided here. - * @member {number} [poolInfo.autoPoolSpecification.pool.maxTasksPerNode] The - * default value is 1. The maximum value of this setting depends on the size of - * the compute nodes in the pool (the vmSize setting). - * @member {object} [poolInfo.autoPoolSpecification.pool.taskSchedulingPolicy] - * @member {string} - * [poolInfo.autoPoolSpecification.pool.taskSchedulingPolicy.nodeFillType] - * Possible values include: 'spread', 'pack' - * @member {moment.duration} - * [poolInfo.autoPoolSpecification.pool.resizeTimeout] This timeout applies - * only to manual scaling; it has no effect when enableAutoScale is set to - * true. The default value is 15 minutes. The minimum value is 5 minutes. If - * you specify a value less than 5 minutes, the Batch service rejects the - * request with an error; if you are calling the REST API directly, the HTTP - * status code is 400 (Bad Request). - * @member {number} [poolInfo.autoPoolSpecification.pool.targetDedicatedNodes] - * This property must not be specified if enableAutoScale is set to true. If - * enableAutoScale is set to false, then you must set either - * targetDedicatedNodes, targetLowPriorityNodes, or both. - * @member {number} - * [poolInfo.autoPoolSpecification.pool.targetLowPriorityNodes] This property - * must not be specified if enableAutoScale is set to true. If enableAutoScale - * is set to false, then you must set either targetDedicatedNodes, - * targetLowPriorityNodes, or both. - * @member {boolean} [poolInfo.autoPoolSpecification.pool.enableAutoScale] If - * false, at least one of targetDedicateNodes and targetLowPriorityNodes must - * be specified. If true, the autoScaleFormula element is required. The pool - * automatically resizes according to the formula. The default value is false. - * @member {string} [poolInfo.autoPoolSpecification.pool.autoScaleFormula] This - * property must not be specified if enableAutoScale is set to false. It is - * required if enableAutoScale is set to true. The formula is checked for - * validity before the pool is created. If the formula is not valid, the Batch - * service rejects the request with detailed error information. - * @member {moment.duration} - * [poolInfo.autoPoolSpecification.pool.autoScaleEvaluationInterval] The - * default value is 15 minutes. The minimum and maximum value are 5 minutes and - * 168 hours respectively. If you specify a value less than 5 minutes or - * greater than 168 hours, the Batch service rejects the request with an - * invalid property value error; if you are calling the REST API directly, the - * HTTP status code is 400 (Bad Request). - * @member {boolean} - * [poolInfo.autoPoolSpecification.pool.enableInterNodeCommunication] Enabling - * inter-node communication limits the maximum size of the pool due to - * deployment restrictions on the nodes of the pool. This may result in the - * pool not reaching its desired size. The default value is false. - * @member {object} [poolInfo.autoPoolSpecification.pool.networkConfiguration] - * @member {string} - * [poolInfo.autoPoolSpecification.pool.networkConfiguration.subnetId] The - * virtual network must be in the same region and subscription as the Azure - * Batch account. The specified subnet should have enough free IP addresses to - * accommodate the number of nodes in the pool. If the subnet doesn't have - * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks - * ('Microsoft.Network/virtualNetworks') are supported, but for pools created - * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration - * @member {object} - * [poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] - * Pool endpoint configuration is only supported on pools with the - * virtualMachineConfiguration property. - * @member {array} - * [poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration.inboundNATPools] - * The maximum number of inbound NAT pools per Batch pool is 5. If the maximum - * number of inbound NAT pools is exceeded the request fails with HTTP status - * code 400. - * @member {object} [poolInfo.autoPoolSpecification.pool.startTask] - * @member {string} [poolInfo.autoPoolSpecification.pool.startTask.commandLine] - * The command line does not run under a shell, and therefore cannot take - * advantage of shell features such as environment variable expansion. If you - * want to take advantage of such features, you should invoke the shell in the - * command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c - * MyCommand" in Linux. If the command line refers to file paths, it should use - * a relative path (relative to the task working directory), or use the Batch - * provided environment variable - * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} - * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings] When this - * is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR - * (the root of Azure Batch directories on the node) are mapped into the - * container, all task environment variables are mapped into the container, and - * the task command line is executed in the container. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.containerRunOptions] - * These additional options are supplied as arguments to the "docker create" - * command, in addition to those controlled by the Batch Service. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.imageName] - * This is the full image reference, as would be specified to "docker pull". If - * no tag is provided as part of the image name, the tag ":latest" is used as a - * default. - * @member {object} - * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry] - * This setting can be omitted if was already provided at pool creation. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.registryServer] - * If omitted, the default is "docker.io". - * @member {string} - * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.userName] - * @member {string} - * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.password] - * @member {array} - * [poolInfo.autoPoolSpecification.pool.startTask.resourceFiles] Files listed - * under this element are located in the task's working directory. - * @member {array} - * [poolInfo.autoPoolSpecification.pool.startTask.environmentSettings] - * @member {object} - * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity] If omitted, the - * task runs as a non-administrative user unique to the task. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity.userName] The - * userName and autoUser properties are mutually exclusive; you must specify - * one but not both. - * @member {object} - * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser] The - * userName and autoUser properties are mutually exclusive; you must specify - * one but not both. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser.scope] - * The default value is task. Possible values include: 'task', 'pool' - * @member {string} - * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser.elevationLevel] - * The default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {number} - * [poolInfo.autoPoolSpecification.pool.startTask.maxTaskRetryCount] The Batch - * service retries a task if its exit code is nonzero. Note that this value - * specifically controls the number of retries. The Batch service will try the - * task once, and may then retry up to this limit. For example, if the maximum - * retry count is 3, Batch tries the task up to 4 times (one initial try and 3 - * retries). If the maximum retry count is 0, the Batch service does not retry - * the task. If the maximum retry count is -1, the Batch service retries the - * task without limit. - * @member {boolean} - * [poolInfo.autoPoolSpecification.pool.startTask.waitForSuccess] If true and - * the start task fails on a compute node, the Batch service retries the start - * task up to its maximum retry count (maxTaskRetryCount). If the task has - * still not completed successfully after all retries, then the Batch service - * marks the compute node unusable, and will not schedule tasks to it. This - * condition can be detected via the node state and failure info details. If - * false, the Batch service will not wait for the start task to complete. In - * this case, other tasks can start executing on the compute node while the - * start task is still running; and even if the start task fails, new tasks - * will continue to be scheduled on the node. The default is false. - * @member {array} [poolInfo.autoPoolSpecification.pool.certificateReferences] - * For Windows compute nodes, the Batch service installs the certificates to - * the specified certificate store and location. For Linux compute nodes, the - * certificates are stored in a directory inside the task working directory and - * an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to - * query for this location. For certificates with visibility of 'remoteUser', a - * 'certs' directory is created in the user's home directory (e.g., - * /home/{user-name}/certs) and certificates are placed in that directory. - * @member {array} - * [poolInfo.autoPoolSpecification.pool.applicationPackageReferences] - * @member {array} [poolInfo.autoPoolSpecification.pool.applicationLicenses] - * The list of application licenses must be a subset of available Batch service - * application licenses. If a license is requested which is not supported, pool - * creation will fail. The permitted licenses available on the pool are 'maya', - * 'vray', '3dsmax', 'arnold'. An additional charge applies for each - * application license added to the pool. - * @member {array} [poolInfo.autoPoolSpecification.pool.userAccounts] - * @member {array} [poolInfo.autoPoolSpecification.pool.metadata] The Batch - * service does not assign any meaning to metadata; it is solely for the use of - * user code. - * @member {string} [onAllTasksComplete] The action the Batch service should - * take when all tasks in the job are in the completed state. The default is - * noaction. Possible values include: 'noAction', 'terminateJob' - * @member {string} [onTaskFailure] The action the Batch service should take - * when any task in the job fails. A task is considered to have failed if has a - * failureInfo. A failureInfo is set if the task completes with a non-zero exit - * code after exhausting its retry count, or if there was an error starting the - * task, for example due to a resource file download error. The default is - * noaction. Possible values include: 'noAction', 'performExitOptionsJobAction' - * @member {array} [metadata] A list of name-value pairs associated with the - * job as metadata. The Batch service does not assign any meaning to metadata; - * it is solely for the use of user code. - * @member {object} [executionInfo] The execution information for the job. - * @member {date} [executionInfo.startTime] This is the time at which the job - * was created. - * @member {date} [executionInfo.endTime] This property is set only if the job - * is in the completed state. - * @member {string} [executionInfo.poolId] This element contains the actual - * pool where the job is assigned. When you get job details from the service, - * they also contain a poolInfo element, which contains the pool configuration - * data from when the job was added or updated. That poolInfo element may also - * contain a poolId element. If it does, the two IDs are the same. If it does - * not, it means the job ran on an auto pool, and this property contains the ID - * of that auto pool. - * @member {object} [executionInfo.schedulingError] This property is not set if - * there was no error starting the job. - * @member {string} [executionInfo.schedulingError.category] Possible values - * include: 'userError', 'serverError' - * @member {string} [executionInfo.schedulingError.code] - * @member {string} [executionInfo.schedulingError.message] - * @member {array} [executionInfo.schedulingError.details] - * @member {string} [executionInfo.terminateReason] This property is set only - * if the job is in the completed state. If the Batch service terminates the - * job, it sets the reason as follows: JMComplete - the Job Manager task - * completed, and killJobOnCompletion was set to true. MaxWallClockTimeExpiry - - * the job reached its maxWallClockTime constraint. TerminateJobSchedule - the - * job ran as part of a schedule, and the schedule terminated. AllTasksComplete - * - the job's onAllTasksComplete attribute is set to terminatejob, and all - * tasks in the job are complete. TaskFailed - the job's onTaskFailure - * attribute is set to performExitOptionsJobAction, and a task in the job - * failed with an exit condition that specified a jobAction of terminatejob. - * Any other string is a user-defined reason specified in a call to the - * 'Terminate a job' operation. - * @member {object} [stats] Resource usage statistics for the entire lifetime - * of the job. The statistics may not be immediately available. The Batch - * service performs periodic roll-up of statistics. The typical delay is about - * 30 minutes. - * @member {string} [stats.url] - * @member {date} [stats.startTime] - * @member {date} [stats.lastUpdateTime] - * @member {moment.duration} [stats.userCPUTime] - * @member {moment.duration} [stats.kernelCPUTime] - * @member {moment.duration} [stats.wallClockTime] The wall clock time is the - * elapsed time from when the task started running on a compute node to when it - * finished (or to the last time the statistics were updated, if the task had - * not finished by then). If a task was retried, this includes the wall clock - * time of all the task retries. - * @member {number} [stats.readIOps] - * @member {number} [stats.writeIOps] - * @member {number} [stats.readIOGiB] - * @member {number} [stats.writeIOGiB] - * @member {number} [stats.numSucceededTasks] A task completes successfully if - * it returns exit code 0. - * @member {number} [stats.numFailedTasks] A task fails if it exhausts its - * maximum retry count without returning exit code 0. - * @member {number} [stats.numTaskRetries] - * @member {moment.duration} [stats.waitTime] The wait time for a task is - * defined as the elapsed time between the creation of the task and the start - * of task execution. (If the task is retried due to failures, the wait time is - * the time to the most recent task execution.) This value is only reported in - * the account lifetime statistics; it is not included in the job statistics. */ export interface CloudJob { + /** + * @summary A string that uniquely identifies the job within the account. + * @description The ID is case-preserving and case-insensitive (that is, you may not have two IDs + * within an account that differ only by case). + */ id?: string; + /** + * @summary The display name for the job. + */ displayName?: string; + /** + * @summary Whether tasks in the job can define dependencies on each other. The default is false. + */ usesTaskDependencies?: boolean; + /** + * @summary The URL of the job. + */ url?: string; + /** + * @summary The ETag of the job. + * @description This is an opaque string. You can use it to detect whether the job has changed + * between requests. In particular, you can be pass the ETag when updating a job to specify that + * your changes should take effect only if nobody else has modified the job in the meantime. + */ eTag?: string; + /** + * @summary The last modified time of the job. + * @description This is the last time at which the job level data, such as the job state or + * priority, changed. It does not factor in task-level changes such as adding new tasks or tasks + * changing state. + */ lastModified?: Date; + /** + * @summary The creation time of the job. + */ creationTime?: Date; + /** + * @summary The current state of the job. + * @description Possible values include: 'active', 'disabling', 'disabled', 'enabling', + * 'terminating', 'completed', 'deleting' + */ state?: string; + /** + * @summary The time at which the job entered its current state. + */ stateTransitionTime?: Date; + /** + * @summary The previous state of the job. + * @description This property is not set if the job is in its initial Active state. Possible + * values include: 'active', 'disabling', 'disabled', 'enabling', 'terminating', 'completed', + * 'deleting' + */ previousState?: string; + /** + * @summary The time at which the job entered its previous state. + * @description This property is not set if the job is in its initial Active state. + */ previousStateTransitionTime?: Date; + /** + * @summary The priority of the job. + * @description Priority values can range from -1000 to 1000, with -1000 being the lowest + * priority and 1000 being the highest priority. The default value is 0. + */ priority?: number; + /** + * @summary The execution constraints for the job. + */ constraints?: JobConstraints; + /** + * @summary Details of a Job Manager task to be launched when the job is started. + */ jobManagerTask?: JobManagerTask; + /** + * @summary The Job Preparation task. + * @description The Job Preparation task is a special task run on each node before any other task + * of the job. + */ jobPreparationTask?: JobPreparationTask; + /** + * @summary The Job Release task. + * @description The Job Release task is a special task run at the end of the job on each node + * that has run any other task of the job. + */ jobReleaseTask?: JobReleaseTask; + /** + * @summary The list of common environment variable settings. These environment variables are set + * for all tasks in the job (including the Job Manager, Job Preparation and Job Release tasks). + * @description Individual tasks can override an environment setting specified here by specifying + * the same setting name with a different value. + */ commonEnvironmentSettings?: EnvironmentSetting[]; + /** + * @summary The pool settings associated with the job. + */ poolInfo?: PoolInformation; + /** + * @summary The action the Batch service should take when all tasks in the job are in the + * completed state. + * @description The default is noaction. Possible values include: 'noAction', 'terminateJob' + */ onAllTasksComplete?: string; + /** + * @summary The action the Batch service should take when any task in the job fails. + * @description A task is considered to have failed if has a failureInfo. A failureInfo is set if + * the task completes with a non-zero exit code after exhausting its retry count, or if there was + * an error starting the task, for example due to a resource file download error. The default is + * noaction. Possible values include: 'noAction', 'performExitOptionsJobAction' + */ onTaskFailure?: string; + /** + * @summary The network configuration for the job. + */ + networkConfiguration?: JobNetworkConfiguration; + /** + * @summary A list of name-value pairs associated with the job as metadata. + * @description The Batch service does not assign any meaning to metadata; it is solely for the + * use of user code. + */ metadata?: MetadataItem[]; + /** + * @summary The execution information for the job. + */ executionInfo?: JobExecutionInformation; + /** + * @summary Resource usage statistics for the entire lifetime of the job. The statistics may not + * be immediately available. The Batch service performs periodic roll-up of statistics. The + * typical delay is about 30 minutes. + */ stats?: JobStatistics; } /** - * @class - * Initializes a new instance of the JobAddParameter class. - * @constructor * @summary An Azure Batch job to add. - * - * @member {string} id A string that uniquely identifies the job within the - * account. The ID can contain any combination of alphanumeric characters - * including hyphens and underscores, and cannot contain more than 64 - * characters. The ID is case-preserving and case-insensitive (that is, you may - * not have two IDs within an account that differ only by case). - * @member {string} [displayName] The display name for the job. The display - * name need not be unique and can contain any Unicode characters up to a - * maximum length of 1024. - * @member {number} [priority] The priority of the job. Priority values can - * range from -1000 to 1000, with -1000 being the lowest priority and 1000 - * being the highest priority. The default value is 0. - * @member {object} [constraints] The execution constraints for the job. - * @member {moment.duration} [constraints.maxWallClockTime] If the job does not - * complete within the time limit, the Batch service terminates it and any - * tasks that are still running. In this case, the termination reason will be - * MaxWallClockTimeExpiry. If this property is not specified, there is no time - * limit on how long the job may run. - * @member {number} [constraints.maxTaskRetryCount] Note that this value - * specifically controls the number of retries. The Batch service will try each - * task once, and may then retry up to this limit. For example, if the maximum - * retry count is 3, Batch tries a task up to 4 times (one initial try and 3 - * retries). If the maximum retry count is 0, the Batch service does not retry - * tasks. If the maximum retry count is -1, the Batch service retries tasks - * without limit. The default value is 0 (no retries). - * @member {object} [jobManagerTask] Details of a Job Manager task to be - * launched when the job is started. If the job does not specify a Job Manager - * task, the user must explicitly add tasks to the job. If the job does specify - * a Job Manager task, the Batch service creates the Job Manager task when the - * job is created, and will try to schedule the Job Manager task before - * scheduling other tasks in the job. The Job Manager task's typical purpose is - * to control and/or monitor job execution, for example by deciding what - * additional tasks to run, determining when the work is complete, etc. - * (However, a Job Manager task is not restricted to these activities - it is a - * fully-fledged task in the system and perform whatever actions are required - * for the job.) For example, a Job Manager task might download a file - * specified as a parameter, analyze the contents of that file and submit - * additional tasks based on those contents. - * @member {string} [jobManagerTask.id] The ID can contain any combination of - * alphanumeric characters including hyphens and underscores and cannot contain - * more than 64 characters. - * @member {string} [jobManagerTask.displayName] It need not be unique and can - * contain any Unicode characters up to a maximum length of 1024. - * @member {string} [jobManagerTask.commandLine] The command line does not run - * under a shell, and therefore cannot take advantage of shell features such as - * environment variable expansion. If you want to take advantage of such - * features, you should invoke the shell in the command line, for example using - * "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the - * command line refers to file paths, it should use a relative path (relative - * to the task working directory), or use the Batch provided environment - * variable - * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [jobManagerTask.containerSettings] If the pool that will - * run this task has containerConfiguration set, this must be set as well. If - * the pool that will run this task doesn't have containerConfiguration set, - * this must not be set. When this is specified, all directories recursively - * below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the - * node) are mapped into the container, all task environment variables are - * mapped into the container, and the task command line is executed in the - * container. - * @member {string} [jobManagerTask.containerSettings.containerRunOptions] - * These additional options are supplied as arguments to the "docker create" - * command, in addition to those controlled by the Batch Service. - * @member {string} [jobManagerTask.containerSettings.imageName] This is the - * full image reference, as would be specified to "docker pull". If no tag is - * provided as part of the image name, the tag ":latest" is used as a default. - * @member {object} [jobManagerTask.containerSettings.registry] This setting - * can be omitted if was already provided at pool creation. - * @member {string} [jobManagerTask.containerSettings.registry.registryServer] - * If omitted, the default is "docker.io". - * @member {string} [jobManagerTask.containerSettings.registry.userName] - * @member {string} [jobManagerTask.containerSettings.registry.password] - * @member {array} [jobManagerTask.resourceFiles] Files listed under this - * element are located in the task's working directory. There is a maximum size - * for the list of resource files. When the max size is exceeded, the request - * will fail and the response error code will be RequestEntityTooLarge. If this - * occurs, the collection of ResourceFiles must be reduced in size. This can be - * achieved using .zip files, Application Packages, or Docker Containers. - * @member {array} [jobManagerTask.outputFiles] For multi-instance tasks, the - * files will only be uploaded from the compute node on which the primary task - * is executed. - * @member {array} [jobManagerTask.environmentSettings] - * @member {object} [jobManagerTask.constraints] - * @member {moment.duration} [jobManagerTask.constraints.maxWallClockTime] If - * this is not specified, there is no time limit on how long the task may run. - * @member {moment.duration} [jobManagerTask.constraints.retentionTime] The - * default is infinite, i.e. the task directory will be retained until the - * compute node is removed or reimaged. - * @member {number} [jobManagerTask.constraints.maxTaskRetryCount] Note that - * this value specifically controls the number of retries for the task - * executable due to a nonzero exit code. The Batch service will try the task - * once, and may then retry up to this limit. For example, if the maximum retry - * count is 3, Batch tries the task up to 4 times (one initial try and 3 - * retries). If the maximum retry count is 0, the Batch service does not retry - * the task after the first attempt. If the maximum retry count is -1, the - * Batch service retries the task without limit. Resource files and application - * packages are only downloaded again if the task is retried on a new compute - * node. - * @member {boolean} [jobManagerTask.killJobOnCompletion] If true, when the Job - * Manager task completes, the Batch service marks the job as complete. If any - * tasks are still running at this time (other than Job Release), those tasks - * are terminated. If false, the completion of the Job Manager task does not - * affect the job status. In this case, you should either use the - * onAllTasksComplete attribute to terminate the job, or have a client or user - * terminate the job explicitly. An example of this is if the Job Manager - * creates a set of tasks but then takes no further role in their execution. - * The default value is true. If you are using the onAllTasksComplete and - * onTaskFailure attributes to control job lifetime, and using the Job Manager - * task only to create the tasks for the job (not to monitor progress), then it - * is important to set killJobOnCompletion to false. - * @member {object} [jobManagerTask.userIdentity] If omitted, the task runs as - * a non-administrative user unique to the task. - * @member {string} [jobManagerTask.userIdentity.userName] The userName and - * autoUser properties are mutually exclusive; you must specify one but not - * both. - * @member {object} [jobManagerTask.userIdentity.autoUser] The userName and - * autoUser properties are mutually exclusive; you must specify one but not - * both. - * @member {string} [jobManagerTask.userIdentity.autoUser.scope] The default - * value is task. Possible values include: 'task', 'pool' - * @member {string} [jobManagerTask.userIdentity.autoUser.elevationLevel] The - * default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {boolean} [jobManagerTask.runExclusive] If true, no other tasks will - * run on the same compute node for as long as the Job Manager is running. If - * false, other tasks can run simultaneously with the Job Manager on a compute - * node. The Job Manager task counts normally against the node's concurrent - * task limit, so this is only relevant if the node allows multiple concurrent - * tasks. The default value is true. - * @member {array} [jobManagerTask.applicationPackageReferences] Application - * packages are downloaded and deployed to a shared directory, not the task - * working directory. Therefore, if a referenced package is already on the - * compute node, and is up to date, then it is not re-downloaded; the existing - * copy on the compute node is used. If a referenced application package cannot - * be installed, for example because the package has been deleted or because - * download failed, the task fails. - * @member {object} [jobManagerTask.authenticationTokenSettings] If this - * property is set, the Batch service provides the task with an authentication - * token which can be used to authenticate Batch service operations without - * requiring an account access key. The token is provided via the - * AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations that the - * task can carry out using the token depend on the settings. For example, a - * task can request job permissions in order to add other tasks to the job, or - * check the status of the job or of other tasks under the job. - * @member {array} [jobManagerTask.authenticationTokenSettings.access] The - * authentication token grants access to a limited set of Batch service - * operations. Currently the only supported value for the access property is - * 'job', which grants access to all operations related to the job which - * contains the task. - * @member {boolean} [jobManagerTask.allowLowPriorityNode] The default value is - * true. - * @member {object} [jobPreparationTask] The Job Preparation task. If a job has - * a Job Preparation task, the Batch service will run the Job Preparation task - * on a compute node before starting any tasks of that job on that compute - * node. - * @member {string} [jobPreparationTask.id] The ID can contain any combination - * of alphanumeric characters including hyphens and underscores and cannot - * contain more than 64 characters. If you do not specify this property, the - * Batch service assigns a default value of 'jobpreparation'. No other task in - * the job can have the same ID as the Job Preparation task. If you try to - * submit a task with the same id, the Batch service rejects the request with - * error code TaskIdSameAsJobPreparationTask; if you are calling the REST API - * directly, the HTTP status code is 409 (Conflict). - * @member {string} [jobPreparationTask.commandLine] The command line does not - * run under a shell, and therefore cannot take advantage of shell features - * such as environment variable expansion. If you want to take advantage of - * such features, you should invoke the shell in the command line, for example - * using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If - * the command line refers to file paths, it should use a relative path - * (relative to the task working directory), or use the Batch provided - * environment variable - * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [jobPreparationTask.containerSettings] When this is - * specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the - * root of Azure Batch directories on the node) are mapped into the container, - * all task environment variables are mapped into the container, and the task - * command line is executed in the container. - * @member {string} [jobPreparationTask.containerSettings.containerRunOptions] - * These additional options are supplied as arguments to the "docker create" - * command, in addition to those controlled by the Batch Service. - * @member {string} [jobPreparationTask.containerSettings.imageName] This is - * the full image reference, as would be specified to "docker pull". If no tag - * is provided as part of the image name, the tag ":latest" is used as a - * default. - * @member {object} [jobPreparationTask.containerSettings.registry] This - * setting can be omitted if was already provided at pool creation. - * @member {string} - * [jobPreparationTask.containerSettings.registry.registryServer] If omitted, - * the default is "docker.io". - * @member {string} [jobPreparationTask.containerSettings.registry.userName] - * @member {string} [jobPreparationTask.containerSettings.registry.password] - * @member {array} [jobPreparationTask.resourceFiles] Files listed under this - * element are located in the task's working directory. There is a maximum - * size for the list of resource files. When the max size is exceeded, the - * request will fail and the response error code will be RequestEntityTooLarge. - * If this occurs, the collection of ResourceFiles must be reduced in size. - * This can be achieved using .zip files, Application Packages, or Docker - * Containers. - * @member {array} [jobPreparationTask.environmentSettings] - * @member {object} [jobPreparationTask.constraints] - * @member {moment.duration} [jobPreparationTask.constraints.maxWallClockTime] - * If this is not specified, there is no time limit on how long the task may - * run. - * @member {moment.duration} [jobPreparationTask.constraints.retentionTime] The - * default is infinite, i.e. the task directory will be retained until the - * compute node is removed or reimaged. - * @member {number} [jobPreparationTask.constraints.maxTaskRetryCount] Note - * that this value specifically controls the number of retries for the task - * executable due to a nonzero exit code. The Batch service will try the task - * once, and may then retry up to this limit. For example, if the maximum retry - * count is 3, Batch tries the task up to 4 times (one initial try and 3 - * retries). If the maximum retry count is 0, the Batch service does not retry - * the task after the first attempt. If the maximum retry count is -1, the - * Batch service retries the task without limit. Resource files and application - * packages are only downloaded again if the task is retried on a new compute - * node. - * @member {boolean} [jobPreparationTask.waitForSuccess] If true and the Job - * Preparation task fails on a compute node, the Batch service retries the Job - * Preparation task up to its maximum retry count (as specified in the - * constraints element). If the task has still not completed successfully after - * all retries, then the Batch service will not schedule tasks of the job to - * the compute node. The compute node remains active and eligible to run tasks - * of other jobs. If false, the Batch service will not wait for the Job - * Preparation task to complete. In this case, other tasks of the job can start - * executing on the compute node while the Job Preparation task is still - * running; and even if the Job Preparation task fails, new tasks will continue - * to be scheduled on the node. The default value is true. - * @member {object} [jobPreparationTask.userIdentity] If omitted, the task runs - * as a non-administrative user unique to the task on Windows nodes, or a a - * non-administrative user unique to the pool on Linux nodes. - * @member {string} [jobPreparationTask.userIdentity.userName] The userName and - * autoUser properties are mutually exclusive; you must specify one but not - * both. - * @member {object} [jobPreparationTask.userIdentity.autoUser] The userName and - * autoUser properties are mutually exclusive; you must specify one but not - * both. - * @member {string} [jobPreparationTask.userIdentity.autoUser.scope] The - * default value is task. Possible values include: 'task', 'pool' - * @member {string} [jobPreparationTask.userIdentity.autoUser.elevationLevel] - * The default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {boolean} [jobPreparationTask.rerunOnNodeRebootAfterSuccess] The Job - * Preparation task is always rerun if a compute node is reimaged, or if the - * Job Preparation task did not complete (e.g. because the reboot occurred - * while the task was running). Therefore, you should always write a Job - * Preparation task to be idempotent and to behave correctly if run multiple - * times. The default value is true. - * @member {object} [jobReleaseTask] The Job Release task. A Job Release task - * cannot be specified without also specifying a Job Preparation task for the - * job. The Batch service runs the Job Release task on the compute nodes that - * have run the Job Preparation task. The primary purpose of the Job Release - * task is to undo changes to compute nodes made by the Job Preparation task. - * Example activities include deleting local files, or shutting down services - * that were started as part of job preparation. - * @member {string} [jobReleaseTask.id] The ID can contain any combination of - * alphanumeric characters including hyphens and underscores and cannot contain - * more than 64 characters. If you do not specify this property, the Batch - * service assigns a default value of 'jobrelease'. No other task in the job - * can have the same ID as the Job Release task. If you try to submit a task - * with the same id, the Batch service rejects the request with error code - * TaskIdSameAsJobReleaseTask; if you are calling the REST API directly, the - * HTTP status code is 409 (Conflict). - * @member {string} [jobReleaseTask.commandLine] The command line does not run - * under a shell, and therefore cannot take advantage of shell features such as - * environment variable expansion. If you want to take advantage of such - * features, you should invoke the shell in the command line, for example using - * "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the - * command line refers to file paths, it should use a relative path (relative - * to the task working directory), or use the Batch provided environment - * variable - * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [jobReleaseTask.containerSettings] When this is specified, - * all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of - * Azure Batch directories on the node) are mapped into the container, all task - * environment variables are mapped into the container, and the task command - * line is executed in the container. - * @member {string} [jobReleaseTask.containerSettings.containerRunOptions] - * These additional options are supplied as arguments to the "docker create" - * command, in addition to those controlled by the Batch Service. - * @member {string} [jobReleaseTask.containerSettings.imageName] This is the - * full image reference, as would be specified to "docker pull". If no tag is - * provided as part of the image name, the tag ":latest" is used as a default. - * @member {object} [jobReleaseTask.containerSettings.registry] This setting - * can be omitted if was already provided at pool creation. - * @member {string} [jobReleaseTask.containerSettings.registry.registryServer] - * If omitted, the default is "docker.io". - * @member {string} [jobReleaseTask.containerSettings.registry.userName] - * @member {string} [jobReleaseTask.containerSettings.registry.password] - * @member {array} [jobReleaseTask.resourceFiles] Files listed under this - * element are located in the task's working directory. - * @member {array} [jobReleaseTask.environmentSettings] - * @member {moment.duration} [jobReleaseTask.maxWallClockTime] - * @member {moment.duration} [jobReleaseTask.retentionTime] The default is - * infinite, i.e. the task directory will be retained until the compute node is - * removed or reimaged. - * @member {object} [jobReleaseTask.userIdentity] If omitted, the task runs as - * a non-administrative user unique to the task. - * @member {string} [jobReleaseTask.userIdentity.userName] The userName and - * autoUser properties are mutually exclusive; you must specify one but not - * both. - * @member {object} [jobReleaseTask.userIdentity.autoUser] The userName and - * autoUser properties are mutually exclusive; you must specify one but not - * both. - * @member {string} [jobReleaseTask.userIdentity.autoUser.scope] The default - * value is task. Possible values include: 'task', 'pool' - * @member {string} [jobReleaseTask.userIdentity.autoUser.elevationLevel] The - * default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {array} [commonEnvironmentSettings] The list of common environment - * variable settings. These environment variables are set for all tasks in the - * job (including the Job Manager, Job Preparation and Job Release tasks). - * Individual tasks can override an environment setting specified here by - * specifying the same setting name with a different value. - * @member {object} poolInfo The pool on which the Batch service runs the job's - * tasks. - * @member {string} [poolInfo.poolId] You must ensure that the pool referenced - * by this property exists. If the pool does not exist at the time the Batch - * service tries to schedule a job, no tasks for the job will run until you - * create a pool with that id. Note that the Batch service will not reject the - * job request; it will simply not run tasks until the pool exists. You must - * specify either the pool ID or the auto pool specification, but not both. - * @member {object} [poolInfo.autoPoolSpecification] If auto pool creation - * fails, the Batch service moves the job to a completed state, and the pool - * creation error is set in the job's scheduling error property. The Batch - * service manages the lifetime (both creation and, unless keepAlive is - * specified, deletion) of the auto pool. Any user actions that affect the - * lifetime of the auto pool while the job is active will result in unexpected - * behavior. You must specify either the pool ID or the auto pool - * specification, but not both. - * @member {string} [poolInfo.autoPoolSpecification.autoPoolIdPrefix] The Batch - * service assigns each auto pool a unique identifier on creation. To - * distinguish between pools created for different purposes, you can specify - * this element to add a prefix to the ID that is assigned. The prefix can be - * up to 20 characters long. - * @member {string} [poolInfo.autoPoolSpecification.poolLifetimeOption] - * Possible values include: 'jobSchedule', 'job' - * @member {boolean} [poolInfo.autoPoolSpecification.keepAlive] If false, the - * Batch service deletes the pool once its lifetime (as determined by the - * poolLifetimeOption setting) expires; that is, when the job or job schedule - * completes. If true, the Batch service does not delete the pool - * automatically. It is up to the user to delete auto pools created with this - * option. - * @member {object} [poolInfo.autoPoolSpecification.pool] - * @member {string} [poolInfo.autoPoolSpecification.pool.displayName] The - * display name need not be unique and can contain any Unicode characters up to - * a maximum length of 1024. - * @member {string} [poolInfo.autoPoolSpecification.pool.vmSize] For - * information about available sizes of virtual machines in pools, see Choose a - * VM size for compute nodes in an Azure Batch pool - * (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). - * @member {object} - * [poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration] This - * property must be specified if the pool needs to be created with Azure PaaS - * VMs. This property and virtualMachineConfiguration are mutually exclusive - * and one of the properties must be specified. If neither is specified then - * the Batch service returns an error; if you are calling the REST API - * directly, the HTTP status code is 400 (Bad Request). This property cannot be - * specified if the Batch account was created with its poolAllocationMode - * property set to 'UserSubscription'. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osFamily] - * Possible values are: - * 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. - * 3 - OS Family 3, equivalent to Windows Server 2012. - * 4 - OS Family 4, equivalent to Windows Server 2012 R2. - * 5 - OS Family 5, equivalent to Windows Server 2016. For more information, - * see Azure Guest OS Releases - * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). - * @member {string} - * [poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] - * The default value is * which specifies the latest operating system version - * for the specified OS family. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.currentOSVersion] - * This may differ from targetOSVersion if the pool state is Upgrading. In this - * case some virtual machines may be on the targetOSVersion and some may be on - * the currentOSVersion during the upgrade process. Once all virtual machines - * have upgraded, currentOSVersion is updated to be the same as - * targetOSVersion. - * @member {object} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration] This - * property must be specified if the pool needs to be created with Azure IaaS - * VMs. This property and cloudServiceConfiguration are mutually exclusive and - * one of the properties must be specified. If neither is specified then the - * Batch service returns an error; if you are calling the REST API directly, - * the HTTP status code is 400 (Bad Request). - * @member {object} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference] - * @member {string} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.publisher] - * For example, Canonical or MicrosoftWindowsServer. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.offer] - * For example, UbuntuServer or WindowsServer. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.sku] - * For example, 14.04.0-LTS or 2012-R2-Datacenter. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.version] - * A value of 'latest' can be specified to select the latest version of an - * image. If omitted, the default is 'latest'. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.virtualMachineImageId] - * This property is mutually exclusive with other ImageReference properties. - * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * @member {object} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * @member {string} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The default value for caching is readwrite. For information about the - * caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' - * @member {string} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId] - * The Batch node agent is a program that runs on each node in the pool, and - * provides the command-and-control interface between the node and the Batch - * service. There are different implementations of the node agent, known as - * SKUs, for different operating systems. You must specify a node agent SKU - * which matches the selected image reference. To get the list of supported - * node agent SKUs along with their list of verified image references, see the - * 'List supported node agent SKUs' operation. - * @member {object} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] - * This property must not be specified if the imageReference or osDisk property - * specifies a Linux OS image. - * @member {boolean} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] - * If omitted, the default value is true. - * @member {array} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.dataDisks] - * This property must be specified if the compute nodes in the pool need to - * have empty data disks attached to them. This cannot be updated. Each node - * gets its own disk (the disk is not a file share). Existing disks cannot be - * attached, each attached disk is empty. When the node is removed from the - * pool, the disk and all data associated with it is also deleted. The disk is - * not formatted after being attached, it must be formatted before use - for - * more information see - * https://docs.microsoft.com/en-us/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux - * and - * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.licenseType] - * This only applies to images that contain the Windows operating system, and - * should only be used when you hold valid on-premises licenses for the nodes - * which will be deployed. If omitted, no on-premises licensing discount is - * applied. Values are: - * - * Windows_Server - The on-premises license is for Windows Server. - * Windows_Client - The on-premises license is for Windows Client. - * @member {object} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration] - * If specified, setup is performed on each node in the pool to allow tasks to - * run in containers. All regular tasks and job manager tasks run on this pool - * must specify the containerSettings property, and all other tasks may specify - * it. - * @member {array} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration.containerImageNames] - * This is the full image reference, as would be specified to "docker pull". An - * image will be sourced from the default Docker registry unless the image is - * fully qualified with an alternative registry. - * @member {array} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration.containerRegistries] - * If any images must be downloaded from a private registry which requires - * credentials, then those credentials must be provided here. - * @member {number} [poolInfo.autoPoolSpecification.pool.maxTasksPerNode] The - * default value is 1. The maximum value of this setting depends on the size of - * the compute nodes in the pool (the vmSize setting). - * @member {object} [poolInfo.autoPoolSpecification.pool.taskSchedulingPolicy] - * @member {string} - * [poolInfo.autoPoolSpecification.pool.taskSchedulingPolicy.nodeFillType] - * Possible values include: 'spread', 'pack' - * @member {moment.duration} - * [poolInfo.autoPoolSpecification.pool.resizeTimeout] This timeout applies - * only to manual scaling; it has no effect when enableAutoScale is set to - * true. The default value is 15 minutes. The minimum value is 5 minutes. If - * you specify a value less than 5 minutes, the Batch service rejects the - * request with an error; if you are calling the REST API directly, the HTTP - * status code is 400 (Bad Request). - * @member {number} [poolInfo.autoPoolSpecification.pool.targetDedicatedNodes] - * This property must not be specified if enableAutoScale is set to true. If - * enableAutoScale is set to false, then you must set either - * targetDedicatedNodes, targetLowPriorityNodes, or both. - * @member {number} - * [poolInfo.autoPoolSpecification.pool.targetLowPriorityNodes] This property - * must not be specified if enableAutoScale is set to true. If enableAutoScale - * is set to false, then you must set either targetDedicatedNodes, - * targetLowPriorityNodes, or both. - * @member {boolean} [poolInfo.autoPoolSpecification.pool.enableAutoScale] If - * false, at least one of targetDedicateNodes and targetLowPriorityNodes must - * be specified. If true, the autoScaleFormula element is required. The pool - * automatically resizes according to the formula. The default value is false. - * @member {string} [poolInfo.autoPoolSpecification.pool.autoScaleFormula] This - * property must not be specified if enableAutoScale is set to false. It is - * required if enableAutoScale is set to true. The formula is checked for - * validity before the pool is created. If the formula is not valid, the Batch - * service rejects the request with detailed error information. - * @member {moment.duration} - * [poolInfo.autoPoolSpecification.pool.autoScaleEvaluationInterval] The - * default value is 15 minutes. The minimum and maximum value are 5 minutes and - * 168 hours respectively. If you specify a value less than 5 minutes or - * greater than 168 hours, the Batch service rejects the request with an - * invalid property value error; if you are calling the REST API directly, the - * HTTP status code is 400 (Bad Request). - * @member {boolean} - * [poolInfo.autoPoolSpecification.pool.enableInterNodeCommunication] Enabling - * inter-node communication limits the maximum size of the pool due to - * deployment restrictions on the nodes of the pool. This may result in the - * pool not reaching its desired size. The default value is false. - * @member {object} [poolInfo.autoPoolSpecification.pool.networkConfiguration] - * @member {string} - * [poolInfo.autoPoolSpecification.pool.networkConfiguration.subnetId] The - * virtual network must be in the same region and subscription as the Azure - * Batch account. The specified subnet should have enough free IP addresses to - * accommodate the number of nodes in the pool. If the subnet doesn't have - * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks - * ('Microsoft.Network/virtualNetworks') are supported, but for pools created - * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration - * @member {object} - * [poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] - * Pool endpoint configuration is only supported on pools with the - * virtualMachineConfiguration property. - * @member {array} - * [poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration.inboundNATPools] - * The maximum number of inbound NAT pools per Batch pool is 5. If the maximum - * number of inbound NAT pools is exceeded the request fails with HTTP status - * code 400. - * @member {object} [poolInfo.autoPoolSpecification.pool.startTask] - * @member {string} [poolInfo.autoPoolSpecification.pool.startTask.commandLine] - * The command line does not run under a shell, and therefore cannot take - * advantage of shell features such as environment variable expansion. If you - * want to take advantage of such features, you should invoke the shell in the - * command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c - * MyCommand" in Linux. If the command line refers to file paths, it should use - * a relative path (relative to the task working directory), or use the Batch - * provided environment variable - * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} - * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings] When this - * is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR - * (the root of Azure Batch directories on the node) are mapped into the - * container, all task environment variables are mapped into the container, and - * the task command line is executed in the container. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.containerRunOptions] - * These additional options are supplied as arguments to the "docker create" - * command, in addition to those controlled by the Batch Service. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.imageName] - * This is the full image reference, as would be specified to "docker pull". If - * no tag is provided as part of the image name, the tag ":latest" is used as a - * default. - * @member {object} - * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry] - * This setting can be omitted if was already provided at pool creation. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.registryServer] - * If omitted, the default is "docker.io". - * @member {string} - * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.userName] - * @member {string} - * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.password] - * @member {array} - * [poolInfo.autoPoolSpecification.pool.startTask.resourceFiles] Files listed - * under this element are located in the task's working directory. - * @member {array} - * [poolInfo.autoPoolSpecification.pool.startTask.environmentSettings] - * @member {object} - * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity] If omitted, the - * task runs as a non-administrative user unique to the task. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity.userName] The - * userName and autoUser properties are mutually exclusive; you must specify - * one but not both. - * @member {object} - * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser] The - * userName and autoUser properties are mutually exclusive; you must specify - * one but not both. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser.scope] - * The default value is task. Possible values include: 'task', 'pool' - * @member {string} - * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser.elevationLevel] - * The default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {number} - * [poolInfo.autoPoolSpecification.pool.startTask.maxTaskRetryCount] The Batch - * service retries a task if its exit code is nonzero. Note that this value - * specifically controls the number of retries. The Batch service will try the - * task once, and may then retry up to this limit. For example, if the maximum - * retry count is 3, Batch tries the task up to 4 times (one initial try and 3 - * retries). If the maximum retry count is 0, the Batch service does not retry - * the task. If the maximum retry count is -1, the Batch service retries the - * task without limit. - * @member {boolean} - * [poolInfo.autoPoolSpecification.pool.startTask.waitForSuccess] If true and - * the start task fails on a compute node, the Batch service retries the start - * task up to its maximum retry count (maxTaskRetryCount). If the task has - * still not completed successfully after all retries, then the Batch service - * marks the compute node unusable, and will not schedule tasks to it. This - * condition can be detected via the node state and failure info details. If - * false, the Batch service will not wait for the start task to complete. In - * this case, other tasks can start executing on the compute node while the - * start task is still running; and even if the start task fails, new tasks - * will continue to be scheduled on the node. The default is false. - * @member {array} [poolInfo.autoPoolSpecification.pool.certificateReferences] - * For Windows compute nodes, the Batch service installs the certificates to - * the specified certificate store and location. For Linux compute nodes, the - * certificates are stored in a directory inside the task working directory and - * an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to - * query for this location. For certificates with visibility of 'remoteUser', a - * 'certs' directory is created in the user's home directory (e.g., - * /home/{user-name}/certs) and certificates are placed in that directory. - * @member {array} - * [poolInfo.autoPoolSpecification.pool.applicationPackageReferences] - * @member {array} [poolInfo.autoPoolSpecification.pool.applicationLicenses] - * The list of application licenses must be a subset of available Batch service - * application licenses. If a license is requested which is not supported, pool - * creation will fail. The permitted licenses available on the pool are 'maya', - * 'vray', '3dsmax', 'arnold'. An additional charge applies for each - * application license added to the pool. - * @member {array} [poolInfo.autoPoolSpecification.pool.userAccounts] - * @member {array} [poolInfo.autoPoolSpecification.pool.metadata] The Batch - * service does not assign any meaning to metadata; it is solely for the use of - * user code. - * @member {string} [onAllTasksComplete] The action the Batch service should - * take when all tasks in the job are in the completed state. Note that if a - * job contains no tasks, then all tasks are considered complete. This option - * is therefore most commonly used with a Job Manager task; if you want to use - * automatic job termination without a Job Manager, you should initially set - * onAllTasksComplete to noaction and update the job properties to set - * onAllTasksComplete to terminatejob once you have finished adding tasks. The - * default is noaction. Possible values include: 'noAction', 'terminateJob' - * @member {string} [onTaskFailure] The action the Batch service should take - * when any task in the job fails. A task is considered to have failed if has a - * failureInfo. A failureInfo is set if the task completes with a non-zero exit - * code after exhausting its retry count, or if there was an error starting the - * task, for example due to a resource file download error. The default is - * noaction. Possible values include: 'noAction', 'performExitOptionsJobAction' - * @member {array} [metadata] A list of name-value pairs associated with the - * job as metadata. The Batch service does not assign any meaning to metadata; - * it is solely for the use of user code. - * @member {boolean} [usesTaskDependencies] Whether tasks in the job can define - * dependencies on each other. The default is false. */ export interface JobAddParameter { + /** + * @summary A string that uniquely identifies the job within the account. + * @description The ID can contain any combination of alphanumeric characters including hyphens + * and underscores, and cannot contain more than 64 characters. The ID is case-preserving and + * case-insensitive (that is, you may not have two IDs within an account that differ only by + * case). + */ id: string; + /** + * @summary The display name for the job. + * @description The display name need not be unique and can contain any Unicode characters up to + * a maximum length of 1024. + */ displayName?: string; + /** + * @summary The priority of the job. + * @description Priority values can range from -1000 to 1000, with -1000 being the lowest + * priority and 1000 being the highest priority. The default value is 0. + */ priority?: number; + /** + * The execution constraints for the job. + */ constraints?: JobConstraints; + /** + * @summary Details of a Job Manager task to be launched when the job is started. + * @description If the job does not specify a Job Manager task, the user must explicitly add + * tasks to the job. If the job does specify a Job Manager task, the Batch service creates the + * Job Manager task when the job is created, and will try to schedule the Job Manager task before + * scheduling other tasks in the job. The Job Manager task's typical purpose is to control and/or + * monitor job execution, for example by deciding what additional tasks to run, determining when + * the work is complete, etc. (However, a Job Manager task is not restricted to these activities + * - it is a fully-fledged task in the system and perform whatever actions are required for the + * job.) For example, a Job Manager task might download a file specified as a parameter, analyze + * the contents of that file and submit additional tasks based on those contents. + */ jobManagerTask?: JobManagerTask; + /** + * @summary The Job Preparation task. + * @description If a job has a Job Preparation task, the Batch service will run the Job + * Preparation task on a compute node before starting any tasks of that job on that compute node. + */ jobPreparationTask?: JobPreparationTask; + /** + * @summary The Job Release task. + * @description A Job Release task cannot be specified without also specifying a Job Preparation + * task for the job. The Batch service runs the Job Release task on the compute nodes that have + * run the Job Preparation task. The primary purpose of the Job Release task is to undo changes + * to compute nodes made by the Job Preparation task. Example activities include deleting local + * files, or shutting down services that were started as part of job preparation. + */ jobReleaseTask?: JobReleaseTask; + /** + * @summary The list of common environment variable settings. These environment variables are set + * for all tasks in the job (including the Job Manager, Job Preparation and Job Release tasks). + * @description Individual tasks can override an environment setting specified here by specifying + * the same setting name with a different value. + */ commonEnvironmentSettings?: EnvironmentSetting[]; + /** + * @summary The pool on which the Batch service runs the job's tasks. + */ poolInfo: PoolInformation; + /** + * @summary The action the Batch service should take when all tasks in the job are in the + * completed state. + * @description Note that if a job contains no tasks, then all tasks are considered complete. + * This option is therefore most commonly used with a Job Manager task; if you want to use + * automatic job termination without a Job Manager, you should initially set onAllTasksComplete + * to noaction and update the job properties to set onAllTasksComplete to terminatejob once you + * have finished adding tasks. The default is noaction. Possible values include: 'noAction', + * 'terminateJob' + */ onAllTasksComplete?: string; + /** + * @summary The action the Batch service should take when any task in the job fails. + * @description A task is considered to have failed if has a failureInfo. A failureInfo is set if + * the task completes with a non-zero exit code after exhausting its retry count, or if there was + * an error starting the task, for example due to a resource file download error. The default is + * noaction. Possible values include: 'noAction', 'performExitOptionsJobAction' + */ onTaskFailure?: string; + /** + * @summary A list of name-value pairs associated with the job as metadata. + * @description The Batch service does not assign any meaning to metadata; it is solely for the + * use of user code. + */ metadata?: MetadataItem[]; + /** + * @summary Whether tasks in the job can define dependencies on each other. The default is false. + */ usesTaskDependencies?: boolean; + /** + * @summary The network configuration for the job. + */ + networkConfiguration?: JobNetworkConfiguration; } /** - * @class - * Initializes a new instance of the TaskContainerExecutionInformation class. - * @constructor * @summary Contains information about the container which a task is executing. - * - * @member {string} [containerId] The ID of the container. - * @member {string} [state] The state of the container. This is the state of - * the container according to the Docker service. It is equivalent to the - * status field returned by "docker inspect". - * @member {string} [error] Detailed error information about the container. - * This is the detailed error string from the Docker service, if available. It - * is equivalent to the error field returned by "docker inspect". */ export interface TaskContainerExecutionInformation { + /** + * @summary The ID of the container. + */ containerId?: string; + /** + * @summary The state of the container. + * @description This is the state of the container according to the Docker service. It is + * equivalent to the status field returned by "docker inspect". + */ state?: string; + /** + * @summary Detailed error information about the container. + * @description This is the detailed error string from the Docker service, if available. It is + * equivalent to the error field returned by "docker inspect". + */ error?: string; } /** - * @class - * Initializes a new instance of the TaskFailureInformation class. - * @constructor * @summary Information about a task failure. - * - * @member {string} category The category of the task error. Possible values - * include: 'userError', 'serverError' - * @member {string} [code] An identifier for the task error. Codes are - * invariant and are intended to be consumed programmatically. - * @member {string} [message] A message describing the task error, intended to - * be suitable for display in a user interface. - * @member {array} [details] A list of additional details related to the error. */ export interface TaskFailureInformation { + /** + * @summary The category of the task error. + * @description Possible values include: 'userError', 'serverError' + */ category: string; + /** + * @summary An identifier for the task error. Codes are invariant and are intended to be consumed + * programmatically. + */ code?: string; + /** + * @summary A message describing the task error, intended to be suitable for display in a user + * interface. + */ message?: string; + /** + * @summary A list of additional details related to the error. + */ details?: NameValuePair[]; } /** - * @class - * Initializes a new instance of the JobPreparationTaskExecutionInformation class. - * @constructor - * @summary Contains information about the execution of a Job Preparation task - * on a compute node. - * - * @member {date} startTime The time at which the task started running. If the - * task has been restarted or retried, this is the most recent time at which - * the task started running. - * @member {date} [endTime] The time at which the Job Preparation task - * completed. This property is set only if the task is in the Completed state. - * @member {string} state The current state of the Job Preparation task on the - * compute node. Possible values include: 'running', 'completed' - * @member {string} [taskRootDirectory] The root directory of the Job - * Preparation task on the compute node. You can use this path to retrieve - * files created by the task, such as log files. - * @member {string} [taskRootDirectoryUrl] The URL to the root directory of the - * Job Preparation task on the compute node. - * @member {number} [exitCode] The exit code of the program specified on the - * task command line. This parameter is returned only if the task is in the - * completed state. The exit code for a process reflects the specific - * convention implemented by the application developer for that process. If you - * use the exit code value to make decisions in your code, be sure that you - * know the exit code convention used by the application process. Note that the - * exit code may also be generated by the compute node operating system, such - * as when a process is forcibly terminated. - * @member {object} [containerInfo] Information about the container under which - * the task is executing. This property is set only if the task runs in a - * container context. - * @member {string} [containerInfo.containerId] - * @member {string} [containerInfo.state] This is the state of the container - * according to the Docker service. It is equivalent to the status field - * returned by "docker inspect". - * @member {string} [containerInfo.error] This is the detailed error string - * from the Docker service, if available. It is equivalent to the error field - * returned by "docker inspect". - * @member {object} [failureInfo] Information describing the task failure, if - * any. This property is set only if the task is in the completed state and - * encountered a failure. - * @member {string} [failureInfo.category] Possible values include: - * 'userError', 'serverError' - * @member {string} [failureInfo.code] - * @member {string} [failureInfo.message] - * @member {array} [failureInfo.details] - * @member {number} retryCount The number of times the task has been retried by - * the Batch service. Task application failures (non-zero exit code) are - * retried, pre-processing errors (the task could not be run) and file upload - * errors are not retried. The Batch service will retry the task up to the - * limit specified by the constraints. Task application failures (non-zero exit - * code) are retried, pre-processing errors (the task could not be run) and - * file upload errors are not retried. The Batch service will retry the task up - * to the limit specified by the constraints. - * @member {date} [lastRetryTime] The most recent time at which a retry of the - * Job Preparation task started running. This property is set only if the task - * was retried (i.e. retryCount is nonzero). If present, this is typically the - * same as startTime, but may be different if the task has been restarted for - * reasons other than retry; for example, if the compute node was rebooted - * during a retry, then the startTime is updated but the lastRetryTime is not. - * @member {string} [result] The result of the task execution. If the value is - * 'failed', then the details of the failure can be found in the failureInfo - * property. Possible values include: 'success', 'failure' + * @summary Contains information about the execution of a Job Preparation task on a compute node. */ export interface JobPreparationTaskExecutionInformation { + /** + * @summary The time at which the task started running. + * @description If the task has been restarted or retried, this is the most recent time at which + * the task started running. + */ startTime: Date; + /** + * @summary The time at which the Job Preparation task completed. + * @description This property is set only if the task is in the Completed state. + */ endTime?: Date; + /** + * @summary The current state of the Job Preparation task on the compute node. + * @description Possible values include: 'running', 'completed' + */ state: string; + /** + * @summary The root directory of the Job Preparation task on the compute node. You can use this + * path to retrieve files created by the task, such as log files. + */ taskRootDirectory?: string; + /** + * @summary The URL to the root directory of the Job Preparation task on the compute node. + */ taskRootDirectoryUrl?: string; + /** + * @summary The exit code of the program specified on the task command line. + * @description This parameter is returned only if the task is in the completed state. The exit + * code for a process reflects the specific convention implemented by the application developer + * for that process. If you use the exit code value to make decisions in your code, be sure that + * you know the exit code convention used by the application process. Note that the exit code may + * also be generated by the compute node operating system, such as when a process is forcibly + * terminated. + */ exitCode?: number; + /** + * @summary Information about the container under which the task is executing. + * @description This property is set only if the task runs in a container context. + */ containerInfo?: TaskContainerExecutionInformation; + /** + * @summary Information describing the task failure, if any. + * @description This property is set only if the task is in the completed state and encountered a + * failure. + */ failureInfo?: TaskFailureInformation; + /** + * @summary The number of times the task has been retried by the Batch service. Task application + * failures (non-zero exit code) are retried, pre-processing errors (the task could not be run) + * and file upload errors are not retried. The Batch service will retry the task up to the limit + * specified by the constraints. + * @description Task application failures (non-zero exit code) are retried, pre-processing errors + * (the task could not be run) and file upload errors are not retried. The Batch service will + * retry the task up to the limit specified by the constraints. + */ retryCount: number; + /** + * @summary The most recent time at which a retry of the Job Preparation task started running. + * @description This property is set only if the task was retried (i.e. retryCount is nonzero). + * If present, this is typically the same as startTime, but may be different if the task has been + * restarted for reasons other than retry; for example, if the compute node was rebooted during a + * retry, then the startTime is updated but the lastRetryTime is not. + */ lastRetryTime?: Date; + /** + * @summary The result of the task execution. + * @description If the value is 'failed', then the details of the failure can be found in the + * failureInfo property. Possible values include: 'success', 'failure' + */ result?: string; } /** - * @class - * Initializes a new instance of the JobReleaseTaskExecutionInformation class. - * @constructor - * @summary Contains information about the execution of a Job Release task on a - * compute node. - * - * @member {date} startTime The time at which the task started running. If the - * task has been restarted or retried, this is the most recent time at which - * the task started running. - * @member {date} [endTime] The time at which the Job Release task completed. - * This property is set only if the task is in the Completed state. - * @member {string} state The current state of the Job Release task on the - * compute node. Possible values include: 'running', 'completed' - * @member {string} [taskRootDirectory] The root directory of the Job Release - * task on the compute node. You can use this path to retrieve files created by - * the task, such as log files. - * @member {string} [taskRootDirectoryUrl] The URL to the root directory of the - * Job Release task on the compute node. - * @member {number} [exitCode] The exit code of the program specified on the - * task command line. This parameter is returned only if the task is in the - * completed state. The exit code for a process reflects the specific - * convention implemented by the application developer for that process. If you - * use the exit code value to make decisions in your code, be sure that you - * know the exit code convention used by the application process. Note that the - * exit code may also be generated by the compute node operating system, such - * as when a process is forcibly terminated. - * @member {object} [containerInfo] Information about the container under which - * the task is executing. This property is set only if the task runs in a - * container context. - * @member {string} [containerInfo.containerId] - * @member {string} [containerInfo.state] This is the state of the container - * according to the Docker service. It is equivalent to the status field - * returned by "docker inspect". - * @member {string} [containerInfo.error] This is the detailed error string - * from the Docker service, if available. It is equivalent to the error field - * returned by "docker inspect". - * @member {object} [failureInfo] Information describing the task failure, if - * any. This property is set only if the task is in the completed state and - * encountered a failure. - * @member {string} [failureInfo.category] Possible values include: - * 'userError', 'serverError' - * @member {string} [failureInfo.code] - * @member {string} [failureInfo.message] - * @member {array} [failureInfo.details] - * @member {string} [result] The result of the task execution. If the value is - * 'failed', then the details of the failure can be found in the failureInfo - * property. Possible values include: 'success', 'failure' + * @summary Contains information about the execution of a Job Release task on a compute node. */ export interface JobReleaseTaskExecutionInformation { + /** + * @summary The time at which the task started running. + * @description If the task has been restarted or retried, this is the most recent time at which + * the task started running. + */ startTime: Date; + /** + * @summary The time at which the Job Release task completed. + * @description This property is set only if the task is in the Completed state. + */ endTime?: Date; + /** + * @summary The current state of the Job Release task on the compute node. + * @description Possible values include: 'running', 'completed' + */ state: string; + /** + * @summary The root directory of the Job Release task on the compute node. You can use this path + * to retrieve files created by the task, such as log files. + */ taskRootDirectory?: string; + /** + * @summary The URL to the root directory of the Job Release task on the compute node. + */ taskRootDirectoryUrl?: string; + /** + * @summary The exit code of the program specified on the task command line. + * @description This parameter is returned only if the task is in the completed state. The exit + * code for a process reflects the specific convention implemented by the application developer + * for that process. If you use the exit code value to make decisions in your code, be sure that + * you know the exit code convention used by the application process. Note that the exit code may + * also be generated by the compute node operating system, such as when a process is forcibly + * terminated. + */ exitCode?: number; + /** + * @summary Information about the container under which the task is executing. + * @description This property is set only if the task runs in a container context. + */ containerInfo?: TaskContainerExecutionInformation; + /** + * @summary Information describing the task failure, if any. + * @description This property is set only if the task is in the completed state and encountered a + * failure. + */ failureInfo?: TaskFailureInformation; + /** + * @summary The result of the task execution. + * @description If the value is 'failed', then the details of the failure can be found in the + * failureInfo property. Possible values include: 'success', 'failure' + */ result?: string; } /** - * @class - * Initializes a new instance of the JobPreparationAndReleaseTaskExecutionInformation class. - * @constructor - * @summary The status of the Job Preparation and Job Release tasks on a - * compute node. - * - * @member {string} [poolId] The ID of the pool containing the compute node to - * which this entry refers. - * @member {string} [nodeId] The ID of the compute node to which this entry - * refers. - * @member {string} [nodeUrl] The URL of the compute node to which this entry - * refers. - * @member {object} [jobPreparationTaskExecutionInfo] Information about the - * execution status of the Job Preparation task on this compute node. - * @member {date} [jobPreparationTaskExecutionInfo.startTime] If the task has - * been restarted or retried, this is the most recent time at which the task - * started running. - * @member {date} [jobPreparationTaskExecutionInfo.endTime] This property is - * set only if the task is in the Completed state. - * @member {string} [jobPreparationTaskExecutionInfo.state] Possible values - * include: 'running', 'completed' - * @member {string} [jobPreparationTaskExecutionInfo.taskRootDirectory] - * @member {string} [jobPreparationTaskExecutionInfo.taskRootDirectoryUrl] - * @member {number} [jobPreparationTaskExecutionInfo.exitCode] This parameter - * is returned only if the task is in the completed state. The exit code for a - * process reflects the specific convention implemented by the application - * developer for that process. If you use the exit code value to make decisions - * in your code, be sure that you know the exit code convention used by the - * application process. Note that the exit code may also be generated by the - * compute node operating system, such as when a process is forcibly - * terminated. - * @member {object} [jobPreparationTaskExecutionInfo.containerInfo] This - * property is set only if the task runs in a container context. - * @member {string} [jobPreparationTaskExecutionInfo.containerInfo.containerId] - * @member {string} [jobPreparationTaskExecutionInfo.containerInfo.state] This - * is the state of the container according to the Docker service. It is - * equivalent to the status field returned by "docker inspect". - * @member {string} [jobPreparationTaskExecutionInfo.containerInfo.error] This - * is the detailed error string from the Docker service, if available. It is - * equivalent to the error field returned by "docker inspect". - * @member {object} [jobPreparationTaskExecutionInfo.failureInfo] This property - * is set only if the task is in the completed state and encountered a failure. - * @member {string} [jobPreparationTaskExecutionInfo.failureInfo.category] - * Possible values include: 'userError', 'serverError' - * @member {string} [jobPreparationTaskExecutionInfo.failureInfo.code] - * @member {string} [jobPreparationTaskExecutionInfo.failureInfo.message] - * @member {array} [jobPreparationTaskExecutionInfo.failureInfo.details] - * @member {number} [jobPreparationTaskExecutionInfo.retryCount] Task - * application failures (non-zero exit code) are retried, pre-processing errors - * (the task could not be run) and file upload errors are not retried. The - * Batch service will retry the task up to the limit specified by the - * constraints. - * @member {date} [jobPreparationTaskExecutionInfo.lastRetryTime] This property - * is set only if the task was retried (i.e. retryCount is nonzero). If - * present, this is typically the same as startTime, but may be different if - * the task has been restarted for reasons other than retry; for example, if - * the compute node was rebooted during a retry, then the startTime is updated - * but the lastRetryTime is not. - * @member {string} [jobPreparationTaskExecutionInfo.result] If the value is - * 'failed', then the details of the failure can be found in the failureInfo - * property. Possible values include: 'success', 'failure' - * @member {object} [jobReleaseTaskExecutionInfo] Information about the - * execution status of the Job Release task on this compute node. This property - * is set only if the Job Release task has run on the node. - * @member {date} [jobReleaseTaskExecutionInfo.startTime] If the task has been - * restarted or retried, this is the most recent time at which the task started - * running. - * @member {date} [jobReleaseTaskExecutionInfo.endTime] This property is set - * only if the task is in the Completed state. - * @member {string} [jobReleaseTaskExecutionInfo.state] Possible values - * include: 'running', 'completed' - * @member {string} [jobReleaseTaskExecutionInfo.taskRootDirectory] - * @member {string} [jobReleaseTaskExecutionInfo.taskRootDirectoryUrl] - * @member {number} [jobReleaseTaskExecutionInfo.exitCode] This parameter is - * returned only if the task is in the completed state. The exit code for a - * process reflects the specific convention implemented by the application - * developer for that process. If you use the exit code value to make decisions - * in your code, be sure that you know the exit code convention used by the - * application process. Note that the exit code may also be generated by the - * compute node operating system, such as when a process is forcibly - * terminated. - * @member {object} [jobReleaseTaskExecutionInfo.containerInfo] This property - * is set only if the task runs in a container context. - * @member {string} [jobReleaseTaskExecutionInfo.containerInfo.containerId] - * @member {string} [jobReleaseTaskExecutionInfo.containerInfo.state] This is - * the state of the container according to the Docker service. It is equivalent - * to the status field returned by "docker inspect". - * @member {string} [jobReleaseTaskExecutionInfo.containerInfo.error] This is - * the detailed error string from the Docker service, if available. It is - * equivalent to the error field returned by "docker inspect". - * @member {object} [jobReleaseTaskExecutionInfo.failureInfo] This property is - * set only if the task is in the completed state and encountered a failure. - * @member {string} [jobReleaseTaskExecutionInfo.failureInfo.category] Possible - * values include: 'userError', 'serverError' - * @member {string} [jobReleaseTaskExecutionInfo.failureInfo.code] - * @member {string} [jobReleaseTaskExecutionInfo.failureInfo.message] - * @member {array} [jobReleaseTaskExecutionInfo.failureInfo.details] - * @member {string} [jobReleaseTaskExecutionInfo.result] If the value is - * 'failed', then the details of the failure can be found in the failureInfo - * property. Possible values include: 'success', 'failure' + * @summary The status of the Job Preparation and Job Release tasks on a compute node. */ export interface JobPreparationAndReleaseTaskExecutionInformation { + /** + * @summary The ID of the pool containing the compute node to which this entry refers. + */ poolId?: string; + /** + * @summary The ID of the compute node to which this entry refers. + */ nodeId?: string; + /** + * @summary The URL of the compute node to which this entry refers. + */ nodeUrl?: string; + /** + * @summary Information about the execution status of the Job Preparation task on this compute + * node. + */ jobPreparationTaskExecutionInfo?: JobPreparationTaskExecutionInformation; + /** + * @summary Information about the execution status of the Job Release task on this compute node. + * @description This property is set only if the Job Release task has run on the node. + */ jobReleaseTaskExecutionInfo?: JobReleaseTaskExecutionInformation; } /** - * @class - * Initializes a new instance of the TaskCounts class. - * @constructor * @summary The task counts for a job. - * - * @member {number} active The number of tasks in the active state. - * @member {number} running The number of tasks in the running or preparing - * state. - * @member {number} completed The number of tasks in the completed state. - * @member {number} succeeded The number of tasks which succeeded. A task - * succeeds if its result (found in the executionInfo property) is 'success'. - * @member {number} failed The number of tasks which failed. A task fails if - * its result (found in the executionInfo property) is 'failure'. */ export interface TaskCounts { + /** + * @summary The number of tasks in the active state. + */ active: number; + /** + * @summary The number of tasks in the running or preparing state. + */ running: number; + /** + * @summary The number of tasks in the completed state. + */ completed: number; + /** + * @summary The number of tasks which succeeded. A task succeeds if its result (found in the + * executionInfo property) is 'success'. + */ succeeded: number; + /** + * @summary The number of tasks which failed. A task fails if its result (found in the + * executionInfo property) is 'failure'. + */ failed: number; } /** - * @class - * Initializes a new instance of the AutoScaleRunError class. - * @constructor - * @summary An error that occurred when executing or evaluating a pool - * autoscale formula. - * - * @member {string} [code] An identifier for the autoscale error. Codes are - * invariant and are intended to be consumed programmatically. - * @member {string} [message] A message describing the autoscale error, - * intended to be suitable for display in a user interface. - * @member {array} [values] A list of additional error details related to the - * autoscale error. + * @summary An error that occurred when executing or evaluating a pool autoscale formula. */ export interface AutoScaleRunError { + /** + * @summary An identifier for the autoscale error. Codes are invariant and are intended to be + * consumed programmatically. + */ code?: string; + /** + * @summary A message describing the autoscale error, intended to be suitable for display in a + * user interface. + */ message?: string; + /** + * @summary A list of additional error details related to the autoscale error. + */ values?: NameValuePair[]; } /** - * @class - * Initializes a new instance of the AutoScaleRun class. - * @constructor - * @summary The results and errors from an execution of a pool autoscale - * formula. - * - * @member {date} timestamp The time at which the autoscale formula was last - * evaluated. - * @member {string} [results] The final values of all variables used in the - * evaluation of the autoscale formula. Each variable value is returned in the - * form $variable=value, and variables are separated by semicolons. - * @member {object} [error] Details of the error encountered evaluating the - * autoscale formula on the pool, if the evaluation was unsuccessful. - * @member {string} [error.code] - * @member {string} [error.message] - * @member {array} [error.values] + * @summary The results and errors from an execution of a pool autoscale formula. */ export interface AutoScaleRun { + /** + * @summary The time at which the autoscale formula was last evaluated. + */ timestamp: Date; + /** + * @summary The final values of all variables used in the evaluation of the autoscale formula. + * @description Each variable value is returned in the form $variable=value, and variables are + * separated by semicolons. + */ results?: string; + /** + * @summary Details of the error encountered evaluating the autoscale formula on the pool, if the + * evaluation was unsuccessful. + */ error?: AutoScaleRunError; } /** - * @class - * Initializes a new instance of the ResizeError class. - * @constructor * @summary An error that occurred when resizing a pool. - * - * @member {string} [code] An identifier for the pool resize error. Codes are - * invariant and are intended to be consumed programmatically. - * @member {string} [message] A message describing the pool resize error, - * intended to be suitable for display in a user interface. - * @member {array} [values] A list of additional error details related to the - * pool resize error. */ export interface ResizeError { + /** + * @summary An identifier for the pool resize error. Codes are invariant and are intended to be + * consumed programmatically. + */ code?: string; + /** + * @summary A message describing the pool resize error, intended to be suitable for display in a + * user interface. + */ message?: string; + /** + * @summary A list of additional error details related to the pool resize error. + */ values?: NameValuePair[]; } /** - * @class - * Initializes a new instance of the CloudPool class. - * @constructor * @summary A pool in the Azure Batch service. - * - * @member {string} [id] A string that uniquely identifies the pool within the - * account. The ID can contain any combination of alphanumeric characters - * including hyphens and underscores, and cannot contain more than 64 - * characters. The ID is case-preserving and case-insensitive (that is, you may - * not have two IDs within an account that differ only by case). - * @member {string} [displayName] The display name for the pool. The display - * name need not be unique and can contain any Unicode characters up to a - * maximum length of 1024. - * @member {string} [url] The URL of the pool. - * @member {string} [eTag] The ETag of the pool. This is an opaque string. You - * can use it to detect whether the pool has changed between requests. In - * particular, you can be pass the ETag when updating a pool to specify that - * your changes should take effect only if nobody else has modified the pool in - * the meantime. - * @member {date} [lastModified] The last modified time of the pool. This is - * the last time at which the pool level data, such as the targetDedicatedNodes - * or enableAutoscale settings, changed. It does not factor in node-level - * changes such as a compute node changing state. - * @member {date} [creationTime] The creation time of the pool. - * @member {string} [state] The current state of the pool. Possible values - * include: 'active', 'deleting', 'upgrading' - * @member {date} [stateTransitionTime] The time at which the pool entered its - * current state. - * @member {string} [allocationState] Whether the pool is resizing. Possible - * values include: 'steady', 'resizing', 'stopping' - * @member {date} [allocationStateTransitionTime] The time at which the pool - * entered its current allocation state. - * @member {string} [vmSize] The size of virtual machines in the pool. All - * virtual machines in a pool are the same size. For information about - * available sizes of virtual machines in pools, see Choose a VM size for - * compute nodes in an Azure Batch pool - * (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). - * @member {object} [cloudServiceConfiguration] The cloud service configuration - * for the pool. This property and virtualMachineConfiguration are mutually - * exclusive and one of the properties must be specified. This property cannot - * be specified if the Batch account was created with its poolAllocationMode - * property set to 'UserSubscription'. - * @member {string} [cloudServiceConfiguration.osFamily] Possible values are: - * 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. - * 3 - OS Family 3, equivalent to Windows Server 2012. - * 4 - OS Family 4, equivalent to Windows Server 2012 R2. - * 5 - OS Family 5, equivalent to Windows Server 2016. For more information, - * see Azure Guest OS Releases - * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). - * @member {string} [cloudServiceConfiguration.targetOSVersion] The default - * value is * which specifies the latest operating system version for the - * specified OS family. - * @member {string} [cloudServiceConfiguration.currentOSVersion] This may - * differ from targetOSVersion if the pool state is Upgrading. In this case - * some virtual machines may be on the targetOSVersion and some may be on the - * currentOSVersion during the upgrade process. Once all virtual machines have - * upgraded, currentOSVersion is updated to be the same as targetOSVersion. - * @member {object} [virtualMachineConfiguration] The virtual machine - * configuration for the pool. This property and cloudServiceConfiguration are - * mutually exclusive and one of the properties must be specified. - * @member {object} [virtualMachineConfiguration.imageReference] - * @member {string} [virtualMachineConfiguration.imageReference.publisher] For - * example, Canonical or MicrosoftWindowsServer. - * @member {string} [virtualMachineConfiguration.imageReference.offer] For - * example, UbuntuServer or WindowsServer. - * @member {string} [virtualMachineConfiguration.imageReference.sku] For - * example, 14.04.0-LTS or 2012-R2-Datacenter. - * @member {string} [virtualMachineConfiguration.imageReference.version] A - * value of 'latest' can be specified to select the latest version of an image. - * If omitted, the default is 'latest'. - * @member {string} - * [virtualMachineConfiguration.imageReference.virtualMachineImageId] This - * property is mutually exclusive with other ImageReference properties. The - * virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * @member {object} [virtualMachineConfiguration.osDisk] - * @member {string} [virtualMachineConfiguration.osDisk.caching] The default - * value for caching is readwrite. For information about the caching options - * see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' - * @member {string} [virtualMachineConfiguration.nodeAgentSKUId] The Batch node - * agent is a program that runs on each node in the pool, and provides the - * command-and-control interface between the node and the Batch service. There - * are different implementations of the node agent, known as SKUs, for - * different operating systems. You must specify a node agent SKU which matches - * the selected image reference. To get the list of supported node agent SKUs - * along with their list of verified image references, see the 'List supported - * node agent SKUs' operation. - * @member {object} [virtualMachineConfiguration.windowsConfiguration] This - * property must not be specified if the imageReference or osDisk property - * specifies a Linux OS image. - * @member {boolean} - * [virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] If - * omitted, the default value is true. - * @member {array} [virtualMachineConfiguration.dataDisks] This property must - * be specified if the compute nodes in the pool need to have empty data disks - * attached to them. This cannot be updated. Each node gets its own disk (the - * disk is not a file share). Existing disks cannot be attached, each attached - * disk is empty. When the node is removed from the pool, the disk and all data - * associated with it is also deleted. The disk is not formatted after being - * attached, it must be formatted before use - for more information see - * https://docs.microsoft.com/en-us/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux - * and - * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. - * @member {string} [virtualMachineConfiguration.licenseType] This only applies - * to images that contain the Windows operating system, and should only be used - * when you hold valid on-premises licenses for the nodes which will be - * deployed. If omitted, no on-premises licensing discount is applied. Values - * are: - * - * Windows_Server - The on-premises license is for Windows Server. - * Windows_Client - The on-premises license is for Windows Client. - * @member {object} [virtualMachineConfiguration.containerConfiguration] If - * specified, setup is performed on each node in the pool to allow tasks to run - * in containers. All regular tasks and job manager tasks run on this pool must - * specify the containerSettings property, and all other tasks may specify it. - * @member {array} - * [virtualMachineConfiguration.containerConfiguration.containerImageNames] - * This is the full image reference, as would be specified to "docker pull". An - * image will be sourced from the default Docker registry unless the image is - * fully qualified with an alternative registry. - * @member {array} - * [virtualMachineConfiguration.containerConfiguration.containerRegistries] If - * any images must be downloaded from a private registry which requires - * credentials, then those credentials must be provided here. - * @member {moment.duration} [resizeTimeout] The timeout for allocation of - * compute nodes to the pool. This is the timeout for the most recent resize - * operation. (The initial sizing when the pool is created counts as a resize.) - * The default value is 15 minutes. - * @member {array} [resizeErrors] A list of errors encountered while performing - * the last resize on the pool. This property is set only if one or more errors - * occurred during the last pool resize, and only when the pool allocationState - * is Steady. - * @member {number} [currentDedicatedNodes] The number of dedicated compute - * nodes currently in the pool. - * @member {number} [currentLowPriorityNodes] The number of low-priority - * compute nodes currently in the pool. Low-priority compute nodes which have - * been preempted are included in this count. - * @member {number} [targetDedicatedNodes] The desired number of dedicated - * compute nodes in the pool. - * @member {number} [targetLowPriorityNodes] The desired number of low-priority - * compute nodes in the pool. - * @member {boolean} [enableAutoScale] Whether the pool size should - * automatically adjust over time. If false, at least one of - * targetDedicateNodes and targetLowPriorityNodes must be specified. If true, - * the autoScaleFormula property is required and the pool automatically resizes - * according to the formula. The default value is false. - * @member {string} [autoScaleFormula] A formula for the desired number of - * compute nodes in the pool. This property is set only if the pool - * automatically scales, i.e. enableAutoScale is true. - * @member {moment.duration} [autoScaleEvaluationInterval] The time interval at - * which to automatically adjust the pool size according to the autoscale - * formula. This property is set only if the pool automatically scales, i.e. - * enableAutoScale is true. - * @member {object} [autoScaleRun] The results and errors from the last - * execution of the autoscale formula. This property is set only if the pool - * automatically scales, i.e. enableAutoScale is true. - * @member {date} [autoScaleRun.timestamp] - * @member {string} [autoScaleRun.results] Each variable value is returned in - * the form $variable=value, and variables are separated by semicolons. - * @member {object} [autoScaleRun.error] - * @member {string} [autoScaleRun.error.code] - * @member {string} [autoScaleRun.error.message] - * @member {array} [autoScaleRun.error.values] - * @member {boolean} [enableInterNodeCommunication] Whether the pool permits - * direct communication between nodes. This imposes restrictions on which nodes - * can be assigned to the pool. Specifying this value can reduce the chance of - * the requested number of nodes to be allocated in the pool. - * @member {object} [networkConfiguration] The network configuration for the - * pool. - * @member {string} [networkConfiguration.subnetId] The virtual network must be - * in the same region and subscription as the Azure Batch account. The - * specified subnet should have enough free IP addresses to accommodate the - * number of nodes in the pool. If the subnet doesn't have enough free IP - * addresses, the pool will partially allocate compute nodes, and a resize - * error will occur. The 'MicrosoftAzureBatch' service principal must have the - * 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) role - * for the specified VNet. The specified subnet must allow communication from - * the Azure Batch service to be able to schedule tasks on the compute nodes. - * This can be verified by checking if the specified VNet has any associated - * Network Security Groups (NSG). If communication to the compute nodes in the - * specified subnet is denied by an NSG, then the Batch service will set the - * state of the compute nodes to unusable. For pools created with - * virtualMachineConfiguration only ARM virtual networks - * ('Microsoft.Network/virtualNetworks') are supported, but for pools created - * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration - * @member {object} [networkConfiguration.endpointConfiguration] Pool endpoint - * configuration is only supported on pools with the - * virtualMachineConfiguration property. - * @member {array} [networkConfiguration.endpointConfiguration.inboundNATPools] - * The maximum number of inbound NAT pools per Batch pool is 5. If the maximum - * number of inbound NAT pools is exceeded the request fails with HTTP status - * code 400. - * @member {object} [startTask] A task specified to run on each compute node as - * it joins the pool. - * @member {string} [startTask.commandLine] The command line does not run under - * a shell, and therefore cannot take advantage of shell features such as - * environment variable expansion. If you want to take advantage of such - * features, you should invoke the shell in the command line, for example using - * "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the - * command line refers to file paths, it should use a relative path (relative - * to the task working directory), or use the Batch provided environment - * variable - * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [startTask.containerSettings] When this is specified, all - * directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure - * Batch directories on the node) are mapped into the container, all task - * environment variables are mapped into the container, and the task command - * line is executed in the container. - * @member {string} [startTask.containerSettings.containerRunOptions] These - * additional options are supplied as arguments to the "docker create" command, - * in addition to those controlled by the Batch Service. - * @member {string} [startTask.containerSettings.imageName] This is the full - * image reference, as would be specified to "docker pull". If no tag is - * provided as part of the image name, the tag ":latest" is used as a default. - * @member {object} [startTask.containerSettings.registry] This setting can be - * omitted if was already provided at pool creation. - * @member {string} [startTask.containerSettings.registry.registryServer] If - * omitted, the default is "docker.io". - * @member {string} [startTask.containerSettings.registry.userName] - * @member {string} [startTask.containerSettings.registry.password] - * @member {array} [startTask.resourceFiles] Files listed under this element - * are located in the task's working directory. - * @member {array} [startTask.environmentSettings] - * @member {object} [startTask.userIdentity] If omitted, the task runs as a - * non-administrative user unique to the task. - * @member {string} [startTask.userIdentity.userName] The userName and autoUser - * properties are mutually exclusive; you must specify one but not both. - * @member {object} [startTask.userIdentity.autoUser] The userName and autoUser - * properties are mutually exclusive; you must specify one but not both. - * @member {string} [startTask.userIdentity.autoUser.scope] The default value - * is task. Possible values include: 'task', 'pool' - * @member {string} [startTask.userIdentity.autoUser.elevationLevel] The - * default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {number} [startTask.maxTaskRetryCount] The Batch service retries a - * task if its exit code is nonzero. Note that this value specifically controls - * the number of retries. The Batch service will try the task once, and may - * then retry up to this limit. For example, if the maximum retry count is 3, - * Batch tries the task up to 4 times (one initial try and 3 retries). If the - * maximum retry count is 0, the Batch service does not retry the task. If the - * maximum retry count is -1, the Batch service retries the task without limit. - * @member {boolean} [startTask.waitForSuccess] If true and the start task - * fails on a compute node, the Batch service retries the start task up to its - * maximum retry count (maxTaskRetryCount). If the task has still not completed - * successfully after all retries, then the Batch service marks the compute - * node unusable, and will not schedule tasks to it. This condition can be - * detected via the node state and failure info details. If false, the Batch - * service will not wait for the start task to complete. In this case, other - * tasks can start executing on the compute node while the start task is still - * running; and even if the start task fails, new tasks will continue to be - * scheduled on the node. The default is false. - * @member {array} [certificateReferences] The list of certificates to be - * installed on each compute node in the pool. For Windows compute nodes, the - * Batch service installs the certificates to the specified certificate store - * and location. For Linux compute nodes, the certificates are stored in a - * directory inside the task working directory and an environment variable - * AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this - * location. For certificates with visibility of 'remoteUser', a 'certs' - * directory is created in the user's home directory (e.g., - * /home/{user-name}/certs) and certificates are placed in that directory. - * @member {array} [applicationPackageReferences] The list of application - * packages to be installed on each compute node in the pool. - * @member {array} [applicationLicenses] The list of application licenses the - * Batch service will make available on each compute node in the pool. The list - * of application licenses must be a subset of available Batch service - * application licenses. If a license is requested which is not supported, pool - * creation will fail. - * @member {number} [maxTasksPerNode] The maximum number of tasks that can run - * concurrently on a single compute node in the pool. - * @member {object} [taskSchedulingPolicy] How tasks are distributed across - * compute nodes in a pool. - * @member {string} [taskSchedulingPolicy.nodeFillType] Possible values - * include: 'spread', 'pack' - * @member {array} [userAccounts] The list of user accounts to be created on - * each node in the pool. - * @member {array} [metadata] A list of name-value pairs associated with the - * pool as metadata. - * @member {object} [stats] Utilization and resource usage statistics for the - * entire lifetime of the pool. The statistics may not be immediately - * available. The Batch service performs periodic roll-up of statistics. The - * typical delay is about 30 minutes. - * @member {string} [stats.url] - * @member {date} [stats.startTime] - * @member {date} [stats.lastUpdateTime] - * @member {object} [stats.usageStats] - * @member {date} [stats.usageStats.startTime] - * @member {date} [stats.usageStats.lastUpdateTime] - * @member {moment.duration} [stats.usageStats.dedicatedCoreTime] - * @member {object} [stats.resourceStats] - * @member {date} [stats.resourceStats.startTime] - * @member {date} [stats.resourceStats.lastUpdateTime] - * @member {number} [stats.resourceStats.avgCPUPercentage] - * @member {number} [stats.resourceStats.avgMemoryGiB] - * @member {number} [stats.resourceStats.peakMemoryGiB] - * @member {number} [stats.resourceStats.avgDiskGiB] - * @member {number} [stats.resourceStats.peakDiskGiB] - * @member {number} [stats.resourceStats.diskReadIOps] - * @member {number} [stats.resourceStats.diskWriteIOps] - * @member {number} [stats.resourceStats.diskReadGiB] - * @member {number} [stats.resourceStats.diskWriteGiB] - * @member {number} [stats.resourceStats.networkReadGiB] - * @member {number} [stats.resourceStats.networkWriteGiB] */ export interface CloudPool { + /** + * @summary A string that uniquely identifies the pool within the account. + * @description The ID can contain any combination of alphanumeric characters including hyphens + * and underscores, and cannot contain more than 64 characters. The ID is case-preserving and + * case-insensitive (that is, you may not have two IDs within an account that differ only by + * case). + */ id?: string; + /** + * @summary The display name for the pool. + * @description The display name need not be unique and can contain any Unicode characters up to + * a maximum length of 1024. + */ displayName?: string; + /** + * @summary The URL of the pool. + */ url?: string; + /** + * @summary The ETag of the pool. + * @description This is an opaque string. You can use it to detect whether the pool has changed + * between requests. In particular, you can be pass the ETag when updating a pool to specify that + * your changes should take effect only if nobody else has modified the pool in the meantime. + */ eTag?: string; + /** + * @summary The last modified time of the pool. + * @description This is the last time at which the pool level data, such as the + * targetDedicatedNodes or enableAutoscale settings, changed. It does not factor in node-level + * changes such as a compute node changing state. + */ lastModified?: Date; + /** + * @summary The creation time of the pool. + */ creationTime?: Date; + /** + * @summary The current state of the pool. + * @description Possible values include: 'active', 'deleting' + */ state?: string; + /** + * @summary The time at which the pool entered its current state. + */ stateTransitionTime?: Date; + /** + * @summary Whether the pool is resizing. + * @description Possible values include: 'steady', 'resizing', 'stopping' + */ allocationState?: string; + /** + * @summary The time at which the pool entered its current allocation state. + */ allocationStateTransitionTime?: Date; + /** + * @summary The size of virtual machines in the pool. All virtual machines in a pool are the same + * size. + * @description For information about available sizes of virtual machines in pools, see Choose a + * VM size for compute nodes in an Azure Batch pool + * (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). + */ vmSize?: string; + /** + * @summary The cloud service configuration for the pool. + * @description This property and virtualMachineConfiguration are mutually exclusive and one of + * the properties must be specified. This property cannot be specified if the Batch account was + * created with its poolAllocationMode property set to 'UserSubscription'. + */ cloudServiceConfiguration?: CloudServiceConfiguration; + /** + * @summary The virtual machine configuration for the pool. + * @description This property and cloudServiceConfiguration are mutually exclusive and one of the + * properties must be specified. + */ virtualMachineConfiguration?: VirtualMachineConfiguration; + /** + * @summary The timeout for allocation of compute nodes to the pool. + * @description This is the timeout for the most recent resize operation. (The initial sizing + * when the pool is created counts as a resize.) The default value is 15 minutes. + */ resizeTimeout?: moment.Duration; + /** + * @summary A list of errors encountered while performing the last resize on the pool. + * @description This property is set only if one or more errors occurred during the last pool + * resize, and only when the pool allocationState is Steady. + */ resizeErrors?: ResizeError[]; + /** + * @summary The number of dedicated compute nodes currently in the pool. + */ currentDedicatedNodes?: number; + /** + * @summary The number of low-priority compute nodes currently in the pool. + * @description Low-priority compute nodes which have been preempted are included in this count. + */ currentLowPriorityNodes?: number; + /** + * @summary The desired number of dedicated compute nodes in the pool. + */ targetDedicatedNodes?: number; + /** + * @summary The desired number of low-priority compute nodes in the pool. + */ targetLowPriorityNodes?: number; + /** + * @summary Whether the pool size should automatically adjust over time. + * @description If false, at least one of targetDedicateNodes and targetLowPriorityNodes must be + * specified. If true, the autoScaleFormula property is required and the pool automatically + * resizes according to the formula. The default value is false. + */ enableAutoScale?: boolean; + /** + * @summary A formula for the desired number of compute nodes in the pool. + * @description This property is set only if the pool automatically scales, i.e. enableAutoScale + * is true. + */ autoScaleFormula?: string; + /** + * @summary The time interval at which to automatically adjust the pool size according to the + * autoscale formula. + * @description This property is set only if the pool automatically scales, i.e. enableAutoScale + * is true. + */ autoScaleEvaluationInterval?: moment.Duration; + /** + * @summary The results and errors from the last execution of the autoscale formula. + * @description This property is set only if the pool automatically scales, i.e. enableAutoScale + * is true. + */ autoScaleRun?: AutoScaleRun; + /** + * @summary Whether the pool permits direct communication between nodes. + * @description This imposes restrictions on which nodes can be assigned to the pool. Specifying + * this value can reduce the chance of the requested number of nodes to be allocated in the pool. + */ enableInterNodeCommunication?: boolean; + /** + * @summary The network configuration for the pool. + */ networkConfiguration?: NetworkConfiguration; + /** + * @summary A task specified to run on each compute node as it joins the pool. + */ startTask?: StartTask; + /** + * @summary The list of certificates to be installed on each compute node in the pool. + * @description For Windows compute nodes, the Batch service installs the certificates to the + * specified certificate store and location. For Linux compute nodes, the certificates are stored + * in a directory inside the task working directory and an environment variable + * AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For certificates + * with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory + * (e.g., /home/{user-name}/certs) and certificates are placed in that directory. + */ certificateReferences?: CertificateReference[]; + /** + * @summary The list of application packages to be installed on each compute node in the pool. + */ applicationPackageReferences?: ApplicationPackageReference[]; + /** + * @summary The list of application licenses the Batch service will make available on each + * compute node in the pool. + * @description The list of application licenses must be a subset of available Batch service + * application licenses. If a license is requested which is not supported, pool creation will + * fail. + */ applicationLicenses?: string[]; + /** + * @summary The maximum number of tasks that can run concurrently on a single compute node in the + * pool. + */ maxTasksPerNode?: number; + /** + * @summary How tasks are distributed across compute nodes in a pool. + */ taskSchedulingPolicy?: TaskSchedulingPolicy; + /** + * @summary The list of user accounts to be created on each node in the pool. + */ userAccounts?: UserAccount[]; + /** + * @summary A list of name-value pairs associated with the pool as metadata. + */ metadata?: MetadataItem[]; + /** + * @summary Utilization and resource usage statistics for the entire lifetime of the pool. The + * statistics may not be immediately available. The Batch service performs periodic roll-up of + * statistics. The typical delay is about 30 minutes. + */ stats?: PoolStatistics; } /** - * @class - * Initializes a new instance of the PoolAddParameter class. - * @constructor * @summary A pool in the Azure Batch service to add. - * - * @member {string} id A string that uniquely identifies the pool within the - * account. The ID can contain any combination of alphanumeric characters - * including hyphens and underscores, and cannot contain more than 64 - * characters. The ID is case-preserving and case-insensitive (that is, you may - * not have two pool IDs within an account that differ only by case). - * @member {string} [displayName] The display name for the pool. The display - * name need not be unique and can contain any Unicode characters up to a - * maximum length of 1024. - * @member {string} vmSize The size of virtual machines in the pool. All - * virtual machines in a pool are the same size. For information about - * available sizes of virtual machines for Cloud Services pools (pools created - * with cloudServiceConfiguration), see Sizes for Cloud Services - * (https://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). - * Batch supports all Cloud Services VM sizes except ExtraSmall, A1V2 and A2V2. - * For information about available VM sizes for pools using images from the - * Virtual Machines Marketplace (pools created with - * virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) - * (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) - * or Sizes for Virtual Machines (Windows) - * (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). - * Batch supports all Azure VM sizes except STANDARD_A0 and those with premium - * storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). - * @member {object} [cloudServiceConfiguration] The cloud service configuration - * for the pool. This property and virtualMachineConfiguration are mutually - * exclusive and one of the properties must be specified. This property cannot - * be specified if the Batch account was created with its poolAllocationMode - * property set to 'UserSubscription'. - * @member {string} [cloudServiceConfiguration.osFamily] Possible values are: - * 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. - * 3 - OS Family 3, equivalent to Windows Server 2012. - * 4 - OS Family 4, equivalent to Windows Server 2012 R2. - * 5 - OS Family 5, equivalent to Windows Server 2016. For more information, - * see Azure Guest OS Releases - * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). - * @member {string} [cloudServiceConfiguration.targetOSVersion] The default - * value is * which specifies the latest operating system version for the - * specified OS family. - * @member {string} [cloudServiceConfiguration.currentOSVersion] This may - * differ from targetOSVersion if the pool state is Upgrading. In this case - * some virtual machines may be on the targetOSVersion and some may be on the - * currentOSVersion during the upgrade process. Once all virtual machines have - * upgraded, currentOSVersion is updated to be the same as targetOSVersion. - * @member {object} [virtualMachineConfiguration] The virtual machine - * configuration for the pool. This property and cloudServiceConfiguration are - * mutually exclusive and one of the properties must be specified. - * @member {object} [virtualMachineConfiguration.imageReference] - * @member {string} [virtualMachineConfiguration.imageReference.publisher] For - * example, Canonical or MicrosoftWindowsServer. - * @member {string} [virtualMachineConfiguration.imageReference.offer] For - * example, UbuntuServer or WindowsServer. - * @member {string} [virtualMachineConfiguration.imageReference.sku] For - * example, 14.04.0-LTS or 2012-R2-Datacenter. - * @member {string} [virtualMachineConfiguration.imageReference.version] A - * value of 'latest' can be specified to select the latest version of an image. - * If omitted, the default is 'latest'. - * @member {string} - * [virtualMachineConfiguration.imageReference.virtualMachineImageId] This - * property is mutually exclusive with other ImageReference properties. The - * virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * @member {object} [virtualMachineConfiguration.osDisk] - * @member {string} [virtualMachineConfiguration.osDisk.caching] The default - * value for caching is readwrite. For information about the caching options - * see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' - * @member {string} [virtualMachineConfiguration.nodeAgentSKUId] The Batch node - * agent is a program that runs on each node in the pool, and provides the - * command-and-control interface between the node and the Batch service. There - * are different implementations of the node agent, known as SKUs, for - * different operating systems. You must specify a node agent SKU which matches - * the selected image reference. To get the list of supported node agent SKUs - * along with their list of verified image references, see the 'List supported - * node agent SKUs' operation. - * @member {object} [virtualMachineConfiguration.windowsConfiguration] This - * property must not be specified if the imageReference or osDisk property - * specifies a Linux OS image. - * @member {boolean} - * [virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] If - * omitted, the default value is true. - * @member {array} [virtualMachineConfiguration.dataDisks] This property must - * be specified if the compute nodes in the pool need to have empty data disks - * attached to them. This cannot be updated. Each node gets its own disk (the - * disk is not a file share). Existing disks cannot be attached, each attached - * disk is empty. When the node is removed from the pool, the disk and all data - * associated with it is also deleted. The disk is not formatted after being - * attached, it must be formatted before use - for more information see - * https://docs.microsoft.com/en-us/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux - * and - * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. - * @member {string} [virtualMachineConfiguration.licenseType] This only applies - * to images that contain the Windows operating system, and should only be used - * when you hold valid on-premises licenses for the nodes which will be - * deployed. If omitted, no on-premises licensing discount is applied. Values - * are: - * - * Windows_Server - The on-premises license is for Windows Server. - * Windows_Client - The on-premises license is for Windows Client. - * @member {object} [virtualMachineConfiguration.containerConfiguration] If - * specified, setup is performed on each node in the pool to allow tasks to run - * in containers. All regular tasks and job manager tasks run on this pool must - * specify the containerSettings property, and all other tasks may specify it. - * @member {array} - * [virtualMachineConfiguration.containerConfiguration.containerImageNames] - * This is the full image reference, as would be specified to "docker pull". An - * image will be sourced from the default Docker registry unless the image is - * fully qualified with an alternative registry. - * @member {array} - * [virtualMachineConfiguration.containerConfiguration.containerRegistries] If - * any images must be downloaded from a private registry which requires - * credentials, then those credentials must be provided here. - * @member {moment.duration} [resizeTimeout] The timeout for allocation of - * compute nodes to the pool. This timeout applies only to manual scaling; it - * has no effect when enableAutoScale is set to true. The default value is 15 - * minutes. The minimum value is 5 minutes. If you specify a value less than 5 - * minutes, the Batch service returns an error; if you are calling the REST API - * directly, the HTTP status code is 400 (Bad Request). - * @member {number} [targetDedicatedNodes] The desired number of dedicated - * compute nodes in the pool. This property must not be specified if - * enableAutoScale is set to true. If enableAutoScale is set to false, then you - * must set either targetDedicatedNodes, targetLowPriorityNodes, or both. - * @member {number} [targetLowPriorityNodes] The desired number of low-priority - * compute nodes in the pool. This property must not be specified if - * enableAutoScale is set to true. If enableAutoScale is set to false, then you - * must set either targetDedicatedNodes, targetLowPriorityNodes, or both. - * @member {boolean} [enableAutoScale] Whether the pool size should - * automatically adjust over time. If false, at least one of - * targetDedicateNodes and targetLowPriorityNodes must be specified. If true, - * the autoScaleFormula property is required and the pool automatically resizes - * according to the formula. The default value is false. - * @member {string} [autoScaleFormula] A formula for the desired number of - * compute nodes in the pool. This property must not be specified if - * enableAutoScale is set to false. It is required if enableAutoScale is set to - * true. The formula is checked for validity before the pool is created. If the - * formula is not valid, the Batch service rejects the request with detailed - * error information. For more information about specifying this formula, see - * 'Automatically scale compute nodes in an Azure Batch pool' - * (https://azure.microsoft.com/documentation/articles/batch-automatic-scaling/). - * @member {moment.duration} [autoScaleEvaluationInterval] The time interval at - * which to automatically adjust the pool size according to the autoscale - * formula. The default value is 15 minutes. The minimum and maximum value are - * 5 minutes and 168 hours respectively. If you specify a value less than 5 - * minutes or greater than 168 hours, the Batch service returns an error; if - * you are calling the REST API directly, the HTTP status code is 400 (Bad - * Request). - * @member {boolean} [enableInterNodeCommunication] Whether the pool permits - * direct communication between nodes. Enabling inter-node communication limits - * the maximum size of the pool due to deployment restrictions on the nodes of - * the pool. This may result in the pool not reaching its desired size. The - * default value is false. - * @member {object} [networkConfiguration] The network configuration for the - * pool. - * @member {string} [networkConfiguration.subnetId] The virtual network must be - * in the same region and subscription as the Azure Batch account. The - * specified subnet should have enough free IP addresses to accommodate the - * number of nodes in the pool. If the subnet doesn't have enough free IP - * addresses, the pool will partially allocate compute nodes, and a resize - * error will occur. The 'MicrosoftAzureBatch' service principal must have the - * 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) role - * for the specified VNet. The specified subnet must allow communication from - * the Azure Batch service to be able to schedule tasks on the compute nodes. - * This can be verified by checking if the specified VNet has any associated - * Network Security Groups (NSG). If communication to the compute nodes in the - * specified subnet is denied by an NSG, then the Batch service will set the - * state of the compute nodes to unusable. For pools created with - * virtualMachineConfiguration only ARM virtual networks - * ('Microsoft.Network/virtualNetworks') are supported, but for pools created - * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration - * @member {object} [networkConfiguration.endpointConfiguration] Pool endpoint - * configuration is only supported on pools with the - * virtualMachineConfiguration property. - * @member {array} [networkConfiguration.endpointConfiguration.inboundNATPools] - * The maximum number of inbound NAT pools per Batch pool is 5. If the maximum - * number of inbound NAT pools is exceeded the request fails with HTTP status - * code 400. - * @member {object} [startTask] A task specified to run on each compute node as - * it joins the pool. The task runs when the node is added to the pool or when - * the node is restarted. - * @member {string} [startTask.commandLine] The command line does not run under - * a shell, and therefore cannot take advantage of shell features such as - * environment variable expansion. If you want to take advantage of such - * features, you should invoke the shell in the command line, for example using - * "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the - * command line refers to file paths, it should use a relative path (relative - * to the task working directory), or use the Batch provided environment - * variable - * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [startTask.containerSettings] When this is specified, all - * directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure - * Batch directories on the node) are mapped into the container, all task - * environment variables are mapped into the container, and the task command - * line is executed in the container. - * @member {string} [startTask.containerSettings.containerRunOptions] These - * additional options are supplied as arguments to the "docker create" command, - * in addition to those controlled by the Batch Service. - * @member {string} [startTask.containerSettings.imageName] This is the full - * image reference, as would be specified to "docker pull". If no tag is - * provided as part of the image name, the tag ":latest" is used as a default. - * @member {object} [startTask.containerSettings.registry] This setting can be - * omitted if was already provided at pool creation. - * @member {string} [startTask.containerSettings.registry.registryServer] If - * omitted, the default is "docker.io". - * @member {string} [startTask.containerSettings.registry.userName] - * @member {string} [startTask.containerSettings.registry.password] - * @member {array} [startTask.resourceFiles] Files listed under this element - * are located in the task's working directory. - * @member {array} [startTask.environmentSettings] - * @member {object} [startTask.userIdentity] If omitted, the task runs as a - * non-administrative user unique to the task. - * @member {string} [startTask.userIdentity.userName] The userName and autoUser - * properties are mutually exclusive; you must specify one but not both. - * @member {object} [startTask.userIdentity.autoUser] The userName and autoUser - * properties are mutually exclusive; you must specify one but not both. - * @member {string} [startTask.userIdentity.autoUser.scope] The default value - * is task. Possible values include: 'task', 'pool' - * @member {string} [startTask.userIdentity.autoUser.elevationLevel] The - * default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {number} [startTask.maxTaskRetryCount] The Batch service retries a - * task if its exit code is nonzero. Note that this value specifically controls - * the number of retries. The Batch service will try the task once, and may - * then retry up to this limit. For example, if the maximum retry count is 3, - * Batch tries the task up to 4 times (one initial try and 3 retries). If the - * maximum retry count is 0, the Batch service does not retry the task. If the - * maximum retry count is -1, the Batch service retries the task without limit. - * @member {boolean} [startTask.waitForSuccess] If true and the start task - * fails on a compute node, the Batch service retries the start task up to its - * maximum retry count (maxTaskRetryCount). If the task has still not completed - * successfully after all retries, then the Batch service marks the compute - * node unusable, and will not schedule tasks to it. This condition can be - * detected via the node state and failure info details. If false, the Batch - * service will not wait for the start task to complete. In this case, other - * tasks can start executing on the compute node while the start task is still - * running; and even if the start task fails, new tasks will continue to be - * scheduled on the node. The default is false. - * @member {array} [certificateReferences] The list of certificates to be - * installed on each compute node in the pool. For Windows compute nodes, the - * Batch service installs the certificates to the specified certificate store - * and location. For Linux compute nodes, the certificates are stored in a - * directory inside the task working directory and an environment variable - * AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this - * location. For certificates with visibility of 'remoteUser', a 'certs' - * directory is created in the user's home directory (e.g., - * /home/{user-name}/certs) and certificates are placed in that directory. - * @member {array} [applicationPackageReferences] The list of application - * packages to be installed on each compute node in the pool. - * @member {array} [applicationLicenses] The list of application licenses the - * Batch service will make available on each compute node in the pool. The list - * of application licenses must be a subset of available Batch service - * application licenses. If a license is requested which is not supported, pool - * creation will fail. - * @member {number} [maxTasksPerNode] The maximum number of tasks that can run - * concurrently on a single compute node in the pool. The default value is 1. - * The maximum value of this setting depends on the size of the compute nodes - * in the pool (the vmSize setting). - * @member {object} [taskSchedulingPolicy] How tasks are distributed across - * compute nodes in a pool. - * @member {string} [taskSchedulingPolicy.nodeFillType] Possible values - * include: 'spread', 'pack' - * @member {array} [userAccounts] The list of user accounts to be created on - * each node in the pool. - * @member {array} [metadata] A list of name-value pairs associated with the - * pool as metadata. The Batch service does not assign any meaning to metadata; - * it is solely for the use of user code. */ export interface PoolAddParameter { + /** + * @summary A string that uniquely identifies the pool within the account. + * @description The ID can contain any combination of alphanumeric characters including hyphens + * and underscores, and cannot contain more than 64 characters. The ID is case-preserving and + * case-insensitive (that is, you may not have two pool IDs within an account that differ only by + * case). + */ id: string; + /** + * @summary The display name for the pool. + * @description The display name need not be unique and can contain any Unicode characters up to + * a maximum length of 1024. + */ displayName?: string; + /** + * @summary The size of virtual machines in the pool. All virtual machines in a pool are the same + * size. + * @description For information about available sizes of virtual machines for Cloud Services + * pools (pools created with cloudServiceConfiguration), see Sizes for Cloud Services + * (https://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). Batch + * supports all Cloud Services VM sizes except ExtraSmall, A1V2 and A2V2. For information about + * available VM sizes for pools using images from the Virtual Machines Marketplace (pools created + * with virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) + * (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes + * for Virtual Machines (Windows) + * (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch + * supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, + * STANDARD_DS, and STANDARD_DSV2 series). + */ vmSize: string; + /** + * @summary The cloud service configuration for the pool. + * @description This property and virtualMachineConfiguration are mutually exclusive and one of + * the properties must be specified. This property cannot be specified if the Batch account was + * created with its poolAllocationMode property set to 'UserSubscription'. + */ cloudServiceConfiguration?: CloudServiceConfiguration; + /** + * @summary The virtual machine configuration for the pool. + * @description This property and cloudServiceConfiguration are mutually exclusive and one of the + * properties must be specified. + */ virtualMachineConfiguration?: VirtualMachineConfiguration; + /** + * @summary The timeout for allocation of compute nodes to the pool. + * @description This timeout applies only to manual scaling; it has no effect when + * enableAutoScale is set to true. The default value is 15 minutes. The minimum value is 5 + * minutes. If you specify a value less than 5 minutes, the Batch service returns an error; if + * you are calling the REST API directly, the HTTP status code is 400 (Bad Request). + */ resizeTimeout?: moment.Duration; + /** + * @summary The desired number of dedicated compute nodes in the pool. + * @description This property must not be specified if enableAutoScale is set to true. If + * enableAutoScale is set to false, then you must set either targetDedicatedNodes, + * targetLowPriorityNodes, or both. + */ targetDedicatedNodes?: number; + /** + * @summary The desired number of low-priority compute nodes in the pool. + * @description This property must not be specified if enableAutoScale is set to true. If + * enableAutoScale is set to false, then you must set either targetDedicatedNodes, + * targetLowPriorityNodes, or both. + */ targetLowPriorityNodes?: number; + /** + * @summary Whether the pool size should automatically adjust over time. + * @description If false, at least one of targetDedicateNodes and targetLowPriorityNodes must be + * specified. If true, the autoScaleFormula property is required and the pool automatically + * resizes according to the formula. The default value is false. + */ enableAutoScale?: boolean; + /** + * @summary A formula for the desired number of compute nodes in the pool. + * @description This property must not be specified if enableAutoScale is set to false. It is + * required if enableAutoScale is set to true. The formula is checked for validity before the + * pool is created. If the formula is not valid, the Batch service rejects the request with + * detailed error information. For more information about specifying this formula, see + * 'Automatically scale compute nodes in an Azure Batch pool' + * (https://azure.microsoft.com/documentation/articles/batch-automatic-scaling/). + */ autoScaleFormula?: string; + /** + * @summary The time interval at which to automatically adjust the pool size according to the + * autoscale formula. + * @description The default value is 15 minutes. The minimum and maximum value are 5 minutes and + * 168 hours respectively. If you specify a value less than 5 minutes or greater than 168 hours, + * the Batch service returns an error; if you are calling the REST API directly, the HTTP status + * code is 400 (Bad Request). + */ autoScaleEvaluationInterval?: moment.Duration; + /** + * @summary Whether the pool permits direct communication between nodes. + * @description Enabling inter-node communication limits the maximum size of the pool due to + * deployment restrictions on the nodes of the pool. This may result in the pool not reaching its + * desired size. The default value is false. + */ enableInterNodeCommunication?: boolean; + /** + * @summary The network configuration for the pool. + */ networkConfiguration?: NetworkConfiguration; + /** + * @summary A task specified to run on each compute node as it joins the pool. + * @description The task runs when the node is added to the pool or when the node is restarted. + */ startTask?: StartTask; + /** + * @summary The list of certificates to be installed on each compute node in the pool. + * @description For Windows compute nodes, the Batch service installs the certificates to the + * specified certificate store and location. For Linux compute nodes, the certificates are stored + * in a directory inside the task working directory and an environment variable + * AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For certificates + * with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory + * (e.g., /home/{user-name}/certs) and certificates are placed in that directory. + */ certificateReferences?: CertificateReference[]; + /** + * @summary The list of application packages to be installed on each compute node in the pool. + */ applicationPackageReferences?: ApplicationPackageReference[]; + /** + * @summary The list of application licenses the Batch service will make available on each + * compute node in the pool. + * @description The list of application licenses must be a subset of available Batch service + * application licenses. If a license is requested which is not supported, pool creation will + * fail. + */ applicationLicenses?: string[]; + /** + * @summary The maximum number of tasks that can run concurrently on a single compute node in the + * pool. + * @description The default value is 1. The maximum value of this setting depends on the size of + * the compute nodes in the pool (the vmSize setting). + */ maxTasksPerNode?: number; + /** + * @summary How tasks are distributed across compute nodes in a pool. + */ taskSchedulingPolicy?: TaskSchedulingPolicy; + /** + * @summary The list of user accounts to be created on each node in the pool. + */ userAccounts?: UserAccount[]; + /** + * @summary A list of name-value pairs associated with the pool as metadata. + * @description The Batch service does not assign any meaning to metadata; it is solely for the + * use of user code. + */ metadata?: MetadataItem[]; } /** - * @class - * Initializes a new instance of the AffinityInformation class. - * @constructor - * @summary A locality hint that can be used by the Batch service to select a - * compute node on which to start a task. - * - * @member {string} affinityId An opaque string representing the location of a - * compute node or a task that has run previously. You can pass the affinityId - * of a compute node to indicate that this task needs to run on that compute - * node. Note that this is just a soft affinity. If the target node is busy or - * unavailable at the time the task is scheduled, then the task will be - * scheduled elsewhere. + * @summary A locality hint that can be used by the Batch service to select a compute node on which + * to start a task. */ export interface AffinityInformation { + /** + * @summary An opaque string representing the location of a compute node or a task that has run + * previously. + * @description You can pass the affinityId of a compute node to indicate that this task needs to + * run on that compute node. Note that this is just a soft affinity. If the target node is busy + * or unavailable at the time the task is scheduled, then the task will be scheduled elsewhere. + */ affinityId: string; } /** - * @class - * Initializes a new instance of the TaskExecutionInformation class. - * @constructor * @summary Information about the execution of a task. - * - * @member {date} [startTime] The time at which the task started running. - * 'Running' corresponds to the running state, so if the task specifies - * resource files or application packages, then the start time reflects the - * time at which the task started downloading or deploying these. If the task - * has been restarted or retried, this is the most recent time at which the - * task started running. This property is present only for tasks that are in - * the running or completed state. - * @member {date} [endTime] The time at which the task completed. This property - * is set only if the task is in the Completed state. - * @member {number} [exitCode] The exit code of the program specified on the - * task command line. This property is set only if the task is in the completed - * state. In general, the exit code for a process reflects the specific - * convention implemented by the application developer for that process. If you - * use the exit code value to make decisions in your code, be sure that you - * know the exit code convention used by the application process. However, if - * the Batch service terminates the task (due to timeout, or user termination - * via the API) you may see an operating system-defined exit code. - * @member {object} [containerInfo] Information about the container under which - * the task is executing. This property is set only if the task runs in a - * container context. - * @member {string} [containerInfo.containerId] - * @member {string} [containerInfo.state] This is the state of the container - * according to the Docker service. It is equivalent to the status field - * returned by "docker inspect". - * @member {string} [containerInfo.error] This is the detailed error string - * from the Docker service, if available. It is equivalent to the error field - * returned by "docker inspect". - * @member {object} [failureInfo] Information describing the task failure, if - * any. This property is set only if the task is in the completed state and - * encountered a failure. - * @member {string} [failureInfo.category] Possible values include: - * 'userError', 'serverError' - * @member {string} [failureInfo.code] - * @member {string} [failureInfo.message] - * @member {array} [failureInfo.details] - * @member {number} retryCount The number of times the task has been retried by - * the Batch service. Task application failures (non-zero exit code) are - * retried, pre-processing errors (the task could not be run) and file upload - * errors are not retried. The Batch service will retry the task up to the - * limit specified by the constraints. - * @member {date} [lastRetryTime] The most recent time at which a retry of the - * task started running. This element is present only if the task was retried - * (i.e. retryCount is nonzero). If present, this is typically the same as - * startTime, but may be different if the task has been restarted for reasons - * other than retry; for example, if the compute node was rebooted during a - * retry, then the startTime is updated but the lastRetryTime is not. - * @member {number} requeueCount The number of times the task has been requeued - * by the Batch service as the result of a user request. When the user removes - * nodes from a pool (by resizing/shrinking the pool) or when the job is being - * disabled, the user can specify that running tasks on the nodes be requeued - * for execution. This count tracks how many times the task has been requeued - * for these reasons. - * @member {date} [lastRequeueTime] The most recent time at which the task has - * been requeued by the Batch service as the result of a user request. This - * property is set only if the requeueCount is nonzero. - * @member {string} [result] The result of the task execution. If the value is - * 'failed', then the details of the failure can be found in the failureInfo - * property. Possible values include: 'success', 'failure' */ export interface TaskExecutionInformation { + /** + * @summary The time at which the task started running. + * @description 'Running' corresponds to the running state, so if the task specifies resource + * files or application packages, then the start time reflects the time at which the task started + * downloading or deploying these. If the task has been restarted or retried, this is the most + * recent time at which the task started running. This property is present only for tasks that + * are in the running or completed state. + */ startTime?: Date; + /** + * @summary The time at which the task completed. + * @description This property is set only if the task is in the Completed state. + */ endTime?: Date; + /** + * @summary The exit code of the program specified on the task command line. + * @description This property is set only if the task is in the completed state. In general, the + * exit code for a process reflects the specific convention implemented by the application + * developer for that process. If you use the exit code value to make decisions in your code, be + * sure that you know the exit code convention used by the application process. However, if the + * Batch service terminates the task (due to timeout, or user termination via the API) you may + * see an operating system-defined exit code. + */ exitCode?: number; + /** + * @summary Information about the container under which the task is executing. + * @description This property is set only if the task runs in a container context. + */ containerInfo?: TaskContainerExecutionInformation; + /** + * @summary Information describing the task failure, if any. + * @description This property is set only if the task is in the completed state and encountered a + * failure. + */ failureInfo?: TaskFailureInformation; + /** + * @summary The number of times the task has been retried by the Batch service. + * @description Task application failures (non-zero exit code) are retried, pre-processing errors + * (the task could not be run) and file upload errors are not retried. The Batch service will + * retry the task up to the limit specified by the constraints. + */ retryCount: number; + /** + * @summary The most recent time at which a retry of the task started running. + * @description This element is present only if the task was retried (i.e. retryCount is + * nonzero). If present, this is typically the same as startTime, but may be different if the + * task has been restarted for reasons other than retry; for example, if the compute node was + * rebooted during a retry, then the startTime is updated but the lastRetryTime is not. + */ lastRetryTime?: Date; + /** + * @summary The number of times the task has been requeued by the Batch service as the result of + * a user request. + * @description When the user removes nodes from a pool (by resizing/shrinking the pool) or when + * the job is being disabled, the user can specify that running tasks on the nodes be requeued + * for execution. This count tracks how many times the task has been requeued for these reasons. + */ requeueCount: number; + /** + * @summary The most recent time at which the task has been requeued by the Batch service as the + * result of a user request. + * @description This property is set only if the requeueCount is nonzero. + */ lastRequeueTime?: Date; + /** + * @summary The result of the task execution. + * @description If the value is 'failed', then the details of the failure can be found in the + * failureInfo property. Possible values include: 'success', 'failure' + */ result?: string; } /** - * @class - * Initializes a new instance of the ComputeNodeInformation class. - * @constructor * @summary Information about the compute node on which a task ran. - * - * @member {string} [affinityId] An identifier for the compute node on which - * the task ran, which can be passed when adding a task to request that the - * task be scheduled on this compute node. - * @member {string} [nodeUrl] The URL of the node on which the task ran. . - * @member {string} [poolId] The ID of the pool on which the task ran. - * @member {string} [nodeId] The ID of the node on which the task ran. - * @member {string} [taskRootDirectory] The root directory of the task on the - * compute node. - * @member {string} [taskRootDirectoryUrl] The URL to the root directory of the - * task on the compute node. */ export interface ComputeNodeInformation { + /** + * @summary An identifier for the compute node on which the task ran, which can be passed when + * adding a task to request that the task be scheduled on this compute node. + */ affinityId?: string; + /** + * @summary The URL of the node on which the task ran. + */ nodeUrl?: string; + /** + * @summary The ID of the pool on which the task ran. + */ poolId?: string; + /** + * @summary The ID of the node on which the task ran. + */ nodeId?: string; + /** + * @summary The root directory of the task on the compute node. + */ taskRootDirectory?: string; + /** + * @summary The URL to the root directory of the task on the compute node. + */ taskRootDirectoryUrl?: string; } /** - * @class - * Initializes a new instance of the NodeAgentInformation class. - * @constructor * @summary Information about the node agent. - * - * The Batch node agent is a program that runs on each node in the pool and - * provides Batch capability on the compute node. - * - * @member {string} version The version of the Batch node agent running on the - * compute node. This version number can be checked against the node agent - * release notes located at - * https://github.com/Azure/Batch/blob/master/changelogs/nodeagent/CHANGELOG.md. - * @member {date} lastUpdateTime The time when the node agent was updated on - * the compute node. This is the most recent time that the node agent was - * updated to a new version. + * @description The Batch node agent is a program that runs on each node in the pool and provides + * Batch capability on the compute node. */ export interface NodeAgentInformation { + /** + * @summary The version of the Batch node agent running on the compute node. + * @description This version number can be checked against the node agent release notes located + * at https://github.com/Azure/Batch/blob/master/changelogs/nodeagent/CHANGELOG.md. + */ version: string; + /** + * @summary The time when the node agent was updated on the compute node. + * @description This is the most recent time that the node agent was updated to a new version. + */ lastUpdateTime: Date; } /** - * @class - * Initializes a new instance of the MultiInstanceSettings class. - * @constructor * @summary Settings which specify how to run a multi-instance task. - * - * Multi-instance tasks are commonly used to support MPI tasks. - * - * @member {number} [numberOfInstances] The number of compute nodes required by - * the task. If omitted, the default is 1. - * @member {string} coordinationCommandLine The command line to run on all the - * compute nodes to enable them to coordinate when the primary runs the main - * task command. A typical coordination command line launches a background - * service and verifies that the service is ready to process inter-node - * messages. - * @member {array} [commonResourceFiles] A list of files that the Batch service - * will download before running the coordination command line. The difference - * between common resource files and task resource files is that common - * resource files are downloaded for all subtasks including the primary, - * whereas task resource files are downloaded only for the primary. Also note - * that these resource files are not downloaded to the task working directory, - * but instead are downloaded to the task root directory (one directory above - * the working directory). There is a maximum size for the list of resource - * files. When the max size is exceeded, the request will fail and the - * response error code will be RequestEntityTooLarge. If this occurs, the - * collection of ResourceFiles must be reduced in size. This can be achieved - * using .zip files, Application Packages, or Docker Containers. + * @description Multi-instance tasks are commonly used to support MPI tasks. */ export interface MultiInstanceSettings { + /** + * @summary The number of compute nodes required by the task. + * @description If omitted, the default is 1. + */ numberOfInstances?: number; + /** + * @summary The command line to run on all the compute nodes to enable them to coordinate when + * the primary runs the main task command. + * @description A typical coordination command line launches a background service and verifies + * that the service is ready to process inter-node messages. + */ coordinationCommandLine: string; + /** + * @summary A list of files that the Batch service will download before running the coordination + * command line. + * @description The difference between common resource files and task resource files is that + * common resource files are downloaded for all subtasks including the primary, whereas task + * resource files are downloaded only for the primary. Also note that these resource files are + * not downloaded to the task working directory, but instead are downloaded to the task root + * directory (one directory above the working directory). There is a maximum size for the list + * of resource files. When the max size is exceeded, the request will fail and the response + * error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must + * be reduced in size. This can be achieved using .zip files, Application Packages, or Docker + * Containers. + */ commonResourceFiles?: ResourceFile[]; } /** - * @class - * Initializes a new instance of the TaskStatistics class. - * @constructor * @summary Resource usage statistics for a task. - * - * @member {string} url The URL of the statistics. - * @member {date} startTime The start time of the time range covered by the - * statistics. - * @member {date} lastUpdateTime The time at which the statistics were last - * updated. All statistics are limited to the range between startTime and - * lastUpdateTime. - * @member {moment.duration} userCPUTime The total user mode CPU time (summed - * across all cores and all compute nodes) consumed by the task. - * @member {moment.duration} kernelCPUTime The total kernel mode CPU time - * (summed across all cores and all compute nodes) consumed by the task. - * @member {moment.duration} wallClockTime The total wall clock time of the - * task. The wall clock time is the elapsed time from when the task started - * running on a compute node to when it finished (or to the last time the - * statistics were updated, if the task had not finished by then). If the task - * was retried, this includes the wall clock time of all the task retries. - * @member {number} readIOps The total number of disk read operations made by - * the task. - * @member {number} writeIOps The total number of disk write operations made by - * the task. - * @member {number} readIOGiB The total gibibytes read from disk by the task. - * @member {number} writeIOGiB The total gibibytes written to disk by the task. - * @member {moment.duration} waitTime The total wait time of the task. The wait - * time for a task is defined as the elapsed time between the creation of the - * task and the start of task execution. (If the task is retried due to - * failures, the wait time is the time to the most recent task execution.). */ export interface TaskStatistics { + /** + * @summary The URL of the statistics. + */ url: string; + /** + * @summary The start time of the time range covered by the statistics. + */ startTime: Date; + /** + * @summary The time at which the statistics were last updated. All statistics are limited to the + * range between startTime and lastUpdateTime. + */ lastUpdateTime: Date; + /** + * @summary The total user mode CPU time (summed across all cores and all compute nodes) consumed + * by the task. + */ userCPUTime: moment.Duration; + /** + * @summary The total kernel mode CPU time (summed across all cores and all compute nodes) + * consumed by the task. + */ kernelCPUTime: moment.Duration; + /** + * @summary The total wall clock time of the task. + * @description The wall clock time is the elapsed time from when the task started running on a + * compute node to when it finished (or to the last time the statistics were updated, if the task + * had not finished by then). If the task was retried, this includes the wall clock time of all + * the task retries. + */ wallClockTime: moment.Duration; + /** + * @summary The total number of disk read operations made by the task. + */ readIOps: number; + /** + * @summary The total number of disk write operations made by the task. + */ writeIOps: number; + /** + * @summary The total gibibytes read from disk by the task. + */ readIOGiB: number; + /** + * @summary The total gibibytes written to disk by the task. + */ writeIOGiB: number; + /** + * @summary The total wait time of the task. The wait time for a task is defined as the elapsed + * time between the creation of the task and the start of task execution. (If the task is retried + * due to failures, the wait time is the time to the most recent task execution.) + */ waitTime: moment.Duration; } /** - * @class - * Initializes a new instance of the TaskIdRange class. - * @constructor - * @summary A range of task IDs that a task can depend on. All tasks with IDs - * in the range must complete successfully before the dependent task can be - * scheduled. - * - * The start and end of the range are inclusive. For example, if a range has - * start 9 and end 12, then it represents tasks '9', '10', '11' and '12'. - * - * @member {number} start The first task ID in the range. - * @member {number} end The last task ID in the range. + * @summary A range of task IDs that a task can depend on. All tasks with IDs in the range must + * complete successfully before the dependent task can be scheduled. + * @description The start and end of the range are inclusive. For example, if a range has start 9 + * and end 12, then it represents tasks '9', '10', '11' and '12'. */ export interface TaskIdRange { + /** + * @summary The first task ID in the range. + */ start: number; + /** + * @summary The last task ID in the range. + */ end: number; } /** - * @class - * Initializes a new instance of the TaskDependencies class. - * @constructor - * @summary Specifies any dependencies of a task. Any task that is explicitly - * specified or within a dependency range must complete before the dependant - * task will be scheduled. - * - * @member {array} [taskIds] The list of task IDs that this task depends on. - * All tasks in this list must complete successfully before the dependent task - * can be scheduled. The taskIds collection is limited to 64000 characters - * total (i.e. the combined length of all task IDs). If the taskIds collection - * exceeds the maximum length, the Add Task request fails with error code - * TaskDependencyListTooLong. In this case consider using task ID ranges - * instead. - * @member {array} [taskIdRanges] The list of task ID ranges that this task - * depends on. All tasks in all ranges must complete successfully before the - * dependent task can be scheduled. + * @summary Specifies any dependencies of a task. Any task that is explicitly specified or within a + * dependency range must complete before the dependant task will be scheduled. */ export interface TaskDependencies { + /** + * @summary The list of task IDs that this task depends on. All tasks in this list must complete + * successfully before the dependent task can be scheduled. + * @description The taskIds collection is limited to 64000 characters total (i.e. the combined + * length of all task IDs). If the taskIds collection exceeds the maximum length, the Add Task + * request fails with error code TaskDependencyListTooLong. In this case consider using task ID + * ranges instead. + */ taskIds?: string[]; + /** + * @summary The list of task ID ranges that this task depends on. All tasks in all ranges must + * complete successfully before the dependent task can be scheduled. + */ taskIdRanges?: TaskIdRange[]; } /** - * @class - * Initializes a new instance of the CloudTask class. - * @constructor * @summary An Azure Batch task. - * - * Batch will retry tasks when a recovery operation is triggered on a compute - * node. Examples of recovery operations include (but are not limited to) when - * an unhealthy compute node is rebooted or a compute node disappeared due to - * host failure. Retries due to recovery operations are independent of and are - * not counted against the maxTaskRetryCount. Even if the maxTaskRetryCount is - * 0, an internal retry due to a recovery operation may occur. Because of this, - * all tasks should be idempotent. This means tasks need to tolerate being - * interrupted and restarted without causing any corruption or duplicate data. - * The best practice for long running tasks is to use some form of - * checkpointing. - * - * @member {string} [id] A string that uniquely identifies the task within the - * job. The ID can contain any combination of alphanumeric characters including - * hyphens and underscores, and cannot contain more than 64 characters. - * @member {string} [displayName] A display name for the task. The display name - * need not be unique and can contain any Unicode characters up to a maximum - * length of 1024. - * @member {string} [url] The URL of the task. - * @member {string} [eTag] The ETag of the task. This is an opaque string. You - * can use it to detect whether the task has changed between requests. In - * particular, you can be pass the ETag when updating a task to specify that - * your changes should take effect only if nobody else has modified the task in - * the meantime. - * @member {date} [lastModified] The last modified time of the task. - * @member {date} [creationTime] The creation time of the task. - * @member {object} [exitConditions] How the Batch service should respond when - * the task completes. - * @member {array} [exitConditions.exitCodes] - * @member {array} [exitConditions.exitCodeRanges] - * @member {object} [exitConditions.preProcessingError] - * @member {string} [exitConditions.preProcessingError.jobAction] The default - * is none for exit code 0 and terminate for all other exit conditions. If the - * job's onTaskFailed property is noaction, then specifying this property - * returns an error and the add task request fails with an invalid property - * value error; if you are calling the REST API directly, the HTTP status code - * is 400 (Bad Request). Possible values include: 'none', 'disable', - * 'terminate' - * @member {string} [exitConditions.preProcessingError.dependencyAction] The - * default is 'satisfy' for exit code 0, and 'block' for all other exit - * conditions. If the job's usesTaskDependencies property is set to false, then - * specifying the dependencyAction property returns an error and the add task - * request fails with an invalid property value error; if you are calling the - * REST API directly, the HTTP status code is 400 (Bad Request). Possible - * values include: 'satisfy', 'block' - * @member {object} [exitConditions.fileUploadError] If the task exited with an - * exit code that was specified via exitCodes or exitCodeRanges, and then - * encountered a file upload error, then the action specified by the exit code - * takes precedence. - * @member {string} [exitConditions.fileUploadError.jobAction] The default is - * none for exit code 0 and terminate for all other exit conditions. If the - * job's onTaskFailed property is noaction, then specifying this property - * returns an error and the add task request fails with an invalid property - * value error; if you are calling the REST API directly, the HTTP status code - * is 400 (Bad Request). Possible values include: 'none', 'disable', - * 'terminate' - * @member {string} [exitConditions.fileUploadError.dependencyAction] The - * default is 'satisfy' for exit code 0, and 'block' for all other exit - * conditions. If the job's usesTaskDependencies property is set to false, then - * specifying the dependencyAction property returns an error and the add task - * request fails with an invalid property value error; if you are calling the - * REST API directly, the HTTP status code is 400 (Bad Request). Possible - * values include: 'satisfy', 'block' - * @member {object} [exitConditions.default] This value is used if the task - * exits with any nonzero exit code not listed in the exitCodes or - * exitCodeRanges collection, with a pre-processing error if the - * preProcessingError property is not present, or with a file upload error if - * the fileUploadError property is not present. If you want non-default - * behaviour on exit code 0, you must list it explicitly using the exitCodes or - * exitCodeRanges collection. - * @member {string} [exitConditions.default.jobAction] The default is none for - * exit code 0 and terminate for all other exit conditions. If the job's - * onTaskFailed property is noaction, then specifying this property returns an - * error and the add task request fails with an invalid property value error; - * if you are calling the REST API directly, the HTTP status code is 400 (Bad - * Request). Possible values include: 'none', 'disable', 'terminate' - * @member {string} [exitConditions.default.dependencyAction] The default is - * 'satisfy' for exit code 0, and 'block' for all other exit conditions. If the - * job's usesTaskDependencies property is set to false, then specifying the - * dependencyAction property returns an error and the add task request fails - * with an invalid property value error; if you are calling the REST API - * directly, the HTTP status code is 400 (Bad Request). Possible values - * include: 'satisfy', 'block' - * @member {string} [state] The current state of the task. Possible values - * include: 'active', 'preparing', 'running', 'completed' - * @member {date} [stateTransitionTime] The time at which the task entered its - * current state. - * @member {string} [previousState] The previous state of the task. This - * property is not set if the task is in its initial Active state. Possible - * values include: 'active', 'preparing', 'running', 'completed' - * @member {date} [previousStateTransitionTime] The time at which the task - * entered its previous state. This property is not set if the task is in its - * initial Active state. - * @member {string} [commandLine] The command line of the task. For - * multi-instance tasks, the command line is executed as the primary task, - * after the primary task and all subtasks have finished executing the - * coordination command line. The command line does not run under a shell, and - * therefore cannot take advantage of shell features such as environment - * variable expansion. If you want to take advantage of such features, you - * should invoke the shell in the command line, for example using "cmd /c - * MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command - * line refers to file paths, it should use a relative path (relative to the - * task working directory), or use the Batch provided environment variable - * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [containerSettings] The settings for the container under - * which the task runs. If the pool that will run this task has - * containerConfiguration set, this must be set as well. If the pool that will - * run this task doesn't have containerConfiguration set, this must not be set. - * When this is specified, all directories recursively below the - * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are - * mapped into the container, all task environment variables are mapped into - * the container, and the task command line is executed in the container. - * @member {string} [containerSettings.containerRunOptions] These additional - * options are supplied as arguments to the "docker create" command, in - * addition to those controlled by the Batch Service. - * @member {string} [containerSettings.imageName] This is the full image - * reference, as would be specified to "docker pull". If no tag is provided as - * part of the image name, the tag ":latest" is used as a default. - * @member {object} [containerSettings.registry] This setting can be omitted if - * was already provided at pool creation. - * @member {string} [containerSettings.registry.registryServer] If omitted, the - * default is "docker.io". - * @member {string} [containerSettings.registry.userName] - * @member {string} [containerSettings.registry.password] - * @member {array} [resourceFiles] A list of files that the Batch service will - * download to the compute node before running the command line. For - * multi-instance tasks, the resource files will only be downloaded to the - * compute node on which the primary task is executed. There is a maximum size - * for the list of resource files. When the max size is exceeded, the request - * will fail and the response error code will be RequestEntityTooLarge. If this - * occurs, the collection of ResourceFiles must be reduced in size. This can be - * achieved using .zip files, Application Packages, or Docker Containers. - * @member {array} [outputFiles] A list of files that the Batch service will - * upload from the compute node after running the command line. For - * multi-instance tasks, the files will only be uploaded from the compute node - * on which the primary task is executed. - * @member {array} [environmentSettings] A list of environment variable - * settings for the task. - * @member {object} [affinityInfo] A locality hint that can be used by the - * Batch service to select a compute node on which to start the new task. - * @member {string} [affinityInfo.affinityId] You can pass the affinityId of a - * compute node to indicate that this task needs to run on that compute node. - * Note that this is just a soft affinity. If the target node is busy or - * unavailable at the time the task is scheduled, then the task will be - * scheduled elsewhere. - * @member {object} [constraints] The execution constraints that apply to this - * task. - * @member {moment.duration} [constraints.maxWallClockTime] If this is not - * specified, there is no time limit on how long the task may run. - * @member {moment.duration} [constraints.retentionTime] The default is - * infinite, i.e. the task directory will be retained until the compute node is - * removed or reimaged. - * @member {number} [constraints.maxTaskRetryCount] Note that this value - * specifically controls the number of retries for the task executable due to a - * nonzero exit code. The Batch service will try the task once, and may then - * retry up to this limit. For example, if the maximum retry count is 3, Batch - * tries the task up to 4 times (one initial try and 3 retries). If the maximum - * retry count is 0, the Batch service does not retry the task after the first - * attempt. If the maximum retry count is -1, the Batch service retries the - * task without limit. Resource files and application packages are only - * downloaded again if the task is retried on a new compute node. - * @member {object} [userIdentity] The user identity under which the task runs. - * If omitted, the task runs as a non-administrative user unique to the task. - * @member {string} [userIdentity.userName] The userName and autoUser - * properties are mutually exclusive; you must specify one but not both. - * @member {object} [userIdentity.autoUser] The userName and autoUser - * properties are mutually exclusive; you must specify one but not both. - * @member {string} [userIdentity.autoUser.scope] The default value is task. - * Possible values include: 'task', 'pool' - * @member {string} [userIdentity.autoUser.elevationLevel] The default value is - * nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {object} [executionInfo] Information about the execution of the - * task. - * @member {date} [executionInfo.startTime] 'Running' corresponds to the - * running state, so if the task specifies resource files or application - * packages, then the start time reflects the time at which the task started - * downloading or deploying these. If the task has been restarted or retried, - * this is the most recent time at which the task started running. This - * property is present only for tasks that are in the running or completed - * state. - * @member {date} [executionInfo.endTime] This property is set only if the task - * is in the Completed state. - * @member {number} [executionInfo.exitCode] This property is set only if the - * task is in the completed state. In general, the exit code for a process - * reflects the specific convention implemented by the application developer - * for that process. If you use the exit code value to make decisions in your - * code, be sure that you know the exit code convention used by the application - * process. However, if the Batch service terminates the task (due to timeout, - * or user termination via the API) you may see an operating system-defined - * exit code. - * @member {object} [executionInfo.containerInfo] This property is set only if - * the task runs in a container context. - * @member {string} [executionInfo.containerInfo.containerId] - * @member {string} [executionInfo.containerInfo.state] This is the state of - * the container according to the Docker service. It is equivalent to the - * status field returned by "docker inspect". - * @member {string} [executionInfo.containerInfo.error] This is the detailed - * error string from the Docker service, if available. It is equivalent to the - * error field returned by "docker inspect". - * @member {object} [executionInfo.failureInfo] This property is set only if - * the task is in the completed state and encountered a failure. - * @member {string} [executionInfo.failureInfo.category] Possible values - * include: 'userError', 'serverError' - * @member {string} [executionInfo.failureInfo.code] - * @member {string} [executionInfo.failureInfo.message] - * @member {array} [executionInfo.failureInfo.details] - * @member {number} [executionInfo.retryCount] Task application failures - * (non-zero exit code) are retried, pre-processing errors (the task could not - * be run) and file upload errors are not retried. The Batch service will retry - * the task up to the limit specified by the constraints. - * @member {date} [executionInfo.lastRetryTime] This element is present only if - * the task was retried (i.e. retryCount is nonzero). If present, this is - * typically the same as startTime, but may be different if the task has been - * restarted for reasons other than retry; for example, if the compute node was - * rebooted during a retry, then the startTime is updated but the lastRetryTime - * is not. - * @member {number} [executionInfo.requeueCount] When the user removes nodes - * from a pool (by resizing/shrinking the pool) or when the job is being - * disabled, the user can specify that running tasks on the nodes be requeued - * for execution. This count tracks how many times the task has been requeued - * for these reasons. - * @member {date} [executionInfo.lastRequeueTime] This property is set only if - * the requeueCount is nonzero. - * @member {string} [executionInfo.result] If the value is 'failed', then the - * details of the failure can be found in the failureInfo property. Possible - * values include: 'success', 'failure' - * @member {object} [nodeInfo] Information about the compute node on which the - * task ran. - * @member {string} [nodeInfo.affinityId] - * @member {string} [nodeInfo.nodeUrl] - * @member {string} [nodeInfo.poolId] - * @member {string} [nodeInfo.nodeId] - * @member {string} [nodeInfo.taskRootDirectory] - * @member {string} [nodeInfo.taskRootDirectoryUrl] - * @member {object} [multiInstanceSettings] An object that indicates that the - * task is a multi-instance task, and contains information about how to run the - * multi-instance task. - * @member {number} [multiInstanceSettings.numberOfInstances] If omitted, the - * default is 1. - * @member {string} [multiInstanceSettings.coordinationCommandLine] A typical - * coordination command line launches a background service and verifies that - * the service is ready to process inter-node messages. - * @member {array} [multiInstanceSettings.commonResourceFiles] The difference - * between common resource files and task resource files is that common - * resource files are downloaded for all subtasks including the primary, - * whereas task resource files are downloaded only for the primary. Also note - * that these resource files are not downloaded to the task working directory, - * but instead are downloaded to the task root directory (one directory above - * the working directory). There is a maximum size for the list of resource - * files. When the max size is exceeded, the request will fail and the - * response error code will be RequestEntityTooLarge. If this occurs, the - * collection of ResourceFiles must be reduced in size. This can be achieved - * using .zip files, Application Packages, or Docker Containers. - * @member {object} [stats] Resource usage statistics for the task. - * @member {string} [stats.url] - * @member {date} [stats.startTime] - * @member {date} [stats.lastUpdateTime] - * @member {moment.duration} [stats.userCPUTime] - * @member {moment.duration} [stats.kernelCPUTime] - * @member {moment.duration} [stats.wallClockTime] The wall clock time is the - * elapsed time from when the task started running on a compute node to when it - * finished (or to the last time the statistics were updated, if the task had - * not finished by then). If the task was retried, this includes the wall clock - * time of all the task retries. - * @member {number} [stats.readIOps] - * @member {number} [stats.writeIOps] - * @member {number} [stats.readIOGiB] - * @member {number} [stats.writeIOGiB] - * @member {moment.duration} [stats.waitTime] - * @member {object} [dependsOn] The tasks that this task depends on. This task - * will not be scheduled until all tasks that it depends on have completed - * successfully. If any of those tasks fail and exhaust their retry counts, - * this task will never be scheduled. - * @member {array} [dependsOn.taskIds] The taskIds collection is limited to - * 64000 characters total (i.e. the combined length of all task IDs). If the - * taskIds collection exceeds the maximum length, the Add Task request fails - * with error code TaskDependencyListTooLong. In this case consider using task - * ID ranges instead. - * @member {array} [dependsOn.taskIdRanges] - * @member {array} [applicationPackageReferences] A list of application - * packages that the Batch service will deploy to the compute node before - * running the command line. Application packages are downloaded and deployed - * to a shared directory, not the task working directory. Therefore, if a - * referenced package is already on the compute node, and is up to date, then - * it is not re-downloaded; the existing copy on the compute node is used. If a - * referenced application package cannot be installed, for example because the - * package has been deleted or because download failed, the task fails. - * @member {object} [authenticationTokenSettings] The settings for an - * authentication token that the task can use to perform Batch service - * operations. If this property is set, the Batch service provides the task - * with an authentication token which can be used to authenticate Batch service - * operations without requiring an account access key. The token is provided - * via the AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations - * that the task can carry out using the token depend on the settings. For - * example, a task can request job permissions in order to add other tasks to - * the job, or check the status of the job or of other tasks under the job. - * @member {array} [authenticationTokenSettings.access] The authentication - * token grants access to a limited set of Batch service operations. Currently - * the only supported value for the access property is 'job', which grants - * access to all operations related to the job which contains the task. + * @description Batch will retry tasks when a recovery operation is triggered on a compute node. + * Examples of recovery operations include (but are not limited to) when an unhealthy compute node + * is rebooted or a compute node disappeared due to host failure. Retries due to recovery + * operations are independent of and are not counted against the maxTaskRetryCount. Even if the + * maxTaskRetryCount is 0, an internal retry due to a recovery operation may occur. Because of + * this, all tasks should be idempotent. This means tasks need to tolerate being interrupted and + * restarted without causing any corruption or duplicate data. The best practice for long running + * tasks is to use some form of checkpointing. */ export interface CloudTask { + /** + * @summary A string that uniquely identifies the task within the job. + * @description The ID can contain any combination of alphanumeric characters including hyphens + * and underscores, and cannot contain more than 64 characters. + */ id?: string; + /** + * @summary A display name for the task. + * @description The display name need not be unique and can contain any Unicode characters up to + * a maximum length of 1024. + */ displayName?: string; + /** + * @summary The URL of the task. + */ url?: string; + /** + * @summary The ETag of the task. + * @description This is an opaque string. You can use it to detect whether the task has changed + * between requests. In particular, you can be pass the ETag when updating a task to specify that + * your changes should take effect only if nobody else has modified the task in the meantime. + */ eTag?: string; + /** + * @summary The last modified time of the task. + */ lastModified?: Date; + /** + * @summary The creation time of the task. + */ creationTime?: Date; + /** + * How the Batch service should respond when the task completes. + */ exitConditions?: ExitConditions; + /** + * @summary The current state of the task. + * @description Possible values include: 'active', 'preparing', 'running', 'completed' + */ state?: string; + /** + * @summary The time at which the task entered its current state. + */ stateTransitionTime?: Date; + /** + * @summary The previous state of the task. + * @description This property is not set if the task is in its initial Active state. Possible + * values include: 'active', 'preparing', 'running', 'completed' + */ previousState?: string; + /** + * @summary The time at which the task entered its previous state. + * @description This property is not set if the task is in its initial Active state. + */ previousStateTransitionTime?: Date; + /** + * @summary The command line of the task. + * @description For multi-instance tasks, the command line is executed as the primary task, after + * the primary task and all subtasks have finished executing the coordination command line. The + * command line does not run under a shell, and therefore cannot take advantage of shell features + * such as environment variable expansion. If you want to take advantage of such features, you + * should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows + * or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a + * relative path (relative to the task working directory), or use the Batch provided environment + * variable + * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + */ commandLine?: string; + /** + * @summary The settings for the container under which the task runs. + * @description If the pool that will run this task has containerConfiguration set, this must be + * set as well. If the pool that will run this task doesn't have containerConfiguration set, this + * must not be set. When this is specified, all directories recursively below the + * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the + * container, all task environment variables are mapped into the container, and the task command + * line is executed in the container. + */ containerSettings?: TaskContainerSettings; + /** + * @summary A list of files that the Batch service will download to the compute node before + * running the command line. + * @description For multi-instance tasks, the resource files will only be downloaded to the + * compute node on which the primary task is executed. There is a maximum size for the list of + * resource files. When the max size is exceeded, the request will fail and the response error + * code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be + * reduced in size. This can be achieved using .zip files, Application Packages, or Docker + * Containers. + */ resourceFiles?: ResourceFile[]; + /** + * @summary A list of files that the Batch service will upload from the compute node after + * running the command line. + * @description For multi-instance tasks, the files will only be uploaded from the compute node + * on which the primary task is executed. + */ outputFiles?: OutputFile[]; + /** + * @summary A list of environment variable settings for the task. + */ environmentSettings?: EnvironmentSetting[]; + /** + * @summary A locality hint that can be used by the Batch service to select a compute node on + * which to start the new task. + */ affinityInfo?: AffinityInformation; + /** + * @summary The execution constraints that apply to this task. + */ constraints?: TaskConstraints; + /** + * @summary The user identity under which the task runs. + * @description If omitted, the task runs as a non-administrative user unique to the task. + */ userIdentity?: UserIdentity; + /** + * @summary Information about the execution of the task. + */ executionInfo?: TaskExecutionInformation; + /** + * @summary Information about the compute node on which the task ran. + */ nodeInfo?: ComputeNodeInformation; + /** + * @summary An object that indicates that the task is a multi-instance task, and contains + * information about how to run the multi-instance task. + */ multiInstanceSettings?: MultiInstanceSettings; + /** + * @summary Resource usage statistics for the task. + */ stats?: TaskStatistics; + /** + * @summary The tasks that this task depends on. + * @description This task will not be scheduled until all tasks that it depends on have completed + * successfully. If any of those tasks fail and exhaust their retry counts, this task will never + * be scheduled. + */ dependsOn?: TaskDependencies; + /** + * @summary A list of application packages that the Batch service will deploy to the compute node + * before running the command line. + * @description Application packages are downloaded and deployed to a shared directory, not the + * task working directory. Therefore, if a referenced package is already on the compute node, and + * is up to date, then it is not re-downloaded; the existing copy on the compute node is used. If + * a referenced application package cannot be installed, for example because the package has been + * deleted or because download failed, the task fails. + */ applicationPackageReferences?: ApplicationPackageReference[]; + /** + * @summary The settings for an authentication token that the task can use to perform Batch + * service operations. + * @description If this property is set, the Batch service provides the task with an + * authentication token which can be used to authenticate Batch service operations without + * requiring an account access key. The token is provided via the AZ_BATCH_AUTHENTICATION_TOKEN + * environment variable. The operations that the task can carry out using the token depend on the + * settings. For example, a task can request job permissions in order to add other tasks to the + * job, or check the status of the job or of other tasks under the job. + */ authenticationTokenSettings?: AuthenticationTokenSettings; } /** - * @class - * Initializes a new instance of the TaskAddParameter class. - * @constructor * @summary An Azure Batch task to add. - * - * Batch will retry tasks when a recovery operation is triggered on a compute - * node. Examples of recovery operations include (but are not limited to) when - * an unhealthy compute node is rebooted or a compute node disappeared due to - * host failure. Retries due to recovery operations are independent of and are - * not counted against the maxTaskRetryCount. Even if the maxTaskRetryCount is - * 0, an internal retry due to a recovery operation may occur. Because of this, - * all tasks should be idempotent. This means tasks need to tolerate being - * interrupted and restarted without causing any corruption or duplicate data. - * The best practice for long running tasks is to use some form of - * checkpointing. - * - * @member {string} id A string that uniquely identifies the task within the - * job. The ID can contain any combination of alphanumeric characters including - * hyphens and underscores, and cannot contain more than 64 characters. The ID - * is case-preserving and case-insensitive (that is, you may not have two IDs - * within a job that differ only by case). - * @member {string} [displayName] A display name for the task. The display name - * need not be unique and can contain any Unicode characters up to a maximum - * length of 1024. - * @member {string} commandLine The command line of the task. For - * multi-instance tasks, the command line is executed as the primary task, - * after the primary task and all subtasks have finished executing the - * coordination command line. The command line does not run under a shell, and - * therefore cannot take advantage of shell features such as environment - * variable expansion. If you want to take advantage of such features, you - * should invoke the shell in the command line, for example using "cmd /c - * MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command - * line refers to file paths, it should use a relative path (relative to the - * task working directory), or use the Batch provided environment variable - * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [containerSettings] The settings for the container under - * which the task runs. If the pool that will run this task has - * containerConfiguration set, this must be set as well. If the pool that will - * run this task doesn't have containerConfiguration set, this must not be set. - * When this is specified, all directories recursively below the - * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are - * mapped into the container, all task environment variables are mapped into - * the container, and the task command line is executed in the container. - * @member {string} [containerSettings.containerRunOptions] These additional - * options are supplied as arguments to the "docker create" command, in - * addition to those controlled by the Batch Service. - * @member {string} [containerSettings.imageName] This is the full image - * reference, as would be specified to "docker pull". If no tag is provided as - * part of the image name, the tag ":latest" is used as a default. - * @member {object} [containerSettings.registry] This setting can be omitted if - * was already provided at pool creation. - * @member {string} [containerSettings.registry.registryServer] If omitted, the - * default is "docker.io". - * @member {string} [containerSettings.registry.userName] - * @member {string} [containerSettings.registry.password] - * @member {object} [exitConditions] How the Batch service should respond when - * the task completes. - * @member {array} [exitConditions.exitCodes] - * @member {array} [exitConditions.exitCodeRanges] - * @member {object} [exitConditions.preProcessingError] - * @member {string} [exitConditions.preProcessingError.jobAction] The default - * is none for exit code 0 and terminate for all other exit conditions. If the - * job's onTaskFailed property is noaction, then specifying this property - * returns an error and the add task request fails with an invalid property - * value error; if you are calling the REST API directly, the HTTP status code - * is 400 (Bad Request). Possible values include: 'none', 'disable', - * 'terminate' - * @member {string} [exitConditions.preProcessingError.dependencyAction] The - * default is 'satisfy' for exit code 0, and 'block' for all other exit - * conditions. If the job's usesTaskDependencies property is set to false, then - * specifying the dependencyAction property returns an error and the add task - * request fails with an invalid property value error; if you are calling the - * REST API directly, the HTTP status code is 400 (Bad Request). Possible - * values include: 'satisfy', 'block' - * @member {object} [exitConditions.fileUploadError] If the task exited with an - * exit code that was specified via exitCodes or exitCodeRanges, and then - * encountered a file upload error, then the action specified by the exit code - * takes precedence. - * @member {string} [exitConditions.fileUploadError.jobAction] The default is - * none for exit code 0 and terminate for all other exit conditions. If the - * job's onTaskFailed property is noaction, then specifying this property - * returns an error and the add task request fails with an invalid property - * value error; if you are calling the REST API directly, the HTTP status code - * is 400 (Bad Request). Possible values include: 'none', 'disable', - * 'terminate' - * @member {string} [exitConditions.fileUploadError.dependencyAction] The - * default is 'satisfy' for exit code 0, and 'block' for all other exit - * conditions. If the job's usesTaskDependencies property is set to false, then - * specifying the dependencyAction property returns an error and the add task - * request fails with an invalid property value error; if you are calling the - * REST API directly, the HTTP status code is 400 (Bad Request). Possible - * values include: 'satisfy', 'block' - * @member {object} [exitConditions.default] This value is used if the task - * exits with any nonzero exit code not listed in the exitCodes or - * exitCodeRanges collection, with a pre-processing error if the - * preProcessingError property is not present, or with a file upload error if - * the fileUploadError property is not present. If you want non-default - * behaviour on exit code 0, you must list it explicitly using the exitCodes or - * exitCodeRanges collection. - * @member {string} [exitConditions.default.jobAction] The default is none for - * exit code 0 and terminate for all other exit conditions. If the job's - * onTaskFailed property is noaction, then specifying this property returns an - * error and the add task request fails with an invalid property value error; - * if you are calling the REST API directly, the HTTP status code is 400 (Bad - * Request). Possible values include: 'none', 'disable', 'terminate' - * @member {string} [exitConditions.default.dependencyAction] The default is - * 'satisfy' for exit code 0, and 'block' for all other exit conditions. If the - * job's usesTaskDependencies property is set to false, then specifying the - * dependencyAction property returns an error and the add task request fails - * with an invalid property value error; if you are calling the REST API - * directly, the HTTP status code is 400 (Bad Request). Possible values - * include: 'satisfy', 'block' - * @member {array} [resourceFiles] A list of files that the Batch service will - * download to the compute node before running the command line. For - * multi-instance tasks, the resource files will only be downloaded to the - * compute node on which the primary task is executed. There is a maximum size - * for the list of resource files. When the max size is exceeded, the request - * will fail and the response error code will be RequestEntityTooLarge. If this - * occurs, the collection of ResourceFiles must be reduced in size. This can be - * achieved using .zip files, Application Packages, or Docker Containers. - * @member {array} [outputFiles] A list of files that the Batch service will - * upload from the compute node after running the command line. For - * multi-instance tasks, the files will only be uploaded from the compute node - * on which the primary task is executed. - * @member {array} [environmentSettings] A list of environment variable - * settings for the task. - * @member {object} [affinityInfo] A locality hint that can be used by the - * Batch service to select a compute node on which to start the new task. - * @member {string} [affinityInfo.affinityId] You can pass the affinityId of a - * compute node to indicate that this task needs to run on that compute node. - * Note that this is just a soft affinity. If the target node is busy or - * unavailable at the time the task is scheduled, then the task will be - * scheduled elsewhere. - * @member {object} [constraints] The execution constraints that apply to this - * task. If you do not specify constraints, the maxTaskRetryCount is the - * maxTaskRetryCount specified for the job, and the maxWallClockTime and - * retentionTime are infinite. - * @member {moment.duration} [constraints.maxWallClockTime] If this is not - * specified, there is no time limit on how long the task may run. - * @member {moment.duration} [constraints.retentionTime] The default is - * infinite, i.e. the task directory will be retained until the compute node is - * removed or reimaged. - * @member {number} [constraints.maxTaskRetryCount] Note that this value - * specifically controls the number of retries for the task executable due to a - * nonzero exit code. The Batch service will try the task once, and may then - * retry up to this limit. For example, if the maximum retry count is 3, Batch - * tries the task up to 4 times (one initial try and 3 retries). If the maximum - * retry count is 0, the Batch service does not retry the task after the first - * attempt. If the maximum retry count is -1, the Batch service retries the - * task without limit. Resource files and application packages are only - * downloaded again if the task is retried on a new compute node. - * @member {object} [userIdentity] The user identity under which the task runs. - * If omitted, the task runs as a non-administrative user unique to the task. - * @member {string} [userIdentity.userName] The userName and autoUser - * properties are mutually exclusive; you must specify one but not both. - * @member {object} [userIdentity.autoUser] The userName and autoUser - * properties are mutually exclusive; you must specify one but not both. - * @member {string} [userIdentity.autoUser.scope] The default value is task. - * Possible values include: 'task', 'pool' - * @member {string} [userIdentity.autoUser.elevationLevel] The default value is - * nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {object} [multiInstanceSettings] An object that indicates that the - * task is a multi-instance task, and contains information about how to run the - * multi-instance task. - * @member {number} [multiInstanceSettings.numberOfInstances] If omitted, the - * default is 1. - * @member {string} [multiInstanceSettings.coordinationCommandLine] A typical - * coordination command line launches a background service and verifies that - * the service is ready to process inter-node messages. - * @member {array} [multiInstanceSettings.commonResourceFiles] The difference - * between common resource files and task resource files is that common - * resource files are downloaded for all subtasks including the primary, - * whereas task resource files are downloaded only for the primary. Also note - * that these resource files are not downloaded to the task working directory, - * but instead are downloaded to the task root directory (one directory above - * the working directory). There is a maximum size for the list of resource - * files. When the max size is exceeded, the request will fail and the - * response error code will be RequestEntityTooLarge. If this occurs, the - * collection of ResourceFiles must be reduced in size. This can be achieved - * using .zip files, Application Packages, or Docker Containers. - * @member {object} [dependsOn] The tasks that this task depends on. This task - * will not be scheduled until all tasks that it depends on have completed - * successfully. If any of those tasks fail and exhaust their retry counts, - * this task will never be scheduled. If the job does not have - * usesTaskDependencies set to true, and this element is present, the request - * fails with error code TaskDependenciesNotSpecifiedOnJob. - * @member {array} [dependsOn.taskIds] The taskIds collection is limited to - * 64000 characters total (i.e. the combined length of all task IDs). If the - * taskIds collection exceeds the maximum length, the Add Task request fails - * with error code TaskDependencyListTooLong. In this case consider using task - * ID ranges instead. - * @member {array} [dependsOn.taskIdRanges] - * @member {array} [applicationPackageReferences] A list of application - * packages that the Batch service will deploy to the compute node before - * running the command line. Application packages are downloaded and deployed - * to a shared directory, not the task working directory. Therefore, if a - * referenced package is already on the compute node, and is up to date, then - * it is not re-downloaded; the existing copy on the compute node is used. If a - * referenced application package cannot be installed, for example because the - * package has been deleted or because download failed, the task fails. - * @member {object} [authenticationTokenSettings] The settings for an - * authentication token that the task can use to perform Batch service - * operations. If this property is set, the Batch service provides the task - * with an authentication token which can be used to authenticate Batch service - * operations without requiring an account access key. The token is provided - * via the AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations - * that the task can carry out using the token depend on the settings. For - * example, a task can request job permissions in order to add other tasks to - * the job, or check the status of the job or of other tasks under the job. - * @member {array} [authenticationTokenSettings.access] The authentication - * token grants access to a limited set of Batch service operations. Currently - * the only supported value for the access property is 'job', which grants - * access to all operations related to the job which contains the task. + * @description Batch will retry tasks when a recovery operation is triggered on a compute node. + * Examples of recovery operations include (but are not limited to) when an unhealthy compute node + * is rebooted or a compute node disappeared due to host failure. Retries due to recovery + * operations are independent of and are not counted against the maxTaskRetryCount. Even if the + * maxTaskRetryCount is 0, an internal retry due to a recovery operation may occur. Because of + * this, all tasks should be idempotent. This means tasks need to tolerate being interrupted and + * restarted without causing any corruption or duplicate data. The best practice for long running + * tasks is to use some form of checkpointing. */ export interface TaskAddParameter { + /** + * @summary A string that uniquely identifies the task within the job. + * @description The ID can contain any combination of alphanumeric characters including hyphens + * and underscores, and cannot contain more than 64 characters. The ID is case-preserving and + * case-insensitive (that is, you may not have two IDs within a job that differ only by case). + */ id: string; + /** + * @summary A display name for the task. + * @description The display name need not be unique and can contain any Unicode characters up to + * a maximum length of 1024. + */ displayName?: string; + /** + * @summary The command line of the task. + * @description For multi-instance tasks, the command line is executed as the primary task, after + * the primary task and all subtasks have finished executing the coordination command line. The + * command line does not run under a shell, and therefore cannot take advantage of shell features + * such as environment variable expansion. If you want to take advantage of such features, you + * should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows + * or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a + * relative path (relative to the task working directory), or use the Batch provided environment + * variable + * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + */ commandLine: string; + /** + * @summary The settings for the container under which the task runs. + * @description If the pool that will run this task has containerConfiguration set, this must be + * set as well. If the pool that will run this task doesn't have containerConfiguration set, this + * must not be set. When this is specified, all directories recursively below the + * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the + * container, all task environment variables are mapped into the container, and the task command + * line is executed in the container. + */ containerSettings?: TaskContainerSettings; + /** + * How the Batch service should respond when the task completes. + */ exitConditions?: ExitConditions; + /** + * @summary A list of files that the Batch service will download to the compute node before + * running the command line. + * @description For multi-instance tasks, the resource files will only be downloaded to the + * compute node on which the primary task is executed. There is a maximum size for the list of + * resource files. When the max size is exceeded, the request will fail and the response error + * code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be + * reduced in size. This can be achieved using .zip files, Application Packages, or Docker + * Containers. + */ resourceFiles?: ResourceFile[]; + /** + * @summary A list of files that the Batch service will upload from the compute node after + * running the command line. + * @description For multi-instance tasks, the files will only be uploaded from the compute node + * on which the primary task is executed. + */ outputFiles?: OutputFile[]; + /** + * @summary A list of environment variable settings for the task. + */ environmentSettings?: EnvironmentSetting[]; + /** + * @summary A locality hint that can be used by the Batch service to select a compute node on + * which to start the new task. + */ affinityInfo?: AffinityInformation; + /** + * @summary The execution constraints that apply to this task. + * @description If you do not specify constraints, the maxTaskRetryCount is the maxTaskRetryCount + * specified for the job, the maxWallClockTime is infinite, and the retentionTime is 7 days. + */ constraints?: TaskConstraints; + /** + * @summary The user identity under which the task runs. + * @description If omitted, the task runs as a non-administrative user unique to the task. + */ userIdentity?: UserIdentity; + /** + * @summary An object that indicates that the task is a multi-instance task, and contains + * information about how to run the multi-instance task. + */ multiInstanceSettings?: MultiInstanceSettings; + /** + * @summary The tasks that this task depends on. + * @description This task will not be scheduled until all tasks that it depends on have completed + * successfully. If any of those tasks fail and exhaust their retry counts, this task will never + * be scheduled. If the job does not have usesTaskDependencies set to true, and this element is + * present, the request fails with error code TaskDependenciesNotSpecifiedOnJob. + */ dependsOn?: TaskDependencies; + /** + * @summary A list of application packages that the Batch service will deploy to the compute node + * before running the command line. + * @description Application packages are downloaded and deployed to a shared directory, not the + * task working directory. Therefore, if a referenced package is already on the compute node, and + * is up to date, then it is not re-downloaded; the existing copy on the compute node is used. If + * a referenced application package cannot be installed, for example because the package has been + * deleted or because download failed, the task fails. + */ applicationPackageReferences?: ApplicationPackageReference[]; + /** + * @summary The settings for an authentication token that the task can use to perform Batch + * service operations. + * @description If this property is set, the Batch service provides the task with an + * authentication token which can be used to authenticate Batch service operations without + * requiring an account access key. The token is provided via the AZ_BATCH_AUTHENTICATION_TOKEN + * environment variable. The operations that the task can carry out using the token depend on the + * settings. For example, a task can request job permissions in order to add other tasks to the + * job, or check the status of the job or of other tasks under the job. + */ authenticationTokenSettings?: AuthenticationTokenSettings; } /** - * @class - * Initializes a new instance of the TaskAddCollectionParameter class. - * @constructor * @summary A collection of Azure Batch tasks to add. - * - * @member {array} value The collection of tasks to add. The maximum count of - * tasks is 100. The total serialized size of this collection must be less than - * 1MB. If it is greater than 1MB (for example if each task has 100's of - * resource files or environment variables), the request will fail with code - * 'RequestBodyTooLarge' and should be retried again with fewer tasks. */ export interface TaskAddCollectionParameter { + /** + * @summary The collection of tasks to add. The maximum count of tasks is 100. + * @description The total serialized size of this collection must be less than 1MB. If it is + * greater than 1MB (for example if each task has 100's of resource files or environment + * variables), the request will fail with code 'RequestBodyTooLarge' and should be retried again + * with fewer tasks. + */ value: TaskAddParameter[]; } /** - * @class - * Initializes a new instance of the ErrorMessage class. - * @constructor * @summary An error message received in an Azure Batch error response. - * - * @member {string} [lang] The language code of the error message. - * @member {string} [value] The text of the message. */ export interface ErrorMessage { + /** + * @summary The language code of the error message + */ lang?: string; + /** + * @summary The text of the message. + */ value?: string; } /** - * @class - * Initializes a new instance of the BatchErrorDetail class. - * @constructor - * @summary An item of additional information included in an Azure Batch error - * response. - * - * @member {string} [key] An identifier specifying the meaning of the Value - * property. - * @member {string} [value] The additional information included with the error - * response. + * @summary An item of additional information included in an Azure Batch error response. */ export interface BatchErrorDetail { + /** + * @summary An identifier specifying the meaning of the Value property. + */ key?: string; + /** + * @summary The additional information included with the error response. + */ value?: string; } /** - * @class - * Initializes a new instance of the BatchError class. - * @constructor * @summary An error response received from the Azure Batch service. - * - * @member {string} [code] An identifier for the error. Codes are invariant and - * are intended to be consumed programmatically. - * @member {object} [message] A message describing the error, intended to be - * suitable for display in a user interface. - * @member {string} [message.lang] - * @member {string} [message.value] - * @member {array} [values] A collection of key-value pairs containing - * additional details about the error. */ export interface BatchError { + /** + * @summary An identifier for the error. Codes are invariant and are intended to be consumed + * programmatically. + */ code?: string; + /** + * @summary A message describing the error, intended to be suitable for display in a user + * interface. + */ message?: ErrorMessage; + /** + * @summary A collection of key-value pairs containing additional details about the error. + */ values?: BatchErrorDetail[]; } /** - * @class - * Initializes a new instance of the TaskAddResult class. - * @constructor - * @summary Result for a single task added as part of an add task collection - * operation. - * - * @member {string} status The status of the add task request. Possible values - * include: 'success', 'clientError', 'serverError' - * @member {string} taskId The ID of the task for which this is the result. - * @member {string} [eTag] The ETag of the task, if the task was successfully - * added. You can use this to detect whether the task has changed between - * requests. In particular, you can be pass the ETag with an Update Task - * request to specify that your changes should take effect only if nobody else - * has modified the job in the meantime. - * @member {date} [lastModified] The last modified time of the task. - * @member {string} [location] The URL of the task, if the task was - * successfully added. - * @member {object} [error] The error encountered while attempting to add the - * task. - * @member {string} [error.code] - * @member {object} [error.message] - * @member {string} [error.message.lang] - * @member {string} [error.message.value] - * @member {array} [error.values] + * @summary Result for a single task added as part of an add task collection operation. */ export interface TaskAddResult { + /** + * @summary The status of the add task request. + * @description Possible values include: 'success', 'clientError', 'serverError' + */ status: string; + /** + * @summary The ID of the task for which this is the result. + */ taskId: string; + /** + * @summary The ETag of the task, if the task was successfully added. + * @description You can use this to detect whether the task has changed between requests. In + * particular, you can be pass the ETag with an Update Task request to specify that your changes + * should take effect only if nobody else has modified the job in the meantime. + */ eTag?: string; + /** + * @summary The last modified time of the task. + */ lastModified?: Date; + /** + * @summary The URL of the task, if the task was successfully added. + */ location?: string; + /** + * @summary The error encountered while attempting to add the task. + */ error?: BatchError; } /** - * @class - * Initializes a new instance of the TaskAddCollectionResult class. - * @constructor * @summary The result of adding a collection of tasks to a job. - * - * @member {array} [value] The results of the add task collection operation. */ export interface TaskAddCollectionResult { + /** + * @summary The results of the add task collection operation. + */ value?: TaskAddResult[]; } /** - * @class - * Initializes a new instance of the SubtaskInformation class. - * @constructor * @summary Information about an Azure Batch subtask. - * - * @member {number} [id] The ID of the subtask. - * @member {object} [nodeInfo] Information about the compute node on which the - * subtask ran. - * @member {string} [nodeInfo.affinityId] - * @member {string} [nodeInfo.nodeUrl] - * @member {string} [nodeInfo.poolId] - * @member {string} [nodeInfo.nodeId] - * @member {string} [nodeInfo.taskRootDirectory] - * @member {string} [nodeInfo.taskRootDirectoryUrl] - * @member {date} [startTime] The time at which the subtask started running. If - * the subtask has been restarted or retried, this is the most recent time at - * which the subtask started running. - * @member {date} [endTime] The time at which the subtask completed. This - * property is set only if the subtask is in the Completed state. - * @member {number} [exitCode] The exit code of the program specified on the - * subtask command line. This property is set only if the subtask is in the - * completed state. In general, the exit code for a process reflects the - * specific convention implemented by the application developer for that - * process. If you use the exit code value to make decisions in your code, be - * sure that you know the exit code convention used by the application process. - * However, if the Batch service terminates the subtask (due to timeout, or - * user termination via the API) you may see an operating system-defined exit - * code. - * @member {object} [containerInfo] Information about the container under which - * the task is executing. This property is set only if the task runs in a - * container context. - * @member {string} [containerInfo.containerId] - * @member {string} [containerInfo.state] This is the state of the container - * according to the Docker service. It is equivalent to the status field - * returned by "docker inspect". - * @member {string} [containerInfo.error] This is the detailed error string - * from the Docker service, if available. It is equivalent to the error field - * returned by "docker inspect". - * @member {object} [failureInfo] Information describing the task failure, if - * any. This property is set only if the task is in the completed state and - * encountered a failure. - * @member {string} [failureInfo.category] Possible values include: - * 'userError', 'serverError' - * @member {string} [failureInfo.code] - * @member {string} [failureInfo.message] - * @member {array} [failureInfo.details] - * @member {string} [state] The current state of the subtask. Possible values - * include: 'preparing', 'running', 'completed' - * @member {date} [stateTransitionTime] The time at which the subtask entered - * its current state. - * @member {string} [previousState] The previous state of the subtask. This - * property is not set if the subtask is in its initial running state. Possible - * values include: 'preparing', 'running', 'completed' - * @member {date} [previousStateTransitionTime] The time at which the subtask - * entered its previous state. This property is not set if the subtask is in - * its initial running state. - * @member {string} [result] The result of the task execution. If the value is - * 'failed', then the details of the failure can be found in the failureInfo - * property. Possible values include: 'success', 'failure' */ export interface SubtaskInformation { + /** + * @summary The ID of the subtask. + */ id?: number; + /** + * @summary Information about the compute node on which the subtask ran. + */ nodeInfo?: ComputeNodeInformation; + /** + * @summary The time at which the subtask started running. If the subtask has been restarted or + * retried, this is the most recent time at which the subtask started running. + */ startTime?: Date; + /** + * @summary The time at which the subtask completed. + * @description This property is set only if the subtask is in the Completed state. + */ endTime?: Date; + /** + * @summary The exit code of the program specified on the subtask command line. + * @description This property is set only if the subtask is in the completed state. In general, + * the exit code for a process reflects the specific convention implemented by the application + * developer for that process. If you use the exit code value to make decisions in your code, be + * sure that you know the exit code convention used by the application process. However, if the + * Batch service terminates the subtask (due to timeout, or user termination via the API) you may + * see an operating system-defined exit code. + */ exitCode?: number; + /** + * @summary Information about the container under which the task is executing. + * @description This property is set only if the task runs in a container context. + */ containerInfo?: TaskContainerExecutionInformation; + /** + * @summary Information describing the task failure, if any. + * @description This property is set only if the task is in the completed state and encountered a + * failure. + */ failureInfo?: TaskFailureInformation; + /** + * @summary The current state of the subtask. + * @description Possible values include: 'preparing', 'running', 'completed' + */ state?: string; + /** + * @summary The time at which the subtask entered its current state. + */ stateTransitionTime?: Date; + /** + * @summary The previous state of the subtask. + * @description This property is not set if the subtask is in its initial running state. Possible + * values include: 'preparing', 'running', 'completed' + */ previousState?: string; + /** + * @summary The time at which the subtask entered its previous state. + * @description This property is not set if the subtask is in its initial running state. + */ previousStateTransitionTime?: Date; + /** + * @summary The result of the task execution. + * @description If the value is 'failed', then the details of the failure can be found in the + * failureInfo property. Possible values include: 'success', 'failure' + */ result?: string; } /** - * @class - * Initializes a new instance of the CloudTaskListSubtasksResult class. - * @constructor * @summary The result of listing the subtasks of a task. - * - * @member {array} [value] The list of subtasks. */ export interface CloudTaskListSubtasksResult { + /** + * @summary The list of subtasks. + */ value?: SubtaskInformation[]; } /** - * @class - * Initializes a new instance of the TaskInformation class. - * @constructor * @summary Information about a task running on a compute node. - * - * @member {string} [taskUrl] The URL of the task. - * @member {string} [jobId] The ID of the job to which the task belongs. - * @member {string} [taskId] The ID of the task. - * @member {number} [subtaskId] The ID of the subtask if the task is a - * multi-instance task. - * @member {string} taskState The current state of the task. Possible values - * include: 'active', 'preparing', 'running', 'completed' - * @member {object} [executionInfo] Information about the execution of the - * task. - * @member {date} [executionInfo.startTime] 'Running' corresponds to the - * running state, so if the task specifies resource files or application - * packages, then the start time reflects the time at which the task started - * downloading or deploying these. If the task has been restarted or retried, - * this is the most recent time at which the task started running. This - * property is present only for tasks that are in the running or completed - * state. - * @member {date} [executionInfo.endTime] This property is set only if the task - * is in the Completed state. - * @member {number} [executionInfo.exitCode] This property is set only if the - * task is in the completed state. In general, the exit code for a process - * reflects the specific convention implemented by the application developer - * for that process. If you use the exit code value to make decisions in your - * code, be sure that you know the exit code convention used by the application - * process. However, if the Batch service terminates the task (due to timeout, - * or user termination via the API) you may see an operating system-defined - * exit code. - * @member {object} [executionInfo.containerInfo] This property is set only if - * the task runs in a container context. - * @member {string} [executionInfo.containerInfo.containerId] - * @member {string} [executionInfo.containerInfo.state] This is the state of - * the container according to the Docker service. It is equivalent to the - * status field returned by "docker inspect". - * @member {string} [executionInfo.containerInfo.error] This is the detailed - * error string from the Docker service, if available. It is equivalent to the - * error field returned by "docker inspect". - * @member {object} [executionInfo.failureInfo] This property is set only if - * the task is in the completed state and encountered a failure. - * @member {string} [executionInfo.failureInfo.category] Possible values - * include: 'userError', 'serverError' - * @member {string} [executionInfo.failureInfo.code] - * @member {string} [executionInfo.failureInfo.message] - * @member {array} [executionInfo.failureInfo.details] - * @member {number} [executionInfo.retryCount] Task application failures - * (non-zero exit code) are retried, pre-processing errors (the task could not - * be run) and file upload errors are not retried. The Batch service will retry - * the task up to the limit specified by the constraints. - * @member {date} [executionInfo.lastRetryTime] This element is present only if - * the task was retried (i.e. retryCount is nonzero). If present, this is - * typically the same as startTime, but may be different if the task has been - * restarted for reasons other than retry; for example, if the compute node was - * rebooted during a retry, then the startTime is updated but the lastRetryTime - * is not. - * @member {number} [executionInfo.requeueCount] When the user removes nodes - * from a pool (by resizing/shrinking the pool) or when the job is being - * disabled, the user can specify that running tasks on the nodes be requeued - * for execution. This count tracks how many times the task has been requeued - * for these reasons. - * @member {date} [executionInfo.lastRequeueTime] This property is set only if - * the requeueCount is nonzero. - * @member {string} [executionInfo.result] If the value is 'failed', then the - * details of the failure can be found in the failureInfo property. Possible - * values include: 'success', 'failure' */ export interface TaskInformation { + /** + * @summary The URL of the task. + */ taskUrl?: string; + /** + * @summary The ID of the job to which the task belongs. + */ jobId?: string; + /** + * @summary The ID of the task. + */ taskId?: string; + /** + * @summary The ID of the subtask if the task is a multi-instance task. + */ subtaskId?: number; + /** + * @summary The current state of the task. + * @description Possible values include: 'active', 'preparing', 'running', 'completed' + */ taskState: string; + /** + * @summary Information about the execution of the task. + */ executionInfo?: TaskExecutionInformation; } /** - * @class - * Initializes a new instance of the StartTaskInformation class. - * @constructor * @summary Information about a start task running on a compute node. - * - * @member {string} state The state of the start task on the compute node. - * Possible values include: 'running', 'completed' - * @member {date} startTime The time at which the start task started running. - * This value is reset every time the task is restarted or retried (that is, - * this is the most recent time at which the start task started running). - * @member {date} [endTime] The time at which the start task stopped running. - * This is the end time of the most recent run of the start task, if that run - * has completed (even if that run failed and a retry is pending). This element - * is not present if the start task is currently running. - * @member {number} [exitCode] The exit code of the program specified on the - * start task command line. This property is set only if the start task is in - * the completed state. In general, the exit code for a process reflects the - * specific convention implemented by the application developer for that - * process. If you use the exit code value to make decisions in your code, be - * sure that you know the exit code convention used by the application process. - * However, if the Batch service terminates the start task (due to timeout, or - * user termination via the API) you may see an operating system-defined exit - * code. - * @member {object} [containerInfo] Information about the container under which - * the task is executing. This property is set only if the task runs in a - * container context. - * @member {string} [containerInfo.containerId] - * @member {string} [containerInfo.state] This is the state of the container - * according to the Docker service. It is equivalent to the status field - * returned by "docker inspect". - * @member {string} [containerInfo.error] This is the detailed error string - * from the Docker service, if available. It is equivalent to the error field - * returned by "docker inspect". - * @member {object} [failureInfo] Information describing the task failure, if - * any. This property is set only if the task is in the completed state and - * encountered a failure. - * @member {string} [failureInfo.category] Possible values include: - * 'userError', 'serverError' - * @member {string} [failureInfo.code] - * @member {string} [failureInfo.message] - * @member {array} [failureInfo.details] - * @member {number} retryCount The number of times the task has been retried by - * the Batch service. Task application failures (non-zero exit code) are - * retried, pre-processing errors (the task could not be run) and file upload - * errors are not retried. The Batch service will retry the task up to the - * limit specified by the constraints. - * @member {date} [lastRetryTime] The most recent time at which a retry of the - * task started running. This element is present only if the task was retried - * (i.e. retryCount is nonzero). If present, this is typically the same as - * startTime, but may be different if the task has been restarted for reasons - * other than retry; for example, if the compute node was rebooted during a - * retry, then the startTime is updated but the lastRetryTime is not. - * @member {string} [result] The result of the task execution. If the value is - * 'failed', then the details of the failure can be found in the failureInfo - * property. Possible values include: 'success', 'failure' */ export interface StartTaskInformation { + /** + * @summary The state of the start task on the compute node. + * @description Possible values include: 'running', 'completed' + */ state: string; + /** + * @summary The time at which the start task started running. + * @description This value is reset every time the task is restarted or retried (that is, this is + * the most recent time at which the start task started running). + */ startTime: Date; + /** + * @summary The time at which the start task stopped running. + * @description This is the end time of the most recent run of the start task, if that run has + * completed (even if that run failed and a retry is pending). This element is not present if the + * start task is currently running. + */ endTime?: Date; + /** + * @summary The exit code of the program specified on the start task command line. + * @description This property is set only if the start task is in the completed state. In + * general, the exit code for a process reflects the specific convention implemented by the + * application developer for that process. If you use the exit code value to make decisions in + * your code, be sure that you know the exit code convention used by the application process. + * However, if the Batch service terminates the start task (due to timeout, or user termination + * via the API) you may see an operating system-defined exit code. + */ exitCode?: number; + /** + * @summary Information about the container under which the task is executing. + * @description This property is set only if the task runs in a container context. + */ containerInfo?: TaskContainerExecutionInformation; + /** + * @summary Information describing the task failure, if any. + * @description This property is set only if the task is in the completed state and encountered a + * failure. + */ failureInfo?: TaskFailureInformation; + /** + * @summary The number of times the task has been retried by the Batch service. + * @description Task application failures (non-zero exit code) are retried, pre-processing errors + * (the task could not be run) and file upload errors are not retried. The Batch service will + * retry the task up to the limit specified by the constraints. + */ retryCount: number; + /** + * @summary The most recent time at which a retry of the task started running. + * @description This element is present only if the task was retried (i.e. retryCount is + * nonzero). If present, this is typically the same as startTime, but may be different if the + * task has been restarted for reasons other than retry; for example, if the compute node was + * rebooted during a retry, then the startTime is updated but the lastRetryTime is not. + */ lastRetryTime?: Date; + /** + * @summary The result of the task execution. + * @description If the value is 'failed', then the details of the failure can be found in the + * failureInfo property. Possible values include: 'success', 'failure' + */ result?: string; } /** - * @class - * Initializes a new instance of the ComputeNodeError class. - * @constructor * @summary An error encountered by a compute node. - * - * @member {string} [code] An identifier for the compute node error. Codes are - * invariant and are intended to be consumed programmatically. - * @member {string} [message] A message describing the compute node error, - * intended to be suitable for display in a user interface. - * @member {array} [errorDetails] The list of additional error details related - * to the compute node error. */ export interface ComputeNodeError { + /** + * @summary An identifier for the compute node error. Codes are invariant and are intended to be + * consumed programmatically. + */ code?: string; + /** + * @summary A message describing the compute node error, intended to be suitable for display in a + * user interface. + */ message?: string; + /** + * @summary The list of additional error details related to the compute node error. + */ errorDetails?: NameValuePair[]; } /** - * @class - * Initializes a new instance of the InboundEndpoint class. - * @constructor * @summary An inbound endpoint on a compute node. - * - * @member {string} name The name of the endpoint. - * @member {string} protocol The protocol of the endpoint. Possible values - * include: 'tcp', 'udp' - * @member {string} publicIPAddress The public IP address of the compute node. - * @member {string} publicFQDN The public fully qualified domain name for the - * compute node. - * @member {number} frontendPort The public port number of the endpoint. - * @member {number} backendPort The backend port number of the endpoint. */ export interface InboundEndpoint { + /** + * @summary The name of the endpoint. + */ name: string; + /** + * @summary The protocol of the endpoint. + * @description Possible values include: 'tcp', 'udp' + */ protocol: string; + /** + * @summary The public IP address of the compute node. + */ publicIPAddress: string; + /** + * @summary The public fully qualified domain name for the compute node. + */ publicFQDN: string; + /** + * @summary The public port number of the endpoint. + */ frontendPort: number; + /** + * @summary The backend port number of the endpoint. + */ backendPort: number; } /** - * @class - * Initializes a new instance of the ComputeNodeEndpointConfiguration class. - * @constructor * @summary The endpoint configuration for the compute node. - * - * @member {array} inboundEndpoints The list of inbound endpoints that are - * accessible on the compute node. */ export interface ComputeNodeEndpointConfiguration { + /** + * @summary The list of inbound endpoints that are accessible on the compute node. + */ inboundEndpoints: InboundEndpoint[]; } /** - * @class - * Initializes a new instance of the ComputeNode class. - * @constructor * @summary A compute node in the Batch service. - * - * @member {string} [id] The ID of the compute node. Every node that is added - * to a pool is assigned a unique ID. Whenever a node is removed from a pool, - * all of its local files are deleted, and the ID is reclaimed and could be - * reused for new nodes. - * @member {string} [url] The URL of the compute node. - * @member {string} [state] The current state of the compute node. The - * low-priority node has been preempted. Tasks which were running on the node - * when it was pre-empted will be rescheduled when another node becomes - * available. Possible values include: 'idle', 'rebooting', 'reimaging', - * 'running', 'unusable', 'creating', 'starting', 'waitingForStartTask', - * 'startTaskFailed', 'unknown', 'leavingPool', 'offline', 'preempted' - * @member {string} [schedulingState] Whether the compute node is available for - * task scheduling. Possible values include: 'enabled', 'disabled' - * @member {date} [stateTransitionTime] The time at which the compute node - * entered its current state. - * @member {date} [lastBootTime] The time at which the compute node was - * started. This property may not be present if the node state is unusable. - * @member {date} [allocationTime] The time at which this compute node was - * allocated to the pool. - * @member {string} [ipAddress] The IP address that other compute nodes can use - * to communicate with this compute node. Every node that is added to a pool is - * assigned a unique IP address. Whenever a node is removed from a pool, all of - * its local files are deleted, and the IP address is reclaimed and could be - * reused for new nodes. - * @member {string} [affinityId] An identifier which can be passed when adding - * a task to request that the task be scheduled on this node. Note that this is - * just a soft affinity. If the target node is busy or unavailable at the time - * the task is scheduled, then the task will be scheduled elsewhere. - * @member {string} [vmSize] The size of the virtual machine hosting the - * compute node. For information about available sizes of virtual machines in - * pools, see Choose a VM size for compute nodes in an Azure Batch pool - * (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). - * @member {number} [totalTasksRun] The total number of job tasks completed on - * the compute node. This includes Job Manager tasks and normal tasks, but not - * Job Preparation, Job Release or Start tasks. - * @member {number} [runningTasksCount] The total number of currently running - * job tasks on the compute node. This includes Job Manager tasks and normal - * tasks, but not Job Preparation, Job Release or Start tasks. - * @member {number} [totalTasksSucceeded] The total number of job tasks which - * completed successfully (with exitCode 0) on the compute node. This includes - * Job Manager tasks and normal tasks, but not Job Preparation, Job Release or - * Start tasks. - * @member {array} [recentTasks] A list of tasks whose state has recently - * changed. This property is present only if at least one task has run on this - * node since it was assigned to the pool. - * @member {object} [startTask] The task specified to run on the compute node - * as it joins the pool. - * @member {string} [startTask.commandLine] The command line does not run under - * a shell, and therefore cannot take advantage of shell features such as - * environment variable expansion. If you want to take advantage of such - * features, you should invoke the shell in the command line, for example using - * "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the - * command line refers to file paths, it should use a relative path (relative - * to the task working directory), or use the Batch provided environment - * variable - * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [startTask.containerSettings] When this is specified, all - * directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure - * Batch directories on the node) are mapped into the container, all task - * environment variables are mapped into the container, and the task command - * line is executed in the container. - * @member {string} [startTask.containerSettings.containerRunOptions] These - * additional options are supplied as arguments to the "docker create" command, - * in addition to those controlled by the Batch Service. - * @member {string} [startTask.containerSettings.imageName] This is the full - * image reference, as would be specified to "docker pull". If no tag is - * provided as part of the image name, the tag ":latest" is used as a default. - * @member {object} [startTask.containerSettings.registry] This setting can be - * omitted if was already provided at pool creation. - * @member {string} [startTask.containerSettings.registry.registryServer] If - * omitted, the default is "docker.io". - * @member {string} [startTask.containerSettings.registry.userName] - * @member {string} [startTask.containerSettings.registry.password] - * @member {array} [startTask.resourceFiles] Files listed under this element - * are located in the task's working directory. - * @member {array} [startTask.environmentSettings] - * @member {object} [startTask.userIdentity] If omitted, the task runs as a - * non-administrative user unique to the task. - * @member {string} [startTask.userIdentity.userName] The userName and autoUser - * properties are mutually exclusive; you must specify one but not both. - * @member {object} [startTask.userIdentity.autoUser] The userName and autoUser - * properties are mutually exclusive; you must specify one but not both. - * @member {string} [startTask.userIdentity.autoUser.scope] The default value - * is task. Possible values include: 'task', 'pool' - * @member {string} [startTask.userIdentity.autoUser.elevationLevel] The - * default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {number} [startTask.maxTaskRetryCount] The Batch service retries a - * task if its exit code is nonzero. Note that this value specifically controls - * the number of retries. The Batch service will try the task once, and may - * then retry up to this limit. For example, if the maximum retry count is 3, - * Batch tries the task up to 4 times (one initial try and 3 retries). If the - * maximum retry count is 0, the Batch service does not retry the task. If the - * maximum retry count is -1, the Batch service retries the task without limit. - * @member {boolean} [startTask.waitForSuccess] If true and the start task - * fails on a compute node, the Batch service retries the start task up to its - * maximum retry count (maxTaskRetryCount). If the task has still not completed - * successfully after all retries, then the Batch service marks the compute - * node unusable, and will not schedule tasks to it. This condition can be - * detected via the node state and failure info details. If false, the Batch - * service will not wait for the start task to complete. In this case, other - * tasks can start executing on the compute node while the start task is still - * running; and even if the start task fails, new tasks will continue to be - * scheduled on the node. The default is false. - * @member {object} [startTaskInfo] Runtime information about the execution of - * the start task on the compute node. - * @member {string} [startTaskInfo.state] Possible values include: 'running', - * 'completed' - * @member {date} [startTaskInfo.startTime] This value is reset every time the - * task is restarted or retried (that is, this is the most recent time at which - * the start task started running). - * @member {date} [startTaskInfo.endTime] This is the end time of the most - * recent run of the start task, if that run has completed (even if that run - * failed and a retry is pending). This element is not present if the start - * task is currently running. - * @member {number} [startTaskInfo.exitCode] This property is set only if the - * start task is in the completed state. In general, the exit code for a - * process reflects the specific convention implemented by the application - * developer for that process. If you use the exit code value to make decisions - * in your code, be sure that you know the exit code convention used by the - * application process. However, if the Batch service terminates the start task - * (due to timeout, or user termination via the API) you may see an operating - * system-defined exit code. - * @member {object} [startTaskInfo.containerInfo] This property is set only if - * the task runs in a container context. - * @member {string} [startTaskInfo.containerInfo.containerId] - * @member {string} [startTaskInfo.containerInfo.state] This is the state of - * the container according to the Docker service. It is equivalent to the - * status field returned by "docker inspect". - * @member {string} [startTaskInfo.containerInfo.error] This is the detailed - * error string from the Docker service, if available. It is equivalent to the - * error field returned by "docker inspect". - * @member {object} [startTaskInfo.failureInfo] This property is set only if - * the task is in the completed state and encountered a failure. - * @member {string} [startTaskInfo.failureInfo.category] Possible values - * include: 'userError', 'serverError' - * @member {string} [startTaskInfo.failureInfo.code] - * @member {string} [startTaskInfo.failureInfo.message] - * @member {array} [startTaskInfo.failureInfo.details] - * @member {number} [startTaskInfo.retryCount] Task application failures - * (non-zero exit code) are retried, pre-processing errors (the task could not - * be run) and file upload errors are not retried. The Batch service will retry - * the task up to the limit specified by the constraints. - * @member {date} [startTaskInfo.lastRetryTime] This element is present only if - * the task was retried (i.e. retryCount is nonzero). If present, this is - * typically the same as startTime, but may be different if the task has been - * restarted for reasons other than retry; for example, if the compute node was - * rebooted during a retry, then the startTime is updated but the lastRetryTime - * is not. - * @member {string} [startTaskInfo.result] If the value is 'failed', then the - * details of the failure can be found in the failureInfo property. Possible - * values include: 'success', 'failure' - * @member {array} [certificateReferences] The list of certificates installed - * on the compute node. For Windows compute nodes, the Batch service installs - * the certificates to the specified certificate store and location. For Linux - * compute nodes, the certificates are stored in a directory inside the task - * working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is - * supplied to the task to query for this location. For certificates with - * visibility of 'remoteUser', a 'certs' directory is created in the user's - * home directory (e.g., /home/{user-name}/certs) and certificates are placed - * in that directory. - * @member {array} [errors] The list of errors that are currently being - * encountered by the compute node. - * @member {boolean} [isDedicated] Whether this compute node is a dedicated - * node. If false, the node is a low-priority node. - * @member {object} [endpointConfiguration] The endpoint configuration for the - * compute node. - * @member {array} [endpointConfiguration.inboundEndpoints] - * @member {object} [nodeAgentInfo] Information about the node agent version - * and the time the node upgraded to a new version. - * @member {string} [nodeAgentInfo.version] This version number can be checked - * against the node agent release notes located at - * https://github.com/Azure/Batch/blob/master/changelogs/nodeagent/CHANGELOG.md. - * @member {date} [nodeAgentInfo.lastUpdateTime] This is the most recent time - * that the node agent was updated to a new version. */ export interface ComputeNode { + /** + * @summary The ID of the compute node. + * @description Every node that is added to a pool is assigned a unique ID. Whenever a node is + * removed from a pool, all of its local files are deleted, and the ID is reclaimed and could be + * reused for new nodes. + */ id?: string; + /** + * @summary The URL of the compute node. + */ url?: string; + /** + * @summary The current state of the compute node. + * @description The low-priority node has been preempted. Tasks which were running on the node + * when it was pre-empted will be rescheduled when another node becomes available. Possible + * values include: 'idle', 'rebooting', 'reimaging', 'running', 'unusable', 'creating', + * 'starting', 'waitingForStartTask', 'startTaskFailed', 'unknown', 'leavingPool', 'offline', + * 'preempted' + */ state?: string; + /** + * @summary Whether the compute node is available for task scheduling. + * @description Possible values include: 'enabled', 'disabled' + */ schedulingState?: string; + /** + * @summary The time at which the compute node entered its current state. + */ stateTransitionTime?: Date; + /** + * @summary The last time at which the compute node was started. + * @description This property may not be present if the node state is unusable. + */ lastBootTime?: Date; + /** + * @summary The time at which this compute node was allocated to the pool. + * @description This is the time when the node was initially allocated and doesn't change once + * set. It is not updated when the node is service healed or preempted. + */ allocationTime?: Date; + /** + * @summary The IP address that other compute nodes can use to communicate with this compute + * node. + * @description Every node that is added to a pool is assigned a unique IP address. Whenever a + * node is removed from a pool, all of its local files are deleted, and the IP address is + * reclaimed and could be reused for new nodes. + */ ipAddress?: string; + /** + * @summary An identifier which can be passed when adding a task to request that the task be + * scheduled on this node. + * @description Note that this is just a soft affinity. If the target node is busy or unavailable + * at the time the task is scheduled, then the task will be scheduled elsewhere. + */ affinityId?: string; + /** + * @summary The size of the virtual machine hosting the compute node. + * @description For information about available sizes of virtual machines in pools, see Choose a + * VM size for compute nodes in an Azure Batch pool + * (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). + */ vmSize?: string; + /** + * @summary The total number of job tasks completed on the compute node. This includes Job + * Manager tasks and normal tasks, but not Job Preparation, Job Release or Start tasks. + */ totalTasksRun?: number; + /** + * @summary The total number of currently running job tasks on the compute node. This includes + * Job Manager tasks and normal tasks, but not Job Preparation, Job Release or Start tasks. + */ runningTasksCount?: number; + /** + * @summary The total number of job tasks which completed successfully (with exitCode 0) on the + * compute node. This includes Job Manager tasks and normal tasks, but not Job Preparation, Job + * Release or Start tasks. + */ totalTasksSucceeded?: number; + /** + * @summary A list of tasks whose state has recently changed. + * @description This property is present only if at least one task has run on this node since it + * was assigned to the pool. + */ recentTasks?: TaskInformation[]; + /** + * @summary The task specified to run on the compute node as it joins the pool. + */ startTask?: StartTask; + /** + * @summary Runtime information about the execution of the start task on the compute node. + */ startTaskInfo?: StartTaskInformation; + /** + * @summary The list of certificates installed on the compute node. + * @description For Windows compute nodes, the Batch service installs the certificates to the + * specified certificate store and location. For Linux compute nodes, the certificates are stored + * in a directory inside the task working directory and an environment variable + * AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For certificates + * with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory + * (e.g., /home/{user-name}/certs) and certificates are placed in that directory. + */ certificateReferences?: CertificateReference[]; + /** + * @summary The list of errors that are currently being encountered by the compute node. + */ errors?: ComputeNodeError[]; + /** + * @summary Whether this compute node is a dedicated node. If false, the node is a low-priority + * node. + */ isDedicated?: boolean; + /** + * @summary The endpoint configuration for the compute node. + */ endpointConfiguration?: ComputeNodeEndpointConfiguration; + /** + * @summary Information about the node agent version and the time the node upgraded to a new + * version. + */ nodeAgentInfo?: NodeAgentInformation; } /** - * @class - * Initializes a new instance of the ComputeNodeUser class. - * @constructor * @summary A user account for RDP or SSH access on a compute node. - * - * @member {string} name The user name of the account. - * @member {boolean} [isAdmin] Whether the account should be an administrator - * on the compute node. The default value is false. - * @member {date} [expiryTime] The time at which the account should expire. If - * omitted, the default is 1 day from the current time. For Linux compute - * nodes, the expiryTime has a precision up to a day. - * @member {string} [password] The password of the account. The password is - * required for Windows nodes (those created with 'cloudServiceConfiguration', - * or created with 'virtualMachineConfiguration' using a Windows image - * reference). For Linux compute nodes, the password can optionally be - * specified along with the sshPublicKey property. - * @member {string} [sshPublicKey] The SSH public key that can be used for - * remote login to the compute node. The public key should be compatible with - * OpenSSH encoding and should be base 64 encoded. This property can be - * specified only for Linux nodes. If this is specified for a Windows node, - * then the Batch service rejects the request; if you are calling the REST API - * directly, the HTTP status code is 400 (Bad Request). */ export interface ComputeNodeUser { + /** + * @summary The user name of the account. + */ name: string; + /** + * @summary Whether the account should be an administrator on the compute node. + * @description The default value is false. + */ isAdmin?: boolean; + /** + * @summary The time at which the account should expire. + * @description If omitted, the default is 1 day from the current time. For Linux compute nodes, + * the expiryTime has a precision up to a day. + */ expiryTime?: Date; + /** + * @summary The password of the account. + * @description The password is required for Windows nodes (those created with + * 'cloudServiceConfiguration', or created with 'virtualMachineConfiguration' using a Windows + * image reference). For Linux compute nodes, the password can optionally be specified along with + * the sshPublicKey property. + */ password?: string; + /** + * @summary The SSH public key that can be used for remote login to the compute node. + * @description The public key should be compatible with OpenSSH encoding and should be base 64 + * encoded. This property can be specified only for Linux nodes. If this is specified for a + * Windows node, then the Batch service rejects the request; if you are calling the REST API + * directly, the HTTP status code is 400 (Bad Request). + */ sshPublicKey?: string; } /** - * @class - * Initializes a new instance of the ComputeNodeGetRemoteLoginSettingsResult class. - * @constructor * @summary The remote login settings for a compute node. - * - * @member {string} remoteLoginIPAddress The IP address used for remote login - * to the compute node. - * @member {number} remoteLoginPort The port used for remote login to the - * compute node. */ export interface ComputeNodeGetRemoteLoginSettingsResult { + /** + * @summary The IP address used for remote login to the compute node. + */ remoteLoginIPAddress: string; + /** + * @summary The port used for remote login to the compute node. + */ remoteLoginPort: number; } /** - * @class - * Initializes a new instance of the JobSchedulePatchParameter class. - * @constructor * @summary The set of changes to be made to a job schedule. - * - * @member {object} [schedule] The schedule according to which jobs will be - * created. If you do not specify this element, the existing schedule is left - * unchanged. - * @member {date} [schedule.doNotRunUntil] If you do not specify a - * doNotRunUntil time, the schedule becomes ready to create jobs immediately. - * @member {date} [schedule.doNotRunAfter] If you do not specify a - * doNotRunAfter time, and you are creating a recurring job schedule, the job - * schedule will remain active until you explicitly terminate it. - * @member {moment.duration} [schedule.startWindow] If a job is not created - * within the startWindow interval, then the 'opportunity' is lost; no job will - * be created until the next recurrence of the schedule. If the schedule is - * recurring, and the startWindow is longer than the recurrence interval, then - * this is equivalent to an infinite startWindow, because the job that is 'due' - * in one recurrenceInterval is not carried forward into the next recurrence - * interval. The default is infinite. The minimum value is 1 minute. If you - * specify a lower value, the Batch service rejects the schedule with an error; - * if you are calling the REST API directly, the HTTP status code is 400 (Bad - * Request). - * @member {moment.duration} [schedule.recurrenceInterval] Because a job - * schedule can have at most one active job under it at any given time, if it - * is time to create a new job under a job schedule, but the previous job is - * still running, the Batch service will not create the new job until the - * previous job finishes. If the previous job does not finish within the - * startWindow period of the new recurrenceInterval, then no new job will be - * scheduled for that interval. For recurring jobs, you should normally specify - * a jobManagerTask in the jobSpecification. If you do not use jobManagerTask, - * you will need an external process to monitor when jobs are created, add - * tasks to the jobs and terminate the jobs ready for the next recurrence. The - * default is that the schedule does not recur: one job is created, within the - * startWindow after the doNotRunUntil time, and the schedule is complete as - * soon as that job finishes. The minimum value is 1 minute. If you specify a - * lower value, the Batch service rejects the schedule with an error; if you - * are calling the REST API directly, the HTTP status code is 400 (Bad - * Request). - * @member {object} [jobSpecification] The details of the jobs to be created on - * this schedule. Updates affect only jobs that are started after the update - * has taken place. Any currently active job continues with the older - * specification. - * @member {number} [jobSpecification.priority] Priority values can range from - * -1000 to 1000, with -1000 being the lowest priority and 1000 being the - * highest priority. The default value is 0. This priority is used as the - * default for all jobs under the job schedule. You can update a job's priority - * after it has been created using by using the update job API. - * @member {string} [jobSpecification.displayName] The name need not be unique - * and can contain any Unicode characters up to a maximum length of 1024. - * @member {boolean} [jobSpecification.usesTaskDependencies] - * @member {string} [jobSpecification.onAllTasksComplete] Note that if a job - * contains no tasks, then all tasks are considered complete. This option is - * therefore most commonly used with a Job Manager task; if you want to use - * automatic job termination without a Job Manager, you should initially set - * onAllTasksComplete to noaction and update the job properties to set - * onAllTasksComplete to terminatejob once you have finished adding tasks. The - * default is noaction. Possible values include: 'noAction', 'terminateJob' - * @member {string} [jobSpecification.onTaskFailure] The default is noaction. - * Possible values include: 'noAction', 'performExitOptionsJobAction' - * @member {object} [jobSpecification.constraints] - * @member {moment.duration} [jobSpecification.constraints.maxWallClockTime] If - * the job does not complete within the time limit, the Batch service - * terminates it and any tasks that are still running. In this case, the - * termination reason will be MaxWallClockTimeExpiry. If this property is not - * specified, there is no time limit on how long the job may run. - * @member {number} [jobSpecification.constraints.maxTaskRetryCount] Note that - * this value specifically controls the number of retries. The Batch service - * will try each task once, and may then retry up to this limit. For example, - * if the maximum retry count is 3, Batch tries a task up to 4 times (one - * initial try and 3 retries). If the maximum retry count is 0, the Batch - * service does not retry tasks. If the maximum retry count is -1, the Batch - * service retries tasks without limit. The default value is 0 (no retries). - * @member {object} [jobSpecification.jobManagerTask] If the job does not - * specify a Job Manager task, the user must explicitly add tasks to the job - * using the Task API. If the job does specify a Job Manager task, the Batch - * service creates the Job Manager task when the job is created, and will try - * to schedule the Job Manager task before scheduling other tasks in the job. - * @member {string} [jobSpecification.jobManagerTask.id] The ID can contain any - * combination of alphanumeric characters including hyphens and underscores and - * cannot contain more than 64 characters. - * @member {string} [jobSpecification.jobManagerTask.displayName] It need not - * be unique and can contain any Unicode characters up to a maximum length of - * 1024. - * @member {string} [jobSpecification.jobManagerTask.commandLine] The command - * line does not run under a shell, and therefore cannot take advantage of - * shell features such as environment variable expansion. If you want to take - * advantage of such features, you should invoke the shell in the command line, - * for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in - * Linux. If the command line refers to file paths, it should use a relative - * path (relative to the task working directory), or use the Batch provided - * environment variable - * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [jobSpecification.jobManagerTask.containerSettings] If the - * pool that will run this task has containerConfiguration set, this must be - * set as well. If the pool that will run this task doesn't have - * containerConfiguration set, this must not be set. When this is specified, - * all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of - * Azure Batch directories on the node) are mapped into the container, all task - * environment variables are mapped into the container, and the task command - * line is executed in the container. - * @member {string} - * [jobSpecification.jobManagerTask.containerSettings.containerRunOptions] - * These additional options are supplied as arguments to the "docker create" - * command, in addition to those controlled by the Batch Service. - * @member {string} - * [jobSpecification.jobManagerTask.containerSettings.imageName] This is the - * full image reference, as would be specified to "docker pull". If no tag is - * provided as part of the image name, the tag ":latest" is used as a default. - * @member {object} - * [jobSpecification.jobManagerTask.containerSettings.registry] This setting - * can be omitted if was already provided at pool creation. - * @member {string} - * [jobSpecification.jobManagerTask.containerSettings.registry.registryServer] - * If omitted, the default is "docker.io". - * @member {string} - * [jobSpecification.jobManagerTask.containerSettings.registry.userName] - * @member {string} - * [jobSpecification.jobManagerTask.containerSettings.registry.password] - * @member {array} [jobSpecification.jobManagerTask.resourceFiles] Files listed - * under this element are located in the task's working directory. There is a - * maximum size for the list of resource files. When the max size is exceeded, - * the request will fail and the response error code will be - * RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must - * be reduced in size. This can be achieved using .zip files, Application - * Packages, or Docker Containers. - * @member {array} [jobSpecification.jobManagerTask.outputFiles] For - * multi-instance tasks, the files will only be uploaded from the compute node - * on which the primary task is executed. - * @member {array} [jobSpecification.jobManagerTask.environmentSettings] - * @member {object} [jobSpecification.jobManagerTask.constraints] - * @member {moment.duration} - * [jobSpecification.jobManagerTask.constraints.maxWallClockTime] If this is - * not specified, there is no time limit on how long the task may run. - * @member {moment.duration} - * [jobSpecification.jobManagerTask.constraints.retentionTime] The default is - * infinite, i.e. the task directory will be retained until the compute node is - * removed or reimaged. - * @member {number} - * [jobSpecification.jobManagerTask.constraints.maxTaskRetryCount] Note that - * this value specifically controls the number of retries for the task - * executable due to a nonzero exit code. The Batch service will try the task - * once, and may then retry up to this limit. For example, if the maximum retry - * count is 3, Batch tries the task up to 4 times (one initial try and 3 - * retries). If the maximum retry count is 0, the Batch service does not retry - * the task after the first attempt. If the maximum retry count is -1, the - * Batch service retries the task without limit. Resource files and application - * packages are only downloaded again if the task is retried on a new compute - * node. - * @member {boolean} [jobSpecification.jobManagerTask.killJobOnCompletion] If - * true, when the Job Manager task completes, the Batch service marks the job - * as complete. If any tasks are still running at this time (other than Job - * Release), those tasks are terminated. If false, the completion of the Job - * Manager task does not affect the job status. In this case, you should either - * use the onAllTasksComplete attribute to terminate the job, or have a client - * or user terminate the job explicitly. An example of this is if the Job - * Manager creates a set of tasks but then takes no further role in their - * execution. The default value is true. If you are using the - * onAllTasksComplete and onTaskFailure attributes to control job lifetime, and - * using the Job Manager task only to create the tasks for the job (not to - * monitor progress), then it is important to set killJobOnCompletion to false. - * @member {object} [jobSpecification.jobManagerTask.userIdentity] If omitted, - * the task runs as a non-administrative user unique to the task. - * @member {string} [jobSpecification.jobManagerTask.userIdentity.userName] The - * userName and autoUser properties are mutually exclusive; you must specify - * one but not both. - * @member {object} [jobSpecification.jobManagerTask.userIdentity.autoUser] The - * userName and autoUser properties are mutually exclusive; you must specify - * one but not both. - * @member {string} - * [jobSpecification.jobManagerTask.userIdentity.autoUser.scope] The default - * value is task. Possible values include: 'task', 'pool' - * @member {string} - * [jobSpecification.jobManagerTask.userIdentity.autoUser.elevationLevel] The - * default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {boolean} [jobSpecification.jobManagerTask.runExclusive] If true, no - * other tasks will run on the same compute node for as long as the Job Manager - * is running. If false, other tasks can run simultaneously with the Job - * Manager on a compute node. The Job Manager task counts normally against the - * node's concurrent task limit, so this is only relevant if the node allows - * multiple concurrent tasks. The default value is true. - * @member {array} - * [jobSpecification.jobManagerTask.applicationPackageReferences] Application - * packages are downloaded and deployed to a shared directory, not the task - * working directory. Therefore, if a referenced package is already on the - * compute node, and is up to date, then it is not re-downloaded; the existing - * copy on the compute node is used. If a referenced application package cannot - * be installed, for example because the package has been deleted or because - * download failed, the task fails. - * @member {object} - * [jobSpecification.jobManagerTask.authenticationTokenSettings] If this - * property is set, the Batch service provides the task with an authentication - * token which can be used to authenticate Batch service operations without - * requiring an account access key. The token is provided via the - * AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations that the - * task can carry out using the token depend on the settings. For example, a - * task can request job permissions in order to add other tasks to the job, or - * check the status of the job or of other tasks under the job. - * @member {array} - * [jobSpecification.jobManagerTask.authenticationTokenSettings.access] The - * authentication token grants access to a limited set of Batch service - * operations. Currently the only supported value for the access property is - * 'job', which grants access to all operations related to the job which - * contains the task. - * @member {boolean} [jobSpecification.jobManagerTask.allowLowPriorityNode] The - * default value is true. - * @member {object} [jobSpecification.jobPreparationTask] If a job has a Job - * Preparation task, the Batch service will run the Job Preparation task on a - * compute node before starting any tasks of that job on that compute node. - * @member {string} [jobSpecification.jobPreparationTask.id] The ID can contain - * any combination of alphanumeric characters including hyphens and underscores - * and cannot contain more than 64 characters. If you do not specify this - * property, the Batch service assigns a default value of 'jobpreparation'. No - * other task in the job can have the same ID as the Job Preparation task. If - * you try to submit a task with the same id, the Batch service rejects the - * request with error code TaskIdSameAsJobPreparationTask; if you are calling - * the REST API directly, the HTTP status code is 409 (Conflict). - * @member {string} [jobSpecification.jobPreparationTask.commandLine] The - * command line does not run under a shell, and therefore cannot take advantage - * of shell features such as environment variable expansion. If you want to - * take advantage of such features, you should invoke the shell in the command - * line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c - * MyCommand" in Linux. If the command line refers to file paths, it should use - * a relative path (relative to the task working directory), or use the Batch - * provided environment variable - * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [jobSpecification.jobPreparationTask.containerSettings] - * When this is specified, all directories recursively below the - * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are - * mapped into the container, all task environment variables are mapped into - * the container, and the task command line is executed in the container. - * @member {string} - * [jobSpecification.jobPreparationTask.containerSettings.containerRunOptions] - * These additional options are supplied as arguments to the "docker create" - * command, in addition to those controlled by the Batch Service. - * @member {string} - * [jobSpecification.jobPreparationTask.containerSettings.imageName] This is - * the full image reference, as would be specified to "docker pull". If no tag - * is provided as part of the image name, the tag ":latest" is used as a - * default. - * @member {object} - * [jobSpecification.jobPreparationTask.containerSettings.registry] This - * setting can be omitted if was already provided at pool creation. - * @member {string} - * [jobSpecification.jobPreparationTask.containerSettings.registry.registryServer] - * If omitted, the default is "docker.io". - * @member {string} - * [jobSpecification.jobPreparationTask.containerSettings.registry.userName] - * @member {string} - * [jobSpecification.jobPreparationTask.containerSettings.registry.password] - * @member {array} [jobSpecification.jobPreparationTask.resourceFiles] Files - * listed under this element are located in the task's working directory. - * There is a maximum size for the list of resource files. When the max size - * is exceeded, the request will fail and the response error code will be - * RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must - * be reduced in size. This can be achieved using .zip files, Application - * Packages, or Docker Containers. - * @member {array} [jobSpecification.jobPreparationTask.environmentSettings] - * @member {object} [jobSpecification.jobPreparationTask.constraints] - * @member {moment.duration} - * [jobSpecification.jobPreparationTask.constraints.maxWallClockTime] If this - * is not specified, there is no time limit on how long the task may run. - * @member {moment.duration} - * [jobSpecification.jobPreparationTask.constraints.retentionTime] The default - * is infinite, i.e. the task directory will be retained until the compute node - * is removed or reimaged. - * @member {number} - * [jobSpecification.jobPreparationTask.constraints.maxTaskRetryCount] Note - * that this value specifically controls the number of retries for the task - * executable due to a nonzero exit code. The Batch service will try the task - * once, and may then retry up to this limit. For example, if the maximum retry - * count is 3, Batch tries the task up to 4 times (one initial try and 3 - * retries). If the maximum retry count is 0, the Batch service does not retry - * the task after the first attempt. If the maximum retry count is -1, the - * Batch service retries the task without limit. Resource files and application - * packages are only downloaded again if the task is retried on a new compute - * node. - * @member {boolean} [jobSpecification.jobPreparationTask.waitForSuccess] If - * true and the Job Preparation task fails on a compute node, the Batch service - * retries the Job Preparation task up to its maximum retry count (as specified - * in the constraints element). If the task has still not completed - * successfully after all retries, then the Batch service will not schedule - * tasks of the job to the compute node. The compute node remains active and - * eligible to run tasks of other jobs. If false, the Batch service will not - * wait for the Job Preparation task to complete. In this case, other tasks of - * the job can start executing on the compute node while the Job Preparation - * task is still running; and even if the Job Preparation task fails, new tasks - * will continue to be scheduled on the node. The default value is true. - * @member {object} [jobSpecification.jobPreparationTask.userIdentity] If - * omitted, the task runs as a non-administrative user unique to the task on - * Windows nodes, or a a non-administrative user unique to the pool on Linux - * nodes. - * @member {string} [jobSpecification.jobPreparationTask.userIdentity.userName] - * The userName and autoUser properties are mutually exclusive; you must - * specify one but not both. - * @member {object} [jobSpecification.jobPreparationTask.userIdentity.autoUser] - * The userName and autoUser properties are mutually exclusive; you must - * specify one but not both. - * @member {string} - * [jobSpecification.jobPreparationTask.userIdentity.autoUser.scope] The - * default value is task. Possible values include: 'task', 'pool' - * @member {string} - * [jobSpecification.jobPreparationTask.userIdentity.autoUser.elevationLevel] - * The default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {boolean} - * [jobSpecification.jobPreparationTask.rerunOnNodeRebootAfterSuccess] The Job - * Preparation task is always rerun if a compute node is reimaged, or if the - * Job Preparation task did not complete (e.g. because the reboot occurred - * while the task was running). Therefore, you should always write a Job - * Preparation task to be idempotent and to behave correctly if run multiple - * times. The default value is true. - * @member {object} [jobSpecification.jobReleaseTask] The primary purpose of - * the Job Release task is to undo changes to compute nodes made by the Job - * Preparation task. Example activities include deleting local files, or - * shutting down services that were started as part of job preparation. A Job - * Release task cannot be specified without also specifying a Job Preparation - * task for the job. The Batch service runs the Job Release task on the compute - * nodes that have run the Job Preparation task. - * @member {string} [jobSpecification.jobReleaseTask.id] The ID can contain any - * combination of alphanumeric characters including hyphens and underscores and - * cannot contain more than 64 characters. If you do not specify this property, - * the Batch service assigns a default value of 'jobrelease'. No other task in - * the job can have the same ID as the Job Release task. If you try to submit a - * task with the same id, the Batch service rejects the request with error code - * TaskIdSameAsJobReleaseTask; if you are calling the REST API directly, the - * HTTP status code is 409 (Conflict). - * @member {string} [jobSpecification.jobReleaseTask.commandLine] The command - * line does not run under a shell, and therefore cannot take advantage of - * shell features such as environment variable expansion. If you want to take - * advantage of such features, you should invoke the shell in the command line, - * for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in - * Linux. If the command line refers to file paths, it should use a relative - * path (relative to the task working directory), or use the Batch provided - * environment variable - * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [jobSpecification.jobReleaseTask.containerSettings] When - * this is specified, all directories recursively below the - * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are - * mapped into the container, all task environment variables are mapped into - * the container, and the task command line is executed in the container. - * @member {string} - * [jobSpecification.jobReleaseTask.containerSettings.containerRunOptions] - * These additional options are supplied as arguments to the "docker create" - * command, in addition to those controlled by the Batch Service. - * @member {string} - * [jobSpecification.jobReleaseTask.containerSettings.imageName] This is the - * full image reference, as would be specified to "docker pull". If no tag is - * provided as part of the image name, the tag ":latest" is used as a default. - * @member {object} - * [jobSpecification.jobReleaseTask.containerSettings.registry] This setting - * can be omitted if was already provided at pool creation. - * @member {string} - * [jobSpecification.jobReleaseTask.containerSettings.registry.registryServer] - * If omitted, the default is "docker.io". - * @member {string} - * [jobSpecification.jobReleaseTask.containerSettings.registry.userName] - * @member {string} - * [jobSpecification.jobReleaseTask.containerSettings.registry.password] - * @member {array} [jobSpecification.jobReleaseTask.resourceFiles] Files listed - * under this element are located in the task's working directory. - * @member {array} [jobSpecification.jobReleaseTask.environmentSettings] - * @member {moment.duration} [jobSpecification.jobReleaseTask.maxWallClockTime] - * @member {moment.duration} [jobSpecification.jobReleaseTask.retentionTime] - * The default is infinite, i.e. the task directory will be retained until the - * compute node is removed or reimaged. - * @member {object} [jobSpecification.jobReleaseTask.userIdentity] If omitted, - * the task runs as a non-administrative user unique to the task. - * @member {string} [jobSpecification.jobReleaseTask.userIdentity.userName] The - * userName and autoUser properties are mutually exclusive; you must specify - * one but not both. - * @member {object} [jobSpecification.jobReleaseTask.userIdentity.autoUser] The - * userName and autoUser properties are mutually exclusive; you must specify - * one but not both. - * @member {string} - * [jobSpecification.jobReleaseTask.userIdentity.autoUser.scope] The default - * value is task. Possible values include: 'task', 'pool' - * @member {string} - * [jobSpecification.jobReleaseTask.userIdentity.autoUser.elevationLevel] The - * default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {array} [jobSpecification.commonEnvironmentSettings] Individual - * tasks can override an environment setting specified here by specifying the - * same setting name with a different value. - * @member {object} [jobSpecification.poolInfo] - * @member {string} [jobSpecification.poolInfo.poolId] You must ensure that the - * pool referenced by this property exists. If the pool does not exist at the - * time the Batch service tries to schedule a job, no tasks for the job will - * run until you create a pool with that id. Note that the Batch service will - * not reject the job request; it will simply not run tasks until the pool - * exists. You must specify either the pool ID or the auto pool specification, - * but not both. - * @member {object} [jobSpecification.poolInfo.autoPoolSpecification] If auto - * pool creation fails, the Batch service moves the job to a completed state, - * and the pool creation error is set in the job's scheduling error property. - * The Batch service manages the lifetime (both creation and, unless keepAlive - * is specified, deletion) of the auto pool. Any user actions that affect the - * lifetime of the auto pool while the job is active will result in unexpected - * behavior. You must specify either the pool ID or the auto pool - * specification, but not both. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.autoPoolIdPrefix] The Batch - * service assigns each auto pool a unique identifier on creation. To - * distinguish between pools created for different purposes, you can specify - * this element to add a prefix to the ID that is assigned. The prefix can be - * up to 20 characters long. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.poolLifetimeOption] - * Possible values include: 'jobSchedule', 'job' - * @member {boolean} - * [jobSpecification.poolInfo.autoPoolSpecification.keepAlive] If false, the - * Batch service deletes the pool once its lifetime (as determined by the - * poolLifetimeOption setting) expires; that is, when the job or job schedule - * completes. If true, the Batch service does not delete the pool - * automatically. It is up to the user to delete auto pools created with this - * option. - * @member {object} [jobSpecification.poolInfo.autoPoolSpecification.pool] - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.displayName] The - * display name need not be unique and can contain any Unicode characters up to - * a maximum length of 1024. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.vmSize] For - * information about available sizes of virtual machines in pools, see Choose a - * VM size for compute nodes in an Azure Batch pool - * (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration] - * This property must be specified if the pool needs to be created with Azure - * PaaS VMs. This property and virtualMachineConfiguration are mutually - * exclusive and one of the properties must be specified. If neither is - * specified then the Batch service returns an error; if you are calling the - * REST API directly, the HTTP status code is 400 (Bad Request). This property - * cannot be specified if the Batch account was created with its - * poolAllocationMode property set to 'UserSubscription'. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osFamily] - * Possible values are: - * 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. - * 3 - OS Family 3, equivalent to Windows Server 2012. - * 4 - OS Family 4, equivalent to Windows Server 2012 R2. - * 5 - OS Family 5, equivalent to Windows Server 2016. For more information, - * see Azure Guest OS Releases - * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] - * The default value is * which specifies the latest operating system version - * for the specified OS family. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.currentOSVersion] - * This may differ from targetOSVersion if the pool state is Upgrading. In this - * case some virtual machines may be on the targetOSVersion and some may be on - * the currentOSVersion during the upgrade process. Once all virtual machines - * have upgraded, currentOSVersion is updated to be the same as - * targetOSVersion. - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration] - * This property must be specified if the pool needs to be created with Azure - * IaaS VMs. This property and cloudServiceConfiguration are mutually exclusive - * and one of the properties must be specified. If neither is specified then - * the Batch service returns an error; if you are calling the REST API - * directly, the HTTP status code is 400 (Bad Request). - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference] - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.publisher] - * For example, Canonical or MicrosoftWindowsServer. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.offer] - * For example, UbuntuServer or WindowsServer. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.sku] - * For example, 14.04.0-LTS or 2012-R2-Datacenter. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.version] - * A value of 'latest' can be specified to select the latest version of an - * image. If omitted, the default is 'latest'. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.virtualMachineImageId] - * This property is mutually exclusive with other ImageReference properties. - * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The default value for caching is readwrite. For information about the - * caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId] - * The Batch node agent is a program that runs on each node in the pool, and - * provides the command-and-control interface between the node and the Batch - * service. There are different implementations of the node agent, known as - * SKUs, for different operating systems. You must specify a node agent SKU - * which matches the selected image reference. To get the list of supported - * node agent SKUs along with their list of verified image references, see the - * 'List supported node agent SKUs' operation. - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] - * This property must not be specified if the imageReference or osDisk property - * specifies a Linux OS image. - * @member {boolean} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] - * If omitted, the default value is true. - * @member {array} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.dataDisks] - * This property must be specified if the compute nodes in the pool need to - * have empty data disks attached to them. This cannot be updated. Each node - * gets its own disk (the disk is not a file share). Existing disks cannot be - * attached, each attached disk is empty. When the node is removed from the - * pool, the disk and all data associated with it is also deleted. The disk is - * not formatted after being attached, it must be formatted before use - for - * more information see - * https://docs.microsoft.com/en-us/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux - * and - * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.licenseType] - * This only applies to images that contain the Windows operating system, and - * should only be used when you hold valid on-premises licenses for the nodes - * which will be deployed. If omitted, no on-premises licensing discount is - * applied. Values are: - * - * Windows_Server - The on-premises license is for Windows Server. - * Windows_Client - The on-premises license is for Windows Client. - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration] - * If specified, setup is performed on each node in the pool to allow tasks to - * run in containers. All regular tasks and job manager tasks run on this pool - * must specify the containerSettings property, and all other tasks may specify - * it. - * @member {array} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration.containerImageNames] - * This is the full image reference, as would be specified to "docker pull". An - * image will be sourced from the default Docker registry unless the image is - * fully qualified with an alternative registry. - * @member {array} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration.containerRegistries] - * If any images must be downloaded from a private registry which requires - * credentials, then those credentials must be provided here. - * @member {number} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.maxTasksPerNode] The - * default value is 1. The maximum value of this setting depends on the size of - * the compute nodes in the pool (the vmSize setting). - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.taskSchedulingPolicy] - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.taskSchedulingPolicy.nodeFillType] - * Possible values include: 'spread', 'pack' - * @member {moment.duration} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.resizeTimeout] This - * timeout applies only to manual scaling; it has no effect when - * enableAutoScale is set to true. The default value is 15 minutes. The minimum - * value is 5 minutes. If you specify a value less than 5 minutes, the Batch - * service rejects the request with an error; if you are calling the REST API - * directly, the HTTP status code is 400 (Bad Request). - * @member {number} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.targetDedicatedNodes] - * This property must not be specified if enableAutoScale is set to true. If - * enableAutoScale is set to false, then you must set either - * targetDedicatedNodes, targetLowPriorityNodes, or both. - * @member {number} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.targetLowPriorityNodes] - * This property must not be specified if enableAutoScale is set to true. If - * enableAutoScale is set to false, then you must set either - * targetDedicatedNodes, targetLowPriorityNodes, or both. - * @member {boolean} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.enableAutoScale] If - * false, at least one of targetDedicateNodes and targetLowPriorityNodes must - * be specified. If true, the autoScaleFormula element is required. The pool - * automatically resizes according to the formula. The default value is false. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.autoScaleFormula] This - * property must not be specified if enableAutoScale is set to false. It is - * required if enableAutoScale is set to true. The formula is checked for - * validity before the pool is created. If the formula is not valid, the Batch - * service rejects the request with detailed error information. - * @member {moment.duration} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.autoScaleEvaluationInterval] - * The default value is 15 minutes. The minimum and maximum value are 5 minutes - * and 168 hours respectively. If you specify a value less than 5 minutes or - * greater than 168 hours, the Batch service rejects the request with an - * invalid property value error; if you are calling the REST API directly, the - * HTTP status code is 400 (Bad Request). - * @member {boolean} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.enableInterNodeCommunication] - * Enabling inter-node communication limits the maximum size of the pool due to - * deployment restrictions on the nodes of the pool. This may result in the - * pool not reaching its desired size. The default value is false. - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration] - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.subnetId] - * The virtual network must be in the same region and subscription as the Azure - * Batch account. The specified subnet should have enough free IP addresses to - * accommodate the number of nodes in the pool. If the subnet doesn't have - * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks - * ('Microsoft.Network/virtualNetworks') are supported, but for pools created - * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] - * Pool endpoint configuration is only supported on pools with the - * virtualMachineConfiguration property. - * @member {array} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration.inboundNATPools] - * The maximum number of inbound NAT pools per Batch pool is 5. If the maximum - * number of inbound NAT pools is exceeded the request fails with HTTP status - * code 400. - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask] - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.commandLine] - * The command line does not run under a shell, and therefore cannot take - * advantage of shell features such as environment variable expansion. If you - * want to take advantage of such features, you should invoke the shell in the - * command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c - * MyCommand" in Linux. If the command line refers to file paths, it should use - * a relative path (relative to the task working directory), or use the Batch - * provided environment variable - * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings] - * When this is specified, all directories recursively below the - * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are - * mapped into the container, all task environment variables are mapped into - * the container, and the task command line is executed in the container. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.containerRunOptions] - * These additional options are supplied as arguments to the "docker create" - * command, in addition to those controlled by the Batch Service. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.imageName] - * This is the full image reference, as would be specified to "docker pull". If - * no tag is provided as part of the image name, the tag ":latest" is used as a - * default. - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry] - * This setting can be omitted if was already provided at pool creation. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.registryServer] - * If omitted, the default is "docker.io". - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.userName] - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.password] - * @member {array} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.resourceFiles] - * Files listed under this element are located in the task's working directory. - * @member {array} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.environmentSettings] - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.userIdentity] - * If omitted, the task runs as a non-administrative user unique to the task. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.userIdentity.userName] - * The userName and autoUser properties are mutually exclusive; you must - * specify one but not both. - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser] - * The userName and autoUser properties are mutually exclusive; you must - * specify one but not both. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser.scope] - * The default value is task. Possible values include: 'task', 'pool' - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser.elevationLevel] - * The default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {number} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.maxTaskRetryCount] - * The Batch service retries a task if its exit code is nonzero. Note that this - * value specifically controls the number of retries. The Batch service will - * try the task once, and may then retry up to this limit. For example, if the - * maximum retry count is 3, Batch tries the task up to 4 times (one initial - * try and 3 retries). If the maximum retry count is 0, the Batch service does - * not retry the task. If the maximum retry count is -1, the Batch service - * retries the task without limit. - * @member {boolean} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.waitForSuccess] - * If true and the start task fails on a compute node, the Batch service - * retries the start task up to its maximum retry count (maxTaskRetryCount). If - * the task has still not completed successfully after all retries, then the - * Batch service marks the compute node unusable, and will not schedule tasks - * to it. This condition can be detected via the node state and failure info - * details. If false, the Batch service will not wait for the start task to - * complete. In this case, other tasks can start executing on the compute node - * while the start task is still running; and even if the start task fails, new - * tasks will continue to be scheduled on the node. The default is false. - * @member {array} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.certificateReferences] - * For Windows compute nodes, the Batch service installs the certificates to - * the specified certificate store and location. For Linux compute nodes, the - * certificates are stored in a directory inside the task working directory and - * an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to - * query for this location. For certificates with visibility of 'remoteUser', a - * 'certs' directory is created in the user's home directory (e.g., - * /home/{user-name}/certs) and certificates are placed in that directory. - * @member {array} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.applicationPackageReferences] - * @member {array} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.applicationLicenses] - * The list of application licenses must be a subset of available Batch service - * application licenses. If a license is requested which is not supported, pool - * creation will fail. The permitted licenses available on the pool are 'maya', - * 'vray', '3dsmax', 'arnold'. An additional charge applies for each - * application license added to the pool. - * @member {array} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.userAccounts] - * @member {array} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.metadata] The Batch - * service does not assign any meaning to metadata; it is solely for the use of - * user code. - * @member {array} [jobSpecification.metadata] The Batch service does not - * assign any meaning to metadata; it is solely for the use of user code. - * @member {array} [metadata] A list of name-value pairs associated with the - * job schedule as metadata. If you do not specify this element, existing - * metadata is left unchanged. */ export interface JobSchedulePatchParameter { + /** + * @summary The schedule according to which jobs will be created. + * @description If you do not specify this element, the existing schedule is left unchanged. + */ schedule?: Schedule; + /** + * @summary The details of the jobs to be created on this schedule. + * @description Updates affect only jobs that are started after the update has taken place. Any + * currently active job continues with the older specification. + */ jobSpecification?: JobSpecification; + /** + * @summary A list of name-value pairs associated with the job schedule as metadata. + * @description If you do not specify this element, existing metadata is left unchanged. + */ metadata?: MetadataItem[]; } /** - * @class - * Initializes a new instance of the JobScheduleUpdateParameter class. - * @constructor * @summary The set of changes to be made to a job schedule. - * - * @member {object} schedule The schedule according to which jobs will be - * created. If you do not specify this element, it is equivalent to passing the - * default schedule: that is, a single job scheduled to run immediately. - * @member {date} [schedule.doNotRunUntil] If you do not specify a - * doNotRunUntil time, the schedule becomes ready to create jobs immediately. - * @member {date} [schedule.doNotRunAfter] If you do not specify a - * doNotRunAfter time, and you are creating a recurring job schedule, the job - * schedule will remain active until you explicitly terminate it. - * @member {moment.duration} [schedule.startWindow] If a job is not created - * within the startWindow interval, then the 'opportunity' is lost; no job will - * be created until the next recurrence of the schedule. If the schedule is - * recurring, and the startWindow is longer than the recurrence interval, then - * this is equivalent to an infinite startWindow, because the job that is 'due' - * in one recurrenceInterval is not carried forward into the next recurrence - * interval. The default is infinite. The minimum value is 1 minute. If you - * specify a lower value, the Batch service rejects the schedule with an error; - * if you are calling the REST API directly, the HTTP status code is 400 (Bad - * Request). - * @member {moment.duration} [schedule.recurrenceInterval] Because a job - * schedule can have at most one active job under it at any given time, if it - * is time to create a new job under a job schedule, but the previous job is - * still running, the Batch service will not create the new job until the - * previous job finishes. If the previous job does not finish within the - * startWindow period of the new recurrenceInterval, then no new job will be - * scheduled for that interval. For recurring jobs, you should normally specify - * a jobManagerTask in the jobSpecification. If you do not use jobManagerTask, - * you will need an external process to monitor when jobs are created, add - * tasks to the jobs and terminate the jobs ready for the next recurrence. The - * default is that the schedule does not recur: one job is created, within the - * startWindow after the doNotRunUntil time, and the schedule is complete as - * soon as that job finishes. The minimum value is 1 minute. If you specify a - * lower value, the Batch service rejects the schedule with an error; if you - * are calling the REST API directly, the HTTP status code is 400 (Bad - * Request). - * @member {object} jobSpecification Details of the jobs to be created on this - * schedule. Updates affect only jobs that are started after the update has - * taken place. Any currently active job continues with the older - * specification. - * @member {number} [jobSpecification.priority] Priority values can range from - * -1000 to 1000, with -1000 being the lowest priority and 1000 being the - * highest priority. The default value is 0. This priority is used as the - * default for all jobs under the job schedule. You can update a job's priority - * after it has been created using by using the update job API. - * @member {string} [jobSpecification.displayName] The name need not be unique - * and can contain any Unicode characters up to a maximum length of 1024. - * @member {boolean} [jobSpecification.usesTaskDependencies] - * @member {string} [jobSpecification.onAllTasksComplete] Note that if a job - * contains no tasks, then all tasks are considered complete. This option is - * therefore most commonly used with a Job Manager task; if you want to use - * automatic job termination without a Job Manager, you should initially set - * onAllTasksComplete to noaction and update the job properties to set - * onAllTasksComplete to terminatejob once you have finished adding tasks. The - * default is noaction. Possible values include: 'noAction', 'terminateJob' - * @member {string} [jobSpecification.onTaskFailure] The default is noaction. - * Possible values include: 'noAction', 'performExitOptionsJobAction' - * @member {object} [jobSpecification.constraints] - * @member {moment.duration} [jobSpecification.constraints.maxWallClockTime] If - * the job does not complete within the time limit, the Batch service - * terminates it and any tasks that are still running. In this case, the - * termination reason will be MaxWallClockTimeExpiry. If this property is not - * specified, there is no time limit on how long the job may run. - * @member {number} [jobSpecification.constraints.maxTaskRetryCount] Note that - * this value specifically controls the number of retries. The Batch service - * will try each task once, and may then retry up to this limit. For example, - * if the maximum retry count is 3, Batch tries a task up to 4 times (one - * initial try and 3 retries). If the maximum retry count is 0, the Batch - * service does not retry tasks. If the maximum retry count is -1, the Batch - * service retries tasks without limit. The default value is 0 (no retries). - * @member {object} [jobSpecification.jobManagerTask] If the job does not - * specify a Job Manager task, the user must explicitly add tasks to the job - * using the Task API. If the job does specify a Job Manager task, the Batch - * service creates the Job Manager task when the job is created, and will try - * to schedule the Job Manager task before scheduling other tasks in the job. - * @member {string} [jobSpecification.jobManagerTask.id] The ID can contain any - * combination of alphanumeric characters including hyphens and underscores and - * cannot contain more than 64 characters. - * @member {string} [jobSpecification.jobManagerTask.displayName] It need not - * be unique and can contain any Unicode characters up to a maximum length of - * 1024. - * @member {string} [jobSpecification.jobManagerTask.commandLine] The command - * line does not run under a shell, and therefore cannot take advantage of - * shell features such as environment variable expansion. If you want to take - * advantage of such features, you should invoke the shell in the command line, - * for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in - * Linux. If the command line refers to file paths, it should use a relative - * path (relative to the task working directory), or use the Batch provided - * environment variable - * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [jobSpecification.jobManagerTask.containerSettings] If the - * pool that will run this task has containerConfiguration set, this must be - * set as well. If the pool that will run this task doesn't have - * containerConfiguration set, this must not be set. When this is specified, - * all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of - * Azure Batch directories on the node) are mapped into the container, all task - * environment variables are mapped into the container, and the task command - * line is executed in the container. - * @member {string} - * [jobSpecification.jobManagerTask.containerSettings.containerRunOptions] - * These additional options are supplied as arguments to the "docker create" - * command, in addition to those controlled by the Batch Service. - * @member {string} - * [jobSpecification.jobManagerTask.containerSettings.imageName] This is the - * full image reference, as would be specified to "docker pull". If no tag is - * provided as part of the image name, the tag ":latest" is used as a default. - * @member {object} - * [jobSpecification.jobManagerTask.containerSettings.registry] This setting - * can be omitted if was already provided at pool creation. - * @member {string} - * [jobSpecification.jobManagerTask.containerSettings.registry.registryServer] - * If omitted, the default is "docker.io". - * @member {string} - * [jobSpecification.jobManagerTask.containerSettings.registry.userName] - * @member {string} - * [jobSpecification.jobManagerTask.containerSettings.registry.password] - * @member {array} [jobSpecification.jobManagerTask.resourceFiles] Files listed - * under this element are located in the task's working directory. There is a - * maximum size for the list of resource files. When the max size is exceeded, - * the request will fail and the response error code will be - * RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must - * be reduced in size. This can be achieved using .zip files, Application - * Packages, or Docker Containers. - * @member {array} [jobSpecification.jobManagerTask.outputFiles] For - * multi-instance tasks, the files will only be uploaded from the compute node - * on which the primary task is executed. - * @member {array} [jobSpecification.jobManagerTask.environmentSettings] - * @member {object} [jobSpecification.jobManagerTask.constraints] - * @member {moment.duration} - * [jobSpecification.jobManagerTask.constraints.maxWallClockTime] If this is - * not specified, there is no time limit on how long the task may run. - * @member {moment.duration} - * [jobSpecification.jobManagerTask.constraints.retentionTime] The default is - * infinite, i.e. the task directory will be retained until the compute node is - * removed or reimaged. - * @member {number} - * [jobSpecification.jobManagerTask.constraints.maxTaskRetryCount] Note that - * this value specifically controls the number of retries for the task - * executable due to a nonzero exit code. The Batch service will try the task - * once, and may then retry up to this limit. For example, if the maximum retry - * count is 3, Batch tries the task up to 4 times (one initial try and 3 - * retries). If the maximum retry count is 0, the Batch service does not retry - * the task after the first attempt. If the maximum retry count is -1, the - * Batch service retries the task without limit. Resource files and application - * packages are only downloaded again if the task is retried on a new compute - * node. - * @member {boolean} [jobSpecification.jobManagerTask.killJobOnCompletion] If - * true, when the Job Manager task completes, the Batch service marks the job - * as complete. If any tasks are still running at this time (other than Job - * Release), those tasks are terminated. If false, the completion of the Job - * Manager task does not affect the job status. In this case, you should either - * use the onAllTasksComplete attribute to terminate the job, or have a client - * or user terminate the job explicitly. An example of this is if the Job - * Manager creates a set of tasks but then takes no further role in their - * execution. The default value is true. If you are using the - * onAllTasksComplete and onTaskFailure attributes to control job lifetime, and - * using the Job Manager task only to create the tasks for the job (not to - * monitor progress), then it is important to set killJobOnCompletion to false. - * @member {object} [jobSpecification.jobManagerTask.userIdentity] If omitted, - * the task runs as a non-administrative user unique to the task. - * @member {string} [jobSpecification.jobManagerTask.userIdentity.userName] The - * userName and autoUser properties are mutually exclusive; you must specify - * one but not both. - * @member {object} [jobSpecification.jobManagerTask.userIdentity.autoUser] The - * userName and autoUser properties are mutually exclusive; you must specify - * one but not both. - * @member {string} - * [jobSpecification.jobManagerTask.userIdentity.autoUser.scope] The default - * value is task. Possible values include: 'task', 'pool' - * @member {string} - * [jobSpecification.jobManagerTask.userIdentity.autoUser.elevationLevel] The - * default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {boolean} [jobSpecification.jobManagerTask.runExclusive] If true, no - * other tasks will run on the same compute node for as long as the Job Manager - * is running. If false, other tasks can run simultaneously with the Job - * Manager on a compute node. The Job Manager task counts normally against the - * node's concurrent task limit, so this is only relevant if the node allows - * multiple concurrent tasks. The default value is true. - * @member {array} - * [jobSpecification.jobManagerTask.applicationPackageReferences] Application - * packages are downloaded and deployed to a shared directory, not the task - * working directory. Therefore, if a referenced package is already on the - * compute node, and is up to date, then it is not re-downloaded; the existing - * copy on the compute node is used. If a referenced application package cannot - * be installed, for example because the package has been deleted or because - * download failed, the task fails. - * @member {object} - * [jobSpecification.jobManagerTask.authenticationTokenSettings] If this - * property is set, the Batch service provides the task with an authentication - * token which can be used to authenticate Batch service operations without - * requiring an account access key. The token is provided via the - * AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations that the - * task can carry out using the token depend on the settings. For example, a - * task can request job permissions in order to add other tasks to the job, or - * check the status of the job or of other tasks under the job. - * @member {array} - * [jobSpecification.jobManagerTask.authenticationTokenSettings.access] The - * authentication token grants access to a limited set of Batch service - * operations. Currently the only supported value for the access property is - * 'job', which grants access to all operations related to the job which - * contains the task. - * @member {boolean} [jobSpecification.jobManagerTask.allowLowPriorityNode] The - * default value is true. - * @member {object} [jobSpecification.jobPreparationTask] If a job has a Job - * Preparation task, the Batch service will run the Job Preparation task on a - * compute node before starting any tasks of that job on that compute node. - * @member {string} [jobSpecification.jobPreparationTask.id] The ID can contain - * any combination of alphanumeric characters including hyphens and underscores - * and cannot contain more than 64 characters. If you do not specify this - * property, the Batch service assigns a default value of 'jobpreparation'. No - * other task in the job can have the same ID as the Job Preparation task. If - * you try to submit a task with the same id, the Batch service rejects the - * request with error code TaskIdSameAsJobPreparationTask; if you are calling - * the REST API directly, the HTTP status code is 409 (Conflict). - * @member {string} [jobSpecification.jobPreparationTask.commandLine] The - * command line does not run under a shell, and therefore cannot take advantage - * of shell features such as environment variable expansion. If you want to - * take advantage of such features, you should invoke the shell in the command - * line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c - * MyCommand" in Linux. If the command line refers to file paths, it should use - * a relative path (relative to the task working directory), or use the Batch - * provided environment variable - * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [jobSpecification.jobPreparationTask.containerSettings] - * When this is specified, all directories recursively below the - * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are - * mapped into the container, all task environment variables are mapped into - * the container, and the task command line is executed in the container. - * @member {string} - * [jobSpecification.jobPreparationTask.containerSettings.containerRunOptions] - * These additional options are supplied as arguments to the "docker create" - * command, in addition to those controlled by the Batch Service. - * @member {string} - * [jobSpecification.jobPreparationTask.containerSettings.imageName] This is - * the full image reference, as would be specified to "docker pull". If no tag - * is provided as part of the image name, the tag ":latest" is used as a - * default. - * @member {object} - * [jobSpecification.jobPreparationTask.containerSettings.registry] This - * setting can be omitted if was already provided at pool creation. - * @member {string} - * [jobSpecification.jobPreparationTask.containerSettings.registry.registryServer] - * If omitted, the default is "docker.io". - * @member {string} - * [jobSpecification.jobPreparationTask.containerSettings.registry.userName] - * @member {string} - * [jobSpecification.jobPreparationTask.containerSettings.registry.password] - * @member {array} [jobSpecification.jobPreparationTask.resourceFiles] Files - * listed under this element are located in the task's working directory. - * There is a maximum size for the list of resource files. When the max size - * is exceeded, the request will fail and the response error code will be - * RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must - * be reduced in size. This can be achieved using .zip files, Application - * Packages, or Docker Containers. - * @member {array} [jobSpecification.jobPreparationTask.environmentSettings] - * @member {object} [jobSpecification.jobPreparationTask.constraints] - * @member {moment.duration} - * [jobSpecification.jobPreparationTask.constraints.maxWallClockTime] If this - * is not specified, there is no time limit on how long the task may run. - * @member {moment.duration} - * [jobSpecification.jobPreparationTask.constraints.retentionTime] The default - * is infinite, i.e. the task directory will be retained until the compute node - * is removed or reimaged. - * @member {number} - * [jobSpecification.jobPreparationTask.constraints.maxTaskRetryCount] Note - * that this value specifically controls the number of retries for the task - * executable due to a nonzero exit code. The Batch service will try the task - * once, and may then retry up to this limit. For example, if the maximum retry - * count is 3, Batch tries the task up to 4 times (one initial try and 3 - * retries). If the maximum retry count is 0, the Batch service does not retry - * the task after the first attempt. If the maximum retry count is -1, the - * Batch service retries the task without limit. Resource files and application - * packages are only downloaded again if the task is retried on a new compute - * node. - * @member {boolean} [jobSpecification.jobPreparationTask.waitForSuccess] If - * true and the Job Preparation task fails on a compute node, the Batch service - * retries the Job Preparation task up to its maximum retry count (as specified - * in the constraints element). If the task has still not completed - * successfully after all retries, then the Batch service will not schedule - * tasks of the job to the compute node. The compute node remains active and - * eligible to run tasks of other jobs. If false, the Batch service will not - * wait for the Job Preparation task to complete. In this case, other tasks of - * the job can start executing on the compute node while the Job Preparation - * task is still running; and even if the Job Preparation task fails, new tasks - * will continue to be scheduled on the node. The default value is true. - * @member {object} [jobSpecification.jobPreparationTask.userIdentity] If - * omitted, the task runs as a non-administrative user unique to the task on - * Windows nodes, or a a non-administrative user unique to the pool on Linux - * nodes. - * @member {string} [jobSpecification.jobPreparationTask.userIdentity.userName] - * The userName and autoUser properties are mutually exclusive; you must - * specify one but not both. - * @member {object} [jobSpecification.jobPreparationTask.userIdentity.autoUser] - * The userName and autoUser properties are mutually exclusive; you must - * specify one but not both. - * @member {string} - * [jobSpecification.jobPreparationTask.userIdentity.autoUser.scope] The - * default value is task. Possible values include: 'task', 'pool' - * @member {string} - * [jobSpecification.jobPreparationTask.userIdentity.autoUser.elevationLevel] - * The default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {boolean} - * [jobSpecification.jobPreparationTask.rerunOnNodeRebootAfterSuccess] The Job - * Preparation task is always rerun if a compute node is reimaged, or if the - * Job Preparation task did not complete (e.g. because the reboot occurred - * while the task was running). Therefore, you should always write a Job - * Preparation task to be idempotent and to behave correctly if run multiple - * times. The default value is true. - * @member {object} [jobSpecification.jobReleaseTask] The primary purpose of - * the Job Release task is to undo changes to compute nodes made by the Job - * Preparation task. Example activities include deleting local files, or - * shutting down services that were started as part of job preparation. A Job - * Release task cannot be specified without also specifying a Job Preparation - * task for the job. The Batch service runs the Job Release task on the compute - * nodes that have run the Job Preparation task. - * @member {string} [jobSpecification.jobReleaseTask.id] The ID can contain any - * combination of alphanumeric characters including hyphens and underscores and - * cannot contain more than 64 characters. If you do not specify this property, - * the Batch service assigns a default value of 'jobrelease'. No other task in - * the job can have the same ID as the Job Release task. If you try to submit a - * task with the same id, the Batch service rejects the request with error code - * TaskIdSameAsJobReleaseTask; if you are calling the REST API directly, the - * HTTP status code is 409 (Conflict). - * @member {string} [jobSpecification.jobReleaseTask.commandLine] The command - * line does not run under a shell, and therefore cannot take advantage of - * shell features such as environment variable expansion. If you want to take - * advantage of such features, you should invoke the shell in the command line, - * for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in - * Linux. If the command line refers to file paths, it should use a relative - * path (relative to the task working directory), or use the Batch provided - * environment variable - * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [jobSpecification.jobReleaseTask.containerSettings] When - * this is specified, all directories recursively below the - * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are - * mapped into the container, all task environment variables are mapped into - * the container, and the task command line is executed in the container. - * @member {string} - * [jobSpecification.jobReleaseTask.containerSettings.containerRunOptions] - * These additional options are supplied as arguments to the "docker create" - * command, in addition to those controlled by the Batch Service. - * @member {string} - * [jobSpecification.jobReleaseTask.containerSettings.imageName] This is the - * full image reference, as would be specified to "docker pull". If no tag is - * provided as part of the image name, the tag ":latest" is used as a default. - * @member {object} - * [jobSpecification.jobReleaseTask.containerSettings.registry] This setting - * can be omitted if was already provided at pool creation. - * @member {string} - * [jobSpecification.jobReleaseTask.containerSettings.registry.registryServer] - * If omitted, the default is "docker.io". - * @member {string} - * [jobSpecification.jobReleaseTask.containerSettings.registry.userName] - * @member {string} - * [jobSpecification.jobReleaseTask.containerSettings.registry.password] - * @member {array} [jobSpecification.jobReleaseTask.resourceFiles] Files listed - * under this element are located in the task's working directory. - * @member {array} [jobSpecification.jobReleaseTask.environmentSettings] - * @member {moment.duration} [jobSpecification.jobReleaseTask.maxWallClockTime] - * @member {moment.duration} [jobSpecification.jobReleaseTask.retentionTime] - * The default is infinite, i.e. the task directory will be retained until the - * compute node is removed or reimaged. - * @member {object} [jobSpecification.jobReleaseTask.userIdentity] If omitted, - * the task runs as a non-administrative user unique to the task. - * @member {string} [jobSpecification.jobReleaseTask.userIdentity.userName] The - * userName and autoUser properties are mutually exclusive; you must specify - * one but not both. - * @member {object} [jobSpecification.jobReleaseTask.userIdentity.autoUser] The - * userName and autoUser properties are mutually exclusive; you must specify - * one but not both. - * @member {string} - * [jobSpecification.jobReleaseTask.userIdentity.autoUser.scope] The default - * value is task. Possible values include: 'task', 'pool' - * @member {string} - * [jobSpecification.jobReleaseTask.userIdentity.autoUser.elevationLevel] The - * default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {array} [jobSpecification.commonEnvironmentSettings] Individual - * tasks can override an environment setting specified here by specifying the - * same setting name with a different value. - * @member {object} [jobSpecification.poolInfo] - * @member {string} [jobSpecification.poolInfo.poolId] You must ensure that the - * pool referenced by this property exists. If the pool does not exist at the - * time the Batch service tries to schedule a job, no tasks for the job will - * run until you create a pool with that id. Note that the Batch service will - * not reject the job request; it will simply not run tasks until the pool - * exists. You must specify either the pool ID or the auto pool specification, - * but not both. - * @member {object} [jobSpecification.poolInfo.autoPoolSpecification] If auto - * pool creation fails, the Batch service moves the job to a completed state, - * and the pool creation error is set in the job's scheduling error property. - * The Batch service manages the lifetime (both creation and, unless keepAlive - * is specified, deletion) of the auto pool. Any user actions that affect the - * lifetime of the auto pool while the job is active will result in unexpected - * behavior. You must specify either the pool ID or the auto pool - * specification, but not both. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.autoPoolIdPrefix] The Batch - * service assigns each auto pool a unique identifier on creation. To - * distinguish between pools created for different purposes, you can specify - * this element to add a prefix to the ID that is assigned. The prefix can be - * up to 20 characters long. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.poolLifetimeOption] - * Possible values include: 'jobSchedule', 'job' - * @member {boolean} - * [jobSpecification.poolInfo.autoPoolSpecification.keepAlive] If false, the - * Batch service deletes the pool once its lifetime (as determined by the - * poolLifetimeOption setting) expires; that is, when the job or job schedule - * completes. If true, the Batch service does not delete the pool - * automatically. It is up to the user to delete auto pools created with this - * option. - * @member {object} [jobSpecification.poolInfo.autoPoolSpecification.pool] - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.displayName] The - * display name need not be unique and can contain any Unicode characters up to - * a maximum length of 1024. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.vmSize] For - * information about available sizes of virtual machines in pools, see Choose a - * VM size for compute nodes in an Azure Batch pool - * (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration] - * This property must be specified if the pool needs to be created with Azure - * PaaS VMs. This property and virtualMachineConfiguration are mutually - * exclusive and one of the properties must be specified. If neither is - * specified then the Batch service returns an error; if you are calling the - * REST API directly, the HTTP status code is 400 (Bad Request). This property - * cannot be specified if the Batch account was created with its - * poolAllocationMode property set to 'UserSubscription'. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osFamily] - * Possible values are: - * 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. - * 3 - OS Family 3, equivalent to Windows Server 2012. - * 4 - OS Family 4, equivalent to Windows Server 2012 R2. - * 5 - OS Family 5, equivalent to Windows Server 2016. For more information, - * see Azure Guest OS Releases - * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] - * The default value is * which specifies the latest operating system version - * for the specified OS family. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.currentOSVersion] - * This may differ from targetOSVersion if the pool state is Upgrading. In this - * case some virtual machines may be on the targetOSVersion and some may be on - * the currentOSVersion during the upgrade process. Once all virtual machines - * have upgraded, currentOSVersion is updated to be the same as - * targetOSVersion. - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration] - * This property must be specified if the pool needs to be created with Azure - * IaaS VMs. This property and cloudServiceConfiguration are mutually exclusive - * and one of the properties must be specified. If neither is specified then - * the Batch service returns an error; if you are calling the REST API - * directly, the HTTP status code is 400 (Bad Request). - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference] - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.publisher] - * For example, Canonical or MicrosoftWindowsServer. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.offer] - * For example, UbuntuServer or WindowsServer. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.sku] - * For example, 14.04.0-LTS or 2012-R2-Datacenter. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.version] - * A value of 'latest' can be specified to select the latest version of an - * image. If omitted, the default is 'latest'. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.virtualMachineImageId] - * This property is mutually exclusive with other ImageReference properties. - * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The default value for caching is readwrite. For information about the - * caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId] - * The Batch node agent is a program that runs on each node in the pool, and - * provides the command-and-control interface between the node and the Batch - * service. There are different implementations of the node agent, known as - * SKUs, for different operating systems. You must specify a node agent SKU - * which matches the selected image reference. To get the list of supported - * node agent SKUs along with their list of verified image references, see the - * 'List supported node agent SKUs' operation. - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] - * This property must not be specified if the imageReference or osDisk property - * specifies a Linux OS image. - * @member {boolean} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] - * If omitted, the default value is true. - * @member {array} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.dataDisks] - * This property must be specified if the compute nodes in the pool need to - * have empty data disks attached to them. This cannot be updated. Each node - * gets its own disk (the disk is not a file share). Existing disks cannot be - * attached, each attached disk is empty. When the node is removed from the - * pool, the disk and all data associated with it is also deleted. The disk is - * not formatted after being attached, it must be formatted before use - for - * more information see - * https://docs.microsoft.com/en-us/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux - * and - * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.licenseType] - * This only applies to images that contain the Windows operating system, and - * should only be used when you hold valid on-premises licenses for the nodes - * which will be deployed. If omitted, no on-premises licensing discount is - * applied. Values are: - * - * Windows_Server - The on-premises license is for Windows Server. - * Windows_Client - The on-premises license is for Windows Client. - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration] - * If specified, setup is performed on each node in the pool to allow tasks to - * run in containers. All regular tasks and job manager tasks run on this pool - * must specify the containerSettings property, and all other tasks may specify - * it. - * @member {array} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration.containerImageNames] - * This is the full image reference, as would be specified to "docker pull". An - * image will be sourced from the default Docker registry unless the image is - * fully qualified with an alternative registry. - * @member {array} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration.containerRegistries] - * If any images must be downloaded from a private registry which requires - * credentials, then those credentials must be provided here. - * @member {number} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.maxTasksPerNode] The - * default value is 1. The maximum value of this setting depends on the size of - * the compute nodes in the pool (the vmSize setting). - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.taskSchedulingPolicy] - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.taskSchedulingPolicy.nodeFillType] - * Possible values include: 'spread', 'pack' - * @member {moment.duration} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.resizeTimeout] This - * timeout applies only to manual scaling; it has no effect when - * enableAutoScale is set to true. The default value is 15 minutes. The minimum - * value is 5 minutes. If you specify a value less than 5 minutes, the Batch - * service rejects the request with an error; if you are calling the REST API - * directly, the HTTP status code is 400 (Bad Request). - * @member {number} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.targetDedicatedNodes] - * This property must not be specified if enableAutoScale is set to true. If - * enableAutoScale is set to false, then you must set either - * targetDedicatedNodes, targetLowPriorityNodes, or both. - * @member {number} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.targetLowPriorityNodes] - * This property must not be specified if enableAutoScale is set to true. If - * enableAutoScale is set to false, then you must set either - * targetDedicatedNodes, targetLowPriorityNodes, or both. - * @member {boolean} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.enableAutoScale] If - * false, at least one of targetDedicateNodes and targetLowPriorityNodes must - * be specified. If true, the autoScaleFormula element is required. The pool - * automatically resizes according to the formula. The default value is false. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.autoScaleFormula] This - * property must not be specified if enableAutoScale is set to false. It is - * required if enableAutoScale is set to true. The formula is checked for - * validity before the pool is created. If the formula is not valid, the Batch - * service rejects the request with detailed error information. - * @member {moment.duration} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.autoScaleEvaluationInterval] - * The default value is 15 minutes. The minimum and maximum value are 5 minutes - * and 168 hours respectively. If you specify a value less than 5 minutes or - * greater than 168 hours, the Batch service rejects the request with an - * invalid property value error; if you are calling the REST API directly, the - * HTTP status code is 400 (Bad Request). - * @member {boolean} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.enableInterNodeCommunication] - * Enabling inter-node communication limits the maximum size of the pool due to - * deployment restrictions on the nodes of the pool. This may result in the - * pool not reaching its desired size. The default value is false. - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration] - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.subnetId] - * The virtual network must be in the same region and subscription as the Azure - * Batch account. The specified subnet should have enough free IP addresses to - * accommodate the number of nodes in the pool. If the subnet doesn't have - * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks - * ('Microsoft.Network/virtualNetworks') are supported, but for pools created - * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] - * Pool endpoint configuration is only supported on pools with the - * virtualMachineConfiguration property. - * @member {array} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration.inboundNATPools] - * The maximum number of inbound NAT pools per Batch pool is 5. If the maximum - * number of inbound NAT pools is exceeded the request fails with HTTP status - * code 400. - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask] - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.commandLine] - * The command line does not run under a shell, and therefore cannot take - * advantage of shell features such as environment variable expansion. If you - * want to take advantage of such features, you should invoke the shell in the - * command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c - * MyCommand" in Linux. If the command line refers to file paths, it should use - * a relative path (relative to the task working directory), or use the Batch - * provided environment variable - * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings] - * When this is specified, all directories recursively below the - * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are - * mapped into the container, all task environment variables are mapped into - * the container, and the task command line is executed in the container. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.containerRunOptions] - * These additional options are supplied as arguments to the "docker create" - * command, in addition to those controlled by the Batch Service. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.imageName] - * This is the full image reference, as would be specified to "docker pull". If - * no tag is provided as part of the image name, the tag ":latest" is used as a - * default. - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry] - * This setting can be omitted if was already provided at pool creation. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.registryServer] - * If omitted, the default is "docker.io". - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.userName] - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.password] - * @member {array} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.resourceFiles] - * Files listed under this element are located in the task's working directory. - * @member {array} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.environmentSettings] - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.userIdentity] - * If omitted, the task runs as a non-administrative user unique to the task. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.userIdentity.userName] - * The userName and autoUser properties are mutually exclusive; you must - * specify one but not both. - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser] - * The userName and autoUser properties are mutually exclusive; you must - * specify one but not both. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser.scope] - * The default value is task. Possible values include: 'task', 'pool' - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser.elevationLevel] - * The default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {number} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.maxTaskRetryCount] - * The Batch service retries a task if its exit code is nonzero. Note that this - * value specifically controls the number of retries. The Batch service will - * try the task once, and may then retry up to this limit. For example, if the - * maximum retry count is 3, Batch tries the task up to 4 times (one initial - * try and 3 retries). If the maximum retry count is 0, the Batch service does - * not retry the task. If the maximum retry count is -1, the Batch service - * retries the task without limit. - * @member {boolean} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.waitForSuccess] - * If true and the start task fails on a compute node, the Batch service - * retries the start task up to its maximum retry count (maxTaskRetryCount). If - * the task has still not completed successfully after all retries, then the - * Batch service marks the compute node unusable, and will not schedule tasks - * to it. This condition can be detected via the node state and failure info - * details. If false, the Batch service will not wait for the start task to - * complete. In this case, other tasks can start executing on the compute node - * while the start task is still running; and even if the start task fails, new - * tasks will continue to be scheduled on the node. The default is false. - * @member {array} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.certificateReferences] - * For Windows compute nodes, the Batch service installs the certificates to - * the specified certificate store and location. For Linux compute nodes, the - * certificates are stored in a directory inside the task working directory and - * an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to - * query for this location. For certificates with visibility of 'remoteUser', a - * 'certs' directory is created in the user's home directory (e.g., - * /home/{user-name}/certs) and certificates are placed in that directory. - * @member {array} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.applicationPackageReferences] - * @member {array} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.applicationLicenses] - * The list of application licenses must be a subset of available Batch service - * application licenses. If a license is requested which is not supported, pool - * creation will fail. The permitted licenses available on the pool are 'maya', - * 'vray', '3dsmax', 'arnold'. An additional charge applies for each - * application license added to the pool. - * @member {array} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.userAccounts] - * @member {array} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.metadata] The Batch - * service does not assign any meaning to metadata; it is solely for the use of - * user code. - * @member {array} [jobSpecification.metadata] The Batch service does not - * assign any meaning to metadata; it is solely for the use of user code. - * @member {array} [metadata] A list of name-value pairs associated with the - * job schedule as metadata. If you do not specify this element, it takes the - * default value of an empty list; in effect, any existing metadata is deleted. */ export interface JobScheduleUpdateParameter { + /** + * @summary The schedule according to which jobs will be created. + * @description If you do not specify this element, it is equivalent to passing the default + * schedule: that is, a single job scheduled to run immediately. + */ schedule: Schedule; + /** + * @summary Details of the jobs to be created on this schedule. + * @description Updates affect only jobs that are started after the update has taken place. Any + * currently active job continues with the older specification. + */ jobSpecification: JobSpecification; + /** + * @summary A list of name-value pairs associated with the job schedule as metadata. + * @description If you do not specify this element, it takes the default value of an empty list; + * in effect, any existing metadata is deleted. + */ metadata?: MetadataItem[]; } /** - * @class - * Initializes a new instance of the JobDisableParameter class. - * @constructor * @summary Options when disabling a job. - * - * @member {string} disableTasks What to do with active tasks associated with - * the job. Possible values include: 'requeue', 'terminate', 'wait' */ export interface JobDisableParameter { + /** + * @summary What to do with active tasks associated with the job. + * @description Possible values include: 'requeue', 'terminate', 'wait' + */ disableTasks: string; } /** - * @class - * Initializes a new instance of the JobTerminateParameter class. - * @constructor * @summary Options when terminating a job. - * - * @member {string} [terminateReason] The text you want to appear as the job's - * TerminateReason. The default is 'UserTerminate'. */ export interface JobTerminateParameter { + /** + * @summary The text you want to appear as the job's TerminateReason. The default is + * 'UserTerminate'. + */ terminateReason?: string; } /** - * @class - * Initializes a new instance of the JobPatchParameter class. - * @constructor * @summary The set of changes to be made to a job. - * - * @member {number} [priority] The priority of the job. Priority values can - * range from -1000 to 1000, with -1000 being the lowest priority and 1000 - * being the highest priority. If omitted, the priority of the job is left - * unchanged. - * @member {string} [onAllTasksComplete] The action the Batch service should - * take when all tasks in the job are in the completed state. If omitted, the - * completion behavior is left unchanged. You may not change the value from - * terminatejob to noaction - that is, once you have engaged automatic job - * termination, you cannot turn it off again. If you try to do this, the - * request fails with an 'invalid property value' error response; if you are - * calling the REST API directly, the HTTP status code is 400 (Bad Request). - * Possible values include: 'noAction', 'terminateJob' - * @member {object} [constraints] The execution constraints for the job. If - * omitted, the existing execution constraints are left unchanged. - * @member {moment.duration} [constraints.maxWallClockTime] If the job does not - * complete within the time limit, the Batch service terminates it and any - * tasks that are still running. In this case, the termination reason will be - * MaxWallClockTimeExpiry. If this property is not specified, there is no time - * limit on how long the job may run. - * @member {number} [constraints.maxTaskRetryCount] Note that this value - * specifically controls the number of retries. The Batch service will try each - * task once, and may then retry up to this limit. For example, if the maximum - * retry count is 3, Batch tries a task up to 4 times (one initial try and 3 - * retries). If the maximum retry count is 0, the Batch service does not retry - * tasks. If the maximum retry count is -1, the Batch service retries tasks - * without limit. The default value is 0 (no retries). - * @member {object} [poolInfo] The pool on which the Batch service runs the - * job's tasks. You may change the pool for a job only when the job is - * disabled. The Patch Job call will fail if you include the poolInfo element - * and the job is not disabled. If you specify an autoPoolSpecification - * specification in the poolInfo, only the keepAlive property can be updated, - * and then only if the auto pool has a poolLifetimeOption of job. If omitted, - * the job continues to run on its current pool. - * @member {string} [poolInfo.poolId] You must ensure that the pool referenced - * by this property exists. If the pool does not exist at the time the Batch - * service tries to schedule a job, no tasks for the job will run until you - * create a pool with that id. Note that the Batch service will not reject the - * job request; it will simply not run tasks until the pool exists. You must - * specify either the pool ID or the auto pool specification, but not both. - * @member {object} [poolInfo.autoPoolSpecification] If auto pool creation - * fails, the Batch service moves the job to a completed state, and the pool - * creation error is set in the job's scheduling error property. The Batch - * service manages the lifetime (both creation and, unless keepAlive is - * specified, deletion) of the auto pool. Any user actions that affect the - * lifetime of the auto pool while the job is active will result in unexpected - * behavior. You must specify either the pool ID or the auto pool - * specification, but not both. - * @member {string} [poolInfo.autoPoolSpecification.autoPoolIdPrefix] The Batch - * service assigns each auto pool a unique identifier on creation. To - * distinguish between pools created for different purposes, you can specify - * this element to add a prefix to the ID that is assigned. The prefix can be - * up to 20 characters long. - * @member {string} [poolInfo.autoPoolSpecification.poolLifetimeOption] - * Possible values include: 'jobSchedule', 'job' - * @member {boolean} [poolInfo.autoPoolSpecification.keepAlive] If false, the - * Batch service deletes the pool once its lifetime (as determined by the - * poolLifetimeOption setting) expires; that is, when the job or job schedule - * completes. If true, the Batch service does not delete the pool - * automatically. It is up to the user to delete auto pools created with this - * option. - * @member {object} [poolInfo.autoPoolSpecification.pool] - * @member {string} [poolInfo.autoPoolSpecification.pool.displayName] The - * display name need not be unique and can contain any Unicode characters up to - * a maximum length of 1024. - * @member {string} [poolInfo.autoPoolSpecification.pool.vmSize] For - * information about available sizes of virtual machines in pools, see Choose a - * VM size for compute nodes in an Azure Batch pool - * (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). - * @member {object} - * [poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration] This - * property must be specified if the pool needs to be created with Azure PaaS - * VMs. This property and virtualMachineConfiguration are mutually exclusive - * and one of the properties must be specified. If neither is specified then - * the Batch service returns an error; if you are calling the REST API - * directly, the HTTP status code is 400 (Bad Request). This property cannot be - * specified if the Batch account was created with its poolAllocationMode - * property set to 'UserSubscription'. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osFamily] - * Possible values are: - * 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. - * 3 - OS Family 3, equivalent to Windows Server 2012. - * 4 - OS Family 4, equivalent to Windows Server 2012 R2. - * 5 - OS Family 5, equivalent to Windows Server 2016. For more information, - * see Azure Guest OS Releases - * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). - * @member {string} - * [poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] - * The default value is * which specifies the latest operating system version - * for the specified OS family. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.currentOSVersion] - * This may differ from targetOSVersion if the pool state is Upgrading. In this - * case some virtual machines may be on the targetOSVersion and some may be on - * the currentOSVersion during the upgrade process. Once all virtual machines - * have upgraded, currentOSVersion is updated to be the same as - * targetOSVersion. - * @member {object} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration] This - * property must be specified if the pool needs to be created with Azure IaaS - * VMs. This property and cloudServiceConfiguration are mutually exclusive and - * one of the properties must be specified. If neither is specified then the - * Batch service returns an error; if you are calling the REST API directly, - * the HTTP status code is 400 (Bad Request). - * @member {object} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference] - * @member {string} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.publisher] - * For example, Canonical or MicrosoftWindowsServer. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.offer] - * For example, UbuntuServer or WindowsServer. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.sku] - * For example, 14.04.0-LTS or 2012-R2-Datacenter. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.version] - * A value of 'latest' can be specified to select the latest version of an - * image. If omitted, the default is 'latest'. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.virtualMachineImageId] - * This property is mutually exclusive with other ImageReference properties. - * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * @member {object} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * @member {string} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The default value for caching is readwrite. For information about the - * caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' - * @member {string} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId] - * The Batch node agent is a program that runs on each node in the pool, and - * provides the command-and-control interface between the node and the Batch - * service. There are different implementations of the node agent, known as - * SKUs, for different operating systems. You must specify a node agent SKU - * which matches the selected image reference. To get the list of supported - * node agent SKUs along with their list of verified image references, see the - * 'List supported node agent SKUs' operation. - * @member {object} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] - * This property must not be specified if the imageReference or osDisk property - * specifies a Linux OS image. - * @member {boolean} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] - * If omitted, the default value is true. - * @member {array} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.dataDisks] - * This property must be specified if the compute nodes in the pool need to - * have empty data disks attached to them. This cannot be updated. Each node - * gets its own disk (the disk is not a file share). Existing disks cannot be - * attached, each attached disk is empty. When the node is removed from the - * pool, the disk and all data associated with it is also deleted. The disk is - * not formatted after being attached, it must be formatted before use - for - * more information see - * https://docs.microsoft.com/en-us/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux - * and - * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.licenseType] - * This only applies to images that contain the Windows operating system, and - * should only be used when you hold valid on-premises licenses for the nodes - * which will be deployed. If omitted, no on-premises licensing discount is - * applied. Values are: - * - * Windows_Server - The on-premises license is for Windows Server. - * Windows_Client - The on-premises license is for Windows Client. - * @member {object} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration] - * If specified, setup is performed on each node in the pool to allow tasks to - * run in containers. All regular tasks and job manager tasks run on this pool - * must specify the containerSettings property, and all other tasks may specify - * it. - * @member {array} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration.containerImageNames] - * This is the full image reference, as would be specified to "docker pull". An - * image will be sourced from the default Docker registry unless the image is - * fully qualified with an alternative registry. - * @member {array} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration.containerRegistries] - * If any images must be downloaded from a private registry which requires - * credentials, then those credentials must be provided here. - * @member {number} [poolInfo.autoPoolSpecification.pool.maxTasksPerNode] The - * default value is 1. The maximum value of this setting depends on the size of - * the compute nodes in the pool (the vmSize setting). - * @member {object} [poolInfo.autoPoolSpecification.pool.taskSchedulingPolicy] - * @member {string} - * [poolInfo.autoPoolSpecification.pool.taskSchedulingPolicy.nodeFillType] - * Possible values include: 'spread', 'pack' - * @member {moment.duration} - * [poolInfo.autoPoolSpecification.pool.resizeTimeout] This timeout applies - * only to manual scaling; it has no effect when enableAutoScale is set to - * true. The default value is 15 minutes. The minimum value is 5 minutes. If - * you specify a value less than 5 minutes, the Batch service rejects the - * request with an error; if you are calling the REST API directly, the HTTP - * status code is 400 (Bad Request). - * @member {number} [poolInfo.autoPoolSpecification.pool.targetDedicatedNodes] - * This property must not be specified if enableAutoScale is set to true. If - * enableAutoScale is set to false, then you must set either - * targetDedicatedNodes, targetLowPriorityNodes, or both. - * @member {number} - * [poolInfo.autoPoolSpecification.pool.targetLowPriorityNodes] This property - * must not be specified if enableAutoScale is set to true. If enableAutoScale - * is set to false, then you must set either targetDedicatedNodes, - * targetLowPriorityNodes, or both. - * @member {boolean} [poolInfo.autoPoolSpecification.pool.enableAutoScale] If - * false, at least one of targetDedicateNodes and targetLowPriorityNodes must - * be specified. If true, the autoScaleFormula element is required. The pool - * automatically resizes according to the formula. The default value is false. - * @member {string} [poolInfo.autoPoolSpecification.pool.autoScaleFormula] This - * property must not be specified if enableAutoScale is set to false. It is - * required if enableAutoScale is set to true. The formula is checked for - * validity before the pool is created. If the formula is not valid, the Batch - * service rejects the request with detailed error information. - * @member {moment.duration} - * [poolInfo.autoPoolSpecification.pool.autoScaleEvaluationInterval] The - * default value is 15 minutes. The minimum and maximum value are 5 minutes and - * 168 hours respectively. If you specify a value less than 5 minutes or - * greater than 168 hours, the Batch service rejects the request with an - * invalid property value error; if you are calling the REST API directly, the - * HTTP status code is 400 (Bad Request). - * @member {boolean} - * [poolInfo.autoPoolSpecification.pool.enableInterNodeCommunication] Enabling - * inter-node communication limits the maximum size of the pool due to - * deployment restrictions on the nodes of the pool. This may result in the - * pool not reaching its desired size. The default value is false. - * @member {object} [poolInfo.autoPoolSpecification.pool.networkConfiguration] - * @member {string} - * [poolInfo.autoPoolSpecification.pool.networkConfiguration.subnetId] The - * virtual network must be in the same region and subscription as the Azure - * Batch account. The specified subnet should have enough free IP addresses to - * accommodate the number of nodes in the pool. If the subnet doesn't have - * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks - * ('Microsoft.Network/virtualNetworks') are supported, but for pools created - * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration - * @member {object} - * [poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] - * Pool endpoint configuration is only supported on pools with the - * virtualMachineConfiguration property. - * @member {array} - * [poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration.inboundNATPools] - * The maximum number of inbound NAT pools per Batch pool is 5. If the maximum - * number of inbound NAT pools is exceeded the request fails with HTTP status - * code 400. - * @member {object} [poolInfo.autoPoolSpecification.pool.startTask] - * @member {string} [poolInfo.autoPoolSpecification.pool.startTask.commandLine] - * The command line does not run under a shell, and therefore cannot take - * advantage of shell features such as environment variable expansion. If you - * want to take advantage of such features, you should invoke the shell in the - * command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c - * MyCommand" in Linux. If the command line refers to file paths, it should use - * a relative path (relative to the task working directory), or use the Batch - * provided environment variable - * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} - * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings] When this - * is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR - * (the root of Azure Batch directories on the node) are mapped into the - * container, all task environment variables are mapped into the container, and - * the task command line is executed in the container. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.containerRunOptions] - * These additional options are supplied as arguments to the "docker create" - * command, in addition to those controlled by the Batch Service. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.imageName] - * This is the full image reference, as would be specified to "docker pull". If - * no tag is provided as part of the image name, the tag ":latest" is used as a - * default. - * @member {object} - * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry] - * This setting can be omitted if was already provided at pool creation. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.registryServer] - * If omitted, the default is "docker.io". - * @member {string} - * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.userName] - * @member {string} - * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.password] - * @member {array} - * [poolInfo.autoPoolSpecification.pool.startTask.resourceFiles] Files listed - * under this element are located in the task's working directory. - * @member {array} - * [poolInfo.autoPoolSpecification.pool.startTask.environmentSettings] - * @member {object} - * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity] If omitted, the - * task runs as a non-administrative user unique to the task. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity.userName] The - * userName and autoUser properties are mutually exclusive; you must specify - * one but not both. - * @member {object} - * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser] The - * userName and autoUser properties are mutually exclusive; you must specify - * one but not both. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser.scope] - * The default value is task. Possible values include: 'task', 'pool' - * @member {string} - * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser.elevationLevel] - * The default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {number} - * [poolInfo.autoPoolSpecification.pool.startTask.maxTaskRetryCount] The Batch - * service retries a task if its exit code is nonzero. Note that this value - * specifically controls the number of retries. The Batch service will try the - * task once, and may then retry up to this limit. For example, if the maximum - * retry count is 3, Batch tries the task up to 4 times (one initial try and 3 - * retries). If the maximum retry count is 0, the Batch service does not retry - * the task. If the maximum retry count is -1, the Batch service retries the - * task without limit. - * @member {boolean} - * [poolInfo.autoPoolSpecification.pool.startTask.waitForSuccess] If true and - * the start task fails on a compute node, the Batch service retries the start - * task up to its maximum retry count (maxTaskRetryCount). If the task has - * still not completed successfully after all retries, then the Batch service - * marks the compute node unusable, and will not schedule tasks to it. This - * condition can be detected via the node state and failure info details. If - * false, the Batch service will not wait for the start task to complete. In - * this case, other tasks can start executing on the compute node while the - * start task is still running; and even if the start task fails, new tasks - * will continue to be scheduled on the node. The default is false. - * @member {array} [poolInfo.autoPoolSpecification.pool.certificateReferences] - * For Windows compute nodes, the Batch service installs the certificates to - * the specified certificate store and location. For Linux compute nodes, the - * certificates are stored in a directory inside the task working directory and - * an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to - * query for this location. For certificates with visibility of 'remoteUser', a - * 'certs' directory is created in the user's home directory (e.g., - * /home/{user-name}/certs) and certificates are placed in that directory. - * @member {array} - * [poolInfo.autoPoolSpecification.pool.applicationPackageReferences] - * @member {array} [poolInfo.autoPoolSpecification.pool.applicationLicenses] - * The list of application licenses must be a subset of available Batch service - * application licenses. If a license is requested which is not supported, pool - * creation will fail. The permitted licenses available on the pool are 'maya', - * 'vray', '3dsmax', 'arnold'. An additional charge applies for each - * application license added to the pool. - * @member {array} [poolInfo.autoPoolSpecification.pool.userAccounts] - * @member {array} [poolInfo.autoPoolSpecification.pool.metadata] The Batch - * service does not assign any meaning to metadata; it is solely for the use of - * user code. - * @member {array} [metadata] A list of name-value pairs associated with the - * job as metadata. If omitted, the existing job metadata is left unchanged. */ export interface JobPatchParameter { + /** + * @summary The priority of the job. + * @description Priority values can range from -1000 to 1000, with -1000 being the lowest + * priority and 1000 being the highest priority. If omitted, the priority of the job is left + * unchanged. + */ priority?: number; + /** + * @summary The action the Batch service should take when all tasks in the job are in the + * completed state. + * @description If omitted, the completion behavior is left unchanged. You may not change the + * value from terminatejob to noaction - that is, once you have engaged automatic job + * termination, you cannot turn it off again. If you try to do this, the request fails with an + * 'invalid property value' error response; if you are calling the REST API directly, the HTTP + * status code is 400 (Bad Request). Possible values include: 'noAction', 'terminateJob' + */ onAllTasksComplete?: string; + /** + * @summary The execution constraints for the job. + * @description If omitted, the existing execution constraints are left unchanged. + */ constraints?: JobConstraints; + /** + * @summary The pool on which the Batch service runs the job's tasks. + * @description You may change the pool for a job only when the job is disabled. The Patch Job + * call will fail if you include the poolInfo element and the job is not disabled. If you specify + * an autoPoolSpecification specification in the poolInfo, only the keepAlive property can be + * updated, and then only if the auto pool has a poolLifetimeOption of job. If omitted, the job + * continues to run on its current pool. + */ poolInfo?: PoolInformation; + /** + * @summary A list of name-value pairs associated with the job as metadata. + * @description If omitted, the existing job metadata is left unchanged. + */ metadata?: MetadataItem[]; } /** - * @class - * Initializes a new instance of the JobUpdateParameter class. - * @constructor * @summary The set of changes to be made to a job. - * - * @member {number} [priority] The priority of the job. Priority values can - * range from -1000 to 1000, with -1000 being the lowest priority and 1000 - * being the highest priority. If omitted, it is set to the default value 0. - * @member {object} [constraints] The execution constraints for the job. If - * omitted, the constraints are cleared. - * @member {moment.duration} [constraints.maxWallClockTime] If the job does not - * complete within the time limit, the Batch service terminates it and any - * tasks that are still running. In this case, the termination reason will be - * MaxWallClockTimeExpiry. If this property is not specified, there is no time - * limit on how long the job may run. - * @member {number} [constraints.maxTaskRetryCount] Note that this value - * specifically controls the number of retries. The Batch service will try each - * task once, and may then retry up to this limit. For example, if the maximum - * retry count is 3, Batch tries a task up to 4 times (one initial try and 3 - * retries). If the maximum retry count is 0, the Batch service does not retry - * tasks. If the maximum retry count is -1, the Batch service retries tasks - * without limit. The default value is 0 (no retries). - * @member {object} poolInfo The pool on which the Batch service runs the job's - * tasks. You may change the pool for a job only when the job is disabled. The - * Update Job call will fail if you include the poolInfo element and the job is - * not disabled. If you specify an autoPoolSpecification specification in the - * poolInfo, only the keepAlive property can be updated, and then only if the - * auto pool has a poolLifetimeOption of job. - * @member {string} [poolInfo.poolId] You must ensure that the pool referenced - * by this property exists. If the pool does not exist at the time the Batch - * service tries to schedule a job, no tasks for the job will run until you - * create a pool with that id. Note that the Batch service will not reject the - * job request; it will simply not run tasks until the pool exists. You must - * specify either the pool ID or the auto pool specification, but not both. - * @member {object} [poolInfo.autoPoolSpecification] If auto pool creation - * fails, the Batch service moves the job to a completed state, and the pool - * creation error is set in the job's scheduling error property. The Batch - * service manages the lifetime (both creation and, unless keepAlive is - * specified, deletion) of the auto pool. Any user actions that affect the - * lifetime of the auto pool while the job is active will result in unexpected - * behavior. You must specify either the pool ID or the auto pool - * specification, but not both. - * @member {string} [poolInfo.autoPoolSpecification.autoPoolIdPrefix] The Batch - * service assigns each auto pool a unique identifier on creation. To - * distinguish between pools created for different purposes, you can specify - * this element to add a prefix to the ID that is assigned. The prefix can be - * up to 20 characters long. - * @member {string} [poolInfo.autoPoolSpecification.poolLifetimeOption] - * Possible values include: 'jobSchedule', 'job' - * @member {boolean} [poolInfo.autoPoolSpecification.keepAlive] If false, the - * Batch service deletes the pool once its lifetime (as determined by the - * poolLifetimeOption setting) expires; that is, when the job or job schedule - * completes. If true, the Batch service does not delete the pool - * automatically. It is up to the user to delete auto pools created with this - * option. - * @member {object} [poolInfo.autoPoolSpecification.pool] - * @member {string} [poolInfo.autoPoolSpecification.pool.displayName] The - * display name need not be unique and can contain any Unicode characters up to - * a maximum length of 1024. - * @member {string} [poolInfo.autoPoolSpecification.pool.vmSize] For - * information about available sizes of virtual machines in pools, see Choose a - * VM size for compute nodes in an Azure Batch pool - * (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). - * @member {object} - * [poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration] This - * property must be specified if the pool needs to be created with Azure PaaS - * VMs. This property and virtualMachineConfiguration are mutually exclusive - * and one of the properties must be specified. If neither is specified then - * the Batch service returns an error; if you are calling the REST API - * directly, the HTTP status code is 400 (Bad Request). This property cannot be - * specified if the Batch account was created with its poolAllocationMode - * property set to 'UserSubscription'. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osFamily] - * Possible values are: - * 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. - * 3 - OS Family 3, equivalent to Windows Server 2012. - * 4 - OS Family 4, equivalent to Windows Server 2012 R2. - * 5 - OS Family 5, equivalent to Windows Server 2016. For more information, - * see Azure Guest OS Releases - * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). - * @member {string} - * [poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] - * The default value is * which specifies the latest operating system version - * for the specified OS family. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.currentOSVersion] - * This may differ from targetOSVersion if the pool state is Upgrading. In this - * case some virtual machines may be on the targetOSVersion and some may be on - * the currentOSVersion during the upgrade process. Once all virtual machines - * have upgraded, currentOSVersion is updated to be the same as - * targetOSVersion. - * @member {object} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration] This - * property must be specified if the pool needs to be created with Azure IaaS - * VMs. This property and cloudServiceConfiguration are mutually exclusive and - * one of the properties must be specified. If neither is specified then the - * Batch service returns an error; if you are calling the REST API directly, - * the HTTP status code is 400 (Bad Request). - * @member {object} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference] - * @member {string} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.publisher] - * For example, Canonical or MicrosoftWindowsServer. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.offer] - * For example, UbuntuServer or WindowsServer. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.sku] - * For example, 14.04.0-LTS or 2012-R2-Datacenter. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.version] - * A value of 'latest' can be specified to select the latest version of an - * image. If omitted, the default is 'latest'. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.virtualMachineImageId] - * This property is mutually exclusive with other ImageReference properties. - * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * @member {object} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * @member {string} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The default value for caching is readwrite. For information about the - * caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' - * @member {string} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId] - * The Batch node agent is a program that runs on each node in the pool, and - * provides the command-and-control interface between the node and the Batch - * service. There are different implementations of the node agent, known as - * SKUs, for different operating systems. You must specify a node agent SKU - * which matches the selected image reference. To get the list of supported - * node agent SKUs along with their list of verified image references, see the - * 'List supported node agent SKUs' operation. - * @member {object} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] - * This property must not be specified if the imageReference or osDisk property - * specifies a Linux OS image. - * @member {boolean} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] - * If omitted, the default value is true. - * @member {array} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.dataDisks] - * This property must be specified if the compute nodes in the pool need to - * have empty data disks attached to them. This cannot be updated. Each node - * gets its own disk (the disk is not a file share). Existing disks cannot be - * attached, each attached disk is empty. When the node is removed from the - * pool, the disk and all data associated with it is also deleted. The disk is - * not formatted after being attached, it must be formatted before use - for - * more information see - * https://docs.microsoft.com/en-us/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux - * and - * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.licenseType] - * This only applies to images that contain the Windows operating system, and - * should only be used when you hold valid on-premises licenses for the nodes - * which will be deployed. If omitted, no on-premises licensing discount is - * applied. Values are: - * - * Windows_Server - The on-premises license is for Windows Server. - * Windows_Client - The on-premises license is for Windows Client. - * @member {object} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration] - * If specified, setup is performed on each node in the pool to allow tasks to - * run in containers. All regular tasks and job manager tasks run on this pool - * must specify the containerSettings property, and all other tasks may specify - * it. - * @member {array} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration.containerImageNames] - * This is the full image reference, as would be specified to "docker pull". An - * image will be sourced from the default Docker registry unless the image is - * fully qualified with an alternative registry. - * @member {array} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration.containerRegistries] - * If any images must be downloaded from a private registry which requires - * credentials, then those credentials must be provided here. - * @member {number} [poolInfo.autoPoolSpecification.pool.maxTasksPerNode] The - * default value is 1. The maximum value of this setting depends on the size of - * the compute nodes in the pool (the vmSize setting). - * @member {object} [poolInfo.autoPoolSpecification.pool.taskSchedulingPolicy] - * @member {string} - * [poolInfo.autoPoolSpecification.pool.taskSchedulingPolicy.nodeFillType] - * Possible values include: 'spread', 'pack' - * @member {moment.duration} - * [poolInfo.autoPoolSpecification.pool.resizeTimeout] This timeout applies - * only to manual scaling; it has no effect when enableAutoScale is set to - * true. The default value is 15 minutes. The minimum value is 5 minutes. If - * you specify a value less than 5 minutes, the Batch service rejects the - * request with an error; if you are calling the REST API directly, the HTTP - * status code is 400 (Bad Request). - * @member {number} [poolInfo.autoPoolSpecification.pool.targetDedicatedNodes] - * This property must not be specified if enableAutoScale is set to true. If - * enableAutoScale is set to false, then you must set either - * targetDedicatedNodes, targetLowPriorityNodes, or both. - * @member {number} - * [poolInfo.autoPoolSpecification.pool.targetLowPriorityNodes] This property - * must not be specified if enableAutoScale is set to true. If enableAutoScale - * is set to false, then you must set either targetDedicatedNodes, - * targetLowPriorityNodes, or both. - * @member {boolean} [poolInfo.autoPoolSpecification.pool.enableAutoScale] If - * false, at least one of targetDedicateNodes and targetLowPriorityNodes must - * be specified. If true, the autoScaleFormula element is required. The pool - * automatically resizes according to the formula. The default value is false. - * @member {string} [poolInfo.autoPoolSpecification.pool.autoScaleFormula] This - * property must not be specified if enableAutoScale is set to false. It is - * required if enableAutoScale is set to true. The formula is checked for - * validity before the pool is created. If the formula is not valid, the Batch - * service rejects the request with detailed error information. - * @member {moment.duration} - * [poolInfo.autoPoolSpecification.pool.autoScaleEvaluationInterval] The - * default value is 15 minutes. The minimum and maximum value are 5 minutes and - * 168 hours respectively. If you specify a value less than 5 minutes or - * greater than 168 hours, the Batch service rejects the request with an - * invalid property value error; if you are calling the REST API directly, the - * HTTP status code is 400 (Bad Request). - * @member {boolean} - * [poolInfo.autoPoolSpecification.pool.enableInterNodeCommunication] Enabling - * inter-node communication limits the maximum size of the pool due to - * deployment restrictions on the nodes of the pool. This may result in the - * pool not reaching its desired size. The default value is false. - * @member {object} [poolInfo.autoPoolSpecification.pool.networkConfiguration] - * @member {string} - * [poolInfo.autoPoolSpecification.pool.networkConfiguration.subnetId] The - * virtual network must be in the same region and subscription as the Azure - * Batch account. The specified subnet should have enough free IP addresses to - * accommodate the number of nodes in the pool. If the subnet doesn't have - * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks - * ('Microsoft.Network/virtualNetworks') are supported, but for pools created - * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration - * @member {object} - * [poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] - * Pool endpoint configuration is only supported on pools with the - * virtualMachineConfiguration property. - * @member {array} - * [poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration.inboundNATPools] - * The maximum number of inbound NAT pools per Batch pool is 5. If the maximum - * number of inbound NAT pools is exceeded the request fails with HTTP status - * code 400. - * @member {object} [poolInfo.autoPoolSpecification.pool.startTask] - * @member {string} [poolInfo.autoPoolSpecification.pool.startTask.commandLine] - * The command line does not run under a shell, and therefore cannot take - * advantage of shell features such as environment variable expansion. If you - * want to take advantage of such features, you should invoke the shell in the - * command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c - * MyCommand" in Linux. If the command line refers to file paths, it should use - * a relative path (relative to the task working directory), or use the Batch - * provided environment variable - * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} - * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings] When this - * is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR - * (the root of Azure Batch directories on the node) are mapped into the - * container, all task environment variables are mapped into the container, and - * the task command line is executed in the container. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.containerRunOptions] - * These additional options are supplied as arguments to the "docker create" - * command, in addition to those controlled by the Batch Service. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.imageName] - * This is the full image reference, as would be specified to "docker pull". If - * no tag is provided as part of the image name, the tag ":latest" is used as a - * default. - * @member {object} - * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry] - * This setting can be omitted if was already provided at pool creation. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.registryServer] - * If omitted, the default is "docker.io". - * @member {string} - * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.userName] - * @member {string} - * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.password] - * @member {array} - * [poolInfo.autoPoolSpecification.pool.startTask.resourceFiles] Files listed - * under this element are located in the task's working directory. - * @member {array} - * [poolInfo.autoPoolSpecification.pool.startTask.environmentSettings] - * @member {object} - * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity] If omitted, the - * task runs as a non-administrative user unique to the task. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity.userName] The - * userName and autoUser properties are mutually exclusive; you must specify - * one but not both. - * @member {object} - * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser] The - * userName and autoUser properties are mutually exclusive; you must specify - * one but not both. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser.scope] - * The default value is task. Possible values include: 'task', 'pool' - * @member {string} - * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser.elevationLevel] - * The default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {number} - * [poolInfo.autoPoolSpecification.pool.startTask.maxTaskRetryCount] The Batch - * service retries a task if its exit code is nonzero. Note that this value - * specifically controls the number of retries. The Batch service will try the - * task once, and may then retry up to this limit. For example, if the maximum - * retry count is 3, Batch tries the task up to 4 times (one initial try and 3 - * retries). If the maximum retry count is 0, the Batch service does not retry - * the task. If the maximum retry count is -1, the Batch service retries the - * task without limit. - * @member {boolean} - * [poolInfo.autoPoolSpecification.pool.startTask.waitForSuccess] If true and - * the start task fails on a compute node, the Batch service retries the start - * task up to its maximum retry count (maxTaskRetryCount). If the task has - * still not completed successfully after all retries, then the Batch service - * marks the compute node unusable, and will not schedule tasks to it. This - * condition can be detected via the node state and failure info details. If - * false, the Batch service will not wait for the start task to complete. In - * this case, other tasks can start executing on the compute node while the - * start task is still running; and even if the start task fails, new tasks - * will continue to be scheduled on the node. The default is false. - * @member {array} [poolInfo.autoPoolSpecification.pool.certificateReferences] - * For Windows compute nodes, the Batch service installs the certificates to - * the specified certificate store and location. For Linux compute nodes, the - * certificates are stored in a directory inside the task working directory and - * an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to - * query for this location. For certificates with visibility of 'remoteUser', a - * 'certs' directory is created in the user's home directory (e.g., - * /home/{user-name}/certs) and certificates are placed in that directory. - * @member {array} - * [poolInfo.autoPoolSpecification.pool.applicationPackageReferences] - * @member {array} [poolInfo.autoPoolSpecification.pool.applicationLicenses] - * The list of application licenses must be a subset of available Batch service - * application licenses. If a license is requested which is not supported, pool - * creation will fail. The permitted licenses available on the pool are 'maya', - * 'vray', '3dsmax', 'arnold'. An additional charge applies for each - * application license added to the pool. - * @member {array} [poolInfo.autoPoolSpecification.pool.userAccounts] - * @member {array} [poolInfo.autoPoolSpecification.pool.metadata] The Batch - * service does not assign any meaning to metadata; it is solely for the use of - * user code. - * @member {array} [metadata] A list of name-value pairs associated with the - * job as metadata. If omitted, it takes the default value of an empty list; in - * effect, any existing metadata is deleted. - * @member {string} [onAllTasksComplete] The action the Batch service should - * take when all tasks in the job are in the completed state. If omitted, the - * completion behavior is set to noaction. If the current value is - * terminatejob, this is an error because a job's completion behavior may not - * be changed from terminatejob to noaction. You may not change the value from - * terminatejob to noaction - that is, once you have engaged automatic job - * termination, you cannot turn it off again. If you try to do this, the - * request fails and Batch returns status code 400 (Bad Request) and an - * 'invalid property value' error response. If you do not specify this element - * in a PUT request, it is equivalent to passing noaction. This is an error if - * the current value is terminatejob. Possible values include: 'noAction', - * 'terminateJob' */ export interface JobUpdateParameter { + /** + * @summary The priority of the job. + * @description Priority values can range from -1000 to 1000, with -1000 being the lowest + * priority and 1000 being the highest priority. If omitted, it is set to the default value 0. + */ priority?: number; + /** + * @summary The execution constraints for the job. + * @description If omitted, the constraints are cleared. + */ constraints?: JobConstraints; + /** + * @summary The pool on which the Batch service runs the job's tasks. + * @description You may change the pool for a job only when the job is disabled. The Update Job + * call will fail if you include the poolInfo element and the job is not disabled. If you specify + * an autoPoolSpecification specification in the poolInfo, only the keepAlive property can be + * updated, and then only if the auto pool has a poolLifetimeOption of job. + */ poolInfo: PoolInformation; + /** + * @summary A list of name-value pairs associated with the job as metadata. + * @description If omitted, it takes the default value of an empty list; in effect, any existing + * metadata is deleted. + */ metadata?: MetadataItem[]; + /** + * @summary The action the Batch service should take when all tasks in the job are in the + * completed state. + * @description If omitted, the completion behavior is set to noaction. If the current value is + * terminatejob, this is an error because a job's completion behavior may not be changed from + * terminatejob to noaction. You may not change the value from terminatejob to noaction - that + * is, once you have engaged automatic job termination, you cannot turn it off again. If you try + * to do this, the request fails and Batch returns status code 400 (Bad Request) and an 'invalid + * property value' error response. If you do not specify this element in a PUT request, it is + * equivalent to passing noaction. This is an error if the current value is terminatejob. + * Possible values include: 'noAction', 'terminateJob' + */ onAllTasksComplete?: string; } /** - * @class - * Initializes a new instance of the PoolEnableAutoScaleParameter class. - * @constructor * @summary Options for enabling automatic scaling on a pool. - * - * @member {string} [autoScaleFormula] The formula for the desired number of - * compute nodes in the pool. The formula is checked for validity before it is - * applied to the pool. If the formula is not valid, the Batch service rejects - * the request with detailed error information. For more information about - * specifying this formula, see Automatically scale compute nodes in an Azure - * Batch pool - * (https://azure.microsoft.com/en-us/documentation/articles/batch-automatic-scaling). - * @member {moment.duration} [autoScaleEvaluationInterval] The time interval at - * which to automatically adjust the pool size according to the autoscale - * formula. The default value is 15 minutes. The minimum and maximum value are - * 5 minutes and 168 hours respectively. If you specify a value less than 5 - * minutes or greater than 168 hours, the Batch service rejects the request - * with an invalid property value error; if you are calling the REST API - * directly, the HTTP status code is 400 (Bad Request). If you specify a new - * interval, then the existing autoscale evaluation schedule will be stopped - * and a new autoscale evaluation schedule will be started, with its starting - * time being the time when this request was issued. */ export interface PoolEnableAutoScaleParameter { + /** + * @summary The formula for the desired number of compute nodes in the pool. + * @description The formula is checked for validity before it is applied to the pool. If the + * formula is not valid, the Batch service rejects the request with detailed error information. + * For more information about specifying this formula, see Automatically scale compute nodes in + * an Azure Batch pool + * (https://azure.microsoft.com/en-us/documentation/articles/batch-automatic-scaling). + */ autoScaleFormula?: string; + /** + * @summary The time interval at which to automatically adjust the pool size according to the + * autoscale formula. + * @description The default value is 15 minutes. The minimum and maximum value are 5 minutes and + * 168 hours respectively. If you specify a value less than 5 minutes or greater than 168 hours, + * the Batch service rejects the request with an invalid property value error; if you are calling + * the REST API directly, the HTTP status code is 400 (Bad Request). If you specify a new + * interval, then the existing autoscale evaluation schedule will be stopped and a new autoscale + * evaluation schedule will be started, with its starting time being the time when this request + * was issued. + */ autoScaleEvaluationInterval?: moment.Duration; } /** - * @class - * Initializes a new instance of the PoolEvaluateAutoScaleParameter class. - * @constructor * @summary Options for evaluating an automatic scaling formula on a pool. - * - * @member {string} autoScaleFormula The formula for the desired number of - * compute nodes in the pool. The formula is validated and its results - * calculated, but it is not applied to the pool. To apply the formula to the - * pool, 'Enable automatic scaling on a pool'. For more information about - * specifying this formula, see Automatically scale compute nodes in an Azure - * Batch pool - * (https://azure.microsoft.com/en-us/documentation/articles/batch-automatic-scaling). */ export interface PoolEvaluateAutoScaleParameter { + /** + * @summary The formula for the desired number of compute nodes in the pool. + * @description The formula is validated and its results calculated, but it is not applied to the + * pool. To apply the formula to the pool, 'Enable automatic scaling on a pool'. For more + * information about specifying this formula, see Automatically scale compute nodes in an Azure + * Batch pool (https://azure.microsoft.com/en-us/documentation/articles/batch-automatic-scaling). + */ autoScaleFormula: string; } /** - * @class - * Initializes a new instance of the PoolResizeParameter class. - * @constructor * @summary Options for changing the size of a pool. - * - * @member {number} [targetDedicatedNodes] The desired number of dedicated - * compute nodes in the pool. - * @member {number} [targetLowPriorityNodes] The desired number of low-priority - * compute nodes in the pool. - * @member {moment.duration} [resizeTimeout] The timeout for allocation of - * compute nodes to the pool or removal of compute nodes from the pool. The - * default value is 15 minutes. The minimum value is 5 minutes. If you specify - * a value less than 5 minutes, the Batch service returns an error; if you are - * calling the REST API directly, the HTTP status code is 400 (Bad Request). - * @member {string} [nodeDeallocationOption] Determines what to do with a node - * and its running task(s) if the pool size is decreasing. The default value is - * requeue. Possible values include: 'requeue', 'terminate', 'taskCompletion', - * 'retainedData' */ export interface PoolResizeParameter { + /** + * @summary The desired number of dedicated compute nodes in the pool. + */ targetDedicatedNodes?: number; + /** + * @summary The desired number of low-priority compute nodes in the pool. + */ targetLowPriorityNodes?: number; + /** + * @summary The timeout for allocation of compute nodes to the pool or removal of compute nodes + * from the pool. + * @description The default value is 15 minutes. The minimum value is 5 minutes. If you specify a + * value less than 5 minutes, the Batch service returns an error; if you are calling the REST API + * directly, the HTTP status code is 400 (Bad Request). + */ resizeTimeout?: moment.Duration; + /** + * @summary Determines what to do with a node and its running task(s) if the pool size is + * decreasing. + * @description The default value is requeue. Possible values include: 'requeue', 'terminate', + * 'taskCompletion', 'retainedData' + */ nodeDeallocationOption?: string; } /** - * @class - * Initializes a new instance of the PoolUpdatePropertiesParameter class. - * @constructor * @summary The set of changes to be made to a pool. - * - * @member {object} [startTask] A task to run on each compute node as it joins - * the pool. The task runs when the node is added to the pool or when the node - * is restarted. If this element is present, it overwrites any existing start - * task. If omitted, any existing start task is removed from the pool. - * @member {string} [startTask.commandLine] The command line does not run under - * a shell, and therefore cannot take advantage of shell features such as - * environment variable expansion. If you want to take advantage of such - * features, you should invoke the shell in the command line, for example using - * "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the - * command line refers to file paths, it should use a relative path (relative - * to the task working directory), or use the Batch provided environment - * variable - * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [startTask.containerSettings] When this is specified, all - * directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure - * Batch directories on the node) are mapped into the container, all task - * environment variables are mapped into the container, and the task command - * line is executed in the container. - * @member {string} [startTask.containerSettings.containerRunOptions] These - * additional options are supplied as arguments to the "docker create" command, - * in addition to those controlled by the Batch Service. - * @member {string} [startTask.containerSettings.imageName] This is the full - * image reference, as would be specified to "docker pull". If no tag is - * provided as part of the image name, the tag ":latest" is used as a default. - * @member {object} [startTask.containerSettings.registry] This setting can be - * omitted if was already provided at pool creation. - * @member {string} [startTask.containerSettings.registry.registryServer] If - * omitted, the default is "docker.io". - * @member {string} [startTask.containerSettings.registry.userName] - * @member {string} [startTask.containerSettings.registry.password] - * @member {array} [startTask.resourceFiles] Files listed under this element - * are located in the task's working directory. - * @member {array} [startTask.environmentSettings] - * @member {object} [startTask.userIdentity] If omitted, the task runs as a - * non-administrative user unique to the task. - * @member {string} [startTask.userIdentity.userName] The userName and autoUser - * properties are mutually exclusive; you must specify one but not both. - * @member {object} [startTask.userIdentity.autoUser] The userName and autoUser - * properties are mutually exclusive; you must specify one but not both. - * @member {string} [startTask.userIdentity.autoUser.scope] The default value - * is task. Possible values include: 'task', 'pool' - * @member {string} [startTask.userIdentity.autoUser.elevationLevel] The - * default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {number} [startTask.maxTaskRetryCount] The Batch service retries a - * task if its exit code is nonzero. Note that this value specifically controls - * the number of retries. The Batch service will try the task once, and may - * then retry up to this limit. For example, if the maximum retry count is 3, - * Batch tries the task up to 4 times (one initial try and 3 retries). If the - * maximum retry count is 0, the Batch service does not retry the task. If the - * maximum retry count is -1, the Batch service retries the task without limit. - * @member {boolean} [startTask.waitForSuccess] If true and the start task - * fails on a compute node, the Batch service retries the start task up to its - * maximum retry count (maxTaskRetryCount). If the task has still not completed - * successfully after all retries, then the Batch service marks the compute - * node unusable, and will not schedule tasks to it. This condition can be - * detected via the node state and failure info details. If false, the Batch - * service will not wait for the start task to complete. In this case, other - * tasks can start executing on the compute node while the start task is still - * running; and even if the start task fails, new tasks will continue to be - * scheduled on the node. The default is false. - * @member {array} certificateReferences A list of certificates to be installed - * on each compute node in the pool. This list replaces any existing - * certificate references configured on the pool. If you specify an empty - * collection, any existing certificate references are removed from the pool. - * For Windows compute nodes, the Batch service installs the certificates to - * the specified certificate store and location. For Linux compute nodes, the - * certificates are stored in a directory inside the task working directory and - * an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to - * query for this location. For certificates with visibility of 'remoteUser', a - * 'certs' directory is created in the user's home directory (e.g., - * /home/{user-name}/certs) and certificates are placed in that directory. - * @member {array} applicationPackageReferences A list of application packages - * to be installed on each compute node in the pool. The list replaces any - * existing application package references on the pool. Changes to application - * package references affect all new compute nodes joining the pool, but do not - * affect compute nodes that are already in the pool until they are rebooted or - * reimaged. If omitted, or if you specify an empty collection, any existing - * application packages references are removed from the pool. - * @member {array} metadata A list of name-value pairs associated with the pool - * as metadata. This list replaces any existing metadata configured on the - * pool. If omitted, or if you specify an empty collection, any existing - * metadata is removed from the pool. */ export interface PoolUpdatePropertiesParameter { + /** + * @summary A task to run on each compute node as it joins the pool. The task runs when the node + * is added to the pool or when the node is restarted. + * @description If this element is present, it overwrites any existing start task. If omitted, + * any existing start task is removed from the pool. + */ startTask?: StartTask; + /** + * @summary A list of certificates to be installed on each compute node in the pool. + * @description This list replaces any existing certificate references configured on the pool. If + * you specify an empty collection, any existing certificate references are removed from the + * pool. For Windows compute nodes, the Batch service installs the certificates to the specified + * certificate store and location. For Linux compute nodes, the certificates are stored in a + * directory inside the task working directory and an environment variable + * AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For certificates + * with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory + * (e.g., /home/{user-name}/certs) and certificates are placed in that directory. + */ certificateReferences: CertificateReference[]; + /** + * @summary A list of application packages to be installed on each compute node in the pool. + * @description The list replaces any existing application package references on the pool. + * Changes to application package references affect all new compute nodes joining the pool, but + * do not affect compute nodes that are already in the pool until they are rebooted or reimaged. + * If omitted, or if you specify an empty collection, any existing application packages + * references are removed from the pool. + */ applicationPackageReferences: ApplicationPackageReference[]; + /** + * @summary A list of name-value pairs associated with the pool as metadata. + * @description This list replaces any existing metadata configured on the pool. If omitted, or + * if you specify an empty collection, any existing metadata is removed from the pool. + */ metadata: MetadataItem[]; } /** - * @class - * Initializes a new instance of the PoolUpgradeOSParameter class. - * @constructor - * @summary Options for upgrading the operating system of compute nodes in a - * pool. - * - * @member {string} targetOSVersion The Azure Guest OS version to be installed - * on the virtual machines in the pool. - */ -export interface PoolUpgradeOSParameter { - targetOSVersion: string; -} - -/** - * @class - * Initializes a new instance of the PoolPatchParameter class. - * @constructor * @summary The set of changes to be made to a pool. - * - * @member {object} [startTask] A task to run on each compute node as it joins - * the pool. The task runs when the node is added to the pool or when the node - * is restarted. If this element is present, it overwrites any existing start - * task. If omitted, any existing start task is left unchanged. - * @member {string} [startTask.commandLine] The command line does not run under - * a shell, and therefore cannot take advantage of shell features such as - * environment variable expansion. If you want to take advantage of such - * features, you should invoke the shell in the command line, for example using - * "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the - * command line refers to file paths, it should use a relative path (relative - * to the task working directory), or use the Batch provided environment - * variable - * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [startTask.containerSettings] When this is specified, all - * directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure - * Batch directories on the node) are mapped into the container, all task - * environment variables are mapped into the container, and the task command - * line is executed in the container. - * @member {string} [startTask.containerSettings.containerRunOptions] These - * additional options are supplied as arguments to the "docker create" command, - * in addition to those controlled by the Batch Service. - * @member {string} [startTask.containerSettings.imageName] This is the full - * image reference, as would be specified to "docker pull". If no tag is - * provided as part of the image name, the tag ":latest" is used as a default. - * @member {object} [startTask.containerSettings.registry] This setting can be - * omitted if was already provided at pool creation. - * @member {string} [startTask.containerSettings.registry.registryServer] If - * omitted, the default is "docker.io". - * @member {string} [startTask.containerSettings.registry.userName] - * @member {string} [startTask.containerSettings.registry.password] - * @member {array} [startTask.resourceFiles] Files listed under this element - * are located in the task's working directory. - * @member {array} [startTask.environmentSettings] - * @member {object} [startTask.userIdentity] If omitted, the task runs as a - * non-administrative user unique to the task. - * @member {string} [startTask.userIdentity.userName] The userName and autoUser - * properties are mutually exclusive; you must specify one but not both. - * @member {object} [startTask.userIdentity.autoUser] The userName and autoUser - * properties are mutually exclusive; you must specify one but not both. - * @member {string} [startTask.userIdentity.autoUser.scope] The default value - * is task. Possible values include: 'task', 'pool' - * @member {string} [startTask.userIdentity.autoUser.elevationLevel] The - * default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {number} [startTask.maxTaskRetryCount] The Batch service retries a - * task if its exit code is nonzero. Note that this value specifically controls - * the number of retries. The Batch service will try the task once, and may - * then retry up to this limit. For example, if the maximum retry count is 3, - * Batch tries the task up to 4 times (one initial try and 3 retries). If the - * maximum retry count is 0, the Batch service does not retry the task. If the - * maximum retry count is -1, the Batch service retries the task without limit. - * @member {boolean} [startTask.waitForSuccess] If true and the start task - * fails on a compute node, the Batch service retries the start task up to its - * maximum retry count (maxTaskRetryCount). If the task has still not completed - * successfully after all retries, then the Batch service marks the compute - * node unusable, and will not schedule tasks to it. This condition can be - * detected via the node state and failure info details. If false, the Batch - * service will not wait for the start task to complete. In this case, other - * tasks can start executing on the compute node while the start task is still - * running; and even if the start task fails, new tasks will continue to be - * scheduled on the node. The default is false. - * @member {array} [certificateReferences] A list of certificates to be - * installed on each compute node in the pool. If this element is present, it - * replaces any existing certificate references configured on the pool. If - * omitted, any existing certificate references are left unchanged. For Windows - * compute nodes, the Batch service installs the certificates to the specified - * certificate store and location. For Linux compute nodes, the certificates - * are stored in a directory inside the task working directory and an - * environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to - * query for this location. For certificates with visibility of 'remoteUser', a - * 'certs' directory is created in the user's home directory (e.g., - * /home/{user-name}/certs) and certificates are placed in that directory. - * @member {array} [applicationPackageReferences] A list of application - * packages to be installed on each compute node in the pool. Changes to - * application package references affect all new compute nodes joining the - * pool, but do not affect compute nodes that are already in the pool until - * they are rebooted or reimaged. If this element is present, it replaces any - * existing application package references. If you specify an empty collection, - * then all application package references are removed from the pool. If - * omitted, any existing application package references are left unchanged. - * @member {array} [metadata] A list of name-value pairs associated with the - * pool as metadata. If this element is present, it replaces any existing - * metadata configured on the pool. If you specify an empty collection, any - * metadata is removed from the pool. If omitted, any existing metadata is left - * unchanged. */ export interface PoolPatchParameter { + /** + * @summary A task to run on each compute node as it joins the pool. The task runs when the node + * is added to the pool or when the node is restarted. + * @description If this element is present, it overwrites any existing start task. If omitted, + * any existing start task is left unchanged. + */ startTask?: StartTask; + /** + * @summary A list of certificates to be installed on each compute node in the pool. + * @description If this element is present, it replaces any existing certificate references + * configured on the pool. If omitted, any existing certificate references are left unchanged. + * For Windows compute nodes, the Batch service installs the certificates to the specified + * certificate store and location. For Linux compute nodes, the certificates are stored in a + * directory inside the task working directory and an environment variable + * AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For certificates + * with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory + * (e.g., /home/{user-name}/certs) and certificates are placed in that directory. + */ certificateReferences?: CertificateReference[]; + /** + * @summary A list of application packages to be installed on each compute node in the pool. + * @description Changes to application package references affect all new compute nodes joining + * the pool, but do not affect compute nodes that are already in the pool until they are rebooted + * or reimaged. If this element is present, it replaces any existing application package + * references. If you specify an empty collection, then all application package references are + * removed from the pool. If omitted, any existing application package references are left + * unchanged. + */ applicationPackageReferences?: ApplicationPackageReference[]; + /** + * @summary A list of name-value pairs associated with the pool as metadata. + * @description If this element is present, it replaces any existing metadata configured on the + * pool. If you specify an empty collection, any metadata is removed from the pool. If omitted, + * any existing metadata is left unchanged. + */ metadata?: MetadataItem[]; } /** - * @class - * Initializes a new instance of the TaskUpdateParameter class. - * @constructor * @summary The set of changes to be made to a task. - * - * @member {object} [constraints] Constraints that apply to this task. If - * omitted, the task is given the default constraints. For multi-instance - * tasks, updating the retention time applies only to the primary task and not - * subtasks. - * @member {moment.duration} [constraints.maxWallClockTime] If this is not - * specified, there is no time limit on how long the task may run. - * @member {moment.duration} [constraints.retentionTime] The default is - * infinite, i.e. the task directory will be retained until the compute node is - * removed or reimaged. - * @member {number} [constraints.maxTaskRetryCount] Note that this value - * specifically controls the number of retries for the task executable due to a - * nonzero exit code. The Batch service will try the task once, and may then - * retry up to this limit. For example, if the maximum retry count is 3, Batch - * tries the task up to 4 times (one initial try and 3 retries). If the maximum - * retry count is 0, the Batch service does not retry the task after the first - * attempt. If the maximum retry count is -1, the Batch service retries the - * task without limit. Resource files and application packages are only - * downloaded again if the task is retried on a new compute node. */ export interface TaskUpdateParameter { + /** + * @summary Constraints that apply to this task. + * @description If omitted, the task is given the default constraints. For multi-instance tasks, + * updating the retention time applies only to the primary task and not subtasks. + */ constraints?: TaskConstraints; } /** - * @class - * Initializes a new instance of the NodeUpdateUserParameter class. - * @constructor * @summary The set of changes to be made to a user account on a node. - * - * @member {string} [password] The password of the account. The password is - * required for Windows nodes (those created with 'cloudServiceConfiguration', - * or created with 'virtualMachineConfiguration' using a Windows image - * reference). For Linux compute nodes, the password can optionally be - * specified along with the sshPublicKey property. If omitted, any existing - * password is removed. - * @member {date} [expiryTime] The time at which the account should expire. If - * omitted, the default is 1 day from the current time. For Linux compute - * nodes, the expiryTime has a precision up to a day. - * @member {string} [sshPublicKey] The SSH public key that can be used for - * remote login to the compute node. The public key should be compatible with - * OpenSSH encoding and should be base 64 encoded. This property can be - * specified only for Linux nodes. If this is specified for a Windows node, - * then the Batch service rejects the request; if you are calling the REST API - * directly, the HTTP status code is 400 (Bad Request). If omitted, any - * existing SSH public key is removed. */ export interface NodeUpdateUserParameter { + /** + * @summary The password of the account. + * @description The password is required for Windows nodes (those created with + * 'cloudServiceConfiguration', or created with 'virtualMachineConfiguration' using a Windows + * image reference). For Linux compute nodes, the password can optionally be specified along with + * the sshPublicKey property. If omitted, any existing password is removed. + */ password?: string; + /** + * @summary The time at which the account should expire. + * @description If omitted, the default is 1 day from the current time. For Linux compute nodes, + * the expiryTime has a precision up to a day. + */ expiryTime?: Date; + /** + * @summary The SSH public key that can be used for remote login to the compute node. + * @description The public key should be compatible with OpenSSH encoding and should be base 64 + * encoded. This property can be specified only for Linux nodes. If this is specified for a + * Windows node, then the Batch service rejects the request; if you are calling the REST API + * directly, the HTTP status code is 400 (Bad Request). If omitted, any existing SSH public key + * is removed. + */ sshPublicKey?: string; } /** - * @class - * Initializes a new instance of the NodeRebootParameter class. - * @constructor * @summary Options for rebooting a compute node. - * - * @member {string} [nodeRebootOption] When to reboot the compute node and what - * to do with currently running tasks. The default value is requeue. Possible - * values include: 'requeue', 'terminate', 'taskCompletion', 'retainedData' */ export interface NodeRebootParameter { + /** + * @summary When to reboot the compute node and what to do with currently running tasks. + * @description The default value is requeue. Possible values include: 'requeue', 'terminate', + * 'taskCompletion', 'retainedData' + */ nodeRebootOption?: string; } /** - * @class - * Initializes a new instance of the NodeReimageParameter class. - * @constructor * @summary Options for reimaging a compute node. - * - * @member {string} [nodeReimageOption] When to reimage the compute node and - * what to do with currently running tasks. The default value is requeue. - * Possible values include: 'requeue', 'terminate', 'taskCompletion', - * 'retainedData' */ export interface NodeReimageParameter { + /** + * @summary When to reimage the compute node and what to do with currently running tasks. + * @description The default value is requeue. Possible values include: 'requeue', 'terminate', + * 'taskCompletion', 'retainedData' + */ nodeReimageOption?: string; } /** - * @class - * Initializes a new instance of the NodeDisableSchedulingParameter class. - * @constructor * @summary Options for disabling scheduling on a compute node. - * - * @member {string} [nodeDisableSchedulingOption] What to do with currently - * running tasks when disabling task scheduling on the compute node. The - * default value is requeue. Possible values include: 'requeue', 'terminate', - * 'taskCompletion' */ export interface NodeDisableSchedulingParameter { + /** + * @summary What to do with currently running tasks when disabling task scheduling on the compute + * node. + * @description The default value is requeue. Possible values include: 'requeue', 'terminate', + * 'taskCompletion' + */ nodeDisableSchedulingOption?: string; } /** - * @class - * Initializes a new instance of the NodeRemoveParameter class. - * @constructor * @summary Options for removing compute nodes from a pool. - * - * @member {array} nodeList A list containing the IDs of the compute nodes to - * be removed from the specified pool. - * @member {moment.duration} [resizeTimeout] The timeout for removal of compute - * nodes to the pool. The default value is 15 minutes. The minimum value is 5 - * minutes. If you specify a value less than 5 minutes, the Batch service - * returns an error; if you are calling the REST API directly, the HTTP status - * code is 400 (Bad Request). - * @member {string} [nodeDeallocationOption] Determines what to do with a node - * and its running task(s) after it has been selected for deallocation. The - * default value is requeue. Possible values include: 'requeue', 'terminate', - * 'taskCompletion', 'retainedData' */ export interface NodeRemoveParameter { + /** + * @summary A list containing the IDs of the compute nodes to be removed from the specified pool. + */ nodeList: string[]; + /** + * @summary The timeout for removal of compute nodes to the pool. + * @description The default value is 15 minutes. The minimum value is 5 minutes. If you specify a + * value less than 5 minutes, the Batch service returns an error; if you are calling the REST API + * directly, the HTTP status code is 400 (Bad Request). + */ resizeTimeout?: moment.Duration; + /** + * @summary Determines what to do with a node and its running task(s) after it has been selected + * for deallocation. + * @description The default value is requeue. Possible values include: 'requeue', 'terminate', + * 'taskCompletion', 'retainedData' + */ nodeDeallocationOption?: string; } /** - * @class - * Initializes a new instance of the UploadBatchServiceLogsConfiguration class. - * @constructor - * @summary The Azure Batch service log files upload configuration for a - * compute node. - * - * @member {string} containerUrl The URL of the container within Azure Blob - * Storage to which to upload the Batch Service log file(s). The URL must - * include a Shared Access Signature (SAS) granting write permissions to the - * container. The SAS duration must allow enough time for the upload to finish. - * The start time for SAS is optional and recommended to not be specified. - * @member {date} startTime The start of the time range from which to upload - * Batch Service log file(s). Any log file containing a log message in the time - * range will be uploaded. This means that the operation might retrieve more - * logs than have been requested since the entire log file is always uploaded, - * but the operation should not retrieve fewer logs than have been requested. - * @member {date} [endTime] The end of the time range from which to upload - * Batch Service log file(s). Any log file containing a log message in the time - * range will be uploaded. This means that the operation might retrieve more - * logs than have been requested since the entire log file is always uploaded, - * but the operation should not retrieve fewer logs than have been requested. - * If omitted, the default is to upload all logs available after the startTime. + * @summary The Azure Batch service log files upload configuration for a compute node. */ export interface UploadBatchServiceLogsConfiguration { + /** + * @summary The URL of the container within Azure Blob Storage to which to upload the Batch + * Service log file(s). + * @description The URL must include a Shared Access Signature (SAS) granting write permissions + * to the container. The SAS duration must allow enough time for the upload to finish. The start + * time for SAS is optional and recommended to not be specified. + */ containerUrl: string; + /** + * @summary The start of the time range from which to upload Batch Service log file(s). + * @description Any log file containing a log message in the time range will be uploaded. This + * means that the operation might retrieve more logs than have been requested since the entire + * log file is always uploaded, but the operation should not retrieve fewer logs than have been + * requested. + */ startTime: Date; + /** + * @summary The end of the time range from which to upload Batch Service log file(s). + * @description Any log file containing a log message in the time range will be uploaded. This + * means that the operation might retrieve more logs than have been requested since the entire + * log file is always uploaded, but the operation should not retrieve fewer logs than have been + * requested. If omitted, the default is to upload all logs available after the startTime. + */ endTime?: Date; } /** - * @class - * Initializes a new instance of the UploadBatchServiceLogsResult class. - * @constructor - * @summary The result of uploading Batch service log files from a specific - * compute node. - * - * @member {string} virtualDirectoryName The virtual directory within Azure - * Blob Storage container to which the Batch Service log file(s) will be - * uploaded. The virtual directory name is part of the blob name for each log - * file uploaded, and it is built based poolId, nodeId and a unique identifier. - * @member {number} numberOfFilesUploaded The number of log files which will be - * uploaded. + * @summary The result of uploading Batch service log files from a specific compute node. */ export interface UploadBatchServiceLogsResult { + /** + * @summary The virtual directory within Azure Blob Storage container to which the Batch Service + * log file(s) will be uploaded. + * @description The virtual directory name is part of the blob name for each log file uploaded, + * and it is built based poolId, nodeId and a unique identifier. + */ virtualDirectoryName: string; + /** + * @summary The number of log files which will be uploaded. + */ numberOfFilesUploaded: number; } /** - * @class - * Initializes a new instance of the NodeCounts class. - * @constructor * @summary The number of nodes in each node state. - * - * @member {number} creating The number of nodes in the creating state. - * @member {number} idle The number of nodes in the idle state. - * @member {number} offline The number of nodes in the offline state. - * @member {number} preempted The number of nodes in the preempted state. - * @member {number} rebooting The count of nodes in the rebooting state. - * @member {number} reimaging The number of nodes in the reimaging state. - * @member {number} running The number of nodes in the running state. - * @member {number} starting The number of nodes in the starting state. - * @member {number} startTaskFailed The number of nodes in the startTaskFailed - * state. - * @member {number} leavingPool The number of nodes in the leavingPool state. - * @member {number} unknown The number of nodes in the unknown state. - * @member {number} unusable The number of nodes in the unusable state. - * @member {number} waitingForStartTask The number of nodes in the - * waitingForStartTask state. - * @member {number} total The total number of nodes. */ export interface NodeCounts { + /** + * @summary The number of nodes in the creating state. + */ creating: number; + /** + * @summary The number of nodes in the idle state. + */ idle: number; + /** + * @summary The number of nodes in the offline state. + */ offline: number; + /** + * @summary The number of nodes in the preempted state. + */ preempted: number; + /** + * @summary The count of nodes in the rebooting state. + */ rebooting: number; + /** + * @summary The number of nodes in the reimaging state. + */ reimaging: number; + /** + * @summary The number of nodes in the running state. + */ running: number; + /** + * @summary The number of nodes in the starting state. + */ starting: number; + /** + * @summary The number of nodes in the startTaskFailed state. + */ startTaskFailed: number; + /** + * @summary The number of nodes in the leavingPool state. + */ leavingPool: number; + /** + * @summary The number of nodes in the unknown state. + */ unknown: number; + /** + * @summary The number of nodes in the unusable state. + */ unusable: number; + /** + * @summary The number of nodes in the waitingForStartTask state. + */ waitingForStartTask: number; + /** + * @summary The total number of nodes. + */ total: number; } /** - * @class - * Initializes a new instance of the PoolNodeCounts class. - * @constructor * @summary The number of nodes in each state for a pool. - * - * @member {string} poolId The ID of the pool. - * @member {object} [dedicated] The number of dedicated nodes in each state. - * @member {number} [dedicated.creating] - * @member {number} [dedicated.idle] - * @member {number} [dedicated.offline] - * @member {number} [dedicated.preempted] - * @member {number} [dedicated.rebooting] - * @member {number} [dedicated.reimaging] - * @member {number} [dedicated.running] - * @member {number} [dedicated.starting] - * @member {number} [dedicated.startTaskFailed] - * @member {number} [dedicated.leavingPool] - * @member {number} [dedicated.unknown] - * @member {number} [dedicated.unusable] - * @member {number} [dedicated.waitingForStartTask] - * @member {number} [dedicated.total] - * @member {object} [lowPriority] The number of low priority nodes in each - * state. - * @member {number} [lowPriority.creating] - * @member {number} [lowPriority.idle] - * @member {number} [lowPriority.offline] - * @member {number} [lowPriority.preempted] - * @member {number} [lowPriority.rebooting] - * @member {number} [lowPriority.reimaging] - * @member {number} [lowPriority.running] - * @member {number} [lowPriority.starting] - * @member {number} [lowPriority.startTaskFailed] - * @member {number} [lowPriority.leavingPool] - * @member {number} [lowPriority.unknown] - * @member {number} [lowPriority.unusable] - * @member {number} [lowPriority.waitingForStartTask] - * @member {number} [lowPriority.total] */ export interface PoolNodeCounts { + /** + * @summary The ID of the pool. + */ poolId: string; + /** + * @summary The number of dedicated nodes in each state. + */ dedicated?: NodeCounts; + /** + * @summary The number of low priority nodes in each state. + */ lowPriority?: NodeCounts; } /** - * @class - * Initializes a new instance of the ApplicationListOptions class. - * @constructor * Additional parameters for list operation. - * - * @member {number} [maxResults] The maximum number of items to return in the - * response. A maximum of 1000 applications can be returned. Default value: - * 1000 . - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface ApplicationListOptions { + /** + * The maximum number of items to return in the response. A maximum of 1000 applications can be + * returned. + */ maxResults?: number; + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the ApplicationGetOptions class. - * @constructor * Additional parameters for get operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface ApplicationGetOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the PoolListUsageMetricsOptions class. - * @constructor * Additional parameters for listUsageMetrics operation. - * - * @member {date} [startTime] The earliest time from which to include metrics. - * This must be at least two and a half hours before the current time. If not - * specified this defaults to the start time of the last aggregation interval - * currently available. - * @member {date} [endTime] The latest time from which to include metrics. This - * must be at least two hours before the current time. If not specified this - * defaults to the end time of the last aggregation interval currently - * available. - * @member {string} [filter] An OData $filter clause. For more information on - * constructing this filter, see - * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-account-usage-metrics. - * @member {number} [maxResults] The maximum number of items to return in the - * response. A maximum of 1000 results will be returned. Default value: 1000 . - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface PoolListUsageMetricsOptions { + /** + * The earliest time from which to include metrics. This must be at least two and a half hours + * before the current time. If not specified this defaults to the start time of the last + * aggregation interval currently available. + */ startTime?: Date; + /** + * The latest time from which to include metrics. This must be at least two hours before the + * current time. If not specified this defaults to the end time of the last aggregation interval + * currently available. + */ endTime?: Date; + /** + * An OData $filter clause. For more information on constructing this filter, see + * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-account-usage-metrics. + */ filter?: string; + /** + * The maximum number of items to return in the response. A maximum of 1000 results will be + * returned. + */ maxResults?: number; + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the PoolGetAllLifetimeStatisticsOptions class. - * @constructor * Additional parameters for getAllLifetimeStatistics operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface PoolGetAllLifetimeStatisticsOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the PoolAddOptions class. - * @constructor * Additional parameters for add operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface PoolAddOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the PoolListOptions class. - * @constructor * Additional parameters for list operation. - * - * @member {string} [filter] An OData $filter clause. For more information on - * constructing this filter, see - * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-pools. - * @member {string} [select] An OData $select clause. - * @member {string} [expand] An OData $expand clause. - * @member {number} [maxResults] The maximum number of items to return in the - * response. A maximum of 1000 pools can be returned. Default value: 1000 . - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface PoolListOptions { + /** + * An OData $filter clause. For more information on constructing this filter, see + * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-pools. + */ filter?: string; + /** + * An OData $select clause. + */ select?: string; + /** + * An OData $expand clause. + */ expand?: string; + /** + * The maximum number of items to return in the response. A maximum of 1000 pools can be + * returned. + */ maxResults?: number; + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the PoolDeleteMethodOptions class. - * @constructor * Additional parameters for deleteMethod operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of the - * resource known to the client. The operation will be performed only if the - * resource's current ETag on the service exactly matches the value specified - * by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version of - * the resource known to the client. The operation will be performed only if - * the resource's current ETag on the service does not match the value - * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has not been modified since the - * specified time. */ export interface PoolDeleteMethodOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service exactly matches the value + * specified by the client. + */ ifMatch?: string; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service does not match the value + * specified by the client. + */ ifNoneMatch?: string; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has been modified since the + * specified time. + */ ifModifiedSince?: Date; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has not been modified since + * the specified time. + */ ifUnmodifiedSince?: Date; } /** - * @class - * Initializes a new instance of the PoolExistsOptions class. - * @constructor * Additional parameters for exists operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of the - * resource known to the client. The operation will be performed only if the - * resource's current ETag on the service exactly matches the value specified - * by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version of - * the resource known to the client. The operation will be performed only if - * the resource's current ETag on the service does not match the value - * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has not been modified since the - * specified time. */ export interface PoolExistsOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service exactly matches the value + * specified by the client. + */ ifMatch?: string; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service does not match the value + * specified by the client. + */ ifNoneMatch?: string; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has been modified since the + * specified time. + */ ifModifiedSince?: Date; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has not been modified since + * the specified time. + */ ifUnmodifiedSince?: Date; } /** - * @class - * Initializes a new instance of the PoolGetOptions class. - * @constructor * Additional parameters for get operation. - * - * @member {string} [select] An OData $select clause. - * @member {string} [expand] An OData $expand clause. - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of the - * resource known to the client. The operation will be performed only if the - * resource's current ETag on the service exactly matches the value specified - * by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version of - * the resource known to the client. The operation will be performed only if - * the resource's current ETag on the service does not match the value - * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has not been modified since the - * specified time. */ export interface PoolGetOptions { + /** + * An OData $select clause. + */ select?: string; + /** + * An OData $expand clause. + */ expand?: string; + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service exactly matches the value + * specified by the client. + */ ifMatch?: string; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service does not match the value + * specified by the client. + */ ifNoneMatch?: string; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has been modified since the + * specified time. + */ ifModifiedSince?: Date; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has not been modified since + * the specified time. + */ ifUnmodifiedSince?: Date; } /** - * @class - * Initializes a new instance of the PoolPatchOptions class. - * @constructor * Additional parameters for patch operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of the - * resource known to the client. The operation will be performed only if the - * resource's current ETag on the service exactly matches the value specified - * by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version of - * the resource known to the client. The operation will be performed only if - * the resource's current ETag on the service does not match the value - * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has not been modified since the - * specified time. */ export interface PoolPatchOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service exactly matches the value + * specified by the client. + */ ifMatch?: string; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service does not match the value + * specified by the client. + */ ifNoneMatch?: string; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has been modified since the + * specified time. + */ ifModifiedSince?: Date; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has not been modified since + * the specified time. + */ ifUnmodifiedSince?: Date; } /** - * @class - * Initializes a new instance of the PoolDisableAutoScaleOptions class. - * @constructor * Additional parameters for disableAutoScale operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface PoolDisableAutoScaleOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the PoolEnableAutoScaleOptions class. - * @constructor * Additional parameters for enableAutoScale operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of the - * resource known to the client. The operation will be performed only if the - * resource's current ETag on the service exactly matches the value specified - * by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version of - * the resource known to the client. The operation will be performed only if - * the resource's current ETag on the service does not match the value - * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has not been modified since the - * specified time. */ export interface PoolEnableAutoScaleOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service exactly matches the value + * specified by the client. + */ ifMatch?: string; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service does not match the value + * specified by the client. + */ ifNoneMatch?: string; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has been modified since the + * specified time. + */ ifModifiedSince?: Date; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has not been modified since + * the specified time. + */ ifUnmodifiedSince?: Date; } /** - * @class - * Initializes a new instance of the PoolEvaluateAutoScaleOptions class. - * @constructor * Additional parameters for evaluateAutoScale operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface PoolEvaluateAutoScaleOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the PoolResizeOptions class. - * @constructor * Additional parameters for resize operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of the - * resource known to the client. The operation will be performed only if the - * resource's current ETag on the service exactly matches the value specified - * by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version of - * the resource known to the client. The operation will be performed only if - * the resource's current ETag on the service does not match the value - * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has not been modified since the - * specified time. */ export interface PoolResizeOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service exactly matches the value + * specified by the client. + */ ifMatch?: string; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service does not match the value + * specified by the client. + */ ifNoneMatch?: string; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has been modified since the + * specified time. + */ ifModifiedSince?: Date; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has not been modified since + * the specified time. + */ ifUnmodifiedSince?: Date; } /** - * @class - * Initializes a new instance of the PoolStopResizeOptions class. - * @constructor * Additional parameters for stopResize operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of the - * resource known to the client. The operation will be performed only if the - * resource's current ETag on the service exactly matches the value specified - * by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version of - * the resource known to the client. The operation will be performed only if - * the resource's current ETag on the service does not match the value - * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has not been modified since the - * specified time. */ export interface PoolStopResizeOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service exactly matches the value + * specified by the client. + */ ifMatch?: string; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service does not match the value + * specified by the client. + */ ifNoneMatch?: string; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has been modified since the + * specified time. + */ ifModifiedSince?: Date; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has not been modified since + * the specified time. + */ ifUnmodifiedSince?: Date; } /** - * @class - * Initializes a new instance of the PoolUpdatePropertiesOptions class. - * @constructor * Additional parameters for updateProperties operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface PoolUpdatePropertiesOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the PoolUpgradeOSOptions class. - * @constructor - * Additional parameters for upgradeOS operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of the - * resource known to the client. The operation will be performed only if the - * resource's current ETag on the service exactly matches the value specified - * by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version of - * the resource known to the client. The operation will be performed only if - * the resource's current ETag on the service does not match the value - * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has not been modified since the - * specified time. - */ -export interface PoolUpgradeOSOptions { - timeout?: number; - clientRequestId?: string; - returnClientRequestId?: boolean; - ocpDate?: Date; - ifMatch?: string; - ifNoneMatch?: string; - ifModifiedSince?: Date; - ifUnmodifiedSince?: Date; -} - -/** - * @class - * Initializes a new instance of the PoolRemoveNodesOptions class. - * @constructor * Additional parameters for removeNodes operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of the - * resource known to the client. The operation will be performed only if the - * resource's current ETag on the service exactly matches the value specified - * by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version of - * the resource known to the client. The operation will be performed only if - * the resource's current ETag on the service does not match the value - * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has not been modified since the - * specified time. */ export interface PoolRemoveNodesOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service exactly matches the value + * specified by the client. + */ ifMatch?: string; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service does not match the value + * specified by the client. + */ ifNoneMatch?: string; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has been modified since the + * specified time. + */ ifModifiedSince?: Date; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has not been modified since + * the specified time. + */ ifUnmodifiedSince?: Date; } /** - * @class - * Initializes a new instance of the AccountListNodeAgentSkusOptions class. - * @constructor * Additional parameters for listNodeAgentSkus operation. - * - * @member {string} [filter] An OData $filter clause. For more information on - * constructing this filter, see - * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-node-agent-skus. - * @member {number} [maxResults] The maximum number of items to return in the - * response. A maximum of 1000 results will be returned. Default value: 1000 . - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface AccountListNodeAgentSkusOptions { + /** + * An OData $filter clause. For more information on constructing this filter, see + * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-node-agent-skus. + */ filter?: string; + /** + * The maximum number of items to return in the response. A maximum of 1000 results will be + * returned. + */ maxResults?: number; + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the AccountListPoolNodeCountsOptions class. - * @constructor * Additional parameters for listPoolNodeCounts operation. - * - * @member {string} [filter] An OData $filter clause. For more information on - * constructing this filter, see - * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch. - * @member {number} [maxResults] The maximum number of items to return in the - * response. Default value: 10 . - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface AccountListPoolNodeCountsOptions { + /** + * An OData $filter clause. For more information on constructing this filter, see + * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch. + */ filter?: string; + /** + * The maximum number of items to return in the response. + */ maxResults?: number; + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the JobGetAllLifetimeStatisticsOptions class. - * @constructor * Additional parameters for getAllLifetimeStatistics operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface JobGetAllLifetimeStatisticsOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the JobDeleteMethodOptions class. - * @constructor * Additional parameters for deleteMethod operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of the - * resource known to the client. The operation will be performed only if the - * resource's current ETag on the service exactly matches the value specified - * by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version of - * the resource known to the client. The operation will be performed only if - * the resource's current ETag on the service does not match the value - * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has not been modified since the - * specified time. */ export interface JobDeleteMethodOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service exactly matches the value + * specified by the client. + */ ifMatch?: string; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service does not match the value + * specified by the client. + */ ifNoneMatch?: string; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has been modified since the + * specified time. + */ ifModifiedSince?: Date; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has not been modified since + * the specified time. + */ ifUnmodifiedSince?: Date; } /** - * @class - * Initializes a new instance of the JobGetOptions class. - * @constructor * Additional parameters for get operation. - * - * @member {string} [select] An OData $select clause. - * @member {string} [expand] An OData $expand clause. - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of the - * resource known to the client. The operation will be performed only if the - * resource's current ETag on the service exactly matches the value specified - * by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version of - * the resource known to the client. The operation will be performed only if - * the resource's current ETag on the service does not match the value - * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has not been modified since the - * specified time. */ export interface JobGetOptions { + /** + * An OData $select clause. + */ select?: string; + /** + * An OData $expand clause. + */ expand?: string; + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service exactly matches the value + * specified by the client. + */ ifMatch?: string; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service does not match the value + * specified by the client. + */ ifNoneMatch?: string; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has been modified since the + * specified time. + */ ifModifiedSince?: Date; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has not been modified since + * the specified time. + */ ifUnmodifiedSince?: Date; } /** - * @class - * Initializes a new instance of the JobPatchOptions class. - * @constructor * Additional parameters for patch operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of the - * resource known to the client. The operation will be performed only if the - * resource's current ETag on the service exactly matches the value specified - * by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version of - * the resource known to the client. The operation will be performed only if - * the resource's current ETag on the service does not match the value - * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has not been modified since the - * specified time. */ export interface JobPatchOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service exactly matches the value + * specified by the client. + */ ifMatch?: string; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service does not match the value + * specified by the client. + */ ifNoneMatch?: string; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has been modified since the + * specified time. + */ ifModifiedSince?: Date; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has not been modified since + * the specified time. + */ ifUnmodifiedSince?: Date; } /** - * @class - * Initializes a new instance of the JobUpdateOptions class. - * @constructor * Additional parameters for update operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of the - * resource known to the client. The operation will be performed only if the - * resource's current ETag on the service exactly matches the value specified - * by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version of - * the resource known to the client. The operation will be performed only if - * the resource's current ETag on the service does not match the value - * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has not been modified since the - * specified time. */ export interface JobUpdateOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service exactly matches the value + * specified by the client. + */ ifMatch?: string; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service does not match the value + * specified by the client. + */ ifNoneMatch?: string; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has been modified since the + * specified time. + */ ifModifiedSince?: Date; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has not been modified since + * the specified time. + */ ifUnmodifiedSince?: Date; } /** - * @class - * Initializes a new instance of the JobDisableOptions class. - * @constructor * Additional parameters for disable operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of the - * resource known to the client. The operation will be performed only if the - * resource's current ETag on the service exactly matches the value specified - * by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version of - * the resource known to the client. The operation will be performed only if - * the resource's current ETag on the service does not match the value - * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has not been modified since the - * specified time. */ export interface JobDisableOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service exactly matches the value + * specified by the client. + */ ifMatch?: string; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service does not match the value + * specified by the client. + */ ifNoneMatch?: string; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has been modified since the + * specified time. + */ ifModifiedSince?: Date; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has not been modified since + * the specified time. + */ ifUnmodifiedSince?: Date; } /** - * @class - * Initializes a new instance of the JobEnableOptions class. - * @constructor * Additional parameters for enable operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of the - * resource known to the client. The operation will be performed only if the - * resource's current ETag on the service exactly matches the value specified - * by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version of - * the resource known to the client. The operation will be performed only if - * the resource's current ETag on the service does not match the value - * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has not been modified since the - * specified time. */ export interface JobEnableOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service exactly matches the value + * specified by the client. + */ ifMatch?: string; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service does not match the value + * specified by the client. + */ ifNoneMatch?: string; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has been modified since the + * specified time. + */ ifModifiedSince?: Date; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has not been modified since + * the specified time. + */ ifUnmodifiedSince?: Date; } /** - * @class - * Initializes a new instance of the JobTerminateOptions class. - * @constructor * Additional parameters for terminate operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of the - * resource known to the client. The operation will be performed only if the - * resource's current ETag on the service exactly matches the value specified - * by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version of - * the resource known to the client. The operation will be performed only if - * the resource's current ETag on the service does not match the value - * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has not been modified since the - * specified time. */ export interface JobTerminateOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service exactly matches the value + * specified by the client. + */ ifMatch?: string; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service does not match the value + * specified by the client. + */ ifNoneMatch?: string; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has been modified since the + * specified time. + */ ifModifiedSince?: Date; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has not been modified since + * the specified time. + */ ifUnmodifiedSince?: Date; } /** - * @class - * Initializes a new instance of the JobAddOptions class. - * @constructor * Additional parameters for add operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface JobAddOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the JobListOptions class. - * @constructor * Additional parameters for list operation. - * - * @member {string} [filter] An OData $filter clause. For more information on - * constructing this filter, see - * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-jobs. - * @member {string} [select] An OData $select clause. - * @member {string} [expand] An OData $expand clause. - * @member {number} [maxResults] The maximum number of items to return in the - * response. A maximum of 1000 jobs can be returned. Default value: 1000 . - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface JobListOptions { + /** + * An OData $filter clause. For more information on constructing this filter, see + * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-jobs. + */ filter?: string; + /** + * An OData $select clause. + */ select?: string; + /** + * An OData $expand clause. + */ expand?: string; + /** + * The maximum number of items to return in the response. A maximum of 1000 jobs can be returned. + */ maxResults?: number; + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the JobListFromJobScheduleOptions class. - * @constructor * Additional parameters for listFromJobSchedule operation. - * - * @member {string} [filter] An OData $filter clause. For more information on - * constructing this filter, see - * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-jobs-in-a-job-schedule. - * @member {string} [select] An OData $select clause. - * @member {string} [expand] An OData $expand clause. - * @member {number} [maxResults] The maximum number of items to return in the - * response. A maximum of 1000 jobs can be returned. Default value: 1000 . - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface JobListFromJobScheduleOptions { + /** + * An OData $filter clause. For more information on constructing this filter, see + * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-jobs-in-a-job-schedule. + */ filter?: string; + /** + * An OData $select clause. + */ select?: string; + /** + * An OData $expand clause. + */ expand?: string; + /** + * The maximum number of items to return in the response. A maximum of 1000 jobs can be returned. + */ maxResults?: number; + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the JobListPreparationAndReleaseTaskStatusOptions class. - * @constructor * Additional parameters for listPreparationAndReleaseTaskStatus operation. - * - * @member {string} [filter] An OData $filter clause. For more information on - * constructing this filter, see - * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-job-preparation-and-release-status. - * @member {string} [select] An OData $select clause. - * @member {number} [maxResults] The maximum number of items to return in the - * response. A maximum of 1000 tasks can be returned. Default value: 1000 . - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface JobListPreparationAndReleaseTaskStatusOptions { + /** + * An OData $filter clause. For more information on constructing this filter, see + * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-job-preparation-and-release-status. + */ filter?: string; + /** + * An OData $select clause. + */ select?: string; + /** + * The maximum number of items to return in the response. A maximum of 1000 tasks can be + * returned. + */ maxResults?: number; + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the JobGetTaskCountsOptions class. - * @constructor * Additional parameters for getTaskCounts operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface JobGetTaskCountsOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the CertificateAddOptions class. - * @constructor * Additional parameters for add operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface CertificateAddOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the CertificateListOptions class. - * @constructor * Additional parameters for list operation. - * - * @member {string} [filter] An OData $filter clause. For more information on - * constructing this filter, see - * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-certificates. - * @member {string} [select] An OData $select clause. - * @member {number} [maxResults] The maximum number of items to return in the - * response. A maximum of 1000 certificates can be returned. Default value: - * 1000 . - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface CertificateListOptions { + /** + * An OData $filter clause. For more information on constructing this filter, see + * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-certificates. + */ filter?: string; + /** + * An OData $select clause. + */ select?: string; + /** + * The maximum number of items to return in the response. A maximum of 1000 certificates can be + * returned. + */ maxResults?: number; + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the CertificateCancelDeletionOptions class. - * @constructor * Additional parameters for cancelDeletion operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface CertificateCancelDeletionOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the CertificateDeleteMethodOptions class. - * @constructor * Additional parameters for deleteMethod operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface CertificateDeleteMethodOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the CertificateGetOptions class. - * @constructor * Additional parameters for get operation. - * - * @member {string} [select] An OData $select clause. - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface CertificateGetOptions { + /** + * An OData $select clause. + */ select?: string; + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the FileDeleteFromTaskOptions class. - * @constructor * Additional parameters for deleteFromTask operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface FileDeleteFromTaskOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the FileGetFromTaskOptions class. - * @constructor * Additional parameters for getFromTask operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ocpRange] The byte range to be retrieved. The default is - * to retrieve the entire file. The format is bytes=startRange-endRange. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has not been modified since the - * specified time. */ export interface FileGetFromTaskOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; + /** + * The byte range to be retrieved. The default is to retrieve the entire file. The format is + * bytes=startRange-endRange. + */ ocpRange?: string; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has been modified since the + * specified time. + */ ifModifiedSince?: Date; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has not been modified since + * the specified time. + */ ifUnmodifiedSince?: Date; } /** - * @class - * Initializes a new instance of the FileGetPropertiesFromTaskOptions class. - * @constructor * Additional parameters for getPropertiesFromTask operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has not been modified since the - * specified time. */ export interface FileGetPropertiesFromTaskOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has been modified since the + * specified time. + */ ifModifiedSince?: Date; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has not been modified since + * the specified time. + */ ifUnmodifiedSince?: Date; } /** - * @class - * Initializes a new instance of the FileDeleteFromComputeNodeOptions class. - * @constructor * Additional parameters for deleteFromComputeNode operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface FileDeleteFromComputeNodeOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the FileGetFromComputeNodeOptions class. - * @constructor * Additional parameters for getFromComputeNode operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ocpRange] The byte range to be retrieved. The default is - * to retrieve the entire file. The format is bytes=startRange-endRange. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has not been modified since the - * specified time. */ export interface FileGetFromComputeNodeOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; + /** + * The byte range to be retrieved. The default is to retrieve the entire file. The format is + * bytes=startRange-endRange. + */ ocpRange?: string; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has been modified since the + * specified time. + */ ifModifiedSince?: Date; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has not been modified since + * the specified time. + */ ifUnmodifiedSince?: Date; } /** - * @class - * Initializes a new instance of the FileGetPropertiesFromComputeNodeOptions class. - * @constructor * Additional parameters for getPropertiesFromComputeNode operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has not been modified since the - * specified time. */ export interface FileGetPropertiesFromComputeNodeOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has been modified since the + * specified time. + */ ifModifiedSince?: Date; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has not been modified since + * the specified time. + */ ifUnmodifiedSince?: Date; } /** - * @class - * Initializes a new instance of the FileListFromTaskOptions class. - * @constructor * Additional parameters for listFromTask operation. - * - * @member {string} [filter] An OData $filter clause. For more information on - * constructing this filter, see - * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-task-files. - * @member {number} [maxResults] The maximum number of items to return in the - * response. A maximum of 1000 files can be returned. Default value: 1000 . - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface FileListFromTaskOptions { + /** + * An OData $filter clause. For more information on constructing this filter, see + * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-task-files. + */ filter?: string; + /** + * The maximum number of items to return in the response. A maximum of 1000 files can be + * returned. + */ maxResults?: number; + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the FileListFromComputeNodeOptions class. - * @constructor * Additional parameters for listFromComputeNode operation. - * - * @member {string} [filter] An OData $filter clause. For more information on - * constructing this filter, see - * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-compute-node-files. - * @member {number} [maxResults] The maximum number of items to return in the - * response. A maximum of 1000 files can be returned. Default value: 1000 . - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface FileListFromComputeNodeOptions { + /** + * An OData $filter clause. For more information on constructing this filter, see + * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-compute-node-files. + */ filter?: string; + /** + * The maximum number of items to return in the response. A maximum of 1000 files can be + * returned. + */ maxResults?: number; + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the JobScheduleExistsOptions class. - * @constructor * Additional parameters for exists operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of the - * resource known to the client. The operation will be performed only if the - * resource's current ETag on the service exactly matches the value specified - * by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version of - * the resource known to the client. The operation will be performed only if - * the resource's current ETag on the service does not match the value - * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has not been modified since the - * specified time. */ export interface JobScheduleExistsOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service exactly matches the value + * specified by the client. + */ ifMatch?: string; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service does not match the value + * specified by the client. + */ ifNoneMatch?: string; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has been modified since the + * specified time. + */ ifModifiedSince?: Date; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has not been modified since + * the specified time. + */ ifUnmodifiedSince?: Date; } /** - * @class - * Initializes a new instance of the JobScheduleDeleteMethodOptions class. - * @constructor * Additional parameters for deleteMethod operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of the - * resource known to the client. The operation will be performed only if the - * resource's current ETag on the service exactly matches the value specified - * by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version of - * the resource known to the client. The operation will be performed only if - * the resource's current ETag on the service does not match the value - * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has not been modified since the - * specified time. */ export interface JobScheduleDeleteMethodOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service exactly matches the value + * specified by the client. + */ ifMatch?: string; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service does not match the value + * specified by the client. + */ ifNoneMatch?: string; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has been modified since the + * specified time. + */ ifModifiedSince?: Date; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has not been modified since + * the specified time. + */ ifUnmodifiedSince?: Date; } /** - * @class - * Initializes a new instance of the JobScheduleGetOptions class. - * @constructor * Additional parameters for get operation. - * - * @member {string} [select] An OData $select clause. - * @member {string} [expand] An OData $expand clause. - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of the - * resource known to the client. The operation will be performed only if the - * resource's current ETag on the service exactly matches the value specified - * by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version of - * the resource known to the client. The operation will be performed only if - * the resource's current ETag on the service does not match the value - * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has not been modified since the - * specified time. */ export interface JobScheduleGetOptions { + /** + * An OData $select clause. + */ select?: string; + /** + * An OData $expand clause. + */ expand?: string; + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service exactly matches the value + * specified by the client. + */ ifMatch?: string; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service does not match the value + * specified by the client. + */ ifNoneMatch?: string; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has been modified since the + * specified time. + */ ifModifiedSince?: Date; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has not been modified since + * the specified time. + */ ifUnmodifiedSince?: Date; } /** - * @class - * Initializes a new instance of the JobSchedulePatchOptions class. - * @constructor * Additional parameters for patch operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of the - * resource known to the client. The operation will be performed only if the - * resource's current ETag on the service exactly matches the value specified - * by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version of - * the resource known to the client. The operation will be performed only if - * the resource's current ETag on the service does not match the value - * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has not been modified since the - * specified time. */ export interface JobSchedulePatchOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service exactly matches the value + * specified by the client. + */ ifMatch?: string; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service does not match the value + * specified by the client. + */ ifNoneMatch?: string; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has been modified since the + * specified time. + */ ifModifiedSince?: Date; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has not been modified since + * the specified time. + */ ifUnmodifiedSince?: Date; } /** - * @class - * Initializes a new instance of the JobScheduleUpdateOptions class. - * @constructor * Additional parameters for update operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of the - * resource known to the client. The operation will be performed only if the - * resource's current ETag on the service exactly matches the value specified - * by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version of - * the resource known to the client. The operation will be performed only if - * the resource's current ETag on the service does not match the value - * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has not been modified since the - * specified time. */ export interface JobScheduleUpdateOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service exactly matches the value + * specified by the client. + */ ifMatch?: string; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service does not match the value + * specified by the client. + */ ifNoneMatch?: string; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has been modified since the + * specified time. + */ ifModifiedSince?: Date; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has not been modified since + * the specified time. + */ ifUnmodifiedSince?: Date; } /** - * @class - * Initializes a new instance of the JobScheduleDisableOptions class. - * @constructor * Additional parameters for disable operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of the - * resource known to the client. The operation will be performed only if the - * resource's current ETag on the service exactly matches the value specified - * by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version of - * the resource known to the client. The operation will be performed only if - * the resource's current ETag on the service does not match the value - * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has not been modified since the - * specified time. */ export interface JobScheduleDisableOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service exactly matches the value + * specified by the client. + */ ifMatch?: string; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service does not match the value + * specified by the client. + */ ifNoneMatch?: string; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has been modified since the + * specified time. + */ ifModifiedSince?: Date; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has not been modified since + * the specified time. + */ ifUnmodifiedSince?: Date; } /** - * @class - * Initializes a new instance of the JobScheduleEnableOptions class. - * @constructor * Additional parameters for enable operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of the - * resource known to the client. The operation will be performed only if the - * resource's current ETag on the service exactly matches the value specified - * by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version of - * the resource known to the client. The operation will be performed only if - * the resource's current ETag on the service does not match the value - * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has not been modified since the - * specified time. */ export interface JobScheduleEnableOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service exactly matches the value + * specified by the client. + */ ifMatch?: string; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service does not match the value + * specified by the client. + */ ifNoneMatch?: string; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has been modified since the + * specified time. + */ ifModifiedSince?: Date; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has not been modified since + * the specified time. + */ ifUnmodifiedSince?: Date; } /** - * @class - * Initializes a new instance of the JobScheduleTerminateOptions class. - * @constructor * Additional parameters for terminate operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of the - * resource known to the client. The operation will be performed only if the - * resource's current ETag on the service exactly matches the value specified - * by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version of - * the resource known to the client. The operation will be performed only if - * the resource's current ETag on the service does not match the value - * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has not been modified since the - * specified time. */ export interface JobScheduleTerminateOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service exactly matches the value + * specified by the client. + */ ifMatch?: string; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service does not match the value + * specified by the client. + */ ifNoneMatch?: string; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has been modified since the + * specified time. + */ ifModifiedSince?: Date; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has not been modified since + * the specified time. + */ ifUnmodifiedSince?: Date; } /** - * @class - * Initializes a new instance of the JobScheduleAddOptions class. - * @constructor * Additional parameters for add operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface JobScheduleAddOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the JobScheduleListOptions class. - * @constructor * Additional parameters for list operation. - * - * @member {string} [filter] An OData $filter clause. For more information on - * constructing this filter, see - * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-job-schedules. - * @member {string} [select] An OData $select clause. - * @member {string} [expand] An OData $expand clause. - * @member {number} [maxResults] The maximum number of items to return in the - * response. A maximum of 1000 job schedules can be returned. Default value: - * 1000 . - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface JobScheduleListOptions { + /** + * An OData $filter clause. For more information on constructing this filter, see + * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-job-schedules. + */ filter?: string; + /** + * An OData $select clause. + */ select?: string; + /** + * An OData $expand clause. + */ expand?: string; + /** + * The maximum number of items to return in the response. A maximum of 1000 job schedules can be + * returned. + */ maxResults?: number; + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the TaskAddOptions class. - * @constructor * Additional parameters for add operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface TaskAddOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the TaskListOptions class. - * @constructor * Additional parameters for list operation. - * - * @member {string} [filter] An OData $filter clause. For more information on - * constructing this filter, see - * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-tasks. - * @member {string} [select] An OData $select clause. - * @member {string} [expand] An OData $expand clause. - * @member {number} [maxResults] The maximum number of items to return in the - * response. A maximum of 1000 tasks can be returned. Default value: 1000 . - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface TaskListOptions { + /** + * An OData $filter clause. For more information on constructing this filter, see + * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-tasks. + */ filter?: string; + /** + * An OData $select clause. + */ select?: string; + /** + * An OData $expand clause. + */ expand?: string; + /** + * The maximum number of items to return in the response. A maximum of 1000 tasks can be + * returned. + */ maxResults?: number; + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the TaskAddCollectionOptions class. - * @constructor * Additional parameters for addCollection operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface TaskAddCollectionOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the TaskDeleteMethodOptions class. - * @constructor * Additional parameters for deleteMethod operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of the - * resource known to the client. The operation will be performed only if the - * resource's current ETag on the service exactly matches the value specified - * by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version of - * the resource known to the client. The operation will be performed only if - * the resource's current ETag on the service does not match the value - * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has not been modified since the - * specified time. */ export interface TaskDeleteMethodOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service exactly matches the value + * specified by the client. + */ ifMatch?: string; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service does not match the value + * specified by the client. + */ ifNoneMatch?: string; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has been modified since the + * specified time. + */ ifModifiedSince?: Date; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has not been modified since + * the specified time. + */ ifUnmodifiedSince?: Date; } /** - * @class - * Initializes a new instance of the TaskGetOptions class. - * @constructor * Additional parameters for get operation. - * - * @member {string} [select] An OData $select clause. - * @member {string} [expand] An OData $expand clause. - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of the - * resource known to the client. The operation will be performed only if the - * resource's current ETag on the service exactly matches the value specified - * by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version of - * the resource known to the client. The operation will be performed only if - * the resource's current ETag on the service does not match the value - * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has not been modified since the - * specified time. */ export interface TaskGetOptions { + /** + * An OData $select clause. + */ select?: string; + /** + * An OData $expand clause. + */ expand?: string; + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service exactly matches the value + * specified by the client. + */ ifMatch?: string; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service does not match the value + * specified by the client. + */ ifNoneMatch?: string; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has been modified since the + * specified time. + */ ifModifiedSince?: Date; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has not been modified since + * the specified time. + */ ifUnmodifiedSince?: Date; } /** - * @class - * Initializes a new instance of the TaskUpdateOptions class. - * @constructor * Additional parameters for update operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of the - * resource known to the client. The operation will be performed only if the - * resource's current ETag on the service exactly matches the value specified - * by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version of - * the resource known to the client. The operation will be performed only if - * the resource's current ETag on the service does not match the value - * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has not been modified since the - * specified time. */ export interface TaskUpdateOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service exactly matches the value + * specified by the client. + */ ifMatch?: string; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service does not match the value + * specified by the client. + */ ifNoneMatch?: string; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has been modified since the + * specified time. + */ ifModifiedSince?: Date; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has not been modified since + * the specified time. + */ ifUnmodifiedSince?: Date; } /** - * @class - * Initializes a new instance of the TaskListSubtasksOptions class. - * @constructor * Additional parameters for listSubtasks operation. - * - * @member {string} [select] An OData $select clause. - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface TaskListSubtasksOptions { + /** + * An OData $select clause. + */ select?: string; + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the TaskTerminateOptions class. - * @constructor * Additional parameters for terminate operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of the - * resource known to the client. The operation will be performed only if the - * resource's current ETag on the service exactly matches the value specified - * by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version of - * the resource known to the client. The operation will be performed only if - * the resource's current ETag on the service does not match the value - * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has not been modified since the - * specified time. */ export interface TaskTerminateOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service exactly matches the value + * specified by the client. + */ ifMatch?: string; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service does not match the value + * specified by the client. + */ ifNoneMatch?: string; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has been modified since the + * specified time. + */ ifModifiedSince?: Date; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has not been modified since + * the specified time. + */ ifUnmodifiedSince?: Date; } /** - * @class - * Initializes a new instance of the TaskReactivateOptions class. - * @constructor * Additional parameters for reactivate operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of the - * resource known to the client. The operation will be performed only if the - * resource's current ETag on the service exactly matches the value specified - * by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version of - * the resource known to the client. The operation will be performed only if - * the resource's current ETag on the service does not match the value - * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has not been modified since the - * specified time. */ export interface TaskReactivateOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service exactly matches the value + * specified by the client. + */ ifMatch?: string; + /** + * An ETag value associated with the version of the resource known to the client. The operation + * will be performed only if the resource's current ETag on the service does not match the value + * specified by the client. + */ ifNoneMatch?: string; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has been modified since the + * specified time. + */ ifModifiedSince?: Date; + /** + * A timestamp indicating the last modified time of the resource known to the client. The + * operation will be performed only if the resource on the service has not been modified since + * the specified time. + */ ifUnmodifiedSince?: Date; } /** - * @class - * Initializes a new instance of the ComputeNodeAddUserOptions class. - * @constructor * Additional parameters for addUser operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface ComputeNodeAddUserOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the ComputeNodeDeleteUserOptions class. - * @constructor * Additional parameters for deleteUser operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface ComputeNodeDeleteUserOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the ComputeNodeUpdateUserOptions class. - * @constructor * Additional parameters for updateUser operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface ComputeNodeUpdateUserOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the ComputeNodeGetOptions class. - * @constructor * Additional parameters for get operation. - * - * @member {string} [select] An OData $select clause. - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface ComputeNodeGetOptions { + /** + * An OData $select clause. + */ select?: string; + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the ComputeNodeRebootOptions class. - * @constructor * Additional parameters for reboot operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface ComputeNodeRebootOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the ComputeNodeReimageOptions class. - * @constructor * Additional parameters for reimage operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface ComputeNodeReimageOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the ComputeNodeDisableSchedulingOptions class. - * @constructor * Additional parameters for disableScheduling operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface ComputeNodeDisableSchedulingOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the ComputeNodeEnableSchedulingOptions class. - * @constructor * Additional parameters for enableScheduling operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface ComputeNodeEnableSchedulingOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the ComputeNodeGetRemoteLoginSettingsOptions class. - * @constructor * Additional parameters for getRemoteLoginSettings operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface ComputeNodeGetRemoteLoginSettingsOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the ComputeNodeGetRemoteDesktopOptions class. - * @constructor * Additional parameters for getRemoteDesktop operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface ComputeNodeGetRemoteDesktopOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the ComputeNodeUploadBatchServiceLogsOptions class. - * @constructor * Additional parameters for uploadBatchServiceLogs operation. - * - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface ComputeNodeUploadBatchServiceLogsOptions { + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the ComputeNodeListOptions class. - * @constructor * Additional parameters for list operation. - * - * @member {string} [filter] An OData $filter clause. For more information on - * constructing this filter, see - * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-nodes-in-a-pool. - * @member {string} [select] An OData $select clause. - * @member {number} [maxResults] The maximum number of items to return in the - * response. A maximum of 1000 nodes can be returned. Default value: 1000 . - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface ComputeNodeListOptions { + /** + * An OData $filter clause. For more information on constructing this filter, see + * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-nodes-in-a-pool. + */ filter?: string; + /** + * An OData $select clause. + */ select?: string; + /** + * The maximum number of items to return in the response. A maximum of 1000 nodes can be + * returned. + */ maxResults?: number; + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. + */ timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the ApplicationListNextOptions class. - * @constructor * Additional parameters for listNext operation. - * - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface ApplicationListNextOptions { + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the PoolListUsageMetricsNextOptions class. - * @constructor * Additional parameters for listUsageMetricsNext operation. - * - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface PoolListUsageMetricsNextOptions { + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the PoolListNextOptions class. - * @constructor * Additional parameters for listNext operation. - * - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface PoolListNextOptions { + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the AccountListNodeAgentSkusNextOptions class. - * @constructor * Additional parameters for listNodeAgentSkusNext operation. - * - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface AccountListNodeAgentSkusNextOptions { + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the AccountListPoolNodeCountsNextOptions class. - * @constructor * Additional parameters for listPoolNodeCountsNext operation. - * - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface AccountListPoolNodeCountsNextOptions { + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the JobListNextOptions class. - * @constructor * Additional parameters for listNext operation. - * - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface JobListNextOptions { + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the JobListFromJobScheduleNextOptions class. - * @constructor * Additional parameters for listFromJobScheduleNext operation. - * - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface JobListFromJobScheduleNextOptions { + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the JobListPreparationAndReleaseTaskStatusNextOptions class. - * @constructor * Additional parameters for listPreparationAndReleaseTaskStatusNext operation. - * - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface JobListPreparationAndReleaseTaskStatusNextOptions { + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the CertificateListNextOptions class. - * @constructor * Additional parameters for listNext operation. - * - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface CertificateListNextOptions { + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the FileListFromTaskNextOptions class. - * @constructor * Additional parameters for listFromTaskNext operation. - * - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface FileListFromTaskNextOptions { + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the FileListFromComputeNodeNextOptions class. - * @constructor * Additional parameters for listFromComputeNodeNext operation. - * - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface FileListFromComputeNodeNextOptions { + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the JobScheduleListNextOptions class. - * @constructor * Additional parameters for listNext operation. - * - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface JobScheduleListNextOptions { + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the TaskListNextOptions class. - * @constructor * Additional parameters for listNext operation. - * - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface TaskListNextOptions { + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } /** - * @class - * Initializes a new instance of the ComputeNodeListNextOptions class. - * @constructor * Additional parameters for listNext operation. - * - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. */ export interface ComputeNodeListNextOptions { + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. + */ returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ ocpDate?: Date; } - /** - * @class - * Initializes a new instance of the ApplicationListResult class. - * @constructor * @summary The result of listing the applications available in an account. - * - * @member {string} [odatanextLink] */ export interface ApplicationListResult extends Array { + /** + * @summary The URL to get the next set of results. + */ odatanextLink?: string; } /** - * @class - * Initializes a new instance of the PoolListUsageMetricsResult class. - * @constructor * @summary The result of a listing the usage metrics for an account. - * - * @member {string} [odatanextLink] */ export interface PoolListUsageMetricsResult extends Array { + /** + * @summary The URL to get the next set of results. + */ odatanextLink?: string; } /** - * @class - * Initializes a new instance of the CloudPoolListResult class. - * @constructor * @summary The result of listing the pools in an account. - * - * @member {string} [odatanextLink] */ export interface CloudPoolListResult extends Array { + /** + * @summary The URL to get the next set of results. + */ odatanextLink?: string; } /** - * @class - * Initializes a new instance of the AccountListNodeAgentSkusResult class. - * @constructor * @summary The result of listing the supported node agent SKUs. - * - * @member {string} [odatanextLink] */ export interface AccountListNodeAgentSkusResult extends Array { + /** + * @summary The URL to get the next set of results. + */ odatanextLink?: string; } /** - * @class - * Initializes a new instance of the PoolNodeCountsListResult class. - * @constructor * @summary The result of listing the node counts in the account. - * - * @member {string} [odatanextLink] */ export interface PoolNodeCountsListResult extends Array { + /** + * @summary The URL to get the next set of results. + */ odatanextLink?: string; } /** - * @class - * Initializes a new instance of the CloudJobListResult class. - * @constructor * @summary The result of listing the jobs in an account. - * - * @member {string} [odatanextLink] */ export interface CloudJobListResult extends Array { + /** + * @summary The URL to get the next set of results. + */ odatanextLink?: string; } /** - * @class - * Initializes a new instance of the CloudJobListPreparationAndReleaseTaskStatusResult class. - * @constructor - * @summary The result of listing the status of the Job Preparation and Job - * Release tasks for a job. - * - * @member {string} [odatanextLink] + * @summary The result of listing the status of the Job Preparation and Job Release tasks for a + * job. */ export interface CloudJobListPreparationAndReleaseTaskStatusResult extends Array { + /** + * @summary The URL to get the next set of results. + */ odatanextLink?: string; } /** - * @class - * Initializes a new instance of the CertificateListResult class. - * @constructor * @summary The result of listing the certificates in the account. - * - * @member {string} [odatanextLink] */ export interface CertificateListResult extends Array { + /** + * @summary The URL to get the next set of results. + */ odatanextLink?: string; } /** - * @class - * Initializes a new instance of the NodeFileListResult class. - * @constructor - * @summary The result of listing the files on a compute node, or the files - * associated with a task on a node. - * - * @member {string} [odatanextLink] + * @summary The result of listing the files on a compute node, or the files associated with a task + * on a node. */ export interface NodeFileListResult extends Array { + /** + * @summary The URL to get the next set of results. + */ odatanextLink?: string; } /** - * @class - * Initializes a new instance of the CloudJobScheduleListResult class. - * @constructor * @summary The result of listing the job schedules in an account. - * - * @member {string} [odatanextLink] */ export interface CloudJobScheduleListResult extends Array { + /** + * @summary The URL to get the next set of results. + */ odatanextLink?: string; } /** - * @class - * Initializes a new instance of the CloudTaskListResult class. - * @constructor * @summary The result of listing the tasks in a job. - * - * @member {string} [odatanextLink] */ export interface CloudTaskListResult extends Array { + /** + * @summary The URL to get the next set of results. + */ odatanextLink?: string; } /** - * @class - * Initializes a new instance of the ComputeNodeListResult class. - * @constructor * @summary The result of listing the compute nodes in a pool. - * - * @member {string} [odatanextLink] */ export interface ComputeNodeListResult extends Array { + /** + * @summary The URL to get the next set of results. + */ odatanextLink?: string; } diff --git a/lib/services/batch/lib/models/index.js b/lib/services/batch/lib/models/index.js index e485c479d9..c3cb3564b2 100644 --- a/lib/services/batch/lib/models/index.js +++ b/lib/services/batch/lib/models/index.js @@ -36,6 +36,7 @@ exports.FileProperties = require('./fileProperties'); exports.NodeFile = require('./nodeFile'); exports.Schedule = require('./schedule'); exports.JobConstraints = require('./jobConstraints'); +exports.JobNetworkConfiguration = require('./jobNetworkConfiguration'); exports.ContainerRegistry = require('./containerRegistry'); exports.TaskContainerSettings = require('./taskContainerSettings'); exports.ResourceFile = require('./resourceFile'); @@ -47,6 +48,7 @@ exports.ExitConditions = require('./exitConditions'); exports.AutoUserSpecification = require('./autoUserSpecification'); exports.UserIdentity = require('./userIdentity'); exports.LinuxUserConfiguration = require('./linuxUserConfiguration'); +exports.WindowsUserConfiguration = require('./windowsUserConfiguration'); exports.UserAccount = require('./userAccount'); exports.TaskConstraints = require('./taskConstraints'); exports.OutputFileBlobContainerDestination = require('./outputFileBlobContainerDestination'); @@ -61,7 +63,6 @@ exports.StartTask = require('./startTask'); exports.CertificateReference = require('./certificateReference'); exports.MetadataItem = require('./metadataItem'); exports.CloudServiceConfiguration = require('./cloudServiceConfiguration'); -exports.OSDisk = require('./oSDisk'); exports.WindowsConfiguration = require('./windowsConfiguration'); exports.DataDisk = require('./dataDisk'); exports.ContainerConfiguration = require('./containerConfiguration'); @@ -130,7 +131,6 @@ exports.PoolEnableAutoScaleParameter = require('./poolEnableAutoScaleParameter') exports.PoolEvaluateAutoScaleParameter = require('./poolEvaluateAutoScaleParameter'); exports.PoolResizeParameter = require('./poolResizeParameter'); exports.PoolUpdatePropertiesParameter = require('./poolUpdatePropertiesParameter'); -exports.PoolUpgradeOSParameter = require('./poolUpgradeOSParameter'); exports.PoolPatchParameter = require('./poolPatchParameter'); exports.TaskUpdateParameter = require('./taskUpdateParameter'); exports.NodeUpdateUserParameter = require('./nodeUpdateUserParameter'); @@ -158,7 +158,6 @@ exports.PoolEvaluateAutoScaleOptions = require('./poolEvaluateAutoScaleOptions') exports.PoolResizeOptions = require('./poolResizeOptions'); exports.PoolStopResizeOptions = require('./poolStopResizeOptions'); exports.PoolUpdatePropertiesOptions = require('./poolUpdatePropertiesOptions'); -exports.PoolUpgradeOSOptions = require('./poolUpgradeOSOptions'); exports.PoolRemoveNodesOptions = require('./poolRemoveNodesOptions'); exports.AccountListNodeAgentSkusOptions = require('./accountListNodeAgentSkusOptions'); exports.AccountListPoolNodeCountsOptions = require('./accountListPoolNodeCountsOptions'); diff --git a/lib/services/batch/lib/models/jobAddOptions.js b/lib/services/batch/lib/models/jobAddOptions.js index 1915369717..dce4ce26f9 100644 --- a/lib/services/batch/lib/models/jobAddOptions.js +++ b/lib/services/batch/lib/models/jobAddOptions.js @@ -17,17 +17,17 @@ class JobAddOptions { /** * Create a JobAddOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/jobAddParameter.js b/lib/services/batch/lib/models/jobAddParameter.js index 3dd0058b0d..21460d2f4d 100644 --- a/lib/services/batch/lib/models/jobAddParameter.js +++ b/lib/services/batch/lib/models/jobAddParameter.js @@ -17,31 +17,31 @@ class JobAddParameter { /** * Create a JobAddParameter. - * @member {string} id A string that uniquely identifies the job within the + * @property {string} id A string that uniquely identifies the job within the * account. The ID can contain any combination of alphanumeric characters * including hyphens and underscores, and cannot contain more than 64 * characters. The ID is case-preserving and case-insensitive (that is, you * may not have two IDs within an account that differ only by case). - * @member {string} [displayName] The display name for the job. The display + * @property {string} [displayName] The display name for the job. The display * name need not be unique and can contain any Unicode characters up to a * maximum length of 1024. - * @member {number} [priority] The priority of the job. Priority values can + * @property {number} [priority] The priority of the job. Priority values can * range from -1000 to 1000, with -1000 being the lowest priority and 1000 * being the highest priority. The default value is 0. - * @member {object} [constraints] The execution constraints for the job. - * @member {moment.duration} [constraints.maxWallClockTime] If the job does + * @property {object} [constraints] The execution constraints for the job. + * @property {moment.duration} [constraints.maxWallClockTime] If the job does * not complete within the time limit, the Batch service terminates it and * any tasks that are still running. In this case, the termination reason * will be MaxWallClockTimeExpiry. If this property is not specified, there * is no time limit on how long the job may run. - * @member {number} [constraints.maxTaskRetryCount] Note that this value + * @property {number} [constraints.maxTaskRetryCount] Note that this value * specifically controls the number of retries. The Batch service will try * each task once, and may then retry up to this limit. For example, if the * maximum retry count is 3, Batch tries a task up to 4 times (one initial * try and 3 retries). If the maximum retry count is 0, the Batch service * does not retry tasks. If the maximum retry count is -1, the Batch service * retries tasks without limit. The default value is 0 (no retries). - * @member {object} [jobManagerTask] Details of a Job Manager task to be + * @property {object} [jobManagerTask] Details of a Job Manager task to be * launched when the job is started. If the job does not specify a Job * Manager task, the user must explicitly add tasks to the job. If the job * does specify a Job Manager task, the Batch service creates the Job Manager @@ -54,12 +54,12 @@ class JobAddParameter { * actions are required for the job.) For example, a Job Manager task might * download a file specified as a parameter, analyze the contents of that * file and submit additional tasks based on those contents. - * @member {string} [jobManagerTask.id] The ID can contain any combination of - * alphanumeric characters including hyphens and underscores and cannot + * @property {string} [jobManagerTask.id] The ID can contain any combination + * of alphanumeric characters including hyphens and underscores and cannot * contain more than 64 characters. - * @member {string} [jobManagerTask.displayName] It need not be unique and + * @property {string} [jobManagerTask.displayName] It need not be unique and * can contain any Unicode characters up to a maximum length of 1024. - * @member {string} [jobManagerTask.commandLine] The command line does not + * @property {string} [jobManagerTask.commandLine] The command line does not * run under a shell, and therefore cannot take advantage of shell features * such as environment variable expansion. If you want to take advantage of * such features, you should invoke the shell in the command line, for @@ -68,57 +68,55 @@ class JobAddParameter { * path (relative to the task working directory), or use the Batch provided * environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [jobManagerTask.containerSettings] If the pool that will - * run this task has containerConfiguration set, this must be set as well. If - * the pool that will run this task doesn't have containerConfiguration set, - * this must not be set. When this is specified, all directories recursively - * below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on - * the node) are mapped into the container, all task environment variables - * are mapped into the container, and the task command line is executed in - * the container. - * @member {string} [jobManagerTask.containerSettings.containerRunOptions] + * @property {object} [jobManagerTask.containerSettings] If the pool that + * will run this task has containerConfiguration set, this must be set as + * well. If the pool that will run this task doesn't have + * containerConfiguration set, this must not be set. When this is specified, + * all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of + * Azure Batch directories on the node) are mapped into the container, all + * task environment variables are mapped into the container, and the task + * command line is executed in the container. + * @property {string} [jobManagerTask.containerSettings.containerRunOptions] * These additional options are supplied as arguments to the "docker create" * command, in addition to those controlled by the Batch Service. - * @member {string} [jobManagerTask.containerSettings.imageName] This is the - * full image reference, as would be specified to "docker pull". If no tag is - * provided as part of the image name, the tag ":latest" is used as a + * @property {string} [jobManagerTask.containerSettings.imageName] This is + * the full image reference, as would be specified to "docker pull". If no + * tag is provided as part of the image name, the tag ":latest" is used as a * default. - * @member {object} [jobManagerTask.containerSettings.registry] This setting - * can be omitted if was already provided at pool creation. - * @member {string} + * @property {object} [jobManagerTask.containerSettings.registry] This + * setting can be omitted if was already provided at pool creation. + * @property {string} * [jobManagerTask.containerSettings.registry.registryServer] If omitted, the * default is "docker.io". - * @member {string} [jobManagerTask.containerSettings.registry.userName] - * @member {string} [jobManagerTask.containerSettings.registry.password] - * @member {array} [jobManagerTask.resourceFiles] Files listed under this + * @property {string} [jobManagerTask.containerSettings.registry.userName] + * @property {string} [jobManagerTask.containerSettings.registry.password] + * @property {array} [jobManagerTask.resourceFiles] Files listed under this * element are located in the task's working directory. There is a maximum * size for the list of resource files. When the max size is exceeded, the * request will fail and the response error code will be * RequestEntityTooLarge. If this occurs, the collection of ResourceFiles * must be reduced in size. This can be achieved using .zip files, * Application Packages, or Docker Containers. - * @member {array} [jobManagerTask.outputFiles] For multi-instance tasks, the - * files will only be uploaded from the compute node on which the primary + * @property {array} [jobManagerTask.outputFiles] For multi-instance tasks, + * the files will only be uploaded from the compute node on which the primary * task is executed. - * @member {array} [jobManagerTask.environmentSettings] - * @member {object} [jobManagerTask.constraints] - * @member {moment.duration} [jobManagerTask.constraints.maxWallClockTime] If - * this is not specified, there is no time limit on how long the task may + * @property {array} [jobManagerTask.environmentSettings] + * @property {object} [jobManagerTask.constraints] + * @property {moment.duration} [jobManagerTask.constraints.maxWallClockTime] + * If this is not specified, there is no time limit on how long the task may * run. - * @member {moment.duration} [jobManagerTask.constraints.retentionTime] The - * default is infinite, i.e. the task directory will be retained until the - * compute node is removed or reimaged. - * @member {number} [jobManagerTask.constraints.maxTaskRetryCount] Note that - * this value specifically controls the number of retries for the task + * @property {moment.duration} [jobManagerTask.constraints.retentionTime] The + * default is 7 days, i.e. the task directory will be retained for 7 days + * unless the compute node is removed or the job is deleted. + * @property {number} [jobManagerTask.constraints.maxTaskRetryCount] Note + * that this value specifically controls the number of retries for the task * executable due to a nonzero exit code. The Batch service will try the task * once, and may then retry up to this limit. For example, if the maximum * retry count is 3, Batch tries the task up to 4 times (one initial try and * 3 retries). If the maximum retry count is 0, the Batch service does not * retry the task after the first attempt. If the maximum retry count is -1, - * the Batch service retries the task without limit. Resource files and - * application packages are only downloaded again if the task is retried on a - * new compute node. - * @member {boolean} [jobManagerTask.killJobOnCompletion] If true, when the + * the Batch service retries the task without limit. + * @property {boolean} [jobManagerTask.killJobOnCompletion] If true, when the * Job Manager task completes, the Batch service marks the job as complete. * If any tasks are still running at this time (other than Job Release), * those tasks are terminated. If false, the completion of the Job Manager @@ -131,32 +129,33 @@ class JobAddParameter { * and using the Job Manager task only to create the tasks for the job (not * to monitor progress), then it is important to set killJobOnCompletion to * false. - * @member {object} [jobManagerTask.userIdentity] If omitted, the task runs + * @property {object} [jobManagerTask.userIdentity] If omitted, the task runs * as a non-administrative user unique to the task. - * @member {string} [jobManagerTask.userIdentity.userName] The userName and + * @property {string} [jobManagerTask.userIdentity.userName] The userName and * autoUser properties are mutually exclusive; you must specify one but not * both. - * @member {object} [jobManagerTask.userIdentity.autoUser] The userName and + * @property {object} [jobManagerTask.userIdentity.autoUser] The userName and * autoUser properties are mutually exclusive; you must specify one but not * both. - * @member {string} [jobManagerTask.userIdentity.autoUser.scope] The default - * value is task. Possible values include: 'task', 'pool' - * @member {string} [jobManagerTask.userIdentity.autoUser.elevationLevel] The - * default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {boolean} [jobManagerTask.runExclusive] If true, no other tasks + * @property {string} [jobManagerTask.userIdentity.autoUser.scope] The + * default value is task. Possible values include: 'task', 'pool' + * @property {string} [jobManagerTask.userIdentity.autoUser.elevationLevel] + * The default value is nonAdmin. Possible values include: 'nonAdmin', + * 'admin' + * @property {boolean} [jobManagerTask.runExclusive] If true, no other tasks * will run on the same compute node for as long as the Job Manager is * running. If false, other tasks can run simultaneously with the Job Manager * on a compute node. The Job Manager task counts normally against the node's * concurrent task limit, so this is only relevant if the node allows * multiple concurrent tasks. The default value is true. - * @member {array} [jobManagerTask.applicationPackageReferences] Application - * packages are downloaded and deployed to a shared directory, not the task - * working directory. Therefore, if a referenced package is already on the - * compute node, and is up to date, then it is not re-downloaded; the - * existing copy on the compute node is used. If a referenced application - * package cannot be installed, for example because the package has been - * deleted or because download failed, the task fails. - * @member {object} [jobManagerTask.authenticationTokenSettings] If this + * @property {array} [jobManagerTask.applicationPackageReferences] + * Application packages are downloaded and deployed to a shared directory, + * not the task working directory. Therefore, if a referenced package is + * already on the compute node, and is up to date, then it is not + * re-downloaded; the existing copy on the compute node is used. If a + * referenced application package cannot be installed, for example because + * the package has been deleted or because download failed, the task fails. + * @property {object} [jobManagerTask.authenticationTokenSettings] If this * property is set, the Batch service provides the task with an * authentication token which can be used to authenticate Batch service * operations without requiring an account access key. The token is provided @@ -164,18 +163,18 @@ class JobAddParameter { * that the task can carry out using the token depend on the settings. For * example, a task can request job permissions in order to add other tasks to * the job, or check the status of the job or of other tasks under the job. - * @member {array} [jobManagerTask.authenticationTokenSettings.access] The + * @property {array} [jobManagerTask.authenticationTokenSettings.access] The * authentication token grants access to a limited set of Batch service * operations. Currently the only supported value for the access property is * 'job', which grants access to all operations related to the job which * contains the task. - * @member {boolean} [jobManagerTask.allowLowPriorityNode] The default value - * is true. - * @member {object} [jobPreparationTask] The Job Preparation task. If a job + * @property {boolean} [jobManagerTask.allowLowPriorityNode] The default + * value is true. + * @property {object} [jobPreparationTask] The Job Preparation task. If a job * has a Job Preparation task, the Batch service will run the Job Preparation * task on a compute node before starting any tasks of that job on that * compute node. - * @member {string} [jobPreparationTask.id] The ID can contain any + * @property {string} [jobPreparationTask.id] The ID can contain any * combination of alphanumeric characters including hyphens and underscores * and cannot contain more than 64 characters. If you do not specify this * property, the Batch service assigns a default value of 'jobpreparation'. @@ -183,7 +182,7 @@ class JobAddParameter { * If you try to submit a task with the same id, the Batch service rejects * the request with error code TaskIdSameAsJobPreparationTask; if you are * calling the REST API directly, the HTTP status code is 409 (Conflict). - * @member {string} [jobPreparationTask.commandLine] The command line does + * @property {string} [jobPreparationTask.commandLine] The command line does * not run under a shell, and therefore cannot take advantage of shell * features such as environment variable expansion. If you want to take * advantage of such features, you should invoke the shell in the command @@ -192,55 +191,55 @@ class JobAddParameter { * use a relative path (relative to the task working directory), or use the * Batch provided environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [jobPreparationTask.containerSettings] When this is + * @property {object} [jobPreparationTask.containerSettings] When this is * specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR * (the root of Azure Batch directories on the node) are mapped into the * container, all task environment variables are mapped into the container, * and the task command line is executed in the container. - * @member {string} + * @property {string} * [jobPreparationTask.containerSettings.containerRunOptions] These * additional options are supplied as arguments to the "docker create" * command, in addition to those controlled by the Batch Service. - * @member {string} [jobPreparationTask.containerSettings.imageName] This is - * the full image reference, as would be specified to "docker pull". If no + * @property {string} [jobPreparationTask.containerSettings.imageName] This + * is the full image reference, as would be specified to "docker pull". If no * tag is provided as part of the image name, the tag ":latest" is used as a * default. - * @member {object} [jobPreparationTask.containerSettings.registry] This + * @property {object} [jobPreparationTask.containerSettings.registry] This * setting can be omitted if was already provided at pool creation. - * @member {string} + * @property {string} * [jobPreparationTask.containerSettings.registry.registryServer] If omitted, * the default is "docker.io". - * @member {string} [jobPreparationTask.containerSettings.registry.userName] - * @member {string} [jobPreparationTask.containerSettings.registry.password] - * @member {array} [jobPreparationTask.resourceFiles] Files listed under this - * element are located in the task's working directory. There is a maximum - * size for the list of resource files. When the max size is exceeded, the - * request will fail and the response error code will be + * @property {string} + * [jobPreparationTask.containerSettings.registry.userName] + * @property {string} + * [jobPreparationTask.containerSettings.registry.password] + * @property {array} [jobPreparationTask.resourceFiles] Files listed under + * this element are located in the task's working directory. There is a + * maximum size for the list of resource files. When the max size is + * exceeded, the request will fail and the response error code will be * RequestEntityTooLarge. If this occurs, the collection of ResourceFiles * must be reduced in size. This can be achieved using .zip files, * Application Packages, or Docker Containers. - * @member {array} [jobPreparationTask.environmentSettings] - * @member {object} [jobPreparationTask.constraints] - * @member {moment.duration} + * @property {array} [jobPreparationTask.environmentSettings] + * @property {object} [jobPreparationTask.constraints] + * @property {moment.duration} * [jobPreparationTask.constraints.maxWallClockTime] If this is not * specified, there is no time limit on how long the task may run. - * @member {moment.duration} [jobPreparationTask.constraints.retentionTime] - * The default is infinite, i.e. the task directory will be retained until - * the compute node is removed or reimaged. - * @member {number} [jobPreparationTask.constraints.maxTaskRetryCount] Note + * @property {moment.duration} [jobPreparationTask.constraints.retentionTime] + * The default is 7 days, i.e. the task directory will be retained for 7 days + * unless the compute node is removed or the job is deleted. + * @property {number} [jobPreparationTask.constraints.maxTaskRetryCount] Note * that this value specifically controls the number of retries for the task * executable due to a nonzero exit code. The Batch service will try the task * once, and may then retry up to this limit. For example, if the maximum * retry count is 3, Batch tries the task up to 4 times (one initial try and * 3 retries). If the maximum retry count is 0, the Batch service does not * retry the task after the first attempt. If the maximum retry count is -1, - * the Batch service retries the task without limit. Resource files and - * application packages are only downloaded again if the task is retried on a - * new compute node. - * @member {boolean} [jobPreparationTask.waitForSuccess] If true and the Job - * Preparation task fails on a compute node, the Batch service retries the - * Job Preparation task up to its maximum retry count (as specified in the - * constraints element). If the task has still not completed successfully + * the Batch service retries the task without limit. + * @property {boolean} [jobPreparationTask.waitForSuccess] If true and the + * Job Preparation task fails on a compute node, the Batch service retries + * the Job Preparation task up to its maximum retry count (as specified in + * the constraints element). If the task has still not completed successfully * after all retries, then the Batch service will not schedule tasks of the * job to the compute node. The compute node remains active and eligible to * run tasks of other jobs. If false, the Batch service will not wait for the @@ -248,42 +247,42 @@ class JobAddParameter { * start executing on the compute node while the Job Preparation task is * still running; and even if the Job Preparation task fails, new tasks will * continue to be scheduled on the node. The default value is true. - * @member {object} [jobPreparationTask.userIdentity] If omitted, the task + * @property {object} [jobPreparationTask.userIdentity] If omitted, the task * runs as a non-administrative user unique to the task on Windows nodes, or - * a a non-administrative user unique to the pool on Linux nodes. - * @member {string} [jobPreparationTask.userIdentity.userName] The userName + * a non-administrative user unique to the pool on Linux nodes. + * @property {string} [jobPreparationTask.userIdentity.userName] The userName * and autoUser properties are mutually exclusive; you must specify one but * not both. - * @member {object} [jobPreparationTask.userIdentity.autoUser] The userName + * @property {object} [jobPreparationTask.userIdentity.autoUser] The userName * and autoUser properties are mutually exclusive; you must specify one but * not both. - * @member {string} [jobPreparationTask.userIdentity.autoUser.scope] The + * @property {string} [jobPreparationTask.userIdentity.autoUser.scope] The * default value is task. Possible values include: 'task', 'pool' - * @member {string} [jobPreparationTask.userIdentity.autoUser.elevationLevel] - * The default value is nonAdmin. Possible values include: 'nonAdmin', - * 'admin' - * @member {boolean} [jobPreparationTask.rerunOnNodeRebootAfterSuccess] The + * @property {string} + * [jobPreparationTask.userIdentity.autoUser.elevationLevel] The default + * value is nonAdmin. Possible values include: 'nonAdmin', 'admin' + * @property {boolean} [jobPreparationTask.rerunOnNodeRebootAfterSuccess] The * Job Preparation task is always rerun if a compute node is reimaged, or if * the Job Preparation task did not complete (e.g. because the reboot * occurred while the task was running). Therefore, you should always write a * Job Preparation task to be idempotent and to behave correctly if run * multiple times. The default value is true. - * @member {object} [jobReleaseTask] The Job Release task. A Job Release task - * cannot be specified without also specifying a Job Preparation task for the - * job. The Batch service runs the Job Release task on the compute nodes that - * have run the Job Preparation task. The primary purpose of the Job Release - * task is to undo changes to compute nodes made by the Job Preparation task. - * Example activities include deleting local files, or shutting down services - * that were started as part of job preparation. - * @member {string} [jobReleaseTask.id] The ID can contain any combination of - * alphanumeric characters including hyphens and underscores and cannot + * @property {object} [jobReleaseTask] The Job Release task. A Job Release + * task cannot be specified without also specifying a Job Preparation task + * for the job. The Batch service runs the Job Release task on the compute + * nodes that have run the Job Preparation task. The primary purpose of the + * Job Release task is to undo changes to compute nodes made by the Job + * Preparation task. Example activities include deleting local files, or + * shutting down services that were started as part of job preparation. + * @property {string} [jobReleaseTask.id] The ID can contain any combination + * of alphanumeric characters including hyphens and underscores and cannot * contain more than 64 characters. If you do not specify this property, the * Batch service assigns a default value of 'jobrelease'. No other task in * the job can have the same ID as the Job Release task. If you try to submit * a task with the same id, the Batch service rejects the request with error * code TaskIdSameAsJobReleaseTask; if you are calling the REST API directly, * the HTTP status code is 409 (Conflict). - * @member {string} [jobReleaseTask.commandLine] The command line does not + * @property {string} [jobReleaseTask.commandLine] The command line does not * run under a shell, and therefore cannot take advantage of shell features * such as environment variable expansion. If you want to take advantage of * such features, you should invoke the shell in the command line, for @@ -292,59 +291,60 @@ class JobAddParameter { * path (relative to the task working directory), or use the Batch provided * environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [jobReleaseTask.containerSettings] When this is + * @property {object} [jobReleaseTask.containerSettings] When this is * specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR * (the root of Azure Batch directories on the node) are mapped into the * container, all task environment variables are mapped into the container, * and the task command line is executed in the container. - * @member {string} [jobReleaseTask.containerSettings.containerRunOptions] + * @property {string} [jobReleaseTask.containerSettings.containerRunOptions] * These additional options are supplied as arguments to the "docker create" * command, in addition to those controlled by the Batch Service. - * @member {string} [jobReleaseTask.containerSettings.imageName] This is the - * full image reference, as would be specified to "docker pull". If no tag is - * provided as part of the image name, the tag ":latest" is used as a + * @property {string} [jobReleaseTask.containerSettings.imageName] This is + * the full image reference, as would be specified to "docker pull". If no + * tag is provided as part of the image name, the tag ":latest" is used as a * default. - * @member {object} [jobReleaseTask.containerSettings.registry] This setting - * can be omitted if was already provided at pool creation. - * @member {string} + * @property {object} [jobReleaseTask.containerSettings.registry] This + * setting can be omitted if was already provided at pool creation. + * @property {string} * [jobReleaseTask.containerSettings.registry.registryServer] If omitted, the * default is "docker.io". - * @member {string} [jobReleaseTask.containerSettings.registry.userName] - * @member {string} [jobReleaseTask.containerSettings.registry.password] - * @member {array} [jobReleaseTask.resourceFiles] Files listed under this + * @property {string} [jobReleaseTask.containerSettings.registry.userName] + * @property {string} [jobReleaseTask.containerSettings.registry.password] + * @property {array} [jobReleaseTask.resourceFiles] Files listed under this * element are located in the task's working directory. - * @member {array} [jobReleaseTask.environmentSettings] - * @member {moment.duration} [jobReleaseTask.maxWallClockTime] - * @member {moment.duration} [jobReleaseTask.retentionTime] The default is - * infinite, i.e. the task directory will be retained until the compute node - * is removed or reimaged. - * @member {object} [jobReleaseTask.userIdentity] If omitted, the task runs + * @property {array} [jobReleaseTask.environmentSettings] + * @property {moment.duration} [jobReleaseTask.maxWallClockTime] + * @property {moment.duration} [jobReleaseTask.retentionTime] The default is + * 7 days, i.e. the task directory will be retained for 7 days unless the + * compute node is removed or the job is deleted. + * @property {object} [jobReleaseTask.userIdentity] If omitted, the task runs * as a non-administrative user unique to the task. - * @member {string} [jobReleaseTask.userIdentity.userName] The userName and + * @property {string} [jobReleaseTask.userIdentity.userName] The userName and * autoUser properties are mutually exclusive; you must specify one but not * both. - * @member {object} [jobReleaseTask.userIdentity.autoUser] The userName and + * @property {object} [jobReleaseTask.userIdentity.autoUser] The userName and * autoUser properties are mutually exclusive; you must specify one but not * both. - * @member {string} [jobReleaseTask.userIdentity.autoUser.scope] The default - * value is task. Possible values include: 'task', 'pool' - * @member {string} [jobReleaseTask.userIdentity.autoUser.elevationLevel] The - * default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {array} [commonEnvironmentSettings] The list of common environment - * variable settings. These environment variables are set for all tasks in - * the job (including the Job Manager, Job Preparation and Job Release - * tasks). Individual tasks can override an environment setting specified - * here by specifying the same setting name with a different value. - * @member {object} poolInfo The pool on which the Batch service runs the + * @property {string} [jobReleaseTask.userIdentity.autoUser.scope] The + * default value is task. Possible values include: 'task', 'pool' + * @property {string} [jobReleaseTask.userIdentity.autoUser.elevationLevel] + * The default value is nonAdmin. Possible values include: 'nonAdmin', + * 'admin' + * @property {array} [commonEnvironmentSettings] The list of common + * environment variable settings. These environment variables are set for all + * tasks in the job (including the Job Manager, Job Preparation and Job + * Release tasks). Individual tasks can override an environment setting + * specified here by specifying the same setting name with a different value. + * @property {object} poolInfo The pool on which the Batch service runs the * job's tasks. - * @member {string} [poolInfo.poolId] You must ensure that the pool + * @property {string} [poolInfo.poolId] You must ensure that the pool * referenced by this property exists. If the pool does not exist at the time * the Batch service tries to schedule a job, no tasks for the job will run * until you create a pool with that id. Note that the Batch service will not * reject the job request; it will simply not run tasks until the pool * exists. You must specify either the pool ID or the auto pool * specification, but not both. - * @member {object} [poolInfo.autoPoolSpecification] If auto pool creation + * @property {object} [poolInfo.autoPoolSpecification] If auto pool creation * fails, the Batch service moves the job to a completed state, and the pool * creation error is set in the job's scheduling error property. The Batch * service manages the lifetime (both creation and, unless keepAlive is @@ -352,28 +352,28 @@ class JobAddParameter { * lifetime of the auto pool while the job is active will result in * unexpected behavior. You must specify either the pool ID or the auto pool * specification, but not both. - * @member {string} [poolInfo.autoPoolSpecification.autoPoolIdPrefix] The + * @property {string} [poolInfo.autoPoolSpecification.autoPoolIdPrefix] The * Batch service assigns each auto pool a unique identifier on creation. To * distinguish between pools created for different purposes, you can specify * this element to add a prefix to the ID that is assigned. The prefix can be * up to 20 characters long. - * @member {string} [poolInfo.autoPoolSpecification.poolLifetimeOption] + * @property {string} [poolInfo.autoPoolSpecification.poolLifetimeOption] * Possible values include: 'jobSchedule', 'job' - * @member {boolean} [poolInfo.autoPoolSpecification.keepAlive] If false, the - * Batch service deletes the pool once its lifetime (as determined by the + * @property {boolean} [poolInfo.autoPoolSpecification.keepAlive] If false, + * the Batch service deletes the pool once its lifetime (as determined by the * poolLifetimeOption setting) expires; that is, when the job or job schedule * completes. If true, the Batch service does not delete the pool * automatically. It is up to the user to delete auto pools created with this * option. - * @member {object} [poolInfo.autoPoolSpecification.pool] - * @member {string} [poolInfo.autoPoolSpecification.pool.displayName] The + * @property {object} [poolInfo.autoPoolSpecification.pool] + * @property {string} [poolInfo.autoPoolSpecification.pool.displayName] The * display name need not be unique and can contain any Unicode characters up * to a maximum length of 1024. - * @member {string} [poolInfo.autoPoolSpecification.pool.vmSize] For + * @property {string} [poolInfo.autoPoolSpecification.pool.vmSize] For * information about available sizes of virtual machines in pools, see Choose * a VM size for compute nodes in an Azure Batch pool * (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration] This * property must be specified if the pool needs to be created with Azure PaaS * VMs. This property and virtualMachineConfiguration are mutually exclusive @@ -382,7 +382,7 @@ class JobAddParameter { * directly, the HTTP status code is 400 (Bad Request). This property cannot * be specified if the Batch account was created with its poolAllocationMode * property set to 'UserSubscription'. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osFamily] * Possible values are: * 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. @@ -391,55 +391,39 @@ class JobAddParameter { * 5 - OS Family 5, equivalent to Windows Server 2016. For more information, * see Azure Guest OS Releases * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). - * @member {string} - * [poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] + * @property {string} + * [poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osVersion] * The default value is * which specifies the latest operating system version * for the specified OS family. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.currentOSVersion] - * This may differ from targetOSVersion if the pool state is Upgrading. In - * this case some virtual machines may be on the targetOSVersion and some may - * be on the currentOSVersion during the upgrade process. Once all virtual - * machines have upgraded, currentOSVersion is updated to be the same as - * targetOSVersion. - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration] This * property must be specified if the pool needs to be created with Azure IaaS * VMs. This property and cloudServiceConfiguration are mutually exclusive * and one of the properties must be specified. If neither is specified then * the Batch service returns an error; if you are calling the REST API * directly, the HTTP status code is 400 (Bad Request). - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference] - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.publisher] * For example, Canonical or MicrosoftWindowsServer. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.offer] * For example, UbuntuServer or WindowsServer. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.sku] * For example, 14.04.0-LTS or 2012-R2-Datacenter. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.version] * A value of 'latest' can be specified to select the latest version of an * image. If omitted, the default is 'latest'. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.virtualMachineImageId] * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as - * the Azure Batch account. For information about the firewall settings for - * the Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * @member {object} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * @member {string} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The default value for caching is readwrite. For information about the - * caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' - * @member {string} + * the Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. + * @property {string} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId] * The Batch node agent is a program that runs on each node in the pool, and * provides the command-and-control interface between the node and the Batch @@ -448,14 +432,14 @@ class JobAddParameter { * which matches the selected image reference. To get the list of supported * node agent SKUs along with their list of verified image references, see * the 'List supported node agent SKUs' operation. - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] - * This property must not be specified if the imageReference or osDisk - * property specifies a Linux OS image. - * @member {boolean} + * This property must not be specified if the imageReference property + * specifies a Linux OS image. + * @property {boolean} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] * If omitted, the default value is true. - * @member {array} + * @property {array} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.dataDisks] * This property must be specified if the compute nodes in the pool need to * have empty data disks attached to them. This cannot be updated. Each node @@ -467,7 +451,7 @@ class JobAddParameter { * https://docs.microsoft.com/en-us/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux * and * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.licenseType] * This only applies to images that contain the Windows operating system, and * should only be used when you hold valid on-premises licenses for the nodes @@ -476,106 +460,98 @@ class JobAddParameter { * * Windows_Server - The on-premises license is for Windows Server. * Windows_Client - The on-premises license is for Windows Client. - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration] * If specified, setup is performed on each node in the pool to allow tasks * to run in containers. All regular tasks and job manager tasks run on this * pool must specify the containerSettings property, and all other tasks may * specify it. - * @member {array} + * @property {array} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration.containerImageNames] * This is the full image reference, as would be specified to "docker pull". * An image will be sourced from the default Docker registry unless the image * is fully qualified with an alternative registry. - * @member {array} + * @property {array} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration.containerRegistries] * If any images must be downloaded from a private registry which requires * credentials, then those credentials must be provided here. - * @member {number} [poolInfo.autoPoolSpecification.pool.maxTasksPerNode] The - * default value is 1. The maximum value of this setting depends on the size - * of the compute nodes in the pool (the vmSize setting). - * @member {object} + * @property {number} [poolInfo.autoPoolSpecification.pool.maxTasksPerNode] + * The default value is 1. The maximum value of this setting depends on the + * size of the compute nodes in the pool (the vmSize setting). + * @property {object} * [poolInfo.autoPoolSpecification.pool.taskSchedulingPolicy] - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.taskSchedulingPolicy.nodeFillType] * Possible values include: 'spread', 'pack' - * @member {moment.duration} + * @property {moment.duration} * [poolInfo.autoPoolSpecification.pool.resizeTimeout] This timeout applies * only to manual scaling; it has no effect when enableAutoScale is set to * true. The default value is 15 minutes. The minimum value is 5 minutes. If * you specify a value less than 5 minutes, the Batch service rejects the * request with an error; if you are calling the REST API directly, the HTTP * status code is 400 (Bad Request). - * @member {number} + * @property {number} * [poolInfo.autoPoolSpecification.pool.targetDedicatedNodes] This property * must not be specified if enableAutoScale is set to true. If * enableAutoScale is set to false, then you must set either * targetDedicatedNodes, targetLowPriorityNodes, or both. - * @member {number} + * @property {number} * [poolInfo.autoPoolSpecification.pool.targetLowPriorityNodes] This property * must not be specified if enableAutoScale is set to true. If * enableAutoScale is set to false, then you must set either * targetDedicatedNodes, targetLowPriorityNodes, or both. - * @member {boolean} [poolInfo.autoPoolSpecification.pool.enableAutoScale] If - * false, at least one of targetDedicateNodes and targetLowPriorityNodes must - * be specified. If true, the autoScaleFormula element is required. The pool - * automatically resizes according to the formula. The default value is + * @property {boolean} [poolInfo.autoPoolSpecification.pool.enableAutoScale] + * If false, at least one of targetDedicateNodes and targetLowPriorityNodes + * must be specified. If true, the autoScaleFormula element is required. The + * pool automatically resizes according to the formula. The default value is * false. - * @member {string} [poolInfo.autoPoolSpecification.pool.autoScaleFormula] + * @property {string} [poolInfo.autoPoolSpecification.pool.autoScaleFormula] * This property must not be specified if enableAutoScale is set to false. It * is required if enableAutoScale is set to true. The formula is checked for * validity before the pool is created. If the formula is not valid, the * Batch service rejects the request with detailed error information. - * @member {moment.duration} + * @property {moment.duration} * [poolInfo.autoPoolSpecification.pool.autoScaleEvaluationInterval] The * default value is 15 minutes. The minimum and maximum value are 5 minutes * and 168 hours respectively. If you specify a value less than 5 minutes or * greater than 168 hours, the Batch service rejects the request with an * invalid property value error; if you are calling the REST API directly, * the HTTP status code is 400 (Bad Request). - * @member {boolean} + * @property {boolean} * [poolInfo.autoPoolSpecification.pool.enableInterNodeCommunication] * Enabling inter-node communication limits the maximum size of the pool due * to deployment restrictions on the nodes of the pool. This may result in * the pool not reaching its desired size. The default value is false. - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.networkConfiguration] - * @member {string} - * [poolInfo.autoPoolSpecification.pool.networkConfiguration.subnetId] The - * virtual network must be in the same region and subscription as the Azure - * Batch account. The specified subnet should have enough free IP addresses - * to accommodate the number of nodes in the pool. If the subnet doesn't have - * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must - * allow communication from the Azure Batch service to be able to schedule - * tasks on the compute nodes. This can be verified by checking if the - * specified VNet has any associated Network Security Groups (NSG). If - * communication to the compute nodes in the specified subnet is denied by an - * NSG, then the Batch service will set the state of the compute nodes to - * unusable. For pools created with virtualMachineConfiguration only ARM - * virtual networks ('Microsoft.Network/virtualNetworks') are supported, but - * for pools created with cloudServiceConfiguration both ARM and classic - * virtual networks are supported. If the specified VNet has any associated - * Network Security Groups (NSG), then a few reserved system ports must be - * enabled for inbound communication. For pools created with a virtual - * machine configuration, enable ports 29876 and 29877, as well as port 22 - * for Linux and port 3389 for Windows. For pools created with a cloud - * service configuration, enable ports 10100, 20100, and 30100. Also enable - * outbound connections to Azure Storage on port 443. For more details see: + * @property {string} + * [poolInfo.autoPoolSpecification.pool.networkConfiguration.subnetId] This + * is of the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. + * The virtual network must be in the same region and subscription as the + * Azure Batch account. The specified subnet should have enough free IP + * addresses to accommodate the number of nodes in the pool. If the subnet + * doesn't have enough free IP addresses, the pool will partially allocate + * compute nodes, and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks + * ('Microsoft.Network/virtualNetworks') are supported, but for pools created + * with cloudServiceConfiguration both ARM and classic virtual networks are + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration - * @member {object} + * @property {string} + * [poolInfo.autoPoolSpecification.pool.networkConfiguration.dynamicVNetAssignmentScope] + * Possible values include: 'none', 'job' + * @property {object} * [poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] * Pool endpoint configuration is only supported on pools with the * virtualMachineConfiguration property. - * @member {array} + * @property {array} * [poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration.inboundNATPools] * The maximum number of inbound NAT pools per Batch pool is 5. If the * maximum number of inbound NAT pools is exceeded the request fails with * HTTP status code 400. - * @member {object} [poolInfo.autoPoolSpecification.pool.startTask] - * @member {string} + * @property {object} [poolInfo.autoPoolSpecification.pool.startTask] + * @property {string} * [poolInfo.autoPoolSpecification.pool.startTask.commandLine] The command * line does not run under a shell, and therefore cannot take advantage of * shell features such as environment variable expansion. If you want to take @@ -585,56 +561,56 @@ class JobAddParameter { * use a relative path (relative to the task working directory), or use the * Batch provided environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings] When * this is specified, all directories recursively below the * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) * are mapped into the container, all task environment variables are mapped * into the container, and the task command line is executed in the * container. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.containerRunOptions] * These additional options are supplied as arguments to the "docker create" * command, in addition to those controlled by the Batch Service. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.imageName] * This is the full image reference, as would be specified to "docker pull". * If no tag is provided as part of the image name, the tag ":latest" is used * as a default. - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry] * This setting can be omitted if was already provided at pool creation. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.registryServer] * If omitted, the default is "docker.io". - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.userName] - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.password] - * @member {array} + * @property {array} * [poolInfo.autoPoolSpecification.pool.startTask.resourceFiles] Files listed * under this element are located in the task's working directory. - * @member {array} + * @property {array} * [poolInfo.autoPoolSpecification.pool.startTask.environmentSettings] - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity] If omitted, * the task runs as a non-administrative user unique to the task. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity.userName] The * userName and autoUser properties are mutually exclusive; you must specify * one but not both. - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser] The * userName and autoUser properties are mutually exclusive; you must specify * one but not both. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser.scope] * The default value is task. Possible values include: 'task', 'pool' - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser.elevationLevel] * The default value is nonAdmin. Possible values include: 'nonAdmin', * 'admin' - * @member {number} + * @property {number} * [poolInfo.autoPoolSpecification.pool.startTask.maxTaskRetryCount] The * Batch service retries a task if its exit code is nonzero. Note that this * value specifically controls the number of retries. The Batch service will @@ -643,7 +619,7 @@ class JobAddParameter { * initial try and 3 retries). If the maximum retry count is 0, the Batch * service does not retry the task. If the maximum retry count is -1, the * Batch service retries the task without limit. - * @member {boolean} + * @property {boolean} * [poolInfo.autoPoolSpecification.pool.startTask.waitForSuccess] If true and * the start task fails on a compute node, the Batch service retries the * start task up to its maximum retry count (maxTaskRetryCount). If the task @@ -655,7 +631,7 @@ class JobAddParameter { * node while the start task is still running; and even if the start task * fails, new tasks will continue to be scheduled on the node. The default is * false. - * @member {array} + * @property {array} * [poolInfo.autoPoolSpecification.pool.certificateReferences] For Windows * compute nodes, the Batch service installs the certificates to the * specified certificate store and location. For Linux compute nodes, the @@ -665,39 +641,50 @@ class JobAddParameter { * 'remoteUser', a 'certs' directory is created in the user's home directory * (e.g., /home/{user-name}/certs) and certificates are placed in that * directory. - * @member {array} + * @property {array} * [poolInfo.autoPoolSpecification.pool.applicationPackageReferences] - * @member {array} [poolInfo.autoPoolSpecification.pool.applicationLicenses] - * The list of application licenses must be a subset of available Batch - * service application licenses. If a license is requested which is not - * supported, pool creation will fail. The permitted licenses available on - * the pool are 'maya', 'vray', '3dsmax', 'arnold'. An additional charge - * applies for each application license added to the pool. - * @member {array} [poolInfo.autoPoolSpecification.pool.userAccounts] - * @member {array} [poolInfo.autoPoolSpecification.pool.metadata] The Batch + * @property {array} + * [poolInfo.autoPoolSpecification.pool.applicationLicenses] The list of + * application licenses must be a subset of available Batch service + * application licenses. If a license is requested which is not supported, + * pool creation will fail. The permitted licenses available on the pool are + * 'maya', 'vray', '3dsmax', 'arnold'. An additional charge applies for each + * application license added to the pool. + * @property {array} [poolInfo.autoPoolSpecification.pool.userAccounts] + * @property {array} [poolInfo.autoPoolSpecification.pool.metadata] The Batch * service does not assign any meaning to metadata; it is solely for the use * of user code. - * @member {string} [onAllTasksComplete] The action the Batch service should - * take when all tasks in the job are in the completed state. Note that if a - * job contains no tasks, then all tasks are considered complete. This option - * is therefore most commonly used with a Job Manager task; if you want to - * use automatic job termination without a Job Manager, you should initially - * set onAllTasksComplete to noaction and update the job properties to set - * onAllTasksComplete to terminatejob once you have finished adding tasks. - * The default is noaction. Possible values include: 'noAction', - * 'terminateJob' - * @member {string} [onTaskFailure] The action the Batch service should take - * when any task in the job fails. A task is considered to have failed if has - * a failureInfo. A failureInfo is set if the task completes with a non-zero - * exit code after exhausting its retry count, or if there was an error - * starting the task, for example due to a resource file download error. The - * default is noaction. Possible values include: 'noAction', + * @property {string} [onAllTasksComplete] The action the Batch service + * should take when all tasks in the job are in the completed state. Note + * that if a job contains no tasks, then all tasks are considered complete. + * This option is therefore most commonly used with a Job Manager task; if + * you want to use automatic job termination without a Job Manager, you + * should initially set onAllTasksComplete to noaction and update the job + * properties to set onAllTasksComplete to terminatejob once you have + * finished adding tasks. The default is noaction. Possible values include: + * 'noAction', 'terminateJob' + * @property {string} [onTaskFailure] The action the Batch service should + * take when any task in the job fails. A task is considered to have failed + * if has a failureInfo. A failureInfo is set if the task completes with a + * non-zero exit code after exhausting its retry count, or if there was an + * error starting the task, for example due to a resource file download + * error. The default is noaction. Possible values include: 'noAction', * 'performExitOptionsJobAction' - * @member {array} [metadata] A list of name-value pairs associated with the - * job as metadata. The Batch service does not assign any meaning to + * @property {array} [metadata] A list of name-value pairs associated with + * the job as metadata. The Batch service does not assign any meaning to * metadata; it is solely for the use of user code. - * @member {boolean} [usesTaskDependencies] Whether tasks in the job can + * @property {boolean} [usesTaskDependencies] Whether tasks in the job can * define dependencies on each other. The default is false. + * @property {object} [networkConfiguration] The network configuration for + * the job. + * @property {string} [networkConfiguration.subnetId] This is only supported + * for jobs running on VirtualMachineConfiguration pools. This is of the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. + * The virtual network must be in the same region and subscription as the + * Azure Batch account. The specified subnet should have enough free IP + * addresses to accommodate the number of nodes which will run tasks from the + * job. For more details, see + * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. */ constructor() { } @@ -830,6 +817,14 @@ class JobAddParameter { type: { name: 'Boolean' } + }, + networkConfiguration: { + required: false, + serializedName: 'networkConfiguration', + type: { + name: 'Composite', + className: 'JobNetworkConfiguration' + } } } } diff --git a/lib/services/batch/lib/models/jobConstraints.js b/lib/services/batch/lib/models/jobConstraints.js index 2a37224fa7..375361daaf 100644 --- a/lib/services/batch/lib/models/jobConstraints.js +++ b/lib/services/batch/lib/models/jobConstraints.js @@ -17,14 +17,14 @@ class JobConstraints { /** * Create a JobConstraints. - * @member {moment.duration} [maxWallClockTime] The maximum elapsed time that - * the job may run, measured from the time the job is created. If the job - * does not complete within the time limit, the Batch service terminates it - * and any tasks that are still running. In this case, the termination reason - * will be MaxWallClockTimeExpiry. If this property is not specified, there - * is no time limit on how long the job may run. - * @member {number} [maxTaskRetryCount] The maximum number of times each task - * may be retried. The Batch service retries a task if its exit code is + * @property {moment.duration} [maxWallClockTime] The maximum elapsed time + * that the job may run, measured from the time the job is created. If the + * job does not complete within the time limit, the Batch service terminates + * it and any tasks that are still running. In this case, the termination + * reason will be MaxWallClockTimeExpiry. If this property is not specified, + * there is no time limit on how long the job may run. + * @property {number} [maxTaskRetryCount] The maximum number of times each + * task may be retried. The Batch service retries a task if its exit code is * nonzero. Note that this value specifically controls the number of retries. * The Batch service will try each task once, and may then retry up to this * limit. For example, if the maximum retry count is 3, Batch tries a task up diff --git a/lib/services/batch/lib/models/jobDeleteMethodOptions.js b/lib/services/batch/lib/models/jobDeleteMethodOptions.js index 012c220dfc..d4f4b65f37 100644 --- a/lib/services/batch/lib/models/jobDeleteMethodOptions.js +++ b/lib/services/batch/lib/models/jobDeleteMethodOptions.js @@ -17,30 +17,30 @@ class JobDeleteMethodOptions { /** * Create a JobDeleteMethodOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. + * @property {string} [ifMatch] An ETag value associated with the version of * the resource known to the client. The operation will be performed only if * the resource's current ETag on the service exactly matches the value * specified by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version + * @property {string} [ifNoneMatch] An ETag value associated with the version * of the resource known to the client. The operation will be performed only * if the resource's current ETag on the service does not match the value * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last + * @property {date} [ifModifiedSince] A timestamp indicating the last + * modified time of the resource known to the client. The operation will be + * performed only if the resource on the service has been modified since the + * specified time. + * @property {date} [ifUnmodifiedSince] A timestamp indicating the last * modified time of the resource known to the client. The operation will be * performed only if the resource on the service has not been modified since * the specified time. diff --git a/lib/services/batch/lib/models/jobDisableOptions.js b/lib/services/batch/lib/models/jobDisableOptions.js index 7055ae8830..b98de43797 100644 --- a/lib/services/batch/lib/models/jobDisableOptions.js +++ b/lib/services/batch/lib/models/jobDisableOptions.js @@ -17,30 +17,30 @@ class JobDisableOptions { /** * Create a JobDisableOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. + * @property {string} [ifMatch] An ETag value associated with the version of * the resource known to the client. The operation will be performed only if * the resource's current ETag on the service exactly matches the value * specified by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version + * @property {string} [ifNoneMatch] An ETag value associated with the version * of the resource known to the client. The operation will be performed only * if the resource's current ETag on the service does not match the value * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last + * @property {date} [ifModifiedSince] A timestamp indicating the last + * modified time of the resource known to the client. The operation will be + * performed only if the resource on the service has been modified since the + * specified time. + * @property {date} [ifUnmodifiedSince] A timestamp indicating the last * modified time of the resource known to the client. The operation will be * performed only if the resource on the service has not been modified since * the specified time. diff --git a/lib/services/batch/lib/models/jobDisableParameter.js b/lib/services/batch/lib/models/jobDisableParameter.js index e71e2add18..8dc70d5722 100644 --- a/lib/services/batch/lib/models/jobDisableParameter.js +++ b/lib/services/batch/lib/models/jobDisableParameter.js @@ -17,8 +17,8 @@ class JobDisableParameter { /** * Create a JobDisableParameter. - * @member {string} disableTasks What to do with active tasks associated with - * the job. Possible values include: 'requeue', 'terminate', 'wait' + * @property {string} disableTasks What to do with active tasks associated + * with the job. Possible values include: 'requeue', 'terminate', 'wait' */ constructor() { } diff --git a/lib/services/batch/lib/models/jobEnableOptions.js b/lib/services/batch/lib/models/jobEnableOptions.js index f2e591ee34..b4f21f4a13 100644 --- a/lib/services/batch/lib/models/jobEnableOptions.js +++ b/lib/services/batch/lib/models/jobEnableOptions.js @@ -17,30 +17,30 @@ class JobEnableOptions { /** * Create a JobEnableOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. + * @property {string} [ifMatch] An ETag value associated with the version of * the resource known to the client. The operation will be performed only if * the resource's current ETag on the service exactly matches the value * specified by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version + * @property {string} [ifNoneMatch] An ETag value associated with the version * of the resource known to the client. The operation will be performed only * if the resource's current ETag on the service does not match the value * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last + * @property {date} [ifModifiedSince] A timestamp indicating the last + * modified time of the resource known to the client. The operation will be + * performed only if the resource on the service has been modified since the + * specified time. + * @property {date} [ifUnmodifiedSince] A timestamp indicating the last * modified time of the resource known to the client. The operation will be * performed only if the resource on the service has not been modified since * the specified time. diff --git a/lib/services/batch/lib/models/jobExecutionInformation.js b/lib/services/batch/lib/models/jobExecutionInformation.js index 9cb2c44593..db653da6be 100644 --- a/lib/services/batch/lib/models/jobExecutionInformation.js +++ b/lib/services/batch/lib/models/jobExecutionInformation.js @@ -18,28 +18,28 @@ class JobExecutionInformation { /** * Create a JobExecutionInformation. - * @member {date} startTime The start time of the job. This is the time at + * @property {date} startTime The start time of the job. This is the time at * which the job was created. - * @member {date} [endTime] The completion time of the job. This property is - * set only if the job is in the completed state. - * @member {string} [poolId] The ID of the pool to which this job is + * @property {date} [endTime] The completion time of the job. This property + * is set only if the job is in the completed state. + * @property {string} [poolId] The ID of the pool to which this job is * assigned. This element contains the actual pool where the job is assigned. * When you get job details from the service, they also contain a poolInfo * element, which contains the pool configuration data from when the job was * added or updated. That poolInfo element may also contain a poolId element. * If it does, the two IDs are the same. If it does not, it means the job ran * on an auto pool, and this property contains the ID of that auto pool. - * @member {object} [schedulingError] Details of any error encountered by the - * service in starting the job. This property is not set if there was no + * @property {object} [schedulingError] Details of any error encountered by + * the service in starting the job. This property is not set if there was no * error starting the job. - * @member {string} [schedulingError.category] Possible values include: + * @property {string} [schedulingError.category] Possible values include: * 'userError', 'serverError' - * @member {string} [schedulingError.code] - * @member {string} [schedulingError.message] - * @member {array} [schedulingError.details] - * @member {string} [terminateReason] A string describing the reason the job - * ended. This property is set only if the job is in the completed state. If - * the Batch service terminates the job, it sets the reason as follows: + * @property {string} [schedulingError.code] + * @property {string} [schedulingError.message] + * @property {array} [schedulingError.details] + * @property {string} [terminateReason] A string describing the reason the + * job ended. This property is set only if the job is in the completed state. + * If the Batch service terminates the job, it sets the reason as follows: * JMComplete - the Job Manager task completed, and killJobOnCompletion was * set to true. MaxWallClockTimeExpiry - the job reached its maxWallClockTime * constraint. TerminateJobSchedule - the job ran as part of a schedule, and diff --git a/lib/services/batch/lib/models/jobGetAllLifetimeStatisticsOptions.js b/lib/services/batch/lib/models/jobGetAllLifetimeStatisticsOptions.js index 322a89fa7b..e36d258b24 100644 --- a/lib/services/batch/lib/models/jobGetAllLifetimeStatisticsOptions.js +++ b/lib/services/batch/lib/models/jobGetAllLifetimeStatisticsOptions.js @@ -17,17 +17,17 @@ class JobGetAllLifetimeStatisticsOptions { /** * Create a JobGetAllLifetimeStatisticsOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/jobGetOptions.js b/lib/services/batch/lib/models/jobGetOptions.js index 53d6578f8d..8dd67e2a48 100644 --- a/lib/services/batch/lib/models/jobGetOptions.js +++ b/lib/services/batch/lib/models/jobGetOptions.js @@ -17,32 +17,32 @@ class JobGetOptions { /** * Create a JobGetOptions. - * @member {string} [select] An OData $select clause. - * @member {string} [expand] An OData $expand clause. - * @member {number} [timeout] The maximum time that the server can spend + * @property {string} [select] An OData $select clause. + * @property {string} [expand] An OData $expand clause. + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. + * @property {string} [ifMatch] An ETag value associated with the version of * the resource known to the client. The operation will be performed only if * the resource's current ETag on the service exactly matches the value * specified by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version + * @property {string} [ifNoneMatch] An ETag value associated with the version * of the resource known to the client. The operation will be performed only * if the resource's current ETag on the service does not match the value * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last + * @property {date} [ifModifiedSince] A timestamp indicating the last + * modified time of the resource known to the client. The operation will be + * performed only if the resource on the service has been modified since the + * specified time. + * @property {date} [ifUnmodifiedSince] A timestamp indicating the last * modified time of the resource known to the client. The operation will be * performed only if the resource on the service has not been modified since * the specified time. diff --git a/lib/services/batch/lib/models/jobGetTaskCountsOptions.js b/lib/services/batch/lib/models/jobGetTaskCountsOptions.js index c386d63246..4c5340b63f 100644 --- a/lib/services/batch/lib/models/jobGetTaskCountsOptions.js +++ b/lib/services/batch/lib/models/jobGetTaskCountsOptions.js @@ -17,17 +17,17 @@ class JobGetTaskCountsOptions { /** * Create a JobGetTaskCountsOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/jobListFromJobScheduleNextOptions.js b/lib/services/batch/lib/models/jobListFromJobScheduleNextOptions.js index a50c049993..e0b1d4881c 100644 --- a/lib/services/batch/lib/models/jobListFromJobScheduleNextOptions.js +++ b/lib/services/batch/lib/models/jobListFromJobScheduleNextOptions.js @@ -17,14 +17,14 @@ class JobListFromJobScheduleNextOptions { /** * Create a JobListFromJobScheduleNextOptions. - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/jobListFromJobScheduleOptions.js b/lib/services/batch/lib/models/jobListFromJobScheduleOptions.js index 4e67429d3e..336055b91d 100644 --- a/lib/services/batch/lib/models/jobListFromJobScheduleOptions.js +++ b/lib/services/batch/lib/models/jobListFromJobScheduleOptions.js @@ -17,24 +17,25 @@ class JobListFromJobScheduleOptions { /** * Create a JobListFromJobScheduleOptions. - * @member {string} [filter] An OData $filter clause. For more information on - * constructing this filter, see + * @property {string} [filter] An OData $filter clause. For more information + * on constructing this filter, see * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-jobs-in-a-job-schedule. - * @member {string} [select] An OData $select clause. - * @member {string} [expand] An OData $expand clause. - * @member {number} [maxResults] The maximum number of items to return in the - * response. A maximum of 1000 jobs can be returned. Default value: 1000 . - * @member {number} [timeout] The maximum time that the server can spend + * @property {string} [select] An OData $select clause. + * @property {string} [expand] An OData $expand clause. + * @property {number} [maxResults] The maximum number of items to return in + * the response. A maximum of 1000 jobs can be returned. Default value: 1000 + * . + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/jobListNextOptions.js b/lib/services/batch/lib/models/jobListNextOptions.js index 61a4a799c7..6cfa395e83 100644 --- a/lib/services/batch/lib/models/jobListNextOptions.js +++ b/lib/services/batch/lib/models/jobListNextOptions.js @@ -17,14 +17,14 @@ class JobListNextOptions { /** * Create a JobListNextOptions. - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/jobListOptions.js b/lib/services/batch/lib/models/jobListOptions.js index cea40d985d..3b825f7a7c 100644 --- a/lib/services/batch/lib/models/jobListOptions.js +++ b/lib/services/batch/lib/models/jobListOptions.js @@ -17,24 +17,25 @@ class JobListOptions { /** * Create a JobListOptions. - * @member {string} [filter] An OData $filter clause. For more information on - * constructing this filter, see + * @property {string} [filter] An OData $filter clause. For more information + * on constructing this filter, see * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-jobs. - * @member {string} [select] An OData $select clause. - * @member {string} [expand] An OData $expand clause. - * @member {number} [maxResults] The maximum number of items to return in the - * response. A maximum of 1000 jobs can be returned. Default value: 1000 . - * @member {number} [timeout] The maximum time that the server can spend + * @property {string} [select] An OData $select clause. + * @property {string} [expand] An OData $expand clause. + * @property {number} [maxResults] The maximum number of items to return in + * the response. A maximum of 1000 jobs can be returned. Default value: 1000 + * . + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/jobListPreparationAndReleaseTaskStatusNextOptions.js b/lib/services/batch/lib/models/jobListPreparationAndReleaseTaskStatusNextOptions.js index e75022e563..382c660403 100644 --- a/lib/services/batch/lib/models/jobListPreparationAndReleaseTaskStatusNextOptions.js +++ b/lib/services/batch/lib/models/jobListPreparationAndReleaseTaskStatusNextOptions.js @@ -17,14 +17,14 @@ class JobListPreparationAndReleaseTaskStatusNextOptions { /** * Create a JobListPreparationAndReleaseTaskStatusNextOptions. - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/jobListPreparationAndReleaseTaskStatusOptions.js b/lib/services/batch/lib/models/jobListPreparationAndReleaseTaskStatusOptions.js index 9f5f485062..5e2ca50511 100644 --- a/lib/services/batch/lib/models/jobListPreparationAndReleaseTaskStatusOptions.js +++ b/lib/services/batch/lib/models/jobListPreparationAndReleaseTaskStatusOptions.js @@ -17,23 +17,24 @@ class JobListPreparationAndReleaseTaskStatusOptions { /** * Create a JobListPreparationAndReleaseTaskStatusOptions. - * @member {string} [filter] An OData $filter clause. For more information on - * constructing this filter, see + * @property {string} [filter] An OData $filter clause. For more information + * on constructing this filter, see * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-job-preparation-and-release-status. - * @member {string} [select] An OData $select clause. - * @member {number} [maxResults] The maximum number of items to return in the - * response. A maximum of 1000 tasks can be returned. Default value: 1000 . - * @member {number} [timeout] The maximum time that the server can spend + * @property {string} [select] An OData $select clause. + * @property {number} [maxResults] The maximum number of items to return in + * the response. A maximum of 1000 tasks can be returned. Default value: 1000 + * . + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/jobManagerTask.js b/lib/services/batch/lib/models/jobManagerTask.js index cac787d720..3d1216bb30 100644 --- a/lib/services/batch/lib/models/jobManagerTask.js +++ b/lib/services/batch/lib/models/jobManagerTask.js @@ -41,15 +41,15 @@ class JobManagerTask { /** * Create a JobManagerTask. - * @member {string} id A string that uniquely identifies the Job Manager task - * within the job. The ID can contain any combination of alphanumeric + * @property {string} id A string that uniquely identifies the Job Manager + * task within the job. The ID can contain any combination of alphanumeric * characters including hyphens and underscores and cannot contain more than * 64 characters. - * @member {string} [displayName] The display name of the Job Manager task. + * @property {string} [displayName] The display name of the Job Manager task. * It need not be unique and can contain any Unicode characters up to a * maximum length of 1024. - * @member {string} commandLine The command line of the Job Manager task. The - * command line does not run under a shell, and therefore cannot take + * @property {string} commandLine The command line of the Job Manager task. + * The command line does not run under a shell, and therefore cannot take * advantage of shell features such as environment variable expansion. If you * want to take advantage of such features, you should invoke the shell in * the command line, for example using "cmd /c MyCommand" in Windows or @@ -57,28 +57,28 @@ class JobManagerTask { * it should use a relative path (relative to the task working directory), or * use the Batch provided environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [containerSettings] The settings for the container under - * which the Job Manager task runs. If the pool that will run this task has - * containerConfiguration set, this must be set as well. If the pool that + * @property {object} [containerSettings] The settings for the container + * under which the Job Manager task runs. If the pool that will run this task + * has containerConfiguration set, this must be set as well. If the pool that * will run this task doesn't have containerConfiguration set, this must not * be set. When this is specified, all directories recursively below the * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) * are mapped into the container, all task environment variables are mapped * into the container, and the task command line is executed in the * container. - * @member {string} [containerSettings.containerRunOptions] These additional - * options are supplied as arguments to the "docker create" command, in - * addition to those controlled by the Batch Service. - * @member {string} [containerSettings.imageName] This is the full image + * @property {string} [containerSettings.containerRunOptions] These + * additional options are supplied as arguments to the "docker create" + * command, in addition to those controlled by the Batch Service. + * @property {string} [containerSettings.imageName] This is the full image * reference, as would be specified to "docker pull". If no tag is provided * as part of the image name, the tag ":latest" is used as a default. - * @member {object} [containerSettings.registry] This setting can be omitted - * if was already provided at pool creation. - * @member {string} [containerSettings.registry.registryServer] If omitted, + * @property {object} [containerSettings.registry] This setting can be + * omitted if was already provided at pool creation. + * @property {string} [containerSettings.registry.registryServer] If omitted, * the default is "docker.io". - * @member {string} [containerSettings.registry.userName] - * @member {string} [containerSettings.registry.password] - * @member {array} [resourceFiles] A list of files that the Batch service + * @property {string} [containerSettings.registry.userName] + * @property {string} [containerSettings.registry.password] + * @property {array} [resourceFiles] A list of files that the Batch service * will download to the compute node before running the command line. Files * listed under this element are located in the task's working directory. * There is a maximum size for the list of resource files. When the max size @@ -86,29 +86,28 @@ class JobManagerTask { * RequestEntityTooLarge. If this occurs, the collection of ResourceFiles * must be reduced in size. This can be achieved using .zip files, * Application Packages, or Docker Containers. - * @member {array} [outputFiles] A list of files that the Batch service will - * upload from the compute node after running the command line. For + * @property {array} [outputFiles] A list of files that the Batch service + * will upload from the compute node after running the command line. For * multi-instance tasks, the files will only be uploaded from the compute * node on which the primary task is executed. - * @member {array} [environmentSettings] A list of environment variable + * @property {array} [environmentSettings] A list of environment variable * settings for the Job Manager task. - * @member {object} [constraints] Constraints that apply to the Job Manager + * @property {object} [constraints] Constraints that apply to the Job Manager * task. - * @member {moment.duration} [constraints.maxWallClockTime] If this is not + * @property {moment.duration} [constraints.maxWallClockTime] If this is not * specified, there is no time limit on how long the task may run. - * @member {moment.duration} [constraints.retentionTime] The default is - * infinite, i.e. the task directory will be retained until the compute node - * is removed or reimaged. - * @member {number} [constraints.maxTaskRetryCount] Note that this value + * @property {moment.duration} [constraints.retentionTime] The default is 7 + * days, i.e. the task directory will be retained for 7 days unless the + * compute node is removed or the job is deleted. + * @property {number} [constraints.maxTaskRetryCount] Note that this value * specifically controls the number of retries for the task executable due to * a nonzero exit code. The Batch service will try the task once, and may * then retry up to this limit. For example, if the maximum retry count is 3, * Batch tries the task up to 4 times (one initial try and 3 retries). If the * maximum retry count is 0, the Batch service does not retry the task after * the first attempt. If the maximum retry count is -1, the Batch service - * retries the task without limit. Resource files and application packages - * are only downloaded again if the task is retried on a new compute node. - * @member {boolean} [killJobOnCompletion] Whether completion of the Job + * retries the task without limit. + * @property {boolean} [killJobOnCompletion] Whether completion of the Job * Manager task signifies completion of the entire job. If true, when the Job * Manager task completes, the Batch service marks the job as complete. If * any tasks are still running at this time (other than Job Release), those @@ -122,25 +121,25 @@ class JobManagerTask { * and using the Job Manager task only to create the tasks for the job (not * to monitor progress), then it is important to set killJobOnCompletion to * false. - * @member {object} [userIdentity] The user identity under which the Job + * @property {object} [userIdentity] The user identity under which the Job * Manager task runs. If omitted, the task runs as a non-administrative user * unique to the task. - * @member {string} [userIdentity.userName] The userName and autoUser + * @property {string} [userIdentity.userName] The userName and autoUser * properties are mutually exclusive; you must specify one but not both. - * @member {object} [userIdentity.autoUser] The userName and autoUser + * @property {object} [userIdentity.autoUser] The userName and autoUser * properties are mutually exclusive; you must specify one but not both. - * @member {string} [userIdentity.autoUser.scope] The default value is task. - * Possible values include: 'task', 'pool' - * @member {string} [userIdentity.autoUser.elevationLevel] The default value - * is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {boolean} [runExclusive] Whether the Job Manager task requires + * @property {string} [userIdentity.autoUser.scope] The default value is + * task. Possible values include: 'task', 'pool' + * @property {string} [userIdentity.autoUser.elevationLevel] The default + * value is nonAdmin. Possible values include: 'nonAdmin', 'admin' + * @property {boolean} [runExclusive] Whether the Job Manager task requires * exclusive use of the compute node where it runs. If true, no other tasks * will run on the same compute node for as long as the Job Manager is * running. If false, other tasks can run simultaneously with the Job Manager * on a compute node. The Job Manager task counts normally against the node's * concurrent task limit, so this is only relevant if the node allows * multiple concurrent tasks. The default value is true. - * @member {array} [applicationPackageReferences] A list of application + * @property {array} [applicationPackageReferences] A list of application * packages that the Batch service will deploy to the compute node before * running the command line. Application packages are downloaded and deployed * to a shared directory, not the task working directory. Therefore, if a @@ -148,7 +147,7 @@ class JobManagerTask { * it is not re-downloaded; the existing copy on the compute node is used. If * a referenced application package cannot be installed, for example because * the package has been deleted or because download failed, the task fails. - * @member {object} [authenticationTokenSettings] The settings for an + * @property {object} [authenticationTokenSettings] The settings for an * authentication token that the task can use to perform Batch service * operations. If this property is set, the Batch service provides the task * with an authentication token which can be used to authenticate Batch @@ -158,13 +157,13 @@ class JobManagerTask { * settings. For example, a task can request job permissions in order to add * other tasks to the job, or check the status of the job or of other tasks * under the job. - * @member {array} [authenticationTokenSettings.access] The authentication + * @property {array} [authenticationTokenSettings.access] The authentication * token grants access to a limited set of Batch service operations. * Currently the only supported value for the access property is 'job', which * grants access to all operations related to the job which contains the * task. - * @member {boolean} [allowLowPriorityNode] Whether the Job Manager task may - * run on a low-priority compute node. The default value is true. + * @property {boolean} [allowLowPriorityNode] Whether the Job Manager task + * may run on a low-priority compute node. The default value is true. */ constructor() { } diff --git a/lib/services/batch/lib/models/jobNetworkConfiguration.js b/lib/services/batch/lib/models/jobNetworkConfiguration.js new file mode 100644 index 0000000000..dc3206aa61 --- /dev/null +++ b/lib/services/batch/lib/models/jobNetworkConfiguration.js @@ -0,0 +1,61 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * @summary The network configuration for the job. + * + */ +class JobNetworkConfiguration { + /** + * Create a JobNetworkConfiguration. + * @property {string} subnetId The ARM resource identifier of the virtual + * network subnet which nodes running tasks from the job will join for the + * duration of the task. This is only supported for jobs running on + * VirtualMachineConfiguration pools. This is of the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. + * The virtual network must be in the same region and subscription as the + * Azure Batch account. The specified subnet should have enough free IP + * addresses to accommodate the number of nodes which will run tasks from the + * job. For more details, see + * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + */ + constructor() { + } + + /** + * Defines the metadata of JobNetworkConfiguration + * + * @returns {object} metadata of JobNetworkConfiguration + * + */ + mapper() { + return { + required: false, + serializedName: 'JobNetworkConfiguration', + type: { + name: 'Composite', + className: 'JobNetworkConfiguration', + modelProperties: { + subnetId: { + required: true, + serializedName: 'subnetId', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = JobNetworkConfiguration; diff --git a/lib/services/batch/lib/models/jobPatchOptions.js b/lib/services/batch/lib/models/jobPatchOptions.js index aa29b58b78..1100acd216 100644 --- a/lib/services/batch/lib/models/jobPatchOptions.js +++ b/lib/services/batch/lib/models/jobPatchOptions.js @@ -17,30 +17,30 @@ class JobPatchOptions { /** * Create a JobPatchOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. + * @property {string} [ifMatch] An ETag value associated with the version of * the resource known to the client. The operation will be performed only if * the resource's current ETag on the service exactly matches the value * specified by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version + * @property {string} [ifNoneMatch] An ETag value associated with the version * of the resource known to the client. The operation will be performed only * if the resource's current ETag on the service does not match the value * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last + * @property {date} [ifModifiedSince] A timestamp indicating the last + * modified time of the resource known to the client. The operation will be + * performed only if the resource on the service has been modified since the + * specified time. + * @property {date} [ifUnmodifiedSince] A timestamp indicating the last * modified time of the resource known to the client. The operation will be * performed only if the resource on the service has not been modified since * the specified time. diff --git a/lib/services/batch/lib/models/jobPatchParameter.js b/lib/services/batch/lib/models/jobPatchParameter.js index 977922bc9f..536fafff19 100644 --- a/lib/services/batch/lib/models/jobPatchParameter.js +++ b/lib/services/batch/lib/models/jobPatchParameter.js @@ -17,47 +17,47 @@ class JobPatchParameter { /** * Create a JobPatchParameter. - * @member {number} [priority] The priority of the job. Priority values can + * @property {number} [priority] The priority of the job. Priority values can * range from -1000 to 1000, with -1000 being the lowest priority and 1000 * being the highest priority. If omitted, the priority of the job is left * unchanged. - * @member {string} [onAllTasksComplete] The action the Batch service should - * take when all tasks in the job are in the completed state. If omitted, the - * completion behavior is left unchanged. You may not change the value from - * terminatejob to noaction - that is, once you have engaged automatic job - * termination, you cannot turn it off again. If you try to do this, the - * request fails with an 'invalid property value' error response; if you are - * calling the REST API directly, the HTTP status code is 400 (Bad Request). - * Possible values include: 'noAction', 'terminateJob' - * @member {object} [constraints] The execution constraints for the job. If + * @property {string} [onAllTasksComplete] The action the Batch service + * should take when all tasks in the job are in the completed state. If + * omitted, the completion behavior is left unchanged. You may not change the + * value from terminatejob to noaction - that is, once you have engaged + * automatic job termination, you cannot turn it off again. If you try to do + * this, the request fails with an 'invalid property value' error response; + * if you are calling the REST API directly, the HTTP status code is 400 (Bad + * Request). Possible values include: 'noAction', 'terminateJob' + * @property {object} [constraints] The execution constraints for the job. If * omitted, the existing execution constraints are left unchanged. - * @member {moment.duration} [constraints.maxWallClockTime] If the job does + * @property {moment.duration} [constraints.maxWallClockTime] If the job does * not complete within the time limit, the Batch service terminates it and * any tasks that are still running. In this case, the termination reason * will be MaxWallClockTimeExpiry. If this property is not specified, there * is no time limit on how long the job may run. - * @member {number} [constraints.maxTaskRetryCount] Note that this value + * @property {number} [constraints.maxTaskRetryCount] Note that this value * specifically controls the number of retries. The Batch service will try * each task once, and may then retry up to this limit. For example, if the * maximum retry count is 3, Batch tries a task up to 4 times (one initial * try and 3 retries). If the maximum retry count is 0, the Batch service * does not retry tasks. If the maximum retry count is -1, the Batch service * retries tasks without limit. The default value is 0 (no retries). - * @member {object} [poolInfo] The pool on which the Batch service runs the + * @property {object} [poolInfo] The pool on which the Batch service runs the * job's tasks. You may change the pool for a job only when the job is * disabled. The Patch Job call will fail if you include the poolInfo element * and the job is not disabled. If you specify an autoPoolSpecification * specification in the poolInfo, only the keepAlive property can be updated, * and then only if the auto pool has a poolLifetimeOption of job. If * omitted, the job continues to run on its current pool. - * @member {string} [poolInfo.poolId] You must ensure that the pool + * @property {string} [poolInfo.poolId] You must ensure that the pool * referenced by this property exists. If the pool does not exist at the time * the Batch service tries to schedule a job, no tasks for the job will run * until you create a pool with that id. Note that the Batch service will not * reject the job request; it will simply not run tasks until the pool * exists. You must specify either the pool ID or the auto pool * specification, but not both. - * @member {object} [poolInfo.autoPoolSpecification] If auto pool creation + * @property {object} [poolInfo.autoPoolSpecification] If auto pool creation * fails, the Batch service moves the job to a completed state, and the pool * creation error is set in the job's scheduling error property. The Batch * service manages the lifetime (both creation and, unless keepAlive is @@ -65,28 +65,28 @@ class JobPatchParameter { * lifetime of the auto pool while the job is active will result in * unexpected behavior. You must specify either the pool ID or the auto pool * specification, but not both. - * @member {string} [poolInfo.autoPoolSpecification.autoPoolIdPrefix] The + * @property {string} [poolInfo.autoPoolSpecification.autoPoolIdPrefix] The * Batch service assigns each auto pool a unique identifier on creation. To * distinguish between pools created for different purposes, you can specify * this element to add a prefix to the ID that is assigned. The prefix can be * up to 20 characters long. - * @member {string} [poolInfo.autoPoolSpecification.poolLifetimeOption] + * @property {string} [poolInfo.autoPoolSpecification.poolLifetimeOption] * Possible values include: 'jobSchedule', 'job' - * @member {boolean} [poolInfo.autoPoolSpecification.keepAlive] If false, the - * Batch service deletes the pool once its lifetime (as determined by the + * @property {boolean} [poolInfo.autoPoolSpecification.keepAlive] If false, + * the Batch service deletes the pool once its lifetime (as determined by the * poolLifetimeOption setting) expires; that is, when the job or job schedule * completes. If true, the Batch service does not delete the pool * automatically. It is up to the user to delete auto pools created with this * option. - * @member {object} [poolInfo.autoPoolSpecification.pool] - * @member {string} [poolInfo.autoPoolSpecification.pool.displayName] The + * @property {object} [poolInfo.autoPoolSpecification.pool] + * @property {string} [poolInfo.autoPoolSpecification.pool.displayName] The * display name need not be unique and can contain any Unicode characters up * to a maximum length of 1024. - * @member {string} [poolInfo.autoPoolSpecification.pool.vmSize] For + * @property {string} [poolInfo.autoPoolSpecification.pool.vmSize] For * information about available sizes of virtual machines in pools, see Choose * a VM size for compute nodes in an Azure Batch pool * (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration] This * property must be specified if the pool needs to be created with Azure PaaS * VMs. This property and virtualMachineConfiguration are mutually exclusive @@ -95,7 +95,7 @@ class JobPatchParameter { * directly, the HTTP status code is 400 (Bad Request). This property cannot * be specified if the Batch account was created with its poolAllocationMode * property set to 'UserSubscription'. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osFamily] * Possible values are: * 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. @@ -104,55 +104,39 @@ class JobPatchParameter { * 5 - OS Family 5, equivalent to Windows Server 2016. For more information, * see Azure Guest OS Releases * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). - * @member {string} - * [poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] + * @property {string} + * [poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osVersion] * The default value is * which specifies the latest operating system version * for the specified OS family. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.currentOSVersion] - * This may differ from targetOSVersion if the pool state is Upgrading. In - * this case some virtual machines may be on the targetOSVersion and some may - * be on the currentOSVersion during the upgrade process. Once all virtual - * machines have upgraded, currentOSVersion is updated to be the same as - * targetOSVersion. - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration] This * property must be specified if the pool needs to be created with Azure IaaS * VMs. This property and cloudServiceConfiguration are mutually exclusive * and one of the properties must be specified. If neither is specified then * the Batch service returns an error; if you are calling the REST API * directly, the HTTP status code is 400 (Bad Request). - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference] - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.publisher] * For example, Canonical or MicrosoftWindowsServer. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.offer] * For example, UbuntuServer or WindowsServer. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.sku] * For example, 14.04.0-LTS or 2012-R2-Datacenter. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.version] * A value of 'latest' can be specified to select the latest version of an * image. If omitted, the default is 'latest'. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.virtualMachineImageId] * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as - * the Azure Batch account. For information about the firewall settings for - * the Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * @member {object} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * @member {string} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The default value for caching is readwrite. For information about the - * caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' - * @member {string} + * the Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. + * @property {string} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId] * The Batch node agent is a program that runs on each node in the pool, and * provides the command-and-control interface between the node and the Batch @@ -161,14 +145,14 @@ class JobPatchParameter { * which matches the selected image reference. To get the list of supported * node agent SKUs along with their list of verified image references, see * the 'List supported node agent SKUs' operation. - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] - * This property must not be specified if the imageReference or osDisk - * property specifies a Linux OS image. - * @member {boolean} + * This property must not be specified if the imageReference property + * specifies a Linux OS image. + * @property {boolean} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] * If omitted, the default value is true. - * @member {array} + * @property {array} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.dataDisks] * This property must be specified if the compute nodes in the pool need to * have empty data disks attached to them. This cannot be updated. Each node @@ -180,7 +164,7 @@ class JobPatchParameter { * https://docs.microsoft.com/en-us/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux * and * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.licenseType] * This only applies to images that contain the Windows operating system, and * should only be used when you hold valid on-premises licenses for the nodes @@ -189,106 +173,98 @@ class JobPatchParameter { * * Windows_Server - The on-premises license is for Windows Server. * Windows_Client - The on-premises license is for Windows Client. - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration] * If specified, setup is performed on each node in the pool to allow tasks * to run in containers. All regular tasks and job manager tasks run on this * pool must specify the containerSettings property, and all other tasks may * specify it. - * @member {array} + * @property {array} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration.containerImageNames] * This is the full image reference, as would be specified to "docker pull". * An image will be sourced from the default Docker registry unless the image * is fully qualified with an alternative registry. - * @member {array} + * @property {array} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration.containerRegistries] * If any images must be downloaded from a private registry which requires * credentials, then those credentials must be provided here. - * @member {number} [poolInfo.autoPoolSpecification.pool.maxTasksPerNode] The - * default value is 1. The maximum value of this setting depends on the size - * of the compute nodes in the pool (the vmSize setting). - * @member {object} + * @property {number} [poolInfo.autoPoolSpecification.pool.maxTasksPerNode] + * The default value is 1. The maximum value of this setting depends on the + * size of the compute nodes in the pool (the vmSize setting). + * @property {object} * [poolInfo.autoPoolSpecification.pool.taskSchedulingPolicy] - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.taskSchedulingPolicy.nodeFillType] * Possible values include: 'spread', 'pack' - * @member {moment.duration} + * @property {moment.duration} * [poolInfo.autoPoolSpecification.pool.resizeTimeout] This timeout applies * only to manual scaling; it has no effect when enableAutoScale is set to * true. The default value is 15 minutes. The minimum value is 5 minutes. If * you specify a value less than 5 minutes, the Batch service rejects the * request with an error; if you are calling the REST API directly, the HTTP * status code is 400 (Bad Request). - * @member {number} + * @property {number} * [poolInfo.autoPoolSpecification.pool.targetDedicatedNodes] This property * must not be specified if enableAutoScale is set to true. If * enableAutoScale is set to false, then you must set either * targetDedicatedNodes, targetLowPriorityNodes, or both. - * @member {number} + * @property {number} * [poolInfo.autoPoolSpecification.pool.targetLowPriorityNodes] This property * must not be specified if enableAutoScale is set to true. If * enableAutoScale is set to false, then you must set either * targetDedicatedNodes, targetLowPriorityNodes, or both. - * @member {boolean} [poolInfo.autoPoolSpecification.pool.enableAutoScale] If - * false, at least one of targetDedicateNodes and targetLowPriorityNodes must - * be specified. If true, the autoScaleFormula element is required. The pool - * automatically resizes according to the formula. The default value is + * @property {boolean} [poolInfo.autoPoolSpecification.pool.enableAutoScale] + * If false, at least one of targetDedicateNodes and targetLowPriorityNodes + * must be specified. If true, the autoScaleFormula element is required. The + * pool automatically resizes according to the formula. The default value is * false. - * @member {string} [poolInfo.autoPoolSpecification.pool.autoScaleFormula] + * @property {string} [poolInfo.autoPoolSpecification.pool.autoScaleFormula] * This property must not be specified if enableAutoScale is set to false. It * is required if enableAutoScale is set to true. The formula is checked for * validity before the pool is created. If the formula is not valid, the * Batch service rejects the request with detailed error information. - * @member {moment.duration} + * @property {moment.duration} * [poolInfo.autoPoolSpecification.pool.autoScaleEvaluationInterval] The * default value is 15 minutes. The minimum and maximum value are 5 minutes * and 168 hours respectively. If you specify a value less than 5 minutes or * greater than 168 hours, the Batch service rejects the request with an * invalid property value error; if you are calling the REST API directly, * the HTTP status code is 400 (Bad Request). - * @member {boolean} + * @property {boolean} * [poolInfo.autoPoolSpecification.pool.enableInterNodeCommunication] * Enabling inter-node communication limits the maximum size of the pool due * to deployment restrictions on the nodes of the pool. This may result in * the pool not reaching its desired size. The default value is false. - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.networkConfiguration] - * @member {string} - * [poolInfo.autoPoolSpecification.pool.networkConfiguration.subnetId] The - * virtual network must be in the same region and subscription as the Azure - * Batch account. The specified subnet should have enough free IP addresses - * to accommodate the number of nodes in the pool. If the subnet doesn't have - * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must - * allow communication from the Azure Batch service to be able to schedule - * tasks on the compute nodes. This can be verified by checking if the - * specified VNet has any associated Network Security Groups (NSG). If - * communication to the compute nodes in the specified subnet is denied by an - * NSG, then the Batch service will set the state of the compute nodes to - * unusable. For pools created with virtualMachineConfiguration only ARM - * virtual networks ('Microsoft.Network/virtualNetworks') are supported, but - * for pools created with cloudServiceConfiguration both ARM and classic - * virtual networks are supported. If the specified VNet has any associated - * Network Security Groups (NSG), then a few reserved system ports must be - * enabled for inbound communication. For pools created with a virtual - * machine configuration, enable ports 29876 and 29877, as well as port 22 - * for Linux and port 3389 for Windows. For pools created with a cloud - * service configuration, enable ports 10100, 20100, and 30100. Also enable - * outbound connections to Azure Storage on port 443. For more details see: + * @property {string} + * [poolInfo.autoPoolSpecification.pool.networkConfiguration.subnetId] This + * is of the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. + * The virtual network must be in the same region and subscription as the + * Azure Batch account. The specified subnet should have enough free IP + * addresses to accommodate the number of nodes in the pool. If the subnet + * doesn't have enough free IP addresses, the pool will partially allocate + * compute nodes, and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks + * ('Microsoft.Network/virtualNetworks') are supported, but for pools created + * with cloudServiceConfiguration both ARM and classic virtual networks are + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration - * @member {object} + * @property {string} + * [poolInfo.autoPoolSpecification.pool.networkConfiguration.dynamicVNetAssignmentScope] + * Possible values include: 'none', 'job' + * @property {object} * [poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] * Pool endpoint configuration is only supported on pools with the * virtualMachineConfiguration property. - * @member {array} + * @property {array} * [poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration.inboundNATPools] * The maximum number of inbound NAT pools per Batch pool is 5. If the * maximum number of inbound NAT pools is exceeded the request fails with * HTTP status code 400. - * @member {object} [poolInfo.autoPoolSpecification.pool.startTask] - * @member {string} + * @property {object} [poolInfo.autoPoolSpecification.pool.startTask] + * @property {string} * [poolInfo.autoPoolSpecification.pool.startTask.commandLine] The command * line does not run under a shell, and therefore cannot take advantage of * shell features such as environment variable expansion. If you want to take @@ -298,56 +274,56 @@ class JobPatchParameter { * use a relative path (relative to the task working directory), or use the * Batch provided environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings] When * this is specified, all directories recursively below the * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) * are mapped into the container, all task environment variables are mapped * into the container, and the task command line is executed in the * container. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.containerRunOptions] * These additional options are supplied as arguments to the "docker create" * command, in addition to those controlled by the Batch Service. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.imageName] * This is the full image reference, as would be specified to "docker pull". * If no tag is provided as part of the image name, the tag ":latest" is used * as a default. - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry] * This setting can be omitted if was already provided at pool creation. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.registryServer] * If omitted, the default is "docker.io". - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.userName] - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.password] - * @member {array} + * @property {array} * [poolInfo.autoPoolSpecification.pool.startTask.resourceFiles] Files listed * under this element are located in the task's working directory. - * @member {array} + * @property {array} * [poolInfo.autoPoolSpecification.pool.startTask.environmentSettings] - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity] If omitted, * the task runs as a non-administrative user unique to the task. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity.userName] The * userName and autoUser properties are mutually exclusive; you must specify * one but not both. - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser] The * userName and autoUser properties are mutually exclusive; you must specify * one but not both. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser.scope] * The default value is task. Possible values include: 'task', 'pool' - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser.elevationLevel] * The default value is nonAdmin. Possible values include: 'nonAdmin', * 'admin' - * @member {number} + * @property {number} * [poolInfo.autoPoolSpecification.pool.startTask.maxTaskRetryCount] The * Batch service retries a task if its exit code is nonzero. Note that this * value specifically controls the number of retries. The Batch service will @@ -356,7 +332,7 @@ class JobPatchParameter { * initial try and 3 retries). If the maximum retry count is 0, the Batch * service does not retry the task. If the maximum retry count is -1, the * Batch service retries the task without limit. - * @member {boolean} + * @property {boolean} * [poolInfo.autoPoolSpecification.pool.startTask.waitForSuccess] If true and * the start task fails on a compute node, the Batch service retries the * start task up to its maximum retry count (maxTaskRetryCount). If the task @@ -368,7 +344,7 @@ class JobPatchParameter { * node while the start task is still running; and even if the start task * fails, new tasks will continue to be scheduled on the node. The default is * false. - * @member {array} + * @property {array} * [poolInfo.autoPoolSpecification.pool.certificateReferences] For Windows * compute nodes, the Batch service installs the certificates to the * specified certificate store and location. For Linux compute nodes, the @@ -378,20 +354,22 @@ class JobPatchParameter { * 'remoteUser', a 'certs' directory is created in the user's home directory * (e.g., /home/{user-name}/certs) and certificates are placed in that * directory. - * @member {array} + * @property {array} * [poolInfo.autoPoolSpecification.pool.applicationPackageReferences] - * @member {array} [poolInfo.autoPoolSpecification.pool.applicationLicenses] - * The list of application licenses must be a subset of available Batch - * service application licenses. If a license is requested which is not - * supported, pool creation will fail. The permitted licenses available on - * the pool are 'maya', 'vray', '3dsmax', 'arnold'. An additional charge - * applies for each application license added to the pool. - * @member {array} [poolInfo.autoPoolSpecification.pool.userAccounts] - * @member {array} [poolInfo.autoPoolSpecification.pool.metadata] The Batch + * @property {array} + * [poolInfo.autoPoolSpecification.pool.applicationLicenses] The list of + * application licenses must be a subset of available Batch service + * application licenses. If a license is requested which is not supported, + * pool creation will fail. The permitted licenses available on the pool are + * 'maya', 'vray', '3dsmax', 'arnold'. An additional charge applies for each + * application license added to the pool. + * @property {array} [poolInfo.autoPoolSpecification.pool.userAccounts] + * @property {array} [poolInfo.autoPoolSpecification.pool.metadata] The Batch * service does not assign any meaning to metadata; it is solely for the use * of user code. - * @member {array} [metadata] A list of name-value pairs associated with the - * job as metadata. If omitted, the existing job metadata is left unchanged. + * @property {array} [metadata] A list of name-value pairs associated with + * the job as metadata. If omitted, the existing job metadata is left + * unchanged. */ constructor() { } diff --git a/lib/services/batch/lib/models/jobPreparationAndReleaseTaskExecutionInformation.js b/lib/services/batch/lib/models/jobPreparationAndReleaseTaskExecutionInformation.js index ca71a791bd..00ff87b074 100644 --- a/lib/services/batch/lib/models/jobPreparationAndReleaseTaskExecutionInformation.js +++ b/lib/services/batch/lib/models/jobPreparationAndReleaseTaskExecutionInformation.js @@ -18,101 +18,101 @@ class JobPreparationAndReleaseTaskExecutionInformation { /** * Create a JobPreparationAndReleaseTaskExecutionInformation. - * @member {string} [poolId] The ID of the pool containing the compute node + * @property {string} [poolId] The ID of the pool containing the compute node * to which this entry refers. - * @member {string} [nodeId] The ID of the compute node to which this entry + * @property {string} [nodeId] The ID of the compute node to which this entry * refers. - * @member {string} [nodeUrl] The URL of the compute node to which this entry - * refers. - * @member {object} [jobPreparationTaskExecutionInfo] Information about the + * @property {string} [nodeUrl] The URL of the compute node to which this + * entry refers. + * @property {object} [jobPreparationTaskExecutionInfo] Information about the * execution status of the Job Preparation task on this compute node. - * @member {date} [jobPreparationTaskExecutionInfo.startTime] If the task has - * been restarted or retried, this is the most recent time at which the task - * started running. - * @member {date} [jobPreparationTaskExecutionInfo.endTime] This property is - * set only if the task is in the Completed state. - * @member {string} [jobPreparationTaskExecutionInfo.state] Possible values + * @property {date} [jobPreparationTaskExecutionInfo.startTime] If the task + * has been restarted or retried, this is the most recent time at which the + * task started running. + * @property {date} [jobPreparationTaskExecutionInfo.endTime] This property + * is set only if the task is in the Completed state. + * @property {string} [jobPreparationTaskExecutionInfo.state] Possible values * include: 'running', 'completed' - * @member {string} [jobPreparationTaskExecutionInfo.taskRootDirectory] - * @member {string} [jobPreparationTaskExecutionInfo.taskRootDirectoryUrl] - * @member {number} [jobPreparationTaskExecutionInfo.exitCode] This parameter - * is returned only if the task is in the completed state. The exit code for - * a process reflects the specific convention implemented by the application - * developer for that process. If you use the exit code value to make - * decisions in your code, be sure that you know the exit code convention - * used by the application process. Note that the exit code may also be - * generated by the compute node operating system, such as when a process is - * forcibly terminated. - * @member {object} [jobPreparationTaskExecutionInfo.containerInfo] This + * @property {string} [jobPreparationTaskExecutionInfo.taskRootDirectory] + * @property {string} [jobPreparationTaskExecutionInfo.taskRootDirectoryUrl] + * @property {number} [jobPreparationTaskExecutionInfo.exitCode] This + * parameter is returned only if the task is in the completed state. The exit + * code for a process reflects the specific convention implemented by the + * application developer for that process. If you use the exit code value to + * make decisions in your code, be sure that you know the exit code + * convention used by the application process. Note that the exit code may + * also be generated by the compute node operating system, such as when a + * process is forcibly terminated. + * @property {object} [jobPreparationTaskExecutionInfo.containerInfo] This * property is set only if the task runs in a container context. - * @member {string} + * @property {string} * [jobPreparationTaskExecutionInfo.containerInfo.containerId] - * @member {string} [jobPreparationTaskExecutionInfo.containerInfo.state] + * @property {string} [jobPreparationTaskExecutionInfo.containerInfo.state] * This is the state of the container according to the Docker service. It is * equivalent to the status field returned by "docker inspect". - * @member {string} [jobPreparationTaskExecutionInfo.containerInfo.error] + * @property {string} [jobPreparationTaskExecutionInfo.containerInfo.error] * This is the detailed error string from the Docker service, if available. * It is equivalent to the error field returned by "docker inspect". - * @member {object} [jobPreparationTaskExecutionInfo.failureInfo] This + * @property {object} [jobPreparationTaskExecutionInfo.failureInfo] This * property is set only if the task is in the completed state and encountered * a failure. - * @member {string} [jobPreparationTaskExecutionInfo.failureInfo.category] + * @property {string} [jobPreparationTaskExecutionInfo.failureInfo.category] * Possible values include: 'userError', 'serverError' - * @member {string} [jobPreparationTaskExecutionInfo.failureInfo.code] - * @member {string} [jobPreparationTaskExecutionInfo.failureInfo.message] - * @member {array} [jobPreparationTaskExecutionInfo.failureInfo.details] - * @member {number} [jobPreparationTaskExecutionInfo.retryCount] Task + * @property {string} [jobPreparationTaskExecutionInfo.failureInfo.code] + * @property {string} [jobPreparationTaskExecutionInfo.failureInfo.message] + * @property {array} [jobPreparationTaskExecutionInfo.failureInfo.details] + * @property {number} [jobPreparationTaskExecutionInfo.retryCount] Task * application failures (non-zero exit code) are retried, pre-processing * errors (the task could not be run) and file upload errors are not retried. * The Batch service will retry the task up to the limit specified by the * constraints. - * @member {date} [jobPreparationTaskExecutionInfo.lastRetryTime] This + * @property {date} [jobPreparationTaskExecutionInfo.lastRetryTime] This * property is set only if the task was retried (i.e. retryCount is nonzero). * If present, this is typically the same as startTime, but may be different * if the task has been restarted for reasons other than retry; for example, * if the compute node was rebooted during a retry, then the startTime is * updated but the lastRetryTime is not. - * @member {string} [jobPreparationTaskExecutionInfo.result] If the value is - * 'failed', then the details of the failure can be found in the failureInfo - * property. Possible values include: 'success', 'failure' - * @member {object} [jobReleaseTaskExecutionInfo] Information about the + * @property {string} [jobPreparationTaskExecutionInfo.result] If the value + * is 'failed', then the details of the failure can be found in the + * failureInfo property. Possible values include: 'success', 'failure' + * @property {object} [jobReleaseTaskExecutionInfo] Information about the * execution status of the Job Release task on this compute node. This * property is set only if the Job Release task has run on the node. - * @member {date} [jobReleaseTaskExecutionInfo.startTime] If the task has + * @property {date} [jobReleaseTaskExecutionInfo.startTime] If the task has * been restarted or retried, this is the most recent time at which the task * started running. - * @member {date} [jobReleaseTaskExecutionInfo.endTime] This property is set - * only if the task is in the Completed state. - * @member {string} [jobReleaseTaskExecutionInfo.state] Possible values + * @property {date} [jobReleaseTaskExecutionInfo.endTime] This property is + * set only if the task is in the Completed state. + * @property {string} [jobReleaseTaskExecutionInfo.state] Possible values * include: 'running', 'completed' - * @member {string} [jobReleaseTaskExecutionInfo.taskRootDirectory] - * @member {string} [jobReleaseTaskExecutionInfo.taskRootDirectoryUrl] - * @member {number} [jobReleaseTaskExecutionInfo.exitCode] This parameter is - * returned only if the task is in the completed state. The exit code for a - * process reflects the specific convention implemented by the application + * @property {string} [jobReleaseTaskExecutionInfo.taskRootDirectory] + * @property {string} [jobReleaseTaskExecutionInfo.taskRootDirectoryUrl] + * @property {number} [jobReleaseTaskExecutionInfo.exitCode] This parameter + * is returned only if the task is in the completed state. The exit code for + * a process reflects the specific convention implemented by the application * developer for that process. If you use the exit code value to make * decisions in your code, be sure that you know the exit code convention * used by the application process. Note that the exit code may also be * generated by the compute node operating system, such as when a process is * forcibly terminated. - * @member {object} [jobReleaseTaskExecutionInfo.containerInfo] This property - * is set only if the task runs in a container context. - * @member {string} [jobReleaseTaskExecutionInfo.containerInfo.containerId] - * @member {string} [jobReleaseTaskExecutionInfo.containerInfo.state] This is - * the state of the container according to the Docker service. It is + * @property {object} [jobReleaseTaskExecutionInfo.containerInfo] This + * property is set only if the task runs in a container context. + * @property {string} [jobReleaseTaskExecutionInfo.containerInfo.containerId] + * @property {string} [jobReleaseTaskExecutionInfo.containerInfo.state] This + * is the state of the container according to the Docker service. It is * equivalent to the status field returned by "docker inspect". - * @member {string} [jobReleaseTaskExecutionInfo.containerInfo.error] This is - * the detailed error string from the Docker service, if available. It is + * @property {string} [jobReleaseTaskExecutionInfo.containerInfo.error] This + * is the detailed error string from the Docker service, if available. It is * equivalent to the error field returned by "docker inspect". - * @member {object} [jobReleaseTaskExecutionInfo.failureInfo] This property + * @property {object} [jobReleaseTaskExecutionInfo.failureInfo] This property * is set only if the task is in the completed state and encountered a * failure. - * @member {string} [jobReleaseTaskExecutionInfo.failureInfo.category] + * @property {string} [jobReleaseTaskExecutionInfo.failureInfo.category] * Possible values include: 'userError', 'serverError' - * @member {string} [jobReleaseTaskExecutionInfo.failureInfo.code] - * @member {string} [jobReleaseTaskExecutionInfo.failureInfo.message] - * @member {array} [jobReleaseTaskExecutionInfo.failureInfo.details] - * @member {string} [jobReleaseTaskExecutionInfo.result] If the value is + * @property {string} [jobReleaseTaskExecutionInfo.failureInfo.code] + * @property {string} [jobReleaseTaskExecutionInfo.failureInfo.message] + * @property {array} [jobReleaseTaskExecutionInfo.failureInfo.details] + * @property {string} [jobReleaseTaskExecutionInfo.result] If the value is * 'failed', then the details of the failure can be found in the failureInfo * property. Possible values include: 'success', 'failure' */ diff --git a/lib/services/batch/lib/models/jobPreparationTask.js b/lib/services/batch/lib/models/jobPreparationTask.js index 12c9204d2e..2dfaf47288 100644 --- a/lib/services/batch/lib/models/jobPreparationTask.js +++ b/lib/services/batch/lib/models/jobPreparationTask.js @@ -46,7 +46,7 @@ class JobPreparationTask { /** * Create a JobPreparationTask. - * @member {string} [id] A string that uniquely identifies the Job + * @property {string} [id] A string that uniquely identifies the Job * Preparation task within the job. The ID can contain any combination of * alphanumeric characters including hyphens and underscores and cannot * contain more than 64 characters. If you do not specify this property, the @@ -55,34 +55,34 @@ class JobPreparationTask { * submit a task with the same id, the Batch service rejects the request with * error code TaskIdSameAsJobPreparationTask; if you are calling the REST API * directly, the HTTP status code is 409 (Conflict). - * @member {string} commandLine The command line of the Job Preparation task. - * The command line does not run under a shell, and therefore cannot take - * advantage of shell features such as environment variable expansion. If you - * want to take advantage of such features, you should invoke the shell in - * the command line, for example using "cmd /c MyCommand" in Windows or - * "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, - * it should use a relative path (relative to the task working directory), or - * use the Batch provided environment variable + * @property {string} commandLine The command line of the Job Preparation + * task. The command line does not run under a shell, and therefore cannot + * take advantage of shell features such as environment variable expansion. + * If you want to take advantage of such features, you should invoke the + * shell in the command line, for example using "cmd /c MyCommand" in Windows + * or "/bin/sh -c MyCommand" in Linux. If the command line refers to file + * paths, it should use a relative path (relative to the task working + * directory), or use the Batch provided environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [containerSettings] The settings for the container under - * which the Job Preparation task runs. When this is specified, all + * @property {object} [containerSettings] The settings for the container + * under which the Job Preparation task runs. When this is specified, all * directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of * Azure Batch directories on the node) are mapped into the container, all * task environment variables are mapped into the container, and the task * command line is executed in the container. - * @member {string} [containerSettings.containerRunOptions] These additional - * options are supplied as arguments to the "docker create" command, in - * addition to those controlled by the Batch Service. - * @member {string} [containerSettings.imageName] This is the full image + * @property {string} [containerSettings.containerRunOptions] These + * additional options are supplied as arguments to the "docker create" + * command, in addition to those controlled by the Batch Service. + * @property {string} [containerSettings.imageName] This is the full image * reference, as would be specified to "docker pull". If no tag is provided * as part of the image name, the tag ":latest" is used as a default. - * @member {object} [containerSettings.registry] This setting can be omitted - * if was already provided at pool creation. - * @member {string} [containerSettings.registry.registryServer] If omitted, + * @property {object} [containerSettings.registry] This setting can be + * omitted if was already provided at pool creation. + * @property {string} [containerSettings.registry.registryServer] If omitted, * the default is "docker.io". - * @member {string} [containerSettings.registry.userName] - * @member {string} [containerSettings.registry.password] - * @member {array} [resourceFiles] A list of files that the Batch service + * @property {string} [containerSettings.registry.userName] + * @property {string} [containerSettings.registry.password] + * @property {array} [resourceFiles] A list of files that the Batch service * will download to the compute node before running the command line. Files * listed under this element are located in the task's working directory. * There is a maximum size for the list of resource files. When the max size @@ -90,25 +90,24 @@ class JobPreparationTask { * RequestEntityTooLarge. If this occurs, the collection of ResourceFiles * must be reduced in size. This can be achieved using .zip files, * Application Packages, or Docker Containers. - * @member {array} [environmentSettings] A list of environment variable + * @property {array} [environmentSettings] A list of environment variable * settings for the Job Preparation task. - * @member {object} [constraints] Constraints that apply to the Job + * @property {object} [constraints] Constraints that apply to the Job * Preparation task. - * @member {moment.duration} [constraints.maxWallClockTime] If this is not + * @property {moment.duration} [constraints.maxWallClockTime] If this is not * specified, there is no time limit on how long the task may run. - * @member {moment.duration} [constraints.retentionTime] The default is - * infinite, i.e. the task directory will be retained until the compute node - * is removed or reimaged. - * @member {number} [constraints.maxTaskRetryCount] Note that this value + * @property {moment.duration} [constraints.retentionTime] The default is 7 + * days, i.e. the task directory will be retained for 7 days unless the + * compute node is removed or the job is deleted. + * @property {number} [constraints.maxTaskRetryCount] Note that this value * specifically controls the number of retries for the task executable due to * a nonzero exit code. The Batch service will try the task once, and may * then retry up to this limit. For example, if the maximum retry count is 3, * Batch tries the task up to 4 times (one initial try and 3 retries). If the * maximum retry count is 0, the Batch service does not retry the task after * the first attempt. If the maximum retry count is -1, the Batch service - * retries the task without limit. Resource files and application packages - * are only downloaded again if the task is retried on a new compute node. - * @member {boolean} [waitForSuccess] Whether the Batch service should wait + * retries the task without limit. + * @property {boolean} [waitForSuccess] Whether the Batch service should wait * for the Job Preparation task to complete successfully before scheduling * any other tasks of the job on the compute node. A Job Preparation task has * completed successfully if it exits with exit code 0. If true and the Job @@ -122,19 +121,19 @@ class JobPreparationTask { * start executing on the compute node while the Job Preparation task is * still running; and even if the Job Preparation task fails, new tasks will * continue to be scheduled on the node. The default value is true. - * @member {object} [userIdentity] The user identity under which the Job + * @property {object} [userIdentity] The user identity under which the Job * Preparation task runs. If omitted, the task runs as a non-administrative - * user unique to the task on Windows nodes, or a a non-administrative user + * user unique to the task on Windows nodes, or a non-administrative user * unique to the pool on Linux nodes. - * @member {string} [userIdentity.userName] The userName and autoUser + * @property {string} [userIdentity.userName] The userName and autoUser * properties are mutually exclusive; you must specify one but not both. - * @member {object} [userIdentity.autoUser] The userName and autoUser + * @property {object} [userIdentity.autoUser] The userName and autoUser * properties are mutually exclusive; you must specify one but not both. - * @member {string} [userIdentity.autoUser.scope] The default value is task. - * Possible values include: 'task', 'pool' - * @member {string} [userIdentity.autoUser.elevationLevel] The default value - * is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {boolean} [rerunOnNodeRebootAfterSuccess] Whether the Batch + * @property {string} [userIdentity.autoUser.scope] The default value is + * task. Possible values include: 'task', 'pool' + * @property {string} [userIdentity.autoUser.elevationLevel] The default + * value is nonAdmin. Possible values include: 'nonAdmin', 'admin' + * @property {boolean} [rerunOnNodeRebootAfterSuccess] Whether the Batch * service should rerun the Job Preparation task after a compute node * reboots. The Job Preparation task is always rerun if a compute node is * reimaged, or if the Job Preparation task did not complete (e.g. because diff --git a/lib/services/batch/lib/models/jobPreparationTaskExecutionInformation.js b/lib/services/batch/lib/models/jobPreparationTaskExecutionInformation.js index 518d7feca7..1867ea0004 100644 --- a/lib/services/batch/lib/models/jobPreparationTaskExecutionInformation.js +++ b/lib/services/batch/lib/models/jobPreparationTaskExecutionInformation.js @@ -18,61 +18,61 @@ class JobPreparationTaskExecutionInformation { /** * Create a JobPreparationTaskExecutionInformation. - * @member {date} startTime The time at which the task started running. If + * @property {date} startTime The time at which the task started running. If * the task has been restarted or retried, this is the most recent time at * which the task started running. - * @member {date} [endTime] The time at which the Job Preparation task + * @property {date} [endTime] The time at which the Job Preparation task * completed. This property is set only if the task is in the Completed * state. - * @member {string} state The current state of the Job Preparation task on + * @property {string} state The current state of the Job Preparation task on * the compute node. Possible values include: 'running', 'completed' - * @member {string} [taskRootDirectory] The root directory of the Job + * @property {string} [taskRootDirectory] The root directory of the Job * Preparation task on the compute node. You can use this path to retrieve * files created by the task, such as log files. - * @member {string} [taskRootDirectoryUrl] The URL to the root directory of + * @property {string} [taskRootDirectoryUrl] The URL to the root directory of * the Job Preparation task on the compute node. - * @member {number} [exitCode] The exit code of the program specified on the - * task command line. This parameter is returned only if the task is in the - * completed state. The exit code for a process reflects the specific + * @property {number} [exitCode] The exit code of the program specified on + * the task command line. This parameter is returned only if the task is in + * the completed state. The exit code for a process reflects the specific * convention implemented by the application developer for that process. If * you use the exit code value to make decisions in your code, be sure that * you know the exit code convention used by the application process. Note * that the exit code may also be generated by the compute node operating * system, such as when a process is forcibly terminated. - * @member {object} [containerInfo] Information about the container under + * @property {object} [containerInfo] Information about the container under * which the task is executing. This property is set only if the task runs in * a container context. - * @member {string} [containerInfo.containerId] - * @member {string} [containerInfo.state] This is the state of the container - * according to the Docker service. It is equivalent to the status field - * returned by "docker inspect". - * @member {string} [containerInfo.error] This is the detailed error string + * @property {string} [containerInfo.containerId] + * @property {string} [containerInfo.state] This is the state of the + * container according to the Docker service. It is equivalent to the status + * field returned by "docker inspect". + * @property {string} [containerInfo.error] This is the detailed error string * from the Docker service, if available. It is equivalent to the error field * returned by "docker inspect". - * @member {object} [failureInfo] Information describing the task failure, if - * any. This property is set only if the task is in the completed state and - * encountered a failure. - * @member {string} [failureInfo.category] Possible values include: + * @property {object} [failureInfo] Information describing the task failure, + * if any. This property is set only if the task is in the completed state + * and encountered a failure. + * @property {string} [failureInfo.category] Possible values include: * 'userError', 'serverError' - * @member {string} [failureInfo.code] - * @member {string} [failureInfo.message] - * @member {array} [failureInfo.details] - * @member {number} retryCount The number of times the task has been retried - * by the Batch service. Task application failures (non-zero exit code) are - * retried, pre-processing errors (the task could not be run) and file upload - * errors are not retried. The Batch service will retry the task up to the - * limit specified by the constraints. Task application failures (non-zero - * exit code) are retried, pre-processing errors (the task could not be run) - * and file upload errors are not retried. The Batch service will retry the - * task up to the limit specified by the constraints. - * @member {date} [lastRetryTime] The most recent time at which a retry of + * @property {string} [failureInfo.code] + * @property {string} [failureInfo.message] + * @property {array} [failureInfo.details] + * @property {number} retryCount The number of times the task has been + * retried by the Batch service. Task application failures (non-zero exit + * code) are retried, pre-processing errors (the task could not be run) and + * file upload errors are not retried. The Batch service will retry the task + * up to the limit specified by the constraints. Task application failures + * (non-zero exit code) are retried, pre-processing errors (the task could + * not be run) and file upload errors are not retried. The Batch service will + * retry the task up to the limit specified by the constraints. + * @property {date} [lastRetryTime] The most recent time at which a retry of * the Job Preparation task started running. This property is set only if the * task was retried (i.e. retryCount is nonzero). If present, this is * typically the same as startTime, but may be different if the task has been * restarted for reasons other than retry; for example, if the compute node * was rebooted during a retry, then the startTime is updated but the * lastRetryTime is not. - * @member {string} [result] The result of the task execution. If the value + * @property {string} [result] The result of the task execution. If the value * is 'failed', then the details of the failure can be found in the * failureInfo property. Possible values include: 'success', 'failure' */ diff --git a/lib/services/batch/lib/models/jobReleaseTask.js b/lib/services/batch/lib/models/jobReleaseTask.js index 93cb7084d1..84898e6f15 100644 --- a/lib/services/batch/lib/models/jobReleaseTask.js +++ b/lib/services/batch/lib/models/jobReleaseTask.js @@ -35,7 +35,7 @@ class JobReleaseTask { /** * Create a JobReleaseTask. - * @member {string} [id] A string that uniquely identifies the Job Release + * @property {string} [id] A string that uniquely identifies the Job Release * task within the job. The ID can contain any combination of alphanumeric * characters including hyphens and underscores and cannot contain more than * 64 characters. If you do not specify this property, the Batch service @@ -44,8 +44,8 @@ class JobReleaseTask { * same id, the Batch service rejects the request with error code * TaskIdSameAsJobReleaseTask; if you are calling the REST API directly, the * HTTP status code is 409 (Conflict). - * @member {string} commandLine The command line of the Job Release task. The - * command line does not run under a shell, and therefore cannot take + * @property {string} commandLine The command line of the Job Release task. + * The command line does not run under a shell, and therefore cannot take * advantage of shell features such as environment variable expansion. If you * want to take advantage of such features, you should invoke the shell in * the command line, for example using "cmd /c MyCommand" in Windows or @@ -53,25 +53,25 @@ class JobReleaseTask { * it should use a relative path (relative to the task working directory), or * use the Batch provided environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [containerSettings] The settings for the container under - * which the Job Release task runs. When this is specified, all directories - * recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch - * directories on the node) are mapped into the container, all task - * environment variables are mapped into the container, and the task command - * line is executed in the container. - * @member {string} [containerSettings.containerRunOptions] These additional - * options are supplied as arguments to the "docker create" command, in - * addition to those controlled by the Batch Service. - * @member {string} [containerSettings.imageName] This is the full image + * @property {object} [containerSettings] The settings for the container + * under which the Job Release task runs. When this is specified, all + * directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of + * Azure Batch directories on the node) are mapped into the container, all + * task environment variables are mapped into the container, and the task + * command line is executed in the container. + * @property {string} [containerSettings.containerRunOptions] These + * additional options are supplied as arguments to the "docker create" + * command, in addition to those controlled by the Batch Service. + * @property {string} [containerSettings.imageName] This is the full image * reference, as would be specified to "docker pull". If no tag is provided * as part of the image name, the tag ":latest" is used as a default. - * @member {object} [containerSettings.registry] This setting can be omitted - * if was already provided at pool creation. - * @member {string} [containerSettings.registry.registryServer] If omitted, + * @property {object} [containerSettings.registry] This setting can be + * omitted if was already provided at pool creation. + * @property {string} [containerSettings.registry.registryServer] If omitted, * the default is "docker.io". - * @member {string} [containerSettings.registry.userName] - * @member {string} [containerSettings.registry.password] - * @member {array} [resourceFiles] A list of files that the Batch service + * @property {string} [containerSettings.registry.userName] + * @property {string} [containerSettings.registry.password] + * @property {array} [resourceFiles] A list of files that the Batch service * will download to the compute node before running the command line. There * is a maximum size for the list of resource files. When the max size is * exceeded, the request will fail and the response error code will be @@ -79,31 +79,31 @@ class JobReleaseTask { * must be reduced in size. This can be achieved using .zip files, * Application Packages, or Docker Containers. Files listed under this * element are located in the task's working directory. - * @member {array} [environmentSettings] A list of environment variable + * @property {array} [environmentSettings] A list of environment variable * settings for the Job Release task. - * @member {moment.duration} [maxWallClockTime] The maximum elapsed time that - * the Job Release task may run on a given compute node, measured from the - * time the task starts. If the task does not complete within the time limit, - * the Batch service terminates it. The default value is 15 minutes. You may - * not specify a timeout longer than 15 minutes. If you do, the Batch service - * rejects it with an error; if you are calling the REST API directly, the - * HTTP status code is 400 (Bad Request). - * @member {moment.duration} [retentionTime] The minimum time to retain the + * @property {moment.duration} [maxWallClockTime] The maximum elapsed time + * that the Job Release task may run on a given compute node, measured from + * the time the task starts. If the task does not complete within the time + * limit, the Batch service terminates it. The default value is 15 minutes. + * You may not specify a timeout longer than 15 minutes. If you do, the Batch + * service rejects it with an error; if you are calling the REST API + * directly, the HTTP status code is 400 (Bad Request). + * @property {moment.duration} [retentionTime] The minimum time to retain the * task directory for the Job Release task on the compute node. After this * time, the Batch service may delete the task directory and all its - * contents. The default is infinite, i.e. the task directory will be - * retained until the compute node is removed or reimaged. - * @member {object} [userIdentity] The user identity under which the Job + * contents. The default is 7 days, i.e. the task directory will be retained + * for 7 days unless the compute node is removed or the job is deleted. + * @property {object} [userIdentity] The user identity under which the Job * Release task runs. If omitted, the task runs as a non-administrative user * unique to the task. - * @member {string} [userIdentity.userName] The userName and autoUser + * @property {string} [userIdentity.userName] The userName and autoUser * properties are mutually exclusive; you must specify one but not both. - * @member {object} [userIdentity.autoUser] The userName and autoUser + * @property {object} [userIdentity.autoUser] The userName and autoUser * properties are mutually exclusive; you must specify one but not both. - * @member {string} [userIdentity.autoUser.scope] The default value is task. - * Possible values include: 'task', 'pool' - * @member {string} [userIdentity.autoUser.elevationLevel] The default value - * is nonAdmin. Possible values include: 'nonAdmin', 'admin' + * @property {string} [userIdentity.autoUser.scope] The default value is + * task. Possible values include: 'task', 'pool' + * @property {string} [userIdentity.autoUser.elevationLevel] The default + * value is nonAdmin. Possible values include: 'nonAdmin', 'admin' */ constructor() { } diff --git a/lib/services/batch/lib/models/jobReleaseTaskExecutionInformation.js b/lib/services/batch/lib/models/jobReleaseTaskExecutionInformation.js index eba3dbc166..c8fd27fac6 100644 --- a/lib/services/batch/lib/models/jobReleaseTaskExecutionInformation.js +++ b/lib/services/batch/lib/models/jobReleaseTaskExecutionInformation.js @@ -18,45 +18,46 @@ class JobReleaseTaskExecutionInformation { /** * Create a JobReleaseTaskExecutionInformation. - * @member {date} startTime The time at which the task started running. If + * @property {date} startTime The time at which the task started running. If * the task has been restarted or retried, this is the most recent time at * which the task started running. - * @member {date} [endTime] The time at which the Job Release task completed. - * This property is set only if the task is in the Completed state. - * @member {string} state The current state of the Job Release task on the + * @property {date} [endTime] The time at which the Job Release task + * completed. This property is set only if the task is in the Completed + * state. + * @property {string} state The current state of the Job Release task on the * compute node. Possible values include: 'running', 'completed' - * @member {string} [taskRootDirectory] The root directory of the Job Release - * task on the compute node. You can use this path to retrieve files created - * by the task, such as log files. - * @member {string} [taskRootDirectoryUrl] The URL to the root directory of + * @property {string} [taskRootDirectory] The root directory of the Job + * Release task on the compute node. You can use this path to retrieve files + * created by the task, such as log files. + * @property {string} [taskRootDirectoryUrl] The URL to the root directory of * the Job Release task on the compute node. - * @member {number} [exitCode] The exit code of the program specified on the - * task command line. This parameter is returned only if the task is in the - * completed state. The exit code for a process reflects the specific + * @property {number} [exitCode] The exit code of the program specified on + * the task command line. This parameter is returned only if the task is in + * the completed state. The exit code for a process reflects the specific * convention implemented by the application developer for that process. If * you use the exit code value to make decisions in your code, be sure that * you know the exit code convention used by the application process. Note * that the exit code may also be generated by the compute node operating * system, such as when a process is forcibly terminated. - * @member {object} [containerInfo] Information about the container under + * @property {object} [containerInfo] Information about the container under * which the task is executing. This property is set only if the task runs in * a container context. - * @member {string} [containerInfo.containerId] - * @member {string} [containerInfo.state] This is the state of the container - * according to the Docker service. It is equivalent to the status field - * returned by "docker inspect". - * @member {string} [containerInfo.error] This is the detailed error string + * @property {string} [containerInfo.containerId] + * @property {string} [containerInfo.state] This is the state of the + * container according to the Docker service. It is equivalent to the status + * field returned by "docker inspect". + * @property {string} [containerInfo.error] This is the detailed error string * from the Docker service, if available. It is equivalent to the error field * returned by "docker inspect". - * @member {object} [failureInfo] Information describing the task failure, if - * any. This property is set only if the task is in the completed state and - * encountered a failure. - * @member {string} [failureInfo.category] Possible values include: + * @property {object} [failureInfo] Information describing the task failure, + * if any. This property is set only if the task is in the completed state + * and encountered a failure. + * @property {string} [failureInfo.category] Possible values include: * 'userError', 'serverError' - * @member {string} [failureInfo.code] - * @member {string} [failureInfo.message] - * @member {array} [failureInfo.details] - * @member {string} [result] The result of the task execution. If the value + * @property {string} [failureInfo.code] + * @property {string} [failureInfo.message] + * @property {array} [failureInfo.details] + * @property {string} [result] The result of the task execution. If the value * is 'failed', then the details of the failure can be found in the * failureInfo property. Possible values include: 'success', 'failure' */ diff --git a/lib/services/batch/lib/models/jobScheduleAddOptions.js b/lib/services/batch/lib/models/jobScheduleAddOptions.js index 3d0d1c6cf7..0ecbabc29f 100644 --- a/lib/services/batch/lib/models/jobScheduleAddOptions.js +++ b/lib/services/batch/lib/models/jobScheduleAddOptions.js @@ -17,17 +17,17 @@ class JobScheduleAddOptions { /** * Create a JobScheduleAddOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/jobScheduleAddParameter.js b/lib/services/batch/lib/models/jobScheduleAddParameter.js index 3a88dab3d9..4fbace4eea 100644 --- a/lib/services/batch/lib/models/jobScheduleAddParameter.js +++ b/lib/services/batch/lib/models/jobScheduleAddParameter.js @@ -18,22 +18,22 @@ class JobScheduleAddParameter { /** * Create a JobScheduleAddParameter. - * @member {string} id A string that uniquely identifies the schedule within - * the account. The ID can contain any combination of alphanumeric characters - * including hyphens and underscores, and cannot contain more than 64 - * characters. The ID is case-preserving and case-insensitive (that is, you - * may not have two IDs within an account that differ only by case). - * @member {string} [displayName] The display name for the schedule. The + * @property {string} id A string that uniquely identifies the schedule + * within the account. The ID can contain any combination of alphanumeric + * characters including hyphens and underscores, and cannot contain more than + * 64 characters. The ID is case-preserving and case-insensitive (that is, + * you may not have two IDs within an account that differ only by case). + * @property {string} [displayName] The display name for the schedule. The * display name need not be unique and can contain any Unicode characters up * to a maximum length of 1024. - * @member {object} schedule The schedule according to which jobs will be + * @property {object} schedule The schedule according to which jobs will be * created. - * @member {date} [schedule.doNotRunUntil] If you do not specify a + * @property {date} [schedule.doNotRunUntil] If you do not specify a * doNotRunUntil time, the schedule becomes ready to create jobs immediately. - * @member {date} [schedule.doNotRunAfter] If you do not specify a + * @property {date} [schedule.doNotRunAfter] If you do not specify a * doNotRunAfter time, and you are creating a recurring job schedule, the job * schedule will remain active until you explicitly terminate it. - * @member {moment.duration} [schedule.startWindow] If a job is not created + * @property {moment.duration} [schedule.startWindow] If a job is not created * within the startWindow interval, then the 'opportunity' is lost; no job * will be created until the next recurrence of the schedule. If the schedule * is recurring, and the startWindow is longer than the recurrence interval, @@ -43,7 +43,7 @@ class JobScheduleAddParameter { * minute. If you specify a lower value, the Batch service rejects the * schedule with an error; if you are calling the REST API directly, the HTTP * status code is 400 (Bad Request). - * @member {moment.duration} [schedule.recurrenceInterval] Because a job + * @property {moment.duration} [schedule.recurrenceInterval] Because a job * schedule can have at most one active job under it at any given time, if it * is time to create a new job under a job schedule, but the previous job is * still running, the Batch service will not create the new job until the @@ -59,34 +59,46 @@ class JobScheduleAddParameter { * minute. If you specify a lower value, the Batch service rejects the * schedule with an error; if you are calling the REST API directly, the HTTP * status code is 400 (Bad Request). - * @member {object} jobSpecification The details of the jobs to be created on - * this schedule. - * @member {number} [jobSpecification.priority] Priority values can range + * @property {object} jobSpecification The details of the jobs to be created + * on this schedule. + * @property {number} [jobSpecification.priority] Priority values can range * from -1000 to 1000, with -1000 being the lowest priority and 1000 being * the highest priority. The default value is 0. This priority is used as the * default for all jobs under the job schedule. You can update a job's * priority after it has been created using by using the update job API. - * @member {string} [jobSpecification.displayName] The name need not be + * @property {string} [jobSpecification.displayName] The name need not be * unique and can contain any Unicode characters up to a maximum length of * 1024. - * @member {boolean} [jobSpecification.usesTaskDependencies] - * @member {string} [jobSpecification.onAllTasksComplete] Note that if a job - * contains no tasks, then all tasks are considered complete. This option is - * therefore most commonly used with a Job Manager task; if you want to use - * automatic job termination without a Job Manager, you should initially set - * onAllTasksComplete to noaction and update the job properties to set + * @property {boolean} [jobSpecification.usesTaskDependencies] + * @property {string} [jobSpecification.onAllTasksComplete] Note that if a + * job contains no tasks, then all tasks are considered complete. This option + * is therefore most commonly used with a Job Manager task; if you want to + * use automatic job termination without a Job Manager, you should initially + * set onAllTasksComplete to noaction and update the job properties to set * onAllTasksComplete to terminatejob once you have finished adding tasks. * The default is noaction. Possible values include: 'noAction', * 'terminateJob' - * @member {string} [jobSpecification.onTaskFailure] The default is noaction. - * Possible values include: 'noAction', 'performExitOptionsJobAction' - * @member {object} [jobSpecification.constraints] - * @member {moment.duration} [jobSpecification.constraints.maxWallClockTime] - * If the job does not complete within the time limit, the Batch service - * terminates it and any tasks that are still running. In this case, the - * termination reason will be MaxWallClockTimeExpiry. If this property is not - * specified, there is no time limit on how long the job may run. - * @member {number} [jobSpecification.constraints.maxTaskRetryCount] Note + * @property {string} [jobSpecification.onTaskFailure] The default is + * noaction. Possible values include: 'noAction', + * 'performExitOptionsJobAction' + * @property {object} [jobSpecification.networkConfiguration] + * @property {string} [jobSpecification.networkConfiguration.subnetId] This + * is only supported for jobs running on VirtualMachineConfiguration pools. + * This is of the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. + * The virtual network must be in the same region and subscription as the + * Azure Batch account. The specified subnet should have enough free IP + * addresses to accommodate the number of nodes which will run tasks from the + * job. For more details, see + * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + * @property {object} [jobSpecification.constraints] + * @property {moment.duration} + * [jobSpecification.constraints.maxWallClockTime] If the job does not + * complete within the time limit, the Batch service terminates it and any + * tasks that are still running. In this case, the termination reason will be + * MaxWallClockTimeExpiry. If this property is not specified, there is no + * time limit on how long the job may run. + * @property {number} [jobSpecification.constraints.maxTaskRetryCount] Note * that this value specifically controls the number of retries. The Batch * service will try each task once, and may then retry up to this limit. For * example, if the maximum retry count is 3, Batch tries a task up to 4 times @@ -94,27 +106,27 @@ class JobScheduleAddParameter { * Batch service does not retry tasks. If the maximum retry count is -1, the * Batch service retries tasks without limit. The default value is 0 (no * retries). - * @member {object} [jobSpecification.jobManagerTask] If the job does not + * @property {object} [jobSpecification.jobManagerTask] If the job does not * specify a Job Manager task, the user must explicitly add tasks to the job * using the Task API. If the job does specify a Job Manager task, the Batch * service creates the Job Manager task when the job is created, and will try * to schedule the Job Manager task before scheduling other tasks in the job. - * @member {string} [jobSpecification.jobManagerTask.id] The ID can contain + * @property {string} [jobSpecification.jobManagerTask.id] The ID can contain * any combination of alphanumeric characters including hyphens and * underscores and cannot contain more than 64 characters. - * @member {string} [jobSpecification.jobManagerTask.displayName] It need not - * be unique and can contain any Unicode characters up to a maximum length of - * 1024. - * @member {string} [jobSpecification.jobManagerTask.commandLine] The command - * line does not run under a shell, and therefore cannot take advantage of - * shell features such as environment variable expansion. If you want to take - * advantage of such features, you should invoke the shell in the command - * line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c - * MyCommand" in Linux. If the command line refers to file paths, it should - * use a relative path (relative to the task working directory), or use the - * Batch provided environment variable + * @property {string} [jobSpecification.jobManagerTask.displayName] It need + * not be unique and can contain any Unicode characters up to a maximum + * length of 1024. + * @property {string} [jobSpecification.jobManagerTask.commandLine] The + * command line does not run under a shell, and therefore cannot take + * advantage of shell features such as environment variable expansion. If you + * want to take advantage of such features, you should invoke the shell in + * the command line, for example using "cmd /c MyCommand" in Windows or + * "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, + * it should use a relative path (relative to the task working directory), or + * use the Batch provided environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [jobSpecification.jobManagerTask.containerSettings] If + * @property {object} [jobSpecification.jobManagerTask.containerSettings] If * the pool that will run this task has containerConfiguration set, this must * be set as well. If the pool that will run this task doesn't have * containerConfiguration set, this must not be set. When this is specified, @@ -122,45 +134,45 @@ class JobScheduleAddParameter { * Azure Batch directories on the node) are mapped into the container, all * task environment variables are mapped into the container, and the task * command line is executed in the container. - * @member {string} + * @property {string} * [jobSpecification.jobManagerTask.containerSettings.containerRunOptions] * These additional options are supplied as arguments to the "docker create" * command, in addition to those controlled by the Batch Service. - * @member {string} + * @property {string} * [jobSpecification.jobManagerTask.containerSettings.imageName] This is the * full image reference, as would be specified to "docker pull". If no tag is * provided as part of the image name, the tag ":latest" is used as a * default. - * @member {object} + * @property {object} * [jobSpecification.jobManagerTask.containerSettings.registry] This setting * can be omitted if was already provided at pool creation. - * @member {string} + * @property {string} * [jobSpecification.jobManagerTask.containerSettings.registry.registryServer] * If omitted, the default is "docker.io". - * @member {string} + * @property {string} * [jobSpecification.jobManagerTask.containerSettings.registry.userName] - * @member {string} + * @property {string} * [jobSpecification.jobManagerTask.containerSettings.registry.password] - * @member {array} [jobSpecification.jobManagerTask.resourceFiles] Files + * @property {array} [jobSpecification.jobManagerTask.resourceFiles] Files * listed under this element are located in the task's working directory. * There is a maximum size for the list of resource files. When the max size * is exceeded, the request will fail and the response error code will be * RequestEntityTooLarge. If this occurs, the collection of ResourceFiles * must be reduced in size. This can be achieved using .zip files, * Application Packages, or Docker Containers. - * @member {array} [jobSpecification.jobManagerTask.outputFiles] For + * @property {array} [jobSpecification.jobManagerTask.outputFiles] For * multi-instance tasks, the files will only be uploaded from the compute * node on which the primary task is executed. - * @member {array} [jobSpecification.jobManagerTask.environmentSettings] - * @member {object} [jobSpecification.jobManagerTask.constraints] - * @member {moment.duration} + * @property {array} [jobSpecification.jobManagerTask.environmentSettings] + * @property {object} [jobSpecification.jobManagerTask.constraints] + * @property {moment.duration} * [jobSpecification.jobManagerTask.constraints.maxWallClockTime] If this is * not specified, there is no time limit on how long the task may run. - * @member {moment.duration} + * @property {moment.duration} * [jobSpecification.jobManagerTask.constraints.retentionTime] The default is - * infinite, i.e. the task directory will be retained until the compute node - * is removed or reimaged. - * @member {number} + * 7 days, i.e. the task directory will be retained for 7 days unless the + * compute node is removed or the job is deleted. + * @property {number} * [jobSpecification.jobManagerTask.constraints.maxTaskRetryCount] Note that * this value specifically controls the number of retries for the task * executable due to a nonzero exit code. The Batch service will try the task @@ -168,14 +180,12 @@ class JobScheduleAddParameter { * retry count is 3, Batch tries the task up to 4 times (one initial try and * 3 retries). If the maximum retry count is 0, the Batch service does not * retry the task after the first attempt. If the maximum retry count is -1, - * the Batch service retries the task without limit. Resource files and - * application packages are only downloaded again if the task is retried on a - * new compute node. - * @member {boolean} [jobSpecification.jobManagerTask.killJobOnCompletion] If - * true, when the Job Manager task completes, the Batch service marks the job - * as complete. If any tasks are still running at this time (other than Job - * Release), those tasks are terminated. If false, the completion of the Job - * Manager task does not affect the job status. In this case, you should + * the Batch service retries the task without limit. + * @property {boolean} [jobSpecification.jobManagerTask.killJobOnCompletion] + * If true, when the Job Manager task completes, the Batch service marks the + * job as complete. If any tasks are still running at this time (other than + * Job Release), those tasks are terminated. If false, the completion of the + * Job Manager task does not affect the job status. In this case, you should * either use the onAllTasksComplete attribute to terminate the job, or have * a client or user terminate the job explicitly. An example of this is if * the Job Manager creates a set of tasks but then takes no further role in @@ -184,27 +194,27 @@ class JobScheduleAddParameter { * and using the Job Manager task only to create the tasks for the job (not * to monitor progress), then it is important to set killJobOnCompletion to * false. - * @member {object} [jobSpecification.jobManagerTask.userIdentity] If + * @property {object} [jobSpecification.jobManagerTask.userIdentity] If * omitted, the task runs as a non-administrative user unique to the task. - * @member {string} [jobSpecification.jobManagerTask.userIdentity.userName] + * @property {string} [jobSpecification.jobManagerTask.userIdentity.userName] * The userName and autoUser properties are mutually exclusive; you must * specify one but not both. - * @member {object} [jobSpecification.jobManagerTask.userIdentity.autoUser] + * @property {object} [jobSpecification.jobManagerTask.userIdentity.autoUser] * The userName and autoUser properties are mutually exclusive; you must * specify one but not both. - * @member {string} + * @property {string} * [jobSpecification.jobManagerTask.userIdentity.autoUser.scope] The default * value is task. Possible values include: 'task', 'pool' - * @member {string} + * @property {string} * [jobSpecification.jobManagerTask.userIdentity.autoUser.elevationLevel] The * default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {boolean} [jobSpecification.jobManagerTask.runExclusive] If true, - * no other tasks will run on the same compute node for as long as the Job - * Manager is running. If false, other tasks can run simultaneously with the - * Job Manager on a compute node. The Job Manager task counts normally + * @property {boolean} [jobSpecification.jobManagerTask.runExclusive] If + * true, no other tasks will run on the same compute node for as long as the + * Job Manager is running. If false, other tasks can run simultaneously with + * the Job Manager on a compute node. The Job Manager task counts normally * against the node's concurrent task limit, so this is only relevant if the * node allows multiple concurrent tasks. The default value is true. - * @member {array} + * @property {array} * [jobSpecification.jobManagerTask.applicationPackageReferences] Application * packages are downloaded and deployed to a shared directory, not the task * working directory. Therefore, if a referenced package is already on the @@ -212,7 +222,7 @@ class JobScheduleAddParameter { * existing copy on the compute node is used. If a referenced application * package cannot be installed, for example because the package has been * deleted or because download failed, the task fails. - * @member {object} + * @property {object} * [jobSpecification.jobManagerTask.authenticationTokenSettings] If this * property is set, the Batch service provides the task with an * authentication token which can be used to authenticate Batch service @@ -221,18 +231,19 @@ class JobScheduleAddParameter { * that the task can carry out using the token depend on the settings. For * example, a task can request job permissions in order to add other tasks to * the job, or check the status of the job or of other tasks under the job. - * @member {array} + * @property {array} * [jobSpecification.jobManagerTask.authenticationTokenSettings.access] The * authentication token grants access to a limited set of Batch service * operations. Currently the only supported value for the access property is * 'job', which grants access to all operations related to the job which * contains the task. - * @member {boolean} [jobSpecification.jobManagerTask.allowLowPriorityNode] + * @property {boolean} [jobSpecification.jobManagerTask.allowLowPriorityNode] * The default value is true. - * @member {object} [jobSpecification.jobPreparationTask] If a job has a Job - * Preparation task, the Batch service will run the Job Preparation task on a - * compute node before starting any tasks of that job on that compute node. - * @member {string} [jobSpecification.jobPreparationTask.id] The ID can + * @property {object} [jobSpecification.jobPreparationTask] If a job has a + * Job Preparation task, the Batch service will run the Job Preparation task + * on a compute node before starting any tasks of that job on that compute + * node. + * @property {string} [jobSpecification.jobPreparationTask.id] The ID can * contain any combination of alphanumeric characters including hyphens and * underscores and cannot contain more than 64 characters. If you do not * specify this property, the Batch service assigns a default value of @@ -241,7 +252,7 @@ class JobScheduleAddParameter { * service rejects the request with error code * TaskIdSameAsJobPreparationTask; if you are calling the REST API directly, * the HTTP status code is 409 (Conflict). - * @member {string} [jobSpecification.jobPreparationTask.commandLine] The + * @property {string} [jobSpecification.jobPreparationTask.commandLine] The * command line does not run under a shell, and therefore cannot take * advantage of shell features such as environment variable expansion. If you * want to take advantage of such features, you should invoke the shell in @@ -250,48 +261,49 @@ class JobScheduleAddParameter { * it should use a relative path (relative to the task working directory), or * use the Batch provided environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [jobSpecification.jobPreparationTask.containerSettings] + * @property {object} [jobSpecification.jobPreparationTask.containerSettings] * When this is specified, all directories recursively below the * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) * are mapped into the container, all task environment variables are mapped * into the container, and the task command line is executed in the * container. - * @member {string} + * @property {string} * [jobSpecification.jobPreparationTask.containerSettings.containerRunOptions] * These additional options are supplied as arguments to the "docker create" * command, in addition to those controlled by the Batch Service. - * @member {string} + * @property {string} * [jobSpecification.jobPreparationTask.containerSettings.imageName] This is * the full image reference, as would be specified to "docker pull". If no * tag is provided as part of the image name, the tag ":latest" is used as a * default. - * @member {object} + * @property {object} * [jobSpecification.jobPreparationTask.containerSettings.registry] This * setting can be omitted if was already provided at pool creation. - * @member {string} + * @property {string} * [jobSpecification.jobPreparationTask.containerSettings.registry.registryServer] * If omitted, the default is "docker.io". - * @member {string} + * @property {string} * [jobSpecification.jobPreparationTask.containerSettings.registry.userName] - * @member {string} + * @property {string} * [jobSpecification.jobPreparationTask.containerSettings.registry.password] - * @member {array} [jobSpecification.jobPreparationTask.resourceFiles] Files - * listed under this element are located in the task's working directory. - * There is a maximum size for the list of resource files. When the max size - * is exceeded, the request will fail and the response error code will be - * RequestEntityTooLarge. If this occurs, the collection of ResourceFiles - * must be reduced in size. This can be achieved using .zip files, - * Application Packages, or Docker Containers. - * @member {array} [jobSpecification.jobPreparationTask.environmentSettings] - * @member {object} [jobSpecification.jobPreparationTask.constraints] - * @member {moment.duration} + * @property {array} [jobSpecification.jobPreparationTask.resourceFiles] + * Files listed under this element are located in the task's working + * directory. There is a maximum size for the list of resource files. When + * the max size is exceeded, the request will fail and the response error + * code will be RequestEntityTooLarge. If this occurs, the collection of + * ResourceFiles must be reduced in size. This can be achieved using .zip + * files, Application Packages, or Docker Containers. + * @property {array} + * [jobSpecification.jobPreparationTask.environmentSettings] + * @property {object} [jobSpecification.jobPreparationTask.constraints] + * @property {moment.duration} * [jobSpecification.jobPreparationTask.constraints.maxWallClockTime] If this * is not specified, there is no time limit on how long the task may run. - * @member {moment.duration} + * @property {moment.duration} * [jobSpecification.jobPreparationTask.constraints.retentionTime] The - * default is infinite, i.e. the task directory will be retained until the - * compute node is removed or reimaged. - * @member {number} + * default is 7 days, i.e. the task directory will be retained for 7 days + * unless the compute node is removed or the job is deleted. + * @property {number} * [jobSpecification.jobPreparationTask.constraints.maxTaskRetryCount] Note * that this value specifically controls the number of retries for the task * executable due to a nonzero exit code. The Batch service will try the task @@ -299,11 +311,9 @@ class JobScheduleAddParameter { * retry count is 3, Batch tries the task up to 4 times (one initial try and * 3 retries). If the maximum retry count is 0, the Batch service does not * retry the task after the first attempt. If the maximum retry count is -1, - * the Batch service retries the task without limit. Resource files and - * application packages are only downloaded again if the task is retried on a - * new compute node. - * @member {boolean} [jobSpecification.jobPreparationTask.waitForSuccess] If - * true and the Job Preparation task fails on a compute node, the Batch + * the Batch service retries the task without limit. + * @property {boolean} [jobSpecification.jobPreparationTask.waitForSuccess] + * If true and the Job Preparation task fails on a compute node, the Batch * service retries the Job Preparation task up to its maximum retry count (as * specified in the constraints element). If the task has still not completed * successfully after all retries, then the Batch service will not schedule @@ -314,40 +324,40 @@ class JobScheduleAddParameter { * Preparation task is still running; and even if the Job Preparation task * fails, new tasks will continue to be scheduled on the node. The default * value is true. - * @member {object} [jobSpecification.jobPreparationTask.userIdentity] If + * @property {object} [jobSpecification.jobPreparationTask.userIdentity] If * omitted, the task runs as a non-administrative user unique to the task on - * Windows nodes, or a a non-administrative user unique to the pool on Linux + * Windows nodes, or a non-administrative user unique to the pool on Linux * nodes. - * @member {string} + * @property {string} * [jobSpecification.jobPreparationTask.userIdentity.userName] The userName * and autoUser properties are mutually exclusive; you must specify one but * not both. - * @member {object} + * @property {object} * [jobSpecification.jobPreparationTask.userIdentity.autoUser] The userName * and autoUser properties are mutually exclusive; you must specify one but * not both. - * @member {string} + * @property {string} * [jobSpecification.jobPreparationTask.userIdentity.autoUser.scope] The * default value is task. Possible values include: 'task', 'pool' - * @member {string} + * @property {string} * [jobSpecification.jobPreparationTask.userIdentity.autoUser.elevationLevel] * The default value is nonAdmin. Possible values include: 'nonAdmin', * 'admin' - * @member {boolean} + * @property {boolean} * [jobSpecification.jobPreparationTask.rerunOnNodeRebootAfterSuccess] The * Job Preparation task is always rerun if a compute node is reimaged, or if * the Job Preparation task did not complete (e.g. because the reboot * occurred while the task was running). Therefore, you should always write a * Job Preparation task to be idempotent and to behave correctly if run * multiple times. The default value is true. - * @member {object} [jobSpecification.jobReleaseTask] The primary purpose of - * the Job Release task is to undo changes to compute nodes made by the Job - * Preparation task. Example activities include deleting local files, or + * @property {object} [jobSpecification.jobReleaseTask] The primary purpose + * of the Job Release task is to undo changes to compute nodes made by the + * Job Preparation task. Example activities include deleting local files, or * shutting down services that were started as part of job preparation. A Job * Release task cannot be specified without also specifying a Job Preparation * task for the job. The Batch service runs the Job Release task on the * compute nodes that have run the Job Preparation task. - * @member {string} [jobSpecification.jobReleaseTask.id] The ID can contain + * @property {string} [jobSpecification.jobReleaseTask.id] The ID can contain * any combination of alphanumeric characters including hyphens and * underscores and cannot contain more than 64 characters. If you do not * specify this property, the Batch service assigns a default value of @@ -356,108 +366,109 @@ class JobScheduleAddParameter { * service rejects the request with error code TaskIdSameAsJobReleaseTask; if * you are calling the REST API directly, the HTTP status code is 409 * (Conflict). - * @member {string} [jobSpecification.jobReleaseTask.commandLine] The command - * line does not run under a shell, and therefore cannot take advantage of - * shell features such as environment variable expansion. If you want to take - * advantage of such features, you should invoke the shell in the command - * line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c - * MyCommand" in Linux. If the command line refers to file paths, it should - * use a relative path (relative to the task working directory), or use the - * Batch provided environment variable + * @property {string} [jobSpecification.jobReleaseTask.commandLine] The + * command line does not run under a shell, and therefore cannot take + * advantage of shell features such as environment variable expansion. If you + * want to take advantage of such features, you should invoke the shell in + * the command line, for example using "cmd /c MyCommand" in Windows or + * "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, + * it should use a relative path (relative to the task working directory), or + * use the Batch provided environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [jobSpecification.jobReleaseTask.containerSettings] When - * this is specified, all directories recursively below the + * @property {object} [jobSpecification.jobReleaseTask.containerSettings] + * When this is specified, all directories recursively below the * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) * are mapped into the container, all task environment variables are mapped * into the container, and the task command line is executed in the * container. - * @member {string} + * @property {string} * [jobSpecification.jobReleaseTask.containerSettings.containerRunOptions] * These additional options are supplied as arguments to the "docker create" * command, in addition to those controlled by the Batch Service. - * @member {string} + * @property {string} * [jobSpecification.jobReleaseTask.containerSettings.imageName] This is the * full image reference, as would be specified to "docker pull". If no tag is * provided as part of the image name, the tag ":latest" is used as a * default. - * @member {object} + * @property {object} * [jobSpecification.jobReleaseTask.containerSettings.registry] This setting * can be omitted if was already provided at pool creation. - * @member {string} + * @property {string} * [jobSpecification.jobReleaseTask.containerSettings.registry.registryServer] * If omitted, the default is "docker.io". - * @member {string} + * @property {string} * [jobSpecification.jobReleaseTask.containerSettings.registry.userName] - * @member {string} + * @property {string} * [jobSpecification.jobReleaseTask.containerSettings.registry.password] - * @member {array} [jobSpecification.jobReleaseTask.resourceFiles] Files + * @property {array} [jobSpecification.jobReleaseTask.resourceFiles] Files * listed under this element are located in the task's working directory. - * @member {array} [jobSpecification.jobReleaseTask.environmentSettings] - * @member {moment.duration} + * @property {array} [jobSpecification.jobReleaseTask.environmentSettings] + * @property {moment.duration} * [jobSpecification.jobReleaseTask.maxWallClockTime] - * @member {moment.duration} [jobSpecification.jobReleaseTask.retentionTime] - * The default is infinite, i.e. the task directory will be retained until - * the compute node is removed or reimaged. - * @member {object} [jobSpecification.jobReleaseTask.userIdentity] If + * @property {moment.duration} + * [jobSpecification.jobReleaseTask.retentionTime] The default is 7 days, + * i.e. the task directory will be retained for 7 days unless the compute + * node is removed or the job is deleted. + * @property {object} [jobSpecification.jobReleaseTask.userIdentity] If * omitted, the task runs as a non-administrative user unique to the task. - * @member {string} [jobSpecification.jobReleaseTask.userIdentity.userName] + * @property {string} [jobSpecification.jobReleaseTask.userIdentity.userName] * The userName and autoUser properties are mutually exclusive; you must * specify one but not both. - * @member {object} [jobSpecification.jobReleaseTask.userIdentity.autoUser] + * @property {object} [jobSpecification.jobReleaseTask.userIdentity.autoUser] * The userName and autoUser properties are mutually exclusive; you must * specify one but not both. - * @member {string} + * @property {string} * [jobSpecification.jobReleaseTask.userIdentity.autoUser.scope] The default * value is task. Possible values include: 'task', 'pool' - * @member {string} + * @property {string} * [jobSpecification.jobReleaseTask.userIdentity.autoUser.elevationLevel] The * default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {array} [jobSpecification.commonEnvironmentSettings] Individual + * @property {array} [jobSpecification.commonEnvironmentSettings] Individual * tasks can override an environment setting specified here by specifying the * same setting name with a different value. - * @member {object} [jobSpecification.poolInfo] - * @member {string} [jobSpecification.poolInfo.poolId] You must ensure that + * @property {object} [jobSpecification.poolInfo] + * @property {string} [jobSpecification.poolInfo.poolId] You must ensure that * the pool referenced by this property exists. If the pool does not exist at * the time the Batch service tries to schedule a job, no tasks for the job * will run until you create a pool with that id. Note that the Batch service * will not reject the job request; it will simply not run tasks until the * pool exists. You must specify either the pool ID or the auto pool * specification, but not both. - * @member {object} [jobSpecification.poolInfo.autoPoolSpecification] If auto - * pool creation fails, the Batch service moves the job to a completed state, - * and the pool creation error is set in the job's scheduling error property. - * The Batch service manages the lifetime (both creation and, unless - * keepAlive is specified, deletion) of the auto pool. Any user actions that - * affect the lifetime of the auto pool while the job is active will result - * in unexpected behavior. You must specify either the pool ID or the auto - * pool specification, but not both. - * @member {string} + * @property {object} [jobSpecification.poolInfo.autoPoolSpecification] If + * auto pool creation fails, the Batch service moves the job to a completed + * state, and the pool creation error is set in the job's scheduling error + * property. The Batch service manages the lifetime (both creation and, + * unless keepAlive is specified, deletion) of the auto pool. Any user + * actions that affect the lifetime of the auto pool while the job is active + * will result in unexpected behavior. You must specify either the pool ID or + * the auto pool specification, but not both. + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.autoPoolIdPrefix] The * Batch service assigns each auto pool a unique identifier on creation. To * distinguish between pools created for different purposes, you can specify * this element to add a prefix to the ID that is assigned. The prefix can be * up to 20 characters long. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.poolLifetimeOption] * Possible values include: 'jobSchedule', 'job' - * @member {boolean} + * @property {boolean} * [jobSpecification.poolInfo.autoPoolSpecification.keepAlive] If false, the * Batch service deletes the pool once its lifetime (as determined by the * poolLifetimeOption setting) expires; that is, when the job or job schedule * completes. If true, the Batch service does not delete the pool * automatically. It is up to the user to delete auto pools created with this * option. - * @member {object} [jobSpecification.poolInfo.autoPoolSpecification.pool] - * @member {string} + * @property {object} [jobSpecification.poolInfo.autoPoolSpecification.pool] + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.displayName] The * display name need not be unique and can contain any Unicode characters up * to a maximum length of 1024. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.vmSize] For * information about available sizes of virtual machines in pools, see Choose * a VM size for compute nodes in an Azure Batch pool * (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration] * This property must be specified if the pool needs to be created with Azure * PaaS VMs. This property and virtualMachineConfiguration are mutually @@ -466,7 +477,7 @@ class JobScheduleAddParameter { * REST API directly, the HTTP status code is 400 (Bad Request). This * property cannot be specified if the Batch account was created with its * poolAllocationMode property set to 'UserSubscription'. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osFamily] * Possible values are: * 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. @@ -475,55 +486,39 @@ class JobScheduleAddParameter { * 5 - OS Family 5, equivalent to Windows Server 2016. For more information, * see Azure Guest OS Releases * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] + * @property {string} + * [jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osVersion] * The default value is * which specifies the latest operating system version * for the specified OS family. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.currentOSVersion] - * This may differ from targetOSVersion if the pool state is Upgrading. In - * this case some virtual machines may be on the targetOSVersion and some may - * be on the currentOSVersion during the upgrade process. Once all virtual - * machines have upgraded, currentOSVersion is updated to be the same as - * targetOSVersion. - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration] * This property must be specified if the pool needs to be created with Azure * IaaS VMs. This property and cloudServiceConfiguration are mutually * exclusive and one of the properties must be specified. If neither is * specified then the Batch service returns an error; if you are calling the * REST API directly, the HTTP status code is 400 (Bad Request). - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference] - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.publisher] * For example, Canonical or MicrosoftWindowsServer. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.offer] * For example, UbuntuServer or WindowsServer. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.sku] * For example, 14.04.0-LTS or 2012-R2-Datacenter. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.version] * A value of 'latest' can be specified to select the latest version of an * image. If omitted, the default is 'latest'. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.virtualMachineImageId] * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as - * the Azure Batch account. For information about the firewall settings for - * the Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The default value for caching is readwrite. For information about the - * caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' - * @member {string} + * the Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId] * The Batch node agent is a program that runs on each node in the pool, and * provides the command-and-control interface between the node and the Batch @@ -532,14 +527,14 @@ class JobScheduleAddParameter { * which matches the selected image reference. To get the list of supported * node agent SKUs along with their list of verified image references, see * the 'List supported node agent SKUs' operation. - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] - * This property must not be specified if the imageReference or osDisk - * property specifies a Linux OS image. - * @member {boolean} + * This property must not be specified if the imageReference property + * specifies a Linux OS image. + * @property {boolean} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] * If omitted, the default value is true. - * @member {array} + * @property {array} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.dataDisks] * This property must be specified if the compute nodes in the pool need to * have empty data disks attached to them. This cannot be updated. Each node @@ -551,7 +546,7 @@ class JobScheduleAddParameter { * https://docs.microsoft.com/en-us/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux * and * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.licenseType] * This only applies to images that contain the Windows operating system, and * should only be used when you hold valid on-premises licenses for the nodes @@ -560,110 +555,102 @@ class JobScheduleAddParameter { * * Windows_Server - The on-premises license is for Windows Server. * Windows_Client - The on-premises license is for Windows Client. - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration] * If specified, setup is performed on each node in the pool to allow tasks * to run in containers. All regular tasks and job manager tasks run on this * pool must specify the containerSettings property, and all other tasks may * specify it. - * @member {array} + * @property {array} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration.containerImageNames] * This is the full image reference, as would be specified to "docker pull". * An image will be sourced from the default Docker registry unless the image * is fully qualified with an alternative registry. - * @member {array} + * @property {array} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration.containerRegistries] * If any images must be downloaded from a private registry which requires * credentials, then those credentials must be provided here. - * @member {number} + * @property {number} * [jobSpecification.poolInfo.autoPoolSpecification.pool.maxTasksPerNode] The * default value is 1. The maximum value of this setting depends on the size * of the compute nodes in the pool (the vmSize setting). - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.taskSchedulingPolicy] - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.taskSchedulingPolicy.nodeFillType] * Possible values include: 'spread', 'pack' - * @member {moment.duration} + * @property {moment.duration} * [jobSpecification.poolInfo.autoPoolSpecification.pool.resizeTimeout] This * timeout applies only to manual scaling; it has no effect when * enableAutoScale is set to true. The default value is 15 minutes. The * minimum value is 5 minutes. If you specify a value less than 5 minutes, * the Batch service rejects the request with an error; if you are calling * the REST API directly, the HTTP status code is 400 (Bad Request). - * @member {number} + * @property {number} * [jobSpecification.poolInfo.autoPoolSpecification.pool.targetDedicatedNodes] * This property must not be specified if enableAutoScale is set to true. If * enableAutoScale is set to false, then you must set either * targetDedicatedNodes, targetLowPriorityNodes, or both. - * @member {number} + * @property {number} * [jobSpecification.poolInfo.autoPoolSpecification.pool.targetLowPriorityNodes] * This property must not be specified if enableAutoScale is set to true. If * enableAutoScale is set to false, then you must set either * targetDedicatedNodes, targetLowPriorityNodes, or both. - * @member {boolean} + * @property {boolean} * [jobSpecification.poolInfo.autoPoolSpecification.pool.enableAutoScale] If * false, at least one of targetDedicateNodes and targetLowPriorityNodes must * be specified. If true, the autoScaleFormula element is required. The pool * automatically resizes according to the formula. The default value is * false. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.autoScaleFormula] * This property must not be specified if enableAutoScale is set to false. It * is required if enableAutoScale is set to true. The formula is checked for * validity before the pool is created. If the formula is not valid, the * Batch service rejects the request with detailed error information. - * @member {moment.duration} + * @property {moment.duration} * [jobSpecification.poolInfo.autoPoolSpecification.pool.autoScaleEvaluationInterval] * The default value is 15 minutes. The minimum and maximum value are 5 * minutes and 168 hours respectively. If you specify a value less than 5 * minutes or greater than 168 hours, the Batch service rejects the request * with an invalid property value error; if you are calling the REST API * directly, the HTTP status code is 400 (Bad Request). - * @member {boolean} + * @property {boolean} * [jobSpecification.poolInfo.autoPoolSpecification.pool.enableInterNodeCommunication] * Enabling inter-node communication limits the maximum size of the pool due * to deployment restrictions on the nodes of the pool. This may result in * the pool not reaching its desired size. The default value is false. - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration] - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.subnetId] + * This is of the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. * The virtual network must be in the same region and subscription as the * Azure Batch account. The specified subnet should have enough free IP * addresses to accommodate the number of nodes in the pool. If the subnet * doesn't have enough free IP addresses, the pool will partially allocate - * compute nodes, and a resize error will occur. The 'MicrosoftAzureBatch' - * service principal must have the 'Classic Virtual Machine Contributor' - * Role-Based Access Control (RBAC) role for the specified VNet. The - * specified subnet must allow communication from the Azure Batch service to - * be able to schedule tasks on the compute nodes. This can be verified by - * checking if the specified VNet has any associated Network Security Groups - * (NSG). If communication to the compute nodes in the specified subnet is - * denied by an NSG, then the Batch service will set the state of the compute - * nodes to unusable. For pools created with virtualMachineConfiguration only - * ARM virtual networks ('Microsoft.Network/virtualNetworks') are supported, - * but for pools created with cloudServiceConfiguration both ARM and classic - * virtual networks are supported. If the specified VNet has any associated - * Network Security Groups (NSG), then a few reserved system ports must be - * enabled for inbound communication. For pools created with a virtual - * machine configuration, enable ports 29876 and 29877, as well as port 22 - * for Linux and port 3389 for Windows. For pools created with a cloud - * service configuration, enable ports 10100, 20100, and 30100. Also enable - * outbound connections to Azure Storage on port 443. For more details see: + * compute nodes, and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks + * ('Microsoft.Network/virtualNetworks') are supported, but for pools created + * with cloudServiceConfiguration both ARM and classic virtual networks are + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration - * @member {object} + * @property {string} + * [jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.dynamicVNetAssignmentScope] + * Possible values include: 'none', 'job' + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] * Pool endpoint configuration is only supported on pools with the * virtualMachineConfiguration property. - * @member {array} + * @property {array} * [jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration.inboundNATPools] * The maximum number of inbound NAT pools per Batch pool is 5. If the * maximum number of inbound NAT pools is exceeded the request fails with * HTTP status code 400. - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask] - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.commandLine] * The command line does not run under a shell, and therefore cannot take * advantage of shell features such as environment variable expansion. If you @@ -673,57 +660,57 @@ class JobScheduleAddParameter { * it should use a relative path (relative to the task working directory), or * use the Batch provided environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings] * When this is specified, all directories recursively below the * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) * are mapped into the container, all task environment variables are mapped * into the container, and the task command line is executed in the * container. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.containerRunOptions] * These additional options are supplied as arguments to the "docker create" * command, in addition to those controlled by the Batch Service. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.imageName] * This is the full image reference, as would be specified to "docker pull". * If no tag is provided as part of the image name, the tag ":latest" is used * as a default. - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry] * This setting can be omitted if was already provided at pool creation. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.registryServer] * If omitted, the default is "docker.io". - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.userName] - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.password] - * @member {array} + * @property {array} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.resourceFiles] * Files listed under this element are located in the task's working * directory. - * @member {array} + * @property {array} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.environmentSettings] - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.userIdentity] * If omitted, the task runs as a non-administrative user unique to the task. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.userIdentity.userName] * The userName and autoUser properties are mutually exclusive; you must * specify one but not both. - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser] * The userName and autoUser properties are mutually exclusive; you must * specify one but not both. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser.scope] * The default value is task. Possible values include: 'task', 'pool' - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser.elevationLevel] * The default value is nonAdmin. Possible values include: 'nonAdmin', * 'admin' - * @member {number} + * @property {number} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.maxTaskRetryCount] * The Batch service retries a task if its exit code is nonzero. Note that * this value specifically controls the number of retries. The Batch service @@ -732,7 +719,7 @@ class JobScheduleAddParameter { * initial try and 3 retries). If the maximum retry count is 0, the Batch * service does not retry the task. If the maximum retry count is -1, the * Batch service retries the task without limit. - * @member {boolean} + * @property {boolean} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.waitForSuccess] * If true and the start task fails on a compute node, the Batch service * retries the start task up to its maximum retry count (maxTaskRetryCount). @@ -744,7 +731,7 @@ class JobScheduleAddParameter { * node while the start task is still running; and even if the start task * fails, new tasks will continue to be scheduled on the node. The default is * false. - * @member {array} + * @property {array} * [jobSpecification.poolInfo.autoPoolSpecification.pool.certificateReferences] * For Windows compute nodes, the Batch service installs the certificates to * the specified certificate store and location. For Linux compute nodes, the @@ -754,25 +741,25 @@ class JobScheduleAddParameter { * 'remoteUser', a 'certs' directory is created in the user's home directory * (e.g., /home/{user-name}/certs) and certificates are placed in that * directory. - * @member {array} + * @property {array} * [jobSpecification.poolInfo.autoPoolSpecification.pool.applicationPackageReferences] - * @member {array} + * @property {array} * [jobSpecification.poolInfo.autoPoolSpecification.pool.applicationLicenses] * The list of application licenses must be a subset of available Batch * service application licenses. If a license is requested which is not * supported, pool creation will fail. The permitted licenses available on * the pool are 'maya', 'vray', '3dsmax', 'arnold'. An additional charge * applies for each application license added to the pool. - * @member {array} + * @property {array} * [jobSpecification.poolInfo.autoPoolSpecification.pool.userAccounts] - * @member {array} + * @property {array} * [jobSpecification.poolInfo.autoPoolSpecification.pool.metadata] The Batch * service does not assign any meaning to metadata; it is solely for the use * of user code. - * @member {array} [jobSpecification.metadata] The Batch service does not + * @property {array} [jobSpecification.metadata] The Batch service does not * assign any meaning to metadata; it is solely for the use of user code. - * @member {array} [metadata] A list of name-value pairs associated with the - * schedule as metadata. The Batch service does not assign any meaning to + * @property {array} [metadata] A list of name-value pairs associated with + * the schedule as metadata. The Batch service does not assign any meaning to * metadata; it is solely for the use of user code. */ constructor() { diff --git a/lib/services/batch/lib/models/jobScheduleDeleteMethodOptions.js b/lib/services/batch/lib/models/jobScheduleDeleteMethodOptions.js index 3251b10d0f..fa99df0767 100644 --- a/lib/services/batch/lib/models/jobScheduleDeleteMethodOptions.js +++ b/lib/services/batch/lib/models/jobScheduleDeleteMethodOptions.js @@ -17,30 +17,30 @@ class JobScheduleDeleteMethodOptions { /** * Create a JobScheduleDeleteMethodOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. + * @property {string} [ifMatch] An ETag value associated with the version of * the resource known to the client. The operation will be performed only if * the resource's current ETag on the service exactly matches the value * specified by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version + * @property {string} [ifNoneMatch] An ETag value associated with the version * of the resource known to the client. The operation will be performed only * if the resource's current ETag on the service does not match the value * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last + * @property {date} [ifModifiedSince] A timestamp indicating the last + * modified time of the resource known to the client. The operation will be + * performed only if the resource on the service has been modified since the + * specified time. + * @property {date} [ifUnmodifiedSince] A timestamp indicating the last * modified time of the resource known to the client. The operation will be * performed only if the resource on the service has not been modified since * the specified time. diff --git a/lib/services/batch/lib/models/jobScheduleDisableOptions.js b/lib/services/batch/lib/models/jobScheduleDisableOptions.js index cf98213ff0..042dc88068 100644 --- a/lib/services/batch/lib/models/jobScheduleDisableOptions.js +++ b/lib/services/batch/lib/models/jobScheduleDisableOptions.js @@ -17,30 +17,30 @@ class JobScheduleDisableOptions { /** * Create a JobScheduleDisableOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. + * @property {string} [ifMatch] An ETag value associated with the version of * the resource known to the client. The operation will be performed only if * the resource's current ETag on the service exactly matches the value * specified by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version + * @property {string} [ifNoneMatch] An ETag value associated with the version * of the resource known to the client. The operation will be performed only * if the resource's current ETag on the service does not match the value * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last + * @property {date} [ifModifiedSince] A timestamp indicating the last + * modified time of the resource known to the client. The operation will be + * performed only if the resource on the service has been modified since the + * specified time. + * @property {date} [ifUnmodifiedSince] A timestamp indicating the last * modified time of the resource known to the client. The operation will be * performed only if the resource on the service has not been modified since * the specified time. diff --git a/lib/services/batch/lib/models/jobScheduleEnableOptions.js b/lib/services/batch/lib/models/jobScheduleEnableOptions.js index d11aa87fe4..c8200fb2e1 100644 --- a/lib/services/batch/lib/models/jobScheduleEnableOptions.js +++ b/lib/services/batch/lib/models/jobScheduleEnableOptions.js @@ -17,30 +17,30 @@ class JobScheduleEnableOptions { /** * Create a JobScheduleEnableOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. + * @property {string} [ifMatch] An ETag value associated with the version of * the resource known to the client. The operation will be performed only if * the resource's current ETag on the service exactly matches the value * specified by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version + * @property {string} [ifNoneMatch] An ETag value associated with the version * of the resource known to the client. The operation will be performed only * if the resource's current ETag on the service does not match the value * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last + * @property {date} [ifModifiedSince] A timestamp indicating the last + * modified time of the resource known to the client. The operation will be + * performed only if the resource on the service has been modified since the + * specified time. + * @property {date} [ifUnmodifiedSince] A timestamp indicating the last * modified time of the resource known to the client. The operation will be * performed only if the resource on the service has not been modified since * the specified time. diff --git a/lib/services/batch/lib/models/jobScheduleExecutionInformation.js b/lib/services/batch/lib/models/jobScheduleExecutionInformation.js index 9d2388dee4..140ffed152 100644 --- a/lib/services/batch/lib/models/jobScheduleExecutionInformation.js +++ b/lib/services/batch/lib/models/jobScheduleExecutionInformation.js @@ -18,17 +18,17 @@ class JobScheduleExecutionInformation { /** * Create a JobScheduleExecutionInformation. - * @member {date} [nextRunTime] The next time at which a job will be created - * under this schedule. This property is meaningful only if the schedule is - * in the active state when the time comes around. For example, if the - * schedule is disabled, no job will be created at nextRunTime unless the job - * is enabled before then. - * @member {object} [recentJob] Information about the most recent job under + * @property {date} [nextRunTime] The next time at which a job will be + * created under this schedule. This property is meaningful only if the + * schedule is in the active state when the time comes around. For example, + * if the schedule is disabled, no job will be created at nextRunTime unless + * the job is enabled before then. + * @property {object} [recentJob] Information about the most recent job under * the job schedule. This property is present only if the at least one job * has run under the schedule. - * @member {string} [recentJob.id] - * @member {string} [recentJob.url] - * @member {date} [endTime] The time at which the schedule ended. This + * @property {string} [recentJob.id] + * @property {string} [recentJob.url] + * @property {date} [endTime] The time at which the schedule ended. This * property is set only if the job schedule is in the completed state. */ constructor() { diff --git a/lib/services/batch/lib/models/jobScheduleExistsOptions.js b/lib/services/batch/lib/models/jobScheduleExistsOptions.js index 36c0af909d..258e27354d 100644 --- a/lib/services/batch/lib/models/jobScheduleExistsOptions.js +++ b/lib/services/batch/lib/models/jobScheduleExistsOptions.js @@ -17,30 +17,30 @@ class JobScheduleExistsOptions { /** * Create a JobScheduleExistsOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. + * @property {string} [ifMatch] An ETag value associated with the version of * the resource known to the client. The operation will be performed only if * the resource's current ETag on the service exactly matches the value * specified by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version + * @property {string} [ifNoneMatch] An ETag value associated with the version * of the resource known to the client. The operation will be performed only * if the resource's current ETag on the service does not match the value * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last + * @property {date} [ifModifiedSince] A timestamp indicating the last + * modified time of the resource known to the client. The operation will be + * performed only if the resource on the service has been modified since the + * specified time. + * @property {date} [ifUnmodifiedSince] A timestamp indicating the last * modified time of the resource known to the client. The operation will be * performed only if the resource on the service has not been modified since * the specified time. diff --git a/lib/services/batch/lib/models/jobScheduleGetOptions.js b/lib/services/batch/lib/models/jobScheduleGetOptions.js index e3f5d603d2..b679b8a536 100644 --- a/lib/services/batch/lib/models/jobScheduleGetOptions.js +++ b/lib/services/batch/lib/models/jobScheduleGetOptions.js @@ -17,32 +17,32 @@ class JobScheduleGetOptions { /** * Create a JobScheduleGetOptions. - * @member {string} [select] An OData $select clause. - * @member {string} [expand] An OData $expand clause. - * @member {number} [timeout] The maximum time that the server can spend + * @property {string} [select] An OData $select clause. + * @property {string} [expand] An OData $expand clause. + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. + * @property {string} [ifMatch] An ETag value associated with the version of * the resource known to the client. The operation will be performed only if * the resource's current ETag on the service exactly matches the value * specified by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version + * @property {string} [ifNoneMatch] An ETag value associated with the version * of the resource known to the client. The operation will be performed only * if the resource's current ETag on the service does not match the value * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last + * @property {date} [ifModifiedSince] A timestamp indicating the last + * modified time of the resource known to the client. The operation will be + * performed only if the resource on the service has been modified since the + * specified time. + * @property {date} [ifUnmodifiedSince] A timestamp indicating the last * modified time of the resource known to the client. The operation will be * performed only if the resource on the service has not been modified since * the specified time. diff --git a/lib/services/batch/lib/models/jobScheduleListNextOptions.js b/lib/services/batch/lib/models/jobScheduleListNextOptions.js index 20343f1ab8..bae18a5b57 100644 --- a/lib/services/batch/lib/models/jobScheduleListNextOptions.js +++ b/lib/services/batch/lib/models/jobScheduleListNextOptions.js @@ -17,14 +17,14 @@ class JobScheduleListNextOptions { /** * Create a JobScheduleListNextOptions. - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/jobScheduleListOptions.js b/lib/services/batch/lib/models/jobScheduleListOptions.js index 585367064b..23d1c8aeff 100644 --- a/lib/services/batch/lib/models/jobScheduleListOptions.js +++ b/lib/services/batch/lib/models/jobScheduleListOptions.js @@ -17,25 +17,25 @@ class JobScheduleListOptions { /** * Create a JobScheduleListOptions. - * @member {string} [filter] An OData $filter clause. For more information on - * constructing this filter, see + * @property {string} [filter] An OData $filter clause. For more information + * on constructing this filter, see * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-job-schedules. - * @member {string} [select] An OData $select clause. - * @member {string} [expand] An OData $expand clause. - * @member {number} [maxResults] The maximum number of items to return in the - * response. A maximum of 1000 job schedules can be returned. Default value: - * 1000 . - * @member {number} [timeout] The maximum time that the server can spend + * @property {string} [select] An OData $select clause. + * @property {string} [expand] An OData $expand clause. + * @property {number} [maxResults] The maximum number of items to return in + * the response. A maximum of 1000 job schedules can be returned. Default + * value: 1000 . + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/jobSchedulePatchOptions.js b/lib/services/batch/lib/models/jobSchedulePatchOptions.js index 5d37cd4823..7d1d103559 100644 --- a/lib/services/batch/lib/models/jobSchedulePatchOptions.js +++ b/lib/services/batch/lib/models/jobSchedulePatchOptions.js @@ -17,30 +17,30 @@ class JobSchedulePatchOptions { /** * Create a JobSchedulePatchOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. + * @property {string} [ifMatch] An ETag value associated with the version of * the resource known to the client. The operation will be performed only if * the resource's current ETag on the service exactly matches the value * specified by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version + * @property {string} [ifNoneMatch] An ETag value associated with the version * of the resource known to the client. The operation will be performed only * if the resource's current ETag on the service does not match the value * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last + * @property {date} [ifModifiedSince] A timestamp indicating the last + * modified time of the resource known to the client. The operation will be + * performed only if the resource on the service has been modified since the + * specified time. + * @property {date} [ifUnmodifiedSince] A timestamp indicating the last * modified time of the resource known to the client. The operation will be * performed only if the resource on the service has not been modified since * the specified time. diff --git a/lib/services/batch/lib/models/jobSchedulePatchParameter.js b/lib/services/batch/lib/models/jobSchedulePatchParameter.js index 3307511710..c4e69bce4f 100644 --- a/lib/services/batch/lib/models/jobSchedulePatchParameter.js +++ b/lib/services/batch/lib/models/jobSchedulePatchParameter.js @@ -17,15 +17,15 @@ class JobSchedulePatchParameter { /** * Create a JobSchedulePatchParameter. - * @member {object} [schedule] The schedule according to which jobs will be + * @property {object} [schedule] The schedule according to which jobs will be * created. If you do not specify this element, the existing schedule is left * unchanged. - * @member {date} [schedule.doNotRunUntil] If you do not specify a + * @property {date} [schedule.doNotRunUntil] If you do not specify a * doNotRunUntil time, the schedule becomes ready to create jobs immediately. - * @member {date} [schedule.doNotRunAfter] If you do not specify a + * @property {date} [schedule.doNotRunAfter] If you do not specify a * doNotRunAfter time, and you are creating a recurring job schedule, the job * schedule will remain active until you explicitly terminate it. - * @member {moment.duration} [schedule.startWindow] If a job is not created + * @property {moment.duration} [schedule.startWindow] If a job is not created * within the startWindow interval, then the 'opportunity' is lost; no job * will be created until the next recurrence of the schedule. If the schedule * is recurring, and the startWindow is longer than the recurrence interval, @@ -35,7 +35,7 @@ class JobSchedulePatchParameter { * minute. If you specify a lower value, the Batch service rejects the * schedule with an error; if you are calling the REST API directly, the HTTP * status code is 400 (Bad Request). - * @member {moment.duration} [schedule.recurrenceInterval] Because a job + * @property {moment.duration} [schedule.recurrenceInterval] Because a job * schedule can have at most one active job under it at any given time, if it * is time to create a new job under a job schedule, but the previous job is * still running, the Batch service will not create the new job until the @@ -51,36 +51,48 @@ class JobSchedulePatchParameter { * minute. If you specify a lower value, the Batch service rejects the * schedule with an error; if you are calling the REST API directly, the HTTP * status code is 400 (Bad Request). - * @member {object} [jobSpecification] The details of the jobs to be created - * on this schedule. Updates affect only jobs that are started after the - * update has taken place. Any currently active job continues with the older - * specification. - * @member {number} [jobSpecification.priority] Priority values can range + * @property {object} [jobSpecification] The details of the jobs to be + * created on this schedule. Updates affect only jobs that are started after + * the update has taken place. Any currently active job continues with the + * older specification. + * @property {number} [jobSpecification.priority] Priority values can range * from -1000 to 1000, with -1000 being the lowest priority and 1000 being * the highest priority. The default value is 0. This priority is used as the * default for all jobs under the job schedule. You can update a job's * priority after it has been created using by using the update job API. - * @member {string} [jobSpecification.displayName] The name need not be + * @property {string} [jobSpecification.displayName] The name need not be * unique and can contain any Unicode characters up to a maximum length of * 1024. - * @member {boolean} [jobSpecification.usesTaskDependencies] - * @member {string} [jobSpecification.onAllTasksComplete] Note that if a job - * contains no tasks, then all tasks are considered complete. This option is - * therefore most commonly used with a Job Manager task; if you want to use - * automatic job termination without a Job Manager, you should initially set - * onAllTasksComplete to noaction and update the job properties to set + * @property {boolean} [jobSpecification.usesTaskDependencies] + * @property {string} [jobSpecification.onAllTasksComplete] Note that if a + * job contains no tasks, then all tasks are considered complete. This option + * is therefore most commonly used with a Job Manager task; if you want to + * use automatic job termination without a Job Manager, you should initially + * set onAllTasksComplete to noaction and update the job properties to set * onAllTasksComplete to terminatejob once you have finished adding tasks. * The default is noaction. Possible values include: 'noAction', * 'terminateJob' - * @member {string} [jobSpecification.onTaskFailure] The default is noaction. - * Possible values include: 'noAction', 'performExitOptionsJobAction' - * @member {object} [jobSpecification.constraints] - * @member {moment.duration} [jobSpecification.constraints.maxWallClockTime] - * If the job does not complete within the time limit, the Batch service - * terminates it and any tasks that are still running. In this case, the - * termination reason will be MaxWallClockTimeExpiry. If this property is not - * specified, there is no time limit on how long the job may run. - * @member {number} [jobSpecification.constraints.maxTaskRetryCount] Note + * @property {string} [jobSpecification.onTaskFailure] The default is + * noaction. Possible values include: 'noAction', + * 'performExitOptionsJobAction' + * @property {object} [jobSpecification.networkConfiguration] + * @property {string} [jobSpecification.networkConfiguration.subnetId] This + * is only supported for jobs running on VirtualMachineConfiguration pools. + * This is of the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. + * The virtual network must be in the same region and subscription as the + * Azure Batch account. The specified subnet should have enough free IP + * addresses to accommodate the number of nodes which will run tasks from the + * job. For more details, see + * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + * @property {object} [jobSpecification.constraints] + * @property {moment.duration} + * [jobSpecification.constraints.maxWallClockTime] If the job does not + * complete within the time limit, the Batch service terminates it and any + * tasks that are still running. In this case, the termination reason will be + * MaxWallClockTimeExpiry. If this property is not specified, there is no + * time limit on how long the job may run. + * @property {number} [jobSpecification.constraints.maxTaskRetryCount] Note * that this value specifically controls the number of retries. The Batch * service will try each task once, and may then retry up to this limit. For * example, if the maximum retry count is 3, Batch tries a task up to 4 times @@ -88,27 +100,27 @@ class JobSchedulePatchParameter { * Batch service does not retry tasks. If the maximum retry count is -1, the * Batch service retries tasks without limit. The default value is 0 (no * retries). - * @member {object} [jobSpecification.jobManagerTask] If the job does not + * @property {object} [jobSpecification.jobManagerTask] If the job does not * specify a Job Manager task, the user must explicitly add tasks to the job * using the Task API. If the job does specify a Job Manager task, the Batch * service creates the Job Manager task when the job is created, and will try * to schedule the Job Manager task before scheduling other tasks in the job. - * @member {string} [jobSpecification.jobManagerTask.id] The ID can contain + * @property {string} [jobSpecification.jobManagerTask.id] The ID can contain * any combination of alphanumeric characters including hyphens and * underscores and cannot contain more than 64 characters. - * @member {string} [jobSpecification.jobManagerTask.displayName] It need not - * be unique and can contain any Unicode characters up to a maximum length of - * 1024. - * @member {string} [jobSpecification.jobManagerTask.commandLine] The command - * line does not run under a shell, and therefore cannot take advantage of - * shell features such as environment variable expansion. If you want to take - * advantage of such features, you should invoke the shell in the command - * line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c - * MyCommand" in Linux. If the command line refers to file paths, it should - * use a relative path (relative to the task working directory), or use the - * Batch provided environment variable + * @property {string} [jobSpecification.jobManagerTask.displayName] It need + * not be unique and can contain any Unicode characters up to a maximum + * length of 1024. + * @property {string} [jobSpecification.jobManagerTask.commandLine] The + * command line does not run under a shell, and therefore cannot take + * advantage of shell features such as environment variable expansion. If you + * want to take advantage of such features, you should invoke the shell in + * the command line, for example using "cmd /c MyCommand" in Windows or + * "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, + * it should use a relative path (relative to the task working directory), or + * use the Batch provided environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [jobSpecification.jobManagerTask.containerSettings] If + * @property {object} [jobSpecification.jobManagerTask.containerSettings] If * the pool that will run this task has containerConfiguration set, this must * be set as well. If the pool that will run this task doesn't have * containerConfiguration set, this must not be set. When this is specified, @@ -116,45 +128,45 @@ class JobSchedulePatchParameter { * Azure Batch directories on the node) are mapped into the container, all * task environment variables are mapped into the container, and the task * command line is executed in the container. - * @member {string} + * @property {string} * [jobSpecification.jobManagerTask.containerSettings.containerRunOptions] * These additional options are supplied as arguments to the "docker create" * command, in addition to those controlled by the Batch Service. - * @member {string} + * @property {string} * [jobSpecification.jobManagerTask.containerSettings.imageName] This is the * full image reference, as would be specified to "docker pull". If no tag is * provided as part of the image name, the tag ":latest" is used as a * default. - * @member {object} + * @property {object} * [jobSpecification.jobManagerTask.containerSettings.registry] This setting * can be omitted if was already provided at pool creation. - * @member {string} + * @property {string} * [jobSpecification.jobManagerTask.containerSettings.registry.registryServer] * If omitted, the default is "docker.io". - * @member {string} + * @property {string} * [jobSpecification.jobManagerTask.containerSettings.registry.userName] - * @member {string} + * @property {string} * [jobSpecification.jobManagerTask.containerSettings.registry.password] - * @member {array} [jobSpecification.jobManagerTask.resourceFiles] Files + * @property {array} [jobSpecification.jobManagerTask.resourceFiles] Files * listed under this element are located in the task's working directory. * There is a maximum size for the list of resource files. When the max size * is exceeded, the request will fail and the response error code will be * RequestEntityTooLarge. If this occurs, the collection of ResourceFiles * must be reduced in size. This can be achieved using .zip files, * Application Packages, or Docker Containers. - * @member {array} [jobSpecification.jobManagerTask.outputFiles] For + * @property {array} [jobSpecification.jobManagerTask.outputFiles] For * multi-instance tasks, the files will only be uploaded from the compute * node on which the primary task is executed. - * @member {array} [jobSpecification.jobManagerTask.environmentSettings] - * @member {object} [jobSpecification.jobManagerTask.constraints] - * @member {moment.duration} + * @property {array} [jobSpecification.jobManagerTask.environmentSettings] + * @property {object} [jobSpecification.jobManagerTask.constraints] + * @property {moment.duration} * [jobSpecification.jobManagerTask.constraints.maxWallClockTime] If this is * not specified, there is no time limit on how long the task may run. - * @member {moment.duration} + * @property {moment.duration} * [jobSpecification.jobManagerTask.constraints.retentionTime] The default is - * infinite, i.e. the task directory will be retained until the compute node - * is removed or reimaged. - * @member {number} + * 7 days, i.e. the task directory will be retained for 7 days unless the + * compute node is removed or the job is deleted. + * @property {number} * [jobSpecification.jobManagerTask.constraints.maxTaskRetryCount] Note that * this value specifically controls the number of retries for the task * executable due to a nonzero exit code. The Batch service will try the task @@ -162,14 +174,12 @@ class JobSchedulePatchParameter { * retry count is 3, Batch tries the task up to 4 times (one initial try and * 3 retries). If the maximum retry count is 0, the Batch service does not * retry the task after the first attempt. If the maximum retry count is -1, - * the Batch service retries the task without limit. Resource files and - * application packages are only downloaded again if the task is retried on a - * new compute node. - * @member {boolean} [jobSpecification.jobManagerTask.killJobOnCompletion] If - * true, when the Job Manager task completes, the Batch service marks the job - * as complete. If any tasks are still running at this time (other than Job - * Release), those tasks are terminated. If false, the completion of the Job - * Manager task does not affect the job status. In this case, you should + * the Batch service retries the task without limit. + * @property {boolean} [jobSpecification.jobManagerTask.killJobOnCompletion] + * If true, when the Job Manager task completes, the Batch service marks the + * job as complete. If any tasks are still running at this time (other than + * Job Release), those tasks are terminated. If false, the completion of the + * Job Manager task does not affect the job status. In this case, you should * either use the onAllTasksComplete attribute to terminate the job, or have * a client or user terminate the job explicitly. An example of this is if * the Job Manager creates a set of tasks but then takes no further role in @@ -178,27 +188,27 @@ class JobSchedulePatchParameter { * and using the Job Manager task only to create the tasks for the job (not * to monitor progress), then it is important to set killJobOnCompletion to * false. - * @member {object} [jobSpecification.jobManagerTask.userIdentity] If + * @property {object} [jobSpecification.jobManagerTask.userIdentity] If * omitted, the task runs as a non-administrative user unique to the task. - * @member {string} [jobSpecification.jobManagerTask.userIdentity.userName] + * @property {string} [jobSpecification.jobManagerTask.userIdentity.userName] * The userName and autoUser properties are mutually exclusive; you must * specify one but not both. - * @member {object} [jobSpecification.jobManagerTask.userIdentity.autoUser] + * @property {object} [jobSpecification.jobManagerTask.userIdentity.autoUser] * The userName and autoUser properties are mutually exclusive; you must * specify one but not both. - * @member {string} + * @property {string} * [jobSpecification.jobManagerTask.userIdentity.autoUser.scope] The default * value is task. Possible values include: 'task', 'pool' - * @member {string} + * @property {string} * [jobSpecification.jobManagerTask.userIdentity.autoUser.elevationLevel] The * default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {boolean} [jobSpecification.jobManagerTask.runExclusive] If true, - * no other tasks will run on the same compute node for as long as the Job - * Manager is running. If false, other tasks can run simultaneously with the - * Job Manager on a compute node. The Job Manager task counts normally + * @property {boolean} [jobSpecification.jobManagerTask.runExclusive] If + * true, no other tasks will run on the same compute node for as long as the + * Job Manager is running. If false, other tasks can run simultaneously with + * the Job Manager on a compute node. The Job Manager task counts normally * against the node's concurrent task limit, so this is only relevant if the * node allows multiple concurrent tasks. The default value is true. - * @member {array} + * @property {array} * [jobSpecification.jobManagerTask.applicationPackageReferences] Application * packages are downloaded and deployed to a shared directory, not the task * working directory. Therefore, if a referenced package is already on the @@ -206,7 +216,7 @@ class JobSchedulePatchParameter { * existing copy on the compute node is used. If a referenced application * package cannot be installed, for example because the package has been * deleted or because download failed, the task fails. - * @member {object} + * @property {object} * [jobSpecification.jobManagerTask.authenticationTokenSettings] If this * property is set, the Batch service provides the task with an * authentication token which can be used to authenticate Batch service @@ -215,18 +225,19 @@ class JobSchedulePatchParameter { * that the task can carry out using the token depend on the settings. For * example, a task can request job permissions in order to add other tasks to * the job, or check the status of the job or of other tasks under the job. - * @member {array} + * @property {array} * [jobSpecification.jobManagerTask.authenticationTokenSettings.access] The * authentication token grants access to a limited set of Batch service * operations. Currently the only supported value for the access property is * 'job', which grants access to all operations related to the job which * contains the task. - * @member {boolean} [jobSpecification.jobManagerTask.allowLowPriorityNode] + * @property {boolean} [jobSpecification.jobManagerTask.allowLowPriorityNode] * The default value is true. - * @member {object} [jobSpecification.jobPreparationTask] If a job has a Job - * Preparation task, the Batch service will run the Job Preparation task on a - * compute node before starting any tasks of that job on that compute node. - * @member {string} [jobSpecification.jobPreparationTask.id] The ID can + * @property {object} [jobSpecification.jobPreparationTask] If a job has a + * Job Preparation task, the Batch service will run the Job Preparation task + * on a compute node before starting any tasks of that job on that compute + * node. + * @property {string} [jobSpecification.jobPreparationTask.id] The ID can * contain any combination of alphanumeric characters including hyphens and * underscores and cannot contain more than 64 characters. If you do not * specify this property, the Batch service assigns a default value of @@ -235,7 +246,7 @@ class JobSchedulePatchParameter { * service rejects the request with error code * TaskIdSameAsJobPreparationTask; if you are calling the REST API directly, * the HTTP status code is 409 (Conflict). - * @member {string} [jobSpecification.jobPreparationTask.commandLine] The + * @property {string} [jobSpecification.jobPreparationTask.commandLine] The * command line does not run under a shell, and therefore cannot take * advantage of shell features such as environment variable expansion. If you * want to take advantage of such features, you should invoke the shell in @@ -244,48 +255,49 @@ class JobSchedulePatchParameter { * it should use a relative path (relative to the task working directory), or * use the Batch provided environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [jobSpecification.jobPreparationTask.containerSettings] + * @property {object} [jobSpecification.jobPreparationTask.containerSettings] * When this is specified, all directories recursively below the * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) * are mapped into the container, all task environment variables are mapped * into the container, and the task command line is executed in the * container. - * @member {string} + * @property {string} * [jobSpecification.jobPreparationTask.containerSettings.containerRunOptions] * These additional options are supplied as arguments to the "docker create" * command, in addition to those controlled by the Batch Service. - * @member {string} + * @property {string} * [jobSpecification.jobPreparationTask.containerSettings.imageName] This is * the full image reference, as would be specified to "docker pull". If no * tag is provided as part of the image name, the tag ":latest" is used as a * default. - * @member {object} + * @property {object} * [jobSpecification.jobPreparationTask.containerSettings.registry] This * setting can be omitted if was already provided at pool creation. - * @member {string} + * @property {string} * [jobSpecification.jobPreparationTask.containerSettings.registry.registryServer] * If omitted, the default is "docker.io". - * @member {string} + * @property {string} * [jobSpecification.jobPreparationTask.containerSettings.registry.userName] - * @member {string} + * @property {string} * [jobSpecification.jobPreparationTask.containerSettings.registry.password] - * @member {array} [jobSpecification.jobPreparationTask.resourceFiles] Files - * listed under this element are located in the task's working directory. - * There is a maximum size for the list of resource files. When the max size - * is exceeded, the request will fail and the response error code will be - * RequestEntityTooLarge. If this occurs, the collection of ResourceFiles - * must be reduced in size. This can be achieved using .zip files, - * Application Packages, or Docker Containers. - * @member {array} [jobSpecification.jobPreparationTask.environmentSettings] - * @member {object} [jobSpecification.jobPreparationTask.constraints] - * @member {moment.duration} + * @property {array} [jobSpecification.jobPreparationTask.resourceFiles] + * Files listed under this element are located in the task's working + * directory. There is a maximum size for the list of resource files. When + * the max size is exceeded, the request will fail and the response error + * code will be RequestEntityTooLarge. If this occurs, the collection of + * ResourceFiles must be reduced in size. This can be achieved using .zip + * files, Application Packages, or Docker Containers. + * @property {array} + * [jobSpecification.jobPreparationTask.environmentSettings] + * @property {object} [jobSpecification.jobPreparationTask.constraints] + * @property {moment.duration} * [jobSpecification.jobPreparationTask.constraints.maxWallClockTime] If this * is not specified, there is no time limit on how long the task may run. - * @member {moment.duration} + * @property {moment.duration} * [jobSpecification.jobPreparationTask.constraints.retentionTime] The - * default is infinite, i.e. the task directory will be retained until the - * compute node is removed or reimaged. - * @member {number} + * default is 7 days, i.e. the task directory will be retained for 7 days + * unless the compute node is removed or the job is deleted. + * @property {number} * [jobSpecification.jobPreparationTask.constraints.maxTaskRetryCount] Note * that this value specifically controls the number of retries for the task * executable due to a nonzero exit code. The Batch service will try the task @@ -293,11 +305,9 @@ class JobSchedulePatchParameter { * retry count is 3, Batch tries the task up to 4 times (one initial try and * 3 retries). If the maximum retry count is 0, the Batch service does not * retry the task after the first attempt. If the maximum retry count is -1, - * the Batch service retries the task without limit. Resource files and - * application packages are only downloaded again if the task is retried on a - * new compute node. - * @member {boolean} [jobSpecification.jobPreparationTask.waitForSuccess] If - * true and the Job Preparation task fails on a compute node, the Batch + * the Batch service retries the task without limit. + * @property {boolean} [jobSpecification.jobPreparationTask.waitForSuccess] + * If true and the Job Preparation task fails on a compute node, the Batch * service retries the Job Preparation task up to its maximum retry count (as * specified in the constraints element). If the task has still not completed * successfully after all retries, then the Batch service will not schedule @@ -308,40 +318,40 @@ class JobSchedulePatchParameter { * Preparation task is still running; and even if the Job Preparation task * fails, new tasks will continue to be scheduled on the node. The default * value is true. - * @member {object} [jobSpecification.jobPreparationTask.userIdentity] If + * @property {object} [jobSpecification.jobPreparationTask.userIdentity] If * omitted, the task runs as a non-administrative user unique to the task on - * Windows nodes, or a a non-administrative user unique to the pool on Linux + * Windows nodes, or a non-administrative user unique to the pool on Linux * nodes. - * @member {string} + * @property {string} * [jobSpecification.jobPreparationTask.userIdentity.userName] The userName * and autoUser properties are mutually exclusive; you must specify one but * not both. - * @member {object} + * @property {object} * [jobSpecification.jobPreparationTask.userIdentity.autoUser] The userName * and autoUser properties are mutually exclusive; you must specify one but * not both. - * @member {string} + * @property {string} * [jobSpecification.jobPreparationTask.userIdentity.autoUser.scope] The * default value is task. Possible values include: 'task', 'pool' - * @member {string} + * @property {string} * [jobSpecification.jobPreparationTask.userIdentity.autoUser.elevationLevel] * The default value is nonAdmin. Possible values include: 'nonAdmin', * 'admin' - * @member {boolean} + * @property {boolean} * [jobSpecification.jobPreparationTask.rerunOnNodeRebootAfterSuccess] The * Job Preparation task is always rerun if a compute node is reimaged, or if * the Job Preparation task did not complete (e.g. because the reboot * occurred while the task was running). Therefore, you should always write a * Job Preparation task to be idempotent and to behave correctly if run * multiple times. The default value is true. - * @member {object} [jobSpecification.jobReleaseTask] The primary purpose of - * the Job Release task is to undo changes to compute nodes made by the Job - * Preparation task. Example activities include deleting local files, or + * @property {object} [jobSpecification.jobReleaseTask] The primary purpose + * of the Job Release task is to undo changes to compute nodes made by the + * Job Preparation task. Example activities include deleting local files, or * shutting down services that were started as part of job preparation. A Job * Release task cannot be specified without also specifying a Job Preparation * task for the job. The Batch service runs the Job Release task on the * compute nodes that have run the Job Preparation task. - * @member {string} [jobSpecification.jobReleaseTask.id] The ID can contain + * @property {string} [jobSpecification.jobReleaseTask.id] The ID can contain * any combination of alphanumeric characters including hyphens and * underscores and cannot contain more than 64 characters. If you do not * specify this property, the Batch service assigns a default value of @@ -350,108 +360,109 @@ class JobSchedulePatchParameter { * service rejects the request with error code TaskIdSameAsJobReleaseTask; if * you are calling the REST API directly, the HTTP status code is 409 * (Conflict). - * @member {string} [jobSpecification.jobReleaseTask.commandLine] The command - * line does not run under a shell, and therefore cannot take advantage of - * shell features such as environment variable expansion. If you want to take - * advantage of such features, you should invoke the shell in the command - * line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c - * MyCommand" in Linux. If the command line refers to file paths, it should - * use a relative path (relative to the task working directory), or use the - * Batch provided environment variable + * @property {string} [jobSpecification.jobReleaseTask.commandLine] The + * command line does not run under a shell, and therefore cannot take + * advantage of shell features such as environment variable expansion. If you + * want to take advantage of such features, you should invoke the shell in + * the command line, for example using "cmd /c MyCommand" in Windows or + * "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, + * it should use a relative path (relative to the task working directory), or + * use the Batch provided environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [jobSpecification.jobReleaseTask.containerSettings] When - * this is specified, all directories recursively below the + * @property {object} [jobSpecification.jobReleaseTask.containerSettings] + * When this is specified, all directories recursively below the * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) * are mapped into the container, all task environment variables are mapped * into the container, and the task command line is executed in the * container. - * @member {string} + * @property {string} * [jobSpecification.jobReleaseTask.containerSettings.containerRunOptions] * These additional options are supplied as arguments to the "docker create" * command, in addition to those controlled by the Batch Service. - * @member {string} + * @property {string} * [jobSpecification.jobReleaseTask.containerSettings.imageName] This is the * full image reference, as would be specified to "docker pull". If no tag is * provided as part of the image name, the tag ":latest" is used as a * default. - * @member {object} + * @property {object} * [jobSpecification.jobReleaseTask.containerSettings.registry] This setting * can be omitted if was already provided at pool creation. - * @member {string} + * @property {string} * [jobSpecification.jobReleaseTask.containerSettings.registry.registryServer] * If omitted, the default is "docker.io". - * @member {string} + * @property {string} * [jobSpecification.jobReleaseTask.containerSettings.registry.userName] - * @member {string} + * @property {string} * [jobSpecification.jobReleaseTask.containerSettings.registry.password] - * @member {array} [jobSpecification.jobReleaseTask.resourceFiles] Files + * @property {array} [jobSpecification.jobReleaseTask.resourceFiles] Files * listed under this element are located in the task's working directory. - * @member {array} [jobSpecification.jobReleaseTask.environmentSettings] - * @member {moment.duration} + * @property {array} [jobSpecification.jobReleaseTask.environmentSettings] + * @property {moment.duration} * [jobSpecification.jobReleaseTask.maxWallClockTime] - * @member {moment.duration} [jobSpecification.jobReleaseTask.retentionTime] - * The default is infinite, i.e. the task directory will be retained until - * the compute node is removed or reimaged. - * @member {object} [jobSpecification.jobReleaseTask.userIdentity] If + * @property {moment.duration} + * [jobSpecification.jobReleaseTask.retentionTime] The default is 7 days, + * i.e. the task directory will be retained for 7 days unless the compute + * node is removed or the job is deleted. + * @property {object} [jobSpecification.jobReleaseTask.userIdentity] If * omitted, the task runs as a non-administrative user unique to the task. - * @member {string} [jobSpecification.jobReleaseTask.userIdentity.userName] + * @property {string} [jobSpecification.jobReleaseTask.userIdentity.userName] * The userName and autoUser properties are mutually exclusive; you must * specify one but not both. - * @member {object} [jobSpecification.jobReleaseTask.userIdentity.autoUser] + * @property {object} [jobSpecification.jobReleaseTask.userIdentity.autoUser] * The userName and autoUser properties are mutually exclusive; you must * specify one but not both. - * @member {string} + * @property {string} * [jobSpecification.jobReleaseTask.userIdentity.autoUser.scope] The default * value is task. Possible values include: 'task', 'pool' - * @member {string} + * @property {string} * [jobSpecification.jobReleaseTask.userIdentity.autoUser.elevationLevel] The * default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {array} [jobSpecification.commonEnvironmentSettings] Individual + * @property {array} [jobSpecification.commonEnvironmentSettings] Individual * tasks can override an environment setting specified here by specifying the * same setting name with a different value. - * @member {object} [jobSpecification.poolInfo] - * @member {string} [jobSpecification.poolInfo.poolId] You must ensure that + * @property {object} [jobSpecification.poolInfo] + * @property {string} [jobSpecification.poolInfo.poolId] You must ensure that * the pool referenced by this property exists. If the pool does not exist at * the time the Batch service tries to schedule a job, no tasks for the job * will run until you create a pool with that id. Note that the Batch service * will not reject the job request; it will simply not run tasks until the * pool exists. You must specify either the pool ID or the auto pool * specification, but not both. - * @member {object} [jobSpecification.poolInfo.autoPoolSpecification] If auto - * pool creation fails, the Batch service moves the job to a completed state, - * and the pool creation error is set in the job's scheduling error property. - * The Batch service manages the lifetime (both creation and, unless - * keepAlive is specified, deletion) of the auto pool. Any user actions that - * affect the lifetime of the auto pool while the job is active will result - * in unexpected behavior. You must specify either the pool ID or the auto - * pool specification, but not both. - * @member {string} + * @property {object} [jobSpecification.poolInfo.autoPoolSpecification] If + * auto pool creation fails, the Batch service moves the job to a completed + * state, and the pool creation error is set in the job's scheduling error + * property. The Batch service manages the lifetime (both creation and, + * unless keepAlive is specified, deletion) of the auto pool. Any user + * actions that affect the lifetime of the auto pool while the job is active + * will result in unexpected behavior. You must specify either the pool ID or + * the auto pool specification, but not both. + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.autoPoolIdPrefix] The * Batch service assigns each auto pool a unique identifier on creation. To * distinguish between pools created for different purposes, you can specify * this element to add a prefix to the ID that is assigned. The prefix can be * up to 20 characters long. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.poolLifetimeOption] * Possible values include: 'jobSchedule', 'job' - * @member {boolean} + * @property {boolean} * [jobSpecification.poolInfo.autoPoolSpecification.keepAlive] If false, the * Batch service deletes the pool once its lifetime (as determined by the * poolLifetimeOption setting) expires; that is, when the job or job schedule * completes. If true, the Batch service does not delete the pool * automatically. It is up to the user to delete auto pools created with this * option. - * @member {object} [jobSpecification.poolInfo.autoPoolSpecification.pool] - * @member {string} + * @property {object} [jobSpecification.poolInfo.autoPoolSpecification.pool] + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.displayName] The * display name need not be unique and can contain any Unicode characters up * to a maximum length of 1024. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.vmSize] For * information about available sizes of virtual machines in pools, see Choose * a VM size for compute nodes in an Azure Batch pool * (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration] * This property must be specified if the pool needs to be created with Azure * PaaS VMs. This property and virtualMachineConfiguration are mutually @@ -460,7 +471,7 @@ class JobSchedulePatchParameter { * REST API directly, the HTTP status code is 400 (Bad Request). This * property cannot be specified if the Batch account was created with its * poolAllocationMode property set to 'UserSubscription'. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osFamily] * Possible values are: * 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. @@ -469,55 +480,39 @@ class JobSchedulePatchParameter { * 5 - OS Family 5, equivalent to Windows Server 2016. For more information, * see Azure Guest OS Releases * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] + * @property {string} + * [jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osVersion] * The default value is * which specifies the latest operating system version * for the specified OS family. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.currentOSVersion] - * This may differ from targetOSVersion if the pool state is Upgrading. In - * this case some virtual machines may be on the targetOSVersion and some may - * be on the currentOSVersion during the upgrade process. Once all virtual - * machines have upgraded, currentOSVersion is updated to be the same as - * targetOSVersion. - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration] * This property must be specified if the pool needs to be created with Azure * IaaS VMs. This property and cloudServiceConfiguration are mutually * exclusive and one of the properties must be specified. If neither is * specified then the Batch service returns an error; if you are calling the * REST API directly, the HTTP status code is 400 (Bad Request). - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference] - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.publisher] * For example, Canonical or MicrosoftWindowsServer. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.offer] * For example, UbuntuServer or WindowsServer. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.sku] * For example, 14.04.0-LTS or 2012-R2-Datacenter. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.version] * A value of 'latest' can be specified to select the latest version of an * image. If omitted, the default is 'latest'. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.virtualMachineImageId] * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as - * the Azure Batch account. For information about the firewall settings for - * the Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The default value for caching is readwrite. For information about the - * caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' - * @member {string} + * the Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId] * The Batch node agent is a program that runs on each node in the pool, and * provides the command-and-control interface between the node and the Batch @@ -526,14 +521,14 @@ class JobSchedulePatchParameter { * which matches the selected image reference. To get the list of supported * node agent SKUs along with their list of verified image references, see * the 'List supported node agent SKUs' operation. - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] - * This property must not be specified if the imageReference or osDisk - * property specifies a Linux OS image. - * @member {boolean} + * This property must not be specified if the imageReference property + * specifies a Linux OS image. + * @property {boolean} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] * If omitted, the default value is true. - * @member {array} + * @property {array} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.dataDisks] * This property must be specified if the compute nodes in the pool need to * have empty data disks attached to them. This cannot be updated. Each node @@ -545,7 +540,7 @@ class JobSchedulePatchParameter { * https://docs.microsoft.com/en-us/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux * and * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.licenseType] * This only applies to images that contain the Windows operating system, and * should only be used when you hold valid on-premises licenses for the nodes @@ -554,110 +549,102 @@ class JobSchedulePatchParameter { * * Windows_Server - The on-premises license is for Windows Server. * Windows_Client - The on-premises license is for Windows Client. - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration] * If specified, setup is performed on each node in the pool to allow tasks * to run in containers. All regular tasks and job manager tasks run on this * pool must specify the containerSettings property, and all other tasks may * specify it. - * @member {array} + * @property {array} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration.containerImageNames] * This is the full image reference, as would be specified to "docker pull". * An image will be sourced from the default Docker registry unless the image * is fully qualified with an alternative registry. - * @member {array} + * @property {array} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration.containerRegistries] * If any images must be downloaded from a private registry which requires * credentials, then those credentials must be provided here. - * @member {number} + * @property {number} * [jobSpecification.poolInfo.autoPoolSpecification.pool.maxTasksPerNode] The * default value is 1. The maximum value of this setting depends on the size * of the compute nodes in the pool (the vmSize setting). - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.taskSchedulingPolicy] - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.taskSchedulingPolicy.nodeFillType] * Possible values include: 'spread', 'pack' - * @member {moment.duration} + * @property {moment.duration} * [jobSpecification.poolInfo.autoPoolSpecification.pool.resizeTimeout] This * timeout applies only to manual scaling; it has no effect when * enableAutoScale is set to true. The default value is 15 minutes. The * minimum value is 5 minutes. If you specify a value less than 5 minutes, * the Batch service rejects the request with an error; if you are calling * the REST API directly, the HTTP status code is 400 (Bad Request). - * @member {number} + * @property {number} * [jobSpecification.poolInfo.autoPoolSpecification.pool.targetDedicatedNodes] * This property must not be specified if enableAutoScale is set to true. If * enableAutoScale is set to false, then you must set either * targetDedicatedNodes, targetLowPriorityNodes, or both. - * @member {number} + * @property {number} * [jobSpecification.poolInfo.autoPoolSpecification.pool.targetLowPriorityNodes] * This property must not be specified if enableAutoScale is set to true. If * enableAutoScale is set to false, then you must set either * targetDedicatedNodes, targetLowPriorityNodes, or both. - * @member {boolean} + * @property {boolean} * [jobSpecification.poolInfo.autoPoolSpecification.pool.enableAutoScale] If * false, at least one of targetDedicateNodes and targetLowPriorityNodes must * be specified. If true, the autoScaleFormula element is required. The pool * automatically resizes according to the formula. The default value is * false. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.autoScaleFormula] * This property must not be specified if enableAutoScale is set to false. It * is required if enableAutoScale is set to true. The formula is checked for * validity before the pool is created. If the formula is not valid, the * Batch service rejects the request with detailed error information. - * @member {moment.duration} + * @property {moment.duration} * [jobSpecification.poolInfo.autoPoolSpecification.pool.autoScaleEvaluationInterval] * The default value is 15 minutes. The minimum and maximum value are 5 * minutes and 168 hours respectively. If you specify a value less than 5 * minutes or greater than 168 hours, the Batch service rejects the request * with an invalid property value error; if you are calling the REST API * directly, the HTTP status code is 400 (Bad Request). - * @member {boolean} + * @property {boolean} * [jobSpecification.poolInfo.autoPoolSpecification.pool.enableInterNodeCommunication] * Enabling inter-node communication limits the maximum size of the pool due * to deployment restrictions on the nodes of the pool. This may result in * the pool not reaching its desired size. The default value is false. - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration] - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.subnetId] + * This is of the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. * The virtual network must be in the same region and subscription as the * Azure Batch account. The specified subnet should have enough free IP * addresses to accommodate the number of nodes in the pool. If the subnet * doesn't have enough free IP addresses, the pool will partially allocate - * compute nodes, and a resize error will occur. The 'MicrosoftAzureBatch' - * service principal must have the 'Classic Virtual Machine Contributor' - * Role-Based Access Control (RBAC) role for the specified VNet. The - * specified subnet must allow communication from the Azure Batch service to - * be able to schedule tasks on the compute nodes. This can be verified by - * checking if the specified VNet has any associated Network Security Groups - * (NSG). If communication to the compute nodes in the specified subnet is - * denied by an NSG, then the Batch service will set the state of the compute - * nodes to unusable. For pools created with virtualMachineConfiguration only - * ARM virtual networks ('Microsoft.Network/virtualNetworks') are supported, - * but for pools created with cloudServiceConfiguration both ARM and classic - * virtual networks are supported. If the specified VNet has any associated - * Network Security Groups (NSG), then a few reserved system ports must be - * enabled for inbound communication. For pools created with a virtual - * machine configuration, enable ports 29876 and 29877, as well as port 22 - * for Linux and port 3389 for Windows. For pools created with a cloud - * service configuration, enable ports 10100, 20100, and 30100. Also enable - * outbound connections to Azure Storage on port 443. For more details see: + * compute nodes, and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks + * ('Microsoft.Network/virtualNetworks') are supported, but for pools created + * with cloudServiceConfiguration both ARM and classic virtual networks are + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration - * @member {object} + * @property {string} + * [jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.dynamicVNetAssignmentScope] + * Possible values include: 'none', 'job' + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] * Pool endpoint configuration is only supported on pools with the * virtualMachineConfiguration property. - * @member {array} + * @property {array} * [jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration.inboundNATPools] * The maximum number of inbound NAT pools per Batch pool is 5. If the * maximum number of inbound NAT pools is exceeded the request fails with * HTTP status code 400. - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask] - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.commandLine] * The command line does not run under a shell, and therefore cannot take * advantage of shell features such as environment variable expansion. If you @@ -667,57 +654,57 @@ class JobSchedulePatchParameter { * it should use a relative path (relative to the task working directory), or * use the Batch provided environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings] * When this is specified, all directories recursively below the * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) * are mapped into the container, all task environment variables are mapped * into the container, and the task command line is executed in the * container. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.containerRunOptions] * These additional options are supplied as arguments to the "docker create" * command, in addition to those controlled by the Batch Service. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.imageName] * This is the full image reference, as would be specified to "docker pull". * If no tag is provided as part of the image name, the tag ":latest" is used * as a default. - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry] * This setting can be omitted if was already provided at pool creation. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.registryServer] * If omitted, the default is "docker.io". - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.userName] - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.password] - * @member {array} + * @property {array} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.resourceFiles] * Files listed under this element are located in the task's working * directory. - * @member {array} + * @property {array} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.environmentSettings] - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.userIdentity] * If omitted, the task runs as a non-administrative user unique to the task. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.userIdentity.userName] * The userName and autoUser properties are mutually exclusive; you must * specify one but not both. - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser] * The userName and autoUser properties are mutually exclusive; you must * specify one but not both. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser.scope] * The default value is task. Possible values include: 'task', 'pool' - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser.elevationLevel] * The default value is nonAdmin. Possible values include: 'nonAdmin', * 'admin' - * @member {number} + * @property {number} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.maxTaskRetryCount] * The Batch service retries a task if its exit code is nonzero. Note that * this value specifically controls the number of retries. The Batch service @@ -726,7 +713,7 @@ class JobSchedulePatchParameter { * initial try and 3 retries). If the maximum retry count is 0, the Batch * service does not retry the task. If the maximum retry count is -1, the * Batch service retries the task without limit. - * @member {boolean} + * @property {boolean} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.waitForSuccess] * If true and the start task fails on a compute node, the Batch service * retries the start task up to its maximum retry count (maxTaskRetryCount). @@ -738,7 +725,7 @@ class JobSchedulePatchParameter { * node while the start task is still running; and even if the start task * fails, new tasks will continue to be scheduled on the node. The default is * false. - * @member {array} + * @property {array} * [jobSpecification.poolInfo.autoPoolSpecification.pool.certificateReferences] * For Windows compute nodes, the Batch service installs the certificates to * the specified certificate store and location. For Linux compute nodes, the @@ -748,25 +735,25 @@ class JobSchedulePatchParameter { * 'remoteUser', a 'certs' directory is created in the user's home directory * (e.g., /home/{user-name}/certs) and certificates are placed in that * directory. - * @member {array} + * @property {array} * [jobSpecification.poolInfo.autoPoolSpecification.pool.applicationPackageReferences] - * @member {array} + * @property {array} * [jobSpecification.poolInfo.autoPoolSpecification.pool.applicationLicenses] * The list of application licenses must be a subset of available Batch * service application licenses. If a license is requested which is not * supported, pool creation will fail. The permitted licenses available on * the pool are 'maya', 'vray', '3dsmax', 'arnold'. An additional charge * applies for each application license added to the pool. - * @member {array} + * @property {array} * [jobSpecification.poolInfo.autoPoolSpecification.pool.userAccounts] - * @member {array} + * @property {array} * [jobSpecification.poolInfo.autoPoolSpecification.pool.metadata] The Batch * service does not assign any meaning to metadata; it is solely for the use * of user code. - * @member {array} [jobSpecification.metadata] The Batch service does not + * @property {array} [jobSpecification.metadata] The Batch service does not * assign any meaning to metadata; it is solely for the use of user code. - * @member {array} [metadata] A list of name-value pairs associated with the - * job schedule as metadata. If you do not specify this element, existing + * @property {array} [metadata] A list of name-value pairs associated with + * the job schedule as metadata. If you do not specify this element, existing * metadata is left unchanged. */ constructor() { diff --git a/lib/services/batch/lib/models/jobScheduleStatistics.js b/lib/services/batch/lib/models/jobScheduleStatistics.js index 983e09a825..003595ba7e 100644 --- a/lib/services/batch/lib/models/jobScheduleStatistics.js +++ b/lib/services/batch/lib/models/jobScheduleStatistics.js @@ -17,44 +17,44 @@ class JobScheduleStatistics { /** * Create a JobScheduleStatistics. - * @member {string} url The URL of the statistics. - * @member {date} startTime The start time of the time range covered by the + * @property {string} url The URL of the statistics. + * @property {date} startTime The start time of the time range covered by the * statistics. - * @member {date} lastUpdateTime The time at which the statistics were last + * @property {date} lastUpdateTime The time at which the statistics were last * updated. All statistics are limited to the range between startTime and * lastUpdateTime. - * @member {moment.duration} userCPUTime The total user mode CPU time (summed - * across all cores and all compute nodes) consumed by all tasks in all jobs - * created under the schedule. - * @member {moment.duration} kernelCPUTime The total kernel mode CPU time + * @property {moment.duration} userCPUTime The total user mode CPU time * (summed across all cores and all compute nodes) consumed by all tasks in * all jobs created under the schedule. - * @member {moment.duration} wallClockTime The total wall clock time of all + * @property {moment.duration} kernelCPUTime The total kernel mode CPU time + * (summed across all cores and all compute nodes) consumed by all tasks in + * all jobs created under the schedule. + * @property {moment.duration} wallClockTime The total wall clock time of all * the tasks in all the jobs created under the schedule. The wall clock time * is the elapsed time from when the task started running on a compute node * to when it finished (or to the last time the statistics were updated, if * the task had not finished by then). If a task was retried, this includes * the wall clock time of all the task retries. - * @member {number} readIOps The total number of disk read operations made by - * all tasks in all jobs created under the schedule. - * @member {number} writeIOps The total number of disk write operations made + * @property {number} readIOps The total number of disk read operations made * by all tasks in all jobs created under the schedule. - * @member {number} readIOGiB The total gibibytes read from disk by all tasks - * in all jobs created under the schedule. - * @member {number} writeIOGiB The total gibibytes written to disk by all + * @property {number} writeIOps The total number of disk write operations + * made by all tasks in all jobs created under the schedule. + * @property {number} readIOGiB The total gibibytes read from disk by all + * tasks in all jobs created under the schedule. + * @property {number} writeIOGiB The total gibibytes written to disk by all * tasks in all jobs created under the schedule. - * @member {number} numSucceededTasks The total number of tasks successfully - * completed during the given time range in jobs created under the schedule. - * A task completes successfully if it returns exit code 0. - * @member {number} numFailedTasks The total number of tasks that failed + * @property {number} numSucceededTasks The total number of tasks + * successfully completed during the given time range in jobs created under + * the schedule. A task completes successfully if it returns exit code 0. + * @property {number} numFailedTasks The total number of tasks that failed * during the given time range in jobs created under the schedule. A task * fails if it exhausts its maximum retry count without returning exit code * 0. - * @member {number} numTaskRetries The total number of retries during the + * @property {number} numTaskRetries The total number of retries during the * given time range on all tasks in all jobs created under the schedule. - * @member {moment.duration} waitTime The total wait time of all tasks in all - * jobs created under the schedule. The wait time for a task is defined as - * the elapsed time between the creation of the task and the start of task + * @property {moment.duration} waitTime The total wait time of all tasks in + * all jobs created under the schedule. The wait time for a task is defined + * as the elapsed time between the creation of the task and the start of task * execution. (If the task is retried due to failures, the wait time is the * time to the most recent task execution.). This value is only reported in * the account lifetime statistics; it is not included in the job statistics. diff --git a/lib/services/batch/lib/models/jobScheduleTerminateOptions.js b/lib/services/batch/lib/models/jobScheduleTerminateOptions.js index d759b71a3a..b9fca9cf80 100644 --- a/lib/services/batch/lib/models/jobScheduleTerminateOptions.js +++ b/lib/services/batch/lib/models/jobScheduleTerminateOptions.js @@ -17,30 +17,30 @@ class JobScheduleTerminateOptions { /** * Create a JobScheduleTerminateOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. + * @property {string} [ifMatch] An ETag value associated with the version of * the resource known to the client. The operation will be performed only if * the resource's current ETag on the service exactly matches the value * specified by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version + * @property {string} [ifNoneMatch] An ETag value associated with the version * of the resource known to the client. The operation will be performed only * if the resource's current ETag on the service does not match the value * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last + * @property {date} [ifModifiedSince] A timestamp indicating the last + * modified time of the resource known to the client. The operation will be + * performed only if the resource on the service has been modified since the + * specified time. + * @property {date} [ifUnmodifiedSince] A timestamp indicating the last * modified time of the resource known to the client. The operation will be * performed only if the resource on the service has not been modified since * the specified time. diff --git a/lib/services/batch/lib/models/jobScheduleUpdateOptions.js b/lib/services/batch/lib/models/jobScheduleUpdateOptions.js index a5f2bbb7a5..b973dd1cf3 100644 --- a/lib/services/batch/lib/models/jobScheduleUpdateOptions.js +++ b/lib/services/batch/lib/models/jobScheduleUpdateOptions.js @@ -17,30 +17,30 @@ class JobScheduleUpdateOptions { /** * Create a JobScheduleUpdateOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. + * @property {string} [ifMatch] An ETag value associated with the version of * the resource known to the client. The operation will be performed only if * the resource's current ETag on the service exactly matches the value * specified by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version + * @property {string} [ifNoneMatch] An ETag value associated with the version * of the resource known to the client. The operation will be performed only * if the resource's current ETag on the service does not match the value * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last + * @property {date} [ifModifiedSince] A timestamp indicating the last + * modified time of the resource known to the client. The operation will be + * performed only if the resource on the service has been modified since the + * specified time. + * @property {date} [ifUnmodifiedSince] A timestamp indicating the last * modified time of the resource known to the client. The operation will be * performed only if the resource on the service has not been modified since * the specified time. diff --git a/lib/services/batch/lib/models/jobScheduleUpdateParameter.js b/lib/services/batch/lib/models/jobScheduleUpdateParameter.js index bb403ca123..687456a3c4 100644 --- a/lib/services/batch/lib/models/jobScheduleUpdateParameter.js +++ b/lib/services/batch/lib/models/jobScheduleUpdateParameter.js @@ -17,15 +17,15 @@ class JobScheduleUpdateParameter { /** * Create a JobScheduleUpdateParameter. - * @member {object} schedule The schedule according to which jobs will be + * @property {object} schedule The schedule according to which jobs will be * created. If you do not specify this element, it is equivalent to passing * the default schedule: that is, a single job scheduled to run immediately. - * @member {date} [schedule.doNotRunUntil] If you do not specify a + * @property {date} [schedule.doNotRunUntil] If you do not specify a * doNotRunUntil time, the schedule becomes ready to create jobs immediately. - * @member {date} [schedule.doNotRunAfter] If you do not specify a + * @property {date} [schedule.doNotRunAfter] If you do not specify a * doNotRunAfter time, and you are creating a recurring job schedule, the job * schedule will remain active until you explicitly terminate it. - * @member {moment.duration} [schedule.startWindow] If a job is not created + * @property {moment.duration} [schedule.startWindow] If a job is not created * within the startWindow interval, then the 'opportunity' is lost; no job * will be created until the next recurrence of the schedule. If the schedule * is recurring, and the startWindow is longer than the recurrence interval, @@ -35,7 +35,7 @@ class JobScheduleUpdateParameter { * minute. If you specify a lower value, the Batch service rejects the * schedule with an error; if you are calling the REST API directly, the HTTP * status code is 400 (Bad Request). - * @member {moment.duration} [schedule.recurrenceInterval] Because a job + * @property {moment.duration} [schedule.recurrenceInterval] Because a job * schedule can have at most one active job under it at any given time, if it * is time to create a new job under a job schedule, but the previous job is * still running, the Batch service will not create the new job until the @@ -51,36 +51,48 @@ class JobScheduleUpdateParameter { * minute. If you specify a lower value, the Batch service rejects the * schedule with an error; if you are calling the REST API directly, the HTTP * status code is 400 (Bad Request). - * @member {object} jobSpecification Details of the jobs to be created on + * @property {object} jobSpecification Details of the jobs to be created on * this schedule. Updates affect only jobs that are started after the update * has taken place. Any currently active job continues with the older * specification. - * @member {number} [jobSpecification.priority] Priority values can range + * @property {number} [jobSpecification.priority] Priority values can range * from -1000 to 1000, with -1000 being the lowest priority and 1000 being * the highest priority. The default value is 0. This priority is used as the * default for all jobs under the job schedule. You can update a job's * priority after it has been created using by using the update job API. - * @member {string} [jobSpecification.displayName] The name need not be + * @property {string} [jobSpecification.displayName] The name need not be * unique and can contain any Unicode characters up to a maximum length of * 1024. - * @member {boolean} [jobSpecification.usesTaskDependencies] - * @member {string} [jobSpecification.onAllTasksComplete] Note that if a job - * contains no tasks, then all tasks are considered complete. This option is - * therefore most commonly used with a Job Manager task; if you want to use - * automatic job termination without a Job Manager, you should initially set - * onAllTasksComplete to noaction and update the job properties to set + * @property {boolean} [jobSpecification.usesTaskDependencies] + * @property {string} [jobSpecification.onAllTasksComplete] Note that if a + * job contains no tasks, then all tasks are considered complete. This option + * is therefore most commonly used with a Job Manager task; if you want to + * use automatic job termination without a Job Manager, you should initially + * set onAllTasksComplete to noaction and update the job properties to set * onAllTasksComplete to terminatejob once you have finished adding tasks. * The default is noaction. Possible values include: 'noAction', * 'terminateJob' - * @member {string} [jobSpecification.onTaskFailure] The default is noaction. - * Possible values include: 'noAction', 'performExitOptionsJobAction' - * @member {object} [jobSpecification.constraints] - * @member {moment.duration} [jobSpecification.constraints.maxWallClockTime] - * If the job does not complete within the time limit, the Batch service - * terminates it and any tasks that are still running. In this case, the - * termination reason will be MaxWallClockTimeExpiry. If this property is not - * specified, there is no time limit on how long the job may run. - * @member {number} [jobSpecification.constraints.maxTaskRetryCount] Note + * @property {string} [jobSpecification.onTaskFailure] The default is + * noaction. Possible values include: 'noAction', + * 'performExitOptionsJobAction' + * @property {object} [jobSpecification.networkConfiguration] + * @property {string} [jobSpecification.networkConfiguration.subnetId] This + * is only supported for jobs running on VirtualMachineConfiguration pools. + * This is of the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. + * The virtual network must be in the same region and subscription as the + * Azure Batch account. The specified subnet should have enough free IP + * addresses to accommodate the number of nodes which will run tasks from the + * job. For more details, see + * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + * @property {object} [jobSpecification.constraints] + * @property {moment.duration} + * [jobSpecification.constraints.maxWallClockTime] If the job does not + * complete within the time limit, the Batch service terminates it and any + * tasks that are still running. In this case, the termination reason will be + * MaxWallClockTimeExpiry. If this property is not specified, there is no + * time limit on how long the job may run. + * @property {number} [jobSpecification.constraints.maxTaskRetryCount] Note * that this value specifically controls the number of retries. The Batch * service will try each task once, and may then retry up to this limit. For * example, if the maximum retry count is 3, Batch tries a task up to 4 times @@ -88,27 +100,27 @@ class JobScheduleUpdateParameter { * Batch service does not retry tasks. If the maximum retry count is -1, the * Batch service retries tasks without limit. The default value is 0 (no * retries). - * @member {object} [jobSpecification.jobManagerTask] If the job does not + * @property {object} [jobSpecification.jobManagerTask] If the job does not * specify a Job Manager task, the user must explicitly add tasks to the job * using the Task API. If the job does specify a Job Manager task, the Batch * service creates the Job Manager task when the job is created, and will try * to schedule the Job Manager task before scheduling other tasks in the job. - * @member {string} [jobSpecification.jobManagerTask.id] The ID can contain + * @property {string} [jobSpecification.jobManagerTask.id] The ID can contain * any combination of alphanumeric characters including hyphens and * underscores and cannot contain more than 64 characters. - * @member {string} [jobSpecification.jobManagerTask.displayName] It need not - * be unique and can contain any Unicode characters up to a maximum length of - * 1024. - * @member {string} [jobSpecification.jobManagerTask.commandLine] The command - * line does not run under a shell, and therefore cannot take advantage of - * shell features such as environment variable expansion. If you want to take - * advantage of such features, you should invoke the shell in the command - * line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c - * MyCommand" in Linux. If the command line refers to file paths, it should - * use a relative path (relative to the task working directory), or use the - * Batch provided environment variable + * @property {string} [jobSpecification.jobManagerTask.displayName] It need + * not be unique and can contain any Unicode characters up to a maximum + * length of 1024. + * @property {string} [jobSpecification.jobManagerTask.commandLine] The + * command line does not run under a shell, and therefore cannot take + * advantage of shell features such as environment variable expansion. If you + * want to take advantage of such features, you should invoke the shell in + * the command line, for example using "cmd /c MyCommand" in Windows or + * "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, + * it should use a relative path (relative to the task working directory), or + * use the Batch provided environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [jobSpecification.jobManagerTask.containerSettings] If + * @property {object} [jobSpecification.jobManagerTask.containerSettings] If * the pool that will run this task has containerConfiguration set, this must * be set as well. If the pool that will run this task doesn't have * containerConfiguration set, this must not be set. When this is specified, @@ -116,45 +128,45 @@ class JobScheduleUpdateParameter { * Azure Batch directories on the node) are mapped into the container, all * task environment variables are mapped into the container, and the task * command line is executed in the container. - * @member {string} + * @property {string} * [jobSpecification.jobManagerTask.containerSettings.containerRunOptions] * These additional options are supplied as arguments to the "docker create" * command, in addition to those controlled by the Batch Service. - * @member {string} + * @property {string} * [jobSpecification.jobManagerTask.containerSettings.imageName] This is the * full image reference, as would be specified to "docker pull". If no tag is * provided as part of the image name, the tag ":latest" is used as a * default. - * @member {object} + * @property {object} * [jobSpecification.jobManagerTask.containerSettings.registry] This setting * can be omitted if was already provided at pool creation. - * @member {string} + * @property {string} * [jobSpecification.jobManagerTask.containerSettings.registry.registryServer] * If omitted, the default is "docker.io". - * @member {string} + * @property {string} * [jobSpecification.jobManagerTask.containerSettings.registry.userName] - * @member {string} + * @property {string} * [jobSpecification.jobManagerTask.containerSettings.registry.password] - * @member {array} [jobSpecification.jobManagerTask.resourceFiles] Files + * @property {array} [jobSpecification.jobManagerTask.resourceFiles] Files * listed under this element are located in the task's working directory. * There is a maximum size for the list of resource files. When the max size * is exceeded, the request will fail and the response error code will be * RequestEntityTooLarge. If this occurs, the collection of ResourceFiles * must be reduced in size. This can be achieved using .zip files, * Application Packages, or Docker Containers. - * @member {array} [jobSpecification.jobManagerTask.outputFiles] For + * @property {array} [jobSpecification.jobManagerTask.outputFiles] For * multi-instance tasks, the files will only be uploaded from the compute * node on which the primary task is executed. - * @member {array} [jobSpecification.jobManagerTask.environmentSettings] - * @member {object} [jobSpecification.jobManagerTask.constraints] - * @member {moment.duration} + * @property {array} [jobSpecification.jobManagerTask.environmentSettings] + * @property {object} [jobSpecification.jobManagerTask.constraints] + * @property {moment.duration} * [jobSpecification.jobManagerTask.constraints.maxWallClockTime] If this is * not specified, there is no time limit on how long the task may run. - * @member {moment.duration} + * @property {moment.duration} * [jobSpecification.jobManagerTask.constraints.retentionTime] The default is - * infinite, i.e. the task directory will be retained until the compute node - * is removed or reimaged. - * @member {number} + * 7 days, i.e. the task directory will be retained for 7 days unless the + * compute node is removed or the job is deleted. + * @property {number} * [jobSpecification.jobManagerTask.constraints.maxTaskRetryCount] Note that * this value specifically controls the number of retries for the task * executable due to a nonzero exit code. The Batch service will try the task @@ -162,14 +174,12 @@ class JobScheduleUpdateParameter { * retry count is 3, Batch tries the task up to 4 times (one initial try and * 3 retries). If the maximum retry count is 0, the Batch service does not * retry the task after the first attempt. If the maximum retry count is -1, - * the Batch service retries the task without limit. Resource files and - * application packages are only downloaded again if the task is retried on a - * new compute node. - * @member {boolean} [jobSpecification.jobManagerTask.killJobOnCompletion] If - * true, when the Job Manager task completes, the Batch service marks the job - * as complete. If any tasks are still running at this time (other than Job - * Release), those tasks are terminated. If false, the completion of the Job - * Manager task does not affect the job status. In this case, you should + * the Batch service retries the task without limit. + * @property {boolean} [jobSpecification.jobManagerTask.killJobOnCompletion] + * If true, when the Job Manager task completes, the Batch service marks the + * job as complete. If any tasks are still running at this time (other than + * Job Release), those tasks are terminated. If false, the completion of the + * Job Manager task does not affect the job status. In this case, you should * either use the onAllTasksComplete attribute to terminate the job, or have * a client or user terminate the job explicitly. An example of this is if * the Job Manager creates a set of tasks but then takes no further role in @@ -178,27 +188,27 @@ class JobScheduleUpdateParameter { * and using the Job Manager task only to create the tasks for the job (not * to monitor progress), then it is important to set killJobOnCompletion to * false. - * @member {object} [jobSpecification.jobManagerTask.userIdentity] If + * @property {object} [jobSpecification.jobManagerTask.userIdentity] If * omitted, the task runs as a non-administrative user unique to the task. - * @member {string} [jobSpecification.jobManagerTask.userIdentity.userName] + * @property {string} [jobSpecification.jobManagerTask.userIdentity.userName] * The userName and autoUser properties are mutually exclusive; you must * specify one but not both. - * @member {object} [jobSpecification.jobManagerTask.userIdentity.autoUser] + * @property {object} [jobSpecification.jobManagerTask.userIdentity.autoUser] * The userName and autoUser properties are mutually exclusive; you must * specify one but not both. - * @member {string} + * @property {string} * [jobSpecification.jobManagerTask.userIdentity.autoUser.scope] The default * value is task. Possible values include: 'task', 'pool' - * @member {string} + * @property {string} * [jobSpecification.jobManagerTask.userIdentity.autoUser.elevationLevel] The * default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {boolean} [jobSpecification.jobManagerTask.runExclusive] If true, - * no other tasks will run on the same compute node for as long as the Job - * Manager is running. If false, other tasks can run simultaneously with the - * Job Manager on a compute node. The Job Manager task counts normally + * @property {boolean} [jobSpecification.jobManagerTask.runExclusive] If + * true, no other tasks will run on the same compute node for as long as the + * Job Manager is running. If false, other tasks can run simultaneously with + * the Job Manager on a compute node. The Job Manager task counts normally * against the node's concurrent task limit, so this is only relevant if the * node allows multiple concurrent tasks. The default value is true. - * @member {array} + * @property {array} * [jobSpecification.jobManagerTask.applicationPackageReferences] Application * packages are downloaded and deployed to a shared directory, not the task * working directory. Therefore, if a referenced package is already on the @@ -206,7 +216,7 @@ class JobScheduleUpdateParameter { * existing copy on the compute node is used. If a referenced application * package cannot be installed, for example because the package has been * deleted or because download failed, the task fails. - * @member {object} + * @property {object} * [jobSpecification.jobManagerTask.authenticationTokenSettings] If this * property is set, the Batch service provides the task with an * authentication token which can be used to authenticate Batch service @@ -215,18 +225,19 @@ class JobScheduleUpdateParameter { * that the task can carry out using the token depend on the settings. For * example, a task can request job permissions in order to add other tasks to * the job, or check the status of the job or of other tasks under the job. - * @member {array} + * @property {array} * [jobSpecification.jobManagerTask.authenticationTokenSettings.access] The * authentication token grants access to a limited set of Batch service * operations. Currently the only supported value for the access property is * 'job', which grants access to all operations related to the job which * contains the task. - * @member {boolean} [jobSpecification.jobManagerTask.allowLowPriorityNode] + * @property {boolean} [jobSpecification.jobManagerTask.allowLowPriorityNode] * The default value is true. - * @member {object} [jobSpecification.jobPreparationTask] If a job has a Job - * Preparation task, the Batch service will run the Job Preparation task on a - * compute node before starting any tasks of that job on that compute node. - * @member {string} [jobSpecification.jobPreparationTask.id] The ID can + * @property {object} [jobSpecification.jobPreparationTask] If a job has a + * Job Preparation task, the Batch service will run the Job Preparation task + * on a compute node before starting any tasks of that job on that compute + * node. + * @property {string} [jobSpecification.jobPreparationTask.id] The ID can * contain any combination of alphanumeric characters including hyphens and * underscores and cannot contain more than 64 characters. If you do not * specify this property, the Batch service assigns a default value of @@ -235,7 +246,7 @@ class JobScheduleUpdateParameter { * service rejects the request with error code * TaskIdSameAsJobPreparationTask; if you are calling the REST API directly, * the HTTP status code is 409 (Conflict). - * @member {string} [jobSpecification.jobPreparationTask.commandLine] The + * @property {string} [jobSpecification.jobPreparationTask.commandLine] The * command line does not run under a shell, and therefore cannot take * advantage of shell features such as environment variable expansion. If you * want to take advantage of such features, you should invoke the shell in @@ -244,48 +255,49 @@ class JobScheduleUpdateParameter { * it should use a relative path (relative to the task working directory), or * use the Batch provided environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [jobSpecification.jobPreparationTask.containerSettings] + * @property {object} [jobSpecification.jobPreparationTask.containerSettings] * When this is specified, all directories recursively below the * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) * are mapped into the container, all task environment variables are mapped * into the container, and the task command line is executed in the * container. - * @member {string} + * @property {string} * [jobSpecification.jobPreparationTask.containerSettings.containerRunOptions] * These additional options are supplied as arguments to the "docker create" * command, in addition to those controlled by the Batch Service. - * @member {string} + * @property {string} * [jobSpecification.jobPreparationTask.containerSettings.imageName] This is * the full image reference, as would be specified to "docker pull". If no * tag is provided as part of the image name, the tag ":latest" is used as a * default. - * @member {object} + * @property {object} * [jobSpecification.jobPreparationTask.containerSettings.registry] This * setting can be omitted if was already provided at pool creation. - * @member {string} + * @property {string} * [jobSpecification.jobPreparationTask.containerSettings.registry.registryServer] * If omitted, the default is "docker.io". - * @member {string} + * @property {string} * [jobSpecification.jobPreparationTask.containerSettings.registry.userName] - * @member {string} + * @property {string} * [jobSpecification.jobPreparationTask.containerSettings.registry.password] - * @member {array} [jobSpecification.jobPreparationTask.resourceFiles] Files - * listed under this element are located in the task's working directory. - * There is a maximum size for the list of resource files. When the max size - * is exceeded, the request will fail and the response error code will be - * RequestEntityTooLarge. If this occurs, the collection of ResourceFiles - * must be reduced in size. This can be achieved using .zip files, - * Application Packages, or Docker Containers. - * @member {array} [jobSpecification.jobPreparationTask.environmentSettings] - * @member {object} [jobSpecification.jobPreparationTask.constraints] - * @member {moment.duration} + * @property {array} [jobSpecification.jobPreparationTask.resourceFiles] + * Files listed under this element are located in the task's working + * directory. There is a maximum size for the list of resource files. When + * the max size is exceeded, the request will fail and the response error + * code will be RequestEntityTooLarge. If this occurs, the collection of + * ResourceFiles must be reduced in size. This can be achieved using .zip + * files, Application Packages, or Docker Containers. + * @property {array} + * [jobSpecification.jobPreparationTask.environmentSettings] + * @property {object} [jobSpecification.jobPreparationTask.constraints] + * @property {moment.duration} * [jobSpecification.jobPreparationTask.constraints.maxWallClockTime] If this * is not specified, there is no time limit on how long the task may run. - * @member {moment.duration} + * @property {moment.duration} * [jobSpecification.jobPreparationTask.constraints.retentionTime] The - * default is infinite, i.e. the task directory will be retained until the - * compute node is removed or reimaged. - * @member {number} + * default is 7 days, i.e. the task directory will be retained for 7 days + * unless the compute node is removed or the job is deleted. + * @property {number} * [jobSpecification.jobPreparationTask.constraints.maxTaskRetryCount] Note * that this value specifically controls the number of retries for the task * executable due to a nonzero exit code. The Batch service will try the task @@ -293,11 +305,9 @@ class JobScheduleUpdateParameter { * retry count is 3, Batch tries the task up to 4 times (one initial try and * 3 retries). If the maximum retry count is 0, the Batch service does not * retry the task after the first attempt. If the maximum retry count is -1, - * the Batch service retries the task without limit. Resource files and - * application packages are only downloaded again if the task is retried on a - * new compute node. - * @member {boolean} [jobSpecification.jobPreparationTask.waitForSuccess] If - * true and the Job Preparation task fails on a compute node, the Batch + * the Batch service retries the task without limit. + * @property {boolean} [jobSpecification.jobPreparationTask.waitForSuccess] + * If true and the Job Preparation task fails on a compute node, the Batch * service retries the Job Preparation task up to its maximum retry count (as * specified in the constraints element). If the task has still not completed * successfully after all retries, then the Batch service will not schedule @@ -308,40 +318,40 @@ class JobScheduleUpdateParameter { * Preparation task is still running; and even if the Job Preparation task * fails, new tasks will continue to be scheduled on the node. The default * value is true. - * @member {object} [jobSpecification.jobPreparationTask.userIdentity] If + * @property {object} [jobSpecification.jobPreparationTask.userIdentity] If * omitted, the task runs as a non-administrative user unique to the task on - * Windows nodes, or a a non-administrative user unique to the pool on Linux + * Windows nodes, or a non-administrative user unique to the pool on Linux * nodes. - * @member {string} + * @property {string} * [jobSpecification.jobPreparationTask.userIdentity.userName] The userName * and autoUser properties are mutually exclusive; you must specify one but * not both. - * @member {object} + * @property {object} * [jobSpecification.jobPreparationTask.userIdentity.autoUser] The userName * and autoUser properties are mutually exclusive; you must specify one but * not both. - * @member {string} + * @property {string} * [jobSpecification.jobPreparationTask.userIdentity.autoUser.scope] The * default value is task. Possible values include: 'task', 'pool' - * @member {string} + * @property {string} * [jobSpecification.jobPreparationTask.userIdentity.autoUser.elevationLevel] * The default value is nonAdmin. Possible values include: 'nonAdmin', * 'admin' - * @member {boolean} + * @property {boolean} * [jobSpecification.jobPreparationTask.rerunOnNodeRebootAfterSuccess] The * Job Preparation task is always rerun if a compute node is reimaged, or if * the Job Preparation task did not complete (e.g. because the reboot * occurred while the task was running). Therefore, you should always write a * Job Preparation task to be idempotent and to behave correctly if run * multiple times. The default value is true. - * @member {object} [jobSpecification.jobReleaseTask] The primary purpose of - * the Job Release task is to undo changes to compute nodes made by the Job - * Preparation task. Example activities include deleting local files, or + * @property {object} [jobSpecification.jobReleaseTask] The primary purpose + * of the Job Release task is to undo changes to compute nodes made by the + * Job Preparation task. Example activities include deleting local files, or * shutting down services that were started as part of job preparation. A Job * Release task cannot be specified without also specifying a Job Preparation * task for the job. The Batch service runs the Job Release task on the * compute nodes that have run the Job Preparation task. - * @member {string} [jobSpecification.jobReleaseTask.id] The ID can contain + * @property {string} [jobSpecification.jobReleaseTask.id] The ID can contain * any combination of alphanumeric characters including hyphens and * underscores and cannot contain more than 64 characters. If you do not * specify this property, the Batch service assigns a default value of @@ -350,108 +360,109 @@ class JobScheduleUpdateParameter { * service rejects the request with error code TaskIdSameAsJobReleaseTask; if * you are calling the REST API directly, the HTTP status code is 409 * (Conflict). - * @member {string} [jobSpecification.jobReleaseTask.commandLine] The command - * line does not run under a shell, and therefore cannot take advantage of - * shell features such as environment variable expansion. If you want to take - * advantage of such features, you should invoke the shell in the command - * line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c - * MyCommand" in Linux. If the command line refers to file paths, it should - * use a relative path (relative to the task working directory), or use the - * Batch provided environment variable + * @property {string} [jobSpecification.jobReleaseTask.commandLine] The + * command line does not run under a shell, and therefore cannot take + * advantage of shell features such as environment variable expansion. If you + * want to take advantage of such features, you should invoke the shell in + * the command line, for example using "cmd /c MyCommand" in Windows or + * "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, + * it should use a relative path (relative to the task working directory), or + * use the Batch provided environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [jobSpecification.jobReleaseTask.containerSettings] When - * this is specified, all directories recursively below the + * @property {object} [jobSpecification.jobReleaseTask.containerSettings] + * When this is specified, all directories recursively below the * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) * are mapped into the container, all task environment variables are mapped * into the container, and the task command line is executed in the * container. - * @member {string} + * @property {string} * [jobSpecification.jobReleaseTask.containerSettings.containerRunOptions] * These additional options are supplied as arguments to the "docker create" * command, in addition to those controlled by the Batch Service. - * @member {string} + * @property {string} * [jobSpecification.jobReleaseTask.containerSettings.imageName] This is the * full image reference, as would be specified to "docker pull". If no tag is * provided as part of the image name, the tag ":latest" is used as a * default. - * @member {object} + * @property {object} * [jobSpecification.jobReleaseTask.containerSettings.registry] This setting * can be omitted if was already provided at pool creation. - * @member {string} + * @property {string} * [jobSpecification.jobReleaseTask.containerSettings.registry.registryServer] * If omitted, the default is "docker.io". - * @member {string} + * @property {string} * [jobSpecification.jobReleaseTask.containerSettings.registry.userName] - * @member {string} + * @property {string} * [jobSpecification.jobReleaseTask.containerSettings.registry.password] - * @member {array} [jobSpecification.jobReleaseTask.resourceFiles] Files + * @property {array} [jobSpecification.jobReleaseTask.resourceFiles] Files * listed under this element are located in the task's working directory. - * @member {array} [jobSpecification.jobReleaseTask.environmentSettings] - * @member {moment.duration} + * @property {array} [jobSpecification.jobReleaseTask.environmentSettings] + * @property {moment.duration} * [jobSpecification.jobReleaseTask.maxWallClockTime] - * @member {moment.duration} [jobSpecification.jobReleaseTask.retentionTime] - * The default is infinite, i.e. the task directory will be retained until - * the compute node is removed or reimaged. - * @member {object} [jobSpecification.jobReleaseTask.userIdentity] If + * @property {moment.duration} + * [jobSpecification.jobReleaseTask.retentionTime] The default is 7 days, + * i.e. the task directory will be retained for 7 days unless the compute + * node is removed or the job is deleted. + * @property {object} [jobSpecification.jobReleaseTask.userIdentity] If * omitted, the task runs as a non-administrative user unique to the task. - * @member {string} [jobSpecification.jobReleaseTask.userIdentity.userName] + * @property {string} [jobSpecification.jobReleaseTask.userIdentity.userName] * The userName and autoUser properties are mutually exclusive; you must * specify one but not both. - * @member {object} [jobSpecification.jobReleaseTask.userIdentity.autoUser] + * @property {object} [jobSpecification.jobReleaseTask.userIdentity.autoUser] * The userName and autoUser properties are mutually exclusive; you must * specify one but not both. - * @member {string} + * @property {string} * [jobSpecification.jobReleaseTask.userIdentity.autoUser.scope] The default * value is task. Possible values include: 'task', 'pool' - * @member {string} + * @property {string} * [jobSpecification.jobReleaseTask.userIdentity.autoUser.elevationLevel] The * default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {array} [jobSpecification.commonEnvironmentSettings] Individual + * @property {array} [jobSpecification.commonEnvironmentSettings] Individual * tasks can override an environment setting specified here by specifying the * same setting name with a different value. - * @member {object} [jobSpecification.poolInfo] - * @member {string} [jobSpecification.poolInfo.poolId] You must ensure that + * @property {object} [jobSpecification.poolInfo] + * @property {string} [jobSpecification.poolInfo.poolId] You must ensure that * the pool referenced by this property exists. If the pool does not exist at * the time the Batch service tries to schedule a job, no tasks for the job * will run until you create a pool with that id. Note that the Batch service * will not reject the job request; it will simply not run tasks until the * pool exists. You must specify either the pool ID or the auto pool * specification, but not both. - * @member {object} [jobSpecification.poolInfo.autoPoolSpecification] If auto - * pool creation fails, the Batch service moves the job to a completed state, - * and the pool creation error is set in the job's scheduling error property. - * The Batch service manages the lifetime (both creation and, unless - * keepAlive is specified, deletion) of the auto pool. Any user actions that - * affect the lifetime of the auto pool while the job is active will result - * in unexpected behavior. You must specify either the pool ID or the auto - * pool specification, but not both. - * @member {string} + * @property {object} [jobSpecification.poolInfo.autoPoolSpecification] If + * auto pool creation fails, the Batch service moves the job to a completed + * state, and the pool creation error is set in the job's scheduling error + * property. The Batch service manages the lifetime (both creation and, + * unless keepAlive is specified, deletion) of the auto pool. Any user + * actions that affect the lifetime of the auto pool while the job is active + * will result in unexpected behavior. You must specify either the pool ID or + * the auto pool specification, but not both. + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.autoPoolIdPrefix] The * Batch service assigns each auto pool a unique identifier on creation. To * distinguish between pools created for different purposes, you can specify * this element to add a prefix to the ID that is assigned. The prefix can be * up to 20 characters long. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.poolLifetimeOption] * Possible values include: 'jobSchedule', 'job' - * @member {boolean} + * @property {boolean} * [jobSpecification.poolInfo.autoPoolSpecification.keepAlive] If false, the * Batch service deletes the pool once its lifetime (as determined by the * poolLifetimeOption setting) expires; that is, when the job or job schedule * completes. If true, the Batch service does not delete the pool * automatically. It is up to the user to delete auto pools created with this * option. - * @member {object} [jobSpecification.poolInfo.autoPoolSpecification.pool] - * @member {string} + * @property {object} [jobSpecification.poolInfo.autoPoolSpecification.pool] + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.displayName] The * display name need not be unique and can contain any Unicode characters up * to a maximum length of 1024. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.vmSize] For * information about available sizes of virtual machines in pools, see Choose * a VM size for compute nodes in an Azure Batch pool * (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration] * This property must be specified if the pool needs to be created with Azure * PaaS VMs. This property and virtualMachineConfiguration are mutually @@ -460,7 +471,7 @@ class JobScheduleUpdateParameter { * REST API directly, the HTTP status code is 400 (Bad Request). This * property cannot be specified if the Batch account was created with its * poolAllocationMode property set to 'UserSubscription'. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osFamily] * Possible values are: * 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. @@ -469,55 +480,39 @@ class JobScheduleUpdateParameter { * 5 - OS Family 5, equivalent to Windows Server 2016. For more information, * see Azure Guest OS Releases * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] + * @property {string} + * [jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osVersion] * The default value is * which specifies the latest operating system version * for the specified OS family. - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.currentOSVersion] - * This may differ from targetOSVersion if the pool state is Upgrading. In - * this case some virtual machines may be on the targetOSVersion and some may - * be on the currentOSVersion during the upgrade process. Once all virtual - * machines have upgraded, currentOSVersion is updated to be the same as - * targetOSVersion. - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration] * This property must be specified if the pool needs to be created with Azure * IaaS VMs. This property and cloudServiceConfiguration are mutually * exclusive and one of the properties must be specified. If neither is * specified then the Batch service returns an error; if you are calling the * REST API directly, the HTTP status code is 400 (Bad Request). - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference] - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.publisher] * For example, Canonical or MicrosoftWindowsServer. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.offer] * For example, UbuntuServer or WindowsServer. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.sku] * For example, 14.04.0-LTS or 2012-R2-Datacenter. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.version] * A value of 'latest' can be specified to select the latest version of an * image. If omitted, the default is 'latest'. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.virtualMachineImageId] * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as - * the Azure Batch account. For information about the firewall settings for - * the Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * @member {object} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * @member {string} - * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The default value for caching is readwrite. For information about the - * caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' - * @member {string} + * the Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId] * The Batch node agent is a program that runs on each node in the pool, and * provides the command-and-control interface between the node and the Batch @@ -526,14 +521,14 @@ class JobScheduleUpdateParameter { * which matches the selected image reference. To get the list of supported * node agent SKUs along with their list of verified image references, see * the 'List supported node agent SKUs' operation. - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] - * This property must not be specified if the imageReference or osDisk - * property specifies a Linux OS image. - * @member {boolean} + * This property must not be specified if the imageReference property + * specifies a Linux OS image. + * @property {boolean} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] * If omitted, the default value is true. - * @member {array} + * @property {array} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.dataDisks] * This property must be specified if the compute nodes in the pool need to * have empty data disks attached to them. This cannot be updated. Each node @@ -545,7 +540,7 @@ class JobScheduleUpdateParameter { * https://docs.microsoft.com/en-us/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux * and * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.licenseType] * This only applies to images that contain the Windows operating system, and * should only be used when you hold valid on-premises licenses for the nodes @@ -554,110 +549,102 @@ class JobScheduleUpdateParameter { * * Windows_Server - The on-premises license is for Windows Server. * Windows_Client - The on-premises license is for Windows Client. - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration] * If specified, setup is performed on each node in the pool to allow tasks * to run in containers. All regular tasks and job manager tasks run on this * pool must specify the containerSettings property, and all other tasks may * specify it. - * @member {array} + * @property {array} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration.containerImageNames] * This is the full image reference, as would be specified to "docker pull". * An image will be sourced from the default Docker registry unless the image * is fully qualified with an alternative registry. - * @member {array} + * @property {array} * [jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration.containerRegistries] * If any images must be downloaded from a private registry which requires * credentials, then those credentials must be provided here. - * @member {number} + * @property {number} * [jobSpecification.poolInfo.autoPoolSpecification.pool.maxTasksPerNode] The * default value is 1. The maximum value of this setting depends on the size * of the compute nodes in the pool (the vmSize setting). - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.taskSchedulingPolicy] - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.taskSchedulingPolicy.nodeFillType] * Possible values include: 'spread', 'pack' - * @member {moment.duration} + * @property {moment.duration} * [jobSpecification.poolInfo.autoPoolSpecification.pool.resizeTimeout] This * timeout applies only to manual scaling; it has no effect when * enableAutoScale is set to true. The default value is 15 minutes. The * minimum value is 5 minutes. If you specify a value less than 5 minutes, * the Batch service rejects the request with an error; if you are calling * the REST API directly, the HTTP status code is 400 (Bad Request). - * @member {number} + * @property {number} * [jobSpecification.poolInfo.autoPoolSpecification.pool.targetDedicatedNodes] * This property must not be specified if enableAutoScale is set to true. If * enableAutoScale is set to false, then you must set either * targetDedicatedNodes, targetLowPriorityNodes, or both. - * @member {number} + * @property {number} * [jobSpecification.poolInfo.autoPoolSpecification.pool.targetLowPriorityNodes] * This property must not be specified if enableAutoScale is set to true. If * enableAutoScale is set to false, then you must set either * targetDedicatedNodes, targetLowPriorityNodes, or both. - * @member {boolean} + * @property {boolean} * [jobSpecification.poolInfo.autoPoolSpecification.pool.enableAutoScale] If * false, at least one of targetDedicateNodes and targetLowPriorityNodes must * be specified. If true, the autoScaleFormula element is required. The pool * automatically resizes according to the formula. The default value is * false. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.autoScaleFormula] * This property must not be specified if enableAutoScale is set to false. It * is required if enableAutoScale is set to true. The formula is checked for * validity before the pool is created. If the formula is not valid, the * Batch service rejects the request with detailed error information. - * @member {moment.duration} + * @property {moment.duration} * [jobSpecification.poolInfo.autoPoolSpecification.pool.autoScaleEvaluationInterval] * The default value is 15 minutes. The minimum and maximum value are 5 * minutes and 168 hours respectively. If you specify a value less than 5 * minutes or greater than 168 hours, the Batch service rejects the request * with an invalid property value error; if you are calling the REST API * directly, the HTTP status code is 400 (Bad Request). - * @member {boolean} + * @property {boolean} * [jobSpecification.poolInfo.autoPoolSpecification.pool.enableInterNodeCommunication] * Enabling inter-node communication limits the maximum size of the pool due * to deployment restrictions on the nodes of the pool. This may result in * the pool not reaching its desired size. The default value is false. - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration] - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.subnetId] + * This is of the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. * The virtual network must be in the same region and subscription as the * Azure Batch account. The specified subnet should have enough free IP * addresses to accommodate the number of nodes in the pool. If the subnet * doesn't have enough free IP addresses, the pool will partially allocate - * compute nodes, and a resize error will occur. The 'MicrosoftAzureBatch' - * service principal must have the 'Classic Virtual Machine Contributor' - * Role-Based Access Control (RBAC) role for the specified VNet. The - * specified subnet must allow communication from the Azure Batch service to - * be able to schedule tasks on the compute nodes. This can be verified by - * checking if the specified VNet has any associated Network Security Groups - * (NSG). If communication to the compute nodes in the specified subnet is - * denied by an NSG, then the Batch service will set the state of the compute - * nodes to unusable. For pools created with virtualMachineConfiguration only - * ARM virtual networks ('Microsoft.Network/virtualNetworks') are supported, - * but for pools created with cloudServiceConfiguration both ARM and classic - * virtual networks are supported. If the specified VNet has any associated - * Network Security Groups (NSG), then a few reserved system ports must be - * enabled for inbound communication. For pools created with a virtual - * machine configuration, enable ports 29876 and 29877, as well as port 22 - * for Linux and port 3389 for Windows. For pools created with a cloud - * service configuration, enable ports 10100, 20100, and 30100. Also enable - * outbound connections to Azure Storage on port 443. For more details see: + * compute nodes, and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks + * ('Microsoft.Network/virtualNetworks') are supported, but for pools created + * with cloudServiceConfiguration both ARM and classic virtual networks are + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration - * @member {object} + * @property {string} + * [jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.dynamicVNetAssignmentScope] + * Possible values include: 'none', 'job' + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] * Pool endpoint configuration is only supported on pools with the * virtualMachineConfiguration property. - * @member {array} + * @property {array} * [jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration.inboundNATPools] * The maximum number of inbound NAT pools per Batch pool is 5. If the * maximum number of inbound NAT pools is exceeded the request fails with * HTTP status code 400. - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask] - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.commandLine] * The command line does not run under a shell, and therefore cannot take * advantage of shell features such as environment variable expansion. If you @@ -667,57 +654,57 @@ class JobScheduleUpdateParameter { * it should use a relative path (relative to the task working directory), or * use the Batch provided environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings] * When this is specified, all directories recursively below the * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) * are mapped into the container, all task environment variables are mapped * into the container, and the task command line is executed in the * container. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.containerRunOptions] * These additional options are supplied as arguments to the "docker create" * command, in addition to those controlled by the Batch Service. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.imageName] * This is the full image reference, as would be specified to "docker pull". * If no tag is provided as part of the image name, the tag ":latest" is used * as a default. - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry] * This setting can be omitted if was already provided at pool creation. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.registryServer] * If omitted, the default is "docker.io". - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.userName] - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.password] - * @member {array} + * @property {array} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.resourceFiles] * Files listed under this element are located in the task's working * directory. - * @member {array} + * @property {array} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.environmentSettings] - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.userIdentity] * If omitted, the task runs as a non-administrative user unique to the task. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.userIdentity.userName] * The userName and autoUser properties are mutually exclusive; you must * specify one but not both. - * @member {object} + * @property {object} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser] * The userName and autoUser properties are mutually exclusive; you must * specify one but not both. - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser.scope] * The default value is task. Possible values include: 'task', 'pool' - * @member {string} + * @property {string} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser.elevationLevel] * The default value is nonAdmin. Possible values include: 'nonAdmin', * 'admin' - * @member {number} + * @property {number} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.maxTaskRetryCount] * The Batch service retries a task if its exit code is nonzero. Note that * this value specifically controls the number of retries. The Batch service @@ -726,7 +713,7 @@ class JobScheduleUpdateParameter { * initial try and 3 retries). If the maximum retry count is 0, the Batch * service does not retry the task. If the maximum retry count is -1, the * Batch service retries the task without limit. - * @member {boolean} + * @property {boolean} * [jobSpecification.poolInfo.autoPoolSpecification.pool.startTask.waitForSuccess] * If true and the start task fails on a compute node, the Batch service * retries the start task up to its maximum retry count (maxTaskRetryCount). @@ -738,7 +725,7 @@ class JobScheduleUpdateParameter { * node while the start task is still running; and even if the start task * fails, new tasks will continue to be scheduled on the node. The default is * false. - * @member {array} + * @property {array} * [jobSpecification.poolInfo.autoPoolSpecification.pool.certificateReferences] * For Windows compute nodes, the Batch service installs the certificates to * the specified certificate store and location. For Linux compute nodes, the @@ -748,26 +735,26 @@ class JobScheduleUpdateParameter { * 'remoteUser', a 'certs' directory is created in the user's home directory * (e.g., /home/{user-name}/certs) and certificates are placed in that * directory. - * @member {array} + * @property {array} * [jobSpecification.poolInfo.autoPoolSpecification.pool.applicationPackageReferences] - * @member {array} + * @property {array} * [jobSpecification.poolInfo.autoPoolSpecification.pool.applicationLicenses] * The list of application licenses must be a subset of available Batch * service application licenses. If a license is requested which is not * supported, pool creation will fail. The permitted licenses available on * the pool are 'maya', 'vray', '3dsmax', 'arnold'. An additional charge * applies for each application license added to the pool. - * @member {array} + * @property {array} * [jobSpecification.poolInfo.autoPoolSpecification.pool.userAccounts] - * @member {array} + * @property {array} * [jobSpecification.poolInfo.autoPoolSpecification.pool.metadata] The Batch * service does not assign any meaning to metadata; it is solely for the use * of user code. - * @member {array} [jobSpecification.metadata] The Batch service does not + * @property {array} [jobSpecification.metadata] The Batch service does not * assign any meaning to metadata; it is solely for the use of user code. - * @member {array} [metadata] A list of name-value pairs associated with the - * job schedule as metadata. If you do not specify this element, it takes the - * default value of an empty list; in effect, any existing metadata is + * @property {array} [metadata] A list of name-value pairs associated with + * the job schedule as metadata. If you do not specify this element, it takes + * the default value of an empty list; in effect, any existing metadata is * deleted. */ constructor() { diff --git a/lib/services/batch/lib/models/jobSchedulingError.js b/lib/services/batch/lib/models/jobSchedulingError.js index 14f085d842..97c272dbfa 100644 --- a/lib/services/batch/lib/models/jobSchedulingError.js +++ b/lib/services/batch/lib/models/jobSchedulingError.js @@ -17,13 +17,13 @@ class JobSchedulingError { /** * Create a JobSchedulingError. - * @member {string} category The category of the job scheduling error. + * @property {string} category The category of the job scheduling error. * Possible values include: 'userError', 'serverError' - * @member {string} [code] An identifier for the job scheduling error. Codes - * are invariant and are intended to be consumed programmatically. - * @member {string} [message] A message describing the job scheduling error, - * intended to be suitable for display in a user interface. - * @member {array} [details] A list of additional error details related to + * @property {string} [code] An identifier for the job scheduling error. + * Codes are invariant and are intended to be consumed programmatically. + * @property {string} [message] A message describing the job scheduling + * error, intended to be suitable for display in a user interface. + * @property {array} [details] A list of additional error details related to * the scheduling error. */ constructor() { diff --git a/lib/services/batch/lib/models/jobSpecification.js b/lib/services/batch/lib/models/jobSpecification.js index 17a6ddd871..69b7571697 100644 --- a/lib/services/batch/lib/models/jobSpecification.js +++ b/lib/services/batch/lib/models/jobSpecification.js @@ -17,19 +17,19 @@ class JobSpecification { /** * Create a JobSpecification. - * @member {number} [priority] The priority of jobs created under this + * @property {number} [priority] The priority of jobs created under this * schedule. Priority values can range from -1000 to 1000, with -1000 being * the lowest priority and 1000 being the highest priority. The default value * is 0. This priority is used as the default for all jobs under the job * schedule. You can update a job's priority after it has been created using * by using the update job API. - * @member {string} [displayName] The display name for jobs created under + * @property {string} [displayName] The display name for jobs created under * this schedule. The name need not be unique and can contain any Unicode * characters up to a maximum length of 1024. - * @member {boolean} [usesTaskDependencies] Whether tasks in the job can + * @property {boolean} [usesTaskDependencies] Whether tasks in the job can * define dependencies on each other. The default is false. - * @member {string} [onAllTasksComplete] The action the Batch service should - * take when all tasks in a job created under this schedule are in the + * @property {string} [onAllTasksComplete] The action the Batch service + * should take when all tasks in a job created under this schedule are in the * completed state. Note that if a job contains no tasks, then all tasks are * considered complete. This option is therefore most commonly used with a * Job Manager task; if you want to use automatic job termination without a @@ -37,40 +37,50 @@ class JobSpecification { * update the job properties to set onAllTasksComplete to terminatejob once * you have finished adding tasks. The default is noaction. Possible values * include: 'noAction', 'terminateJob' - * @member {string} [onTaskFailure] The action the Batch service should take - * when any task fails in a job created under this schedule. A task is + * @property {string} [onTaskFailure] The action the Batch service should + * take when any task fails in a job created under this schedule. A task is * considered to have failed if it have failed if has a failureInfo. A * failureInfo is set if the task completes with a non-zero exit code after * exhausting its retry count, or if there was an error starting the task, * for example due to a resource file download error. The default is * noaction. Possible values include: 'noAction', * 'performExitOptionsJobAction' - * @member {object} [constraints] The execution constraints for jobs created - * under this schedule. - * @member {moment.duration} [constraints.maxWallClockTime] If the job does + * @property {object} [networkConfiguration] The network configuration for + * the job. + * @property {string} [networkConfiguration.subnetId] This is only supported + * for jobs running on VirtualMachineConfiguration pools. This is of the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. + * The virtual network must be in the same region and subscription as the + * Azure Batch account. The specified subnet should have enough free IP + * addresses to accommodate the number of nodes which will run tasks from the + * job. For more details, see + * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + * @property {object} [constraints] The execution constraints for jobs + * created under this schedule. + * @property {moment.duration} [constraints.maxWallClockTime] If the job does * not complete within the time limit, the Batch service terminates it and * any tasks that are still running. In this case, the termination reason * will be MaxWallClockTimeExpiry. If this property is not specified, there * is no time limit on how long the job may run. - * @member {number} [constraints.maxTaskRetryCount] Note that this value + * @property {number} [constraints.maxTaskRetryCount] Note that this value * specifically controls the number of retries. The Batch service will try * each task once, and may then retry up to this limit. For example, if the * maximum retry count is 3, Batch tries a task up to 4 times (one initial * try and 3 retries). If the maximum retry count is 0, the Batch service * does not retry tasks. If the maximum retry count is -1, the Batch service * retries tasks without limit. The default value is 0 (no retries). - * @member {object} [jobManagerTask] The details of a Job Manager task to be - * launched when a job is started under this schedule. If the job does not + * @property {object} [jobManagerTask] The details of a Job Manager task to + * be launched when a job is started under this schedule. If the job does not * specify a Job Manager task, the user must explicitly add tasks to the job * using the Task API. If the job does specify a Job Manager task, the Batch * service creates the Job Manager task when the job is created, and will try * to schedule the Job Manager task before scheduling other tasks in the job. - * @member {string} [jobManagerTask.id] The ID can contain any combination of - * alphanumeric characters including hyphens and underscores and cannot + * @property {string} [jobManagerTask.id] The ID can contain any combination + * of alphanumeric characters including hyphens and underscores and cannot * contain more than 64 characters. - * @member {string} [jobManagerTask.displayName] It need not be unique and + * @property {string} [jobManagerTask.displayName] It need not be unique and * can contain any Unicode characters up to a maximum length of 1024. - * @member {string} [jobManagerTask.commandLine] The command line does not + * @property {string} [jobManagerTask.commandLine] The command line does not * run under a shell, and therefore cannot take advantage of shell features * such as environment variable expansion. If you want to take advantage of * such features, you should invoke the shell in the command line, for @@ -79,57 +89,55 @@ class JobSpecification { * path (relative to the task working directory), or use the Batch provided * environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [jobManagerTask.containerSettings] If the pool that will - * run this task has containerConfiguration set, this must be set as well. If - * the pool that will run this task doesn't have containerConfiguration set, - * this must not be set. When this is specified, all directories recursively - * below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on - * the node) are mapped into the container, all task environment variables - * are mapped into the container, and the task command line is executed in - * the container. - * @member {string} [jobManagerTask.containerSettings.containerRunOptions] + * @property {object} [jobManagerTask.containerSettings] If the pool that + * will run this task has containerConfiguration set, this must be set as + * well. If the pool that will run this task doesn't have + * containerConfiguration set, this must not be set. When this is specified, + * all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of + * Azure Batch directories on the node) are mapped into the container, all + * task environment variables are mapped into the container, and the task + * command line is executed in the container. + * @property {string} [jobManagerTask.containerSettings.containerRunOptions] * These additional options are supplied as arguments to the "docker create" * command, in addition to those controlled by the Batch Service. - * @member {string} [jobManagerTask.containerSettings.imageName] This is the - * full image reference, as would be specified to "docker pull". If no tag is - * provided as part of the image name, the tag ":latest" is used as a + * @property {string} [jobManagerTask.containerSettings.imageName] This is + * the full image reference, as would be specified to "docker pull". If no + * tag is provided as part of the image name, the tag ":latest" is used as a * default. - * @member {object} [jobManagerTask.containerSettings.registry] This setting - * can be omitted if was already provided at pool creation. - * @member {string} + * @property {object} [jobManagerTask.containerSettings.registry] This + * setting can be omitted if was already provided at pool creation. + * @property {string} * [jobManagerTask.containerSettings.registry.registryServer] If omitted, the * default is "docker.io". - * @member {string} [jobManagerTask.containerSettings.registry.userName] - * @member {string} [jobManagerTask.containerSettings.registry.password] - * @member {array} [jobManagerTask.resourceFiles] Files listed under this + * @property {string} [jobManagerTask.containerSettings.registry.userName] + * @property {string} [jobManagerTask.containerSettings.registry.password] + * @property {array} [jobManagerTask.resourceFiles] Files listed under this * element are located in the task's working directory. There is a maximum * size for the list of resource files. When the max size is exceeded, the * request will fail and the response error code will be * RequestEntityTooLarge. If this occurs, the collection of ResourceFiles * must be reduced in size. This can be achieved using .zip files, * Application Packages, or Docker Containers. - * @member {array} [jobManagerTask.outputFiles] For multi-instance tasks, the - * files will only be uploaded from the compute node on which the primary + * @property {array} [jobManagerTask.outputFiles] For multi-instance tasks, + * the files will only be uploaded from the compute node on which the primary * task is executed. - * @member {array} [jobManagerTask.environmentSettings] - * @member {object} [jobManagerTask.constraints] - * @member {moment.duration} [jobManagerTask.constraints.maxWallClockTime] If - * this is not specified, there is no time limit on how long the task may + * @property {array} [jobManagerTask.environmentSettings] + * @property {object} [jobManagerTask.constraints] + * @property {moment.duration} [jobManagerTask.constraints.maxWallClockTime] + * If this is not specified, there is no time limit on how long the task may * run. - * @member {moment.duration} [jobManagerTask.constraints.retentionTime] The - * default is infinite, i.e. the task directory will be retained until the - * compute node is removed or reimaged. - * @member {number} [jobManagerTask.constraints.maxTaskRetryCount] Note that - * this value specifically controls the number of retries for the task + * @property {moment.duration} [jobManagerTask.constraints.retentionTime] The + * default is 7 days, i.e. the task directory will be retained for 7 days + * unless the compute node is removed or the job is deleted. + * @property {number} [jobManagerTask.constraints.maxTaskRetryCount] Note + * that this value specifically controls the number of retries for the task * executable due to a nonzero exit code. The Batch service will try the task * once, and may then retry up to this limit. For example, if the maximum * retry count is 3, Batch tries the task up to 4 times (one initial try and * 3 retries). If the maximum retry count is 0, the Batch service does not * retry the task after the first attempt. If the maximum retry count is -1, - * the Batch service retries the task without limit. Resource files and - * application packages are only downloaded again if the task is retried on a - * new compute node. - * @member {boolean} [jobManagerTask.killJobOnCompletion] If true, when the + * the Batch service retries the task without limit. + * @property {boolean} [jobManagerTask.killJobOnCompletion] If true, when the * Job Manager task completes, the Batch service marks the job as complete. * If any tasks are still running at this time (other than Job Release), * those tasks are terminated. If false, the completion of the Job Manager @@ -142,32 +150,33 @@ class JobSpecification { * and using the Job Manager task only to create the tasks for the job (not * to monitor progress), then it is important to set killJobOnCompletion to * false. - * @member {object} [jobManagerTask.userIdentity] If omitted, the task runs + * @property {object} [jobManagerTask.userIdentity] If omitted, the task runs * as a non-administrative user unique to the task. - * @member {string} [jobManagerTask.userIdentity.userName] The userName and + * @property {string} [jobManagerTask.userIdentity.userName] The userName and * autoUser properties are mutually exclusive; you must specify one but not * both. - * @member {object} [jobManagerTask.userIdentity.autoUser] The userName and + * @property {object} [jobManagerTask.userIdentity.autoUser] The userName and * autoUser properties are mutually exclusive; you must specify one but not * both. - * @member {string} [jobManagerTask.userIdentity.autoUser.scope] The default - * value is task. Possible values include: 'task', 'pool' - * @member {string} [jobManagerTask.userIdentity.autoUser.elevationLevel] The - * default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {boolean} [jobManagerTask.runExclusive] If true, no other tasks + * @property {string} [jobManagerTask.userIdentity.autoUser.scope] The + * default value is task. Possible values include: 'task', 'pool' + * @property {string} [jobManagerTask.userIdentity.autoUser.elevationLevel] + * The default value is nonAdmin. Possible values include: 'nonAdmin', + * 'admin' + * @property {boolean} [jobManagerTask.runExclusive] If true, no other tasks * will run on the same compute node for as long as the Job Manager is * running. If false, other tasks can run simultaneously with the Job Manager * on a compute node. The Job Manager task counts normally against the node's * concurrent task limit, so this is only relevant if the node allows * multiple concurrent tasks. The default value is true. - * @member {array} [jobManagerTask.applicationPackageReferences] Application - * packages are downloaded and deployed to a shared directory, not the task - * working directory. Therefore, if a referenced package is already on the - * compute node, and is up to date, then it is not re-downloaded; the - * existing copy on the compute node is used. If a referenced application - * package cannot be installed, for example because the package has been - * deleted or because download failed, the task fails. - * @member {object} [jobManagerTask.authenticationTokenSettings] If this + * @property {array} [jobManagerTask.applicationPackageReferences] + * Application packages are downloaded and deployed to a shared directory, + * not the task working directory. Therefore, if a referenced package is + * already on the compute node, and is up to date, then it is not + * re-downloaded; the existing copy on the compute node is used. If a + * referenced application package cannot be installed, for example because + * the package has been deleted or because download failed, the task fails. + * @property {object} [jobManagerTask.authenticationTokenSettings] If this * property is set, the Batch service provides the task with an * authentication token which can be used to authenticate Batch service * operations without requiring an account access key. The token is provided @@ -175,18 +184,18 @@ class JobSpecification { * that the task can carry out using the token depend on the settings. For * example, a task can request job permissions in order to add other tasks to * the job, or check the status of the job or of other tasks under the job. - * @member {array} [jobManagerTask.authenticationTokenSettings.access] The + * @property {array} [jobManagerTask.authenticationTokenSettings.access] The * authentication token grants access to a limited set of Batch service * operations. Currently the only supported value for the access property is * 'job', which grants access to all operations related to the job which * contains the task. - * @member {boolean} [jobManagerTask.allowLowPriorityNode] The default value - * is true. - * @member {object} [jobPreparationTask] The Job Preparation task for jobs + * @property {boolean} [jobManagerTask.allowLowPriorityNode] The default + * value is true. + * @property {object} [jobPreparationTask] The Job Preparation task for jobs * created under this schedule. If a job has a Job Preparation task, the * Batch service will run the Job Preparation task on a compute node before * starting any tasks of that job on that compute node. - * @member {string} [jobPreparationTask.id] The ID can contain any + * @property {string} [jobPreparationTask.id] The ID can contain any * combination of alphanumeric characters including hyphens and underscores * and cannot contain more than 64 characters. If you do not specify this * property, the Batch service assigns a default value of 'jobpreparation'. @@ -194,7 +203,7 @@ class JobSpecification { * If you try to submit a task with the same id, the Batch service rejects * the request with error code TaskIdSameAsJobPreparationTask; if you are * calling the REST API directly, the HTTP status code is 409 (Conflict). - * @member {string} [jobPreparationTask.commandLine] The command line does + * @property {string} [jobPreparationTask.commandLine] The command line does * not run under a shell, and therefore cannot take advantage of shell * features such as environment variable expansion. If you want to take * advantage of such features, you should invoke the shell in the command @@ -203,55 +212,55 @@ class JobSpecification { * use a relative path (relative to the task working directory), or use the * Batch provided environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [jobPreparationTask.containerSettings] When this is + * @property {object} [jobPreparationTask.containerSettings] When this is * specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR * (the root of Azure Batch directories on the node) are mapped into the * container, all task environment variables are mapped into the container, * and the task command line is executed in the container. - * @member {string} + * @property {string} * [jobPreparationTask.containerSettings.containerRunOptions] These * additional options are supplied as arguments to the "docker create" * command, in addition to those controlled by the Batch Service. - * @member {string} [jobPreparationTask.containerSettings.imageName] This is - * the full image reference, as would be specified to "docker pull". If no + * @property {string} [jobPreparationTask.containerSettings.imageName] This + * is the full image reference, as would be specified to "docker pull". If no * tag is provided as part of the image name, the tag ":latest" is used as a * default. - * @member {object} [jobPreparationTask.containerSettings.registry] This + * @property {object} [jobPreparationTask.containerSettings.registry] This * setting can be omitted if was already provided at pool creation. - * @member {string} + * @property {string} * [jobPreparationTask.containerSettings.registry.registryServer] If omitted, * the default is "docker.io". - * @member {string} [jobPreparationTask.containerSettings.registry.userName] - * @member {string} [jobPreparationTask.containerSettings.registry.password] - * @member {array} [jobPreparationTask.resourceFiles] Files listed under this - * element are located in the task's working directory. There is a maximum - * size for the list of resource files. When the max size is exceeded, the - * request will fail and the response error code will be + * @property {string} + * [jobPreparationTask.containerSettings.registry.userName] + * @property {string} + * [jobPreparationTask.containerSettings.registry.password] + * @property {array} [jobPreparationTask.resourceFiles] Files listed under + * this element are located in the task's working directory. There is a + * maximum size for the list of resource files. When the max size is + * exceeded, the request will fail and the response error code will be * RequestEntityTooLarge. If this occurs, the collection of ResourceFiles * must be reduced in size. This can be achieved using .zip files, * Application Packages, or Docker Containers. - * @member {array} [jobPreparationTask.environmentSettings] - * @member {object} [jobPreparationTask.constraints] - * @member {moment.duration} + * @property {array} [jobPreparationTask.environmentSettings] + * @property {object} [jobPreparationTask.constraints] + * @property {moment.duration} * [jobPreparationTask.constraints.maxWallClockTime] If this is not * specified, there is no time limit on how long the task may run. - * @member {moment.duration} [jobPreparationTask.constraints.retentionTime] - * The default is infinite, i.e. the task directory will be retained until - * the compute node is removed or reimaged. - * @member {number} [jobPreparationTask.constraints.maxTaskRetryCount] Note + * @property {moment.duration} [jobPreparationTask.constraints.retentionTime] + * The default is 7 days, i.e. the task directory will be retained for 7 days + * unless the compute node is removed or the job is deleted. + * @property {number} [jobPreparationTask.constraints.maxTaskRetryCount] Note * that this value specifically controls the number of retries for the task * executable due to a nonzero exit code. The Batch service will try the task * once, and may then retry up to this limit. For example, if the maximum * retry count is 3, Batch tries the task up to 4 times (one initial try and * 3 retries). If the maximum retry count is 0, the Batch service does not * retry the task after the first attempt. If the maximum retry count is -1, - * the Batch service retries the task without limit. Resource files and - * application packages are only downloaded again if the task is retried on a - * new compute node. - * @member {boolean} [jobPreparationTask.waitForSuccess] If true and the Job - * Preparation task fails on a compute node, the Batch service retries the - * Job Preparation task up to its maximum retry count (as specified in the - * constraints element). If the task has still not completed successfully + * the Batch service retries the task without limit. + * @property {boolean} [jobPreparationTask.waitForSuccess] If true and the + * Job Preparation task fails on a compute node, the Batch service retries + * the Job Preparation task up to its maximum retry count (as specified in + * the constraints element). If the task has still not completed successfully * after all retries, then the Batch service will not schedule tasks of the * job to the compute node. The compute node remains active and eligible to * run tasks of other jobs. If false, the Batch service will not wait for the @@ -259,27 +268,27 @@ class JobSpecification { * start executing on the compute node while the Job Preparation task is * still running; and even if the Job Preparation task fails, new tasks will * continue to be scheduled on the node. The default value is true. - * @member {object} [jobPreparationTask.userIdentity] If omitted, the task + * @property {object} [jobPreparationTask.userIdentity] If omitted, the task * runs as a non-administrative user unique to the task on Windows nodes, or - * a a non-administrative user unique to the pool on Linux nodes. - * @member {string} [jobPreparationTask.userIdentity.userName] The userName + * a non-administrative user unique to the pool on Linux nodes. + * @property {string} [jobPreparationTask.userIdentity.userName] The userName * and autoUser properties are mutually exclusive; you must specify one but * not both. - * @member {object} [jobPreparationTask.userIdentity.autoUser] The userName + * @property {object} [jobPreparationTask.userIdentity.autoUser] The userName * and autoUser properties are mutually exclusive; you must specify one but * not both. - * @member {string} [jobPreparationTask.userIdentity.autoUser.scope] The + * @property {string} [jobPreparationTask.userIdentity.autoUser.scope] The * default value is task. Possible values include: 'task', 'pool' - * @member {string} [jobPreparationTask.userIdentity.autoUser.elevationLevel] - * The default value is nonAdmin. Possible values include: 'nonAdmin', - * 'admin' - * @member {boolean} [jobPreparationTask.rerunOnNodeRebootAfterSuccess] The + * @property {string} + * [jobPreparationTask.userIdentity.autoUser.elevationLevel] The default + * value is nonAdmin. Possible values include: 'nonAdmin', 'admin' + * @property {boolean} [jobPreparationTask.rerunOnNodeRebootAfterSuccess] The * Job Preparation task is always rerun if a compute node is reimaged, or if * the Job Preparation task did not complete (e.g. because the reboot * occurred while the task was running). Therefore, you should always write a * Job Preparation task to be idempotent and to behave correctly if run * multiple times. The default value is true. - * @member {object} [jobReleaseTask] The Job Release task for jobs created + * @property {object} [jobReleaseTask] The Job Release task for jobs created * under this schedule. The primary purpose of the Job Release task is to * undo changes to compute nodes made by the Job Preparation task. Example * activities include deleting local files, or shutting down services that @@ -287,15 +296,15 @@ class JobSpecification { * specified without also specifying a Job Preparation task for the job. The * Batch service runs the Job Release task on the compute nodes that have run * the Job Preparation task. - * @member {string} [jobReleaseTask.id] The ID can contain any combination of - * alphanumeric characters including hyphens and underscores and cannot + * @property {string} [jobReleaseTask.id] The ID can contain any combination + * of alphanumeric characters including hyphens and underscores and cannot * contain more than 64 characters. If you do not specify this property, the * Batch service assigns a default value of 'jobrelease'. No other task in * the job can have the same ID as the Job Release task. If you try to submit * a task with the same id, the Batch service rejects the request with error * code TaskIdSameAsJobReleaseTask; if you are calling the REST API directly, * the HTTP status code is 409 (Conflict). - * @member {string} [jobReleaseTask.commandLine] The command line does not + * @property {string} [jobReleaseTask.commandLine] The command line does not * run under a shell, and therefore cannot take advantage of shell features * such as environment variable expansion. If you want to take advantage of * such features, you should invoke the shell in the command line, for @@ -304,60 +313,61 @@ class JobSpecification { * path (relative to the task working directory), or use the Batch provided * environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [jobReleaseTask.containerSettings] When this is + * @property {object} [jobReleaseTask.containerSettings] When this is * specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR * (the root of Azure Batch directories on the node) are mapped into the * container, all task environment variables are mapped into the container, * and the task command line is executed in the container. - * @member {string} [jobReleaseTask.containerSettings.containerRunOptions] + * @property {string} [jobReleaseTask.containerSettings.containerRunOptions] * These additional options are supplied as arguments to the "docker create" * command, in addition to those controlled by the Batch Service. - * @member {string} [jobReleaseTask.containerSettings.imageName] This is the - * full image reference, as would be specified to "docker pull". If no tag is - * provided as part of the image name, the tag ":latest" is used as a + * @property {string} [jobReleaseTask.containerSettings.imageName] This is + * the full image reference, as would be specified to "docker pull". If no + * tag is provided as part of the image name, the tag ":latest" is used as a * default. - * @member {object} [jobReleaseTask.containerSettings.registry] This setting - * can be omitted if was already provided at pool creation. - * @member {string} + * @property {object} [jobReleaseTask.containerSettings.registry] This + * setting can be omitted if was already provided at pool creation. + * @property {string} * [jobReleaseTask.containerSettings.registry.registryServer] If omitted, the * default is "docker.io". - * @member {string} [jobReleaseTask.containerSettings.registry.userName] - * @member {string} [jobReleaseTask.containerSettings.registry.password] - * @member {array} [jobReleaseTask.resourceFiles] Files listed under this + * @property {string} [jobReleaseTask.containerSettings.registry.userName] + * @property {string} [jobReleaseTask.containerSettings.registry.password] + * @property {array} [jobReleaseTask.resourceFiles] Files listed under this * element are located in the task's working directory. - * @member {array} [jobReleaseTask.environmentSettings] - * @member {moment.duration} [jobReleaseTask.maxWallClockTime] - * @member {moment.duration} [jobReleaseTask.retentionTime] The default is - * infinite, i.e. the task directory will be retained until the compute node - * is removed or reimaged. - * @member {object} [jobReleaseTask.userIdentity] If omitted, the task runs + * @property {array} [jobReleaseTask.environmentSettings] + * @property {moment.duration} [jobReleaseTask.maxWallClockTime] + * @property {moment.duration} [jobReleaseTask.retentionTime] The default is + * 7 days, i.e. the task directory will be retained for 7 days unless the + * compute node is removed or the job is deleted. + * @property {object} [jobReleaseTask.userIdentity] If omitted, the task runs * as a non-administrative user unique to the task. - * @member {string} [jobReleaseTask.userIdentity.userName] The userName and + * @property {string} [jobReleaseTask.userIdentity.userName] The userName and * autoUser properties are mutually exclusive; you must specify one but not * both. - * @member {object} [jobReleaseTask.userIdentity.autoUser] The userName and + * @property {object} [jobReleaseTask.userIdentity.autoUser] The userName and * autoUser properties are mutually exclusive; you must specify one but not * both. - * @member {string} [jobReleaseTask.userIdentity.autoUser.scope] The default - * value is task. Possible values include: 'task', 'pool' - * @member {string} [jobReleaseTask.userIdentity.autoUser.elevationLevel] The - * default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {array} [commonEnvironmentSettings] A list of common environment + * @property {string} [jobReleaseTask.userIdentity.autoUser.scope] The + * default value is task. Possible values include: 'task', 'pool' + * @property {string} [jobReleaseTask.userIdentity.autoUser.elevationLevel] + * The default value is nonAdmin. Possible values include: 'nonAdmin', + * 'admin' + * @property {array} [commonEnvironmentSettings] A list of common environment * variable settings. These environment variables are set for all tasks in * jobs created under this schedule (including the Job Manager, Job * Preparation and Job Release tasks). Individual tasks can override an * environment setting specified here by specifying the same setting name * with a different value. - * @member {object} poolInfo The pool on which the Batch service runs the + * @property {object} poolInfo The pool on which the Batch service runs the * tasks of jobs created under this schedule. - * @member {string} [poolInfo.poolId] You must ensure that the pool + * @property {string} [poolInfo.poolId] You must ensure that the pool * referenced by this property exists. If the pool does not exist at the time * the Batch service tries to schedule a job, no tasks for the job will run * until you create a pool with that id. Note that the Batch service will not * reject the job request; it will simply not run tasks until the pool * exists. You must specify either the pool ID or the auto pool * specification, but not both. - * @member {object} [poolInfo.autoPoolSpecification] If auto pool creation + * @property {object} [poolInfo.autoPoolSpecification] If auto pool creation * fails, the Batch service moves the job to a completed state, and the pool * creation error is set in the job's scheduling error property. The Batch * service manages the lifetime (both creation and, unless keepAlive is @@ -365,28 +375,28 @@ class JobSpecification { * lifetime of the auto pool while the job is active will result in * unexpected behavior. You must specify either the pool ID or the auto pool * specification, but not both. - * @member {string} [poolInfo.autoPoolSpecification.autoPoolIdPrefix] The + * @property {string} [poolInfo.autoPoolSpecification.autoPoolIdPrefix] The * Batch service assigns each auto pool a unique identifier on creation. To * distinguish between pools created for different purposes, you can specify * this element to add a prefix to the ID that is assigned. The prefix can be * up to 20 characters long. - * @member {string} [poolInfo.autoPoolSpecification.poolLifetimeOption] + * @property {string} [poolInfo.autoPoolSpecification.poolLifetimeOption] * Possible values include: 'jobSchedule', 'job' - * @member {boolean} [poolInfo.autoPoolSpecification.keepAlive] If false, the - * Batch service deletes the pool once its lifetime (as determined by the + * @property {boolean} [poolInfo.autoPoolSpecification.keepAlive] If false, + * the Batch service deletes the pool once its lifetime (as determined by the * poolLifetimeOption setting) expires; that is, when the job or job schedule * completes. If true, the Batch service does not delete the pool * automatically. It is up to the user to delete auto pools created with this * option. - * @member {object} [poolInfo.autoPoolSpecification.pool] - * @member {string} [poolInfo.autoPoolSpecification.pool.displayName] The + * @property {object} [poolInfo.autoPoolSpecification.pool] + * @property {string} [poolInfo.autoPoolSpecification.pool.displayName] The * display name need not be unique and can contain any Unicode characters up * to a maximum length of 1024. - * @member {string} [poolInfo.autoPoolSpecification.pool.vmSize] For + * @property {string} [poolInfo.autoPoolSpecification.pool.vmSize] For * information about available sizes of virtual machines in pools, see Choose * a VM size for compute nodes in an Azure Batch pool * (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration] This * property must be specified if the pool needs to be created with Azure PaaS * VMs. This property and virtualMachineConfiguration are mutually exclusive @@ -395,7 +405,7 @@ class JobSpecification { * directly, the HTTP status code is 400 (Bad Request). This property cannot * be specified if the Batch account was created with its poolAllocationMode * property set to 'UserSubscription'. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osFamily] * Possible values are: * 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. @@ -404,55 +414,39 @@ class JobSpecification { * 5 - OS Family 5, equivalent to Windows Server 2016. For more information, * see Azure Guest OS Releases * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). - * @member {string} - * [poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] + * @property {string} + * [poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osVersion] * The default value is * which specifies the latest operating system version * for the specified OS family. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.currentOSVersion] - * This may differ from targetOSVersion if the pool state is Upgrading. In - * this case some virtual machines may be on the targetOSVersion and some may - * be on the currentOSVersion during the upgrade process. Once all virtual - * machines have upgraded, currentOSVersion is updated to be the same as - * targetOSVersion. - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration] This * property must be specified if the pool needs to be created with Azure IaaS * VMs. This property and cloudServiceConfiguration are mutually exclusive * and one of the properties must be specified. If neither is specified then * the Batch service returns an error; if you are calling the REST API * directly, the HTTP status code is 400 (Bad Request). - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference] - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.publisher] * For example, Canonical or MicrosoftWindowsServer. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.offer] * For example, UbuntuServer or WindowsServer. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.sku] * For example, 14.04.0-LTS or 2012-R2-Datacenter. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.version] * A value of 'latest' can be specified to select the latest version of an * image. If omitted, the default is 'latest'. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.virtualMachineImageId] * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as - * the Azure Batch account. For information about the firewall settings for - * the Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * @member {object} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * @member {string} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The default value for caching is readwrite. For information about the - * caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' - * @member {string} + * the Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. + * @property {string} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId] * The Batch node agent is a program that runs on each node in the pool, and * provides the command-and-control interface between the node and the Batch @@ -461,14 +455,14 @@ class JobSpecification { * which matches the selected image reference. To get the list of supported * node agent SKUs along with their list of verified image references, see * the 'List supported node agent SKUs' operation. - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] - * This property must not be specified if the imageReference or osDisk - * property specifies a Linux OS image. - * @member {boolean} + * This property must not be specified if the imageReference property + * specifies a Linux OS image. + * @property {boolean} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] * If omitted, the default value is true. - * @member {array} + * @property {array} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.dataDisks] * This property must be specified if the compute nodes in the pool need to * have empty data disks attached to them. This cannot be updated. Each node @@ -480,7 +474,7 @@ class JobSpecification { * https://docs.microsoft.com/en-us/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux * and * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.licenseType] * This only applies to images that contain the Windows operating system, and * should only be used when you hold valid on-premises licenses for the nodes @@ -489,106 +483,98 @@ class JobSpecification { * * Windows_Server - The on-premises license is for Windows Server. * Windows_Client - The on-premises license is for Windows Client. - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration] * If specified, setup is performed on each node in the pool to allow tasks * to run in containers. All regular tasks and job manager tasks run on this * pool must specify the containerSettings property, and all other tasks may * specify it. - * @member {array} + * @property {array} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration.containerImageNames] * This is the full image reference, as would be specified to "docker pull". * An image will be sourced from the default Docker registry unless the image * is fully qualified with an alternative registry. - * @member {array} + * @property {array} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration.containerRegistries] * If any images must be downloaded from a private registry which requires * credentials, then those credentials must be provided here. - * @member {number} [poolInfo.autoPoolSpecification.pool.maxTasksPerNode] The - * default value is 1. The maximum value of this setting depends on the size - * of the compute nodes in the pool (the vmSize setting). - * @member {object} + * @property {number} [poolInfo.autoPoolSpecification.pool.maxTasksPerNode] + * The default value is 1. The maximum value of this setting depends on the + * size of the compute nodes in the pool (the vmSize setting). + * @property {object} * [poolInfo.autoPoolSpecification.pool.taskSchedulingPolicy] - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.taskSchedulingPolicy.nodeFillType] * Possible values include: 'spread', 'pack' - * @member {moment.duration} + * @property {moment.duration} * [poolInfo.autoPoolSpecification.pool.resizeTimeout] This timeout applies * only to manual scaling; it has no effect when enableAutoScale is set to * true. The default value is 15 minutes. The minimum value is 5 minutes. If * you specify a value less than 5 minutes, the Batch service rejects the * request with an error; if you are calling the REST API directly, the HTTP * status code is 400 (Bad Request). - * @member {number} + * @property {number} * [poolInfo.autoPoolSpecification.pool.targetDedicatedNodes] This property * must not be specified if enableAutoScale is set to true. If * enableAutoScale is set to false, then you must set either * targetDedicatedNodes, targetLowPriorityNodes, or both. - * @member {number} + * @property {number} * [poolInfo.autoPoolSpecification.pool.targetLowPriorityNodes] This property * must not be specified if enableAutoScale is set to true. If * enableAutoScale is set to false, then you must set either * targetDedicatedNodes, targetLowPriorityNodes, or both. - * @member {boolean} [poolInfo.autoPoolSpecification.pool.enableAutoScale] If - * false, at least one of targetDedicateNodes and targetLowPriorityNodes must - * be specified. If true, the autoScaleFormula element is required. The pool - * automatically resizes according to the formula. The default value is + * @property {boolean} [poolInfo.autoPoolSpecification.pool.enableAutoScale] + * If false, at least one of targetDedicateNodes and targetLowPriorityNodes + * must be specified. If true, the autoScaleFormula element is required. The + * pool automatically resizes according to the formula. The default value is * false. - * @member {string} [poolInfo.autoPoolSpecification.pool.autoScaleFormula] + * @property {string} [poolInfo.autoPoolSpecification.pool.autoScaleFormula] * This property must not be specified if enableAutoScale is set to false. It * is required if enableAutoScale is set to true. The formula is checked for * validity before the pool is created. If the formula is not valid, the * Batch service rejects the request with detailed error information. - * @member {moment.duration} + * @property {moment.duration} * [poolInfo.autoPoolSpecification.pool.autoScaleEvaluationInterval] The * default value is 15 minutes. The minimum and maximum value are 5 minutes * and 168 hours respectively. If you specify a value less than 5 minutes or * greater than 168 hours, the Batch service rejects the request with an * invalid property value error; if you are calling the REST API directly, * the HTTP status code is 400 (Bad Request). - * @member {boolean} + * @property {boolean} * [poolInfo.autoPoolSpecification.pool.enableInterNodeCommunication] * Enabling inter-node communication limits the maximum size of the pool due * to deployment restrictions on the nodes of the pool. This may result in * the pool not reaching its desired size. The default value is false. - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.networkConfiguration] - * @member {string} - * [poolInfo.autoPoolSpecification.pool.networkConfiguration.subnetId] The - * virtual network must be in the same region and subscription as the Azure - * Batch account. The specified subnet should have enough free IP addresses - * to accommodate the number of nodes in the pool. If the subnet doesn't have - * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must - * allow communication from the Azure Batch service to be able to schedule - * tasks on the compute nodes. This can be verified by checking if the - * specified VNet has any associated Network Security Groups (NSG). If - * communication to the compute nodes in the specified subnet is denied by an - * NSG, then the Batch service will set the state of the compute nodes to - * unusable. For pools created with virtualMachineConfiguration only ARM - * virtual networks ('Microsoft.Network/virtualNetworks') are supported, but - * for pools created with cloudServiceConfiguration both ARM and classic - * virtual networks are supported. If the specified VNet has any associated - * Network Security Groups (NSG), then a few reserved system ports must be - * enabled for inbound communication. For pools created with a virtual - * machine configuration, enable ports 29876 and 29877, as well as port 22 - * for Linux and port 3389 for Windows. For pools created with a cloud - * service configuration, enable ports 10100, 20100, and 30100. Also enable - * outbound connections to Azure Storage on port 443. For more details see: + * @property {string} + * [poolInfo.autoPoolSpecification.pool.networkConfiguration.subnetId] This + * is of the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. + * The virtual network must be in the same region and subscription as the + * Azure Batch account. The specified subnet should have enough free IP + * addresses to accommodate the number of nodes in the pool. If the subnet + * doesn't have enough free IP addresses, the pool will partially allocate + * compute nodes, and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks + * ('Microsoft.Network/virtualNetworks') are supported, but for pools created + * with cloudServiceConfiguration both ARM and classic virtual networks are + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration - * @member {object} + * @property {string} + * [poolInfo.autoPoolSpecification.pool.networkConfiguration.dynamicVNetAssignmentScope] + * Possible values include: 'none', 'job' + * @property {object} * [poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] * Pool endpoint configuration is only supported on pools with the * virtualMachineConfiguration property. - * @member {array} + * @property {array} * [poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration.inboundNATPools] * The maximum number of inbound NAT pools per Batch pool is 5. If the * maximum number of inbound NAT pools is exceeded the request fails with * HTTP status code 400. - * @member {object} [poolInfo.autoPoolSpecification.pool.startTask] - * @member {string} + * @property {object} [poolInfo.autoPoolSpecification.pool.startTask] + * @property {string} * [poolInfo.autoPoolSpecification.pool.startTask.commandLine] The command * line does not run under a shell, and therefore cannot take advantage of * shell features such as environment variable expansion. If you want to take @@ -598,56 +584,56 @@ class JobSpecification { * use a relative path (relative to the task working directory), or use the * Batch provided environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings] When * this is specified, all directories recursively below the * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) * are mapped into the container, all task environment variables are mapped * into the container, and the task command line is executed in the * container. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.containerRunOptions] * These additional options are supplied as arguments to the "docker create" * command, in addition to those controlled by the Batch Service. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.imageName] * This is the full image reference, as would be specified to "docker pull". * If no tag is provided as part of the image name, the tag ":latest" is used * as a default. - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry] * This setting can be omitted if was already provided at pool creation. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.registryServer] * If omitted, the default is "docker.io". - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.userName] - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.password] - * @member {array} + * @property {array} * [poolInfo.autoPoolSpecification.pool.startTask.resourceFiles] Files listed * under this element are located in the task's working directory. - * @member {array} + * @property {array} * [poolInfo.autoPoolSpecification.pool.startTask.environmentSettings] - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity] If omitted, * the task runs as a non-administrative user unique to the task. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity.userName] The * userName and autoUser properties are mutually exclusive; you must specify * one but not both. - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser] The * userName and autoUser properties are mutually exclusive; you must specify * one but not both. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser.scope] * The default value is task. Possible values include: 'task', 'pool' - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser.elevationLevel] * The default value is nonAdmin. Possible values include: 'nonAdmin', * 'admin' - * @member {number} + * @property {number} * [poolInfo.autoPoolSpecification.pool.startTask.maxTaskRetryCount] The * Batch service retries a task if its exit code is nonzero. Note that this * value specifically controls the number of retries. The Batch service will @@ -656,7 +642,7 @@ class JobSpecification { * initial try and 3 retries). If the maximum retry count is 0, the Batch * service does not retry the task. If the maximum retry count is -1, the * Batch service retries the task without limit. - * @member {boolean} + * @property {boolean} * [poolInfo.autoPoolSpecification.pool.startTask.waitForSuccess] If true and * the start task fails on a compute node, the Batch service retries the * start task up to its maximum retry count (maxTaskRetryCount). If the task @@ -668,7 +654,7 @@ class JobSpecification { * node while the start task is still running; and even if the start task * fails, new tasks will continue to be scheduled on the node. The default is * false. - * @member {array} + * @property {array} * [poolInfo.autoPoolSpecification.pool.certificateReferences] For Windows * compute nodes, the Batch service installs the certificates to the * specified certificate store and location. For Linux compute nodes, the @@ -678,21 +664,22 @@ class JobSpecification { * 'remoteUser', a 'certs' directory is created in the user's home directory * (e.g., /home/{user-name}/certs) and certificates are placed in that * directory. - * @member {array} + * @property {array} * [poolInfo.autoPoolSpecification.pool.applicationPackageReferences] - * @member {array} [poolInfo.autoPoolSpecification.pool.applicationLicenses] - * The list of application licenses must be a subset of available Batch - * service application licenses. If a license is requested which is not - * supported, pool creation will fail. The permitted licenses available on - * the pool are 'maya', 'vray', '3dsmax', 'arnold'. An additional charge - * applies for each application license added to the pool. - * @member {array} [poolInfo.autoPoolSpecification.pool.userAccounts] - * @member {array} [poolInfo.autoPoolSpecification.pool.metadata] The Batch + * @property {array} + * [poolInfo.autoPoolSpecification.pool.applicationLicenses] The list of + * application licenses must be a subset of available Batch service + * application licenses. If a license is requested which is not supported, + * pool creation will fail. The permitted licenses available on the pool are + * 'maya', 'vray', '3dsmax', 'arnold'. An additional charge applies for each + * application license added to the pool. + * @property {array} [poolInfo.autoPoolSpecification.pool.userAccounts] + * @property {array} [poolInfo.autoPoolSpecification.pool.metadata] The Batch * service does not assign any meaning to metadata; it is solely for the use * of user code. - * @member {array} [metadata] A list of name-value pairs associated with each - * job created under this schedule as metadata. The Batch service does not - * assign any meaning to metadata; it is solely for the use of user code. + * @property {array} [metadata] A list of name-value pairs associated with + * each job created under this schedule as metadata. The Batch service does + * not assign any meaning to metadata; it is solely for the use of user code. */ constructor() { } @@ -748,6 +735,14 @@ class JobSpecification { allowedValues: [ 'noAction', 'performExitOptionsJobAction' ] } }, + networkConfiguration: { + required: false, + serializedName: 'networkConfiguration', + type: { + name: 'Composite', + className: 'JobNetworkConfiguration' + } + }, constraints: { required: false, serializedName: 'constraints', diff --git a/lib/services/batch/lib/models/jobStatistics.js b/lib/services/batch/lib/models/jobStatistics.js index 3ed96f8a36..c8395325dc 100644 --- a/lib/services/batch/lib/models/jobStatistics.js +++ b/lib/services/batch/lib/models/jobStatistics.js @@ -17,42 +17,43 @@ class JobStatistics { /** * Create a JobStatistics. - * @member {string} url The URL of the statistics. - * @member {date} startTime The start time of the time range covered by the + * @property {string} url The URL of the statistics. + * @property {date} startTime The start time of the time range covered by the * statistics. - * @member {date} lastUpdateTime The time at which the statistics were last + * @property {date} lastUpdateTime The time at which the statistics were last * updated. All statistics are limited to the range between startTime and * lastUpdateTime. - * @member {moment.duration} userCPUTime The total user mode CPU time (summed - * across all cores and all compute nodes) consumed by all tasks in the job. - * @member {moment.duration} kernelCPUTime The total kernel mode CPU time + * @property {moment.duration} userCPUTime The total user mode CPU time * (summed across all cores and all compute nodes) consumed by all tasks in * the job. - * @member {moment.duration} wallClockTime The total wall clock time of all + * @property {moment.duration} kernelCPUTime The total kernel mode CPU time + * (summed across all cores and all compute nodes) consumed by all tasks in + * the job. + * @property {moment.duration} wallClockTime The total wall clock time of all * tasks in the job. The wall clock time is the elapsed time from when the * task started running on a compute node to when it finished (or to the last * time the statistics were updated, if the task had not finished by then). * If a task was retried, this includes the wall clock time of all the task * retries. - * @member {number} readIOps The total number of disk read operations made by - * all tasks in the job. - * @member {number} writeIOps The total number of disk write operations made + * @property {number} readIOps The total number of disk read operations made * by all tasks in the job. - * @member {number} readIOGiB The total amount of data in GiB read from disk - * by all tasks in the job. - * @member {number} writeIOGiB The total amount of data in GiB written to + * @property {number} writeIOps The total number of disk write operations + * made by all tasks in the job. + * @property {number} readIOGiB The total amount of data in GiB read from + * disk by all tasks in the job. + * @property {number} writeIOGiB The total amount of data in GiB written to * disk by all tasks in the job. - * @member {number} numSucceededTasks The total number of tasks successfully - * completed in the job during the given time range. A task completes - * successfully if it returns exit code 0. - * @member {number} numFailedTasks The total number of tasks in the job that - * failed during the given time range. A task fails if it exhausts its + * @property {number} numSucceededTasks The total number of tasks + * successfully completed in the job during the given time range. A task + * completes successfully if it returns exit code 0. + * @property {number} numFailedTasks The total number of tasks in the job + * that failed during the given time range. A task fails if it exhausts its * maximum retry count without returning exit code 0. - * @member {number} numTaskRetries The total number of retries on all the + * @property {number} numTaskRetries The total number of retries on all the * tasks in the job during the given time range. - * @member {moment.duration} waitTime The total wait time of all tasks in the - * job. The wait time for a task is defined as the elapsed time between the - * creation of the task and the start of task execution. (If the task is + * @property {moment.duration} waitTime The total wait time of all tasks in + * the job. The wait time for a task is defined as the elapsed time between + * the creation of the task and the start of task execution. (If the task is * retried due to failures, the wait time is the time to the most recent task * execution.) This value is only reported in the account lifetime * statistics; it is not included in the job statistics. diff --git a/lib/services/batch/lib/models/jobTerminateOptions.js b/lib/services/batch/lib/models/jobTerminateOptions.js index 659a98e0c9..947726af24 100644 --- a/lib/services/batch/lib/models/jobTerminateOptions.js +++ b/lib/services/batch/lib/models/jobTerminateOptions.js @@ -17,30 +17,30 @@ class JobTerminateOptions { /** * Create a JobTerminateOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. + * @property {string} [ifMatch] An ETag value associated with the version of * the resource known to the client. The operation will be performed only if * the resource's current ETag on the service exactly matches the value * specified by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version + * @property {string} [ifNoneMatch] An ETag value associated with the version * of the resource known to the client. The operation will be performed only * if the resource's current ETag on the service does not match the value * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last + * @property {date} [ifModifiedSince] A timestamp indicating the last + * modified time of the resource known to the client. The operation will be + * performed only if the resource on the service has been modified since the + * specified time. + * @property {date} [ifUnmodifiedSince] A timestamp indicating the last * modified time of the resource known to the client. The operation will be * performed only if the resource on the service has not been modified since * the specified time. diff --git a/lib/services/batch/lib/models/jobTerminateParameter.js b/lib/services/batch/lib/models/jobTerminateParameter.js index 3ac9460e51..4451b7e0f9 100644 --- a/lib/services/batch/lib/models/jobTerminateParameter.js +++ b/lib/services/batch/lib/models/jobTerminateParameter.js @@ -17,7 +17,7 @@ class JobTerminateParameter { /** * Create a JobTerminateParameter. - * @member {string} [terminateReason] The text you want to appear as the + * @property {string} [terminateReason] The text you want to appear as the * job's TerminateReason. The default is 'UserTerminate'. */ constructor() { diff --git a/lib/services/batch/lib/models/jobUpdateOptions.js b/lib/services/batch/lib/models/jobUpdateOptions.js index 81ae8f0dfd..fdba898a6f 100644 --- a/lib/services/batch/lib/models/jobUpdateOptions.js +++ b/lib/services/batch/lib/models/jobUpdateOptions.js @@ -17,30 +17,30 @@ class JobUpdateOptions { /** * Create a JobUpdateOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. + * @property {string} [ifMatch] An ETag value associated with the version of * the resource known to the client. The operation will be performed only if * the resource's current ETag on the service exactly matches the value * specified by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version + * @property {string} [ifNoneMatch] An ETag value associated with the version * of the resource known to the client. The operation will be performed only * if the resource's current ETag on the service does not match the value * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last + * @property {date} [ifModifiedSince] A timestamp indicating the last + * modified time of the resource known to the client. The operation will be + * performed only if the resource on the service has been modified since the + * specified time. + * @property {date} [ifUnmodifiedSince] A timestamp indicating the last * modified time of the resource known to the client. The operation will be * performed only if the resource on the service has not been modified since * the specified time. diff --git a/lib/services/batch/lib/models/jobUpdateParameter.js b/lib/services/batch/lib/models/jobUpdateParameter.js index 193895ab26..d91a7b13d1 100644 --- a/lib/services/batch/lib/models/jobUpdateParameter.js +++ b/lib/services/batch/lib/models/jobUpdateParameter.js @@ -17,38 +17,38 @@ class JobUpdateParameter { /** * Create a JobUpdateParameter. - * @member {number} [priority] The priority of the job. Priority values can + * @property {number} [priority] The priority of the job. Priority values can * range from -1000 to 1000, with -1000 being the lowest priority and 1000 * being the highest priority. If omitted, it is set to the default value 0. - * @member {object} [constraints] The execution constraints for the job. If + * @property {object} [constraints] The execution constraints for the job. If * omitted, the constraints are cleared. - * @member {moment.duration} [constraints.maxWallClockTime] If the job does + * @property {moment.duration} [constraints.maxWallClockTime] If the job does * not complete within the time limit, the Batch service terminates it and * any tasks that are still running. In this case, the termination reason * will be MaxWallClockTimeExpiry. If this property is not specified, there * is no time limit on how long the job may run. - * @member {number} [constraints.maxTaskRetryCount] Note that this value + * @property {number} [constraints.maxTaskRetryCount] Note that this value * specifically controls the number of retries. The Batch service will try * each task once, and may then retry up to this limit. For example, if the * maximum retry count is 3, Batch tries a task up to 4 times (one initial * try and 3 retries). If the maximum retry count is 0, the Batch service * does not retry tasks. If the maximum retry count is -1, the Batch service * retries tasks without limit. The default value is 0 (no retries). - * @member {object} poolInfo The pool on which the Batch service runs the + * @property {object} poolInfo The pool on which the Batch service runs the * job's tasks. You may change the pool for a job only when the job is * disabled. The Update Job call will fail if you include the poolInfo * element and the job is not disabled. If you specify an * autoPoolSpecification specification in the poolInfo, only the keepAlive * property can be updated, and then only if the auto pool has a * poolLifetimeOption of job. - * @member {string} [poolInfo.poolId] You must ensure that the pool + * @property {string} [poolInfo.poolId] You must ensure that the pool * referenced by this property exists. If the pool does not exist at the time * the Batch service tries to schedule a job, no tasks for the job will run * until you create a pool with that id. Note that the Batch service will not * reject the job request; it will simply not run tasks until the pool * exists. You must specify either the pool ID or the auto pool * specification, but not both. - * @member {object} [poolInfo.autoPoolSpecification] If auto pool creation + * @property {object} [poolInfo.autoPoolSpecification] If auto pool creation * fails, the Batch service moves the job to a completed state, and the pool * creation error is set in the job's scheduling error property. The Batch * service manages the lifetime (both creation and, unless keepAlive is @@ -56,28 +56,28 @@ class JobUpdateParameter { * lifetime of the auto pool while the job is active will result in * unexpected behavior. You must specify either the pool ID or the auto pool * specification, but not both. - * @member {string} [poolInfo.autoPoolSpecification.autoPoolIdPrefix] The + * @property {string} [poolInfo.autoPoolSpecification.autoPoolIdPrefix] The * Batch service assigns each auto pool a unique identifier on creation. To * distinguish between pools created for different purposes, you can specify * this element to add a prefix to the ID that is assigned. The prefix can be * up to 20 characters long. - * @member {string} [poolInfo.autoPoolSpecification.poolLifetimeOption] + * @property {string} [poolInfo.autoPoolSpecification.poolLifetimeOption] * Possible values include: 'jobSchedule', 'job' - * @member {boolean} [poolInfo.autoPoolSpecification.keepAlive] If false, the - * Batch service deletes the pool once its lifetime (as determined by the + * @property {boolean} [poolInfo.autoPoolSpecification.keepAlive] If false, + * the Batch service deletes the pool once its lifetime (as determined by the * poolLifetimeOption setting) expires; that is, when the job or job schedule * completes. If true, the Batch service does not delete the pool * automatically. It is up to the user to delete auto pools created with this * option. - * @member {object} [poolInfo.autoPoolSpecification.pool] - * @member {string} [poolInfo.autoPoolSpecification.pool.displayName] The + * @property {object} [poolInfo.autoPoolSpecification.pool] + * @property {string} [poolInfo.autoPoolSpecification.pool.displayName] The * display name need not be unique and can contain any Unicode characters up * to a maximum length of 1024. - * @member {string} [poolInfo.autoPoolSpecification.pool.vmSize] For + * @property {string} [poolInfo.autoPoolSpecification.pool.vmSize] For * information about available sizes of virtual machines in pools, see Choose * a VM size for compute nodes in an Azure Batch pool * (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration] This * property must be specified if the pool needs to be created with Azure PaaS * VMs. This property and virtualMachineConfiguration are mutually exclusive @@ -86,7 +86,7 @@ class JobUpdateParameter { * directly, the HTTP status code is 400 (Bad Request). This property cannot * be specified if the Batch account was created with its poolAllocationMode * property set to 'UserSubscription'. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osFamily] * Possible values are: * 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. @@ -95,55 +95,39 @@ class JobUpdateParameter { * 5 - OS Family 5, equivalent to Windows Server 2016. For more information, * see Azure Guest OS Releases * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). - * @member {string} - * [poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] + * @property {string} + * [poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osVersion] * The default value is * which specifies the latest operating system version * for the specified OS family. - * @member {string} - * [poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.currentOSVersion] - * This may differ from targetOSVersion if the pool state is Upgrading. In - * this case some virtual machines may be on the targetOSVersion and some may - * be on the currentOSVersion during the upgrade process. Once all virtual - * machines have upgraded, currentOSVersion is updated to be the same as - * targetOSVersion. - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration] This * property must be specified if the pool needs to be created with Azure IaaS * VMs. This property and cloudServiceConfiguration are mutually exclusive * and one of the properties must be specified. If neither is specified then * the Batch service returns an error; if you are calling the REST API * directly, the HTTP status code is 400 (Bad Request). - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference] - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.publisher] * For example, Canonical or MicrosoftWindowsServer. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.offer] * For example, UbuntuServer or WindowsServer. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.sku] * For example, 14.04.0-LTS or 2012-R2-Datacenter. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.version] * A value of 'latest' can be specified to select the latest version of an * image. If omitted, the default is 'latest'. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.virtualMachineImageId] * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as - * the Azure Batch account. For information about the firewall settings for - * the Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * @member {object} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * @member {string} - * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The default value for caching is readwrite. For information about the - * caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' - * @member {string} + * the Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. + * @property {string} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId] * The Batch node agent is a program that runs on each node in the pool, and * provides the command-and-control interface between the node and the Batch @@ -152,14 +136,14 @@ class JobUpdateParameter { * which matches the selected image reference. To get the list of supported * node agent SKUs along with their list of verified image references, see * the 'List supported node agent SKUs' operation. - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] - * This property must not be specified if the imageReference or osDisk - * property specifies a Linux OS image. - * @member {boolean} + * This property must not be specified if the imageReference property + * specifies a Linux OS image. + * @property {boolean} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] * If omitted, the default value is true. - * @member {array} + * @property {array} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.dataDisks] * This property must be specified if the compute nodes in the pool need to * have empty data disks attached to them. This cannot be updated. Each node @@ -171,7 +155,7 @@ class JobUpdateParameter { * https://docs.microsoft.com/en-us/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux * and * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.licenseType] * This only applies to images that contain the Windows operating system, and * should only be used when you hold valid on-premises licenses for the nodes @@ -180,106 +164,98 @@ class JobUpdateParameter { * * Windows_Server - The on-premises license is for Windows Server. * Windows_Client - The on-premises license is for Windows Client. - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration] * If specified, setup is performed on each node in the pool to allow tasks * to run in containers. All regular tasks and job manager tasks run on this * pool must specify the containerSettings property, and all other tasks may * specify it. - * @member {array} + * @property {array} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration.containerImageNames] * This is the full image reference, as would be specified to "docker pull". * An image will be sourced from the default Docker registry unless the image * is fully qualified with an alternative registry. - * @member {array} + * @property {array} * [poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration.containerRegistries] * If any images must be downloaded from a private registry which requires * credentials, then those credentials must be provided here. - * @member {number} [poolInfo.autoPoolSpecification.pool.maxTasksPerNode] The - * default value is 1. The maximum value of this setting depends on the size - * of the compute nodes in the pool (the vmSize setting). - * @member {object} + * @property {number} [poolInfo.autoPoolSpecification.pool.maxTasksPerNode] + * The default value is 1. The maximum value of this setting depends on the + * size of the compute nodes in the pool (the vmSize setting). + * @property {object} * [poolInfo.autoPoolSpecification.pool.taskSchedulingPolicy] - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.taskSchedulingPolicy.nodeFillType] * Possible values include: 'spread', 'pack' - * @member {moment.duration} + * @property {moment.duration} * [poolInfo.autoPoolSpecification.pool.resizeTimeout] This timeout applies * only to manual scaling; it has no effect when enableAutoScale is set to * true. The default value is 15 minutes. The minimum value is 5 minutes. If * you specify a value less than 5 minutes, the Batch service rejects the * request with an error; if you are calling the REST API directly, the HTTP * status code is 400 (Bad Request). - * @member {number} + * @property {number} * [poolInfo.autoPoolSpecification.pool.targetDedicatedNodes] This property * must not be specified if enableAutoScale is set to true. If * enableAutoScale is set to false, then you must set either * targetDedicatedNodes, targetLowPriorityNodes, or both. - * @member {number} + * @property {number} * [poolInfo.autoPoolSpecification.pool.targetLowPriorityNodes] This property * must not be specified if enableAutoScale is set to true. If * enableAutoScale is set to false, then you must set either * targetDedicatedNodes, targetLowPriorityNodes, or both. - * @member {boolean} [poolInfo.autoPoolSpecification.pool.enableAutoScale] If - * false, at least one of targetDedicateNodes and targetLowPriorityNodes must - * be specified. If true, the autoScaleFormula element is required. The pool - * automatically resizes according to the formula. The default value is + * @property {boolean} [poolInfo.autoPoolSpecification.pool.enableAutoScale] + * If false, at least one of targetDedicateNodes and targetLowPriorityNodes + * must be specified. If true, the autoScaleFormula element is required. The + * pool automatically resizes according to the formula. The default value is * false. - * @member {string} [poolInfo.autoPoolSpecification.pool.autoScaleFormula] + * @property {string} [poolInfo.autoPoolSpecification.pool.autoScaleFormula] * This property must not be specified if enableAutoScale is set to false. It * is required if enableAutoScale is set to true. The formula is checked for * validity before the pool is created. If the formula is not valid, the * Batch service rejects the request with detailed error information. - * @member {moment.duration} + * @property {moment.duration} * [poolInfo.autoPoolSpecification.pool.autoScaleEvaluationInterval] The * default value is 15 minutes. The minimum and maximum value are 5 minutes * and 168 hours respectively. If you specify a value less than 5 minutes or * greater than 168 hours, the Batch service rejects the request with an * invalid property value error; if you are calling the REST API directly, * the HTTP status code is 400 (Bad Request). - * @member {boolean} + * @property {boolean} * [poolInfo.autoPoolSpecification.pool.enableInterNodeCommunication] * Enabling inter-node communication limits the maximum size of the pool due * to deployment restrictions on the nodes of the pool. This may result in * the pool not reaching its desired size. The default value is false. - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.networkConfiguration] - * @member {string} - * [poolInfo.autoPoolSpecification.pool.networkConfiguration.subnetId] The - * virtual network must be in the same region and subscription as the Azure - * Batch account. The specified subnet should have enough free IP addresses - * to accommodate the number of nodes in the pool. If the subnet doesn't have - * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must - * allow communication from the Azure Batch service to be able to schedule - * tasks on the compute nodes. This can be verified by checking if the - * specified VNet has any associated Network Security Groups (NSG). If - * communication to the compute nodes in the specified subnet is denied by an - * NSG, then the Batch service will set the state of the compute nodes to - * unusable. For pools created with virtualMachineConfiguration only ARM - * virtual networks ('Microsoft.Network/virtualNetworks') are supported, but - * for pools created with cloudServiceConfiguration both ARM and classic - * virtual networks are supported. If the specified VNet has any associated - * Network Security Groups (NSG), then a few reserved system ports must be - * enabled for inbound communication. For pools created with a virtual - * machine configuration, enable ports 29876 and 29877, as well as port 22 - * for Linux and port 3389 for Windows. For pools created with a cloud - * service configuration, enable ports 10100, 20100, and 30100. Also enable - * outbound connections to Azure Storage on port 443. For more details see: + * @property {string} + * [poolInfo.autoPoolSpecification.pool.networkConfiguration.subnetId] This + * is of the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. + * The virtual network must be in the same region and subscription as the + * Azure Batch account. The specified subnet should have enough free IP + * addresses to accommodate the number of nodes in the pool. If the subnet + * doesn't have enough free IP addresses, the pool will partially allocate + * compute nodes, and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks + * ('Microsoft.Network/virtualNetworks') are supported, but for pools created + * with cloudServiceConfiguration both ARM and classic virtual networks are + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration - * @member {object} + * @property {string} + * [poolInfo.autoPoolSpecification.pool.networkConfiguration.dynamicVNetAssignmentScope] + * Possible values include: 'none', 'job' + * @property {object} * [poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] * Pool endpoint configuration is only supported on pools with the * virtualMachineConfiguration property. - * @member {array} + * @property {array} * [poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration.inboundNATPools] * The maximum number of inbound NAT pools per Batch pool is 5. If the * maximum number of inbound NAT pools is exceeded the request fails with * HTTP status code 400. - * @member {object} [poolInfo.autoPoolSpecification.pool.startTask] - * @member {string} + * @property {object} [poolInfo.autoPoolSpecification.pool.startTask] + * @property {string} * [poolInfo.autoPoolSpecification.pool.startTask.commandLine] The command * line does not run under a shell, and therefore cannot take advantage of * shell features such as environment variable expansion. If you want to take @@ -289,56 +265,56 @@ class JobUpdateParameter { * use a relative path (relative to the task working directory), or use the * Batch provided environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings] When * this is specified, all directories recursively below the * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) * are mapped into the container, all task environment variables are mapped * into the container, and the task command line is executed in the * container. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.containerRunOptions] * These additional options are supplied as arguments to the "docker create" * command, in addition to those controlled by the Batch Service. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.imageName] * This is the full image reference, as would be specified to "docker pull". * If no tag is provided as part of the image name, the tag ":latest" is used * as a default. - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry] * This setting can be omitted if was already provided at pool creation. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.registryServer] * If omitted, the default is "docker.io". - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.userName] - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.startTask.containerSettings.registry.password] - * @member {array} + * @property {array} * [poolInfo.autoPoolSpecification.pool.startTask.resourceFiles] Files listed * under this element are located in the task's working directory. - * @member {array} + * @property {array} * [poolInfo.autoPoolSpecification.pool.startTask.environmentSettings] - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity] If omitted, * the task runs as a non-administrative user unique to the task. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity.userName] The * userName and autoUser properties are mutually exclusive; you must specify * one but not both. - * @member {object} + * @property {object} * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser] The * userName and autoUser properties are mutually exclusive; you must specify * one but not both. - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser.scope] * The default value is task. Possible values include: 'task', 'pool' - * @member {string} + * @property {string} * [poolInfo.autoPoolSpecification.pool.startTask.userIdentity.autoUser.elevationLevel] * The default value is nonAdmin. Possible values include: 'nonAdmin', * 'admin' - * @member {number} + * @property {number} * [poolInfo.autoPoolSpecification.pool.startTask.maxTaskRetryCount] The * Batch service retries a task if its exit code is nonzero. Note that this * value specifically controls the number of retries. The Batch service will @@ -347,7 +323,7 @@ class JobUpdateParameter { * initial try and 3 retries). If the maximum retry count is 0, the Batch * service does not retry the task. If the maximum retry count is -1, the * Batch service retries the task without limit. - * @member {boolean} + * @property {boolean} * [poolInfo.autoPoolSpecification.pool.startTask.waitForSuccess] If true and * the start task fails on a compute node, the Batch service retries the * start task up to its maximum retry count (maxTaskRetryCount). If the task @@ -359,7 +335,7 @@ class JobUpdateParameter { * node while the start task is still running; and even if the start task * fails, new tasks will continue to be scheduled on the node. The default is * false. - * @member {array} + * @property {array} * [poolInfo.autoPoolSpecification.pool.certificateReferences] For Windows * compute nodes, the Batch service installs the certificates to the * specified certificate store and location. For Linux compute nodes, the @@ -369,26 +345,27 @@ class JobUpdateParameter { * 'remoteUser', a 'certs' directory is created in the user's home directory * (e.g., /home/{user-name}/certs) and certificates are placed in that * directory. - * @member {array} + * @property {array} * [poolInfo.autoPoolSpecification.pool.applicationPackageReferences] - * @member {array} [poolInfo.autoPoolSpecification.pool.applicationLicenses] - * The list of application licenses must be a subset of available Batch - * service application licenses. If a license is requested which is not - * supported, pool creation will fail. The permitted licenses available on - * the pool are 'maya', 'vray', '3dsmax', 'arnold'. An additional charge - * applies for each application license added to the pool. - * @member {array} [poolInfo.autoPoolSpecification.pool.userAccounts] - * @member {array} [poolInfo.autoPoolSpecification.pool.metadata] The Batch + * @property {array} + * [poolInfo.autoPoolSpecification.pool.applicationLicenses] The list of + * application licenses must be a subset of available Batch service + * application licenses. If a license is requested which is not supported, + * pool creation will fail. The permitted licenses available on the pool are + * 'maya', 'vray', '3dsmax', 'arnold'. An additional charge applies for each + * application license added to the pool. + * @property {array} [poolInfo.autoPoolSpecification.pool.userAccounts] + * @property {array} [poolInfo.autoPoolSpecification.pool.metadata] The Batch * service does not assign any meaning to metadata; it is solely for the use * of user code. - * @member {array} [metadata] A list of name-value pairs associated with the - * job as metadata. If omitted, it takes the default value of an empty list; - * in effect, any existing metadata is deleted. - * @member {string} [onAllTasksComplete] The action the Batch service should - * take when all tasks in the job are in the completed state. If omitted, the - * completion behavior is set to noaction. If the current value is - * terminatejob, this is an error because a job's completion behavior may not - * be changed from terminatejob to noaction. You may not change the value + * @property {array} [metadata] A list of name-value pairs associated with + * the job as metadata. If omitted, it takes the default value of an empty + * list; in effect, any existing metadata is deleted. + * @property {string} [onAllTasksComplete] The action the Batch service + * should take when all tasks in the job are in the completed state. If + * omitted, the completion behavior is set to noaction. If the current value + * is terminatejob, this is an error because a job's completion behavior may + * not be changed from terminatejob to noaction. You may not change the value * from terminatejob to noaction - that is, once you have engaged automatic * job termination, you cannot turn it off again. If you try to do this, the * request fails and Batch returns status code 400 (Bad Request) and an diff --git a/lib/services/batch/lib/models/linuxUserConfiguration.js b/lib/services/batch/lib/models/linuxUserConfiguration.js index d2503e63c1..6b536da646 100644 --- a/lib/services/batch/lib/models/linuxUserConfiguration.js +++ b/lib/services/batch/lib/models/linuxUserConfiguration.js @@ -17,20 +17,21 @@ class LinuxUserConfiguration { /** * Create a LinuxUserConfiguration. - * @member {number} [uid] The user ID of the user account. The uid and gid + * @property {number} [uid] The user ID of the user account. The uid and gid * properties must be specified together or not at all. If not specified the * underlying operating system picks the uid. - * @member {number} [gid] The group ID for the user account. The uid and gid - * properties must be specified together or not at all. If not specified the - * underlying operating system picks the gid. - * @member {string} [sshPrivateKey] The SSH private key for the user account. - * The private key must not be password protected. The private key is used to - * automatically configure asymmetric-key based authentication for SSH - * between nodes in a Linux pool when the pool's enableInterNodeCommunication - * property is true (it is ignored if enableInterNodeCommunication is false). - * It does this by placing the key pair into the user's .ssh directory. If - * not specified, password-less SSH is not configured between nodes (no - * modification of the user's .ssh directory is done). + * @property {number} [gid] The group ID for the user account. The uid and + * gid properties must be specified together or not at all. If not specified + * the underlying operating system picks the gid. + * @property {string} [sshPrivateKey] The SSH private key for the user + * account. The private key must not be password protected. The private key + * is used to automatically configure asymmetric-key based authentication for + * SSH between nodes in a Linux pool when the pool's + * enableInterNodeCommunication property is true (it is ignored if + * enableInterNodeCommunication is false). It does this by placing the key + * pair into the user's .ssh directory. If not specified, password-less SSH + * is not configured between nodes (no modification of the user's .ssh + * directory is done). */ constructor() { } diff --git a/lib/services/batch/lib/models/metadataItem.js b/lib/services/batch/lib/models/metadataItem.js index 0fe646020e..558d39b90f 100644 --- a/lib/services/batch/lib/models/metadataItem.js +++ b/lib/services/batch/lib/models/metadataItem.js @@ -20,8 +20,8 @@ class MetadataItem { /** * Create a MetadataItem. - * @member {string} name The name of the metadata item. - * @member {string} value The value of the metadata item. + * @property {string} name The name of the metadata item. + * @property {string} value The value of the metadata item. */ constructor() { } diff --git a/lib/services/batch/lib/models/multiInstanceSettings.js b/lib/services/batch/lib/models/multiInstanceSettings.js index d94d4ab3d4..1e90a4d91a 100644 --- a/lib/services/batch/lib/models/multiInstanceSettings.js +++ b/lib/services/batch/lib/models/multiInstanceSettings.js @@ -19,14 +19,14 @@ class MultiInstanceSettings { /** * Create a MultiInstanceSettings. - * @member {number} [numberOfInstances] The number of compute nodes required - * by the task. If omitted, the default is 1. - * @member {string} coordinationCommandLine The command line to run on all + * @property {number} [numberOfInstances] The number of compute nodes + * required by the task. If omitted, the default is 1. + * @property {string} coordinationCommandLine The command line to run on all * the compute nodes to enable them to coordinate when the primary runs the * main task command. A typical coordination command line launches a * background service and verifies that the service is ready to process * inter-node messages. - * @member {array} [commonResourceFiles] A list of files that the Batch + * @property {array} [commonResourceFiles] A list of files that the Batch * service will download before running the coordination command line. The * difference between common resource files and task resource files is that * common resource files are downloaded for all subtasks including the diff --git a/lib/services/batch/lib/models/nameValuePair.js b/lib/services/batch/lib/models/nameValuePair.js index 55627a4252..2b825146ba 100644 --- a/lib/services/batch/lib/models/nameValuePair.js +++ b/lib/services/batch/lib/models/nameValuePair.js @@ -17,8 +17,8 @@ class NameValuePair { /** * Create a NameValuePair. - * @member {string} [name] The name in the name-value pair. - * @member {string} [value] The value in the name-value pair. + * @property {string} [name] The name in the name-value pair. + * @property {string} [value] The value in the name-value pair. */ constructor() { } diff --git a/lib/services/batch/lib/models/networkConfiguration.js b/lib/services/batch/lib/models/networkConfiguration.js index 4a542fdc3a..5428452926 100644 --- a/lib/services/batch/lib/models/networkConfiguration.js +++ b/lib/services/batch/lib/models/networkConfiguration.js @@ -17,7 +17,7 @@ class NetworkConfiguration { /** * Create a NetworkConfiguration. - * @member {string} [subnetId] The ARM resource identifier of the virtual + * @property {string} [subnetId] The ARM resource identifier of the virtual * network subnet which the compute nodes of the pool will join. This is of * the form * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. @@ -25,31 +25,20 @@ class NetworkConfiguration { * Azure Batch account. The specified subnet should have enough free IP * addresses to accommodate the number of nodes in the pool. If the subnet * doesn't have enough free IP addresses, the pool will partially allocate - * compute nodes, and a resize error will occur. The 'MicrosoftAzureBatch' - * service principal must have the 'Classic Virtual Machine Contributor' - * Role-Based Access Control (RBAC) role for the specified VNet. The - * specified subnet must allow communication from the Azure Batch service to - * be able to schedule tasks on the compute nodes. This can be verified by - * checking if the specified VNet has any associated Network Security Groups - * (NSG). If communication to the compute nodes in the specified subnet is - * denied by an NSG, then the Batch service will set the state of the compute - * nodes to unusable. For pools created with virtualMachineConfiguration only - * ARM virtual networks ('Microsoft.Network/virtualNetworks') are supported, - * but for pools created with cloudServiceConfiguration both ARM and classic - * virtual networks are supported. If the specified VNet has any associated - * Network Security Groups (NSG), then a few reserved system ports must be - * enabled for inbound communication. For pools created with a virtual - * machine configuration, enable ports 29876 and 29877, as well as port 22 - * for Linux and port 3389 for Windows. For pools created with a cloud - * service configuration, enable ports 10100, 20100, and 30100. Also enable - * outbound connections to Azure Storage on port 443. For more details see: + * compute nodes, and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks + * ('Microsoft.Network/virtualNetworks') are supported, but for pools created + * with cloudServiceConfiguration both ARM and classic virtual networks are + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration - * @member {object} [endpointConfiguration] The configuration for endpoints + * @property {string} [dynamicVNetAssignmentScope] The scope of dynamic vnet + * assignment. Possible values include: 'none', 'job' + * @property {object} [endpointConfiguration] The configuration for endpoints * on compute nodes in the Batch pool. Pool endpoint configuration is only * supported on pools with the virtualMachineConfiguration property. - * @member {array} [endpointConfiguration.inboundNATPools] The maximum number - * of inbound NAT pools per Batch pool is 5. If the maximum number of inbound - * NAT pools is exceeded the request fails with HTTP status code 400. + * @property {array} [endpointConfiguration.inboundNATPools] The maximum + * number of inbound NAT pools per Batch pool is 5. If the maximum number of + * inbound NAT pools is exceeded the request fails with HTTP status code 400. */ constructor() { } @@ -75,6 +64,14 @@ class NetworkConfiguration { name: 'String' } }, + dynamicVNetAssignmentScope: { + required: false, + serializedName: 'dynamicVNetAssignmentScope', + type: { + name: 'Enum', + allowedValues: [ 'none', 'job' ] + } + }, endpointConfiguration: { required: false, serializedName: 'endpointConfiguration', diff --git a/lib/services/batch/lib/models/networkSecurityGroupRule.js b/lib/services/batch/lib/models/networkSecurityGroupRule.js index 55df0e3cea..f599bda9ee 100644 --- a/lib/services/batch/lib/models/networkSecurityGroupRule.js +++ b/lib/services/batch/lib/models/networkSecurityGroupRule.js @@ -17,16 +17,16 @@ class NetworkSecurityGroupRule { /** * Create a NetworkSecurityGroupRule. - * @member {number} priority The priority for this rule. Priorities within a - * pool must be unique and are evaluated in order of priority. The lower the - * number the higher the priority. For example, rules could be specified with - * order numbers of 150, 250, and 350. The rule with the order number of 150 - * takes precedence over the rule that has an order of 250. Allowed + * @property {number} priority The priority for this rule. Priorities within + * a pool must be unique and are evaluated in order of priority. The lower + * the number the higher the priority. For example, rules could be specified + * with order numbers of 150, 250, and 350. The rule with the order number of + * 150 takes precedence over the rule that has an order of 250. Allowed * priorities are 150 to 3500. If any reserved or duplicate values are * provided the request fails with HTTP status code 400. - * @member {string} access The action that should be taken for a specified IP - * address, subnet range or tag. Possible values include: 'allow', 'deny' - * @member {string} sourceAddressPrefix The source address prefix or tag to + * @property {string} access The action that should be taken for a specified + * IP address, subnet range or tag. Possible values include: 'allow', 'deny' + * @property {string} sourceAddressPrefix The source address prefix or tag to * match for the rule. Valid values are a single IP address (i.e. * 10.10.10.10), IP subnet (i.e. 192.168.1.0/24), default tag, or * (for all * addresses). If any other values are provided the request fails with HTTP diff --git a/lib/services/batch/lib/models/nodeAgentInformation.js b/lib/services/batch/lib/models/nodeAgentInformation.js index 856114d4e2..3961e68610 100644 --- a/lib/services/batch/lib/models/nodeAgentInformation.js +++ b/lib/services/batch/lib/models/nodeAgentInformation.js @@ -20,12 +20,12 @@ class NodeAgentInformation { /** * Create a NodeAgentInformation. - * @member {string} version The version of the Batch node agent running on + * @property {string} version The version of the Batch node agent running on * the compute node. This version number can be checked against the node * agent release notes located at * https://github.com/Azure/Batch/blob/master/changelogs/nodeagent/CHANGELOG.md. - * @member {date} lastUpdateTime The time when the node agent was updated on - * the compute node. This is the most recent time that the node agent was + * @property {date} lastUpdateTime The time when the node agent was updated + * on the compute node. This is the most recent time that the node agent was * updated to a new version. */ constructor() { diff --git a/lib/services/batch/lib/models/nodeAgentSku.js b/lib/services/batch/lib/models/nodeAgentSku.js index fb6e6ebdba..0b89df37eb 100644 --- a/lib/services/batch/lib/models/nodeAgentSku.js +++ b/lib/services/batch/lib/models/nodeAgentSku.js @@ -22,11 +22,11 @@ class NodeAgentSku { /** * Create a NodeAgentSku. - * @member {string} [id] The ID of the node agent SKU. - * @member {array} [verifiedImageReferences] The list of Azure Marketplace + * @property {string} [id] The ID of the node agent SKU. + * @property {array} [verifiedImageReferences] The list of Azure Marketplace * images verified to be compatible with this node agent SKU. This collection * is not exhaustive (the node agent may be compatible with other images). - * @member {string} [osType] The type of operating system (e.g. Windows or + * @property {string} [osType] The type of operating system (e.g. Windows or * Linux) compatible with the node agent SKU. Possible values include: * 'linux', 'windows' */ diff --git a/lib/services/batch/lib/models/nodeCounts.js b/lib/services/batch/lib/models/nodeCounts.js index 7534829ea7..8e3692e0f6 100644 --- a/lib/services/batch/lib/models/nodeCounts.js +++ b/lib/services/batch/lib/models/nodeCounts.js @@ -17,22 +17,23 @@ class NodeCounts { /** * Create a NodeCounts. - * @member {number} creating The number of nodes in the creating state. - * @member {number} idle The number of nodes in the idle state. - * @member {number} offline The number of nodes in the offline state. - * @member {number} preempted The number of nodes in the preempted state. - * @member {number} rebooting The count of nodes in the rebooting state. - * @member {number} reimaging The number of nodes in the reimaging state. - * @member {number} running The number of nodes in the running state. - * @member {number} starting The number of nodes in the starting state. - * @member {number} startTaskFailed The number of nodes in the + * @property {number} creating The number of nodes in the creating state. + * @property {number} idle The number of nodes in the idle state. + * @property {number} offline The number of nodes in the offline state. + * @property {number} preempted The number of nodes in the preempted state. + * @property {number} rebooting The count of nodes in the rebooting state. + * @property {number} reimaging The number of nodes in the reimaging state. + * @property {number} running The number of nodes in the running state. + * @property {number} starting The number of nodes in the starting state. + * @property {number} startTaskFailed The number of nodes in the * startTaskFailed state. - * @member {number} leavingPool The number of nodes in the leavingPool state. - * @member {number} unknown The number of nodes in the unknown state. - * @member {number} unusable The number of nodes in the unusable state. - * @member {number} waitingForStartTask The number of nodes in the + * @property {number} leavingPool The number of nodes in the leavingPool + * state. + * @property {number} unknown The number of nodes in the unknown state. + * @property {number} unusable The number of nodes in the unusable state. + * @property {number} waitingForStartTask The number of nodes in the * waitingForStartTask state. - * @member {number} total The total number of nodes. + * @property {number} total The total number of nodes. */ constructor() { } diff --git a/lib/services/batch/lib/models/nodeDisableSchedulingParameter.js b/lib/services/batch/lib/models/nodeDisableSchedulingParameter.js index 47a2aa2e54..3c29531036 100644 --- a/lib/services/batch/lib/models/nodeDisableSchedulingParameter.js +++ b/lib/services/batch/lib/models/nodeDisableSchedulingParameter.js @@ -17,7 +17,7 @@ class NodeDisableSchedulingParameter { /** * Create a NodeDisableSchedulingParameter. - * @member {string} [nodeDisableSchedulingOption] What to do with currently + * @property {string} [nodeDisableSchedulingOption] What to do with currently * running tasks when disabling task scheduling on the compute node. The * default value is requeue. Possible values include: 'requeue', 'terminate', * 'taskCompletion' diff --git a/lib/services/batch/lib/models/nodeFile.js b/lib/services/batch/lib/models/nodeFile.js index e79906ed85..5bbe0357f3 100644 --- a/lib/services/batch/lib/models/nodeFile.js +++ b/lib/services/batch/lib/models/nodeFile.js @@ -17,17 +17,18 @@ class NodeFile { /** * Create a NodeFile. - * @member {string} [name] The file path. - * @member {string} [url] The URL of the file. - * @member {boolean} [isDirectory] Whether the object represents a directory. - * @member {object} [properties] The file properties. - * @member {date} [properties.creationTime] The creation time is not returned + * @property {string} [name] The file path. + * @property {string} [url] The URL of the file. + * @property {boolean} [isDirectory] Whether the object represents a + * directory. + * @property {object} [properties] The file properties. + * @property {date} [properties.creationTime] The creation time is not + * returned for files on Linux compute nodes. + * @property {date} [properties.lastModified] + * @property {number} [properties.contentLength] + * @property {string} [properties.contentType] + * @property {string} [properties.fileMode] The file mode is returned only * for files on Linux compute nodes. - * @member {date} [properties.lastModified] - * @member {number} [properties.contentLength] - * @member {string} [properties.contentType] - * @member {string} [properties.fileMode] The file mode is returned only for - * files on Linux compute nodes. */ constructor() { } diff --git a/lib/services/batch/lib/models/nodeFileListResult.js b/lib/services/batch/lib/models/nodeFileListResult.js index f9749f0e0a..162be9c91d 100644 --- a/lib/services/batch/lib/models/nodeFileListResult.js +++ b/lib/services/batch/lib/models/nodeFileListResult.js @@ -17,7 +17,7 @@ class NodeFileListResult extends Array { /** * Create a NodeFileListResult. - * @member {string} [odatanextLink] + * @property {string} [odatanextLink] */ constructor() { super(); diff --git a/lib/services/batch/lib/models/nodeRebootParameter.js b/lib/services/batch/lib/models/nodeRebootParameter.js index 7ffb2c0ba3..b40247a184 100644 --- a/lib/services/batch/lib/models/nodeRebootParameter.js +++ b/lib/services/batch/lib/models/nodeRebootParameter.js @@ -17,7 +17,7 @@ class NodeRebootParameter { /** * Create a NodeRebootParameter. - * @member {string} [nodeRebootOption] When to reboot the compute node and + * @property {string} [nodeRebootOption] When to reboot the compute node and * what to do with currently running tasks. The default value is requeue. * Possible values include: 'requeue', 'terminate', 'taskCompletion', * 'retainedData' diff --git a/lib/services/batch/lib/models/nodeReimageParameter.js b/lib/services/batch/lib/models/nodeReimageParameter.js index 959aa60ac1..8d272c8b50 100644 --- a/lib/services/batch/lib/models/nodeReimageParameter.js +++ b/lib/services/batch/lib/models/nodeReimageParameter.js @@ -17,8 +17,8 @@ class NodeReimageParameter { /** * Create a NodeReimageParameter. - * @member {string} [nodeReimageOption] When to reimage the compute node and - * what to do with currently running tasks. The default value is requeue. + * @property {string} [nodeReimageOption] When to reimage the compute node + * and what to do with currently running tasks. The default value is requeue. * Possible values include: 'requeue', 'terminate', 'taskCompletion', * 'retainedData' */ diff --git a/lib/services/batch/lib/models/nodeRemoveParameter.js b/lib/services/batch/lib/models/nodeRemoveParameter.js index b29aec72bf..23c12fd24f 100644 --- a/lib/services/batch/lib/models/nodeRemoveParameter.js +++ b/lib/services/batch/lib/models/nodeRemoveParameter.js @@ -17,14 +17,14 @@ class NodeRemoveParameter { /** * Create a NodeRemoveParameter. - * @member {array} nodeList A list containing the IDs of the compute nodes to - * be removed from the specified pool. - * @member {moment.duration} [resizeTimeout] The timeout for removal of + * @property {array} nodeList A list containing the IDs of the compute nodes + * to be removed from the specified pool. + * @property {moment.duration} [resizeTimeout] The timeout for removal of * compute nodes to the pool. The default value is 15 minutes. The minimum * value is 5 minutes. If you specify a value less than 5 minutes, the Batch * service returns an error; if you are calling the REST API directly, the * HTTP status code is 400 (Bad Request). - * @member {string} [nodeDeallocationOption] Determines what to do with a + * @property {string} [nodeDeallocationOption] Determines what to do with a * node and its running task(s) after it has been selected for deallocation. * The default value is requeue. Possible values include: 'requeue', * 'terminate', 'taskCompletion', 'retainedData' diff --git a/lib/services/batch/lib/models/nodeUpdateUserParameter.js b/lib/services/batch/lib/models/nodeUpdateUserParameter.js index ad56736000..c2645a3806 100644 --- a/lib/services/batch/lib/models/nodeUpdateUserParameter.js +++ b/lib/services/batch/lib/models/nodeUpdateUserParameter.js @@ -17,16 +17,16 @@ class NodeUpdateUserParameter { /** * Create a NodeUpdateUserParameter. - * @member {string} [password] The password of the account. The password is + * @property {string} [password] The password of the account. The password is * required for Windows nodes (those created with * 'cloudServiceConfiguration', or created with 'virtualMachineConfiguration' * using a Windows image reference). For Linux compute nodes, the password * can optionally be specified along with the sshPublicKey property. If * omitted, any existing password is removed. - * @member {date} [expiryTime] The time at which the account should expire. + * @property {date} [expiryTime] The time at which the account should expire. * If omitted, the default is 1 day from the current time. For Linux compute * nodes, the expiryTime has a precision up to a day. - * @member {string} [sshPublicKey] The SSH public key that can be used for + * @property {string} [sshPublicKey] The SSH public key that can be used for * remote login to the compute node. The public key should be compatible with * OpenSSH encoding and should be base 64 encoded. This property can be * specified only for Linux nodes. If this is specified for a Windows node, diff --git a/lib/services/batch/lib/models/oSDisk.js b/lib/services/batch/lib/models/oSDisk.js deleted file mode 100644 index f72ed75623..0000000000 --- a/lib/services/batch/lib/models/oSDisk.js +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -'use strict'; - -/** - * @summary Settings for the operating system disk of the virtual machine. - * - */ -class OSDisk { - /** - * Create a OSDisk. - * @member {string} [caching] The type of caching to enable for the OS disk. - * The default value for caching is readwrite. For information about the - * caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' - */ - constructor() { - } - - /** - * Defines the metadata of OSDisk - * - * @returns {object} metadata of OSDisk - * - */ - mapper() { - return { - required: false, - serializedName: 'OSDisk', - type: { - name: 'Composite', - className: 'OSDisk', - modelProperties: { - caching: { - required: false, - serializedName: 'caching', - type: { - name: 'Enum', - allowedValues: [ 'none', 'readOnly', 'readWrite' ] - } - } - } - } - }; - } -} - -module.exports = OSDisk; diff --git a/lib/services/batch/lib/models/outputFile.js b/lib/services/batch/lib/models/outputFile.js index 0543b77b4f..26ae059a9b 100644 --- a/lib/services/batch/lib/models/outputFile.js +++ b/lib/services/batch/lib/models/outputFile.js @@ -19,8 +19,8 @@ class OutputFile { /** * Create a OutputFile. - * @member {string} filePattern A pattern indicating which file(s) to upload. - * Both relative and absolute paths are supported. Relative paths are + * @property {string} filePattern A pattern indicating which file(s) to + * upload. Both relative and absolute paths are supported. Relative paths are * relative to the task working directory. The following wildcards are * supported: * matches 0 or more characters (for example pattern abc* would * match abc or abcdef), ** matches any directory, ? matches any single @@ -36,21 +36,21 @@ class OutputFile { * Note that both \ and / are treated as directory separators on Windows, but * only / is on Linux. Environment variables (%var% on Windows or $var on * Linux) are expanded prior to the pattern being applied. - * @member {object} destination The destination for the output file(s). - * @member {object} [destination.container] - * @member {string} [destination.container.path] If filePattern refers to a + * @property {object} destination The destination for the output file(s). + * @property {object} [destination.container] + * @property {string} [destination.container.path] If filePattern refers to a * specific file (i.e. contains no wildcards), then path is the name of the * blob to which to upload that file. If filePattern contains one or more * wildcards (and therefore may match multiple files), then path is the name * of the blob virtual directory (which is prepended to each blob name) to * which to upload the file(s). If omitted, file(s) are uploaded to the root * of the container with a blob name matching their file name. - * @member {string} [destination.container.containerUrl] The URL must include - * a Shared Access Signature (SAS) granting write permissions to the + * @property {string} [destination.container.containerUrl] The URL must + * include a Shared Access Signature (SAS) granting write permissions to the * container. - * @member {object} uploadOptions Additional options for the upload + * @property {object} uploadOptions Additional options for the upload * operation, including under what conditions to perform the upload. - * @member {string} [uploadOptions.uploadCondition] The default is + * @property {string} [uploadOptions.uploadCondition] The default is * taskcompletion. Possible values include: 'taskSuccess', 'taskFailure', * 'taskCompletion' */ diff --git a/lib/services/batch/lib/models/outputFileBlobContainerDestination.js b/lib/services/batch/lib/models/outputFileBlobContainerDestination.js index 03483a49cd..6b54459a15 100644 --- a/lib/services/batch/lib/models/outputFileBlobContainerDestination.js +++ b/lib/services/batch/lib/models/outputFileBlobContainerDestination.js @@ -18,7 +18,7 @@ class OutputFileBlobContainerDestination { /** * Create a OutputFileBlobContainerDestination. - * @member {string} [path] The destination blob or virtual directory within + * @property {string} [path] The destination blob or virtual directory within * the Azure Storage container. If filePattern refers to a specific file * (i.e. contains no wildcards), then path is the name of the blob to which * to upload that file. If filePattern contains one or more wildcards (and @@ -26,7 +26,7 @@ class OutputFileBlobContainerDestination { * virtual directory (which is prepended to each blob name) to which to * upload the file(s). If omitted, file(s) are uploaded to the root of the * container with a blob name matching their file name. - * @member {string} containerUrl The URL of the container within Azure Blob + * @property {string} containerUrl The URL of the container within Azure Blob * Storage to which to upload the file(s). The URL must include a Shared * Access Signature (SAS) granting write permissions to the container. */ diff --git a/lib/services/batch/lib/models/outputFileDestination.js b/lib/services/batch/lib/models/outputFileDestination.js index 6a4e972aa3..f8691e3a36 100644 --- a/lib/services/batch/lib/models/outputFileDestination.js +++ b/lib/services/batch/lib/models/outputFileDestination.js @@ -17,16 +17,16 @@ class OutputFileDestination { /** * Create a OutputFileDestination. - * @member {object} [container] A location in Azure blob storage to which + * @property {object} [container] A location in Azure blob storage to which * files are uploaded. - * @member {string} [container.path] If filePattern refers to a specific file - * (i.e. contains no wildcards), then path is the name of the blob to which - * to upload that file. If filePattern contains one or more wildcards (and - * therefore may match multiple files), then path is the name of the blob - * virtual directory (which is prepended to each blob name) to which to + * @property {string} [container.path] If filePattern refers to a specific + * file (i.e. contains no wildcards), then path is the name of the blob to + * which to upload that file. If filePattern contains one or more wildcards + * (and therefore may match multiple files), then path is the name of the + * blob virtual directory (which is prepended to each blob name) to which to * upload the file(s). If omitted, file(s) are uploaded to the root of the * container with a blob name matching their file name. - * @member {string} [container.containerUrl] The URL must include a Shared + * @property {string} [container.containerUrl] The URL must include a Shared * Access Signature (SAS) granting write permissions to the container. */ constructor() { diff --git a/lib/services/batch/lib/models/outputFileUploadOptions.js b/lib/services/batch/lib/models/outputFileUploadOptions.js index f13155b8af..ff61eb5103 100644 --- a/lib/services/batch/lib/models/outputFileUploadOptions.js +++ b/lib/services/batch/lib/models/outputFileUploadOptions.js @@ -18,7 +18,7 @@ class OutputFileUploadOptions { /** * Create a OutputFileUploadOptions. - * @member {string} uploadCondition The conditions under which the task + * @property {string} uploadCondition The conditions under which the task * output file or set of files should be uploaded. The default is * taskcompletion. Possible values include: 'taskSuccess', 'taskFailure', * 'taskCompletion' diff --git a/lib/services/batch/lib/models/poolAddOptions.js b/lib/services/batch/lib/models/poolAddOptions.js index d8286dcc24..ae9e825c61 100644 --- a/lib/services/batch/lib/models/poolAddOptions.js +++ b/lib/services/batch/lib/models/poolAddOptions.js @@ -17,17 +17,17 @@ class PoolAddOptions { /** * Create a PoolAddOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/poolAddParameter.js b/lib/services/batch/lib/models/poolAddParameter.js index 850f02088d..d607fea9c7 100644 --- a/lib/services/batch/lib/models/poolAddParameter.js +++ b/lib/services/batch/lib/models/poolAddParameter.js @@ -17,15 +17,15 @@ class PoolAddParameter { /** * Create a PoolAddParameter. - * @member {string} id A string that uniquely identifies the pool within the - * account. The ID can contain any combination of alphanumeric characters + * @property {string} id A string that uniquely identifies the pool within + * the account. The ID can contain any combination of alphanumeric characters * including hyphens and underscores, and cannot contain more than 64 * characters. The ID is case-preserving and case-insensitive (that is, you * may not have two pool IDs within an account that differ only by case). - * @member {string} [displayName] The display name for the pool. The display - * name need not be unique and can contain any Unicode characters up to a - * maximum length of 1024. - * @member {string} vmSize The size of virtual machines in the pool. All + * @property {string} [displayName] The display name for the pool. The + * display name need not be unique and can contain any Unicode characters up + * to a maximum length of 1024. + * @property {string} vmSize The size of virtual machines in the pool. All * virtual machines in a pool are the same size. For information about * available sizes of virtual machines for Cloud Services pools (pools * created with cloudServiceConfiguration), see Sizes for Cloud Services @@ -39,54 +39,42 @@ class PoolAddParameter { * (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). * Batch supports all Azure VM sizes except STANDARD_A0 and those with * premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). - * @member {object} [cloudServiceConfiguration] The cloud service + * @property {object} [cloudServiceConfiguration] The cloud service * configuration for the pool. This property and virtualMachineConfiguration * are mutually exclusive and one of the properties must be specified. This * property cannot be specified if the Batch account was created with its * poolAllocationMode property set to 'UserSubscription'. - * @member {string} [cloudServiceConfiguration.osFamily] Possible values are: + * @property {string} [cloudServiceConfiguration.osFamily] Possible values + * are: * 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. * 3 - OS Family 3, equivalent to Windows Server 2012. * 4 - OS Family 4, equivalent to Windows Server 2012 R2. * 5 - OS Family 5, equivalent to Windows Server 2016. For more information, * see Azure Guest OS Releases * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). - * @member {string} [cloudServiceConfiguration.targetOSVersion] The default - * value is * which specifies the latest operating system version for the - * specified OS family. - * @member {string} [cloudServiceConfiguration.currentOSVersion] This may - * differ from targetOSVersion if the pool state is Upgrading. In this case - * some virtual machines may be on the targetOSVersion and some may be on the - * currentOSVersion during the upgrade process. Once all virtual machines - * have upgraded, currentOSVersion is updated to be the same as - * targetOSVersion. - * @member {object} [virtualMachineConfiguration] The virtual machine + * @property {string} [cloudServiceConfiguration.osVersion] The default value + * is * which specifies the latest operating system version for the specified + * OS family. + * @property {object} [virtualMachineConfiguration] The virtual machine * configuration for the pool. This property and cloudServiceConfiguration * are mutually exclusive and one of the properties must be specified. - * @member {object} [virtualMachineConfiguration.imageReference] - * @member {string} [virtualMachineConfiguration.imageReference.publisher] + * @property {object} [virtualMachineConfiguration.imageReference] + * @property {string} [virtualMachineConfiguration.imageReference.publisher] * For example, Canonical or MicrosoftWindowsServer. - * @member {string} [virtualMachineConfiguration.imageReference.offer] For + * @property {string} [virtualMachineConfiguration.imageReference.offer] For * example, UbuntuServer or WindowsServer. - * @member {string} [virtualMachineConfiguration.imageReference.sku] For + * @property {string} [virtualMachineConfiguration.imageReference.sku] For * example, 14.04.0-LTS or 2012-R2-Datacenter. - * @member {string} [virtualMachineConfiguration.imageReference.version] A + * @property {string} [virtualMachineConfiguration.imageReference.version] A * value of 'latest' can be specified to select the latest version of an * image. If omitted, the default is 'latest'. - * @member {string} + * @property {string} * [virtualMachineConfiguration.imageReference.virtualMachineImageId] This * property is mutually exclusive with other ImageReference properties. The * virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * @member {object} [virtualMachineConfiguration.osDisk] - * @member {string} [virtualMachineConfiguration.osDisk.caching] The default - * value for caching is readwrite. For information about the caching options - * see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' - * @member {string} [virtualMachineConfiguration.nodeAgentSKUId] The Batch + * Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. + * @property {string} [virtualMachineConfiguration.nodeAgentSKUId] The Batch * node agent is a program that runs on each node in the pool, and provides * the command-and-control interface between the node and the Batch service. * There are different implementations of the node agent, known as SKUs, for @@ -94,14 +82,14 @@ class PoolAddParameter { * matches the selected image reference. To get the list of supported node * agent SKUs along with their list of verified image references, see the * 'List supported node agent SKUs' operation. - * @member {object} [virtualMachineConfiguration.windowsConfiguration] This - * property must not be specified if the imageReference or osDisk property - * specifies a Linux OS image. - * @member {boolean} + * @property {object} [virtualMachineConfiguration.windowsConfiguration] This + * property must not be specified if the imageReference property specifies a + * Linux OS image. + * @property {boolean} * [virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] * If omitted, the default value is true. - * @member {array} [virtualMachineConfiguration.dataDisks] This property must - * be specified if the compute nodes in the pool need to have empty data + * @property {array} [virtualMachineConfiguration.dataDisks] This property + * must be specified if the compute nodes in the pool need to have empty data * disks attached to them. This cannot be updated. Each node gets its own * disk (the disk is not a file share). Existing disks cannot be attached, * each attached disk is empty. When the node is removed from the pool, the @@ -111,7 +99,7 @@ class PoolAddParameter { * https://docs.microsoft.com/en-us/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux * and * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. - * @member {string} [virtualMachineConfiguration.licenseType] This only + * @property {string} [virtualMachineConfiguration.licenseType] This only * applies to images that contain the Windows operating system, and should * only be used when you hold valid on-premises licenses for the nodes which * will be deployed. If omitted, no on-premises licensing discount is @@ -119,41 +107,41 @@ class PoolAddParameter { * * Windows_Server - The on-premises license is for Windows Server. * Windows_Client - The on-premises license is for Windows Client. - * @member {object} [virtualMachineConfiguration.containerConfiguration] If + * @property {object} [virtualMachineConfiguration.containerConfiguration] If * specified, setup is performed on each node in the pool to allow tasks to * run in containers. All regular tasks and job manager tasks run on this * pool must specify the containerSettings property, and all other tasks may * specify it. - * @member {array} + * @property {array} * [virtualMachineConfiguration.containerConfiguration.containerImageNames] * This is the full image reference, as would be specified to "docker pull". * An image will be sourced from the default Docker registry unless the image * is fully qualified with an alternative registry. - * @member {array} + * @property {array} * [virtualMachineConfiguration.containerConfiguration.containerRegistries] * If any images must be downloaded from a private registry which requires * credentials, then those credentials must be provided here. - * @member {moment.duration} [resizeTimeout] The timeout for allocation of + * @property {moment.duration} [resizeTimeout] The timeout for allocation of * compute nodes to the pool. This timeout applies only to manual scaling; it * has no effect when enableAutoScale is set to true. The default value is 15 * minutes. The minimum value is 5 minutes. If you specify a value less than * 5 minutes, the Batch service returns an error; if you are calling the REST * API directly, the HTTP status code is 400 (Bad Request). - * @member {number} [targetDedicatedNodes] The desired number of dedicated + * @property {number} [targetDedicatedNodes] The desired number of dedicated * compute nodes in the pool. This property must not be specified if * enableAutoScale is set to true. If enableAutoScale is set to false, then * you must set either targetDedicatedNodes, targetLowPriorityNodes, or both. - * @member {number} [targetLowPriorityNodes] The desired number of + * @property {number} [targetLowPriorityNodes] The desired number of * low-priority compute nodes in the pool. This property must not be * specified if enableAutoScale is set to true. If enableAutoScale is set to * false, then you must set either targetDedicatedNodes, * targetLowPriorityNodes, or both. - * @member {boolean} [enableAutoScale] Whether the pool size should + * @property {boolean} [enableAutoScale] Whether the pool size should * automatically adjust over time. If false, at least one of * targetDedicateNodes and targetLowPriorityNodes must be specified. If true, * the autoScaleFormula property is required and the pool automatically * resizes according to the formula. The default value is false. - * @member {string} [autoScaleFormula] A formula for the desired number of + * @property {string} [autoScaleFormula] A formula for the desired number of * compute nodes in the pool. This property must not be specified if * enableAutoScale is set to false. It is required if enableAutoScale is set * to true. The formula is checked for validity before the pool is created. @@ -161,55 +149,45 @@ class PoolAddParameter { * detailed error information. For more information about specifying this * formula, see 'Automatically scale compute nodes in an Azure Batch pool' * (https://azure.microsoft.com/documentation/articles/batch-automatic-scaling/). - * @member {moment.duration} [autoScaleEvaluationInterval] The time interval - * at which to automatically adjust the pool size according to the autoscale - * formula. The default value is 15 minutes. The minimum and maximum value - * are 5 minutes and 168 hours respectively. If you specify a value less than - * 5 minutes or greater than 168 hours, the Batch service returns an error; - * if you are calling the REST API directly, the HTTP status code is 400 (Bad - * Request). - * @member {boolean} [enableInterNodeCommunication] Whether the pool permits - * direct communication between nodes. Enabling inter-node communication - * limits the maximum size of the pool due to deployment restrictions on the - * nodes of the pool. This may result in the pool not reaching its desired - * size. The default value is false. - * @member {object} [networkConfiguration] The network configuration for the - * pool. - * @member {string} [networkConfiguration.subnetId] The virtual network must - * be in the same region and subscription as the Azure Batch account. The - * specified subnet should have enough free IP addresses to accommodate the - * number of nodes in the pool. If the subnet doesn't have enough free IP - * addresses, the pool will partially allocate compute nodes, and a resize - * error will occur. The 'MicrosoftAzureBatch' service principal must have - * the 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) - * role for the specified VNet. The specified subnet must allow communication - * from the Azure Batch service to be able to schedule tasks on the compute - * nodes. This can be verified by checking if the specified VNet has any - * associated Network Security Groups (NSG). If communication to the compute - * nodes in the specified subnet is denied by an NSG, then the Batch service - * will set the state of the compute nodes to unusable. For pools created - * with virtualMachineConfiguration only ARM virtual networks + * @property {moment.duration} [autoScaleEvaluationInterval] The time + * interval at which to automatically adjust the pool size according to the + * autoscale formula. The default value is 15 minutes. The minimum and + * maximum value are 5 minutes and 168 hours respectively. If you specify a + * value less than 5 minutes or greater than 168 hours, the Batch service + * returns an error; if you are calling the REST API directly, the HTTP + * status code is 400 (Bad Request). + * @property {boolean} [enableInterNodeCommunication] Whether the pool + * permits direct communication between nodes. Enabling inter-node + * communication limits the maximum size of the pool due to deployment + * restrictions on the nodes of the pool. This may result in the pool not + * reaching its desired size. The default value is false. + * @property {object} [networkConfiguration] The network configuration for + * the pool. + * @property {string} [networkConfiguration.subnetId] This is of the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. + * The virtual network must be in the same region and subscription as the + * Azure Batch account. The specified subnet should have enough free IP + * addresses to accommodate the number of nodes in the pool. If the subnet + * doesn't have enough free IP addresses, the pool will partially allocate + * compute nodes, and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks * ('Microsoft.Network/virtualNetworks') are supported, but for pools created * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security - * Groups (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 - * for Windows. For pools created with a cloud service configuration, enable - * ports 10100, 20100, and 30100. Also enable outbound connections to Azure - * Storage on port 443. For more details see: + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration - * @member {object} [networkConfiguration.endpointConfiguration] Pool + * @property {string} [networkConfiguration.dynamicVNetAssignmentScope] + * Possible values include: 'none', 'job' + * @property {object} [networkConfiguration.endpointConfiguration] Pool * endpoint configuration is only supported on pools with the * virtualMachineConfiguration property. - * @member {array} + * @property {array} * [networkConfiguration.endpointConfiguration.inboundNATPools] The maximum * number of inbound NAT pools per Batch pool is 5. If the maximum number of * inbound NAT pools is exceeded the request fails with HTTP status code 400. - * @member {object} [startTask] A task specified to run on each compute node - * as it joins the pool. The task runs when the node is added to the pool or - * when the node is restarted. - * @member {string} [startTask.commandLine] The command line does not run + * @property {object} [startTask] A task specified to run on each compute + * node as it joins the pool. The task runs when the node is added to the + * pool or when the node is restarted. + * @property {string} [startTask.commandLine] The command line does not run * under a shell, and therefore cannot take advantage of shell features such * as environment variable expansion. If you want to take advantage of such * features, you should invoke the shell in the command line, for example @@ -218,48 +196,48 @@ class PoolAddParameter { * (relative to the task working directory), or use the Batch provided * environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [startTask.containerSettings] When this is specified, all - * directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of + * @property {object} [startTask.containerSettings] When this is specified, + * all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of * Azure Batch directories on the node) are mapped into the container, all * task environment variables are mapped into the container, and the task * command line is executed in the container. - * @member {string} [startTask.containerSettings.containerRunOptions] These + * @property {string} [startTask.containerSettings.containerRunOptions] These * additional options are supplied as arguments to the "docker create" * command, in addition to those controlled by the Batch Service. - * @member {string} [startTask.containerSettings.imageName] This is the full - * image reference, as would be specified to "docker pull". If no tag is + * @property {string} [startTask.containerSettings.imageName] This is the + * full image reference, as would be specified to "docker pull". If no tag is * provided as part of the image name, the tag ":latest" is used as a * default. - * @member {object} [startTask.containerSettings.registry] This setting can + * @property {object} [startTask.containerSettings.registry] This setting can * be omitted if was already provided at pool creation. - * @member {string} [startTask.containerSettings.registry.registryServer] If - * omitted, the default is "docker.io". - * @member {string} [startTask.containerSettings.registry.userName] - * @member {string} [startTask.containerSettings.registry.password] - * @member {array} [startTask.resourceFiles] Files listed under this element - * are located in the task's working directory. - * @member {array} [startTask.environmentSettings] - * @member {object} [startTask.userIdentity] If omitted, the task runs as a + * @property {string} [startTask.containerSettings.registry.registryServer] + * If omitted, the default is "docker.io". + * @property {string} [startTask.containerSettings.registry.userName] + * @property {string} [startTask.containerSettings.registry.password] + * @property {array} [startTask.resourceFiles] Files listed under this + * element are located in the task's working directory. + * @property {array} [startTask.environmentSettings] + * @property {object} [startTask.userIdentity] If omitted, the task runs as a * non-administrative user unique to the task. - * @member {string} [startTask.userIdentity.userName] The userName and + * @property {string} [startTask.userIdentity.userName] The userName and * autoUser properties are mutually exclusive; you must specify one but not * both. - * @member {object} [startTask.userIdentity.autoUser] The userName and + * @property {object} [startTask.userIdentity.autoUser] The userName and * autoUser properties are mutually exclusive; you must specify one but not * both. - * @member {string} [startTask.userIdentity.autoUser.scope] The default value - * is task. Possible values include: 'task', 'pool' - * @member {string} [startTask.userIdentity.autoUser.elevationLevel] The + * @property {string} [startTask.userIdentity.autoUser.scope] The default + * value is task. Possible values include: 'task', 'pool' + * @property {string} [startTask.userIdentity.autoUser.elevationLevel] The * default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {number} [startTask.maxTaskRetryCount] The Batch service retries a - * task if its exit code is nonzero. Note that this value specifically + * @property {number} [startTask.maxTaskRetryCount] The Batch service retries + * a task if its exit code is nonzero. Note that this value specifically * controls the number of retries. The Batch service will try the task once, * and may then retry up to this limit. For example, if the maximum retry * count is 3, Batch tries the task up to 4 times (one initial try and 3 * retries). If the maximum retry count is 0, the Batch service does not * retry the task. If the maximum retry count is -1, the Batch service * retries the task without limit. - * @member {boolean} [startTask.waitForSuccess] If true and the start task + * @property {boolean} [startTask.waitForSuccess] If true and the start task * fails on a compute node, the Batch service retries the start task up to * its maximum retry count (maxTaskRetryCount). If the task has still not * completed successfully after all retries, then the Batch service marks the @@ -269,7 +247,7 @@ class PoolAddParameter { * other tasks can start executing on the compute node while the start task * is still running; and even if the start task fails, new tasks will * continue to be scheduled on the node. The default is false. - * @member {array} [certificateReferences] The list of certificates to be + * @property {array} [certificateReferences] The list of certificates to be * installed on each compute node in the pool. For Windows compute nodes, the * Batch service installs the certificates to the specified certificate store * and location. For Linux compute nodes, the certificates are stored in a @@ -278,25 +256,25 @@ class PoolAddParameter { * location. For certificates with visibility of 'remoteUser', a 'certs' * directory is created in the user's home directory (e.g., * /home/{user-name}/certs) and certificates are placed in that directory. - * @member {array} [applicationPackageReferences] The list of application + * @property {array} [applicationPackageReferences] The list of application * packages to be installed on each compute node in the pool. - * @member {array} [applicationLicenses] The list of application licenses the - * Batch service will make available on each compute node in the pool. The - * list of application licenses must be a subset of available Batch service - * application licenses. If a license is requested which is not supported, - * pool creation will fail. - * @member {number} [maxTasksPerNode] The maximum number of tasks that can + * @property {array} [applicationLicenses] The list of application licenses + * the Batch service will make available on each compute node in the pool. + * The list of application licenses must be a subset of available Batch + * service application licenses. If a license is requested which is not + * supported, pool creation will fail. + * @property {number} [maxTasksPerNode] The maximum number of tasks that can * run concurrently on a single compute node in the pool. The default value * is 1. The maximum value of this setting depends on the size of the compute * nodes in the pool (the vmSize setting). - * @member {object} [taskSchedulingPolicy] How tasks are distributed across + * @property {object} [taskSchedulingPolicy] How tasks are distributed across * compute nodes in a pool. - * @member {string} [taskSchedulingPolicy.nodeFillType] Possible values + * @property {string} [taskSchedulingPolicy.nodeFillType] Possible values * include: 'spread', 'pack' - * @member {array} [userAccounts] The list of user accounts to be created on - * each node in the pool. - * @member {array} [metadata] A list of name-value pairs associated with the - * pool as metadata. The Batch service does not assign any meaning to + * @property {array} [userAccounts] The list of user accounts to be created + * on each node in the pool. + * @property {array} [metadata] A list of name-value pairs associated with + * the pool as metadata. The Batch service does not assign any meaning to * metadata; it is solely for the use of user code. */ constructor() { diff --git a/lib/services/batch/lib/models/poolDeleteMethodOptions.js b/lib/services/batch/lib/models/poolDeleteMethodOptions.js index 1d6ab3602c..92e7e7d8e3 100644 --- a/lib/services/batch/lib/models/poolDeleteMethodOptions.js +++ b/lib/services/batch/lib/models/poolDeleteMethodOptions.js @@ -17,30 +17,30 @@ class PoolDeleteMethodOptions { /** * Create a PoolDeleteMethodOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. + * @property {string} [ifMatch] An ETag value associated with the version of * the resource known to the client. The operation will be performed only if * the resource's current ETag on the service exactly matches the value * specified by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version + * @property {string} [ifNoneMatch] An ETag value associated with the version * of the resource known to the client. The operation will be performed only * if the resource's current ETag on the service does not match the value * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last + * @property {date} [ifModifiedSince] A timestamp indicating the last + * modified time of the resource known to the client. The operation will be + * performed only if the resource on the service has been modified since the + * specified time. + * @property {date} [ifUnmodifiedSince] A timestamp indicating the last * modified time of the resource known to the client. The operation will be * performed only if the resource on the service has not been modified since * the specified time. diff --git a/lib/services/batch/lib/models/poolDisableAutoScaleOptions.js b/lib/services/batch/lib/models/poolDisableAutoScaleOptions.js index 68f0734e05..cfdaecb635 100644 --- a/lib/services/batch/lib/models/poolDisableAutoScaleOptions.js +++ b/lib/services/batch/lib/models/poolDisableAutoScaleOptions.js @@ -17,17 +17,17 @@ class PoolDisableAutoScaleOptions { /** * Create a PoolDisableAutoScaleOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/poolEnableAutoScaleOptions.js b/lib/services/batch/lib/models/poolEnableAutoScaleOptions.js index f6bb97ce82..9ef22243d5 100644 --- a/lib/services/batch/lib/models/poolEnableAutoScaleOptions.js +++ b/lib/services/batch/lib/models/poolEnableAutoScaleOptions.js @@ -17,30 +17,30 @@ class PoolEnableAutoScaleOptions { /** * Create a PoolEnableAutoScaleOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. + * @property {string} [ifMatch] An ETag value associated with the version of * the resource known to the client. The operation will be performed only if * the resource's current ETag on the service exactly matches the value * specified by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version + * @property {string} [ifNoneMatch] An ETag value associated with the version * of the resource known to the client. The operation will be performed only * if the resource's current ETag on the service does not match the value * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last + * @property {date} [ifModifiedSince] A timestamp indicating the last + * modified time of the resource known to the client. The operation will be + * performed only if the resource on the service has been modified since the + * specified time. + * @property {date} [ifUnmodifiedSince] A timestamp indicating the last * modified time of the resource known to the client. The operation will be * performed only if the resource on the service has not been modified since * the specified time. diff --git a/lib/services/batch/lib/models/poolEnableAutoScaleParameter.js b/lib/services/batch/lib/models/poolEnableAutoScaleParameter.js index 5615177772..4fed08da9c 100644 --- a/lib/services/batch/lib/models/poolEnableAutoScaleParameter.js +++ b/lib/services/batch/lib/models/poolEnableAutoScaleParameter.js @@ -17,23 +17,24 @@ class PoolEnableAutoScaleParameter { /** * Create a PoolEnableAutoScaleParameter. - * @member {string} [autoScaleFormula] The formula for the desired number of - * compute nodes in the pool. The formula is checked for validity before it - * is applied to the pool. If the formula is not valid, the Batch service + * @property {string} [autoScaleFormula] The formula for the desired number + * of compute nodes in the pool. The formula is checked for validity before + * it is applied to the pool. If the formula is not valid, the Batch service * rejects the request with detailed error information. For more information * about specifying this formula, see Automatically scale compute nodes in an * Azure Batch pool * (https://azure.microsoft.com/en-us/documentation/articles/batch-automatic-scaling). - * @member {moment.duration} [autoScaleEvaluationInterval] The time interval - * at which to automatically adjust the pool size according to the autoscale - * formula. The default value is 15 minutes. The minimum and maximum value - * are 5 minutes and 168 hours respectively. If you specify a value less than - * 5 minutes or greater than 168 hours, the Batch service rejects the request - * with an invalid property value error; if you are calling the REST API - * directly, the HTTP status code is 400 (Bad Request). If you specify a new - * interval, then the existing autoscale evaluation schedule will be stopped - * and a new autoscale evaluation schedule will be started, with its starting - * time being the time when this request was issued. + * @property {moment.duration} [autoScaleEvaluationInterval] The time + * interval at which to automatically adjust the pool size according to the + * autoscale formula. The default value is 15 minutes. The minimum and + * maximum value are 5 minutes and 168 hours respectively. If you specify a + * value less than 5 minutes or greater than 168 hours, the Batch service + * rejects the request with an invalid property value error; if you are + * calling the REST API directly, the HTTP status code is 400 (Bad Request). + * If you specify a new interval, then the existing autoscale evaluation + * schedule will be stopped and a new autoscale evaluation schedule will be + * started, with its starting time being the time when this request was + * issued. */ constructor() { } diff --git a/lib/services/batch/lib/models/poolEndpointConfiguration.js b/lib/services/batch/lib/models/poolEndpointConfiguration.js index 4b5e023c9a..809700cf74 100644 --- a/lib/services/batch/lib/models/poolEndpointConfiguration.js +++ b/lib/services/batch/lib/models/poolEndpointConfiguration.js @@ -17,7 +17,7 @@ class PoolEndpointConfiguration { /** * Create a PoolEndpointConfiguration. - * @member {array} inboundNATPools A list of inbound NAT pools that can be + * @property {array} inboundNATPools A list of inbound NAT pools that can be * used to address specific ports on an individual compute node externally. * The maximum number of inbound NAT pools per Batch pool is 5. If the * maximum number of inbound NAT pools is exceeded the request fails with diff --git a/lib/services/batch/lib/models/poolEvaluateAutoScaleOptions.js b/lib/services/batch/lib/models/poolEvaluateAutoScaleOptions.js index 8f1c4e3a95..6e161dc1f3 100644 --- a/lib/services/batch/lib/models/poolEvaluateAutoScaleOptions.js +++ b/lib/services/batch/lib/models/poolEvaluateAutoScaleOptions.js @@ -17,17 +17,17 @@ class PoolEvaluateAutoScaleOptions { /** * Create a PoolEvaluateAutoScaleOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/poolEvaluateAutoScaleParameter.js b/lib/services/batch/lib/models/poolEvaluateAutoScaleParameter.js index e046d952ae..d3298e239a 100644 --- a/lib/services/batch/lib/models/poolEvaluateAutoScaleParameter.js +++ b/lib/services/batch/lib/models/poolEvaluateAutoScaleParameter.js @@ -17,7 +17,7 @@ class PoolEvaluateAutoScaleParameter { /** * Create a PoolEvaluateAutoScaleParameter. - * @member {string} autoScaleFormula The formula for the desired number of + * @property {string} autoScaleFormula The formula for the desired number of * compute nodes in the pool. The formula is validated and its results * calculated, but it is not applied to the pool. To apply the formula to the * pool, 'Enable automatic scaling on a pool'. For more information about diff --git a/lib/services/batch/lib/models/poolExistsOptions.js b/lib/services/batch/lib/models/poolExistsOptions.js index d5de79c03f..817f773190 100644 --- a/lib/services/batch/lib/models/poolExistsOptions.js +++ b/lib/services/batch/lib/models/poolExistsOptions.js @@ -17,30 +17,30 @@ class PoolExistsOptions { /** * Create a PoolExistsOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. + * @property {string} [ifMatch] An ETag value associated with the version of * the resource known to the client. The operation will be performed only if * the resource's current ETag on the service exactly matches the value * specified by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version + * @property {string} [ifNoneMatch] An ETag value associated with the version * of the resource known to the client. The operation will be performed only * if the resource's current ETag on the service does not match the value * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last + * @property {date} [ifModifiedSince] A timestamp indicating the last + * modified time of the resource known to the client. The operation will be + * performed only if the resource on the service has been modified since the + * specified time. + * @property {date} [ifUnmodifiedSince] A timestamp indicating the last * modified time of the resource known to the client. The operation will be * performed only if the resource on the service has not been modified since * the specified time. diff --git a/lib/services/batch/lib/models/poolGetAllLifetimeStatisticsOptions.js b/lib/services/batch/lib/models/poolGetAllLifetimeStatisticsOptions.js index 52793ee72e..560aaecd5a 100644 --- a/lib/services/batch/lib/models/poolGetAllLifetimeStatisticsOptions.js +++ b/lib/services/batch/lib/models/poolGetAllLifetimeStatisticsOptions.js @@ -17,17 +17,17 @@ class PoolGetAllLifetimeStatisticsOptions { /** * Create a PoolGetAllLifetimeStatisticsOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/poolGetOptions.js b/lib/services/batch/lib/models/poolGetOptions.js index 9dfd40cad3..8f5027c51d 100644 --- a/lib/services/batch/lib/models/poolGetOptions.js +++ b/lib/services/batch/lib/models/poolGetOptions.js @@ -17,32 +17,32 @@ class PoolGetOptions { /** * Create a PoolGetOptions. - * @member {string} [select] An OData $select clause. - * @member {string} [expand] An OData $expand clause. - * @member {number} [timeout] The maximum time that the server can spend + * @property {string} [select] An OData $select clause. + * @property {string} [expand] An OData $expand clause. + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. + * @property {string} [ifMatch] An ETag value associated with the version of * the resource known to the client. The operation will be performed only if * the resource's current ETag on the service exactly matches the value * specified by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version + * @property {string} [ifNoneMatch] An ETag value associated with the version * of the resource known to the client. The operation will be performed only * if the resource's current ETag on the service does not match the value * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last + * @property {date} [ifModifiedSince] A timestamp indicating the last + * modified time of the resource known to the client. The operation will be + * performed only if the resource on the service has been modified since the + * specified time. + * @property {date} [ifUnmodifiedSince] A timestamp indicating the last * modified time of the resource known to the client. The operation will be * performed only if the resource on the service has not been modified since * the specified time. diff --git a/lib/services/batch/lib/models/poolInformation.js b/lib/services/batch/lib/models/poolInformation.js index 1d9a1a7eb1..bf76f08e2c 100644 --- a/lib/services/batch/lib/models/poolInformation.js +++ b/lib/services/batch/lib/models/poolInformation.js @@ -17,15 +17,15 @@ class PoolInformation { /** * Create a PoolInformation. - * @member {string} [poolId] The ID of an existing pool. All the tasks of the - * job will run on the specified pool. You must ensure that the pool + * @property {string} [poolId] The ID of an existing pool. All the tasks of + * the job will run on the specified pool. You must ensure that the pool * referenced by this property exists. If the pool does not exist at the time * the Batch service tries to schedule a job, no tasks for the job will run * until you create a pool with that id. Note that the Batch service will not * reject the job request; it will simply not run tasks until the pool * exists. You must specify either the pool ID or the auto pool * specification, but not both. - * @member {object} [autoPoolSpecification] Characteristics for a temporary + * @property {object} [autoPoolSpecification] Characteristics for a temporary * 'auto pool'. The Batch service will create this auto pool when the job is * submitted. If auto pool creation fails, the Batch service moves the job to * a completed state, and the pool creation error is set in the job's @@ -34,28 +34,28 @@ class PoolInformation { * Any user actions that affect the lifetime of the auto pool while the job * is active will result in unexpected behavior. You must specify either the * pool ID or the auto pool specification, but not both. - * @member {string} [autoPoolSpecification.autoPoolIdPrefix] The Batch + * @property {string} [autoPoolSpecification.autoPoolIdPrefix] The Batch * service assigns each auto pool a unique identifier on creation. To * distinguish between pools created for different purposes, you can specify * this element to add a prefix to the ID that is assigned. The prefix can be * up to 20 characters long. - * @member {string} [autoPoolSpecification.poolLifetimeOption] Possible + * @property {string} [autoPoolSpecification.poolLifetimeOption] Possible * values include: 'jobSchedule', 'job' - * @member {boolean} [autoPoolSpecification.keepAlive] If false, the Batch + * @property {boolean} [autoPoolSpecification.keepAlive] If false, the Batch * service deletes the pool once its lifetime (as determined by the * poolLifetimeOption setting) expires; that is, when the job or job schedule * completes. If true, the Batch service does not delete the pool * automatically. It is up to the user to delete auto pools created with this * option. - * @member {object} [autoPoolSpecification.pool] - * @member {string} [autoPoolSpecification.pool.displayName] The display name - * need not be unique and can contain any Unicode characters up to a maximum - * length of 1024. - * @member {string} [autoPoolSpecification.pool.vmSize] For information about - * available sizes of virtual machines in pools, see Choose a VM size for - * compute nodes in an Azure Batch pool + * @property {object} [autoPoolSpecification.pool] + * @property {string} [autoPoolSpecification.pool.displayName] The display + * name need not be unique and can contain any Unicode characters up to a + * maximum length of 1024. + * @property {string} [autoPoolSpecification.pool.vmSize] For information + * about available sizes of virtual machines in pools, see Choose a VM size + * for compute nodes in an Azure Batch pool * (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). - * @member {object} [autoPoolSpecification.pool.cloudServiceConfiguration] + * @property {object} [autoPoolSpecification.pool.cloudServiceConfiguration] * This property must be specified if the pool needs to be created with Azure * PaaS VMs. This property and virtualMachineConfiguration are mutually * exclusive and one of the properties must be specified. If neither is @@ -63,7 +63,7 @@ class PoolInformation { * REST API directly, the HTTP status code is 400 (Bad Request). This * property cannot be specified if the Batch account was created with its * poolAllocationMode property set to 'UserSubscription'. - * @member {string} + * @property {string} * [autoPoolSpecification.pool.cloudServiceConfiguration.osFamily] Possible * values are: * 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. @@ -72,54 +72,39 @@ class PoolInformation { * 5 - OS Family 5, equivalent to Windows Server 2016. For more information, * see Azure Guest OS Releases * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). - * @member {string} - * [autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] The + * @property {string} + * [autoPoolSpecification.pool.cloudServiceConfiguration.osVersion] The * default value is * which specifies the latest operating system version for * the specified OS family. - * @member {string} - * [autoPoolSpecification.pool.cloudServiceConfiguration.currentOSVersion] - * This may differ from targetOSVersion if the pool state is Upgrading. In - * this case some virtual machines may be on the targetOSVersion and some may - * be on the currentOSVersion during the upgrade process. Once all virtual - * machines have upgraded, currentOSVersion is updated to be the same as - * targetOSVersion. - * @member {object} [autoPoolSpecification.pool.virtualMachineConfiguration] - * This property must be specified if the pool needs to be created with Azure - * IaaS VMs. This property and cloudServiceConfiguration are mutually - * exclusive and one of the properties must be specified. If neither is - * specified then the Batch service returns an error; if you are calling the - * REST API directly, the HTTP status code is 400 (Bad Request). - * @member {object} + * @property {object} + * [autoPoolSpecification.pool.virtualMachineConfiguration] This property + * must be specified if the pool needs to be created with Azure IaaS VMs. + * This property and cloudServiceConfiguration are mutually exclusive and one + * of the properties must be specified. If neither is specified then the + * Batch service returns an error; if you are calling the REST API directly, + * the HTTP status code is 400 (Bad Request). + * @property {object} * [autoPoolSpecification.pool.virtualMachineConfiguration.imageReference] - * @member {string} + * @property {string} * [autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.publisher] * For example, Canonical or MicrosoftWindowsServer. - * @member {string} + * @property {string} * [autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.offer] * For example, UbuntuServer or WindowsServer. - * @member {string} + * @property {string} * [autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.sku] * For example, 14.04.0-LTS or 2012-R2-Datacenter. - * @member {string} + * @property {string} * [autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.version] * A value of 'latest' can be specified to select the latest version of an * image. If omitted, the default is 'latest'. - * @member {string} + * @property {string} * [autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.virtualMachineImageId] * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as - * the Azure Batch account. For information about the firewall settings for - * the Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * @member {object} - * [autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * @member {string} - * [autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The default value for caching is readwrite. For information about the - * caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' - * @member {string} + * the Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. + * @property {string} * [autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId] * The Batch node agent is a program that runs on each node in the pool, and * provides the command-and-control interface between the node and the Batch @@ -128,14 +113,14 @@ class PoolInformation { * which matches the selected image reference. To get the list of supported * node agent SKUs along with their list of verified image references, see * the 'List supported node agent SKUs' operation. - * @member {object} + * @property {object} * [autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] - * This property must not be specified if the imageReference or osDisk - * property specifies a Linux OS image. - * @member {boolean} + * This property must not be specified if the imageReference property + * specifies a Linux OS image. + * @property {boolean} * [autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] * If omitted, the default value is true. - * @member {array} + * @property {array} * [autoPoolSpecification.pool.virtualMachineConfiguration.dataDisks] This * property must be specified if the compute nodes in the pool need to have * empty data disks attached to them. This cannot be updated. Each node gets @@ -147,7 +132,7 @@ class PoolInformation { * https://docs.microsoft.com/en-us/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux * and * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. - * @member {string} + * @property {string} * [autoPoolSpecification.pool.virtualMachineConfiguration.licenseType] This * only applies to images that contain the Windows operating system, and * should only be used when you hold valid on-premises licenses for the nodes @@ -156,101 +141,93 @@ class PoolInformation { * * Windows_Server - The on-premises license is for Windows Server. * Windows_Client - The on-premises license is for Windows Client. - * @member {object} + * @property {object} * [autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration] * If specified, setup is performed on each node in the pool to allow tasks * to run in containers. All regular tasks and job manager tasks run on this * pool must specify the containerSettings property, and all other tasks may * specify it. - * @member {array} + * @property {array} * [autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration.containerImageNames] * This is the full image reference, as would be specified to "docker pull". * An image will be sourced from the default Docker registry unless the image * is fully qualified with an alternative registry. - * @member {array} + * @property {array} * [autoPoolSpecification.pool.virtualMachineConfiguration.containerConfiguration.containerRegistries] * If any images must be downloaded from a private registry which requires * credentials, then those credentials must be provided here. - * @member {number} [autoPoolSpecification.pool.maxTasksPerNode] The default - * value is 1. The maximum value of this setting depends on the size of the - * compute nodes in the pool (the vmSize setting). - * @member {object} [autoPoolSpecification.pool.taskSchedulingPolicy] - * @member {string} + * @property {number} [autoPoolSpecification.pool.maxTasksPerNode] The + * default value is 1. The maximum value of this setting depends on the size + * of the compute nodes in the pool (the vmSize setting). + * @property {object} [autoPoolSpecification.pool.taskSchedulingPolicy] + * @property {string} * [autoPoolSpecification.pool.taskSchedulingPolicy.nodeFillType] Possible * values include: 'spread', 'pack' - * @member {moment.duration} [autoPoolSpecification.pool.resizeTimeout] This - * timeout applies only to manual scaling; it has no effect when + * @property {moment.duration} [autoPoolSpecification.pool.resizeTimeout] + * This timeout applies only to manual scaling; it has no effect when * enableAutoScale is set to true. The default value is 15 minutes. The * minimum value is 5 minutes. If you specify a value less than 5 minutes, * the Batch service rejects the request with an error; if you are calling * the REST API directly, the HTTP status code is 400 (Bad Request). - * @member {number} [autoPoolSpecification.pool.targetDedicatedNodes] This + * @property {number} [autoPoolSpecification.pool.targetDedicatedNodes] This * property must not be specified if enableAutoScale is set to true. If * enableAutoScale is set to false, then you must set either * targetDedicatedNodes, targetLowPriorityNodes, or both. - * @member {number} [autoPoolSpecification.pool.targetLowPriorityNodes] This - * property must not be specified if enableAutoScale is set to true. If + * @property {number} [autoPoolSpecification.pool.targetLowPriorityNodes] + * This property must not be specified if enableAutoScale is set to true. If * enableAutoScale is set to false, then you must set either * targetDedicatedNodes, targetLowPriorityNodes, or both. - * @member {boolean} [autoPoolSpecification.pool.enableAutoScale] If false, + * @property {boolean} [autoPoolSpecification.pool.enableAutoScale] If false, * at least one of targetDedicateNodes and targetLowPriorityNodes must be * specified. If true, the autoScaleFormula element is required. The pool * automatically resizes according to the formula. The default value is * false. - * @member {string} [autoPoolSpecification.pool.autoScaleFormula] This + * @property {string} [autoPoolSpecification.pool.autoScaleFormula] This * property must not be specified if enableAutoScale is set to false. It is * required if enableAutoScale is set to true. The formula is checked for * validity before the pool is created. If the formula is not valid, the * Batch service rejects the request with detailed error information. - * @member {moment.duration} + * @property {moment.duration} * [autoPoolSpecification.pool.autoScaleEvaluationInterval] The default value * is 15 minutes. The minimum and maximum value are 5 minutes and 168 hours * respectively. If you specify a value less than 5 minutes or greater than * 168 hours, the Batch service rejects the request with an invalid property * value error; if you are calling the REST API directly, the HTTP status * code is 400 (Bad Request). - * @member {boolean} + * @property {boolean} * [autoPoolSpecification.pool.enableInterNodeCommunication] Enabling * inter-node communication limits the maximum size of the pool due to * deployment restrictions on the nodes of the pool. This may result in the * pool not reaching its desired size. The default value is false. - * @member {object} [autoPoolSpecification.pool.networkConfiguration] - * @member {string} - * [autoPoolSpecification.pool.networkConfiguration.subnetId] The virtual - * network must be in the same region and subscription as the Azure Batch - * account. The specified subnet should have enough free IP addresses to - * accommodate the number of nodes in the pool. If the subnet doesn't have - * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must - * allow communication from the Azure Batch service to be able to schedule - * tasks on the compute nodes. This can be verified by checking if the - * specified VNet has any associated Network Security Groups (NSG). If - * communication to the compute nodes in the specified subnet is denied by an - * NSG, then the Batch service will set the state of the compute nodes to - * unusable. For pools created with virtualMachineConfiguration only ARM - * virtual networks ('Microsoft.Network/virtualNetworks') are supported, but - * for pools created with cloudServiceConfiguration both ARM and classic - * virtual networks are supported. If the specified VNet has any associated - * Network Security Groups (NSG), then a few reserved system ports must be - * enabled for inbound communication. For pools created with a virtual - * machine configuration, enable ports 29876 and 29877, as well as port 22 - * for Linux and port 3389 for Windows. For pools created with a cloud - * service configuration, enable ports 10100, 20100, and 30100. Also enable - * outbound connections to Azure Storage on port 443. For more details see: + * @property {object} [autoPoolSpecification.pool.networkConfiguration] + * @property {string} + * [autoPoolSpecification.pool.networkConfiguration.subnetId] This is of the + * form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. + * The virtual network must be in the same region and subscription as the + * Azure Batch account. The specified subnet should have enough free IP + * addresses to accommodate the number of nodes in the pool. If the subnet + * doesn't have enough free IP addresses, the pool will partially allocate + * compute nodes, and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks + * ('Microsoft.Network/virtualNetworks') are supported, but for pools created + * with cloudServiceConfiguration both ARM and classic virtual networks are + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration - * @member {object} + * @property {string} + * [autoPoolSpecification.pool.networkConfiguration.dynamicVNetAssignmentScope] + * Possible values include: 'none', 'job' + * @property {object} * [autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] * Pool endpoint configuration is only supported on pools with the * virtualMachineConfiguration property. - * @member {array} + * @property {array} * [autoPoolSpecification.pool.networkConfiguration.endpointConfiguration.inboundNATPools] * The maximum number of inbound NAT pools per Batch pool is 5. If the * maximum number of inbound NAT pools is exceeded the request fails with * HTTP status code 400. - * @member {object} [autoPoolSpecification.pool.startTask] - * @member {string} [autoPoolSpecification.pool.startTask.commandLine] The + * @property {object} [autoPoolSpecification.pool.startTask] + * @property {string} [autoPoolSpecification.pool.startTask.commandLine] The * command line does not run under a shell, and therefore cannot take * advantage of shell features such as environment variable expansion. If you * want to take advantage of such features, you should invoke the shell in @@ -259,71 +236,74 @@ class PoolInformation { * it should use a relative path (relative to the task working directory), or * use the Batch provided environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [autoPoolSpecification.pool.startTask.containerSettings] - * When this is specified, all directories recursively below the - * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) - * are mapped into the container, all task environment variables are mapped - * into the container, and the task command line is executed in the - * container. - * @member {string} + * @property {object} + * [autoPoolSpecification.pool.startTask.containerSettings] When this is + * specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR + * (the root of Azure Batch directories on the node) are mapped into the + * container, all task environment variables are mapped into the container, + * and the task command line is executed in the container. + * @property {string} * [autoPoolSpecification.pool.startTask.containerSettings.containerRunOptions] * These additional options are supplied as arguments to the "docker create" * command, in addition to those controlled by the Batch Service. - * @member {string} + * @property {string} * [autoPoolSpecification.pool.startTask.containerSettings.imageName] This is * the full image reference, as would be specified to "docker pull". If no * tag is provided as part of the image name, the tag ":latest" is used as a * default. - * @member {object} + * @property {object} * [autoPoolSpecification.pool.startTask.containerSettings.registry] This * setting can be omitted if was already provided at pool creation. - * @member {string} + * @property {string} * [autoPoolSpecification.pool.startTask.containerSettings.registry.registryServer] * If omitted, the default is "docker.io". - * @member {string} + * @property {string} * [autoPoolSpecification.pool.startTask.containerSettings.registry.userName] - * @member {string} + * @property {string} * [autoPoolSpecification.pool.startTask.containerSettings.registry.password] - * @member {array} [autoPoolSpecification.pool.startTask.resourceFiles] Files - * listed under this element are located in the task's working directory. - * @member {array} [autoPoolSpecification.pool.startTask.environmentSettings] - * @member {object} [autoPoolSpecification.pool.startTask.userIdentity] If + * @property {array} [autoPoolSpecification.pool.startTask.resourceFiles] + * Files listed under this element are located in the task's working + * directory. + * @property {array} + * [autoPoolSpecification.pool.startTask.environmentSettings] + * @property {object} [autoPoolSpecification.pool.startTask.userIdentity] If * omitted, the task runs as a non-administrative user unique to the task. - * @member {string} + * @property {string} * [autoPoolSpecification.pool.startTask.userIdentity.userName] The userName * and autoUser properties are mutually exclusive; you must specify one but * not both. - * @member {object} + * @property {object} * [autoPoolSpecification.pool.startTask.userIdentity.autoUser] The userName * and autoUser properties are mutually exclusive; you must specify one but * not both. - * @member {string} + * @property {string} * [autoPoolSpecification.pool.startTask.userIdentity.autoUser.scope] The * default value is task. Possible values include: 'task', 'pool' - * @member {string} + * @property {string} * [autoPoolSpecification.pool.startTask.userIdentity.autoUser.elevationLevel] * The default value is nonAdmin. Possible values include: 'nonAdmin', * 'admin' - * @member {number} [autoPoolSpecification.pool.startTask.maxTaskRetryCount] - * The Batch service retries a task if its exit code is nonzero. Note that - * this value specifically controls the number of retries. The Batch service - * will try the task once, and may then retry up to this limit. For example, - * if the maximum retry count is 3, Batch tries the task up to 4 times (one - * initial try and 3 retries). If the maximum retry count is 0, the Batch - * service does not retry the task. If the maximum retry count is -1, the - * Batch service retries the task without limit. - * @member {boolean} [autoPoolSpecification.pool.startTask.waitForSuccess] If - * true and the start task fails on a compute node, the Batch service retries - * the start task up to its maximum retry count (maxTaskRetryCount). If the - * task has still not completed successfully after all retries, then the - * Batch service marks the compute node unusable, and will not schedule tasks - * to it. This condition can be detected via the node state and failure info - * details. If false, the Batch service will not wait for the start task to - * complete. In this case, other tasks can start executing on the compute + * @property {number} + * [autoPoolSpecification.pool.startTask.maxTaskRetryCount] The Batch service + * retries a task if its exit code is nonzero. Note that this value + * specifically controls the number of retries. The Batch service will try + * the task once, and may then retry up to this limit. For example, if the + * maximum retry count is 3, Batch tries the task up to 4 times (one initial + * try and 3 retries). If the maximum retry count is 0, the Batch service + * does not retry the task. If the maximum retry count is -1, the Batch + * service retries the task without limit. + * @property {boolean} [autoPoolSpecification.pool.startTask.waitForSuccess] + * If true and the start task fails on a compute node, the Batch service + * retries the start task up to its maximum retry count (maxTaskRetryCount). + * If the task has still not completed successfully after all retries, then + * the Batch service marks the compute node unusable, and will not schedule + * tasks to it. This condition can be detected via the node state and failure + * info details. If false, the Batch service will not wait for the start task + * to complete. In this case, other tasks can start executing on the compute * node while the start task is still running; and even if the start task * fails, new tasks will continue to be scheduled on the node. The default is * false. - * @member {array} [autoPoolSpecification.pool.certificateReferences] For + * @property {array} [autoPoolSpecification.pool.certificateReferences] For * Windows compute nodes, the Batch service installs the certificates to the * specified certificate store and location. For Linux compute nodes, the * certificates are stored in a directory inside the task working directory @@ -332,15 +312,16 @@ class PoolInformation { * 'remoteUser', a 'certs' directory is created in the user's home directory * (e.g., /home/{user-name}/certs) and certificates are placed in that * directory. - * @member {array} [autoPoolSpecification.pool.applicationPackageReferences] - * @member {array} [autoPoolSpecification.pool.applicationLicenses] The list - * of application licenses must be a subset of available Batch service + * @property {array} + * [autoPoolSpecification.pool.applicationPackageReferences] + * @property {array} [autoPoolSpecification.pool.applicationLicenses] The + * list of application licenses must be a subset of available Batch service * application licenses. If a license is requested which is not supported, * pool creation will fail. The permitted licenses available on the pool are * 'maya', 'vray', '3dsmax', 'arnold'. An additional charge applies for each * application license added to the pool. - * @member {array} [autoPoolSpecification.pool.userAccounts] - * @member {array} [autoPoolSpecification.pool.metadata] The Batch service + * @property {array} [autoPoolSpecification.pool.userAccounts] + * @property {array} [autoPoolSpecification.pool.metadata] The Batch service * does not assign any meaning to metadata; it is solely for the use of user * code. */ diff --git a/lib/services/batch/lib/models/poolListNextOptions.js b/lib/services/batch/lib/models/poolListNextOptions.js index 88c829c9f9..fedcd7809a 100644 --- a/lib/services/batch/lib/models/poolListNextOptions.js +++ b/lib/services/batch/lib/models/poolListNextOptions.js @@ -17,14 +17,14 @@ class PoolListNextOptions { /** * Create a PoolListNextOptions. - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/poolListOptions.js b/lib/services/batch/lib/models/poolListOptions.js index d7eb3dcf41..c11a86b09d 100644 --- a/lib/services/batch/lib/models/poolListOptions.js +++ b/lib/services/batch/lib/models/poolListOptions.js @@ -17,24 +17,25 @@ class PoolListOptions { /** * Create a PoolListOptions. - * @member {string} [filter] An OData $filter clause. For more information on - * constructing this filter, see + * @property {string} [filter] An OData $filter clause. For more information + * on constructing this filter, see * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-pools. - * @member {string} [select] An OData $select clause. - * @member {string} [expand] An OData $expand clause. - * @member {number} [maxResults] The maximum number of items to return in the - * response. A maximum of 1000 pools can be returned. Default value: 1000 . - * @member {number} [timeout] The maximum time that the server can spend + * @property {string} [select] An OData $select clause. + * @property {string} [expand] An OData $expand clause. + * @property {number} [maxResults] The maximum number of items to return in + * the response. A maximum of 1000 pools can be returned. Default value: 1000 + * . + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/poolListUsageMetricsNextOptions.js b/lib/services/batch/lib/models/poolListUsageMetricsNextOptions.js index c691864dc8..05ac4bcbf5 100644 --- a/lib/services/batch/lib/models/poolListUsageMetricsNextOptions.js +++ b/lib/services/batch/lib/models/poolListUsageMetricsNextOptions.js @@ -17,14 +17,14 @@ class PoolListUsageMetricsNextOptions { /** * Create a PoolListUsageMetricsNextOptions. - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/poolListUsageMetricsOptions.js b/lib/services/batch/lib/models/poolListUsageMetricsOptions.js index 87bf5dc9c8..7bea12c4bd 100644 --- a/lib/services/batch/lib/models/poolListUsageMetricsOptions.js +++ b/lib/services/batch/lib/models/poolListUsageMetricsOptions.js @@ -17,31 +17,31 @@ class PoolListUsageMetricsOptions { /** * Create a PoolListUsageMetricsOptions. - * @member {date} [startTime] The earliest time from which to include + * @property {date} [startTime] The earliest time from which to include * metrics. This must be at least two and a half hours before the current * time. If not specified this defaults to the start time of the last * aggregation interval currently available. - * @member {date} [endTime] The latest time from which to include metrics. + * @property {date} [endTime] The latest time from which to include metrics. * This must be at least two hours before the current time. If not specified * this defaults to the end time of the last aggregation interval currently * available. - * @member {string} [filter] An OData $filter clause. For more information on - * constructing this filter, see + * @property {string} [filter] An OData $filter clause. For more information + * on constructing this filter, see * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-account-usage-metrics. - * @member {number} [maxResults] The maximum number of items to return in the - * response. A maximum of 1000 results will be returned. Default value: 1000 - * . - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [maxResults] The maximum number of items to return in + * the response. A maximum of 1000 results will be returned. Default value: + * 1000 . + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/poolListUsageMetricsResult.js b/lib/services/batch/lib/models/poolListUsageMetricsResult.js index 6fad3b4acc..4f943e50a3 100644 --- a/lib/services/batch/lib/models/poolListUsageMetricsResult.js +++ b/lib/services/batch/lib/models/poolListUsageMetricsResult.js @@ -16,7 +16,7 @@ class PoolListUsageMetricsResult extends Array { /** * Create a PoolListUsageMetricsResult. - * @member {string} [odatanextLink] + * @property {string} [odatanextLink] */ constructor() { super(); diff --git a/lib/services/batch/lib/models/poolNodeCounts.js b/lib/services/batch/lib/models/poolNodeCounts.js index 92df72b48a..36c9432ac6 100644 --- a/lib/services/batch/lib/models/poolNodeCounts.js +++ b/lib/services/batch/lib/models/poolNodeCounts.js @@ -17,38 +17,39 @@ class PoolNodeCounts { /** * Create a PoolNodeCounts. - * @member {string} poolId The ID of the pool. - * @member {object} [dedicated] The number of dedicated nodes in each state. - * @member {number} [dedicated.creating] - * @member {number} [dedicated.idle] - * @member {number} [dedicated.offline] - * @member {number} [dedicated.preempted] - * @member {number} [dedicated.rebooting] - * @member {number} [dedicated.reimaging] - * @member {number} [dedicated.running] - * @member {number} [dedicated.starting] - * @member {number} [dedicated.startTaskFailed] - * @member {number} [dedicated.leavingPool] - * @member {number} [dedicated.unknown] - * @member {number} [dedicated.unusable] - * @member {number} [dedicated.waitingForStartTask] - * @member {number} [dedicated.total] - * @member {object} [lowPriority] The number of low priority nodes in each + * @property {string} poolId The ID of the pool. + * @property {object} [dedicated] The number of dedicated nodes in each * state. - * @member {number} [lowPriority.creating] - * @member {number} [lowPriority.idle] - * @member {number} [lowPriority.offline] - * @member {number} [lowPriority.preempted] - * @member {number} [lowPriority.rebooting] - * @member {number} [lowPriority.reimaging] - * @member {number} [lowPriority.running] - * @member {number} [lowPriority.starting] - * @member {number} [lowPriority.startTaskFailed] - * @member {number} [lowPriority.leavingPool] - * @member {number} [lowPriority.unknown] - * @member {number} [lowPriority.unusable] - * @member {number} [lowPriority.waitingForStartTask] - * @member {number} [lowPriority.total] + * @property {number} [dedicated.creating] + * @property {number} [dedicated.idle] + * @property {number} [dedicated.offline] + * @property {number} [dedicated.preempted] + * @property {number} [dedicated.rebooting] + * @property {number} [dedicated.reimaging] + * @property {number} [dedicated.running] + * @property {number} [dedicated.starting] + * @property {number} [dedicated.startTaskFailed] + * @property {number} [dedicated.leavingPool] + * @property {number} [dedicated.unknown] + * @property {number} [dedicated.unusable] + * @property {number} [dedicated.waitingForStartTask] + * @property {number} [dedicated.total] + * @property {object} [lowPriority] The number of low priority nodes in each + * state. + * @property {number} [lowPriority.creating] + * @property {number} [lowPriority.idle] + * @property {number} [lowPriority.offline] + * @property {number} [lowPriority.preempted] + * @property {number} [lowPriority.rebooting] + * @property {number} [lowPriority.reimaging] + * @property {number} [lowPriority.running] + * @property {number} [lowPriority.starting] + * @property {number} [lowPriority.startTaskFailed] + * @property {number} [lowPriority.leavingPool] + * @property {number} [lowPriority.unknown] + * @property {number} [lowPriority.unusable] + * @property {number} [lowPriority.waitingForStartTask] + * @property {number} [lowPriority.total] */ constructor() { } diff --git a/lib/services/batch/lib/models/poolNodeCountsListResult.js b/lib/services/batch/lib/models/poolNodeCountsListResult.js index bf0e8a80e2..76dc179402 100644 --- a/lib/services/batch/lib/models/poolNodeCountsListResult.js +++ b/lib/services/batch/lib/models/poolNodeCountsListResult.js @@ -16,7 +16,7 @@ class PoolNodeCountsListResult extends Array { /** * Create a PoolNodeCountsListResult. - * @member {string} [odatanextLink] + * @property {string} [odatanextLink] */ constructor() { super(); diff --git a/lib/services/batch/lib/models/poolPatchOptions.js b/lib/services/batch/lib/models/poolPatchOptions.js index d2d9b7c084..4c951575e4 100644 --- a/lib/services/batch/lib/models/poolPatchOptions.js +++ b/lib/services/batch/lib/models/poolPatchOptions.js @@ -17,30 +17,30 @@ class PoolPatchOptions { /** * Create a PoolPatchOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. + * @property {string} [ifMatch] An ETag value associated with the version of * the resource known to the client. The operation will be performed only if * the resource's current ETag on the service exactly matches the value * specified by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version + * @property {string} [ifNoneMatch] An ETag value associated with the version * of the resource known to the client. The operation will be performed only * if the resource's current ETag on the service does not match the value * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last + * @property {date} [ifModifiedSince] A timestamp indicating the last + * modified time of the resource known to the client. The operation will be + * performed only if the resource on the service has been modified since the + * specified time. + * @property {date} [ifUnmodifiedSince] A timestamp indicating the last * modified time of the resource known to the client. The operation will be * performed only if the resource on the service has not been modified since * the specified time. diff --git a/lib/services/batch/lib/models/poolPatchParameter.js b/lib/services/batch/lib/models/poolPatchParameter.js index d4cf579a5b..0d54a1c683 100644 --- a/lib/services/batch/lib/models/poolPatchParameter.js +++ b/lib/services/batch/lib/models/poolPatchParameter.js @@ -17,12 +17,12 @@ class PoolPatchParameter { /** * Create a PoolPatchParameter. - * @member {object} [startTask] A task to run on each compute node as it + * @property {object} [startTask] A task to run on each compute node as it * joins the pool. The task runs when the node is added to the pool or when * the node is restarted. If this element is present, it overwrites any * existing start task. If omitted, any existing start task is left * unchanged. - * @member {string} [startTask.commandLine] The command line does not run + * @property {string} [startTask.commandLine] The command line does not run * under a shell, and therefore cannot take advantage of shell features such * as environment variable expansion. If you want to take advantage of such * features, you should invoke the shell in the command line, for example @@ -31,48 +31,48 @@ class PoolPatchParameter { * (relative to the task working directory), or use the Batch provided * environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [startTask.containerSettings] When this is specified, all - * directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of + * @property {object} [startTask.containerSettings] When this is specified, + * all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of * Azure Batch directories on the node) are mapped into the container, all * task environment variables are mapped into the container, and the task * command line is executed in the container. - * @member {string} [startTask.containerSettings.containerRunOptions] These + * @property {string} [startTask.containerSettings.containerRunOptions] These * additional options are supplied as arguments to the "docker create" * command, in addition to those controlled by the Batch Service. - * @member {string} [startTask.containerSettings.imageName] This is the full - * image reference, as would be specified to "docker pull". If no tag is + * @property {string} [startTask.containerSettings.imageName] This is the + * full image reference, as would be specified to "docker pull". If no tag is * provided as part of the image name, the tag ":latest" is used as a * default. - * @member {object} [startTask.containerSettings.registry] This setting can + * @property {object} [startTask.containerSettings.registry] This setting can * be omitted if was already provided at pool creation. - * @member {string} [startTask.containerSettings.registry.registryServer] If - * omitted, the default is "docker.io". - * @member {string} [startTask.containerSettings.registry.userName] - * @member {string} [startTask.containerSettings.registry.password] - * @member {array} [startTask.resourceFiles] Files listed under this element - * are located in the task's working directory. - * @member {array} [startTask.environmentSettings] - * @member {object} [startTask.userIdentity] If omitted, the task runs as a + * @property {string} [startTask.containerSettings.registry.registryServer] + * If omitted, the default is "docker.io". + * @property {string} [startTask.containerSettings.registry.userName] + * @property {string} [startTask.containerSettings.registry.password] + * @property {array} [startTask.resourceFiles] Files listed under this + * element are located in the task's working directory. + * @property {array} [startTask.environmentSettings] + * @property {object} [startTask.userIdentity] If omitted, the task runs as a * non-administrative user unique to the task. - * @member {string} [startTask.userIdentity.userName] The userName and + * @property {string} [startTask.userIdentity.userName] The userName and * autoUser properties are mutually exclusive; you must specify one but not * both. - * @member {object} [startTask.userIdentity.autoUser] The userName and + * @property {object} [startTask.userIdentity.autoUser] The userName and * autoUser properties are mutually exclusive; you must specify one but not * both. - * @member {string} [startTask.userIdentity.autoUser.scope] The default value - * is task. Possible values include: 'task', 'pool' - * @member {string} [startTask.userIdentity.autoUser.elevationLevel] The + * @property {string} [startTask.userIdentity.autoUser.scope] The default + * value is task. Possible values include: 'task', 'pool' + * @property {string} [startTask.userIdentity.autoUser.elevationLevel] The * default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {number} [startTask.maxTaskRetryCount] The Batch service retries a - * task if its exit code is nonzero. Note that this value specifically + * @property {number} [startTask.maxTaskRetryCount] The Batch service retries + * a task if its exit code is nonzero. Note that this value specifically * controls the number of retries. The Batch service will try the task once, * and may then retry up to this limit. For example, if the maximum retry * count is 3, Batch tries the task up to 4 times (one initial try and 3 * retries). If the maximum retry count is 0, the Batch service does not * retry the task. If the maximum retry count is -1, the Batch service * retries the task without limit. - * @member {boolean} [startTask.waitForSuccess] If true and the start task + * @property {boolean} [startTask.waitForSuccess] If true and the start task * fails on a compute node, the Batch service retries the start task up to * its maximum retry count (maxTaskRetryCount). If the task has still not * completed successfully after all retries, then the Batch service marks the @@ -82,7 +82,7 @@ class PoolPatchParameter { * other tasks can start executing on the compute node while the start task * is still running; and even if the start task fails, new tasks will * continue to be scheduled on the node. The default is false. - * @member {array} [certificateReferences] A list of certificates to be + * @property {array} [certificateReferences] A list of certificates to be * installed on each compute node in the pool. If this element is present, it * replaces any existing certificate references configured on the pool. If * omitted, any existing certificate references are left unchanged. For @@ -94,7 +94,7 @@ class PoolPatchParameter { * 'remoteUser', a 'certs' directory is created in the user's home directory * (e.g., /home/{user-name}/certs) and certificates are placed in that * directory. - * @member {array} [applicationPackageReferences] A list of application + * @property {array} [applicationPackageReferences] A list of application * packages to be installed on each compute node in the pool. Changes to * application package references affect all new compute nodes joining the * pool, but do not affect compute nodes that are already in the pool until @@ -103,8 +103,8 @@ class PoolPatchParameter { * collection, then all application package references are removed from the * pool. If omitted, any existing application package references are left * unchanged. - * @member {array} [metadata] A list of name-value pairs associated with the - * pool as metadata. If this element is present, it replaces any existing + * @property {array} [metadata] A list of name-value pairs associated with + * the pool as metadata. If this element is present, it replaces any existing * metadata configured on the pool. If you specify an empty collection, any * metadata is removed from the pool. If omitted, any existing metadata is * left unchanged. diff --git a/lib/services/batch/lib/models/poolRemoveNodesOptions.js b/lib/services/batch/lib/models/poolRemoveNodesOptions.js index c07873d743..ce4e80d9f1 100644 --- a/lib/services/batch/lib/models/poolRemoveNodesOptions.js +++ b/lib/services/batch/lib/models/poolRemoveNodesOptions.js @@ -17,30 +17,30 @@ class PoolRemoveNodesOptions { /** * Create a PoolRemoveNodesOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. + * @property {string} [ifMatch] An ETag value associated with the version of * the resource known to the client. The operation will be performed only if * the resource's current ETag on the service exactly matches the value * specified by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version + * @property {string} [ifNoneMatch] An ETag value associated with the version * of the resource known to the client. The operation will be performed only * if the resource's current ETag on the service does not match the value * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last + * @property {date} [ifModifiedSince] A timestamp indicating the last + * modified time of the resource known to the client. The operation will be + * performed only if the resource on the service has been modified since the + * specified time. + * @property {date} [ifUnmodifiedSince] A timestamp indicating the last * modified time of the resource known to the client. The operation will be * performed only if the resource on the service has not been modified since * the specified time. diff --git a/lib/services/batch/lib/models/poolResizeOptions.js b/lib/services/batch/lib/models/poolResizeOptions.js index 8bb813275c..f428a3726f 100644 --- a/lib/services/batch/lib/models/poolResizeOptions.js +++ b/lib/services/batch/lib/models/poolResizeOptions.js @@ -17,30 +17,30 @@ class PoolResizeOptions { /** * Create a PoolResizeOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. + * @property {string} [ifMatch] An ETag value associated with the version of * the resource known to the client. The operation will be performed only if * the resource's current ETag on the service exactly matches the value * specified by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version + * @property {string} [ifNoneMatch] An ETag value associated with the version * of the resource known to the client. The operation will be performed only * if the resource's current ETag on the service does not match the value * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last + * @property {date} [ifModifiedSince] A timestamp indicating the last + * modified time of the resource known to the client. The operation will be + * performed only if the resource on the service has been modified since the + * specified time. + * @property {date} [ifUnmodifiedSince] A timestamp indicating the last * modified time of the resource known to the client. The operation will be * performed only if the resource on the service has not been modified since * the specified time. diff --git a/lib/services/batch/lib/models/poolResizeParameter.js b/lib/services/batch/lib/models/poolResizeParameter.js index 9be305930d..5c8f1a67be 100644 --- a/lib/services/batch/lib/models/poolResizeParameter.js +++ b/lib/services/batch/lib/models/poolResizeParameter.js @@ -17,17 +17,17 @@ class PoolResizeParameter { /** * Create a PoolResizeParameter. - * @member {number} [targetDedicatedNodes] The desired number of dedicated + * @property {number} [targetDedicatedNodes] The desired number of dedicated * compute nodes in the pool. - * @member {number} [targetLowPriorityNodes] The desired number of + * @property {number} [targetLowPriorityNodes] The desired number of * low-priority compute nodes in the pool. - * @member {moment.duration} [resizeTimeout] The timeout for allocation of + * @property {moment.duration} [resizeTimeout] The timeout for allocation of * compute nodes to the pool or removal of compute nodes from the pool. The * default value is 15 minutes. The minimum value is 5 minutes. If you * specify a value less than 5 minutes, the Batch service returns an error; * if you are calling the REST API directly, the HTTP status code is 400 (Bad * Request). - * @member {string} [nodeDeallocationOption] Determines what to do with a + * @property {string} [nodeDeallocationOption] Determines what to do with a * node and its running task(s) if the pool size is decreasing. The default * value is requeue. Possible values include: 'requeue', 'terminate', * 'taskCompletion', 'retainedData' diff --git a/lib/services/batch/lib/models/poolSpecification.js b/lib/services/batch/lib/models/poolSpecification.js index eef58e318c..299281b0c7 100644 --- a/lib/services/batch/lib/models/poolSpecification.js +++ b/lib/services/batch/lib/models/poolSpecification.js @@ -17,15 +17,15 @@ class PoolSpecification { /** * Create a PoolSpecification. - * @member {string} [displayName] The display name for the pool. The display - * name need not be unique and can contain any Unicode characters up to a - * maximum length of 1024. - * @member {string} vmSize The size of the virtual machines in the pool. All - * virtual machines in a pool are the same size. For information about + * @property {string} [displayName] The display name for the pool. The + * display name need not be unique and can contain any Unicode characters up + * to a maximum length of 1024. + * @property {string} vmSize The size of the virtual machines in the pool. + * All virtual machines in a pool are the same size. For information about * available sizes of virtual machines in pools, see Choose a VM size for * compute nodes in an Azure Batch pool * (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). - * @member {object} [cloudServiceConfiguration] The cloud service + * @property {object} [cloudServiceConfiguration] The cloud service * configuration for the pool. This property must be specified if the pool * needs to be created with Azure PaaS VMs. This property and * virtualMachineConfiguration are mutually exclusive and one of the @@ -34,53 +34,41 @@ class PoolSpecification { * HTTP status code is 400 (Bad Request). This property cannot be specified * if the Batch account was created with its poolAllocationMode property set * to 'UserSubscription'. - * @member {string} [cloudServiceConfiguration.osFamily] Possible values are: + * @property {string} [cloudServiceConfiguration.osFamily] Possible values + * are: * 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. * 3 - OS Family 3, equivalent to Windows Server 2012. * 4 - OS Family 4, equivalent to Windows Server 2012 R2. * 5 - OS Family 5, equivalent to Windows Server 2016. For more information, * see Azure Guest OS Releases * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). - * @member {string} [cloudServiceConfiguration.targetOSVersion] The default - * value is * which specifies the latest operating system version for the - * specified OS family. - * @member {string} [cloudServiceConfiguration.currentOSVersion] This may - * differ from targetOSVersion if the pool state is Upgrading. In this case - * some virtual machines may be on the targetOSVersion and some may be on the - * currentOSVersion during the upgrade process. Once all virtual machines - * have upgraded, currentOSVersion is updated to be the same as - * targetOSVersion. - * @member {object} [virtualMachineConfiguration] The virtual machine + * @property {string} [cloudServiceConfiguration.osVersion] The default value + * is * which specifies the latest operating system version for the specified + * OS family. + * @property {object} [virtualMachineConfiguration] The virtual machine * configuration for the pool. This property must be specified if the pool * needs to be created with Azure IaaS VMs. This property and * cloudServiceConfiguration are mutually exclusive and one of the properties * must be specified. If neither is specified then the Batch service returns * an error; if you are calling the REST API directly, the HTTP status code * is 400 (Bad Request). - * @member {object} [virtualMachineConfiguration.imageReference] - * @member {string} [virtualMachineConfiguration.imageReference.publisher] + * @property {object} [virtualMachineConfiguration.imageReference] + * @property {string} [virtualMachineConfiguration.imageReference.publisher] * For example, Canonical or MicrosoftWindowsServer. - * @member {string} [virtualMachineConfiguration.imageReference.offer] For + * @property {string} [virtualMachineConfiguration.imageReference.offer] For * example, UbuntuServer or WindowsServer. - * @member {string} [virtualMachineConfiguration.imageReference.sku] For + * @property {string} [virtualMachineConfiguration.imageReference.sku] For * example, 14.04.0-LTS or 2012-R2-Datacenter. - * @member {string} [virtualMachineConfiguration.imageReference.version] A + * @property {string} [virtualMachineConfiguration.imageReference.version] A * value of 'latest' can be specified to select the latest version of an * image. If omitted, the default is 'latest'. - * @member {string} + * @property {string} * [virtualMachineConfiguration.imageReference.virtualMachineImageId] This * property is mutually exclusive with other ImageReference properties. The * virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * @member {object} [virtualMachineConfiguration.osDisk] - * @member {string} [virtualMachineConfiguration.osDisk.caching] The default - * value for caching is readwrite. For information about the caching options - * see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' - * @member {string} [virtualMachineConfiguration.nodeAgentSKUId] The Batch + * Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. + * @property {string} [virtualMachineConfiguration.nodeAgentSKUId] The Batch * node agent is a program that runs on each node in the pool, and provides * the command-and-control interface between the node and the Batch service. * There are different implementations of the node agent, known as SKUs, for @@ -88,14 +76,14 @@ class PoolSpecification { * matches the selected image reference. To get the list of supported node * agent SKUs along with their list of verified image references, see the * 'List supported node agent SKUs' operation. - * @member {object} [virtualMachineConfiguration.windowsConfiguration] This - * property must not be specified if the imageReference or osDisk property - * specifies a Linux OS image. - * @member {boolean} + * @property {object} [virtualMachineConfiguration.windowsConfiguration] This + * property must not be specified if the imageReference property specifies a + * Linux OS image. + * @property {boolean} * [virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] * If omitted, the default value is true. - * @member {array} [virtualMachineConfiguration.dataDisks] This property must - * be specified if the compute nodes in the pool need to have empty data + * @property {array} [virtualMachineConfiguration.dataDisks] This property + * must be specified if the compute nodes in the pool need to have empty data * disks attached to them. This cannot be updated. Each node gets its own * disk (the disk is not a file share). Existing disks cannot be attached, * each attached disk is empty. When the node is removed from the pool, the @@ -105,7 +93,7 @@ class PoolSpecification { * https://docs.microsoft.com/en-us/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux * and * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. - * @member {string} [virtualMachineConfiguration.licenseType] This only + * @property {string} [virtualMachineConfiguration.licenseType] This only * applies to images that contain the Windows operating system, and should * only be used when you hold valid on-premises licenses for the nodes which * will be deployed. If omitted, no on-premises licensing discount is @@ -113,103 +101,93 @@ class PoolSpecification { * * Windows_Server - The on-premises license is for Windows Server. * Windows_Client - The on-premises license is for Windows Client. - * @member {object} [virtualMachineConfiguration.containerConfiguration] If + * @property {object} [virtualMachineConfiguration.containerConfiguration] If * specified, setup is performed on each node in the pool to allow tasks to * run in containers. All regular tasks and job manager tasks run on this * pool must specify the containerSettings property, and all other tasks may * specify it. - * @member {array} + * @property {array} * [virtualMachineConfiguration.containerConfiguration.containerImageNames] * This is the full image reference, as would be specified to "docker pull". * An image will be sourced from the default Docker registry unless the image * is fully qualified with an alternative registry. - * @member {array} + * @property {array} * [virtualMachineConfiguration.containerConfiguration.containerRegistries] * If any images must be downloaded from a private registry which requires * credentials, then those credentials must be provided here. - * @member {number} [maxTasksPerNode] The maximum number of tasks that can + * @property {number} [maxTasksPerNode] The maximum number of tasks that can * run concurrently on a single compute node in the pool. The default value * is 1. The maximum value of this setting depends on the size of the compute * nodes in the pool (the vmSize setting). - * @member {object} [taskSchedulingPolicy] How tasks are distributed across + * @property {object} [taskSchedulingPolicy] How tasks are distributed across * compute nodes in a pool. - * @member {string} [taskSchedulingPolicy.nodeFillType] Possible values + * @property {string} [taskSchedulingPolicy.nodeFillType] Possible values * include: 'spread', 'pack' - * @member {moment.duration} [resizeTimeout] The timeout for allocation of + * @property {moment.duration} [resizeTimeout] The timeout for allocation of * compute nodes to the pool. This timeout applies only to manual scaling; it * has no effect when enableAutoScale is set to true. The default value is 15 * minutes. The minimum value is 5 minutes. If you specify a value less than * 5 minutes, the Batch service rejects the request with an error; if you are * calling the REST API directly, the HTTP status code is 400 (Bad Request). - * @member {number} [targetDedicatedNodes] The desired number of dedicated + * @property {number} [targetDedicatedNodes] The desired number of dedicated * compute nodes in the pool. This property must not be specified if * enableAutoScale is set to true. If enableAutoScale is set to false, then * you must set either targetDedicatedNodes, targetLowPriorityNodes, or both. - * @member {number} [targetLowPriorityNodes] The desired number of + * @property {number} [targetLowPriorityNodes] The desired number of * low-priority compute nodes in the pool. This property must not be * specified if enableAutoScale is set to true. If enableAutoScale is set to * false, then you must set either targetDedicatedNodes, * targetLowPriorityNodes, or both. - * @member {boolean} [enableAutoScale] Whether the pool size should + * @property {boolean} [enableAutoScale] Whether the pool size should * automatically adjust over time. If false, at least one of * targetDedicateNodes and targetLowPriorityNodes must be specified. If true, * the autoScaleFormula element is required. The pool automatically resizes * according to the formula. The default value is false. - * @member {string} [autoScaleFormula] The formula for the desired number of - * compute nodes in the pool. This property must not be specified if + * @property {string} [autoScaleFormula] The formula for the desired number + * of compute nodes in the pool. This property must not be specified if * enableAutoScale is set to false. It is required if enableAutoScale is set * to true. The formula is checked for validity before the pool is created. * If the formula is not valid, the Batch service rejects the request with * detailed error information. - * @member {moment.duration} [autoScaleEvaluationInterval] The time interval - * at which to automatically adjust the pool size according to the autoscale - * formula. The default value is 15 minutes. The minimum and maximum value - * are 5 minutes and 168 hours respectively. If you specify a value less than - * 5 minutes or greater than 168 hours, the Batch service rejects the request - * with an invalid property value error; if you are calling the REST API - * directly, the HTTP status code is 400 (Bad Request). - * @member {boolean} [enableInterNodeCommunication] Whether the pool permits - * direct communication between nodes. Enabling inter-node communication - * limits the maximum size of the pool due to deployment restrictions on the - * nodes of the pool. This may result in the pool not reaching its desired - * size. The default value is false. - * @member {object} [networkConfiguration] The network configuration for the - * pool. - * @member {string} [networkConfiguration.subnetId] The virtual network must - * be in the same region and subscription as the Azure Batch account. The - * specified subnet should have enough free IP addresses to accommodate the - * number of nodes in the pool. If the subnet doesn't have enough free IP - * addresses, the pool will partially allocate compute nodes, and a resize - * error will occur. The 'MicrosoftAzureBatch' service principal must have - * the 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) - * role for the specified VNet. The specified subnet must allow communication - * from the Azure Batch service to be able to schedule tasks on the compute - * nodes. This can be verified by checking if the specified VNet has any - * associated Network Security Groups (NSG). If communication to the compute - * nodes in the specified subnet is denied by an NSG, then the Batch service - * will set the state of the compute nodes to unusable. For pools created - * with virtualMachineConfiguration only ARM virtual networks + * @property {moment.duration} [autoScaleEvaluationInterval] The time + * interval at which to automatically adjust the pool size according to the + * autoscale formula. The default value is 15 minutes. The minimum and + * maximum value are 5 minutes and 168 hours respectively. If you specify a + * value less than 5 minutes or greater than 168 hours, the Batch service + * rejects the request with an invalid property value error; if you are + * calling the REST API directly, the HTTP status code is 400 (Bad Request). + * @property {boolean} [enableInterNodeCommunication] Whether the pool + * permits direct communication between nodes. Enabling inter-node + * communication limits the maximum size of the pool due to deployment + * restrictions on the nodes of the pool. This may result in the pool not + * reaching its desired size. The default value is false. + * @property {object} [networkConfiguration] The network configuration for + * the pool. + * @property {string} [networkConfiguration.subnetId] This is of the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. + * The virtual network must be in the same region and subscription as the + * Azure Batch account. The specified subnet should have enough free IP + * addresses to accommodate the number of nodes in the pool. If the subnet + * doesn't have enough free IP addresses, the pool will partially allocate + * compute nodes, and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks * ('Microsoft.Network/virtualNetworks') are supported, but for pools created * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security - * Groups (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 - * for Windows. For pools created with a cloud service configuration, enable - * ports 10100, 20100, and 30100. Also enable outbound connections to Azure - * Storage on port 443. For more details see: + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration - * @member {object} [networkConfiguration.endpointConfiguration] Pool + * @property {string} [networkConfiguration.dynamicVNetAssignmentScope] + * Possible values include: 'none', 'job' + * @property {object} [networkConfiguration.endpointConfiguration] Pool * endpoint configuration is only supported on pools with the * virtualMachineConfiguration property. - * @member {array} + * @property {array} * [networkConfiguration.endpointConfiguration.inboundNATPools] The maximum * number of inbound NAT pools per Batch pool is 5. If the maximum number of * inbound NAT pools is exceeded the request fails with HTTP status code 400. - * @member {object} [startTask] A task to run on each compute node as it + * @property {object} [startTask] A task to run on each compute node as it * joins the pool. The task runs when the node is added to the pool or when * the node is restarted. - * @member {string} [startTask.commandLine] The command line does not run + * @property {string} [startTask.commandLine] The command line does not run * under a shell, and therefore cannot take advantage of shell features such * as environment variable expansion. If you want to take advantage of such * features, you should invoke the shell in the command line, for example @@ -218,48 +196,48 @@ class PoolSpecification { * (relative to the task working directory), or use the Batch provided * environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [startTask.containerSettings] When this is specified, all - * directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of + * @property {object} [startTask.containerSettings] When this is specified, + * all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of * Azure Batch directories on the node) are mapped into the container, all * task environment variables are mapped into the container, and the task * command line is executed in the container. - * @member {string} [startTask.containerSettings.containerRunOptions] These + * @property {string} [startTask.containerSettings.containerRunOptions] These * additional options are supplied as arguments to the "docker create" * command, in addition to those controlled by the Batch Service. - * @member {string} [startTask.containerSettings.imageName] This is the full - * image reference, as would be specified to "docker pull". If no tag is + * @property {string} [startTask.containerSettings.imageName] This is the + * full image reference, as would be specified to "docker pull". If no tag is * provided as part of the image name, the tag ":latest" is used as a * default. - * @member {object} [startTask.containerSettings.registry] This setting can + * @property {object} [startTask.containerSettings.registry] This setting can * be omitted if was already provided at pool creation. - * @member {string} [startTask.containerSettings.registry.registryServer] If - * omitted, the default is "docker.io". - * @member {string} [startTask.containerSettings.registry.userName] - * @member {string} [startTask.containerSettings.registry.password] - * @member {array} [startTask.resourceFiles] Files listed under this element - * are located in the task's working directory. - * @member {array} [startTask.environmentSettings] - * @member {object} [startTask.userIdentity] If omitted, the task runs as a + * @property {string} [startTask.containerSettings.registry.registryServer] + * If omitted, the default is "docker.io". + * @property {string} [startTask.containerSettings.registry.userName] + * @property {string} [startTask.containerSettings.registry.password] + * @property {array} [startTask.resourceFiles] Files listed under this + * element are located in the task's working directory. + * @property {array} [startTask.environmentSettings] + * @property {object} [startTask.userIdentity] If omitted, the task runs as a * non-administrative user unique to the task. - * @member {string} [startTask.userIdentity.userName] The userName and + * @property {string} [startTask.userIdentity.userName] The userName and * autoUser properties are mutually exclusive; you must specify one but not * both. - * @member {object} [startTask.userIdentity.autoUser] The userName and + * @property {object} [startTask.userIdentity.autoUser] The userName and * autoUser properties are mutually exclusive; you must specify one but not * both. - * @member {string} [startTask.userIdentity.autoUser.scope] The default value - * is task. Possible values include: 'task', 'pool' - * @member {string} [startTask.userIdentity.autoUser.elevationLevel] The + * @property {string} [startTask.userIdentity.autoUser.scope] The default + * value is task. Possible values include: 'task', 'pool' + * @property {string} [startTask.userIdentity.autoUser.elevationLevel] The * default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {number} [startTask.maxTaskRetryCount] The Batch service retries a - * task if its exit code is nonzero. Note that this value specifically + * @property {number} [startTask.maxTaskRetryCount] The Batch service retries + * a task if its exit code is nonzero. Note that this value specifically * controls the number of retries. The Batch service will try the task once, * and may then retry up to this limit. For example, if the maximum retry * count is 3, Batch tries the task up to 4 times (one initial try and 3 * retries). If the maximum retry count is 0, the Batch service does not * retry the task. If the maximum retry count is -1, the Batch service * retries the task without limit. - * @member {boolean} [startTask.waitForSuccess] If true and the start task + * @property {boolean} [startTask.waitForSuccess] If true and the start task * fails on a compute node, the Batch service retries the start task up to * its maximum retry count (maxTaskRetryCount). If the task has still not * completed successfully after all retries, then the Batch service marks the @@ -269,7 +247,7 @@ class PoolSpecification { * other tasks can start executing on the compute node while the start task * is still running; and even if the start task fails, new tasks will * continue to be scheduled on the node. The default is false. - * @member {array} [certificateReferences] A list of certificates to be + * @property {array} [certificateReferences] A list of certificates to be * installed on each compute node in the pool. For Windows compute nodes, the * Batch service installs the certificates to the specified certificate store * and location. For Linux compute nodes, the certificates are stored in a @@ -278,19 +256,19 @@ class PoolSpecification { * location. For certificates with visibility of 'remoteUser', a 'certs' * directory is created in the user's home directory (e.g., * /home/{user-name}/certs) and certificates are placed in that directory. - * @member {array} [applicationPackageReferences] The list of application + * @property {array} [applicationPackageReferences] The list of application * packages to be installed on each compute node in the pool. - * @member {array} [applicationLicenses] The list of application licenses the - * Batch service will make available on each compute node in the pool. The - * list of application licenses must be a subset of available Batch service - * application licenses. If a license is requested which is not supported, - * pool creation will fail. The permitted licenses available on the pool are - * 'maya', 'vray', '3dsmax', 'arnold'. An additional charge applies for each - * application license added to the pool. - * @member {array} [userAccounts] The list of user accounts to be created on - * each node in the pool. - * @member {array} [metadata] A list of name-value pairs associated with the - * pool as metadata. The Batch service does not assign any meaning to + * @property {array} [applicationLicenses] The list of application licenses + * the Batch service will make available on each compute node in the pool. + * The list of application licenses must be a subset of available Batch + * service application licenses. If a license is requested which is not + * supported, pool creation will fail. The permitted licenses available on + * the pool are 'maya', 'vray', '3dsmax', 'arnold'. An additional charge + * applies for each application license added to the pool. + * @property {array} [userAccounts] The list of user accounts to be created + * on each node in the pool. + * @property {array} [metadata] A list of name-value pairs associated with + * the pool as metadata. The Batch service does not assign any meaning to * metadata; it is solely for the use of user code. */ constructor() { diff --git a/lib/services/batch/lib/models/poolStatistics.js b/lib/services/batch/lib/models/poolStatistics.js index db8ec338e7..274753a105 100644 --- a/lib/services/batch/lib/models/poolStatistics.js +++ b/lib/services/batch/lib/models/poolStatistics.js @@ -18,32 +18,32 @@ class PoolStatistics { /** * Create a PoolStatistics. - * @member {string} url The URL for the statistics. - * @member {date} startTime The start time of the time range covered by the + * @property {string} url The URL for the statistics. + * @property {date} startTime The start time of the time range covered by the * statistics. - * @member {date} lastUpdateTime The time at which the statistics were last + * @property {date} lastUpdateTime The time at which the statistics were last * updated. All statistics are limited to the range between startTime and * lastUpdateTime. - * @member {object} [usageStats] Statistics related to pool usage, such as + * @property {object} [usageStats] Statistics related to pool usage, such as * the amount of core-time used. - * @member {date} [usageStats.startTime] - * @member {date} [usageStats.lastUpdateTime] - * @member {moment.duration} [usageStats.dedicatedCoreTime] - * @member {object} [resourceStats] Statistics related to resource + * @property {date} [usageStats.startTime] + * @property {date} [usageStats.lastUpdateTime] + * @property {moment.duration} [usageStats.dedicatedCoreTime] + * @property {object} [resourceStats] Statistics related to resource * consumption by compute nodes in the pool. - * @member {date} [resourceStats.startTime] - * @member {date} [resourceStats.lastUpdateTime] - * @member {number} [resourceStats.avgCPUPercentage] - * @member {number} [resourceStats.avgMemoryGiB] - * @member {number} [resourceStats.peakMemoryGiB] - * @member {number} [resourceStats.avgDiskGiB] - * @member {number} [resourceStats.peakDiskGiB] - * @member {number} [resourceStats.diskReadIOps] - * @member {number} [resourceStats.diskWriteIOps] - * @member {number} [resourceStats.diskReadGiB] - * @member {number} [resourceStats.diskWriteGiB] - * @member {number} [resourceStats.networkReadGiB] - * @member {number} [resourceStats.networkWriteGiB] + * @property {date} [resourceStats.startTime] + * @property {date} [resourceStats.lastUpdateTime] + * @property {number} [resourceStats.avgCPUPercentage] + * @property {number} [resourceStats.avgMemoryGiB] + * @property {number} [resourceStats.peakMemoryGiB] + * @property {number} [resourceStats.avgDiskGiB] + * @property {number} [resourceStats.peakDiskGiB] + * @property {number} [resourceStats.diskReadIOps] + * @property {number} [resourceStats.diskWriteIOps] + * @property {number} [resourceStats.diskReadGiB] + * @property {number} [resourceStats.diskWriteGiB] + * @property {number} [resourceStats.networkReadGiB] + * @property {number} [resourceStats.networkWriteGiB] */ constructor() { } diff --git a/lib/services/batch/lib/models/poolStopResizeOptions.js b/lib/services/batch/lib/models/poolStopResizeOptions.js index 0f778a7c1b..9413d62675 100644 --- a/lib/services/batch/lib/models/poolStopResizeOptions.js +++ b/lib/services/batch/lib/models/poolStopResizeOptions.js @@ -17,30 +17,30 @@ class PoolStopResizeOptions { /** * Create a PoolStopResizeOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. + * @property {string} [ifMatch] An ETag value associated with the version of * the resource known to the client. The operation will be performed only if * the resource's current ETag on the service exactly matches the value * specified by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version + * @property {string} [ifNoneMatch] An ETag value associated with the version * of the resource known to the client. The operation will be performed only * if the resource's current ETag on the service does not match the value * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last + * @property {date} [ifModifiedSince] A timestamp indicating the last + * modified time of the resource known to the client. The operation will be + * performed only if the resource on the service has been modified since the + * specified time. + * @property {date} [ifUnmodifiedSince] A timestamp indicating the last * modified time of the resource known to the client. The operation will be * performed only if the resource on the service has not been modified since * the specified time. diff --git a/lib/services/batch/lib/models/poolUpdatePropertiesOptions.js b/lib/services/batch/lib/models/poolUpdatePropertiesOptions.js index ccbfa2e7b6..8cf5152e04 100644 --- a/lib/services/batch/lib/models/poolUpdatePropertiesOptions.js +++ b/lib/services/batch/lib/models/poolUpdatePropertiesOptions.js @@ -17,17 +17,17 @@ class PoolUpdatePropertiesOptions { /** * Create a PoolUpdatePropertiesOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/poolUpdatePropertiesParameter.js b/lib/services/batch/lib/models/poolUpdatePropertiesParameter.js index d972d80dbc..8311291e16 100644 --- a/lib/services/batch/lib/models/poolUpdatePropertiesParameter.js +++ b/lib/services/batch/lib/models/poolUpdatePropertiesParameter.js @@ -17,12 +17,12 @@ class PoolUpdatePropertiesParameter { /** * Create a PoolUpdatePropertiesParameter. - * @member {object} [startTask] A task to run on each compute node as it + * @property {object} [startTask] A task to run on each compute node as it * joins the pool. The task runs when the node is added to the pool or when * the node is restarted. If this element is present, it overwrites any * existing start task. If omitted, any existing start task is removed from * the pool. - * @member {string} [startTask.commandLine] The command line does not run + * @property {string} [startTask.commandLine] The command line does not run * under a shell, and therefore cannot take advantage of shell features such * as environment variable expansion. If you want to take advantage of such * features, you should invoke the shell in the command line, for example @@ -31,48 +31,48 @@ class PoolUpdatePropertiesParameter { * (relative to the task working directory), or use the Batch provided * environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [startTask.containerSettings] When this is specified, all - * directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of + * @property {object} [startTask.containerSettings] When this is specified, + * all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of * Azure Batch directories on the node) are mapped into the container, all * task environment variables are mapped into the container, and the task * command line is executed in the container. - * @member {string} [startTask.containerSettings.containerRunOptions] These + * @property {string} [startTask.containerSettings.containerRunOptions] These * additional options are supplied as arguments to the "docker create" * command, in addition to those controlled by the Batch Service. - * @member {string} [startTask.containerSettings.imageName] This is the full - * image reference, as would be specified to "docker pull". If no tag is + * @property {string} [startTask.containerSettings.imageName] This is the + * full image reference, as would be specified to "docker pull". If no tag is * provided as part of the image name, the tag ":latest" is used as a * default. - * @member {object} [startTask.containerSettings.registry] This setting can + * @property {object} [startTask.containerSettings.registry] This setting can * be omitted if was already provided at pool creation. - * @member {string} [startTask.containerSettings.registry.registryServer] If - * omitted, the default is "docker.io". - * @member {string} [startTask.containerSettings.registry.userName] - * @member {string} [startTask.containerSettings.registry.password] - * @member {array} [startTask.resourceFiles] Files listed under this element - * are located in the task's working directory. - * @member {array} [startTask.environmentSettings] - * @member {object} [startTask.userIdentity] If omitted, the task runs as a + * @property {string} [startTask.containerSettings.registry.registryServer] + * If omitted, the default is "docker.io". + * @property {string} [startTask.containerSettings.registry.userName] + * @property {string} [startTask.containerSettings.registry.password] + * @property {array} [startTask.resourceFiles] Files listed under this + * element are located in the task's working directory. + * @property {array} [startTask.environmentSettings] + * @property {object} [startTask.userIdentity] If omitted, the task runs as a * non-administrative user unique to the task. - * @member {string} [startTask.userIdentity.userName] The userName and + * @property {string} [startTask.userIdentity.userName] The userName and * autoUser properties are mutually exclusive; you must specify one but not * both. - * @member {object} [startTask.userIdentity.autoUser] The userName and + * @property {object} [startTask.userIdentity.autoUser] The userName and * autoUser properties are mutually exclusive; you must specify one but not * both. - * @member {string} [startTask.userIdentity.autoUser.scope] The default value - * is task. Possible values include: 'task', 'pool' - * @member {string} [startTask.userIdentity.autoUser.elevationLevel] The + * @property {string} [startTask.userIdentity.autoUser.scope] The default + * value is task. Possible values include: 'task', 'pool' + * @property {string} [startTask.userIdentity.autoUser.elevationLevel] The * default value is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {number} [startTask.maxTaskRetryCount] The Batch service retries a - * task if its exit code is nonzero. Note that this value specifically + * @property {number} [startTask.maxTaskRetryCount] The Batch service retries + * a task if its exit code is nonzero. Note that this value specifically * controls the number of retries. The Batch service will try the task once, * and may then retry up to this limit. For example, if the maximum retry * count is 3, Batch tries the task up to 4 times (one initial try and 3 * retries). If the maximum retry count is 0, the Batch service does not * retry the task. If the maximum retry count is -1, the Batch service * retries the task without limit. - * @member {boolean} [startTask.waitForSuccess] If true and the start task + * @property {boolean} [startTask.waitForSuccess] If true and the start task * fails on a compute node, the Batch service retries the start task up to * its maximum retry count (maxTaskRetryCount). If the task has still not * completed successfully after all retries, then the Batch service marks the @@ -82,7 +82,7 @@ class PoolUpdatePropertiesParameter { * other tasks can start executing on the compute node while the start task * is still running; and even if the start task fails, new tasks will * continue to be scheduled on the node. The default is false. - * @member {array} certificateReferences A list of certificates to be + * @property {array} certificateReferences A list of certificates to be * installed on each compute node in the pool. This list replaces any * existing certificate references configured on the pool. If you specify an * empty collection, any existing certificate references are removed from the @@ -94,7 +94,7 @@ class PoolUpdatePropertiesParameter { * visibility of 'remoteUser', a 'certs' directory is created in the user's * home directory (e.g., /home/{user-name}/certs) and certificates are placed * in that directory. - * @member {array} applicationPackageReferences A list of application + * @property {array} applicationPackageReferences A list of application * packages to be installed on each compute node in the pool. The list * replaces any existing application package references on the pool. Changes * to application package references affect all new compute nodes joining the @@ -102,7 +102,7 @@ class PoolUpdatePropertiesParameter { * they are rebooted or reimaged. If omitted, or if you specify an empty * collection, any existing application packages references are removed from * the pool. - * @member {array} metadata A list of name-value pairs associated with the + * @property {array} metadata A list of name-value pairs associated with the * pool as metadata. This list replaces any existing metadata configured on * the pool. If omitted, or if you specify an empty collection, any existing * metadata is removed from the pool. diff --git a/lib/services/batch/lib/models/poolUpgradeOSOptions.js b/lib/services/batch/lib/models/poolUpgradeOSOptions.js deleted file mode 100644 index 58dc176790..0000000000 --- a/lib/services/batch/lib/models/poolUpgradeOSOptions.js +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -'use strict'; - -/** - * Additional parameters for upgradeOS operation. - * - */ -class PoolUpgradeOSOptions { - /** - * Create a PoolUpgradeOSOptions. - * @member {number} [timeout] The maximum time that the server can spend - * processing the request, in seconds. The default is 30 seconds. Default - * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. - * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of - * the resource known to the client. The operation will be performed only if - * the resource's current ETag on the service exactly matches the value - * specified by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version - * of the resource known to the client. The operation will be performed only - * if the resource's current ETag on the service does not match the value - * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last - * modified time of the resource known to the client. The operation will be - * performed only if the resource on the service has not been modified since - * the specified time. - */ - constructor() { - } - - /** - * Defines the metadata of PoolUpgradeOSOptions - * - * @returns {object} metadata of PoolUpgradeOSOptions - * - */ - mapper() { - return { - required: false, - type: { - name: 'Composite', - className: 'PoolUpgradeOSOptions', - modelProperties: { - timeout: { - required: false, - defaultValue: 30, - type: { - name: 'Number' - } - }, - clientRequestId: { - required: false, - type: { - name: 'String' - } - }, - returnClientRequestId: { - required: false, - defaultValue: false, - type: { - name: 'Boolean' - } - }, - ocpDate: { - required: false, - type: { - name: 'DateTimeRfc1123' - } - }, - ifMatch: { - required: false, - type: { - name: 'String' - } - }, - ifNoneMatch: { - required: false, - type: { - name: 'String' - } - }, - ifModifiedSince: { - required: false, - type: { - name: 'DateTimeRfc1123' - } - }, - ifUnmodifiedSince: { - required: false, - type: { - name: 'DateTimeRfc1123' - } - } - } - } - }; - } -} - -module.exports = PoolUpgradeOSOptions; diff --git a/lib/services/batch/lib/models/poolUsageMetrics.js b/lib/services/batch/lib/models/poolUsageMetrics.js index 9ac7042c56..92f0f89bf3 100644 --- a/lib/services/batch/lib/models/poolUsageMetrics.js +++ b/lib/services/batch/lib/models/poolUsageMetrics.js @@ -17,23 +17,19 @@ class PoolUsageMetrics { /** * Create a PoolUsageMetrics. - * @member {string} poolId The ID of the pool whose metrics are aggregated in - * this entry. - * @member {date} startTime The start time of the aggregation interval + * @property {string} poolId The ID of the pool whose metrics are aggregated + * in this entry. + * @property {date} startTime The start time of the aggregation interval * covered by this entry. - * @member {date} endTime The end time of the aggregation interval covered by - * this entry. - * @member {string} vmSize The size of virtual machines in the pool. All VMs - * in a pool are the same size. For information about available sizes of + * @property {date} endTime The end time of the aggregation interval covered + * by this entry. + * @property {string} vmSize The size of virtual machines in the pool. All + * VMs in a pool are the same size. For information about available sizes of * virtual machines in pools, see Choose a VM size for compute nodes in an * Azure Batch pool * (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). - * @member {number} totalCoreHours The total core hours used in the pool + * @property {number} totalCoreHours The total core hours used in the pool * during this aggregation interval. - * @member {number} dataIngressGiB The cross data center network ingress to - * the pool during this interval, in GiB. - * @member {number} dataEgressGiB The cross data center network egress from - * the pool during this interval, in GiB. */ constructor() { } @@ -86,20 +82,6 @@ class PoolUsageMetrics { type: { name: 'Number' } - }, - dataIngressGiB: { - required: true, - serializedName: 'dataIngressGiB', - type: { - name: 'Number' - } - }, - dataEgressGiB: { - required: true, - serializedName: 'dataEgressGiB', - type: { - name: 'Number' - } } } } diff --git a/lib/services/batch/lib/models/recentJob.js b/lib/services/batch/lib/models/recentJob.js index 5337d9f157..b9b000040e 100644 --- a/lib/services/batch/lib/models/recentJob.js +++ b/lib/services/batch/lib/models/recentJob.js @@ -18,8 +18,8 @@ class RecentJob { /** * Create a RecentJob. - * @member {string} [id] The ID of the job. - * @member {string} [url] The URL of the job. + * @property {string} [id] The ID of the job. + * @property {string} [url] The URL of the job. */ constructor() { } diff --git a/lib/services/batch/lib/models/resizeError.js b/lib/services/batch/lib/models/resizeError.js index ea4b799725..6a6011ee31 100644 --- a/lib/services/batch/lib/models/resizeError.js +++ b/lib/services/batch/lib/models/resizeError.js @@ -17,12 +17,12 @@ class ResizeError { /** * Create a ResizeError. - * @member {string} [code] An identifier for the pool resize error. Codes are - * invariant and are intended to be consumed programmatically. - * @member {string} [message] A message describing the pool resize error, + * @property {string} [code] An identifier for the pool resize error. Codes + * are invariant and are intended to be consumed programmatically. + * @property {string} [message] A message describing the pool resize error, * intended to be suitable for display in a user interface. - * @member {array} [values] A list of additional error details related to the - * pool resize error. + * @property {array} [values] A list of additional error details related to + * the pool resize error. */ constructor() { } diff --git a/lib/services/batch/lib/models/resourceFile.js b/lib/services/batch/lib/models/resourceFile.js index b522b68b89..d2270be23b 100644 --- a/lib/services/batch/lib/models/resourceFile.js +++ b/lib/services/batch/lib/models/resourceFile.js @@ -11,21 +11,51 @@ 'use strict'; /** - * @summary A file to be downloaded from Azure blob storage to a compute node. + * @summary A single file or multiple files to be downloaded to a compute node. * */ class ResourceFile { /** * Create a ResourceFile. - * @member {string} blobSource The URL of the file within Azure Blob Storage. - * This URL must be readable using anonymous access; that is, the Batch - * service does not present any credentials when downloading the blob. There - * are two ways to get such a URL for a blob in Azure storage: include a - * Shared Access Signature (SAS) granting read permissions on the blob, or - * set the ACL for the blob or its container to allow public access. - * @member {string} filePath The location on the compute node to which to - * download the file, relative to the task's working directory. - * @member {string} [fileMode] The file permission mode attribute in octal + * @property {string} [autoStorageContainerName] The storage container name + * in the auto storage account. The autoStorageContainerName, + * storageContainerUrl and httpUrl properties are mutually exclusive and one + * of them must be specified. + * @property {string} [storageContainerUrl] The URL of the blob container + * within Azure Blob Storage. The autoStorageContainerName, + * storageContainerUrl and httpUrl properties are mutually exclusive and one + * of them must be specified. This URL must be readable and listable using + * anonymous access; that is, the Batch service does not present any + * credentials when downloading blobs from the container. There are two ways + * to get such a URL for a container in Azure storage: include a Shared + * Access Signature (SAS) granting read permissions on the container, or set + * the ACL for the container to allow public access. + * @property {string} [httpUrl] The URL of the file to download. The + * autoStorageContainerName, storageContainerUrl and httpUrl properties are + * mutually exclusive and one of them must be specified. If the URL points to + * Azure Blob Storage, it must be readable using anonymous access; that is, + * the Batch service does not present any credentials when downloading the + * blob. There are two ways to get such a URL for a blob in Azure storage: + * include a Shared Access Signature (SAS) granting read permissions on the + * blob, or set the ACL for the blob or its container to allow public access. + * @property {string} [blobPrefix] The blob prefix to use when downloading + * blobs from an Azure Storage container. Only the blobs whose names begin + * with the specified prefix will be downloaded. The property is valid only + * when autoStorageContainerName or storageContainerUrl is used. This prefix + * can be a partial filename or a subdirectory. If a prefix is not specified, + * all the files in the container will be downloaded. + * @property {string} [filePath] The location on the compute node to which to + * download the file(s), relative to the task's working directory. If the + * httpUrl property is specified, the filePath is required and describes the + * path which the file will be downloaded to, including the filename. + * Otherwise, if the autoStorageContainerName or storageContainerUrl property + * is specified, filePath is optional and is the directory to download the + * files to. In the case where filePath is used as a directory, any directory + * structure already associated with the input data will be retained in full + * and appended to the specified filePath directory. The specified relative + * path cannot break out of the task's working directory (for example by + * using '..'). + * @property {string} [fileMode] The file permission mode attribute in octal * format. This property applies only to files being downloaded to Linux * compute nodes. It will be ignored if it is specified for a resourceFile * which will be downloaded to a Windows node. If this property is not @@ -49,15 +79,36 @@ class ResourceFile { name: 'Composite', className: 'ResourceFile', modelProperties: { - blobSource: { - required: true, - serializedName: 'blobSource', + autoStorageContainerName: { + required: false, + serializedName: 'autoStorageContainerName', + type: { + name: 'String' + } + }, + storageContainerUrl: { + required: false, + serializedName: 'storageContainerUrl', + type: { + name: 'String' + } + }, + httpUrl: { + required: false, + serializedName: 'httpUrl', + type: { + name: 'String' + } + }, + blobPrefix: { + required: false, + serializedName: 'blobPrefix', type: { name: 'String' } }, filePath: { - required: true, + required: false, serializedName: 'filePath', type: { name: 'String' diff --git a/lib/services/batch/lib/models/resourceStatistics.js b/lib/services/batch/lib/models/resourceStatistics.js index 5493605713..2103a09afd 100644 --- a/lib/services/batch/lib/models/resourceStatistics.js +++ b/lib/services/batch/lib/models/resourceStatistics.js @@ -18,32 +18,32 @@ class ResourceStatistics { /** * Create a ResourceStatistics. - * @member {date} startTime The start time of the time range covered by the + * @property {date} startTime The start time of the time range covered by the * statistics. - * @member {date} lastUpdateTime The time at which the statistics were last + * @property {date} lastUpdateTime The time at which the statistics were last * updated. All statistics are limited to the range between startTime and * lastUpdateTime. - * @member {number} avgCPUPercentage The average CPU usage across all nodes + * @property {number} avgCPUPercentage The average CPU usage across all nodes * in the pool (percentage per node). - * @member {number} avgMemoryGiB The average memory usage in GiB across all + * @property {number} avgMemoryGiB The average memory usage in GiB across all * nodes in the pool. - * @member {number} peakMemoryGiB The peak memory usage in GiB across all + * @property {number} peakMemoryGiB The peak memory usage in GiB across all * nodes in the pool. - * @member {number} avgDiskGiB The average used disk space in GiB across all + * @property {number} avgDiskGiB The average used disk space in GiB across + * all nodes in the pool. + * @property {number} peakDiskGiB The peak used disk space in GiB across all * nodes in the pool. - * @member {number} peakDiskGiB The peak used disk space in GiB across all - * nodes in the pool. - * @member {number} diskReadIOps The total number of disk read operations - * across all nodes in the pool. - * @member {number} diskWriteIOps The total number of disk write operations + * @property {number} diskReadIOps The total number of disk read operations * across all nodes in the pool. - * @member {number} diskReadGiB The total amount of data in GiB of disk reads + * @property {number} diskWriteIOps The total number of disk write operations * across all nodes in the pool. - * @member {number} diskWriteGiB The total amount of data in GiB of disk - * writes across all nodes in the pool. - * @member {number} networkReadGiB The total amount of data in GiB of network + * @property {number} diskReadGiB The total amount of data in GiB of disk * reads across all nodes in the pool. - * @member {number} networkWriteGiB The total amount of data in GiB of + * @property {number} diskWriteGiB The total amount of data in GiB of disk + * writes across all nodes in the pool. + * @property {number} networkReadGiB The total amount of data in GiB of + * network reads across all nodes in the pool. + * @property {number} networkWriteGiB The total amount of data in GiB of * network writes across all nodes in the pool. */ constructor() { diff --git a/lib/services/batch/lib/models/schedule.js b/lib/services/batch/lib/models/schedule.js index 12b133e4e1..087477bf30 100644 --- a/lib/services/batch/lib/models/schedule.js +++ b/lib/services/batch/lib/models/schedule.js @@ -17,16 +17,16 @@ class Schedule { /** * Create a Schedule. - * @member {date} [doNotRunUntil] The earliest time at which any job may be + * @property {date} [doNotRunUntil] The earliest time at which any job may be * created under this job schedule. If you do not specify a doNotRunUntil * time, the schedule becomes ready to create jobs immediately. - * @member {date} [doNotRunAfter] A time after which no job will be created + * @property {date} [doNotRunAfter] A time after which no job will be created * under this job schedule. The schedule will move to the completed state as * soon as this deadline is past and there is no active job under this job * schedule. If you do not specify a doNotRunAfter time, and you are creating * a recurring job schedule, the job schedule will remain active until you * explicitly terminate it. - * @member {moment.duration} [startWindow] The time interval, starting from + * @property {moment.duration} [startWindow] The time interval, starting from * the time at which the schedule indicates a job should be created, within * which a job must be created. If a job is not created within the * startWindow interval, then the 'opportunity' is lost; no job will be @@ -38,7 +38,7 @@ class Schedule { * minute. If you specify a lower value, the Batch service rejects the * schedule with an error; if you are calling the REST API directly, the HTTP * status code is 400 (Bad Request). - * @member {moment.duration} [recurrenceInterval] The time interval between + * @property {moment.duration} [recurrenceInterval] The time interval between * the start times of two successive jobs under the job schedule. A job * schedule can have at most one active job under it at any given time. * Because a job schedule can have at most one active job under it at any diff --git a/lib/services/batch/lib/models/startTask.js b/lib/services/batch/lib/models/startTask.js index 51af673802..8ac47f4533 100644 --- a/lib/services/batch/lib/models/startTask.js +++ b/lib/services/batch/lib/models/startTask.js @@ -29,7 +29,7 @@ class StartTask { /** * Create a StartTask. - * @member {string} commandLine The command line of the start task. The + * @property {string} commandLine The command line of the start task. The * command line does not run under a shell, and therefore cannot take * advantage of shell features such as environment variable expansion. If you * want to take advantage of such features, you should invoke the shell in @@ -38,25 +38,25 @@ class StartTask { * it should use a relative path (relative to the task working directory), or * use the Batch provided environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [containerSettings] The settings for the container under - * which the start task runs. When this is specified, all directories + * @property {object} [containerSettings] The settings for the container + * under which the start task runs. When this is specified, all directories * recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch * directories on the node) are mapped into the container, all task * environment variables are mapped into the container, and the task command * line is executed in the container. - * @member {string} [containerSettings.containerRunOptions] These additional - * options are supplied as arguments to the "docker create" command, in - * addition to those controlled by the Batch Service. - * @member {string} [containerSettings.imageName] This is the full image + * @property {string} [containerSettings.containerRunOptions] These + * additional options are supplied as arguments to the "docker create" + * command, in addition to those controlled by the Batch Service. + * @property {string} [containerSettings.imageName] This is the full image * reference, as would be specified to "docker pull". If no tag is provided * as part of the image name, the tag ":latest" is used as a default. - * @member {object} [containerSettings.registry] This setting can be omitted - * if was already provided at pool creation. - * @member {string} [containerSettings.registry.registryServer] If omitted, + * @property {object} [containerSettings.registry] This setting can be + * omitted if was already provided at pool creation. + * @property {string} [containerSettings.registry.registryServer] If omitted, * the default is "docker.io". - * @member {string} [containerSettings.registry.userName] - * @member {string} [containerSettings.registry.password] - * @member {array} [resourceFiles] A list of files that the Batch service + * @property {string} [containerSettings.registry.userName] + * @property {string} [containerSettings.registry.password] + * @property {array} [resourceFiles] A list of files that the Batch service * will download to the compute node before running the command line. There * is a maximum size for the list of resource files. When the max size is * exceeded, the request will fail and the response error code will be @@ -64,28 +64,28 @@ class StartTask { * must be reduced in size. This can be achieved using .zip files, * Application Packages, or Docker Containers. Files listed under this * element are located in the task's working directory. - * @member {array} [environmentSettings] A list of environment variable + * @property {array} [environmentSettings] A list of environment variable * settings for the start task. - * @member {object} [userIdentity] The user identity under which the start + * @property {object} [userIdentity] The user identity under which the start * task runs. If omitted, the task runs as a non-administrative user unique * to the task. - * @member {string} [userIdentity.userName] The userName and autoUser + * @property {string} [userIdentity.userName] The userName and autoUser * properties are mutually exclusive; you must specify one but not both. - * @member {object} [userIdentity.autoUser] The userName and autoUser + * @property {object} [userIdentity.autoUser] The userName and autoUser * properties are mutually exclusive; you must specify one but not both. - * @member {string} [userIdentity.autoUser.scope] The default value is task. - * Possible values include: 'task', 'pool' - * @member {string} [userIdentity.autoUser.elevationLevel] The default value - * is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {number} [maxTaskRetryCount] The maximum number of times the task - * may be retried. The Batch service retries a task if its exit code is + * @property {string} [userIdentity.autoUser.scope] The default value is + * task. Possible values include: 'task', 'pool' + * @property {string} [userIdentity.autoUser.elevationLevel] The default + * value is nonAdmin. Possible values include: 'nonAdmin', 'admin' + * @property {number} [maxTaskRetryCount] The maximum number of times the + * task may be retried. The Batch service retries a task if its exit code is * nonzero. Note that this value specifically controls the number of retries. * The Batch service will try the task once, and may then retry up to this * limit. For example, if the maximum retry count is 3, Batch tries the task * up to 4 times (one initial try and 3 retries). If the maximum retry count * is 0, the Batch service does not retry the task. If the maximum retry * count is -1, the Batch service retries the task without limit. - * @member {boolean} [waitForSuccess] Whether the Batch service should wait + * @property {boolean} [waitForSuccess] Whether the Batch service should wait * for the start task to complete successfully (that is, to exit with exit * code 0) before scheduling any tasks on the compute node. If true and the * start task fails on a compute node, the Batch service retries the start diff --git a/lib/services/batch/lib/models/startTaskInformation.js b/lib/services/batch/lib/models/startTaskInformation.js index 852713851d..cecee4340c 100644 --- a/lib/services/batch/lib/models/startTaskInformation.js +++ b/lib/services/batch/lib/models/startTaskInformation.js @@ -17,55 +17,56 @@ class StartTaskInformation { /** * Create a StartTaskInformation. - * @member {string} state The state of the start task on the compute node. + * @property {string} state The state of the start task on the compute node. * Possible values include: 'running', 'completed' - * @member {date} startTime The time at which the start task started running. - * This value is reset every time the task is restarted or retried (that is, - * this is the most recent time at which the start task started running). - * @member {date} [endTime] The time at which the start task stopped running. - * This is the end time of the most recent run of the start task, if that run - * has completed (even if that run failed and a retry is pending). This - * element is not present if the start task is currently running. - * @member {number} [exitCode] The exit code of the program specified on the - * start task command line. This property is set only if the start task is in - * the completed state. In general, the exit code for a process reflects the - * specific convention implemented by the application developer for that - * process. If you use the exit code value to make decisions in your code, be - * sure that you know the exit code convention used by the application - * process. However, if the Batch service terminates the start task (due to - * timeout, or user termination via the API) you may see an operating - * system-defined exit code. - * @member {object} [containerInfo] Information about the container under + * @property {date} startTime The time at which the start task started + * running. This value is reset every time the task is restarted or retried + * (that is, this is the most recent time at which the start task started + * running). + * @property {date} [endTime] The time at which the start task stopped + * running. This is the end time of the most recent run of the start task, if + * that run has completed (even if that run failed and a retry is pending). + * This element is not present if the start task is currently running. + * @property {number} [exitCode] The exit code of the program specified on + * the start task command line. This property is set only if the start task + * is in the completed state. In general, the exit code for a process + * reflects the specific convention implemented by the application developer + * for that process. If you use the exit code value to make decisions in your + * code, be sure that you know the exit code convention used by the + * application process. However, if the Batch service terminates the start + * task (due to timeout, or user termination via the API) you may see an + * operating system-defined exit code. + * @property {object} [containerInfo] Information about the container under * which the task is executing. This property is set only if the task runs in * a container context. - * @member {string} [containerInfo.containerId] - * @member {string} [containerInfo.state] This is the state of the container - * according to the Docker service. It is equivalent to the status field - * returned by "docker inspect". - * @member {string} [containerInfo.error] This is the detailed error string + * @property {string} [containerInfo.containerId] + * @property {string} [containerInfo.state] This is the state of the + * container according to the Docker service. It is equivalent to the status + * field returned by "docker inspect". + * @property {string} [containerInfo.error] This is the detailed error string * from the Docker service, if available. It is equivalent to the error field * returned by "docker inspect". - * @member {object} [failureInfo] Information describing the task failure, if - * any. This property is set only if the task is in the completed state and - * encountered a failure. - * @member {string} [failureInfo.category] Possible values include: + * @property {object} [failureInfo] Information describing the task failure, + * if any. This property is set only if the task is in the completed state + * and encountered a failure. + * @property {string} [failureInfo.category] Possible values include: * 'userError', 'serverError' - * @member {string} [failureInfo.code] - * @member {string} [failureInfo.message] - * @member {array} [failureInfo.details] - * @member {number} retryCount The number of times the task has been retried - * by the Batch service. Task application failures (non-zero exit code) are - * retried, pre-processing errors (the task could not be run) and file upload - * errors are not retried. The Batch service will retry the task up to the - * limit specified by the constraints. - * @member {date} [lastRetryTime] The most recent time at which a retry of + * @property {string} [failureInfo.code] + * @property {string} [failureInfo.message] + * @property {array} [failureInfo.details] + * @property {number} retryCount The number of times the task has been + * retried by the Batch service. Task application failures (non-zero exit + * code) are retried, pre-processing errors (the task could not be run) and + * file upload errors are not retried. The Batch service will retry the task + * up to the limit specified by the constraints. + * @property {date} [lastRetryTime] The most recent time at which a retry of * the task started running. This element is present only if the task was * retried (i.e. retryCount is nonzero). If present, this is typically the * same as startTime, but may be different if the task has been restarted for * reasons other than retry; for example, if the compute node was rebooted * during a retry, then the startTime is updated but the lastRetryTime is * not. - * @member {string} [result] The result of the task execution. If the value + * @property {string} [result] The result of the task execution. If the value * is 'failed', then the details of the failure can be found in the * failureInfo property. Possible values include: 'success', 'failure' */ diff --git a/lib/services/batch/lib/models/subtaskInformation.js b/lib/services/batch/lib/models/subtaskInformation.js index 8e5f342698..7f1c42603f 100644 --- a/lib/services/batch/lib/models/subtaskInformation.js +++ b/lib/services/batch/lib/models/subtaskInformation.js @@ -17,58 +17,58 @@ class SubtaskInformation { /** * Create a SubtaskInformation. - * @member {number} [id] The ID of the subtask. - * @member {object} [nodeInfo] Information about the compute node on which + * @property {number} [id] The ID of the subtask. + * @property {object} [nodeInfo] Information about the compute node on which * the subtask ran. - * @member {string} [nodeInfo.affinityId] - * @member {string} [nodeInfo.nodeUrl] - * @member {string} [nodeInfo.poolId] - * @member {string} [nodeInfo.nodeId] - * @member {string} [nodeInfo.taskRootDirectory] - * @member {string} [nodeInfo.taskRootDirectoryUrl] - * @member {date} [startTime] The time at which the subtask started running. - * If the subtask has been restarted or retried, this is the most recent time - * at which the subtask started running. - * @member {date} [endTime] The time at which the subtask completed. This + * @property {string} [nodeInfo.affinityId] + * @property {string} [nodeInfo.nodeUrl] + * @property {string} [nodeInfo.poolId] + * @property {string} [nodeInfo.nodeId] + * @property {string} [nodeInfo.taskRootDirectory] + * @property {string} [nodeInfo.taskRootDirectoryUrl] + * @property {date} [startTime] The time at which the subtask started + * running. If the subtask has been restarted or retried, this is the most + * recent time at which the subtask started running. + * @property {date} [endTime] The time at which the subtask completed. This * property is set only if the subtask is in the Completed state. - * @member {number} [exitCode] The exit code of the program specified on the - * subtask command line. This property is set only if the subtask is in the - * completed state. In general, the exit code for a process reflects the + * @property {number} [exitCode] The exit code of the program specified on + * the subtask command line. This property is set only if the subtask is in + * the completed state. In general, the exit code for a process reflects the * specific convention implemented by the application developer for that * process. If you use the exit code value to make decisions in your code, be * sure that you know the exit code convention used by the application * process. However, if the Batch service terminates the subtask (due to * timeout, or user termination via the API) you may see an operating * system-defined exit code. - * @member {object} [containerInfo] Information about the container under + * @property {object} [containerInfo] Information about the container under * which the task is executing. This property is set only if the task runs in * a container context. - * @member {string} [containerInfo.containerId] - * @member {string} [containerInfo.state] This is the state of the container - * according to the Docker service. It is equivalent to the status field - * returned by "docker inspect". - * @member {string} [containerInfo.error] This is the detailed error string + * @property {string} [containerInfo.containerId] + * @property {string} [containerInfo.state] This is the state of the + * container according to the Docker service. It is equivalent to the status + * field returned by "docker inspect". + * @property {string} [containerInfo.error] This is the detailed error string * from the Docker service, if available. It is equivalent to the error field * returned by "docker inspect". - * @member {object} [failureInfo] Information describing the task failure, if - * any. This property is set only if the task is in the completed state and - * encountered a failure. - * @member {string} [failureInfo.category] Possible values include: + * @property {object} [failureInfo] Information describing the task failure, + * if any. This property is set only if the task is in the completed state + * and encountered a failure. + * @property {string} [failureInfo.category] Possible values include: * 'userError', 'serverError' - * @member {string} [failureInfo.code] - * @member {string} [failureInfo.message] - * @member {array} [failureInfo.details] - * @member {string} [state] The current state of the subtask. Possible values - * include: 'preparing', 'running', 'completed' - * @member {date} [stateTransitionTime] The time at which the subtask entered - * its current state. - * @member {string} [previousState] The previous state of the subtask. This + * @property {string} [failureInfo.code] + * @property {string} [failureInfo.message] + * @property {array} [failureInfo.details] + * @property {string} [state] The current state of the subtask. Possible + * values include: 'preparing', 'running', 'completed' + * @property {date} [stateTransitionTime] The time at which the subtask + * entered its current state. + * @property {string} [previousState] The previous state of the subtask. This * property is not set if the subtask is in its initial running state. * Possible values include: 'preparing', 'running', 'completed' - * @member {date} [previousStateTransitionTime] The time at which the subtask - * entered its previous state. This property is not set if the subtask is in - * its initial running state. - * @member {string} [result] The result of the task execution. If the value + * @property {date} [previousStateTransitionTime] The time at which the + * subtask entered its previous state. This property is not set if the + * subtask is in its initial running state. + * @property {string} [result] The result of the task execution. If the value * is 'failed', then the details of the failure can be found in the * failureInfo property. Possible values include: 'success', 'failure' */ diff --git a/lib/services/batch/lib/models/taskAddCollectionOptions.js b/lib/services/batch/lib/models/taskAddCollectionOptions.js index c6353afeb9..a56c8ab5cb 100644 --- a/lib/services/batch/lib/models/taskAddCollectionOptions.js +++ b/lib/services/batch/lib/models/taskAddCollectionOptions.js @@ -17,17 +17,17 @@ class TaskAddCollectionOptions { /** * Create a TaskAddCollectionOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/taskAddCollectionParameter.js b/lib/services/batch/lib/models/taskAddCollectionParameter.js index 4ae148d0a1..0e9cf814d2 100644 --- a/lib/services/batch/lib/models/taskAddCollectionParameter.js +++ b/lib/services/batch/lib/models/taskAddCollectionParameter.js @@ -17,8 +17,8 @@ class TaskAddCollectionParameter { /** * Create a TaskAddCollectionParameter. - * @member {array} value The collection of tasks to add. The maximum count of - * tasks is 100. The total serialized size of this collection must be less + * @property {array} value The collection of tasks to add. The maximum count + * of tasks is 100. The total serialized size of this collection must be less * than 1MB. If it is greater than 1MB (for example if each task has 100's of * resource files or environment variables), the request will fail with code * 'RequestBodyTooLarge' and should be retried again with fewer tasks. diff --git a/lib/services/batch/lib/models/taskAddCollectionResult.js b/lib/services/batch/lib/models/taskAddCollectionResult.js index 152963e2af..6e607f38ce 100644 --- a/lib/services/batch/lib/models/taskAddCollectionResult.js +++ b/lib/services/batch/lib/models/taskAddCollectionResult.js @@ -17,7 +17,8 @@ class TaskAddCollectionResult { /** * Create a TaskAddCollectionResult. - * @member {array} [value] The results of the add task collection operation. + * @property {array} [value] The results of the add task collection + * operation. */ constructor() { } diff --git a/lib/services/batch/lib/models/taskAddOptions.js b/lib/services/batch/lib/models/taskAddOptions.js index 0337f50a17..40059f0b24 100644 --- a/lib/services/batch/lib/models/taskAddOptions.js +++ b/lib/services/batch/lib/models/taskAddOptions.js @@ -17,17 +17,17 @@ class TaskAddOptions { /** * Create a TaskAddOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/taskAddParameter.js b/lib/services/batch/lib/models/taskAddParameter.js index f777a51b80..993ac708a8 100644 --- a/lib/services/batch/lib/models/taskAddParameter.js +++ b/lib/services/batch/lib/models/taskAddParameter.js @@ -28,15 +28,15 @@ class TaskAddParameter { /** * Create a TaskAddParameter. - * @member {string} id A string that uniquely identifies the task within the - * job. The ID can contain any combination of alphanumeric characters + * @property {string} id A string that uniquely identifies the task within + * the job. The ID can contain any combination of alphanumeric characters * including hyphens and underscores, and cannot contain more than 64 * characters. The ID is case-preserving and case-insensitive (that is, you * may not have two IDs within a job that differ only by case). - * @member {string} [displayName] A display name for the task. The display + * @property {string} [displayName] A display name for the task. The display * name need not be unique and can contain any Unicode characters up to a * maximum length of 1024. - * @member {string} commandLine The command line of the task. For + * @property {string} commandLine The command line of the task. For * multi-instance tasks, the command line is executed as the primary task, * after the primary task and all subtasks have finished executing the * coordination command line. The command line does not run under a shell, @@ -47,8 +47,8 @@ class TaskAddParameter { * line refers to file paths, it should use a relative path (relative to the * task working directory), or use the Batch provided environment variable * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). - * @member {object} [containerSettings] The settings for the container under - * which the task runs. If the pool that will run this task has + * @property {object} [containerSettings] The settings for the container + * under which the task runs. If the pool that will run this task has * containerConfiguration set, this must be set as well. If the pool that * will run this task doesn't have containerConfiguration set, this must not * be set. When this is specified, all directories recursively below the @@ -56,76 +56,76 @@ class TaskAddParameter { * are mapped into the container, all task environment variables are mapped * into the container, and the task command line is executed in the * container. - * @member {string} [containerSettings.containerRunOptions] These additional - * options are supplied as arguments to the "docker create" command, in - * addition to those controlled by the Batch Service. - * @member {string} [containerSettings.imageName] This is the full image + * @property {string} [containerSettings.containerRunOptions] These + * additional options are supplied as arguments to the "docker create" + * command, in addition to those controlled by the Batch Service. + * @property {string} [containerSettings.imageName] This is the full image * reference, as would be specified to "docker pull". If no tag is provided * as part of the image name, the tag ":latest" is used as a default. - * @member {object} [containerSettings.registry] This setting can be omitted - * if was already provided at pool creation. - * @member {string} [containerSettings.registry.registryServer] If omitted, + * @property {object} [containerSettings.registry] This setting can be + * omitted if was already provided at pool creation. + * @property {string} [containerSettings.registry.registryServer] If omitted, * the default is "docker.io". - * @member {string} [containerSettings.registry.userName] - * @member {string} [containerSettings.registry.password] - * @member {object} [exitConditions] How the Batch service should respond + * @property {string} [containerSettings.registry.userName] + * @property {string} [containerSettings.registry.password] + * @property {object} [exitConditions] How the Batch service should respond * when the task completes. - * @member {array} [exitConditions.exitCodes] - * @member {array} [exitConditions.exitCodeRanges] - * @member {object} [exitConditions.preProcessingError] - * @member {string} [exitConditions.preProcessingError.jobAction] The default - * is none for exit code 0 and terminate for all other exit conditions. If - * the job's onTaskFailed property is noaction, then specifying this property - * returns an error and the add task request fails with an invalid property - * value error; if you are calling the REST API directly, the HTTP status - * code is 400 (Bad Request). Possible values include: 'none', 'disable', - * 'terminate' - * @member {string} [exitConditions.preProcessingError.dependencyAction] The - * default is 'satisfy' for exit code 0, and 'block' for all other exit + * @property {array} [exitConditions.exitCodes] + * @property {array} [exitConditions.exitCodeRanges] + * @property {object} [exitConditions.preProcessingError] + * @property {string} [exitConditions.preProcessingError.jobAction] The + * default is none for exit code 0 and terminate for all other exit + * conditions. If the job's onTaskFailed property is noaction, then + * specifying this property returns an error and the add task request fails + * with an invalid property value error; if you are calling the REST API + * directly, the HTTP status code is 400 (Bad Request). Possible values + * include: 'none', 'disable', 'terminate' + * @property {string} [exitConditions.preProcessingError.dependencyAction] + * The default is 'satisfy' for exit code 0, and 'block' for all other exit * conditions. If the job's usesTaskDependencies property is set to false, * then specifying the dependencyAction property returns an error and the add * task request fails with an invalid property value error; if you are * calling the REST API directly, the HTTP status code is 400 (Bad Request). * Possible values include: 'satisfy', 'block' - * @member {object} [exitConditions.fileUploadError] If the task exited with - * an exit code that was specified via exitCodes or exitCodeRanges, and then - * encountered a file upload error, then the action specified by the exit - * code takes precedence. - * @member {string} [exitConditions.fileUploadError.jobAction] The default is - * none for exit code 0 and terminate for all other exit conditions. If the - * job's onTaskFailed property is noaction, then specifying this property + * @property {object} [exitConditions.fileUploadError] If the task exited + * with an exit code that was specified via exitCodes or exitCodeRanges, and + * then encountered a file upload error, then the action specified by the + * exit code takes precedence. + * @property {string} [exitConditions.fileUploadError.jobAction] The default + * is none for exit code 0 and terminate for all other exit conditions. If + * the job's onTaskFailed property is noaction, then specifying this property * returns an error and the add task request fails with an invalid property * value error; if you are calling the REST API directly, the HTTP status * code is 400 (Bad Request). Possible values include: 'none', 'disable', * 'terminate' - * @member {string} [exitConditions.fileUploadError.dependencyAction] The + * @property {string} [exitConditions.fileUploadError.dependencyAction] The * default is 'satisfy' for exit code 0, and 'block' for all other exit * conditions. If the job's usesTaskDependencies property is set to false, * then specifying the dependencyAction property returns an error and the add * task request fails with an invalid property value error; if you are * calling the REST API directly, the HTTP status code is 400 (Bad Request). * Possible values include: 'satisfy', 'block' - * @member {object} [exitConditions.default] This value is used if the task + * @property {object} [exitConditions.default] This value is used if the task * exits with any nonzero exit code not listed in the exitCodes or * exitCodeRanges collection, with a pre-processing error if the * preProcessingError property is not present, or with a file upload error if * the fileUploadError property is not present. If you want non-default - * behaviour on exit code 0, you must list it explicitly using the exitCodes + * behavior on exit code 0, you must list it explicitly using the exitCodes * or exitCodeRanges collection. - * @member {string} [exitConditions.default.jobAction] The default is none + * @property {string} [exitConditions.default.jobAction] The default is none * for exit code 0 and terminate for all other exit conditions. If the job's * onTaskFailed property is noaction, then specifying this property returns * an error and the add task request fails with an invalid property value * error; if you are calling the REST API directly, the HTTP status code is * 400 (Bad Request). Possible values include: 'none', 'disable', 'terminate' - * @member {string} [exitConditions.default.dependencyAction] The default is - * 'satisfy' for exit code 0, and 'block' for all other exit conditions. If - * the job's usesTaskDependencies property is set to false, then specifying - * the dependencyAction property returns an error and the add task request - * fails with an invalid property value error; if you are calling the REST - * API directly, the HTTP status code is 400 (Bad Request). Possible values - * include: 'satisfy', 'block' - * @member {array} [resourceFiles] A list of files that the Batch service + * @property {string} [exitConditions.default.dependencyAction] The default + * is 'satisfy' for exit code 0, and 'block' for all other exit conditions. + * If the job's usesTaskDependencies property is set to false, then + * specifying the dependencyAction property returns an error and the add task + * request fails with an invalid property value error; if you are calling the + * REST API directly, the HTTP status code is 400 (Bad Request). Possible + * values include: 'satisfy', 'block' + * @property {array} [resourceFiles] A list of files that the Batch service * will download to the compute node before running the command line. For * multi-instance tasks, the resource files will only be downloaded to the * compute node on which the primary task is executed. There is a maximum @@ -134,80 +134,79 @@ class TaskAddParameter { * RequestEntityTooLarge. If this occurs, the collection of ResourceFiles * must be reduced in size. This can be achieved using .zip files, * Application Packages, or Docker Containers. - * @member {array} [outputFiles] A list of files that the Batch service will - * upload from the compute node after running the command line. For + * @property {array} [outputFiles] A list of files that the Batch service + * will upload from the compute node after running the command line. For * multi-instance tasks, the files will only be uploaded from the compute * node on which the primary task is executed. - * @member {array} [environmentSettings] A list of environment variable + * @property {array} [environmentSettings] A list of environment variable * settings for the task. - * @member {object} [affinityInfo] A locality hint that can be used by the + * @property {object} [affinityInfo] A locality hint that can be used by the * Batch service to select a compute node on which to start the new task. - * @member {string} [affinityInfo.affinityId] You can pass the affinityId of - * a compute node to indicate that this task needs to run on that compute + * @property {string} [affinityInfo.affinityId] You can pass the affinityId + * of a compute node to indicate that this task needs to run on that compute * node. Note that this is just a soft affinity. If the target node is busy * or unavailable at the time the task is scheduled, then the task will be * scheduled elsewhere. - * @member {object} [constraints] The execution constraints that apply to + * @property {object} [constraints] The execution constraints that apply to * this task. If you do not specify constraints, the maxTaskRetryCount is the - * maxTaskRetryCount specified for the job, and the maxWallClockTime and - * retentionTime are infinite. - * @member {moment.duration} [constraints.maxWallClockTime] If this is not + * maxTaskRetryCount specified for the job, the maxWallClockTime is infinite, + * and the retentionTime is 7 days. + * @property {moment.duration} [constraints.maxWallClockTime] If this is not * specified, there is no time limit on how long the task may run. - * @member {moment.duration} [constraints.retentionTime] The default is - * infinite, i.e. the task directory will be retained until the compute node - * is removed or reimaged. - * @member {number} [constraints.maxTaskRetryCount] Note that this value + * @property {moment.duration} [constraints.retentionTime] The default is 7 + * days, i.e. the task directory will be retained for 7 days unless the + * compute node is removed or the job is deleted. + * @property {number} [constraints.maxTaskRetryCount] Note that this value * specifically controls the number of retries for the task executable due to * a nonzero exit code. The Batch service will try the task once, and may * then retry up to this limit. For example, if the maximum retry count is 3, * Batch tries the task up to 4 times (one initial try and 3 retries). If the * maximum retry count is 0, the Batch service does not retry the task after * the first attempt. If the maximum retry count is -1, the Batch service - * retries the task without limit. Resource files and application packages - * are only downloaded again if the task is retried on a new compute node. - * @member {object} [userIdentity] The user identity under which the task + * retries the task without limit. + * @property {object} [userIdentity] The user identity under which the task * runs. If omitted, the task runs as a non-administrative user unique to the * task. - * @member {string} [userIdentity.userName] The userName and autoUser + * @property {string} [userIdentity.userName] The userName and autoUser * properties are mutually exclusive; you must specify one but not both. - * @member {object} [userIdentity.autoUser] The userName and autoUser + * @property {object} [userIdentity.autoUser] The userName and autoUser * properties are mutually exclusive; you must specify one but not both. - * @member {string} [userIdentity.autoUser.scope] The default value is task. - * Possible values include: 'task', 'pool' - * @member {string} [userIdentity.autoUser.elevationLevel] The default value - * is nonAdmin. Possible values include: 'nonAdmin', 'admin' - * @member {object} [multiInstanceSettings] An object that indicates that the - * task is a multi-instance task, and contains information about how to run - * the multi-instance task. - * @member {number} [multiInstanceSettings.numberOfInstances] If omitted, the - * default is 1. - * @member {string} [multiInstanceSettings.coordinationCommandLine] A typical - * coordination command line launches a background service and verifies that - * the service is ready to process inter-node messages. - * @member {array} [multiInstanceSettings.commonResourceFiles] The difference - * between common resource files and task resource files is that common - * resource files are downloaded for all subtasks including the primary, - * whereas task resource files are downloaded only for the primary. Also note - * that these resource files are not downloaded to the task working + * @property {string} [userIdentity.autoUser.scope] The default value is + * task. Possible values include: 'task', 'pool' + * @property {string} [userIdentity.autoUser.elevationLevel] The default + * value is nonAdmin. Possible values include: 'nonAdmin', 'admin' + * @property {object} [multiInstanceSettings] An object that indicates that + * the task is a multi-instance task, and contains information about how to + * run the multi-instance task. + * @property {number} [multiInstanceSettings.numberOfInstances] If omitted, + * the default is 1. + * @property {string} [multiInstanceSettings.coordinationCommandLine] A + * typical coordination command line launches a background service and + * verifies that the service is ready to process inter-node messages. + * @property {array} [multiInstanceSettings.commonResourceFiles] The + * difference between common resource files and task resource files is that + * common resource files are downloaded for all subtasks including the + * primary, whereas task resource files are downloaded only for the primary. + * Also note that these resource files are not downloaded to the task working * directory, but instead are downloaded to the task root directory (one * directory above the working directory). There is a maximum size for the * list of resource files. When the max size is exceeded, the request will * fail and the response error code will be RequestEntityTooLarge. If this * occurs, the collection of ResourceFiles must be reduced in size. This can * be achieved using .zip files, Application Packages, or Docker Containers. - * @member {object} [dependsOn] The tasks that this task depends on. This + * @property {object} [dependsOn] The tasks that this task depends on. This * task will not be scheduled until all tasks that it depends on have * completed successfully. If any of those tasks fail and exhaust their retry * counts, this task will never be scheduled. If the job does not have * usesTaskDependencies set to true, and this element is present, the request * fails with error code TaskDependenciesNotSpecifiedOnJob. - * @member {array} [dependsOn.taskIds] The taskIds collection is limited to + * @property {array} [dependsOn.taskIds] The taskIds collection is limited to * 64000 characters total (i.e. the combined length of all task IDs). If the * taskIds collection exceeds the maximum length, the Add Task request fails * with error code TaskDependencyListTooLong. In this case consider using * task ID ranges instead. - * @member {array} [dependsOn.taskIdRanges] - * @member {array} [applicationPackageReferences] A list of application + * @property {array} [dependsOn.taskIdRanges] + * @property {array} [applicationPackageReferences] A list of application * packages that the Batch service will deploy to the compute node before * running the command line. Application packages are downloaded and deployed * to a shared directory, not the task working directory. Therefore, if a @@ -215,7 +214,7 @@ class TaskAddParameter { * it is not re-downloaded; the existing copy on the compute node is used. If * a referenced application package cannot be installed, for example because * the package has been deleted or because download failed, the task fails. - * @member {object} [authenticationTokenSettings] The settings for an + * @property {object} [authenticationTokenSettings] The settings for an * authentication token that the task can use to perform Batch service * operations. If this property is set, the Batch service provides the task * with an authentication token which can be used to authenticate Batch @@ -225,7 +224,7 @@ class TaskAddParameter { * settings. For example, a task can request job permissions in order to add * other tasks to the job, or check the status of the job or of other tasks * under the job. - * @member {array} [authenticationTokenSettings.access] The authentication + * @property {array} [authenticationTokenSettings.access] The authentication * token grants access to a limited set of Batch service operations. * Currently the only supported value for the access property is 'job', which * grants access to all operations related to the job which contains the diff --git a/lib/services/batch/lib/models/taskAddResult.js b/lib/services/batch/lib/models/taskAddResult.js index f6b7f4a9f9..c1fdc9578c 100644 --- a/lib/services/batch/lib/models/taskAddResult.js +++ b/lib/services/batch/lib/models/taskAddResult.js @@ -18,24 +18,24 @@ class TaskAddResult { /** * Create a TaskAddResult. - * @member {string} status The status of the add task request. Possible + * @property {string} status The status of the add task request. Possible * values include: 'success', 'clientError', 'serverError' - * @member {string} taskId The ID of the task for which this is the result. - * @member {string} [eTag] The ETag of the task, if the task was successfully - * added. You can use this to detect whether the task has changed between - * requests. In particular, you can be pass the ETag with an Update Task - * request to specify that your changes should take effect only if nobody - * else has modified the job in the meantime. - * @member {date} [lastModified] The last modified time of the task. - * @member {string} [location] The URL of the task, if the task was + * @property {string} taskId The ID of the task for which this is the result. + * @property {string} [eTag] The ETag of the task, if the task was + * successfully added. You can use this to detect whether the task has + * changed between requests. In particular, you can be pass the ETag with an + * Update Task request to specify that your changes should take effect only + * if nobody else has modified the job in the meantime. + * @property {date} [lastModified] The last modified time of the task. + * @property {string} [location] The URL of the task, if the task was * successfully added. - * @member {object} [error] The error encountered while attempting to add the - * task. - * @member {string} [error.code] - * @member {object} [error.message] - * @member {string} [error.message.lang] - * @member {string} [error.message.value] - * @member {array} [error.values] + * @property {object} [error] The error encountered while attempting to add + * the task. + * @property {string} [error.code] + * @property {object} [error.message] + * @property {string} [error.message.lang] + * @property {string} [error.message.value] + * @property {array} [error.values] */ constructor() { } diff --git a/lib/services/batch/lib/models/taskConstraints.js b/lib/services/batch/lib/models/taskConstraints.js index 6a4c7b9686..30c377cc3c 100644 --- a/lib/services/batch/lib/models/taskConstraints.js +++ b/lib/services/batch/lib/models/taskConstraints.js @@ -17,19 +17,19 @@ class TaskConstraints { /** * Create a TaskConstraints. - * @member {moment.duration} [maxWallClockTime] The maximum elapsed time that - * the task may run, measured from the time the task starts. If the task does - * not complete within the time limit, the Batch service terminates it. If - * this is not specified, there is no time limit on how long the task may + * @property {moment.duration} [maxWallClockTime] The maximum elapsed time + * that the task may run, measured from the time the task starts. If the task + * does not complete within the time limit, the Batch service terminates it. + * If this is not specified, there is no time limit on how long the task may * run. - * @member {moment.duration} [retentionTime] The minimum time to retain the + * @property {moment.duration} [retentionTime] The minimum time to retain the * task directory on the compute node where it ran, from the time it * completes execution. After this time, the Batch service may delete the - * task directory and all its contents. The default is infinite, i.e. the - * task directory will be retained until the compute node is removed or - * reimaged. - * @member {number} [maxTaskRetryCount] The maximum number of times the task - * may be retried. The Batch service retries a task if its exit code is + * task directory and all its contents. The default is 7 days, i.e. the task + * directory will be retained for 7 days unless the compute node is removed + * or the job is deleted. + * @property {number} [maxTaskRetryCount] The maximum number of times the + * task may be retried. The Batch service retries a task if its exit code is * nonzero. Note that this value specifically controls the number of retries * for the task executable due to a nonzero exit code. The Batch service will * try the task once, and may then retry up to this limit. For example, if @@ -37,8 +37,6 @@ class TaskConstraints { * initial try and 3 retries). If the maximum retry count is 0, the Batch * service does not retry the task after the first attempt. If the maximum * retry count is -1, the Batch service retries the task without limit. - * Resource files and application packages are only downloaded again if the - * task is retried on a new compute node. */ constructor() { } diff --git a/lib/services/batch/lib/models/taskContainerExecutionInformation.js b/lib/services/batch/lib/models/taskContainerExecutionInformation.js index 79bc9cfe58..da0b4bb6d8 100644 --- a/lib/services/batch/lib/models/taskContainerExecutionInformation.js +++ b/lib/services/batch/lib/models/taskContainerExecutionInformation.js @@ -17,11 +17,11 @@ class TaskContainerExecutionInformation { /** * Create a TaskContainerExecutionInformation. - * @member {string} [containerId] The ID of the container. - * @member {string} [state] The state of the container. This is the state of - * the container according to the Docker service. It is equivalent to the + * @property {string} [containerId] The ID of the container. + * @property {string} [state] The state of the container. This is the state + * of the container according to the Docker service. It is equivalent to the * status field returned by "docker inspect". - * @member {string} [error] Detailed error information about the container. + * @property {string} [error] Detailed error information about the container. * This is the detailed error string from the Docker service, if available. * It is equivalent to the error field returned by "docker inspect". */ diff --git a/lib/services/batch/lib/models/taskContainerSettings.js b/lib/services/batch/lib/models/taskContainerSettings.js index e3f312b9ee..de541b7429 100644 --- a/lib/services/batch/lib/models/taskContainerSettings.js +++ b/lib/services/batch/lib/models/taskContainerSettings.js @@ -17,21 +17,21 @@ class TaskContainerSettings { /** * Create a TaskContainerSettings. - * @member {string} [containerRunOptions] Additional options to the container - * create command. These additional options are supplied as arguments to the - * "docker create" command, in addition to those controlled by the Batch - * Service. - * @member {string} imageName The image to use to create the container in + * @property {string} [containerRunOptions] Additional options to the + * container create command. These additional options are supplied as + * arguments to the "docker create" command, in addition to those controlled + * by the Batch Service. + * @property {string} imageName The image to use to create the container in * which the task will run. This is the full image reference, as would be * specified to "docker pull". If no tag is provided as part of the image * name, the tag ":latest" is used as a default. - * @member {object} [registry] The private registry which contains the + * @property {object} [registry] The private registry which contains the * container image. This setting can be omitted if was already provided at * pool creation. - * @member {string} [registry.registryServer] If omitted, the default is + * @property {string} [registry.registryServer] If omitted, the default is * "docker.io". - * @member {string} [registry.userName] - * @member {string} [registry.password] + * @property {string} [registry.userName] + * @property {string} [registry.password] */ constructor() { } diff --git a/lib/services/batch/lib/models/taskCounts.js b/lib/services/batch/lib/models/taskCounts.js index 58c4615272..d9198361ec 100644 --- a/lib/services/batch/lib/models/taskCounts.js +++ b/lib/services/batch/lib/models/taskCounts.js @@ -17,14 +17,14 @@ class TaskCounts { /** * Create a TaskCounts. - * @member {number} active The number of tasks in the active state. - * @member {number} running The number of tasks in the running or preparing + * @property {number} active The number of tasks in the active state. + * @property {number} running The number of tasks in the running or preparing * state. - * @member {number} completed The number of tasks in the completed state. - * @member {number} succeeded The number of tasks which succeeded. A task + * @property {number} completed The number of tasks in the completed state. + * @property {number} succeeded The number of tasks which succeeded. A task * succeeds if its result (found in the executionInfo property) is 'success'. - * @member {number} failed The number of tasks which failed. A task fails if - * its result (found in the executionInfo property) is 'failure'. + * @property {number} failed The number of tasks which failed. A task fails + * if its result (found in the executionInfo property) is 'failure'. */ constructor() { } diff --git a/lib/services/batch/lib/models/taskDeleteMethodOptions.js b/lib/services/batch/lib/models/taskDeleteMethodOptions.js index 5f5e69a3e2..026367371e 100644 --- a/lib/services/batch/lib/models/taskDeleteMethodOptions.js +++ b/lib/services/batch/lib/models/taskDeleteMethodOptions.js @@ -17,30 +17,30 @@ class TaskDeleteMethodOptions { /** * Create a TaskDeleteMethodOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. + * @property {string} [ifMatch] An ETag value associated with the version of * the resource known to the client. The operation will be performed only if * the resource's current ETag on the service exactly matches the value * specified by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version + * @property {string} [ifNoneMatch] An ETag value associated with the version * of the resource known to the client. The operation will be performed only * if the resource's current ETag on the service does not match the value * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last + * @property {date} [ifModifiedSince] A timestamp indicating the last + * modified time of the resource known to the client. The operation will be + * performed only if the resource on the service has been modified since the + * specified time. + * @property {date} [ifUnmodifiedSince] A timestamp indicating the last * modified time of the resource known to the client. The operation will be * performed only if the resource on the service has not been modified since * the specified time. diff --git a/lib/services/batch/lib/models/taskDependencies.js b/lib/services/batch/lib/models/taskDependencies.js index 93e20dfdd7..4202aa1905 100644 --- a/lib/services/batch/lib/models/taskDependencies.js +++ b/lib/services/batch/lib/models/taskDependencies.js @@ -19,14 +19,14 @@ class TaskDependencies { /** * Create a TaskDependencies. - * @member {array} [taskIds] The list of task IDs that this task depends on. - * All tasks in this list must complete successfully before the dependent + * @property {array} [taskIds] The list of task IDs that this task depends + * on. All tasks in this list must complete successfully before the dependent * task can be scheduled. The taskIds collection is limited to 64000 * characters total (i.e. the combined length of all task IDs). If the * taskIds collection exceeds the maximum length, the Add Task request fails * with error code TaskDependencyListTooLong. In this case consider using * task ID ranges instead. - * @member {array} [taskIdRanges] The list of task ID ranges that this task + * @property {array} [taskIdRanges] The list of task ID ranges that this task * depends on. All tasks in all ranges must complete successfully before the * dependent task can be scheduled. */ diff --git a/lib/services/batch/lib/models/taskExecutionInformation.js b/lib/services/batch/lib/models/taskExecutionInformation.js index 9108cd3e08..52b8731934 100644 --- a/lib/services/batch/lib/models/taskExecutionInformation.js +++ b/lib/services/batch/lib/models/taskExecutionInformation.js @@ -17,17 +17,17 @@ class TaskExecutionInformation { /** * Create a TaskExecutionInformation. - * @member {date} [startTime] The time at which the task started running. + * @property {date} [startTime] The time at which the task started running. * 'Running' corresponds to the running state, so if the task specifies * resource files or application packages, then the start time reflects the * time at which the task started downloading or deploying these. If the task * has been restarted or retried, this is the most recent time at which the * task started running. This property is present only for tasks that are in * the running or completed state. - * @member {date} [endTime] The time at which the task completed. This + * @property {date} [endTime] The time at which the task completed. This * property is set only if the task is in the Completed state. - * @member {number} [exitCode] The exit code of the program specified on the - * task command line. This property is set only if the task is in the + * @property {number} [exitCode] The exit code of the program specified on + * the task command line. This property is set only if the task is in the * completed state. In general, the exit code for a process reflects the * specific convention implemented by the application developer for that * process. If you use the exit code value to make decisions in your code, be @@ -35,46 +35,46 @@ class TaskExecutionInformation { * process. However, if the Batch service terminates the task (due to * timeout, or user termination via the API) you may see an operating * system-defined exit code. - * @member {object} [containerInfo] Information about the container under + * @property {object} [containerInfo] Information about the container under * which the task is executing. This property is set only if the task runs in * a container context. - * @member {string} [containerInfo.containerId] - * @member {string} [containerInfo.state] This is the state of the container - * according to the Docker service. It is equivalent to the status field - * returned by "docker inspect". - * @member {string} [containerInfo.error] This is the detailed error string + * @property {string} [containerInfo.containerId] + * @property {string} [containerInfo.state] This is the state of the + * container according to the Docker service. It is equivalent to the status + * field returned by "docker inspect". + * @property {string} [containerInfo.error] This is the detailed error string * from the Docker service, if available. It is equivalent to the error field * returned by "docker inspect". - * @member {object} [failureInfo] Information describing the task failure, if - * any. This property is set only if the task is in the completed state and - * encountered a failure. - * @member {string} [failureInfo.category] Possible values include: + * @property {object} [failureInfo] Information describing the task failure, + * if any. This property is set only if the task is in the completed state + * and encountered a failure. + * @property {string} [failureInfo.category] Possible values include: * 'userError', 'serverError' - * @member {string} [failureInfo.code] - * @member {string} [failureInfo.message] - * @member {array} [failureInfo.details] - * @member {number} retryCount The number of times the task has been retried - * by the Batch service. Task application failures (non-zero exit code) are - * retried, pre-processing errors (the task could not be run) and file upload - * errors are not retried. The Batch service will retry the task up to the - * limit specified by the constraints. - * @member {date} [lastRetryTime] The most recent time at which a retry of + * @property {string} [failureInfo.code] + * @property {string} [failureInfo.message] + * @property {array} [failureInfo.details] + * @property {number} retryCount The number of times the task has been + * retried by the Batch service. Task application failures (non-zero exit + * code) are retried, pre-processing errors (the task could not be run) and + * file upload errors are not retried. The Batch service will retry the task + * up to the limit specified by the constraints. + * @property {date} [lastRetryTime] The most recent time at which a retry of * the task started running. This element is present only if the task was * retried (i.e. retryCount is nonzero). If present, this is typically the * same as startTime, but may be different if the task has been restarted for * reasons other than retry; for example, if the compute node was rebooted * during a retry, then the startTime is updated but the lastRetryTime is * not. - * @member {number} requeueCount The number of times the task has been + * @property {number} requeueCount The number of times the task has been * requeued by the Batch service as the result of a user request. When the * user removes nodes from a pool (by resizing/shrinking the pool) or when * the job is being disabled, the user can specify that running tasks on the * nodes be requeued for execution. This count tracks how many times the task * has been requeued for these reasons. - * @member {date} [lastRequeueTime] The most recent time at which the task + * @property {date} [lastRequeueTime] The most recent time at which the task * has been requeued by the Batch service as the result of a user request. * This property is set only if the requeueCount is nonzero. - * @member {string} [result] The result of the task execution. If the value + * @property {string} [result] The result of the task execution. If the value * is 'failed', then the details of the failure can be found in the * failureInfo property. Possible values include: 'success', 'failure' */ diff --git a/lib/services/batch/lib/models/taskFailureInformation.js b/lib/services/batch/lib/models/taskFailureInformation.js index 812e5604d1..a96e96a322 100644 --- a/lib/services/batch/lib/models/taskFailureInformation.js +++ b/lib/services/batch/lib/models/taskFailureInformation.js @@ -17,13 +17,13 @@ class TaskFailureInformation { /** * Create a TaskFailureInformation. - * @member {string} category The category of the task error. Possible values - * include: 'userError', 'serverError' - * @member {string} [code] An identifier for the task error. Codes are + * @property {string} category The category of the task error. Possible + * values include: 'userError', 'serverError' + * @property {string} [code] An identifier for the task error. Codes are * invariant and are intended to be consumed programmatically. - * @member {string} [message] A message describing the task error, intended + * @property {string} [message] A message describing the task error, intended * to be suitable for display in a user interface. - * @member {array} [details] A list of additional details related to the + * @property {array} [details] A list of additional details related to the * error. */ constructor() { diff --git a/lib/services/batch/lib/models/taskGetOptions.js b/lib/services/batch/lib/models/taskGetOptions.js index 04df01ddfb..095bbee50d 100644 --- a/lib/services/batch/lib/models/taskGetOptions.js +++ b/lib/services/batch/lib/models/taskGetOptions.js @@ -17,32 +17,32 @@ class TaskGetOptions { /** * Create a TaskGetOptions. - * @member {string} [select] An OData $select clause. - * @member {string} [expand] An OData $expand clause. - * @member {number} [timeout] The maximum time that the server can spend + * @property {string} [select] An OData $select clause. + * @property {string} [expand] An OData $expand clause. + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. + * @property {string} [ifMatch] An ETag value associated with the version of * the resource known to the client. The operation will be performed only if * the resource's current ETag on the service exactly matches the value * specified by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version + * @property {string} [ifNoneMatch] An ETag value associated with the version * of the resource known to the client. The operation will be performed only * if the resource's current ETag on the service does not match the value * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last + * @property {date} [ifModifiedSince] A timestamp indicating the last + * modified time of the resource known to the client. The operation will be + * performed only if the resource on the service has been modified since the + * specified time. + * @property {date} [ifUnmodifiedSince] A timestamp indicating the last * modified time of the resource known to the client. The operation will be * performed only if the resource on the service has not been modified since * the specified time. diff --git a/lib/services/batch/lib/models/taskIdRange.js b/lib/services/batch/lib/models/taskIdRange.js index 7c1a449b17..bd227e8e88 100644 --- a/lib/services/batch/lib/models/taskIdRange.js +++ b/lib/services/batch/lib/models/taskIdRange.js @@ -22,8 +22,8 @@ class TaskIdRange { /** * Create a TaskIdRange. - * @member {number} start The first task ID in the range. - * @member {number} end The last task ID in the range. + * @property {number} start The first task ID in the range. + * @property {number} end The last task ID in the range. */ constructor() { } diff --git a/lib/services/batch/lib/models/taskInformation.js b/lib/services/batch/lib/models/taskInformation.js index 17c62ca041..b89641e10e 100644 --- a/lib/services/batch/lib/models/taskInformation.js +++ b/lib/services/batch/lib/models/taskInformation.js @@ -17,68 +17,68 @@ class TaskInformation { /** * Create a TaskInformation. - * @member {string} [taskUrl] The URL of the task. - * @member {string} [jobId] The ID of the job to which the task belongs. - * @member {string} [taskId] The ID of the task. - * @member {number} [subtaskId] The ID of the subtask if the task is a + * @property {string} [taskUrl] The URL of the task. + * @property {string} [jobId] The ID of the job to which the task belongs. + * @property {string} [taskId] The ID of the task. + * @property {number} [subtaskId] The ID of the subtask if the task is a * multi-instance task. - * @member {string} taskState The current state of the task. Possible values - * include: 'active', 'preparing', 'running', 'completed' - * @member {object} [executionInfo] Information about the execution of the + * @property {string} taskState The current state of the task. Possible + * values include: 'active', 'preparing', 'running', 'completed' + * @property {object} [executionInfo] Information about the execution of the * task. - * @member {date} [executionInfo.startTime] 'Running' corresponds to the + * @property {date} [executionInfo.startTime] 'Running' corresponds to the * running state, so if the task specifies resource files or application * packages, then the start time reflects the time at which the task started * downloading or deploying these. If the task has been restarted or retried, * this is the most recent time at which the task started running. This * property is present only for tasks that are in the running or completed * state. - * @member {date} [executionInfo.endTime] This property is set only if the + * @property {date} [executionInfo.endTime] This property is set only if the * task is in the Completed state. - * @member {number} [executionInfo.exitCode] This property is set only if the - * task is in the completed state. In general, the exit code for a process - * reflects the specific convention implemented by the application developer - * for that process. If you use the exit code value to make decisions in your - * code, be sure that you know the exit code convention used by the - * application process. However, if the Batch service terminates the task - * (due to timeout, or user termination via the API) you may see an operating - * system-defined exit code. - * @member {object} [executionInfo.containerInfo] This property is set only + * @property {number} [executionInfo.exitCode] This property is set only if + * the task is in the completed state. In general, the exit code for a + * process reflects the specific convention implemented by the application + * developer for that process. If you use the exit code value to make + * decisions in your code, be sure that you know the exit code convention + * used by the application process. However, if the Batch service terminates + * the task (due to timeout, or user termination via the API) you may see an + * operating system-defined exit code. + * @property {object} [executionInfo.containerInfo] This property is set only * if the task runs in a container context. - * @member {string} [executionInfo.containerInfo.containerId] - * @member {string} [executionInfo.containerInfo.state] This is the state of - * the container according to the Docker service. It is equivalent to the + * @property {string} [executionInfo.containerInfo.containerId] + * @property {string} [executionInfo.containerInfo.state] This is the state + * of the container according to the Docker service. It is equivalent to the * status field returned by "docker inspect". - * @member {string} [executionInfo.containerInfo.error] This is the detailed - * error string from the Docker service, if available. It is equivalent to - * the error field returned by "docker inspect". - * @member {object} [executionInfo.failureInfo] This property is set only if - * the task is in the completed state and encountered a failure. - * @member {string} [executionInfo.failureInfo.category] Possible values + * @property {string} [executionInfo.containerInfo.error] This is the + * detailed error string from the Docker service, if available. It is + * equivalent to the error field returned by "docker inspect". + * @property {object} [executionInfo.failureInfo] This property is set only + * if the task is in the completed state and encountered a failure. + * @property {string} [executionInfo.failureInfo.category] Possible values * include: 'userError', 'serverError' - * @member {string} [executionInfo.failureInfo.code] - * @member {string} [executionInfo.failureInfo.message] - * @member {array} [executionInfo.failureInfo.details] - * @member {number} [executionInfo.retryCount] Task application failures + * @property {string} [executionInfo.failureInfo.code] + * @property {string} [executionInfo.failureInfo.message] + * @property {array} [executionInfo.failureInfo.details] + * @property {number} [executionInfo.retryCount] Task application failures * (non-zero exit code) are retried, pre-processing errors (the task could * not be run) and file upload errors are not retried. The Batch service will * retry the task up to the limit specified by the constraints. - * @member {date} [executionInfo.lastRetryTime] This element is present only - * if the task was retried (i.e. retryCount is nonzero). If present, this is - * typically the same as startTime, but may be different if the task has been - * restarted for reasons other than retry; for example, if the compute node - * was rebooted during a retry, then the startTime is updated but the - * lastRetryTime is not. - * @member {number} [executionInfo.requeueCount] When the user removes nodes - * from a pool (by resizing/shrinking the pool) or when the job is being - * disabled, the user can specify that running tasks on the nodes be requeued - * for execution. This count tracks how many times the task has been requeued - * for these reasons. - * @member {date} [executionInfo.lastRequeueTime] This property is set only + * @property {date} [executionInfo.lastRetryTime] This element is present + * only if the task was retried (i.e. retryCount is nonzero). If present, + * this is typically the same as startTime, but may be different if the task + * has been restarted for reasons other than retry; for example, if the + * compute node was rebooted during a retry, then the startTime is updated + * but the lastRetryTime is not. + * @property {number} [executionInfo.requeueCount] When the user removes + * nodes from a pool (by resizing/shrinking the pool) or when the job is + * being disabled, the user can specify that running tasks on the nodes be + * requeued for execution. This count tracks how many times the task has been + * requeued for these reasons. + * @property {date} [executionInfo.lastRequeueTime] This property is set only * if the requeueCount is nonzero. - * @member {string} [executionInfo.result] If the value is 'failed', then the - * details of the failure can be found in the failureInfo property. Possible - * values include: 'success', 'failure' + * @property {string} [executionInfo.result] If the value is 'failed', then + * the details of the failure can be found in the failureInfo property. + * Possible values include: 'success', 'failure' */ constructor() { } diff --git a/lib/services/batch/lib/models/taskListNextOptions.js b/lib/services/batch/lib/models/taskListNextOptions.js index fec6f1ca36..cdfbfed43e 100644 --- a/lib/services/batch/lib/models/taskListNextOptions.js +++ b/lib/services/batch/lib/models/taskListNextOptions.js @@ -17,14 +17,14 @@ class TaskListNextOptions { /** * Create a TaskListNextOptions. - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/taskListOptions.js b/lib/services/batch/lib/models/taskListOptions.js index 1fb9ebe505..823fd09c60 100644 --- a/lib/services/batch/lib/models/taskListOptions.js +++ b/lib/services/batch/lib/models/taskListOptions.js @@ -17,24 +17,25 @@ class TaskListOptions { /** * Create a TaskListOptions. - * @member {string} [filter] An OData $filter clause. For more information on - * constructing this filter, see + * @property {string} [filter] An OData $filter clause. For more information + * on constructing this filter, see * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-tasks. - * @member {string} [select] An OData $select clause. - * @member {string} [expand] An OData $expand clause. - * @member {number} [maxResults] The maximum number of items to return in the - * response. A maximum of 1000 tasks can be returned. Default value: 1000 . - * @member {number} [timeout] The maximum time that the server can spend + * @property {string} [select] An OData $select clause. + * @property {string} [expand] An OData $expand clause. + * @property {number} [maxResults] The maximum number of items to return in + * the response. A maximum of 1000 tasks can be returned. Default value: 1000 + * . + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/taskListSubtasksOptions.js b/lib/services/batch/lib/models/taskListSubtasksOptions.js index f713a5a93c..edc1cf92b8 100644 --- a/lib/services/batch/lib/models/taskListSubtasksOptions.js +++ b/lib/services/batch/lib/models/taskListSubtasksOptions.js @@ -17,18 +17,18 @@ class TaskListSubtasksOptions { /** * Create a TaskListSubtasksOptions. - * @member {string} [select] An OData $select clause. - * @member {number} [timeout] The maximum time that the server can spend + * @property {string} [select] An OData $select clause. + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. */ constructor() { } diff --git a/lib/services/batch/lib/models/taskReactivateOptions.js b/lib/services/batch/lib/models/taskReactivateOptions.js index 036de99c23..6b8a746c80 100644 --- a/lib/services/batch/lib/models/taskReactivateOptions.js +++ b/lib/services/batch/lib/models/taskReactivateOptions.js @@ -17,30 +17,30 @@ class TaskReactivateOptions { /** * Create a TaskReactivateOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. + * @property {string} [ifMatch] An ETag value associated with the version of * the resource known to the client. The operation will be performed only if * the resource's current ETag on the service exactly matches the value * specified by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version + * @property {string} [ifNoneMatch] An ETag value associated with the version * of the resource known to the client. The operation will be performed only * if the resource's current ETag on the service does not match the value * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last + * @property {date} [ifModifiedSince] A timestamp indicating the last + * modified time of the resource known to the client. The operation will be + * performed only if the resource on the service has been modified since the + * specified time. + * @property {date} [ifUnmodifiedSince] A timestamp indicating the last * modified time of the resource known to the client. The operation will be * performed only if the resource on the service has not been modified since * the specified time. diff --git a/lib/services/batch/lib/models/taskSchedulingPolicy.js b/lib/services/batch/lib/models/taskSchedulingPolicy.js index 36c3895eeb..087552a74a 100644 --- a/lib/services/batch/lib/models/taskSchedulingPolicy.js +++ b/lib/services/batch/lib/models/taskSchedulingPolicy.js @@ -17,7 +17,7 @@ class TaskSchedulingPolicy { /** * Create a TaskSchedulingPolicy. - * @member {string} nodeFillType How tasks are distributed across compute + * @property {string} nodeFillType How tasks are distributed across compute * nodes in a pool. Possible values include: 'spread', 'pack' */ constructor() { diff --git a/lib/services/batch/lib/models/taskStatistics.js b/lib/services/batch/lib/models/taskStatistics.js index 32e9c4292f..aa16cb29c5 100644 --- a/lib/services/batch/lib/models/taskStatistics.js +++ b/lib/services/batch/lib/models/taskStatistics.js @@ -17,30 +17,31 @@ class TaskStatistics { /** * Create a TaskStatistics. - * @member {string} url The URL of the statistics. - * @member {date} startTime The start time of the time range covered by the + * @property {string} url The URL of the statistics. + * @property {date} startTime The start time of the time range covered by the * statistics. - * @member {date} lastUpdateTime The time at which the statistics were last + * @property {date} lastUpdateTime The time at which the statistics were last * updated. All statistics are limited to the range between startTime and * lastUpdateTime. - * @member {moment.duration} userCPUTime The total user mode CPU time (summed - * across all cores and all compute nodes) consumed by the task. - * @member {moment.duration} kernelCPUTime The total kernel mode CPU time + * @property {moment.duration} userCPUTime The total user mode CPU time * (summed across all cores and all compute nodes) consumed by the task. - * @member {moment.duration} wallClockTime The total wall clock time of the + * @property {moment.duration} kernelCPUTime The total kernel mode CPU time + * (summed across all cores and all compute nodes) consumed by the task. + * @property {moment.duration} wallClockTime The total wall clock time of the * task. The wall clock time is the elapsed time from when the task started * running on a compute node to when it finished (or to the last time the * statistics were updated, if the task had not finished by then). If the * task was retried, this includes the wall clock time of all the task * retries. - * @member {number} readIOps The total number of disk read operations made by - * the task. - * @member {number} writeIOps The total number of disk write operations made + * @property {number} readIOps The total number of disk read operations made * by the task. - * @member {number} readIOGiB The total gibibytes read from disk by the task. - * @member {number} writeIOGiB The total gibibytes written to disk by the + * @property {number} writeIOps The total number of disk write operations + * made by the task. + * @property {number} readIOGiB The total gibibytes read from disk by the + * task. + * @property {number} writeIOGiB The total gibibytes written to disk by the * task. - * @member {moment.duration} waitTime The total wait time of the task. The + * @property {moment.duration} waitTime The total wait time of the task. The * wait time for a task is defined as the elapsed time between the creation * of the task and the start of task execution. (If the task is retried due * to failures, the wait time is the time to the most recent task diff --git a/lib/services/batch/lib/models/taskTerminateOptions.js b/lib/services/batch/lib/models/taskTerminateOptions.js index 1ce24cae76..c7bba7d85d 100644 --- a/lib/services/batch/lib/models/taskTerminateOptions.js +++ b/lib/services/batch/lib/models/taskTerminateOptions.js @@ -17,30 +17,30 @@ class TaskTerminateOptions { /** * Create a TaskTerminateOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. + * @property {string} [ifMatch] An ETag value associated with the version of * the resource known to the client. The operation will be performed only if * the resource's current ETag on the service exactly matches the value * specified by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version + * @property {string} [ifNoneMatch] An ETag value associated with the version * of the resource known to the client. The operation will be performed only * if the resource's current ETag on the service does not match the value * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last + * @property {date} [ifModifiedSince] A timestamp indicating the last + * modified time of the resource known to the client. The operation will be + * performed only if the resource on the service has been modified since the + * specified time. + * @property {date} [ifUnmodifiedSince] A timestamp indicating the last * modified time of the resource known to the client. The operation will be * performed only if the resource on the service has not been modified since * the specified time. diff --git a/lib/services/batch/lib/models/taskUpdateOptions.js b/lib/services/batch/lib/models/taskUpdateOptions.js index 02028775f9..da5ee6920c 100644 --- a/lib/services/batch/lib/models/taskUpdateOptions.js +++ b/lib/services/batch/lib/models/taskUpdateOptions.js @@ -17,30 +17,30 @@ class TaskUpdateOptions { /** * Create a TaskUpdateOptions. - * @member {number} [timeout] The maximum time that the server can spend + * @property {number} [timeout] The maximum time that the server can spend * processing the request, in seconds. The default is 30 seconds. Default * value: 30 . - * @member {uuid} [clientRequestId] The caller-generated request identity, in - * the form of a GUID with no decoration such as curly braces, e.g. + * @property {uuid} [clientRequestId] The caller-generated request identity, + * in the form of a GUID with no decoration such as curly braces, e.g. * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * @member {boolean} [returnClientRequestId] Whether the server should return - * the client-request-id in the response. Default value: false . - * @member {date} [ocpDate] The time the request was issued. Client libraries - * typically set this to the current system clock time; set it explicitly if - * you are calling the REST API directly. - * @member {string} [ifMatch] An ETag value associated with the version of + * @property {boolean} [returnClientRequestId] Whether the server should + * return the client-request-id in the response. Default value: false . + * @property {date} [ocpDate] The time the request was issued. Client + * libraries typically set this to the current system clock time; set it + * explicitly if you are calling the REST API directly. + * @property {string} [ifMatch] An ETag value associated with the version of * the resource known to the client. The operation will be performed only if * the resource's current ETag on the service exactly matches the value * specified by the client. - * @member {string} [ifNoneMatch] An ETag value associated with the version + * @property {string} [ifNoneMatch] An ETag value associated with the version * of the resource known to the client. The operation will be performed only * if the resource's current ETag on the service does not match the value * specified by the client. - * @member {date} [ifModifiedSince] A timestamp indicating the last modified - * time of the resource known to the client. The operation will be performed - * only if the resource on the service has been modified since the specified - * time. - * @member {date} [ifUnmodifiedSince] A timestamp indicating the last + * @property {date} [ifModifiedSince] A timestamp indicating the last + * modified time of the resource known to the client. The operation will be + * performed only if the resource on the service has been modified since the + * specified time. + * @property {date} [ifUnmodifiedSince] A timestamp indicating the last * modified time of the resource known to the client. The operation will be * performed only if the resource on the service has not been modified since * the specified time. diff --git a/lib/services/batch/lib/models/taskUpdateParameter.js b/lib/services/batch/lib/models/taskUpdateParameter.js index 5bb607415e..ea9e747fb4 100644 --- a/lib/services/batch/lib/models/taskUpdateParameter.js +++ b/lib/services/batch/lib/models/taskUpdateParameter.js @@ -17,24 +17,23 @@ class TaskUpdateParameter { /** * Create a TaskUpdateParameter. - * @member {object} [constraints] Constraints that apply to this task. If + * @property {object} [constraints] Constraints that apply to this task. If * omitted, the task is given the default constraints. For multi-instance * tasks, updating the retention time applies only to the primary task and * not subtasks. - * @member {moment.duration} [constraints.maxWallClockTime] If this is not + * @property {moment.duration} [constraints.maxWallClockTime] If this is not * specified, there is no time limit on how long the task may run. - * @member {moment.duration} [constraints.retentionTime] The default is - * infinite, i.e. the task directory will be retained until the compute node - * is removed or reimaged. - * @member {number} [constraints.maxTaskRetryCount] Note that this value + * @property {moment.duration} [constraints.retentionTime] The default is 7 + * days, i.e. the task directory will be retained for 7 days unless the + * compute node is removed or the job is deleted. + * @property {number} [constraints.maxTaskRetryCount] Note that this value * specifically controls the number of retries for the task executable due to * a nonzero exit code. The Batch service will try the task once, and may * then retry up to this limit. For example, if the maximum retry count is 3, * Batch tries the task up to 4 times (one initial try and 3 retries). If the * maximum retry count is 0, the Batch service does not retry the task after * the first attempt. If the maximum retry count is -1, the Batch service - * retries the task without limit. Resource files and application packages - * are only downloaded again if the task is retried on a new compute node. + * retries the task without limit. */ constructor() { } diff --git a/lib/services/batch/lib/models/uploadBatchServiceLogsConfiguration.js b/lib/services/batch/lib/models/uploadBatchServiceLogsConfiguration.js index 0aee453a77..f4086b610d 100644 --- a/lib/services/batch/lib/models/uploadBatchServiceLogsConfiguration.js +++ b/lib/services/batch/lib/models/uploadBatchServiceLogsConfiguration.js @@ -18,19 +18,19 @@ class UploadBatchServiceLogsConfiguration { /** * Create a UploadBatchServiceLogsConfiguration. - * @member {string} containerUrl The URL of the container within Azure Blob + * @property {string} containerUrl The URL of the container within Azure Blob * Storage to which to upload the Batch Service log file(s). The URL must * include a Shared Access Signature (SAS) granting write permissions to the * container. The SAS duration must allow enough time for the upload to * finish. The start time for SAS is optional and recommended to not be * specified. - * @member {date} startTime The start of the time range from which to upload - * Batch Service log file(s). Any log file containing a log message in the - * time range will be uploaded. This means that the operation might retrieve - * more logs than have been requested since the entire log file is always - * uploaded, but the operation should not retrieve fewer logs than have been - * requested. - * @member {date} [endTime] The end of the time range from which to upload + * @property {date} startTime The start of the time range from which to + * upload Batch Service log file(s). Any log file containing a log message in + * the time range will be uploaded. This means that the operation might + * retrieve more logs than have been requested since the entire log file is + * always uploaded, but the operation should not retrieve fewer logs than + * have been requested. + * @property {date} [endTime] The end of the time range from which to upload * Batch Service log file(s). Any log file containing a log message in the * time range will be uploaded. This means that the operation might retrieve * more logs than have been requested since the entire log file is always diff --git a/lib/services/batch/lib/models/uploadBatchServiceLogsResult.js b/lib/services/batch/lib/models/uploadBatchServiceLogsResult.js index b12897b792..557a0c0042 100644 --- a/lib/services/batch/lib/models/uploadBatchServiceLogsResult.js +++ b/lib/services/batch/lib/models/uploadBatchServiceLogsResult.js @@ -18,13 +18,13 @@ class UploadBatchServiceLogsResult { /** * Create a UploadBatchServiceLogsResult. - * @member {string} virtualDirectoryName The virtual directory within Azure + * @property {string} virtualDirectoryName The virtual directory within Azure * Blob Storage container to which the Batch Service log file(s) will be * uploaded. The virtual directory name is part of the blob name for each log * file uploaded, and it is built based poolId, nodeId and a unique * identifier. - * @member {number} numberOfFilesUploaded The number of log files which will - * be uploaded. + * @property {number} numberOfFilesUploaded The number of log files which + * will be uploaded. */ constructor() { } diff --git a/lib/services/batch/lib/models/usageStatistics.js b/lib/services/batch/lib/models/usageStatistics.js index 97d430bfe2..273a26c43f 100644 --- a/lib/services/batch/lib/models/usageStatistics.js +++ b/lib/services/batch/lib/models/usageStatistics.js @@ -17,13 +17,13 @@ class UsageStatistics { /** * Create a UsageStatistics. - * @member {date} startTime The start time of the time range covered by the + * @property {date} startTime The start time of the time range covered by the * statistics. - * @member {date} lastUpdateTime The time at which the statistics were last + * @property {date} lastUpdateTime The time at which the statistics were last * updated. All statistics are limited to the range between startTime and * lastUpdateTime. - * @member {moment.duration} dedicatedCoreTime The aggregated wall-clock time - * of the dedicated compute node cores being part of the pool. + * @property {moment.duration} dedicatedCoreTime The aggregated wall-clock + * time of the dedicated compute node cores being part of the pool. */ constructor() { } diff --git a/lib/services/batch/lib/models/userAccount.js b/lib/services/batch/lib/models/userAccount.js index 9faa59d26f..c952d2e283 100644 --- a/lib/services/batch/lib/models/userAccount.js +++ b/lib/services/batch/lib/models/userAccount.js @@ -18,22 +18,22 @@ class UserAccount { /** * Create a UserAccount. - * @member {string} name The name of the user account. - * @member {string} password The password for the user account. - * @member {string} [elevationLevel] The elevation level of the user account. - * The default value is nonAdmin. Possible values include: 'nonAdmin', - * 'admin' - * @member {object} [linuxUserConfiguration] The Linux-specific user + * @property {string} name The name of the user account. + * @property {string} password The password for the user account. + * @property {string} [elevationLevel] The elevation level of the user + * account. The default value is nonAdmin. Possible values include: + * 'nonAdmin', 'admin' + * @property {object} [linuxUserConfiguration] The Linux-specific user * configuration for the user account. This property is ignored if specified * on a Windows pool. If not specified, the user is created with the default * options. - * @member {number} [linuxUserConfiguration.uid] The uid and gid properties + * @property {number} [linuxUserConfiguration.uid] The uid and gid properties * must be specified together or not at all. If not specified the underlying * operating system picks the uid. - * @member {number} [linuxUserConfiguration.gid] The uid and gid properties + * @property {number} [linuxUserConfiguration.gid] The uid and gid properties * must be specified together or not at all. If not specified the underlying * operating system picks the gid. - * @member {string} [linuxUserConfiguration.sshPrivateKey] The private key + * @property {string} [linuxUserConfiguration.sshPrivateKey] The private key * must not be password protected. The private key is used to automatically * configure asymmetric-key based authentication for SSH between nodes in a * Linux pool when the pool's enableInterNodeCommunication property is true @@ -41,6 +41,14 @@ class UserAccount { * placing the key pair into the user's .ssh directory. If not specified, * password-less SSH is not configured between nodes (no modification of the * user's .ssh directory is done). + * @property {object} [windowsUserConfiguration] The Windows-specific user + * configuration for the user account. This property can only be specified if + * the user is on a Windows pool. If not specified and on a Windows pool, the + * user is created with the default options. + * @property {string} [windowsUserConfiguration.loginMode] The default value + * for VirtualMachineConfiguration pools is batch and for + * CloudServiceConfiguration pools is interactive. Possible values include: + * 'batch', 'interactive' */ constructor() { } @@ -88,6 +96,14 @@ class UserAccount { name: 'Composite', className: 'LinuxUserConfiguration' } + }, + windowsUserConfiguration: { + required: false, + serializedName: 'windowsUserConfiguration', + type: { + name: 'Composite', + className: 'WindowsUserConfiguration' + } } } } diff --git a/lib/services/batch/lib/models/userIdentity.js b/lib/services/batch/lib/models/userIdentity.js index 2dde166dd2..d3037d4617 100644 --- a/lib/services/batch/lib/models/userIdentity.js +++ b/lib/services/batch/lib/models/userIdentity.js @@ -13,25 +13,22 @@ /** * @summary The definition of the user identity under which the task is run. * - * Specify either the userName or autoUser property, but not both. On - * CloudServiceConfiguration pools, this user is logged in with the INTERACTIVE - * flag. On Windows VirtualMachineConfiguration pools, this user is logged in - * with the BATCH flag. + * Specify either the userName or autoUser property, but not both. * */ class UserIdentity { /** * Create a UserIdentity. - * @member {string} [userName] The name of the user identity under which the - * task is run. The userName and autoUser properties are mutually exclusive; - * you must specify one but not both. - * @member {object} [autoUser] The auto user under which the task is run. The - * userName and autoUser properties are mutually exclusive; you must specify - * one but not both. - * @member {string} [autoUser.scope] The default value is task. Possible + * @property {string} [userName] The name of the user identity under which + * the task is run. The userName and autoUser properties are mutually + * exclusive; you must specify one but not both. + * @property {object} [autoUser] The auto user under which the task is run. + * The userName and autoUser properties are mutually exclusive; you must + * specify one but not both. + * @property {string} [autoUser.scope] The default value is task. Possible * values include: 'task', 'pool' - * @member {string} [autoUser.elevationLevel] The default value is nonAdmin. - * Possible values include: 'nonAdmin', 'admin' + * @property {string} [autoUser.elevationLevel] The default value is + * nonAdmin. Possible values include: 'nonAdmin', 'admin' */ constructor() { } diff --git a/lib/services/batch/lib/models/virtualMachineConfiguration.js b/lib/services/batch/lib/models/virtualMachineConfiguration.js index 8f6f690ab0..07b120072b 100644 --- a/lib/services/batch/lib/models/virtualMachineConfiguration.js +++ b/lib/services/batch/lib/models/virtualMachineConfiguration.js @@ -18,30 +18,23 @@ class VirtualMachineConfiguration { /** * Create a VirtualMachineConfiguration. - * @member {object} imageReference A reference to the Azure Virtual Machines - * Marketplace image or the custom Virtual Machine image to use. - * @member {string} [imageReference.publisher] For example, Canonical or + * @property {object} imageReference A reference to the Azure Virtual + * Machines Marketplace image or the custom Virtual Machine image to use. + * @property {string} [imageReference.publisher] For example, Canonical or * MicrosoftWindowsServer. - * @member {string} [imageReference.offer] For example, UbuntuServer or + * @property {string} [imageReference.offer] For example, UbuntuServer or * WindowsServer. - * @member {string} [imageReference.sku] For example, 14.04.0-LTS or + * @property {string} [imageReference.sku] For example, 14.04.0-LTS or * 2012-R2-Datacenter. - * @member {string} [imageReference.version] A value of 'latest' can be + * @property {string} [imageReference.version] A value of 'latest' can be * specified to select the latest version of an image. If omitted, the * default is 'latest'. - * @member {string} [imageReference.virtualMachineImageId] This property is + * @property {string} [imageReference.virtualMachineImageId] This property is * mutually exclusive with other ImageReference properties. The virtual * machine image must be in the same region and subscription as the Azure - * Batch account. For information about the firewall settings for the Batch - * node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * @member {object} [osDisk] Settings for the operating system disk of the - * Virtual Machine. - * @member {string} [osDisk.caching] The default value for caching is - * readwrite. For information about the caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' - * @member {string} nodeAgentSKUId The SKU of the Batch node agent to be + * Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. + * @property {string} nodeAgentSKUId The SKU of the Batch node agent to be * provisioned on compute nodes in the pool. The Batch node agent is a * program that runs on each node in the pool, and provides the * command-and-control interface between the node and the Batch service. @@ -50,12 +43,12 @@ class VirtualMachineConfiguration { * matches the selected image reference. To get the list of supported node * agent SKUs along with their list of verified image references, see the * 'List supported node agent SKUs' operation. - * @member {object} [windowsConfiguration] Windows operating system settings - * on the virtual machine. This property must not be specified if the - * imageReference or osDisk property specifies a Linux OS image. - * @member {boolean} [windowsConfiguration.enableAutomaticUpdates] If + * @property {object} [windowsConfiguration] Windows operating system + * settings on the virtual machine. This property must not be specified if + * the imageReference property specifies a Linux OS image. + * @property {boolean} [windowsConfiguration.enableAutomaticUpdates] If * omitted, the default value is true. - * @member {array} [dataDisks] The configuration for data disks attached to + * @property {array} [dataDisks] The configuration for data disks attached to * the comptue nodes in the pool. This property must be specified if the * compute nodes in the pool need to have empty data disks attached to them. * This cannot be updated. Each node gets its own disk (the disk is not a @@ -66,26 +59,26 @@ class VirtualMachineConfiguration { * https://docs.microsoft.com/en-us/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux * and * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. - * @member {string} [licenseType] The type of on-premises license to be used - * when deploying the operating system. This only applies to images that + * @property {string} [licenseType] The type of on-premises license to be + * used when deploying the operating system. This only applies to images that * contain the Windows operating system, and should only be used when you * hold valid on-premises licenses for the nodes which will be deployed. If * omitted, no on-premises licensing discount is applied. Values are: * * Windows_Server - The on-premises license is for Windows Server. * Windows_Client - The on-premises license is for Windows Client. - * @member {object} [containerConfiguration] The container configuration for - * the pool. If specified, setup is performed on each node in the pool to + * @property {object} [containerConfiguration] The container configuration + * for the pool. If specified, setup is performed on each node in the pool to * allow tasks to run in containers. All regular tasks and job manager tasks * run on this pool must specify the containerSettings property, and all * other tasks may specify it. - * @member {array} [containerConfiguration.containerImageNames] This is the + * @property {array} [containerConfiguration.containerImageNames] This is the * full image reference, as would be specified to "docker pull". An image * will be sourced from the default Docker registry unless the image is fully * qualified with an alternative registry. - * @member {array} [containerConfiguration.containerRegistries] If any images - * must be downloaded from a private registry which requires credentials, - * then those credentials must be provided here. + * @property {array} [containerConfiguration.containerRegistries] If any + * images must be downloaded from a private registry which requires + * credentials, then those credentials must be provided here. */ constructor() { } @@ -112,14 +105,6 @@ class VirtualMachineConfiguration { className: 'ImageReference' } }, - osDisk: { - required: false, - serializedName: 'osDisk', - type: { - name: 'Composite', - className: 'OSDisk' - } - }, nodeAgentSKUId: { required: true, serializedName: 'nodeAgentSKUId', diff --git a/lib/services/batch/lib/models/windowsConfiguration.js b/lib/services/batch/lib/models/windowsConfiguration.js index de0f02fcf1..f2b8a975e9 100644 --- a/lib/services/batch/lib/models/windowsConfiguration.js +++ b/lib/services/batch/lib/models/windowsConfiguration.js @@ -17,7 +17,7 @@ class WindowsConfiguration { /** * Create a WindowsConfiguration. - * @member {boolean} [enableAutomaticUpdates] Whether automatic updates are + * @property {boolean} [enableAutomaticUpdates] Whether automatic updates are * enabled on the virtual machine. If omitted, the default value is true. */ constructor() { diff --git a/lib/services/batch/lib/models/windowsUserConfiguration.js b/lib/services/batch/lib/models/windowsUserConfiguration.js new file mode 100644 index 0000000000..0d9b328acc --- /dev/null +++ b/lib/services/batch/lib/models/windowsUserConfiguration.js @@ -0,0 +1,56 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * @summary Properties used to create a user account on a Windows node. + * + */ +class WindowsUserConfiguration { + /** + * Create a WindowsUserConfiguration. + * @property {string} [loginMode] The login mode for the user. The default + * value for VirtualMachineConfiguration pools is batch and for + * CloudServiceConfiguration pools is interactive. Possible values include: + * 'batch', 'interactive' + */ + constructor() { + } + + /** + * Defines the metadata of WindowsUserConfiguration + * + * @returns {object} metadata of WindowsUserConfiguration + * + */ + mapper() { + return { + required: false, + serializedName: 'WindowsUserConfiguration', + type: { + name: 'Composite', + className: 'WindowsUserConfiguration', + modelProperties: { + loginMode: { + required: false, + serializedName: 'loginMode', + type: { + name: 'Enum', + allowedValues: [ 'batch', 'interactive' ] + } + } + } + } + }; + } +} + +module.exports = WindowsUserConfiguration; diff --git a/lib/services/batch/lib/operations/account.js b/lib/services/batch/lib/operations/account.js index ca60e98f1d..041aef990b 100644 --- a/lib/services/batch/lib/operations/account.js +++ b/lib/services/batch/lib/operations/account.js @@ -77,6 +77,9 @@ function _listNodeAgentSkus(options, callback) { let accountListNodeAgentSkusOptions = (options && options.accountListNodeAgentSkusOptions !== undefined) ? options.accountListNodeAgentSkusOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); } @@ -143,6 +146,7 @@ function _listNodeAgentSkus(options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'nodeagentskus'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (filter !== null && filter !== undefined) { @@ -307,6 +311,9 @@ function _listPoolNodeCounts(options, callback) { let accountListPoolNodeCountsOptions = (options && options.accountListPoolNodeCountsOptions !== undefined) ? options.accountListPoolNodeCountsOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); } @@ -373,6 +380,7 @@ function _listPoolNodeCounts(options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'nodecounts'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (filter !== null && filter !== undefined) { diff --git a/lib/services/batch/lib/operations/application.js b/lib/services/batch/lib/operations/application.js index 678fbc8b6a..cc2d5e4115 100644 --- a/lib/services/batch/lib/operations/application.js +++ b/lib/services/batch/lib/operations/application.js @@ -76,6 +76,9 @@ function _list(options, callback) { let applicationListOptions = (options && options.applicationListOptions !== undefined) ? options.applicationListOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); } @@ -134,6 +137,7 @@ function _list(options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'applications'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (maxResults !== null && maxResults !== undefined) { @@ -293,6 +297,9 @@ function _get(applicationId, options, callback) { let applicationGetOptions = (options && options.applicationGetOptions !== undefined) ? options.applicationGetOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (applicationId === null || applicationId === undefined || typeof applicationId.valueOf() !== 'string') { throw new Error('applicationId cannot be null or undefined and it must be of type string.'); } @@ -346,6 +353,7 @@ function _get(applicationId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'applications/{applicationId}'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{applicationId}', encodeURIComponent(applicationId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); diff --git a/lib/services/batch/lib/operations/certificateOperations.js b/lib/services/batch/lib/operations/certificateOperations.js index 2ac2c3c92f..4b5d9ade56 100644 --- a/lib/services/batch/lib/operations/certificateOperations.js +++ b/lib/services/batch/lib/operations/certificateOperations.js @@ -84,6 +84,9 @@ function _add(certificate, options, callback) { let certificateAddOptions = (options && options.certificateAddOptions !== undefined) ? options.certificateAddOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (certificate === null || certificate === undefined) { throw new Error('certificate cannot be null or undefined.'); } @@ -137,6 +140,7 @@ function _add(certificate, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'certificates'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (timeout !== null && timeout !== undefined) { @@ -294,6 +298,9 @@ function _list(options, callback) { let certificateListOptions = (options && options.certificateListOptions !== undefined) ? options.certificateListOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); } @@ -368,6 +375,7 @@ function _list(options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'certificates'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (filter !== null && filter !== undefined) { @@ -540,6 +548,9 @@ function _cancelDeletion(thumbprintAlgorithm, thumbprint, options, callback) { let certificateCancelDeletionOptions = (options && options.certificateCancelDeletionOptions !== undefined) ? options.certificateCancelDeletionOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (thumbprintAlgorithm === null || thumbprintAlgorithm === undefined || typeof thumbprintAlgorithm.valueOf() !== 'string') { throw new Error('thumbprintAlgorithm cannot be null or undefined and it must be of type string.'); } @@ -596,6 +607,7 @@ function _cancelDeletion(thumbprintAlgorithm, thumbprint, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'certificates(thumbprintAlgorithm={thumbprintAlgorithm},thumbprint={thumbprint})/canceldelete'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{thumbprintAlgorithm}', encodeURIComponent(thumbprintAlgorithm)); requestUrl = requestUrl.replace('{thumbprint}', encodeURIComponent(thumbprint)); let queryParameters = []; @@ -746,6 +758,9 @@ function _deleteMethod(thumbprintAlgorithm, thumbprint, options, callback) { let certificateDeleteMethodOptions = (options && options.certificateDeleteMethodOptions !== undefined) ? options.certificateDeleteMethodOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (thumbprintAlgorithm === null || thumbprintAlgorithm === undefined || typeof thumbprintAlgorithm.valueOf() !== 'string') { throw new Error('thumbprintAlgorithm cannot be null or undefined and it must be of type string.'); } @@ -802,6 +817,7 @@ function _deleteMethod(thumbprintAlgorithm, thumbprint, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'certificates(thumbprintAlgorithm={thumbprintAlgorithm},thumbprint={thumbprint})'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{thumbprintAlgorithm}', encodeURIComponent(thumbprintAlgorithm)); requestUrl = requestUrl.replace('{thumbprint}', encodeURIComponent(thumbprint)); let queryParameters = []; @@ -943,6 +959,9 @@ function _get(thumbprintAlgorithm, thumbprint, options, callback) { let certificateGetOptions = (options && options.certificateGetOptions !== undefined) ? options.certificateGetOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (thumbprintAlgorithm === null || thumbprintAlgorithm === undefined || typeof thumbprintAlgorithm.valueOf() !== 'string') { throw new Error('thumbprintAlgorithm cannot be null or undefined and it must be of type string.'); } @@ -1007,6 +1026,7 @@ function _get(thumbprintAlgorithm, thumbprint, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'certificates(thumbprintAlgorithm={thumbprintAlgorithm},thumbprint={thumbprint})'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{thumbprintAlgorithm}', encodeURIComponent(thumbprintAlgorithm)); requestUrl = requestUrl.replace('{thumbprint}', encodeURIComponent(thumbprint)); let queryParameters = []; diff --git a/lib/services/batch/lib/operations/computeNodeOperations.js b/lib/services/batch/lib/operations/computeNodeOperations.js index 843c44825f..cee9255ecb 100644 --- a/lib/services/batch/lib/operations/computeNodeOperations.js +++ b/lib/services/batch/lib/operations/computeNodeOperations.js @@ -98,6 +98,9 @@ function _addUser(poolId, nodeId, user, options, callback) { let computeNodeAddUserOptions = (options && options.computeNodeAddUserOptions !== undefined) ? options.computeNodeAddUserOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (poolId === null || poolId === undefined || typeof poolId.valueOf() !== 'string') { throw new Error('poolId cannot be null or undefined and it must be of type string.'); } @@ -157,6 +160,7 @@ function _addUser(poolId, nodeId, user, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'pools/{poolId}/nodes/{nodeId}/users'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{poolId}', encodeURIComponent(poolId)); requestUrl = requestUrl.replace('{nodeId}', encodeURIComponent(nodeId)); let queryParameters = []; @@ -315,6 +319,9 @@ function _deleteUser(poolId, nodeId, userName, options, callback) { let computeNodeDeleteUserOptions = (options && options.computeNodeDeleteUserOptions !== undefined) ? options.computeNodeDeleteUserOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (poolId === null || poolId === undefined || typeof poolId.valueOf() !== 'string') { throw new Error('poolId cannot be null or undefined and it must be of type string.'); } @@ -374,6 +381,7 @@ function _deleteUser(poolId, nodeId, userName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'pools/{poolId}/nodes/{nodeId}/users/{userName}'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{poolId}', encodeURIComponent(poolId)); requestUrl = requestUrl.replace('{nodeId}', encodeURIComponent(nodeId)); requestUrl = requestUrl.replace('{userName}', encodeURIComponent(userName)); @@ -460,7 +468,7 @@ function _deleteUser(poolId, nodeId, userName, options, callback) { * @summary Updates the password and expiration time of a user account on the * specified compute node. * - * This operation replaces of all the updateable properties of the account. For + * This operation replaces of all the updatable properties of the account. For * example, if the expiryTime element is not specified, the current value is * replaced with the default value, not left unmodified. You can update a user * account on a node only when it is in the idle or running state. @@ -543,6 +551,9 @@ function _updateUser(poolId, nodeId, userName, nodeUpdateUserParameter, options, let computeNodeUpdateUserOptions = (options && options.computeNodeUpdateUserOptions !== undefined) ? options.computeNodeUpdateUserOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (poolId === null || poolId === undefined || typeof poolId.valueOf() !== 'string') { throw new Error('poolId cannot be null or undefined and it must be of type string.'); } @@ -605,6 +616,7 @@ function _updateUser(poolId, nodeId, userName, nodeUpdateUserParameter, options, // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'pools/{poolId}/nodes/{nodeId}/users/{userName}'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{poolId}', encodeURIComponent(poolId)); requestUrl = requestUrl.replace('{nodeId}', encodeURIComponent(nodeId)); requestUrl = requestUrl.replace('{userName}', encodeURIComponent(userName)); @@ -761,6 +773,9 @@ function _get(poolId, nodeId, options, callback) { let computeNodeGetOptions = (options && options.computeNodeGetOptions !== undefined) ? options.computeNodeGetOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (poolId === null || poolId === undefined || typeof poolId.valueOf() !== 'string') { throw new Error('poolId cannot be null or undefined and it must be of type string.'); } @@ -825,6 +840,7 @@ function _get(poolId, nodeId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'pools/{poolId}/nodes/{nodeId}'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{poolId}', encodeURIComponent(poolId)); requestUrl = requestUrl.replace('{nodeId}', encodeURIComponent(nodeId)); let queryParameters = []; @@ -990,6 +1006,9 @@ function _reboot(poolId, nodeId, options, callback) { let computeNodeRebootOptions = (options && options.computeNodeRebootOptions !== undefined) ? options.computeNodeRebootOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (poolId === null || poolId === undefined || typeof poolId.valueOf() !== 'string') { throw new Error('poolId cannot be null or undefined and it must be of type string.'); } @@ -1058,6 +1077,7 @@ function _reboot(poolId, nodeId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'pools/{poolId}/nodes/{nodeId}/reboot'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{poolId}', encodeURIComponent(poolId)); requestUrl = requestUrl.replace('{nodeId}', encodeURIComponent(nodeId)); let queryParameters = []; @@ -1219,6 +1239,9 @@ function _reimage(poolId, nodeId, options, callback) { let computeNodeReimageOptions = (options && options.computeNodeReimageOptions !== undefined) ? options.computeNodeReimageOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (poolId === null || poolId === undefined || typeof poolId.valueOf() !== 'string') { throw new Error('poolId cannot be null or undefined and it must be of type string.'); } @@ -1287,6 +1310,7 @@ function _reimage(poolId, nodeId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'pools/{poolId}/nodes/{nodeId}/reimage'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{poolId}', encodeURIComponent(poolId)); requestUrl = requestUrl.replace('{nodeId}', encodeURIComponent(nodeId)); let queryParameters = []; @@ -1449,6 +1473,9 @@ function _disableScheduling(poolId, nodeId, options, callback) { let computeNodeDisableSchedulingOptions = (options && options.computeNodeDisableSchedulingOptions !== undefined) ? options.computeNodeDisableSchedulingOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (poolId === null || poolId === undefined || typeof poolId.valueOf() !== 'string') { throw new Error('poolId cannot be null or undefined and it must be of type string.'); } @@ -1517,6 +1544,7 @@ function _disableScheduling(poolId, nodeId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'pools/{poolId}/nodes/{nodeId}/disablescheduling'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{poolId}', encodeURIComponent(poolId)); requestUrl = requestUrl.replace('{nodeId}', encodeURIComponent(nodeId)); let queryParameters = []; @@ -1673,6 +1701,9 @@ function _enableScheduling(poolId, nodeId, options, callback) { let computeNodeEnableSchedulingOptions = (options && options.computeNodeEnableSchedulingOptions !== undefined) ? options.computeNodeEnableSchedulingOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (poolId === null || poolId === undefined || typeof poolId.valueOf() !== 'string') { throw new Error('poolId cannot be null or undefined and it must be of type string.'); } @@ -1729,6 +1760,7 @@ function _enableScheduling(poolId, nodeId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'pools/{poolId}/nodes/{nodeId}/enablescheduling'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{poolId}', encodeURIComponent(poolId)); requestUrl = requestUrl.replace('{nodeId}', encodeURIComponent(nodeId)); let queryParameters = []; @@ -1876,6 +1908,9 @@ function _getRemoteLoginSettings(poolId, nodeId, options, callback) { let computeNodeGetRemoteLoginSettingsOptions = (options && options.computeNodeGetRemoteLoginSettingsOptions !== undefined) ? options.computeNodeGetRemoteLoginSettingsOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (poolId === null || poolId === undefined || typeof poolId.valueOf() !== 'string') { throw new Error('poolId cannot be null or undefined and it must be of type string.'); } @@ -1932,6 +1967,7 @@ function _getRemoteLoginSettings(poolId, nodeId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'pools/{poolId}/nodes/{nodeId}/remoteloginsettings'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{poolId}', encodeURIComponent(poolId)); requestUrl = requestUrl.replace('{nodeId}', encodeURIComponent(nodeId)); let queryParameters = []; @@ -2094,6 +2130,9 @@ function _getRemoteDesktop(poolId, nodeId, options, callback) { let computeNodeGetRemoteDesktopOptions = (options && options.computeNodeGetRemoteDesktopOptions !== undefined) ? options.computeNodeGetRemoteDesktopOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (poolId === null || poolId === undefined || typeof poolId.valueOf() !== 'string') { throw new Error('poolId cannot be null or undefined and it must be of type string.'); } @@ -2150,6 +2189,7 @@ function _getRemoteDesktop(poolId, nodeId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'pools/{poolId}/nodes/{nodeId}/rdp'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{poolId}', encodeURIComponent(poolId)); requestUrl = requestUrl.replace('{nodeId}', encodeURIComponent(nodeId)); let queryParameters = []; @@ -2324,6 +2364,9 @@ function _uploadBatchServiceLogs(poolId, nodeId, uploadBatchServiceLogsConfigura let computeNodeUploadBatchServiceLogsOptions = (options && options.computeNodeUploadBatchServiceLogsOptions !== undefined) ? options.computeNodeUploadBatchServiceLogsOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (poolId === null || poolId === undefined || typeof poolId.valueOf() !== 'string') { throw new Error('poolId cannot be null or undefined and it must be of type string.'); } @@ -2383,6 +2426,7 @@ function _uploadBatchServiceLogs(poolId, nodeId, uploadBatchServiceLogsConfigura // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'pools/{poolId}/nodes/{nodeId}/uploadbatchservicelogs'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{poolId}', encodeURIComponent(poolId)); requestUrl = requestUrl.replace('{nodeId}', encodeURIComponent(nodeId)); let queryParameters = []; @@ -2560,6 +2604,9 @@ function _list(poolId, options, callback) { let computeNodeListOptions = (options && options.computeNodeListOptions !== undefined) ? options.computeNodeListOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (poolId === null || poolId === undefined || typeof poolId.valueOf() !== 'string') { throw new Error('poolId cannot be null or undefined and it must be of type string.'); } @@ -2637,6 +2684,7 @@ function _list(poolId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'pools/{poolId}/nodes'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{poolId}', encodeURIComponent(poolId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -3268,7 +3316,7 @@ class ComputeNodeOperations { * @summary Updates the password and expiration time of a user account on the * specified compute node. * - * This operation replaces of all the updateable properties of the account. For + * This operation replaces of all the updatable properties of the account. For * example, if the expiryTime element is not specified, the current value is * replaced with the default value, not left unmodified. You can update a user * account on a node only when it is in the idle or running state. @@ -3350,7 +3398,7 @@ class ComputeNodeOperations { * @summary Updates the password and expiration time of a user account on the * specified compute node. * - * This operation replaces of all the updateable properties of the account. For + * This operation replaces of all the updatable properties of the account. For * example, if the expiryTime element is not specified, the current value is * replaced with the default value, not left unmodified. You can update a user * account on a node only when it is in the idle or running state. diff --git a/lib/services/batch/lib/operations/file.js b/lib/services/batch/lib/operations/file.js index 00bd3cb8bf..55218383bb 100644 --- a/lib/services/batch/lib/operations/file.js +++ b/lib/services/batch/lib/operations/file.js @@ -81,6 +81,9 @@ function _deleteFromTask(jobId, taskId, filePath, options, callback) { let fileDeleteFromTaskOptions = (options && options.fileDeleteFromTaskOptions !== undefined) ? options.fileDeleteFromTaskOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (jobId === null || jobId === undefined || typeof jobId.valueOf() !== 'string') { throw new Error('jobId cannot be null or undefined and it must be of type string.'); } @@ -143,6 +146,7 @@ function _deleteFromTask(jobId, taskId, filePath, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'jobs/{jobId}/tasks/{taskId}/files/{filePath}'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{jobId}', encodeURIComponent(jobId)); requestUrl = requestUrl.replace('{taskId}', encodeURIComponent(taskId)); requestUrl = requestUrl.replace('{filePath}', encodeURIComponent(filePath)); @@ -300,6 +304,9 @@ function _getFromTask(jobId, taskId, filePath, options, callback) { let fileGetFromTaskOptions = (options && options.fileGetFromTaskOptions !== undefined) ? options.fileGetFromTaskOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (jobId === null || jobId === undefined || typeof jobId.valueOf() !== 'string') { throw new Error('jobId cannot be null or undefined and it must be of type string.'); } @@ -385,6 +392,7 @@ function _getFromTask(jobId, taskId, filePath, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'jobs/{jobId}/tasks/{taskId}/files/{filePath}'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{jobId}', encodeURIComponent(jobId)); requestUrl = requestUrl.replace('{taskId}', encodeURIComponent(taskId)); requestUrl = requestUrl.replace('{filePath}', encodeURIComponent(filePath)); @@ -548,6 +556,9 @@ function _getPropertiesFromTask(jobId, taskId, filePath, options, callback) { let fileGetPropertiesFromTaskOptions = (options && options.fileGetPropertiesFromTaskOptions !== undefined) ? options.fileGetPropertiesFromTaskOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (jobId === null || jobId === undefined || typeof jobId.valueOf() !== 'string') { throw new Error('jobId cannot be null or undefined and it must be of type string.'); } @@ -625,6 +636,7 @@ function _getPropertiesFromTask(jobId, taskId, filePath, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'jobs/{jobId}/tasks/{taskId}/files/{filePath}'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{jobId}', encodeURIComponent(jobId)); requestUrl = requestUrl.replace('{taskId}', encodeURIComponent(taskId)); requestUrl = requestUrl.replace('{filePath}', encodeURIComponent(filePath)); @@ -781,6 +793,9 @@ function _deleteFromComputeNode(poolId, nodeId, filePath, options, callback) { let fileDeleteFromComputeNodeOptions = (options && options.fileDeleteFromComputeNodeOptions !== undefined) ? options.fileDeleteFromComputeNodeOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (poolId === null || poolId === undefined || typeof poolId.valueOf() !== 'string') { throw new Error('poolId cannot be null or undefined and it must be of type string.'); } @@ -843,6 +858,7 @@ function _deleteFromComputeNode(poolId, nodeId, filePath, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'pools/{poolId}/nodes/{nodeId}/files/{filePath}'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{poolId}', encodeURIComponent(poolId)); requestUrl = requestUrl.replace('{nodeId}', encodeURIComponent(nodeId)); requestUrl = requestUrl.replace('{filePath}', encodeURIComponent(filePath)); @@ -1002,6 +1018,9 @@ function _getFromComputeNode(poolId, nodeId, filePath, options, callback) { let fileGetFromComputeNodeOptions = (options && options.fileGetFromComputeNodeOptions !== undefined) ? options.fileGetFromComputeNodeOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (poolId === null || poolId === undefined || typeof poolId.valueOf() !== 'string') { throw new Error('poolId cannot be null or undefined and it must be of type string.'); } @@ -1087,6 +1106,7 @@ function _getFromComputeNode(poolId, nodeId, filePath, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'pools/{poolId}/nodes/{nodeId}/files/{filePath}'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{poolId}', encodeURIComponent(poolId)); requestUrl = requestUrl.replace('{nodeId}', encodeURIComponent(nodeId)); requestUrl = requestUrl.replace('{filePath}', encodeURIComponent(filePath)); @@ -1252,6 +1272,9 @@ function _getPropertiesFromComputeNode(poolId, nodeId, filePath, options, callba let fileGetPropertiesFromComputeNodeOptions = (options && options.fileGetPropertiesFromComputeNodeOptions !== undefined) ? options.fileGetPropertiesFromComputeNodeOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (poolId === null || poolId === undefined || typeof poolId.valueOf() !== 'string') { throw new Error('poolId cannot be null or undefined and it must be of type string.'); } @@ -1329,6 +1352,7 @@ function _getPropertiesFromComputeNode(poolId, nodeId, filePath, options, callba // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'pools/{poolId}/nodes/{nodeId}/files/{filePath}'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{poolId}', encodeURIComponent(poolId)); requestUrl = requestUrl.replace('{nodeId}', encodeURIComponent(nodeId)); requestUrl = requestUrl.replace('{filePath}', encodeURIComponent(filePath)); @@ -1486,6 +1510,9 @@ function _listFromTask(jobId, taskId, options, callback) { let fileListFromTaskOptions = (options && options.fileListFromTaskOptions !== undefined) ? options.fileListFromTaskOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (jobId === null || jobId === undefined || typeof jobId.valueOf() !== 'string') { throw new Error('jobId cannot be null or undefined and it must be of type string.'); } @@ -1561,6 +1588,7 @@ function _listFromTask(jobId, taskId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'jobs/{jobId}/tasks/{taskId}/files'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{jobId}', encodeURIComponent(jobId)); requestUrl = requestUrl.replace('{taskId}', encodeURIComponent(taskId)); let queryParameters = []; @@ -1740,6 +1768,9 @@ function _listFromComputeNode(poolId, nodeId, options, callback) { let fileListFromComputeNodeOptions = (options && options.fileListFromComputeNodeOptions !== undefined) ? options.fileListFromComputeNodeOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (poolId === null || poolId === undefined || typeof poolId.valueOf() !== 'string') { throw new Error('poolId cannot be null or undefined and it must be of type string.'); } @@ -1815,6 +1846,7 @@ function _listFromComputeNode(poolId, nodeId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'pools/{poolId}/nodes/{nodeId}/files'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{poolId}', encodeURIComponent(poolId)); requestUrl = requestUrl.replace('{nodeId}', encodeURIComponent(nodeId)); let queryParameters = []; diff --git a/lib/services/batch/lib/operations/index.d.ts b/lib/services/batch/lib/operations/index.d.ts index 3797bf285f..6c71a4ee62 100644 --- a/lib/services/batch/lib/operations/index.d.ts +++ b/lib/services/batch/lib/operations/index.d.ts @@ -636,10 +636,10 @@ export interface Pool { * see Azure Guest OS Releases * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * - * @param {string} [pool.cloudServiceConfiguration.targetOSVersion] The Azure - * Guest OS version to be installed on the virtual machines in the pool. The - * default value is * which specifies the latest operating system version for - * the specified OS family. + * @param {string} [pool.cloudServiceConfiguration.osVersion] The Azure Guest + * OS version to be installed on the virtual machines in the pool. The default + * value is * which specifies the latest operating system version for the + * specified OS family. * * @param {object} [pool.virtualMachineConfiguration] The virtual machine * configuration for the pool. This property and cloudServiceConfiguration are @@ -673,18 +673,8 @@ export interface Pool { * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName} * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * - * @param {object} [pool.virtualMachineConfiguration.osDisk] Settings for the - * operating system disk of the Virtual Machine. - * - * @param {string} [pool.virtualMachineConfiguration.osDisk.caching] The type - * of caching to enable for the OS disk. The default value for caching is - * readwrite. For information about the caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' + * Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. * * @param {string} pool.virtualMachineConfiguration.nodeAgentSKUId The SKU of * the Batch node agent to be provisioned on compute nodes in the pool. The @@ -698,8 +688,7 @@ export interface Pool { * * @param {object} [pool.virtualMachineConfiguration.windowsConfiguration] * Windows operating system settings on the virtual machine. This property must - * not be specified if the imageReference or osDisk property specifies a Linux - * OS image. + * not be specified if the imageReference property specifies a Linux OS image. * * @param {boolean} * [pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] @@ -806,26 +795,16 @@ export interface Pool { * Batch account. The specified subnet should have enough free IP addresses to * accommodate the number of nodes in the pool. If the subnet doesn't have * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks + * and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks * ('Microsoft.Network/virtualNetworks') are supported, but for pools created * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * + * @param {string} [pool.networkConfiguration.dynamicVNetAssignmentScope] The + * scope of dynamic vnet assignment. Possible values include: 'none', 'job' + * * @param {object} [pool.networkConfiguration.endpointConfiguration] The * configuration for endpoints on compute nodes in the Batch pool. Pool * endpoint configuration is only supported on pools with the @@ -1055,10 +1034,10 @@ export interface Pool { * see Azure Guest OS Releases * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * - * @param {string} [pool.cloudServiceConfiguration.targetOSVersion] The Azure - * Guest OS version to be installed on the virtual machines in the pool. The - * default value is * which specifies the latest operating system version for - * the specified OS family. + * @param {string} [pool.cloudServiceConfiguration.osVersion] The Azure Guest + * OS version to be installed on the virtual machines in the pool. The default + * value is * which specifies the latest operating system version for the + * specified OS family. * * @param {object} [pool.virtualMachineConfiguration] The virtual machine * configuration for the pool. This property and cloudServiceConfiguration are @@ -1092,18 +1071,8 @@ export interface Pool { * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName} * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * - * @param {object} [pool.virtualMachineConfiguration.osDisk] Settings for the - * operating system disk of the Virtual Machine. - * - * @param {string} [pool.virtualMachineConfiguration.osDisk.caching] The type - * of caching to enable for the OS disk. The default value for caching is - * readwrite. For information about the caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' + * Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. * * @param {string} pool.virtualMachineConfiguration.nodeAgentSKUId The SKU of * the Batch node agent to be provisioned on compute nodes in the pool. The @@ -1117,8 +1086,7 @@ export interface Pool { * * @param {object} [pool.virtualMachineConfiguration.windowsConfiguration] * Windows operating system settings on the virtual machine. This property must - * not be specified if the imageReference or osDisk property specifies a Linux - * OS image. + * not be specified if the imageReference property specifies a Linux OS image. * * @param {boolean} * [pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] @@ -1225,26 +1193,16 @@ export interface Pool { * Batch account. The specified subnet should have enough free IP addresses to * accommodate the number of nodes in the pool. If the subnet doesn't have * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks + * and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks * ('Microsoft.Network/virtualNetworks') are supported, but for pools created * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * + * @param {string} [pool.networkConfiguration.dynamicVNetAssignmentScope] The + * scope of dynamic vnet assignment. Possible values include: 'none', 'job' + * * @param {object} [pool.networkConfiguration.endpointConfiguration] The * configuration for endpoints on compute nodes in the Batch pool. Pool * endpoint configuration is only supported on pools with the @@ -3134,7 +3092,7 @@ export interface Pool { /** * @summary Updates the properties of the specified pool. * - * This fully replaces all the updateable properties of the pool. For example, + * This fully replaces all the updatable properties of the pool. For example, * if the pool has a start task associated with it and if start task is not * specified with this request, then the Batch service will remove the existing * start task. @@ -3318,7 +3276,7 @@ export interface Pool { /** * @summary Updates the properties of the specified pool. * - * This fully replaces all the updateable properties of the pool. For example, + * This fully replaces all the updatable properties of the pool. For example, * if the pool has a start task associated with it and if start task is not * specified with this request, then the Batch service will remove the existing * start task. @@ -3517,176 +3475,6 @@ export interface Pool { updateProperties(poolId: string, poolUpdatePropertiesParameter: models.PoolUpdatePropertiesParameter, options: { poolUpdatePropertiesOptions? : models.PoolUpdatePropertiesOptions, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - /** - * @summary Upgrades the operating system of the specified pool. - * - * During an upgrade, the Batch service upgrades each compute node in the pool. - * When a compute node is chosen for upgrade, any tasks running on that node - * are removed from the node and returned to the queue to be rerun later (or on - * a different compute node). The node will be unavailable until the upgrade is - * complete. This operation results in temporarily reduced pool capacity as - * nodes are taken out of service to be upgraded. Although the Batch service - * tries to avoid upgrading all compute nodes at the same time, it does not - * guarantee to do this (particularly on small pools); therefore, the pool may - * be temporarily unavailable to run tasks. When this operation runs, the pool - * state changes to upgrading. When all compute nodes have finished upgrading, - * the pool state returns to active. While the upgrade is in progress, the - * pool's currentOSVersion reflects the OS version that nodes are upgrading - * from, and targetOSVersion reflects the OS version that nodes are upgrading - * to. Once the upgrade is complete, currentOSVersion is updated to reflect the - * OS version now running on all nodes. This operation can only be invoked on - * pools created with the cloudServiceConfiguration property. - * - * @param {string} poolId The ID of the pool to upgrade. - * - * @param {string} targetOSVersion The Azure Guest OS version to be installed - * on the virtual machines in the pool. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.poolUpgradeOSOptions] Additional parameters for the - * operation - * - * @param {number} [options.poolUpgradeOSOptions.timeout] The maximum time that - * the server can spend processing the request, in seconds. The default is 30 - * seconds. - * - * @param {uuid} [options.poolUpgradeOSOptions.clientRequestId] The - * caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * - * @param {boolean} [options.poolUpgradeOSOptions.returnClientRequestId] - * Whether the server should return the client-request-id in the response. - * - * @param {date} [options.poolUpgradeOSOptions.ocpDate] The time the request - * was issued. Client libraries typically set this to the current system clock - * time; set it explicitly if you are calling the REST API directly. - * - * @param {string} [options.poolUpgradeOSOptions.ifMatch] An ETag value - * associated with the version of the resource known to the client. The - * operation will be performed only if the resource's current ETag on the - * service exactly matches the value specified by the client. - * - * @param {string} [options.poolUpgradeOSOptions.ifNoneMatch] An ETag value - * associated with the version of the resource known to the client. The - * operation will be performed only if the resource's current ETag on the - * service does not match the value specified by the client. - * - * @param {date} [options.poolUpgradeOSOptions.ifModifiedSince] A timestamp - * indicating the last modified time of the resource known to the client. The - * operation will be performed only if the resource on the service has been - * modified since the specified time. - * - * @param {date} [options.poolUpgradeOSOptions.ifUnmodifiedSince] A timestamp - * indicating the last modified time of the resource known to the client. The - * operation will be performed only if the resource on the service has not been - * modified since the specified time. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - upgradeOSWithHttpOperationResponse(poolId: string, targetOSVersion: string, options?: { poolUpgradeOSOptions? : models.PoolUpgradeOSOptions, customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * @summary Upgrades the operating system of the specified pool. - * - * During an upgrade, the Batch service upgrades each compute node in the pool. - * When a compute node is chosen for upgrade, any tasks running on that node - * are removed from the node and returned to the queue to be rerun later (or on - * a different compute node). The node will be unavailable until the upgrade is - * complete. This operation results in temporarily reduced pool capacity as - * nodes are taken out of service to be upgraded. Although the Batch service - * tries to avoid upgrading all compute nodes at the same time, it does not - * guarantee to do this (particularly on small pools); therefore, the pool may - * be temporarily unavailable to run tasks. When this operation runs, the pool - * state changes to upgrading. When all compute nodes have finished upgrading, - * the pool state returns to active. While the upgrade is in progress, the - * pool's currentOSVersion reflects the OS version that nodes are upgrading - * from, and targetOSVersion reflects the OS version that nodes are upgrading - * to. Once the upgrade is complete, currentOSVersion is updated to reflect the - * OS version now running on all nodes. This operation can only be invoked on - * pools created with the cloudServiceConfiguration property. - * - * @param {string} poolId The ID of the pool to upgrade. - * - * @param {string} targetOSVersion The Azure Guest OS version to be installed - * on the virtual machines in the pool. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.poolUpgradeOSOptions] Additional parameters for the - * operation - * - * @param {number} [options.poolUpgradeOSOptions.timeout] The maximum time that - * the server can spend processing the request, in seconds. The default is 30 - * seconds. - * - * @param {uuid} [options.poolUpgradeOSOptions.clientRequestId] The - * caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * - * @param {boolean} [options.poolUpgradeOSOptions.returnClientRequestId] - * Whether the server should return the client-request-id in the response. - * - * @param {date} [options.poolUpgradeOSOptions.ocpDate] The time the request - * was issued. Client libraries typically set this to the current system clock - * time; set it explicitly if you are calling the REST API directly. - * - * @param {string} [options.poolUpgradeOSOptions.ifMatch] An ETag value - * associated with the version of the resource known to the client. The - * operation will be performed only if the resource's current ETag on the - * service exactly matches the value specified by the client. - * - * @param {string} [options.poolUpgradeOSOptions.ifNoneMatch] An ETag value - * associated with the version of the resource known to the client. The - * operation will be performed only if the resource's current ETag on the - * service does not match the value specified by the client. - * - * @param {date} [options.poolUpgradeOSOptions.ifModifiedSince] A timestamp - * indicating the last modified time of the resource known to the client. The - * operation will be performed only if the resource on the service has been - * modified since the specified time. - * - * @param {date} [options.poolUpgradeOSOptions.ifUnmodifiedSince] A timestamp - * indicating the last modified time of the resource known to the client. The - * operation will be performed only if the resource on the service has not been - * modified since the specified time. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {null} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {null} [result] - The deserialized result object if an error did not occur. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - upgradeOS(poolId: string, targetOSVersion: string, options?: { poolUpgradeOSOptions? : models.PoolUpgradeOSOptions, customHeaders? : { [headerName: string]: string; } }): Promise; - upgradeOS(poolId: string, targetOSVersion: string, callback: ServiceCallback): void; - upgradeOS(poolId: string, targetOSVersion: string, options: { poolUpgradeOSOptions? : models.PoolUpgradeOSOptions, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - /** * @summary Removes compute nodes from the specified pool. * @@ -4986,7 +4774,7 @@ export interface Job { * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * * @param {string} - * [jobPatchParameter.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] + * [jobPatchParameter.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osVersion] * The Azure Guest OS version to be installed on the virtual machines in the * pool. The default value is * which specifies the latest operating system * version for the specified OS family. @@ -5033,20 +4821,8 @@ export interface Job { * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName} * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * - * @param {object} - * [jobPatchParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * Settings for the operating system disk of the Virtual Machine. - * - * @param {string} - * [jobPatchParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The type of caching to enable for the OS disk. The default value for caching - * is readwrite. For information about the caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' + * Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. * * @param {string} * jobPatchParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId @@ -5062,8 +4838,7 @@ export interface Job { * @param {object} * [jobPatchParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] * Windows operating system settings on the virtual machine. This property must - * not be specified if the imageReference or osDisk property specifies a Linux - * OS image. + * not be specified if the imageReference property specifies a Linux OS image. * * @param {boolean} * [jobPatchParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] @@ -5198,26 +4973,17 @@ export interface Job { * Batch account. The specified subnet should have enough free IP addresses to * accommodate the number of nodes in the pool. If the subnet doesn't have * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks + * and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks * ('Microsoft.Network/virtualNetworks') are supported, but for pools created * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * + * @param {string} + * [jobPatchParameter.poolInfo.autoPoolSpecification.pool.networkConfiguration.dynamicVNetAssignmentScope] + * The scope of dynamic vnet assignment. Possible values include: 'none', 'job' + * * @param {object} * [jobPatchParameter.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] * The configuration for endpoints on compute nodes in the Batch pool. Pool @@ -5576,7 +5342,7 @@ export interface Job { * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * * @param {string} - * [jobPatchParameter.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] + * [jobPatchParameter.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osVersion] * The Azure Guest OS version to be installed on the virtual machines in the * pool. The default value is * which specifies the latest operating system * version for the specified OS family. @@ -5623,20 +5389,8 @@ export interface Job { * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName} * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * - * @param {object} - * [jobPatchParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * Settings for the operating system disk of the Virtual Machine. - * - * @param {string} - * [jobPatchParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The type of caching to enable for the OS disk. The default value for caching - * is readwrite. For information about the caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' + * Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. * * @param {string} * jobPatchParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId @@ -5652,8 +5406,7 @@ export interface Job { * @param {object} * [jobPatchParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] * Windows operating system settings on the virtual machine. This property must - * not be specified if the imageReference or osDisk property specifies a Linux - * OS image. + * not be specified if the imageReference property specifies a Linux OS image. * * @param {boolean} * [jobPatchParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] @@ -5788,26 +5541,17 @@ export interface Job { * Batch account. The specified subnet should have enough free IP addresses to * accommodate the number of nodes in the pool. If the subnet doesn't have * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks + * and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks * ('Microsoft.Network/virtualNetworks') are supported, but for pools created * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * + * @param {string} + * [jobPatchParameter.poolInfo.autoPoolSpecification.pool.networkConfiguration.dynamicVNetAssignmentScope] + * The scope of dynamic vnet assignment. Possible values include: 'none', 'job' + * * @param {object} * [jobPatchParameter.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] * The configuration for endpoints on compute nodes in the Batch pool. Pool @@ -6053,8 +5797,8 @@ export interface Job { /** * @summary Updates the properties of the specified job. * - * This fully replaces all the updateable properties of the job. For example, - * if the job has constraints associated with it and if constraints is not + * This fully replaces all the updatable properties of the job. For example, if + * the job has constraints associated with it and if constraints is not * specified with this request, then the Batch service will remove the existing * constraints. * @@ -6176,7 +5920,7 @@ export interface Job { * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * * @param {string} - * [jobUpdateParameter.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] + * [jobUpdateParameter.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osVersion] * The Azure Guest OS version to be installed on the virtual machines in the * pool. The default value is * which specifies the latest operating system * version for the specified OS family. @@ -6223,20 +5967,8 @@ export interface Job { * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName} * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * - * @param {object} - * [jobUpdateParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * Settings for the operating system disk of the Virtual Machine. - * - * @param {string} - * [jobUpdateParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The type of caching to enable for the OS disk. The default value for caching - * is readwrite. For information about the caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' + * Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. * * @param {string} * jobUpdateParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId @@ -6252,8 +5984,7 @@ export interface Job { * @param {object} * [jobUpdateParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] * Windows operating system settings on the virtual machine. This property must - * not be specified if the imageReference or osDisk property specifies a Linux - * OS image. + * not be specified if the imageReference property specifies a Linux OS image. * * @param {boolean} * [jobUpdateParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] @@ -6388,26 +6119,17 @@ export interface Job { * Batch account. The specified subnet should have enough free IP addresses to * accommodate the number of nodes in the pool. If the subnet doesn't have * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks + * and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks * ('Microsoft.Network/virtualNetworks') are supported, but for pools created * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * + * @param {string} + * [jobUpdateParameter.poolInfo.autoPoolSpecification.pool.networkConfiguration.dynamicVNetAssignmentScope] + * The scope of dynamic vnet assignment. Possible values include: 'none', 'job' + * * @param {object} * [jobUpdateParameter.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] * The configuration for endpoints on compute nodes in the Batch pool. Pool @@ -6648,8 +6370,8 @@ export interface Job { /** * @summary Updates the properties of the specified job. * - * This fully replaces all the updateable properties of the job. For example, - * if the job has constraints associated with it and if constraints is not + * This fully replaces all the updatable properties of the job. For example, if + * the job has constraints associated with it and if constraints is not * specified with this request, then the Batch service will remove the existing * constraints. * @@ -6771,7 +6493,7 @@ export interface Job { * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * * @param {string} - * [jobUpdateParameter.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] + * [jobUpdateParameter.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osVersion] * The Azure Guest OS version to be installed on the virtual machines in the * pool. The default value is * which specifies the latest operating system * version for the specified OS family. @@ -6818,20 +6540,8 @@ export interface Job { * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName} * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * - * @param {object} - * [jobUpdateParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * Settings for the operating system disk of the Virtual Machine. - * - * @param {string} - * [jobUpdateParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The type of caching to enable for the OS disk. The default value for caching - * is readwrite. For information about the caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' + * Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. * * @param {string} * jobUpdateParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId @@ -6847,8 +6557,7 @@ export interface Job { * @param {object} * [jobUpdateParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] * Windows operating system settings on the virtual machine. This property must - * not be specified if the imageReference or osDisk property specifies a Linux - * OS image. + * not be specified if the imageReference property specifies a Linux OS image. * * @param {boolean} * [jobUpdateParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] @@ -6983,26 +6692,17 @@ export interface Job { * Batch account. The specified subnet should have enough free IP addresses to * accommodate the number of nodes in the pool. If the subnet doesn't have * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks + * and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks * ('Microsoft.Network/virtualNetworks') are supported, but for pools created * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * + * @param {string} + * [jobUpdateParameter.poolInfo.autoPoolSpecification.pool.networkConfiguration.dynamicVNetAssignmentScope] + * The scope of dynamic vnet assignment. Possible values include: 'none', 'job' + * * @param {object} * [jobUpdateParameter.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] * The configuration for endpoints on compute nodes in the Batch pool. Pool @@ -7418,9 +7118,9 @@ export interface Job { * When you call this API, the Batch service sets a disabled job to the * enabling state. After the this operation is completed, the job moves to the * active state, and scheduling of new tasks under the job resumes. The Batch - * service does not allow a task to remain in the active state for more than 7 - * days. Therefore, if you enable a job containing active tasks which were - * added more than 7 days ago, those tasks will not run. + * service does not allow a task to remain in the active state for more than + * 180 days. Therefore, if you enable a job containing active tasks which were + * added more than 180 days ago, those tasks will not run. * * @param {string} jobId The ID of the job to enable. * @@ -7481,9 +7181,9 @@ export interface Job { * When you call this API, the Batch service sets a disabled job to the * enabling state. After the this operation is completed, the job moves to the * active state, and scheduling of new tasks under the job resumes. The Batch - * service does not allow a task to remain in the active state for more than 7 - * days. Therefore, if you enable a job containing active tasks which were - * added more than 7 days ago, those tasks will not run. + * service does not allow a task to remain in the active state for more than + * 180 days. Therefore, if you enable a job containing active tasks which were + * added more than 180 days ago, those tasks will not run. * * @param {string} jobId The ID of the job to enable. * @@ -7931,9 +7631,9 @@ export interface Job { * @param {moment.duration} [job.jobPreparationTask.constraints.retentionTime] * The minimum time to retain the task directory on the compute node where it * ran, from the time it completes execution. After this time, the Batch - * service may delete the task directory and all its contents. The default is - * infinite, i.e. the task directory will be retained until the compute node is - * removed or reimaged. + * service may delete the task directory and all its contents. The default is 7 + * days, i.e. the task directory will be retained for 7 days unless the compute + * node is removed or the job is deleted. * * @param {number} [job.jobPreparationTask.constraints.maxTaskRetryCount] The * maximum number of times the task may be retried. The Batch service retries a @@ -7944,8 +7644,6 @@ export interface Job { * to 4 times (one initial try and 3 retries). If the maximum retry count is 0, * the Batch service does not retry the task after the first attempt. If the * maximum retry count is -1, the Batch service retries the task without limit. - * Resource files and application packages are only downloaded again if the - * task is retried on a new compute node. * * @param {boolean} [job.jobPreparationTask.waitForSuccess] Whether the Batch * service should wait for the Job Preparation task to complete successfully @@ -7964,7 +7662,7 @@ export interface Job { * * @param {object} [job.jobPreparationTask.userIdentity] The user identity * under which the Job Preparation task runs. If omitted, the task runs as a - * non-administrative user unique to the task on Windows nodes, or a a + * non-administrative user unique to the task on Windows nodes, or a * non-administrative user unique to the pool on Linux nodes. * * @param {boolean} [job.jobPreparationTask.rerunOnNodeRebootAfterSuccess] @@ -8033,8 +7731,8 @@ export interface Job { * @param {moment.duration} [job.jobReleaseTask.retentionTime] The minimum time * to retain the task directory for the Job Release task on the compute node. * After this time, the Batch service may delete the task directory and all its - * contents. The default is infinite, i.e. the task directory will be retained - * until the compute node is removed or reimaged. + * contents. The default is 7 days, i.e. the task directory will be retained + * for 7 days unless the compute node is removed or the job is deleted. * * @param {object} [job.jobReleaseTask.userIdentity] The user identity under * which the Job Release task runs. If omitted, the task runs as a @@ -8122,7 +7820,7 @@ export interface Job { * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * * @param {string} - * [job.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] + * [job.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osVersion] * The Azure Guest OS version to be installed on the virtual machines in the * pool. The default value is * which specifies the latest operating system * version for the specified OS family. @@ -8169,20 +7867,8 @@ export interface Job { * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName} * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * - * @param {object} - * [job.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * Settings for the operating system disk of the Virtual Machine. - * - * @param {string} - * [job.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The type of caching to enable for the OS disk. The default value for caching - * is readwrite. For information about the caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' + * Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. * * @param {string} * job.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId @@ -8198,8 +7884,7 @@ export interface Job { * @param {object} * [job.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] * Windows operating system settings on the virtual machine. This property must - * not be specified if the imageReference or osDisk property specifies a Linux - * OS image. + * not be specified if the imageReference property specifies a Linux OS image. * * @param {boolean} * [job.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] @@ -8331,26 +8016,17 @@ export interface Job { * Batch account. The specified subnet should have enough free IP addresses to * accommodate the number of nodes in the pool. If the subnet doesn't have * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks + * and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks * ('Microsoft.Network/virtualNetworks') are supported, but for pools created * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * + * @param {string} + * [job.poolInfo.autoPoolSpecification.pool.networkConfiguration.dynamicVNetAssignmentScope] + * The scope of dynamic vnet assignment. Possible values include: 'none', 'job' + * * @param {object} * [job.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] * The configuration for endpoints on compute nodes in the Batch pool. Pool @@ -8537,6 +8213,20 @@ export interface Job { * @param {boolean} [job.usesTaskDependencies] Whether tasks in the job can * define dependencies on each other. The default is false. * + * @param {object} [job.networkConfiguration] The network configuration for the + * job. + * + * @param {string} job.networkConfiguration.subnetId The ARM resource + * identifier of the virtual network subnet which nodes running tasks from the + * job will join for the duration of the task. This is only supported for jobs + * running on VirtualMachineConfiguration pools. This is of the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. + * The virtual network must be in the same region and subscription as the Azure + * Batch account. The specified subnet should have enough free IP addresses to + * accommodate the number of nodes which will run tasks from the job. For more + * details, see + * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.jobAddOptions] Additional parameters for the @@ -8791,9 +8481,9 @@ export interface Job { * @param {moment.duration} [job.jobPreparationTask.constraints.retentionTime] * The minimum time to retain the task directory on the compute node where it * ran, from the time it completes execution. After this time, the Batch - * service may delete the task directory and all its contents. The default is - * infinite, i.e. the task directory will be retained until the compute node is - * removed or reimaged. + * service may delete the task directory and all its contents. The default is 7 + * days, i.e. the task directory will be retained for 7 days unless the compute + * node is removed or the job is deleted. * * @param {number} [job.jobPreparationTask.constraints.maxTaskRetryCount] The * maximum number of times the task may be retried. The Batch service retries a @@ -8804,8 +8494,6 @@ export interface Job { * to 4 times (one initial try and 3 retries). If the maximum retry count is 0, * the Batch service does not retry the task after the first attempt. If the * maximum retry count is -1, the Batch service retries the task without limit. - * Resource files and application packages are only downloaded again if the - * task is retried on a new compute node. * * @param {boolean} [job.jobPreparationTask.waitForSuccess] Whether the Batch * service should wait for the Job Preparation task to complete successfully @@ -8824,7 +8512,7 @@ export interface Job { * * @param {object} [job.jobPreparationTask.userIdentity] The user identity * under which the Job Preparation task runs. If omitted, the task runs as a - * non-administrative user unique to the task on Windows nodes, or a a + * non-administrative user unique to the task on Windows nodes, or a * non-administrative user unique to the pool on Linux nodes. * * @param {boolean} [job.jobPreparationTask.rerunOnNodeRebootAfterSuccess] @@ -8893,8 +8581,8 @@ export interface Job { * @param {moment.duration} [job.jobReleaseTask.retentionTime] The minimum time * to retain the task directory for the Job Release task on the compute node. * After this time, the Batch service may delete the task directory and all its - * contents. The default is infinite, i.e. the task directory will be retained - * until the compute node is removed or reimaged. + * contents. The default is 7 days, i.e. the task directory will be retained + * for 7 days unless the compute node is removed or the job is deleted. * * @param {object} [job.jobReleaseTask.userIdentity] The user identity under * which the Job Release task runs. If omitted, the task runs as a @@ -8982,7 +8670,7 @@ export interface Job { * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * * @param {string} - * [job.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] + * [job.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osVersion] * The Azure Guest OS version to be installed on the virtual machines in the * pool. The default value is * which specifies the latest operating system * version for the specified OS family. @@ -9029,20 +8717,8 @@ export interface Job { * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName} * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * - * @param {object} - * [job.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * Settings for the operating system disk of the Virtual Machine. - * - * @param {string} - * [job.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The type of caching to enable for the OS disk. The default value for caching - * is readwrite. For information about the caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' + * Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. * * @param {string} * job.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId @@ -9058,8 +8734,7 @@ export interface Job { * @param {object} * [job.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] * Windows operating system settings on the virtual machine. This property must - * not be specified if the imageReference or osDisk property specifies a Linux - * OS image. + * not be specified if the imageReference property specifies a Linux OS image. * * @param {boolean} * [job.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] @@ -9191,26 +8866,17 @@ export interface Job { * Batch account. The specified subnet should have enough free IP addresses to * accommodate the number of nodes in the pool. If the subnet doesn't have * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks + * and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks * ('Microsoft.Network/virtualNetworks') are supported, but for pools created * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * + * @param {string} + * [job.poolInfo.autoPoolSpecification.pool.networkConfiguration.dynamicVNetAssignmentScope] + * The scope of dynamic vnet assignment. Possible values include: 'none', 'job' + * * @param {object} * [job.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] * The configuration for endpoints on compute nodes in the Batch pool. Pool @@ -9397,6 +9063,20 @@ export interface Job { * @param {boolean} [job.usesTaskDependencies] Whether tasks in the job can * define dependencies on each other. The default is false. * + * @param {object} [job.networkConfiguration] The network configuration for the + * job. + * + * @param {string} job.networkConfiguration.subnetId The ARM resource + * identifier of the virtual network subnet which nodes running tasks from the + * job will join for the duration of the task. This is only supported for jobs + * running on VirtualMachineConfiguration pools. This is of the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. + * The virtual network must be in the same region and subscription as the Azure + * Batch account. The specified subnet should have enough free IP addresses to + * accommodate the number of nodes which will run tasks from the job. For more + * details, see + * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.jobAddOptions] Additional parameters for the @@ -12610,6 +12290,23 @@ export interface JobSchedule { * The default is noaction. Possible values include: 'noAction', * 'performExitOptionsJobAction' * + * @param {object} + * [jobSchedulePatchParameter.jobSpecification.networkConfiguration] The + * network configuration for the job. + * + * @param {string} + * jobSchedulePatchParameter.jobSpecification.networkConfiguration.subnetId The + * ARM resource identifier of the virtual network subnet which nodes running + * tasks from the job will join for the duration of the task. This is only + * supported for jobs running on VirtualMachineConfiguration pools. This is of + * the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. + * The virtual network must be in the same region and subscription as the Azure + * Batch account. The specified subnet should have enough free IP addresses to + * accommodate the number of nodes which will run tasks from the job. For more + * details, see + * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + * * @param {object} [jobSchedulePatchParameter.jobSpecification.constraints] The * execution constraints for jobs created under this schedule. * @@ -12830,9 +12527,9 @@ export interface JobSchedule { * [jobSchedulePatchParameter.jobSpecification.jobPreparationTask.constraints.retentionTime] * The minimum time to retain the task directory on the compute node where it * ran, from the time it completes execution. After this time, the Batch - * service may delete the task directory and all its contents. The default is - * infinite, i.e. the task directory will be retained until the compute node is - * removed or reimaged. + * service may delete the task directory and all its contents. The default is 7 + * days, i.e. the task directory will be retained for 7 days unless the compute + * node is removed or the job is deleted. * * @param {number} * [jobSchedulePatchParameter.jobSpecification.jobPreparationTask.constraints.maxTaskRetryCount] @@ -12844,8 +12541,7 @@ export interface JobSchedule { * tries the task up to 4 times (one initial try and 3 retries). If the maximum * retry count is 0, the Batch service does not retry the task after the first * attempt. If the maximum retry count is -1, the Batch service retries the - * task without limit. Resource files and application packages are only - * downloaded again if the task is retried on a new compute node. + * task without limit. * * @param {boolean} * [jobSchedulePatchParameter.jobSpecification.jobPreparationTask.waitForSuccess] @@ -12868,7 +12564,7 @@ export interface JobSchedule { * [jobSchedulePatchParameter.jobSpecification.jobPreparationTask.userIdentity] * The user identity under which the Job Preparation task runs. If omitted, the * task runs as a non-administrative user unique to the task on Windows nodes, - * or a a non-administrative user unique to the pool on Linux nodes. + * or a non-administrative user unique to the pool on Linux nodes. * * @param {boolean} * [jobSchedulePatchParameter.jobSpecification.jobPreparationTask.rerunOnNodeRebootAfterSuccess] @@ -12946,8 +12642,9 @@ export interface JobSchedule { * [jobSchedulePatchParameter.jobSpecification.jobReleaseTask.retentionTime] * The minimum time to retain the task directory for the Job Release task on * the compute node. After this time, the Batch service may delete the task - * directory and all its contents. The default is infinite, i.e. the task - * directory will be retained until the compute node is removed or reimaged. + * directory and all its contents. The default is 7 days, i.e. the task + * directory will be retained for 7 days unless the compute node is removed or + * the job is deleted. * * @param {object} * [jobSchedulePatchParameter.jobSpecification.jobReleaseTask.userIdentity] The @@ -13049,7 +12746,7 @@ export interface JobSchedule { * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * * @param {string} - * [jobSchedulePatchParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] + * [jobSchedulePatchParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osVersion] * The Azure Guest OS version to be installed on the virtual machines in the * pool. The default value is * which specifies the latest operating system * version for the specified OS family. @@ -13096,20 +12793,8 @@ export interface JobSchedule { * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName} * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * - * @param {object} - * [jobSchedulePatchParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * Settings for the operating system disk of the Virtual Machine. - * - * @param {string} - * [jobSchedulePatchParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The type of caching to enable for the OS disk. The default value for caching - * is readwrite. For information about the caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' + * Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. * * @param {string} * jobSchedulePatchParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId @@ -13125,8 +12810,7 @@ export interface JobSchedule { * @param {object} * [jobSchedulePatchParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] * Windows operating system settings on the virtual machine. This property must - * not be specified if the imageReference or osDisk property specifies a Linux - * OS image. + * not be specified if the imageReference property specifies a Linux OS image. * * @param {boolean} * [jobSchedulePatchParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] @@ -13261,26 +12945,17 @@ export interface JobSchedule { * Batch account. The specified subnet should have enough free IP addresses to * accommodate the number of nodes in the pool. If the subnet doesn't have * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks + * and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks * ('Microsoft.Network/virtualNetworks') are supported, but for pools created * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * + * @param {string} + * [jobSchedulePatchParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.dynamicVNetAssignmentScope] + * The scope of dynamic vnet assignment. Possible values include: 'none', 'job' + * * @param {object} * [jobSchedulePatchParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] * The configuration for endpoints on compute nodes in the Batch pool. Pool @@ -13614,6 +13289,23 @@ export interface JobSchedule { * The default is noaction. Possible values include: 'noAction', * 'performExitOptionsJobAction' * + * @param {object} + * [jobSchedulePatchParameter.jobSpecification.networkConfiguration] The + * network configuration for the job. + * + * @param {string} + * jobSchedulePatchParameter.jobSpecification.networkConfiguration.subnetId The + * ARM resource identifier of the virtual network subnet which nodes running + * tasks from the job will join for the duration of the task. This is only + * supported for jobs running on VirtualMachineConfiguration pools. This is of + * the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. + * The virtual network must be in the same region and subscription as the Azure + * Batch account. The specified subnet should have enough free IP addresses to + * accommodate the number of nodes which will run tasks from the job. For more + * details, see + * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + * * @param {object} [jobSchedulePatchParameter.jobSpecification.constraints] The * execution constraints for jobs created under this schedule. * @@ -13834,9 +13526,9 @@ export interface JobSchedule { * [jobSchedulePatchParameter.jobSpecification.jobPreparationTask.constraints.retentionTime] * The minimum time to retain the task directory on the compute node where it * ran, from the time it completes execution. After this time, the Batch - * service may delete the task directory and all its contents. The default is - * infinite, i.e. the task directory will be retained until the compute node is - * removed or reimaged. + * service may delete the task directory and all its contents. The default is 7 + * days, i.e. the task directory will be retained for 7 days unless the compute + * node is removed or the job is deleted. * * @param {number} * [jobSchedulePatchParameter.jobSpecification.jobPreparationTask.constraints.maxTaskRetryCount] @@ -13848,8 +13540,7 @@ export interface JobSchedule { * tries the task up to 4 times (one initial try and 3 retries). If the maximum * retry count is 0, the Batch service does not retry the task after the first * attempt. If the maximum retry count is -1, the Batch service retries the - * task without limit. Resource files and application packages are only - * downloaded again if the task is retried on a new compute node. + * task without limit. * * @param {boolean} * [jobSchedulePatchParameter.jobSpecification.jobPreparationTask.waitForSuccess] @@ -13872,7 +13563,7 @@ export interface JobSchedule { * [jobSchedulePatchParameter.jobSpecification.jobPreparationTask.userIdentity] * The user identity under which the Job Preparation task runs. If omitted, the * task runs as a non-administrative user unique to the task on Windows nodes, - * or a a non-administrative user unique to the pool on Linux nodes. + * or a non-administrative user unique to the pool on Linux nodes. * * @param {boolean} * [jobSchedulePatchParameter.jobSpecification.jobPreparationTask.rerunOnNodeRebootAfterSuccess] @@ -13950,8 +13641,9 @@ export interface JobSchedule { * [jobSchedulePatchParameter.jobSpecification.jobReleaseTask.retentionTime] * The minimum time to retain the task directory for the Job Release task on * the compute node. After this time, the Batch service may delete the task - * directory and all its contents. The default is infinite, i.e. the task - * directory will be retained until the compute node is removed or reimaged. + * directory and all its contents. The default is 7 days, i.e. the task + * directory will be retained for 7 days unless the compute node is removed or + * the job is deleted. * * @param {object} * [jobSchedulePatchParameter.jobSpecification.jobReleaseTask.userIdentity] The @@ -14053,7 +13745,7 @@ export interface JobSchedule { * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * * @param {string} - * [jobSchedulePatchParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] + * [jobSchedulePatchParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osVersion] * The Azure Guest OS version to be installed on the virtual machines in the * pool. The default value is * which specifies the latest operating system * version for the specified OS family. @@ -14100,20 +13792,8 @@ export interface JobSchedule { * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName} * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * - * @param {object} - * [jobSchedulePatchParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * Settings for the operating system disk of the Virtual Machine. - * - * @param {string} - * [jobSchedulePatchParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The type of caching to enable for the OS disk. The default value for caching - * is readwrite. For information about the caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' + * Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. * * @param {string} * jobSchedulePatchParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId @@ -14129,8 +13809,7 @@ export interface JobSchedule { * @param {object} * [jobSchedulePatchParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] * Windows operating system settings on the virtual machine. This property must - * not be specified if the imageReference or osDisk property specifies a Linux - * OS image. + * not be specified if the imageReference property specifies a Linux OS image. * * @param {boolean} * [jobSchedulePatchParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] @@ -14265,26 +13944,17 @@ export interface JobSchedule { * Batch account. The specified subnet should have enough free IP addresses to * accommodate the number of nodes in the pool. If the subnet doesn't have * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks + * and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks * ('Microsoft.Network/virtualNetworks') are supported, but for pools created * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * + * @param {string} + * [jobSchedulePatchParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.dynamicVNetAssignmentScope] + * The scope of dynamic vnet assignment. Possible values include: 'none', 'job' + * * @param {object} * [jobSchedulePatchParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] * The configuration for endpoints on compute nodes in the Batch pool. Pool @@ -14535,7 +14205,7 @@ export interface JobSchedule { /** * @summary Updates the properties of the specified job schedule. * - * This fully replaces all the updateable properties of the job schedule. For + * This fully replaces all the updatable properties of the job schedule. For * example, if the schedule property is not specified with this request, then * the Batch service will remove the existing schedule. Changes to a job * schedule only impact jobs created by the schedule after the update has taken @@ -14637,6 +14307,23 @@ export interface JobSchedule { * The default is noaction. Possible values include: 'noAction', * 'performExitOptionsJobAction' * + * @param {object} + * [jobScheduleUpdateParameter.jobSpecification.networkConfiguration] The + * network configuration for the job. + * + * @param {string} + * jobScheduleUpdateParameter.jobSpecification.networkConfiguration.subnetId + * The ARM resource identifier of the virtual network subnet which nodes + * running tasks from the job will join for the duration of the task. This is + * only supported for jobs running on VirtualMachineConfiguration pools. This + * is of the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. + * The virtual network must be in the same region and subscription as the Azure + * Batch account. The specified subnet should have enough free IP addresses to + * accommodate the number of nodes which will run tasks from the job. For more + * details, see + * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + * * @param {object} [jobScheduleUpdateParameter.jobSpecification.constraints] * The execution constraints for jobs created under this schedule. * @@ -14858,9 +14545,9 @@ export interface JobSchedule { * [jobScheduleUpdateParameter.jobSpecification.jobPreparationTask.constraints.retentionTime] * The minimum time to retain the task directory on the compute node where it * ran, from the time it completes execution. After this time, the Batch - * service may delete the task directory and all its contents. The default is - * infinite, i.e. the task directory will be retained until the compute node is - * removed or reimaged. + * service may delete the task directory and all its contents. The default is 7 + * days, i.e. the task directory will be retained for 7 days unless the compute + * node is removed or the job is deleted. * * @param {number} * [jobScheduleUpdateParameter.jobSpecification.jobPreparationTask.constraints.maxTaskRetryCount] @@ -14872,8 +14559,7 @@ export interface JobSchedule { * tries the task up to 4 times (one initial try and 3 retries). If the maximum * retry count is 0, the Batch service does not retry the task after the first * attempt. If the maximum retry count is -1, the Batch service retries the - * task without limit. Resource files and application packages are only - * downloaded again if the task is retried on a new compute node. + * task without limit. * * @param {boolean} * [jobScheduleUpdateParameter.jobSpecification.jobPreparationTask.waitForSuccess] @@ -14896,7 +14582,7 @@ export interface JobSchedule { * [jobScheduleUpdateParameter.jobSpecification.jobPreparationTask.userIdentity] * The user identity under which the Job Preparation task runs. If omitted, the * task runs as a non-administrative user unique to the task on Windows nodes, - * or a a non-administrative user unique to the pool on Linux nodes. + * or a non-administrative user unique to the pool on Linux nodes. * * @param {boolean} * [jobScheduleUpdateParameter.jobSpecification.jobPreparationTask.rerunOnNodeRebootAfterSuccess] @@ -14975,8 +14661,9 @@ export interface JobSchedule { * [jobScheduleUpdateParameter.jobSpecification.jobReleaseTask.retentionTime] * The minimum time to retain the task directory for the Job Release task on * the compute node. After this time, the Batch service may delete the task - * directory and all its contents. The default is infinite, i.e. the task - * directory will be retained until the compute node is removed or reimaged. + * directory and all its contents. The default is 7 days, i.e. the task + * directory will be retained for 7 days unless the compute node is removed or + * the job is deleted. * * @param {object} * [jobScheduleUpdateParameter.jobSpecification.jobReleaseTask.userIdentity] @@ -15079,7 +14766,7 @@ export interface JobSchedule { * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * * @param {string} - * [jobScheduleUpdateParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] + * [jobScheduleUpdateParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osVersion] * The Azure Guest OS version to be installed on the virtual machines in the * pool. The default value is * which specifies the latest operating system * version for the specified OS family. @@ -15126,20 +14813,8 @@ export interface JobSchedule { * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName} * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * - * @param {object} - * [jobScheduleUpdateParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * Settings for the operating system disk of the Virtual Machine. - * - * @param {string} - * [jobScheduleUpdateParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The type of caching to enable for the OS disk. The default value for caching - * is readwrite. For information about the caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' + * Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. * * @param {string} * jobScheduleUpdateParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId @@ -15155,8 +14830,7 @@ export interface JobSchedule { * @param {object} * [jobScheduleUpdateParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] * Windows operating system settings on the virtual machine. This property must - * not be specified if the imageReference or osDisk property specifies a Linux - * OS image. + * not be specified if the imageReference property specifies a Linux OS image. * * @param {boolean} * [jobScheduleUpdateParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] @@ -15291,26 +14965,17 @@ export interface JobSchedule { * Batch account. The specified subnet should have enough free IP addresses to * accommodate the number of nodes in the pool. If the subnet doesn't have * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks + * and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks * ('Microsoft.Network/virtualNetworks') are supported, but for pools created * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * + * @param {string} + * [jobScheduleUpdateParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.dynamicVNetAssignmentScope] + * The scope of dynamic vnet assignment. Possible values include: 'none', 'job' + * * @param {object} * [jobScheduleUpdateParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] * The configuration for endpoints on compute nodes in the Batch pool. Pool @@ -15545,7 +15210,7 @@ export interface JobSchedule { /** * @summary Updates the properties of the specified job schedule. * - * This fully replaces all the updateable properties of the job schedule. For + * This fully replaces all the updatable properties of the job schedule. For * example, if the schedule property is not specified with this request, then * the Batch service will remove the existing schedule. Changes to a job * schedule only impact jobs created by the schedule after the update has taken @@ -15647,6 +15312,23 @@ export interface JobSchedule { * The default is noaction. Possible values include: 'noAction', * 'performExitOptionsJobAction' * + * @param {object} + * [jobScheduleUpdateParameter.jobSpecification.networkConfiguration] The + * network configuration for the job. + * + * @param {string} + * jobScheduleUpdateParameter.jobSpecification.networkConfiguration.subnetId + * The ARM resource identifier of the virtual network subnet which nodes + * running tasks from the job will join for the duration of the task. This is + * only supported for jobs running on VirtualMachineConfiguration pools. This + * is of the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. + * The virtual network must be in the same region and subscription as the Azure + * Batch account. The specified subnet should have enough free IP addresses to + * accommodate the number of nodes which will run tasks from the job. For more + * details, see + * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + * * @param {object} [jobScheduleUpdateParameter.jobSpecification.constraints] * The execution constraints for jobs created under this schedule. * @@ -15868,9 +15550,9 @@ export interface JobSchedule { * [jobScheduleUpdateParameter.jobSpecification.jobPreparationTask.constraints.retentionTime] * The minimum time to retain the task directory on the compute node where it * ran, from the time it completes execution. After this time, the Batch - * service may delete the task directory and all its contents. The default is - * infinite, i.e. the task directory will be retained until the compute node is - * removed or reimaged. + * service may delete the task directory and all its contents. The default is 7 + * days, i.e. the task directory will be retained for 7 days unless the compute + * node is removed or the job is deleted. * * @param {number} * [jobScheduleUpdateParameter.jobSpecification.jobPreparationTask.constraints.maxTaskRetryCount] @@ -15882,8 +15564,7 @@ export interface JobSchedule { * tries the task up to 4 times (one initial try and 3 retries). If the maximum * retry count is 0, the Batch service does not retry the task after the first * attempt. If the maximum retry count is -1, the Batch service retries the - * task without limit. Resource files and application packages are only - * downloaded again if the task is retried on a new compute node. + * task without limit. * * @param {boolean} * [jobScheduleUpdateParameter.jobSpecification.jobPreparationTask.waitForSuccess] @@ -15906,7 +15587,7 @@ export interface JobSchedule { * [jobScheduleUpdateParameter.jobSpecification.jobPreparationTask.userIdentity] * The user identity under which the Job Preparation task runs. If omitted, the * task runs as a non-administrative user unique to the task on Windows nodes, - * or a a non-administrative user unique to the pool on Linux nodes. + * or a non-administrative user unique to the pool on Linux nodes. * * @param {boolean} * [jobScheduleUpdateParameter.jobSpecification.jobPreparationTask.rerunOnNodeRebootAfterSuccess] @@ -15985,8 +15666,9 @@ export interface JobSchedule { * [jobScheduleUpdateParameter.jobSpecification.jobReleaseTask.retentionTime] * The minimum time to retain the task directory for the Job Release task on * the compute node. After this time, the Batch service may delete the task - * directory and all its contents. The default is infinite, i.e. the task - * directory will be retained until the compute node is removed or reimaged. + * directory and all its contents. The default is 7 days, i.e. the task + * directory will be retained for 7 days unless the compute node is removed or + * the job is deleted. * * @param {object} * [jobScheduleUpdateParameter.jobSpecification.jobReleaseTask.userIdentity] @@ -16089,7 +15771,7 @@ export interface JobSchedule { * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * * @param {string} - * [jobScheduleUpdateParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] + * [jobScheduleUpdateParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osVersion] * The Azure Guest OS version to be installed on the virtual machines in the * pool. The default value is * which specifies the latest operating system * version for the specified OS family. @@ -16136,20 +15818,8 @@ export interface JobSchedule { * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName} * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * - * @param {object} - * [jobScheduleUpdateParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * Settings for the operating system disk of the Virtual Machine. - * - * @param {string} - * [jobScheduleUpdateParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The type of caching to enable for the OS disk. The default value for caching - * is readwrite. For information about the caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' + * Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. * * @param {string} * jobScheduleUpdateParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId @@ -16165,8 +15835,7 @@ export interface JobSchedule { * @param {object} * [jobScheduleUpdateParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] * Windows operating system settings on the virtual machine. This property must - * not be specified if the imageReference or osDisk property specifies a Linux - * OS image. + * not be specified if the imageReference property specifies a Linux OS image. * * @param {boolean} * [jobScheduleUpdateParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] @@ -16301,26 +15970,17 @@ export interface JobSchedule { * Batch account. The specified subnet should have enough free IP addresses to * accommodate the number of nodes in the pool. If the subnet doesn't have * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks + * and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks * ('Microsoft.Network/virtualNetworks') are supported, but for pools created * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * + * @param {string} + * [jobScheduleUpdateParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.dynamicVNetAssignmentScope] + * The scope of dynamic vnet assignment. Possible values include: 'none', 'job' + * * @param {object} * [jobScheduleUpdateParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] * The configuration for endpoints on compute nodes in the Batch pool. Pool @@ -17069,6 +16729,21 @@ export interface JobSchedule { * default is noaction. Possible values include: 'noAction', * 'performExitOptionsJobAction' * + * @param {object} [cloudJobSchedule.jobSpecification.networkConfiguration] The + * network configuration for the job. + * + * @param {string} + * cloudJobSchedule.jobSpecification.networkConfiguration.subnetId The ARM + * resource identifier of the virtual network subnet which nodes running tasks + * from the job will join for the duration of the task. This is only supported + * for jobs running on VirtualMachineConfiguration pools. This is of the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. + * The virtual network must be in the same region and subscription as the Azure + * Batch account. The specified subnet should have enough free IP addresses to + * accommodate the number of nodes which will run tasks from the job. For more + * details, see + * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + * * @param {object} [cloudJobSchedule.jobSpecification.constraints] The * execution constraints for jobs created under this schedule. * @@ -17284,9 +16959,9 @@ export interface JobSchedule { * [cloudJobSchedule.jobSpecification.jobPreparationTask.constraints.retentionTime] * The minimum time to retain the task directory on the compute node where it * ran, from the time it completes execution. After this time, the Batch - * service may delete the task directory and all its contents. The default is - * infinite, i.e. the task directory will be retained until the compute node is - * removed or reimaged. + * service may delete the task directory and all its contents. The default is 7 + * days, i.e. the task directory will be retained for 7 days unless the compute + * node is removed or the job is deleted. * * @param {number} * [cloudJobSchedule.jobSpecification.jobPreparationTask.constraints.maxTaskRetryCount] @@ -17298,8 +16973,7 @@ export interface JobSchedule { * tries the task up to 4 times (one initial try and 3 retries). If the maximum * retry count is 0, the Batch service does not retry the task after the first * attempt. If the maximum retry count is -1, the Batch service retries the - * task without limit. Resource files and application packages are only - * downloaded again if the task is retried on a new compute node. + * task without limit. * * @param {boolean} * [cloudJobSchedule.jobSpecification.jobPreparationTask.waitForSuccess] @@ -17322,7 +16996,7 @@ export interface JobSchedule { * [cloudJobSchedule.jobSpecification.jobPreparationTask.userIdentity] The user * identity under which the Job Preparation task runs. If omitted, the task * runs as a non-administrative user unique to the task on Windows nodes, or a - * a non-administrative user unique to the pool on Linux nodes. + * non-administrative user unique to the pool on Linux nodes. * * @param {boolean} * [cloudJobSchedule.jobSpecification.jobPreparationTask.rerunOnNodeRebootAfterSuccess] @@ -17399,8 +17073,9 @@ export interface JobSchedule { * [cloudJobSchedule.jobSpecification.jobReleaseTask.retentionTime] The minimum * time to retain the task directory for the Job Release task on the compute * node. After this time, the Batch service may delete the task directory and - * all its contents. The default is infinite, i.e. the task directory will be - * retained until the compute node is removed or reimaged. + * all its contents. The default is 7 days, i.e. the task directory will be + * retained for 7 days unless the compute node is removed or the job is + * deleted. * * @param {object} * [cloudJobSchedule.jobSpecification.jobReleaseTask.userIdentity] The user @@ -17500,7 +17175,7 @@ export interface JobSchedule { * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * * @param {string} - * [cloudJobSchedule.jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] + * [cloudJobSchedule.jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osVersion] * The Azure Guest OS version to be installed on the virtual machines in the * pool. The default value is * which specifies the latest operating system * version for the specified OS family. @@ -17547,20 +17222,8 @@ export interface JobSchedule { * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName} * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * - * @param {object} - * [cloudJobSchedule.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * Settings for the operating system disk of the Virtual Machine. - * - * @param {string} - * [cloudJobSchedule.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The type of caching to enable for the OS disk. The default value for caching - * is readwrite. For information about the caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' + * Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. * * @param {string} * cloudJobSchedule.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId @@ -17576,8 +17239,7 @@ export interface JobSchedule { * @param {object} * [cloudJobSchedule.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] * Windows operating system settings on the virtual machine. This property must - * not be specified if the imageReference or osDisk property specifies a Linux - * OS image. + * not be specified if the imageReference property specifies a Linux OS image. * * @param {boolean} * [cloudJobSchedule.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] @@ -17712,26 +17374,17 @@ export interface JobSchedule { * Batch account. The specified subnet should have enough free IP addresses to * accommodate the number of nodes in the pool. If the subnet doesn't have * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks + * and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks * ('Microsoft.Network/virtualNetworks') are supported, but for pools created * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * + * @param {string} + * [cloudJobSchedule.jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.dynamicVNetAssignmentScope] + * The scope of dynamic vnet assignment. Possible values include: 'none', 'job' + * * @param {object} * [cloudJobSchedule.jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] * The configuration for endpoints on compute nodes in the Batch pool. Pool @@ -18040,6 +17693,21 @@ export interface JobSchedule { * default is noaction. Possible values include: 'noAction', * 'performExitOptionsJobAction' * + * @param {object} [cloudJobSchedule.jobSpecification.networkConfiguration] The + * network configuration for the job. + * + * @param {string} + * cloudJobSchedule.jobSpecification.networkConfiguration.subnetId The ARM + * resource identifier of the virtual network subnet which nodes running tasks + * from the job will join for the duration of the task. This is only supported + * for jobs running on VirtualMachineConfiguration pools. This is of the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. + * The virtual network must be in the same region and subscription as the Azure + * Batch account. The specified subnet should have enough free IP addresses to + * accommodate the number of nodes which will run tasks from the job. For more + * details, see + * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + * * @param {object} [cloudJobSchedule.jobSpecification.constraints] The * execution constraints for jobs created under this schedule. * @@ -18255,9 +17923,9 @@ export interface JobSchedule { * [cloudJobSchedule.jobSpecification.jobPreparationTask.constraints.retentionTime] * The minimum time to retain the task directory on the compute node where it * ran, from the time it completes execution. After this time, the Batch - * service may delete the task directory and all its contents. The default is - * infinite, i.e. the task directory will be retained until the compute node is - * removed or reimaged. + * service may delete the task directory and all its contents. The default is 7 + * days, i.e. the task directory will be retained for 7 days unless the compute + * node is removed or the job is deleted. * * @param {number} * [cloudJobSchedule.jobSpecification.jobPreparationTask.constraints.maxTaskRetryCount] @@ -18269,8 +17937,7 @@ export interface JobSchedule { * tries the task up to 4 times (one initial try and 3 retries). If the maximum * retry count is 0, the Batch service does not retry the task after the first * attempt. If the maximum retry count is -1, the Batch service retries the - * task without limit. Resource files and application packages are only - * downloaded again if the task is retried on a new compute node. + * task without limit. * * @param {boolean} * [cloudJobSchedule.jobSpecification.jobPreparationTask.waitForSuccess] @@ -18293,7 +17960,7 @@ export interface JobSchedule { * [cloudJobSchedule.jobSpecification.jobPreparationTask.userIdentity] The user * identity under which the Job Preparation task runs. If omitted, the task * runs as a non-administrative user unique to the task on Windows nodes, or a - * a non-administrative user unique to the pool on Linux nodes. + * non-administrative user unique to the pool on Linux nodes. * * @param {boolean} * [cloudJobSchedule.jobSpecification.jobPreparationTask.rerunOnNodeRebootAfterSuccess] @@ -18370,8 +18037,9 @@ export interface JobSchedule { * [cloudJobSchedule.jobSpecification.jobReleaseTask.retentionTime] The minimum * time to retain the task directory for the Job Release task on the compute * node. After this time, the Batch service may delete the task directory and - * all its contents. The default is infinite, i.e. the task directory will be - * retained until the compute node is removed or reimaged. + * all its contents. The default is 7 days, i.e. the task directory will be + * retained for 7 days unless the compute node is removed or the job is + * deleted. * * @param {object} * [cloudJobSchedule.jobSpecification.jobReleaseTask.userIdentity] The user @@ -18471,7 +18139,7 @@ export interface JobSchedule { * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * * @param {string} - * [cloudJobSchedule.jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] + * [cloudJobSchedule.jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osVersion] * The Azure Guest OS version to be installed on the virtual machines in the * pool. The default value is * which specifies the latest operating system * version for the specified OS family. @@ -18518,20 +18186,8 @@ export interface JobSchedule { * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName} * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * - * @param {object} - * [cloudJobSchedule.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * Settings for the operating system disk of the Virtual Machine. - * - * @param {string} - * [cloudJobSchedule.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The type of caching to enable for the OS disk. The default value for caching - * is readwrite. For information about the caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' + * Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. * * @param {string} * cloudJobSchedule.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId @@ -18547,8 +18203,7 @@ export interface JobSchedule { * @param {object} * [cloudJobSchedule.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] * Windows operating system settings on the virtual machine. This property must - * not be specified if the imageReference or osDisk property specifies a Linux - * OS image. + * not be specified if the imageReference property specifies a Linux OS image. * * @param {boolean} * [cloudJobSchedule.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] @@ -18683,26 +18338,17 @@ export interface JobSchedule { * Batch account. The specified subnet should have enough free IP addresses to * accommodate the number of nodes in the pool. If the subnet doesn't have * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks + * and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks * ('Microsoft.Network/virtualNetworks') are supported, but for pools created * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * + * @param {string} + * [cloudJobSchedule.jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.dynamicVNetAssignmentScope] + * The scope of dynamic vnet assignment. Possible values include: 'none', 'job' + * * @param {object} * [cloudJobSchedule.jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] * The configuration for endpoints on compute nodes in the Batch pool. Pool @@ -19146,9 +18792,9 @@ export interface Task { /** * @summary Adds a task to the specified job. * - * The maximum lifetime of a task from addition to completion is 7 days. If a - * task has not completed within 7 days of being added it will be terminated by - * the Batch service and left in whatever state it was in at that time. + * The maximum lifetime of a task from addition to completion is 180 days. If a + * task has not completed within 180 days of being added it will be terminated + * by the Batch service and left in whatever state it was in at that time. * * @param {string} jobId The ID of the job to which the task is to be added. * @@ -19232,7 +18878,7 @@ export interface Task { * code not listed in the exitCodes or exitCodeRanges collection, with a * pre-processing error if the preProcessingError property is not present, or * with a file upload error if the fileUploadError property is not present. If - * you want non-default behaviour on exit code 0, you must list it explicitly + * you want non-default behavior on exit code 0, you must list it explicitly * using the exitCodes or exitCodeRanges collection. * * @param {string} [task.exitConditions.default.jobAction] An action to take on @@ -19283,8 +18929,8 @@ export interface Task { * * @param {object} [task.constraints] The execution constraints that apply to * this task. If you do not specify constraints, the maxTaskRetryCount is the - * maxTaskRetryCount specified for the job, and the maxWallClockTime and - * retentionTime are infinite. + * maxTaskRetryCount specified for the job, the maxWallClockTime is infinite, + * and the retentionTime is 7 days. * * @param {moment.duration} [task.constraints.maxWallClockTime] The maximum * elapsed time that the task may run, measured from the time the task starts. @@ -19295,8 +18941,9 @@ export interface Task { * @param {moment.duration} [task.constraints.retentionTime] The minimum time * to retain the task directory on the compute node where it ran, from the time * it completes execution. After this time, the Batch service may delete the - * task directory and all its contents. The default is infinite, i.e. the task - * directory will be retained until the compute node is removed or reimaged. + * task directory and all its contents. The default is 7 days, i.e. the task + * directory will be retained for 7 days unless the compute node is removed or + * the job is deleted. * * @param {number} [task.constraints.maxTaskRetryCount] The maximum number of * times the task may be retried. The Batch service retries a task if its exit @@ -19307,8 +18954,6 @@ export interface Task { * (one initial try and 3 retries). If the maximum retry count is 0, the Batch * service does not retry the task after the first attempt. If the maximum * retry count is -1, the Batch service retries the task without limit. - * Resource files and application packages are only downloaded again if the - * task is retried on a new compute node. * * @param {object} [task.userIdentity] The user identity under which the task * runs. If omitted, the task runs as a non-administrative user unique to the @@ -19434,9 +19079,9 @@ export interface Task { /** * @summary Adds a task to the specified job. * - * The maximum lifetime of a task from addition to completion is 7 days. If a - * task has not completed within 7 days of being added it will be terminated by - * the Batch service and left in whatever state it was in at that time. + * The maximum lifetime of a task from addition to completion is 180 days. If a + * task has not completed within 180 days of being added it will be terminated + * by the Batch service and left in whatever state it was in at that time. * * @param {string} jobId The ID of the job to which the task is to be added. * @@ -19520,7 +19165,7 @@ export interface Task { * code not listed in the exitCodes or exitCodeRanges collection, with a * pre-processing error if the preProcessingError property is not present, or * with a file upload error if the fileUploadError property is not present. If - * you want non-default behaviour on exit code 0, you must list it explicitly + * you want non-default behavior on exit code 0, you must list it explicitly * using the exitCodes or exitCodeRanges collection. * * @param {string} [task.exitConditions.default.jobAction] An action to take on @@ -19571,8 +19216,8 @@ export interface Task { * * @param {object} [task.constraints] The execution constraints that apply to * this task. If you do not specify constraints, the maxTaskRetryCount is the - * maxTaskRetryCount specified for the job, and the maxWallClockTime and - * retentionTime are infinite. + * maxTaskRetryCount specified for the job, the maxWallClockTime is infinite, + * and the retentionTime is 7 days. * * @param {moment.duration} [task.constraints.maxWallClockTime] The maximum * elapsed time that the task may run, measured from the time the task starts. @@ -19583,8 +19228,9 @@ export interface Task { * @param {moment.duration} [task.constraints.retentionTime] The minimum time * to retain the task directory on the compute node where it ran, from the time * it completes execution. After this time, the Batch service may delete the - * task directory and all its contents. The default is infinite, i.e. the task - * directory will be retained until the compute node is removed or reimaged. + * task directory and all its contents. The default is 7 days, i.e. the task + * directory will be retained for 7 days unless the compute node is removed or + * the job is deleted. * * @param {number} [task.constraints.maxTaskRetryCount] The maximum number of * times the task may be retried. The Batch service retries a task if its exit @@ -19595,8 +19241,6 @@ export interface Task { * (one initial try and 3 retries). If the maximum retry count is 0, the Batch * service does not retry the task after the first attempt. If the maximum * retry count is -1, the Batch service retries the task without limit. - * Resource files and application packages are only downloaded again if the - * task is retried on a new compute node. * * @param {object} [task.userIdentity] The user identity under which the task * runs. If omitted, the task runs as a non-administrative user unique to the @@ -19873,7 +19517,7 @@ export interface Task { * client can retry the request. In a retry, it is most efficient to resubmit * only tasks that failed to add, and to omit tasks that were successfully * added on the first attempt. The maximum lifetime of a task from addition to - * completion is 7 days. If a task has not completed within 7 days of being + * completion is 180 days. If a task has not completed within 180 days of being * added it will be terminated by the Batch service and left in whatever state * it was in at that time. * @@ -19933,7 +19577,7 @@ export interface Task { * client can retry the request. In a retry, it is most efficient to resubmit * only tasks that failed to add, and to omit tasks that were successfully * added on the first attempt. The maximum lifetime of a task from addition to - * completion is 7 days. If a task has not completed within 7 days of being + * completion is 180 days. If a task has not completed within 180 days of being * added it will be terminated by the Batch service and left in whatever state * it was in at that time. * @@ -20318,9 +19962,9 @@ export interface Task { * @param {moment.duration} [options.constraints.retentionTime] The minimum * time to retain the task directory on the compute node where it ran, from the * time it completes execution. After this time, the Batch service may delete - * the task directory and all its contents. The default is infinite, i.e. the - * task directory will be retained until the compute node is removed or - * reimaged. + * the task directory and all its contents. The default is 7 days, i.e. the + * task directory will be retained for 7 days unless the compute node is + * removed or the job is deleted. * * @param {number} [options.constraints.maxTaskRetryCount] The maximum number * of times the task may be retried. The Batch service retries a task if its @@ -20331,8 +19975,6 @@ export interface Task { * (one initial try and 3 retries). If the maximum retry count is 0, the Batch * service does not retry the task after the first attempt. If the maximum * retry count is -1, the Batch service retries the task without limit. - * Resource files and application packages are only downloaded again if the - * task is retried on a new compute node. * * @param {object} [options.taskUpdateOptions] Additional parameters for the * operation @@ -20406,9 +20048,9 @@ export interface Task { * @param {moment.duration} [options.constraints.retentionTime] The minimum * time to retain the task directory on the compute node where it ran, from the * time it completes execution. After this time, the Batch service may delete - * the task directory and all its contents. The default is infinite, i.e. the - * task directory will be retained until the compute node is removed or - * reimaged. + * the task directory and all its contents. The default is 7 days, i.e. the + * task directory will be retained for 7 days unless the compute node is + * removed or the job is deleted. * * @param {number} [options.constraints.maxTaskRetryCount] The maximum number * of times the task may be retried. The Batch service retries a task if its @@ -20419,8 +20061,6 @@ export interface Task { * (one initial try and 3 retries). If the maximum retry count is 0, the Batch * service does not retry the task after the first attempt. If the maximum * retry count is -1, the Batch service retries the task without limit. - * Resource files and application packages are only downloaded again if the - * task is retried on a new compute node. * * @param {object} [options.taskUpdateOptions] Additional parameters for the * operation @@ -21265,7 +20905,7 @@ export interface ComputeNodeOperations { * @summary Updates the password and expiration time of a user account on the * specified compute node. * - * This operation replaces of all the updateable properties of the account. For + * This operation replaces of all the updatable properties of the account. For * example, if the expiryTime element is not specified, the current value is * replaced with the default value, not left unmodified. You can update a user * account on a node only when it is in the idle or running state. @@ -21335,7 +20975,7 @@ export interface ComputeNodeOperations { * @summary Updates the password and expiration time of a user account on the * specified compute node. * - * This operation replaces of all the updateable properties of the account. For + * This operation replaces of all the updatable properties of the account. For * example, if the expiryTime element is not specified, the current value is * replaced with the default value, not left unmodified. You can update a user * account on a node only when it is in the idle or running state. diff --git a/lib/services/batch/lib/operations/job.js b/lib/services/batch/lib/operations/job.js index 3da47f7115..fdbb2f0216 100644 --- a/lib/services/batch/lib/operations/job.js +++ b/lib/services/batch/lib/operations/job.js @@ -74,6 +74,9 @@ function _getAllLifetimeStatistics(options, callback) { let jobGetAllLifetimeStatisticsOptions = (options && options.jobGetAllLifetimeStatisticsOptions !== undefined) ? options.jobGetAllLifetimeStatisticsOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); } @@ -124,6 +127,7 @@ function _getAllLifetimeStatistics(options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'lifetimejobstats'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (timeout !== null && timeout !== undefined) { @@ -302,6 +306,9 @@ function _deleteMethod(jobId, options, callback) { let jobDeleteMethodOptions = (options && options.jobDeleteMethodOptions !== undefined) ? options.jobDeleteMethodOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (jobId === null || jobId === undefined || typeof jobId.valueOf() !== 'string') { throw new Error('jobId cannot be null or undefined and it must be of type string.'); } @@ -389,6 +396,7 @@ function _deleteMethod(jobId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'jobs/{jobId}'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{jobId}', encodeURIComponent(jobId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -559,6 +567,9 @@ function _get(jobId, options, callback) { let jobGetOptions = (options && options.jobGetOptions !== undefined) ? options.jobGetOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (jobId === null || jobId === undefined || typeof jobId.valueOf() !== 'string') { throw new Error('jobId cannot be null or undefined and it must be of type string.'); } @@ -662,6 +673,7 @@ function _get(jobId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'jobs/{jobId}'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{jobId}', encodeURIComponent(jobId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -911,7 +923,7 @@ function _get(jobId, options, callback) { * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * * @param {string} - * [jobPatchParameter.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] + * [jobPatchParameter.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osVersion] * The Azure Guest OS version to be installed on the virtual machines in the * pool. The default value is * which specifies the latest operating system * version for the specified OS family. @@ -958,20 +970,8 @@ function _get(jobId, options, callback) { * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName} * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * - * @param {object} - * [jobPatchParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * Settings for the operating system disk of the Virtual Machine. - * - * @param {string} - * [jobPatchParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The type of caching to enable for the OS disk. The default value for caching - * is readwrite. For information about the caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' + * Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. * * @param {string} * jobPatchParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId @@ -987,8 +987,7 @@ function _get(jobId, options, callback) { * @param {object} * [jobPatchParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] * Windows operating system settings on the virtual machine. This property must - * not be specified if the imageReference or osDisk property specifies a Linux - * OS image. + * not be specified if the imageReference property specifies a Linux OS image. * * @param {boolean} * [jobPatchParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] @@ -1123,26 +1122,17 @@ function _get(jobId, options, callback) { * Batch account. The specified subnet should have enough free IP addresses to * accommodate the number of nodes in the pool. If the subnet doesn't have * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks + * and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks * ('Microsoft.Network/virtualNetworks') are supported, but for pools created * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * + * @param {string} + * [jobPatchParameter.poolInfo.autoPoolSpecification.pool.networkConfiguration.dynamicVNetAssignmentScope] + * The scope of dynamic vnet assignment. Possible values include: 'none', 'job' + * * @param {object} * [jobPatchParameter.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] * The configuration for endpoints on compute nodes in the Batch pool. Pool @@ -1388,6 +1378,9 @@ function _patch(jobId, jobPatchParameter, options, callback) { } // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (jobId === null || jobId === undefined || typeof jobId.valueOf() !== 'string') { throw new Error('jobId cannot be null or undefined and it must be of type string.'); } @@ -1478,6 +1471,7 @@ function _patch(jobId, jobPatchParameter, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'jobs/{jobId}'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{jobId}', encodeURIComponent(jobId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -1587,8 +1581,8 @@ function _patch(jobId, jobPatchParameter, options, callback) { /** * @summary Updates the properties of the specified job. * - * This fully replaces all the updateable properties of the job. For example, - * if the job has constraints associated with it and if constraints is not + * This fully replaces all the updatable properties of the job. For example, if + * the job has constraints associated with it and if constraints is not * specified with this request, then the Batch service will remove the existing * constraints. * @@ -1710,7 +1704,7 @@ function _patch(jobId, jobPatchParameter, options, callback) { * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * * @param {string} - * [jobUpdateParameter.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] + * [jobUpdateParameter.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osVersion] * The Azure Guest OS version to be installed on the virtual machines in the * pool. The default value is * which specifies the latest operating system * version for the specified OS family. @@ -1757,20 +1751,8 @@ function _patch(jobId, jobPatchParameter, options, callback) { * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName} * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * - * @param {object} - * [jobUpdateParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * Settings for the operating system disk of the Virtual Machine. - * - * @param {string} - * [jobUpdateParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The type of caching to enable for the OS disk. The default value for caching - * is readwrite. For information about the caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' + * Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. * * @param {string} * jobUpdateParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId @@ -1786,8 +1768,7 @@ function _patch(jobId, jobPatchParameter, options, callback) { * @param {object} * [jobUpdateParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] * Windows operating system settings on the virtual machine. This property must - * not be specified if the imageReference or osDisk property specifies a Linux - * OS image. + * not be specified if the imageReference property specifies a Linux OS image. * * @param {boolean} * [jobUpdateParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] @@ -1922,26 +1903,17 @@ function _patch(jobId, jobPatchParameter, options, callback) { * Batch account. The specified subnet should have enough free IP addresses to * accommodate the number of nodes in the pool. If the subnet doesn't have * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks + * and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks * ('Microsoft.Network/virtualNetworks') are supported, but for pools created * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * + * @param {string} + * [jobUpdateParameter.poolInfo.autoPoolSpecification.pool.networkConfiguration.dynamicVNetAssignmentScope] + * The scope of dynamic vnet assignment. Possible values include: 'none', 'job' + * * @param {object} * [jobUpdateParameter.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] * The configuration for endpoints on compute nodes in the Batch pool. Pool @@ -2200,6 +2172,9 @@ function _update(jobId, jobUpdateParameter, options, callback) { } // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (jobId === null || jobId === undefined || typeof jobId.valueOf() !== 'string') { throw new Error('jobId cannot be null or undefined and it must be of type string.'); } @@ -2290,6 +2265,7 @@ function _update(jobId, jobUpdateParameter, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'jobs/{jobId}'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{jobId}', encodeURIComponent(jobId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -2481,6 +2457,9 @@ function _disable(jobId, disableTasks, options, callback) { let jobDisableOptions = (options && options.jobDisableOptions !== undefined) ? options.jobDisableOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (jobId === null || jobId === undefined || typeof jobId.valueOf() !== 'string') { throw new Error('jobId cannot be null or undefined and it must be of type string.'); } @@ -2581,6 +2560,7 @@ function _disable(jobId, disableTasks, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'jobs/{jobId}/disable'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{jobId}', encodeURIComponent(jobId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -2693,9 +2673,9 @@ function _disable(jobId, disableTasks, options, callback) { * When you call this API, the Batch service sets a disabled job to the * enabling state. After the this operation is completed, the job moves to the * active state, and scheduling of new tasks under the job resumes. The Batch - * service does not allow a task to remain in the active state for more than 7 - * days. Therefore, if you enable a job containing active tasks which were - * added more than 7 days ago, those tasks will not run. + * service does not allow a task to remain in the active state for more than + * 180 days. Therefore, if you enable a job containing active tasks which were + * added more than 180 days ago, those tasks will not run. * * @param {string} jobId The ID of the job to enable. * @@ -2767,6 +2747,9 @@ function _enable(jobId, options, callback) { let jobEnableOptions = (options && options.jobEnableOptions !== undefined) ? options.jobEnableOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (jobId === null || jobId === undefined || typeof jobId.valueOf() !== 'string') { throw new Error('jobId cannot be null or undefined and it must be of type string.'); } @@ -2854,6 +2837,7 @@ function _enable(jobId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'jobs/{jobId}/enable'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{jobId}', encodeURIComponent(jobId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -3031,6 +3015,9 @@ function _terminate(jobId, options, callback) { let jobTerminateOptions = (options && options.jobTerminateOptions !== undefined) ? options.jobTerminateOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (jobId === null || jobId === undefined || typeof jobId.valueOf() !== 'string') { throw new Error('jobId cannot be null or undefined and it must be of type string.'); } @@ -3127,6 +3114,7 @@ function _terminate(jobId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'jobs/{jobId}/terminate'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{jobId}', encodeURIComponent(jobId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -3456,9 +3444,9 @@ function _terminate(jobId, options, callback) { * @param {moment.duration} [job.jobPreparationTask.constraints.retentionTime] * The minimum time to retain the task directory on the compute node where it * ran, from the time it completes execution. After this time, the Batch - * service may delete the task directory and all its contents. The default is - * infinite, i.e. the task directory will be retained until the compute node is - * removed or reimaged. + * service may delete the task directory and all its contents. The default is 7 + * days, i.e. the task directory will be retained for 7 days unless the compute + * node is removed or the job is deleted. * * @param {number} [job.jobPreparationTask.constraints.maxTaskRetryCount] The * maximum number of times the task may be retried. The Batch service retries a @@ -3469,8 +3457,6 @@ function _terminate(jobId, options, callback) { * to 4 times (one initial try and 3 retries). If the maximum retry count is 0, * the Batch service does not retry the task after the first attempt. If the * maximum retry count is -1, the Batch service retries the task without limit. - * Resource files and application packages are only downloaded again if the - * task is retried on a new compute node. * * @param {boolean} [job.jobPreparationTask.waitForSuccess] Whether the Batch * service should wait for the Job Preparation task to complete successfully @@ -3489,7 +3475,7 @@ function _terminate(jobId, options, callback) { * * @param {object} [job.jobPreparationTask.userIdentity] The user identity * under which the Job Preparation task runs. If omitted, the task runs as a - * non-administrative user unique to the task on Windows nodes, or a a + * non-administrative user unique to the task on Windows nodes, or a * non-administrative user unique to the pool on Linux nodes. * * @param {boolean} [job.jobPreparationTask.rerunOnNodeRebootAfterSuccess] @@ -3558,8 +3544,8 @@ function _terminate(jobId, options, callback) { * @param {moment.duration} [job.jobReleaseTask.retentionTime] The minimum time * to retain the task directory for the Job Release task on the compute node. * After this time, the Batch service may delete the task directory and all its - * contents. The default is infinite, i.e. the task directory will be retained - * until the compute node is removed or reimaged. + * contents. The default is 7 days, i.e. the task directory will be retained + * for 7 days unless the compute node is removed or the job is deleted. * * @param {object} [job.jobReleaseTask.userIdentity] The user identity under * which the Job Release task runs. If omitted, the task runs as a @@ -3647,7 +3633,7 @@ function _terminate(jobId, options, callback) { * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * * @param {string} - * [job.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] + * [job.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osVersion] * The Azure Guest OS version to be installed on the virtual machines in the * pool. The default value is * which specifies the latest operating system * version for the specified OS family. @@ -3694,20 +3680,8 @@ function _terminate(jobId, options, callback) { * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName} * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * - * @param {object} - * [job.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * Settings for the operating system disk of the Virtual Machine. - * - * @param {string} - * [job.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The type of caching to enable for the OS disk. The default value for caching - * is readwrite. For information about the caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' + * Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. * * @param {string} * job.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId @@ -3723,8 +3697,7 @@ function _terminate(jobId, options, callback) { * @param {object} * [job.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] * Windows operating system settings on the virtual machine. This property must - * not be specified if the imageReference or osDisk property specifies a Linux - * OS image. + * not be specified if the imageReference property specifies a Linux OS image. * * @param {boolean} * [job.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] @@ -3856,26 +3829,17 @@ function _terminate(jobId, options, callback) { * Batch account. The specified subnet should have enough free IP addresses to * accommodate the number of nodes in the pool. If the subnet doesn't have * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks + * and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks * ('Microsoft.Network/virtualNetworks') are supported, but for pools created * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * + * @param {string} + * [job.poolInfo.autoPoolSpecification.pool.networkConfiguration.dynamicVNetAssignmentScope] + * The scope of dynamic vnet assignment. Possible values include: 'none', 'job' + * * @param {object} * [job.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] * The configuration for endpoints on compute nodes in the Batch pool. Pool @@ -4062,6 +4026,20 @@ function _terminate(jobId, options, callback) { * @param {boolean} [job.usesTaskDependencies] Whether tasks in the job can * define dependencies on each other. The default is false. * + * @param {object} [job.networkConfiguration] The network configuration for the + * job. + * + * @param {string} job.networkConfiguration.subnetId The ARM resource + * identifier of the virtual network subnet which nodes running tasks from the + * job will join for the duration of the task. This is only supported for jobs + * running on VirtualMachineConfiguration pools. This is of the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. + * The virtual network must be in the same region and subscription as the Azure + * Batch account. The specified subnet should have enough free IP addresses to + * accommodate the number of nodes which will run tasks from the job. For more + * details, see + * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.jobAddOptions] Additional parameters for the @@ -4114,6 +4092,9 @@ function _add(job, options, callback) { } // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (job === null || job === undefined) { throw new Error('job cannot be null or undefined.'); } @@ -4167,6 +4148,7 @@ function _add(job, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'jobs'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (timeout !== null && timeout !== undefined) { @@ -4323,6 +4305,9 @@ function _list(options, callback) { let jobListOptions = (options && options.jobListOptions !== undefined) ? options.jobListOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); } @@ -4405,6 +4390,7 @@ function _list(options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'jobs'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (filter !== null && filter !== undefined) { @@ -4585,6 +4571,9 @@ function _listFromJobSchedule(jobScheduleId, options, callback) { let jobListFromJobScheduleOptions = (options && options.jobListFromJobScheduleOptions !== undefined) ? options.jobListFromJobScheduleOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (jobScheduleId === null || jobScheduleId === undefined || typeof jobScheduleId.valueOf() !== 'string') { throw new Error('jobScheduleId cannot be null or undefined and it must be of type string.'); } @@ -4670,6 +4659,7 @@ function _listFromJobSchedule(jobScheduleId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'jobschedules/{jobScheduleId}/jobs'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{jobScheduleId}', encodeURIComponent(jobScheduleId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -4862,6 +4852,9 @@ function _listPreparationAndReleaseTaskStatus(jobId, options, callback) { let jobListPreparationAndReleaseTaskStatusOptions = (options && options.jobListPreparationAndReleaseTaskStatusOptions !== undefined) ? options.jobListPreparationAndReleaseTaskStatusOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (jobId === null || jobId === undefined || typeof jobId.valueOf() !== 'string') { throw new Error('jobId cannot be null or undefined and it must be of type string.'); } @@ -4939,6 +4932,7 @@ function _listPreparationAndReleaseTaskStatus(jobId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'jobs/{jobId}/jobpreparationandreleasetaskstatus'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{jobId}', encodeURIComponent(jobId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -5103,6 +5097,9 @@ function _getTaskCounts(jobId, options, callback) { let jobGetTaskCountsOptions = (options && options.jobGetTaskCountsOptions !== undefined) ? options.jobGetTaskCountsOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (jobId === null || jobId === undefined || typeof jobId.valueOf() !== 'string') { throw new Error('jobId cannot be null or undefined and it must be of type string.'); } @@ -5156,6 +5153,7 @@ function _getTaskCounts(jobId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'jobs/{jobId}/taskcounts'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{jobId}', encodeURIComponent(jobId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -6444,7 +6442,7 @@ class Job { * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * * @param {string} - * [jobPatchParameter.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] + * [jobPatchParameter.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osVersion] * The Azure Guest OS version to be installed on the virtual machines in the * pool. The default value is * which specifies the latest operating system * version for the specified OS family. @@ -6491,20 +6489,8 @@ class Job { * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName} * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * - * @param {object} - * [jobPatchParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * Settings for the operating system disk of the Virtual Machine. - * - * @param {string} - * [jobPatchParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The type of caching to enable for the OS disk. The default value for caching - * is readwrite. For information about the caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' + * Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. * * @param {string} * jobPatchParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId @@ -6520,8 +6506,7 @@ class Job { * @param {object} * [jobPatchParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] * Windows operating system settings on the virtual machine. This property must - * not be specified if the imageReference or osDisk property specifies a Linux - * OS image. + * not be specified if the imageReference property specifies a Linux OS image. * * @param {boolean} * [jobPatchParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] @@ -6656,26 +6641,17 @@ class Job { * Batch account. The specified subnet should have enough free IP addresses to * accommodate the number of nodes in the pool. If the subnet doesn't have * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks + * and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks * ('Microsoft.Network/virtualNetworks') are supported, but for pools created * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * + * @param {string} + * [jobPatchParameter.poolInfo.autoPoolSpecification.pool.networkConfiguration.dynamicVNetAssignmentScope] + * The scope of dynamic vnet assignment. Possible values include: 'none', 'job' + * * @param {object} * [jobPatchParameter.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] * The configuration for endpoints on compute nodes in the Batch pool. Pool @@ -7046,7 +7022,7 @@ class Job { * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * * @param {string} - * [jobPatchParameter.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] + * [jobPatchParameter.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osVersion] * The Azure Guest OS version to be installed on the virtual machines in the * pool. The default value is * which specifies the latest operating system * version for the specified OS family. @@ -7093,20 +7069,8 @@ class Job { * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName} * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * - * @param {object} - * [jobPatchParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * Settings for the operating system disk of the Virtual Machine. - * - * @param {string} - * [jobPatchParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The type of caching to enable for the OS disk. The default value for caching - * is readwrite. For information about the caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' + * Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. * * @param {string} * jobPatchParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId @@ -7122,8 +7086,7 @@ class Job { * @param {object} * [jobPatchParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] * Windows operating system settings on the virtual machine. This property must - * not be specified if the imageReference or osDisk property specifies a Linux - * OS image. + * not be specified if the imageReference property specifies a Linux OS image. * * @param {boolean} * [jobPatchParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] @@ -7258,26 +7221,17 @@ class Job { * Batch account. The specified subnet should have enough free IP addresses to * accommodate the number of nodes in the pool. If the subnet doesn't have * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks + * and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks * ('Microsoft.Network/virtualNetworks') are supported, but for pools created * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * + * @param {string} + * [jobPatchParameter.poolInfo.autoPoolSpecification.pool.networkConfiguration.dynamicVNetAssignmentScope] + * The scope of dynamic vnet assignment. Possible values include: 'none', 'job' + * * @param {object} * [jobPatchParameter.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] * The configuration for endpoints on compute nodes in the Batch pool. Pool @@ -7538,8 +7492,8 @@ class Job { /** * @summary Updates the properties of the specified job. * - * This fully replaces all the updateable properties of the job. For example, - * if the job has constraints associated with it and if constraints is not + * This fully replaces all the updatable properties of the job. For example, if + * the job has constraints associated with it and if constraints is not * specified with this request, then the Batch service will remove the existing * constraints. * @@ -7661,7 +7615,7 @@ class Job { * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * * @param {string} - * [jobUpdateParameter.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] + * [jobUpdateParameter.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osVersion] * The Azure Guest OS version to be installed on the virtual machines in the * pool. The default value is * which specifies the latest operating system * version for the specified OS family. @@ -7708,20 +7662,8 @@ class Job { * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName} * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * - * @param {object} - * [jobUpdateParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * Settings for the operating system disk of the Virtual Machine. - * - * @param {string} - * [jobUpdateParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The type of caching to enable for the OS disk. The default value for caching - * is readwrite. For information about the caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' + * Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. * * @param {string} * jobUpdateParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId @@ -7737,8 +7679,7 @@ class Job { * @param {object} * [jobUpdateParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] * Windows operating system settings on the virtual machine. This property must - * not be specified if the imageReference or osDisk property specifies a Linux - * OS image. + * not be specified if the imageReference property specifies a Linux OS image. * * @param {boolean} * [jobUpdateParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] @@ -7873,26 +7814,17 @@ class Job { * Batch account. The specified subnet should have enough free IP addresses to * accommodate the number of nodes in the pool. If the subnet doesn't have * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks + * and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks * ('Microsoft.Network/virtualNetworks') are supported, but for pools created * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * + * @param {string} + * [jobUpdateParameter.poolInfo.autoPoolSpecification.pool.networkConfiguration.dynamicVNetAssignmentScope] + * The scope of dynamic vnet assignment. Possible values include: 'none', 'job' + * * @param {object} * [jobUpdateParameter.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] * The configuration for endpoints on compute nodes in the Batch pool. Pool @@ -8145,8 +8077,8 @@ class Job { /** * @summary Updates the properties of the specified job. * - * This fully replaces all the updateable properties of the job. For example, - * if the job has constraints associated with it and if constraints is not + * This fully replaces all the updatable properties of the job. For example, if + * the job has constraints associated with it and if constraints is not * specified with this request, then the Batch service will remove the existing * constraints. * @@ -8268,7 +8200,7 @@ class Job { * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * * @param {string} - * [jobUpdateParameter.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] + * [jobUpdateParameter.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osVersion] * The Azure Guest OS version to be installed on the virtual machines in the * pool. The default value is * which specifies the latest operating system * version for the specified OS family. @@ -8315,20 +8247,8 @@ class Job { * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName} * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * - * @param {object} - * [jobUpdateParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * Settings for the operating system disk of the Virtual Machine. - * - * @param {string} - * [jobUpdateParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The type of caching to enable for the OS disk. The default value for caching - * is readwrite. For information about the caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' + * Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. * * @param {string} * jobUpdateParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId @@ -8344,8 +8264,7 @@ class Job { * @param {object} * [jobUpdateParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] * Windows operating system settings on the virtual machine. This property must - * not be specified if the imageReference or osDisk property specifies a Linux - * OS image. + * not be specified if the imageReference property specifies a Linux OS image. * * @param {boolean} * [jobUpdateParameter.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] @@ -8480,26 +8399,17 @@ class Job { * Batch account. The specified subnet should have enough free IP addresses to * accommodate the number of nodes in the pool. If the subnet doesn't have * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks + * and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks * ('Microsoft.Network/virtualNetworks') are supported, but for pools created * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * + * @param {string} + * [jobUpdateParameter.poolInfo.autoPoolSpecification.pool.networkConfiguration.dynamicVNetAssignmentScope] + * The scope of dynamic vnet assignment. Possible values include: 'none', 'job' + * * @param {object} * [jobUpdateParameter.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] * The configuration for endpoints on compute nodes in the Batch pool. Pool @@ -8957,9 +8867,9 @@ class Job { * When you call this API, the Batch service sets a disabled job to the * enabling state. After the this operation is completed, the job moves to the * active state, and scheduling of new tasks under the job resumes. The Batch - * service does not allow a task to remain in the active state for more than 7 - * days. Therefore, if you enable a job containing active tasks which were - * added more than 7 days ago, those tasks will not run. + * service does not allow a task to remain in the active state for more than + * 180 days. Therefore, if you enable a job containing active tasks which were + * added more than 180 days ago, those tasks will not run. * * @param {string} jobId The ID of the job to enable. * @@ -9032,9 +8942,9 @@ class Job { * When you call this API, the Batch service sets a disabled job to the * enabling state. After the this operation is completed, the job moves to the * active state, and scheduling of new tasks under the job resumes. The Batch - * service does not allow a task to remain in the active state for more than 7 - * days. Therefore, if you enable a job containing active tasks which were - * added more than 7 days ago, those tasks will not run. + * service does not allow a task to remain in the active state for more than + * 180 days. Therefore, if you enable a job containing active tasks which were + * added more than 180 days ago, those tasks will not run. * * @param {string} jobId The ID of the job to enable. * @@ -9524,9 +9434,9 @@ class Job { * @param {moment.duration} [job.jobPreparationTask.constraints.retentionTime] * The minimum time to retain the task directory on the compute node where it * ran, from the time it completes execution. After this time, the Batch - * service may delete the task directory and all its contents. The default is - * infinite, i.e. the task directory will be retained until the compute node is - * removed or reimaged. + * service may delete the task directory and all its contents. The default is 7 + * days, i.e. the task directory will be retained for 7 days unless the compute + * node is removed or the job is deleted. * * @param {number} [job.jobPreparationTask.constraints.maxTaskRetryCount] The * maximum number of times the task may be retried. The Batch service retries a @@ -9537,8 +9447,6 @@ class Job { * to 4 times (one initial try and 3 retries). If the maximum retry count is 0, * the Batch service does not retry the task after the first attempt. If the * maximum retry count is -1, the Batch service retries the task without limit. - * Resource files and application packages are only downloaded again if the - * task is retried on a new compute node. * * @param {boolean} [job.jobPreparationTask.waitForSuccess] Whether the Batch * service should wait for the Job Preparation task to complete successfully @@ -9557,7 +9465,7 @@ class Job { * * @param {object} [job.jobPreparationTask.userIdentity] The user identity * under which the Job Preparation task runs. If omitted, the task runs as a - * non-administrative user unique to the task on Windows nodes, or a a + * non-administrative user unique to the task on Windows nodes, or a * non-administrative user unique to the pool on Linux nodes. * * @param {boolean} [job.jobPreparationTask.rerunOnNodeRebootAfterSuccess] @@ -9626,8 +9534,8 @@ class Job { * @param {moment.duration} [job.jobReleaseTask.retentionTime] The minimum time * to retain the task directory for the Job Release task on the compute node. * After this time, the Batch service may delete the task directory and all its - * contents. The default is infinite, i.e. the task directory will be retained - * until the compute node is removed or reimaged. + * contents. The default is 7 days, i.e. the task directory will be retained + * for 7 days unless the compute node is removed or the job is deleted. * * @param {object} [job.jobReleaseTask.userIdentity] The user identity under * which the Job Release task runs. If omitted, the task runs as a @@ -9715,7 +9623,7 @@ class Job { * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * * @param {string} - * [job.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] + * [job.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osVersion] * The Azure Guest OS version to be installed on the virtual machines in the * pool. The default value is * which specifies the latest operating system * version for the specified OS family. @@ -9762,20 +9670,8 @@ class Job { * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName} * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * - * @param {object} - * [job.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * Settings for the operating system disk of the Virtual Machine. - * - * @param {string} - * [job.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The type of caching to enable for the OS disk. The default value for caching - * is readwrite. For information about the caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' + * Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. * * @param {string} * job.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId @@ -9791,8 +9687,7 @@ class Job { * @param {object} * [job.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] * Windows operating system settings on the virtual machine. This property must - * not be specified if the imageReference or osDisk property specifies a Linux - * OS image. + * not be specified if the imageReference property specifies a Linux OS image. * * @param {boolean} * [job.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] @@ -9924,26 +9819,17 @@ class Job { * Batch account. The specified subnet should have enough free IP addresses to * accommodate the number of nodes in the pool. If the subnet doesn't have * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks + * and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks * ('Microsoft.Network/virtualNetworks') are supported, but for pools created * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * + * @param {string} + * [job.poolInfo.autoPoolSpecification.pool.networkConfiguration.dynamicVNetAssignmentScope] + * The scope of dynamic vnet assignment. Possible values include: 'none', 'job' + * * @param {object} * [job.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] * The configuration for endpoints on compute nodes in the Batch pool. Pool @@ -10130,6 +10016,20 @@ class Job { * @param {boolean} [job.usesTaskDependencies] Whether tasks in the job can * define dependencies on each other. The default is false. * + * @param {object} [job.networkConfiguration] The network configuration for the + * job. + * + * @param {string} job.networkConfiguration.subnetId The ARM resource + * identifier of the virtual network subnet which nodes running tasks from the + * job will join for the duration of the task. This is only supported for jobs + * running on VirtualMachineConfiguration pools. This is of the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. + * The virtual network must be in the same region and subscription as the Azure + * Batch account. The specified subnet should have enough free IP addresses to + * accommodate the number of nodes which will run tasks from the job. For more + * details, see + * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.jobAddOptions] Additional parameters for the @@ -10396,9 +10296,9 @@ class Job { * @param {moment.duration} [job.jobPreparationTask.constraints.retentionTime] * The minimum time to retain the task directory on the compute node where it * ran, from the time it completes execution. After this time, the Batch - * service may delete the task directory and all its contents. The default is - * infinite, i.e. the task directory will be retained until the compute node is - * removed or reimaged. + * service may delete the task directory and all its contents. The default is 7 + * days, i.e. the task directory will be retained for 7 days unless the compute + * node is removed or the job is deleted. * * @param {number} [job.jobPreparationTask.constraints.maxTaskRetryCount] The * maximum number of times the task may be retried. The Batch service retries a @@ -10409,8 +10309,6 @@ class Job { * to 4 times (one initial try and 3 retries). If the maximum retry count is 0, * the Batch service does not retry the task after the first attempt. If the * maximum retry count is -1, the Batch service retries the task without limit. - * Resource files and application packages are only downloaded again if the - * task is retried on a new compute node. * * @param {boolean} [job.jobPreparationTask.waitForSuccess] Whether the Batch * service should wait for the Job Preparation task to complete successfully @@ -10429,7 +10327,7 @@ class Job { * * @param {object} [job.jobPreparationTask.userIdentity] The user identity * under which the Job Preparation task runs. If omitted, the task runs as a - * non-administrative user unique to the task on Windows nodes, or a a + * non-administrative user unique to the task on Windows nodes, or a * non-administrative user unique to the pool on Linux nodes. * * @param {boolean} [job.jobPreparationTask.rerunOnNodeRebootAfterSuccess] @@ -10498,8 +10396,8 @@ class Job { * @param {moment.duration} [job.jobReleaseTask.retentionTime] The minimum time * to retain the task directory for the Job Release task on the compute node. * After this time, the Batch service may delete the task directory and all its - * contents. The default is infinite, i.e. the task directory will be retained - * until the compute node is removed or reimaged. + * contents. The default is 7 days, i.e. the task directory will be retained + * for 7 days unless the compute node is removed or the job is deleted. * * @param {object} [job.jobReleaseTask.userIdentity] The user identity under * which the Job Release task runs. If omitted, the task runs as a @@ -10587,7 +10485,7 @@ class Job { * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * * @param {string} - * [job.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] + * [job.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osVersion] * The Azure Guest OS version to be installed on the virtual machines in the * pool. The default value is * which specifies the latest operating system * version for the specified OS family. @@ -10634,20 +10532,8 @@ class Job { * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName} * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * - * @param {object} - * [job.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * Settings for the operating system disk of the Virtual Machine. - * - * @param {string} - * [job.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The type of caching to enable for the OS disk. The default value for caching - * is readwrite. For information about the caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' + * Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. * * @param {string} * job.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId @@ -10663,8 +10549,7 @@ class Job { * @param {object} * [job.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] * Windows operating system settings on the virtual machine. This property must - * not be specified if the imageReference or osDisk property specifies a Linux - * OS image. + * not be specified if the imageReference property specifies a Linux OS image. * * @param {boolean} * [job.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] @@ -10796,26 +10681,17 @@ class Job { * Batch account. The specified subnet should have enough free IP addresses to * accommodate the number of nodes in the pool. If the subnet doesn't have * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks + * and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks * ('Microsoft.Network/virtualNetworks') are supported, but for pools created * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * + * @param {string} + * [job.poolInfo.autoPoolSpecification.pool.networkConfiguration.dynamicVNetAssignmentScope] + * The scope of dynamic vnet assignment. Possible values include: 'none', 'job' + * * @param {object} * [job.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] * The configuration for endpoints on compute nodes in the Batch pool. Pool @@ -11002,6 +10878,20 @@ class Job { * @param {boolean} [job.usesTaskDependencies] Whether tasks in the job can * define dependencies on each other. The default is false. * + * @param {object} [job.networkConfiguration] The network configuration for the + * job. + * + * @param {string} job.networkConfiguration.subnetId The ARM resource + * identifier of the virtual network subnet which nodes running tasks from the + * job will join for the duration of the task. This is only supported for jobs + * running on VirtualMachineConfiguration pools. This is of the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. + * The virtual network must be in the same region and subscription as the Azure + * Batch account. The specified subnet should have enough free IP addresses to + * accommodate the number of nodes which will run tasks from the job. For more + * details, see + * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.jobAddOptions] Additional parameters for the diff --git a/lib/services/batch/lib/operations/jobSchedule.js b/lib/services/batch/lib/operations/jobSchedule.js index dfb682eef2..83f1306be0 100644 --- a/lib/services/batch/lib/operations/jobSchedule.js +++ b/lib/services/batch/lib/operations/jobSchedule.js @@ -89,6 +89,9 @@ function _exists(jobScheduleId, options, callback) { let jobScheduleExistsOptions = (options && options.jobScheduleExistsOptions !== undefined) ? options.jobScheduleExistsOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (jobScheduleId === null || jobScheduleId === undefined || typeof jobScheduleId.valueOf() !== 'string') { throw new Error('jobScheduleId cannot be null or undefined and it must be of type string.'); } @@ -176,6 +179,7 @@ function _exists(jobScheduleId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'jobschedules/{jobScheduleId}'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{jobScheduleId}', encodeURIComponent(jobScheduleId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -351,6 +355,9 @@ function _deleteMethod(jobScheduleId, options, callback) { let jobScheduleDeleteMethodOptions = (options && options.jobScheduleDeleteMethodOptions !== undefined) ? options.jobScheduleDeleteMethodOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (jobScheduleId === null || jobScheduleId === undefined || typeof jobScheduleId.valueOf() !== 'string') { throw new Error('jobScheduleId cannot be null or undefined and it must be of type string.'); } @@ -438,6 +445,7 @@ function _deleteMethod(jobScheduleId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'jobschedules/{jobScheduleId}'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{jobScheduleId}', encodeURIComponent(jobScheduleId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -610,6 +618,9 @@ function _get(jobScheduleId, options, callback) { let jobScheduleGetOptions = (options && options.jobScheduleGetOptions !== undefined) ? options.jobScheduleGetOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (jobScheduleId === null || jobScheduleId === undefined || typeof jobScheduleId.valueOf() !== 'string') { throw new Error('jobScheduleId cannot be null or undefined and it must be of type string.'); } @@ -713,6 +724,7 @@ function _get(jobScheduleId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'jobschedules/{jobScheduleId}'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{jobScheduleId}', encodeURIComponent(jobScheduleId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -932,6 +944,23 @@ function _get(jobScheduleId, options, callback) { * The default is noaction. Possible values include: 'noAction', * 'performExitOptionsJobAction' * + * @param {object} + * [jobSchedulePatchParameter.jobSpecification.networkConfiguration] The + * network configuration for the job. + * + * @param {string} + * jobSchedulePatchParameter.jobSpecification.networkConfiguration.subnetId The + * ARM resource identifier of the virtual network subnet which nodes running + * tasks from the job will join for the duration of the task. This is only + * supported for jobs running on VirtualMachineConfiguration pools. This is of + * the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. + * The virtual network must be in the same region and subscription as the Azure + * Batch account. The specified subnet should have enough free IP addresses to + * accommodate the number of nodes which will run tasks from the job. For more + * details, see + * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + * * @param {object} [jobSchedulePatchParameter.jobSpecification.constraints] The * execution constraints for jobs created under this schedule. * @@ -1152,9 +1181,9 @@ function _get(jobScheduleId, options, callback) { * [jobSchedulePatchParameter.jobSpecification.jobPreparationTask.constraints.retentionTime] * The minimum time to retain the task directory on the compute node where it * ran, from the time it completes execution. After this time, the Batch - * service may delete the task directory and all its contents. The default is - * infinite, i.e. the task directory will be retained until the compute node is - * removed or reimaged. + * service may delete the task directory and all its contents. The default is 7 + * days, i.e. the task directory will be retained for 7 days unless the compute + * node is removed or the job is deleted. * * @param {number} * [jobSchedulePatchParameter.jobSpecification.jobPreparationTask.constraints.maxTaskRetryCount] @@ -1166,8 +1195,7 @@ function _get(jobScheduleId, options, callback) { * tries the task up to 4 times (one initial try and 3 retries). If the maximum * retry count is 0, the Batch service does not retry the task after the first * attempt. If the maximum retry count is -1, the Batch service retries the - * task without limit. Resource files and application packages are only - * downloaded again if the task is retried on a new compute node. + * task without limit. * * @param {boolean} * [jobSchedulePatchParameter.jobSpecification.jobPreparationTask.waitForSuccess] @@ -1190,7 +1218,7 @@ function _get(jobScheduleId, options, callback) { * [jobSchedulePatchParameter.jobSpecification.jobPreparationTask.userIdentity] * The user identity under which the Job Preparation task runs. If omitted, the * task runs as a non-administrative user unique to the task on Windows nodes, - * or a a non-administrative user unique to the pool on Linux nodes. + * or a non-administrative user unique to the pool on Linux nodes. * * @param {boolean} * [jobSchedulePatchParameter.jobSpecification.jobPreparationTask.rerunOnNodeRebootAfterSuccess] @@ -1268,8 +1296,9 @@ function _get(jobScheduleId, options, callback) { * [jobSchedulePatchParameter.jobSpecification.jobReleaseTask.retentionTime] * The minimum time to retain the task directory for the Job Release task on * the compute node. After this time, the Batch service may delete the task - * directory and all its contents. The default is infinite, i.e. the task - * directory will be retained until the compute node is removed or reimaged. + * directory and all its contents. The default is 7 days, i.e. the task + * directory will be retained for 7 days unless the compute node is removed or + * the job is deleted. * * @param {object} * [jobSchedulePatchParameter.jobSpecification.jobReleaseTask.userIdentity] The @@ -1371,7 +1400,7 @@ function _get(jobScheduleId, options, callback) { * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * * @param {string} - * [jobSchedulePatchParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] + * [jobSchedulePatchParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osVersion] * The Azure Guest OS version to be installed on the virtual machines in the * pool. The default value is * which specifies the latest operating system * version for the specified OS family. @@ -1418,20 +1447,8 @@ function _get(jobScheduleId, options, callback) { * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName} * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * - * @param {object} - * [jobSchedulePatchParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * Settings for the operating system disk of the Virtual Machine. - * - * @param {string} - * [jobSchedulePatchParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The type of caching to enable for the OS disk. The default value for caching - * is readwrite. For information about the caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' + * Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. * * @param {string} * jobSchedulePatchParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId @@ -1447,8 +1464,7 @@ function _get(jobScheduleId, options, callback) { * @param {object} * [jobSchedulePatchParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] * Windows operating system settings on the virtual machine. This property must - * not be specified if the imageReference or osDisk property specifies a Linux - * OS image. + * not be specified if the imageReference property specifies a Linux OS image. * * @param {boolean} * [jobSchedulePatchParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] @@ -1583,26 +1599,17 @@ function _get(jobScheduleId, options, callback) { * Batch account. The specified subnet should have enough free IP addresses to * accommodate the number of nodes in the pool. If the subnet doesn't have * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks + * and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks * ('Microsoft.Network/virtualNetworks') are supported, but for pools created * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * + * @param {string} + * [jobSchedulePatchParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.dynamicVNetAssignmentScope] + * The scope of dynamic vnet assignment. Possible values include: 'none', 'job' + * * @param {object} * [jobSchedulePatchParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] * The configuration for endpoints on compute nodes in the Batch pool. Pool @@ -1853,6 +1860,9 @@ function _patch(jobScheduleId, jobSchedulePatchParameter, options, callback) { } // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (jobScheduleId === null || jobScheduleId === undefined || typeof jobScheduleId.valueOf() !== 'string') { throw new Error('jobScheduleId cannot be null or undefined and it must be of type string.'); } @@ -1943,6 +1953,7 @@ function _patch(jobScheduleId, jobSchedulePatchParameter, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'jobschedules/{jobScheduleId}'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{jobScheduleId}', encodeURIComponent(jobScheduleId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -2052,7 +2063,7 @@ function _patch(jobScheduleId, jobSchedulePatchParameter, options, callback) { /** * @summary Updates the properties of the specified job schedule. * - * This fully replaces all the updateable properties of the job schedule. For + * This fully replaces all the updatable properties of the job schedule. For * example, if the schedule property is not specified with this request, then * the Batch service will remove the existing schedule. Changes to a job * schedule only impact jobs created by the schedule after the update has taken @@ -2154,6 +2165,23 @@ function _patch(jobScheduleId, jobSchedulePatchParameter, options, callback) { * The default is noaction. Possible values include: 'noAction', * 'performExitOptionsJobAction' * + * @param {object} + * [jobScheduleUpdateParameter.jobSpecification.networkConfiguration] The + * network configuration for the job. + * + * @param {string} + * jobScheduleUpdateParameter.jobSpecification.networkConfiguration.subnetId + * The ARM resource identifier of the virtual network subnet which nodes + * running tasks from the job will join for the duration of the task. This is + * only supported for jobs running on VirtualMachineConfiguration pools. This + * is of the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. + * The virtual network must be in the same region and subscription as the Azure + * Batch account. The specified subnet should have enough free IP addresses to + * accommodate the number of nodes which will run tasks from the job. For more + * details, see + * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + * * @param {object} [jobScheduleUpdateParameter.jobSpecification.constraints] * The execution constraints for jobs created under this schedule. * @@ -2375,9 +2403,9 @@ function _patch(jobScheduleId, jobSchedulePatchParameter, options, callback) { * [jobScheduleUpdateParameter.jobSpecification.jobPreparationTask.constraints.retentionTime] * The minimum time to retain the task directory on the compute node where it * ran, from the time it completes execution. After this time, the Batch - * service may delete the task directory and all its contents. The default is - * infinite, i.e. the task directory will be retained until the compute node is - * removed or reimaged. + * service may delete the task directory and all its contents. The default is 7 + * days, i.e. the task directory will be retained for 7 days unless the compute + * node is removed or the job is deleted. * * @param {number} * [jobScheduleUpdateParameter.jobSpecification.jobPreparationTask.constraints.maxTaskRetryCount] @@ -2389,8 +2417,7 @@ function _patch(jobScheduleId, jobSchedulePatchParameter, options, callback) { * tries the task up to 4 times (one initial try and 3 retries). If the maximum * retry count is 0, the Batch service does not retry the task after the first * attempt. If the maximum retry count is -1, the Batch service retries the - * task without limit. Resource files and application packages are only - * downloaded again if the task is retried on a new compute node. + * task without limit. * * @param {boolean} * [jobScheduleUpdateParameter.jobSpecification.jobPreparationTask.waitForSuccess] @@ -2413,7 +2440,7 @@ function _patch(jobScheduleId, jobSchedulePatchParameter, options, callback) { * [jobScheduleUpdateParameter.jobSpecification.jobPreparationTask.userIdentity] * The user identity under which the Job Preparation task runs. If omitted, the * task runs as a non-administrative user unique to the task on Windows nodes, - * or a a non-administrative user unique to the pool on Linux nodes. + * or a non-administrative user unique to the pool on Linux nodes. * * @param {boolean} * [jobScheduleUpdateParameter.jobSpecification.jobPreparationTask.rerunOnNodeRebootAfterSuccess] @@ -2492,8 +2519,9 @@ function _patch(jobScheduleId, jobSchedulePatchParameter, options, callback) { * [jobScheduleUpdateParameter.jobSpecification.jobReleaseTask.retentionTime] * The minimum time to retain the task directory for the Job Release task on * the compute node. After this time, the Batch service may delete the task - * directory and all its contents. The default is infinite, i.e. the task - * directory will be retained until the compute node is removed or reimaged. + * directory and all its contents. The default is 7 days, i.e. the task + * directory will be retained for 7 days unless the compute node is removed or + * the job is deleted. * * @param {object} * [jobScheduleUpdateParameter.jobSpecification.jobReleaseTask.userIdentity] @@ -2596,7 +2624,7 @@ function _patch(jobScheduleId, jobSchedulePatchParameter, options, callback) { * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * * @param {string} - * [jobScheduleUpdateParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] + * [jobScheduleUpdateParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osVersion] * The Azure Guest OS version to be installed on the virtual machines in the * pool. The default value is * which specifies the latest operating system * version for the specified OS family. @@ -2643,20 +2671,8 @@ function _patch(jobScheduleId, jobSchedulePatchParameter, options, callback) { * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName} * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * - * @param {object} - * [jobScheduleUpdateParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * Settings for the operating system disk of the Virtual Machine. - * - * @param {string} - * [jobScheduleUpdateParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The type of caching to enable for the OS disk. The default value for caching - * is readwrite. For information about the caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' + * Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. * * @param {string} * jobScheduleUpdateParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId @@ -2672,8 +2688,7 @@ function _patch(jobScheduleId, jobSchedulePatchParameter, options, callback) { * @param {object} * [jobScheduleUpdateParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] * Windows operating system settings on the virtual machine. This property must - * not be specified if the imageReference or osDisk property specifies a Linux - * OS image. + * not be specified if the imageReference property specifies a Linux OS image. * * @param {boolean} * [jobScheduleUpdateParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] @@ -2808,26 +2823,17 @@ function _patch(jobScheduleId, jobSchedulePatchParameter, options, callback) { * Batch account. The specified subnet should have enough free IP addresses to * accommodate the number of nodes in the pool. If the subnet doesn't have * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks + * and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks * ('Microsoft.Network/virtualNetworks') are supported, but for pools created * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * + * @param {string} + * [jobScheduleUpdateParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.dynamicVNetAssignmentScope] + * The scope of dynamic vnet assignment. Possible values include: 'none', 'job' + * * @param {object} * [jobScheduleUpdateParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] * The configuration for endpoints on compute nodes in the Batch pool. Pool @@ -3080,6 +3086,9 @@ function _update(jobScheduleId, jobScheduleUpdateParameter, options, callback) { } // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (jobScheduleId === null || jobScheduleId === undefined || typeof jobScheduleId.valueOf() !== 'string') { throw new Error('jobScheduleId cannot be null or undefined and it must be of type string.'); } @@ -3170,6 +3179,7 @@ function _update(jobScheduleId, jobScheduleUpdateParameter, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'jobschedules/{jobScheduleId}'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{jobScheduleId}', encodeURIComponent(jobScheduleId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -3352,6 +3362,9 @@ function _disable(jobScheduleId, options, callback) { let jobScheduleDisableOptions = (options && options.jobScheduleDisableOptions !== undefined) ? options.jobScheduleDisableOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (jobScheduleId === null || jobScheduleId === undefined || typeof jobScheduleId.valueOf() !== 'string') { throw new Error('jobScheduleId cannot be null or undefined and it must be of type string.'); } @@ -3439,6 +3452,7 @@ function _disable(jobScheduleId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'jobschedules/{jobScheduleId}/disable'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{jobScheduleId}', encodeURIComponent(jobScheduleId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -3605,6 +3619,9 @@ function _enable(jobScheduleId, options, callback) { let jobScheduleEnableOptions = (options && options.jobScheduleEnableOptions !== undefined) ? options.jobScheduleEnableOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (jobScheduleId === null || jobScheduleId === undefined || typeof jobScheduleId.valueOf() !== 'string') { throw new Error('jobScheduleId cannot be null or undefined and it must be of type string.'); } @@ -3692,6 +3709,7 @@ function _enable(jobScheduleId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'jobschedules/{jobScheduleId}/enable'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{jobScheduleId}', encodeURIComponent(jobScheduleId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -3858,6 +3876,9 @@ function _terminate(jobScheduleId, options, callback) { let jobScheduleTerminateOptions = (options && options.jobScheduleTerminateOptions !== undefined) ? options.jobScheduleTerminateOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (jobScheduleId === null || jobScheduleId === undefined || typeof jobScheduleId.valueOf() !== 'string') { throw new Error('jobScheduleId cannot be null or undefined and it must be of type string.'); } @@ -3945,6 +3966,7 @@ function _terminate(jobScheduleId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'jobschedules/{jobScheduleId}/terminate'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{jobScheduleId}', encodeURIComponent(jobScheduleId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -4136,6 +4158,21 @@ function _terminate(jobScheduleId, options, callback) { * default is noaction. Possible values include: 'noAction', * 'performExitOptionsJobAction' * + * @param {object} [cloudJobSchedule.jobSpecification.networkConfiguration] The + * network configuration for the job. + * + * @param {string} + * cloudJobSchedule.jobSpecification.networkConfiguration.subnetId The ARM + * resource identifier of the virtual network subnet which nodes running tasks + * from the job will join for the duration of the task. This is only supported + * for jobs running on VirtualMachineConfiguration pools. This is of the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. + * The virtual network must be in the same region and subscription as the Azure + * Batch account. The specified subnet should have enough free IP addresses to + * accommodate the number of nodes which will run tasks from the job. For more + * details, see + * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + * * @param {object} [cloudJobSchedule.jobSpecification.constraints] The * execution constraints for jobs created under this schedule. * @@ -4351,9 +4388,9 @@ function _terminate(jobScheduleId, options, callback) { * [cloudJobSchedule.jobSpecification.jobPreparationTask.constraints.retentionTime] * The minimum time to retain the task directory on the compute node where it * ran, from the time it completes execution. After this time, the Batch - * service may delete the task directory and all its contents. The default is - * infinite, i.e. the task directory will be retained until the compute node is - * removed or reimaged. + * service may delete the task directory and all its contents. The default is 7 + * days, i.e. the task directory will be retained for 7 days unless the compute + * node is removed or the job is deleted. * * @param {number} * [cloudJobSchedule.jobSpecification.jobPreparationTask.constraints.maxTaskRetryCount] @@ -4365,8 +4402,7 @@ function _terminate(jobScheduleId, options, callback) { * tries the task up to 4 times (one initial try and 3 retries). If the maximum * retry count is 0, the Batch service does not retry the task after the first * attempt. If the maximum retry count is -1, the Batch service retries the - * task without limit. Resource files and application packages are only - * downloaded again if the task is retried on a new compute node. + * task without limit. * * @param {boolean} * [cloudJobSchedule.jobSpecification.jobPreparationTask.waitForSuccess] @@ -4389,7 +4425,7 @@ function _terminate(jobScheduleId, options, callback) { * [cloudJobSchedule.jobSpecification.jobPreparationTask.userIdentity] The user * identity under which the Job Preparation task runs. If omitted, the task * runs as a non-administrative user unique to the task on Windows nodes, or a - * a non-administrative user unique to the pool on Linux nodes. + * non-administrative user unique to the pool on Linux nodes. * * @param {boolean} * [cloudJobSchedule.jobSpecification.jobPreparationTask.rerunOnNodeRebootAfterSuccess] @@ -4466,8 +4502,9 @@ function _terminate(jobScheduleId, options, callback) { * [cloudJobSchedule.jobSpecification.jobReleaseTask.retentionTime] The minimum * time to retain the task directory for the Job Release task on the compute * node. After this time, the Batch service may delete the task directory and - * all its contents. The default is infinite, i.e. the task directory will be - * retained until the compute node is removed or reimaged. + * all its contents. The default is 7 days, i.e. the task directory will be + * retained for 7 days unless the compute node is removed or the job is + * deleted. * * @param {object} * [cloudJobSchedule.jobSpecification.jobReleaseTask.userIdentity] The user @@ -4567,7 +4604,7 @@ function _terminate(jobScheduleId, options, callback) { * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * * @param {string} - * [cloudJobSchedule.jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] + * [cloudJobSchedule.jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osVersion] * The Azure Guest OS version to be installed on the virtual machines in the * pool. The default value is * which specifies the latest operating system * version for the specified OS family. @@ -4614,20 +4651,8 @@ function _terminate(jobScheduleId, options, callback) { * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName} * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * - * @param {object} - * [cloudJobSchedule.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * Settings for the operating system disk of the Virtual Machine. - * - * @param {string} - * [cloudJobSchedule.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The type of caching to enable for the OS disk. The default value for caching - * is readwrite. For information about the caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' + * Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. * * @param {string} * cloudJobSchedule.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId @@ -4643,8 +4668,7 @@ function _terminate(jobScheduleId, options, callback) { * @param {object} * [cloudJobSchedule.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] * Windows operating system settings on the virtual machine. This property must - * not be specified if the imageReference or osDisk property specifies a Linux - * OS image. + * not be specified if the imageReference property specifies a Linux OS image. * * @param {boolean} * [cloudJobSchedule.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] @@ -4779,26 +4803,17 @@ function _terminate(jobScheduleId, options, callback) { * Batch account. The specified subnet should have enough free IP addresses to * accommodate the number of nodes in the pool. If the subnet doesn't have * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks + * and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks * ('Microsoft.Network/virtualNetworks') are supported, but for pools created * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * + * @param {string} + * [cloudJobSchedule.jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.dynamicVNetAssignmentScope] + * The scope of dynamic vnet assignment. Possible values include: 'none', 'job' + * * @param {object} * [cloudJobSchedule.jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] * The configuration for endpoints on compute nodes in the Batch pool. Pool @@ -5029,6 +5044,9 @@ function _add(cloudJobSchedule, options, callback) { } // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (cloudJobSchedule === null || cloudJobSchedule === undefined) { throw new Error('cloudJobSchedule cannot be null or undefined.'); } @@ -5082,6 +5100,7 @@ function _add(cloudJobSchedule, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'jobschedules'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (timeout !== null && timeout !== undefined) { @@ -5242,6 +5261,9 @@ function _list(options, callback) { let jobScheduleListOptions = (options && options.jobScheduleListOptions !== undefined) ? options.jobScheduleListOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); } @@ -5324,6 +5346,7 @@ function _list(options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'jobschedules'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (filter !== null && filter !== undefined) { @@ -6246,6 +6269,23 @@ class JobSchedule { * The default is noaction. Possible values include: 'noAction', * 'performExitOptionsJobAction' * + * @param {object} + * [jobSchedulePatchParameter.jobSpecification.networkConfiguration] The + * network configuration for the job. + * + * @param {string} + * jobSchedulePatchParameter.jobSpecification.networkConfiguration.subnetId The + * ARM resource identifier of the virtual network subnet which nodes running + * tasks from the job will join for the duration of the task. This is only + * supported for jobs running on VirtualMachineConfiguration pools. This is of + * the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. + * The virtual network must be in the same region and subscription as the Azure + * Batch account. The specified subnet should have enough free IP addresses to + * accommodate the number of nodes which will run tasks from the job. For more + * details, see + * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + * * @param {object} [jobSchedulePatchParameter.jobSpecification.constraints] The * execution constraints for jobs created under this schedule. * @@ -6466,9 +6506,9 @@ class JobSchedule { * [jobSchedulePatchParameter.jobSpecification.jobPreparationTask.constraints.retentionTime] * The minimum time to retain the task directory on the compute node where it * ran, from the time it completes execution. After this time, the Batch - * service may delete the task directory and all its contents. The default is - * infinite, i.e. the task directory will be retained until the compute node is - * removed or reimaged. + * service may delete the task directory and all its contents. The default is 7 + * days, i.e. the task directory will be retained for 7 days unless the compute + * node is removed or the job is deleted. * * @param {number} * [jobSchedulePatchParameter.jobSpecification.jobPreparationTask.constraints.maxTaskRetryCount] @@ -6480,8 +6520,7 @@ class JobSchedule { * tries the task up to 4 times (one initial try and 3 retries). If the maximum * retry count is 0, the Batch service does not retry the task after the first * attempt. If the maximum retry count is -1, the Batch service retries the - * task without limit. Resource files and application packages are only - * downloaded again if the task is retried on a new compute node. + * task without limit. * * @param {boolean} * [jobSchedulePatchParameter.jobSpecification.jobPreparationTask.waitForSuccess] @@ -6504,7 +6543,7 @@ class JobSchedule { * [jobSchedulePatchParameter.jobSpecification.jobPreparationTask.userIdentity] * The user identity under which the Job Preparation task runs. If omitted, the * task runs as a non-administrative user unique to the task on Windows nodes, - * or a a non-administrative user unique to the pool on Linux nodes. + * or a non-administrative user unique to the pool on Linux nodes. * * @param {boolean} * [jobSchedulePatchParameter.jobSpecification.jobPreparationTask.rerunOnNodeRebootAfterSuccess] @@ -6582,8 +6621,9 @@ class JobSchedule { * [jobSchedulePatchParameter.jobSpecification.jobReleaseTask.retentionTime] * The minimum time to retain the task directory for the Job Release task on * the compute node. After this time, the Batch service may delete the task - * directory and all its contents. The default is infinite, i.e. the task - * directory will be retained until the compute node is removed or reimaged. + * directory and all its contents. The default is 7 days, i.e. the task + * directory will be retained for 7 days unless the compute node is removed or + * the job is deleted. * * @param {object} * [jobSchedulePatchParameter.jobSpecification.jobReleaseTask.userIdentity] The @@ -6685,7 +6725,7 @@ class JobSchedule { * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * * @param {string} - * [jobSchedulePatchParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] + * [jobSchedulePatchParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osVersion] * The Azure Guest OS version to be installed on the virtual machines in the * pool. The default value is * which specifies the latest operating system * version for the specified OS family. @@ -6732,20 +6772,8 @@ class JobSchedule { * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName} * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * - * @param {object} - * [jobSchedulePatchParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * Settings for the operating system disk of the Virtual Machine. - * - * @param {string} - * [jobSchedulePatchParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The type of caching to enable for the OS disk. The default value for caching - * is readwrite. For information about the caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' + * Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. * * @param {string} * jobSchedulePatchParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId @@ -6761,8 +6789,7 @@ class JobSchedule { * @param {object} * [jobSchedulePatchParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] * Windows operating system settings on the virtual machine. This property must - * not be specified if the imageReference or osDisk property specifies a Linux - * OS image. + * not be specified if the imageReference property specifies a Linux OS image. * * @param {boolean} * [jobSchedulePatchParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] @@ -6897,26 +6924,17 @@ class JobSchedule { * Batch account. The specified subnet should have enough free IP addresses to * accommodate the number of nodes in the pool. If the subnet doesn't have * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks + * and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks * ('Microsoft.Network/virtualNetworks') are supported, but for pools created * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * + * @param {string} + * [jobSchedulePatchParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.dynamicVNetAssignmentScope] + * The scope of dynamic vnet assignment. Possible values include: 'none', 'job' + * * @param {object} * [jobSchedulePatchParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] * The configuration for endpoints on compute nodes in the Batch pool. Pool @@ -7262,6 +7280,23 @@ class JobSchedule { * The default is noaction. Possible values include: 'noAction', * 'performExitOptionsJobAction' * + * @param {object} + * [jobSchedulePatchParameter.jobSpecification.networkConfiguration] The + * network configuration for the job. + * + * @param {string} + * jobSchedulePatchParameter.jobSpecification.networkConfiguration.subnetId The + * ARM resource identifier of the virtual network subnet which nodes running + * tasks from the job will join for the duration of the task. This is only + * supported for jobs running on VirtualMachineConfiguration pools. This is of + * the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. + * The virtual network must be in the same region and subscription as the Azure + * Batch account. The specified subnet should have enough free IP addresses to + * accommodate the number of nodes which will run tasks from the job. For more + * details, see + * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + * * @param {object} [jobSchedulePatchParameter.jobSpecification.constraints] The * execution constraints for jobs created under this schedule. * @@ -7482,9 +7517,9 @@ class JobSchedule { * [jobSchedulePatchParameter.jobSpecification.jobPreparationTask.constraints.retentionTime] * The minimum time to retain the task directory on the compute node where it * ran, from the time it completes execution. After this time, the Batch - * service may delete the task directory and all its contents. The default is - * infinite, i.e. the task directory will be retained until the compute node is - * removed or reimaged. + * service may delete the task directory and all its contents. The default is 7 + * days, i.e. the task directory will be retained for 7 days unless the compute + * node is removed or the job is deleted. * * @param {number} * [jobSchedulePatchParameter.jobSpecification.jobPreparationTask.constraints.maxTaskRetryCount] @@ -7496,8 +7531,7 @@ class JobSchedule { * tries the task up to 4 times (one initial try and 3 retries). If the maximum * retry count is 0, the Batch service does not retry the task after the first * attempt. If the maximum retry count is -1, the Batch service retries the - * task without limit. Resource files and application packages are only - * downloaded again if the task is retried on a new compute node. + * task without limit. * * @param {boolean} * [jobSchedulePatchParameter.jobSpecification.jobPreparationTask.waitForSuccess] @@ -7520,7 +7554,7 @@ class JobSchedule { * [jobSchedulePatchParameter.jobSpecification.jobPreparationTask.userIdentity] * The user identity under which the Job Preparation task runs. If omitted, the * task runs as a non-administrative user unique to the task on Windows nodes, - * or a a non-administrative user unique to the pool on Linux nodes. + * or a non-administrative user unique to the pool on Linux nodes. * * @param {boolean} * [jobSchedulePatchParameter.jobSpecification.jobPreparationTask.rerunOnNodeRebootAfterSuccess] @@ -7598,8 +7632,9 @@ class JobSchedule { * [jobSchedulePatchParameter.jobSpecification.jobReleaseTask.retentionTime] * The minimum time to retain the task directory for the Job Release task on * the compute node. After this time, the Batch service may delete the task - * directory and all its contents. The default is infinite, i.e. the task - * directory will be retained until the compute node is removed or reimaged. + * directory and all its contents. The default is 7 days, i.e. the task + * directory will be retained for 7 days unless the compute node is removed or + * the job is deleted. * * @param {object} * [jobSchedulePatchParameter.jobSpecification.jobReleaseTask.userIdentity] The @@ -7701,7 +7736,7 @@ class JobSchedule { * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * * @param {string} - * [jobSchedulePatchParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] + * [jobSchedulePatchParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osVersion] * The Azure Guest OS version to be installed on the virtual machines in the * pool. The default value is * which specifies the latest operating system * version for the specified OS family. @@ -7748,20 +7783,8 @@ class JobSchedule { * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName} * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * - * @param {object} - * [jobSchedulePatchParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * Settings for the operating system disk of the Virtual Machine. - * - * @param {string} - * [jobSchedulePatchParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The type of caching to enable for the OS disk. The default value for caching - * is readwrite. For information about the caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' + * Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. * * @param {string} * jobSchedulePatchParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId @@ -7777,8 +7800,7 @@ class JobSchedule { * @param {object} * [jobSchedulePatchParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] * Windows operating system settings on the virtual machine. This property must - * not be specified if the imageReference or osDisk property specifies a Linux - * OS image. + * not be specified if the imageReference property specifies a Linux OS image. * * @param {boolean} * [jobSchedulePatchParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] @@ -7913,26 +7935,17 @@ class JobSchedule { * Batch account. The specified subnet should have enough free IP addresses to * accommodate the number of nodes in the pool. If the subnet doesn't have * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks + * and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks * ('Microsoft.Network/virtualNetworks') are supported, but for pools created * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * + * @param {string} + * [jobSchedulePatchParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.dynamicVNetAssignmentScope] + * The scope of dynamic vnet assignment. Possible values include: 'none', 'job' + * * @param {object} * [jobSchedulePatchParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] * The configuration for endpoints on compute nodes in the Batch pool. Pool @@ -8198,7 +8211,7 @@ class JobSchedule { /** * @summary Updates the properties of the specified job schedule. * - * This fully replaces all the updateable properties of the job schedule. For + * This fully replaces all the updatable properties of the job schedule. For * example, if the schedule property is not specified with this request, then * the Batch service will remove the existing schedule. Changes to a job * schedule only impact jobs created by the schedule after the update has taken @@ -8300,6 +8313,23 @@ class JobSchedule { * The default is noaction. Possible values include: 'noAction', * 'performExitOptionsJobAction' * + * @param {object} + * [jobScheduleUpdateParameter.jobSpecification.networkConfiguration] The + * network configuration for the job. + * + * @param {string} + * jobScheduleUpdateParameter.jobSpecification.networkConfiguration.subnetId + * The ARM resource identifier of the virtual network subnet which nodes + * running tasks from the job will join for the duration of the task. This is + * only supported for jobs running on VirtualMachineConfiguration pools. This + * is of the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. + * The virtual network must be in the same region and subscription as the Azure + * Batch account. The specified subnet should have enough free IP addresses to + * accommodate the number of nodes which will run tasks from the job. For more + * details, see + * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + * * @param {object} [jobScheduleUpdateParameter.jobSpecification.constraints] * The execution constraints for jobs created under this schedule. * @@ -8521,9 +8551,9 @@ class JobSchedule { * [jobScheduleUpdateParameter.jobSpecification.jobPreparationTask.constraints.retentionTime] * The minimum time to retain the task directory on the compute node where it * ran, from the time it completes execution. After this time, the Batch - * service may delete the task directory and all its contents. The default is - * infinite, i.e. the task directory will be retained until the compute node is - * removed or reimaged. + * service may delete the task directory and all its contents. The default is 7 + * days, i.e. the task directory will be retained for 7 days unless the compute + * node is removed or the job is deleted. * * @param {number} * [jobScheduleUpdateParameter.jobSpecification.jobPreparationTask.constraints.maxTaskRetryCount] @@ -8535,8 +8565,7 @@ class JobSchedule { * tries the task up to 4 times (one initial try and 3 retries). If the maximum * retry count is 0, the Batch service does not retry the task after the first * attempt. If the maximum retry count is -1, the Batch service retries the - * task without limit. Resource files and application packages are only - * downloaded again if the task is retried on a new compute node. + * task without limit. * * @param {boolean} * [jobScheduleUpdateParameter.jobSpecification.jobPreparationTask.waitForSuccess] @@ -8559,7 +8588,7 @@ class JobSchedule { * [jobScheduleUpdateParameter.jobSpecification.jobPreparationTask.userIdentity] * The user identity under which the Job Preparation task runs. If omitted, the * task runs as a non-administrative user unique to the task on Windows nodes, - * or a a non-administrative user unique to the pool on Linux nodes. + * or a non-administrative user unique to the pool on Linux nodes. * * @param {boolean} * [jobScheduleUpdateParameter.jobSpecification.jobPreparationTask.rerunOnNodeRebootAfterSuccess] @@ -8638,8 +8667,9 @@ class JobSchedule { * [jobScheduleUpdateParameter.jobSpecification.jobReleaseTask.retentionTime] * The minimum time to retain the task directory for the Job Release task on * the compute node. After this time, the Batch service may delete the task - * directory and all its contents. The default is infinite, i.e. the task - * directory will be retained until the compute node is removed or reimaged. + * directory and all its contents. The default is 7 days, i.e. the task + * directory will be retained for 7 days unless the compute node is removed or + * the job is deleted. * * @param {object} * [jobScheduleUpdateParameter.jobSpecification.jobReleaseTask.userIdentity] @@ -8742,7 +8772,7 @@ class JobSchedule { * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * * @param {string} - * [jobScheduleUpdateParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] + * [jobScheduleUpdateParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osVersion] * The Azure Guest OS version to be installed on the virtual machines in the * pool. The default value is * which specifies the latest operating system * version for the specified OS family. @@ -8789,20 +8819,8 @@ class JobSchedule { * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName} * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * - * @param {object} - * [jobScheduleUpdateParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * Settings for the operating system disk of the Virtual Machine. - * - * @param {string} - * [jobScheduleUpdateParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The type of caching to enable for the OS disk. The default value for caching - * is readwrite. For information about the caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' + * Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. * * @param {string} * jobScheduleUpdateParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId @@ -8818,8 +8836,7 @@ class JobSchedule { * @param {object} * [jobScheduleUpdateParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] * Windows operating system settings on the virtual machine. This property must - * not be specified if the imageReference or osDisk property specifies a Linux - * OS image. + * not be specified if the imageReference property specifies a Linux OS image. * * @param {boolean} * [jobScheduleUpdateParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] @@ -8954,26 +8971,17 @@ class JobSchedule { * Batch account. The specified subnet should have enough free IP addresses to * accommodate the number of nodes in the pool. If the subnet doesn't have * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks + * and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks * ('Microsoft.Network/virtualNetworks') are supported, but for pools created * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * + * @param {string} + * [jobScheduleUpdateParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.dynamicVNetAssignmentScope] + * The scope of dynamic vnet assignment. Possible values include: 'none', 'job' + * * @param {object} * [jobScheduleUpdateParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] * The configuration for endpoints on compute nodes in the Batch pool. Pool @@ -9220,7 +9228,7 @@ class JobSchedule { /** * @summary Updates the properties of the specified job schedule. * - * This fully replaces all the updateable properties of the job schedule. For + * This fully replaces all the updatable properties of the job schedule. For * example, if the schedule property is not specified with this request, then * the Batch service will remove the existing schedule. Changes to a job * schedule only impact jobs created by the schedule after the update has taken @@ -9322,6 +9330,23 @@ class JobSchedule { * The default is noaction. Possible values include: 'noAction', * 'performExitOptionsJobAction' * + * @param {object} + * [jobScheduleUpdateParameter.jobSpecification.networkConfiguration] The + * network configuration for the job. + * + * @param {string} + * jobScheduleUpdateParameter.jobSpecification.networkConfiguration.subnetId + * The ARM resource identifier of the virtual network subnet which nodes + * running tasks from the job will join for the duration of the task. This is + * only supported for jobs running on VirtualMachineConfiguration pools. This + * is of the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. + * The virtual network must be in the same region and subscription as the Azure + * Batch account. The specified subnet should have enough free IP addresses to + * accommodate the number of nodes which will run tasks from the job. For more + * details, see + * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + * * @param {object} [jobScheduleUpdateParameter.jobSpecification.constraints] * The execution constraints for jobs created under this schedule. * @@ -9543,9 +9568,9 @@ class JobSchedule { * [jobScheduleUpdateParameter.jobSpecification.jobPreparationTask.constraints.retentionTime] * The minimum time to retain the task directory on the compute node where it * ran, from the time it completes execution. After this time, the Batch - * service may delete the task directory and all its contents. The default is - * infinite, i.e. the task directory will be retained until the compute node is - * removed or reimaged. + * service may delete the task directory and all its contents. The default is 7 + * days, i.e. the task directory will be retained for 7 days unless the compute + * node is removed or the job is deleted. * * @param {number} * [jobScheduleUpdateParameter.jobSpecification.jobPreparationTask.constraints.maxTaskRetryCount] @@ -9557,8 +9582,7 @@ class JobSchedule { * tries the task up to 4 times (one initial try and 3 retries). If the maximum * retry count is 0, the Batch service does not retry the task after the first * attempt. If the maximum retry count is -1, the Batch service retries the - * task without limit. Resource files and application packages are only - * downloaded again if the task is retried on a new compute node. + * task without limit. * * @param {boolean} * [jobScheduleUpdateParameter.jobSpecification.jobPreparationTask.waitForSuccess] @@ -9581,7 +9605,7 @@ class JobSchedule { * [jobScheduleUpdateParameter.jobSpecification.jobPreparationTask.userIdentity] * The user identity under which the Job Preparation task runs. If omitted, the * task runs as a non-administrative user unique to the task on Windows nodes, - * or a a non-administrative user unique to the pool on Linux nodes. + * or a non-administrative user unique to the pool on Linux nodes. * * @param {boolean} * [jobScheduleUpdateParameter.jobSpecification.jobPreparationTask.rerunOnNodeRebootAfterSuccess] @@ -9660,8 +9684,9 @@ class JobSchedule { * [jobScheduleUpdateParameter.jobSpecification.jobReleaseTask.retentionTime] * The minimum time to retain the task directory for the Job Release task on * the compute node. After this time, the Batch service may delete the task - * directory and all its contents. The default is infinite, i.e. the task - * directory will be retained until the compute node is removed or reimaged. + * directory and all its contents. The default is 7 days, i.e. the task + * directory will be retained for 7 days unless the compute node is removed or + * the job is deleted. * * @param {object} * [jobScheduleUpdateParameter.jobSpecification.jobReleaseTask.userIdentity] @@ -9764,7 +9789,7 @@ class JobSchedule { * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * * @param {string} - * [jobScheduleUpdateParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] + * [jobScheduleUpdateParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osVersion] * The Azure Guest OS version to be installed on the virtual machines in the * pool. The default value is * which specifies the latest operating system * version for the specified OS family. @@ -9811,20 +9836,8 @@ class JobSchedule { * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName} * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * - * @param {object} - * [jobScheduleUpdateParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * Settings for the operating system disk of the Virtual Machine. - * - * @param {string} - * [jobScheduleUpdateParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The type of caching to enable for the OS disk. The default value for caching - * is readwrite. For information about the caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' + * Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. * * @param {string} * jobScheduleUpdateParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId @@ -9840,8 +9853,7 @@ class JobSchedule { * @param {object} * [jobScheduleUpdateParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] * Windows operating system settings on the virtual machine. This property must - * not be specified if the imageReference or osDisk property specifies a Linux - * OS image. + * not be specified if the imageReference property specifies a Linux OS image. * * @param {boolean} * [jobScheduleUpdateParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] @@ -9976,26 +9988,17 @@ class JobSchedule { * Batch account. The specified subnet should have enough free IP addresses to * accommodate the number of nodes in the pool. If the subnet doesn't have * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks + * and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks * ('Microsoft.Network/virtualNetworks') are supported, but for pools created * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * + * @param {string} + * [jobScheduleUpdateParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.dynamicVNetAssignmentScope] + * The scope of dynamic vnet assignment. Possible values include: 'none', 'job' + * * @param {object} * [jobScheduleUpdateParameter.jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] * The configuration for endpoints on compute nodes in the Batch pool. Pool @@ -10840,6 +10843,21 @@ class JobSchedule { * default is noaction. Possible values include: 'noAction', * 'performExitOptionsJobAction' * + * @param {object} [cloudJobSchedule.jobSpecification.networkConfiguration] The + * network configuration for the job. + * + * @param {string} + * cloudJobSchedule.jobSpecification.networkConfiguration.subnetId The ARM + * resource identifier of the virtual network subnet which nodes running tasks + * from the job will join for the duration of the task. This is only supported + * for jobs running on VirtualMachineConfiguration pools. This is of the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. + * The virtual network must be in the same region and subscription as the Azure + * Batch account. The specified subnet should have enough free IP addresses to + * accommodate the number of nodes which will run tasks from the job. For more + * details, see + * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + * * @param {object} [cloudJobSchedule.jobSpecification.constraints] The * execution constraints for jobs created under this schedule. * @@ -11055,9 +11073,9 @@ class JobSchedule { * [cloudJobSchedule.jobSpecification.jobPreparationTask.constraints.retentionTime] * The minimum time to retain the task directory on the compute node where it * ran, from the time it completes execution. After this time, the Batch - * service may delete the task directory and all its contents. The default is - * infinite, i.e. the task directory will be retained until the compute node is - * removed or reimaged. + * service may delete the task directory and all its contents. The default is 7 + * days, i.e. the task directory will be retained for 7 days unless the compute + * node is removed or the job is deleted. * * @param {number} * [cloudJobSchedule.jobSpecification.jobPreparationTask.constraints.maxTaskRetryCount] @@ -11069,8 +11087,7 @@ class JobSchedule { * tries the task up to 4 times (one initial try and 3 retries). If the maximum * retry count is 0, the Batch service does not retry the task after the first * attempt. If the maximum retry count is -1, the Batch service retries the - * task without limit. Resource files and application packages are only - * downloaded again if the task is retried on a new compute node. + * task without limit. * * @param {boolean} * [cloudJobSchedule.jobSpecification.jobPreparationTask.waitForSuccess] @@ -11093,7 +11110,7 @@ class JobSchedule { * [cloudJobSchedule.jobSpecification.jobPreparationTask.userIdentity] The user * identity under which the Job Preparation task runs. If omitted, the task * runs as a non-administrative user unique to the task on Windows nodes, or a - * a non-administrative user unique to the pool on Linux nodes. + * non-administrative user unique to the pool on Linux nodes. * * @param {boolean} * [cloudJobSchedule.jobSpecification.jobPreparationTask.rerunOnNodeRebootAfterSuccess] @@ -11170,8 +11187,9 @@ class JobSchedule { * [cloudJobSchedule.jobSpecification.jobReleaseTask.retentionTime] The minimum * time to retain the task directory for the Job Release task on the compute * node. After this time, the Batch service may delete the task directory and - * all its contents. The default is infinite, i.e. the task directory will be - * retained until the compute node is removed or reimaged. + * all its contents. The default is 7 days, i.e. the task directory will be + * retained for 7 days unless the compute node is removed or the job is + * deleted. * * @param {object} * [cloudJobSchedule.jobSpecification.jobReleaseTask.userIdentity] The user @@ -11271,7 +11289,7 @@ class JobSchedule { * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * * @param {string} - * [cloudJobSchedule.jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] + * [cloudJobSchedule.jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osVersion] * The Azure Guest OS version to be installed on the virtual machines in the * pool. The default value is * which specifies the latest operating system * version for the specified OS family. @@ -11318,20 +11336,8 @@ class JobSchedule { * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName} * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * - * @param {object} - * [cloudJobSchedule.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * Settings for the operating system disk of the Virtual Machine. - * - * @param {string} - * [cloudJobSchedule.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The type of caching to enable for the OS disk. The default value for caching - * is readwrite. For information about the caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' + * Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. * * @param {string} * cloudJobSchedule.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId @@ -11347,8 +11353,7 @@ class JobSchedule { * @param {object} * [cloudJobSchedule.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] * Windows operating system settings on the virtual machine. This property must - * not be specified if the imageReference or osDisk property specifies a Linux - * OS image. + * not be specified if the imageReference property specifies a Linux OS image. * * @param {boolean} * [cloudJobSchedule.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] @@ -11483,26 +11488,17 @@ class JobSchedule { * Batch account. The specified subnet should have enough free IP addresses to * accommodate the number of nodes in the pool. If the subnet doesn't have * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks + * and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks * ('Microsoft.Network/virtualNetworks') are supported, but for pools created * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * + * @param {string} + * [cloudJobSchedule.jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.dynamicVNetAssignmentScope] + * The scope of dynamic vnet assignment. Possible values include: 'none', 'job' + * * @param {object} * [cloudJobSchedule.jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] * The configuration for endpoints on compute nodes in the Batch pool. Pool @@ -11823,6 +11819,21 @@ class JobSchedule { * default is noaction. Possible values include: 'noAction', * 'performExitOptionsJobAction' * + * @param {object} [cloudJobSchedule.jobSpecification.networkConfiguration] The + * network configuration for the job. + * + * @param {string} + * cloudJobSchedule.jobSpecification.networkConfiguration.subnetId The ARM + * resource identifier of the virtual network subnet which nodes running tasks + * from the job will join for the duration of the task. This is only supported + * for jobs running on VirtualMachineConfiguration pools. This is of the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. + * The virtual network must be in the same region and subscription as the Azure + * Batch account. The specified subnet should have enough free IP addresses to + * accommodate the number of nodes which will run tasks from the job. For more + * details, see + * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + * * @param {object} [cloudJobSchedule.jobSpecification.constraints] The * execution constraints for jobs created under this schedule. * @@ -12038,9 +12049,9 @@ class JobSchedule { * [cloudJobSchedule.jobSpecification.jobPreparationTask.constraints.retentionTime] * The minimum time to retain the task directory on the compute node where it * ran, from the time it completes execution. After this time, the Batch - * service may delete the task directory and all its contents. The default is - * infinite, i.e. the task directory will be retained until the compute node is - * removed or reimaged. + * service may delete the task directory and all its contents. The default is 7 + * days, i.e. the task directory will be retained for 7 days unless the compute + * node is removed or the job is deleted. * * @param {number} * [cloudJobSchedule.jobSpecification.jobPreparationTask.constraints.maxTaskRetryCount] @@ -12052,8 +12063,7 @@ class JobSchedule { * tries the task up to 4 times (one initial try and 3 retries). If the maximum * retry count is 0, the Batch service does not retry the task after the first * attempt. If the maximum retry count is -1, the Batch service retries the - * task without limit. Resource files and application packages are only - * downloaded again if the task is retried on a new compute node. + * task without limit. * * @param {boolean} * [cloudJobSchedule.jobSpecification.jobPreparationTask.waitForSuccess] @@ -12076,7 +12086,7 @@ class JobSchedule { * [cloudJobSchedule.jobSpecification.jobPreparationTask.userIdentity] The user * identity under which the Job Preparation task runs. If omitted, the task * runs as a non-administrative user unique to the task on Windows nodes, or a - * a non-administrative user unique to the pool on Linux nodes. + * non-administrative user unique to the pool on Linux nodes. * * @param {boolean} * [cloudJobSchedule.jobSpecification.jobPreparationTask.rerunOnNodeRebootAfterSuccess] @@ -12153,8 +12163,9 @@ class JobSchedule { * [cloudJobSchedule.jobSpecification.jobReleaseTask.retentionTime] The minimum * time to retain the task directory for the Job Release task on the compute * node. After this time, the Batch service may delete the task directory and - * all its contents. The default is infinite, i.e. the task directory will be - * retained until the compute node is removed or reimaged. + * all its contents. The default is 7 days, i.e. the task directory will be + * retained for 7 days unless the compute node is removed or the job is + * deleted. * * @param {object} * [cloudJobSchedule.jobSpecification.jobReleaseTask.userIdentity] The user @@ -12254,7 +12265,7 @@ class JobSchedule { * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * * @param {string} - * [cloudJobSchedule.jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] + * [cloudJobSchedule.jobSpecification.poolInfo.autoPoolSpecification.pool.cloudServiceConfiguration.osVersion] * The Azure Guest OS version to be installed on the virtual machines in the * pool. The default value is * which specifies the latest operating system * version for the specified OS family. @@ -12301,20 +12312,8 @@ class JobSchedule { * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName} * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * - * @param {object} - * [cloudJobSchedule.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk] - * Settings for the operating system disk of the Virtual Machine. - * - * @param {string} - * [cloudJobSchedule.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.osDisk.caching] - * The type of caching to enable for the OS disk. The default value for caching - * is readwrite. For information about the caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' + * Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. * * @param {string} * cloudJobSchedule.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId @@ -12330,8 +12329,7 @@ class JobSchedule { * @param {object} * [cloudJobSchedule.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration] * Windows operating system settings on the virtual machine. This property must - * not be specified if the imageReference or osDisk property specifies a Linux - * OS image. + * not be specified if the imageReference property specifies a Linux OS image. * * @param {boolean} * [cloudJobSchedule.jobSpecification.poolInfo.autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] @@ -12466,26 +12464,17 @@ class JobSchedule { * Batch account. The specified subnet should have enough free IP addresses to * accommodate the number of nodes in the pool. If the subnet doesn't have * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks + * and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks * ('Microsoft.Network/virtualNetworks') are supported, but for pools created * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * + * @param {string} + * [cloudJobSchedule.jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.dynamicVNetAssignmentScope] + * The scope of dynamic vnet assignment. Possible values include: 'none', 'job' + * * @param {object} * [cloudJobSchedule.jobSpecification.poolInfo.autoPoolSpecification.pool.networkConfiguration.endpointConfiguration] * The configuration for endpoints on compute nodes in the Batch pool. Pool diff --git a/lib/services/batch/lib/operations/pool.js b/lib/services/batch/lib/operations/pool.js index ecb98da806..a1dbcac4c8 100644 --- a/lib/services/batch/lib/operations/pool.js +++ b/lib/services/batch/lib/operations/pool.js @@ -95,6 +95,9 @@ function _listUsageMetrics(options, callback) { let poolListUsageMetricsOptions = (options && options.poolListUsageMetricsOptions !== undefined) ? options.poolListUsageMetricsOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); } @@ -179,6 +182,7 @@ function _listUsageMetrics(options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'poolusagemetrics'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (startTime !== null && startTime !== undefined) { @@ -347,6 +351,9 @@ function _getAllLifetimeStatistics(options, callback) { let poolGetAllLifetimeStatisticsOptions = (options && options.poolGetAllLifetimeStatisticsOptions !== undefined) ? options.poolGetAllLifetimeStatisticsOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); } @@ -397,6 +404,7 @@ function _getAllLifetimeStatistics(options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'lifetimepoolstats'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (timeout !== null && timeout !== undefined) { @@ -543,10 +551,10 @@ function _getAllLifetimeStatistics(options, callback) { * see Azure Guest OS Releases * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * - * @param {string} [pool.cloudServiceConfiguration.targetOSVersion] The Azure - * Guest OS version to be installed on the virtual machines in the pool. The - * default value is * which specifies the latest operating system version for - * the specified OS family. + * @param {string} [pool.cloudServiceConfiguration.osVersion] The Azure Guest + * OS version to be installed on the virtual machines in the pool. The default + * value is * which specifies the latest operating system version for the + * specified OS family. * * @param {object} [pool.virtualMachineConfiguration] The virtual machine * configuration for the pool. This property and cloudServiceConfiguration are @@ -580,18 +588,8 @@ function _getAllLifetimeStatistics(options, callback) { * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName} * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * - * @param {object} [pool.virtualMachineConfiguration.osDisk] Settings for the - * operating system disk of the Virtual Machine. - * - * @param {string} [pool.virtualMachineConfiguration.osDisk.caching] The type - * of caching to enable for the OS disk. The default value for caching is - * readwrite. For information about the caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' + * Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. * * @param {string} pool.virtualMachineConfiguration.nodeAgentSKUId The SKU of * the Batch node agent to be provisioned on compute nodes in the pool. The @@ -605,8 +603,7 @@ function _getAllLifetimeStatistics(options, callback) { * * @param {object} [pool.virtualMachineConfiguration.windowsConfiguration] * Windows operating system settings on the virtual machine. This property must - * not be specified if the imageReference or osDisk property specifies a Linux - * OS image. + * not be specified if the imageReference property specifies a Linux OS image. * * @param {boolean} * [pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] @@ -713,26 +710,16 @@ function _getAllLifetimeStatistics(options, callback) { * Batch account. The specified subnet should have enough free IP addresses to * accommodate the number of nodes in the pool. If the subnet doesn't have * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks + * and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks * ('Microsoft.Network/virtualNetworks') are supported, but for pools created * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * + * @param {string} [pool.networkConfiguration.dynamicVNetAssignmentScope] The + * scope of dynamic vnet assignment. Possible values include: 'none', 'job' + * * @param {object} [pool.networkConfiguration.endpointConfiguration] The * configuration for endpoints on compute nodes in the Batch pool. Pool * endpoint configuration is only supported on pools with the @@ -933,6 +920,9 @@ function _add(pool, options, callback) { } // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (pool === null || pool === undefined) { throw new Error('pool cannot be null or undefined.'); } @@ -986,6 +976,7 @@ function _add(pool, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'pools'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (timeout !== null && timeout !== undefined) { @@ -1142,6 +1133,9 @@ function _list(options, callback) { let poolListOptions = (options && options.poolListOptions !== undefined) ? options.poolListOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); } @@ -1224,6 +1218,7 @@ function _list(options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'pools'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (filter !== null && filter !== undefined) { @@ -1418,6 +1413,9 @@ function _deleteMethod(poolId, options, callback) { let poolDeleteMethodOptions = (options && options.poolDeleteMethodOptions !== undefined) ? options.poolDeleteMethodOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (poolId === null || poolId === undefined || typeof poolId.valueOf() !== 'string') { throw new Error('poolId cannot be null or undefined and it must be of type string.'); } @@ -1505,6 +1503,7 @@ function _deleteMethod(poolId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'pools/{poolId}'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{poolId}', encodeURIComponent(poolId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -1670,6 +1669,9 @@ function _exists(poolId, options, callback) { let poolExistsOptions = (options && options.poolExistsOptions !== undefined) ? options.poolExistsOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (poolId === null || poolId === undefined || typeof poolId.valueOf() !== 'string') { throw new Error('poolId cannot be null or undefined and it must be of type string.'); } @@ -1757,6 +1759,7 @@ function _exists(poolId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'pools/{poolId}'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{poolId}', encodeURIComponent(poolId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -1928,6 +1931,9 @@ function _get(poolId, options, callback) { let poolGetOptions = (options && options.poolGetOptions !== undefined) ? options.poolGetOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (poolId === null || poolId === undefined || typeof poolId.valueOf() !== 'string') { throw new Error('poolId cannot be null or undefined and it must be of type string.'); } @@ -2031,6 +2037,7 @@ function _get(poolId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'pools/{poolId}'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{poolId}', encodeURIComponent(poolId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -2360,6 +2367,9 @@ function _patch(poolId, poolPatchParameter, options, callback) { let poolPatchOptions = (options && options.poolPatchOptions !== undefined) ? options.poolPatchOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (poolId === null || poolId === undefined || typeof poolId.valueOf() !== 'string') { throw new Error('poolId cannot be null or undefined and it must be of type string.'); } @@ -2450,6 +2460,7 @@ function _patch(poolId, poolPatchParameter, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'pools/{poolId}'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{poolId}', encodeURIComponent(poolId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -2611,6 +2622,9 @@ function _disableAutoScale(poolId, options, callback) { let poolDisableAutoScaleOptions = (options && options.poolDisableAutoScaleOptions !== undefined) ? options.poolDisableAutoScaleOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (poolId === null || poolId === undefined || typeof poolId.valueOf() !== 'string') { throw new Error('poolId cannot be null or undefined and it must be of type string.'); } @@ -2664,6 +2678,7 @@ function _disableAutoScale(poolId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'pools/{poolId}/disableautoscale'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{poolId}', encodeURIComponent(poolId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -2848,6 +2863,9 @@ function _enableAutoScale(poolId, poolEnableAutoScaleParameter, options, callbac let poolEnableAutoScaleOptions = (options && options.poolEnableAutoScaleOptions !== undefined) ? options.poolEnableAutoScaleOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (poolId === null || poolId === undefined || typeof poolId.valueOf() !== 'string') { throw new Error('poolId cannot be null or undefined and it must be of type string.'); } @@ -2938,6 +2956,7 @@ function _enableAutoScale(poolId, poolEnableAutoScaleParameter, options, callbac // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'pools/{poolId}/enableautoscale'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{poolId}', encodeURIComponent(poolId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -3114,6 +3133,9 @@ function _evaluateAutoScale(poolId, autoScaleFormula, options, callback) { let poolEvaluateAutoScaleOptions = (options && options.poolEvaluateAutoScaleOptions !== undefined) ? options.poolEvaluateAutoScaleOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (poolId === null || poolId === undefined || typeof poolId.valueOf() !== 'string') { throw new Error('poolId cannot be null or undefined and it must be of type string.'); } @@ -3175,6 +3197,7 @@ function _evaluateAutoScale(poolId, autoScaleFormula, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'pools/{poolId}/evaluateautoscale'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{poolId}', encodeURIComponent(poolId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -3387,6 +3410,9 @@ function _resize(poolId, poolResizeParameter, options, callback) { let poolResizeOptions = (options && options.poolResizeOptions !== undefined) ? options.poolResizeOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (poolId === null || poolId === undefined || typeof poolId.valueOf() !== 'string') { throw new Error('poolId cannot be null or undefined and it must be of type string.'); } @@ -3477,6 +3503,7 @@ function _resize(poolId, poolResizeParameter, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'pools/{poolId}/resize'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{poolId}', encodeURIComponent(poolId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -3665,6 +3692,9 @@ function _stopResize(poolId, options, callback) { let poolStopResizeOptions = (options && options.poolStopResizeOptions !== undefined) ? options.poolStopResizeOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (poolId === null || poolId === undefined || typeof poolId.valueOf() !== 'string') { throw new Error('poolId cannot be null or undefined and it must be of type string.'); } @@ -3752,6 +3782,7 @@ function _stopResize(poolId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'pools/{poolId}/stopresize'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{poolId}', encodeURIComponent(poolId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -3847,7 +3878,7 @@ function _stopResize(poolId, options, callback) { /** * @summary Updates the properties of the specified pool. * - * This fully replaces all the updateable properties of the pool. For example, + * This fully replaces all the updatable properties of the pool. For example, * if the pool has a start task associated with it and if start task is not * specified with this request, then the Batch service will remove the existing * start task. @@ -4045,6 +4076,9 @@ function _updateProperties(poolId, poolUpdatePropertiesParameter, options, callb let poolUpdatePropertiesOptions = (options && options.poolUpdatePropertiesOptions !== undefined) ? options.poolUpdatePropertiesOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (poolId === null || poolId === undefined || typeof poolId.valueOf() !== 'string') { throw new Error('poolId cannot be null or undefined and it must be of type string.'); } @@ -4101,6 +4135,7 @@ function _updateProperties(poolId, poolUpdatePropertiesParameter, options, callb // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'pools/{poolId}/updateproperties'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{poolId}', encodeURIComponent(poolId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -4195,300 +4230,6 @@ function _updateProperties(poolId, poolUpdatePropertiesParameter, options, callb }); } -/** - * @summary Upgrades the operating system of the specified pool. - * - * During an upgrade, the Batch service upgrades each compute node in the pool. - * When a compute node is chosen for upgrade, any tasks running on that node - * are removed from the node and returned to the queue to be rerun later (or on - * a different compute node). The node will be unavailable until the upgrade is - * complete. This operation results in temporarily reduced pool capacity as - * nodes are taken out of service to be upgraded. Although the Batch service - * tries to avoid upgrading all compute nodes at the same time, it does not - * guarantee to do this (particularly on small pools); therefore, the pool may - * be temporarily unavailable to run tasks. When this operation runs, the pool - * state changes to upgrading. When all compute nodes have finished upgrading, - * the pool state returns to active. While the upgrade is in progress, the - * pool's currentOSVersion reflects the OS version that nodes are upgrading - * from, and targetOSVersion reflects the OS version that nodes are upgrading - * to. Once the upgrade is complete, currentOSVersion is updated to reflect the - * OS version now running on all nodes. This operation can only be invoked on - * pools created with the cloudServiceConfiguration property. - * - * @param {string} poolId The ID of the pool to upgrade. - * - * @param {string} targetOSVersion The Azure Guest OS version to be installed - * on the virtual machines in the pool. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.poolUpgradeOSOptions] Additional parameters for the - * operation - * - * @param {number} [options.poolUpgradeOSOptions.timeout] The maximum time that - * the server can spend processing the request, in seconds. The default is 30 - * seconds. - * - * @param {uuid} [options.poolUpgradeOSOptions.clientRequestId] The - * caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * - * @param {boolean} [options.poolUpgradeOSOptions.returnClientRequestId] - * Whether the server should return the client-request-id in the response. - * - * @param {date} [options.poolUpgradeOSOptions.ocpDate] The time the request - * was issued. Client libraries typically set this to the current system clock - * time; set it explicitly if you are calling the REST API directly. - * - * @param {string} [options.poolUpgradeOSOptions.ifMatch] An ETag value - * associated with the version of the resource known to the client. The - * operation will be performed only if the resource's current ETag on the - * service exactly matches the value specified by the client. - * - * @param {string} [options.poolUpgradeOSOptions.ifNoneMatch] An ETag value - * associated with the version of the resource known to the client. The - * operation will be performed only if the resource's current ETag on the - * service does not match the value specified by the client. - * - * @param {date} [options.poolUpgradeOSOptions.ifModifiedSince] A timestamp - * indicating the last modified time of the resource known to the client. The - * operation will be performed only if the resource on the service has been - * modified since the specified time. - * - * @param {date} [options.poolUpgradeOSOptions.ifUnmodifiedSince] A timestamp - * indicating the last modified time of the resource known to the client. The - * operation will be performed only if the resource on the service has not been - * modified since the specified time. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} callback - The callback. - * - * @returns {function} callback(err, result, request, response) - * - * {Error} err - The Error object if an error occurred, null otherwise. - * - * {null} [result] - The deserialized result object if an error did not occur. - * - * {object} [request] - The HTTP Request object if an error did not occur. - * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ -function _upgradeOS(poolId, targetOSVersion, options, callback) { - /* jshint validthis: true */ - let client = this.client; - if(!callback && typeof options === 'function') { - callback = options; - options = null; - } - if (!callback) { - throw new Error('callback cannot be null.'); - } - let poolUpgradeOSOptions = (options && options.poolUpgradeOSOptions !== undefined) ? options.poolUpgradeOSOptions : undefined; - // Validate - try { - if (poolId === null || poolId === undefined || typeof poolId.valueOf() !== 'string') { - throw new Error('poolId cannot be null or undefined and it must be of type string.'); - } - if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); - } - if (targetOSVersion === null || targetOSVersion === undefined || typeof targetOSVersion.valueOf() !== 'string') { - throw new Error('targetOSVersion cannot be null or undefined and it must be of type string.'); - } - if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { - throw new Error('this.client.acceptLanguage must be of type string.'); - } - } catch (error) { - return callback(error); - } - let timeout; - let clientRequestId; - let returnClientRequestId; - let ocpDate; - let ifMatch; - let ifNoneMatch; - let ifModifiedSince; - let ifUnmodifiedSince; - let poolUpgradeOSParameter = new client.models['PoolUpgradeOSParameter'](); - try { - if (poolUpgradeOSOptions !== null && poolUpgradeOSOptions !== undefined) - { - timeout = poolUpgradeOSOptions.timeout; - if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { - throw new Error('timeout must be of type number.'); - } - } - if (poolUpgradeOSOptions !== null && poolUpgradeOSOptions !== undefined) - { - clientRequestId = poolUpgradeOSOptions.clientRequestId; - if (clientRequestId !== null && clientRequestId !== undefined && !(typeof clientRequestId.valueOf() === 'string' && msRest.isValidUuid(clientRequestId))) { - throw new Error('clientRequestId must be of type string and must be a valid uuid.'); - } - } - if (poolUpgradeOSOptions !== null && poolUpgradeOSOptions !== undefined) - { - returnClientRequestId = poolUpgradeOSOptions.returnClientRequestId; - if (returnClientRequestId !== null && returnClientRequestId !== undefined && typeof returnClientRequestId !== 'boolean') { - throw new Error('returnClientRequestId must be of type boolean.'); - } - } - if (poolUpgradeOSOptions !== null && poolUpgradeOSOptions !== undefined) - { - ocpDate = poolUpgradeOSOptions.ocpDate; - if (ocpDate && !(ocpDate instanceof Date || - (typeof ocpDate.valueOf() === 'string' && !isNaN(Date.parse(ocpDate))))) { - throw new Error('ocpDate must be of type date.'); - } - } - if (poolUpgradeOSOptions !== null && poolUpgradeOSOptions !== undefined) - { - ifMatch = poolUpgradeOSOptions.ifMatch; - if (ifMatch !== null && ifMatch !== undefined && typeof ifMatch.valueOf() !== 'string') { - throw new Error('ifMatch must be of type string.'); - } - } - if (poolUpgradeOSOptions !== null && poolUpgradeOSOptions !== undefined) - { - ifNoneMatch = poolUpgradeOSOptions.ifNoneMatch; - if (ifNoneMatch !== null && ifNoneMatch !== undefined && typeof ifNoneMatch.valueOf() !== 'string') { - throw new Error('ifNoneMatch must be of type string.'); - } - } - if (poolUpgradeOSOptions !== null && poolUpgradeOSOptions !== undefined) - { - ifModifiedSince = poolUpgradeOSOptions.ifModifiedSince; - if (ifModifiedSince && !(ifModifiedSince instanceof Date || - (typeof ifModifiedSince.valueOf() === 'string' && !isNaN(Date.parse(ifModifiedSince))))) { - throw new Error('ifModifiedSince must be of type date.'); - } - } - if (poolUpgradeOSOptions !== null && poolUpgradeOSOptions !== undefined) - { - ifUnmodifiedSince = poolUpgradeOSOptions.ifUnmodifiedSince; - if (ifUnmodifiedSince && !(ifUnmodifiedSince instanceof Date || - (typeof ifUnmodifiedSince.valueOf() === 'string' && !isNaN(Date.parse(ifUnmodifiedSince))))) { - throw new Error('ifUnmodifiedSince must be of type date.'); - } - } - if (targetOSVersion !== null && targetOSVersion !== undefined) - { - poolUpgradeOSParameter.targetOSVersion = targetOSVersion; - } - } catch (error) { - return callback(error); - } - - // Construct URL - let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'pools/{poolId}/upgradeos'; - requestUrl = requestUrl.replace('{poolId}', encodeURIComponent(poolId)); - let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); - if (timeout !== null && timeout !== undefined) { - queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); - } - if (queryParameters.length > 0) { - requestUrl += '?' + queryParameters.join('&'); - } - - // Create HTTP transport objects - let httpRequest = new WebResource(); - httpRequest.method = 'POST'; - httpRequest.url = requestUrl; - httpRequest.headers = {}; - // Set Headers - httpRequest.headers['Content-Type'] = 'application/json; odata=minimalmetadata; charset=utf-8'; - if (this.client.generateClientRequestId) { - httpRequest.headers['client-request-id'] = msRestAzure.generateUuid(); - } - if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { - httpRequest.headers['accept-language'] = this.client.acceptLanguage; - } - if (clientRequestId !== undefined && clientRequestId !== null) { - httpRequest.headers['client-request-id'] = clientRequestId.toString(); - } - if (returnClientRequestId !== undefined && returnClientRequestId !== null) { - httpRequest.headers['return-client-request-id'] = returnClientRequestId.toString(); - } - if (ocpDate !== undefined && ocpDate !== null) { - httpRequest.headers['ocp-date'] = ocpDate.toUTCString(); - } - if (ifMatch !== undefined && ifMatch !== null) { - httpRequest.headers['If-Match'] = ifMatch; - } - if (ifNoneMatch !== undefined && ifNoneMatch !== null) { - httpRequest.headers['If-None-Match'] = ifNoneMatch; - } - if (ifModifiedSince !== undefined && ifModifiedSince !== null) { - httpRequest.headers['If-Modified-Since'] = ifModifiedSince.toUTCString(); - } - if (ifUnmodifiedSince !== undefined && ifUnmodifiedSince !== null) { - httpRequest.headers['If-Unmodified-Since'] = ifUnmodifiedSince.toUTCString(); - } - if(options) { - for(let headerName in options['customHeaders']) { - if (options['customHeaders'].hasOwnProperty(headerName)) { - httpRequest.headers[headerName] = options['customHeaders'][headerName]; - } - } - } - // Serialize Request - let requestContent = null; - let requestModel = null; - try { - if (poolUpgradeOSParameter !== null && poolUpgradeOSParameter !== undefined) { - let requestModelMapper = new client.models['PoolUpgradeOSParameter']().mapper(); - requestModel = client.serialize(requestModelMapper, poolUpgradeOSParameter, 'poolUpgradeOSParameter'); - requestContent = JSON.stringify(requestModel); - } - } catch (error) { - let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(poolUpgradeOSParameter, null, 2)}.`); - return callback(serializationError); - } - httpRequest.body = requestContent; - // Send Request - return client.pipeline(httpRequest, (err, response, responseBody) => { - if (err) { - return callback(err); - } - let statusCode = response.statusCode; - if (statusCode !== 202) { - let error = new Error(responseBody); - error.statusCode = response.statusCode; - error.request = msRest.stripRequest(httpRequest); - error.response = msRest.stripResponse(response); - if (responseBody === '') responseBody = null; - let parsedErrorResponse; - try { - parsedErrorResponse = JSON.parse(responseBody); - if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; - } - if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { - let resultMapper = new client.models['BatchError']().mapper(); - error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); - } - } catch (defaultError) { - error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + - `- "${responseBody}" for the default response.`; - return callback(error); - } - return callback(error); - } - // Create Result - let result = null; - if (responseBody === '') responseBody = null; - - return callback(null, result, httpRequest, response); - }); -} - /** * @summary Removes compute nodes from the specified pool. * @@ -4583,6 +4324,9 @@ function _removeNodes(poolId, nodeRemoveParameter, options, callback) { let poolRemoveNodesOptions = (options && options.poolRemoveNodesOptions !== undefined) ? options.poolRemoveNodesOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (poolId === null || poolId === undefined || typeof poolId.valueOf() !== 'string') { throw new Error('poolId cannot be null or undefined and it must be of type string.'); } @@ -4673,6 +4417,7 @@ function _removeNodes(poolId, nodeRemoveParameter, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'pools/{poolId}/removenodes'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{poolId}', encodeURIComponent(poolId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -5174,7 +4919,6 @@ class Pool { this._resize = _resize; this._stopResize = _stopResize; this._updateProperties = _updateProperties; - this._upgradeOS = _upgradeOS; this._removeNodes = _removeNodes; this._listUsageMetricsNext = _listUsageMetricsNext; this._listNext = _listNext; @@ -5529,10 +5273,10 @@ class Pool { * see Azure Guest OS Releases * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * - * @param {string} [pool.cloudServiceConfiguration.targetOSVersion] The Azure - * Guest OS version to be installed on the virtual machines in the pool. The - * default value is * which specifies the latest operating system version for - * the specified OS family. + * @param {string} [pool.cloudServiceConfiguration.osVersion] The Azure Guest + * OS version to be installed on the virtual machines in the pool. The default + * value is * which specifies the latest operating system version for the + * specified OS family. * * @param {object} [pool.virtualMachineConfiguration] The virtual machine * configuration for the pool. This property and cloudServiceConfiguration are @@ -5566,18 +5310,8 @@ class Pool { * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName} * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * - * @param {object} [pool.virtualMachineConfiguration.osDisk] Settings for the - * operating system disk of the Virtual Machine. - * - * @param {string} [pool.virtualMachineConfiguration.osDisk.caching] The type - * of caching to enable for the OS disk. The default value for caching is - * readwrite. For information about the caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' + * Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. * * @param {string} pool.virtualMachineConfiguration.nodeAgentSKUId The SKU of * the Batch node agent to be provisioned on compute nodes in the pool. The @@ -5591,8 +5325,7 @@ class Pool { * * @param {object} [pool.virtualMachineConfiguration.windowsConfiguration] * Windows operating system settings on the virtual machine. This property must - * not be specified if the imageReference or osDisk property specifies a Linux - * OS image. + * not be specified if the imageReference property specifies a Linux OS image. * * @param {boolean} * [pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] @@ -5699,26 +5432,16 @@ class Pool { * Batch account. The specified subnet should have enough free IP addresses to * accommodate the number of nodes in the pool. If the subnet doesn't have * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks + * and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks * ('Microsoft.Network/virtualNetworks') are supported, but for pools created * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * + * @param {string} [pool.networkConfiguration.dynamicVNetAssignmentScope] The + * scope of dynamic vnet assignment. Possible values include: 'none', 'job' + * * @param {object} [pool.networkConfiguration.endpointConfiguration] The * configuration for endpoints on compute nodes in the Batch pool. Pool * endpoint configuration is only supported on pools with the @@ -5960,10 +5683,10 @@ class Pool { * see Azure Guest OS Releases * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * - * @param {string} [pool.cloudServiceConfiguration.targetOSVersion] The Azure - * Guest OS version to be installed on the virtual machines in the pool. The - * default value is * which specifies the latest operating system version for - * the specified OS family. + * @param {string} [pool.cloudServiceConfiguration.osVersion] The Azure Guest + * OS version to be installed on the virtual machines in the pool. The default + * value is * which specifies the latest operating system version for the + * specified OS family. * * @param {object} [pool.virtualMachineConfiguration] The virtual machine * configuration for the pool. This property and cloudServiceConfiguration are @@ -5997,18 +5720,8 @@ class Pool { * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName} * This property is mutually exclusive with other ImageReference properties. * The virtual machine image must be in the same region and subscription as the - * Azure Batch account. For information about the firewall settings for the - * Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * - * @param {object} [pool.virtualMachineConfiguration.osDisk] Settings for the - * operating system disk of the Virtual Machine. - * - * @param {string} [pool.virtualMachineConfiguration.osDisk.caching] The type - * of caching to enable for the OS disk. The default value for caching is - * readwrite. For information about the caching options see: - * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * Possible values include: 'none', 'readOnly', 'readWrite' + * Azure Batch account. For more details, see + * https://docs.microsoft.com/azure/batch/batch-custom-images. * * @param {string} pool.virtualMachineConfiguration.nodeAgentSKUId The SKU of * the Batch node agent to be provisioned on compute nodes in the pool. The @@ -6022,8 +5735,7 @@ class Pool { * * @param {object} [pool.virtualMachineConfiguration.windowsConfiguration] * Windows operating system settings on the virtual machine. This property must - * not be specified if the imageReference or osDisk property specifies a Linux - * OS image. + * not be specified if the imageReference property specifies a Linux OS image. * * @param {boolean} * [pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates] @@ -6130,26 +5842,16 @@ class Pool { * Batch account. The specified subnet should have enough free IP addresses to * accommodate the number of nodes in the pool. If the subnet doesn't have * enough free IP addresses, the pool will partially allocate compute nodes, - * and a resize error will occur. The 'MicrosoftAzureBatch' service principal - * must have the 'Classic Virtual Machine Contributor' Role-Based Access - * Control (RBAC) role for the specified VNet. The specified subnet must allow - * communication from the Azure Batch service to be able to schedule tasks on - * the compute nodes. This can be verified by checking if the specified VNet - * has any associated Network Security Groups (NSG). If communication to the - * compute nodes in the specified subnet is denied by an NSG, then the Batch - * service will set the state of the compute nodes to unusable. For pools - * created with virtualMachineConfiguration only ARM virtual networks + * and a resize error will occur. For pools created with + * virtualMachineConfiguration only ARM virtual networks * ('Microsoft.Network/virtualNetworks') are supported, but for pools created * with cloudServiceConfiguration both ARM and classic virtual networks are - * supported. If the specified VNet has any associated Network Security Groups - * (NSG), then a few reserved system ports must be enabled for inbound - * communication. For pools created with a virtual machine configuration, - * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for - * Windows. For pools created with a cloud service configuration, enable ports - * 10100, 20100, and 30100. Also enable outbound connections to Azure Storage - * on port 443. For more details see: + * supported. For more details, see: * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * + * @param {string} [pool.networkConfiguration.dynamicVNetAssignmentScope] The + * scope of dynamic vnet assignment. Possible values include: 'none', 'job' + * * @param {object} [pool.networkConfiguration.endpointConfiguration] The * configuration for endpoints on compute nodes in the Batch pool. Pool * endpoint configuration is only supported on pools with the @@ -8324,7 +8026,7 @@ class Pool { /** * @summary Updates the properties of the specified pool. * - * This fully replaces all the updateable properties of the pool. For example, + * This fully replaces all the updatable properties of the pool. For example, * if the pool has a start task associated with it and if start task is not * specified with this request, then the Batch service will remove the existing * start task. @@ -8520,7 +8222,7 @@ class Pool { /** * @summary Updates the properties of the specified pool. * - * This fully replaces all the updateable properties of the pool. For example, + * This fully replaces all the updatable properties of the pool. For example, * if the pool has a start task associated with it and if start task is not * specified with this request, then the Batch service will remove the existing * start task. @@ -8734,203 +8436,6 @@ class Pool { } } - /** - * @summary Upgrades the operating system of the specified pool. - * - * During an upgrade, the Batch service upgrades each compute node in the pool. - * When a compute node is chosen for upgrade, any tasks running on that node - * are removed from the node and returned to the queue to be rerun later (or on - * a different compute node). The node will be unavailable until the upgrade is - * complete. This operation results in temporarily reduced pool capacity as - * nodes are taken out of service to be upgraded. Although the Batch service - * tries to avoid upgrading all compute nodes at the same time, it does not - * guarantee to do this (particularly on small pools); therefore, the pool may - * be temporarily unavailable to run tasks. When this operation runs, the pool - * state changes to upgrading. When all compute nodes have finished upgrading, - * the pool state returns to active. While the upgrade is in progress, the - * pool's currentOSVersion reflects the OS version that nodes are upgrading - * from, and targetOSVersion reflects the OS version that nodes are upgrading - * to. Once the upgrade is complete, currentOSVersion is updated to reflect the - * OS version now running on all nodes. This operation can only be invoked on - * pools created with the cloudServiceConfiguration property. - * - * @param {string} poolId The ID of the pool to upgrade. - * - * @param {string} targetOSVersion The Azure Guest OS version to be installed - * on the virtual machines in the pool. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.poolUpgradeOSOptions] Additional parameters for the - * operation - * - * @param {number} [options.poolUpgradeOSOptions.timeout] The maximum time that - * the server can spend processing the request, in seconds. The default is 30 - * seconds. - * - * @param {uuid} [options.poolUpgradeOSOptions.clientRequestId] The - * caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * - * @param {boolean} [options.poolUpgradeOSOptions.returnClientRequestId] - * Whether the server should return the client-request-id in the response. - * - * @param {date} [options.poolUpgradeOSOptions.ocpDate] The time the request - * was issued. Client libraries typically set this to the current system clock - * time; set it explicitly if you are calling the REST API directly. - * - * @param {string} [options.poolUpgradeOSOptions.ifMatch] An ETag value - * associated with the version of the resource known to the client. The - * operation will be performed only if the resource's current ETag on the - * service exactly matches the value specified by the client. - * - * @param {string} [options.poolUpgradeOSOptions.ifNoneMatch] An ETag value - * associated with the version of the resource known to the client. The - * operation will be performed only if the resource's current ETag on the - * service does not match the value specified by the client. - * - * @param {date} [options.poolUpgradeOSOptions.ifModifiedSince] A timestamp - * indicating the last modified time of the resource known to the client. The - * operation will be performed only if the resource on the service has been - * modified since the specified time. - * - * @param {date} [options.poolUpgradeOSOptions.ifUnmodifiedSince] A timestamp - * indicating the last modified time of the resource known to the client. The - * operation will be performed only if the resource on the service has not been - * modified since the specified time. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error} - The error object. - */ - upgradeOSWithHttpOperationResponse(poolId, targetOSVersion, options) { - let client = this.client; - let self = this; - return new Promise((resolve, reject) => { - self._upgradeOS(poolId, targetOSVersion, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * @summary Upgrades the operating system of the specified pool. - * - * During an upgrade, the Batch service upgrades each compute node in the pool. - * When a compute node is chosen for upgrade, any tasks running on that node - * are removed from the node and returned to the queue to be rerun later (or on - * a different compute node). The node will be unavailable until the upgrade is - * complete. This operation results in temporarily reduced pool capacity as - * nodes are taken out of service to be upgraded. Although the Batch service - * tries to avoid upgrading all compute nodes at the same time, it does not - * guarantee to do this (particularly on small pools); therefore, the pool may - * be temporarily unavailable to run tasks. When this operation runs, the pool - * state changes to upgrading. When all compute nodes have finished upgrading, - * the pool state returns to active. While the upgrade is in progress, the - * pool's currentOSVersion reflects the OS version that nodes are upgrading - * from, and targetOSVersion reflects the OS version that nodes are upgrading - * to. Once the upgrade is complete, currentOSVersion is updated to reflect the - * OS version now running on all nodes. This operation can only be invoked on - * pools created with the cloudServiceConfiguration property. - * - * @param {string} poolId The ID of the pool to upgrade. - * - * @param {string} targetOSVersion The Azure Guest OS version to be installed - * on the virtual machines in the pool. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.poolUpgradeOSOptions] Additional parameters for the - * operation - * - * @param {number} [options.poolUpgradeOSOptions.timeout] The maximum time that - * the server can spend processing the request, in seconds. The default is 30 - * seconds. - * - * @param {uuid} [options.poolUpgradeOSOptions.clientRequestId] The - * caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - * - * @param {boolean} [options.poolUpgradeOSOptions.returnClientRequestId] - * Whether the server should return the client-request-id in the response. - * - * @param {date} [options.poolUpgradeOSOptions.ocpDate] The time the request - * was issued. Client libraries typically set this to the current system clock - * time; set it explicitly if you are calling the REST API directly. - * - * @param {string} [options.poolUpgradeOSOptions.ifMatch] An ETag value - * associated with the version of the resource known to the client. The - * operation will be performed only if the resource's current ETag on the - * service exactly matches the value specified by the client. - * - * @param {string} [options.poolUpgradeOSOptions.ifNoneMatch] An ETag value - * associated with the version of the resource known to the client. The - * operation will be performed only if the resource's current ETag on the - * service does not match the value specified by the client. - * - * @param {date} [options.poolUpgradeOSOptions.ifModifiedSince] A timestamp - * indicating the last modified time of the resource known to the client. The - * operation will be performed only if the resource on the service has been - * modified since the specified time. - * - * @param {date} [options.poolUpgradeOSOptions.ifUnmodifiedSince] A timestamp - * indicating the last modified time of the resource known to the client. The - * operation will be performed only if the resource on the service has not been - * modified since the specified time. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} [optionalCallback] - The optional callback. - * - * @returns {function|Promise} If a callback was passed as the last parameter - * then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned - * - * @resolve {null} - The deserialized result object. - * - * @reject {Error} - The error object. - * - * {function} optionalCallback(err, result, request, response) - * - * {Error} err - The Error object if an error occurred, null otherwise. - * - * {null} [result] - The deserialized result object if an error did not occur. - * - * {object} [request] - The HTTP Request object if an error did not occur. - * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ - upgradeOS(poolId, targetOSVersion, options, optionalCallback) { - let client = this.client; - let self = this; - if (!optionalCallback && typeof options === 'function') { - optionalCallback = options; - options = null; - } - if (!optionalCallback) { - return new Promise((resolve, reject) => { - self._upgradeOS(poolId, targetOSVersion, options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._upgradeOS(poolId, targetOSVersion, options, optionalCallback); - } - } - /** * @summary Removes compute nodes from the specified pool. * diff --git a/lib/services/batch/lib/operations/task.js b/lib/services/batch/lib/operations/task.js index 2f21d007f8..1868a251dc 100644 --- a/lib/services/batch/lib/operations/task.js +++ b/lib/services/batch/lib/operations/task.js @@ -18,9 +18,9 @@ const moment = require('moment'); /** * @summary Adds a task to the specified job. * - * The maximum lifetime of a task from addition to completion is 7 days. If a - * task has not completed within 7 days of being added it will be terminated by - * the Batch service and left in whatever state it was in at that time. + * The maximum lifetime of a task from addition to completion is 180 days. If a + * task has not completed within 180 days of being added it will be terminated + * by the Batch service and left in whatever state it was in at that time. * * @param {string} jobId The ID of the job to which the task is to be added. * @@ -104,7 +104,7 @@ const moment = require('moment'); * code not listed in the exitCodes or exitCodeRanges collection, with a * pre-processing error if the preProcessingError property is not present, or * with a file upload error if the fileUploadError property is not present. If - * you want non-default behaviour on exit code 0, you must list it explicitly + * you want non-default behavior on exit code 0, you must list it explicitly * using the exitCodes or exitCodeRanges collection. * * @param {string} [task.exitConditions.default.jobAction] An action to take on @@ -155,8 +155,8 @@ const moment = require('moment'); * * @param {object} [task.constraints] The execution constraints that apply to * this task. If you do not specify constraints, the maxTaskRetryCount is the - * maxTaskRetryCount specified for the job, and the maxWallClockTime and - * retentionTime are infinite. + * maxTaskRetryCount specified for the job, the maxWallClockTime is infinite, + * and the retentionTime is 7 days. * * @param {moment.duration} [task.constraints.maxWallClockTime] The maximum * elapsed time that the task may run, measured from the time the task starts. @@ -167,8 +167,9 @@ const moment = require('moment'); * @param {moment.duration} [task.constraints.retentionTime] The minimum time * to retain the task directory on the compute node where it ran, from the time * it completes execution. After this time, the Batch service may delete the - * task directory and all its contents. The default is infinite, i.e. the task - * directory will be retained until the compute node is removed or reimaged. + * task directory and all its contents. The default is 7 days, i.e. the task + * directory will be retained for 7 days unless the compute node is removed or + * the job is deleted. * * @param {number} [task.constraints.maxTaskRetryCount] The maximum number of * times the task may be retried. The Batch service retries a task if its exit @@ -179,8 +180,6 @@ const moment = require('moment'); * (one initial try and 3 retries). If the maximum retry count is 0, the Batch * service does not retry the task after the first attempt. If the maximum * retry count is -1, the Batch service retries the task without limit. - * Resource files and application packages are only downloaded again if the - * task is retried on a new compute node. * * @param {object} [task.userIdentity] The user identity under which the task * runs. If omitted, the task runs as a non-administrative user unique to the @@ -320,6 +319,9 @@ function _add(jobId, task, options, callback) { let taskAddOptions = (options && options.taskAddOptions !== undefined) ? options.taskAddOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (jobId === null || jobId === undefined || typeof jobId.valueOf() !== 'string') { throw new Error('jobId cannot be null or undefined and it must be of type string.'); } @@ -376,6 +378,7 @@ function _add(jobId, task, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'jobs/{jobId}/tasks'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{jobId}', encodeURIComponent(jobId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -539,6 +542,9 @@ function _list(jobId, options, callback) { let taskListOptions = (options && options.taskListOptions !== undefined) ? options.taskListOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (jobId === null || jobId === undefined || typeof jobId.valueOf() !== 'string') { throw new Error('jobId cannot be null or undefined and it must be of type string.'); } @@ -624,6 +630,7 @@ function _list(jobId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'jobs/{jobId}/tasks'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{jobId}', encodeURIComponent(jobId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -748,7 +755,7 @@ function _list(jobId, options, callback) { * client can retry the request. In a retry, it is most efficient to resubmit * only tasks that failed to add, and to omit tasks that were successfully * added on the first attempt. The maximum lifetime of a task from addition to - * completion is 7 days. If a task has not completed within 7 days of being + * completion is 180 days. If a task has not completed within 180 days of being * added it will be terminated by the Batch service and left in whatever state * it was in at that time. * @@ -812,6 +819,9 @@ function _addCollection(jobId, value, options, callback) { let taskAddCollectionOptions = (options && options.taskAddCollectionOptions !== undefined) ? options.taskAddCollectionOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (jobId === null || jobId === undefined || typeof jobId.valueOf() !== 'string') { throw new Error('jobId cannot be null or undefined and it must be of type string.'); } @@ -876,6 +886,7 @@ function _addCollection(jobId, value, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'jobs/{jobId}/addtaskcollection'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{jobId}', encodeURIComponent(jobId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -1068,6 +1079,9 @@ function _deleteMethod(jobId, taskId, options, callback) { let taskDeleteMethodOptions = (options && options.taskDeleteMethodOptions !== undefined) ? options.taskDeleteMethodOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (jobId === null || jobId === undefined || typeof jobId.valueOf() !== 'string') { throw new Error('jobId cannot be null or undefined and it must be of type string.'); } @@ -1158,6 +1172,7 @@ function _deleteMethod(jobId, taskId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'jobs/{jobId}/tasks/{taskId}'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{jobId}', encodeURIComponent(jobId)); requestUrl = requestUrl.replace('{taskId}', encodeURIComponent(taskId)); let queryParameters = []; @@ -1335,6 +1350,9 @@ function _get(jobId, taskId, options, callback) { let taskGetOptions = (options && options.taskGetOptions !== undefined) ? options.taskGetOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (jobId === null || jobId === undefined || typeof jobId.valueOf() !== 'string') { throw new Error('jobId cannot be null or undefined and it must be of type string.'); } @@ -1441,6 +1459,7 @@ function _get(jobId, taskId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'jobs/{jobId}/tasks/{taskId}'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{jobId}', encodeURIComponent(jobId)); requestUrl = requestUrl.replace('{taskId}', encodeURIComponent(taskId)); let queryParameters = []; @@ -1580,9 +1599,9 @@ function _get(jobId, taskId, options, callback) { * @param {moment.duration} [options.constraints.retentionTime] The minimum * time to retain the task directory on the compute node where it ran, from the * time it completes execution. After this time, the Batch service may delete - * the task directory and all its contents. The default is infinite, i.e. the - * task directory will be retained until the compute node is removed or - * reimaged. + * the task directory and all its contents. The default is 7 days, i.e. the + * task directory will be retained for 7 days unless the compute node is + * removed or the job is deleted. * * @param {number} [options.constraints.maxTaskRetryCount] The maximum number * of times the task may be retried. The Batch service retries a task if its @@ -1593,8 +1612,6 @@ function _get(jobId, taskId, options, callback) { * (one initial try and 3 retries). If the maximum retry count is 0, the Batch * service does not retry the task after the first attempt. If the maximum * retry count is -1, the Batch service retries the task without limit. - * Resource files and application packages are only downloaded again if the - * task is retried on a new compute node. * * @param {object} [options.taskUpdateOptions] Additional parameters for the * operation @@ -1663,6 +1680,9 @@ function _update(jobId, taskId, options, callback) { let taskUpdateOptions = (options && options.taskUpdateOptions !== undefined) ? options.taskUpdateOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (jobId === null || jobId === undefined || typeof jobId.valueOf() !== 'string') { throw new Error('jobId cannot be null or undefined and it must be of type string.'); } @@ -1758,6 +1778,7 @@ function _update(jobId, taskId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'jobs/{jobId}/tasks/{taskId}'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{jobId}', encodeURIComponent(jobId)); requestUrl = requestUrl.replace('{taskId}', encodeURIComponent(taskId)); let queryParameters = []; @@ -1929,6 +1950,9 @@ function _listSubtasks(jobId, taskId, options, callback) { let taskListSubtasksOptions = (options && options.taskListSubtasksOptions !== undefined) ? options.taskListSubtasksOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (jobId === null || jobId === undefined || typeof jobId.valueOf() !== 'string') { throw new Error('jobId cannot be null or undefined and it must be of type string.'); } @@ -1993,6 +2017,7 @@ function _listSubtasks(jobId, taskId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'jobs/{jobId}/tasks/{taskId}/subtasksinfo'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{jobId}', encodeURIComponent(jobId)); requestUrl = requestUrl.replace('{taskId}', encodeURIComponent(taskId)); let queryParameters = []; @@ -2174,6 +2199,9 @@ function _terminate(jobId, taskId, options, callback) { let taskTerminateOptions = (options && options.taskTerminateOptions !== undefined) ? options.taskTerminateOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (jobId === null || jobId === undefined || typeof jobId.valueOf() !== 'string') { throw new Error('jobId cannot be null or undefined and it must be of type string.'); } @@ -2264,6 +2292,7 @@ function _terminate(jobId, taskId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'jobs/{jobId}/tasks/{taskId}/terminate'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{jobId}', encodeURIComponent(jobId)); requestUrl = requestUrl.replace('{taskId}', encodeURIComponent(taskId)); let queryParameters = []; @@ -2442,6 +2471,9 @@ function _reactivate(jobId, taskId, options, callback) { let taskReactivateOptions = (options && options.taskReactivateOptions !== undefined) ? options.taskReactivateOptions : undefined; // Validate try { + if (this.client.batchUrl === null || this.client.batchUrl === undefined || typeof this.client.batchUrl.valueOf() !== 'string') { + throw new Error('this.client.batchUrl cannot be null or undefined and it must be of type string.'); + } if (jobId === null || jobId === undefined || typeof jobId.valueOf() !== 'string') { throw new Error('jobId cannot be null or undefined and it must be of type string.'); } @@ -2532,6 +2564,7 @@ function _reactivate(jobId, taskId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'jobs/{jobId}/tasks/{taskId}/reactivate'; + requestUrl = requestUrl.replace('{batchUrl}', this.client.batchUrl); requestUrl = requestUrl.replace('{jobId}', encodeURIComponent(jobId)); requestUrl = requestUrl.replace('{taskId}', encodeURIComponent(taskId)); let queryParameters = []; @@ -2833,9 +2866,9 @@ class Task { /** * @summary Adds a task to the specified job. * - * The maximum lifetime of a task from addition to completion is 7 days. If a - * task has not completed within 7 days of being added it will be terminated by - * the Batch service and left in whatever state it was in at that time. + * The maximum lifetime of a task from addition to completion is 180 days. If a + * task has not completed within 180 days of being added it will be terminated + * by the Batch service and left in whatever state it was in at that time. * * @param {string} jobId The ID of the job to which the task is to be added. * @@ -2919,7 +2952,7 @@ class Task { * code not listed in the exitCodes or exitCodeRanges collection, with a * pre-processing error if the preProcessingError property is not present, or * with a file upload error if the fileUploadError property is not present. If - * you want non-default behaviour on exit code 0, you must list it explicitly + * you want non-default behavior on exit code 0, you must list it explicitly * using the exitCodes or exitCodeRanges collection. * * @param {string} [task.exitConditions.default.jobAction] An action to take on @@ -2970,8 +3003,8 @@ class Task { * * @param {object} [task.constraints] The execution constraints that apply to * this task. If you do not specify constraints, the maxTaskRetryCount is the - * maxTaskRetryCount specified for the job, and the maxWallClockTime and - * retentionTime are infinite. + * maxTaskRetryCount specified for the job, the maxWallClockTime is infinite, + * and the retentionTime is 7 days. * * @param {moment.duration} [task.constraints.maxWallClockTime] The maximum * elapsed time that the task may run, measured from the time the task starts. @@ -2982,8 +3015,9 @@ class Task { * @param {moment.duration} [task.constraints.retentionTime] The minimum time * to retain the task directory on the compute node where it ran, from the time * it completes execution. After this time, the Batch service may delete the - * task directory and all its contents. The default is infinite, i.e. the task - * directory will be retained until the compute node is removed or reimaged. + * task directory and all its contents. The default is 7 days, i.e. the task + * directory will be retained for 7 days unless the compute node is removed or + * the job is deleted. * * @param {number} [task.constraints.maxTaskRetryCount] The maximum number of * times the task may be retried. The Batch service retries a task if its exit @@ -2994,8 +3028,6 @@ class Task { * (one initial try and 3 retries). If the maximum retry count is 0, the Batch * service does not retry the task after the first attempt. If the maximum * retry count is -1, the Batch service retries the task without limit. - * Resource files and application packages are only downloaded again if the - * task is retried on a new compute node. * * @param {object} [task.userIdentity] The user identity under which the task * runs. If omitted, the task runs as a non-administrative user unique to the @@ -3133,9 +3165,9 @@ class Task { /** * @summary Adds a task to the specified job. * - * The maximum lifetime of a task from addition to completion is 7 days. If a - * task has not completed within 7 days of being added it will be terminated by - * the Batch service and left in whatever state it was in at that time. + * The maximum lifetime of a task from addition to completion is 180 days. If a + * task has not completed within 180 days of being added it will be terminated + * by the Batch service and left in whatever state it was in at that time. * * @param {string} jobId The ID of the job to which the task is to be added. * @@ -3219,7 +3251,7 @@ class Task { * code not listed in the exitCodes or exitCodeRanges collection, with a * pre-processing error if the preProcessingError property is not present, or * with a file upload error if the fileUploadError property is not present. If - * you want non-default behaviour on exit code 0, you must list it explicitly + * you want non-default behavior on exit code 0, you must list it explicitly * using the exitCodes or exitCodeRanges collection. * * @param {string} [task.exitConditions.default.jobAction] An action to take on @@ -3270,8 +3302,8 @@ class Task { * * @param {object} [task.constraints] The execution constraints that apply to * this task. If you do not specify constraints, the maxTaskRetryCount is the - * maxTaskRetryCount specified for the job, and the maxWallClockTime and - * retentionTime are infinite. + * maxTaskRetryCount specified for the job, the maxWallClockTime is infinite, + * and the retentionTime is 7 days. * * @param {moment.duration} [task.constraints.maxWallClockTime] The maximum * elapsed time that the task may run, measured from the time the task starts. @@ -3282,8 +3314,9 @@ class Task { * @param {moment.duration} [task.constraints.retentionTime] The minimum time * to retain the task directory on the compute node where it ran, from the time * it completes execution. After this time, the Batch service may delete the - * task directory and all its contents. The default is infinite, i.e. the task - * directory will be retained until the compute node is removed or reimaged. + * task directory and all its contents. The default is 7 days, i.e. the task + * directory will be retained for 7 days unless the compute node is removed or + * the job is deleted. * * @param {number} [task.constraints.maxTaskRetryCount] The maximum number of * times the task may be retried. The Batch service retries a task if its exit @@ -3294,8 +3327,6 @@ class Task { * (one initial try and 3 retries). If the maximum retry count is 0, the Batch * service does not retry the task after the first attempt. If the maximum * retry count is -1, the Batch service retries the task without limit. - * Resource files and application packages are only downloaded again if the - * task is retried on a new compute node. * * @param {object} [task.userIdentity] The user identity under which the task * runs. If omitted, the task runs as a non-administrative user unique to the @@ -3614,7 +3645,7 @@ class Task { * client can retry the request. In a retry, it is most efficient to resubmit * only tasks that failed to add, and to omit tasks that were successfully * added on the first attempt. The maximum lifetime of a task from addition to - * completion is 7 days. If a task has not completed within 7 days of being + * completion is 180 days. If a task has not completed within 180 days of being * added it will be terminated by the Batch service and left in whatever state * it was in at that time. * @@ -3686,7 +3717,7 @@ class Task { * client can retry the request. In a retry, it is most efficient to resubmit * only tasks that failed to add, and to omit tasks that were successfully * added on the first attempt. The maximum lifetime of a task from addition to - * completion is 7 days. If a task has not completed within 7 days of being + * completion is 180 days. If a task has not completed within 180 days of being * added it will be terminated by the Batch service and left in whatever state * it was in at that time. * @@ -4140,9 +4171,9 @@ class Task { * @param {moment.duration} [options.constraints.retentionTime] The minimum * time to retain the task directory on the compute node where it ran, from the * time it completes execution. After this time, the Batch service may delete - * the task directory and all its contents. The default is infinite, i.e. the - * task directory will be retained until the compute node is removed or - * reimaged. + * the task directory and all its contents. The default is 7 days, i.e. the + * task directory will be retained for 7 days unless the compute node is + * removed or the job is deleted. * * @param {number} [options.constraints.maxTaskRetryCount] The maximum number * of times the task may be retried. The Batch service retries a task if its @@ -4153,8 +4184,6 @@ class Task { * (one initial try and 3 retries). If the maximum retry count is 0, the Batch * service does not retry the task after the first attempt. If the maximum * retry count is -1, the Batch service retries the task without limit. - * Resource files and application packages are only downloaded again if the - * task is retried on a new compute node. * * @param {object} [options.taskUpdateOptions] Additional parameters for the * operation @@ -4240,9 +4269,9 @@ class Task { * @param {moment.duration} [options.constraints.retentionTime] The minimum * time to retain the task directory on the compute node where it ran, from the * time it completes execution. After this time, the Batch service may delete - * the task directory and all its contents. The default is infinite, i.e. the - * task directory will be retained until the compute node is removed or - * reimaged. + * the task directory and all its contents. The default is 7 days, i.e. the + * task directory will be retained for 7 days unless the compute node is + * removed or the job is deleted. * * @param {number} [options.constraints.maxTaskRetryCount] The maximum number * of times the task may be retried. The Batch service retries a task if its @@ -4253,8 +4282,6 @@ class Task { * (one initial try and 3 retries). If the maximum retry count is 0, the Batch * service does not retry the task after the first attempt. If the maximum * retry count is -1, the Batch service retries the task without limit. - * Resource files and application packages are only downloaded again if the - * task is retried on a new compute node. * * @param {object} [options.taskUpdateOptions] Additional parameters for the * operation diff --git a/lib/services/batch/package.json b/lib/services/batch/package.json index 0947bde6e3..7bfb8af857 100644 --- a/lib/services/batch/package.json +++ b/lib/services/batch/package.json @@ -4,7 +4,7 @@ "contributors": [ "Wu, Xing " ], - "version": "4.1.0", + "version": "5.0.0", "description": "Microsoft Azure Batch Service Client Library for node", "tags": [ "azure", diff --git a/lib/services/cognitiveServicesAutoSuggest/lib/autoSuggestClient.d.ts b/lib/services/cognitiveServicesAutoSuggest/lib/autoSuggestClient.d.ts new file mode 100644 index 0000000000..37cbad988b --- /dev/null +++ b/lib/services/cognitiveServicesAutoSuggest/lib/autoSuggestClient.d.ts @@ -0,0 +1,448 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import { ServiceClient, ServiceClientOptions, ServiceCallback, HttpOperationResponse, ServiceClientCredentials } from 'ms-rest'; +import * as models from "./models"; + +/** + * AutoSuggestClientOptions for AutoSuggestClient. + */ +declare interface AutoSuggestClientOptions extends ServiceClientOptions { + /** + * @property {string} [endpoint] - Supported Cognitive Services endpoints (protocol and hostname, for example: "https://westus.api.cognitive.microsoft.com", "https://api.cognitive.microsoft.com"). + */ + endpoint?: string; +} + +export default class AutoSuggestClient extends ServiceClient { + /** + * @class + * Initializes a new instance of the AutoSuggestClient class. + * @constructor + * + * @param {credentials} credentials - Subscription credentials which uniquely identify client subscription. + * + * @param {object} [options] - The parameter options + * + * @param {Array} [options.filters] - Filters to be added to the request pipeline + * + * @param {object} [options.requestOptions] - Options for the underlying request object + * {@link https://github.com/request/request#requestoptions-callback Options doc} + * + * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy + * + * @param {string} [options.endpoint] - Supported Cognitive Services endpoints (protocol and hostname, for example: "https://westus.api.cognitive.microsoft.com", "https://api.cognitive.microsoft.com"). + * + */ + constructor(credentials: ServiceClientCredentials, options?: AutoSuggestClientOptions); + + credentials: ServiceClientCredentials; + + endpoint: string; + + + /** + * @summary The AutoSuggest API lets you send a search query to Bing and get + * back a list of query suggestions. This section provides technical details + * about the query parameters and headers that you use to request suggestions + * and the JSON response objects that contain them. + * + * @param {string} query The user's search term. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.acceptLanguage] A comma-delimited list of one or + * more languages to use for user interface strings. The list is in decreasing + * order of preference. For additional information, including expected format, + * see [RFC2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). This + * header and the setLang query parameter are mutually exclusive; do not + * specify both. If you set this header, you must also specify the + * [cc](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-autosuggest-api-v7-reference#cc) + * query parameter. To determine the market to return results for, Bing uses + * the first supported language it finds from the list and combines it with the + * cc parameter value. If the list does not include a supported language, Bing + * finds the closest language and market that supports the request or it uses + * an aggregated or default market for the results. To determine the market + * that Bing used, see the BingAPIs-Market header. Use this header and the cc + * query parameter only if you specify multiple languages. Otherwise, use the + * [mkt](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-autosuggest-api-v7-reference#mkt) + * and + * [setLang](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-autosuggest-api-v7-reference#setlang) + * query parameters. A user interface string is a string that's used as a label + * in a user interface. There are few user interface strings in the JSON + * response objects. Any links to Bing.com properties in the response objects + * apply the specified language. + * + * @param {string} [options.pragma] By default, Bing returns cached content, if + * available. To prevent Bing from returning cached content, set the Pragma + * header to no-cache (for example, Pragma: no-cache). + * + * @param {string} [options.userAgent] The user agent originating the request. + * Bing uses the user agent to provide mobile users with an optimized + * experience. Although optional, you are encouraged to always specify this + * header. The user-agent should be the same string that any commonly used + * browser sends. For information about user agents, see [RFC + * 2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). The following + * are examples of user-agent strings. Windows Phone: Mozilla/5.0 (compatible; + * MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; + * Lumia 822). Android: Mozilla / 5.0 (Linux; U; Android 2.3.5; en - us; SCH - + * I500 Build / GINGERBREAD) AppleWebKit / 533.1 (KHTML; like Gecko) Version / + * 4.0 Mobile Safari / 533.1. iPhone: Mozilla / 5.0 (iPhone; CPU iPhone OS 6_1 + * like Mac OS X) AppleWebKit / 536.26 (KHTML; like Gecko) Mobile / 10B142 + * iPhone4; 1 BingWeb / 3.03.1428.20120423. PC: Mozilla / 5.0 (Windows NT 6.3; + * WOW64; Trident / 7.0; Touch; rv:11.0) like Gecko. iPad: Mozilla / 5.0 (iPad; + * CPU OS 7_0 like Mac OS X) AppleWebKit / 537.51.1 (KHTML, like Gecko) Version + * / 7.0 Mobile / 11A465 Safari / 9537.53 + * + * @param {string} [options.clientId] Bing uses this header to provide users + * with consistent behavior across Bing API calls. Bing often flights new + * features and improvements, and it uses the client ID as a key for assigning + * traffic on different flights. If you do not use the same client ID for a + * user across multiple requests, then Bing may assign the user to multiple + * conflicting flights. Being assigned to multiple conflicting flights can lead + * to an inconsistent user experience. For example, if the second request has a + * different flight assignment than the first, the experience may be + * unexpected. Also, Bing can use the client ID to tailor web results to that + * client ID’s search history, providing a richer experience for the user. Bing + * also uses this header to help improve result rankings by analyzing the + * activity generated by a client ID. The relevance improvements help with + * better quality of results delivered by Bing APIs and in turn enables higher + * click-through rates for the API consumer. IMPORTANT: Although optional, you + * should consider this header required. Persisting the client ID across + * multiple requests for the same end user and device combination enables 1) + * the API consumer to receive a consistent user experience, and 2) higher + * click-through rates via better quality of results from the Bing APIs. Each + * user that uses your application on the device must have a unique, Bing + * generated client ID. If you do not include this header in the request, Bing + * generates an ID and returns it in the X-MSEdge-ClientID response header. The + * only time that you should NOT include this header in a request is the first + * time the user uses your app on that device. Use the client ID for each Bing + * API request that your app makes for this user on the device. Persist the + * client ID. To persist the ID in a browser app, use a persistent HTTP cookie + * to ensure the ID is used across all sessions. Do not use a session cookie. + * For other apps such as mobile apps, use the device's persistent storage to + * persist the ID. The next time the user uses your app on that device, get the + * client ID that you persisted. Bing responses may or may not include this + * header. If the response includes this header, capture the client ID and use + * it for all subsequent Bing requests for the user on that device. If you + * include the X-MSEdge-ClientID, you must not include cookies in the request. + * + * @param {string} [options.clientIp] The IPv4 or IPv6 address of the client + * device. The IP address is used to discover the user's location. Bing uses + * the location information to determine safe search behavior. Although + * optional, you are encouraged to always specify this header and the + * X-Search-Location header. Do not obfuscate the address (for example, by + * changing the last octet to 0). Obfuscating the address results in the + * location not being anywhere near the device's actual location, which may + * result in Bing serving erroneous results. + * + * @param {string} [options.location] A semicolon-delimited list of key/value + * pairs that describe the client's geographical location. Bing uses the + * location information to determine safe search behavior and to return + * relevant local content. Specify the key/value pair as :. The + * following are the keys that you use to specify the user's location. lat + * (required): The latitude of the client's location, in degrees. The latitude + * must be greater than or equal to -90.0 and less than or equal to +90.0. + * Negative values indicate southern latitudes and positive values indicate + * northern latitudes. long (required): The longitude of the client's location, + * in degrees. The longitude must be greater than or equal to -180.0 and less + * than or equal to +180.0. Negative values indicate western longitudes and + * positive values indicate eastern longitudes. re (required): The radius, in + * meters, which specifies the horizontal accuracy of the coordinates. Pass the + * value returned by the device's location service. Typical values might be 22m + * for GPS/Wi-Fi, 380m for cell tower triangulation, and 18,000m for reverse IP + * lookup. ts (optional): The UTC UNIX timestamp of when the client was at the + * location. (The UNIX timestamp is the number of seconds since January 1, + * 1970.) head (optional): The client's relative heading or direction of + * travel. Specify the direction of travel as degrees from 0 through 360, + * counting clockwise relative to true north. Specify this key only if the sp + * key is nonzero. sp (optional): The horizontal velocity (speed), in meters + * per second, that the client device is traveling. alt (optional): The + * altitude of the client device, in meters. are (optional): The radius, in + * meters, that specifies the vertical accuracy of the coordinates. Specify + * this key only if you specify the alt key. Although many of the keys are + * optional, the more information that you provide, the more accurate the + * location results are. Although optional, you are encouraged to always + * specify the user's geographical location. Providing the location is + * especially important if the client's IP address does not accurately reflect + * the user's physical location (for example, if the client uses VPN). For + * optimal results, you should include this header and the X-MSEdge-ClientIP + * header, but at a minimum, you should include this header. + * + * @param {string} [options.countryCode] A 2-character country code of the + * country where the results come from. This API supports only the United + * States market. If you specify this query parameter, it must be set to us. If + * you set this parameter, you must also specify the Accept-Language header. + * Bing uses the first supported language it finds from the languages list, and + * combine that language with the country code that you specify to determine + * the market to return results for. If the languages list does not include a + * supported language, Bing finds the closest language and market that supports + * the request, or it may use an aggregated or default market for the results + * instead of a specified one. You should use this query parameter and the + * Accept-Language query parameter only if you specify multiple languages; + * otherwise, you should use the mkt and setLang query parameters. This + * parameter and the mkt query parameter are mutually exclusive—do not specify + * both. + * + * @param {string} [options.market] The market where the results come from. You + * are strongly encouraged to always specify the market, if known. Specifying + * the market helps Bing route the request and return an appropriate and + * optimal response. This parameter and the cc query parameter are mutually + * exclusive—do not specify both. + * + * @param {string} [options.safeSearch] Filter suggestions for adult content. + * The following are the possible filter values. Off: Return suggestions with + * adult text, images, or videos. Moderate: Return suggestion with adult text + * but not adult images or videos. Strict: Do not return news articles with + * adult text, images, or videos. If the request comes from a market that + * Bing's adult policy requires that safeSearch is set to Strict, Bing ignores + * the safeSearch value and uses Strict. If you use the site: query operator, + * there is the chance that the response may contain adult content regardless + * of what the safeSearch query parameter is set to. Use site: only if you are + * aware of the content on the site and your scenario supports the possibility + * of adult content. Possible values include: 'Off', 'Moderate', 'Strict' + * + * @param {string} [options.setLang] The language to use for user interface + * strings. Specify the language using the ISO 639-1 2-letter language code. + * For example, the language code for English is EN. The default is EN + * (English). Although optional, you should always specify the language. + * Typically, you set setLang to the same language specified by mkt unless the + * user wants the user interface strings displayed in a different language. + * This parameter and the Accept-Language header are mutually exclusive; do not + * specify both. A user interface string is a string that's used as a label in + * a user interface. There are few user interface strings in the JSON response + * objects. Also, any links to Bing.com properties in the response objects + * apply the specified language. + * + * @param {array} [options.responseFormat] The media type to use for the + * response. The following are the possible case-insensitive values: JSON, + * JSONLD. The default is JSON. If you specify JSONLD, the response body + * includes JSON-LD objects that contain the search results. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + autoSuggestWithHttpOperationResponse(query: string, options?: { acceptLanguage? : string, pragma? : string, userAgent? : string, clientId? : string, clientIp? : string, location? : string, countryCode? : string, market? : string, safeSearch? : string, setLang? : string, responseFormat? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary The AutoSuggest API lets you send a search query to Bing and get + * back a list of query suggestions. This section provides technical details + * about the query parameters and headers that you use to request suggestions + * and the JSON response objects that contain them. + * + * @param {string} query The user's search term. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.acceptLanguage] A comma-delimited list of one or + * more languages to use for user interface strings. The list is in decreasing + * order of preference. For additional information, including expected format, + * see [RFC2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). This + * header and the setLang query parameter are mutually exclusive; do not + * specify both. If you set this header, you must also specify the + * [cc](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-autosuggest-api-v7-reference#cc) + * query parameter. To determine the market to return results for, Bing uses + * the first supported language it finds from the list and combines it with the + * cc parameter value. If the list does not include a supported language, Bing + * finds the closest language and market that supports the request or it uses + * an aggregated or default market for the results. To determine the market + * that Bing used, see the BingAPIs-Market header. Use this header and the cc + * query parameter only if you specify multiple languages. Otherwise, use the + * [mkt](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-autosuggest-api-v7-reference#mkt) + * and + * [setLang](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-autosuggest-api-v7-reference#setlang) + * query parameters. A user interface string is a string that's used as a label + * in a user interface. There are few user interface strings in the JSON + * response objects. Any links to Bing.com properties in the response objects + * apply the specified language. + * + * @param {string} [options.pragma] By default, Bing returns cached content, if + * available. To prevent Bing from returning cached content, set the Pragma + * header to no-cache (for example, Pragma: no-cache). + * + * @param {string} [options.userAgent] The user agent originating the request. + * Bing uses the user agent to provide mobile users with an optimized + * experience. Although optional, you are encouraged to always specify this + * header. The user-agent should be the same string that any commonly used + * browser sends. For information about user agents, see [RFC + * 2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). The following + * are examples of user-agent strings. Windows Phone: Mozilla/5.0 (compatible; + * MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; + * Lumia 822). Android: Mozilla / 5.0 (Linux; U; Android 2.3.5; en - us; SCH - + * I500 Build / GINGERBREAD) AppleWebKit / 533.1 (KHTML; like Gecko) Version / + * 4.0 Mobile Safari / 533.1. iPhone: Mozilla / 5.0 (iPhone; CPU iPhone OS 6_1 + * like Mac OS X) AppleWebKit / 536.26 (KHTML; like Gecko) Mobile / 10B142 + * iPhone4; 1 BingWeb / 3.03.1428.20120423. PC: Mozilla / 5.0 (Windows NT 6.3; + * WOW64; Trident / 7.0; Touch; rv:11.0) like Gecko. iPad: Mozilla / 5.0 (iPad; + * CPU OS 7_0 like Mac OS X) AppleWebKit / 537.51.1 (KHTML, like Gecko) Version + * / 7.0 Mobile / 11A465 Safari / 9537.53 + * + * @param {string} [options.clientId] Bing uses this header to provide users + * with consistent behavior across Bing API calls. Bing often flights new + * features and improvements, and it uses the client ID as a key for assigning + * traffic on different flights. If you do not use the same client ID for a + * user across multiple requests, then Bing may assign the user to multiple + * conflicting flights. Being assigned to multiple conflicting flights can lead + * to an inconsistent user experience. For example, if the second request has a + * different flight assignment than the first, the experience may be + * unexpected. Also, Bing can use the client ID to tailor web results to that + * client ID’s search history, providing a richer experience for the user. Bing + * also uses this header to help improve result rankings by analyzing the + * activity generated by a client ID. The relevance improvements help with + * better quality of results delivered by Bing APIs and in turn enables higher + * click-through rates for the API consumer. IMPORTANT: Although optional, you + * should consider this header required. Persisting the client ID across + * multiple requests for the same end user and device combination enables 1) + * the API consumer to receive a consistent user experience, and 2) higher + * click-through rates via better quality of results from the Bing APIs. Each + * user that uses your application on the device must have a unique, Bing + * generated client ID. If you do not include this header in the request, Bing + * generates an ID and returns it in the X-MSEdge-ClientID response header. The + * only time that you should NOT include this header in a request is the first + * time the user uses your app on that device. Use the client ID for each Bing + * API request that your app makes for this user on the device. Persist the + * client ID. To persist the ID in a browser app, use a persistent HTTP cookie + * to ensure the ID is used across all sessions. Do not use a session cookie. + * For other apps such as mobile apps, use the device's persistent storage to + * persist the ID. The next time the user uses your app on that device, get the + * client ID that you persisted. Bing responses may or may not include this + * header. If the response includes this header, capture the client ID and use + * it for all subsequent Bing requests for the user on that device. If you + * include the X-MSEdge-ClientID, you must not include cookies in the request. + * + * @param {string} [options.clientIp] The IPv4 or IPv6 address of the client + * device. The IP address is used to discover the user's location. Bing uses + * the location information to determine safe search behavior. Although + * optional, you are encouraged to always specify this header and the + * X-Search-Location header. Do not obfuscate the address (for example, by + * changing the last octet to 0). Obfuscating the address results in the + * location not being anywhere near the device's actual location, which may + * result in Bing serving erroneous results. + * + * @param {string} [options.location] A semicolon-delimited list of key/value + * pairs that describe the client's geographical location. Bing uses the + * location information to determine safe search behavior and to return + * relevant local content. Specify the key/value pair as :. The + * following are the keys that you use to specify the user's location. lat + * (required): The latitude of the client's location, in degrees. The latitude + * must be greater than or equal to -90.0 and less than or equal to +90.0. + * Negative values indicate southern latitudes and positive values indicate + * northern latitudes. long (required): The longitude of the client's location, + * in degrees. The longitude must be greater than or equal to -180.0 and less + * than or equal to +180.0. Negative values indicate western longitudes and + * positive values indicate eastern longitudes. re (required): The radius, in + * meters, which specifies the horizontal accuracy of the coordinates. Pass the + * value returned by the device's location service. Typical values might be 22m + * for GPS/Wi-Fi, 380m for cell tower triangulation, and 18,000m for reverse IP + * lookup. ts (optional): The UTC UNIX timestamp of when the client was at the + * location. (The UNIX timestamp is the number of seconds since January 1, + * 1970.) head (optional): The client's relative heading or direction of + * travel. Specify the direction of travel as degrees from 0 through 360, + * counting clockwise relative to true north. Specify this key only if the sp + * key is nonzero. sp (optional): The horizontal velocity (speed), in meters + * per second, that the client device is traveling. alt (optional): The + * altitude of the client device, in meters. are (optional): The radius, in + * meters, that specifies the vertical accuracy of the coordinates. Specify + * this key only if you specify the alt key. Although many of the keys are + * optional, the more information that you provide, the more accurate the + * location results are. Although optional, you are encouraged to always + * specify the user's geographical location. Providing the location is + * especially important if the client's IP address does not accurately reflect + * the user's physical location (for example, if the client uses VPN). For + * optimal results, you should include this header and the X-MSEdge-ClientIP + * header, but at a minimum, you should include this header. + * + * @param {string} [options.countryCode] A 2-character country code of the + * country where the results come from. This API supports only the United + * States market. If you specify this query parameter, it must be set to us. If + * you set this parameter, you must also specify the Accept-Language header. + * Bing uses the first supported language it finds from the languages list, and + * combine that language with the country code that you specify to determine + * the market to return results for. If the languages list does not include a + * supported language, Bing finds the closest language and market that supports + * the request, or it may use an aggregated or default market for the results + * instead of a specified one. You should use this query parameter and the + * Accept-Language query parameter only if you specify multiple languages; + * otherwise, you should use the mkt and setLang query parameters. This + * parameter and the mkt query parameter are mutually exclusive—do not specify + * both. + * + * @param {string} [options.market] The market where the results come from. You + * are strongly encouraged to always specify the market, if known. Specifying + * the market helps Bing route the request and return an appropriate and + * optimal response. This parameter and the cc query parameter are mutually + * exclusive—do not specify both. + * + * @param {string} [options.safeSearch] Filter suggestions for adult content. + * The following are the possible filter values. Off: Return suggestions with + * adult text, images, or videos. Moderate: Return suggestion with adult text + * but not adult images or videos. Strict: Do not return news articles with + * adult text, images, or videos. If the request comes from a market that + * Bing's adult policy requires that safeSearch is set to Strict, Bing ignores + * the safeSearch value and uses Strict. If you use the site: query operator, + * there is the chance that the response may contain adult content regardless + * of what the safeSearch query parameter is set to. Use site: only if you are + * aware of the content on the site and your scenario supports the possibility + * of adult content. Possible values include: 'Off', 'Moderate', 'Strict' + * + * @param {string} [options.setLang] The language to use for user interface + * strings. Specify the language using the ISO 639-1 2-letter language code. + * For example, the language code for English is EN. The default is EN + * (English). Although optional, you should always specify the language. + * Typically, you set setLang to the same language specified by mkt unless the + * user wants the user interface strings displayed in a different language. + * This parameter and the Accept-Language header are mutually exclusive; do not + * specify both. A user interface string is a string that's used as a label in + * a user interface. There are few user interface strings in the JSON response + * objects. Also, any links to Bing.com properties in the response objects + * apply the specified language. + * + * @param {array} [options.responseFormat] The media type to use for the + * response. The following are the possible case-insensitive values: JSON, + * JSONLD. The default is JSON. If you specify JSONLD, the response body + * includes JSON-LD objects that contain the search results. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {Suggestions} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {Suggestions} [result] - The deserialized result object if an error did not occur. + * See {@link Suggestions} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + autoSuggest(query: string, options?: { acceptLanguage? : string, pragma? : string, userAgent? : string, clientId? : string, clientIp? : string, location? : string, countryCode? : string, market? : string, safeSearch? : string, setLang? : string, responseFormat? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; + autoSuggest(query: string, callback: ServiceCallback): void; + autoSuggest(query: string, options: { acceptLanguage? : string, pragma? : string, userAgent? : string, clientId? : string, clientIp? : string, location? : string, countryCode? : string, market? : string, safeSearch? : string, setLang? : string, responseFormat? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +export { AutoSuggestClient, models as AutoSuggestModels }; diff --git a/lib/services/cognitiveServicesAutoSuggest/lib/autoSuggestClient.js b/lib/services/cognitiveServicesAutoSuggest/lib/autoSuggestClient.js new file mode 100644 index 0000000000..3a0cccc982 --- /dev/null +++ b/lib/services/cognitiveServicesAutoSuggest/lib/autoSuggestClient.js @@ -0,0 +1,871 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +/* jshint latedef:false */ +/* jshint forin:false */ +/* jshint noempty:false */ + +'use strict'; + +const msRest = require('ms-rest'); +const ServiceClient = msRest.ServiceClient; +const WebResource = msRest.WebResource; + +const models = require('./models'); + + +/** + * @summary The AutoSuggest API lets you send a search query to Bing and get + * back a list of query suggestions. This section provides technical details + * about the query parameters and headers that you use to request suggestions + * and the JSON response objects that contain them. + * + * @param {string} query The user's search term. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.acceptLanguage] A comma-delimited list of one or + * more languages to use for user interface strings. The list is in decreasing + * order of preference. For additional information, including expected format, + * see [RFC2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). This + * header and the setLang query parameter are mutually exclusive; do not + * specify both. If you set this header, you must also specify the + * [cc](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-autosuggest-api-v7-reference#cc) + * query parameter. To determine the market to return results for, Bing uses + * the first supported language it finds from the list and combines it with the + * cc parameter value. If the list does not include a supported language, Bing + * finds the closest language and market that supports the request or it uses + * an aggregated or default market for the results. To determine the market + * that Bing used, see the BingAPIs-Market header. Use this header and the cc + * query parameter only if you specify multiple languages. Otherwise, use the + * [mkt](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-autosuggest-api-v7-reference#mkt) + * and + * [setLang](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-autosuggest-api-v7-reference#setlang) + * query parameters. A user interface string is a string that's used as a label + * in a user interface. There are few user interface strings in the JSON + * response objects. Any links to Bing.com properties in the response objects + * apply the specified language. + * + * @param {string} [options.pragma] By default, Bing returns cached content, if + * available. To prevent Bing from returning cached content, set the Pragma + * header to no-cache (for example, Pragma: no-cache). + * + * @param {string} [options.userAgent] The user agent originating the request. + * Bing uses the user agent to provide mobile users with an optimized + * experience. Although optional, you are encouraged to always specify this + * header. The user-agent should be the same string that any commonly used + * browser sends. For information about user agents, see [RFC + * 2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). The following + * are examples of user-agent strings. Windows Phone: Mozilla/5.0 (compatible; + * MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; + * Lumia 822). Android: Mozilla / 5.0 (Linux; U; Android 2.3.5; en - us; SCH - + * I500 Build / GINGERBREAD) AppleWebKit / 533.1 (KHTML; like Gecko) Version / + * 4.0 Mobile Safari / 533.1. iPhone: Mozilla / 5.0 (iPhone; CPU iPhone OS 6_1 + * like Mac OS X) AppleWebKit / 536.26 (KHTML; like Gecko) Mobile / 10B142 + * iPhone4; 1 BingWeb / 3.03.1428.20120423. PC: Mozilla / 5.0 (Windows NT 6.3; + * WOW64; Trident / 7.0; Touch; rv:11.0) like Gecko. iPad: Mozilla / 5.0 (iPad; + * CPU OS 7_0 like Mac OS X) AppleWebKit / 537.51.1 (KHTML, like Gecko) Version + * / 7.0 Mobile / 11A465 Safari / 9537.53 + * + * @param {string} [options.clientId] Bing uses this header to provide users + * with consistent behavior across Bing API calls. Bing often flights new + * features and improvements, and it uses the client ID as a key for assigning + * traffic on different flights. If you do not use the same client ID for a + * user across multiple requests, then Bing may assign the user to multiple + * conflicting flights. Being assigned to multiple conflicting flights can lead + * to an inconsistent user experience. For example, if the second request has a + * different flight assignment than the first, the experience may be + * unexpected. Also, Bing can use the client ID to tailor web results to that + * client ID’s search history, providing a richer experience for the user. Bing + * also uses this header to help improve result rankings by analyzing the + * activity generated by a client ID. The relevance improvements help with + * better quality of results delivered by Bing APIs and in turn enables higher + * click-through rates for the API consumer. IMPORTANT: Although optional, you + * should consider this header required. Persisting the client ID across + * multiple requests for the same end user and device combination enables 1) + * the API consumer to receive a consistent user experience, and 2) higher + * click-through rates via better quality of results from the Bing APIs. Each + * user that uses your application on the device must have a unique, Bing + * generated client ID. If you do not include this header in the request, Bing + * generates an ID and returns it in the X-MSEdge-ClientID response header. The + * only time that you should NOT include this header in a request is the first + * time the user uses your app on that device. Use the client ID for each Bing + * API request that your app makes for this user on the device. Persist the + * client ID. To persist the ID in a browser app, use a persistent HTTP cookie + * to ensure the ID is used across all sessions. Do not use a session cookie. + * For other apps such as mobile apps, use the device's persistent storage to + * persist the ID. The next time the user uses your app on that device, get the + * client ID that you persisted. Bing responses may or may not include this + * header. If the response includes this header, capture the client ID and use + * it for all subsequent Bing requests for the user on that device. If you + * include the X-MSEdge-ClientID, you must not include cookies in the request. + * + * @param {string} [options.clientIp] The IPv4 or IPv6 address of the client + * device. The IP address is used to discover the user's location. Bing uses + * the location information to determine safe search behavior. Although + * optional, you are encouraged to always specify this header and the + * X-Search-Location header. Do not obfuscate the address (for example, by + * changing the last octet to 0). Obfuscating the address results in the + * location not being anywhere near the device's actual location, which may + * result in Bing serving erroneous results. + * + * @param {string} [options.location] A semicolon-delimited list of key/value + * pairs that describe the client's geographical location. Bing uses the + * location information to determine safe search behavior and to return + * relevant local content. Specify the key/value pair as :. The + * following are the keys that you use to specify the user's location. lat + * (required): The latitude of the client's location, in degrees. The latitude + * must be greater than or equal to -90.0 and less than or equal to +90.0. + * Negative values indicate southern latitudes and positive values indicate + * northern latitudes. long (required): The longitude of the client's location, + * in degrees. The longitude must be greater than or equal to -180.0 and less + * than or equal to +180.0. Negative values indicate western longitudes and + * positive values indicate eastern longitudes. re (required): The radius, in + * meters, which specifies the horizontal accuracy of the coordinates. Pass the + * value returned by the device's location service. Typical values might be 22m + * for GPS/Wi-Fi, 380m for cell tower triangulation, and 18,000m for reverse IP + * lookup. ts (optional): The UTC UNIX timestamp of when the client was at the + * location. (The UNIX timestamp is the number of seconds since January 1, + * 1970.) head (optional): The client's relative heading or direction of + * travel. Specify the direction of travel as degrees from 0 through 360, + * counting clockwise relative to true north. Specify this key only if the sp + * key is nonzero. sp (optional): The horizontal velocity (speed), in meters + * per second, that the client device is traveling. alt (optional): The + * altitude of the client device, in meters. are (optional): The radius, in + * meters, that specifies the vertical accuracy of the coordinates. Specify + * this key only if you specify the alt key. Although many of the keys are + * optional, the more information that you provide, the more accurate the + * location results are. Although optional, you are encouraged to always + * specify the user's geographical location. Providing the location is + * especially important if the client's IP address does not accurately reflect + * the user's physical location (for example, if the client uses VPN). For + * optimal results, you should include this header and the X-MSEdge-ClientIP + * header, but at a minimum, you should include this header. + * + * @param {string} [options.countryCode] A 2-character country code of the + * country where the results come from. This API supports only the United + * States market. If you specify this query parameter, it must be set to us. If + * you set this parameter, you must also specify the Accept-Language header. + * Bing uses the first supported language it finds from the languages list, and + * combine that language with the country code that you specify to determine + * the market to return results for. If the languages list does not include a + * supported language, Bing finds the closest language and market that supports + * the request, or it may use an aggregated or default market for the results + * instead of a specified one. You should use this query parameter and the + * Accept-Language query parameter only if you specify multiple languages; + * otherwise, you should use the mkt and setLang query parameters. This + * parameter and the mkt query parameter are mutually exclusive—do not specify + * both. + * + * @param {string} [options.market] The market where the results come from. You + * are strongly encouraged to always specify the market, if known. Specifying + * the market helps Bing route the request and return an appropriate and + * optimal response. This parameter and the cc query parameter are mutually + * exclusive—do not specify both. + * + * @param {string} [options.safeSearch] Filter suggestions for adult content. + * The following are the possible filter values. Off: Return suggestions with + * adult text, images, or videos. Moderate: Return suggestion with adult text + * but not adult images or videos. Strict: Do not return news articles with + * adult text, images, or videos. If the request comes from a market that + * Bing's adult policy requires that safeSearch is set to Strict, Bing ignores + * the safeSearch value and uses Strict. If you use the site: query operator, + * there is the chance that the response may contain adult content regardless + * of what the safeSearch query parameter is set to. Use site: only if you are + * aware of the content on the site and your scenario supports the possibility + * of adult content. Possible values include: 'Off', 'Moderate', 'Strict' + * + * @param {string} [options.setLang] The language to use for user interface + * strings. Specify the language using the ISO 639-1 2-letter language code. + * For example, the language code for English is EN. The default is EN + * (English). Although optional, you should always specify the language. + * Typically, you set setLang to the same language specified by mkt unless the + * user wants the user interface strings displayed in a different language. + * This parameter and the Accept-Language header are mutually exclusive; do not + * specify both. A user interface string is a string that's used as a label in + * a user interface. There are few user interface strings in the JSON response + * objects. Also, any links to Bing.com properties in the response objects + * apply the specified language. + * + * @param {array} [options.responseFormat] The media type to use for the + * response. The following are the possible case-insensitive values: JSON, + * JSONLD. The default is JSON. If you specify JSONLD, the response body + * includes JSON-LD objects that contain the search results. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Suggestions} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _autoSuggest(query, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let acceptLanguage = (options && options.acceptLanguage !== undefined) ? options.acceptLanguage : undefined; + let pragma = (options && options.pragma !== undefined) ? options.pragma : undefined; + let userAgent = (options && options.userAgent !== undefined) ? options.userAgent : undefined; + let clientId = (options && options.clientId !== undefined) ? options.clientId : undefined; + let clientIp = (options && options.clientIp !== undefined) ? options.clientIp : undefined; + let location = (options && options.location !== undefined) ? options.location : undefined; + let countryCode = (options && options.countryCode !== undefined) ? options.countryCode : undefined; + let market = (options && options.market !== undefined) ? options.market : 'en-us'; + let safeSearch = (options && options.safeSearch !== undefined) ? options.safeSearch : undefined; + let setLang = (options && options.setLang !== undefined) ? options.setLang : undefined; + let responseFormat = (options && options.responseFormat !== undefined) ? options.responseFormat : undefined; + let xBingApisSDK = 'true'; + // Validate + try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } + if (acceptLanguage !== null && acceptLanguage !== undefined && typeof acceptLanguage.valueOf() !== 'string') { + throw new Error('acceptLanguage must be of type string.'); + } + if (pragma !== null && pragma !== undefined && typeof pragma.valueOf() !== 'string') { + throw new Error('pragma must be of type string.'); + } + if (userAgent !== null && userAgent !== undefined && typeof userAgent.valueOf() !== 'string') { + throw new Error('userAgent must be of type string.'); + } + if (clientId !== null && clientId !== undefined && typeof clientId.valueOf() !== 'string') { + throw new Error('clientId must be of type string.'); + } + if (clientIp !== null && clientIp !== undefined && typeof clientIp.valueOf() !== 'string') { + throw new Error('clientIp must be of type string.'); + } + if (location !== null && location !== undefined && typeof location.valueOf() !== 'string') { + throw new Error('location must be of type string.'); + } + if (countryCode !== null && countryCode !== undefined && typeof countryCode.valueOf() !== 'string') { + throw new Error('countryCode must be of type string.'); + } + if (market !== null && market !== undefined && typeof market.valueOf() !== 'string') { + throw new Error('market must be of type string.'); + } + if (query === null || query === undefined || typeof query.valueOf() !== 'string') { + throw new Error('query cannot be null or undefined and it must be of type string.'); + } + if (safeSearch !== null && safeSearch !== undefined && typeof safeSearch.valueOf() !== 'string') { + throw new Error('safeSearch must be of type string.'); + } + if (setLang !== null && setLang !== undefined && typeof setLang.valueOf() !== 'string') { + throw new Error('setLang must be of type string.'); + } + if (Array.isArray(responseFormat)) { + for (let i = 0; i < responseFormat.length; i++) { + if (responseFormat[i] !== null && responseFormat[i] !== undefined && typeof responseFormat[i].valueOf() !== 'string') { + throw new Error('responseFormat[i] must be of type string.'); + } + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Suggestions'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); + let queryParameters = []; + if (countryCode !== null && countryCode !== undefined) { + queryParameters.push('cc=' + encodeURIComponent(countryCode)); + } + if (market !== null && market !== undefined) { + queryParameters.push('mkt=' + encodeURIComponent(market)); + } + queryParameters.push('q=' + encodeURIComponent(query)); + if (safeSearch !== null && safeSearch !== undefined) { + queryParameters.push('safeSearch=' + encodeURIComponent(safeSearch)); + } + if (setLang !== null && setLang !== undefined) { + queryParameters.push('setLang=' + encodeURIComponent(setLang)); + } + if (responseFormat !== null && responseFormat !== undefined) { + queryParameters.push('ResponseFormat=' + encodeURIComponent(responseFormat.join(','))); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (xBingApisSDK !== undefined && xBingApisSDK !== null) { + httpRequest.headers['X-BingApis-SDK'] = xBingApisSDK; + } + if (acceptLanguage !== undefined && acceptLanguage !== null) { + httpRequest.headers['Accept-Language'] = acceptLanguage; + } + if (pragma !== undefined && pragma !== null) { + httpRequest.headers['Pragma'] = pragma; + } + if (userAgent !== undefined && userAgent !== null) { + httpRequest.headers['User-Agent'] = userAgent; + } + if (clientId !== undefined && clientId !== null) { + httpRequest.headers['X-MSEdge-ClientID'] = clientId; + } + if (clientIp !== undefined && clientIp !== null) { + httpRequest.headers['X-MSEdge-ClientIP'] = clientIp; + } + if (location !== undefined && location !== null) { + httpRequest.headers['X-Search-Location'] = location; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorResponse']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['Suggestions']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a AutoSuggestClient. */ +class AutoSuggestClient extends ServiceClient { + /** + * Create a AutoSuggestClient. + * @param {credentials} credentials - Subscription credentials which uniquely identify client subscription. + * @param {object} [options] - The parameter options + * @param {Array} [options.filters] - Filters to be added to the request pipeline + * @param {object} [options.requestOptions] - Options for the underlying request object + * {@link https://github.com/request/request#requestoptions-callback Options doc} + * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy + * @param {string} [options.endpoint] - Supported Cognitive Services endpoints (protocol and hostname, for example: "https://westus.api.cognitive.microsoft.com", "https://api.cognitive.microsoft.com"). + */ + constructor(credentials, options) { + if (credentials === null || credentials === undefined) { + throw new Error('\'credentials\' cannot be null.'); + } + + if (!options) options = {}; + + super(credentials, options); + + this.endpoint = 'https://api.cognitive.microsoft.com'; + this.baseUri = '{Endpoint}/bing/v7.0'; + this.credentials = credentials; + + let packageInfo = this.getPackageJsonInfo(__dirname); + this.addUserAgentInfo(`${packageInfo.name}/${packageInfo.version}`); + if(options.endpoint !== null && options.endpoint !== undefined) { + this.endpoint = options.endpoint; + } + this.models = models; + this._autoSuggest = _autoSuggest; + msRest.addSerializationMixin(this); + } + + /** + * @summary The AutoSuggest API lets you send a search query to Bing and get + * back a list of query suggestions. This section provides technical details + * about the query parameters and headers that you use to request suggestions + * and the JSON response objects that contain them. + * + * @param {string} query The user's search term. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.acceptLanguage] A comma-delimited list of one or + * more languages to use for user interface strings. The list is in decreasing + * order of preference. For additional information, including expected format, + * see [RFC2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). This + * header and the setLang query parameter are mutually exclusive; do not + * specify both. If you set this header, you must also specify the + * [cc](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-autosuggest-api-v7-reference#cc) + * query parameter. To determine the market to return results for, Bing uses + * the first supported language it finds from the list and combines it with the + * cc parameter value. If the list does not include a supported language, Bing + * finds the closest language and market that supports the request or it uses + * an aggregated or default market for the results. To determine the market + * that Bing used, see the BingAPIs-Market header. Use this header and the cc + * query parameter only if you specify multiple languages. Otherwise, use the + * [mkt](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-autosuggest-api-v7-reference#mkt) + * and + * [setLang](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-autosuggest-api-v7-reference#setlang) + * query parameters. A user interface string is a string that's used as a label + * in a user interface. There are few user interface strings in the JSON + * response objects. Any links to Bing.com properties in the response objects + * apply the specified language. + * + * @param {string} [options.pragma] By default, Bing returns cached content, if + * available. To prevent Bing from returning cached content, set the Pragma + * header to no-cache (for example, Pragma: no-cache). + * + * @param {string} [options.userAgent] The user agent originating the request. + * Bing uses the user agent to provide mobile users with an optimized + * experience. Although optional, you are encouraged to always specify this + * header. The user-agent should be the same string that any commonly used + * browser sends. For information about user agents, see [RFC + * 2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). The following + * are examples of user-agent strings. Windows Phone: Mozilla/5.0 (compatible; + * MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; + * Lumia 822). Android: Mozilla / 5.0 (Linux; U; Android 2.3.5; en - us; SCH - + * I500 Build / GINGERBREAD) AppleWebKit / 533.1 (KHTML; like Gecko) Version / + * 4.0 Mobile Safari / 533.1. iPhone: Mozilla / 5.0 (iPhone; CPU iPhone OS 6_1 + * like Mac OS X) AppleWebKit / 536.26 (KHTML; like Gecko) Mobile / 10B142 + * iPhone4; 1 BingWeb / 3.03.1428.20120423. PC: Mozilla / 5.0 (Windows NT 6.3; + * WOW64; Trident / 7.0; Touch; rv:11.0) like Gecko. iPad: Mozilla / 5.0 (iPad; + * CPU OS 7_0 like Mac OS X) AppleWebKit / 537.51.1 (KHTML, like Gecko) Version + * / 7.0 Mobile / 11A465 Safari / 9537.53 + * + * @param {string} [options.clientId] Bing uses this header to provide users + * with consistent behavior across Bing API calls. Bing often flights new + * features and improvements, and it uses the client ID as a key for assigning + * traffic on different flights. If you do not use the same client ID for a + * user across multiple requests, then Bing may assign the user to multiple + * conflicting flights. Being assigned to multiple conflicting flights can lead + * to an inconsistent user experience. For example, if the second request has a + * different flight assignment than the first, the experience may be + * unexpected. Also, Bing can use the client ID to tailor web results to that + * client ID’s search history, providing a richer experience for the user. Bing + * also uses this header to help improve result rankings by analyzing the + * activity generated by a client ID. The relevance improvements help with + * better quality of results delivered by Bing APIs and in turn enables higher + * click-through rates for the API consumer. IMPORTANT: Although optional, you + * should consider this header required. Persisting the client ID across + * multiple requests for the same end user and device combination enables 1) + * the API consumer to receive a consistent user experience, and 2) higher + * click-through rates via better quality of results from the Bing APIs. Each + * user that uses your application on the device must have a unique, Bing + * generated client ID. If you do not include this header in the request, Bing + * generates an ID and returns it in the X-MSEdge-ClientID response header. The + * only time that you should NOT include this header in a request is the first + * time the user uses your app on that device. Use the client ID for each Bing + * API request that your app makes for this user on the device. Persist the + * client ID. To persist the ID in a browser app, use a persistent HTTP cookie + * to ensure the ID is used across all sessions. Do not use a session cookie. + * For other apps such as mobile apps, use the device's persistent storage to + * persist the ID. The next time the user uses your app on that device, get the + * client ID that you persisted. Bing responses may or may not include this + * header. If the response includes this header, capture the client ID and use + * it for all subsequent Bing requests for the user on that device. If you + * include the X-MSEdge-ClientID, you must not include cookies in the request. + * + * @param {string} [options.clientIp] The IPv4 or IPv6 address of the client + * device. The IP address is used to discover the user's location. Bing uses + * the location information to determine safe search behavior. Although + * optional, you are encouraged to always specify this header and the + * X-Search-Location header. Do not obfuscate the address (for example, by + * changing the last octet to 0). Obfuscating the address results in the + * location not being anywhere near the device's actual location, which may + * result in Bing serving erroneous results. + * + * @param {string} [options.location] A semicolon-delimited list of key/value + * pairs that describe the client's geographical location. Bing uses the + * location information to determine safe search behavior and to return + * relevant local content. Specify the key/value pair as :. The + * following are the keys that you use to specify the user's location. lat + * (required): The latitude of the client's location, in degrees. The latitude + * must be greater than or equal to -90.0 and less than or equal to +90.0. + * Negative values indicate southern latitudes and positive values indicate + * northern latitudes. long (required): The longitude of the client's location, + * in degrees. The longitude must be greater than or equal to -180.0 and less + * than or equal to +180.0. Negative values indicate western longitudes and + * positive values indicate eastern longitudes. re (required): The radius, in + * meters, which specifies the horizontal accuracy of the coordinates. Pass the + * value returned by the device's location service. Typical values might be 22m + * for GPS/Wi-Fi, 380m for cell tower triangulation, and 18,000m for reverse IP + * lookup. ts (optional): The UTC UNIX timestamp of when the client was at the + * location. (The UNIX timestamp is the number of seconds since January 1, + * 1970.) head (optional): The client's relative heading or direction of + * travel. Specify the direction of travel as degrees from 0 through 360, + * counting clockwise relative to true north. Specify this key only if the sp + * key is nonzero. sp (optional): The horizontal velocity (speed), in meters + * per second, that the client device is traveling. alt (optional): The + * altitude of the client device, in meters. are (optional): The radius, in + * meters, that specifies the vertical accuracy of the coordinates. Specify + * this key only if you specify the alt key. Although many of the keys are + * optional, the more information that you provide, the more accurate the + * location results are. Although optional, you are encouraged to always + * specify the user's geographical location. Providing the location is + * especially important if the client's IP address does not accurately reflect + * the user's physical location (for example, if the client uses VPN). For + * optimal results, you should include this header and the X-MSEdge-ClientIP + * header, but at a minimum, you should include this header. + * + * @param {string} [options.countryCode] A 2-character country code of the + * country where the results come from. This API supports only the United + * States market. If you specify this query parameter, it must be set to us. If + * you set this parameter, you must also specify the Accept-Language header. + * Bing uses the first supported language it finds from the languages list, and + * combine that language with the country code that you specify to determine + * the market to return results for. If the languages list does not include a + * supported language, Bing finds the closest language and market that supports + * the request, or it may use an aggregated or default market for the results + * instead of a specified one. You should use this query parameter and the + * Accept-Language query parameter only if you specify multiple languages; + * otherwise, you should use the mkt and setLang query parameters. This + * parameter and the mkt query parameter are mutually exclusive—do not specify + * both. + * + * @param {string} [options.market] The market where the results come from. You + * are strongly encouraged to always specify the market, if known. Specifying + * the market helps Bing route the request and return an appropriate and + * optimal response. This parameter and the cc query parameter are mutually + * exclusive—do not specify both. + * + * @param {string} [options.safeSearch] Filter suggestions for adult content. + * The following are the possible filter values. Off: Return suggestions with + * adult text, images, or videos. Moderate: Return suggestion with adult text + * but not adult images or videos. Strict: Do not return news articles with + * adult text, images, or videos. If the request comes from a market that + * Bing's adult policy requires that safeSearch is set to Strict, Bing ignores + * the safeSearch value and uses Strict. If you use the site: query operator, + * there is the chance that the response may contain adult content regardless + * of what the safeSearch query parameter is set to. Use site: only if you are + * aware of the content on the site and your scenario supports the possibility + * of adult content. Possible values include: 'Off', 'Moderate', 'Strict' + * + * @param {string} [options.setLang] The language to use for user interface + * strings. Specify the language using the ISO 639-1 2-letter language code. + * For example, the language code for English is EN. The default is EN + * (English). Although optional, you should always specify the language. + * Typically, you set setLang to the same language specified by mkt unless the + * user wants the user interface strings displayed in a different language. + * This parameter and the Accept-Language header are mutually exclusive; do not + * specify both. A user interface string is a string that's used as a label in + * a user interface. There are few user interface strings in the JSON response + * objects. Also, any links to Bing.com properties in the response objects + * apply the specified language. + * + * @param {array} [options.responseFormat] The media type to use for the + * response. The following are the possible case-insensitive values: JSON, + * JSONLD. The default is JSON. If you specify JSONLD, the response body + * includes JSON-LD objects that contain the search results. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + autoSuggestWithHttpOperationResponse(query, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._autoSuggest(query, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary The AutoSuggest API lets you send a search query to Bing and get + * back a list of query suggestions. This section provides technical details + * about the query parameters and headers that you use to request suggestions + * and the JSON response objects that contain them. + * + * @param {string} query The user's search term. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.acceptLanguage] A comma-delimited list of one or + * more languages to use for user interface strings. The list is in decreasing + * order of preference. For additional information, including expected format, + * see [RFC2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). This + * header and the setLang query parameter are mutually exclusive; do not + * specify both. If you set this header, you must also specify the + * [cc](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-autosuggest-api-v7-reference#cc) + * query parameter. To determine the market to return results for, Bing uses + * the first supported language it finds from the list and combines it with the + * cc parameter value. If the list does not include a supported language, Bing + * finds the closest language and market that supports the request or it uses + * an aggregated or default market for the results. To determine the market + * that Bing used, see the BingAPIs-Market header. Use this header and the cc + * query parameter only if you specify multiple languages. Otherwise, use the + * [mkt](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-autosuggest-api-v7-reference#mkt) + * and + * [setLang](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-autosuggest-api-v7-reference#setlang) + * query parameters. A user interface string is a string that's used as a label + * in a user interface. There are few user interface strings in the JSON + * response objects. Any links to Bing.com properties in the response objects + * apply the specified language. + * + * @param {string} [options.pragma] By default, Bing returns cached content, if + * available. To prevent Bing from returning cached content, set the Pragma + * header to no-cache (for example, Pragma: no-cache). + * + * @param {string} [options.userAgent] The user agent originating the request. + * Bing uses the user agent to provide mobile users with an optimized + * experience. Although optional, you are encouraged to always specify this + * header. The user-agent should be the same string that any commonly used + * browser sends. For information about user agents, see [RFC + * 2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). The following + * are examples of user-agent strings. Windows Phone: Mozilla/5.0 (compatible; + * MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; + * Lumia 822). Android: Mozilla / 5.0 (Linux; U; Android 2.3.5; en - us; SCH - + * I500 Build / GINGERBREAD) AppleWebKit / 533.1 (KHTML; like Gecko) Version / + * 4.0 Mobile Safari / 533.1. iPhone: Mozilla / 5.0 (iPhone; CPU iPhone OS 6_1 + * like Mac OS X) AppleWebKit / 536.26 (KHTML; like Gecko) Mobile / 10B142 + * iPhone4; 1 BingWeb / 3.03.1428.20120423. PC: Mozilla / 5.0 (Windows NT 6.3; + * WOW64; Trident / 7.0; Touch; rv:11.0) like Gecko. iPad: Mozilla / 5.0 (iPad; + * CPU OS 7_0 like Mac OS X) AppleWebKit / 537.51.1 (KHTML, like Gecko) Version + * / 7.0 Mobile / 11A465 Safari / 9537.53 + * + * @param {string} [options.clientId] Bing uses this header to provide users + * with consistent behavior across Bing API calls. Bing often flights new + * features and improvements, and it uses the client ID as a key for assigning + * traffic on different flights. If you do not use the same client ID for a + * user across multiple requests, then Bing may assign the user to multiple + * conflicting flights. Being assigned to multiple conflicting flights can lead + * to an inconsistent user experience. For example, if the second request has a + * different flight assignment than the first, the experience may be + * unexpected. Also, Bing can use the client ID to tailor web results to that + * client ID’s search history, providing a richer experience for the user. Bing + * also uses this header to help improve result rankings by analyzing the + * activity generated by a client ID. The relevance improvements help with + * better quality of results delivered by Bing APIs and in turn enables higher + * click-through rates for the API consumer. IMPORTANT: Although optional, you + * should consider this header required. Persisting the client ID across + * multiple requests for the same end user and device combination enables 1) + * the API consumer to receive a consistent user experience, and 2) higher + * click-through rates via better quality of results from the Bing APIs. Each + * user that uses your application on the device must have a unique, Bing + * generated client ID. If you do not include this header in the request, Bing + * generates an ID and returns it in the X-MSEdge-ClientID response header. The + * only time that you should NOT include this header in a request is the first + * time the user uses your app on that device. Use the client ID for each Bing + * API request that your app makes for this user on the device. Persist the + * client ID. To persist the ID in a browser app, use a persistent HTTP cookie + * to ensure the ID is used across all sessions. Do not use a session cookie. + * For other apps such as mobile apps, use the device's persistent storage to + * persist the ID. The next time the user uses your app on that device, get the + * client ID that you persisted. Bing responses may or may not include this + * header. If the response includes this header, capture the client ID and use + * it for all subsequent Bing requests for the user on that device. If you + * include the X-MSEdge-ClientID, you must not include cookies in the request. + * + * @param {string} [options.clientIp] The IPv4 or IPv6 address of the client + * device. The IP address is used to discover the user's location. Bing uses + * the location information to determine safe search behavior. Although + * optional, you are encouraged to always specify this header and the + * X-Search-Location header. Do not obfuscate the address (for example, by + * changing the last octet to 0). Obfuscating the address results in the + * location not being anywhere near the device's actual location, which may + * result in Bing serving erroneous results. + * + * @param {string} [options.location] A semicolon-delimited list of key/value + * pairs that describe the client's geographical location. Bing uses the + * location information to determine safe search behavior and to return + * relevant local content. Specify the key/value pair as :. The + * following are the keys that you use to specify the user's location. lat + * (required): The latitude of the client's location, in degrees. The latitude + * must be greater than or equal to -90.0 and less than or equal to +90.0. + * Negative values indicate southern latitudes and positive values indicate + * northern latitudes. long (required): The longitude of the client's location, + * in degrees. The longitude must be greater than or equal to -180.0 and less + * than or equal to +180.0. Negative values indicate western longitudes and + * positive values indicate eastern longitudes. re (required): The radius, in + * meters, which specifies the horizontal accuracy of the coordinates. Pass the + * value returned by the device's location service. Typical values might be 22m + * for GPS/Wi-Fi, 380m for cell tower triangulation, and 18,000m for reverse IP + * lookup. ts (optional): The UTC UNIX timestamp of when the client was at the + * location. (The UNIX timestamp is the number of seconds since January 1, + * 1970.) head (optional): The client's relative heading or direction of + * travel. Specify the direction of travel as degrees from 0 through 360, + * counting clockwise relative to true north. Specify this key only if the sp + * key is nonzero. sp (optional): The horizontal velocity (speed), in meters + * per second, that the client device is traveling. alt (optional): The + * altitude of the client device, in meters. are (optional): The radius, in + * meters, that specifies the vertical accuracy of the coordinates. Specify + * this key only if you specify the alt key. Although many of the keys are + * optional, the more information that you provide, the more accurate the + * location results are. Although optional, you are encouraged to always + * specify the user's geographical location. Providing the location is + * especially important if the client's IP address does not accurately reflect + * the user's physical location (for example, if the client uses VPN). For + * optimal results, you should include this header and the X-MSEdge-ClientIP + * header, but at a minimum, you should include this header. + * + * @param {string} [options.countryCode] A 2-character country code of the + * country where the results come from. This API supports only the United + * States market. If you specify this query parameter, it must be set to us. If + * you set this parameter, you must also specify the Accept-Language header. + * Bing uses the first supported language it finds from the languages list, and + * combine that language with the country code that you specify to determine + * the market to return results for. If the languages list does not include a + * supported language, Bing finds the closest language and market that supports + * the request, or it may use an aggregated or default market for the results + * instead of a specified one. You should use this query parameter and the + * Accept-Language query parameter only if you specify multiple languages; + * otherwise, you should use the mkt and setLang query parameters. This + * parameter and the mkt query parameter are mutually exclusive—do not specify + * both. + * + * @param {string} [options.market] The market where the results come from. You + * are strongly encouraged to always specify the market, if known. Specifying + * the market helps Bing route the request and return an appropriate and + * optimal response. This parameter and the cc query parameter are mutually + * exclusive—do not specify both. + * + * @param {string} [options.safeSearch] Filter suggestions for adult content. + * The following are the possible filter values. Off: Return suggestions with + * adult text, images, or videos. Moderate: Return suggestion with adult text + * but not adult images or videos. Strict: Do not return news articles with + * adult text, images, or videos. If the request comes from a market that + * Bing's adult policy requires that safeSearch is set to Strict, Bing ignores + * the safeSearch value and uses Strict. If you use the site: query operator, + * there is the chance that the response may contain adult content regardless + * of what the safeSearch query parameter is set to. Use site: only if you are + * aware of the content on the site and your scenario supports the possibility + * of adult content. Possible values include: 'Off', 'Moderate', 'Strict' + * + * @param {string} [options.setLang] The language to use for user interface + * strings. Specify the language using the ISO 639-1 2-letter language code. + * For example, the language code for English is EN. The default is EN + * (English). Although optional, you should always specify the language. + * Typically, you set setLang to the same language specified by mkt unless the + * user wants the user interface strings displayed in a different language. + * This parameter and the Accept-Language header are mutually exclusive; do not + * specify both. A user interface string is a string that's used as a label in + * a user interface. There are few user interface strings in the JSON response + * objects. Also, any links to Bing.com properties in the response objects + * apply the specified language. + * + * @param {array} [options.responseFormat] The media type to use for the + * response. The following are the possible case-insensitive values: JSON, + * JSONLD. The default is JSON. If you specify JSONLD, the response body + * includes JSON-LD objects that contain the search results. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {Suggestions} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Suggestions} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + autoSuggest(query, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._autoSuggest(query, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._autoSuggest(query, options, optionalCallback); + } + } + +} + +module.exports = AutoSuggestClient; +module.exports['default'] = AutoSuggestClient; +module.exports.AutoSuggestClient = AutoSuggestClient; +module.exports.AutoSuggestModels = models; diff --git a/lib/services/cognitiveServicesAutoSuggest/lib/models/action.js b/lib/services/cognitiveServicesAutoSuggest/lib/models/action.js index 496d2171e4..87498cacd8 100644 --- a/lib/services/cognitiveServicesAutoSuggest/lib/models/action.js +++ b/lib/services/cognitiveServicesAutoSuggest/lib/models/action.js @@ -19,10 +19,10 @@ const models = require('./index'); class Action extends models['CreativeWork'] { /** * Create a Action. - * @member {array} [result] - * @member {string} [displayName] - * @member {boolean} [isTopAction] - * @member {string} [serviceUrl] + * @property {array} [result] + * @property {string} [displayName] + * @property {boolean} [isTopAction] + * @property {string} [serviceUrl] */ constructor() { super(); diff --git a/lib/services/cognitiveServicesAutoSuggest/lib/models/creativeWork.js b/lib/services/cognitiveServicesAutoSuggest/lib/models/creativeWork.js index 7e9c564dc9..706f16fd81 100644 --- a/lib/services/cognitiveServicesAutoSuggest/lib/models/creativeWork.js +++ b/lib/services/cognitiveServicesAutoSuggest/lib/models/creativeWork.js @@ -21,28 +21,28 @@ const models = require('./index'); class CreativeWork extends models['Thing'] { /** * Create a CreativeWork. - * @member {string} [thumbnailUrl] The URL to a thumbnail of the item. - * @member {array} [about] For internal use only. - * @member {array} [mentions] For internal use only. - * @member {array} [provider] The source of the creative work. - * @member {object} [creator] - * @member {string} [creator.url] The URL to get more information about the + * @property {string} [thumbnailUrl] The URL to a thumbnail of the item. + * @property {array} [about] For internal use only. + * @property {array} [mentions] For internal use only. + * @property {array} [provider] The source of the creative work. + * @property {object} [creator] + * @property {string} [creator.url] The URL to get more information about the * thing represented by this object. - * @member {string} [text] Text content of this creative work - * @member {string} [discussionUrl] - * @member {number} [commentCount] - * @member {object} [mainEntity] - * @member {string} [mainEntity.url] The URL to get more information about + * @property {string} [text] Text content of this creative work + * @property {string} [discussionUrl] + * @property {number} [commentCount] + * @property {object} [mainEntity] + * @property {string} [mainEntity.url] The URL to get more information about * the thing represented by this object. - * @member {string} [headLine] - * @member {object} [copyrightHolder] - * @member {string} [copyrightHolder.url] The URL to get more information + * @property {string} [headLine] + * @property {object} [copyrightHolder] + * @property {string} [copyrightHolder.url] The URL to get more information * about the thing represented by this object. - * @member {number} [copyrightYear] - * @member {string} [disclaimer] - * @member {boolean} [isAccessibleForFree] - * @member {array} [genre] - * @member {boolean} [isFamilyFriendly] + * @property {number} [copyrightYear] + * @property {string} [disclaimer] + * @property {boolean} [isAccessibleForFree] + * @property {array} [genre] + * @property {boolean} [isFamilyFriendly] */ constructor() { super(); diff --git a/lib/services/cognitiveServicesAutoSuggest/lib/models/errorModel.js b/lib/services/cognitiveServicesAutoSuggest/lib/models/errorModel.js index 3c95c71a32..7d95ee957f 100644 --- a/lib/services/cognitiveServicesAutoSuggest/lib/models/errorModel.js +++ b/lib/services/cognitiveServicesAutoSuggest/lib/models/errorModel.js @@ -17,18 +17,18 @@ class ErrorModel { /** * Create a ErrorModel. - * @member {string} code The error code that identifies the category of + * @property {string} code The error code that identifies the category of * error. Possible values include: 'None', 'ServerError', 'InvalidRequest', * 'RateLimitExceeded', 'InvalidAuthorization', 'InsufficientAuthorization'. * Default value: 'None' . - * @member {string} message A description of the error. - * @member {string} [moreDetails] A description that provides additional + * @property {string} message A description of the error. + * @property {string} [moreDetails] A description that provides additional * information about the error. - * @member {string} [parameter] The parameter in the request that caused the - * error. - * @member {string} [value] The parameter's value in the request that was not - * valid. - * @member {string} _type Polymorphic Discriminator + * @property {string} [parameter] The parameter in the request that caused + * the error. + * @property {string} [value] The parameter's value in the request that was + * not valid. + * @property {string} _type Polymorphic Discriminator */ constructor() { } diff --git a/lib/services/cognitiveServicesAutoSuggest/lib/models/errorResponse.js b/lib/services/cognitiveServicesAutoSuggest/lib/models/errorResponse.js index 56a80f0a89..09482bbeb9 100644 --- a/lib/services/cognitiveServicesAutoSuggest/lib/models/errorResponse.js +++ b/lib/services/cognitiveServicesAutoSuggest/lib/models/errorResponse.js @@ -20,8 +20,8 @@ const models = require('./index'); class ErrorResponse extends models['Response'] { /** * Create a ErrorResponse. - * @member {array} errors A list of errors that describe the reasons why the - * request failed. + * @property {array} errors A list of errors that describe the reasons why + * the request failed. */ constructor() { super(); diff --git a/lib/services/cognitiveServicesAutoSuggest/lib/models/identifiable.js b/lib/services/cognitiveServicesAutoSuggest/lib/models/identifiable.js index 6cc9e3d679..51ceb85de4 100644 --- a/lib/services/cognitiveServicesAutoSuggest/lib/models/identifiable.js +++ b/lib/services/cognitiveServicesAutoSuggest/lib/models/identifiable.js @@ -20,7 +20,7 @@ const models = require('./index'); class Identifiable extends models['ResponseBase'] { /** * Create a Identifiable. - * @member {string} [id] A String identifier. + * @property {string} [id] A String identifier. */ constructor() { super(); diff --git a/lib/services/cognitiveServicesAutoSuggest/lib/models/index.d.ts b/lib/services/cognitiveServicesAutoSuggest/lib/models/index.d.ts index aabc4bb493..2ede9710a5 100644 --- a/lib/services/cognitiveServicesAutoSuggest/lib/models/index.d.ts +++ b/lib/services/cognitiveServicesAutoSuggest/lib/models/index.d.ts @@ -1,57 +1,45 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import * as moment from "moment"; - /** - * @class - * Initializes a new instance of the ResponseBase class. - * @constructor * Response base - * - * @member {string} _type Polymorphic Discriminator */ export interface ResponseBase { + /** + * Polymorphic Discriminator + */ _type: string; } /** - * @class - * Initializes a new instance of the Identifiable class. - * @constructor * Defines the identity of a resource. - * - * @member {string} [id] A String identifier. */ export interface Identifiable extends ResponseBase { + /** + * A String identifier. + */ readonly id?: string; } /** - * @class - * Initializes a new instance of the Response class. - * @constructor - * Defines a response. All schemas that could be returned at the root of a - * response should inherit from this - * - * @member {string} [readLink] The URL that returns this resource. - * @member {string} [webSearchUrl] The URL To Bing's search result for this - * item. - * @member {array} [potentialAction] - * @member {array} [immediateAction] - * @member {string} [preferredClickthroughUrl] - * @member {string} [adaptiveCard] + * Defines a response. All schemas that could be returned at the root of a response should inherit + * from this */ export interface Response extends Identifiable { + /** + * The URL that returns this resource. + */ readonly readLink?: string; + /** + * The URL To Bing's search result for this item. + */ readonly webSearchUrl?: string; readonly potentialAction?: Action[]; readonly immediateAction?: Action[]; @@ -60,54 +48,40 @@ export interface Response extends Identifiable { } /** - * @class - * Initializes a new instance of the Thing class. - * @constructor * Defines a thing. - * - * @member {string} [url] The URL to get more information about the thing - * represented by this object. - */ +*/ export interface Thing extends Response { + /** + * The URL to get more information about the thing represented by this object. + */ readonly url?: string; } /** - * @class - * Initializes a new instance of the CreativeWork class. - * @constructor - * The most generic kind of creative work, including books, movies, - * photographs, software programs, etc. - * - * @member {string} [thumbnailUrl] The URL to a thumbnail of the item. - * @member {array} [about] For internal use only. - * @member {array} [mentions] For internal use only. - * @member {array} [provider] The source of the creative work. - * @member {object} [creator] - * @member {string} [creator.url] The URL to get more information about the - * thing represented by this object. - * @member {string} [text] Text content of this creative work - * @member {string} [discussionUrl] - * @member {number} [commentCount] - * @member {object} [mainEntity] - * @member {string} [mainEntity.url] The URL to get more information about the - * thing represented by this object. - * @member {string} [headLine] - * @member {object} [copyrightHolder] - * @member {string} [copyrightHolder.url] The URL to get more information about - * the thing represented by this object. - * @member {number} [copyrightYear] - * @member {string} [disclaimer] - * @member {boolean} [isAccessibleForFree] - * @member {array} [genre] - * @member {boolean} [isFamilyFriendly] - */ + * The most generic kind of creative work, including books, movies, photographs, software programs, + * etc. +*/ export interface CreativeWork extends Thing { + /** + * The URL to a thumbnail of the item. + */ readonly thumbnailUrl?: string; + /** + * For internal use only. + */ readonly about?: Thing[]; + /** + * For internal use only. + */ readonly mentions?: Thing[]; + /** + * The source of the creative work. + */ readonly provider?: Thing[]; readonly creator?: Thing; + /** + * Text content of this creative work + */ readonly text?: string; readonly discussionUrl?: string; readonly commentCount?: number; @@ -121,15 +95,6 @@ export interface CreativeWork extends Thing { readonly isFamilyFriendly?: boolean; } -/** - * @class - * Initializes a new instance of the Action class. - * @constructor - * @member {array} [result] - * @member {string} [displayName] - * @member {boolean} [isTopAction] - * @member {string} [serviceUrl] - */ export interface Action extends CreativeWork { readonly result?: Thing[]; readonly displayName?: string; @@ -137,177 +102,128 @@ export interface Action extends CreativeWork { readonly serviceUrl?: string; } -/** - * @class - * Initializes a new instance of the SearchAction class. - * @constructor - * @member {string} [displayText] - * @member {string} [query] - * @member {string} [searchKind] Possible values include: 'WebSearch', - * 'HistorySearch', 'DocumentSearch', 'TagSearch', 'LocationSearch', - * 'CustomSearch'. Default value: 'WebSearch' . - */ export interface SearchAction extends Action { readonly displayText?: string; readonly query?: string; + /** + * Possible values include: 'WebSearch', 'HistorySearch', 'DocumentSearch', 'TagSearch', + * 'LocationSearch', 'CustomSearch' + */ readonly searchKind?: string; } -/** - * @class - * Initializes a new instance of the SuggestionsSuggestionGroup class. - * @constructor - * @member {string} name Possible values include: 'Unknown', 'Web', - * 'StoreApps', 'SearchHistory', 'PersonalSearchDocuments', - * 'PersonalSearchTags', 'Custom'. Default value: 'Unknown' . - * @member {array} searchSuggestions - * @member {string} _type Polymorphic Discriminator - */ export interface SuggestionsSuggestionGroup { + /** + * Possible values include: 'Unknown', 'Web', 'StoreApps', 'SearchHistory', + * 'PersonalSearchDocuments', 'PersonalSearchTags', 'Custom' + */ name: string; searchSuggestions: SearchAction[]; + /** + * Polymorphic Discriminator + */ _type: string; } /** - * @class - * Initializes a new instance of the Answer class. - * @constructor * Defines an answer. - * - */ +*/ export interface Answer extends Response { } /** - * @class - * Initializes a new instance of the SearchResultsAnswer class. - * @constructor * Defines a search result answer. - * - * @member {object} [queryContext] - * @member {string} [queryContext.originalQuery] The query string as specified - * in the request. - * @member {string} [queryContext.alteredQuery] The query string used by Bing - * to perform the query. Bing uses the altered query string if the original - * query string contained spelling mistakes. For example, if the query string - * is "saling downwind", the altered query string will be "sailing downwind". - * This field is included only if the original query string contains a spelling - * mistake. - * @member {string} [queryContext.alterationOverrideQuery] The query string to - * use to force Bing to use the original string. For example, if the query - * string is "saling downwind", the override query string will be "+saling - * downwind". Remember to encode the query string which results in - * "%2Bsaling+downwind". This field is included only if the original query - * string contains a spelling mistake. - * @member {boolean} [queryContext.adultIntent] A Boolean value that indicates - * whether the specified query has adult intent. The value is true if the query - * has adult intent; otherwise, false. - * @member {boolean} [queryContext.askUserForLocation] A Boolean value that - * indicates whether Bing requires the user's location to provide accurate - * results. If you specified the user's location by using the X-MSEdge-ClientIP - * and X-Search-Location headers, you can ignore this field. For location aware - * queries, such as "today's weather" or "restaurants near me" that need the - * user's location to provide accurate results, this field is set to true. For - * location aware queries that include the location (for example, "Seattle - * weather"), this field is set to false. This field is also set to false for - * queries that are not location aware, such as "best sellers". - * @member {boolean} [queryContext.isTransactional] - * @member {string} [queryContext._type] Polymorphic Discriminator - */ +*/ export interface SearchResultsAnswer extends Answer { readonly queryContext?: QueryContext; } -/** - * @class - * Initializes a new instance of the Suggestions class. - * @constructor - * @member {array} suggestionGroups - */ export interface Suggestions extends SearchResultsAnswer { suggestionGroups: SuggestionsSuggestionGroup[]; } /** - * @class - * Initializes a new instance of the QueryContext class. - * @constructor * Defines the query context that Bing used for the request. - * - * @member {string} originalQuery The query string as specified in the request. - * @member {string} [alteredQuery] The query string used by Bing to perform the - * query. Bing uses the altered query string if the original query string - * contained spelling mistakes. For example, if the query string is "saling - * downwind", the altered query string will be "sailing downwind". This field - * is included only if the original query string contains a spelling mistake. - * @member {string} [alterationOverrideQuery] The query string to use to force - * Bing to use the original string. For example, if the query string is "saling - * downwind", the override query string will be "+saling downwind". Remember to - * encode the query string which results in "%2Bsaling+downwind". This field is - * included only if the original query string contains a spelling mistake. - * @member {boolean} [adultIntent] A Boolean value that indicates whether the - * specified query has adult intent. The value is true if the query has adult - * intent; otherwise, false. - * @member {boolean} [askUserForLocation] A Boolean value that indicates - * whether Bing requires the user's location to provide accurate results. If - * you specified the user's location by using the X-MSEdge-ClientIP and - * X-Search-Location headers, you can ignore this field. For location aware - * queries, such as "today's weather" or "restaurants near me" that need the - * user's location to provide accurate results, this field is set to true. For - * location aware queries that include the location (for example, "Seattle - * weather"), this field is set to false. This field is also set to false for - * queries that are not location aware, such as "best sellers". - * @member {boolean} [isTransactional] - * @member {string} _type Polymorphic Discriminator - */ +*/ export interface QueryContext { + /** + * The query string as specified in the request. + */ originalQuery: string; + /** + * The query string used by Bing to perform the query. Bing uses the altered query string if the + * original query string contained spelling mistakes. For example, if the query string is "saling + * downwind", the altered query string will be "sailing downwind". This field is included only if + * the original query string contains a spelling mistake. + */ readonly alteredQuery?: string; + /** + * The query string to use to force Bing to use the original string. For example, if the query + * string is "saling downwind", the override query string will be "+saling downwind". Remember to + * encode the query string which results in "%2Bsaling+downwind". This field is included only if + * the original query string contains a spelling mistake. + */ readonly alterationOverrideQuery?: string; + /** + * A Boolean value that indicates whether the specified query has adult intent. The value is true + * if the query has adult intent; otherwise, false. + */ readonly adultIntent?: boolean; + /** + * A Boolean value that indicates whether Bing requires the user's location to provide accurate + * results. If you specified the user's location by using the X-MSEdge-ClientIP and + * X-Search-Location headers, you can ignore this field. For location aware queries, such as + * "today's weather" or "restaurants near me" that need the user's location to provide accurate + * results, this field is set to true. For location aware queries that include the location (for + * example, "Seattle weather"), this field is set to false. This field is also set to false for + * queries that are not location aware, such as "best sellers". + */ readonly askUserForLocation?: boolean; readonly isTransactional?: boolean; + /** + * Polymorphic Discriminator + */ _type: string; } /** - * @class - * Initializes a new instance of the ErrorModel class. - * @constructor * Defines the error that occurred. - * - * @member {string} code The error code that identifies the category of error. - * Possible values include: 'None', 'ServerError', 'InvalidRequest', - * 'RateLimitExceeded', 'InvalidAuthorization', 'InsufficientAuthorization'. - * Default value: 'None' . - * @member {string} message A description of the error. - * @member {string} [moreDetails] A description that provides additional - * information about the error. - * @member {string} [parameter] The parameter in the request that caused the - * error. - * @member {string} [value] The parameter's value in the request that was not - * valid. - * @member {string} _type Polymorphic Discriminator - */ +*/ export interface ErrorModel { + /** + * The error code that identifies the category of error. Possible values include: 'None', + * 'ServerError', 'InvalidRequest', 'RateLimitExceeded', 'InvalidAuthorization', + * 'InsufficientAuthorization' + */ code: string; + /** + * A description of the error. + */ message: string; + /** + * A description that provides additional information about the error. + */ readonly moreDetails?: string; + /** + * The parameter in the request that caused the error. + */ readonly parameter?: string; + /** + * The parameter's value in the request that was not valid. + */ readonly value?: string; + /** + * Polymorphic Discriminator + */ _type: string; } /** - * @class - * Initializes a new instance of the ErrorResponse class. - * @constructor * The top-level response that represents a failed request. - * - * @member {array} errors A list of errors that describe the reasons why the - * request failed. - */ +*/ export interface ErrorResponse extends Response { + /** + * A list of errors that describe the reasons why the request failed. + */ errors: ErrorModel[]; } diff --git a/lib/services/cognitiveServicesAutoSuggest/lib/models/queryContext.js b/lib/services/cognitiveServicesAutoSuggest/lib/models/queryContext.js index cbdd045c40..a76f65d476 100644 --- a/lib/services/cognitiveServicesAutoSuggest/lib/models/queryContext.js +++ b/lib/services/cognitiveServicesAutoSuggest/lib/models/queryContext.js @@ -17,23 +17,23 @@ class QueryContext { /** * Create a QueryContext. - * @member {string} originalQuery The query string as specified in the + * @property {string} originalQuery The query string as specified in the * request. - * @member {string} [alteredQuery] The query string used by Bing to perform + * @property {string} [alteredQuery] The query string used by Bing to perform * the query. Bing uses the altered query string if the original query string * contained spelling mistakes. For example, if the query string is "saling * downwind", the altered query string will be "sailing downwind". This field * is included only if the original query string contains a spelling mistake. - * @member {string} [alterationOverrideQuery] The query string to use to + * @property {string} [alterationOverrideQuery] The query string to use to * force Bing to use the original string. For example, if the query string is * "saling downwind", the override query string will be "+saling downwind". * Remember to encode the query string which results in "%2Bsaling+downwind". * This field is included only if the original query string contains a * spelling mistake. - * @member {boolean} [adultIntent] A Boolean value that indicates whether the - * specified query has adult intent. The value is true if the query has adult - * intent; otherwise, false. - * @member {boolean} [askUserForLocation] A Boolean value that indicates + * @property {boolean} [adultIntent] A Boolean value that indicates whether + * the specified query has adult intent. The value is true if the query has + * adult intent; otherwise, false. + * @property {boolean} [askUserForLocation] A Boolean value that indicates * whether Bing requires the user's location to provide accurate results. If * you specified the user's location by using the X-MSEdge-ClientIP and * X-Search-Location headers, you can ignore this field. For location aware @@ -42,8 +42,8 @@ class QueryContext { * For location aware queries that include the location (for example, * "Seattle weather"), this field is set to false. This field is also set to * false for queries that are not location aware, such as "best sellers". - * @member {boolean} [isTransactional] - * @member {string} _type Polymorphic Discriminator + * @property {boolean} [isTransactional] + * @property {string} _type Polymorphic Discriminator */ constructor() { } diff --git a/lib/services/cognitiveServicesAutoSuggest/lib/models/response.js b/lib/services/cognitiveServicesAutoSuggest/lib/models/response.js index 8842125193..19d2a92ff2 100644 --- a/lib/services/cognitiveServicesAutoSuggest/lib/models/response.js +++ b/lib/services/cognitiveServicesAutoSuggest/lib/models/response.js @@ -21,13 +21,13 @@ const models = require('./index'); class Response extends models['Identifiable'] { /** * Create a Response. - * @member {string} [readLink] The URL that returns this resource. - * @member {string} [webSearchUrl] The URL To Bing's search result for this + * @property {string} [readLink] The URL that returns this resource. + * @property {string} [webSearchUrl] The URL To Bing's search result for this * item. - * @member {array} [potentialAction] - * @member {array} [immediateAction] - * @member {string} [preferredClickthroughUrl] - * @member {string} [adaptiveCard] + * @property {array} [potentialAction] + * @property {array} [immediateAction] + * @property {string} [preferredClickthroughUrl] + * @property {string} [adaptiveCard] */ constructor() { super(); diff --git a/lib/services/cognitiveServicesAutoSuggest/lib/models/responseBase.js b/lib/services/cognitiveServicesAutoSuggest/lib/models/responseBase.js index 28a5d0d020..902b737a95 100644 --- a/lib/services/cognitiveServicesAutoSuggest/lib/models/responseBase.js +++ b/lib/services/cognitiveServicesAutoSuggest/lib/models/responseBase.js @@ -17,7 +17,7 @@ class ResponseBase { /** * Create a ResponseBase. - * @member {string} _type Polymorphic Discriminator + * @property {string} _type Polymorphic Discriminator */ constructor() { } diff --git a/lib/services/cognitiveServicesAutoSuggest/lib/models/searchAction.js b/lib/services/cognitiveServicesAutoSuggest/lib/models/searchAction.js index a54564f3e9..843e27d07c 100644 --- a/lib/services/cognitiveServicesAutoSuggest/lib/models/searchAction.js +++ b/lib/services/cognitiveServicesAutoSuggest/lib/models/searchAction.js @@ -19,9 +19,9 @@ const models = require('./index'); class SearchAction extends models['Action'] { /** * Create a SearchAction. - * @member {string} [displayText] - * @member {string} [query] - * @member {string} [searchKind] Possible values include: 'WebSearch', + * @property {string} [displayText] + * @property {string} [query] + * @property {string} [searchKind] Possible values include: 'WebSearch', * 'HistorySearch', 'DocumentSearch', 'TagSearch', 'LocationSearch', * 'CustomSearch'. Default value: 'WebSearch' . */ diff --git a/lib/services/cognitiveServicesAutoSuggest/lib/models/searchResultsAnswer.js b/lib/services/cognitiveServicesAutoSuggest/lib/models/searchResultsAnswer.js index 9422b5d447..9e212ed470 100644 --- a/lib/services/cognitiveServicesAutoSuggest/lib/models/searchResultsAnswer.js +++ b/lib/services/cognitiveServicesAutoSuggest/lib/models/searchResultsAnswer.js @@ -20,25 +20,25 @@ const models = require('./index'); class SearchResultsAnswer extends models['Answer'] { /** * Create a SearchResultsAnswer. - * @member {object} [queryContext] - * @member {string} [queryContext.originalQuery] The query string as + * @property {object} [queryContext] + * @property {string} [queryContext.originalQuery] The query string as * specified in the request. - * @member {string} [queryContext.alteredQuery] The query string used by Bing - * to perform the query. Bing uses the altered query string if the original - * query string contained spelling mistakes. For example, if the query string - * is "saling downwind", the altered query string will be "sailing downwind". - * This field is included only if the original query string contains a - * spelling mistake. - * @member {string} [queryContext.alterationOverrideQuery] The query string + * @property {string} [queryContext.alteredQuery] The query string used by + * Bing to perform the query. Bing uses the altered query string if the + * original query string contained spelling mistakes. For example, if the + * query string is "saling downwind", the altered query string will be + * "sailing downwind". This field is included only if the original query + * string contains a spelling mistake. + * @property {string} [queryContext.alterationOverrideQuery] The query string * to use to force Bing to use the original string. For example, if the query * string is "saling downwind", the override query string will be "+saling * downwind". Remember to encode the query string which results in * "%2Bsaling+downwind". This field is included only if the original query * string contains a spelling mistake. - * @member {boolean} [queryContext.adultIntent] A Boolean value that + * @property {boolean} [queryContext.adultIntent] A Boolean value that * indicates whether the specified query has adult intent. The value is true * if the query has adult intent; otherwise, false. - * @member {boolean} [queryContext.askUserForLocation] A Boolean value that + * @property {boolean} [queryContext.askUserForLocation] A Boolean value that * indicates whether Bing requires the user's location to provide accurate * results. If you specified the user's location by using the * X-MSEdge-ClientIP and X-Search-Location headers, you can ignore this @@ -48,8 +48,8 @@ class SearchResultsAnswer extends models['Answer'] { * include the location (for example, "Seattle weather"), this field is set * to false. This field is also set to false for queries that are not * location aware, such as "best sellers". - * @member {boolean} [queryContext.isTransactional] - * @member {string} [queryContext._type] Polymorphic Discriminator + * @property {boolean} [queryContext.isTransactional] + * @property {string} [queryContext._type] Polymorphic Discriminator */ constructor() { super(); diff --git a/lib/services/cognitiveServicesAutoSuggest/lib/models/suggestions.js b/lib/services/cognitiveServicesAutoSuggest/lib/models/suggestions.js index 297ff06801..1d648b020e 100644 --- a/lib/services/cognitiveServicesAutoSuggest/lib/models/suggestions.js +++ b/lib/services/cognitiveServicesAutoSuggest/lib/models/suggestions.js @@ -19,7 +19,7 @@ const models = require('./index'); class Suggestions extends models['SearchResultsAnswer'] { /** * Create a Suggestions. - * @member {array} suggestionGroups + * @property {array} suggestionGroups */ constructor() { super(); diff --git a/lib/services/cognitiveServicesAutoSuggest/lib/models/suggestionsSuggestionGroup.js b/lib/services/cognitiveServicesAutoSuggest/lib/models/suggestionsSuggestionGroup.js index cfa0261463..3cee9aa536 100644 --- a/lib/services/cognitiveServicesAutoSuggest/lib/models/suggestionsSuggestionGroup.js +++ b/lib/services/cognitiveServicesAutoSuggest/lib/models/suggestionsSuggestionGroup.js @@ -16,11 +16,11 @@ class SuggestionsSuggestionGroup { /** * Create a SuggestionsSuggestionGroup. - * @member {string} name Possible values include: 'Unknown', 'Web', + * @property {string} name Possible values include: 'Unknown', 'Web', * 'StoreApps', 'SearchHistory', 'PersonalSearchDocuments', * 'PersonalSearchTags', 'Custom'. Default value: 'Unknown' . - * @member {array} searchSuggestions - * @member {string} _type Polymorphic Discriminator + * @property {array} searchSuggestions + * @property {string} _type Polymorphic Discriminator */ constructor() { } diff --git a/lib/services/cognitiveServicesAutoSuggest/lib/models/thing.js b/lib/services/cognitiveServicesAutoSuggest/lib/models/thing.js index 5cb36eb6b6..fab0ee3999 100644 --- a/lib/services/cognitiveServicesAutoSuggest/lib/models/thing.js +++ b/lib/services/cognitiveServicesAutoSuggest/lib/models/thing.js @@ -20,7 +20,7 @@ const models = require('./index'); class Thing extends models['Response'] { /** * Create a Thing. - * @member {string} [url] The URL to get more information about the thing + * @property {string} [url] The URL to get more information about the thing * represented by this object. */ constructor() { diff --git a/lib/services/cognitiveServicesAutoSuggest/package.json b/lib/services/cognitiveServicesAutoSuggest/package.json index e7c4f4690d..e3c252999c 100644 --- a/lib/services/cognitiveServicesAutoSuggest/package.json +++ b/lib/services/cognitiveServicesAutoSuggest/package.json @@ -1,8 +1,8 @@ { "name": "azure-cognitiveservices-autosuggest", "author": "Microsoft Corporation", - "description": "AutoSuggestAPIClient Library with typescript type definitions for node", - "version": "0.2.0-preview", + "description": "AutoSuggestClient Library with typescript type definitions for node", + "version": "1.0.0", "dependencies": { "ms-rest": "^2.3.3" }, @@ -11,8 +11,8 @@ "azure" ], "license": "MIT", - "main": "./lib/autoSuggestAPIClient.js", - "types": "./lib/autoSuggestAPIClient.d.ts", + "main": "./lib/autoSuggestClient.js", + "types": "./lib/autoSuggestClient.d.ts", "homepage": "https://github.com/azure/azure-sdk-for-node/tree/master/lib/services/cognitiveServicesAutoSuggest", "repository": { "type": "git", @@ -21,4 +21,4 @@ "bugs": { "url": "https://github.com/azure/azure-sdk-for-node/issues" } -} \ No newline at end of file +} diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/aPIError.js b/lib/services/cognitiveServicesContentModerator/lib/models/aPIError.js index a0d5b50334..2f812ace15 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/aPIError.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/aPIError.js @@ -17,9 +17,9 @@ class APIError { /** * Create a APIError. - * @member {object} [error] - * @member {string} [error.code] - * @member {string} [error.message] + * @property {object} [error] + * @property {string} [error.code] + * @property {string} [error.message] */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/address.js b/lib/services/cognitiveServicesContentModerator/lib/models/address.js index 4e99576856..eb2eb773ef 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/address.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/address.js @@ -17,9 +17,9 @@ class Address { /** * Create a Address. - * @member {string} [text] Detected Address. - * @member {number} [index] Index(Location) of the Address in the input text - * content. + * @property {string} [text] Detected Address. + * @property {number} [index] Index(Location) of the Address in the input + * text content. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/body.js b/lib/services/cognitiveServicesContentModerator/lib/models/body.js index eedb2c4b26..9a77b0d131 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/body.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/body.js @@ -16,9 +16,9 @@ class Body { /** * Create a Body. - * @member {string} [name] Name of the list. - * @member {string} [description] Description of the list. - * @member {object} [metadata] Metadata of the list. + * @property {string} [name] Name of the list. + * @property {string} [description] Description of the list. + * @property {object} [metadata] Metadata of the list. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/bodyModel.js b/lib/services/cognitiveServicesContentModerator/lib/models/bodyModel.js index 1cc45d8d2b..bd37770b11 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/bodyModel.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/bodyModel.js @@ -16,8 +16,8 @@ class BodyModel { /** * Create a BodyModel. - * @member {string} [dataRepresentation] Default value: 'URL' . - * @member {string} [value] + * @property {string} [dataRepresentation] Default value: 'URL' . + * @property {string} [value] */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/candidate.js b/lib/services/cognitiveServicesContentModerator/lib/models/candidate.js index f1f41ec74d..25f242002b 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/candidate.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/candidate.js @@ -17,8 +17,8 @@ class Candidate { /** * Create a Candidate. - * @member {string} [text] The text found. - * @member {number} [confidence] The confidence level. + * @property {string} [text] The text found. + * @property {number} [confidence] The confidence level. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/classification.js b/lib/services/cognitiveServicesContentModerator/lib/models/classification.js index b1c7a8cee9..7a16b9978c 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/classification.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/classification.js @@ -17,19 +17,19 @@ class Classification { /** * Create a Classification. - * @member {object} [category1] The category1 score details of the text. Click here for more * details on category classification. - * @member {number} [category1.score] The category1 score. - * @member {object} [category2] The category2 score details of the text. Click here for more * details on category classification. - * @member {number} [category2.score] The category2 score. - * @member {object} [category3] The category3 score details of the text. Click here for more * details on category classification. - * @member {number} [category3.score] The category3 score. - * @member {boolean} [reviewRecommended] The review recommended flag. + * @property {number} [category3.score] The category3 score. + * @property {boolean} [reviewRecommended] The review recommended flag. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/classificationCategory1.js b/lib/services/cognitiveServicesContentModerator/lib/models/classificationCategory1.js index 8584409ba3..fe8e35de80 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/classificationCategory1.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/classificationCategory1.js @@ -19,7 +19,7 @@ class ClassificationCategory1 { /** * Create a ClassificationCategory1. - * @member {number} [score] The category1 score. + * @property {number} [score] The category1 score. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/classificationCategory2.js b/lib/services/cognitiveServicesContentModerator/lib/models/classificationCategory2.js index 721f2e84c3..fd35154fd2 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/classificationCategory2.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/classificationCategory2.js @@ -19,7 +19,7 @@ class ClassificationCategory2 { /** * Create a ClassificationCategory2. - * @member {number} [score] The category2 score. + * @property {number} [score] The category2 score. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/classificationCategory3.js b/lib/services/cognitiveServicesContentModerator/lib/models/classificationCategory3.js index 7bd7c477d5..9dc4c6df59 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/classificationCategory3.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/classificationCategory3.js @@ -19,7 +19,7 @@ class ClassificationCategory3 { /** * Create a ClassificationCategory3. - * @member {number} [score] The category3 score. + * @property {number} [score] The category3 score. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/content.js b/lib/services/cognitiveServicesContentModerator/lib/models/content.js index 0f9b6c335e..44714346db 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/content.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/content.js @@ -16,7 +16,7 @@ class Content { /** * Create a Content. - * @member {string} contentValue Content to evaluate for a job. + * @property {string} contentValue Content to evaluate for a job. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/createReviewBodyItem.js b/lib/services/cognitiveServicesContentModerator/lib/models/createReviewBodyItem.js index 570b870174..2009806a62 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/createReviewBodyItem.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/createReviewBodyItem.js @@ -17,12 +17,12 @@ class CreateReviewBodyItem { /** * Create a CreateReviewBodyItem. - * @member {string} type Type of the content. Possible values include: + * @property {string} type Type of the content. Possible values include: * 'Image', 'Text' - * @member {string} content Content to review. - * @member {string} contentId Content Identifier. - * @member {string} [callbackEndpoint] Optional CallbackEndpoint. - * @member {array} [metadata] Optional metadata details. + * @property {string} content Content to review. + * @property {string} contentId Content Identifier. + * @property {string} [callbackEndpoint] Optional CallbackEndpoint. + * @property {array} [metadata] Optional metadata details. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/createReviewBodyItemMetadataItem.js b/lib/services/cognitiveServicesContentModerator/lib/models/createReviewBodyItemMetadataItem.js index 16a2625da6..023dd9667d 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/createReviewBodyItemMetadataItem.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/createReviewBodyItemMetadataItem.js @@ -16,8 +16,8 @@ class CreateReviewBodyItemMetadataItem { /** * Create a CreateReviewBodyItemMetadataItem. - * @member {string} key Your key parameter. - * @member {string} value Your value parameter. + * @property {string} key Your key parameter. + * @property {string} value Your value parameter. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/createVideoReviewsBodyItem.js b/lib/services/cognitiveServicesContentModerator/lib/models/createVideoReviewsBodyItem.js index 0302ff10d4..f8322ba179 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/createVideoReviewsBodyItem.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/createVideoReviewsBodyItem.js @@ -17,14 +17,15 @@ class CreateVideoReviewsBodyItem { /** * Create a CreateVideoReviewsBodyItem. - * @member {array} [videoFrames] Optional metadata details. - * @member {array} [metadata] Optional metadata details. - * @member {string} content Video content url to review. - * @member {string} contentId Content Identifier. - * @member {string} status Status of the video(Complete,Unpublished,Pending). - * Possible values include: 'Complete', 'Unpublished', 'Pending' - * @member {number} [timescale] Timescale of the video. - * @member {string} [callbackEndpoint] Optional CallbackEndpoint. + * @property {array} [videoFrames] Optional metadata details. + * @property {array} [metadata] Optional metadata details. + * @property {string} content Video content url to review. + * @property {string} contentId Content Identifier. + * @property {string} status Status of the + * video(Complete,Unpublished,Pending). Possible values include: 'Complete', + * 'Unpublished', 'Pending' + * @property {number} [timescale] Timescale of the video. + * @property {string} [callbackEndpoint] Optional CallbackEndpoint. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/createVideoReviewsBodyItemMetadataItem.js b/lib/services/cognitiveServicesContentModerator/lib/models/createVideoReviewsBodyItemMetadataItem.js index 529a4b3eea..d7ab9de36d 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/createVideoReviewsBodyItemMetadataItem.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/createVideoReviewsBodyItemMetadataItem.js @@ -16,8 +16,8 @@ class CreateVideoReviewsBodyItemMetadataItem { /** * Create a CreateVideoReviewsBodyItemMetadataItem. - * @member {string} key Your key parameter. - * @member {string} value Your value parameter. + * @property {string} key Your key parameter. + * @property {string} value Your value parameter. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/createVideoReviewsBodyItemVideoFramesItem.js b/lib/services/cognitiveServicesContentModerator/lib/models/createVideoReviewsBodyItemVideoFramesItem.js index 6d64c998a7..934be1a5c1 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/createVideoReviewsBodyItemVideoFramesItem.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/createVideoReviewsBodyItemVideoFramesItem.js @@ -16,11 +16,11 @@ class CreateVideoReviewsBodyItemVideoFramesItem { /** * Create a CreateVideoReviewsBodyItemVideoFramesItem. - * @member {string} id Id of the frame. - * @member {number} timestamp Timestamp of the frame. - * @member {string} frameImage Frame image Url. - * @member {array} [reviewerResultTags] - * @member {array} [metadata] Optional metadata details. + * @property {string} id Id of the frame. + * @property {number} timestamp Timestamp of the frame. + * @property {string} frameImage Frame image Url. + * @property {array} [reviewerResultTags] + * @property {array} [metadata] Optional metadata details. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/createVideoReviewsBodyItemVideoFramesItemMetadataItem.js b/lib/services/cognitiveServicesContentModerator/lib/models/createVideoReviewsBodyItemVideoFramesItemMetadataItem.js index 0fae88bd54..e32ca3cfdf 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/createVideoReviewsBodyItemVideoFramesItemMetadataItem.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/createVideoReviewsBodyItemVideoFramesItemMetadataItem.js @@ -16,8 +16,8 @@ class CreateVideoReviewsBodyItemVideoFramesItemMetadataItem { /** * Create a CreateVideoReviewsBodyItemVideoFramesItemMetadataItem. - * @member {string} key Your key parameter. - * @member {string} value Your value parameter. + * @property {string} key Your key parameter. + * @property {string} value Your value parameter. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/createVideoReviewsBodyItemVideoFramesItemReviewerResultTagsItem.js b/lib/services/cognitiveServicesContentModerator/lib/models/createVideoReviewsBodyItemVideoFramesItemReviewerResultTagsItem.js index de3b2f54d9..26d4357317 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/createVideoReviewsBodyItemVideoFramesItemReviewerResultTagsItem.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/createVideoReviewsBodyItemVideoFramesItemReviewerResultTagsItem.js @@ -16,8 +16,8 @@ class CreateVideoReviewsBodyItemVideoFramesItemReviewerResultTagsItem { /** * Create a CreateVideoReviewsBodyItemVideoFramesItemReviewerResultTagsItem. - * @member {string} key Your key parameter. - * @member {string} value Your value parameter. + * @property {string} key Your key parameter. + * @property {string} value Your value parameter. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/detectedLanguage.js b/lib/services/cognitiveServicesContentModerator/lib/models/detectedLanguage.js index 8eb2efd376..50dce82631 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/detectedLanguage.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/detectedLanguage.js @@ -17,12 +17,12 @@ class DetectedLanguage { /** * Create a DetectedLanguage. - * @member {string} [detectedLanguage] The detected language. - * @member {object} [status] The detect language status - * @member {number} [status.code] Status code. - * @member {string} [status.description] Status description. - * @member {string} [status.exception] Exception status. - * @member {string} [trackingId] The tracking id. + * @property {string} [detectedLanguage] The detected language. + * @property {object} [status] The detect language status + * @property {number} [status.code] Status code. + * @property {string} [status.description] Status description. + * @property {string} [status.exception] Exception status. + * @property {string} [trackingId] The tracking id. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/detectedTerms.js b/lib/services/cognitiveServicesContentModerator/lib/models/detectedTerms.js index 89da9a4fba..a965e39b13 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/detectedTerms.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/detectedTerms.js @@ -17,12 +17,12 @@ class DetectedTerms { /** * Create a DetectedTerms. - * @member {number} [index] Index(Location) of the detected profanity term in - * the input text content. - * @member {number} [originalIndex] Original Index(Location) of the detected - * profanity term in the input text content. - * @member {number} [listId] Matched Terms list Id. - * @member {string} [term] Detected profanity term. + * @property {number} [index] Index(Location) of the detected profanity term + * in the input text content. + * @property {number} [originalIndex] Original Index(Location) of the + * detected profanity term in the input text content. + * @property {number} [listId] Matched Terms list Id. + * @property {string} [term] Detected profanity term. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/email.js b/lib/services/cognitiveServicesContentModerator/lib/models/email.js index 2d8455d526..473ea5fff4 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/email.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/email.js @@ -17,12 +17,12 @@ class Email { /** * Create a Email. - * @member {string} [detected] Detected Email Address from the input text + * @property {string} [detected] Detected Email Address from the input text * content. - * @member {string} [subType] Subtype of the detected Email Address. - * @member {string} [text] Email Address in the input text content. - * @member {number} [index] Index(Location) of the Email address in the input - * text content. + * @property {string} [subType] Subtype of the detected Email Address. + * @property {string} [text] Email Address in the input text content. + * @property {number} [index] Index(Location) of the Email address in the + * input text content. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/errorModel.js b/lib/services/cognitiveServicesContentModerator/lib/models/errorModel.js index b1bc25aabc..9658130f38 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/errorModel.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/errorModel.js @@ -17,8 +17,8 @@ class ErrorModel { /** * Create a ErrorModel. - * @member {string} [code] - * @member {string} [message] + * @property {string} [code] + * @property {string} [message] */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/evaluate.js b/lib/services/cognitiveServicesContentModerator/lib/models/evaluate.js index 005ce951e7..1587c51f98 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/evaluate.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/evaluate.js @@ -17,21 +17,22 @@ class Evaluate { /** * Create a Evaluate. - * @member {string} [cacheID] The cache id. - * @member {boolean} [result] Evaluate result. - * @member {string} [trackingId] The tracking id. - * @member {number} [adultClassificationScore] The adult classification + * @property {string} [cacheID] The cache id. + * @property {boolean} [result] Evaluate result. + * @property {string} [trackingId] The tracking id. + * @property {number} [adultClassificationScore] The adult classification * score. - * @member {boolean} [isImageAdultClassified] Indicates if an image is + * @property {boolean} [isImageAdultClassified] Indicates if an image is * classified as adult. - * @member {number} [racyClassificationScore] The racy classication score. - * @member {boolean} [isImageRacyClassified] Indicates if the image is + * @property {number} [racyClassificationScore] The racy classification + * score. + * @property {boolean} [isImageRacyClassified] Indicates if the image is * classified as racy. - * @member {array} [advancedInfo] The advanced info. - * @member {object} [status] The evaluate status - * @member {number} [status.code] Status code. - * @member {string} [status.description] Status description. - * @member {string} [status.exception] Exception status. + * @property {array} [advancedInfo] The advanced info. + * @property {object} [status] The evaluate status + * @property {number} [status.code] Status code. + * @property {string} [status.description] Status description. + * @property {string} [status.exception] Exception status. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/face.js b/lib/services/cognitiveServicesContentModerator/lib/models/face.js index 460c900c12..e02e1a5c74 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/face.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/face.js @@ -17,10 +17,10 @@ class Face { /** * Create a Face. - * @member {number} [bottom] The bottom coordinate. - * @member {number} [left] The left coordinate. - * @member {number} [right] The right coordinate. - * @member {number} [top] The top coordinate. + * @property {number} [bottom] The bottom coordinate. + * @property {number} [left] The left coordinate. + * @property {number} [right] The right coordinate. + * @property {number} [top] The top coordinate. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/foundFaces.js b/lib/services/cognitiveServicesContentModerator/lib/models/foundFaces.js index b197663425..8f08024b8d 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/foundFaces.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/foundFaces.js @@ -17,16 +17,16 @@ class FoundFaces { /** * Create a FoundFaces. - * @member {object} [status] The evaluate status - * @member {number} [status.code] Status code. - * @member {string} [status.description] Status description. - * @member {string} [status.exception] Exception status. - * @member {string} [trackingId] The tracking id. - * @member {string} [cacheId] The cache id. - * @member {boolean} [result] True if result was found. - * @member {number} [count] Number of faces found. - * @member {array} [advancedInfo] The advanced info. - * @member {array} [faces] The list of faces. + * @property {object} [status] The evaluate status + * @property {number} [status.code] Status code. + * @property {string} [status.description] Status description. + * @property {string} [status.exception] Exception status. + * @property {string} [trackingId] The tracking id. + * @property {string} [cacheId] The cache id. + * @property {boolean} [result] True if result was found. + * @property {number} [count] Number of faces found. + * @property {array} [advancedInfo] The advanced info. + * @property {array} [faces] The list of faces. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/frame.js b/lib/services/cognitiveServicesContentModerator/lib/models/frame.js index 8aa56da647..49d50c1b90 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/frame.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/frame.js @@ -17,10 +17,10 @@ class Frame { /** * Create a Frame. - * @member {string} [timestamp] Timestamp of the frame. - * @member {string} [frameImage] Frame image. - * @member {array} [metadata] Array of KeyValue. - * @member {array} [reviewerResultTags] Reviewer result tags. + * @property {string} [timestamp] Timestamp of the frame. + * @property {string} [frameImage] Frame image. + * @property {array} [metadata] Array of KeyValue. + * @property {array} [reviewerResultTags] Reviewer result tags. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/frames.js b/lib/services/cognitiveServicesContentModerator/lib/models/frames.js index b4544a426e..304db8d776 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/frames.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/frames.js @@ -17,8 +17,8 @@ class Frames { /** * Create a Frames. - * @member {string} [reviewId] Id of the review. - * @member {array} [videoFrames] + * @property {string} [reviewId] Id of the review. + * @property {array} [videoFrames] */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/iPA.js b/lib/services/cognitiveServicesContentModerator/lib/models/iPA.js index 8ea493f0bd..7a06ef3f9a 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/iPA.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/iPA.js @@ -17,9 +17,9 @@ class IPA { /** * Create a IPA. - * @member {string} [subType] Subtype of the detected IP Address. - * @member {string} [text] Detected IP Address. - * @member {number} [index] Index(Location) of the IP Address in the input + * @property {string} [subType] Subtype of the detected IP Address. + * @property {string} [text] Detected IP Address. + * @property {number} [index] Index(Location) of the IP Address in the input * text content. */ constructor() { diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/image.js b/lib/services/cognitiveServicesContentModerator/lib/models/image.js index 6e1faad96e..5c0cd3e93b 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/image.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/image.js @@ -17,13 +17,13 @@ class Image { /** * Create a Image. - * @member {string} [contentId] Content Id. - * @member {array} [additionalInfo] Advanced info list. - * @member {object} [status] Status details. - * @member {number} [status.code] Status code. - * @member {string} [status.description] Status description. - * @member {string} [status.exception] Exception status. - * @member {string} [trackingId] Tracking Id. + * @property {string} [contentId] Content Id. + * @property {array} [additionalInfo] Advanced info list. + * @property {object} [status] Status details. + * @property {number} [status.code] Status code. + * @property {string} [status.description] Status description. + * @property {string} [status.exception] Exception status. + * @property {string} [trackingId] Tracking Id. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/imageAdditionalInfoItem.js b/lib/services/cognitiveServicesContentModerator/lib/models/imageAdditionalInfoItem.js index 94fb5926db..f54580a97d 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/imageAdditionalInfoItem.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/imageAdditionalInfoItem.js @@ -16,8 +16,8 @@ class ImageAdditionalInfoItem { /** * Create a ImageAdditionalInfoItem. - * @member {string} [key] Key parameter. - * @member {string} [value] Value parameter. + * @property {string} [key] Key parameter. + * @property {string} [value] Value parameter. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/imageIds.js b/lib/services/cognitiveServicesContentModerator/lib/models/imageIds.js index 1d16599d1a..4a475b2184 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/imageIds.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/imageIds.js @@ -17,13 +17,13 @@ class ImageIds { /** * Create a ImageIds. - * @member {string} [contentSource] Source of the content. - * @member {array} [contentIds] Id of the contents. - * @member {object} [status] Get Image status. - * @member {number} [status.code] Status code. - * @member {string} [status.description] Status description. - * @member {string} [status.exception] Exception status. - * @member {string} [trackingId] Tracking Id. + * @property {string} [contentSource] Source of the content. + * @property {array} [contentIds] Id of the contents. + * @property {object} [status] Get Image status. + * @property {number} [status.code] Status code. + * @property {string} [status.description] Status description. + * @property {string} [status.exception] Exception status. + * @property {string} [trackingId] Tracking Id. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/imageList.js b/lib/services/cognitiveServicesContentModerator/lib/models/imageList.js index 8bfb68f944..8dc920b9a4 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/imageList.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/imageList.js @@ -17,10 +17,10 @@ class ImageList { /** * Create a ImageList. - * @member {number} [id] Image List Id. - * @member {string} [name] Image List Name. - * @member {string} [description] Description for image list. - * @member {object} [metadata] Image List Metadata. + * @property {number} [id] Image List Id. + * @property {string} [name] Image List Name. + * @property {string} [description] Description for image list. + * @property {object} [metadata] Image List Metadata. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/index.d.ts b/lib/services/cognitiveServicesContentModerator/lib/models/index.d.ts index c711a565a0..ea87cf1cba 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/index.d.ts +++ b/lib/services/cognitiveServicesContentModerator/lib/models/index.d.ts @@ -1,257 +1,239 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import * as moment from "moment"; - /** - * @class - * Initializes a new instance of the KeyValuePair class. - * @constructor * The key value pair object properties. - * - * @member {string} [key] The key parameter. - * @member {string} [value] The value parameter. */ export interface KeyValuePair { + /** + * The key parameter. + */ key?: string; + /** + * The value parameter. + */ value?: string; } /** - * @class - * Initializes a new instance of the Tag class. - * @constructor * Tag details. - * - * @member {string} [key] The key parameter. - * @member {string} [value] The value parameter. */ export interface Tag { + /** + * The key parameter. + */ key?: string; + /** + * The value parameter. + */ value?: string; } /** - * @class - * Initializes a new instance of the Frame class. - * @constructor * Video frame property details. - * - * @member {string} [timestamp] Timestamp of the frame. - * @member {string} [frameImage] Frame image. - * @member {array} [metadata] Array of KeyValue. - * @member {array} [reviewerResultTags] Reviewer result tags. */ export interface Frame { + /** + * Timestamp of the frame. + */ timestamp?: string; + /** + * Frame image. + */ frameImage?: string; + /** + * Array of KeyValue. + */ metadata?: KeyValuePair[]; + /** + * Reviewer result tags. + */ reviewerResultTags?: Tag[]; } /** - * @class - * Initializes a new instance of the Frames class. - * @constructor * The response for a Get Frames request. - * - * @member {string} [reviewId] Id of the review. - * @member {array} [videoFrames] */ export interface Frames { + /** + * Id of the review. + */ reviewId?: string; videoFrames?: Frame[]; } /** - * @class - * Initializes a new instance of the ClassificationCategory1 class. - * @constructor - * The category1 score details of the text. Click here for more details - * on category classification. - * - * @member {number} [score] The category1 score. - */ + * The category1 score details of the text. Click + * here for more details on category classification. +*/ export interface ClassificationCategory1 { + /** + * The category1 score. + */ score?: number; } /** - * @class - * Initializes a new instance of the ClassificationCategory2 class. - * @constructor - * The category2 score details of the text. Click here for more details - * on category classification. - * - * @member {number} [score] The category2 score. - */ + * The category2 score details of the text. Click + * here for more details on category classification. +*/ export interface ClassificationCategory2 { + /** + * The category2 score. + */ score?: number; } /** - * @class - * Initializes a new instance of the ClassificationCategory3 class. - * @constructor - * The category3 score details of the text. Click here for more details - * on category classification. - * - * @member {number} [score] The category3 score. - */ + * The category3 score details of the text. Click + * here for more details on category classification. +*/ export interface ClassificationCategory3 { + /** + * The category3 score. + */ score?: number; } /** - * @class - * Initializes a new instance of the Classification class. - * @constructor * The classification details of the text. - * - * @member {object} [category1] The category1 score details of the text. Click here for more details - * on category classification. - * @member {number} [category1.score] The category1 score. - * @member {object} [category2] The category2 score details of the text. Click here for more details - * on category classification. - * @member {number} [category2.score] The category2 score. - * @member {object} [category3] The category3 score details of the text. Click here for more details - * on category classification. - * @member {number} [category3.score] The category3 score. - * @member {boolean} [reviewRecommended] The review recommended flag. - */ +*/ export interface Classification { + /** + * The category1 score details of the text. Click + * here for more details on category classification. + */ category1?: ClassificationCategory1; + /** + * The category2 score details of the text. Click + * here for more details on category classification. + */ category2?: ClassificationCategory2; + /** + * The category3 score details of the text. Click + * here for more details on category classification. + */ category3?: ClassificationCategory3; + /** + * The review recommended flag. + */ reviewRecommended?: boolean; } /** - * @class - * Initializes a new instance of the Status class. - * @constructor * Status properties. - * - * @member {number} [code] Status code. - * @member {string} [description] Status description. - * @member {string} [exception] Exception status. - */ +*/ export interface Status { + /** + * Status code. + */ code?: number; + /** + * Status description. + */ description?: string; + /** + * Exception status. + */ exception?: string; } /** - * @class - * Initializes a new instance of the Email class. - * @constructor * Email Address details. - * - * @member {string} [detected] Detected Email Address from the input text - * content. - * @member {string} [subType] Subtype of the detected Email Address. - * @member {string} [text] Email Address in the input text content. - * @member {number} [index] Index(Location) of the Email address in the input - * text content. - */ +*/ export interface Email { + /** + * Detected Email Address from the input text content. + */ detected?: string; + /** + * Subtype of the detected Email Address. + */ subType?: string; + /** + * Email Address in the input text content. + */ text?: string; + /** + * Index(Location) of the Email address in the input text content. + */ index?: number; } /** - * @class - * Initializes a new instance of the SSN class. - * @constructor * Detected SSN details. - * - * @member {string} [text] Detected SSN in the input text content. - * @member {number} [index] Index(Location) of the SSN in the input text - * content. - */ +*/ export interface SSN { + /** + * Detected SSN in the input text content. + */ text?: string; + /** + * Index(Location) of the SSN in the input text content. + */ index?: number; } /** - * @class - * Initializes a new instance of the IPA class. - * @constructor * IP Address details. - * - * @member {string} [subType] Subtype of the detected IP Address. - * @member {string} [text] Detected IP Address. - * @member {number} [index] Index(Location) of the IP Address in the input text - * content. - */ +*/ export interface IPA { + /** + * Subtype of the detected IP Address. + */ subType?: string; + /** + * Detected IP Address. + */ text?: string; + /** + * Index(Location) of the IP Address in the input text content. + */ index?: number; } /** - * @class - * Initializes a new instance of the Phone class. - * @constructor * Phone Property details. - * - * @member {string} [countryCode] CountryCode of the detected Phone number. - * @member {string} [text] Detected Phone number. - * @member {number} [index] Index(Location) of the Phone number in the input - * text content. - */ +*/ export interface Phone { + /** + * CountryCode of the detected Phone number. + */ countryCode?: string; + /** + * Detected Phone number. + */ text?: string; + /** + * Index(Location) of the Phone number in the input text content. + */ index?: number; } /** - * @class - * Initializes a new instance of the Address class. - * @constructor * Address details. - * - * @member {string} [text] Detected Address. - * @member {number} [index] Index(Location) of the Address in the input text - * content. - */ +*/ export interface Address { + /** + * Detected Address. + */ text?: string; + /** + * Index(Location) of the Address in the input text content. + */ index?: number; } /** - * @class - * Initializes a new instance of the PII class. - * @constructor * Personal Identifier Information details. - * - * @member {array} [email] - * @member {array} [sSN] - * @member {array} [iPA] - * @member {array} [phone] - * @member {array} [address] - */ +*/ export interface PII { email?: Email[]; sSN?: SSN[]; @@ -261,783 +243,827 @@ export interface PII { } /** - * @class - * Initializes a new instance of the DetectedTerms class. - * @constructor * Detected Terms details. - * - * @member {number} [index] Index(Location) of the detected profanity term in - * the input text content. - * @member {number} [originalIndex] Original Index(Location) of the detected - * profanity term in the input text content. - * @member {number} [listId] Matched Terms list Id. - * @member {string} [term] Detected profanity term. - */ +*/ export interface DetectedTerms { + /** + * Index(Location) of the detected profanity term in the input text content. + */ index?: number; + /** + * Original Index(Location) of the detected profanity term in the input text content. + */ originalIndex?: number; + /** + * Matched Terms list Id. + */ listId?: number; + /** + * Detected profanity term. + */ term?: string; } /** - * @class - * Initializes a new instance of the Screen class. - * @constructor * The response for a Screen text request. - * - * @member {string} [originalText] The original text. - * @member {string} [normalizedText] The normalized text. - * @member {string} [autoCorrectedText] The autocorrected text - * @member {array} [misrepresentation] The misrepresentation text. - * @member {object} [classification] The classification details of the text. - * @member {object} [classification.category1] The category1 score details of - * the text. Click here for - * more details on category classification. - * @member {number} [classification.category1.score] The category1 score. - * @member {object} [classification.category2] The category2 score details of - * the text. Click here for - * more details on category classification. - * @member {number} [classification.category2.score] The category2 score. - * @member {object} [classification.category3] The category3 score details of - * the text. Click here for - * more details on category classification. - * @member {number} [classification.category3.score] The category3 score. - * @member {boolean} [classification.reviewRecommended] The review recommended - * flag. - * @member {object} [status] The evaluate status. - * @member {number} [status.code] Status code. - * @member {string} [status.description] Status description. - * @member {string} [status.exception] Exception status. - * @member {object} [pII] Personal Identifier Information details. - * @member {array} [pII.email] - * @member {array} [pII.sSN] - * @member {array} [pII.iPA] - * @member {array} [pII.phone] - * @member {array} [pII.address] - * @member {string} [language] Language of the input text content. - * @member {array} [terms] - * @member {string} [trackingId] Unique Content Moderator transaction Id. - */ +*/ export interface Screen { + /** + * The original text. + */ originalText?: string; + /** + * The normalized text. + */ normalizedText?: string; + /** + * The autocorrected text + */ autoCorrectedText?: string; + /** + * The misrepresentation text. + */ misrepresentation?: string[]; + /** + * The classification details of the text. + */ classification?: Classification; + /** + * The evaluate status. + */ status?: Status; + /** + * Personal Identifier Information details. + */ pII?: PII; + /** + * Language of the input text content. + */ language?: string; terms?: DetectedTerms[]; + /** + * Unique Content Moderator transaction Id. + */ trackingId?: string; } /** - * @class - * Initializes a new instance of the Face class. - * @constructor * Coordinates to the found face. - * - * @member {number} [bottom] The bottom coordinate. - * @member {number} [left] The left coordinate. - * @member {number} [right] The right coordinate. - * @member {number} [top] The top coordinate. - */ +*/ export interface Face { + /** + * The bottom coordinate. + */ bottom?: number; + /** + * The left coordinate. + */ left?: number; + /** + * The right coordinate. + */ right?: number; + /** + * The top coordinate. + */ top?: number; } /** - * @class - * Initializes a new instance of the FoundFaces class. - * @constructor * Request object the contains found faces. - * - * @member {object} [status] The evaluate status - * @member {number} [status.code] Status code. - * @member {string} [status.description] Status description. - * @member {string} [status.exception] Exception status. - * @member {string} [trackingId] The tracking id. - * @member {string} [cacheId] The cache id. - * @member {boolean} [result] True if result was found. - * @member {number} [count] Number of faces found. - * @member {array} [advancedInfo] The advanced info. - * @member {array} [faces] The list of faces. - */ +*/ export interface FoundFaces { + /** + * The evaluate status + */ status?: Status; + /** + * The tracking id. + */ trackingId?: string; + /** + * The cache id. + */ cacheId?: string; + /** + * True if result was found. + */ result?: boolean; + /** + * Number of faces found. + */ count?: number; + /** + * The advanced info. + */ advancedInfo?: KeyValuePair[]; + /** + * The list of faces. + */ faces?: Face[]; } /** - * @class - * Initializes a new instance of the Candidate class. - * @constructor * OCR candidate text. - * - * @member {string} [text] The text found. - * @member {number} [confidence] The confidence level. - */ +*/ export interface Candidate { + /** + * The text found. + */ text?: string; + /** + * The confidence level. + */ confidence?: number; } /** - * @class - * Initializes a new instance of the OCR class. - * @constructor * Contains the text found in image for the language specified. - * - * @member {object} [status] The evaluate status - * @member {number} [status.code] Status code. - * @member {string} [status.description] Status description. - * @member {string} [status.exception] Exception status. - * @member {array} [metadata] Array of KeyValue. - * @member {string} [trackingId] The tracking id. - * @member {string} [cacheId] The cache id. - * @member {string} [language] The ISO 639-3 code. - * @member {string} [text] The found text. - * @member {array} [candidates] The list of candidate text. - */ +*/ export interface OCR { + /** + * The evaluate status + */ status?: Status; + /** + * Array of KeyValue. + */ metadata?: KeyValuePair[]; + /** + * The tracking id. + */ trackingId?: string; + /** + * The cache id. + */ cacheId?: string; + /** + * The ISO 639-3 code. + */ language?: string; + /** + * The found text. + */ text?: string; + /** + * The list of candidate text. + */ candidates?: Candidate[]; } /** - * @class - * Initializes a new instance of the Evaluate class. - * @constructor * Evaluate response object. - * - * @member {string} [cacheID] The cache id. - * @member {boolean} [result] Evaluate result. - * @member {string} [trackingId] The tracking id. - * @member {number} [adultClassificationScore] The adult classification score. - * @member {boolean} [isImageAdultClassified] Indicates if an image is - * classified as adult. - * @member {number} [racyClassificationScore] The racy classication score. - * @member {boolean} [isImageRacyClassified] Indicates if the image is - * classified as racy. - * @member {array} [advancedInfo] The advanced info. - * @member {object} [status] The evaluate status - * @member {number} [status.code] Status code. - * @member {string} [status.description] Status description. - * @member {string} [status.exception] Exception status. - */ +*/ export interface Evaluate { + /** + * The cache id. + */ cacheID?: string; + /** + * Evaluate result. + */ result?: boolean; + /** + * The tracking id. + */ trackingId?: string; + /** + * The adult classification score. + */ adultClassificationScore?: number; + /** + * Indicates if an image is classified as adult. + */ isImageAdultClassified?: boolean; + /** + * The racy classification score. + */ racyClassificationScore?: number; + /** + * Indicates if the image is classified as racy. + */ isImageRacyClassified?: boolean; + /** + * The advanced info. + */ advancedInfo?: KeyValuePair[]; + /** + * The evaluate status + */ status?: Status; } /** - * @class - * Initializes a new instance of the Match class. - * @constructor * The match details. - * - * @member {number} [score] Confidence score of the image match. - * @member {number} [matchId] The match id. - * @member {string} [source] The source. - * @member {array} [tags] The tags for match details. - * @member {string} [label] The label. - */ +*/ export interface Match { + /** + * Confidence score of the image match. + */ score?: number; + /** + * The match id. + */ matchId?: number; + /** + * The source. + */ source?: string; + /** + * The tags for match details. + */ tags?: number[]; + /** + * The label. + */ label?: string; } /** - * @class - * Initializes a new instance of the MatchResponse class. - * @constructor * The response for a Match request. - * - * @member {string} [trackingId] The tracking id. - * @member {string} [cacheID] The cache id. - * @member {boolean} [isMatch] Indicates if there is a match. - * @member {array} [matches] The match details. - * @member {object} [status] The evaluate status - * @member {number} [status.code] Status code. - * @member {string} [status.description] Status description. - * @member {string} [status.exception] Exception status. - */ +*/ export interface MatchResponse { + /** + * The tracking id. + */ trackingId?: string; + /** + * The cache id. + */ cacheID?: string; + /** + * Indicates if there is a match. + */ isMatch?: boolean; + /** + * The match details. + */ matches?: Match[]; + /** + * The evaluate status + */ status?: Status; } /** - * @class - * Initializes a new instance of the DetectedLanguage class. - * @constructor * Detect language result. - * - * @member {string} [detectedLanguage] The detected language. - * @member {object} [status] The detect language status - * @member {number} [status.code] Status code. - * @member {string} [status.description] Status description. - * @member {string} [status.exception] Exception status. - * @member {string} [trackingId] The tracking id. - */ +*/ export interface DetectedLanguage { + /** + * The detected language. + */ detectedLanguage?: string; + /** + * The detect language status + */ status?: Status; + /** + * The tracking id. + */ trackingId?: string; } /** - * @class - * Initializes a new instance of the ImageList class. - * @constructor * Image List Properties. - * - * @member {number} [id] Image List Id. - * @member {string} [name] Image List Name. - * @member {string} [description] Description for image list. - * @member {object} [metadata] Image List Metadata. - */ +*/ export interface ImageList { + /** + * Image List Id. + */ id?: number; + /** + * Image List Name. + */ name?: string; + /** + * Description for image list. + */ description?: string; + /** + * Image List Metadata. + */ metadata?: { [propertyName: string]: string }; } /** - * @class - * Initializes a new instance of the TermList class. - * @constructor * Term List Properties. - * - * @member {number} [id] Term list Id. - * @member {string} [name] Term list name. - * @member {string} [description] Description for term list. - * @member {object} [metadata] Term list metadata. - */ +*/ export interface TermList { + /** + * Term list Id. + */ id?: number; + /** + * Term list name. + */ name?: string; + /** + * Description for term list. + */ description?: string; + /** + * Term list metadata. + */ metadata?: { [propertyName: string]: string }; } /** - * @class - * Initializes a new instance of the RefreshIndex class. - * @constructor * Refresh Index Response. - * - * @member {string} [contentSourceId] Content source Id. - * @member {boolean} [isUpdateSuccess] Update success status. - * @member {array} [advancedInfo] Advanced info list. - * @member {object} [status] Refresh index status. - * @member {number} [status.code] Status code. - * @member {string} [status.description] Status description. - * @member {string} [status.exception] Exception status. - * @member {string} [trackingId] Tracking Id. - */ +*/ export interface RefreshIndex { + /** + * Content source Id. + */ contentSourceId?: string; + /** + * Update success status. + */ isUpdateSuccess?: boolean; + /** + * Advanced info list. + */ advancedInfo?: { [propertyName: string]: string }[]; + /** + * Refresh index status. + */ status?: Status; + /** + * Tracking Id. + */ trackingId?: string; } -/** - * @class - * Initializes a new instance of the ImageAdditionalInfoItem class. - * @constructor - * @member {string} [key] Key parameter. - * @member {string} [value] Value parameter. - */ export interface ImageAdditionalInfoItem { + /** + * Key parameter. + */ key?: string; + /** + * Value parameter. + */ value?: string; } /** - * @class - * Initializes a new instance of the Image class. - * @constructor * Image Properties. - * - * @member {string} [contentId] Content Id. - * @member {array} [additionalInfo] Advanced info list. - * @member {object} [status] Status details. - * @member {number} [status.code] Status code. - * @member {string} [status.description] Status description. - * @member {string} [status.exception] Exception status. - * @member {string} [trackingId] Tracking Id. - */ +*/ export interface Image { + /** + * Content Id. + */ contentId?: string; + /** + * Advanced info list. + */ additionalInfo?: ImageAdditionalInfoItem[]; + /** + * Status details. + */ status?: Status; + /** + * Tracking Id. + */ trackingId?: string; } /** - * @class - * Initializes a new instance of the ImageIds class. - * @constructor * Image Id properties. - * - * @member {string} [contentSource] Source of the content. - * @member {array} [contentIds] Id of the contents. - * @member {object} [status] Get Image status. - * @member {number} [status.code] Status code. - * @member {string} [status.description] Status description. - * @member {string} [status.exception] Exception status. - * @member {string} [trackingId] Tracking Id. - */ +*/ export interface ImageIds { + /** + * Source of the content. + */ contentSource?: string; + /** + * Id of the contents. + */ contentIds?: number[]; + /** + * Get Image status. + */ status?: Status; + /** + * Tracking Id. + */ trackingId?: string; } /** - * @class - * Initializes a new instance of the TermsInList class. - * @constructor * Terms in list Id passed. - * - * @member {string} [term] Added term details. - */ +*/ export interface TermsInList { + /** + * Added term details. + */ term?: string; } /** - * @class - * Initializes a new instance of the TermsData class. - * @constructor * All term Id response properties. - * - * @member {string} [language] Language of the terms. - * @member {array} [terms] List of terms. - * @member {object} [status] Term Status. - * @member {number} [status.code] Status code. - * @member {string} [status.description] Status description. - * @member {string} [status.exception] Exception status. - * @member {string} [trackingId] Tracking Id. - */ +*/ export interface TermsData { + /** + * Language of the terms. + */ language?: string; + /** + * List of terms. + */ terms?: TermsInList[]; + /** + * Term Status. + */ status?: Status; + /** + * Tracking Id. + */ trackingId?: string; } /** - * @class - * Initializes a new instance of the TermsPaging class. - * @constructor * Paging details. - * - * @member {number} [total] Total details. - * @member {number} [limit] Limit details. - * @member {number} [offset] Offset details. - * @member {number} [returned] Returned text details. - */ +*/ export interface TermsPaging { + /** + * Total details. + */ total?: number; + /** + * Limit details. + */ limit?: number; + /** + * Offset details. + */ offset?: number; + /** + * Returned text details. + */ returned?: number; } /** - * @class - * Initializes a new instance of the Terms class. - * @constructor * Terms properties. - * - * @member {object} [data] Term data details. - * @member {string} [data.language] Language of the terms. - * @member {array} [data.terms] List of terms. - * @member {object} [data.status] Term Status. - * @member {number} [data.status.code] Status code. - * @member {string} [data.status.description] Status description. - * @member {string} [data.status.exception] Exception status. - * @member {string} [data.trackingId] Tracking Id. - * @member {object} [paging] Paging details. - * @member {number} [paging.total] Total details. - * @member {number} [paging.limit] Limit details. - * @member {number} [paging.offset] Offset details. - * @member {number} [paging.returned] Returned text details. - */ +*/ export interface Terms { + /** + * Term data details. + */ data?: TermsData; + /** + * Paging details. + */ paging?: TermsPaging; } /** - * @class - * Initializes a new instance of the Review class. - * @constructor * The Review object. - * - * @member {string} [reviewId] Id of the review. - * @member {string} [subTeam] Name of the subteam. - * @member {string} [status] The status string (). - * @member {array} [reviewerResultTags] Array of KeyValue with Reviewer set - * Tags. - * @member {string} [createdBy] The reviewer name. - * @member {array} [metadata] Array of KeyValue. - * @member {string} [type] The type of content. - * @member {string} [content] The content value. - * @member {string} [contentId] Id of the content. - * @member {string} [callbackEndpoint] The callback endpoint. - */ +*/ export interface Review { + /** + * Id of the review. + */ reviewId?: string; + /** + * Name of the subteam. + */ subTeam?: string; + /** + * The status string (). + */ status?: string; + /** + * Array of KeyValue with Reviewer set Tags. + */ reviewerResultTags?: KeyValuePair[]; + /** + * The reviewer name. + */ createdBy?: string; + /** + * Array of KeyValue. + */ metadata?: KeyValuePair[]; + /** + * The type of content. + */ type?: string; + /** + * The content value. + */ content?: string; + /** + * Id of the content. + */ contentId?: string; + /** + * The callback endpoint. + */ callbackEndpoint?: string; } /** - * @class - * Initializes a new instance of the JobExecutionReportDetails class. - * @constructor * Job Execution Report Values. - * - * @member {string} [ts] Time details. - * @member {string} [msg] Message details. - */ +*/ export interface JobExecutionReportDetails { + /** + * Time details. + */ ts?: string; + /** + * Message details. + */ msg?: string; } /** - * @class - * Initializes a new instance of the Job class. - * @constructor * The Job object. - * - * @member {string} [id] The job id. - * @member {string} [teamName] The team name associated with the job. - * @member {string} [status] The status string (). - * @member {string} [workflowId] The Id of the workflow. - * @member {string} [type] Type of the content. - * @member {string} [callBackEndpoint] The callback endpoint. - * @member {string} [reviewId] Review Id if one is created. - * @member {array} [resultMetaData] Array of KeyValue pairs. - * @member {array} [jobExecutionReport] Job execution report- Array of KeyValue - * pairs object. - */ +*/ export interface Job { + /** + * The job id. + */ id?: string; + /** + * The team name associated with the job. + */ teamName?: string; + /** + * The status string (). + */ status?: string; + /** + * The Id of the workflow. + */ workflowId?: string; + /** + * Type of the content. + */ type?: string; + /** + * The callback endpoint. + */ callBackEndpoint?: string; + /** + * Review Id if one is created. + */ reviewId?: string; + /** + * Array of KeyValue pairs. + */ resultMetaData?: KeyValuePair[]; + /** + * Job execution report- Array of KeyValue pairs object. + */ jobExecutionReport?: JobExecutionReportDetails[]; } /** - * @class - * Initializes a new instance of the JobListResult class. - * @constructor * The list of job ids. - * - * @member {array} [value] The job id. - */ +*/ export interface JobListResult { + /** + * The job id. + */ value?: string[]; } -/** - * @class - * Initializes a new instance of the JobId class. - * @constructor - * @member {string} [jobId] Id of the created job. - */ export interface JobId { + /** + * Id of the created job. + */ jobId?: string; } /** - * @class - * Initializes a new instance of the ErrorModel class. - * @constructor * Error body. - * - * @member {string} [code] - * @member {string} [message] - */ +*/ export interface ErrorModel { code?: string; message?: string; } /** - * @class - * Initializes a new instance of the APIError class. - * @constructor * Error information returned by the API - * - * @member {object} [error] - * @member {string} [error.code] - * @member {string} [error.message] - */ +*/ export interface APIError { error?: ErrorModel; } -/** - * @class - * Initializes a new instance of the Body class. - * @constructor - * @member {string} [name] Name of the list. - * @member {string} [description] Description of the list. - * @member {object} [metadata] Metadata of the list. - */ export interface Body { + /** + * Name of the list. + */ name?: string; + /** + * Description of the list. + */ description?: string; + /** + * Metadata of the list. + */ metadata?: { [propertyName: string]: string }; } -/** - * @class - * Initializes a new instance of the CreateReviewBodyItemMetadataItem class. - * @constructor - * @member {string} key Your key parameter. - * @member {string} value Your value parameter. - */ export interface CreateReviewBodyItemMetadataItem { + /** + * Your key parameter. + */ key: string; + /** + * Your value parameter. + */ value: string; } /** - * @class - * Initializes a new instance of the CreateReviewBodyItem class. - * @constructor * Schema items of the body. - * - * @member {string} type Type of the content. Possible values include: 'Image', - * 'Text' - * @member {string} content Content to review. - * @member {string} contentId Content Identifier. - * @member {string} [callbackEndpoint] Optional CallbackEndpoint. - * @member {array} [metadata] Optional metadata details. - */ +*/ export interface CreateReviewBodyItem { + /** + * Type of the content. Possible values include: 'Image', 'Text' + */ type: string; + /** + * Content to review. + */ content: string; + /** + * Content Identifier. + */ contentId: string; + /** + * Optional CallbackEndpoint. + */ callbackEndpoint?: string; + /** + * Optional metadata details. + */ metadata?: CreateReviewBodyItemMetadataItem[]; } -/** - * @class - * Initializes a new instance of the Content class. - * @constructor - * @member {string} contentValue Content to evaluate for a job. - */ export interface Content { + /** + * Content to evaluate for a job. + */ contentValue: string; } -/** - * @class - * Initializes a new instance of the TranscriptModerationBodyItemTermsItem class. - * @constructor - * @member {number} index Index of the word - * @member {string} term Detected word. - */ export interface TranscriptModerationBodyItemTermsItem { + /** + * Index of the word + */ index: number; + /** + * Detected word. + */ term: string; } /** - * @class - * Initializes a new instance of the TranscriptModerationBodyItem class. - * @constructor * Schema items of the body. - * - * @member {string} timestamp Timestamp of the image. - * @member {array} terms Optional metadata details. - */ +*/ export interface TranscriptModerationBodyItem { + /** + * Timestamp of the image. + */ timestamp: string; + /** + * Optional metadata details. + */ terms: TranscriptModerationBodyItemTermsItem[]; } -/** - * @class - * Initializes a new instance of the BodyModel class. - * @constructor - * @member {string} [dataRepresentation] Default value: 'URL' . - * @member {string} [value] - */ export interface BodyModel { dataRepresentation?: string; value?: string; } -/** - * @class - * Initializes a new instance of the CreateVideoReviewsBodyItemVideoFramesItemReviewerResultTagsItem class. - * @constructor - * @member {string} key Your key parameter. - * @member {string} value Your value parameter. - */ export interface CreateVideoReviewsBodyItemVideoFramesItemReviewerResultTagsItem { + /** + * Your key parameter. + */ key: string; + /** + * Your value parameter. + */ value: string; } -/** - * @class - * Initializes a new instance of the CreateVideoReviewsBodyItemVideoFramesItemMetadataItem class. - * @constructor - * @member {string} key Your key parameter. - * @member {string} value Your value parameter. - */ export interface CreateVideoReviewsBodyItemVideoFramesItemMetadataItem { + /** + * Your key parameter. + */ key: string; + /** + * Your value parameter. + */ value: string; } -/** - * @class - * Initializes a new instance of the CreateVideoReviewsBodyItemVideoFramesItem class. - * @constructor - * @member {string} id Id of the frame. - * @member {number} timestamp Timestamp of the frame. - * @member {string} frameImage Frame image Url. - * @member {array} [reviewerResultTags] - * @member {array} [metadata] Optional metadata details. - */ export interface CreateVideoReviewsBodyItemVideoFramesItem { + /** + * Id of the frame. + */ id: string; + /** + * Timestamp of the frame. + */ timestamp: number; + /** + * Frame image Url. + */ frameImage: string; reviewerResultTags?: CreateVideoReviewsBodyItemVideoFramesItemReviewerResultTagsItem[]; + /** + * Optional metadata details. + */ metadata?: CreateVideoReviewsBodyItemVideoFramesItemMetadataItem[]; } -/** - * @class - * Initializes a new instance of the CreateVideoReviewsBodyItemMetadataItem class. - * @constructor - * @member {string} key Your key parameter. - * @member {string} value Your value parameter. - */ export interface CreateVideoReviewsBodyItemMetadataItem { + /** + * Your key parameter. + */ key: string; + /** + * Your value parameter. + */ value: string; } /** - * @class - * Initializes a new instance of the CreateVideoReviewsBodyItem class. - * @constructor * Schema items of the body. - * - * @member {array} [videoFrames] Optional metadata details. - * @member {array} [metadata] Optional metadata details. - * @member {string} content Video content url to review. - * @member {string} contentId Content Identifier. - * @member {string} status Status of the video(Complete,Unpublished,Pending). - * Possible values include: 'Complete', 'Unpublished', 'Pending' - * @member {number} [timescale] Timescale of the video. - * @member {string} [callbackEndpoint] Optional CallbackEndpoint. - */ +*/ export interface CreateVideoReviewsBodyItem { + /** + * Optional metadata details. + */ videoFrames?: CreateVideoReviewsBodyItemVideoFramesItem[]; + /** + * Optional metadata details. + */ metadata?: CreateVideoReviewsBodyItemMetadataItem[]; + /** + * Video content url to review. + */ content: string; + /** + * Content Identifier. + */ contentId: string; + /** + * Status of the video(Complete,Unpublished,Pending). Possible values include: 'Complete', + * 'Unpublished', 'Pending' + */ status: string; + /** + * Timescale of the video. + */ timescale?: number; + /** + * Optional CallbackEndpoint. + */ callbackEndpoint?: string; } -/** - * @class - * Initializes a new instance of the VideoFrameBodyItemReviewerResultTagsItem class. - * @constructor - * @member {string} key Your key parameter. - * @member {string} value Your value parameter. - */ export interface VideoFrameBodyItemReviewerResultTagsItem { + /** + * Your key parameter. + */ key: string; + /** + * Your value parameter. + */ value: string; } -/** - * @class - * Initializes a new instance of the VideoFrameBodyItemMetadataItem class. - * @constructor - * @member {string} key Your key parameter. - * @member {string} value Your value parameter. - */ export interface VideoFrameBodyItemMetadataItem { + /** + * Your key parameter. + */ key: string; + /** + * Your value parameter. + */ value: string; } /** - * @class - * Initializes a new instance of the VideoFrameBodyItem class. - * @constructor * Schema items of the body. - * - * @member {string} timestamp Timestamp of the frame. - * @member {string} frameImage Content to review. - * @member {array} [reviewerResultTags] - * @member {array} [metadata] Optional metadata details. - */ +*/ export interface VideoFrameBodyItem { + /** + * Timestamp of the frame. + */ timestamp: string; + /** + * Content to review. + */ frameImage: string; reviewerResultTags?: VideoFrameBodyItemReviewerResultTagsItem[]; + /** + * Optional metadata details. + */ metadata?: VideoFrameBodyItemMetadataItem[]; } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/job.js b/lib/services/cognitiveServicesContentModerator/lib/models/job.js index 0edd49f729..9b0fc696b4 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/job.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/job.js @@ -17,16 +17,16 @@ class Job { /** * Create a Job. - * @member {string} [id] The job id. - * @member {string} [teamName] The team name associated with the job. - * @member {string} [status] The status string (). - * @member {string} [workflowId] The Id of the workflow. - * @member {string} [type] Type of the content. - * @member {string} [callBackEndpoint] The callback endpoint. - * @member {string} [reviewId] Review Id if one is created. - * @member {array} [resultMetaData] Array of KeyValue pairs. - * @member {array} [jobExecutionReport] Job execution report- Array of + * @property {string} [workflowId] The Id of the workflow. + * @property {string} [type] Type of the content. + * @property {string} [callBackEndpoint] The callback endpoint. + * @property {string} [reviewId] Review Id if one is created. + * @property {array} [resultMetaData] Array of KeyValue pairs. + * @property {array} [jobExecutionReport] Job execution report- Array of * KeyValue pairs object. */ constructor() { diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/jobExecutionReportDetails.js b/lib/services/cognitiveServicesContentModerator/lib/models/jobExecutionReportDetails.js index 1eca684e61..1fec40500e 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/jobExecutionReportDetails.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/jobExecutionReportDetails.js @@ -17,8 +17,8 @@ class JobExecutionReportDetails { /** * Create a JobExecutionReportDetails. - * @member {string} [ts] Time details. - * @member {string} [msg] Message details. + * @property {string} [ts] Time details. + * @property {string} [msg] Message details. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/jobId.js b/lib/services/cognitiveServicesContentModerator/lib/models/jobId.js index 7d036fc750..883da5d2c6 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/jobId.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/jobId.js @@ -16,7 +16,7 @@ class JobId { /** * Create a JobId. - * @member {string} [jobId] Id of the created job. + * @property {string} [jobId] Id of the created job. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/jobListResult.js b/lib/services/cognitiveServicesContentModerator/lib/models/jobListResult.js index 130253bc0f..ea7b5b45e8 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/jobListResult.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/jobListResult.js @@ -17,7 +17,7 @@ class JobListResult { /** * Create a JobListResult. - * @member {array} [value] The job id. + * @property {array} [value] The job id. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/keyValuePair.js b/lib/services/cognitiveServicesContentModerator/lib/models/keyValuePair.js index 71a09829de..bf67fd1a03 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/keyValuePair.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/keyValuePair.js @@ -17,8 +17,8 @@ class KeyValuePair { /** * Create a KeyValuePair. - * @member {string} [key] The key parameter. - * @member {string} [value] The value parameter. + * @property {string} [key] The key parameter. + * @property {string} [value] The value parameter. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/match.js b/lib/services/cognitiveServicesContentModerator/lib/models/match.js index 8e9c27f79a..33ec5a379b 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/match.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/match.js @@ -17,11 +17,11 @@ class Match { /** * Create a Match. - * @member {number} [score] Confidence score of the image match. - * @member {number} [matchId] The match id. - * @member {string} [source] The source. - * @member {array} [tags] The tags for match details. - * @member {string} [label] The label. + * @property {number} [score] Confidence score of the image match. + * @property {number} [matchId] The match id. + * @property {string} [source] The source. + * @property {array} [tags] The tags for match details. + * @property {string} [label] The label. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/matchResponse.js b/lib/services/cognitiveServicesContentModerator/lib/models/matchResponse.js index 243792ddac..20a94659f6 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/matchResponse.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/matchResponse.js @@ -17,14 +17,14 @@ class MatchResponse { /** * Create a MatchResponse. - * @member {string} [trackingId] The tracking id. - * @member {string} [cacheID] The cache id. - * @member {boolean} [isMatch] Indicates if there is a match. - * @member {array} [matches] The match details. - * @member {object} [status] The evaluate status - * @member {number} [status.code] Status code. - * @member {string} [status.description] Status description. - * @member {string} [status.exception] Exception status. + * @property {string} [trackingId] The tracking id. + * @property {string} [cacheID] The cache id. + * @property {boolean} [isMatch] Indicates if there is a match. + * @property {array} [matches] The match details. + * @property {object} [status] The evaluate status + * @property {number} [status.code] Status code. + * @property {string} [status.description] Status description. + * @property {string} [status.exception] Exception status. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/oCR.js b/lib/services/cognitiveServicesContentModerator/lib/models/oCR.js index 081972af42..5cdf864c91 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/oCR.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/oCR.js @@ -17,16 +17,16 @@ class OCR { /** * Create a OCR. - * @member {object} [status] The evaluate status - * @member {number} [status.code] Status code. - * @member {string} [status.description] Status description. - * @member {string} [status.exception] Exception status. - * @member {array} [metadata] Array of KeyValue. - * @member {string} [trackingId] The tracking id. - * @member {string} [cacheId] The cache id. - * @member {string} [language] The ISO 639-3 code. - * @member {string} [text] The found text. - * @member {array} [candidates] The list of candidate text. + * @property {object} [status] The evaluate status + * @property {number} [status.code] Status code. + * @property {string} [status.description] Status description. + * @property {string} [status.exception] Exception status. + * @property {array} [metadata] Array of KeyValue. + * @property {string} [trackingId] The tracking id. + * @property {string} [cacheId] The cache id. + * @property {string} [language] The ISO 639-3 code. + * @property {string} [text] The found text. + * @property {array} [candidates] The list of candidate text. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/pII.js b/lib/services/cognitiveServicesContentModerator/lib/models/pII.js index 9de76c9704..9d0c1a0d88 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/pII.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/pII.js @@ -17,11 +17,11 @@ class PII { /** * Create a PII. - * @member {array} [email] - * @member {array} [sSN] - * @member {array} [iPA] - * @member {array} [phone] - * @member {array} [address] + * @property {array} [email] + * @property {array} [sSN] + * @property {array} [iPA] + * @property {array} [phone] + * @property {array} [address] */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/phone.js b/lib/services/cognitiveServicesContentModerator/lib/models/phone.js index 4bd3a47b12..c7949a40be 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/phone.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/phone.js @@ -17,10 +17,10 @@ class Phone { /** * Create a Phone. - * @member {string} [countryCode] CountryCode of the detected Phone number. - * @member {string} [text] Detected Phone number. - * @member {number} [index] Index(Location) of the Phone number in the input - * text content. + * @property {string} [countryCode] CountryCode of the detected Phone number. + * @property {string} [text] Detected Phone number. + * @property {number} [index] Index(Location) of the Phone number in the + * input text content. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/refreshIndex.js b/lib/services/cognitiveServicesContentModerator/lib/models/refreshIndex.js index ff09656c76..dc3dc97f8c 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/refreshIndex.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/refreshIndex.js @@ -17,14 +17,14 @@ class RefreshIndex { /** * Create a RefreshIndex. - * @member {string} [contentSourceId] Content source Id. - * @member {boolean} [isUpdateSuccess] Update success status. - * @member {array} [advancedInfo] Advanced info list. - * @member {object} [status] Refresh index status. - * @member {number} [status.code] Status code. - * @member {string} [status.description] Status description. - * @member {string} [status.exception] Exception status. - * @member {string} [trackingId] Tracking Id. + * @property {string} [contentSourceId] Content source Id. + * @property {boolean} [isUpdateSuccess] Update success status. + * @property {array} [advancedInfo] Advanced info list. + * @property {object} [status] Refresh index status. + * @property {number} [status.code] Status code. + * @property {string} [status.description] Status description. + * @property {string} [status.exception] Exception status. + * @property {string} [trackingId] Tracking Id. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/review.js b/lib/services/cognitiveServicesContentModerator/lib/models/review.js index db43cf5be4..bc1afeb0a6 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/review.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/review.js @@ -17,17 +17,17 @@ class Review { /** * Create a Review. - * @member {string} [reviewId] Id of the review. - * @member {string} [subTeam] Name of the subteam. - * @member {string} [status] The status string (). - * @member {array} [reviewerResultTags] Array of KeyValue with Reviewer set + * @property {string} [reviewId] Id of the review. + * @property {string} [subTeam] Name of the subteam. + * @property {string} [status] The status string (). + * @property {array} [reviewerResultTags] Array of KeyValue with Reviewer set * Tags. - * @member {string} [createdBy] The reviewer name. - * @member {array} [metadata] Array of KeyValue. - * @member {string} [type] The type of content. - * @member {string} [content] The content value. - * @member {string} [contentId] Id of the content. - * @member {string} [callbackEndpoint] The callback endpoint. + * @property {string} [createdBy] The reviewer name. + * @property {array} [metadata] Array of KeyValue. + * @property {string} [type] The type of content. + * @property {string} [content] The content value. + * @property {string} [contentId] Id of the content. + * @property {string} [callbackEndpoint] The callback endpoint. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/sSN.js b/lib/services/cognitiveServicesContentModerator/lib/models/sSN.js index f3bd39350b..6956e24cb1 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/sSN.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/sSN.js @@ -17,8 +17,8 @@ class SSN { /** * Create a SSN. - * @member {string} [text] Detected SSN in the input text content. - * @member {number} [index] Index(Location) of the SSN in the input text + * @property {string} [text] Detected SSN in the input text content. + * @property {number} [index] Index(Location) of the SSN in the input text * content. */ constructor() { diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/screen.js b/lib/services/cognitiveServicesContentModerator/lib/models/screen.js index 3c04e348ce..bead247db2 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/screen.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/screen.js @@ -17,38 +17,39 @@ class Screen { /** * Create a Screen. - * @member {string} [originalText] The original text. - * @member {string} [normalizedText] The normalized text. - * @member {string} [autoCorrectedText] The autocorrected text - * @member {array} [misrepresentation] The misrepresentation text. - * @member {object} [classification] The classification details of the text. - * @member {object} [classification.category1] The category1 score details of - * the text. Click here - * for more details on category classification. - * @member {number} [classification.category1.score] The category1 score. - * @member {object} [classification.category2] The category2 score details of - * the text. Click here - * for more details on category classification. - * @member {number} [classification.category2.score] The category2 score. - * @member {object} [classification.category3] The category3 score details of - * the text. Click here - * for more details on category classification. - * @member {number} [classification.category3.score] The category3 score. - * @member {boolean} [classification.reviewRecommended] The review + * @property {string} [originalText] The original text. + * @property {string} [normalizedText] The normalized text. + * @property {string} [autoCorrectedText] The autocorrected text + * @property {array} [misrepresentation] The misrepresentation text. + * @property {object} [classification] The classification details of the + * text. + * @property {object} [classification.category1] The category1 score details + * of the text. Click + * here for more details on category classification. + * @property {number} [classification.category1.score] The category1 score. + * @property {object} [classification.category2] The category2 score details + * of the text. Click + * here for more details on category classification. + * @property {number} [classification.category2.score] The category2 score. + * @property {object} [classification.category3] The category3 score details + * of the text. Click + * here for more details on category classification. + * @property {number} [classification.category3.score] The category3 score. + * @property {boolean} [classification.reviewRecommended] The review * recommended flag. - * @member {object} [status] The evaluate status. - * @member {number} [status.code] Status code. - * @member {string} [status.description] Status description. - * @member {string} [status.exception] Exception status. - * @member {object} [pII] Personal Identifier Information details. - * @member {array} [pII.email] - * @member {array} [pII.sSN] - * @member {array} [pII.iPA] - * @member {array} [pII.phone] - * @member {array} [pII.address] - * @member {string} [language] Language of the input text content. - * @member {array} [terms] - * @member {string} [trackingId] Unique Content Moderator transaction Id. + * @property {object} [status] The evaluate status. + * @property {number} [status.code] Status code. + * @property {string} [status.description] Status description. + * @property {string} [status.exception] Exception status. + * @property {object} [pII] Personal Identifier Information details. + * @property {array} [pII.email] + * @property {array} [pII.sSN] + * @property {array} [pII.iPA] + * @property {array} [pII.phone] + * @property {array} [pII.address] + * @property {string} [language] Language of the input text content. + * @property {array} [terms] + * @property {string} [trackingId] Unique Content Moderator transaction Id. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/status.js b/lib/services/cognitiveServicesContentModerator/lib/models/status.js index 46491db229..ed3c31810b 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/status.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/status.js @@ -17,9 +17,9 @@ class Status { /** * Create a Status. - * @member {number} [code] Status code. - * @member {string} [description] Status description. - * @member {string} [exception] Exception status. + * @property {number} [code] Status code. + * @property {string} [description] Status description. + * @property {string} [exception] Exception status. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/tag.js b/lib/services/cognitiveServicesContentModerator/lib/models/tag.js index b25a501273..2130e08743 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/tag.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/tag.js @@ -17,8 +17,8 @@ class Tag { /** * Create a Tag. - * @member {string} [key] The key parameter. - * @member {string} [value] The value parameter. + * @property {string} [key] The key parameter. + * @property {string} [value] The value parameter. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/termList.js b/lib/services/cognitiveServicesContentModerator/lib/models/termList.js index a0946ad3c3..80411d01fc 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/termList.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/termList.js @@ -17,10 +17,10 @@ class TermList { /** * Create a TermList. - * @member {number} [id] Term list Id. - * @member {string} [name] Term list name. - * @member {string} [description] Description for term list. - * @member {object} [metadata] Term list metadata. + * @property {number} [id] Term list Id. + * @property {string} [name] Term list name. + * @property {string} [description] Description for term list. + * @property {object} [metadata] Term list metadata. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/terms.js b/lib/services/cognitiveServicesContentModerator/lib/models/terms.js index b91aadf311..e505d38b41 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/terms.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/terms.js @@ -17,19 +17,19 @@ class Terms { /** * Create a Terms. - * @member {object} [data] Term data details. - * @member {string} [data.language] Language of the terms. - * @member {array} [data.terms] List of terms. - * @member {object} [data.status] Term Status. - * @member {number} [data.status.code] Status code. - * @member {string} [data.status.description] Status description. - * @member {string} [data.status.exception] Exception status. - * @member {string} [data.trackingId] Tracking Id. - * @member {object} [paging] Paging details. - * @member {number} [paging.total] Total details. - * @member {number} [paging.limit] Limit details. - * @member {number} [paging.offset] Offset details. - * @member {number} [paging.returned] Returned text details. + * @property {object} [data] Term data details. + * @property {string} [data.language] Language of the terms. + * @property {array} [data.terms] List of terms. + * @property {object} [data.status] Term Status. + * @property {number} [data.status.code] Status code. + * @property {string} [data.status.description] Status description. + * @property {string} [data.status.exception] Exception status. + * @property {string} [data.trackingId] Tracking Id. + * @property {object} [paging] Paging details. + * @property {number} [paging.total] Total details. + * @property {number} [paging.limit] Limit details. + * @property {number} [paging.offset] Offset details. + * @property {number} [paging.returned] Returned text details. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/termsData.js b/lib/services/cognitiveServicesContentModerator/lib/models/termsData.js index eca13ded57..f02a5afaf1 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/termsData.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/termsData.js @@ -17,13 +17,13 @@ class TermsData { /** * Create a TermsData. - * @member {string} [language] Language of the terms. - * @member {array} [terms] List of terms. - * @member {object} [status] Term Status. - * @member {number} [status.code] Status code. - * @member {string} [status.description] Status description. - * @member {string} [status.exception] Exception status. - * @member {string} [trackingId] Tracking Id. + * @property {string} [language] Language of the terms. + * @property {array} [terms] List of terms. + * @property {object} [status] Term Status. + * @property {number} [status.code] Status code. + * @property {string} [status.description] Status description. + * @property {string} [status.exception] Exception status. + * @property {string} [trackingId] Tracking Id. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/termsInList.js b/lib/services/cognitiveServicesContentModerator/lib/models/termsInList.js index fd1308e19a..c34cc6b3bc 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/termsInList.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/termsInList.js @@ -17,7 +17,7 @@ class TermsInList { /** * Create a TermsInList. - * @member {string} [term] Added term details. + * @property {string} [term] Added term details. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/termsPaging.js b/lib/services/cognitiveServicesContentModerator/lib/models/termsPaging.js index 4413cbfc38..afa51a2561 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/termsPaging.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/termsPaging.js @@ -17,10 +17,10 @@ class TermsPaging { /** * Create a TermsPaging. - * @member {number} [total] Total details. - * @member {number} [limit] Limit details. - * @member {number} [offset] Offset details. - * @member {number} [returned] Returned text details. + * @property {number} [total] Total details. + * @property {number} [limit] Limit details. + * @property {number} [offset] Offset details. + * @property {number} [returned] Returned text details. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/transcriptModerationBodyItem.js b/lib/services/cognitiveServicesContentModerator/lib/models/transcriptModerationBodyItem.js index 09aee99bba..1ac1d48f0c 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/transcriptModerationBodyItem.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/transcriptModerationBodyItem.js @@ -17,8 +17,8 @@ class TranscriptModerationBodyItem { /** * Create a TranscriptModerationBodyItem. - * @member {string} timestamp Timestamp of the image. - * @member {array} terms Optional metadata details. + * @property {string} timestamp Timestamp of the image. + * @property {array} terms Optional metadata details. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/transcriptModerationBodyItemTermsItem.js b/lib/services/cognitiveServicesContentModerator/lib/models/transcriptModerationBodyItemTermsItem.js index 058538f442..d52e0baba3 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/transcriptModerationBodyItemTermsItem.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/transcriptModerationBodyItemTermsItem.js @@ -16,8 +16,8 @@ class TranscriptModerationBodyItemTermsItem { /** * Create a TranscriptModerationBodyItemTermsItem. - * @member {number} index Index of the word - * @member {string} term Detected word. + * @property {number} index Index of the word + * @property {string} term Detected word. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/videoFrameBodyItem.js b/lib/services/cognitiveServicesContentModerator/lib/models/videoFrameBodyItem.js index 9d14994a9d..0da04fe2e7 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/videoFrameBodyItem.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/videoFrameBodyItem.js @@ -17,10 +17,10 @@ class VideoFrameBodyItem { /** * Create a VideoFrameBodyItem. - * @member {string} timestamp Timestamp of the frame. - * @member {string} frameImage Content to review. - * @member {array} [reviewerResultTags] - * @member {array} [metadata] Optional metadata details. + * @property {string} timestamp Timestamp of the frame. + * @property {string} frameImage Content to review. + * @property {array} [reviewerResultTags] + * @property {array} [metadata] Optional metadata details. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/videoFrameBodyItemMetadataItem.js b/lib/services/cognitiveServicesContentModerator/lib/models/videoFrameBodyItemMetadataItem.js index 78f360553a..7b8dcb0814 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/videoFrameBodyItemMetadataItem.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/videoFrameBodyItemMetadataItem.js @@ -16,8 +16,8 @@ class VideoFrameBodyItemMetadataItem { /** * Create a VideoFrameBodyItemMetadataItem. - * @member {string} key Your key parameter. - * @member {string} value Your value parameter. + * @property {string} key Your key parameter. + * @property {string} value Your value parameter. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/lib/models/videoFrameBodyItemReviewerResultTagsItem.js b/lib/services/cognitiveServicesContentModerator/lib/models/videoFrameBodyItemReviewerResultTagsItem.js index bd82244ccb..08464dadfa 100644 --- a/lib/services/cognitiveServicesContentModerator/lib/models/videoFrameBodyItemReviewerResultTagsItem.js +++ b/lib/services/cognitiveServicesContentModerator/lib/models/videoFrameBodyItemReviewerResultTagsItem.js @@ -16,8 +16,8 @@ class VideoFrameBodyItemReviewerResultTagsItem { /** * Create a VideoFrameBodyItemReviewerResultTagsItem. - * @member {string} key Your key parameter. - * @member {string} value Your value parameter. + * @property {string} key Your key parameter. + * @property {string} value Your value parameter. */ constructor() { } diff --git a/lib/services/cognitiveServicesContentModerator/package.json b/lib/services/cognitiveServicesContentModerator/package.json index 6f2e20a064..6412beeb27 100644 --- a/lib/services/cognitiveServicesContentModerator/package.json +++ b/lib/services/cognitiveServicesContentModerator/package.json @@ -2,7 +2,7 @@ "name": "azure-cognitiveservices-contentmoderator", "author": "Microsoft Corporation", "description": "ContentModeratorClient Library with typescript type definitions for node", - "version": "4.1.0", + "version": "4.1.1", "dependencies": { "ms-rest": "^2.3.3" }, @@ -21,4 +21,4 @@ "bugs": { "url": "https://github.com/azure/azure-sdk-for-node/issues" } -} \ No newline at end of file +} diff --git a/lib/services/cognitiveServicesCustomImageSearch/lib/customImageSearchClient.d.ts b/lib/services/cognitiveServicesCustomImageSearch/lib/customImageSearchClient.d.ts new file mode 100644 index 0000000000..0800abb808 --- /dev/null +++ b/lib/services/cognitiveServicesCustomImageSearch/lib/customImageSearchClient.d.ts @@ -0,0 +1,55 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import { ServiceClient, ServiceClientOptions, ServiceClientCredentials } from 'ms-rest'; +import * as models from "./models"; +import * as operations from "./operations"; + +/** + * CustomImageSearchClientOptions for CustomImageSearchClient. + */ +declare interface CustomImageSearchClientOptions extends ServiceClientOptions { + /** + * @property {string} [endpoint] - Supported Cognitive Services endpoints (protocol and hostname, for example: "https://westus.api.cognitive.microsoft.com", "https://api.cognitive.microsoft.com"). + */ + endpoint?: string; +} + +export default class CustomImageSearchClient extends ServiceClient { + /** + * @class + * Initializes a new instance of the CustomImageSearchClient class. + * @constructor + * + * @param {credentials} credentials - Subscription credentials which uniquely identify client subscription. + * + * @param {object} [options] - The parameter options + * + * @param {Array} [options.filters] - Filters to be added to the request pipeline + * + * @param {object} [options.requestOptions] - Options for the underlying request object + * {@link https://github.com/request/request#requestoptions-callback Options doc} + * + * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy + * + * @param {string} [options.endpoint] - Supported Cognitive Services endpoints (protocol and hostname, for example: "https://westus.api.cognitive.microsoft.com", "https://api.cognitive.microsoft.com"). + * + */ + constructor(credentials: ServiceClientCredentials, options?: CustomImageSearchClientOptions); + + credentials: ServiceClientCredentials; + + endpoint: string; + + // Operation groups + customInstance: operations.CustomInstance; +} + +export { CustomImageSearchClient, models as CustomImageSearchModels }; diff --git a/lib/services/cognitiveServicesCustomImageSearch/lib/customImageSearchClient.js b/lib/services/cognitiveServicesCustomImageSearch/lib/customImageSearchClient.js new file mode 100644 index 0000000000..89fd603a7d --- /dev/null +++ b/lib/services/cognitiveServicesCustomImageSearch/lib/customImageSearchClient.js @@ -0,0 +1,64 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +/* jshint latedef:false */ +/* jshint forin:false */ +/* jshint noempty:false */ + +'use strict'; + +const msRest = require('ms-rest'); +const ServiceClient = msRest.ServiceClient; + +const models = require('./models'); +const operations = require('./operations'); + + +/** Class representing a CustomImageSearchClient. */ +class CustomImageSearchClient extends ServiceClient { + /** + * Create a CustomImageSearchClient. + * @param {credentials} credentials - Subscription credentials which uniquely identify client subscription. + * @param {object} [options] - The parameter options + * @param {Array} [options.filters] - Filters to be added to the request pipeline + * @param {object} [options.requestOptions] - Options for the underlying request object + * {@link https://github.com/request/request#requestoptions-callback Options doc} + * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy + * @param {string} [options.endpoint] - Supported Cognitive Services endpoints (protocol and hostname, for example: "https://westus.api.cognitive.microsoft.com", "https://api.cognitive.microsoft.com"). + */ + constructor(credentials, options) { + if (credentials === null || credentials === undefined) { + throw new Error('\'credentials\' cannot be null.'); + } + + if (!options) options = {}; + + super(credentials, options); + + this.endpoint = 'https://api.cognitive.microsoft.com'; + this.baseUri = '{Endpoint}/bingcustomsearch/v7.0'; + this.credentials = credentials; + + let packageInfo = this.getPackageJsonInfo(__dirname); + this.addUserAgentInfo(`${packageInfo.name}/${packageInfo.version}`); + if(options.endpoint !== null && options.endpoint !== undefined) { + this.endpoint = options.endpoint; + } + this.customInstance = new operations.CustomInstance(this); + this.models = models; + msRest.addSerializationMixin(this); + } + +} + +module.exports = CustomImageSearchClient; +module.exports['default'] = CustomImageSearchClient; +module.exports.CustomImageSearchClient = CustomImageSearchClient; +module.exports.CustomImageSearchModels = models; diff --git a/lib/services/cognitiveServicesCustomImageSearch/lib/models/creativeWork.js b/lib/services/cognitiveServicesCustomImageSearch/lib/models/creativeWork.js index 1c771b7b75..869a4292e9 100644 --- a/lib/services/cognitiveServicesCustomImageSearch/lib/models/creativeWork.js +++ b/lib/services/cognitiveServicesCustomImageSearch/lib/models/creativeWork.js @@ -21,9 +21,9 @@ const models = require('./index'); class CreativeWork extends models['Thing'] { /** * Create a CreativeWork. - * @member {string} [thumbnailUrl] The URL to a thumbnail of the item. - * @member {array} [provider] The source of the creative work. - * @member {string} [text] Text content of this creative work + * @property {string} [thumbnailUrl] The URL to a thumbnail of the item. + * @property {array} [provider] The source of the creative work. + * @property {string} [text] Text content of this creative work */ constructor() { super(); diff --git a/lib/services/cognitiveServicesCustomImageSearch/lib/models/errorModel.js b/lib/services/cognitiveServicesCustomImageSearch/lib/models/errorModel.js index 29a10321dd..d827e4885e 100644 --- a/lib/services/cognitiveServicesCustomImageSearch/lib/models/errorModel.js +++ b/lib/services/cognitiveServicesCustomImageSearch/lib/models/errorModel.js @@ -17,22 +17,22 @@ class ErrorModel { /** * Create a ErrorModel. - * @member {string} code The error code that identifies the category of + * @property {string} code The error code that identifies the category of * error. Possible values include: 'None', 'ServerError', 'InvalidRequest', * 'RateLimitExceeded', 'InvalidAuthorization', 'InsufficientAuthorization'. * Default value: 'None' . - * @member {string} [subCode] The error code that further helps to identify + * @property {string} [subCode] The error code that further helps to identify * the error. Possible values include: 'UnexpectedError', 'ResourceError', * 'NotImplemented', 'ParameterMissing', 'ParameterInvalidValue', * 'HttpNotAllowed', 'Blocked', 'AuthorizationMissing', * 'AuthorizationRedundancy', 'AuthorizationDisabled', 'AuthorizationExpired' - * @member {string} message A description of the error. - * @member {string} [moreDetails] A description that provides additional + * @property {string} message A description of the error. + * @property {string} [moreDetails] A description that provides additional * information about the error. - * @member {string} [parameter] The parameter in the request that caused the - * error. - * @member {string} [value] The parameter's value in the request that was not - * valid. + * @property {string} [parameter] The parameter in the request that caused + * the error. + * @property {string} [value] The parameter's value in the request that was + * not valid. */ constructor() { } diff --git a/lib/services/cognitiveServicesCustomImageSearch/lib/models/errorResponse.js b/lib/services/cognitiveServicesCustomImageSearch/lib/models/errorResponse.js index f24c1e64b3..e37d2932b9 100644 --- a/lib/services/cognitiveServicesCustomImageSearch/lib/models/errorResponse.js +++ b/lib/services/cognitiveServicesCustomImageSearch/lib/models/errorResponse.js @@ -20,8 +20,8 @@ const models = require('./index'); class ErrorResponse extends models['Response'] { /** * Create a ErrorResponse. - * @member {array} errors A list of errors that describe the reasons why the - * request failed. + * @property {array} errors A list of errors that describe the reasons why + * the request failed. */ constructor() { super(); diff --git a/lib/services/cognitiveServicesCustomImageSearch/lib/models/identifiable.js b/lib/services/cognitiveServicesCustomImageSearch/lib/models/identifiable.js index 6cc9e3d679..51ceb85de4 100644 --- a/lib/services/cognitiveServicesCustomImageSearch/lib/models/identifiable.js +++ b/lib/services/cognitiveServicesCustomImageSearch/lib/models/identifiable.js @@ -20,7 +20,7 @@ const models = require('./index'); class Identifiable extends models['ResponseBase'] { /** * Create a Identifiable. - * @member {string} [id] A String identifier. + * @property {string} [id] A String identifier. */ constructor() { super(); diff --git a/lib/services/cognitiveServicesCustomImageSearch/lib/models/imageObject.js b/lib/services/cognitiveServicesCustomImageSearch/lib/models/imageObject.js index 99d40c4918..fa1af011be 100644 --- a/lib/services/cognitiveServicesCustomImageSearch/lib/models/imageObject.js +++ b/lib/services/cognitiveServicesCustomImageSearch/lib/models/imageObject.js @@ -20,16 +20,16 @@ const models = require('./index'); class ImageObject extends models['MediaObject'] { /** * Create a ImageObject. - * @member {object} [thumbnail] The URL to a thumbnail of the image - * @member {string} [imageInsightsToken] The token that you use in a + * @property {object} [thumbnail] The URL to a thumbnail of the image + * @property {string} [imageInsightsToken] The token that you use in a * subsequent call to the Image Search API to get additional information * about the image. For information about using this token, see the * insightsToken query parameter. - * @member {string} [imageId] Unique Id for the image - * @member {string} [accentColor] A three-byte hexadecimal number that + * @property {string} [imageId] Unique Id for the image + * @property {string} [accentColor] A three-byte hexadecimal number that * represents the color that dominates the image. Use the color as the * temporary background in your client until the image is loaded. - * @member {string} [visualWords] Visual representation of the image. Used + * @property {string} [visualWords] Visual representation of the image. Used * for getting more sizes */ constructor() { diff --git a/lib/services/cognitiveServicesCustomImageSearch/lib/models/images.js b/lib/services/cognitiveServicesCustomImageSearch/lib/models/images.js index 74797fb607..a45655543f 100644 --- a/lib/services/cognitiveServicesCustomImageSearch/lib/models/images.js +++ b/lib/services/cognitiveServicesCustomImageSearch/lib/models/images.js @@ -20,9 +20,9 @@ const models = require('./index'); class Images extends models['SearchResultsAnswer'] { /** * Create a Images. - * @member {number} [nextOffset] Used as part of deduping. Tells client the + * @property {number} [nextOffset] Used as part of deduping. Tells client the * next offset that client should use in the next pagination request - * @member {array} value A list of image objects that are relevant to the + * @property {array} value A list of image objects that are relevant to the * query. If there are no results, the List is empty. */ constructor() { diff --git a/lib/services/cognitiveServicesCustomImageSearch/lib/models/index.d.ts b/lib/services/cognitiveServicesCustomImageSearch/lib/models/index.d.ts index 6c50a1060a..7c1e94de5b 100644 --- a/lib/services/cognitiveServicesCustomImageSearch/lib/models/index.d.ts +++ b/lib/services/cognitiveServicesCustomImageSearch/lib/models/index.d.ts @@ -1,292 +1,273 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import * as moment from "moment"; - /** - * @class - * Initializes a new instance of the ResponseBase class. - * @constructor * Response base - * - * @member {string} _type Polymorphic Discriminator */ export interface ResponseBase { + /** + * Polymorphic Discriminator + */ _type: string; } /** - * @class - * Initializes a new instance of the Identifiable class. - * @constructor * Defines the identity of a resource. - * - * @member {string} [id] A String identifier. */ export interface Identifiable extends ResponseBase { + /** + * A String identifier. + */ readonly id?: string; } /** - * @class - * Initializes a new instance of the Response class. - * @constructor - * Defines a response. All schemas that could be returned at the root of a - * response should inherit from this - * - * @member {string} [readLink] The URL that returns this resource. - * @member {string} [webSearchUrl] The URL To Bing's search result for this - * item. + * Defines a response. All schemas that could be returned at the root of a response should inherit + * from this */ export interface Response extends Identifiable { + /** + * The URL that returns this resource. + */ readonly readLink?: string; + /** + * The URL To Bing's search result for this item. + */ readonly webSearchUrl?: string; } /** - * @class - * Initializes a new instance of the Thing class. - * @constructor * Defines a thing. - * - * @member {string} [name] The name of the thing represented by this object. - * @member {string} [url] The URL to get more information about the thing - * represented by this object. - * @member {object} [image] An image of the item. - * @member {object} [image.thumbnail] The URL to a thumbnail of the image - * @member {string} [image.imageInsightsToken] The token that you use in a - * subsequent call to the Image Search API to get additional information about - * the image. For information about using this token, see the insightsToken - * query parameter. - * @member {string} [image.imageId] Unique Id for the image - * @member {string} [image.accentColor] A three-byte hexadecimal number that - * represents the color that dominates the image. Use the color as the - * temporary background in your client until the image is loaded. - * @member {string} [image.visualWords] Visual representation of the image. - * Used for getting more sizes - * @member {string} [description] A short description of the item. - * @member {string} [alternateName] An alias for the item - * @member {string} [bingId] An ID that uniquely identifies this item. */ export interface Thing extends Response { + /** + * The name of the thing represented by this object. + */ readonly name?: string; + /** + * The URL to get more information about the thing represented by this object. + */ readonly url?: string; + /** + * An image of the item. + */ readonly image?: ImageObject; + /** + * A short description of the item. + */ readonly description?: string; + /** + * An alias for the item + */ readonly alternateName?: string; + /** + * An ID that uniquely identifies this item. + */ readonly bingId?: string; } /** - * @class - * Initializes a new instance of the CreativeWork class. - * @constructor - * The most generic kind of creative work, including books, movies, - * photographs, software programs, etc. - * - * @member {string} [thumbnailUrl] The URL to a thumbnail of the item. - * @member {array} [provider] The source of the creative work. - * @member {string} [text] Text content of this creative work + * The most generic kind of creative work, including books, movies, photographs, software programs, + * etc. */ export interface CreativeWork extends Thing { + /** + * The URL to a thumbnail of the item. + */ readonly thumbnailUrl?: string; + /** + * The source of the creative work. + */ readonly provider?: Thing[]; + /** + * Text content of this creative work + */ readonly text?: string; } /** - * @class - * Initializes a new instance of the MediaObject class. - * @constructor * Defines a media object. - * - * @member {string} [contentUrl] Original URL to retrieve the source (file) for - * the media object (e.g the source URL for the image). - * @member {string} [hostPageUrl] URL of the page that hosts the media object. - * @member {string} [contentSize] Size of the media object content (use format - * "value unit" e.g "1024 B"). - * @member {string} [encodingFormat] Encoding format (e.g mp3, mp4, jpeg, etc). - * @member {string} [hostPageDisplayUrl] Display URL of the page that hosts the - * media object. - * @member {number} [width] The width of the media object, in pixels. - * @member {number} [height] The height of the media object, in pixels. */ export interface MediaObject extends CreativeWork { + /** + * Original URL to retrieve the source (file) for the media object (e.g the source URL for the + * image). + */ readonly contentUrl?: string; + /** + * URL of the page that hosts the media object. + */ readonly hostPageUrl?: string; + /** + * Size of the media object content (use format "value unit" e.g "1024 B"). + */ readonly contentSize?: string; + /** + * Encoding format (e.g mp3, mp4, jpeg, etc). + */ readonly encodingFormat?: string; + /** + * Display URL of the page that hosts the media object. + */ readonly hostPageDisplayUrl?: string; + /** + * The width of the media object, in pixels. + */ readonly width?: number; + /** + * The height of the media object, in pixels. + */ readonly height?: number; } /** - * @class - * Initializes a new instance of the ImageObject class. - * @constructor * Defines an image - * - * @member {object} [thumbnail] The URL to a thumbnail of the image - * @member {string} [imageInsightsToken] The token that you use in a subsequent - * call to the Image Search API to get additional information about the image. - * For information about using this token, see the insightsToken query - * parameter. - * @member {string} [imageId] Unique Id for the image - * @member {string} [accentColor] A three-byte hexadecimal number that - * represents the color that dominates the image. Use the color as the - * temporary background in your client until the image is loaded. - * @member {string} [visualWords] Visual representation of the image. Used for - * getting more sizes */ export interface ImageObject extends MediaObject { + /** + * The URL to a thumbnail of the image + */ readonly thumbnail?: ImageObject; + /** + * The token that you use in a subsequent call to the Image Search API to get additional + * information about the image. For information about using this token, see the insightsToken + * query parameter. + */ readonly imageInsightsToken?: string; + /** + * Unique Id for the image + */ readonly imageId?: string; + /** + * A three-byte hexadecimal number that represents the color that dominates the image. Use the + * color as the temporary background in your client until the image is loaded. + */ readonly accentColor?: string; + /** + * Visual representation of the image. Used for getting more sizes + */ readonly visualWords?: string; } /** - * @class - * Initializes a new instance of the Answer class. - * @constructor * Defines an answer. - * */ export interface Answer extends Response { } /** - * @class - * Initializes a new instance of the SearchResultsAnswer class. - * @constructor * Defines a search result answer. - * - * @member {number} [totalEstimatedMatches] The estimated number of webpages - * that are relevant to the query. Use this number along with the count and - * offset query parameters to page the results. */ export interface SearchResultsAnswer extends Answer { + /** + * The estimated number of webpages that are relevant to the query. Use this number along with + * the count and offset query parameters to page the results. + */ readonly totalEstimatedMatches?: number; } /** - * @class - * Initializes a new instance of the Images class. - * @constructor * Defines an image answer - * - * @member {number} [nextOffset] Used as part of deduping. Tells client the - * next offset that client should use in the next pagination request - * @member {array} value A list of image objects that are relevant to the - * query. If there are no results, the List is empty. */ export interface Images extends SearchResultsAnswer { + /** + * Used as part of deduping. Tells client the next offset that client should use in the next + * pagination request + */ readonly nextOffset?: number; + /** + * A list of image objects that are relevant to the query. If there are no results, the List is + * empty. + */ value: ImageObject[]; } /** - * @class - * Initializes a new instance of the Query class. - * @constructor * Defines a search query. - * - * @member {string} text The query string. Use this string as the query term in - * a new search request. - * @member {string} [displayText] The display version of the query term. This - * version of the query term may contain special characters that highlight the - * search term found in the query string. The string contains the highlighting - * characters only if the query enabled hit highlighting - * @member {string} [webSearchUrl] The URL that takes the user to the Bing - * search results page for the query.Only related search results include this - * field. - * @member {string} [searchLink] The URL that you use to get the results of the - * related search. Before using the URL, you must append query parameters as - * appropriate and include the Ocp-Apim-Subscription-Key header. Use this URL - * if you're displaying the results in your own user interface. Otherwise, use - * the webSearchUrl URL. - * @member {object} [thumbnail] The URL to a thumbnail of a related image. - * @member {object} [thumbnail.thumbnail] The URL to a thumbnail of the image - * @member {string} [thumbnail.imageInsightsToken] The token that you use in a - * subsequent call to the Image Search API to get additional information about - * the image. For information about using this token, see the insightsToken - * query parameter. - * @member {string} [thumbnail.imageId] Unique Id for the image - * @member {string} [thumbnail.accentColor] A three-byte hexadecimal number - * that represents the color that dominates the image. Use the color as the - * temporary background in your client until the image is loaded. - * @member {string} [thumbnail.visualWords] Visual representation of the image. - * Used for getting more sizes */ export interface Query { + /** + * The query string. Use this string as the query term in a new search request. + */ text: string; + /** + * The display version of the query term. This version of the query term may contain special + * characters that highlight the search term found in the query string. The string contains the + * highlighting characters only if the query enabled hit highlighting + */ readonly displayText?: string; + /** + * The URL that takes the user to the Bing search results page for the query.Only related search + * results include this field. + */ readonly webSearchUrl?: string; + /** + * The URL that you use to get the results of the related search. Before using the URL, you must + * append query parameters as appropriate and include the Ocp-Apim-Subscription-Key header. Use + * this URL if you're displaying the results in your own user interface. Otherwise, use the + * webSearchUrl URL. + */ readonly searchLink?: string; + /** + * The URL to a thumbnail of a related image. + */ readonly thumbnail?: ImageObject; } /** - * @class - * Initializes a new instance of the ErrorModel class. - * @constructor * Defines the error that occurred. - * - * @member {string} code The error code that identifies the category of error. - * Possible values include: 'None', 'ServerError', 'InvalidRequest', - * 'RateLimitExceeded', 'InvalidAuthorization', 'InsufficientAuthorization'. - * Default value: 'None' . - * @member {string} [subCode] The error code that further helps to identify the - * error. Possible values include: 'UnexpectedError', 'ResourceError', - * 'NotImplemented', 'ParameterMissing', 'ParameterInvalidValue', - * 'HttpNotAllowed', 'Blocked', 'AuthorizationMissing', - * 'AuthorizationRedundancy', 'AuthorizationDisabled', 'AuthorizationExpired' - * @member {string} message A description of the error. - * @member {string} [moreDetails] A description that provides additional - * information about the error. - * @member {string} [parameter] The parameter in the request that caused the - * error. - * @member {string} [value] The parameter's value in the request that was not - * valid. */ export interface ErrorModel { + /** + * The error code that identifies the category of error. Possible values include: 'None', + * 'ServerError', 'InvalidRequest', 'RateLimitExceeded', 'InvalidAuthorization', + * 'InsufficientAuthorization' + */ code: string; + /** + * The error code that further helps to identify the error. Possible values include: + * 'UnexpectedError', 'ResourceError', 'NotImplemented', 'ParameterMissing', + * 'ParameterInvalidValue', 'HttpNotAllowed', 'Blocked', 'AuthorizationMissing', + * 'AuthorizationRedundancy', 'AuthorizationDisabled', 'AuthorizationExpired' + */ readonly subCode?: string; + /** + * A description of the error. + */ message: string; + /** + * A description that provides additional information about the error. + */ readonly moreDetails?: string; + /** + * The parameter in the request that caused the error. + */ readonly parameter?: string; + /** + * The parameter's value in the request that was not valid. + */ readonly value?: string; } /** - * @class - * Initializes a new instance of the ErrorResponse class. - * @constructor * The top-level response that represents a failed request. - * - * @member {array} errors A list of errors that describe the reasons why the - * request failed. */ export interface ErrorResponse extends Response { + /** + * A list of errors that describe the reasons why the request failed. + */ errors: ErrorModel[]; } /** - * @class - * Initializes a new instance of the WebPage class. - * @constructor * Defines a webpage that is relevant to the query. - * */ export interface WebPage extends CreativeWork { } diff --git a/lib/services/cognitiveServicesCustomImageSearch/lib/models/mediaObject.js b/lib/services/cognitiveServicesCustomImageSearch/lib/models/mediaObject.js index 793752ab3c..148d834cc3 100644 --- a/lib/services/cognitiveServicesCustomImageSearch/lib/models/mediaObject.js +++ b/lib/services/cognitiveServicesCustomImageSearch/lib/models/mediaObject.js @@ -20,18 +20,18 @@ const models = require('./index'); class MediaObject extends models['CreativeWork'] { /** * Create a MediaObject. - * @member {string} [contentUrl] Original URL to retrieve the source (file) + * @property {string} [contentUrl] Original URL to retrieve the source (file) * for the media object (e.g the source URL for the image). - * @member {string} [hostPageUrl] URL of the page that hosts the media + * @property {string} [hostPageUrl] URL of the page that hosts the media * object. - * @member {string} [contentSize] Size of the media object content (use + * @property {string} [contentSize] Size of the media object content (use * format "value unit" e.g "1024 B"). - * @member {string} [encodingFormat] Encoding format (e.g mp3, mp4, jpeg, + * @property {string} [encodingFormat] Encoding format (e.g mp3, mp4, jpeg, * etc). - * @member {string} [hostPageDisplayUrl] Display URL of the page that hosts + * @property {string} [hostPageDisplayUrl] Display URL of the page that hosts * the media object. - * @member {number} [width] The width of the media object, in pixels. - * @member {number} [height] The height of the media object, in pixels. + * @property {number} [width] The width of the media object, in pixels. + * @property {number} [height] The height of the media object, in pixels. */ constructor() { super(); diff --git a/lib/services/cognitiveServicesCustomImageSearch/lib/models/query.js b/lib/services/cognitiveServicesCustomImageSearch/lib/models/query.js index 751422daad..5083f93140 100644 --- a/lib/services/cognitiveServicesCustomImageSearch/lib/models/query.js +++ b/lib/services/cognitiveServicesCustomImageSearch/lib/models/query.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Defines a search query. * @@ -19,31 +17,32 @@ const models = require('./index'); class Query { /** * Create a Query. - * @member {string} text The query string. Use this string as the query term - * in a new search request. - * @member {string} [displayText] The display version of the query term. This - * version of the query term may contain special characters that highlight - * the search term found in the query string. The string contains the - * highlighting characters only if the query enabled hit highlighting - * @member {string} [webSearchUrl] The URL that takes the user to the Bing + * @property {string} text The query string. Use this string as the query + * term in a new search request. + * @property {string} [displayText] The display version of the query term. + * This version of the query term may contain special characters that + * highlight the search term found in the query string. The string contains + * the highlighting characters only if the query enabled hit highlighting + * @property {string} [webSearchUrl] The URL that takes the user to the Bing * search results page for the query.Only related search results include this * field. - * @member {string} [searchLink] The URL that you use to get the results of + * @property {string} [searchLink] The URL that you use to get the results of * the related search. Before using the URL, you must append query parameters * as appropriate and include the Ocp-Apim-Subscription-Key header. Use this * URL if you're displaying the results in your own user interface. * Otherwise, use the webSearchUrl URL. - * @member {object} [thumbnail] The URL to a thumbnail of a related image. - * @member {object} [thumbnail.thumbnail] The URL to a thumbnail of the image - * @member {string} [thumbnail.imageInsightsToken] The token that you use in - * a subsequent call to the Image Search API to get additional information + * @property {object} [thumbnail] The URL to a thumbnail of a related image. + * @property {object} [thumbnail.thumbnail] The URL to a thumbnail of the + * image + * @property {string} [thumbnail.imageInsightsToken] The token that you use + * in a subsequent call to the Image Search API to get additional information * about the image. For information about using this token, see the * insightsToken query parameter. - * @member {string} [thumbnail.imageId] Unique Id for the image - * @member {string} [thumbnail.accentColor] A three-byte hexadecimal number + * @property {string} [thumbnail.imageId] Unique Id for the image + * @property {string} [thumbnail.accentColor] A three-byte hexadecimal number * that represents the color that dominates the image. Use the color as the * temporary background in your client until the image is loaded. - * @member {string} [thumbnail.visualWords] Visual representation of the + * @property {string} [thumbnail.visualWords] Visual representation of the * image. Used for getting more sizes */ constructor() { diff --git a/lib/services/cognitiveServicesCustomImageSearch/lib/models/response.js b/lib/services/cognitiveServicesCustomImageSearch/lib/models/response.js index 5f42c01a24..66c19b4195 100644 --- a/lib/services/cognitiveServicesCustomImageSearch/lib/models/response.js +++ b/lib/services/cognitiveServicesCustomImageSearch/lib/models/response.js @@ -21,8 +21,8 @@ const models = require('./index'); class Response extends models['Identifiable'] { /** * Create a Response. - * @member {string} [readLink] The URL that returns this resource. - * @member {string} [webSearchUrl] The URL To Bing's search result for this + * @property {string} [readLink] The URL that returns this resource. + * @property {string} [webSearchUrl] The URL To Bing's search result for this * item. */ constructor() { diff --git a/lib/services/cognitiveServicesCustomImageSearch/lib/models/responseBase.js b/lib/services/cognitiveServicesCustomImageSearch/lib/models/responseBase.js index 28a5d0d020..902b737a95 100644 --- a/lib/services/cognitiveServicesCustomImageSearch/lib/models/responseBase.js +++ b/lib/services/cognitiveServicesCustomImageSearch/lib/models/responseBase.js @@ -17,7 +17,7 @@ class ResponseBase { /** * Create a ResponseBase. - * @member {string} _type Polymorphic Discriminator + * @property {string} _type Polymorphic Discriminator */ constructor() { } diff --git a/lib/services/cognitiveServicesCustomImageSearch/lib/models/searchResultsAnswer.js b/lib/services/cognitiveServicesCustomImageSearch/lib/models/searchResultsAnswer.js index 34d1203a51..76668d1ac4 100644 --- a/lib/services/cognitiveServicesCustomImageSearch/lib/models/searchResultsAnswer.js +++ b/lib/services/cognitiveServicesCustomImageSearch/lib/models/searchResultsAnswer.js @@ -20,9 +20,9 @@ const models = require('./index'); class SearchResultsAnswer extends models['Answer'] { /** * Create a SearchResultsAnswer. - * @member {number} [totalEstimatedMatches] The estimated number of webpages - * that are relevant to the query. Use this number along with the count and - * offset query parameters to page the results. + * @property {number} [totalEstimatedMatches] The estimated number of + * webpages that are relevant to the query. Use this number along with the + * count and offset query parameters to page the results. */ constructor() { super(); diff --git a/lib/services/cognitiveServicesCustomImageSearch/lib/models/thing.js b/lib/services/cognitiveServicesCustomImageSearch/lib/models/thing.js index 6fded1aaad..dbe5247711 100644 --- a/lib/services/cognitiveServicesCustomImageSearch/lib/models/thing.js +++ b/lib/services/cognitiveServicesCustomImageSearch/lib/models/thing.js @@ -20,24 +20,25 @@ const models = require('./index'); class Thing extends models['Response'] { /** * Create a Thing. - * @member {string} [name] The name of the thing represented by this object. - * @member {string} [url] The URL to get more information about the thing + * @property {string} [name] The name of the thing represented by this + * object. + * @property {string} [url] The URL to get more information about the thing * represented by this object. - * @member {object} [image] An image of the item. - * @member {object} [image.thumbnail] The URL to a thumbnail of the image - * @member {string} [image.imageInsightsToken] The token that you use in a + * @property {object} [image] An image of the item. + * @property {object} [image.thumbnail] The URL to a thumbnail of the image + * @property {string} [image.imageInsightsToken] The token that you use in a * subsequent call to the Image Search API to get additional information * about the image. For information about using this token, see the * insightsToken query parameter. - * @member {string} [image.imageId] Unique Id for the image - * @member {string} [image.accentColor] A three-byte hexadecimal number that - * represents the color that dominates the image. Use the color as the + * @property {string} [image.imageId] Unique Id for the image + * @property {string} [image.accentColor] A three-byte hexadecimal number + * that represents the color that dominates the image. Use the color as the * temporary background in your client until the image is loaded. - * @member {string} [image.visualWords] Visual representation of the image. + * @property {string} [image.visualWords] Visual representation of the image. * Used for getting more sizes - * @member {string} [description] A short description of the item. - * @member {string} [alternateName] An alias for the item - * @member {string} [bingId] An ID that uniquely identifies this item. + * @property {string} [description] A short description of the item. + * @property {string} [alternateName] An alias for the item + * @property {string} [bingId] An ID that uniquely identifies this item. */ constructor() { super(); diff --git a/lib/services/cognitiveServicesCustomImageSearch/lib/operations/customInstance.js b/lib/services/cognitiveServicesCustomImageSearch/lib/operations/customInstance.js index b129ca1fe5..47cd6afc3c 100644 --- a/lib/services/cognitiveServicesCustomImageSearch/lib/operations/customInstance.js +++ b/lib/services/cognitiveServicesCustomImageSearch/lib/operations/customInstance.js @@ -17,7 +17,7 @@ const WebResource = msRest.WebResource; * @summary The Custom Image Search API lets you send an image search query to * Bing and get image results found in your custom view of the web. * - * @param {number} customConfig The identifier for the custom search + * @param {string} customConfig The identifier for the custom search * configuration * * @param {string} query The user's search query term. The term cannot be @@ -409,6 +409,9 @@ function _imageSearch(customConfig, query, options, callback) { let xBingApisSDK = 'true'; // Validate try { + if (this.client.endpoint === null || this.client.endpoint === undefined || typeof this.client.endpoint.valueOf() !== 'string') { + throw new Error('this.client.endpoint cannot be null or undefined and it must be of type string.'); + } if (acceptLanguage !== null && acceptLanguage !== undefined && typeof acceptLanguage.valueOf() !== 'string') { throw new Error('acceptLanguage must be of type string.'); } @@ -424,14 +427,8 @@ function _imageSearch(customConfig, query, options, callback) { if (location !== null && location !== undefined && typeof location.valueOf() !== 'string') { throw new Error('location must be of type string.'); } - if (customConfig === null || customConfig === undefined || typeof customConfig !== 'number') { - throw new Error('customConfig cannot be null or undefined and it must be of type number.'); - } - if (customConfig !== null && customConfig !== undefined) { - if (customConfig < 0) - { - throw new Error('"customConfig" should satisfy the constraint - "InclusiveMinimum": 0'); - } + if (customConfig === null || customConfig === undefined || typeof customConfig.valueOf() !== 'string') { + throw new Error('customConfig cannot be null or undefined and it must be of type string.'); } if (aspect !== null && aspect !== undefined && typeof aspect.valueOf() !== 'string') { throw new Error('aspect must be of type string.'); @@ -509,8 +506,9 @@ function _imageSearch(customConfig, query, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'images/search'; + requestUrl = requestUrl.replace('{Endpoint}', this.client.endpoint); let queryParameters = []; - queryParameters.push('customConfig=' + encodeURIComponent(customConfig.toString())); + queryParameters.push('customConfig=' + encodeURIComponent(customConfig)); if (aspect !== null && aspect !== undefined) { queryParameters.push('aspect=' + encodeURIComponent(aspect)); } @@ -676,7 +674,7 @@ function _imageSearch(customConfig, query, options, callback) { class CustomInstance { /** * Create a CustomInstance. - * @param {CustomImageSearchAPIClient} client Reference to the service client. + * @param {CustomImageSearchClient} client Reference to the service client. */ constructor(client) { this.client = client; @@ -687,7 +685,7 @@ class CustomInstance { * @summary The Custom Image Search API lets you send an image search query to * Bing and get image results found in your custom view of the web. * - * @param {number} customConfig The identifier for the custom search + * @param {string} customConfig The identifier for the custom search * configuration * * @param {string} query The user's search query term. The term cannot be @@ -1050,7 +1048,7 @@ class CustomInstance { * @summary The Custom Image Search API lets you send an image search query to * Bing and get image results found in your custom view of the web. * - * @param {number} customConfig The identifier for the custom search + * @param {string} customConfig The identifier for the custom search * configuration * * @param {string} query The user's search query term. The term cannot be diff --git a/lib/services/cognitiveServicesCustomImageSearch/lib/operations/index.d.ts b/lib/services/cognitiveServicesCustomImageSearch/lib/operations/index.d.ts index 98697e10fe..485eb007d4 100644 --- a/lib/services/cognitiveServicesCustomImageSearch/lib/operations/index.d.ts +++ b/lib/services/cognitiveServicesCustomImageSearch/lib/operations/index.d.ts @@ -16,7 +16,7 @@ import * as models from '../models'; * @class * CustomInstance * __NOTE__: An instance of this class is automatically created for an - * instance of the CustomImageSearchAPIClient. + * instance of the CustomImageSearchClient. */ export interface CustomInstance { @@ -25,7 +25,7 @@ export interface CustomInstance { * @summary The Custom Image Search API lets you send an image search query to * Bing and get image results found in your custom view of the web. * - * @param {number} customConfig The identifier for the custom search + * @param {string} customConfig The identifier for the custom search * configuration * * @param {string} query The user's search query term. The term cannot be @@ -370,13 +370,13 @@ export interface CustomInstance { * * @reject {Error|ServiceError} - The error object. */ - imageSearchWithHttpOperationResponse(customConfig: number, query: string, options?: { acceptLanguage? : string, userAgent? : string, clientId? : string, clientIp? : string, location? : string, aspect? : string, color? : string, countryCode? : string, count? : number, freshness? : string, height? : number, id? : string, imageContent? : string, imageType? : string, license? : string, market? : string, maxFileSize? : number, maxHeight? : number, maxWidth? : number, minFileSize? : number, minHeight? : number, minWidth? : number, offset? : number, safeSearch? : string, size? : string, setLang? : string, width? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + imageSearchWithHttpOperationResponse(customConfig: string, query: string, options?: { acceptLanguage? : string, userAgent? : string, clientId? : string, clientIp? : string, location? : string, aspect? : string, color? : string, countryCode? : string, count? : number, freshness? : string, height? : number, id? : string, imageContent? : string, imageType? : string, license? : string, market? : string, maxFileSize? : number, maxHeight? : number, maxWidth? : number, minFileSize? : number, minHeight? : number, minWidth? : number, offset? : number, safeSearch? : string, size? : string, setLang? : string, width? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * @summary The Custom Image Search API lets you send an image search query to * Bing and get image results found in your custom view of the web. * - * @param {number} customConfig The identifier for the custom search + * @param {string} customConfig The identifier for the custom search * configuration * * @param {string} query The user's search query term. The term cannot be @@ -737,7 +737,7 @@ export interface CustomInstance { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - imageSearch(customConfig: number, query: string, options?: { acceptLanguage? : string, userAgent? : string, clientId? : string, clientIp? : string, location? : string, aspect? : string, color? : string, countryCode? : string, count? : number, freshness? : string, height? : number, id? : string, imageContent? : string, imageType? : string, license? : string, market? : string, maxFileSize? : number, maxHeight? : number, maxWidth? : number, minFileSize? : number, minHeight? : number, minWidth? : number, offset? : number, safeSearch? : string, size? : string, setLang? : string, width? : number, customHeaders? : { [headerName: string]: string; } }): Promise; - imageSearch(customConfig: number, query: string, callback: ServiceCallback): void; - imageSearch(customConfig: number, query: string, options: { acceptLanguage? : string, userAgent? : string, clientId? : string, clientIp? : string, location? : string, aspect? : string, color? : string, countryCode? : string, count? : number, freshness? : string, height? : number, id? : string, imageContent? : string, imageType? : string, license? : string, market? : string, maxFileSize? : number, maxHeight? : number, maxWidth? : number, minFileSize? : number, minHeight? : number, minWidth? : number, offset? : number, safeSearch? : string, size? : string, setLang? : string, width? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + imageSearch(customConfig: string, query: string, options?: { acceptLanguage? : string, userAgent? : string, clientId? : string, clientIp? : string, location? : string, aspect? : string, color? : string, countryCode? : string, count? : number, freshness? : string, height? : number, id? : string, imageContent? : string, imageType? : string, license? : string, market? : string, maxFileSize? : number, maxHeight? : number, maxWidth? : number, minFileSize? : number, minHeight? : number, minWidth? : number, offset? : number, safeSearch? : string, size? : string, setLang? : string, width? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + imageSearch(customConfig: string, query: string, callback: ServiceCallback): void; + imageSearch(customConfig: string, query: string, options: { acceptLanguage? : string, userAgent? : string, clientId? : string, clientIp? : string, location? : string, aspect? : string, color? : string, countryCode? : string, count? : number, freshness? : string, height? : number, id? : string, imageContent? : string, imageType? : string, license? : string, market? : string, maxFileSize? : number, maxHeight? : number, maxWidth? : number, minFileSize? : number, minHeight? : number, minWidth? : number, offset? : number, safeSearch? : string, size? : string, setLang? : string, width? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } diff --git a/lib/services/cognitiveServicesCustomImageSearch/package.json b/lib/services/cognitiveServicesCustomImageSearch/package.json index a316812716..fbd7749b8b 100644 --- a/lib/services/cognitiveServicesCustomImageSearch/package.json +++ b/lib/services/cognitiveServicesCustomImageSearch/package.json @@ -1,8 +1,8 @@ { "name": "azure-cognitiveservices-customimagesearch", "author": "Microsoft Corporation", - "description": "CustomImageSearchAPIClient Library with typescript type definitions for node", - "version": "0.2.0-preview", + "description": "CustomImageSearchClient Library with typescript type definitions for node", + "version": "1.0.0", "dependencies": { "ms-rest": "^2.3.3" }, @@ -11,9 +11,9 @@ "azure" ], "license": "MIT", - "main": "./lib/customImageSearchAPIClient.js", - "types": "./lib/customImageSearchAPIClient.d.ts", - "homepage": "https://github.com/azure/azure-sdk-for-node/lib/services/cognitiveServicesCustomImageSearch", + "main": "./lib/customImageSearchClient.js", + "types": "./lib/customImageSearchClient.d.ts", + "homepage": "https://github.com/azure/azure-sdk-for-node/tree/master/lib/services/cognitiveServicesCustomImageSearch", "repository": { "type": "git", "url": "https://github.com/azure/azure-sdk-for-node.git" @@ -21,4 +21,4 @@ "bugs": { "url": "https://github.com/azure/azure-sdk-for-node/issues" } -} \ No newline at end of file +} diff --git a/lib/services/cognitiveServicesCustomSearch/lib/customSearchClient.d.ts b/lib/services/cognitiveServicesCustomSearch/lib/customSearchClient.d.ts new file mode 100644 index 0000000000..17b215be78 --- /dev/null +++ b/lib/services/cognitiveServicesCustomSearch/lib/customSearchClient.d.ts @@ -0,0 +1,55 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import { ServiceClient, ServiceClientOptions, ServiceClientCredentials } from 'ms-rest'; +import * as models from "./models"; +import * as operations from "./operations"; + +/** + * CustomSearchClientOptions for CustomSearchClient. + */ +declare interface CustomSearchClientOptions extends ServiceClientOptions { + /** + * @property {string} [endpoint] - Supported Cognitive Services endpoints (protocol and hostname, for example: "https://westus.api.cognitive.microsoft.com", "https://api.cognitive.microsoft.com"). + */ + endpoint?: string; +} + +export default class CustomSearchClient extends ServiceClient { + /** + * @class + * Initializes a new instance of the CustomSearchClient class. + * @constructor + * + * @param {credentials} credentials - Subscription credentials which uniquely identify client subscription. + * + * @param {object} [options] - The parameter options + * + * @param {Array} [options.filters] - Filters to be added to the request pipeline + * + * @param {object} [options.requestOptions] - Options for the underlying request object + * {@link https://github.com/request/request#requestoptions-callback Options doc} + * + * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy + * + * @param {string} [options.endpoint] - Supported Cognitive Services endpoints (protocol and hostname, for example: "https://westus.api.cognitive.microsoft.com", "https://api.cognitive.microsoft.com"). + * + */ + constructor(credentials: ServiceClientCredentials, options?: CustomSearchClientOptions); + + credentials: ServiceClientCredentials; + + endpoint: string; + + // Operation groups + customInstance: operations.CustomInstance; +} + +export { CustomSearchClient, models as CustomSearchModels }; diff --git a/lib/services/cognitiveServicesCustomSearch/lib/customSearchAPIClient.js b/lib/services/cognitiveServicesCustomSearch/lib/customSearchClient.js similarity index 67% rename from lib/services/cognitiveServicesCustomSearch/lib/customSearchAPIClient.js rename to lib/services/cognitiveServicesCustomSearch/lib/customSearchClient.js index 64b14d674b..e07504d5b7 100644 --- a/lib/services/cognitiveServicesCustomSearch/lib/customSearchAPIClient.js +++ b/lib/services/cognitiveServicesCustomSearch/lib/customSearchClient.js @@ -21,19 +21,19 @@ const models = require('./models'); const operations = require('./operations'); -/** Class representing a CustomSearchAPIClient. */ -class CustomSearchAPIClient extends ServiceClient { +/** Class representing a CustomSearchClient. */ +class CustomSearchClient extends ServiceClient { /** - * Create a CustomSearchAPIClient. + * Create a CustomSearchClient. * @param {credentials} credentials - Subscription credentials which uniquely identify client subscription. - * @param {string} [baseUri] - The base URI of the service. * @param {object} [options] - The parameter options * @param {Array} [options.filters] - Filters to be added to the request pipeline * @param {object} [options.requestOptions] - Options for the underlying request object * {@link https://github.com/request/request#requestoptions-callback Options doc} * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy + * @param {string} [options.endpoint] - Supported Cognitive Services endpoints (protocol and hostname, for example: "https://westus.api.cognitive.microsoft.com", "https://api.cognitive.microsoft.com"). */ - constructor(credentials, baseUri, options) { + constructor(credentials, options) { if (credentials === null || credentials === undefined) { throw new Error('\'credentials\' cannot be null.'); } @@ -42,14 +42,15 @@ class CustomSearchAPIClient extends ServiceClient { super(credentials, options); - this.baseUri = baseUri; - if (!this.baseUri) { - this.baseUri = 'https://api.cognitive.microsoft.com/bingcustomsearch/v7.0'; - } + this.endpoint = 'https://api.cognitive.microsoft.com'; + this.baseUri = '{Endpoint}/bingcustomsearch/v7.0'; this.credentials = credentials; let packageInfo = this.getPackageJsonInfo(__dirname); this.addUserAgentInfo(`${packageInfo.name}/${packageInfo.version}`); + if(options.endpoint !== null && options.endpoint !== undefined) { + this.endpoint = options.endpoint; + } this.customInstance = new operations.CustomInstance(this); this.models = models; msRest.addSerializationMixin(this); @@ -57,7 +58,7 @@ class CustomSearchAPIClient extends ServiceClient { } -module.exports = CustomSearchAPIClient; -module.exports['default'] = CustomSearchAPIClient; -module.exports.CustomSearchAPIClient = CustomSearchAPIClient; -module.exports.CustomSearchAPIModels = models; +module.exports = CustomSearchClient; +module.exports['default'] = CustomSearchClient; +module.exports.CustomSearchClient = CustomSearchClient; +module.exports.CustomSearchModels = models; diff --git a/lib/services/cognitiveServicesCustomSearch/lib/models/index.d.ts b/lib/services/cognitiveServicesCustomSearch/lib/models/index.d.ts index ec3cb6bd3e..e071422b28 100644 --- a/lib/services/cognitiveServicesCustomSearch/lib/models/index.d.ts +++ b/lib/services/cognitiveServicesCustomSearch/lib/models/index.d.ts @@ -1,322 +1,256 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import * as moment from "moment"; - /** - * @class - * Initializes a new instance of the QueryContext class. - * @constructor * Defines the query context that Bing used for the request. - * - * @property {string} originalQuery The query string as specified in the - * request. - * @property {string} [alteredQuery] The query string used by Bing to perform - * the query. Bing uses the altered query string if the original query string - * contained spelling mistakes. For example, if the query string is "saling - * downwind", the altered query string will be "sailing downwind". This field - * is included only if the original query string contains a spelling mistake. - * @property {string} [alterationOverrideQuery] The query string to use to - * force Bing to use the original string. For example, if the query string is - * "saling downwind", the override query string will be "+saling downwind". - * Remember to encode the query string which results in "%2Bsaling+downwind". - * This field is included only if the original query string contains a spelling - * mistake. - * @property {boolean} [adultIntent] A Boolean value that indicates whether the - * specified query has adult intent. The value is true if the query has adult - * intent; otherwise, false. */ export interface QueryContext { + /** + * The query string as specified in the request. + */ originalQuery: string; + /** + * The query string used by Bing to perform the query. Bing uses the altered query string if the + * original query string contained spelling mistakes. For example, if the query string is "saling + * downwind", the altered query string will be "sailing downwind". This field is included only if + * the original query string contains a spelling mistake. + */ readonly alteredQuery?: string; + /** + * The query string to use to force Bing to use the original string. For example, if the query + * string is "saling downwind", the override query string will be "+saling downwind". Remember to + * encode the query string which results in "%2Bsaling+downwind". This field is included only if + * the original query string contains a spelling mistake. + */ readonly alterationOverrideQuery?: string; + /** + * A Boolean value that indicates whether the specified query has adult intent. The value is true + * if the query has adult intent; otherwise, false. + */ readonly adultIntent?: boolean; } /** - * @class - * Initializes a new instance of the WebMetaTag class. - * @constructor * Defines a webpage's metadata. - * - * @property {string} [name] The metadata. - * @property {string} [content] The name of the metadata. */ export interface WebMetaTag { + /** + * The metadata. + */ readonly name?: string; + /** + * The name of the metadata. + */ readonly content?: string; } -/** - * @class - * Initializes a new instance of the ResponseBase class. - * @constructor - * @property {string} _type Polymorphic Discriminator - */ export interface ResponseBase { + /** + * Polymorphic Discriminator + */ _type: string; } /** - * @class - * Initializes a new instance of the Identifiable class. - * @constructor * Defines the identity of a resource. - * - * @property {string} [id] A String identifier. - */ +*/ export interface Identifiable extends ResponseBase { + /** + * A String identifier. + */ readonly id?: string; } /** - * @class - * Initializes a new instance of the Response class. - * @constructor - * Defines a response. All schemas that could be returned at the root of a - * response should inherit from this - * - * @property {string} [webSearchUrl] The URL To Bing's search result for this - * item. - */ + * Defines a response. All schemas that could be returned at the root of a response should inherit + * from this +*/ export interface Response extends Identifiable { + /** + * The URL To Bing's search result for this item. + */ readonly webSearchUrl?: string; } -/** - * @class - * Initializes a new instance of the Thing class. - * @constructor - * @property {string} [name] The name of the thing represented by this object. - * @property {string} [url] The URL to get more information about the thing - * represented by this object. - * @property {string} [description] A short description of the item. - * @property {string} [bingId] An ID that uniquely identifies this item. - */ export interface Thing extends Response { + /** + * The name of the thing represented by this object. + */ readonly name?: string; + /** + * The URL to get more information about the thing represented by this object. + */ readonly url?: string; + /** + * A short description of the item. + */ readonly description?: string; + /** + * An ID that uniquely identifies this item. + */ readonly bingId?: string; } -/** - * @class - * Initializes a new instance of the CreativeWork class. - * @constructor - * @property {string} [thumbnailUrl] The URL to a thumbnail of the item. - * @property {array} [provider] The source of the creative work. - * @property {string} [text] - */ export interface CreativeWork extends Thing { + /** + * The URL to a thumbnail of the item. + */ readonly thumbnailUrl?: string; + /** + * The source of the creative work. + */ readonly provider?: Thing[]; readonly text?: string; } /** - * @class - * Initializes a new instance of the WebPage class. - * @constructor * Defines a webpage that is relevant to the query. - * - * @property {string} [displayUrl] The display URL of the webpage. The URL is - * meant for display purposes only and is not well formed. - * @property {string} [snippet] A snippet of text from the webpage that - * describes its contents. - * @property {array} [deepLinks] A list of links to related content that Bing - * found in the website that contains this webpage. The Webpage object in this - * context includes only the name, url, urlPingSuffix, and snippet fields. - * @property {string} [dateLastCrawled] The last time that Bing crawled the - * webpage. The date is in the form, YYYY-MM-DDTHH:MM:SS. For example, - * 2015-04-13T05:23:39. - * @property {array} [searchTags] A list of search tags that the webpage owner - * specified on the webpage. The API returns only indexed search tags. The name - * field of the MetaTag object contains the indexed search tag. Search tags - * begin with search.* (for example, search.assetId). The content field - * contains the tag's value. - */ +*/ export interface WebPage extends CreativeWork { + /** + * The display URL of the webpage. The URL is meant for display purposes only and is not well + * formed. + */ readonly displayUrl?: string; + /** + * A snippet of text from the webpage that describes its contents. + */ readonly snippet?: string; + /** + * A list of links to related content that Bing found in the website that contains this webpage. + * The Webpage object in this context includes only the name, url, urlPingSuffix, and snippet + * fields. + */ readonly deepLinks?: WebPage[]; + /** + * The last time that Bing crawled the webpage. The date is in the form, YYYY-MM-DDTHH:MM:SS. For + * example, 2015-04-13T05:23:39. + */ readonly dateLastCrawled?: string; + /** + * A list of search tags that the webpage owner specified on the webpage. The API returns only + * indexed search tags. The name field of the MetaTag object contains the indexed search tag. + * Search tags begin with search.* (for example, search.assetId). The content field contains the + * tag's value. + */ readonly searchTags?: WebMetaTag[]; } -/** - * @class - * Initializes a new instance of the Answer class. - * @constructor - * @property {array} [followUpQueries] - */ export interface Answer extends Response { readonly followUpQueries?: Query[]; } -/** - * @class - * Initializes a new instance of the SearchResultsAnswer class. - * @constructor - * @property {object} [queryContext] - * @property {string} [queryContext.originalQuery] The query string as - * specified in the request. - * @property {string} [queryContext.alteredQuery] The query string used by Bing - * to perform the query. Bing uses the altered query string if the original - * query string contained spelling mistakes. For example, if the query string - * is "saling downwind", the altered query string will be "sailing downwind". - * This field is included only if the original query string contains a spelling - * mistake. - * @property {string} [queryContext.alterationOverrideQuery] The query string - * to use to force Bing to use the original string. For example, if the query - * string is "saling downwind", the override query string will be "+saling - * downwind". Remember to encode the query string which results in - * "%2Bsaling+downwind". This field is included only if the original query - * string contains a spelling mistake. - * @property {boolean} [queryContext.adultIntent] A Boolean value that - * indicates whether the specified query has adult intent. The value is true if - * the query has adult intent; otherwise, false. - * @property {number} [totalEstimatedMatches] The estimated number of webpages - * that are relevant to the query. Use this number along with the count and - * offset query parameters to page the results. - * @property {boolean} [isFamilyFriendly] - */ export interface SearchResultsAnswer extends Answer { readonly queryContext?: QueryContext; + /** + * The estimated number of webpages that are relevant to the query. Use this number along with + * the count and offset query parameters to page the results. + */ readonly totalEstimatedMatches?: number; readonly isFamilyFriendly?: boolean; } /** - * @class - * Initializes a new instance of the WebWebAnswer class. - * @constructor * Defines a list of relevant webpage links. - * - * @property {array} value A list of webpages that are relevant to the query. - * @property {boolean} [someResultsRemoved] A Boolean value that indicates - * whether the response excluded some results from the answer. If Bing excluded - * some results, the value is true. - */ +*/ export interface WebWebAnswer extends SearchResultsAnswer { + /** + * A list of webpages that are relevant to the query. + */ value: WebPage[]; + /** + * A Boolean value that indicates whether the response excluded some results from the answer. If + * Bing excluded some results, the value is true. + */ readonly someResultsRemoved?: boolean; } /** - * @class - * Initializes a new instance of the SearchResponse class. - * @constructor - * Defines the top-level object that the response includes when the request - * succeeds. - * - * @property {object} [queryContext] An object that contains the query string - * that Bing used for the request. This object contains the query string as - * entered by the user. It may also contain an altered query string that Bing - * used for the query if the query string contained a spelling mistake. - * @property {string} [queryContext.originalQuery] The query string as - * specified in the request. - * @property {string} [queryContext.alteredQuery] The query string used by Bing - * to perform the query. Bing uses the altered query string if the original - * query string contained spelling mistakes. For example, if the query string - * is "saling downwind", the altered query string will be "sailing downwind". - * This field is included only if the original query string contains a spelling - * mistake. - * @property {string} [queryContext.alterationOverrideQuery] The query string - * to use to force Bing to use the original string. For example, if the query - * string is "saling downwind", the override query string will be "+saling - * downwind". Remember to encode the query string which results in - * "%2Bsaling+downwind". This field is included only if the original query - * string contains a spelling mistake. - * @property {boolean} [queryContext.adultIntent] A Boolean value that - * indicates whether the specified query has adult intent. The value is true if - * the query has adult intent; otherwise, false. - * @property {object} [webPages] A list of webpages that are relevant to the - * search query. - * @property {array} [webPages.value] A list of webpages that are relevant to - * the query. - * @property {boolean} [webPages.someResultsRemoved] A Boolean value that - * indicates whether the response excluded some results from the answer. If - * Bing excluded some results, the value is true. - */ + * Defines the top-level object that the response includes when the request succeeds. +*/ export interface SearchResponse extends Response { + /** + * An object that contains the query string that Bing used for the request. This object contains + * the query string as entered by the user. It may also contain an altered query string that Bing + * used for the query if the query string contained a spelling mistake. + */ readonly queryContext?: QueryContext; + /** + * A list of webpages that are relevant to the search query. + */ readonly webPages?: WebWebAnswer; } /** - * @class - * Initializes a new instance of the ErrorModel class. - * @constructor * Defines the error that occurred. - * - * @property {string} code The error code that identifies the category of - * error. Possible values include: 'None', 'ServerError', 'InvalidRequest', - * 'RateLimitExceeded', 'InvalidAuthorization', 'InsufficientAuthorization'. - * Default value: 'None' . - * @property {string} [subCode] The error code that further helps to identify - * the error. Possible values include: 'UnexpectedError', 'ResourceError', - * 'NotImplemented', 'ParameterMissing', 'ParameterInvalidValue', - * 'HttpNotAllowed', 'Blocked', 'AuthorizationMissing', - * 'AuthorizationRedundancy', 'AuthorizationDisabled', 'AuthorizationExpired' - * @property {string} message A description of the error. - * @property {string} [moreDetails] A description that provides additional - * information about the error. - * @property {string} [parameter] The parameter in the request that caused the - * error. - * @property {string} [value] The parameter's value in the request that was not - * valid. - */ +*/ export interface ErrorModel { + /** + * The error code that identifies the category of error. Possible values include: 'None', + * 'ServerError', 'InvalidRequest', 'RateLimitExceeded', 'InvalidAuthorization', + * 'InsufficientAuthorization' + */ code: string; + /** + * The error code that further helps to identify the error. Possible values include: + * 'UnexpectedError', 'ResourceError', 'NotImplemented', 'ParameterMissing', + * 'ParameterInvalidValue', 'HttpNotAllowed', 'Blocked', 'AuthorizationMissing', + * 'AuthorizationRedundancy', 'AuthorizationDisabled', 'AuthorizationExpired' + */ readonly subCode?: string; + /** + * A description of the error. + */ message: string; + /** + * A description that provides additional information about the error. + */ readonly moreDetails?: string; + /** + * The parameter in the request that caused the error. + */ readonly parameter?: string; + /** + * The parameter's value in the request that was not valid. + */ readonly value?: string; } /** - * @class - * Initializes a new instance of the ErrorResponse class. - * @constructor * The top-level response that represents a failed request. - * - * @property {array} errors A list of errors that describe the reasons why the - * request failed. - */ +*/ export interface ErrorResponse extends Response { + /** + * A list of errors that describe the reasons why the request failed. + */ errors: ErrorModel[]; } /** - * @class - * Initializes a new instance of the Query class. - * @constructor * Defines a search query. - * - * @property {string} text The query string. Use this string as the query term - * in a new search request. - * @property {string} [displayText] The display version of the query term. This - * version of the query term may contain special characters that highlight the - * search term found in the query string. The string contains the highlighting - * characters only if the query enabled hit highlighting - * @property {string} [webSearchUrl] The URL that takes the user to the Bing - * search results page for the query.Only related search results include this - * field. - * @property {string} [searchLink] - */ +*/ export interface Query { + /** + * The query string. Use this string as the query term in a new search request. + */ text: string; + /** + * The display version of the query term. This version of the query term may contain special + * characters that highlight the search term found in the query string. The string contains the + * highlighting characters only if the query enabled hit highlighting + */ readonly displayText?: string; + /** + * The URL that takes the user to the Bing search results page for the query.Only related search + * results include this field. + */ readonly webSearchUrl?: string; readonly searchLink?: string; } diff --git a/lib/services/cognitiveServicesCustomSearch/lib/operations/customInstance.js b/lib/services/cognitiveServicesCustomSearch/lib/operations/customInstance.js index 2c3edb256d..d6ea924d94 100644 --- a/lib/services/cognitiveServicesCustomSearch/lib/operations/customInstance.js +++ b/lib/services/cognitiveServicesCustomSearch/lib/operations/customInstance.js @@ -255,6 +255,9 @@ function _search(customConfig, query, options, callback) { let xBingApisSDK = 'true'; // Validate try { + if (this.client.endpoint === null || this.client.endpoint === undefined || typeof this.client.endpoint.valueOf() !== 'string') { + throw new Error('this.client.endpoint cannot be null or undefined and it must be of type string.'); + } if (acceptLanguage !== null && acceptLanguage !== undefined && typeof acceptLanguage.valueOf() !== 'string') { throw new Error('acceptLanguage must be of type string.'); } @@ -307,6 +310,7 @@ function _search(customConfig, query, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'search'; + requestUrl = requestUrl.replace('{Endpoint}', this.client.endpoint); let queryParameters = []; queryParameters.push('customConfig=' + encodeURIComponent(customConfig)); if (countryCode !== null && countryCode !== undefined) { @@ -432,7 +436,7 @@ function _search(customConfig, query, options, callback) { class CustomInstance { /** * Create a CustomInstance. - * @param {CustomSearchAPIClient} client Reference to the service client. + * @param {CustomSearchClient} client Reference to the service client. */ constructor(client) { this.client = client; diff --git a/lib/services/cognitiveServicesCustomSearch/lib/operations/index.d.ts b/lib/services/cognitiveServicesCustomSearch/lib/operations/index.d.ts index 71fdd4d5df..e4eb6f002c 100644 --- a/lib/services/cognitiveServicesCustomSearch/lib/operations/index.d.ts +++ b/lib/services/cognitiveServicesCustomSearch/lib/operations/index.d.ts @@ -16,7 +16,7 @@ import * as models from '../models'; * @class * CustomInstance * __NOTE__: An instance of this class is automatically created for an - * instance of the CustomSearchAPIClient. + * instance of the CustomSearchClient. */ export interface CustomInstance { diff --git a/lib/services/cognitiveServicesCustomSearch/package.json b/lib/services/cognitiveServicesCustomSearch/package.json index 6cd828f738..bd7a95e6ad 100644 --- a/lib/services/cognitiveServicesCustomSearch/package.json +++ b/lib/services/cognitiveServicesCustomSearch/package.json @@ -1,8 +1,8 @@ { "name": "azure-cognitiveservices-customsearch", "author": "Microsoft Corporation", - "description": "CustomSearchAPIClient Library with typescript type definitions for node", - "version": "1.3.0-preview", + "description": "CustomSearchClient Library with typescript type definitions for node", + "version": "2.0.0", "dependencies": { "ms-rest": "^2.3.3" }, @@ -11,8 +11,8 @@ "azure" ], "license": "MIT", - "main": "./lib/customSearchAPIClient.js", - "types": "./lib/customSearchAPIClient.d.ts", + "main": "./lib/customSearchClient.js", + "types": "./lib/customSearchClient.d.ts", "homepage": "https://github.com/azure/azure-sdk-for-node/tree/master/lib/services/cognitiveServicesCustomSearch", "repository": { "type": "git", diff --git a/lib/services/cognitiveServicesLocalSearch/LICENSE.txt b/lib/services/cognitiveServicesLocalSearch/LICENSE.txt new file mode 100644 index 0000000000..a70e8cf660 --- /dev/null +++ b/lib/services/cognitiveServicesLocalSearch/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2018 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/lib/services/cognitiveServicesLocalSearch/README.md b/lib/services/cognitiveServicesLocalSearch/README.md new file mode 100644 index 0000000000..4fba0a89e9 --- /dev/null +++ b/lib/services/cognitiveServicesLocalSearch/README.md @@ -0,0 +1,61 @@ +--- +uid: azure-cognitiveservices-localsearch +summary: *content + +--- +**This SDK will be deprecated next year and will be replaced by a new TypeScript-based isomorphic SDK (found at https://github.com/Azure/azure-sdk-for-js) which works on Node.js and browsers.** +## Microsoft Azure SDK for Node.js - LocalSearchClient + +This project provides a Node.js package for accessing Azure. Right now it supports: +- **Node.js version 6.x.x or higher** + +### Features + + +### How to Install + +```bash +npm install azure-cognitiveservices-localsearch +``` + +### How to use + +#### Authentication, client creation, and search local as an example. + +```javascript +const msRest = require("ms-rest"); +const LocalSearchClient = require("azure-cognitiveservices-localsearch"); +const token = ""; +const creds = new msRest.TokenCredentials(token); +const subscriptionId = ""; +const client = new LocalSearchClient(creds, subscriptionId); +const query = "testquery"; +const acceptLanguage = "testacceptLanguage"; +const pragma = "testpragma"; +const userAgent = "testuserAgent"; +const clientId = "testclientId"; +const clientIp = "testclientIp"; +const location = "westus"; +const countryCode = "testcountryCode"; +const market = "testmarket"; +const localCategories = "testlocalCategories"; +const localCircularView = "testlocalCircularView"; +const localMapView = "testlocalMapView"; +const count = "testcount"; +const first = "testfirst"; +const responseFormat = ["Json"]; +const safeSearch = "Off"; +const setLang = "testsetLang"; + +client.local.search(query, acceptLanguage, pragma, userAgent, clientId, clientIp, location, countryCode, market, localCategories, localCircularView, localMapView, count, first, responseFormat, safeSearch, setLang).then((result) => { + console.log("The result is:"); + console.log(result); +}).catch((err) => { + console.log('An error occurred:'); + console.dir(err, {depth: null, colors: true}); +}); +``` + +### Related projects + +- [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node) diff --git a/lib/services/cognitiveServicesWebSearch/lib/webSearchAPIClient.d.ts b/lib/services/cognitiveServicesLocalSearch/lib/localSearchClient.d.ts similarity index 86% rename from lib/services/cognitiveServicesWebSearch/lib/webSearchAPIClient.d.ts rename to lib/services/cognitiveServicesLocalSearch/lib/localSearchClient.d.ts index 7f5cd7a180..e33e22e8aa 100644 --- a/lib/services/cognitiveServicesWebSearch/lib/webSearchAPIClient.d.ts +++ b/lib/services/cognitiveServicesLocalSearch/lib/localSearchClient.d.ts @@ -12,10 +12,10 @@ import { ServiceClient, ServiceClientOptions, ServiceClientCredentials } from 'm import * as models from "./models"; import * as operations from "./operations"; -export default class WebSearchAPIClient extends ServiceClient { +export default class LocalSearchClient extends ServiceClient { /** * @class - * Initializes a new instance of the WebSearchAPIClient class. + * Initializes a new instance of the LocalSearchClient class. * @constructor * * @param {credentials} credentials - Subscription credentials which uniquely identify client subscription. @@ -37,7 +37,7 @@ export default class WebSearchAPIClient extends ServiceClient { credentials: ServiceClientCredentials; // Operation groups - web: operations.Web; + local: operations.Local; } -export { WebSearchAPIClient, models as WebSearchAPIModels }; +export { LocalSearchClient, models as LocalSearchModels }; diff --git a/lib/services/cognitiveServicesWebSearch/lib/webSearchAPIClient.js b/lib/services/cognitiveServicesLocalSearch/lib/localSearchClient.js similarity index 79% rename from lib/services/cognitiveServicesWebSearch/lib/webSearchAPIClient.js rename to lib/services/cognitiveServicesLocalSearch/lib/localSearchClient.js index bb119ed246..4a30d52de7 100644 --- a/lib/services/cognitiveServicesWebSearch/lib/webSearchAPIClient.js +++ b/lib/services/cognitiveServicesLocalSearch/lib/localSearchClient.js @@ -21,10 +21,10 @@ const models = require('./models'); const operations = require('./operations'); -/** Class representing a WebSearchAPIClient. */ -class WebSearchAPIClient extends ServiceClient { +/** Class representing a LocalSearchClient. */ +class LocalSearchClient extends ServiceClient { /** - * Create a WebSearchAPIClient. + * Create a LocalSearchClient. * @param {credentials} credentials - Subscription credentials which uniquely identify client subscription. * @param {string} [baseUri] - The base URI of the service. * @param {object} [options] - The parameter options @@ -44,20 +44,20 @@ class WebSearchAPIClient extends ServiceClient { this.baseUri = baseUri; if (!this.baseUri) { - this.baseUri = 'https://api.cognitive.microsoft.com/bing/v7.0'; + this.baseUri = 'https://api.cognitive.microsoft.com/localbusinesses/v7.0/search'; } this.credentials = credentials; let packageInfo = this.getPackageJsonInfo(__dirname); this.addUserAgentInfo(`${packageInfo.name}/${packageInfo.version}`); - this.web = new operations.Web(this); + this.local = new operations.Local(this); this.models = models; msRest.addSerializationMixin(this); } } -module.exports = WebSearchAPIClient; -module.exports['default'] = WebSearchAPIClient; -module.exports.WebSearchAPIClient = WebSearchAPIClient; -module.exports.WebSearchAPIModels = models; +module.exports = LocalSearchClient; +module.exports['default'] = LocalSearchClient; +module.exports.LocalSearchClient = LocalSearchClient; +module.exports.LocalSearchModels = models; diff --git a/lib/services/cognitiveServicesLocalSearch/lib/models/action.js b/lib/services/cognitiveServicesLocalSearch/lib/models/action.js new file mode 100644 index 0000000000..e4600f18aa --- /dev/null +++ b/lib/services/cognitiveServicesLocalSearch/lib/models/action.js @@ -0,0 +1,439 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Defines an action. + * + * @extends models['CreativeWork'] + */ +class Action extends models['CreativeWork'] { + /** + * Create a Action. + * @property {array} [location] + * @property {array} [result] The result produced in the action. + * @property {string} [displayName] A display name for the action. + * @property {boolean} [isTopAction] A Boolean representing whether this + * result is the top action. + * @property {string} [serviceUrl] Use this URL to get additional data to + * determine how to take the appropriate action. For example, the serviceUrl + * might return JSON along with an image URL. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of Action + * + * @returns {object} metadata of Action + * + */ + mapper() { + return { + required: false, + serializedName: 'Action', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Action', + modelProperties: { + _type: { + required: true, + serializedName: '_type', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + readLink: { + required: false, + readOnly: true, + serializedName: 'readLink', + type: { + name: 'String' + } + }, + webSearchUrl: { + required: false, + readOnly: true, + serializedName: 'webSearchUrl', + type: { + name: 'String' + } + }, + potentialAction: { + required: false, + readOnly: true, + serializedName: 'potentialAction', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ActionElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Action' + } + } + } + }, + immediateAction: { + required: false, + readOnly: true, + serializedName: 'immediateAction', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ActionElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Action' + } + } + } + }, + preferredClickthroughUrl: { + required: false, + readOnly: true, + serializedName: 'preferredClickthroughUrl', + type: { + name: 'String' + } + }, + adaptiveCard: { + required: false, + readOnly: true, + serializedName: 'adaptiveCard', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + url: { + required: false, + readOnly: true, + serializedName: 'url', + type: { + name: 'String' + } + }, + entityPresentationInfo: { + required: false, + readOnly: true, + serializedName: 'entityPresentationInfo', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'EntitiesEntityPresentationInfo', + className: 'EntitiesEntityPresentationInfo' + } + }, + thumbnailUrl: { + required: false, + readOnly: true, + serializedName: 'thumbnailUrl', + type: { + name: 'String' + } + }, + about: { + required: false, + readOnly: true, + serializedName: 'about', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ThingElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Thing' + } + } + } + }, + mentions: { + required: false, + readOnly: true, + serializedName: 'mentions', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ThingElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Thing' + } + } + } + }, + provider: { + required: false, + readOnly: true, + serializedName: 'provider', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ThingElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Thing' + } + } + } + }, + creator: { + required: false, + readOnly: true, + serializedName: 'creator', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Thing' + } + }, + text: { + required: false, + readOnly: true, + serializedName: 'text', + type: { + name: 'String' + } + }, + discussionUrl: { + required: false, + readOnly: true, + serializedName: 'discussionUrl', + type: { + name: 'String' + } + }, + commentCount: { + required: false, + readOnly: true, + serializedName: 'commentCount', + type: { + name: 'Number' + } + }, + mainEntity: { + required: false, + readOnly: true, + serializedName: 'mainEntity', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Thing' + } + }, + headLine: { + required: false, + readOnly: true, + serializedName: 'headLine', + type: { + name: 'String' + } + }, + copyrightHolder: { + required: false, + readOnly: true, + serializedName: 'copyrightHolder', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Thing' + } + }, + copyrightYear: { + required: false, + readOnly: true, + serializedName: 'copyrightYear', + type: { + name: 'Number' + } + }, + disclaimer: { + required: false, + readOnly: true, + serializedName: 'disclaimer', + type: { + name: 'String' + } + }, + isAccessibleForFree: { + required: false, + readOnly: true, + serializedName: 'isAccessibleForFree', + type: { + name: 'Boolean' + } + }, + genre: { + required: false, + readOnly: true, + serializedName: 'genre', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + isFamilyFriendly: { + required: false, + readOnly: true, + serializedName: 'isFamilyFriendly', + type: { + name: 'Boolean' + } + }, + location: { + required: false, + readOnly: true, + serializedName: 'location', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'PlaceElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Place' + } + } + } + }, + result: { + required: false, + readOnly: true, + serializedName: 'result', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ThingElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Thing' + } + } + } + }, + displayName: { + required: false, + readOnly: true, + serializedName: 'displayName', + type: { + name: 'String' + } + }, + isTopAction: { + required: false, + readOnly: true, + serializedName: 'isTopAction', + type: { + name: 'Boolean' + } + }, + serviceUrl: { + required: false, + readOnly: true, + serializedName: 'serviceUrl', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = Action; diff --git a/lib/services/cognitiveServicesLocalSearch/lib/models/answer.js b/lib/services/cognitiveServicesLocalSearch/lib/models/answer.js new file mode 100644 index 0000000000..4a784445c9 --- /dev/null +++ b/lib/services/cognitiveServicesLocalSearch/lib/models/answer.js @@ -0,0 +1,143 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Defines an answer. + * + * @extends models['Response'] + */ +class Answer extends models['Response'] { + /** + * Create a Answer. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of Answer + * + * @returns {object} metadata of Answer + * + */ + mapper() { + return { + required: false, + serializedName: 'Answer', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Answer', + modelProperties: { + _type: { + required: true, + serializedName: '_type', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + readLink: { + required: false, + readOnly: true, + serializedName: 'readLink', + type: { + name: 'String' + } + }, + webSearchUrl: { + required: false, + readOnly: true, + serializedName: 'webSearchUrl', + type: { + name: 'String' + } + }, + potentialAction: { + required: false, + readOnly: true, + serializedName: 'potentialAction', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ActionElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Action' + } + } + } + }, + immediateAction: { + required: false, + readOnly: true, + serializedName: 'immediateAction', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ActionElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Action' + } + } + } + }, + preferredClickthroughUrl: { + required: false, + readOnly: true, + serializedName: 'preferredClickthroughUrl', + type: { + name: 'String' + } + }, + adaptiveCard: { + required: false, + readOnly: true, + serializedName: 'adaptiveCard', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = Answer; diff --git a/lib/services/cognitiveServicesLocalSearch/lib/models/creativeWork.js b/lib/services/cognitiveServicesLocalSearch/lib/models/creativeWork.js new file mode 100644 index 0000000000..eb6c5c8197 --- /dev/null +++ b/lib/services/cognitiveServicesLocalSearch/lib/models/creativeWork.js @@ -0,0 +1,451 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * The most generic kind of creative work, including books, movies, + * photographs, software programs, etc. + * + * @extends models['Thing'] + */ +class CreativeWork extends models['Thing'] { + /** + * Create a CreativeWork. + * @property {string} [thumbnailUrl] The URL to a thumbnail of the item. + * @property {array} [about] For internal use only. + * @property {array} [mentions] For internal use only. + * @property {array} [provider] The source of the creative work. + * @property {object} [creator] + * @property {string} [creator.name] The name of the thing represented by + * this object. + * @property {string} [creator.url] The URL to get more information about the + * thing represented by this object. + * @property {object} [creator.entityPresentationInfo] Additional information + * about the entity such as hints that you can use to determine the entity's + * type. To determine the entity's type, use the entityScenario and + * entityTypeHint fields. + * @property {string} [creator.entityPresentationInfo.entityScenario] The + * supported scenario. Possible values include: 'DominantEntity', + * 'DisambiguationItem', 'ListItem' + * @property {array} [creator.entityPresentationInfo.entityTypeHints] A list + * of hints that indicate the entity's type. The list could contain a single + * hint such as Movie or a list of hints such as Place, LocalBusiness, + * Restaurant. Each successive hint in the array narrows the entity's type. + * @property {string} [creator.entityPresentationInfo.entityTypeDisplayHint] + * A display version of the entity hint. For example, if entityTypeHints is + * Artist, this field may be set to American Singer. + * @property {string} [creator.entityPresentationInfo.query] + * @property {array} [creator.entityPresentationInfo.entitySubTypeHints] + * @property {string} [creator.entityPresentationInfo._type] Polymorphic + * Discriminator + * @property {string} [text] Text content of this creative work + * @property {string} [discussionUrl] + * @property {number} [commentCount] + * @property {object} [mainEntity] + * @property {string} [mainEntity.name] The name of the thing represented by + * this object. + * @property {string} [mainEntity.url] The URL to get more information about + * the thing represented by this object. + * @property {object} [mainEntity.entityPresentationInfo] Additional + * information about the entity such as hints that you can use to determine + * the entity's type. To determine the entity's type, use the entityScenario + * and entityTypeHint fields. + * @property {string} [mainEntity.entityPresentationInfo.entityScenario] The + * supported scenario. Possible values include: 'DominantEntity', + * 'DisambiguationItem', 'ListItem' + * @property {array} [mainEntity.entityPresentationInfo.entityTypeHints] A + * list of hints that indicate the entity's type. The list could contain a + * single hint such as Movie or a list of hints such as Place, LocalBusiness, + * Restaurant. Each successive hint in the array narrows the entity's type. + * @property {string} + * [mainEntity.entityPresentationInfo.entityTypeDisplayHint] A display + * version of the entity hint. For example, if entityTypeHints is Artist, + * this field may be set to American Singer. + * @property {string} [mainEntity.entityPresentationInfo.query] + * @property {array} [mainEntity.entityPresentationInfo.entitySubTypeHints] + * @property {string} [mainEntity.entityPresentationInfo._type] Polymorphic + * Discriminator + * @property {string} [headLine] + * @property {object} [copyrightHolder] + * @property {string} [copyrightHolder.name] The name of the thing + * represented by this object. + * @property {string} [copyrightHolder.url] The URL to get more information + * about the thing represented by this object. + * @property {object} [copyrightHolder.entityPresentationInfo] Additional + * information about the entity such as hints that you can use to determine + * the entity's type. To determine the entity's type, use the entityScenario + * and entityTypeHint fields. + * @property {string} [copyrightHolder.entityPresentationInfo.entityScenario] + * The supported scenario. Possible values include: 'DominantEntity', + * 'DisambiguationItem', 'ListItem' + * @property {array} [copyrightHolder.entityPresentationInfo.entityTypeHints] + * A list of hints that indicate the entity's type. The list could contain a + * single hint such as Movie or a list of hints such as Place, LocalBusiness, + * Restaurant. Each successive hint in the array narrows the entity's type. + * @property {string} + * [copyrightHolder.entityPresentationInfo.entityTypeDisplayHint] A display + * version of the entity hint. For example, if entityTypeHints is Artist, + * this field may be set to American Singer. + * @property {string} [copyrightHolder.entityPresentationInfo.query] + * @property {array} + * [copyrightHolder.entityPresentationInfo.entitySubTypeHints] + * @property {string} [copyrightHolder.entityPresentationInfo._type] + * Polymorphic Discriminator + * @property {number} [copyrightYear] + * @property {string} [disclaimer] + * @property {boolean} [isAccessibleForFree] + * @property {array} [genre] + * @property {boolean} [isFamilyFriendly] + */ + constructor() { + super(); + } + + /** + * Defines the metadata of CreativeWork + * + * @returns {object} metadata of CreativeWork + * + */ + mapper() { + return { + required: false, + serializedName: 'CreativeWork', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'CreativeWork', + modelProperties: { + _type: { + required: true, + serializedName: '_type', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + readLink: { + required: false, + readOnly: true, + serializedName: 'readLink', + type: { + name: 'String' + } + }, + webSearchUrl: { + required: false, + readOnly: true, + serializedName: 'webSearchUrl', + type: { + name: 'String' + } + }, + potentialAction: { + required: false, + readOnly: true, + serializedName: 'potentialAction', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ActionElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Action' + } + } + } + }, + immediateAction: { + required: false, + readOnly: true, + serializedName: 'immediateAction', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ActionElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Action' + } + } + } + }, + preferredClickthroughUrl: { + required: false, + readOnly: true, + serializedName: 'preferredClickthroughUrl', + type: { + name: 'String' + } + }, + adaptiveCard: { + required: false, + readOnly: true, + serializedName: 'adaptiveCard', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + url: { + required: false, + readOnly: true, + serializedName: 'url', + type: { + name: 'String' + } + }, + entityPresentationInfo: { + required: false, + readOnly: true, + serializedName: 'entityPresentationInfo', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'EntitiesEntityPresentationInfo', + className: 'EntitiesEntityPresentationInfo' + } + }, + thumbnailUrl: { + required: false, + readOnly: true, + serializedName: 'thumbnailUrl', + type: { + name: 'String' + } + }, + about: { + required: false, + readOnly: true, + serializedName: 'about', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ThingElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Thing' + } + } + } + }, + mentions: { + required: false, + readOnly: true, + serializedName: 'mentions', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ThingElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Thing' + } + } + } + }, + provider: { + required: false, + readOnly: true, + serializedName: 'provider', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ThingElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Thing' + } + } + } + }, + creator: { + required: false, + readOnly: true, + serializedName: 'creator', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Thing' + } + }, + text: { + required: false, + readOnly: true, + serializedName: 'text', + type: { + name: 'String' + } + }, + discussionUrl: { + required: false, + readOnly: true, + serializedName: 'discussionUrl', + type: { + name: 'String' + } + }, + commentCount: { + required: false, + readOnly: true, + serializedName: 'commentCount', + type: { + name: 'Number' + } + }, + mainEntity: { + required: false, + readOnly: true, + serializedName: 'mainEntity', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Thing' + } + }, + headLine: { + required: false, + readOnly: true, + serializedName: 'headLine', + type: { + name: 'String' + } + }, + copyrightHolder: { + required: false, + readOnly: true, + serializedName: 'copyrightHolder', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Thing' + } + }, + copyrightYear: { + required: false, + readOnly: true, + serializedName: 'copyrightYear', + type: { + name: 'Number' + } + }, + disclaimer: { + required: false, + readOnly: true, + serializedName: 'disclaimer', + type: { + name: 'String' + } + }, + isAccessibleForFree: { + required: false, + readOnly: true, + serializedName: 'isAccessibleForFree', + type: { + name: 'Boolean' + } + }, + genre: { + required: false, + readOnly: true, + serializedName: 'genre', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + isFamilyFriendly: { + required: false, + readOnly: true, + serializedName: 'isFamilyFriendly', + type: { + name: 'Boolean' + } + } + } + } + }; + } +} + +module.exports = CreativeWork; diff --git a/lib/services/cognitiveServicesLocalSearch/lib/models/entitiesEntityPresentationInfo.js b/lib/services/cognitiveServicesLocalSearch/lib/models/entitiesEntityPresentationInfo.js new file mode 100644 index 0000000000..bbde088e45 --- /dev/null +++ b/lib/services/cognitiveServicesLocalSearch/lib/models/entitiesEntityPresentationInfo.js @@ -0,0 +1,124 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Defines additional information about an entity such as type hints. + * + */ +class EntitiesEntityPresentationInfo { + /** + * Create a EntitiesEntityPresentationInfo. + * @property {string} entityScenario The supported scenario. Possible values + * include: 'DominantEntity', 'DisambiguationItem', 'ListItem'. Default + * value: 'DominantEntity' . + * @property {array} [entityTypeHints] A list of hints that indicate the + * entity's type. The list could contain a single hint such as Movie or a + * list of hints such as Place, LocalBusiness, Restaurant. Each successive + * hint in the array narrows the entity's type. + * @property {string} [entityTypeDisplayHint] A display version of the entity + * hint. For example, if entityTypeHints is Artist, this field may be set to + * American Singer. + * @property {string} [query] + * @property {array} [entitySubTypeHints] + * @property {string} _type Polymorphic Discriminator + */ + constructor() { + } + + /** + * Defines the metadata of EntitiesEntityPresentationInfo + * + * @returns {object} metadata of EntitiesEntityPresentationInfo + * + */ + mapper() { + return { + required: false, + serializedName: 'Entities/EntityPresentationInfo', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'EntitiesEntityPresentationInfo', + className: 'EntitiesEntityPresentationInfo', + modelProperties: { + entityScenario: { + required: true, + serializedName: 'entityScenario', + defaultValue: 'DominantEntity', + type: { + name: 'String' + } + }, + entityTypeHints: { + required: false, + readOnly: true, + serializedName: 'entityTypeHints', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'EntityTypeElementType', + type: { + name: 'String' + } + } + } + }, + entityTypeDisplayHint: { + required: false, + readOnly: true, + serializedName: 'entityTypeDisplayHint', + type: { + name: 'String' + } + }, + query: { + required: false, + readOnly: true, + serializedName: 'query', + type: { + name: 'String' + } + }, + entitySubTypeHints: { + required: false, + readOnly: true, + serializedName: 'entitySubTypeHints', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + _type: { + required: true, + serializedName: '_type', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = EntitiesEntityPresentationInfo; diff --git a/lib/services/cognitiveServicesLocalSearch/lib/models/errorModel.js b/lib/services/cognitiveServicesLocalSearch/lib/models/errorModel.js new file mode 100644 index 0000000000..af2c8369ba --- /dev/null +++ b/lib/services/cognitiveServicesLocalSearch/lib/models/errorModel.js @@ -0,0 +1,121 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Defines the error that occurred. + * + */ +class ErrorModel { + /** + * Create a ErrorModel. + * @property {string} code The error code that identifies the category of + * error. Possible values include: 'None', 'ServerError', 'InvalidRequest', + * 'RateLimitExceeded', 'InvalidAuthorization', 'InsufficientAuthorization'. + * Default value: 'None' . + * @property {string} [subCode] The error code that further helps to identify + * the error. Possible values include: 'UnexpectedError', 'ResourceError', + * 'NotImplemented', 'ParameterMissing', 'ParameterInvalidValue', + * 'HttpNotAllowed', 'Blocked', 'AuthorizationMissing', + * 'AuthorizationRedundancy', 'AuthorizationDisabled', 'AuthorizationExpired' + * @property {string} message A description of the error. + * @property {string} [moreDetails] A description that provides additional + * information about the error. + * @property {string} [parameter] The parameter in the request that caused + * the error. + * @property {string} [value] The parameter's value in the request that was + * not valid. + * @property {string} _type Polymorphic Discriminator + */ + constructor() { + } + + /** + * Defines the metadata of ErrorModel + * + * @returns {object} metadata of ErrorModel + * + */ + mapper() { + return { + required: false, + serializedName: 'Error', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ErrorModel', + className: 'ErrorModel', + modelProperties: { + code: { + required: true, + serializedName: 'code', + defaultValue: 'None', + type: { + name: 'String' + } + }, + subCode: { + required: false, + readOnly: true, + serializedName: 'subCode', + type: { + name: 'String' + } + }, + message: { + required: true, + serializedName: 'message', + type: { + name: 'String' + } + }, + moreDetails: { + required: false, + readOnly: true, + serializedName: 'moreDetails', + type: { + name: 'String' + } + }, + parameter: { + required: false, + readOnly: true, + serializedName: 'parameter', + type: { + name: 'String' + } + }, + value: { + required: false, + readOnly: true, + serializedName: 'value', + type: { + name: 'String' + } + }, + _type: { + required: true, + serializedName: '_type', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ErrorModel; diff --git a/lib/services/cognitiveServicesLocalSearch/lib/models/errorResponse.js b/lib/services/cognitiveServicesLocalSearch/lib/models/errorResponse.js new file mode 100644 index 0000000000..09482bbeb9 --- /dev/null +++ b/lib/services/cognitiveServicesLocalSearch/lib/models/errorResponse.js @@ -0,0 +1,165 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * The top-level response that represents a failed request. + * + * @extends models['Response'] + */ +class ErrorResponse extends models['Response'] { + /** + * Create a ErrorResponse. + * @property {array} errors A list of errors that describe the reasons why + * the request failed. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ErrorResponse + * + * @returns {object} metadata of ErrorResponse + * + */ + mapper() { + return { + required: false, + serializedName: 'ErrorResponse', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'ErrorResponse', + modelProperties: { + _type: { + required: true, + serializedName: '_type', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + readLink: { + required: false, + readOnly: true, + serializedName: 'readLink', + type: { + name: 'String' + } + }, + webSearchUrl: { + required: false, + readOnly: true, + serializedName: 'webSearchUrl', + type: { + name: 'String' + } + }, + potentialAction: { + required: false, + readOnly: true, + serializedName: 'potentialAction', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ActionElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Action' + } + } + } + }, + immediateAction: { + required: false, + readOnly: true, + serializedName: 'immediateAction', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ActionElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Action' + } + } + } + }, + preferredClickthroughUrl: { + required: false, + readOnly: true, + serializedName: 'preferredClickthroughUrl', + type: { + name: 'String' + } + }, + adaptiveCard: { + required: false, + readOnly: true, + serializedName: 'adaptiveCard', + type: { + name: 'String' + } + }, + errors: { + required: true, + serializedName: 'errors', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ErrorModelElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ErrorModel', + className: 'ErrorModel' + } + } + } + } + } + } + }; + } +} + +module.exports = ErrorResponse; diff --git a/lib/services/cognitiveServicesLocalSearch/lib/models/geoCoordinates.js b/lib/services/cognitiveServicesLocalSearch/lib/models/geoCoordinates.js new file mode 100644 index 0000000000..ef54fcbf8d --- /dev/null +++ b/lib/services/cognitiveServicesLocalSearch/lib/models/geoCoordinates.js @@ -0,0 +1,82 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Class representing a GeoCoordinates. + */ +class GeoCoordinates { + /** + * Create a GeoCoordinates. + * @property {number} latitude + * @property {number} longitude + * @property {number} [elevation] + * @property {string} _type Polymorphic Discriminator + */ + constructor() { + } + + /** + * Defines the metadata of GeoCoordinates + * + * @returns {object} metadata of GeoCoordinates + * + */ + mapper() { + return { + required: false, + serializedName: 'GeoCoordinates', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'GeoCoordinates', + className: 'GeoCoordinates', + modelProperties: { + latitude: { + required: true, + serializedName: 'latitude', + type: { + name: 'Number' + } + }, + longitude: { + required: true, + serializedName: 'longitude', + type: { + name: 'Number' + } + }, + elevation: { + required: false, + readOnly: true, + serializedName: 'elevation', + type: { + name: 'Number' + } + }, + _type: { + required: true, + serializedName: '_type', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = GeoCoordinates; diff --git a/lib/services/cognitiveServicesLocalSearch/lib/models/identifiable.js b/lib/services/cognitiveServicesLocalSearch/lib/models/identifiable.js new file mode 100644 index 0000000000..51ceb85de4 --- /dev/null +++ b/lib/services/cognitiveServicesLocalSearch/lib/models/identifiable.js @@ -0,0 +1,70 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Defines the identity of a resource. + * + * @extends models['ResponseBase'] + */ +class Identifiable extends models['ResponseBase'] { + /** + * Create a Identifiable. + * @property {string} [id] A String identifier. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of Identifiable + * + * @returns {object} metadata of Identifiable + * + */ + mapper() { + return { + required: false, + serializedName: 'Identifiable', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Identifiable', + modelProperties: { + _type: { + required: true, + serializedName: '_type', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = Identifiable; diff --git a/lib/services/cognitiveServicesLocalSearch/lib/models/index.d.ts b/lib/services/cognitiveServicesLocalSearch/lib/models/index.d.ts new file mode 100644 index 0000000000..b94a00a728 --- /dev/null +++ b/lib/services/cognitiveServicesLocalSearch/lib/models/index.d.ts @@ -0,0 +1,392 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import * as moment from "moment"; + +/** + * Defines the query context that Bing used for the request. + */ +export interface QueryContext { + /** + * The query string as specified in the request. + */ + originalQuery: string; + /** + * The query string used by Bing to perform the query. Bing uses the altered query string if the + * original query string contained spelling mistakes. For example, if the query string is "saling + * downwind", the altered query string will be "sailing downwind". This field is included only if + * the original query string contains a spelling mistake. + */ + readonly alteredQuery?: string; + /** + * AlteredQuery that is formatted for display purpose. The query string in the + * AlterationDisplayQuery can be html-escaped and can contain hit-highlighting characters + */ + readonly alterationDisplayQuery?: string; + /** + * The query string to use to force Bing to use the original string. For example, if the query + * string is "saling downwind", the override query string will be "+saling downwind". Remember to + * encode the query string which results in "%2Bsaling+downwind". This field is included only if + * the original query string contains a spelling mistake. + */ + readonly alterationOverrideQuery?: string; + /** + * A Boolean value that indicates whether the specified query has adult intent. The value is true + * if the query has adult intent; otherwise, false. + */ + readonly adultIntent?: boolean; + /** + * A Boolean value that indicates whether Bing requires the user's location to provide accurate + * results. If you specified the user's location by using the X-MSEdge-ClientIP and + * X-Search-Location headers, you can ignore this field. For location aware queries, such as + * "today's weather" or "restaurants near me" that need the user's location to provide accurate + * results, this field is set to true. For location aware queries that include the location (for + * example, "Seattle weather"), this field is set to false. This field is also set to false for + * queries that are not location aware, such as "best sellers". + */ + readonly askUserForLocation?: boolean; + readonly isTransactional?: boolean; + /** + * Polymorphic Discriminator + */ + _type: string; +} + +/** + * Defines additional information about an entity such as type hints. +*/ +export interface EntitiesEntityPresentationInfo { + /** + * The supported scenario. Possible values include: 'DominantEntity', 'DisambiguationItem', + * 'ListItem' + */ + entityScenario: string; + /** + * A list of hints that indicate the entity's type. The list could contain a single hint such as + * Movie or a list of hints such as Place, LocalBusiness, Restaurant. Each successive hint in the + * array narrows the entity's type. + */ + readonly entityTypeHints?: string[]; + /** + * A display version of the entity hint. For example, if entityTypeHints is Artist, this field + * may be set to American Singer. + */ + readonly entityTypeDisplayHint?: string; + readonly query?: string; + readonly entitySubTypeHints?: string[]; + /** + * Polymorphic Discriminator + */ + _type: string; +} + +/** + * Response base +*/ +export interface ResponseBase { + /** + * Polymorphic Discriminator + */ + _type: string; +} + +/** + * Defines the identity of a resource. +*/ +export interface Identifiable extends ResponseBase { + /** + * A String identifier. + */ + readonly id?: string; +} + +/** + * Defines a response. All schemas that return at the root of the response must inherit from this + * object. +*/ +export interface Response extends Identifiable { + /** + * The URL that returns this resource. + */ + readonly readLink?: string; + /** + * The URL to Bing's search result for this item. + */ + readonly webSearchUrl?: string; + readonly potentialAction?: Action[]; + readonly immediateAction?: Action[]; + readonly preferredClickthroughUrl?: string; + readonly adaptiveCard?: string; +} + +/** + * Defines a thing. +*/ +export interface Thing extends Response { + /** + * The name of the thing represented by this object. + */ + readonly name?: string; + /** + * The URL to get more information about the thing represented by this object. + */ + readonly url?: string; + /** + * Additional information about the entity such as hints that you can use to determine the + * entity's type. To determine the entity's type, use the entityScenario and entityTypeHint + * fields. + */ + readonly entityPresentationInfo?: EntitiesEntityPresentationInfo; +} + +/** + * Defines an answer. +*/ +export interface Answer extends Response { +} + +/** + * Defines a search result answer. +*/ +export interface SearchResultsAnswer extends Answer { + readonly queryContext?: QueryContext; + /** + * The estimated number of webpages that are relevant to the query. Use this number along with + * the count and offset query parameters to page the results. + */ + readonly totalEstimatedMatches?: number; + readonly isFamilyFriendly?: boolean; +} + +/** + * Defines a local entity answer. +*/ +export interface Places extends SearchResultsAnswer { + /** + * A list of local entities, such as restaurants or hotels. + */ + value: Thing[]; +} + +/** + * Defines the top-level object that the response includes when the request succeeds. +*/ +export interface SearchResponse extends Response { + /** + * An object that contains the query string that Bing used for the request. This object contains + * the query string as entered by the user. It may also contain an altered query string that Bing + * used for the query if the query string contained a spelling mistake. + */ + readonly queryContext?: QueryContext; + /** + * A list of local entities such as restaurants or hotels that are relevant to the query. + */ + readonly places?: Places; + readonly lottery?: SearchResultsAnswer; + readonly searchResultsConfidenceScore?: number; +} + +export interface GeoCoordinates { + latitude: number; + longitude: number; + readonly elevation?: number; + /** + * Polymorphic Discriminator + */ + _type: string; +} + +/** + * A utility class that serves as the umbrella for a number of 'intangible' things such as + * quantities, structured values, etc. +*/ +export interface Intangible extends Thing { +} + +export interface StructuredValue extends Intangible { +} + +/** + * Defines a postal address. +*/ +export interface PostalAddress extends StructuredValue { + readonly streetAddress?: string; + /** + * The city where the street address is located. For example, Seattle. + */ + readonly addressLocality?: string; + readonly addressSubregion?: string; + /** + * The state or province code where the street address is located. This could be the two-letter + * code. For example, WA, or the full name , Washington. + */ + readonly addressRegion?: string; + /** + * The zip code or postal code where the street address is located. For example, 98052. + */ + readonly postalCode?: string; + readonly postOfficeBoxNumber?: string; + /** + * The country/region where the street address is located. This could be the two-letter ISO code. + * For example, US, or the full name, United States. + */ + readonly addressCountry?: string; + /** + * The two letter ISO code of this country. For example, US. + */ + readonly countryIso?: string; + /** + * The neighborhood where the street address is located. For example, Westlake. + */ + readonly neighborhood?: string; + /** + * Region Abbreviation. For example, WA. + */ + readonly addressRegionAbbreviation?: string; + /** + * The complete address. For example, 2100 Westlake Ave N, Bellevue, WA 98052. + */ + readonly text?: string; + readonly houseNumber?: string; + readonly streetName?: string; + readonly formattingRuleId?: string; +} + +/** + * Defines information about a local entity, such as a restaurant or hotel. +*/ +export interface Place extends Thing { + readonly geo?: GeoCoordinates; + readonly routablePoint?: GeoCoordinates; + /** + * The postal address of where the entity is located + */ + readonly address?: PostalAddress; + /** + * The entity's telephone number + */ + readonly telephone?: string; +} + +/** + * The most generic kind of creative work, including books, movies, photographs, software programs, + * etc. +*/ +export interface CreativeWork extends Thing { + /** + * The URL to a thumbnail of the item. + */ + readonly thumbnailUrl?: string; + /** + * For internal use only. + */ + readonly about?: Thing[]; + /** + * For internal use only. + */ + readonly mentions?: Thing[]; + /** + * The source of the creative work. + */ + readonly provider?: Thing[]; + readonly creator?: Thing; + /** + * Text content of this creative work + */ + readonly text?: string; + readonly discussionUrl?: string; + readonly commentCount?: number; + readonly mainEntity?: Thing; + readonly headLine?: string; + readonly copyrightHolder?: Thing; + readonly copyrightYear?: number; + readonly disclaimer?: string; + readonly isAccessibleForFree?: boolean; + readonly genre?: string[]; + readonly isFamilyFriendly?: boolean; +} + +/** + * Defines an action. +*/ +export interface Action extends CreativeWork { + readonly location?: Place[]; + /** + * The result produced in the action. + */ + readonly result?: Thing[]; + /** + * A display name for the action. + */ + readonly displayName?: string; + /** + * A Boolean representing whether this result is the top action. + */ + readonly isTopAction?: boolean; + /** + * Use this URL to get additional data to determine how to take the appropriate action. For + * example, the serviceUrl might return JSON along with an image URL. + */ + readonly serviceUrl?: string; +} + +/** + * Defines the error that occurred. +*/ +export interface ErrorModel { + /** + * The error code that identifies the category of error. Possible values include: 'None', + * 'ServerError', 'InvalidRequest', 'RateLimitExceeded', 'InvalidAuthorization', + * 'InsufficientAuthorization' + */ + code: string; + /** + * The error code that further helps to identify the error. Possible values include: + * 'UnexpectedError', 'ResourceError', 'NotImplemented', 'ParameterMissing', + * 'ParameterInvalidValue', 'HttpNotAllowed', 'Blocked', 'AuthorizationMissing', + * 'AuthorizationRedundancy', 'AuthorizationDisabled', 'AuthorizationExpired' + */ + readonly subCode?: string; + /** + * A description of the error. + */ + message: string; + /** + * A description that provides additional information about the error. + */ + readonly moreDetails?: string; + /** + * The parameter in the request that caused the error. + */ + readonly parameter?: string; + /** + * The parameter's value in the request that was not valid. + */ + readonly value?: string; + /** + * Polymorphic Discriminator + */ + _type: string; +} + +/** + * The top-level response that represents a failed request. +*/ +export interface ErrorResponse extends Response { + /** + * A list of errors that describe the reasons why the request failed. + */ + errors: ErrorModel[]; +} + +export interface SearchAction extends Action { + readonly displayText?: string; + readonly query?: string; + readonly richContent?: Answer[]; + readonly formattingRuleId?: string; +} diff --git a/lib/services/cognitiveServicesLocalSearch/lib/models/index.js b/lib/services/cognitiveServicesLocalSearch/lib/models/index.js new file mode 100644 index 0000000000..69c321cc3b --- /dev/null +++ b/lib/services/cognitiveServicesLocalSearch/lib/models/index.js @@ -0,0 +1,58 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +/* jshint latedef:false */ +/* jshint forin:false */ +/* jshint noempty:false */ + +'use strict'; + +exports.QueryContext = require('./queryContext'); +exports.EntitiesEntityPresentationInfo = require('./entitiesEntityPresentationInfo'); +exports.ResponseBase = require('./responseBase'); +exports.Identifiable = require('./identifiable'); +exports.Response = require('./response'); +exports.Thing = require('./thing'); +exports.Answer = require('./answer'); +exports.SearchResultsAnswer = require('./searchResultsAnswer'); +exports.Places = require('./places'); +exports.SearchResponse = require('./searchResponse'); +exports.GeoCoordinates = require('./geoCoordinates'); +exports.Intangible = require('./intangible'); +exports.StructuredValue = require('./structuredValue'); +exports.PostalAddress = require('./postalAddress'); +exports.Place = require('./place'); +exports.CreativeWork = require('./creativeWork'); +exports.Action = require('./action'); +exports.ErrorModel = require('./errorModel'); +exports.ErrorResponse = require('./errorResponse'); +exports.SearchAction = require('./searchAction'); +exports.discriminators = { + 'QueryContext' : exports.QueryContext, + 'Entities/EntityPresentationInfo' : exports.EntitiesEntityPresentationInfo, + 'ResponseBase.Thing' : exports.Thing, + 'ResponseBase.Places' : exports.Places, + 'ResponseBase.SearchResultsAnswer' : exports.SearchResultsAnswer, + 'ResponseBase.SearchResponse' : exports.SearchResponse, + 'GeoCoordinates' : exports.GeoCoordinates, + 'ResponseBase.PostalAddress' : exports.PostalAddress, + 'ResponseBase.Place' : exports.Place, + 'ResponseBase.Action' : exports.Action, + 'ResponseBase.Response' : exports.Response, + 'ResponseBase.Identifiable' : exports.Identifiable, + 'ResponseBase.Answer' : exports.Answer, + 'Error' : exports.ErrorModel, + 'ResponseBase.ErrorResponse' : exports.ErrorResponse, + 'ResponseBase.CreativeWork' : exports.CreativeWork, + 'ResponseBase' : exports.ResponseBase, + 'ResponseBase.Intangible' : exports.Intangible, + 'ResponseBase.SearchAction' : exports.SearchAction, + 'ResponseBase.StructuredValue' : exports.StructuredValue +}; diff --git a/lib/services/cognitiveServicesLocalSearch/lib/models/intangible.js b/lib/services/cognitiveServicesLocalSearch/lib/models/intangible.js new file mode 100644 index 0000000000..e7ad7197ac --- /dev/null +++ b/lib/services/cognitiveServicesLocalSearch/lib/models/intangible.js @@ -0,0 +1,174 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * A utility class that serves as the umbrella for a number of 'intangible' + * things such as quantities, structured values, etc. + * + * @extends models['Thing'] + */ +class Intangible extends models['Thing'] { + /** + * Create a Intangible. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of Intangible + * + * @returns {object} metadata of Intangible + * + */ + mapper() { + return { + required: false, + serializedName: 'Intangible', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Intangible', + modelProperties: { + _type: { + required: true, + serializedName: '_type', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + readLink: { + required: false, + readOnly: true, + serializedName: 'readLink', + type: { + name: 'String' + } + }, + webSearchUrl: { + required: false, + readOnly: true, + serializedName: 'webSearchUrl', + type: { + name: 'String' + } + }, + potentialAction: { + required: false, + readOnly: true, + serializedName: 'potentialAction', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ActionElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Action' + } + } + } + }, + immediateAction: { + required: false, + readOnly: true, + serializedName: 'immediateAction', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ActionElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Action' + } + } + } + }, + preferredClickthroughUrl: { + required: false, + readOnly: true, + serializedName: 'preferredClickthroughUrl', + type: { + name: 'String' + } + }, + adaptiveCard: { + required: false, + readOnly: true, + serializedName: 'adaptiveCard', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + url: { + required: false, + readOnly: true, + serializedName: 'url', + type: { + name: 'String' + } + }, + entityPresentationInfo: { + required: false, + readOnly: true, + serializedName: 'entityPresentationInfo', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'EntitiesEntityPresentationInfo', + className: 'EntitiesEntityPresentationInfo' + } + } + } + } + }; + } +} + +module.exports = Intangible; diff --git a/lib/services/cognitiveServicesLocalSearch/lib/models/place.js b/lib/services/cognitiveServicesLocalSearch/lib/models/place.js new file mode 100644 index 0000000000..13940fc854 --- /dev/null +++ b/lib/services/cognitiveServicesLocalSearch/lib/models/place.js @@ -0,0 +1,260 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Defines information about a local entity, such as a restaurant or hotel. + * + * @extends models['Thing'] + */ +class Place extends models['Thing'] { + /** + * Create a Place. + * @property {object} [geo] + * @property {number} [geo.latitude] + * @property {number} [geo.longitude] + * @property {number} [geo.elevation] + * @property {string} [geo._type] Polymorphic Discriminator + * @property {object} [routablePoint] + * @property {number} [routablePoint.latitude] + * @property {number} [routablePoint.longitude] + * @property {number} [routablePoint.elevation] + * @property {string} [routablePoint._type] Polymorphic Discriminator + * @property {object} [address] The postal address of where the entity is + * located + * @property {string} [address.streetAddress] + * @property {string} [address.addressLocality] The city where the street + * address is located. For example, Seattle. + * @property {string} [address.addressSubregion] + * @property {string} [address.addressRegion] The state or province code + * where the street address is located. This could be the two-letter code. + * For example, WA, or the full name , Washington. + * @property {string} [address.postalCode] The zip code or postal code where + * the street address is located. For example, 98052. + * @property {string} [address.postOfficeBoxNumber] + * @property {string} [address.addressCountry] The country/region where the + * street address is located. This could be the two-letter ISO code. For + * example, US, or the full name, United States. + * @property {string} [address.countryIso] The two letter ISO code of this + * country. For example, US. + * @property {string} [address.neighborhood] The neighborhood where the + * street address is located. For example, Westlake. + * @property {string} [address.addressRegionAbbreviation] Region + * Abbreviation. For example, WA. + * @property {string} [address.text] The complete address. For example, 2100 + * Westlake Ave N, Bellevue, WA 98052. + * @property {string} [address.houseNumber] + * @property {string} [address.streetName] + * @property {string} [address.formattingRuleId] + * @property {string} [telephone] The entity's telephone number + */ + constructor() { + super(); + } + + /** + * Defines the metadata of Place + * + * @returns {object} metadata of Place + * + */ + mapper() { + return { + required: false, + serializedName: 'Place', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Place', + modelProperties: { + _type: { + required: true, + serializedName: '_type', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + readLink: { + required: false, + readOnly: true, + serializedName: 'readLink', + type: { + name: 'String' + } + }, + webSearchUrl: { + required: false, + readOnly: true, + serializedName: 'webSearchUrl', + type: { + name: 'String' + } + }, + potentialAction: { + required: false, + readOnly: true, + serializedName: 'potentialAction', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ActionElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Action' + } + } + } + }, + immediateAction: { + required: false, + readOnly: true, + serializedName: 'immediateAction', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ActionElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Action' + } + } + } + }, + preferredClickthroughUrl: { + required: false, + readOnly: true, + serializedName: 'preferredClickthroughUrl', + type: { + name: 'String' + } + }, + adaptiveCard: { + required: false, + readOnly: true, + serializedName: 'adaptiveCard', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + url: { + required: false, + readOnly: true, + serializedName: 'url', + type: { + name: 'String' + } + }, + entityPresentationInfo: { + required: false, + readOnly: true, + serializedName: 'entityPresentationInfo', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'EntitiesEntityPresentationInfo', + className: 'EntitiesEntityPresentationInfo' + } + }, + geo: { + required: false, + readOnly: true, + serializedName: 'geo', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'GeoCoordinates', + className: 'GeoCoordinates' + } + }, + routablePoint: { + required: false, + readOnly: true, + serializedName: 'routablePoint', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'GeoCoordinates', + className: 'GeoCoordinates' + } + }, + address: { + required: false, + readOnly: true, + serializedName: 'address', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'PostalAddress' + } + }, + telephone: { + required: false, + readOnly: true, + serializedName: 'telephone', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = Place; diff --git a/lib/services/cognitiveServicesLocalSearch/lib/models/places.js b/lib/services/cognitiveServicesLocalSearch/lib/models/places.js new file mode 100644 index 0000000000..327befca04 --- /dev/null +++ b/lib/services/cognitiveServicesLocalSearch/lib/models/places.js @@ -0,0 +1,195 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Defines a local entity answer. + * + * @extends models['SearchResultsAnswer'] + */ +class Places extends models['SearchResultsAnswer'] { + /** + * Create a Places. + * @property {array} value A list of local entities, such as restaurants or + * hotels. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of Places + * + * @returns {object} metadata of Places + * + */ + mapper() { + return { + required: false, + serializedName: 'Places', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Places', + modelProperties: { + _type: { + required: true, + serializedName: '_type', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + readLink: { + required: false, + readOnly: true, + serializedName: 'readLink', + type: { + name: 'String' + } + }, + webSearchUrl: { + required: false, + readOnly: true, + serializedName: 'webSearchUrl', + type: { + name: 'String' + } + }, + potentialAction: { + required: false, + readOnly: true, + serializedName: 'potentialAction', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ActionElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Action' + } + } + } + }, + immediateAction: { + required: false, + readOnly: true, + serializedName: 'immediateAction', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ActionElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Action' + } + } + } + }, + preferredClickthroughUrl: { + required: false, + readOnly: true, + serializedName: 'preferredClickthroughUrl', + type: { + name: 'String' + } + }, + adaptiveCard: { + required: false, + readOnly: true, + serializedName: 'adaptiveCard', + type: { + name: 'String' + } + }, + queryContext: { + required: false, + readOnly: true, + serializedName: 'queryContext', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'QueryContext', + className: 'QueryContext' + } + }, + totalEstimatedMatches: { + required: false, + readOnly: true, + serializedName: 'totalEstimatedMatches', + type: { + name: 'Number' + } + }, + isFamilyFriendly: { + required: false, + readOnly: true, + serializedName: 'isFamilyFriendly', + type: { + name: 'Boolean' + } + }, + value: { + required: true, + serializedName: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ThingElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Thing' + } + } + } + } + } + } + }; + } +} + +module.exports = Places; diff --git a/lib/services/cognitiveServicesLocalSearch/lib/models/postalAddress.js b/lib/services/cognitiveServicesLocalSearch/lib/models/postalAddress.js new file mode 100644 index 0000000000..2dad9e3aeb --- /dev/null +++ b/lib/services/cognitiveServicesLocalSearch/lib/models/postalAddress.js @@ -0,0 +1,309 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Defines a postal address. + * + * @extends models['StructuredValue'] + */ +class PostalAddress extends models['StructuredValue'] { + /** + * Create a PostalAddress. + * @property {string} [streetAddress] + * @property {string} [addressLocality] The city where the street address is + * located. For example, Seattle. + * @property {string} [addressSubregion] + * @property {string} [addressRegion] The state or province code where the + * street address is located. This could be the two-letter code. For example, + * WA, or the full name , Washington. + * @property {string} [postalCode] The zip code or postal code where the + * street address is located. For example, 98052. + * @property {string} [postOfficeBoxNumber] + * @property {string} [addressCountry] The country/region where the street + * address is located. This could be the two-letter ISO code. For example, + * US, or the full name, United States. + * @property {string} [countryIso] The two letter ISO code of this country. + * For example, US. + * @property {string} [neighborhood] The neighborhood where the street + * address is located. For example, Westlake. + * @property {string} [addressRegionAbbreviation] Region Abbreviation. For + * example, WA. + * @property {string} [text] The complete address. For example, 2100 Westlake + * Ave N, Bellevue, WA 98052. + * @property {string} [houseNumber] + * @property {string} [streetName] + * @property {string} [formattingRuleId] + */ + constructor() { + super(); + } + + /** + * Defines the metadata of PostalAddress + * + * @returns {object} metadata of PostalAddress + * + */ + mapper() { + return { + required: false, + serializedName: 'PostalAddress', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'PostalAddress', + modelProperties: { + _type: { + required: true, + serializedName: '_type', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + readLink: { + required: false, + readOnly: true, + serializedName: 'readLink', + type: { + name: 'String' + } + }, + webSearchUrl: { + required: false, + readOnly: true, + serializedName: 'webSearchUrl', + type: { + name: 'String' + } + }, + potentialAction: { + required: false, + readOnly: true, + serializedName: 'potentialAction', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ActionElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Action' + } + } + } + }, + immediateAction: { + required: false, + readOnly: true, + serializedName: 'immediateAction', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ActionElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Action' + } + } + } + }, + preferredClickthroughUrl: { + required: false, + readOnly: true, + serializedName: 'preferredClickthroughUrl', + type: { + name: 'String' + } + }, + adaptiveCard: { + required: false, + readOnly: true, + serializedName: 'adaptiveCard', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + url: { + required: false, + readOnly: true, + serializedName: 'url', + type: { + name: 'String' + } + }, + entityPresentationInfo: { + required: false, + readOnly: true, + serializedName: 'entityPresentationInfo', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'EntitiesEntityPresentationInfo', + className: 'EntitiesEntityPresentationInfo' + } + }, + streetAddress: { + required: false, + readOnly: true, + serializedName: 'streetAddress', + type: { + name: 'String' + } + }, + addressLocality: { + required: false, + readOnly: true, + serializedName: 'addressLocality', + type: { + name: 'String' + } + }, + addressSubregion: { + required: false, + readOnly: true, + serializedName: 'addressSubregion', + type: { + name: 'String' + } + }, + addressRegion: { + required: false, + readOnly: true, + serializedName: 'addressRegion', + type: { + name: 'String' + } + }, + postalCode: { + required: false, + readOnly: true, + serializedName: 'postalCode', + type: { + name: 'String' + } + }, + postOfficeBoxNumber: { + required: false, + readOnly: true, + serializedName: 'postOfficeBoxNumber', + type: { + name: 'String' + } + }, + addressCountry: { + required: false, + readOnly: true, + serializedName: 'addressCountry', + type: { + name: 'String' + } + }, + countryIso: { + required: false, + readOnly: true, + serializedName: 'countryIso', + type: { + name: 'String' + } + }, + neighborhood: { + required: false, + readOnly: true, + serializedName: 'neighborhood', + type: { + name: 'String' + } + }, + addressRegionAbbreviation: { + required: false, + readOnly: true, + serializedName: 'addressRegionAbbreviation', + type: { + name: 'String' + } + }, + text: { + required: false, + readOnly: true, + serializedName: 'text', + type: { + name: 'String' + } + }, + houseNumber: { + required: false, + readOnly: true, + serializedName: 'houseNumber', + type: { + name: 'String' + } + }, + streetName: { + required: false, + readOnly: true, + serializedName: 'streetName', + type: { + name: 'String' + } + }, + formattingRuleId: { + required: false, + readOnly: true, + serializedName: 'formattingRuleId', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = PostalAddress; diff --git a/lib/services/cognitiveServicesLocalSearch/lib/models/queryContext.js b/lib/services/cognitiveServicesLocalSearch/lib/models/queryContext.js new file mode 100644 index 0000000000..778db58076 --- /dev/null +++ b/lib/services/cognitiveServicesLocalSearch/lib/models/queryContext.js @@ -0,0 +1,142 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Defines the query context that Bing used for the request. + * + */ +class QueryContext { + /** + * Create a QueryContext. + * @property {string} originalQuery The query string as specified in the + * request. + * @property {string} [alteredQuery] The query string used by Bing to perform + * the query. Bing uses the altered query string if the original query string + * contained spelling mistakes. For example, if the query string is "saling + * downwind", the altered query string will be "sailing downwind". This field + * is included only if the original query string contains a spelling mistake. + * @property {string} [alterationDisplayQuery] AlteredQuery that is formatted + * for display purpose. The query string in the AlterationDisplayQuery can be + * html-escaped and can contain hit-highlighting characters + * @property {string} [alterationOverrideQuery] The query string to use to + * force Bing to use the original string. For example, if the query string is + * "saling downwind", the override query string will be "+saling downwind". + * Remember to encode the query string which results in "%2Bsaling+downwind". + * This field is included only if the original query string contains a + * spelling mistake. + * @property {boolean} [adultIntent] A Boolean value that indicates whether + * the specified query has adult intent. The value is true if the query has + * adult intent; otherwise, false. + * @property {boolean} [askUserForLocation] A Boolean value that indicates + * whether Bing requires the user's location to provide accurate results. If + * you specified the user's location by using the X-MSEdge-ClientIP and + * X-Search-Location headers, you can ignore this field. For location aware + * queries, such as "today's weather" or "restaurants near me" that need the + * user's location to provide accurate results, this field is set to true. + * For location aware queries that include the location (for example, + * "Seattle weather"), this field is set to false. This field is also set to + * false for queries that are not location aware, such as "best sellers". + * @property {boolean} [isTransactional] + * @property {string} _type Polymorphic Discriminator + */ + constructor() { + } + + /** + * Defines the metadata of QueryContext + * + * @returns {object} metadata of QueryContext + * + */ + mapper() { + return { + required: false, + serializedName: 'QueryContext', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'QueryContext', + className: 'QueryContext', + modelProperties: { + originalQuery: { + required: true, + serializedName: 'originalQuery', + type: { + name: 'String' + } + }, + alteredQuery: { + required: false, + readOnly: true, + serializedName: 'alteredQuery', + type: { + name: 'String' + } + }, + alterationDisplayQuery: { + required: false, + readOnly: true, + serializedName: 'alterationDisplayQuery', + type: { + name: 'String' + } + }, + alterationOverrideQuery: { + required: false, + readOnly: true, + serializedName: 'alterationOverrideQuery', + type: { + name: 'String' + } + }, + adultIntent: { + required: false, + readOnly: true, + serializedName: 'adultIntent', + type: { + name: 'Boolean' + } + }, + askUserForLocation: { + required: false, + readOnly: true, + serializedName: 'askUserForLocation', + type: { + name: 'Boolean' + } + }, + isTransactional: { + required: false, + readOnly: true, + serializedName: 'isTransactional', + type: { + name: 'Boolean' + } + }, + _type: { + required: true, + serializedName: '_type', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = QueryContext; diff --git a/lib/services/cognitiveServicesLocalSearch/lib/models/response.js b/lib/services/cognitiveServicesLocalSearch/lib/models/response.js new file mode 100644 index 0000000000..1e78e3d0d9 --- /dev/null +++ b/lib/services/cognitiveServicesLocalSearch/lib/models/response.js @@ -0,0 +1,151 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Defines a response. All schemas that return at the root of the response must + * inherit from this object. + * + * @extends models['Identifiable'] + */ +class Response extends models['Identifiable'] { + /** + * Create a Response. + * @property {string} [readLink] The URL that returns this resource. + * @property {string} [webSearchUrl] The URL to Bing's search result for this + * item. + * @property {array} [potentialAction] + * @property {array} [immediateAction] + * @property {string} [preferredClickthroughUrl] + * @property {string} [adaptiveCard] + */ + constructor() { + super(); + } + + /** + * Defines the metadata of Response + * + * @returns {object} metadata of Response + * + */ + mapper() { + return { + required: false, + serializedName: 'Response', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Response', + modelProperties: { + _type: { + required: true, + serializedName: '_type', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + readLink: { + required: false, + readOnly: true, + serializedName: 'readLink', + type: { + name: 'String' + } + }, + webSearchUrl: { + required: false, + readOnly: true, + serializedName: 'webSearchUrl', + type: { + name: 'String' + } + }, + potentialAction: { + required: false, + readOnly: true, + serializedName: 'potentialAction', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ActionElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Action' + } + } + } + }, + immediateAction: { + required: false, + readOnly: true, + serializedName: 'immediateAction', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ActionElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Action' + } + } + } + }, + preferredClickthroughUrl: { + required: false, + readOnly: true, + serializedName: 'preferredClickthroughUrl', + type: { + name: 'String' + } + }, + adaptiveCard: { + required: false, + readOnly: true, + serializedName: 'adaptiveCard', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = Response; diff --git a/lib/services/batch/lib/models/poolUpgradeOSParameter.js b/lib/services/cognitiveServicesLocalSearch/lib/models/responseBase.js similarity index 51% rename from lib/services/batch/lib/models/poolUpgradeOSParameter.js rename to lib/services/cognitiveServicesLocalSearch/lib/models/responseBase.js index b8bd736214..902b737a95 100644 --- a/lib/services/batch/lib/models/poolUpgradeOSParameter.js +++ b/lib/services/cognitiveServicesLocalSearch/lib/models/responseBase.js @@ -11,36 +11,40 @@ 'use strict'; /** - * @summary Options for upgrading the operating system of compute nodes in a - * pool. - * + * Response base + * */ -class PoolUpgradeOSParameter { +class ResponseBase { /** - * Create a PoolUpgradeOSParameter. - * @member {string} targetOSVersion The Azure Guest OS version to be - * installed on the virtual machines in the pool. + * Create a ResponseBase. + * @property {string} _type Polymorphic Discriminator */ constructor() { } /** - * Defines the metadata of PoolUpgradeOSParameter + * Defines the metadata of ResponseBase * - * @returns {object} metadata of PoolUpgradeOSParameter + * @returns {object} metadata of ResponseBase * */ mapper() { return { required: false, - serializedName: 'PoolUpgradeOSParameter', + serializedName: 'ResponseBase', type: { name: 'Composite', - className: 'PoolUpgradeOSParameter', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'ResponseBase', modelProperties: { - targetOSVersion: { + _type: { required: true, - serializedName: 'targetOSVersion', + serializedName: '_type', + isPolymorphicDiscriminator: true, type: { name: 'String' } @@ -51,4 +55,4 @@ class PoolUpgradeOSParameter { } } -module.exports = PoolUpgradeOSParameter; +module.exports = ResponseBase; diff --git a/lib/services/cognitiveServicesLocalSearch/lib/models/searchAction.js b/lib/services/cognitiveServicesLocalSearch/lib/models/searchAction.js new file mode 100644 index 0000000000..3ea54822cf --- /dev/null +++ b/lib/services/cognitiveServicesLocalSearch/lib/models/searchAction.js @@ -0,0 +1,479 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Class representing a SearchAction. + * @extends models['Action'] + */ +class SearchAction extends models['Action'] { + /** + * Create a SearchAction. + * @property {string} [displayText] + * @property {string} [query] + * @property {array} [richContent] + * @property {string} [formattingRuleId] + */ + constructor() { + super(); + } + + /** + * Defines the metadata of SearchAction + * + * @returns {object} metadata of SearchAction + * + */ + mapper() { + return { + required: false, + serializedName: 'SearchAction', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'SearchAction', + modelProperties: { + _type: { + required: true, + serializedName: '_type', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + readLink: { + required: false, + readOnly: true, + serializedName: 'readLink', + type: { + name: 'String' + } + }, + webSearchUrl: { + required: false, + readOnly: true, + serializedName: 'webSearchUrl', + type: { + name: 'String' + } + }, + potentialAction: { + required: false, + readOnly: true, + serializedName: 'potentialAction', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ActionElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Action' + } + } + } + }, + immediateAction: { + required: false, + readOnly: true, + serializedName: 'immediateAction', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ActionElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Action' + } + } + } + }, + preferredClickthroughUrl: { + required: false, + readOnly: true, + serializedName: 'preferredClickthroughUrl', + type: { + name: 'String' + } + }, + adaptiveCard: { + required: false, + readOnly: true, + serializedName: 'adaptiveCard', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + url: { + required: false, + readOnly: true, + serializedName: 'url', + type: { + name: 'String' + } + }, + entityPresentationInfo: { + required: false, + readOnly: true, + serializedName: 'entityPresentationInfo', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'EntitiesEntityPresentationInfo', + className: 'EntitiesEntityPresentationInfo' + } + }, + thumbnailUrl: { + required: false, + readOnly: true, + serializedName: 'thumbnailUrl', + type: { + name: 'String' + } + }, + about: { + required: false, + readOnly: true, + serializedName: 'about', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ThingElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Thing' + } + } + } + }, + mentions: { + required: false, + readOnly: true, + serializedName: 'mentions', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ThingElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Thing' + } + } + } + }, + provider: { + required: false, + readOnly: true, + serializedName: 'provider', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ThingElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Thing' + } + } + } + }, + creator: { + required: false, + readOnly: true, + serializedName: 'creator', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Thing' + } + }, + text: { + required: false, + readOnly: true, + serializedName: 'text', + type: { + name: 'String' + } + }, + discussionUrl: { + required: false, + readOnly: true, + serializedName: 'discussionUrl', + type: { + name: 'String' + } + }, + commentCount: { + required: false, + readOnly: true, + serializedName: 'commentCount', + type: { + name: 'Number' + } + }, + mainEntity: { + required: false, + readOnly: true, + serializedName: 'mainEntity', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Thing' + } + }, + headLine: { + required: false, + readOnly: true, + serializedName: 'headLine', + type: { + name: 'String' + } + }, + copyrightHolder: { + required: false, + readOnly: true, + serializedName: 'copyrightHolder', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Thing' + } + }, + copyrightYear: { + required: false, + readOnly: true, + serializedName: 'copyrightYear', + type: { + name: 'Number' + } + }, + disclaimer: { + required: false, + readOnly: true, + serializedName: 'disclaimer', + type: { + name: 'String' + } + }, + isAccessibleForFree: { + required: false, + readOnly: true, + serializedName: 'isAccessibleForFree', + type: { + name: 'Boolean' + } + }, + genre: { + required: false, + readOnly: true, + serializedName: 'genre', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + isFamilyFriendly: { + required: false, + readOnly: true, + serializedName: 'isFamilyFriendly', + type: { + name: 'Boolean' + } + }, + location: { + required: false, + readOnly: true, + serializedName: 'location', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'PlaceElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Place' + } + } + } + }, + result: { + required: false, + readOnly: true, + serializedName: 'result', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ThingElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Thing' + } + } + } + }, + displayName: { + required: false, + readOnly: true, + serializedName: 'displayName', + type: { + name: 'String' + } + }, + isTopAction: { + required: false, + readOnly: true, + serializedName: 'isTopAction', + type: { + name: 'Boolean' + } + }, + serviceUrl: { + required: false, + readOnly: true, + serializedName: 'serviceUrl', + type: { + name: 'String' + } + }, + displayText: { + required: false, + readOnly: true, + serializedName: 'displayText', + type: { + name: 'String' + } + }, + query: { + required: false, + readOnly: true, + serializedName: 'query', + type: { + name: 'String' + } + }, + richContent: { + required: false, + readOnly: true, + serializedName: 'richContent', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'AnswerElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Answer' + } + } + } + }, + formattingRuleId: { + required: false, + readOnly: true, + serializedName: 'formattingRuleId', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = SearchAction; diff --git a/lib/services/cognitiveServicesLocalSearch/lib/models/searchResponse.js b/lib/services/cognitiveServicesLocalSearch/lib/models/searchResponse.js new file mode 100644 index 0000000000..5b72ef64a7 --- /dev/null +++ b/lib/services/cognitiveServicesLocalSearch/lib/models/searchResponse.js @@ -0,0 +1,275 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Defines the top-level object that the response includes when the request + * succeeds. + * + * @extends models['Response'] + */ +class SearchResponse extends models['Response'] { + /** + * Create a SearchResponse. + * @property {object} [queryContext] An object that contains the query string + * that Bing used for the request. This object contains the query string as + * entered by the user. It may also contain an altered query string that Bing + * used for the query if the query string contained a spelling mistake. + * @property {string} [queryContext.originalQuery] The query string as + * specified in the request. + * @property {string} [queryContext.alteredQuery] The query string used by + * Bing to perform the query. Bing uses the altered query string if the + * original query string contained spelling mistakes. For example, if the + * query string is "saling downwind", the altered query string will be + * "sailing downwind". This field is included only if the original query + * string contains a spelling mistake. + * @property {string} [queryContext.alterationDisplayQuery] AlteredQuery that + * is formatted for display purpose. The query string in the + * AlterationDisplayQuery can be html-escaped and can contain + * hit-highlighting characters + * @property {string} [queryContext.alterationOverrideQuery] The query string + * to use to force Bing to use the original string. For example, if the query + * string is "saling downwind", the override query string will be "+saling + * downwind". Remember to encode the query string which results in + * "%2Bsaling+downwind". This field is included only if the original query + * string contains a spelling mistake. + * @property {boolean} [queryContext.adultIntent] A Boolean value that + * indicates whether the specified query has adult intent. The value is true + * if the query has adult intent; otherwise, false. + * @property {boolean} [queryContext.askUserForLocation] A Boolean value that + * indicates whether Bing requires the user's location to provide accurate + * results. If you specified the user's location by using the + * X-MSEdge-ClientIP and X-Search-Location headers, you can ignore this + * field. For location aware queries, such as "today's weather" or + * "restaurants near me" that need the user's location to provide accurate + * results, this field is set to true. For location aware queries that + * include the location (for example, "Seattle weather"), this field is set + * to false. This field is also set to false for queries that are not + * location aware, such as "best sellers". + * @property {boolean} [queryContext.isTransactional] + * @property {string} [queryContext._type] Polymorphic Discriminator + * @property {object} [places] A list of local entities such as restaurants + * or hotels that are relevant to the query. + * @property {array} [places.value] A list of local entities, such as + * restaurants or hotels. + * @property {object} [lottery] + * @property {object} [lottery.queryContext] + * @property {string} [lottery.queryContext.originalQuery] The query string + * as specified in the request. + * @property {string} [lottery.queryContext.alteredQuery] The query string + * used by Bing to perform the query. Bing uses the altered query string if + * the original query string contained spelling mistakes. For example, if the + * query string is "saling downwind", the altered query string will be + * "sailing downwind". This field is included only if the original query + * string contains a spelling mistake. + * @property {string} [lottery.queryContext.alterationDisplayQuery] + * AlteredQuery that is formatted for display purpose. The query string in + * the AlterationDisplayQuery can be html-escaped and can contain + * hit-highlighting characters + * @property {string} [lottery.queryContext.alterationOverrideQuery] The + * query string to use to force Bing to use the original string. For example, + * if the query string is "saling downwind", the override query string will + * be "+saling downwind". Remember to encode the query string which results + * in "%2Bsaling+downwind". This field is included only if the original query + * string contains a spelling mistake. + * @property {boolean} [lottery.queryContext.adultIntent] A Boolean value + * that indicates whether the specified query has adult intent. The value is + * true if the query has adult intent; otherwise, false. + * @property {boolean} [lottery.queryContext.askUserForLocation] A Boolean + * value that indicates whether Bing requires the user's location to provide + * accurate results. If you specified the user's location by using the + * X-MSEdge-ClientIP and X-Search-Location headers, you can ignore this + * field. For location aware queries, such as "today's weather" or + * "restaurants near me" that need the user's location to provide accurate + * results, this field is set to true. For location aware queries that + * include the location (for example, "Seattle weather"), this field is set + * to false. This field is also set to false for queries that are not + * location aware, such as "best sellers". + * @property {boolean} [lottery.queryContext.isTransactional] + * @property {string} [lottery.queryContext._type] Polymorphic Discriminator + * @property {number} [lottery.totalEstimatedMatches] The estimated number of + * webpages that are relevant to the query. Use this number along with the + * count and offset query parameters to page the results. + * @property {boolean} [lottery.isFamilyFriendly] + * @property {number} [searchResultsConfidenceScore] + */ + constructor() { + super(); + } + + /** + * Defines the metadata of SearchResponse + * + * @returns {object} metadata of SearchResponse + * + */ + mapper() { + return { + required: false, + serializedName: 'SearchResponse', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'SearchResponse', + modelProperties: { + _type: { + required: true, + serializedName: '_type', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + readLink: { + required: false, + readOnly: true, + serializedName: 'readLink', + type: { + name: 'String' + } + }, + webSearchUrl: { + required: false, + readOnly: true, + serializedName: 'webSearchUrl', + type: { + name: 'String' + } + }, + potentialAction: { + required: false, + readOnly: true, + serializedName: 'potentialAction', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ActionElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Action' + } + } + } + }, + immediateAction: { + required: false, + readOnly: true, + serializedName: 'immediateAction', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ActionElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Action' + } + } + } + }, + preferredClickthroughUrl: { + required: false, + readOnly: true, + serializedName: 'preferredClickthroughUrl', + type: { + name: 'String' + } + }, + adaptiveCard: { + required: false, + readOnly: true, + serializedName: 'adaptiveCard', + type: { + name: 'String' + } + }, + queryContext: { + required: false, + readOnly: true, + serializedName: 'queryContext', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'QueryContext', + className: 'QueryContext' + } + }, + places: { + required: false, + readOnly: true, + serializedName: 'places', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Places' + } + }, + lottery: { + required: false, + readOnly: true, + serializedName: 'lottery', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'SearchResultsAnswer' + } + }, + searchResultsConfidenceScore: { + required: false, + readOnly: true, + serializedName: 'searchResultsConfidenceScore', + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = SearchResponse; diff --git a/lib/services/cognitiveServicesLocalSearch/lib/models/searchResultsAnswer.js b/lib/services/cognitiveServicesLocalSearch/lib/models/searchResultsAnswer.js new file mode 100644 index 0000000000..e25f942678 --- /dev/null +++ b/lib/services/cognitiveServicesLocalSearch/lib/models/searchResultsAnswer.js @@ -0,0 +1,211 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Defines a search result answer. + * + * @extends models['Answer'] + */ +class SearchResultsAnswer extends models['Answer'] { + /** + * Create a SearchResultsAnswer. + * @property {object} [queryContext] + * @property {string} [queryContext.originalQuery] The query string as + * specified in the request. + * @property {string} [queryContext.alteredQuery] The query string used by + * Bing to perform the query. Bing uses the altered query string if the + * original query string contained spelling mistakes. For example, if the + * query string is "saling downwind", the altered query string will be + * "sailing downwind". This field is included only if the original query + * string contains a spelling mistake. + * @property {string} [queryContext.alterationDisplayQuery] AlteredQuery that + * is formatted for display purpose. The query string in the + * AlterationDisplayQuery can be html-escaped and can contain + * hit-highlighting characters + * @property {string} [queryContext.alterationOverrideQuery] The query string + * to use to force Bing to use the original string. For example, if the query + * string is "saling downwind", the override query string will be "+saling + * downwind". Remember to encode the query string which results in + * "%2Bsaling+downwind". This field is included only if the original query + * string contains a spelling mistake. + * @property {boolean} [queryContext.adultIntent] A Boolean value that + * indicates whether the specified query has adult intent. The value is true + * if the query has adult intent; otherwise, false. + * @property {boolean} [queryContext.askUserForLocation] A Boolean value that + * indicates whether Bing requires the user's location to provide accurate + * results. If you specified the user's location by using the + * X-MSEdge-ClientIP and X-Search-Location headers, you can ignore this + * field. For location aware queries, such as "today's weather" or + * "restaurants near me" that need the user's location to provide accurate + * results, this field is set to true. For location aware queries that + * include the location (for example, "Seattle weather"), this field is set + * to false. This field is also set to false for queries that are not + * location aware, such as "best sellers". + * @property {boolean} [queryContext.isTransactional] + * @property {string} [queryContext._type] Polymorphic Discriminator + * @property {number} [totalEstimatedMatches] The estimated number of + * webpages that are relevant to the query. Use this number along with the + * count and offset query parameters to page the results. + * @property {boolean} [isFamilyFriendly] + */ + constructor() { + super(); + } + + /** + * Defines the metadata of SearchResultsAnswer + * + * @returns {object} metadata of SearchResultsAnswer + * + */ + mapper() { + return { + required: false, + serializedName: 'SearchResultsAnswer', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'SearchResultsAnswer', + modelProperties: { + _type: { + required: true, + serializedName: '_type', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + readLink: { + required: false, + readOnly: true, + serializedName: 'readLink', + type: { + name: 'String' + } + }, + webSearchUrl: { + required: false, + readOnly: true, + serializedName: 'webSearchUrl', + type: { + name: 'String' + } + }, + potentialAction: { + required: false, + readOnly: true, + serializedName: 'potentialAction', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ActionElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Action' + } + } + } + }, + immediateAction: { + required: false, + readOnly: true, + serializedName: 'immediateAction', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ActionElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Action' + } + } + } + }, + preferredClickthroughUrl: { + required: false, + readOnly: true, + serializedName: 'preferredClickthroughUrl', + type: { + name: 'String' + } + }, + adaptiveCard: { + required: false, + readOnly: true, + serializedName: 'adaptiveCard', + type: { + name: 'String' + } + }, + queryContext: { + required: false, + readOnly: true, + serializedName: 'queryContext', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'QueryContext', + className: 'QueryContext' + } + }, + totalEstimatedMatches: { + required: false, + readOnly: true, + serializedName: 'totalEstimatedMatches', + type: { + name: 'Number' + } + }, + isFamilyFriendly: { + required: false, + readOnly: true, + serializedName: 'isFamilyFriendly', + type: { + name: 'Boolean' + } + } + } + } + }; + } +} + +module.exports = SearchResultsAnswer; diff --git a/lib/services/cognitiveServicesLocalSearch/lib/models/structuredValue.js b/lib/services/cognitiveServicesLocalSearch/lib/models/structuredValue.js new file mode 100644 index 0000000000..9a4600b667 --- /dev/null +++ b/lib/services/cognitiveServicesLocalSearch/lib/models/structuredValue.js @@ -0,0 +1,172 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Class representing a StructuredValue. + * @extends models['Intangible'] + */ +class StructuredValue extends models['Intangible'] { + /** + * Create a StructuredValue. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of StructuredValue + * + * @returns {object} metadata of StructuredValue + * + */ + mapper() { + return { + required: false, + serializedName: 'StructuredValue', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'StructuredValue', + modelProperties: { + _type: { + required: true, + serializedName: '_type', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + readLink: { + required: false, + readOnly: true, + serializedName: 'readLink', + type: { + name: 'String' + } + }, + webSearchUrl: { + required: false, + readOnly: true, + serializedName: 'webSearchUrl', + type: { + name: 'String' + } + }, + potentialAction: { + required: false, + readOnly: true, + serializedName: 'potentialAction', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ActionElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Action' + } + } + } + }, + immediateAction: { + required: false, + readOnly: true, + serializedName: 'immediateAction', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ActionElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Action' + } + } + } + }, + preferredClickthroughUrl: { + required: false, + readOnly: true, + serializedName: 'preferredClickthroughUrl', + type: { + name: 'String' + } + }, + adaptiveCard: { + required: false, + readOnly: true, + serializedName: 'adaptiveCard', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + url: { + required: false, + readOnly: true, + serializedName: 'url', + type: { + name: 'String' + } + }, + entityPresentationInfo: { + required: false, + readOnly: true, + serializedName: 'entityPresentationInfo', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'EntitiesEntityPresentationInfo', + className: 'EntitiesEntityPresentationInfo' + } + } + } + } + }; + } +} + +module.exports = StructuredValue; diff --git a/lib/services/cognitiveServicesLocalSearch/lib/models/thing.js b/lib/services/cognitiveServicesLocalSearch/lib/models/thing.js new file mode 100644 index 0000000000..e6a5b4467e --- /dev/null +++ b/lib/services/cognitiveServicesLocalSearch/lib/models/thing.js @@ -0,0 +1,195 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Defines a thing. + * + * @extends models['Response'] + */ +class Thing extends models['Response'] { + /** + * Create a Thing. + * @property {string} [name] The name of the thing represented by this + * object. + * @property {string} [url] The URL to get more information about the thing + * represented by this object. + * @property {object} [entityPresentationInfo] Additional information about + * the entity such as hints that you can use to determine the entity's type. + * To determine the entity's type, use the entityScenario and entityTypeHint + * fields. + * @property {string} [entityPresentationInfo.entityScenario] The supported + * scenario. Possible values include: 'DominantEntity', 'DisambiguationItem', + * 'ListItem' + * @property {array} [entityPresentationInfo.entityTypeHints] A list of hints + * that indicate the entity's type. The list could contain a single hint such + * as Movie or a list of hints such as Place, LocalBusiness, Restaurant. Each + * successive hint in the array narrows the entity's type. + * @property {string} [entityPresentationInfo.entityTypeDisplayHint] A + * display version of the entity hint. For example, if entityTypeHints is + * Artist, this field may be set to American Singer. + * @property {string} [entityPresentationInfo.query] + * @property {array} [entityPresentationInfo.entitySubTypeHints] + * @property {string} [entityPresentationInfo._type] Polymorphic + * Discriminator + */ + constructor() { + super(); + } + + /** + * Defines the metadata of Thing + * + * @returns {object} metadata of Thing + * + */ + mapper() { + return { + required: false, + serializedName: 'Thing', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Thing', + modelProperties: { + _type: { + required: true, + serializedName: '_type', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + readLink: { + required: false, + readOnly: true, + serializedName: 'readLink', + type: { + name: 'String' + } + }, + webSearchUrl: { + required: false, + readOnly: true, + serializedName: 'webSearchUrl', + type: { + name: 'String' + } + }, + potentialAction: { + required: false, + readOnly: true, + serializedName: 'potentialAction', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ActionElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Action' + } + } + } + }, + immediateAction: { + required: false, + readOnly: true, + serializedName: 'immediateAction', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ActionElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'ResponseBase', + className: 'Action' + } + } + } + }, + preferredClickthroughUrl: { + required: false, + readOnly: true, + serializedName: 'preferredClickthroughUrl', + type: { + name: 'String' + } + }, + adaptiveCard: { + required: false, + readOnly: true, + serializedName: 'adaptiveCard', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + url: { + required: false, + readOnly: true, + serializedName: 'url', + type: { + name: 'String' + } + }, + entityPresentationInfo: { + required: false, + readOnly: true, + serializedName: 'entityPresentationInfo', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: '_type', + clientName: '_type' + }, + uberParent: 'EntitiesEntityPresentationInfo', + className: 'EntitiesEntityPresentationInfo' + } + } + } + } + }; + } +} + +module.exports = Thing; diff --git a/lib/services/cognitiveServicesLocalSearch/lib/operations/index.d.ts b/lib/services/cognitiveServicesLocalSearch/lib/operations/index.d.ts new file mode 100644 index 0000000000..3026fc65a0 --- /dev/null +++ b/lib/services/cognitiveServicesLocalSearch/lib/operations/index.d.ts @@ -0,0 +1,435 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. +*/ + +import { ServiceClientOptions, RequestOptions, ServiceCallback, HttpOperationResponse } from 'ms-rest'; +import * as models from '../models'; + + +/** + * @class + * Local + * __NOTE__: An instance of this class is automatically created for an + * instance of the LocalSearchClient. + */ +export interface Local { + + + /** + * @summary The Local Search API lets you send a search query to Bing and get + * back search results that include local businesses such as restaurants, + * hotels, retail stores, or other local businesses. The query can specify the + * name of the local business or it can ask for a list (for example, + * restaurants near me). + * + * @param {string} query The user's search term. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.acceptLanguage] A comma-delimited list of one or + * more languages to use for user interface strings. The list is in decreasing + * order of preference. For additional information, including expected format, + * see [RFC2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). This + * header and the setLang query parameter are mutually exclusive; do not + * specify both. If you set this header, you must also specify the cc query + * parameter. Bing will use the first supported language it finds from the + * list, and combine that language with the cc parameter value to determine the + * market to return results for. If the list does not include a supported + * language, Bing will find the closest language and market that supports the + * request, and may use an aggregated or default market for the results instead + * of a specified one. You should use this header and the cc query parameter + * only if you specify multiple languages; otherwise, you should use the mkt + * and setLang query parameters. A user interface string is a string that's + * used as a label in a user interface. There are very few user interface + * strings in the JSON response objects. Any links in the response objects to + * Bing.com properties will apply the specified language. + * + * @param {string} [options.pragma] By default, Bing returns cached content, if + * available. To prevent Bing from returning cached content, set the Pragma + * header to no-cache (for example, Pragma: no-cache). + * + * @param {string} [options.userAgent] The user agent originating the request. + * Bing uses the user agent to provide mobile users with an optimized + * experience. Although optional, you are strongly encouraged to always specify + * this header. The user-agent should be the same string that any commonly used + * browser would send. For information about user agents, see [RFC + * 2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). + * + * @param {string} [options.clientId] Bing uses this header to provide users + * with consistent behavior across Bing API calls. Bing often flights new + * features and improvements, and it uses the client ID as a key for assigning + * traffic on different flights. If you do not use the same client ID for a + * user across multiple requests, then Bing may assign the user to multiple + * conflicting flights. Being assigned to multiple conflicting flights can lead + * to an inconsistent user experience. For example, if the second request has a + * different flight assignment than the first, the experience may be + * unexpected. Also, Bing can use the client ID to tailor web results to that + * client ID’s search history, providing a richer experience for the user. Bing + * also uses this header to help improve result rankings by analyzing the + * activity generated by a client ID. The relevance improvements help with + * better quality of results delivered by Bing APIs and in turn enables higher + * click-through rates for the API consumer. IMPORTANT: Although optional, you + * should consider this header required. Persisting the client ID across + * multiple requests for the same end user and device combination enables 1) + * the API consumer to receive a consistent user experience, and 2) higher + * click-through rates via better quality of results from the Bing APIs. Each + * user that uses your application on the device must have a unique, Bing + * generated client ID. If you do not include this header in the request, Bing + * generates an ID and returns it in the X-MSEdge-ClientID response header. The + * only time that you should NOT include this header in a request is the first + * time the user uses your app on that device. Use the client ID for each Bing + * API request that your app makes for this user on the device. Persist the + * client ID. To persist the ID in a browser app, use a persistent HTTP cookie + * to ensure the ID is used across all sessions. Do not use a session cookie. + * For other apps such as mobile apps, use the device's persistent storage to + * persist the ID. The next time the user uses your app on that device, get the + * client ID that you persisted. Bing responses may or may not include this + * header. If the response includes this header, capture the client ID and use + * it for all subsequent Bing requests for the user on that device. If you + * include the X-MSEdge-ClientID, you must not include cookies in the request. + * + * @param {string} [options.clientIp] The IPv4 or IPv6 address of the client + * device. The IP address is used to discover the user's location. Bing uses + * the location information to determine safe search behavior. Although + * optional, you are encouraged to always specify this header and the + * X-Search-Location header. Do not obfuscate the address (for example, by + * changing the last octet to 0). Obfuscating the address results in the + * location not being anywhere near the device's actual location, which may + * result in Bing serving erroneous results. + * + * @param {string} [options.location] A semicolon-delimited list of key/value + * pairs that describe the client's geographical location. Bing uses the + * location information to determine safe search behavior and to return + * relevant local content. Specify the key/value pair as :. The + * following are the keys that you use to specify the user's location. lat + * (required): The latitude of the client's location, in degrees. The latitude + * must be greater than or equal to -90.0 and less than or equal to +90.0. + * Negative values indicate southern latitudes and positive values indicate + * northern latitudes. long (required): The longitude of the client's location, + * in degrees. The longitude must be greater than or equal to -180.0 and less + * than or equal to +180.0. Negative values indicate western longitudes and + * positive values indicate eastern longitudes. re (required): The radius, in + * meters, which specifies the horizontal accuracy of the coordinates. Pass the + * value returned by the device's location service. Typical values might be 22m + * for GPS/Wi-Fi, 380m for cell tower triangulation, and 18,000m for reverse IP + * lookup. ts (optional): The UTC UNIX timestamp of when the client was at the + * location. (The UNIX timestamp is the number of seconds since January 1, + * 1970.) head (optional): The client's relative heading or direction of + * travel. Specify the direction of travel as degrees from 0 through 360, + * counting clockwise relative to true north. Specify this key only if the sp + * key is nonzero. sp (optional): The horizontal velocity (speed), in meters + * per second, that the client device is traveling. alt (optional): The + * altitude of the client device, in meters. are (optional): The radius, in + * meters, that specifies the vertical accuracy of the coordinates. Specify + * this key only if you specify the alt key. Although many of the keys are + * optional, the more information that you provide, the more accurate the + * location results are. Although optional, you are encouraged to always + * specify the user's geographical location. Providing the location is + * especially important if the client's IP address does not accurately reflect + * the user's physical location (for example, if the client uses VPN). For + * optimal results, you should include this header and the X-MSEdge-ClientIP + * header, but at a minimum, you should include this header. + * + * @param {string} [options.countryCode] A 2-character country code of the + * country where the results come from. This API supports only the United + * States market. If you specify this query parameter, it must be set to us. If + * you set this parameter, you must also specify the Accept-Language header. + * Bing uses the first supported language it finds from the languages list, and + * combine that language with the country code that you specify to determine + * the market to return results for. If the languages list does not include a + * supported language, Bing finds the closest language and market that supports + * the request, or it may use an aggregated or default market for the results + * instead of a specified one. You should use this query parameter and the + * Accept-Language query parameter only if you specify multiple languages; + * otherwise, you should use the mkt and setLang query parameters. This + * parameter and the mkt query parameter are mutually exclusive—do not specify + * both. + * + * @param {string} [options.market] The market where the results come from. You + * are strongly encouraged to always specify the market, if known. Specifying + * the market helps Bing route the request and return an appropriate and + * optimal response. This parameter and the cc query parameter are mutually + * exclusive—do not specify both. + * + * @param {string} [options.localCategories] comma-delimited list of business + * categories to search for. Supported categories can be high-level such as + * EatDrink, Shop, SeeDo. + * + * @param {string} [options.localCircularView] Preferred location to search + * around, expressed as Latitude, longitude and radius in meters. For example + * 47.61503,-122.1719,5000. Note that circular view should only be used to + * indicate a search around a point on the map, not as an approximation for a + * view port of a map rectangle. + * + * @param {string} [options.localMapView] Preferred bounding box for results, + * specified in NW_latitude, NW_Longitude, SE_Latitude, SE_Longitude format. + * For example 47.64,-122.13,47.63,-122.12. These values are lat, long pairs + * for the Northwest corner and the Southeast corner of a rectangle. + * + * @param {string} [options.count] Preferred number of results to return. If + * not specified, then Bing returns 1-20 of the most relevant results. + * + * @param {string} [options.first] First result to return. zero-based. default + * is 0. + * + * @param {array} [options.responseFormat] The media type to use for the + * response. The following are the possible case-insensitive values: JSON, + * JSONLD. The default is JSON. If you specify JSONLD, the response body + * includes JSON-LD objects that contain the search results. + * + * @param {string} [options.safeSearch] A filter used to filter adult content. + * Off: Return webpages with adult text, images, or videos. Moderate: Return + * webpages with adult text, but not adult images or videos. Strict: Do not + * return webpages with adult text, images, or videos. The default is Moderate. + * If the request comes from a market that Bing's adult policy requires that + * safeSearch is set to Strict, Bing ignores the safeSearch value and uses + * Strict. If you use the site: query operator, there is the chance that the + * response may contain adult content regardless of what the safeSearch query + * parameter is set to. Use site: only if you are aware of the content on the + * site and your scenario supports the possibility of adult content. Possible + * values include: 'Off', 'Moderate', 'Strict' + * + * @param {string} [options.setLang] The language to use for user interface + * strings. Specify the language using the ISO 639-1 2-letter language code. + * For example, the language code for English is EN. The default is EN + * (English). Although optional, you should always specify the language. + * Typically, you set setLang to the same language specified by mkt unless the + * user wants the user interface strings displayed in a different language. + * This parameter and the Accept-Language header are mutually exclusive; do not + * specify both. A user interface string is a string that's used as a label in + * a user interface. There are few user interface strings in the JSON response + * objects. Also, any links to Bing.com properties in the response objects + * apply the specified language. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + searchWithHttpOperationResponse(query: string, options?: { acceptLanguage? : string, pragma? : string, userAgent? : string, clientId? : string, clientIp? : string, location? : string, countryCode? : string, market? : string, localCategories? : string, localCircularView? : string, localMapView? : string, count? : string, first? : string, responseFormat? : string[], safeSearch? : string, setLang? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary The Local Search API lets you send a search query to Bing and get + * back search results that include local businesses such as restaurants, + * hotels, retail stores, or other local businesses. The query can specify the + * name of the local business or it can ask for a list (for example, + * restaurants near me). + * + * @param {string} query The user's search term. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.acceptLanguage] A comma-delimited list of one or + * more languages to use for user interface strings. The list is in decreasing + * order of preference. For additional information, including expected format, + * see [RFC2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). This + * header and the setLang query parameter are mutually exclusive; do not + * specify both. If you set this header, you must also specify the cc query + * parameter. Bing will use the first supported language it finds from the + * list, and combine that language with the cc parameter value to determine the + * market to return results for. If the list does not include a supported + * language, Bing will find the closest language and market that supports the + * request, and may use an aggregated or default market for the results instead + * of a specified one. You should use this header and the cc query parameter + * only if you specify multiple languages; otherwise, you should use the mkt + * and setLang query parameters. A user interface string is a string that's + * used as a label in a user interface. There are very few user interface + * strings in the JSON response objects. Any links in the response objects to + * Bing.com properties will apply the specified language. + * + * @param {string} [options.pragma] By default, Bing returns cached content, if + * available. To prevent Bing from returning cached content, set the Pragma + * header to no-cache (for example, Pragma: no-cache). + * + * @param {string} [options.userAgent] The user agent originating the request. + * Bing uses the user agent to provide mobile users with an optimized + * experience. Although optional, you are strongly encouraged to always specify + * this header. The user-agent should be the same string that any commonly used + * browser would send. For information about user agents, see [RFC + * 2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). + * + * @param {string} [options.clientId] Bing uses this header to provide users + * with consistent behavior across Bing API calls. Bing often flights new + * features and improvements, and it uses the client ID as a key for assigning + * traffic on different flights. If you do not use the same client ID for a + * user across multiple requests, then Bing may assign the user to multiple + * conflicting flights. Being assigned to multiple conflicting flights can lead + * to an inconsistent user experience. For example, if the second request has a + * different flight assignment than the first, the experience may be + * unexpected. Also, Bing can use the client ID to tailor web results to that + * client ID’s search history, providing a richer experience for the user. Bing + * also uses this header to help improve result rankings by analyzing the + * activity generated by a client ID. The relevance improvements help with + * better quality of results delivered by Bing APIs and in turn enables higher + * click-through rates for the API consumer. IMPORTANT: Although optional, you + * should consider this header required. Persisting the client ID across + * multiple requests for the same end user and device combination enables 1) + * the API consumer to receive a consistent user experience, and 2) higher + * click-through rates via better quality of results from the Bing APIs. Each + * user that uses your application on the device must have a unique, Bing + * generated client ID. If you do not include this header in the request, Bing + * generates an ID and returns it in the X-MSEdge-ClientID response header. The + * only time that you should NOT include this header in a request is the first + * time the user uses your app on that device. Use the client ID for each Bing + * API request that your app makes for this user on the device. Persist the + * client ID. To persist the ID in a browser app, use a persistent HTTP cookie + * to ensure the ID is used across all sessions. Do not use a session cookie. + * For other apps such as mobile apps, use the device's persistent storage to + * persist the ID. The next time the user uses your app on that device, get the + * client ID that you persisted. Bing responses may or may not include this + * header. If the response includes this header, capture the client ID and use + * it for all subsequent Bing requests for the user on that device. If you + * include the X-MSEdge-ClientID, you must not include cookies in the request. + * + * @param {string} [options.clientIp] The IPv4 or IPv6 address of the client + * device. The IP address is used to discover the user's location. Bing uses + * the location information to determine safe search behavior. Although + * optional, you are encouraged to always specify this header and the + * X-Search-Location header. Do not obfuscate the address (for example, by + * changing the last octet to 0). Obfuscating the address results in the + * location not being anywhere near the device's actual location, which may + * result in Bing serving erroneous results. + * + * @param {string} [options.location] A semicolon-delimited list of key/value + * pairs that describe the client's geographical location. Bing uses the + * location information to determine safe search behavior and to return + * relevant local content. Specify the key/value pair as :. The + * following are the keys that you use to specify the user's location. lat + * (required): The latitude of the client's location, in degrees. The latitude + * must be greater than or equal to -90.0 and less than or equal to +90.0. + * Negative values indicate southern latitudes and positive values indicate + * northern latitudes. long (required): The longitude of the client's location, + * in degrees. The longitude must be greater than or equal to -180.0 and less + * than or equal to +180.0. Negative values indicate western longitudes and + * positive values indicate eastern longitudes. re (required): The radius, in + * meters, which specifies the horizontal accuracy of the coordinates. Pass the + * value returned by the device's location service. Typical values might be 22m + * for GPS/Wi-Fi, 380m for cell tower triangulation, and 18,000m for reverse IP + * lookup. ts (optional): The UTC UNIX timestamp of when the client was at the + * location. (The UNIX timestamp is the number of seconds since January 1, + * 1970.) head (optional): The client's relative heading or direction of + * travel. Specify the direction of travel as degrees from 0 through 360, + * counting clockwise relative to true north. Specify this key only if the sp + * key is nonzero. sp (optional): The horizontal velocity (speed), in meters + * per second, that the client device is traveling. alt (optional): The + * altitude of the client device, in meters. are (optional): The radius, in + * meters, that specifies the vertical accuracy of the coordinates. Specify + * this key only if you specify the alt key. Although many of the keys are + * optional, the more information that you provide, the more accurate the + * location results are. Although optional, you are encouraged to always + * specify the user's geographical location. Providing the location is + * especially important if the client's IP address does not accurately reflect + * the user's physical location (for example, if the client uses VPN). For + * optimal results, you should include this header and the X-MSEdge-ClientIP + * header, but at a minimum, you should include this header. + * + * @param {string} [options.countryCode] A 2-character country code of the + * country where the results come from. This API supports only the United + * States market. If you specify this query parameter, it must be set to us. If + * you set this parameter, you must also specify the Accept-Language header. + * Bing uses the first supported language it finds from the languages list, and + * combine that language with the country code that you specify to determine + * the market to return results for. If the languages list does not include a + * supported language, Bing finds the closest language and market that supports + * the request, or it may use an aggregated or default market for the results + * instead of a specified one. You should use this query parameter and the + * Accept-Language query parameter only if you specify multiple languages; + * otherwise, you should use the mkt and setLang query parameters. This + * parameter and the mkt query parameter are mutually exclusive—do not specify + * both. + * + * @param {string} [options.market] The market where the results come from. You + * are strongly encouraged to always specify the market, if known. Specifying + * the market helps Bing route the request and return an appropriate and + * optimal response. This parameter and the cc query parameter are mutually + * exclusive—do not specify both. + * + * @param {string} [options.localCategories] comma-delimited list of business + * categories to search for. Supported categories can be high-level such as + * EatDrink, Shop, SeeDo. + * + * @param {string} [options.localCircularView] Preferred location to search + * around, expressed as Latitude, longitude and radius in meters. For example + * 47.61503,-122.1719,5000. Note that circular view should only be used to + * indicate a search around a point on the map, not as an approximation for a + * view port of a map rectangle. + * + * @param {string} [options.localMapView] Preferred bounding box for results, + * specified in NW_latitude, NW_Longitude, SE_Latitude, SE_Longitude format. + * For example 47.64,-122.13,47.63,-122.12. These values are lat, long pairs + * for the Northwest corner and the Southeast corner of a rectangle. + * + * @param {string} [options.count] Preferred number of results to return. If + * not specified, then Bing returns 1-20 of the most relevant results. + * + * @param {string} [options.first] First result to return. zero-based. default + * is 0. + * + * @param {array} [options.responseFormat] The media type to use for the + * response. The following are the possible case-insensitive values: JSON, + * JSONLD. The default is JSON. If you specify JSONLD, the response body + * includes JSON-LD objects that contain the search results. + * + * @param {string} [options.safeSearch] A filter used to filter adult content. + * Off: Return webpages with adult text, images, or videos. Moderate: Return + * webpages with adult text, but not adult images or videos. Strict: Do not + * return webpages with adult text, images, or videos. The default is Moderate. + * If the request comes from a market that Bing's adult policy requires that + * safeSearch is set to Strict, Bing ignores the safeSearch value and uses + * Strict. If you use the site: query operator, there is the chance that the + * response may contain adult content regardless of what the safeSearch query + * parameter is set to. Use site: only if you are aware of the content on the + * site and your scenario supports the possibility of adult content. Possible + * values include: 'Off', 'Moderate', 'Strict' + * + * @param {string} [options.setLang] The language to use for user interface + * strings. Specify the language using the ISO 639-1 2-letter language code. + * For example, the language code for English is EN. The default is EN + * (English). Although optional, you should always specify the language. + * Typically, you set setLang to the same language specified by mkt unless the + * user wants the user interface strings displayed in a different language. + * This parameter and the Accept-Language header are mutually exclusive; do not + * specify both. A user interface string is a string that's used as a label in + * a user interface. There are few user interface strings in the JSON response + * objects. Also, any links to Bing.com properties in the response objects + * apply the specified language. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {SearchResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {SearchResponse} [result] - The deserialized result object if an error did not occur. + * See {@link SearchResponse} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + search(query: string, options?: { acceptLanguage? : string, pragma? : string, userAgent? : string, clientId? : string, clientIp? : string, location? : string, countryCode? : string, market? : string, localCategories? : string, localCircularView? : string, localMapView? : string, count? : string, first? : string, responseFormat? : string[], safeSearch? : string, setLang? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + search(query: string, callback: ServiceCallback): void; + search(query: string, options: { acceptLanguage? : string, pragma? : string, userAgent? : string, clientId? : string, clientIp? : string, location? : string, countryCode? : string, market? : string, localCategories? : string, localCircularView? : string, localMapView? : string, count? : string, first? : string, responseFormat? : string[], safeSearch? : string, setLang? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} diff --git a/lib/services/cognitiveServicesLocalSearch/lib/operations/index.js b/lib/services/cognitiveServicesLocalSearch/lib/operations/index.js new file mode 100644 index 0000000000..46ad369459 --- /dev/null +++ b/lib/services/cognitiveServicesLocalSearch/lib/operations/index.js @@ -0,0 +1,17 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +/* jshint latedef:false */ +/* jshint forin:false */ +/* jshint noempty:false */ + +'use strict'; + +exports.Local = require('./local'); diff --git a/lib/services/cognitiveServicesLocalSearch/lib/operations/local.js b/lib/services/cognitiveServicesLocalSearch/lib/operations/local.js new file mode 100644 index 0000000000..f4c8d2afb1 --- /dev/null +++ b/lib/services/cognitiveServicesLocalSearch/lib/operations/local.js @@ -0,0 +1,891 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const WebResource = msRest.WebResource; + +/** + * @summary The Local Search API lets you send a search query to Bing and get + * back search results that include local businesses such as restaurants, + * hotels, retail stores, or other local businesses. The query can specify the + * name of the local business or it can ask for a list (for example, + * restaurants near me). + * + * @param {string} query The user's search term. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.acceptLanguage] A comma-delimited list of one or + * more languages to use for user interface strings. The list is in decreasing + * order of preference. For additional information, including expected format, + * see [RFC2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). This + * header and the setLang query parameter are mutually exclusive; do not + * specify both. If you set this header, you must also specify the cc query + * parameter. Bing will use the first supported language it finds from the + * list, and combine that language with the cc parameter value to determine the + * market to return results for. If the list does not include a supported + * language, Bing will find the closest language and market that supports the + * request, and may use an aggregated or default market for the results instead + * of a specified one. You should use this header and the cc query parameter + * only if you specify multiple languages; otherwise, you should use the mkt + * and setLang query parameters. A user interface string is a string that's + * used as a label in a user interface. There are very few user interface + * strings in the JSON response objects. Any links in the response objects to + * Bing.com properties will apply the specified language. + * + * @param {string} [options.pragma] By default, Bing returns cached content, if + * available. To prevent Bing from returning cached content, set the Pragma + * header to no-cache (for example, Pragma: no-cache). + * + * @param {string} [options.userAgent] The user agent originating the request. + * Bing uses the user agent to provide mobile users with an optimized + * experience. Although optional, you are strongly encouraged to always specify + * this header. The user-agent should be the same string that any commonly used + * browser would send. For information about user agents, see [RFC + * 2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). + * + * @param {string} [options.clientId] Bing uses this header to provide users + * with consistent behavior across Bing API calls. Bing often flights new + * features and improvements, and it uses the client ID as a key for assigning + * traffic on different flights. If you do not use the same client ID for a + * user across multiple requests, then Bing may assign the user to multiple + * conflicting flights. Being assigned to multiple conflicting flights can lead + * to an inconsistent user experience. For example, if the second request has a + * different flight assignment than the first, the experience may be + * unexpected. Also, Bing can use the client ID to tailor web results to that + * client ID’s search history, providing a richer experience for the user. Bing + * also uses this header to help improve result rankings by analyzing the + * activity generated by a client ID. The relevance improvements help with + * better quality of results delivered by Bing APIs and in turn enables higher + * click-through rates for the API consumer. IMPORTANT: Although optional, you + * should consider this header required. Persisting the client ID across + * multiple requests for the same end user and device combination enables 1) + * the API consumer to receive a consistent user experience, and 2) higher + * click-through rates via better quality of results from the Bing APIs. Each + * user that uses your application on the device must have a unique, Bing + * generated client ID. If you do not include this header in the request, Bing + * generates an ID and returns it in the X-MSEdge-ClientID response header. The + * only time that you should NOT include this header in a request is the first + * time the user uses your app on that device. Use the client ID for each Bing + * API request that your app makes for this user on the device. Persist the + * client ID. To persist the ID in a browser app, use a persistent HTTP cookie + * to ensure the ID is used across all sessions. Do not use a session cookie. + * For other apps such as mobile apps, use the device's persistent storage to + * persist the ID. The next time the user uses your app on that device, get the + * client ID that you persisted. Bing responses may or may not include this + * header. If the response includes this header, capture the client ID and use + * it for all subsequent Bing requests for the user on that device. If you + * include the X-MSEdge-ClientID, you must not include cookies in the request. + * + * @param {string} [options.clientIp] The IPv4 or IPv6 address of the client + * device. The IP address is used to discover the user's location. Bing uses + * the location information to determine safe search behavior. Although + * optional, you are encouraged to always specify this header and the + * X-Search-Location header. Do not obfuscate the address (for example, by + * changing the last octet to 0). Obfuscating the address results in the + * location not being anywhere near the device's actual location, which may + * result in Bing serving erroneous results. + * + * @param {string} [options.location] A semicolon-delimited list of key/value + * pairs that describe the client's geographical location. Bing uses the + * location information to determine safe search behavior and to return + * relevant local content. Specify the key/value pair as :. The + * following are the keys that you use to specify the user's location. lat + * (required): The latitude of the client's location, in degrees. The latitude + * must be greater than or equal to -90.0 and less than or equal to +90.0. + * Negative values indicate southern latitudes and positive values indicate + * northern latitudes. long (required): The longitude of the client's location, + * in degrees. The longitude must be greater than or equal to -180.0 and less + * than or equal to +180.0. Negative values indicate western longitudes and + * positive values indicate eastern longitudes. re (required): The radius, in + * meters, which specifies the horizontal accuracy of the coordinates. Pass the + * value returned by the device's location service. Typical values might be 22m + * for GPS/Wi-Fi, 380m for cell tower triangulation, and 18,000m for reverse IP + * lookup. ts (optional): The UTC UNIX timestamp of when the client was at the + * location. (The UNIX timestamp is the number of seconds since January 1, + * 1970.) head (optional): The client's relative heading or direction of + * travel. Specify the direction of travel as degrees from 0 through 360, + * counting clockwise relative to true north. Specify this key only if the sp + * key is nonzero. sp (optional): The horizontal velocity (speed), in meters + * per second, that the client device is traveling. alt (optional): The + * altitude of the client device, in meters. are (optional): The radius, in + * meters, that specifies the vertical accuracy of the coordinates. Specify + * this key only if you specify the alt key. Although many of the keys are + * optional, the more information that you provide, the more accurate the + * location results are. Although optional, you are encouraged to always + * specify the user's geographical location. Providing the location is + * especially important if the client's IP address does not accurately reflect + * the user's physical location (for example, if the client uses VPN). For + * optimal results, you should include this header and the X-MSEdge-ClientIP + * header, but at a minimum, you should include this header. + * + * @param {string} [options.countryCode] A 2-character country code of the + * country where the results come from. This API supports only the United + * States market. If you specify this query parameter, it must be set to us. If + * you set this parameter, you must also specify the Accept-Language header. + * Bing uses the first supported language it finds from the languages list, and + * combine that language with the country code that you specify to determine + * the market to return results for. If the languages list does not include a + * supported language, Bing finds the closest language and market that supports + * the request, or it may use an aggregated or default market for the results + * instead of a specified one. You should use this query parameter and the + * Accept-Language query parameter only if you specify multiple languages; + * otherwise, you should use the mkt and setLang query parameters. This + * parameter and the mkt query parameter are mutually exclusive—do not specify + * both. + * + * @param {string} [options.market] The market where the results come from. You + * are strongly encouraged to always specify the market, if known. Specifying + * the market helps Bing route the request and return an appropriate and + * optimal response. This parameter and the cc query parameter are mutually + * exclusive—do not specify both. + * + * @param {string} [options.localCategories] comma-delimited list of business + * categories to search for. Supported categories can be high-level such as + * EatDrink, Shop, SeeDo. + * + * @param {string} [options.localCircularView] Preferred location to search + * around, expressed as Latitude, longitude and radius in meters. For example + * 47.61503,-122.1719,5000. Note that circular view should only be used to + * indicate a search around a point on the map, not as an approximation for a + * view port of a map rectangle. + * + * @param {string} [options.localMapView] Preferred bounding box for results, + * specified in NW_latitude, NW_Longitude, SE_Latitude, SE_Longitude format. + * For example 47.64,-122.13,47.63,-122.12. These values are lat, long pairs + * for the Northwest corner and the Southeast corner of a rectangle. + * + * @param {string} [options.count] Preferred number of results to return. If + * not specified, then Bing returns 1-20 of the most relevant results. + * + * @param {string} [options.first] First result to return. zero-based. default + * is 0. + * + * @param {array} [options.responseFormat] The media type to use for the + * response. The following are the possible case-insensitive values: JSON, + * JSONLD. The default is JSON. If you specify JSONLD, the response body + * includes JSON-LD objects that contain the search results. + * + * @param {string} [options.safeSearch] A filter used to filter adult content. + * Off: Return webpages with adult text, images, or videos. Moderate: Return + * webpages with adult text, but not adult images or videos. Strict: Do not + * return webpages with adult text, images, or videos. The default is Moderate. + * If the request comes from a market that Bing's adult policy requires that + * safeSearch is set to Strict, Bing ignores the safeSearch value and uses + * Strict. If you use the site: query operator, there is the chance that the + * response may contain adult content regardless of what the safeSearch query + * parameter is set to. Use site: only if you are aware of the content on the + * site and your scenario supports the possibility of adult content. Possible + * values include: 'Off', 'Moderate', 'Strict' + * + * @param {string} [options.setLang] The language to use for user interface + * strings. Specify the language using the ISO 639-1 2-letter language code. + * For example, the language code for English is EN. The default is EN + * (English). Although optional, you should always specify the language. + * Typically, you set setLang to the same language specified by mkt unless the + * user wants the user interface strings displayed in a different language. + * This parameter and the Accept-Language header are mutually exclusive; do not + * specify both. A user interface string is a string that's used as a label in + * a user interface. There are few user interface strings in the JSON response + * objects. Also, any links to Bing.com properties in the response objects + * apply the specified language. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SearchResponse} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _search(query, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let acceptLanguage = (options && options.acceptLanguage !== undefined) ? options.acceptLanguage : undefined; + let pragma = (options && options.pragma !== undefined) ? options.pragma : undefined; + let userAgent = (options && options.userAgent !== undefined) ? options.userAgent : undefined; + let clientId = (options && options.clientId !== undefined) ? options.clientId : undefined; + let clientIp = (options && options.clientIp !== undefined) ? options.clientIp : undefined; + let location = (options && options.location !== undefined) ? options.location : undefined; + let countryCode = (options && options.countryCode !== undefined) ? options.countryCode : undefined; + let market = (options && options.market !== undefined) ? options.market : 'en-us'; + let localCategories = (options && options.localCategories !== undefined) ? options.localCategories : undefined; + let localCircularView = (options && options.localCircularView !== undefined) ? options.localCircularView : undefined; + let localMapView = (options && options.localMapView !== undefined) ? options.localMapView : undefined; + let count = (options && options.count !== undefined) ? options.count : undefined; + let first = (options && options.first !== undefined) ? options.first : undefined; + let responseFormat = (options && options.responseFormat !== undefined) ? options.responseFormat : undefined; + let safeSearch = (options && options.safeSearch !== undefined) ? options.safeSearch : undefined; + let setLang = (options && options.setLang !== undefined) ? options.setLang : undefined; + let xBingApisSDK = 'true'; + // Validate + try { + if (acceptLanguage !== null && acceptLanguage !== undefined && typeof acceptLanguage.valueOf() !== 'string') { + throw new Error('acceptLanguage must be of type string.'); + } + if (pragma !== null && pragma !== undefined && typeof pragma.valueOf() !== 'string') { + throw new Error('pragma must be of type string.'); + } + if (userAgent !== null && userAgent !== undefined && typeof userAgent.valueOf() !== 'string') { + throw new Error('userAgent must be of type string.'); + } + if (clientId !== null && clientId !== undefined && typeof clientId.valueOf() !== 'string') { + throw new Error('clientId must be of type string.'); + } + if (clientIp !== null && clientIp !== undefined && typeof clientIp.valueOf() !== 'string') { + throw new Error('clientIp must be of type string.'); + } + if (location !== null && location !== undefined && typeof location.valueOf() !== 'string') { + throw new Error('location must be of type string.'); + } + if (countryCode !== null && countryCode !== undefined && typeof countryCode.valueOf() !== 'string') { + throw new Error('countryCode must be of type string.'); + } + if (market !== null && market !== undefined && typeof market.valueOf() !== 'string') { + throw new Error('market must be of type string.'); + } + if (query === null || query === undefined || typeof query.valueOf() !== 'string') { + throw new Error('query cannot be null or undefined and it must be of type string.'); + } + if (localCategories !== null && localCategories !== undefined && typeof localCategories.valueOf() !== 'string') { + throw new Error('localCategories must be of type string.'); + } + if (localCircularView !== null && localCircularView !== undefined && typeof localCircularView.valueOf() !== 'string') { + throw new Error('localCircularView must be of type string.'); + } + if (localMapView !== null && localMapView !== undefined && typeof localMapView.valueOf() !== 'string') { + throw new Error('localMapView must be of type string.'); + } + if (count !== null && count !== undefined && typeof count.valueOf() !== 'string') { + throw new Error('count must be of type string.'); + } + if (first !== null && first !== undefined && typeof first.valueOf() !== 'string') { + throw new Error('first must be of type string.'); + } + if (Array.isArray(responseFormat)) { + for (let i = 0; i < responseFormat.length; i++) { + if (responseFormat[i] !== null && responseFormat[i] !== undefined && typeof responseFormat[i].valueOf() !== 'string') { + throw new Error('responseFormat[i] must be of type string.'); + } + } + } + if (safeSearch !== null && safeSearch !== undefined && typeof safeSearch.valueOf() !== 'string') { + throw new Error('safeSearch must be of type string.'); + } + if (setLang !== null && setLang !== undefined && typeof setLang.valueOf() !== 'string') { + throw new Error('setLang must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'localbusinesses/v7.0/search'; + let queryParameters = []; + if (countryCode !== null && countryCode !== undefined) { + queryParameters.push('cc=' + encodeURIComponent(countryCode)); + } + if (market !== null && market !== undefined) { + queryParameters.push('mkt=' + encodeURIComponent(market)); + } + queryParameters.push('q=' + encodeURIComponent(query)); + if (localCategories !== null && localCategories !== undefined) { + queryParameters.push('localcategories=' + encodeURIComponent(localCategories)); + } + if (localCircularView !== null && localCircularView !== undefined) { + queryParameters.push('localcircularview=' + encodeURIComponent(localCircularView)); + } + if (localMapView !== null && localMapView !== undefined) { + queryParameters.push('localmapview=' + encodeURIComponent(localMapView)); + } + if (count !== null && count !== undefined) { + queryParameters.push('count=' + encodeURIComponent(count)); + } + if (first !== null && first !== undefined) { + queryParameters.push('first=' + encodeURIComponent(first)); + } + if (responseFormat !== null && responseFormat !== undefined) { + queryParameters.push('ResponseFormat=' + encodeURIComponent(responseFormat.join(','))); + } + if (safeSearch !== null && safeSearch !== undefined) { + queryParameters.push('SafeSearch=' + encodeURIComponent(safeSearch)); + } + if (setLang !== null && setLang !== undefined) { + queryParameters.push('SetLang=' + encodeURIComponent(setLang)); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (xBingApisSDK !== undefined && xBingApisSDK !== null) { + httpRequest.headers['X-BingApis-SDK'] = xBingApisSDK; + } + if (acceptLanguage !== undefined && acceptLanguage !== null) { + httpRequest.headers['Accept-Language'] = acceptLanguage; + } + if (pragma !== undefined && pragma !== null) { + httpRequest.headers['Pragma'] = pragma; + } + if (userAgent !== undefined && userAgent !== null) { + httpRequest.headers['User-Agent'] = userAgent; + } + if (clientId !== undefined && clientId !== null) { + httpRequest.headers['X-MSEdge-ClientID'] = clientId; + } + if (clientIp !== undefined && clientIp !== null) { + httpRequest.headers['X-MSEdge-ClientIP'] = clientIp; + } + if (location !== undefined && location !== null) { + httpRequest.headers['X-Search-Location'] = location; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorResponse']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SearchResponse']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a Local. */ +class Local { + /** + * Create a Local. + * @param {LocalSearchClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._search = _search; + } + + /** + * @summary The Local Search API lets you send a search query to Bing and get + * back search results that include local businesses such as restaurants, + * hotels, retail stores, or other local businesses. The query can specify the + * name of the local business or it can ask for a list (for example, + * restaurants near me). + * + * @param {string} query The user's search term. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.acceptLanguage] A comma-delimited list of one or + * more languages to use for user interface strings. The list is in decreasing + * order of preference. For additional information, including expected format, + * see [RFC2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). This + * header and the setLang query parameter are mutually exclusive; do not + * specify both. If you set this header, you must also specify the cc query + * parameter. Bing will use the first supported language it finds from the + * list, and combine that language with the cc parameter value to determine the + * market to return results for. If the list does not include a supported + * language, Bing will find the closest language and market that supports the + * request, and may use an aggregated or default market for the results instead + * of a specified one. You should use this header and the cc query parameter + * only if you specify multiple languages; otherwise, you should use the mkt + * and setLang query parameters. A user interface string is a string that's + * used as a label in a user interface. There are very few user interface + * strings in the JSON response objects. Any links in the response objects to + * Bing.com properties will apply the specified language. + * + * @param {string} [options.pragma] By default, Bing returns cached content, if + * available. To prevent Bing from returning cached content, set the Pragma + * header to no-cache (for example, Pragma: no-cache). + * + * @param {string} [options.userAgent] The user agent originating the request. + * Bing uses the user agent to provide mobile users with an optimized + * experience. Although optional, you are strongly encouraged to always specify + * this header. The user-agent should be the same string that any commonly used + * browser would send. For information about user agents, see [RFC + * 2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). + * + * @param {string} [options.clientId] Bing uses this header to provide users + * with consistent behavior across Bing API calls. Bing often flights new + * features and improvements, and it uses the client ID as a key for assigning + * traffic on different flights. If you do not use the same client ID for a + * user across multiple requests, then Bing may assign the user to multiple + * conflicting flights. Being assigned to multiple conflicting flights can lead + * to an inconsistent user experience. For example, if the second request has a + * different flight assignment than the first, the experience may be + * unexpected. Also, Bing can use the client ID to tailor web results to that + * client ID’s search history, providing a richer experience for the user. Bing + * also uses this header to help improve result rankings by analyzing the + * activity generated by a client ID. The relevance improvements help with + * better quality of results delivered by Bing APIs and in turn enables higher + * click-through rates for the API consumer. IMPORTANT: Although optional, you + * should consider this header required. Persisting the client ID across + * multiple requests for the same end user and device combination enables 1) + * the API consumer to receive a consistent user experience, and 2) higher + * click-through rates via better quality of results from the Bing APIs. Each + * user that uses your application on the device must have a unique, Bing + * generated client ID. If you do not include this header in the request, Bing + * generates an ID and returns it in the X-MSEdge-ClientID response header. The + * only time that you should NOT include this header in a request is the first + * time the user uses your app on that device. Use the client ID for each Bing + * API request that your app makes for this user on the device. Persist the + * client ID. To persist the ID in a browser app, use a persistent HTTP cookie + * to ensure the ID is used across all sessions. Do not use a session cookie. + * For other apps such as mobile apps, use the device's persistent storage to + * persist the ID. The next time the user uses your app on that device, get the + * client ID that you persisted. Bing responses may or may not include this + * header. If the response includes this header, capture the client ID and use + * it for all subsequent Bing requests for the user on that device. If you + * include the X-MSEdge-ClientID, you must not include cookies in the request. + * + * @param {string} [options.clientIp] The IPv4 or IPv6 address of the client + * device. The IP address is used to discover the user's location. Bing uses + * the location information to determine safe search behavior. Although + * optional, you are encouraged to always specify this header and the + * X-Search-Location header. Do not obfuscate the address (for example, by + * changing the last octet to 0). Obfuscating the address results in the + * location not being anywhere near the device's actual location, which may + * result in Bing serving erroneous results. + * + * @param {string} [options.location] A semicolon-delimited list of key/value + * pairs that describe the client's geographical location. Bing uses the + * location information to determine safe search behavior and to return + * relevant local content. Specify the key/value pair as :. The + * following are the keys that you use to specify the user's location. lat + * (required): The latitude of the client's location, in degrees. The latitude + * must be greater than or equal to -90.0 and less than or equal to +90.0. + * Negative values indicate southern latitudes and positive values indicate + * northern latitudes. long (required): The longitude of the client's location, + * in degrees. The longitude must be greater than or equal to -180.0 and less + * than or equal to +180.0. Negative values indicate western longitudes and + * positive values indicate eastern longitudes. re (required): The radius, in + * meters, which specifies the horizontal accuracy of the coordinates. Pass the + * value returned by the device's location service. Typical values might be 22m + * for GPS/Wi-Fi, 380m for cell tower triangulation, and 18,000m for reverse IP + * lookup. ts (optional): The UTC UNIX timestamp of when the client was at the + * location. (The UNIX timestamp is the number of seconds since January 1, + * 1970.) head (optional): The client's relative heading or direction of + * travel. Specify the direction of travel as degrees from 0 through 360, + * counting clockwise relative to true north. Specify this key only if the sp + * key is nonzero. sp (optional): The horizontal velocity (speed), in meters + * per second, that the client device is traveling. alt (optional): The + * altitude of the client device, in meters. are (optional): The radius, in + * meters, that specifies the vertical accuracy of the coordinates. Specify + * this key only if you specify the alt key. Although many of the keys are + * optional, the more information that you provide, the more accurate the + * location results are. Although optional, you are encouraged to always + * specify the user's geographical location. Providing the location is + * especially important if the client's IP address does not accurately reflect + * the user's physical location (for example, if the client uses VPN). For + * optimal results, you should include this header and the X-MSEdge-ClientIP + * header, but at a minimum, you should include this header. + * + * @param {string} [options.countryCode] A 2-character country code of the + * country where the results come from. This API supports only the United + * States market. If you specify this query parameter, it must be set to us. If + * you set this parameter, you must also specify the Accept-Language header. + * Bing uses the first supported language it finds from the languages list, and + * combine that language with the country code that you specify to determine + * the market to return results for. If the languages list does not include a + * supported language, Bing finds the closest language and market that supports + * the request, or it may use an aggregated or default market for the results + * instead of a specified one. You should use this query parameter and the + * Accept-Language query parameter only if you specify multiple languages; + * otherwise, you should use the mkt and setLang query parameters. This + * parameter and the mkt query parameter are mutually exclusive—do not specify + * both. + * + * @param {string} [options.market] The market where the results come from. You + * are strongly encouraged to always specify the market, if known. Specifying + * the market helps Bing route the request and return an appropriate and + * optimal response. This parameter and the cc query parameter are mutually + * exclusive—do not specify both. + * + * @param {string} [options.localCategories] comma-delimited list of business + * categories to search for. Supported categories can be high-level such as + * EatDrink, Shop, SeeDo. + * + * @param {string} [options.localCircularView] Preferred location to search + * around, expressed as Latitude, longitude and radius in meters. For example + * 47.61503,-122.1719,5000. Note that circular view should only be used to + * indicate a search around a point on the map, not as an approximation for a + * view port of a map rectangle. + * + * @param {string} [options.localMapView] Preferred bounding box for results, + * specified in NW_latitude, NW_Longitude, SE_Latitude, SE_Longitude format. + * For example 47.64,-122.13,47.63,-122.12. These values are lat, long pairs + * for the Northwest corner and the Southeast corner of a rectangle. + * + * @param {string} [options.count] Preferred number of results to return. If + * not specified, then Bing returns 1-20 of the most relevant results. + * + * @param {string} [options.first] First result to return. zero-based. default + * is 0. + * + * @param {array} [options.responseFormat] The media type to use for the + * response. The following are the possible case-insensitive values: JSON, + * JSONLD. The default is JSON. If you specify JSONLD, the response body + * includes JSON-LD objects that contain the search results. + * + * @param {string} [options.safeSearch] A filter used to filter adult content. + * Off: Return webpages with adult text, images, or videos. Moderate: Return + * webpages with adult text, but not adult images or videos. Strict: Do not + * return webpages with adult text, images, or videos. The default is Moderate. + * If the request comes from a market that Bing's adult policy requires that + * safeSearch is set to Strict, Bing ignores the safeSearch value and uses + * Strict. If you use the site: query operator, there is the chance that the + * response may contain adult content regardless of what the safeSearch query + * parameter is set to. Use site: only if you are aware of the content on the + * site and your scenario supports the possibility of adult content. Possible + * values include: 'Off', 'Moderate', 'Strict' + * + * @param {string} [options.setLang] The language to use for user interface + * strings. Specify the language using the ISO 639-1 2-letter language code. + * For example, the language code for English is EN. The default is EN + * (English). Although optional, you should always specify the language. + * Typically, you set setLang to the same language specified by mkt unless the + * user wants the user interface strings displayed in a different language. + * This parameter and the Accept-Language header are mutually exclusive; do not + * specify both. A user interface string is a string that's used as a label in + * a user interface. There are few user interface strings in the JSON response + * objects. Also, any links to Bing.com properties in the response objects + * apply the specified language. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + searchWithHttpOperationResponse(query, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._search(query, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary The Local Search API lets you send a search query to Bing and get + * back search results that include local businesses such as restaurants, + * hotels, retail stores, or other local businesses. The query can specify the + * name of the local business or it can ask for a list (for example, + * restaurants near me). + * + * @param {string} query The user's search term. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.acceptLanguage] A comma-delimited list of one or + * more languages to use for user interface strings. The list is in decreasing + * order of preference. For additional information, including expected format, + * see [RFC2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). This + * header and the setLang query parameter are mutually exclusive; do not + * specify both. If you set this header, you must also specify the cc query + * parameter. Bing will use the first supported language it finds from the + * list, and combine that language with the cc parameter value to determine the + * market to return results for. If the list does not include a supported + * language, Bing will find the closest language and market that supports the + * request, and may use an aggregated or default market for the results instead + * of a specified one. You should use this header and the cc query parameter + * only if you specify multiple languages; otherwise, you should use the mkt + * and setLang query parameters. A user interface string is a string that's + * used as a label in a user interface. There are very few user interface + * strings in the JSON response objects. Any links in the response objects to + * Bing.com properties will apply the specified language. + * + * @param {string} [options.pragma] By default, Bing returns cached content, if + * available. To prevent Bing from returning cached content, set the Pragma + * header to no-cache (for example, Pragma: no-cache). + * + * @param {string} [options.userAgent] The user agent originating the request. + * Bing uses the user agent to provide mobile users with an optimized + * experience. Although optional, you are strongly encouraged to always specify + * this header. The user-agent should be the same string that any commonly used + * browser would send. For information about user agents, see [RFC + * 2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). + * + * @param {string} [options.clientId] Bing uses this header to provide users + * with consistent behavior across Bing API calls. Bing often flights new + * features and improvements, and it uses the client ID as a key for assigning + * traffic on different flights. If you do not use the same client ID for a + * user across multiple requests, then Bing may assign the user to multiple + * conflicting flights. Being assigned to multiple conflicting flights can lead + * to an inconsistent user experience. For example, if the second request has a + * different flight assignment than the first, the experience may be + * unexpected. Also, Bing can use the client ID to tailor web results to that + * client ID’s search history, providing a richer experience for the user. Bing + * also uses this header to help improve result rankings by analyzing the + * activity generated by a client ID. The relevance improvements help with + * better quality of results delivered by Bing APIs and in turn enables higher + * click-through rates for the API consumer. IMPORTANT: Although optional, you + * should consider this header required. Persisting the client ID across + * multiple requests for the same end user and device combination enables 1) + * the API consumer to receive a consistent user experience, and 2) higher + * click-through rates via better quality of results from the Bing APIs. Each + * user that uses your application on the device must have a unique, Bing + * generated client ID. If you do not include this header in the request, Bing + * generates an ID and returns it in the X-MSEdge-ClientID response header. The + * only time that you should NOT include this header in a request is the first + * time the user uses your app on that device. Use the client ID for each Bing + * API request that your app makes for this user on the device. Persist the + * client ID. To persist the ID in a browser app, use a persistent HTTP cookie + * to ensure the ID is used across all sessions. Do not use a session cookie. + * For other apps such as mobile apps, use the device's persistent storage to + * persist the ID. The next time the user uses your app on that device, get the + * client ID that you persisted. Bing responses may or may not include this + * header. If the response includes this header, capture the client ID and use + * it for all subsequent Bing requests for the user on that device. If you + * include the X-MSEdge-ClientID, you must not include cookies in the request. + * + * @param {string} [options.clientIp] The IPv4 or IPv6 address of the client + * device. The IP address is used to discover the user's location. Bing uses + * the location information to determine safe search behavior. Although + * optional, you are encouraged to always specify this header and the + * X-Search-Location header. Do not obfuscate the address (for example, by + * changing the last octet to 0). Obfuscating the address results in the + * location not being anywhere near the device's actual location, which may + * result in Bing serving erroneous results. + * + * @param {string} [options.location] A semicolon-delimited list of key/value + * pairs that describe the client's geographical location. Bing uses the + * location information to determine safe search behavior and to return + * relevant local content. Specify the key/value pair as :. The + * following are the keys that you use to specify the user's location. lat + * (required): The latitude of the client's location, in degrees. The latitude + * must be greater than or equal to -90.0 and less than or equal to +90.0. + * Negative values indicate southern latitudes and positive values indicate + * northern latitudes. long (required): The longitude of the client's location, + * in degrees. The longitude must be greater than or equal to -180.0 and less + * than or equal to +180.0. Negative values indicate western longitudes and + * positive values indicate eastern longitudes. re (required): The radius, in + * meters, which specifies the horizontal accuracy of the coordinates. Pass the + * value returned by the device's location service. Typical values might be 22m + * for GPS/Wi-Fi, 380m for cell tower triangulation, and 18,000m for reverse IP + * lookup. ts (optional): The UTC UNIX timestamp of when the client was at the + * location. (The UNIX timestamp is the number of seconds since January 1, + * 1970.) head (optional): The client's relative heading or direction of + * travel. Specify the direction of travel as degrees from 0 through 360, + * counting clockwise relative to true north. Specify this key only if the sp + * key is nonzero. sp (optional): The horizontal velocity (speed), in meters + * per second, that the client device is traveling. alt (optional): The + * altitude of the client device, in meters. are (optional): The radius, in + * meters, that specifies the vertical accuracy of the coordinates. Specify + * this key only if you specify the alt key. Although many of the keys are + * optional, the more information that you provide, the more accurate the + * location results are. Although optional, you are encouraged to always + * specify the user's geographical location. Providing the location is + * especially important if the client's IP address does not accurately reflect + * the user's physical location (for example, if the client uses VPN). For + * optimal results, you should include this header and the X-MSEdge-ClientIP + * header, but at a minimum, you should include this header. + * + * @param {string} [options.countryCode] A 2-character country code of the + * country where the results come from. This API supports only the United + * States market. If you specify this query parameter, it must be set to us. If + * you set this parameter, you must also specify the Accept-Language header. + * Bing uses the first supported language it finds from the languages list, and + * combine that language with the country code that you specify to determine + * the market to return results for. If the languages list does not include a + * supported language, Bing finds the closest language and market that supports + * the request, or it may use an aggregated or default market for the results + * instead of a specified one. You should use this query parameter and the + * Accept-Language query parameter only if you specify multiple languages; + * otherwise, you should use the mkt and setLang query parameters. This + * parameter and the mkt query parameter are mutually exclusive—do not specify + * both. + * + * @param {string} [options.market] The market where the results come from. You + * are strongly encouraged to always specify the market, if known. Specifying + * the market helps Bing route the request and return an appropriate and + * optimal response. This parameter and the cc query parameter are mutually + * exclusive—do not specify both. + * + * @param {string} [options.localCategories] comma-delimited list of business + * categories to search for. Supported categories can be high-level such as + * EatDrink, Shop, SeeDo. + * + * @param {string} [options.localCircularView] Preferred location to search + * around, expressed as Latitude, longitude and radius in meters. For example + * 47.61503,-122.1719,5000. Note that circular view should only be used to + * indicate a search around a point on the map, not as an approximation for a + * view port of a map rectangle. + * + * @param {string} [options.localMapView] Preferred bounding box for results, + * specified in NW_latitude, NW_Longitude, SE_Latitude, SE_Longitude format. + * For example 47.64,-122.13,47.63,-122.12. These values are lat, long pairs + * for the Northwest corner and the Southeast corner of a rectangle. + * + * @param {string} [options.count] Preferred number of results to return. If + * not specified, then Bing returns 1-20 of the most relevant results. + * + * @param {string} [options.first] First result to return. zero-based. default + * is 0. + * + * @param {array} [options.responseFormat] The media type to use for the + * response. The following are the possible case-insensitive values: JSON, + * JSONLD. The default is JSON. If you specify JSONLD, the response body + * includes JSON-LD objects that contain the search results. + * + * @param {string} [options.safeSearch] A filter used to filter adult content. + * Off: Return webpages with adult text, images, or videos. Moderate: Return + * webpages with adult text, but not adult images or videos. Strict: Do not + * return webpages with adult text, images, or videos. The default is Moderate. + * If the request comes from a market that Bing's adult policy requires that + * safeSearch is set to Strict, Bing ignores the safeSearch value and uses + * Strict. If you use the site: query operator, there is the chance that the + * response may contain adult content regardless of what the safeSearch query + * parameter is set to. Use site: only if you are aware of the content on the + * site and your scenario supports the possibility of adult content. Possible + * values include: 'Off', 'Moderate', 'Strict' + * + * @param {string} [options.setLang] The language to use for user interface + * strings. Specify the language using the ISO 639-1 2-letter language code. + * For example, the language code for English is EN. The default is EN + * (English). Although optional, you should always specify the language. + * Typically, you set setLang to the same language specified by mkt unless the + * user wants the user interface strings displayed in a different language. + * This parameter and the Accept-Language header are mutually exclusive; do not + * specify both. A user interface string is a string that's used as a label in + * a user interface. There are few user interface strings in the JSON response + * objects. Also, any links to Bing.com properties in the response objects + * apply the specified language. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {SearchResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SearchResponse} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + search(query, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._search(query, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._search(query, options, optionalCallback); + } + } + +} + +module.exports = Local; diff --git a/lib/services/cognitiveServicesLocalSearch/package.json b/lib/services/cognitiveServicesLocalSearch/package.json new file mode 100644 index 0000000000..156da1ec6b --- /dev/null +++ b/lib/services/cognitiveServicesLocalSearch/package.json @@ -0,0 +1,24 @@ +{ + "name": "azure-cognitiveservices-localsearch", + "author": "Microsoft Corporation", + "description": "LocalSearchClient Library with typescript type definitions for node", + "version": "1.0.0", + "dependencies": { + "ms-rest": "^2.3.3" + }, + "keywords": [ + "node", + "azure" + ], + "license": "MIT", + "main": "./lib/localSearchClient.js", + "types": "./lib/localSearchClient.d.ts", + "homepage": "https://github.com/azure/azure-sdk-for-node/tree/master/lib/services/cognitiveServicesLocalSearch", + "repository": { + "type": "git", + "url": "https://github.com/azure/azure-sdk-for-node.git" + }, + "bugs": { + "url": "https://github.com/azure/azure-sdk-for-node/issues" + } +} diff --git a/lib/services/cognitiveServicesQnAMaker/LICENSE.txt b/lib/services/cognitiveServicesQnAMaker/LICENSE.txt new file mode 100644 index 0000000000..a70e8cf660 --- /dev/null +++ b/lib/services/cognitiveServicesQnAMaker/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2018 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/lib/services/cognitiveServicesQnAMaker/README.md b/lib/services/cognitiveServicesQnAMaker/README.md new file mode 100644 index 0000000000..6376500ce0 --- /dev/null +++ b/lib/services/cognitiveServicesQnAMaker/README.md @@ -0,0 +1,44 @@ +--- +uid: azure-cognitiveservices-qnamaker +summary: *content + +--- +**This SDK will be deprecated next year and will be replaced by a new TypeScript-based isomorphic SDK (found at https://github.com/Azure/azure-sdk-for-js) which works on Node.js and browsers.** +## Microsoft Azure SDK for Node.js - QnAMakerClient + +This project provides a Node.js package for accessing Azure. Right now it supports: +- **Node.js version 6.x.x or higher** + +### Features + + +### How to Install + +```bash +npm install azure-cognitiveservices-qnamaker +``` + +### How to use + +#### Authentication, client creation, and getKeys endpointKeys as an example. + +```javascript +const msRest = require("ms-rest"); +const QnAMakerClient = require("azure-cognitiveservices-qnamaker"); +const token = ""; +const creds = new msRest.TokenCredentials(token); +const subscriptionId = ""; +const client = new QnAMakerClient(creds, subscriptionId); + +client.endpointKeys.getKeys().then((result) => { + console.log("The result is:"); + console.log(result); +}).catch((err) => { + console.log('An error occurred:'); + console.dir(err, {depth: null, colors: true}); +}); +``` + +### Related projects + +- [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node) diff --git a/lib/services/cognitiveServicesQnAMaker/lib/models/alterationsDTO.js b/lib/services/cognitiveServicesQnAMaker/lib/models/alterationsDTO.js new file mode 100644 index 0000000000..dc52b0836d --- /dev/null +++ b/lib/services/cognitiveServicesQnAMaker/lib/models/alterationsDTO.js @@ -0,0 +1,59 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Collection of words that are synonyms. + * + */ +class AlterationsDTO { + /** + * Create a AlterationsDTO. + * @property {array} alterations Words that are synonymous with each other. + */ + constructor() { + } + + /** + * Defines the metadata of AlterationsDTO + * + * @returns {object} metadata of AlterationsDTO + * + */ + mapper() { + return { + required: false, + serializedName: 'AlterationsDTO', + type: { + name: 'Composite', + className: 'AlterationsDTO', + modelProperties: { + alterations: { + required: true, + serializedName: 'alterations', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + }; + } +} + +module.exports = AlterationsDTO; diff --git a/lib/services/cognitiveServicesQnAMaker/lib/models/createKbDTO.js b/lib/services/cognitiveServicesQnAMaker/lib/models/createKbDTO.js new file mode 100644 index 0000000000..eafdb34120 --- /dev/null +++ b/lib/services/cognitiveServicesQnAMaker/lib/models/createKbDTO.js @@ -0,0 +1,104 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Post body schema for CreateKb operation. + * + */ +class CreateKbDTO { + /** + * Create a CreateKbDTO. + * @property {string} name Friendly name for the knowledgebase. + * @property {array} [qnaList] List of Q-A (QnADTO) to be added to the + * knowledgebase. Q-A Ids are assigned by the service and should be omitted. + * @property {array} [urls] List of URLs to be used for extracting Q-A. + * @property {array} [files] List of files from which to Extract Q-A. + */ + constructor() { + } + + /** + * Defines the metadata of CreateKbDTO + * + * @returns {object} metadata of CreateKbDTO + * + */ + mapper() { + return { + required: false, + serializedName: 'CreateKbDTO', + type: { + name: 'Composite', + className: 'CreateKbDTO', + modelProperties: { + name: { + required: true, + serializedName: 'name', + constraints: { + MaxLength: 100, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + qnaList: { + required: false, + serializedName: 'qnaList', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'QnADTOElementType', + type: { + name: 'Composite', + className: 'QnADTO' + } + } + } + }, + urls: { + required: false, + serializedName: 'urls', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + files: { + required: false, + serializedName: 'files', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'FileDTOElementType', + type: { + name: 'Composite', + className: 'FileDTO' + } + } + } + } + } + } + }; + } +} + +module.exports = CreateKbDTO; diff --git a/lib/services/cognitiveServicesQnAMaker/lib/models/createKbInputDTO.js b/lib/services/cognitiveServicesQnAMaker/lib/models/createKbInputDTO.js new file mode 100644 index 0000000000..5dea34b93a --- /dev/null +++ b/lib/services/cognitiveServicesQnAMaker/lib/models/createKbInputDTO.js @@ -0,0 +1,92 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Input to create KB. + * + */ +class CreateKbInputDTO { + /** + * Create a CreateKbInputDTO. + * @property {array} [qnaList] List of QNA to be added to the index. Ids are + * generated by the service and should be omitted. + * @property {array} [urls] List of URLs to be added to knowledgebase. + * @property {array} [files] List of files to be added to knowledgebase. + */ + constructor() { + } + + /** + * Defines the metadata of CreateKbInputDTO + * + * @returns {object} metadata of CreateKbInputDTO + * + */ + mapper() { + return { + required: false, + serializedName: 'CreateKbInputDTO', + type: { + name: 'Composite', + className: 'CreateKbInputDTO', + modelProperties: { + qnaList: { + required: false, + serializedName: 'qnaList', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'QnADTOElementType', + type: { + name: 'Composite', + className: 'QnADTO' + } + } + } + }, + urls: { + required: false, + serializedName: 'urls', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + files: { + required: false, + serializedName: 'files', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'FileDTOElementType', + type: { + name: 'Composite', + className: 'FileDTO' + } + } + } + } + } + } + }; + } +} + +module.exports = CreateKbInputDTO; diff --git a/lib/services/cognitiveServicesQnAMaker/lib/models/deleteKbContentsDTO.js b/lib/services/cognitiveServicesQnAMaker/lib/models/deleteKbContentsDTO.js new file mode 100644 index 0000000000..768bb3463e --- /dev/null +++ b/lib/services/cognitiveServicesQnAMaker/lib/models/deleteKbContentsDTO.js @@ -0,0 +1,75 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * PATCH body schema of Delete Operation in UpdateKb + * + */ +class DeleteKbContentsDTO { + /** + * Create a DeleteKbContentsDTO. + * @property {array} [ids] List of Qna Ids to be deleted + * @property {array} [sources] List of sources to be deleted from + * knowledgebase. + */ + constructor() { + } + + /** + * Defines the metadata of DeleteKbContentsDTO + * + * @returns {object} metadata of DeleteKbContentsDTO + * + */ + mapper() { + return { + required: false, + serializedName: 'DeleteKbContentsDTO', + type: { + name: 'Composite', + className: 'DeleteKbContentsDTO', + modelProperties: { + ids: { + required: false, + serializedName: 'ids', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'NumberElementType', + type: { + name: 'Number' + } + } + } + }, + sources: { + required: false, + serializedName: 'sources', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + }; + } +} + +module.exports = DeleteKbContentsDTO; diff --git a/lib/services/cognitiveServicesQnAMaker/lib/models/endpointKeysDTO.js b/lib/services/cognitiveServicesQnAMaker/lib/models/endpointKeysDTO.js new file mode 100644 index 0000000000..f38f76c070 --- /dev/null +++ b/lib/services/cognitiveServicesQnAMaker/lib/models/endpointKeysDTO.js @@ -0,0 +1,76 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Schema for EndpointKeys generate/refresh operations. + * + */ +class EndpointKeysDTO { + /** + * Create a EndpointKeysDTO. + * @property {string} [primaryEndpointKey] Primary Access Key. + * @property {string} [secondaryEndpointKey] Secondary Access Key. + * @property {string} [installedVersion] Current version of runtime. + * @property {string} [lastStableVersion] Latest version of runtime. + */ + constructor() { + } + + /** + * Defines the metadata of EndpointKeysDTO + * + * @returns {object} metadata of EndpointKeysDTO + * + */ + mapper() { + return { + required: false, + serializedName: 'EndpointKeysDTO', + type: { + name: 'Composite', + className: 'EndpointKeysDTO', + modelProperties: { + primaryEndpointKey: { + required: false, + serializedName: 'primaryEndpointKey', + type: { + name: 'String' + } + }, + secondaryEndpointKey: { + required: false, + serializedName: 'secondaryEndpointKey', + type: { + name: 'String' + } + }, + installedVersion: { + required: false, + serializedName: 'installedVersion', + type: { + name: 'String' + } + }, + lastStableVersion: { + required: false, + serializedName: 'lastStableVersion', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = EndpointKeysDTO; diff --git a/lib/services/cognitiveServicesQnAMaker/lib/models/errorModel.js b/lib/services/cognitiveServicesQnAMaker/lib/models/errorModel.js new file mode 100644 index 0000000000..e35537d227 --- /dev/null +++ b/lib/services/cognitiveServicesQnAMaker/lib/models/errorModel.js @@ -0,0 +1,105 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * The error object. As per Microsoft One API guidelines - + * https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. + * + */ +class ErrorModel { + /** + * Create a ErrorModel. + * @property {string} code One of a server-defined set of error codes. + * Possible values include: 'BadArgument', 'Forbidden', 'NotFound', + * 'KbNotFound', 'Unauthorized', 'Unspecified', 'EndpointKeysError', + * 'QuotaExceeded', 'QnaRuntimeError', 'SKULimitExceeded', + * 'OperationNotFound', 'ServiceError', 'ValidationFailure', + * 'ExtractionFailure' + * @property {string} [message] A human-readable representation of the error. + * @property {string} [target] The target of the error. + * @property {array} [details] An array of details about specific errors that + * led to this reported error. + * @property {object} [innerError] An object containing more specific + * information than the current object about the error. + * @property {string} [innerError.code] A more specific error code than was + * provided by the containing error. + * @property {object} [innerError.innerError] An object containing more + * specific information than the current object about the error. + */ + constructor() { + } + + /** + * Defines the metadata of ErrorModel + * + * @returns {object} metadata of ErrorModel + * + */ + mapper() { + return { + required: false, + serializedName: 'Error', + type: { + name: 'Composite', + className: 'ErrorModel', + modelProperties: { + code: { + required: true, + serializedName: 'code', + type: { + name: 'String' + } + }, + message: { + required: false, + serializedName: 'message', + type: { + name: 'String' + } + }, + target: { + required: false, + serializedName: 'target', + type: { + name: 'String' + } + }, + details: { + required: false, + serializedName: 'details', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ErrorModelElementType', + type: { + name: 'Composite', + className: 'ErrorModel' + } + } + } + }, + innerError: { + required: false, + serializedName: 'innerError', + type: { + name: 'Composite', + className: 'InnerErrorModel' + } + } + } + } + }; + } +} + +module.exports = ErrorModel; diff --git a/lib/services/cognitiveServicesQnAMaker/lib/models/errorResponse.js b/lib/services/cognitiveServicesQnAMaker/lib/models/errorResponse.js new file mode 100644 index 0000000000..1b381d0ddc --- /dev/null +++ b/lib/services/cognitiveServicesQnAMaker/lib/models/errorResponse.js @@ -0,0 +1,54 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Error response. As per Microsoft One API guidelines - + * https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. + * + */ +class ErrorResponse { + /** + * Create a ErrorResponse. + * @property {object} [error] The error object. + */ + constructor() { + } + + /** + * Defines the metadata of ErrorResponse + * + * @returns {object} metadata of ErrorResponse + * + */ + mapper() { + return { + required: false, + serializedName: 'ErrorResponse', + type: { + name: 'Composite', + className: 'ErrorResponse', + modelProperties: { + error: { + required: false, + serializedName: 'error', + type: { + name: 'Composite', + className: 'ErrorResponseError' + } + } + } + } + }; + } +} + +module.exports = ErrorResponse; diff --git a/lib/services/cognitiveServicesQnAMaker/lib/models/errorResponseError.js b/lib/services/cognitiveServicesQnAMaker/lib/models/errorResponseError.js new file mode 100644 index 0000000000..16f5f8146f --- /dev/null +++ b/lib/services/cognitiveServicesQnAMaker/lib/models/errorResponseError.js @@ -0,0 +1,92 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * The error object. + * + * @extends models['ErrorModel'] + */ +class ErrorResponseError extends models['ErrorModel'] { + /** + * Create a ErrorResponseError. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ErrorResponseError + * + * @returns {object} metadata of ErrorResponseError + * + */ + mapper() { + return { + required: false, + serializedName: 'ErrorResponse_error', + type: { + name: 'Composite', + className: 'ErrorResponseError', + modelProperties: { + code: { + required: true, + serializedName: 'code', + type: { + name: 'String' + } + }, + message: { + required: false, + serializedName: 'message', + type: { + name: 'String' + } + }, + target: { + required: false, + serializedName: 'target', + type: { + name: 'String' + } + }, + details: { + required: false, + serializedName: 'details', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ErrorModelElementType', + type: { + name: 'Composite', + className: 'ErrorModel' + } + } + } + }, + innerError: { + required: false, + serializedName: 'innerError', + type: { + name: 'Composite', + className: 'InnerErrorModel' + } + } + } + } + }; + } +} + +module.exports = ErrorResponseError; diff --git a/lib/services/cognitiveServicesQnAMaker/lib/models/fileDTO.js b/lib/services/cognitiveServicesQnAMaker/lib/models/fileDTO.js new file mode 100644 index 0000000000..3e188d7629 --- /dev/null +++ b/lib/services/cognitiveServicesQnAMaker/lib/models/fileDTO.js @@ -0,0 +1,65 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * DTO to hold details of uploaded files. + * + */ +class FileDTO { + /** + * Create a FileDTO. + * @property {string} fileName File name. Supported file types are ".tsv", + * ".pdf", ".txt", ".docx", ".xlsx". + * @property {string} fileUri Public URI of the file. + */ + constructor() { + } + + /** + * Defines the metadata of FileDTO + * + * @returns {object} metadata of FileDTO + * + */ + mapper() { + return { + required: false, + serializedName: 'FileDTO', + type: { + name: 'Composite', + className: 'FileDTO', + modelProperties: { + fileName: { + required: true, + serializedName: 'fileName', + constraints: { + MaxLength: 200, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + fileUri: { + required: true, + serializedName: 'fileUri', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = FileDTO; diff --git a/lib/services/cognitiveServicesQnAMaker/lib/models/index.d.ts b/lib/services/cognitiveServicesQnAMaker/lib/models/index.d.ts new file mode 100644 index 0000000000..c96b063985 --- /dev/null +++ b/lib/services/cognitiveServicesQnAMaker/lib/models/index.d.ts @@ -0,0 +1,452 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import * as moment from "moment"; + +/** + * Input to create KB. + */ +export interface CreateKbInputDTO { + /** + * List of QNA to be added to the index. Ids are generated by the service and should be omitted. + */ + qnaList?: QnADTO[]; + /** + * List of URLs to be added to knowledgebase. + */ + urls?: string[]; + /** + * List of files to be added to knowledgebase. + */ + files?: FileDTO[]; +} + +/** + * An instance of CreateKbInputDTO for add operation + */ +export interface UpdateKbOperationDTOAdd extends CreateKbInputDTO { +} + +/** + * PATCH body schema of Delete Operation in UpdateKb + */ +export interface DeleteKbContentsDTO { + /** + * List of Qna Ids to be deleted + */ + ids?: number[]; + /** + * List of sources to be deleted from knowledgebase. + */ + sources?: string[]; +} + +/** + * An instance of DeleteKbContentsDTO for delete Operation + */ +export interface UpdateKbOperationDTODelete extends DeleteKbContentsDTO { +} + +/** + * PATCH body schema for Update operation in Update Kb + */ +export interface UpdateKbContentsDTO { + /** + * Friendly name for the knowledgebase. + */ + name?: string; + /** + * List of Q-A (UpdateQnaDTO) to be added to the knowledgebase. + */ + qnaList?: UpdateQnaDTO[]; + /** + * List of existing URLs to be refreshed. The content will be extracted again and re-indexed. + */ + urls?: string[]; +} + +/** + * An instance of UpdateKbContentsDTO for Update Operation + */ +export interface UpdateKbOperationDTOUpdate extends UpdateKbContentsDTO { +} + +/** + * Contains list of QnAs to be updated + */ +export interface UpdateKbOperationDTO { + /** + * An instance of CreateKbInputDTO for add operation + */ + add?: UpdateKbOperationDTOAdd; + /** + * An instance of DeleteKbContentsDTO for delete Operation + */ + deleteProperty?: UpdateKbOperationDTODelete; + /** + * An instance of UpdateKbContentsDTO for Update Operation + */ + update?: UpdateKbOperationDTOUpdate; +} + +/** + * PATCH Body schema for Update Kb which contains list of questions to be added and deleted + */ +export interface UpdateQuestionsDTO { + /** + * List of questions to be added + */ + add?: string[]; + /** + * List of questions to be deleted. + */ + deleteProperty?: string[]; +} + +/** + * List of questions associated with the answer. + */ +export interface UpdateQnaDTOQuestions extends UpdateQuestionsDTO { +} + +/** + * PATCH Body schema to represent list of Metadata to be updated + */ +export interface UpdateMetadataDTO { + /** + * List of Metadata associated with answer to be deleted + */ + deleteProperty?: MetadataDTO[]; + /** + * List of metadata associated with answer to be added + */ + add?: MetadataDTO[]; +} + +/** + * List of metadata associated with the answer to be updated + */ +export interface UpdateQnaDTOMetadata extends UpdateMetadataDTO { +} + +/** + * PATCH Body schema for Update Qna List + */ +export interface UpdateQnaDTO { + /** + * Unique id for the Q-A + */ + id?: number; + /** + * Answer text + */ + answer?: string; + /** + * Source from which Q-A was indexed. eg. + * https://docs.microsoft.com/en-us/azure/cognitive-services/QnAMaker/FAQs + */ + source?: string; + /** + * List of questions associated with the answer. + */ + questions?: UpdateQnaDTOQuestions; + /** + * List of metadata associated with the answer to be updated + */ + metadata?: UpdateQnaDTOMetadata; +} + +/** + * Name - value pair of metadata. + */ +export interface MetadataDTO { + /** + * Metadata name. + */ + name: string; + /** + * Metadata value. + */ + value: string; +} + +/** + * Q-A object. + */ +export interface QnADTO { + /** + * Unique id for the Q-A. + */ + id?: number; + /** + * Answer text + */ + answer: string; + /** + * Source from which Q-A was indexed. eg. + * https://docs.microsoft.com/en-us/azure/cognitive-services/QnAMaker/FAQs + */ + source?: string; + /** + * List of questions associated with the answer. + */ + questions: string[]; + /** + * List of metadata associated with the answer. + */ + metadata?: MetadataDTO[]; +} + +/** + * DTO to hold details of uploaded files. + */ +export interface FileDTO { + /** + * File name. Supported file types are ".tsv", ".pdf", ".txt", ".docx", ".xlsx". + */ + fileName: string; + /** + * Public URI of the file. + */ + fileUri: string; +} + +/** + * List of QnADTO + */ +export interface QnADocumentsDTO { + /** + * List of answers. + */ + qnaDocuments?: QnADTO[]; +} + +/** + * Post body schema for CreateKb operation. + */ +export interface CreateKbDTO { + /** + * Friendly name for the knowledgebase. + */ + name: string; + /** + * List of Q-A (QnADTO) to be added to the knowledgebase. Q-A Ids are assigned by the service and + * should be omitted. + */ + qnaList?: QnADTO[]; + /** + * List of URLs to be used for extracting Q-A. + */ + urls?: string[]; + /** + * List of files from which to Extract Q-A. + */ + files?: FileDTO[]; +} + +/** + * Post body schema for Replace KB operation. + */ +export interface ReplaceKbDTO { + /** + * List of Q-A (QnADTO) to be added to the knowledgebase. Q-A Ids are assigned by the service and + * should be omitted. + */ + qnAList: QnADTO[]; +} + +/** + * The error object. As per Microsoft One API guidelines - + * https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. + */ +export interface ErrorModel { + /** + * One of a server-defined set of error codes. Possible values include: 'BadArgument', + * 'Forbidden', 'NotFound', 'KbNotFound', 'Unauthorized', 'Unspecified', 'EndpointKeysError', + * 'QuotaExceeded', 'QnaRuntimeError', 'SKULimitExceeded', 'OperationNotFound', 'ServiceError', + * 'ValidationFailure', 'ExtractionFailure' + */ + code: string; + /** + * A human-readable representation of the error. + */ + message?: string; + /** + * The target of the error. + */ + target?: string; + /** + * An array of details about specific errors that led to this reported error. + */ + details?: ErrorModel[]; + /** + * An object containing more specific information than the current object about the error. + */ + innerError?: InnerErrorModel; +} + +/** + * The error object. + */ +export interface ErrorResponseError extends ErrorModel { +} + +/** + * Error response. As per Microsoft One API guidelines - + * https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. + */ +export interface ErrorResponse { + /** + * The error object. + */ + error?: ErrorResponseError; +} + +/** + * An object containing more specific information about the error. As per Microsoft One API + * guidelines - + * https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. + */ +export interface InnerErrorModel { + /** + * A more specific error code than was provided by the containing error. + */ + code?: string; + /** + * An object containing more specific information than the current object about the error. + */ + innerError?: InnerErrorModel; +} + +/** + * Record to track long running operation. + */ +export interface Operation { + /** + * Operation state. Possible values include: 'Failed', 'NotStarted', 'Running', 'Succeeded' + */ + operationState?: string; + /** + * Timestamp when the operation was created. + */ + createdTimestamp?: string; + /** + * Timestamp when the current state was entered. + */ + lastActionTimestamp?: string; + /** + * Relative URI to the target resource location for completed resources. + */ + resourceLocation?: string; + /** + * User Id + */ + userId?: string; + /** + * Operation Id. + */ + operationId?: string; + /** + * Error details in case of failures. + */ + errorResponse?: ErrorResponse; +} + +/** + * Response schema for CreateKb operation. + */ +export interface KnowledgebaseDTO { + /** + * Unique id that identifies a knowledgebase. + */ + id?: string; + /** + * URL host name at which the knowledgebase is hosted. + */ + hostName?: string; + /** + * Time stamp at which the knowledgebase was last accessed (UTC). + */ + lastAccessedTimestamp?: string; + /** + * Time stamp at which the knowledgebase was last modified (UTC). + */ + lastChangedTimestamp?: string; + /** + * Time stamp at which the knowledgebase was last published (UTC). + */ + lastPublishedTimestamp?: string; + /** + * Friendly name of the knowledgebase. + */ + name?: string; + /** + * User who created / owns the knowledgebase. + */ + userId?: string; + /** + * URL sources from which Q-A were extracted and added to the knowledgebase. + */ + urls?: string[]; + /** + * Custom sources from which Q-A were extracted or explicitly added to the knowledgebase. + */ + sources?: string[]; +} + +/** + * Collection of knowledgebases owned by a user. + */ +export interface KnowledgebasesDTO { + /** + * Collection of knowledgebase records. + */ + knowledgebases?: KnowledgebaseDTO[]; +} + +/** + * Collection of words that are synonyms. + */ +export interface AlterationsDTO { + /** + * Words that are synonymous with each other. + */ + alterations: string[]; +} + +/** + * Collection of word alterations. + */ +export interface WordAlterationsDTO { + /** + * Collection of word alterations. + */ + wordAlterations: AlterationsDTO[]; +} + +/** + * Schema for EndpointKeys generate/refresh operations. + */ +export interface EndpointKeysDTO { + /** + * Primary Access Key. + */ + primaryEndpointKey?: string; + /** + * Secondary Access Key. + */ + secondaryEndpointKey?: string; + /** + * Current version of runtime. + */ + installedVersion?: string; + /** + * Latest version of runtime. + */ + lastStableVersion?: string; +} diff --git a/lib/services/cognitiveServicesQnAMaker/lib/models/index.js b/lib/services/cognitiveServicesQnAMaker/lib/models/index.js new file mode 100644 index 0000000000..8c3f801c29 --- /dev/null +++ b/lib/services/cognitiveServicesQnAMaker/lib/models/index.js @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +/* jshint latedef:false */ +/* jshint forin:false */ +/* jshint noempty:false */ + +'use strict'; + +exports.CreateKbInputDTO = require('./createKbInputDTO'); +exports.UpdateKbOperationDTOAdd = require('./updateKbOperationDTOAdd'); +exports.DeleteKbContentsDTO = require('./deleteKbContentsDTO'); +exports.UpdateKbOperationDTODelete = require('./updateKbOperationDTODelete'); +exports.UpdateKbContentsDTO = require('./updateKbContentsDTO'); +exports.UpdateKbOperationDTOUpdate = require('./updateKbOperationDTOUpdate'); +exports.UpdateKbOperationDTO = require('./updateKbOperationDTO'); +exports.UpdateQuestionsDTO = require('./updateQuestionsDTO'); +exports.UpdateQnaDTOQuestions = require('./updateQnaDTOQuestions'); +exports.UpdateMetadataDTO = require('./updateMetadataDTO'); +exports.UpdateQnaDTOMetadata = require('./updateQnaDTOMetadata'); +exports.UpdateQnaDTO = require('./updateQnaDTO'); +exports.MetadataDTO = require('./metadataDTO'); +exports.QnADTO = require('./qnADTO'); +exports.FileDTO = require('./fileDTO'); +exports.QnADocumentsDTO = require('./qnADocumentsDTO'); +exports.CreateKbDTO = require('./createKbDTO'); +exports.ReplaceKbDTO = require('./replaceKbDTO'); +exports.ErrorModel = require('./errorModel'); +exports.ErrorResponseError = require('./errorResponseError'); +exports.ErrorResponse = require('./errorResponse'); +exports.InnerErrorModel = require('./innerErrorModel'); +exports.Operation = require('./operation'); +exports.KnowledgebaseDTO = require('./knowledgebaseDTO'); +exports.KnowledgebasesDTO = require('./knowledgebasesDTO'); +exports.AlterationsDTO = require('./alterationsDTO'); +exports.WordAlterationsDTO = require('./wordAlterationsDTO'); +exports.EndpointKeysDTO = require('./endpointKeysDTO'); diff --git a/lib/services/cognitiveServicesQnAMaker/lib/models/innerErrorModel.js b/lib/services/cognitiveServicesQnAMaker/lib/models/innerErrorModel.js new file mode 100644 index 0000000000..03f3d857a4 --- /dev/null +++ b/lib/services/cognitiveServicesQnAMaker/lib/models/innerErrorModel.js @@ -0,0 +1,65 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * An object containing more specific information about the error. As per + * Microsoft One API guidelines - + * https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. + * + */ +class InnerErrorModel { + /** + * Create a InnerErrorModel. + * @property {string} [code] A more specific error code than was provided by + * the containing error. + * @property {object} [innerError] An object containing more specific + * information than the current object about the error. + */ + constructor() { + } + + /** + * Defines the metadata of InnerErrorModel + * + * @returns {object} metadata of InnerErrorModel + * + */ + mapper() { + return { + required: false, + serializedName: 'InnerErrorModel', + type: { + name: 'Composite', + className: 'InnerErrorModel', + modelProperties: { + code: { + required: false, + serializedName: 'code', + type: { + name: 'String' + } + }, + innerError: { + required: false, + serializedName: 'innerError', + type: { + name: 'Composite', + className: 'InnerErrorModel' + } + } + } + } + }; + } +} + +module.exports = InnerErrorModel; diff --git a/lib/services/cognitiveServicesQnAMaker/lib/models/knowledgebaseDTO.js b/lib/services/cognitiveServicesQnAMaker/lib/models/knowledgebaseDTO.js new file mode 100644 index 0000000000..7a512c8dbf --- /dev/null +++ b/lib/services/cognitiveServicesQnAMaker/lib/models/knowledgebaseDTO.js @@ -0,0 +1,136 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Response schema for CreateKb operation. + * + */ +class KnowledgebaseDTO { + /** + * Create a KnowledgebaseDTO. + * @property {string} [id] Unique id that identifies a knowledgebase. + * @property {string} [hostName] URL host name at which the knowledgebase is + * hosted. + * @property {string} [lastAccessedTimestamp] Time stamp at which the + * knowledgebase was last accessed (UTC). + * @property {string} [lastChangedTimestamp] Time stamp at which the + * knowledgebase was last modified (UTC). + * @property {string} [lastPublishedTimestamp] Time stamp at which the + * knowledgebase was last published (UTC). + * @property {string} [name] Friendly name of the knowledgebase. + * @property {string} [userId] User who created / owns the knowledgebase. + * @property {array} [urls] URL sources from which Q-A were extracted and + * added to the knowledgebase. + * @property {array} [sources] Custom sources from which Q-A were extracted + * or explicitly added to the knowledgebase. + */ + constructor() { + } + + /** + * Defines the metadata of KnowledgebaseDTO + * + * @returns {object} metadata of KnowledgebaseDTO + * + */ + mapper() { + return { + required: false, + serializedName: 'KnowledgebaseDTO', + type: { + name: 'Composite', + className: 'KnowledgebaseDTO', + modelProperties: { + id: { + required: false, + serializedName: 'id', + type: { + name: 'String' + } + }, + hostName: { + required: false, + serializedName: 'hostName', + type: { + name: 'String' + } + }, + lastAccessedTimestamp: { + required: false, + serializedName: 'lastAccessedTimestamp', + type: { + name: 'String' + } + }, + lastChangedTimestamp: { + required: false, + serializedName: 'lastChangedTimestamp', + type: { + name: 'String' + } + }, + lastPublishedTimestamp: { + required: false, + serializedName: 'lastPublishedTimestamp', + type: { + name: 'String' + } + }, + name: { + required: false, + serializedName: 'name', + type: { + name: 'String' + } + }, + userId: { + required: false, + serializedName: 'userId', + type: { + name: 'String' + } + }, + urls: { + required: false, + serializedName: 'urls', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + sources: { + required: false, + serializedName: 'sources', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + }; + } +} + +module.exports = KnowledgebaseDTO; diff --git a/lib/services/cognitiveServicesQnAMaker/lib/models/knowledgebasesDTO.js b/lib/services/cognitiveServicesQnAMaker/lib/models/knowledgebasesDTO.js new file mode 100644 index 0000000000..4af86e2074 --- /dev/null +++ b/lib/services/cognitiveServicesQnAMaker/lib/models/knowledgebasesDTO.js @@ -0,0 +1,60 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Collection of knowledgebases owned by a user. + * + */ +class KnowledgebasesDTO { + /** + * Create a KnowledgebasesDTO. + * @property {array} [knowledgebases] Collection of knowledgebase records. + */ + constructor() { + } + + /** + * Defines the metadata of KnowledgebasesDTO + * + * @returns {object} metadata of KnowledgebasesDTO + * + */ + mapper() { + return { + required: false, + serializedName: 'KnowledgebasesDTO', + type: { + name: 'Composite', + className: 'KnowledgebasesDTO', + modelProperties: { + knowledgebases: { + required: false, + serializedName: 'knowledgebases', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'KnowledgebaseDTOElementType', + type: { + name: 'Composite', + className: 'KnowledgebaseDTO' + } + } + } + } + } + } + }; + } +} + +module.exports = KnowledgebasesDTO; diff --git a/lib/services/cognitiveServicesQnAMaker/lib/models/metadataDTO.js b/lib/services/cognitiveServicesQnAMaker/lib/models/metadataDTO.js new file mode 100644 index 0000000000..60864ce8b9 --- /dev/null +++ b/lib/services/cognitiveServicesQnAMaker/lib/models/metadataDTO.js @@ -0,0 +1,68 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Name - value pair of metadata. + * + */ +class MetadataDTO { + /** + * Create a MetadataDTO. + * @property {string} name Metadata name. + * @property {string} value Metadata value. + */ + constructor() { + } + + /** + * Defines the metadata of MetadataDTO + * + * @returns {object} metadata of MetadataDTO + * + */ + mapper() { + return { + required: false, + serializedName: 'MetadataDTO', + type: { + name: 'Composite', + className: 'MetadataDTO', + modelProperties: { + name: { + required: true, + serializedName: 'name', + constraints: { + MaxLength: 100, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + value: { + required: true, + serializedName: 'value', + constraints: { + MaxLength: 500, + MinLength: 1 + }, + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = MetadataDTO; diff --git a/lib/services/cognitiveServicesQnAMaker/lib/models/operation.js b/lib/services/cognitiveServicesQnAMaker/lib/models/operation.js new file mode 100644 index 0000000000..4651196d68 --- /dev/null +++ b/lib/services/cognitiveServicesQnAMaker/lib/models/operation.js @@ -0,0 +1,106 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Record to track long running operation. + * + */ +class Operation { + /** + * Create a Operation. + * @property {string} [operationState] Operation state. Possible values + * include: 'Failed', 'NotStarted', 'Running', 'Succeeded' + * @property {string} [createdTimestamp] Timestamp when the operation was + * created. + * @property {string} [lastActionTimestamp] Timestamp when the current state + * was entered. + * @property {string} [resourceLocation] Relative URI to the target resource + * location for completed resources. + * @property {string} [userId] User Id + * @property {string} [operationId] Operation Id. + * @property {object} [errorResponse] Error details in case of failures. + * @property {object} [errorResponse.error] The error object. + */ + constructor() { + } + + /** + * Defines the metadata of Operation + * + * @returns {object} metadata of Operation + * + */ + mapper() { + return { + required: false, + serializedName: 'Operation', + type: { + name: 'Composite', + className: 'Operation', + modelProperties: { + operationState: { + required: false, + serializedName: 'operationState', + type: { + name: 'String' + } + }, + createdTimestamp: { + required: false, + serializedName: 'createdTimestamp', + type: { + name: 'String' + } + }, + lastActionTimestamp: { + required: false, + serializedName: 'lastActionTimestamp', + type: { + name: 'String' + } + }, + resourceLocation: { + required: false, + serializedName: 'resourceLocation', + type: { + name: 'String' + } + }, + userId: { + required: false, + serializedName: 'userId', + type: { + name: 'String' + } + }, + operationId: { + required: false, + serializedName: 'operationId', + type: { + name: 'String' + } + }, + errorResponse: { + required: false, + serializedName: 'errorResponse', + type: { + name: 'Composite', + className: 'ErrorResponse' + } + } + } + } + }; + } +} + +module.exports = Operation; diff --git a/lib/services/cognitiveServicesQnAMaker/lib/models/qnADTO.js b/lib/services/cognitiveServicesQnAMaker/lib/models/qnADTO.js new file mode 100644 index 0000000000..2c8e72fa9c --- /dev/null +++ b/lib/services/cognitiveServicesQnAMaker/lib/models/qnADTO.js @@ -0,0 +1,107 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Q-A object. + * + */ +class QnADTO { + /** + * Create a QnADTO. + * @property {number} [id] Unique id for the Q-A. + * @property {string} answer Answer text + * @property {string} [source] Source from which Q-A was indexed. eg. + * https://docs.microsoft.com/en-us/azure/cognitive-services/QnAMaker/FAQs + * @property {array} questions List of questions associated with the answer. + * @property {array} [metadata] List of metadata associated with the answer. + */ + constructor() { + } + + /** + * Defines the metadata of QnADTO + * + * @returns {object} metadata of QnADTO + * + */ + mapper() { + return { + required: false, + serializedName: 'QnADTO', + type: { + name: 'Composite', + className: 'QnADTO', + modelProperties: { + id: { + required: false, + serializedName: 'id', + type: { + name: 'Number' + } + }, + answer: { + required: true, + serializedName: 'answer', + constraints: { + MaxLength: 25000, + MinLength: 1 + }, + type: { + name: 'String' + } + }, + source: { + required: false, + serializedName: 'source', + constraints: { + MaxLength: 300 + }, + type: { + name: 'String' + } + }, + questions: { + required: true, + serializedName: 'questions', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + metadata: { + required: false, + serializedName: 'metadata', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'MetadataDTOElementType', + type: { + name: 'Composite', + className: 'MetadataDTO' + } + } + } + } + } + } + }; + } +} + +module.exports = QnADTO; diff --git a/lib/services/cognitiveServicesQnAMaker/lib/models/qnADocumentsDTO.js b/lib/services/cognitiveServicesQnAMaker/lib/models/qnADocumentsDTO.js new file mode 100644 index 0000000000..e5cdd23e78 --- /dev/null +++ b/lib/services/cognitiveServicesQnAMaker/lib/models/qnADocumentsDTO.js @@ -0,0 +1,60 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * List of QnADTO + * + */ +class QnADocumentsDTO { + /** + * Create a QnADocumentsDTO. + * @property {array} [qnaDocuments] List of answers. + */ + constructor() { + } + + /** + * Defines the metadata of QnADocumentsDTO + * + * @returns {object} metadata of QnADocumentsDTO + * + */ + mapper() { + return { + required: false, + serializedName: 'QnADocumentsDTO', + type: { + name: 'Composite', + className: 'QnADocumentsDTO', + modelProperties: { + qnaDocuments: { + required: false, + serializedName: 'qnaDocuments', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'QnADTOElementType', + type: { + name: 'Composite', + className: 'QnADTO' + } + } + } + } + } + } + }; + } +} + +module.exports = QnADocumentsDTO; diff --git a/lib/services/cognitiveServicesQnAMaker/lib/models/replaceKbDTO.js b/lib/services/cognitiveServicesQnAMaker/lib/models/replaceKbDTO.js new file mode 100644 index 0000000000..72e21815e7 --- /dev/null +++ b/lib/services/cognitiveServicesQnAMaker/lib/models/replaceKbDTO.js @@ -0,0 +1,61 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Post body schema for Replace KB operation. + * + */ +class ReplaceKbDTO { + /** + * Create a ReplaceKbDTO. + * @property {array} qnAList List of Q-A (QnADTO) to be added to the + * knowledgebase. Q-A Ids are assigned by the service and should be omitted. + */ + constructor() { + } + + /** + * Defines the metadata of ReplaceKbDTO + * + * @returns {object} metadata of ReplaceKbDTO + * + */ + mapper() { + return { + required: false, + serializedName: 'ReplaceKbDTO', + type: { + name: 'Composite', + className: 'ReplaceKbDTO', + modelProperties: { + qnAList: { + required: true, + serializedName: 'qnAList', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'QnADTOElementType', + type: { + name: 'Composite', + className: 'QnADTO' + } + } + } + } + } + } + }; + } +} + +module.exports = ReplaceKbDTO; diff --git a/lib/services/cognitiveServicesQnAMaker/lib/models/updateKbContentsDTO.js b/lib/services/cognitiveServicesQnAMaker/lib/models/updateKbContentsDTO.js new file mode 100644 index 0000000000..2343750ffd --- /dev/null +++ b/lib/services/cognitiveServicesQnAMaker/lib/models/updateKbContentsDTO.js @@ -0,0 +1,85 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * PATCH body schema for Update operation in Update Kb + * + */ +class UpdateKbContentsDTO { + /** + * Create a UpdateKbContentsDTO. + * @property {string} [name] Friendly name for the knowledgebase. + * @property {array} [qnaList] List of Q-A (UpdateQnaDTO) to be added to the + * knowledgebase. + * @property {array} [urls] List of existing URLs to be refreshed. The + * content will be extracted again and re-indexed. + */ + constructor() { + } + + /** + * Defines the metadata of UpdateKbContentsDTO + * + * @returns {object} metadata of UpdateKbContentsDTO + * + */ + mapper() { + return { + required: false, + serializedName: 'UpdateKbContentsDTO', + type: { + name: 'Composite', + className: 'UpdateKbContentsDTO', + modelProperties: { + name: { + required: false, + serializedName: 'name', + type: { + name: 'String' + } + }, + qnaList: { + required: false, + serializedName: 'qnaList', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'UpdateQnaDTOElementType', + type: { + name: 'Composite', + className: 'UpdateQnaDTO' + } + } + } + }, + urls: { + required: false, + serializedName: 'urls', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + }; + } +} + +module.exports = UpdateKbContentsDTO; diff --git a/lib/services/cognitiveServicesQnAMaker/lib/models/updateKbOperationDTO.js b/lib/services/cognitiveServicesQnAMaker/lib/models/updateKbOperationDTO.js new file mode 100644 index 0000000000..8e922a4502 --- /dev/null +++ b/lib/services/cognitiveServicesQnAMaker/lib/models/updateKbOperationDTO.js @@ -0,0 +1,73 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Contains list of QnAs to be updated + * + */ +class UpdateKbOperationDTO { + /** + * Create a UpdateKbOperationDTO. + * @property {object} [add] An instance of CreateKbInputDTO for add operation + * @property {object} [deleteProperty] An instance of DeleteKbContentsDTO for + * delete Operation + * @property {object} [update] An instance of UpdateKbContentsDTO for Update + * Operation + */ + constructor() { + } + + /** + * Defines the metadata of UpdateKbOperationDTO + * + * @returns {object} metadata of UpdateKbOperationDTO + * + */ + mapper() { + return { + required: false, + serializedName: 'UpdateKbOperationDTO', + type: { + name: 'Composite', + className: 'UpdateKbOperationDTO', + modelProperties: { + add: { + required: false, + serializedName: 'add', + type: { + name: 'Composite', + className: 'UpdateKbOperationDTOAdd' + } + }, + deleteProperty: { + required: false, + serializedName: 'delete', + type: { + name: 'Composite', + className: 'UpdateKbOperationDTODelete' + } + }, + update: { + required: false, + serializedName: 'update', + type: { + name: 'Composite', + className: 'UpdateKbOperationDTOUpdate' + } + } + } + } + }; + } +} + +module.exports = UpdateKbOperationDTO; diff --git a/lib/services/cognitiveServicesQnAMaker/lib/models/updateKbOperationDTOAdd.js b/lib/services/cognitiveServicesQnAMaker/lib/models/updateKbOperationDTOAdd.js new file mode 100644 index 0000000000..27ed1bca98 --- /dev/null +++ b/lib/services/cognitiveServicesQnAMaker/lib/models/updateKbOperationDTOAdd.js @@ -0,0 +1,92 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * An instance of CreateKbInputDTO for add operation + * + * @extends models['CreateKbInputDTO'] + */ +class UpdateKbOperationDTOAdd extends models['CreateKbInputDTO'] { + /** + * Create a UpdateKbOperationDTOAdd. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of UpdateKbOperationDTOAdd + * + * @returns {object} metadata of UpdateKbOperationDTOAdd + * + */ + mapper() { + return { + required: false, + serializedName: 'UpdateKbOperationDTO_add', + type: { + name: 'Composite', + className: 'UpdateKbOperationDTOAdd', + modelProperties: { + qnaList: { + required: false, + serializedName: 'qnaList', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'QnADTOElementType', + type: { + name: 'Composite', + className: 'QnADTO' + } + } + } + }, + urls: { + required: false, + serializedName: 'urls', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + files: { + required: false, + serializedName: 'files', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'FileDTOElementType', + type: { + name: 'Composite', + className: 'FileDTO' + } + } + } + } + } + } + }; + } +} + +module.exports = UpdateKbOperationDTOAdd; diff --git a/lib/services/cognitiveServicesQnAMaker/lib/models/updateKbOperationDTODelete.js b/lib/services/cognitiveServicesQnAMaker/lib/models/updateKbOperationDTODelete.js new file mode 100644 index 0000000000..fa24b6a168 --- /dev/null +++ b/lib/services/cognitiveServicesQnAMaker/lib/models/updateKbOperationDTODelete.js @@ -0,0 +1,76 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * An instance of DeleteKbContentsDTO for delete Operation + * + * @extends models['DeleteKbContentsDTO'] + */ +class UpdateKbOperationDTODelete extends models['DeleteKbContentsDTO'] { + /** + * Create a UpdateKbOperationDTODelete. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of UpdateKbOperationDTODelete + * + * @returns {object} metadata of UpdateKbOperationDTODelete + * + */ + mapper() { + return { + required: false, + serializedName: 'UpdateKbOperationDTO_delete', + type: { + name: 'Composite', + className: 'UpdateKbOperationDTODelete', + modelProperties: { + ids: { + required: false, + serializedName: 'ids', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'NumberElementType', + type: { + name: 'Number' + } + } + } + }, + sources: { + required: false, + serializedName: 'sources', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + }; + } +} + +module.exports = UpdateKbOperationDTODelete; diff --git a/lib/services/cognitiveServicesQnAMaker/lib/models/updateKbOperationDTOUpdate.js b/lib/services/cognitiveServicesQnAMaker/lib/models/updateKbOperationDTOUpdate.js new file mode 100644 index 0000000000..6793e83e81 --- /dev/null +++ b/lib/services/cognitiveServicesQnAMaker/lib/models/updateKbOperationDTOUpdate.js @@ -0,0 +1,84 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * An instance of UpdateKbContentsDTO for Update Operation + * + * @extends models['UpdateKbContentsDTO'] + */ +class UpdateKbOperationDTOUpdate extends models['UpdateKbContentsDTO'] { + /** + * Create a UpdateKbOperationDTOUpdate. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of UpdateKbOperationDTOUpdate + * + * @returns {object} metadata of UpdateKbOperationDTOUpdate + * + */ + mapper() { + return { + required: false, + serializedName: 'UpdateKbOperationDTO_update', + type: { + name: 'Composite', + className: 'UpdateKbOperationDTOUpdate', + modelProperties: { + name: { + required: false, + serializedName: 'name', + type: { + name: 'String' + } + }, + qnaList: { + required: false, + serializedName: 'qnaList', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'UpdateQnaDTOElementType', + type: { + name: 'Composite', + className: 'UpdateQnaDTO' + } + } + } + }, + urls: { + required: false, + serializedName: 'urls', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + }; + } +} + +module.exports = UpdateKbOperationDTOUpdate; diff --git a/lib/services/cognitiveServicesQnAMaker/lib/models/updateMetadataDTO.js b/lib/services/cognitiveServicesQnAMaker/lib/models/updateMetadataDTO.js new file mode 100644 index 0000000000..7228da2b8e --- /dev/null +++ b/lib/services/cognitiveServicesQnAMaker/lib/models/updateMetadataDTO.js @@ -0,0 +1,78 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * PATCH Body schema to represent list of Metadata to be updated + * + */ +class UpdateMetadataDTO { + /** + * Create a UpdateMetadataDTO. + * @property {array} [deleteProperty] List of Metadata associated with answer + * to be deleted + * @property {array} [add] List of metadata associated with answer to be + * added + */ + constructor() { + } + + /** + * Defines the metadata of UpdateMetadataDTO + * + * @returns {object} metadata of UpdateMetadataDTO + * + */ + mapper() { + return { + required: false, + serializedName: 'UpdateMetadataDTO', + type: { + name: 'Composite', + className: 'UpdateMetadataDTO', + modelProperties: { + deleteProperty: { + required: false, + serializedName: 'delete', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'MetadataDTOElementType', + type: { + name: 'Composite', + className: 'MetadataDTO' + } + } + } + }, + add: { + required: false, + serializedName: 'add', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'MetadataDTOElementType', + type: { + name: 'Composite', + className: 'MetadataDTO' + } + } + } + } + } + } + }; + } +} + +module.exports = UpdateMetadataDTO; diff --git a/lib/services/cognitiveServicesQnAMaker/lib/models/updateQnaDTO.js b/lib/services/cognitiveServicesQnAMaker/lib/models/updateQnaDTO.js new file mode 100644 index 0000000000..2bb5280ffe --- /dev/null +++ b/lib/services/cognitiveServicesQnAMaker/lib/models/updateQnaDTO.js @@ -0,0 +1,96 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * PATCH Body schema for Update Qna List + * + */ +class UpdateQnaDTO { + /** + * Create a UpdateQnaDTO. + * @property {number} [id] Unique id for the Q-A + * @property {string} [answer] Answer text + * @property {string} [source] Source from which Q-A was indexed. eg. + * https://docs.microsoft.com/en-us/azure/cognitive-services/QnAMaker/FAQs + * @property {object} [questions] List of questions associated with the + * answer. + * @property {object} [metadata] List of metadata associated with the answer + * to be updated + */ + constructor() { + } + + /** + * Defines the metadata of UpdateQnaDTO + * + * @returns {object} metadata of UpdateQnaDTO + * + */ + mapper() { + return { + required: false, + serializedName: 'UpdateQnaDTO', + type: { + name: 'Composite', + className: 'UpdateQnaDTO', + modelProperties: { + id: { + required: false, + serializedName: 'id', + constraints: { + InclusiveMaximum: 2147483647, + InclusiveMinimum: 0 + }, + type: { + name: 'Number' + } + }, + answer: { + required: false, + serializedName: 'answer', + type: { + name: 'String' + } + }, + source: { + required: false, + serializedName: 'source', + constraints: { + MaxLength: 300 + }, + type: { + name: 'String' + } + }, + questions: { + required: false, + serializedName: 'questions', + type: { + name: 'Composite', + className: 'UpdateQnaDTOQuestions' + } + }, + metadata: { + required: false, + serializedName: 'metadata', + type: { + name: 'Composite', + className: 'UpdateQnaDTOMetadata' + } + } + } + } + }; + } +} + +module.exports = UpdateQnaDTO; diff --git a/lib/services/cognitiveServicesQnAMaker/lib/models/updateQnaDTOMetadata.js b/lib/services/cognitiveServicesQnAMaker/lib/models/updateQnaDTOMetadata.js new file mode 100644 index 0000000000..a66f383532 --- /dev/null +++ b/lib/services/cognitiveServicesQnAMaker/lib/models/updateQnaDTOMetadata.js @@ -0,0 +1,78 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * List of metadata associated with the answer to be updated + * + * @extends models['UpdateMetadataDTO'] + */ +class UpdateQnaDTOMetadata extends models['UpdateMetadataDTO'] { + /** + * Create a UpdateQnaDTOMetadata. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of UpdateQnaDTOMetadata + * + * @returns {object} metadata of UpdateQnaDTOMetadata + * + */ + mapper() { + return { + required: false, + serializedName: 'UpdateQnaDTO_metadata', + type: { + name: 'Composite', + className: 'UpdateQnaDTOMetadata', + modelProperties: { + deleteProperty: { + required: false, + serializedName: 'delete', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'MetadataDTOElementType', + type: { + name: 'Composite', + className: 'MetadataDTO' + } + } + } + }, + add: { + required: false, + serializedName: 'add', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'MetadataDTOElementType', + type: { + name: 'Composite', + className: 'MetadataDTO' + } + } + } + } + } + } + }; + } +} + +module.exports = UpdateQnaDTOMetadata; diff --git a/lib/services/cognitiveServicesQnAMaker/lib/models/updateQnaDTOQuestions.js b/lib/services/cognitiveServicesQnAMaker/lib/models/updateQnaDTOQuestions.js new file mode 100644 index 0000000000..588f561385 --- /dev/null +++ b/lib/services/cognitiveServicesQnAMaker/lib/models/updateQnaDTOQuestions.js @@ -0,0 +1,76 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * List of questions associated with the answer. + * + * @extends models['UpdateQuestionsDTO'] + */ +class UpdateQnaDTOQuestions extends models['UpdateQuestionsDTO'] { + /** + * Create a UpdateQnaDTOQuestions. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of UpdateQnaDTOQuestions + * + * @returns {object} metadata of UpdateQnaDTOQuestions + * + */ + mapper() { + return { + required: false, + serializedName: 'UpdateQnaDTO_questions', + type: { + name: 'Composite', + className: 'UpdateQnaDTOQuestions', + modelProperties: { + add: { + required: false, + serializedName: 'add', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + deleteProperty: { + required: false, + serializedName: 'delete', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + }; + } +} + +module.exports = UpdateQnaDTOQuestions; diff --git a/lib/services/cognitiveServicesQnAMaker/lib/models/updateQuestionsDTO.js b/lib/services/cognitiveServicesQnAMaker/lib/models/updateQuestionsDTO.js new file mode 100644 index 0000000000..c9ce1a7844 --- /dev/null +++ b/lib/services/cognitiveServicesQnAMaker/lib/models/updateQuestionsDTO.js @@ -0,0 +1,75 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * PATCH Body schema for Update Kb which contains list of questions to be added + * and deleted + * + */ +class UpdateQuestionsDTO { + /** + * Create a UpdateQuestionsDTO. + * @property {array} [add] List of questions to be added + * @property {array} [deleteProperty] List of questions to be deleted. + */ + constructor() { + } + + /** + * Defines the metadata of UpdateQuestionsDTO + * + * @returns {object} metadata of UpdateQuestionsDTO + * + */ + mapper() { + return { + required: false, + serializedName: 'UpdateQuestionsDTO', + type: { + name: 'Composite', + className: 'UpdateQuestionsDTO', + modelProperties: { + add: { + required: false, + serializedName: 'add', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + deleteProperty: { + required: false, + serializedName: 'delete', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + }; + } +} + +module.exports = UpdateQuestionsDTO; diff --git a/lib/services/cognitiveServicesQnAMaker/lib/models/wordAlterationsDTO.js b/lib/services/cognitiveServicesQnAMaker/lib/models/wordAlterationsDTO.js new file mode 100644 index 0000000000..4cb195498b --- /dev/null +++ b/lib/services/cognitiveServicesQnAMaker/lib/models/wordAlterationsDTO.js @@ -0,0 +1,60 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Collection of word alterations. + * + */ +class WordAlterationsDTO { + /** + * Create a WordAlterationsDTO. + * @property {array} wordAlterations Collection of word alterations. + */ + constructor() { + } + + /** + * Defines the metadata of WordAlterationsDTO + * + * @returns {object} metadata of WordAlterationsDTO + * + */ + mapper() { + return { + required: false, + serializedName: 'WordAlterationsDTO', + type: { + name: 'Composite', + className: 'WordAlterationsDTO', + modelProperties: { + wordAlterations: { + required: true, + serializedName: 'wordAlterations', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'AlterationsDTOElementType', + type: { + name: 'Composite', + className: 'AlterationsDTO' + } + } + } + } + } + } + }; + } +} + +module.exports = WordAlterationsDTO; diff --git a/lib/services/cognitiveServicesQnAMaker/lib/operations/alterations.js b/lib/services/cognitiveServicesQnAMaker/lib/operations/alterations.js new file mode 100644 index 0000000000..1362f95c79 --- /dev/null +++ b/lib/services/cognitiveServicesQnAMaker/lib/operations/alterations.js @@ -0,0 +1,433 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const WebResource = msRest.WebResource; + +/** + * @summary Download alterations from runtime. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link WordAlterationsDTO} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _get(options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.endpoint === null || this.client.endpoint === undefined || typeof this.client.endpoint.valueOf() !== 'string') { + throw new Error('this.client.endpoint cannot be null or undefined and it must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'alterations'; + requestUrl = requestUrl.replace('{Endpoint}', this.client.endpoint); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorResponse']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['WordAlterationsDTO']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Replace alterations data. + * + * @param {object} wordAlterations New alterations data. + * + * @param {array} wordAlterations.wordAlterations Collection of word + * alterations. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _replace(wordAlterations, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.endpoint === null || this.client.endpoint === undefined || typeof this.client.endpoint.valueOf() !== 'string') { + throw new Error('this.client.endpoint cannot be null or undefined and it must be of type string.'); + } + if (wordAlterations === null || wordAlterations === undefined) { + throw new Error('wordAlterations cannot be null or undefined.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'alterations'; + requestUrl = requestUrl.replace('{Endpoint}', this.client.endpoint); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PUT'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (wordAlterations !== null && wordAlterations !== undefined) { + let requestModelMapper = new client.models['WordAlterationsDTO']().mapper(); + requestModel = client.serialize(requestModelMapper, wordAlterations, 'wordAlterations'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(wordAlterations, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 204) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorResponse']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a Alterations. */ +class Alterations { + /** + * Create a Alterations. + * @param {QnAMakerClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._get = _get; + this._replace = _replace; + } + + /** + * @summary Download alterations from runtime. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getWithHttpOperationResponse(options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Download alterations from runtime. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {WordAlterationsDTO} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link WordAlterationsDTO} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + get(options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._get(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(options, optionalCallback); + } + } + + /** + * @summary Replace alterations data. + * + * @param {object} wordAlterations New alterations data. + * + * @param {array} wordAlterations.wordAlterations Collection of word + * alterations. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + replaceWithHttpOperationResponse(wordAlterations, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._replace(wordAlterations, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Replace alterations data. + * + * @param {object} wordAlterations New alterations data. + * + * @param {array} wordAlterations.wordAlterations Collection of word + * alterations. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + replace(wordAlterations, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._replace(wordAlterations, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._replace(wordAlterations, options, optionalCallback); + } + } + +} + +module.exports = Alterations; diff --git a/lib/services/cognitiveServicesQnAMaker/lib/operations/endpointKeys.js b/lib/services/cognitiveServicesQnAMaker/lib/operations/endpointKeys.js new file mode 100644 index 0000000000..19fac9f19a --- /dev/null +++ b/lib/services/cognitiveServicesQnAMaker/lib/operations/endpointKeys.js @@ -0,0 +1,430 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const WebResource = msRest.WebResource; + +/** + * @summary Gets endpoint keys for an endpoint + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link EndpointKeysDTO} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getKeys(options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.endpoint === null || this.client.endpoint === undefined || typeof this.client.endpoint.valueOf() !== 'string') { + throw new Error('this.client.endpoint cannot be null or undefined and it must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'endpointkeys'; + requestUrl = requestUrl.replace('{Endpoint}', this.client.endpoint); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorResponse']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['EndpointKeysDTO']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Re-generates an endpoint key. + * + * @param {string} keyType Type of Key + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link EndpointKeysDTO} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _refreshKeys(keyType, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.endpoint === null || this.client.endpoint === undefined || typeof this.client.endpoint.valueOf() !== 'string') { + throw new Error('this.client.endpoint cannot be null or undefined and it must be of type string.'); + } + if (keyType === null || keyType === undefined || typeof keyType.valueOf() !== 'string') { + throw new Error('keyType cannot be null or undefined and it must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'endpointkeys/{keyType}'; + requestUrl = requestUrl.replace('{Endpoint}', this.client.endpoint); + requestUrl = requestUrl.replace('{keyType}', encodeURIComponent(keyType)); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PATCH'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorResponse']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['EndpointKeysDTO']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a EndpointKeys. */ +class EndpointKeys { + /** + * Create a EndpointKeys. + * @param {QnAMakerClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._getKeys = _getKeys; + this._refreshKeys = _refreshKeys; + } + + /** + * @summary Gets endpoint keys for an endpoint + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getKeysWithHttpOperationResponse(options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._getKeys(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets endpoint keys for an endpoint + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {EndpointKeysDTO} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link EndpointKeysDTO} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getKeys(options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getKeys(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getKeys(options, optionalCallback); + } + } + + /** + * @summary Re-generates an endpoint key. + * + * @param {string} keyType Type of Key + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + refreshKeysWithHttpOperationResponse(keyType, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._refreshKeys(keyType, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Re-generates an endpoint key. + * + * @param {string} keyType Type of Key + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {EndpointKeysDTO} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link EndpointKeysDTO} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + refreshKeys(keyType, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._refreshKeys(keyType, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._refreshKeys(keyType, options, optionalCallback); + } + } + +} + +module.exports = EndpointKeys; diff --git a/lib/services/cognitiveServicesQnAMaker/lib/operations/index.d.ts b/lib/services/cognitiveServicesQnAMaker/lib/operations/index.d.ts new file mode 100644 index 0000000000..34ae72e068 --- /dev/null +++ b/lib/services/cognitiveServicesQnAMaker/lib/operations/index.d.ts @@ -0,0 +1,864 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. +*/ + +import { ServiceClientOptions, RequestOptions, ServiceCallback, HttpOperationResponse } from 'ms-rest'; +import * as models from '../models'; + + +/** + * @class + * EndpointKeys + * __NOTE__: An instance of this class is automatically created for an + * instance of the QnAMakerClient. + */ +export interface EndpointKeys { + + + /** + * @summary Gets endpoint keys for an endpoint + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getKeysWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets endpoint keys for an endpoint + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {EndpointKeysDTO} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {EndpointKeysDTO} [result] - The deserialized result object if an error did not occur. + * See {@link EndpointKeysDTO} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getKeys(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getKeys(callback: ServiceCallback): void; + getKeys(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Re-generates an endpoint key. + * + * @param {string} keyType Type of Key + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + refreshKeysWithHttpOperationResponse(keyType: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Re-generates an endpoint key. + * + * @param {string} keyType Type of Key + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {EndpointKeysDTO} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {EndpointKeysDTO} [result] - The deserialized result object if an error did not occur. + * See {@link EndpointKeysDTO} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + refreshKeys(keyType: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + refreshKeys(keyType: string, callback: ServiceCallback): void; + refreshKeys(keyType: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * Alterations + * __NOTE__: An instance of this class is automatically created for an + * instance of the QnAMakerClient. + */ +export interface Alterations { + + + /** + * @summary Download alterations from runtime. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Download alterations from runtime. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {WordAlterationsDTO} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {WordAlterationsDTO} [result] - The deserialized result object if an error did not occur. + * See {@link WordAlterationsDTO} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + get(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(callback: ServiceCallback): void; + get(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Replace alterations data. + * + * @param {object} wordAlterations New alterations data. + * + * @param {array} wordAlterations.wordAlterations Collection of word + * alterations. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + replaceWithHttpOperationResponse(wordAlterations: models.WordAlterationsDTO, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Replace alterations data. + * + * @param {object} wordAlterations New alterations data. + * + * @param {array} wordAlterations.wordAlterations Collection of word + * alterations. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + replace(wordAlterations: models.WordAlterationsDTO, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + replace(wordAlterations: models.WordAlterationsDTO, callback: ServiceCallback): void; + replace(wordAlterations: models.WordAlterationsDTO, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * Knowledgebase + * __NOTE__: An instance of this class is automatically created for an + * instance of the QnAMakerClient. + */ +export interface Knowledgebase { + + + /** + * @summary Gets all knowledgebases for a user. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listAllWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets all knowledgebases for a user. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {KnowledgebasesDTO} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {KnowledgebasesDTO} [result] - The deserialized result object if an error did not occur. + * See {@link KnowledgebasesDTO} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listAll(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listAll(callback: ServiceCallback): void; + listAll(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Gets details of a specific knowledgebase. + * + * @param {string} kbId Knowledgebase id. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getDetailsWithHttpOperationResponse(kbId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets details of a specific knowledgebase. + * + * @param {string} kbId Knowledgebase id. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {KnowledgebaseDTO} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {KnowledgebaseDTO} [result] - The deserialized result object if an error did not occur. + * See {@link KnowledgebaseDTO} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getDetails(kbId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getDetails(kbId: string, callback: ServiceCallback): void; + getDetails(kbId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Deletes the knowledgebase and all its data. + * + * @param {string} kbId Knowledgebase id. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + deleteMethodWithHttpOperationResponse(kbId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Deletes the knowledgebase and all its data. + * + * @param {string} kbId Knowledgebase id. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(kbId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(kbId: string, callback: ServiceCallback): void; + deleteMethod(kbId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Publishes all changes in test index of a knowledgebase to its prod + * index. + * + * @param {string} kbId Knowledgebase id. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + publishWithHttpOperationResponse(kbId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Publishes all changes in test index of a knowledgebase to its prod + * index. + * + * @param {string} kbId Knowledgebase id. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + publish(kbId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + publish(kbId: string, callback: ServiceCallback): void; + publish(kbId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Replace knowledgebase contents. + * + * @param {string} kbId Knowledgebase id. + * + * @param {object} replaceKb An instance of ReplaceKbDTO which contains list of + * qnas to be uploaded + * + * @param {array} replaceKb.qnAList List of Q-A (QnADTO) to be added to the + * knowledgebase. Q-A Ids are assigned by the service and should be omitted. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + replaceWithHttpOperationResponse(kbId: string, replaceKb: models.ReplaceKbDTO, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Replace knowledgebase contents. + * + * @param {string} kbId Knowledgebase id. + * + * @param {object} replaceKb An instance of ReplaceKbDTO which contains list of + * qnas to be uploaded + * + * @param {array} replaceKb.qnAList List of Q-A (QnADTO) to be added to the + * knowledgebase. Q-A Ids are assigned by the service and should be omitted. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + replace(kbId: string, replaceKb: models.ReplaceKbDTO, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + replace(kbId: string, replaceKb: models.ReplaceKbDTO, callback: ServiceCallback): void; + replace(kbId: string, replaceKb: models.ReplaceKbDTO, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Asynchronous operation to modify a knowledgebase. + * + * @param {string} kbId Knowledgebase id. + * + * @param {object} updateKb Post body of the request. + * + * @param {object} [updateKb.add] An instance of CreateKbInputDTO for add + * operation + * + * @param {array} [updateKb.add.qnaList] List of QNA to be added to the index. + * Ids are generated by the service and should be omitted. + * + * @param {array} [updateKb.add.urls] List of URLs to be added to + * knowledgebase. + * + * @param {array} [updateKb.add.files] List of files to be added to + * knowledgebase. + * + * @param {object} [updateKb.deleteProperty] An instance of DeleteKbContentsDTO + * for delete Operation + * + * @param {array} [updateKb.deleteProperty.ids] List of Qna Ids to be deleted + * + * @param {array} [updateKb.deleteProperty.sources] List of sources to be + * deleted from knowledgebase. + * + * @param {object} [updateKb.update] An instance of UpdateKbContentsDTO for + * Update Operation + * + * @param {string} [updateKb.update.name] Friendly name for the knowledgebase. + * + * @param {array} [updateKb.update.qnaList] List of Q-A (UpdateQnaDTO) to be + * added to the knowledgebase. + * + * @param {array} [updateKb.update.urls] List of existing URLs to be refreshed. + * The content will be extracted again and re-indexed. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + updateWithHttpOperationResponse(kbId: string, updateKb: models.UpdateKbOperationDTO, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Asynchronous operation to modify a knowledgebase. + * + * @param {string} kbId Knowledgebase id. + * + * @param {object} updateKb Post body of the request. + * + * @param {object} [updateKb.add] An instance of CreateKbInputDTO for add + * operation + * + * @param {array} [updateKb.add.qnaList] List of QNA to be added to the index. + * Ids are generated by the service and should be omitted. + * + * @param {array} [updateKb.add.urls] List of URLs to be added to + * knowledgebase. + * + * @param {array} [updateKb.add.files] List of files to be added to + * knowledgebase. + * + * @param {object} [updateKb.deleteProperty] An instance of DeleteKbContentsDTO + * for delete Operation + * + * @param {array} [updateKb.deleteProperty.ids] List of Qna Ids to be deleted + * + * @param {array} [updateKb.deleteProperty.sources] List of sources to be + * deleted from knowledgebase. + * + * @param {object} [updateKb.update] An instance of UpdateKbContentsDTO for + * Update Operation + * + * @param {string} [updateKb.update.name] Friendly name for the knowledgebase. + * + * @param {array} [updateKb.update.qnaList] List of Q-A (UpdateQnaDTO) to be + * added to the knowledgebase. + * + * @param {array} [updateKb.update.urls] List of existing URLs to be refreshed. + * The content will be extracted again and re-indexed. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {Operation} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {Operation} [result] - The deserialized result object if an error did not occur. + * See {@link Operation} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + update(kbId: string, updateKb: models.UpdateKbOperationDTO, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(kbId: string, updateKb: models.UpdateKbOperationDTO, callback: ServiceCallback): void; + update(kbId: string, updateKb: models.UpdateKbOperationDTO, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Asynchronous operation to create a new knowledgebase. + * + * @param {object} createKbPayload Post body of the request. + * + * @param {string} createKbPayload.name Friendly name for the knowledgebase. + * + * @param {array} [createKbPayload.qnaList] List of Q-A (QnADTO) to be added to + * the knowledgebase. Q-A Ids are assigned by the service and should be + * omitted. + * + * @param {array} [createKbPayload.urls] List of URLs to be used for extracting + * Q-A. + * + * @param {array} [createKbPayload.files] List of files from which to Extract + * Q-A. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + createWithHttpOperationResponse(createKbPayload: models.CreateKbDTO, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Asynchronous operation to create a new knowledgebase. + * + * @param {object} createKbPayload Post body of the request. + * + * @param {string} createKbPayload.name Friendly name for the knowledgebase. + * + * @param {array} [createKbPayload.qnaList] List of Q-A (QnADTO) to be added to + * the knowledgebase. Q-A Ids are assigned by the service and should be + * omitted. + * + * @param {array} [createKbPayload.urls] List of URLs to be used for extracting + * Q-A. + * + * @param {array} [createKbPayload.files] List of files from which to Extract + * Q-A. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {Operation} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {Operation} [result] - The deserialized result object if an error did not occur. + * See {@link Operation} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + create(createKbPayload: models.CreateKbDTO, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + create(createKbPayload: models.CreateKbDTO, callback: ServiceCallback): void; + create(createKbPayload: models.CreateKbDTO, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Download the knowledgebase. + * + * @param {string} kbId Knowledgebase id. + * + * @param {string} environment Specifies whether environment is Test or Prod. + * Possible values include: 'Prod', 'Test' + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + downloadWithHttpOperationResponse(kbId: string, environment: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Download the knowledgebase. + * + * @param {string} kbId Knowledgebase id. + * + * @param {string} environment Specifies whether environment is Test or Prod. + * Possible values include: 'Prod', 'Test' + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {QnADocumentsDTO} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {QnADocumentsDTO} [result] - The deserialized result object if an error did not occur. + * See {@link QnADocumentsDTO} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + download(kbId: string, environment: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + download(kbId: string, environment: string, callback: ServiceCallback): void; + download(kbId: string, environment: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * Operations + * __NOTE__: An instance of this class is automatically created for an + * instance of the QnAMakerClient. + */ +export interface Operations { + + + /** + * @summary Gets details of a specific long running operation. + * + * @param {string} operationId Operation id. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getDetailsWithHttpOperationResponse(operationId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets details of a specific long running operation. + * + * @param {string} operationId Operation id. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {Operation} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {Operation} [result] - The deserialized result object if an error did not occur. + * See {@link Operation} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getDetails(operationId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getDetails(operationId: string, callback: ServiceCallback): void; + getDetails(operationId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} diff --git a/lib/services/cognitiveServicesQnAMaker/lib/operations/index.js b/lib/services/cognitiveServicesQnAMaker/lib/operations/index.js new file mode 100644 index 0000000000..e9106ddcdd --- /dev/null +++ b/lib/services/cognitiveServicesQnAMaker/lib/operations/index.js @@ -0,0 +1,20 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +/* jshint latedef:false */ +/* jshint forin:false */ +/* jshint noempty:false */ + +'use strict'; + +exports.EndpointKeys = require('./endpointKeys'); +exports.Alterations = require('./alterations'); +exports.Knowledgebase = require('./knowledgebase'); +exports.Operations = require('./operations'); diff --git a/lib/services/cognitiveServicesQnAMaker/lib/operations/knowledgebase.js b/lib/services/cognitiveServicesQnAMaker/lib/operations/knowledgebase.js new file mode 100644 index 0000000000..4aec04a4c6 --- /dev/null +++ b/lib/services/cognitiveServicesQnAMaker/lib/operations/knowledgebase.js @@ -0,0 +1,1825 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const WebResource = msRest.WebResource; + +/** + * @summary Gets all knowledgebases for a user. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link KnowledgebasesDTO} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listAll(options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.endpoint === null || this.client.endpoint === undefined || typeof this.client.endpoint.valueOf() !== 'string') { + throw new Error('this.client.endpoint cannot be null or undefined and it must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'knowledgebases'; + requestUrl = requestUrl.replace('{Endpoint}', this.client.endpoint); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorResponse']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['KnowledgebasesDTO']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets details of a specific knowledgebase. + * + * @param {string} kbId Knowledgebase id. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link KnowledgebaseDTO} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getDetails(kbId, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.endpoint === null || this.client.endpoint === undefined || typeof this.client.endpoint.valueOf() !== 'string') { + throw new Error('this.client.endpoint cannot be null or undefined and it must be of type string.'); + } + if (kbId === null || kbId === undefined || typeof kbId.valueOf() !== 'string') { + throw new Error('kbId cannot be null or undefined and it must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'knowledgebases/{kbId}'; + requestUrl = requestUrl.replace('{Endpoint}', this.client.endpoint); + requestUrl = requestUrl.replace('{kbId}', encodeURIComponent(kbId)); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorResponse']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['KnowledgebaseDTO']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Deletes the knowledgebase and all its data. + * + * @param {string} kbId Knowledgebase id. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _deleteMethod(kbId, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.endpoint === null || this.client.endpoint === undefined || typeof this.client.endpoint.valueOf() !== 'string') { + throw new Error('this.client.endpoint cannot be null or undefined and it must be of type string.'); + } + if (kbId === null || kbId === undefined || typeof kbId.valueOf() !== 'string') { + throw new Error('kbId cannot be null or undefined and it must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'knowledgebases/{kbId}'; + requestUrl = requestUrl.replace('{Endpoint}', this.client.endpoint); + requestUrl = requestUrl.replace('{kbId}', encodeURIComponent(kbId)); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'DELETE'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 204) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorResponse']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Publishes all changes in test index of a knowledgebase to its prod + * index. + * + * @param {string} kbId Knowledgebase id. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _publish(kbId, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.endpoint === null || this.client.endpoint === undefined || typeof this.client.endpoint.valueOf() !== 'string') { + throw new Error('this.client.endpoint cannot be null or undefined and it must be of type string.'); + } + if (kbId === null || kbId === undefined || typeof kbId.valueOf() !== 'string') { + throw new Error('kbId cannot be null or undefined and it must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'knowledgebases/{kbId}'; + requestUrl = requestUrl.replace('{Endpoint}', this.client.endpoint); + requestUrl = requestUrl.replace('{kbId}', encodeURIComponent(kbId)); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 204) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorResponse']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Replace knowledgebase contents. + * + * @param {string} kbId Knowledgebase id. + * + * @param {object} replaceKb An instance of ReplaceKbDTO which contains list of + * qnas to be uploaded + * + * @param {array} replaceKb.qnAList List of Q-A (QnADTO) to be added to the + * knowledgebase. Q-A Ids are assigned by the service and should be omitted. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _replace(kbId, replaceKb, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.endpoint === null || this.client.endpoint === undefined || typeof this.client.endpoint.valueOf() !== 'string') { + throw new Error('this.client.endpoint cannot be null or undefined and it must be of type string.'); + } + if (kbId === null || kbId === undefined || typeof kbId.valueOf() !== 'string') { + throw new Error('kbId cannot be null or undefined and it must be of type string.'); + } + if (replaceKb === null || replaceKb === undefined) { + throw new Error('replaceKb cannot be null or undefined.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'knowledgebases/{kbId}'; + requestUrl = requestUrl.replace('{Endpoint}', this.client.endpoint); + requestUrl = requestUrl.replace('{kbId}', encodeURIComponent(kbId)); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PUT'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (replaceKb !== null && replaceKb !== undefined) { + let requestModelMapper = new client.models['ReplaceKbDTO']().mapper(); + requestModel = client.serialize(requestModelMapper, replaceKb, 'replaceKb'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(replaceKb, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 204) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorResponse']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Asynchronous operation to modify a knowledgebase. + * + * @param {string} kbId Knowledgebase id. + * + * @param {object} updateKb Post body of the request. + * + * @param {object} [updateKb.add] An instance of CreateKbInputDTO for add + * operation + * + * @param {array} [updateKb.add.qnaList] List of QNA to be added to the index. + * Ids are generated by the service and should be omitted. + * + * @param {array} [updateKb.add.urls] List of URLs to be added to + * knowledgebase. + * + * @param {array} [updateKb.add.files] List of files to be added to + * knowledgebase. + * + * @param {object} [updateKb.deleteProperty] An instance of DeleteKbContentsDTO + * for delete Operation + * + * @param {array} [updateKb.deleteProperty.ids] List of Qna Ids to be deleted + * + * @param {array} [updateKb.deleteProperty.sources] List of sources to be + * deleted from knowledgebase. + * + * @param {object} [updateKb.update] An instance of UpdateKbContentsDTO for + * Update Operation + * + * @param {string} [updateKb.update.name] Friendly name for the knowledgebase. + * + * @param {array} [updateKb.update.qnaList] List of Q-A (UpdateQnaDTO) to be + * added to the knowledgebase. + * + * @param {array} [updateKb.update.urls] List of existing URLs to be refreshed. + * The content will be extracted again and re-indexed. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Operation} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _update(kbId, updateKb, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.endpoint === null || this.client.endpoint === undefined || typeof this.client.endpoint.valueOf() !== 'string') { + throw new Error('this.client.endpoint cannot be null or undefined and it must be of type string.'); + } + if (kbId === null || kbId === undefined || typeof kbId.valueOf() !== 'string') { + throw new Error('kbId cannot be null or undefined and it must be of type string.'); + } + if (updateKb === null || updateKb === undefined) { + throw new Error('updateKb cannot be null or undefined.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'knowledgebases/{kbId}'; + requestUrl = requestUrl.replace('{Endpoint}', this.client.endpoint); + requestUrl = requestUrl.replace('{kbId}', encodeURIComponent(kbId)); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PATCH'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (updateKb !== null && updateKb !== undefined) { + let requestModelMapper = new client.models['UpdateKbOperationDTO']().mapper(); + requestModel = client.serialize(requestModelMapper, updateKb, 'updateKb'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(updateKb, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorResponse']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 202) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['Operation']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Asynchronous operation to create a new knowledgebase. + * + * @param {object} createKbPayload Post body of the request. + * + * @param {string} createKbPayload.name Friendly name for the knowledgebase. + * + * @param {array} [createKbPayload.qnaList] List of Q-A (QnADTO) to be added to + * the knowledgebase. Q-A Ids are assigned by the service and should be + * omitted. + * + * @param {array} [createKbPayload.urls] List of URLs to be used for extracting + * Q-A. + * + * @param {array} [createKbPayload.files] List of files from which to Extract + * Q-A. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Operation} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _create(createKbPayload, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.endpoint === null || this.client.endpoint === undefined || typeof this.client.endpoint.valueOf() !== 'string') { + throw new Error('this.client.endpoint cannot be null or undefined and it must be of type string.'); + } + if (createKbPayload === null || createKbPayload === undefined) { + throw new Error('createKbPayload cannot be null or undefined.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'knowledgebases/create'; + requestUrl = requestUrl.replace('{Endpoint}', this.client.endpoint); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (createKbPayload !== null && createKbPayload !== undefined) { + let requestModelMapper = new client.models['CreateKbDTO']().mapper(); + requestModel = client.serialize(requestModelMapper, createKbPayload, 'createKbPayload'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(createKbPayload, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorResponse']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 202) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['Operation']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Download the knowledgebase. + * + * @param {string} kbId Knowledgebase id. + * + * @param {string} environment Specifies whether environment is Test or Prod. + * Possible values include: 'Prod', 'Test' + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link QnADocumentsDTO} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _download(kbId, environment, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.endpoint === null || this.client.endpoint === undefined || typeof this.client.endpoint.valueOf() !== 'string') { + throw new Error('this.client.endpoint cannot be null or undefined and it must be of type string.'); + } + if (kbId === null || kbId === undefined || typeof kbId.valueOf() !== 'string') { + throw new Error('kbId cannot be null or undefined and it must be of type string.'); + } + if (environment === null || environment === undefined || typeof environment.valueOf() !== 'string') { + throw new Error('environment cannot be null or undefined and it must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'knowledgebases/{kbId}/{environment}/qna'; + requestUrl = requestUrl.replace('{Endpoint}', this.client.endpoint); + requestUrl = requestUrl.replace('{kbId}', encodeURIComponent(kbId)); + requestUrl = requestUrl.replace('{environment}', encodeURIComponent(environment)); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorResponse']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['QnADocumentsDTO']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a Knowledgebase. */ +class Knowledgebase { + /** + * Create a Knowledgebase. + * @param {QnAMakerClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._listAll = _listAll; + this._getDetails = _getDetails; + this._deleteMethod = _deleteMethod; + this._publish = _publish; + this._replace = _replace; + this._update = _update; + this._create = _create; + this._download = _download; + } + + /** + * @summary Gets all knowledgebases for a user. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listAllWithHttpOperationResponse(options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listAll(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets all knowledgebases for a user. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {KnowledgebasesDTO} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link KnowledgebasesDTO} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listAll(options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listAll(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listAll(options, optionalCallback); + } + } + + /** + * @summary Gets details of a specific knowledgebase. + * + * @param {string} kbId Knowledgebase id. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getDetailsWithHttpOperationResponse(kbId, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._getDetails(kbId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets details of a specific knowledgebase. + * + * @param {string} kbId Knowledgebase id. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {KnowledgebaseDTO} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link KnowledgebaseDTO} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getDetails(kbId, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getDetails(kbId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getDetails(kbId, options, optionalCallback); + } + } + + /** + * @summary Deletes the knowledgebase and all its data. + * + * @param {string} kbId Knowledgebase id. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + deleteMethodWithHttpOperationResponse(kbId, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(kbId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Deletes the knowledgebase and all its data. + * + * @param {string} kbId Knowledgebase id. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(kbId, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteMethod(kbId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(kbId, options, optionalCallback); + } + } + + /** + * @summary Publishes all changes in test index of a knowledgebase to its prod + * index. + * + * @param {string} kbId Knowledgebase id. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + publishWithHttpOperationResponse(kbId, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._publish(kbId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Publishes all changes in test index of a knowledgebase to its prod + * index. + * + * @param {string} kbId Knowledgebase id. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + publish(kbId, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._publish(kbId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._publish(kbId, options, optionalCallback); + } + } + + /** + * @summary Replace knowledgebase contents. + * + * @param {string} kbId Knowledgebase id. + * + * @param {object} replaceKb An instance of ReplaceKbDTO which contains list of + * qnas to be uploaded + * + * @param {array} replaceKb.qnAList List of Q-A (QnADTO) to be added to the + * knowledgebase. Q-A Ids are assigned by the service and should be omitted. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + replaceWithHttpOperationResponse(kbId, replaceKb, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._replace(kbId, replaceKb, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Replace knowledgebase contents. + * + * @param {string} kbId Knowledgebase id. + * + * @param {object} replaceKb An instance of ReplaceKbDTO which contains list of + * qnas to be uploaded + * + * @param {array} replaceKb.qnAList List of Q-A (QnADTO) to be added to the + * knowledgebase. Q-A Ids are assigned by the service and should be omitted. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + replace(kbId, replaceKb, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._replace(kbId, replaceKb, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._replace(kbId, replaceKb, options, optionalCallback); + } + } + + /** + * @summary Asynchronous operation to modify a knowledgebase. + * + * @param {string} kbId Knowledgebase id. + * + * @param {object} updateKb Post body of the request. + * + * @param {object} [updateKb.add] An instance of CreateKbInputDTO for add + * operation + * + * @param {array} [updateKb.add.qnaList] List of QNA to be added to the index. + * Ids are generated by the service and should be omitted. + * + * @param {array} [updateKb.add.urls] List of URLs to be added to + * knowledgebase. + * + * @param {array} [updateKb.add.files] List of files to be added to + * knowledgebase. + * + * @param {object} [updateKb.deleteProperty] An instance of DeleteKbContentsDTO + * for delete Operation + * + * @param {array} [updateKb.deleteProperty.ids] List of Qna Ids to be deleted + * + * @param {array} [updateKb.deleteProperty.sources] List of sources to be + * deleted from knowledgebase. + * + * @param {object} [updateKb.update] An instance of UpdateKbContentsDTO for + * Update Operation + * + * @param {string} [updateKb.update.name] Friendly name for the knowledgebase. + * + * @param {array} [updateKb.update.qnaList] List of Q-A (UpdateQnaDTO) to be + * added to the knowledgebase. + * + * @param {array} [updateKb.update.urls] List of existing URLs to be refreshed. + * The content will be extracted again and re-indexed. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + updateWithHttpOperationResponse(kbId, updateKb, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._update(kbId, updateKb, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Asynchronous operation to modify a knowledgebase. + * + * @param {string} kbId Knowledgebase id. + * + * @param {object} updateKb Post body of the request. + * + * @param {object} [updateKb.add] An instance of CreateKbInputDTO for add + * operation + * + * @param {array} [updateKb.add.qnaList] List of QNA to be added to the index. + * Ids are generated by the service and should be omitted. + * + * @param {array} [updateKb.add.urls] List of URLs to be added to + * knowledgebase. + * + * @param {array} [updateKb.add.files] List of files to be added to + * knowledgebase. + * + * @param {object} [updateKb.deleteProperty] An instance of DeleteKbContentsDTO + * for delete Operation + * + * @param {array} [updateKb.deleteProperty.ids] List of Qna Ids to be deleted + * + * @param {array} [updateKb.deleteProperty.sources] List of sources to be + * deleted from knowledgebase. + * + * @param {object} [updateKb.update] An instance of UpdateKbContentsDTO for + * Update Operation + * + * @param {string} [updateKb.update.name] Friendly name for the knowledgebase. + * + * @param {array} [updateKb.update.qnaList] List of Q-A (UpdateQnaDTO) to be + * added to the knowledgebase. + * + * @param {array} [updateKb.update.urls] List of existing URLs to be refreshed. + * The content will be extracted again and re-indexed. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {Operation} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Operation} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + update(kbId, updateKb, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._update(kbId, updateKb, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._update(kbId, updateKb, options, optionalCallback); + } + } + + /** + * @summary Asynchronous operation to create a new knowledgebase. + * + * @param {object} createKbPayload Post body of the request. + * + * @param {string} createKbPayload.name Friendly name for the knowledgebase. + * + * @param {array} [createKbPayload.qnaList] List of Q-A (QnADTO) to be added to + * the knowledgebase. Q-A Ids are assigned by the service and should be + * omitted. + * + * @param {array} [createKbPayload.urls] List of URLs to be used for extracting + * Q-A. + * + * @param {array} [createKbPayload.files] List of files from which to Extract + * Q-A. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + createWithHttpOperationResponse(createKbPayload, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._create(createKbPayload, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Asynchronous operation to create a new knowledgebase. + * + * @param {object} createKbPayload Post body of the request. + * + * @param {string} createKbPayload.name Friendly name for the knowledgebase. + * + * @param {array} [createKbPayload.qnaList] List of Q-A (QnADTO) to be added to + * the knowledgebase. Q-A Ids are assigned by the service and should be + * omitted. + * + * @param {array} [createKbPayload.urls] List of URLs to be used for extracting + * Q-A. + * + * @param {array} [createKbPayload.files] List of files from which to Extract + * Q-A. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {Operation} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Operation} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + create(createKbPayload, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._create(createKbPayload, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._create(createKbPayload, options, optionalCallback); + } + } + + /** + * @summary Download the knowledgebase. + * + * @param {string} kbId Knowledgebase id. + * + * @param {string} environment Specifies whether environment is Test or Prod. + * Possible values include: 'Prod', 'Test' + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + downloadWithHttpOperationResponse(kbId, environment, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._download(kbId, environment, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Download the knowledgebase. + * + * @param {string} kbId Knowledgebase id. + * + * @param {string} environment Specifies whether environment is Test or Prod. + * Possible values include: 'Prod', 'Test' + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {QnADocumentsDTO} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link QnADocumentsDTO} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + download(kbId, environment, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._download(kbId, environment, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._download(kbId, environment, options, optionalCallback); + } + } + +} + +module.exports = Knowledgebase; diff --git a/lib/services/cognitiveServicesQnAMaker/lib/operations/operations.js b/lib/services/cognitiveServicesQnAMaker/lib/operations/operations.js new file mode 100644 index 0000000000..8e94e97361 --- /dev/null +++ b/lib/services/cognitiveServicesQnAMaker/lib/operations/operations.js @@ -0,0 +1,234 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const WebResource = msRest.WebResource; + +/** + * @summary Gets details of a specific long running operation. + * + * @param {string} operationId Operation id. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Operation} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getDetails(operationId, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.endpoint === null || this.client.endpoint === undefined || typeof this.client.endpoint.valueOf() !== 'string') { + throw new Error('this.client.endpoint cannot be null or undefined and it must be of type string.'); + } + if (operationId === null || operationId === undefined || typeof operationId.valueOf() !== 'string') { + throw new Error('operationId cannot be null or undefined and it must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'operations/{operationId}'; + requestUrl = requestUrl.replace('{Endpoint}', this.client.endpoint); + requestUrl = requestUrl.replace('{operationId}', encodeURIComponent(operationId)); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorResponse']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['Operation']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a Operations. */ +class Operations { + /** + * Create a Operations. + * @param {QnAMakerClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._getDetails = _getDetails; + } + + /** + * @summary Gets details of a specific long running operation. + * + * @param {string} operationId Operation id. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getDetailsWithHttpOperationResponse(operationId, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._getDetails(operationId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets details of a specific long running operation. + * + * @param {string} operationId Operation id. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {Operation} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Operation} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getDetails(operationId, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getDetails(operationId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getDetails(operationId, options, optionalCallback); + } + } + +} + +module.exports = Operations; diff --git a/lib/services/imageSearch/lib/imageSearchAPIClient.d.ts b/lib/services/cognitiveServicesQnAMaker/lib/qnAMakerClient.d.ts similarity index 67% rename from lib/services/imageSearch/lib/imageSearchAPIClient.d.ts rename to lib/services/cognitiveServicesQnAMaker/lib/qnAMakerClient.d.ts index cccff03040..6822553a5d 100644 --- a/lib/services/imageSearch/lib/imageSearchAPIClient.d.ts +++ b/lib/services/cognitiveServicesQnAMaker/lib/qnAMakerClient.d.ts @@ -12,15 +12,15 @@ import { ServiceClient, ServiceClientOptions, ServiceClientCredentials } from 'm import * as models from "./models"; import * as operations from "./operations"; -export default class ImageSearchAPIClient extends ServiceClient { +export default class QnAMakerClient extends ServiceClient { /** * @class - * Initializes a new instance of the ImageSearchAPIClient class. + * Initializes a new instance of the QnAMakerClient class. * @constructor * * @param {credentials} credentials - Subscription credentials which uniquely identify client subscription. * - * @param {string} [baseUri] - The base URI of the service. + * @param {string} endpoint - Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com). * * @param {object} [options] - The parameter options * @@ -32,12 +32,17 @@ export default class ImageSearchAPIClient extends ServiceClient { * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy * */ - constructor(credentials: ServiceClientCredentials, baseUri?: string, options?: ServiceClientOptions); + constructor(credentials: ServiceClientCredentials, endpoint: string, options?: ServiceClientOptions); credentials: ServiceClientCredentials; + endpoint: string; + // Operation groups - imagesOperations: operations.ImagesOperations; + endpointKeys: operations.EndpointKeys; + alterations: operations.Alterations; + knowledgebase: operations.Knowledgebase; + operations: operations.Operations; } -export { ImageSearchAPIClient, models as ImageSearchAPIModels }; +export { QnAMakerClient, models as QnAMakerModels }; diff --git a/lib/services/cognitiveServicesQnAMaker/lib/qnAMakerClient.js b/lib/services/cognitiveServicesQnAMaker/lib/qnAMakerClient.js new file mode 100644 index 0000000000..71f3f5cae4 --- /dev/null +++ b/lib/services/cognitiveServicesQnAMaker/lib/qnAMakerClient.js @@ -0,0 +1,67 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +/* jshint latedef:false */ +/* jshint forin:false */ +/* jshint noempty:false */ + +'use strict'; + +const msRest = require('ms-rest'); +const ServiceClient = msRest.ServiceClient; + +const models = require('./models'); +const operations = require('./operations'); + + +/** Class representing a QnAMakerClient. */ +class QnAMakerClient extends ServiceClient { + /** + * Create a QnAMakerClient. + * @param {credentials} credentials - Subscription credentials which uniquely identify client subscription. + * @param {string} endpoint - Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com). + * @param {object} [options] - The parameter options + * @param {Array} [options.filters] - Filters to be added to the request pipeline + * @param {object} [options.requestOptions] - Options for the underlying request object + * {@link https://github.com/request/request#requestoptions-callback Options doc} + * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy + */ + constructor(credentials, endpoint, options) { + if (credentials === null || credentials === undefined) { + throw new Error('\'credentials\' cannot be null.'); + } + if (endpoint === null || endpoint === undefined) { + throw new Error('\'endpoint\' cannot be null.'); + } + + if (!options) options = {}; + + super(credentials, options); + + this.baseUri = '{Endpoint}/qnamaker/v4.0'; + this.credentials = credentials; + this.endpoint = endpoint; + + let packageInfo = this.getPackageJsonInfo(__dirname); + this.addUserAgentInfo(`${packageInfo.name}/${packageInfo.version}`); + this.endpointKeys = new operations.EndpointKeys(this); + this.alterations = new operations.Alterations(this); + this.knowledgebase = new operations.Knowledgebase(this); + this.operations = new operations.Operations(this); + this.models = models; + msRest.addSerializationMixin(this); + } + +} + +module.exports = QnAMakerClient; +module.exports['default'] = QnAMakerClient; +module.exports.QnAMakerClient = QnAMakerClient; +module.exports.QnAMakerModels = models; diff --git a/lib/services/cognitiveServicesQnAMaker/package.json b/lib/services/cognitiveServicesQnAMaker/package.json new file mode 100644 index 0000000000..b0b41c7786 --- /dev/null +++ b/lib/services/cognitiveServicesQnAMaker/package.json @@ -0,0 +1,24 @@ +{ + "name": "azure-cognitiveservices-qnamaker", + "author": "Microsoft Corporation", + "description": "QnAMakerClient Library with typescript type definitions for node", + "version": "1.0.0", + "dependencies": { + "ms-rest": "^2.3.3" + }, + "keywords": [ + "node", + "azure" + ], + "license": "MIT", + "main": "./lib/qnAMakerClient.js", + "types": "./lib/qnAMakerClient.d.ts", + "homepage": "https://github.com/azure/azure-sdk-for-node/tree/master/lib/services/cognitiveServicesQnAMaker", + "repository": { + "type": "git", + "url": "https://github.com/azure/azure-sdk-for-node.git" + }, + "bugs": { + "url": "https://github.com/azure/azure-sdk-for-node/issues" + } +} diff --git a/lib/services/cognitiveServicesWebSearch/lib/models/answer.js b/lib/services/cognitiveServicesWebSearch/lib/models/answer.js index b7210a7fe1..7a34f8ce90 100644 --- a/lib/services/cognitiveServicesWebSearch/lib/models/answer.js +++ b/lib/services/cognitiveServicesWebSearch/lib/models/answer.js @@ -19,7 +19,7 @@ const models = require('./index'); class Answer extends models['Response'] { /** * Create a Answer. - * @member {array} [followUpQueries] + * @property {array} [followUpQueries] */ constructor() { super(); diff --git a/lib/services/cognitiveServicesWebSearch/lib/models/article.js b/lib/services/cognitiveServicesWebSearch/lib/models/article.js index 1896b5aeec..d094482f96 100644 --- a/lib/services/cognitiveServicesWebSearch/lib/models/article.js +++ b/lib/services/cognitiveServicesWebSearch/lib/models/article.js @@ -19,7 +19,7 @@ const models = require('./index'); class Article extends models['CreativeWork'] { /** * Create a Article. - * @member {number} [wordCount] The number of words in the text of the + * @property {number} [wordCount] The number of words in the text of the * Article. */ constructor() { diff --git a/lib/services/cognitiveServicesWebSearch/lib/models/computation.js b/lib/services/cognitiveServicesWebSearch/lib/models/computation.js index 70d1176b01..1e6bee21b6 100644 --- a/lib/services/cognitiveServicesWebSearch/lib/models/computation.js +++ b/lib/services/cognitiveServicesWebSearch/lib/models/computation.js @@ -20,7 +20,7 @@ const models = require('./index'); class Computation extends models['Answer'] { /** * Create a Computation. - * @member {string} expression The math or conversion expression. If the + * @property {string} expression The math or conversion expression. If the * query contains a request to convert units of measure (for example, meters * to feet), this field contains the from units and value contains the to * units. If the query contains a mathematical expression such as 2+2, this @@ -31,7 +31,7 @@ class Computation extends models['Answer'] { * set to true, the expression string may include formatting markers. For * example, if the user's query is log(2), the normalized expression includes * the subscript markers. For more information, see Hit Highlighting. - * @member {string} value The expression's answer. + * @property {string} value The expression's answer. */ constructor() { super(); diff --git a/lib/services/cognitiveServicesWebSearch/lib/models/creativeWork.js b/lib/services/cognitiveServicesWebSearch/lib/models/creativeWork.js index c19156d764..857bfaa8d1 100644 --- a/lib/services/cognitiveServicesWebSearch/lib/models/creativeWork.js +++ b/lib/services/cognitiveServicesWebSearch/lib/models/creativeWork.js @@ -19,9 +19,9 @@ const models = require('./index'); class CreativeWork extends models['Thing'] { /** * Create a CreativeWork. - * @member {string} [thumbnailUrl] The URL to a thumbnail of the item. - * @member {array} [provider] The source of the creative work. - * @member {string} [text] + * @property {string} [thumbnailUrl] The URL to a thumbnail of the item. + * @property {array} [provider] The source of the creative work. + * @property {string} [text] */ constructor() { super(); diff --git a/lib/services/cognitiveServicesWebSearch/lib/models/errorModel.js b/lib/services/cognitiveServicesWebSearch/lib/models/errorModel.js index 29a10321dd..d827e4885e 100644 --- a/lib/services/cognitiveServicesWebSearch/lib/models/errorModel.js +++ b/lib/services/cognitiveServicesWebSearch/lib/models/errorModel.js @@ -17,22 +17,22 @@ class ErrorModel { /** * Create a ErrorModel. - * @member {string} code The error code that identifies the category of + * @property {string} code The error code that identifies the category of * error. Possible values include: 'None', 'ServerError', 'InvalidRequest', * 'RateLimitExceeded', 'InvalidAuthorization', 'InsufficientAuthorization'. * Default value: 'None' . - * @member {string} [subCode] The error code that further helps to identify + * @property {string} [subCode] The error code that further helps to identify * the error. Possible values include: 'UnexpectedError', 'ResourceError', * 'NotImplemented', 'ParameterMissing', 'ParameterInvalidValue', * 'HttpNotAllowed', 'Blocked', 'AuthorizationMissing', * 'AuthorizationRedundancy', 'AuthorizationDisabled', 'AuthorizationExpired' - * @member {string} message A description of the error. - * @member {string} [moreDetails] A description that provides additional + * @property {string} message A description of the error. + * @property {string} [moreDetails] A description that provides additional * information about the error. - * @member {string} [parameter] The parameter in the request that caused the - * error. - * @member {string} [value] The parameter's value in the request that was not - * valid. + * @property {string} [parameter] The parameter in the request that caused + * the error. + * @property {string} [value] The parameter's value in the request that was + * not valid. */ constructor() { } diff --git a/lib/services/cognitiveServicesWebSearch/lib/models/errorResponse.js b/lib/services/cognitiveServicesWebSearch/lib/models/errorResponse.js index 3b2a7eb37f..753ea85cac 100644 --- a/lib/services/cognitiveServicesWebSearch/lib/models/errorResponse.js +++ b/lib/services/cognitiveServicesWebSearch/lib/models/errorResponse.js @@ -20,8 +20,8 @@ const models = require('./index'); class ErrorResponse extends models['Response'] { /** * Create a ErrorResponse. - * @member {array} errors A list of errors that describe the reasons why the - * request failed. + * @property {array} errors A list of errors that describe the reasons why + * the request failed. */ constructor() { super(); diff --git a/lib/services/cognitiveServicesWebSearch/lib/models/identifiable.js b/lib/services/cognitiveServicesWebSearch/lib/models/identifiable.js index 6cc9e3d679..51ceb85de4 100644 --- a/lib/services/cognitiveServicesWebSearch/lib/models/identifiable.js +++ b/lib/services/cognitiveServicesWebSearch/lib/models/identifiable.js @@ -20,7 +20,7 @@ const models = require('./index'); class Identifiable extends models['ResponseBase'] { /** * Create a Identifiable. - * @member {string} [id] A String identifier. + * @property {string} [id] A String identifier. */ constructor() { super(); diff --git a/lib/services/cognitiveServicesWebSearch/lib/models/imageObject.js b/lib/services/cognitiveServicesWebSearch/lib/models/imageObject.js index 4481dd86a5..feca3f0f7e 100644 --- a/lib/services/cognitiveServicesWebSearch/lib/models/imageObject.js +++ b/lib/services/cognitiveServicesWebSearch/lib/models/imageObject.js @@ -20,7 +20,7 @@ const models = require('./index'); class ImageObject extends models['MediaObject'] { /** * Create a ImageObject. - * @member {object} [thumbnail] The URL to a thumbnail of the image + * @property {object} [thumbnail] The URL to a thumbnail of the image */ constructor() { super(); diff --git a/lib/services/cognitiveServicesWebSearch/lib/models/images.js b/lib/services/cognitiveServicesWebSearch/lib/models/images.js index b74c410dd5..670b9fc47a 100644 --- a/lib/services/cognitiveServicesWebSearch/lib/models/images.js +++ b/lib/services/cognitiveServicesWebSearch/lib/models/images.js @@ -20,12 +20,12 @@ const models = require('./index'); class Images extends models['SearchResultsAnswer'] { /** * Create a Images. - * @member {number} [nextOffset] - * @member {array} value A list of image objects that are relevant to the + * @property {number} [nextOffset] + * @property {array} value A list of image objects that are relevant to the * query. If there are no results, the List is empty. - * @member {array} [queryExpansions] - * @member {array} [similarTerms] - * @member {array} [relatedSearches] + * @property {array} [queryExpansions] + * @property {array} [similarTerms] + * @property {array} [relatedSearches] */ constructor() { super(); diff --git a/lib/services/cognitiveServicesWebSearch/lib/models/index.d.ts b/lib/services/cognitiveServicesWebSearch/lib/models/index.d.ts index d211dd1f67..81f5090dd2 100644 --- a/lib/services/cognitiveServicesWebSearch/lib/models/index.d.ts +++ b/lib/services/cognitiveServicesWebSearch/lib/models/index.d.ts @@ -1,451 +1,350 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import * as moment from "moment"; - /** - * @class - * Initializes a new instance of the QueryContext class. - * @constructor * Defines the query context that Bing used for the request. - * - * @member {string} originalQuery The query string as specified in the request. - * @member {string} [alteredQuery] The query string used by Bing to perform the - * query. Bing uses the altered query string if the original query string - * contained spelling mistakes. For example, if the query string is "saling - * downwind", the altered query string will be "sailing downwind". This field - * is included only if the original query string contains a spelling mistake. - * @member {string} [alterationOverrideQuery] The query string to use to force - * Bing to use the original string. For example, if the query string is "saling - * downwind", the override query string will be "+saling downwind". Remember to - * encode the query string which results in "%2Bsaling+downwind". This field is - * included only if the original query string contains a spelling mistake. - * @member {boolean} [adultIntent] A Boolean value that indicates whether the - * specified query has adult intent. The value is true if the query has adult - * intent; otherwise, false. - * @member {boolean} [askUserForLocation] A Boolean value that indicates - * whether Bing requires the user's location to provide accurate results. If - * you specified the user's location by using the X-MSEdge-ClientIP and - * X-Search-Location headers, you can ignore this field. For location aware - * queries, such as "today's weather" or "restaurants near me" that need the - * user's location to provide accurate results, this field is set to true. For - * location aware queries that include the location (for example, "Seattle - * weather"), this field is set to false. This field is also set to false for - * queries that are not location aware, such as "best sellers". - * @member {boolean} [isTransactional] */ export interface QueryContext { + /** + * The query string as specified in the request. + */ originalQuery: string; + /** + * The query string used by Bing to perform the query. Bing uses the altered query string if the + * original query string contained spelling mistakes. For example, if the query string is "saling + * downwind", the altered query string will be "sailing downwind". This field is included only if + * the original query string contains a spelling mistake. + */ readonly alteredQuery?: string; + /** + * The query string to use to force Bing to use the original string. For example, if the query + * string is "saling downwind", the override query string will be "+saling downwind". Remember to + * encode the query string which results in "%2Bsaling+downwind". This field is included only if + * the original query string contains a spelling mistake. + */ readonly alterationOverrideQuery?: string; + /** + * A Boolean value that indicates whether the specified query has adult intent. The value is true + * if the query has adult intent; otherwise, false. + */ readonly adultIntent?: boolean; + /** + * A Boolean value that indicates whether Bing requires the user's location to provide accurate + * results. If you specified the user's location by using the X-MSEdge-ClientIP and + * X-Search-Location headers, you can ignore this field. For location aware queries, such as + * "today's weather" or "restaurants near me" that need the user's location to provide accurate + * results, this field is set to true. For location aware queries that include the location (for + * example, "Seattle weather"), this field is set to false. This field is also set to false for + * queries that are not location aware, such as "best sellers". + */ readonly askUserForLocation?: boolean; readonly isTransactional?: boolean; } /** - * @class - * Initializes a new instance of the WebMetaTag class. - * @constructor * Defines a webpage's metadata. - * - * @member {string} [name] The metadata. - * @member {string} [content] The name of the metadata. - */ +*/ export interface WebMetaTag { + /** + * The metadata. + */ readonly name?: string; + /** + * The name of the metadata. + */ readonly content?: string; } -/** - * @class - * Initializes a new instance of the ResponseBase class. - * @constructor - * @member {string} _type Polymorphic Discriminator - */ export interface ResponseBase { + /** + * Polymorphic Discriminator + */ _type: string; } /** - * @class - * Initializes a new instance of the Identifiable class. - * @constructor * Defines the identity of a resource. - * - * @member {string} [id] A String identifier. - */ +*/ export interface Identifiable extends ResponseBase { + /** + * A String identifier. + */ readonly id?: string; } /** - * @class - * Initializes a new instance of the Response class. - * @constructor - * Defines a response. All schemas that could be returned at the root of a - * response should inherit from this - * - * @member {string} [webSearchUrl] The URL To Bing's search result for this - * item. - */ + * Defines a response. All schemas that could be returned at the root of a response should inherit + * from this +*/ export interface Response extends Identifiable { + /** + * The URL To Bing's search result for this item. + */ readonly webSearchUrl?: string; } -/** - * @class - * Initializes a new instance of the Thing class. - * @constructor - * @member {string} [name] The name of the thing represented by this object. - * @member {string} [url] The URL to get more information about the thing - * represented by this object. - * @member {object} [image] - * @member {object} [image.thumbnail] The URL to a thumbnail of the image - * @member {string} [description] A short description of the item. - * @member {string} [bingId] An ID that uniquely identifies this item. - */ export interface Thing extends Response { + /** + * The name of the thing represented by this object. + */ readonly name?: string; + /** + * The URL to get more information about the thing represented by this object. + */ readonly url?: string; readonly image?: ImageObject; + /** + * A short description of the item. + */ readonly description?: string; + /** + * An ID that uniquely identifies this item. + */ readonly bingId?: string; } -/** - * @class - * Initializes a new instance of the CreativeWork class. - * @constructor - * @member {string} [thumbnailUrl] The URL to a thumbnail of the item. - * @member {array} [provider] The source of the creative work. - * @member {string} [text] - */ export interface CreativeWork extends Thing { + /** + * The URL to a thumbnail of the item. + */ readonly thumbnailUrl?: string; + /** + * The source of the creative work. + */ readonly provider?: Thing[]; readonly text?: string; } -/** - * @class - * Initializes a new instance of the MediaObject class. - * @constructor - * @member {string} [contentUrl] Original URL to retrieve the source (file) for - * the media object (e.g the source URL for the image). - * @member {string} [hostPageUrl] URL of the page that hosts the media object. - * @member {number} [width] The width of the source media object, in pixels. - * @member {number} [height] The height of the source media object, in pixels. - */ export interface MediaObject extends CreativeWork { + /** + * Original URL to retrieve the source (file) for the media object (e.g the source URL for the + * image). + */ readonly contentUrl?: string; + /** + * URL of the page that hosts the media object. + */ readonly hostPageUrl?: string; + /** + * The width of the source media object, in pixels. + */ readonly width?: number; + /** + * The height of the source media object, in pixels. + */ readonly height?: number; } /** - * @class - * Initializes a new instance of the ImageObject class. - * @constructor * Defines an image - * - * @member {object} [thumbnail] The URL to a thumbnail of the image - */ +*/ export interface ImageObject extends MediaObject { + /** + * The URL to a thumbnail of the image + */ readonly thumbnail?: ImageObject; } /** - * @class - * Initializes a new instance of the WebPage class. - * @constructor * Defines a webpage that is relevant to the query. - * - * @member {string} [displayUrl] The display URL of the webpage. The URL is - * meant for display purposes only and is not well formed. - * @member {string} [snippet] A snippet of text from the webpage that describes - * its contents. - * @member {array} [deepLinks] A list of links to related content that Bing - * found in the website that contains this webpage. The Webpage object in this - * context includes only the name, url, urlPingSuffix, and snippet fields. - * @member {string} [dateLastCrawled] The last time that Bing crawled the - * webpage. The date is in the form, YYYY-MM-DDTHH:MM:SS. For example, - * 2015-04-13T05:23:39. - * @member {array} [searchTags] A list of search tags that the webpage owner - * specified on the webpage. The API returns only indexed search tags. The name - * field of the MetaTag object contains the indexed search tag. Search tags - * begin with search.* (for example, search.assetId). The content field - * contains the tag's value. - * @member {object} [primaryImageOfPage] - * @member {object} [primaryImageOfPage.thumbnail] The URL to a thumbnail of - * the image - */ +*/ export interface WebPage extends CreativeWork { + /** + * The display URL of the webpage. The URL is meant for display purposes only and is not well + * formed. + */ readonly displayUrl?: string; + /** + * A snippet of text from the webpage that describes its contents. + */ readonly snippet?: string; + /** + * A list of links to related content that Bing found in the website that contains this webpage. + * The Webpage object in this context includes only the name, url, urlPingSuffix, and snippet + * fields. + */ readonly deepLinks?: WebPage[]; + /** + * The last time that Bing crawled the webpage. The date is in the form, YYYY-MM-DDTHH:MM:SS. For + * example, 2015-04-13T05:23:39. + */ readonly dateLastCrawled?: string; + /** + * A list of search tags that the webpage owner specified on the webpage. The API returns only + * indexed search tags. The name field of the MetaTag object contains the indexed search tag. + * Search tags begin with search.* (for example, search.assetId). The content field contains the + * tag's value. + */ readonly searchTags?: WebMetaTag[]; readonly primaryImageOfPage?: ImageObject; } -/** - * @class - * Initializes a new instance of the Answer class. - * @constructor - * @member {array} [followUpQueries] - */ export interface Answer extends Response { readonly followUpQueries?: Query[]; } -/** - * @class - * Initializes a new instance of the SearchResultsAnswer class. - * @constructor - * @member {object} [queryContext] - * @member {string} [queryContext.originalQuery] The query string as specified - * in the request. - * @member {string} [queryContext.alteredQuery] The query string used by Bing - * to perform the query. Bing uses the altered query string if the original - * query string contained spelling mistakes. For example, if the query string - * is "saling downwind", the altered query string will be "sailing downwind". - * This field is included only if the original query string contains a spelling - * mistake. - * @member {string} [queryContext.alterationOverrideQuery] The query string to - * use to force Bing to use the original string. For example, if the query - * string is "saling downwind", the override query string will be "+saling - * downwind". Remember to encode the query string which results in - * "%2Bsaling+downwind". This field is included only if the original query - * string contains a spelling mistake. - * @member {boolean} [queryContext.adultIntent] A Boolean value that indicates - * whether the specified query has adult intent. The value is true if the query - * has adult intent; otherwise, false. - * @member {boolean} [queryContext.askUserForLocation] A Boolean value that - * indicates whether Bing requires the user's location to provide accurate - * results. If you specified the user's location by using the X-MSEdge-ClientIP - * and X-Search-Location headers, you can ignore this field. For location aware - * queries, such as "today's weather" or "restaurants near me" that need the - * user's location to provide accurate results, this field is set to true. For - * location aware queries that include the location (for example, "Seattle - * weather"), this field is set to false. This field is also set to false for - * queries that are not location aware, such as "best sellers". - * @member {boolean} [queryContext.isTransactional] - * @member {number} [totalEstimatedMatches] The estimated number of webpages - * that are relevant to the query. Use this number along with the count and - * offset query parameters to page the results. - * @member {boolean} [isFamilyFriendly] - */ export interface SearchResultsAnswer extends Answer { readonly queryContext?: QueryContext; + /** + * The estimated number of webpages that are relevant to the query. Use this number along with + * the count and offset query parameters to page the results. + */ readonly totalEstimatedMatches?: number; readonly isFamilyFriendly?: boolean; } /** - * @class - * Initializes a new instance of the WebWebAnswer class. - * @constructor * Defines a list of relevant webpage links. - * - * @member {array} value A list of webpages that are relevant to the query. - * @member {boolean} [someResultsRemoved] A Boolean value that indicates - * whether the response excluded some results from the answer. If Bing excluded - * some results, the value is true. - */ +*/ export interface WebWebAnswer extends SearchResultsAnswer { + /** + * A list of webpages that are relevant to the query. + */ value: WebPage[]; + /** + * A Boolean value that indicates whether the response excluded some results from the answer. If + * Bing excluded some results, the value is true. + */ readonly someResultsRemoved?: boolean; } /** - * @class - * Initializes a new instance of the Query class. - * @constructor * Defines a search query. - * - * @member {string} text The query string. Use this string as the query term in - * a new search request. - * @member {string} [displayText] The display version of the query term. This - * version of the query term may contain special characters that highlight the - * search term found in the query string. The string contains the highlighting - * characters only if the query enabled hit highlighting - * @member {string} [webSearchUrl] The URL that takes the user to the Bing - * search results page for the query.Only related search results include this - * field. - * @member {string} [searchLink] - * @member {object} [thumbnail] - * @member {object} [thumbnail.thumbnail] The URL to a thumbnail of the image - */ +*/ export interface Query { + /** + * The query string. Use this string as the query term in a new search request. + */ text: string; + /** + * The display version of the query term. This version of the query term may contain special + * characters that highlight the search term found in the query string. The string contains the + * highlighting characters only if the query enabled hit highlighting + */ readonly displayText?: string; + /** + * The URL that takes the user to the Bing search results page for the query.Only related search + * results include this field. + */ readonly webSearchUrl?: string; readonly searchLink?: string; readonly thumbnail?: ImageObject; } /** - * @class - * Initializes a new instance of the Images class. - * @constructor * Defines an image answer - * - * @member {number} [nextOffset] - * @member {array} value A list of image objects that are relevant to the - * query. If there are no results, the List is empty. - * @member {array} [queryExpansions] - * @member {array} [similarTerms] - * @member {array} [relatedSearches] - */ +*/ export interface Images extends SearchResultsAnswer { readonly nextOffset?: number; + /** + * A list of image objects that are relevant to the query. If there are no results, the List is + * empty. + */ value: ImageObject[]; readonly queryExpansions?: Query[]; readonly similarTerms?: Query[]; readonly relatedSearches?: Query[]; } -/** - * @class - * Initializes a new instance of the Article class. - * @constructor - * @member {number} [wordCount] The number of words in the text of the Article. - */ export interface Article extends CreativeWork { + /** + * The number of words in the text of the Article. + */ readonly wordCount?: number; } /** - * @class - * Initializes a new instance of the NewsArticle class. - * @constructor * Defines a news article. - * - */ +*/ export interface NewsArticle extends Article { } /** - * @class - * Initializes a new instance of the News class. - * @constructor * Defines a news answer. - * - * @member {array} value An array of NewsArticle objects that contain - * information about news articles that are relevant to the query. If there are - * no results to return for the request, the array is empty. - * @member {string} [location] - */ +*/ export interface News extends SearchResultsAnswer { + /** + * An array of NewsArticle objects that contain information about news articles that are relevant + * to the query. If there are no results to return for the request, the array is empty. + */ value: NewsArticle[]; readonly location?: string; } /** - * @class - * Initializes a new instance of the RelatedSearchesRelatedSearchAnswer class. - * @constructor * Defines a list of related queries made by others. - * - * @member {array} value A list of related queries that were made by others. - */ +*/ export interface RelatedSearchesRelatedSearchAnswer extends SearchResultsAnswer { + /** + * A list of related queries that were made by others. + */ value: Query[]; } /** - * @class - * Initializes a new instance of the SpellSuggestions class. - * @constructor - * Defines a suggested query string that likely represents the user's intent. - * The search results include this response if Bing determines that the user - * may have intended to search for something different. For example, if the - * user searches for alon brown, Bing may determine that the user likely - * intended to search for Alton Brown instead (based on past searches by others - * of Alon Brown). - * - * @member {array} value A list of suggested query strings that may represent - * the user's intention. The list contains only one Query object. - */ + * Defines a suggested query string that likely represents the user's intent. The search results + * include this response if Bing determines that the user may have intended to search for something + * different. For example, if the user searches for alon brown, Bing may determine that the user + * likely intended to search for Alton Brown instead (based on past searches by others of Alon + * Brown). +*/ export interface SpellSuggestions extends SearchResultsAnswer { + /** + * A list of suggested query strings that may represent the user's intention. The list contains + * only one Query object. + */ value: Query[]; } /** - * @class - * Initializes a new instance of the TimeZoneTimeZoneInformation class. - * @constructor * Defines a date and time for a geographical location. - * - * @member {string} location The name of the geographical location.For example, - * County; City; City, State; City, State, Country; or Time Zone. - * @member {string} time The data and time specified in the form, - * YYYY-MM-DDThh;mm:ss.ssssssZ. - * @member {string} utcOffset The offset from UTC. For example, UTC-7. - */ +*/ export interface TimeZoneTimeZoneInformation { + /** + * The name of the geographical location.For example, County; City; City, State; City, State, + * Country; or Time Zone. + */ location: string; + /** + * The data and time specified in the form, YYYY-MM-DDThh;mm:ss.ssssssZ. + */ time: string; + /** + * The offset from UTC. For example, UTC-7. + */ utcOffset: string; } /** - * @class - * Initializes a new instance of the TimeZone class. - * @constructor * Defines the data and time of one or more geographic locations. - * - * @member {object} primaryCityTime The data and time, in UTC, of the - * geographic location specified in the query. If the query specified a - * specific geographic location (for example, a city), this object contains the - * name of the geographic location and the current date and time of the - * location, in UTC. If the query specified a general geographic location, such - * as a state or country, this object contains the date and time of the primary - * city or state found in the specified state or country. If the location - * contains additional time zones, the otherCityTimes field contains the data - * and time of cities or states located in the other time zones. - * @member {string} [primaryCityTime.location] The name of the geographical - * location.For example, County; City; City, State; City, State, Country; or - * Time Zone. - * @member {string} [primaryCityTime.time] The data and time specified in the - * form, YYYY-MM-DDThh;mm:ss.ssssssZ. - * @member {string} [primaryCityTime.utcOffset] The offset from UTC. For - * example, UTC-7. - * @member {array} [otherCityTimes] A list of dates and times of nearby time - * zones. - */ +*/ export interface TimeZone extends SearchResultsAnswer { + /** + * The data and time, in UTC, of the geographic location specified in the query. If the query + * specified a specific geographic location (for example, a city), this object contains the name + * of the geographic location and the current date and time of the location, in UTC. If the query + * specified a general geographic location, such as a state or country, this object contains the + * date and time of the primary city or state found in the specified state or country. If the + * location contains additional time zones, the otherCityTimes field contains the data and time + * of cities or states located in the other time zones. + */ primaryCityTime: TimeZoneTimeZoneInformation; + /** + * A list of dates and times of nearby time zones. + */ readonly otherCityTimes?: TimeZoneTimeZoneInformation[]; } /** - * @class - * Initializes a new instance of the VideoObject class. - * @constructor * Defines a video object that is relevant to the query. - * - * @member {string} [motionThumbnailUrl] - * @member {string} [motionThumbnailId] - * @member {string} [embedHtml] - * @member {boolean} [allowHttpsEmbed] - * @member {number} [viewCount] - * @member {object} [thumbnail] - * @member {object} [thumbnail.thumbnail] The URL to a thumbnail of the image - * @member {string} [videoId] - * @member {boolean} [allowMobileEmbed] - * @member {boolean} [isSuperfresh] - */ +*/ export interface VideoObject extends MediaObject { readonly motionThumbnailUrl?: string; readonly motionThumbnailId?: string; @@ -459,18 +358,12 @@ export interface VideoObject extends MediaObject { } /** - * @class - * Initializes a new instance of the Videos class. - * @constructor * Defines a video answer. - * - * @member {array} value A list of video objects that are relevant to the - * query. - * @member {number} [nextOffset] - * @member {array} [queryExpansions] - * @member {array} [relatedSearches] - */ +*/ export interface Videos extends SearchResultsAnswer { + /** + * A list of video objects that are relevant to the query. + */ value: VideoObject[]; readonly nextOffset?: number; readonly queryExpansions?: Query[]; @@ -478,54 +371,47 @@ export interface Videos extends SearchResultsAnswer { } /** - * @class - * Initializes a new instance of the Computation class. - * @constructor * Defines an expression and its answer - * - * @member {string} expression The math or conversion expression. If the query - * contains a request to convert units of measure (for example, meters to - * feet), this field contains the from units and value contains the to units. - * If the query contains a mathematical expression such as 2+2, this field - * contains the expression and value contains the answer. Note that - * mathematical expressions may be normalized. For example, if the query was - * sqrt(4^2+8^2), the normalized expression may be sqrt((4^2)+(8^2)). If the - * user's query is a math question and the textDecorations query parameter is - * set to true, the expression string may include formatting markers. For - * example, if the user's query is log(2), the normalized expression includes - * the subscript markers. For more information, see Hit Highlighting. - * @member {string} value The expression's answer. - */ +*/ export interface Computation extends Answer { + /** + * The math or conversion expression. If the query contains a request to convert units of measure + * (for example, meters to feet), this field contains the from units and value contains the to + * units. If the query contains a mathematical expression such as 2+2, this field contains the + * expression and value contains the answer. Note that mathematical expressions may be + * normalized. For example, if the query was sqrt(4^2+8^2), the normalized expression may be + * sqrt((4^2)+(8^2)). If the user's query is a math question and the textDecorations query + * parameter is set to true, the expression string may include formatting markers. For example, + * if the user's query is log(2), the normalized expression includes the subscript markers. For + * more information, see Hit Highlighting. + */ expression: string; + /** + * The expression's answer. + */ value: string; } /** - * @class - * Initializes a new instance of the RankingRankingItem class. - * @constructor * Defines a search result item to display - * - * @member {string} answerType The answer that contains the item to display. - * Use the type to find the answer in the SearchResponse object. The type is - * the name of a SearchResponse field. Possible values include: 'WebPages', - * 'Images', 'SpellSuggestions', 'News', 'RelatedSearches', 'Videos', - * 'Computation', 'TimeZone'. Default value: 'WebPages' . - * @member {number} [resultIndex] A zero-based index of the item in the - * answer.If the item does not include this field, display all items in the - * answer. For example, display all news articles in the News answer. - * @member {object} [value] The ID that identifies either an answer to display - * or an item of an answer to display. If the ID identifies an answer, display - * all items of the answer. - * @member {string} [value.id] A String identifier. - * @member {number} [htmlIndex] - * @member {number} [textualIndex] - * @member {number} [screenshotIndex] - */ +*/ export interface RankingRankingItem { + /** + * The answer that contains the item to display. Use the type to find the answer in the + * SearchResponse object. The type is the name of a SearchResponse field. Possible values + * include: 'WebPages', 'Images', 'SpellSuggestions', 'News', 'RelatedSearches', 'Videos', + * 'Computation', 'TimeZone' + */ answerType: string; + /** + * A zero-based index of the item in the answer.If the item does not include this field, display + * all items in the answer. For example, display all news articles in the News answer. + */ readonly resultIndex?: number; + /** + * The ID that identifies either an answer to display or an item of an answer to display. If the + * ID identifies an answer, display all items of the answer. + */ readonly value?: Identifiable; readonly htmlIndex?: number; readonly textualIndex?: number; @@ -533,260 +419,147 @@ export interface RankingRankingItem { } /** - * @class - * Initializes a new instance of the RankingRankingGroup class. - * @constructor * Defines a search results group, such as mainline. - * - * @member {array} items A list of search result items to display in the group. - */ +*/ export interface RankingRankingGroup { + /** + * A list of search result items to display in the group. + */ items: RankingRankingItem[]; } /** - * @class - * Initializes a new instance of the RankingRankingResponse class. - * @constructor - * Defines where on the search results page content should be placed and in - * what order. - * - * @member {object} [pole] The search results that should be afforded the most - * visible treatment (for example, displayed above the mainline and sidebar). - * @member {array} [pole.items] A list of search result items to display in the - * group. - * @member {object} [mainline] The search results to display in the mainline. - * @member {array} [mainline.items] A list of search result items to display in - * the group. - * @member {object} [sidebar] The search results to display in the sidebar. - * @member {array} [sidebar.items] A list of search result items to display in - * the group. - */ + * Defines where on the search results page content should be placed and in what order. +*/ export interface RankingRankingResponse { + /** + * The search results that should be afforded the most visible treatment (for example, displayed + * above the mainline and sidebar). + */ readonly pole?: RankingRankingGroup; + /** + * The search results to display in the mainline. + */ readonly mainline?: RankingRankingGroup; + /** + * The search results to display in the sidebar. + */ readonly sidebar?: RankingRankingGroup; } /** - * @class - * Initializes a new instance of the SearchResponse class. - * @constructor - * Defines the top-level object that the response includes when the request - * succeeds. - * - * @member {object} [queryContext] An object that contains the query string - * that Bing used for the request. This object contains the query string as - * entered by the user. It may also contain an altered query string that Bing - * used for the query if the query string contained a spelling mistake. - * @member {string} [queryContext.originalQuery] The query string as specified - * in the request. - * @member {string} [queryContext.alteredQuery] The query string used by Bing - * to perform the query. Bing uses the altered query string if the original - * query string contained spelling mistakes. For example, if the query string - * is "saling downwind", the altered query string will be "sailing downwind". - * This field is included only if the original query string contains a spelling - * mistake. - * @member {string} [queryContext.alterationOverrideQuery] The query string to - * use to force Bing to use the original string. For example, if the query - * string is "saling downwind", the override query string will be "+saling - * downwind". Remember to encode the query string which results in - * "%2Bsaling+downwind". This field is included only if the original query - * string contains a spelling mistake. - * @member {boolean} [queryContext.adultIntent] A Boolean value that indicates - * whether the specified query has adult intent. The value is true if the query - * has adult intent; otherwise, false. - * @member {boolean} [queryContext.askUserForLocation] A Boolean value that - * indicates whether Bing requires the user's location to provide accurate - * results. If you specified the user's location by using the X-MSEdge-ClientIP - * and X-Search-Location headers, you can ignore this field. For location aware - * queries, such as "today's weather" or "restaurants near me" that need the - * user's location to provide accurate results, this field is set to true. For - * location aware queries that include the location (for example, "Seattle - * weather"), this field is set to false. This field is also set to false for - * queries that are not location aware, such as "best sellers". - * @member {boolean} [queryContext.isTransactional] - * @member {object} [webPages] A list of webpages that are relevant to the - * search query. - * @member {array} [webPages.value] A list of webpages that are relevant to the - * query. - * @member {boolean} [webPages.someResultsRemoved] A Boolean value that - * indicates whether the response excluded some results from the answer. If - * Bing excluded some results, the value is true. - * @member {object} [images] A list of images that are relevant to the search - * query. - * @member {number} [images.nextOffset] - * @member {array} [images.value] A list of image objects that are relevant to - * the query. If there are no results, the List is empty. - * @member {array} [images.queryExpansions] - * @member {array} [images.similarTerms] - * @member {array} [images.relatedSearches] - * @member {object} [news] A list of news articles that are relevant to the - * search query. - * @member {array} [news.value] An array of NewsArticle objects that contain - * information about news articles that are relevant to the query. If there are - * no results to return for the request, the array is empty. - * @member {string} [news.location] - * @member {object} [relatedSearches] A list of related queries made by others. - * @member {array} [relatedSearches.value] A list of related queries that were - * made by others. - * @member {object} [spellSuggestions] The query string that likely represents - * the user's intent. - * @member {array} [spellSuggestions.value] A list of suggested query strings - * that may represent the user's intention. The list contains only one Query - * object. - * @member {object} [timeZone] The date and time of one or more geographic - * locations. - * @member {object} [timeZone.primaryCityTime] The data and time, in UTC, of - * the geographic location specified in the query. If the query specified a - * specific geographic location (for example, a city), this object contains the - * name of the geographic location and the current date and time of the - * location, in UTC. If the query specified a general geographic location, such - * as a state or country, this object contains the date and time of the primary - * city or state found in the specified state or country. If the location - * contains additional time zones, the otherCityTimes field contains the data - * and time of cities or states located in the other time zones. - * @member {string} [timeZone.primaryCityTime.location] The name of the - * geographical location.For example, County; City; City, State; City, State, - * Country; or Time Zone. - * @member {string} [timeZone.primaryCityTime.time] The data and time specified - * in the form, YYYY-MM-DDThh;mm:ss.ssssssZ. - * @member {string} [timeZone.primaryCityTime.utcOffset] The offset from UTC. - * For example, UTC-7. - * @member {array} [timeZone.otherCityTimes] A list of dates and times of - * nearby time zones. - * @member {object} [videos] A list of videos that are relevant to the search - * query. - * @member {array} [videos.value] A list of video objects that are relevant to - * the query. - * @member {number} [videos.nextOffset] - * @member {array} [videos.queryExpansions] - * @member {array} [videos.relatedSearches] - * @member {object} [computation] The answer to a math expression or units - * conversion expression. - * @member {string} [computation.expression] The math or conversion expression. - * If the query contains a request to convert units of measure (for example, - * meters to feet), this field contains the from units and value contains the - * to units. If the query contains a mathematical expression such as 2+2, this - * field contains the expression and value contains the answer. Note that - * mathematical expressions may be normalized. For example, if the query was - * sqrt(4^2+8^2), the normalized expression may be sqrt((4^2)+(8^2)). If the - * user's query is a math question and the textDecorations query parameter is - * set to true, the expression string may include formatting markers. For - * example, if the user's query is log(2), the normalized expression includes - * the subscript markers. For more information, see Hit Highlighting. - * @member {string} [computation.value] The expression's answer. - * @member {object} [rankingResponse] The order that Bing suggests that you - * display the search results in. - * @member {object} [rankingResponse.pole] The search results that should be - * afforded the most visible treatment (for example, displayed above the - * mainline and sidebar). - * @member {array} [rankingResponse.pole.items] A list of search result items - * to display in the group. - * @member {object} [rankingResponse.mainline] The search results to display in - * the mainline. - * @member {array} [rankingResponse.mainline.items] A list of search result - * items to display in the group. - * @member {object} [rankingResponse.sidebar] The search results to display in - * the sidebar. - * @member {array} [rankingResponse.sidebar.items] A list of search result - * items to display in the group. - */ + * Defines the top-level object that the response includes when the request succeeds. +*/ export interface SearchResponse extends Response { + /** + * An object that contains the query string that Bing used for the request. This object contains + * the query string as entered by the user. It may also contain an altered query string that Bing + * used for the query if the query string contained a spelling mistake. + */ readonly queryContext?: QueryContext; + /** + * A list of webpages that are relevant to the search query. + */ readonly webPages?: WebWebAnswer; + /** + * A list of images that are relevant to the search query. + */ readonly images?: Images; + /** + * A list of news articles that are relevant to the search query. + */ readonly news?: News; + /** + * A list of related queries made by others. + */ readonly relatedSearches?: RelatedSearchesRelatedSearchAnswer; + /** + * The query string that likely represents the user's intent. + */ readonly spellSuggestions?: SpellSuggestions; + /** + * The date and time of one or more geographic locations. + */ readonly timeZone?: TimeZone; + /** + * A list of videos that are relevant to the search query. + */ readonly videos?: Videos; + /** + * The answer to a math expression or units conversion expression. + */ readonly computation?: Computation; + /** + * The order that Bing suggests that you display the search results in. + */ readonly rankingResponse?: RankingRankingResponse; } /** - * @class - * Initializes a new instance of the Places class. - * @constructor * Defines a local entity answer. - * - * @member {array} value A list of local entities, such as restaurants or - * hotels. - */ +*/ export interface Places extends SearchResultsAnswer { + /** + * A list of local entities, such as restaurants or hotels. + */ value: Thing[]; } /** - * @class - * Initializes a new instance of the ErrorModel class. - * @constructor * Defines the error that occurred. - * - * @member {string} code The error code that identifies the category of error. - * Possible values include: 'None', 'ServerError', 'InvalidRequest', - * 'RateLimitExceeded', 'InvalidAuthorization', 'InsufficientAuthorization'. - * Default value: 'None' . - * @member {string} [subCode] The error code that further helps to identify the - * error. Possible values include: 'UnexpectedError', 'ResourceError', - * 'NotImplemented', 'ParameterMissing', 'ParameterInvalidValue', - * 'HttpNotAllowed', 'Blocked', 'AuthorizationMissing', - * 'AuthorizationRedundancy', 'AuthorizationDisabled', 'AuthorizationExpired' - * @member {string} message A description of the error. - * @member {string} [moreDetails] A description that provides additional - * information about the error. - * @member {string} [parameter] The parameter in the request that caused the - * error. - * @member {string} [value] The parameter's value in the request that was not - * valid. - */ +*/ export interface ErrorModel { + /** + * The error code that identifies the category of error. Possible values include: 'None', + * 'ServerError', 'InvalidRequest', 'RateLimitExceeded', 'InvalidAuthorization', + * 'InsufficientAuthorization' + */ code: string; + /** + * The error code that further helps to identify the error. Possible values include: + * 'UnexpectedError', 'ResourceError', 'NotImplemented', 'ParameterMissing', + * 'ParameterInvalidValue', 'HttpNotAllowed', 'Blocked', 'AuthorizationMissing', + * 'AuthorizationRedundancy', 'AuthorizationDisabled', 'AuthorizationExpired' + */ readonly subCode?: string; + /** + * A description of the error. + */ message: string; + /** + * A description that provides additional information about the error. + */ readonly moreDetails?: string; + /** + * The parameter in the request that caused the error. + */ readonly parameter?: string; + /** + * The parameter's value in the request that was not valid. + */ readonly value?: string; } /** - * @class - * Initializes a new instance of the ErrorResponse class. - * @constructor * The top-level response that represents a failed request. - * - * @member {array} errors A list of errors that describe the reasons why the - * request failed. - */ +*/ export interface ErrorResponse extends Response { + /** + * A list of errors that describe the reasons why the request failed. + */ errors: ErrorModel[]; } -/** - * @class - * Initializes a new instance of the WebWebGrouping class. - * @constructor - * @member {array} webPages - * @member {string} _type Polymorphic Discriminator - */ export interface WebWebGrouping { webPages: WebPage[]; + /** + * Polymorphic Discriminator + */ _type: string; } -/** - * @class - * Initializes a new instance of the Intangible class. - * @constructor - */ export interface Intangible extends Thing { } -/** - * @class - * Initializes a new instance of the StructuredValue class. - * @constructor - */ export interface StructuredValue extends Intangible { } diff --git a/lib/services/cognitiveServicesWebSearch/lib/models/mediaObject.js b/lib/services/cognitiveServicesWebSearch/lib/models/mediaObject.js index 17a46df6eb..659a4f0f32 100644 --- a/lib/services/cognitiveServicesWebSearch/lib/models/mediaObject.js +++ b/lib/services/cognitiveServicesWebSearch/lib/models/mediaObject.js @@ -19,12 +19,13 @@ const models = require('./index'); class MediaObject extends models['CreativeWork'] { /** * Create a MediaObject. - * @member {string} [contentUrl] Original URL to retrieve the source (file) + * @property {string} [contentUrl] Original URL to retrieve the source (file) * for the media object (e.g the source URL for the image). - * @member {string} [hostPageUrl] URL of the page that hosts the media + * @property {string} [hostPageUrl] URL of the page that hosts the media * object. - * @member {number} [width] The width of the source media object, in pixels. - * @member {number} [height] The height of the source media object, in + * @property {number} [width] The width of the source media object, in + * pixels. + * @property {number} [height] The height of the source media object, in * pixels. */ constructor() { diff --git a/lib/services/cognitiveServicesWebSearch/lib/models/news.js b/lib/services/cognitiveServicesWebSearch/lib/models/news.js index 9f7b4f6467..c19debf125 100644 --- a/lib/services/cognitiveServicesWebSearch/lib/models/news.js +++ b/lib/services/cognitiveServicesWebSearch/lib/models/news.js @@ -20,10 +20,10 @@ const models = require('./index'); class News extends models['SearchResultsAnswer'] { /** * Create a News. - * @member {array} value An array of NewsArticle objects that contain + * @property {array} value An array of NewsArticle objects that contain * information about news articles that are relevant to the query. If there * are no results to return for the request, the array is empty. - * @member {string} [location] + * @property {string} [location] */ constructor() { super(); diff --git a/lib/services/cognitiveServicesWebSearch/lib/models/places.js b/lib/services/cognitiveServicesWebSearch/lib/models/places.js index 6cd8199300..be4b071e2d 100644 --- a/lib/services/cognitiveServicesWebSearch/lib/models/places.js +++ b/lib/services/cognitiveServicesWebSearch/lib/models/places.js @@ -20,7 +20,7 @@ const models = require('./index'); class Places extends models['SearchResultsAnswer'] { /** * Create a Places. - * @member {array} value A list of local entities, such as restaurants or + * @property {array} value A list of local entities, such as restaurants or * hotels. */ constructor() { diff --git a/lib/services/cognitiveServicesWebSearch/lib/models/query.js b/lib/services/cognitiveServicesWebSearch/lib/models/query.js index 88c0cef27d..551f0ad572 100644 --- a/lib/services/cognitiveServicesWebSearch/lib/models/query.js +++ b/lib/services/cognitiveServicesWebSearch/lib/models/query.js @@ -17,18 +17,19 @@ class Query { /** * Create a Query. - * @member {string} text The query string. Use this string as the query term - * in a new search request. - * @member {string} [displayText] The display version of the query term. This - * version of the query term may contain special characters that highlight - * the search term found in the query string. The string contains the - * highlighting characters only if the query enabled hit highlighting - * @member {string} [webSearchUrl] The URL that takes the user to the Bing + * @property {string} text The query string. Use this string as the query + * term in a new search request. + * @property {string} [displayText] The display version of the query term. + * This version of the query term may contain special characters that + * highlight the search term found in the query string. The string contains + * the highlighting characters only if the query enabled hit highlighting + * @property {string} [webSearchUrl] The URL that takes the user to the Bing * search results page for the query.Only related search results include this * field. - * @member {string} [searchLink] - * @member {object} [thumbnail] - * @member {object} [thumbnail.thumbnail] The URL to a thumbnail of the image + * @property {string} [searchLink] + * @property {object} [thumbnail] + * @property {object} [thumbnail.thumbnail] The URL to a thumbnail of the + * image */ constructor() { } diff --git a/lib/services/cognitiveServicesWebSearch/lib/models/queryContext.js b/lib/services/cognitiveServicesWebSearch/lib/models/queryContext.js index 348f2ae1bd..759718162d 100644 --- a/lib/services/cognitiveServicesWebSearch/lib/models/queryContext.js +++ b/lib/services/cognitiveServicesWebSearch/lib/models/queryContext.js @@ -17,23 +17,23 @@ class QueryContext { /** * Create a QueryContext. - * @member {string} originalQuery The query string as specified in the + * @property {string} originalQuery The query string as specified in the * request. - * @member {string} [alteredQuery] The query string used by Bing to perform + * @property {string} [alteredQuery] The query string used by Bing to perform * the query. Bing uses the altered query string if the original query string * contained spelling mistakes. For example, if the query string is "saling * downwind", the altered query string will be "sailing downwind". This field * is included only if the original query string contains a spelling mistake. - * @member {string} [alterationOverrideQuery] The query string to use to + * @property {string} [alterationOverrideQuery] The query string to use to * force Bing to use the original string. For example, if the query string is * "saling downwind", the override query string will be "+saling downwind". * Remember to encode the query string which results in "%2Bsaling+downwind". * This field is included only if the original query string contains a * spelling mistake. - * @member {boolean} [adultIntent] A Boolean value that indicates whether the - * specified query has adult intent. The value is true if the query has adult - * intent; otherwise, false. - * @member {boolean} [askUserForLocation] A Boolean value that indicates + * @property {boolean} [adultIntent] A Boolean value that indicates whether + * the specified query has adult intent. The value is true if the query has + * adult intent; otherwise, false. + * @property {boolean} [askUserForLocation] A Boolean value that indicates * whether Bing requires the user's location to provide accurate results. If * you specified the user's location by using the X-MSEdge-ClientIP and * X-Search-Location headers, you can ignore this field. For location aware @@ -42,7 +42,7 @@ class QueryContext { * For location aware queries that include the location (for example, * "Seattle weather"), this field is set to false. This field is also set to * false for queries that are not location aware, such as "best sellers". - * @member {boolean} [isTransactional] + * @property {boolean} [isTransactional] */ constructor() { } diff --git a/lib/services/cognitiveServicesWebSearch/lib/models/rankingRankingGroup.js b/lib/services/cognitiveServicesWebSearch/lib/models/rankingRankingGroup.js index 6e3ed0906d..71d5bcea88 100644 --- a/lib/services/cognitiveServicesWebSearch/lib/models/rankingRankingGroup.js +++ b/lib/services/cognitiveServicesWebSearch/lib/models/rankingRankingGroup.js @@ -17,7 +17,7 @@ class RankingRankingGroup { /** * Create a RankingRankingGroup. - * @member {array} items A list of search result items to display in the + * @property {array} items A list of search result items to display in the * group. */ constructor() { diff --git a/lib/services/cognitiveServicesWebSearch/lib/models/rankingRankingItem.js b/lib/services/cognitiveServicesWebSearch/lib/models/rankingRankingItem.js index c6cfd63a69..16925de6c1 100644 --- a/lib/services/cognitiveServicesWebSearch/lib/models/rankingRankingItem.js +++ b/lib/services/cognitiveServicesWebSearch/lib/models/rankingRankingItem.js @@ -17,21 +17,21 @@ class RankingRankingItem { /** * Create a RankingRankingItem. - * @member {string} answerType The answer that contains the item to display. - * Use the type to find the answer in the SearchResponse object. The type is - * the name of a SearchResponse field. Possible values include: 'WebPages', - * 'Images', 'SpellSuggestions', 'News', 'RelatedSearches', 'Videos', - * 'Computation', 'TimeZone'. Default value: 'WebPages' . - * @member {number} [resultIndex] A zero-based index of the item in the + * @property {string} answerType The answer that contains the item to + * display. Use the type to find the answer in the SearchResponse object. The + * type is the name of a SearchResponse field. Possible values include: + * 'WebPages', 'Images', 'SpellSuggestions', 'News', 'RelatedSearches', + * 'Videos', 'Computation', 'TimeZone'. Default value: 'WebPages' . + * @property {number} [resultIndex] A zero-based index of the item in the * answer.If the item does not include this field, display all items in the * answer. For example, display all news articles in the News answer. - * @member {object} [value] The ID that identifies either an answer to + * @property {object} [value] The ID that identifies either an answer to * display or an item of an answer to display. If the ID identifies an * answer, display all items of the answer. - * @member {string} [value.id] A String identifier. - * @member {number} [htmlIndex] - * @member {number} [textualIndex] - * @member {number} [screenshotIndex] + * @property {string} [value.id] A String identifier. + * @property {number} [htmlIndex] + * @property {number} [textualIndex] + * @property {number} [screenshotIndex] */ constructor() { } diff --git a/lib/services/cognitiveServicesWebSearch/lib/models/rankingRankingResponse.js b/lib/services/cognitiveServicesWebSearch/lib/models/rankingRankingResponse.js index a6f2fe7f8d..375283d1d1 100644 --- a/lib/services/cognitiveServicesWebSearch/lib/models/rankingRankingResponse.js +++ b/lib/services/cognitiveServicesWebSearch/lib/models/rankingRankingResponse.js @@ -18,16 +18,17 @@ class RankingRankingResponse { /** * Create a RankingRankingResponse. - * @member {object} [pole] The search results that should be afforded the + * @property {object} [pole] The search results that should be afforded the * most visible treatment (for example, displayed above the mainline and * sidebar). - * @member {array} [pole.items] A list of search result items to display in + * @property {array} [pole.items] A list of search result items to display in * the group. - * @member {object} [mainline] The search results to display in the mainline. - * @member {array} [mainline.items] A list of search result items to display - * in the group. - * @member {object} [sidebar] The search results to display in the sidebar. - * @member {array} [sidebar.items] A list of search result items to display + * @property {object} [mainline] The search results to display in the + * mainline. + * @property {array} [mainline.items] A list of search result items to + * display in the group. + * @property {object} [sidebar] The search results to display in the sidebar. + * @property {array} [sidebar.items] A list of search result items to display * in the group. */ constructor() { diff --git a/lib/services/cognitiveServicesWebSearch/lib/models/relatedSearchesRelatedSearchAnswer.js b/lib/services/cognitiveServicesWebSearch/lib/models/relatedSearchesRelatedSearchAnswer.js index 5695c55d2a..06baafe193 100644 --- a/lib/services/cognitiveServicesWebSearch/lib/models/relatedSearchesRelatedSearchAnswer.js +++ b/lib/services/cognitiveServicesWebSearch/lib/models/relatedSearchesRelatedSearchAnswer.js @@ -20,7 +20,8 @@ const models = require('./index'); class RelatedSearchesRelatedSearchAnswer extends models['SearchResultsAnswer'] { /** * Create a RelatedSearchesRelatedSearchAnswer. - * @member {array} value A list of related queries that were made by others. + * @property {array} value A list of related queries that were made by + * others. */ constructor() { super(); diff --git a/lib/services/cognitiveServicesWebSearch/lib/models/response.js b/lib/services/cognitiveServicesWebSearch/lib/models/response.js index cc3b85c266..0bb2aacfa3 100644 --- a/lib/services/cognitiveServicesWebSearch/lib/models/response.js +++ b/lib/services/cognitiveServicesWebSearch/lib/models/response.js @@ -21,7 +21,7 @@ const models = require('./index'); class Response extends models['Identifiable'] { /** * Create a Response. - * @member {string} [webSearchUrl] The URL To Bing's search result for this + * @property {string} [webSearchUrl] The URL To Bing's search result for this * item. */ constructor() { diff --git a/lib/services/cognitiveServicesWebSearch/lib/models/responseBase.js b/lib/services/cognitiveServicesWebSearch/lib/models/responseBase.js index ffe3d9ee1b..557d5ec790 100644 --- a/lib/services/cognitiveServicesWebSearch/lib/models/responseBase.js +++ b/lib/services/cognitiveServicesWebSearch/lib/models/responseBase.js @@ -16,7 +16,7 @@ class ResponseBase { /** * Create a ResponseBase. - * @member {string} _type Polymorphic Discriminator + * @property {string} _type Polymorphic Discriminator */ constructor() { } diff --git a/lib/services/cognitiveServicesWebSearch/lib/models/searchResponse.js b/lib/services/cognitiveServicesWebSearch/lib/models/searchResponse.js index 34ad8b9264..f9d8fedda1 100644 --- a/lib/services/cognitiveServicesWebSearch/lib/models/searchResponse.js +++ b/lib/services/cognitiveServicesWebSearch/lib/models/searchResponse.js @@ -21,28 +21,28 @@ const models = require('./index'); class SearchResponse extends models['Response'] { /** * Create a SearchResponse. - * @member {object} [queryContext] An object that contains the query string + * @property {object} [queryContext] An object that contains the query string * that Bing used for the request. This object contains the query string as * entered by the user. It may also contain an altered query string that Bing * used for the query if the query string contained a spelling mistake. - * @member {string} [queryContext.originalQuery] The query string as + * @property {string} [queryContext.originalQuery] The query string as * specified in the request. - * @member {string} [queryContext.alteredQuery] The query string used by Bing - * to perform the query. Bing uses the altered query string if the original - * query string contained spelling mistakes. For example, if the query string - * is "saling downwind", the altered query string will be "sailing downwind". - * This field is included only if the original query string contains a - * spelling mistake. - * @member {string} [queryContext.alterationOverrideQuery] The query string + * @property {string} [queryContext.alteredQuery] The query string used by + * Bing to perform the query. Bing uses the altered query string if the + * original query string contained spelling mistakes. For example, if the + * query string is "saling downwind", the altered query string will be + * "sailing downwind". This field is included only if the original query + * string contains a spelling mistake. + * @property {string} [queryContext.alterationOverrideQuery] The query string * to use to force Bing to use the original string. For example, if the query * string is "saling downwind", the override query string will be "+saling * downwind". Remember to encode the query string which results in * "%2Bsaling+downwind". This field is included only if the original query * string contains a spelling mistake. - * @member {boolean} [queryContext.adultIntent] A Boolean value that + * @property {boolean} [queryContext.adultIntent] A Boolean value that * indicates whether the specified query has adult intent. The value is true * if the query has adult intent; otherwise, false. - * @member {boolean} [queryContext.askUserForLocation] A Boolean value that + * @property {boolean} [queryContext.askUserForLocation] A Boolean value that * indicates whether Bing requires the user's location to provide accurate * results. If you specified the user's location by using the * X-MSEdge-ClientIP and X-Search-Location headers, you can ignore this @@ -52,67 +52,67 @@ class SearchResponse extends models['Response'] { * include the location (for example, "Seattle weather"), this field is set * to false. This field is also set to false for queries that are not * location aware, such as "best sellers". - * @member {boolean} [queryContext.isTransactional] - * @member {object} [webPages] A list of webpages that are relevant to the + * @property {boolean} [queryContext.isTransactional] + * @property {object} [webPages] A list of webpages that are relevant to the * search query. - * @member {array} [webPages.value] A list of webpages that are relevant to + * @property {array} [webPages.value] A list of webpages that are relevant to * the query. - * @member {boolean} [webPages.someResultsRemoved] A Boolean value that + * @property {boolean} [webPages.someResultsRemoved] A Boolean value that * indicates whether the response excluded some results from the answer. If * Bing excluded some results, the value is true. - * @member {object} [images] A list of images that are relevant to the search - * query. - * @member {number} [images.nextOffset] - * @member {array} [images.value] A list of image objects that are relevant + * @property {object} [images] A list of images that are relevant to the + * search query. + * @property {number} [images.nextOffset] + * @property {array} [images.value] A list of image objects that are relevant * to the query. If there are no results, the List is empty. - * @member {array} [images.queryExpansions] - * @member {array} [images.similarTerms] - * @member {array} [images.relatedSearches] - * @member {object} [news] A list of news articles that are relevant to the + * @property {array} [images.queryExpansions] + * @property {array} [images.similarTerms] + * @property {array} [images.relatedSearches] + * @property {object} [news] A list of news articles that are relevant to the * search query. - * @member {array} [news.value] An array of NewsArticle objects that contain - * information about news articles that are relevant to the query. If there - * are no results to return for the request, the array is empty. - * @member {string} [news.location] - * @member {object} [relatedSearches] A list of related queries made by + * @property {array} [news.value] An array of NewsArticle objects that + * contain information about news articles that are relevant to the query. If + * there are no results to return for the request, the array is empty. + * @property {string} [news.location] + * @property {object} [relatedSearches] A list of related queries made by * others. - * @member {array} [relatedSearches.value] A list of related queries that + * @property {array} [relatedSearches.value] A list of related queries that * were made by others. - * @member {object} [spellSuggestions] The query string that likely + * @property {object} [spellSuggestions] The query string that likely * represents the user's intent. - * @member {array} [spellSuggestions.value] A list of suggested query strings - * that may represent the user's intention. The list contains only one Query - * object. - * @member {object} [timeZone] The date and time of one or more geographic + * @property {array} [spellSuggestions.value] A list of suggested query + * strings that may represent the user's intention. The list contains only + * one Query object. + * @property {object} [timeZone] The date and time of one or more geographic * locations. - * @member {object} [timeZone.primaryCityTime] The data and time, in UTC, of - * the geographic location specified in the query. If the query specified a - * specific geographic location (for example, a city), this object contains + * @property {object} [timeZone.primaryCityTime] The data and time, in UTC, + * of the geographic location specified in the query. If the query specified + * a specific geographic location (for example, a city), this object contains * the name of the geographic location and the current date and time of the * location, in UTC. If the query specified a general geographic location, * such as a state or country, this object contains the date and time of the * primary city or state found in the specified state or country. If the * location contains additional time zones, the otherCityTimes field contains * the data and time of cities or states located in the other time zones. - * @member {string} [timeZone.primaryCityTime.location] The name of the + * @property {string} [timeZone.primaryCityTime.location] The name of the * geographical location.For example, County; City; City, State; City, State, * Country; or Time Zone. - * @member {string} [timeZone.primaryCityTime.time] The data and time + * @property {string} [timeZone.primaryCityTime.time] The data and time * specified in the form, YYYY-MM-DDThh;mm:ss.ssssssZ. - * @member {string} [timeZone.primaryCityTime.utcOffset] The offset from UTC. - * For example, UTC-7. - * @member {array} [timeZone.otherCityTimes] A list of dates and times of + * @property {string} [timeZone.primaryCityTime.utcOffset] The offset from + * UTC. For example, UTC-7. + * @property {array} [timeZone.otherCityTimes] A list of dates and times of * nearby time zones. - * @member {object} [videos] A list of videos that are relevant to the search - * query. - * @member {array} [videos.value] A list of video objects that are relevant + * @property {object} [videos] A list of videos that are relevant to the + * search query. + * @property {array} [videos.value] A list of video objects that are relevant * to the query. - * @member {number} [videos.nextOffset] - * @member {array} [videos.queryExpansions] - * @member {array} [videos.relatedSearches] - * @member {object} [computation] The answer to a math expression or units + * @property {number} [videos.nextOffset] + * @property {array} [videos.queryExpansions] + * @property {array} [videos.relatedSearches] + * @property {object} [computation] The answer to a math expression or units * conversion expression. - * @member {string} [computation.expression] The math or conversion + * @property {string} [computation.expression] The math or conversion * expression. If the query contains a request to convert units of measure * (for example, meters to feet), this field contains the from units and * value contains the to units. If the query contains a mathematical @@ -124,21 +124,21 @@ class SearchResponse extends models['Response'] { * include formatting markers. For example, if the user's query is log(2), * the normalized expression includes the subscript markers. For more * information, see Hit Highlighting. - * @member {string} [computation.value] The expression's answer. - * @member {object} [rankingResponse] The order that Bing suggests that you + * @property {string} [computation.value] The expression's answer. + * @property {object} [rankingResponse] The order that Bing suggests that you * display the search results in. - * @member {object} [rankingResponse.pole] The search results that should be - * afforded the most visible treatment (for example, displayed above the + * @property {object} [rankingResponse.pole] The search results that should + * be afforded the most visible treatment (for example, displayed above the * mainline and sidebar). - * @member {array} [rankingResponse.pole.items] A list of search result items - * to display in the group. - * @member {object} [rankingResponse.mainline] The search results to display - * in the mainline. - * @member {array} [rankingResponse.mainline.items] A list of search result + * @property {array} [rankingResponse.pole.items] A list of search result + * items to display in the group. + * @property {object} [rankingResponse.mainline] The search results to + * display in the mainline. + * @property {array} [rankingResponse.mainline.items] A list of search result * items to display in the group. - * @member {object} [rankingResponse.sidebar] The search results to display + * @property {object} [rankingResponse.sidebar] The search results to display * in the sidebar. - * @member {array} [rankingResponse.sidebar.items] A list of search result + * @property {array} [rankingResponse.sidebar.items] A list of search result * items to display in the group. */ constructor() { diff --git a/lib/services/cognitiveServicesWebSearch/lib/models/searchResultsAnswer.js b/lib/services/cognitiveServicesWebSearch/lib/models/searchResultsAnswer.js index ce92430fda..8bfb8fca15 100644 --- a/lib/services/cognitiveServicesWebSearch/lib/models/searchResultsAnswer.js +++ b/lib/services/cognitiveServicesWebSearch/lib/models/searchResultsAnswer.js @@ -19,25 +19,25 @@ const models = require('./index'); class SearchResultsAnswer extends models['Answer'] { /** * Create a SearchResultsAnswer. - * @member {object} [queryContext] - * @member {string} [queryContext.originalQuery] The query string as + * @property {object} [queryContext] + * @property {string} [queryContext.originalQuery] The query string as * specified in the request. - * @member {string} [queryContext.alteredQuery] The query string used by Bing - * to perform the query. Bing uses the altered query string if the original - * query string contained spelling mistakes. For example, if the query string - * is "saling downwind", the altered query string will be "sailing downwind". - * This field is included only if the original query string contains a - * spelling mistake. - * @member {string} [queryContext.alterationOverrideQuery] The query string + * @property {string} [queryContext.alteredQuery] The query string used by + * Bing to perform the query. Bing uses the altered query string if the + * original query string contained spelling mistakes. For example, if the + * query string is "saling downwind", the altered query string will be + * "sailing downwind". This field is included only if the original query + * string contains a spelling mistake. + * @property {string} [queryContext.alterationOverrideQuery] The query string * to use to force Bing to use the original string. For example, if the query * string is "saling downwind", the override query string will be "+saling * downwind". Remember to encode the query string which results in * "%2Bsaling+downwind". This field is included only if the original query * string contains a spelling mistake. - * @member {boolean} [queryContext.adultIntent] A Boolean value that + * @property {boolean} [queryContext.adultIntent] A Boolean value that * indicates whether the specified query has adult intent. The value is true * if the query has adult intent; otherwise, false. - * @member {boolean} [queryContext.askUserForLocation] A Boolean value that + * @property {boolean} [queryContext.askUserForLocation] A Boolean value that * indicates whether Bing requires the user's location to provide accurate * results. If you specified the user's location by using the * X-MSEdge-ClientIP and X-Search-Location headers, you can ignore this @@ -47,11 +47,11 @@ class SearchResultsAnswer extends models['Answer'] { * include the location (for example, "Seattle weather"), this field is set * to false. This field is also set to false for queries that are not * location aware, such as "best sellers". - * @member {boolean} [queryContext.isTransactional] - * @member {number} [totalEstimatedMatches] The estimated number of webpages - * that are relevant to the query. Use this number along with the count and - * offset query parameters to page the results. - * @member {boolean} [isFamilyFriendly] + * @property {boolean} [queryContext.isTransactional] + * @property {number} [totalEstimatedMatches] The estimated number of + * webpages that are relevant to the query. Use this number along with the + * count and offset query parameters to page the results. + * @property {boolean} [isFamilyFriendly] */ constructor() { super(); diff --git a/lib/services/cognitiveServicesWebSearch/lib/models/spellSuggestions.js b/lib/services/cognitiveServicesWebSearch/lib/models/spellSuggestions.js index 94a1f1ae67..65dcddcfdd 100644 --- a/lib/services/cognitiveServicesWebSearch/lib/models/spellSuggestions.js +++ b/lib/services/cognitiveServicesWebSearch/lib/models/spellSuggestions.js @@ -25,8 +25,8 @@ const models = require('./index'); class SpellSuggestions extends models['SearchResultsAnswer'] { /** * Create a SpellSuggestions. - * @member {array} value A list of suggested query strings that may represent - * the user's intention. The list contains only one Query object. + * @property {array} value A list of suggested query strings that may + * represent the user's intention. The list contains only one Query object. */ constructor() { super(); diff --git a/lib/services/cognitiveServicesWebSearch/lib/models/thing.js b/lib/services/cognitiveServicesWebSearch/lib/models/thing.js index 728130ea34..be87936795 100644 --- a/lib/services/cognitiveServicesWebSearch/lib/models/thing.js +++ b/lib/services/cognitiveServicesWebSearch/lib/models/thing.js @@ -19,13 +19,14 @@ const models = require('./index'); class Thing extends models['Response'] { /** * Create a Thing. - * @member {string} [name] The name of the thing represented by this object. - * @member {string} [url] The URL to get more information about the thing + * @property {string} [name] The name of the thing represented by this + * object. + * @property {string} [url] The URL to get more information about the thing * represented by this object. - * @member {object} [image] - * @member {object} [image.thumbnail] The URL to a thumbnail of the image - * @member {string} [description] A short description of the item. - * @member {string} [bingId] An ID that uniquely identifies this item. + * @property {object} [image] + * @property {object} [image.thumbnail] The URL to a thumbnail of the image + * @property {string} [description] A short description of the item. + * @property {string} [bingId] An ID that uniquely identifies this item. */ constructor() { super(); diff --git a/lib/services/cognitiveServicesWebSearch/lib/models/timeZone.js b/lib/services/cognitiveServicesWebSearch/lib/models/timeZone.js index fe8a2e926f..5d0c6f2524 100644 --- a/lib/services/cognitiveServicesWebSearch/lib/models/timeZone.js +++ b/lib/services/cognitiveServicesWebSearch/lib/models/timeZone.js @@ -20,7 +20,7 @@ const models = require('./index'); class TimeZone extends models['SearchResultsAnswer'] { /** * Create a TimeZone. - * @member {object} primaryCityTime The data and time, in UTC, of the + * @property {object} primaryCityTime The data and time, in UTC, of the * geographic location specified in the query. If the query specified a * specific geographic location (for example, a city), this object contains * the name of the geographic location and the current date and time of the @@ -29,15 +29,15 @@ class TimeZone extends models['SearchResultsAnswer'] { * primary city or state found in the specified state or country. If the * location contains additional time zones, the otherCityTimes field contains * the data and time of cities or states located in the other time zones. - * @member {string} [primaryCityTime.location] The name of the geographical + * @property {string} [primaryCityTime.location] The name of the geographical * location.For example, County; City; City, State; City, State, Country; or * Time Zone. - * @member {string} [primaryCityTime.time] The data and time specified in the - * form, YYYY-MM-DDThh;mm:ss.ssssssZ. - * @member {string} [primaryCityTime.utcOffset] The offset from UTC. For + * @property {string} [primaryCityTime.time] The data and time specified in + * the form, YYYY-MM-DDThh;mm:ss.ssssssZ. + * @property {string} [primaryCityTime.utcOffset] The offset from UTC. For * example, UTC-7. - * @member {array} [otherCityTimes] A list of dates and times of nearby time - * zones. + * @property {array} [otherCityTimes] A list of dates and times of nearby + * time zones. */ constructor() { super(); diff --git a/lib/services/cognitiveServicesWebSearch/lib/models/timeZoneTimeZoneInformation.js b/lib/services/cognitiveServicesWebSearch/lib/models/timeZoneTimeZoneInformation.js index 3348d0f17f..61ade46666 100644 --- a/lib/services/cognitiveServicesWebSearch/lib/models/timeZoneTimeZoneInformation.js +++ b/lib/services/cognitiveServicesWebSearch/lib/models/timeZoneTimeZoneInformation.js @@ -17,11 +17,11 @@ class TimeZoneTimeZoneInformation { /** * Create a TimeZoneTimeZoneInformation. - * @member {string} location The name of the geographical location.For + * @property {string} location The name of the geographical location.For * example, County; City; City, State; City, State, Country; or Time Zone. - * @member {string} time The data and time specified in the form, + * @property {string} time The data and time specified in the form, * YYYY-MM-DDThh;mm:ss.ssssssZ. - * @member {string} utcOffset The offset from UTC. For example, UTC-7. + * @property {string} utcOffset The offset from UTC. For example, UTC-7. */ constructor() { } diff --git a/lib/services/cognitiveServicesWebSearch/lib/models/videoObject.js b/lib/services/cognitiveServicesWebSearch/lib/models/videoObject.js index 68b011dbdb..7dbe069ca7 100644 --- a/lib/services/cognitiveServicesWebSearch/lib/models/videoObject.js +++ b/lib/services/cognitiveServicesWebSearch/lib/models/videoObject.js @@ -20,16 +20,17 @@ const models = require('./index'); class VideoObject extends models['MediaObject'] { /** * Create a VideoObject. - * @member {string} [motionThumbnailUrl] - * @member {string} [motionThumbnailId] - * @member {string} [embedHtml] - * @member {boolean} [allowHttpsEmbed] - * @member {number} [viewCount] - * @member {object} [thumbnail] - * @member {object} [thumbnail.thumbnail] The URL to a thumbnail of the image - * @member {string} [videoId] - * @member {boolean} [allowMobileEmbed] - * @member {boolean} [isSuperfresh] + * @property {string} [motionThumbnailUrl] + * @property {string} [motionThumbnailId] + * @property {string} [embedHtml] + * @property {boolean} [allowHttpsEmbed] + * @property {number} [viewCount] + * @property {object} [thumbnail] + * @property {object} [thumbnail.thumbnail] The URL to a thumbnail of the + * image + * @property {string} [videoId] + * @property {boolean} [allowMobileEmbed] + * @property {boolean} [isSuperfresh] */ constructor() { super(); diff --git a/lib/services/cognitiveServicesWebSearch/lib/models/videos.js b/lib/services/cognitiveServicesWebSearch/lib/models/videos.js index 74e6f12756..b409cf7d97 100644 --- a/lib/services/cognitiveServicesWebSearch/lib/models/videos.js +++ b/lib/services/cognitiveServicesWebSearch/lib/models/videos.js @@ -20,11 +20,11 @@ const models = require('./index'); class Videos extends models['SearchResultsAnswer'] { /** * Create a Videos. - * @member {array} value A list of video objects that are relevant to the + * @property {array} value A list of video objects that are relevant to the * query. - * @member {number} [nextOffset] - * @member {array} [queryExpansions] - * @member {array} [relatedSearches] + * @property {number} [nextOffset] + * @property {array} [queryExpansions] + * @property {array} [relatedSearches] */ constructor() { super(); diff --git a/lib/services/cognitiveServicesWebSearch/lib/models/webMetaTag.js b/lib/services/cognitiveServicesWebSearch/lib/models/webMetaTag.js index 5c97d90675..ec2a316d23 100644 --- a/lib/services/cognitiveServicesWebSearch/lib/models/webMetaTag.js +++ b/lib/services/cognitiveServicesWebSearch/lib/models/webMetaTag.js @@ -17,8 +17,8 @@ class WebMetaTag { /** * Create a WebMetaTag. - * @member {string} [name] The metadata. - * @member {string} [content] The name of the metadata. + * @property {string} [name] The metadata. + * @property {string} [content] The name of the metadata. */ constructor() { } diff --git a/lib/services/cognitiveServicesWebSearch/lib/models/webPage.js b/lib/services/cognitiveServicesWebSearch/lib/models/webPage.js index 489b539b5b..9290b1175d 100644 --- a/lib/services/cognitiveServicesWebSearch/lib/models/webPage.js +++ b/lib/services/cognitiveServicesWebSearch/lib/models/webPage.js @@ -20,25 +20,25 @@ const models = require('./index'); class WebPage extends models['CreativeWork'] { /** * Create a WebPage. - * @member {string} [displayUrl] The display URL of the webpage. The URL is + * @property {string} [displayUrl] The display URL of the webpage. The URL is * meant for display purposes only and is not well formed. - * @member {string} [snippet] A snippet of text from the webpage that + * @property {string} [snippet] A snippet of text from the webpage that * describes its contents. - * @member {array} [deepLinks] A list of links to related content that Bing + * @property {array} [deepLinks] A list of links to related content that Bing * found in the website that contains this webpage. The Webpage object in * this context includes only the name, url, urlPingSuffix, and snippet * fields. - * @member {string} [dateLastCrawled] The last time that Bing crawled the + * @property {string} [dateLastCrawled] The last time that Bing crawled the * webpage. The date is in the form, YYYY-MM-DDTHH:MM:SS. For example, * 2015-04-13T05:23:39. - * @member {array} [searchTags] A list of search tags that the webpage owner - * specified on the webpage. The API returns only indexed search tags. The - * name field of the MetaTag object contains the indexed search tag. Search - * tags begin with search.* (for example, search.assetId). The content field - * contains the tag's value. - * @member {object} [primaryImageOfPage] - * @member {object} [primaryImageOfPage.thumbnail] The URL to a thumbnail of - * the image + * @property {array} [searchTags] A list of search tags that the webpage + * owner specified on the webpage. The API returns only indexed search tags. + * The name field of the MetaTag object contains the indexed search tag. + * Search tags begin with search.* (for example, search.assetId). The content + * field contains the tag's value. + * @property {object} [primaryImageOfPage] + * @property {object} [primaryImageOfPage.thumbnail] The URL to a thumbnail + * of the image */ constructor() { super(); diff --git a/lib/services/cognitiveServicesWebSearch/lib/models/webWebAnswer.js b/lib/services/cognitiveServicesWebSearch/lib/models/webWebAnswer.js index 2b6ff3ccd8..7115234b04 100644 --- a/lib/services/cognitiveServicesWebSearch/lib/models/webWebAnswer.js +++ b/lib/services/cognitiveServicesWebSearch/lib/models/webWebAnswer.js @@ -20,8 +20,8 @@ const models = require('./index'); class WebWebAnswer extends models['SearchResultsAnswer'] { /** * Create a WebWebAnswer. - * @member {array} value A list of webpages that are relevant to the query. - * @member {boolean} [someResultsRemoved] A Boolean value that indicates + * @property {array} value A list of webpages that are relevant to the query. + * @property {boolean} [someResultsRemoved] A Boolean value that indicates * whether the response excluded some results from the answer. If Bing * excluded some results, the value is true. */ diff --git a/lib/services/cognitiveServicesWebSearch/lib/models/webWebGrouping.js b/lib/services/cognitiveServicesWebSearch/lib/models/webWebGrouping.js index a88cc538ba..edd1777367 100644 --- a/lib/services/cognitiveServicesWebSearch/lib/models/webWebGrouping.js +++ b/lib/services/cognitiveServicesWebSearch/lib/models/webWebGrouping.js @@ -16,8 +16,8 @@ class WebWebGrouping { /** * Create a WebWebGrouping. - * @member {array} webPages - * @member {string} _type Polymorphic Discriminator + * @property {array} webPages + * @property {string} _type Polymorphic Discriminator */ constructor() { } diff --git a/lib/services/cognitiveServicesWebSearch/lib/operations/index.d.ts b/lib/services/cognitiveServicesWebSearch/lib/operations/index.d.ts index 80ca0cdf02..a51d7f28a8 100644 --- a/lib/services/cognitiveServicesWebSearch/lib/operations/index.d.ts +++ b/lib/services/cognitiveServicesWebSearch/lib/operations/index.d.ts @@ -16,7 +16,7 @@ import * as models from '../models'; * @class * Web * __NOTE__: An instance of this class is automatically created for an - * instance of the WebSearchAPIClient. + * instance of the WebSearchClient. */ export interface Web { diff --git a/lib/services/cognitiveServicesWebSearch/lib/operations/web.js b/lib/services/cognitiveServicesWebSearch/lib/operations/web.js index a6b6677fe3..28ea38faad 100644 --- a/lib/services/cognitiveServicesWebSearch/lib/operations/web.js +++ b/lib/services/cognitiveServicesWebSearch/lib/operations/web.js @@ -304,6 +304,9 @@ function _search(query, options, callback) { let xBingApisSDK = 'true'; // Validate try { + if (this.client.endpoint === null || this.client.endpoint === undefined || typeof this.client.endpoint.valueOf() !== 'string') { + throw new Error('this.client.endpoint cannot be null or undefined and it must be of type string.'); + } if (acceptLanguage !== null && acceptLanguage !== undefined && typeof acceptLanguage.valueOf() !== 'string') { throw new Error('acceptLanguage must be of type string.'); } @@ -376,6 +379,7 @@ function _search(query, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'search'; + requestUrl = requestUrl.replace('{Endpoint}', this.client.endpoint); let queryParameters = []; if (answerCount !== null && answerCount !== undefined) { queryParameters.push('answerCount=' + encodeURIComponent(answerCount.toString())); @@ -515,7 +519,7 @@ function _search(query, options, callback) { class Web { /** * Create a Web. - * @param {WebSearchAPIClient} client Reference to the service client. + * @param {WebSearchClient} client Reference to the service client. */ constructor(client) { this.client = client; diff --git a/lib/services/videoSearch/lib/videoSearchAPIClient.d.ts b/lib/services/cognitiveServicesWebSearch/lib/webSearchClient.d.ts similarity index 56% rename from lib/services/videoSearch/lib/videoSearchAPIClient.d.ts rename to lib/services/cognitiveServicesWebSearch/lib/webSearchClient.d.ts index 2080382825..59d99ddabc 100644 --- a/lib/services/videoSearch/lib/videoSearchAPIClient.d.ts +++ b/lib/services/cognitiveServicesWebSearch/lib/webSearchClient.d.ts @@ -12,16 +12,24 @@ import { ServiceClient, ServiceClientOptions, ServiceClientCredentials } from 'm import * as models from "./models"; import * as operations from "./operations"; -export default class VideoSearchAPIClient extends ServiceClient { +/** + * WebSearchClientOptions for WebSearchClient. + */ +declare interface WebSearchClientOptions extends ServiceClientOptions { + /** + * @property {string} [endpoint] - Supported Cognitive Services endpoints (protocol and hostname, for example: "https://westus.api.cognitive.microsoft.com", "https://api.cognitive.microsoft.com"). + */ + endpoint?: string; +} + +export default class WebSearchClient extends ServiceClient { /** * @class - * Initializes a new instance of the VideoSearchAPIClient class. + * Initializes a new instance of the WebSearchClient class. * @constructor * * @param {credentials} credentials - Subscription credentials which uniquely identify client subscription. * - * @param {string} [baseUri] - The base URI of the service. - * * @param {object} [options] - The parameter options * * @param {Array} [options.filters] - Filters to be added to the request pipeline @@ -31,13 +39,17 @@ export default class VideoSearchAPIClient extends ServiceClient { * * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy * + * @param {string} [options.endpoint] - Supported Cognitive Services endpoints (protocol and hostname, for example: "https://westus.api.cognitive.microsoft.com", "https://api.cognitive.microsoft.com"). + * */ - constructor(credentials: ServiceClientCredentials, baseUri?: string, options?: ServiceClientOptions); + constructor(credentials: ServiceClientCredentials, options?: WebSearchClientOptions); credentials: ServiceClientCredentials; + endpoint: string; + // Operation groups - videosOperations: operations.VideosOperations; + web: operations.Web; } -export { VideoSearchAPIClient, models as VideoSearchAPIModels }; +export { WebSearchClient, models as WebSearchModels }; diff --git a/lib/services/cognitiveServicesWebSearch/lib/webSearchClient.js b/lib/services/cognitiveServicesWebSearch/lib/webSearchClient.js new file mode 100644 index 0000000000..2eae90282f --- /dev/null +++ b/lib/services/cognitiveServicesWebSearch/lib/webSearchClient.js @@ -0,0 +1,64 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +/* jshint latedef:false */ +/* jshint forin:false */ +/* jshint noempty:false */ + +'use strict'; + +const msRest = require('ms-rest'); +const ServiceClient = msRest.ServiceClient; + +const models = require('./models'); +const operations = require('./operations'); + + +/** Class representing a WebSearchClient. */ +class WebSearchClient extends ServiceClient { + /** + * Create a WebSearchClient. + * @param {credentials} credentials - Subscription credentials which uniquely identify client subscription. + * @param {object} [options] - The parameter options + * @param {Array} [options.filters] - Filters to be added to the request pipeline + * @param {object} [options.requestOptions] - Options for the underlying request object + * {@link https://github.com/request/request#requestoptions-callback Options doc} + * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy + * @param {string} [options.endpoint] - Supported Cognitive Services endpoints (protocol and hostname, for example: "https://westus.api.cognitive.microsoft.com", "https://api.cognitive.microsoft.com"). + */ + constructor(credentials, options) { + if (credentials === null || credentials === undefined) { + throw new Error('\'credentials\' cannot be null.'); + } + + if (!options) options = {}; + + super(credentials, options); + + this.endpoint = 'https://api.cognitive.microsoft.com'; + this.baseUri = '{Endpoint}/bing/v7.0'; + this.credentials = credentials; + + let packageInfo = this.getPackageJsonInfo(__dirname); + this.addUserAgentInfo(`${packageInfo.name}/${packageInfo.version}`); + if(options.endpoint !== null && options.endpoint !== undefined) { + this.endpoint = options.endpoint; + } + this.web = new operations.Web(this); + this.models = models; + msRest.addSerializationMixin(this); + } + +} + +module.exports = WebSearchClient; +module.exports['default'] = WebSearchClient; +module.exports.WebSearchClient = WebSearchClient; +module.exports.WebSearchModels = models; diff --git a/lib/services/cognitiveServicesWebSearch/package.json b/lib/services/cognitiveServicesWebSearch/package.json index 567a3131ab..e73e672088 100644 --- a/lib/services/cognitiveServicesWebSearch/package.json +++ b/lib/services/cognitiveServicesWebSearch/package.json @@ -1,8 +1,8 @@ { "name": "azure-cognitiveservices-websearch", "author": "Microsoft Corporation", - "description": "WebSearchAPIClient Library with typescript type definitions for node", - "version": "1.1.0", + "description": "WebSearchClient Library with typescript type definitions for node", + "version": "2.0.0", "dependencies": { "ms-rest": "^2.3.3" }, @@ -11,8 +11,8 @@ "azure" ], "license": "MIT", - "main": "./lib/webSearchAPIClient.js", - "types": "./lib/webSearchAPIClient.d.ts", + "main": "./lib/webSearchClient.js", + "types": "./lib/webSearchClient.d.ts", "homepage": "https://github.com/azure/azure-sdk-for-node/tree/master/lib/services/cognitiveServicesWebSearch", "repository": { "type": "git", @@ -21,4 +21,4 @@ "bugs": { "url": "https://github.com/azure/azure-sdk-for-node/issues" } -} \ No newline at end of file +} diff --git a/lib/services/containerRegistryManagement/README.md b/lib/services/containerRegistryManagement/README.md index b977d48fb7..51a5951535 100644 --- a/lib/services/containerRegistryManagement/README.md +++ b/lib/services/containerRegistryManagement/README.md @@ -3,40 +3,43 @@ uid: azure-arm-containerregistry summary: *content --- -# Microsoft Azure SDK for Node.js - ContainerRegistryManagementClient +**This SDK will be deprecated next year and will be replaced by a new TypeScript-based isomorphic SDK (found at https://github.com/Azure/azure-sdk-for-js) which works on Node.js and browsers.** +## Microsoft Azure SDK for Node.js - ContainerRegistryManagementClient + This project provides a Node.js package for accessing Azure. Right now it supports: - **Node.js version 6.x.x or higher** -## Features +### Features -## How to Install +### How to Install ```bash npm install azure-arm-containerregistry ``` -## How to use +### How to use -### Authentication, client creation and get registries as an example. +#### Authentication, client creation, and get registries as an example. ```javascript const msRestAzure = require("ms-rest-azure"); const ContainerRegistryManagementClient = require("azure-arm-containerregistry"); msRestAzure.interactiveLogin().then((creds) => { - const subscriptionId = ""; - const client = new ContainerRegistryManagementClient(creds, subscriptionId); - const resourceGroupName = "testresourceGroupName"; - const registryName = "testregistryName"; - return client.registries.get(resourceGroupName, registryName).then((result) => { - console.log("The result is:"); - console.log(result); - }); + const subscriptionId = ""; + const client = new ContainerRegistryManagementClient(creds, subscriptionId); + const resourceGroupName = "testresourceGroupName"; + const registryName = "testregistryName"; + + return client.registries.get(resourceGroupName, registryName).then((result) => { + console.log("The result is:"); + console.log(result); + }); }).catch((err) => { console.log('An error occurred:'); console.dir(err, {depth: null, colors: true}); }); - -## Related projects +``` +### Related projects - [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node) diff --git a/lib/services/containerRegistryManagement/lib/models/actor.js b/lib/services/containerRegistryManagement/lib/models/actor.js index 974a6fe851..59f20e9196 100644 --- a/lib/services/containerRegistryManagement/lib/models/actor.js +++ b/lib/services/containerRegistryManagement/lib/models/actor.js @@ -18,7 +18,7 @@ class Actor { /** * Create a Actor. - * @member {string} [name] The subject or username associated with the + * @property {string} [name] The subject or username associated with the * request context that generated the event. */ constructor() { diff --git a/lib/services/containerRegistryManagement/lib/models/agentProperties.js b/lib/services/containerRegistryManagement/lib/models/agentProperties.js index 54ca08b66b..741d938bb4 100644 --- a/lib/services/containerRegistryManagement/lib/models/agentProperties.js +++ b/lib/services/containerRegistryManagement/lib/models/agentProperties.js @@ -17,7 +17,7 @@ class AgentProperties { /** * Create a AgentProperties. - * @member {number} [cpu] The CPU configuration in terms of number of cores + * @property {number} [cpu] The CPU configuration in terms of number of cores * required for the run. */ constructor() { diff --git a/lib/services/containerRegistryManagement/lib/models/argument.js b/lib/services/containerRegistryManagement/lib/models/argument.js index 292d0d83d9..83baa771a4 100644 --- a/lib/services/containerRegistryManagement/lib/models/argument.js +++ b/lib/services/containerRegistryManagement/lib/models/argument.js @@ -17,9 +17,9 @@ class Argument { /** * Create a Argument. - * @member {string} name The name of the argument. - * @member {string} value The value of the argument. - * @member {boolean} [isSecret] Flag to indicate whether the argument + * @property {string} name The name of the argument. + * @property {string} value The value of the argument. + * @property {boolean} [isSecret] Flag to indicate whether the argument * represents a secret and want to be removed from build logs. Default value: * false . */ diff --git a/lib/services/containerRegistryManagement/lib/models/authInfo.js b/lib/services/containerRegistryManagement/lib/models/authInfo.js index 0303c4f789..3902cfcc4c 100644 --- a/lib/services/containerRegistryManagement/lib/models/authInfo.js +++ b/lib/services/containerRegistryManagement/lib/models/authInfo.js @@ -17,14 +17,15 @@ class AuthInfo { /** * Create a AuthInfo. - * @member {string} tokenType The type of Auth token. Possible values + * @property {string} tokenType The type of Auth token. Possible values * include: 'PAT', 'OAuth' - * @member {string} token The access token used to access the source control - * provider. - * @member {string} [refreshToken] The refresh token used to refresh the + * @property {string} token The access token used to access the source + * control provider. + * @property {string} [refreshToken] The refresh token used to refresh the * access token. - * @member {string} [scope] The scope of the access token. - * @member {number} [expiresIn] Time in seconds that the token remains valid + * @property {string} [scope] The scope of the access token. + * @property {number} [expiresIn] Time in seconds that the token remains + * valid */ constructor() { } diff --git a/lib/services/containerRegistryManagement/lib/models/authInfoUpdateParameters.js b/lib/services/containerRegistryManagement/lib/models/authInfoUpdateParameters.js index df1896032b..f83a7d8c96 100644 --- a/lib/services/containerRegistryManagement/lib/models/authInfoUpdateParameters.js +++ b/lib/services/containerRegistryManagement/lib/models/authInfoUpdateParameters.js @@ -17,14 +17,15 @@ class AuthInfoUpdateParameters { /** * Create a AuthInfoUpdateParameters. - * @member {string} [tokenType] The type of Auth token. Possible values + * @property {string} [tokenType] The type of Auth token. Possible values * include: 'PAT', 'OAuth' - * @member {string} [token] The access token used to access the source + * @property {string} [token] The access token used to access the source * control provider. - * @member {string} [refreshToken] The refresh token used to refresh the + * @property {string} [refreshToken] The refresh token used to refresh the * access token. - * @member {string} [scope] The scope of the access token. - * @member {number} [expiresIn] Time in seconds that the token remains valid + * @property {string} [scope] The scope of the access token. + * @property {number} [expiresIn] Time in seconds that the token remains + * valid */ constructor() { } diff --git a/lib/services/containerRegistryManagement/lib/models/baseImageDependency.js b/lib/services/containerRegistryManagement/lib/models/baseImageDependency.js index 19d89b38b5..73edb03149 100644 --- a/lib/services/containerRegistryManagement/lib/models/baseImageDependency.js +++ b/lib/services/containerRegistryManagement/lib/models/baseImageDependency.js @@ -17,12 +17,12 @@ class BaseImageDependency { /** * Create a BaseImageDependency. - * @member {string} [type] The type of the base image dependency. Possible + * @property {string} [type] The type of the base image dependency. Possible * values include: 'BuildTime', 'RunTime' - * @member {string} [registry] The registry login server. - * @member {string} [repository] The repository name. - * @member {string} [tag] The tag name. - * @member {string} [digest] The sha256-based digest of the image manifest. + * @property {string} [registry] The registry login server. + * @property {string} [repository] The repository name. + * @property {string} [tag] The tag name. + * @property {string} [digest] The sha256-based digest of the image manifest. */ constructor() { } diff --git a/lib/services/containerRegistryManagement/lib/models/baseImageTrigger.js b/lib/services/containerRegistryManagement/lib/models/baseImageTrigger.js index 09741034b1..a29b738abe 100644 --- a/lib/services/containerRegistryManagement/lib/models/baseImageTrigger.js +++ b/lib/services/containerRegistryManagement/lib/models/baseImageTrigger.js @@ -17,11 +17,11 @@ class BaseImageTrigger { /** * Create a BaseImageTrigger. - * @member {string} baseImageTriggerType The type of the auto trigger for + * @property {string} baseImageTriggerType The type of the auto trigger for * base image dependency updates. Possible values include: 'All', 'Runtime' - * @member {string} [status] The current status of trigger. Possible values + * @property {string} [status] The current status of trigger. Possible values * include: 'Disabled', 'Enabled' - * @member {string} name The name of the trigger. + * @property {string} name The name of the trigger. */ constructor() { } diff --git a/lib/services/containerRegistryManagement/lib/models/baseImageTriggerUpdateParameters.js b/lib/services/containerRegistryManagement/lib/models/baseImageTriggerUpdateParameters.js index 6d1c78aab7..ab0b3c35ac 100644 --- a/lib/services/containerRegistryManagement/lib/models/baseImageTriggerUpdateParameters.js +++ b/lib/services/containerRegistryManagement/lib/models/baseImageTriggerUpdateParameters.js @@ -17,11 +17,11 @@ class BaseImageTriggerUpdateParameters { /** * Create a BaseImageTriggerUpdateParameters. - * @member {string} [baseImageTriggerType] The type of the auto trigger for + * @property {string} [baseImageTriggerType] The type of the auto trigger for * base image dependency updates. Possible values include: 'All', 'Runtime' - * @member {string} [status] The current status of trigger. Possible values + * @property {string} [status] The current status of trigger. Possible values * include: 'Disabled', 'Enabled' - * @member {string} name The name of the trigger. + * @property {string} name The name of the trigger. */ constructor() { } diff --git a/lib/services/containerRegistryManagement/lib/models/callbackConfig.js b/lib/services/containerRegistryManagement/lib/models/callbackConfig.js index a9a193b51e..727c38704c 100644 --- a/lib/services/containerRegistryManagement/lib/models/callbackConfig.js +++ b/lib/services/containerRegistryManagement/lib/models/callbackConfig.js @@ -17,10 +17,10 @@ class CallbackConfig { /** * Create a CallbackConfig. - * @member {string} serviceUri The service URI for the webhook to post + * @property {string} serviceUri The service URI for the webhook to post * notifications. - * @member {object} [customHeaders] Custom headers that will be added to the - * webhook notifications. + * @property {object} [customHeaders] Custom headers that will be added to + * the webhook notifications. */ constructor() { } diff --git a/lib/services/containerRegistryManagement/lib/models/dockerBuildRequest.js b/lib/services/containerRegistryManagement/lib/models/dockerBuildRequest.js index 7c4e8f44f1..36ec1a8208 100644 --- a/lib/services/containerRegistryManagement/lib/models/dockerBuildRequest.js +++ b/lib/services/containerRegistryManagement/lib/models/dockerBuildRequest.js @@ -20,32 +20,32 @@ const models = require('./index'); class DockerBuildRequest extends models['RunRequest'] { /** * Create a DockerBuildRequest. - * @member {array} [imageNames] The fully qualified image names including the - * repository and tag. - * @member {boolean} [isPushEnabled] The value of this property indicates + * @property {array} [imageNames] The fully qualified image names including + * the repository and tag. + * @property {boolean} [isPushEnabled] The value of this property indicates * whether the image built should be pushed to the registry or not. Default * value: true . - * @member {boolean} [noCache] The value of this property indicates whether + * @property {boolean} [noCache] The value of this property indicates whether * the image cache is enabled or not. Default value: false . - * @member {string} dockerFilePath The Docker file path relative to the + * @property {string} dockerFilePath The Docker file path relative to the * source location. - * @member {array} [argumentsProperty] The collection of override arguments + * @property {array} [argumentsProperty] The collection of override arguments * to be used when executing the run. - * @member {number} [timeout] Run timeout in seconds. Default value: 3600 . - * @member {object} platform The platform properties against which the run + * @property {number} [timeout] Run timeout in seconds. Default value: 3600 . + * @property {object} platform The platform properties against which the run * has to happen. - * @member {string} [platform.os] The operating system type required for the - * run. Possible values include: 'Windows', 'Linux' - * @member {string} [platform.architecture] The OS architecture. Possible + * @property {string} [platform.os] The operating system type required for + * the run. Possible values include: 'Windows', 'Linux' + * @property {string} [platform.architecture] The OS architecture. Possible * values include: 'amd64', 'x86', 'arm' - * @member {string} [platform.variant] Variant of the CPU. Possible values + * @property {string} [platform.variant] Variant of the CPU. Possible values * include: 'v6', 'v7', 'v8' - * @member {object} [agentConfiguration] The machine configuration of the run - * agent. - * @member {number} [agentConfiguration.cpu] The CPU configuration in terms + * @property {object} [agentConfiguration] The machine configuration of the + * run agent. + * @property {number} [agentConfiguration.cpu] The CPU configuration in terms * of number of cores required for the run. - * @member {string} [sourceLocation] The URL(absolute or relative) of the - * source context. It can be an URL to a tar or git repoistory. + * @property {string} [sourceLocation] The URL(absolute or relative) of the + * source context. It can be an URL to a tar or git repository. * If it is relative URL, the relative path should be obtained from calling * listBuildSourceUploadUrl API. */ diff --git a/lib/services/containerRegistryManagement/lib/models/dockerBuildStep.js b/lib/services/containerRegistryManagement/lib/models/dockerBuildStep.js index c1f77779b9..1ca836d3d5 100644 --- a/lib/services/containerRegistryManagement/lib/models/dockerBuildStep.js +++ b/lib/services/containerRegistryManagement/lib/models/dockerBuildStep.js @@ -20,16 +20,16 @@ const models = require('./index'); class DockerBuildStep extends models['TaskStepProperties'] { /** * Create a DockerBuildStep. - * @member {array} [imageNames] The fully qualified image names including the - * repository and tag. - * @member {boolean} [isPushEnabled] The value of this property indicates + * @property {array} [imageNames] The fully qualified image names including + * the repository and tag. + * @property {boolean} [isPushEnabled] The value of this property indicates * whether the image built should be pushed to the registry or not. Default * value: true . - * @member {boolean} [noCache] The value of this property indicates whether + * @property {boolean} [noCache] The value of this property indicates whether * the image cache is enabled or not. Default value: false . - * @member {string} dockerFilePath The Docker file path relative to the + * @property {string} dockerFilePath The Docker file path relative to the * source context. - * @member {array} [argumentsProperty] The collection of override arguments + * @property {array} [argumentsProperty] The collection of override arguments * to be used when executing this build step. */ constructor() { diff --git a/lib/services/containerRegistryManagement/lib/models/dockerBuildStepUpdateParameters.js b/lib/services/containerRegistryManagement/lib/models/dockerBuildStepUpdateParameters.js index e0bcb290e8..8d9e573bc6 100644 --- a/lib/services/containerRegistryManagement/lib/models/dockerBuildStepUpdateParameters.js +++ b/lib/services/containerRegistryManagement/lib/models/dockerBuildStepUpdateParameters.js @@ -20,15 +20,15 @@ const models = require('./index'); class DockerBuildStepUpdateParameters extends models['TaskStepUpdateParameters'] { /** * Create a DockerBuildStepUpdateParameters. - * @member {array} [imageNames] The fully qualified image names including the - * repository and tag. - * @member {boolean} [isPushEnabled] The value of this property indicates + * @property {array} [imageNames] The fully qualified image names including + * the repository and tag. + * @property {boolean} [isPushEnabled] The value of this property indicates * whether the image built should be pushed to the registry or not. - * @member {boolean} [noCache] The value of this property indicates whether + * @property {boolean} [noCache] The value of this property indicates whether * the image cache is enabled or not. - * @member {string} [dockerFilePath] The Docker file path relative to the + * @property {string} [dockerFilePath] The Docker file path relative to the * source context. - * @member {array} [argumentsProperty] The collection of override arguments + * @property {array} [argumentsProperty] The collection of override arguments * to be used when executing this build step. */ constructor() { diff --git a/lib/services/containerRegistryManagement/lib/models/encodedTaskRunRequest.js b/lib/services/containerRegistryManagement/lib/models/encodedTaskRunRequest.js index eca48141cd..1838f046fa 100644 --- a/lib/services/containerRegistryManagement/lib/models/encodedTaskRunRequest.js +++ b/lib/services/containerRegistryManagement/lib/models/encodedTaskRunRequest.js @@ -20,27 +20,27 @@ const models = require('./index'); class EncodedTaskRunRequest extends models['RunRequest'] { /** * Create a EncodedTaskRunRequest. - * @member {string} encodedTaskContent Base64 encoded value of the + * @property {string} encodedTaskContent Base64 encoded value of the * template/definition file content. - * @member {string} [encodedValuesContent] Base64 encoded value of the + * @property {string} [encodedValuesContent] Base64 encoded value of the * parameters/values file content. - * @member {array} [values] The collection of overridable values that can be - * passed when running a task. - * @member {number} [timeout] Run timeout in seconds. Default value: 3600 . - * @member {object} platform The platform properties against which the run + * @property {array} [values] The collection of overridable values that can + * be passed when running a task. + * @property {number} [timeout] Run timeout in seconds. Default value: 3600 . + * @property {object} platform The platform properties against which the run * has to happen. - * @member {string} [platform.os] The operating system type required for the - * run. Possible values include: 'Windows', 'Linux' - * @member {string} [platform.architecture] The OS architecture. Possible + * @property {string} [platform.os] The operating system type required for + * the run. Possible values include: 'Windows', 'Linux' + * @property {string} [platform.architecture] The OS architecture. Possible * values include: 'amd64', 'x86', 'arm' - * @member {string} [platform.variant] Variant of the CPU. Possible values + * @property {string} [platform.variant] Variant of the CPU. Possible values * include: 'v6', 'v7', 'v8' - * @member {object} [agentConfiguration] The machine configuration of the run - * agent. - * @member {number} [agentConfiguration.cpu] The CPU configuration in terms + * @property {object} [agentConfiguration] The machine configuration of the + * run agent. + * @property {number} [agentConfiguration.cpu] The CPU configuration in terms * of number of cores required for the run. - * @member {string} [sourceLocation] The URL(absolute or relative) of the - * source context. It can be an URL to a tar or git repoistory. + * @property {string} [sourceLocation] The URL(absolute or relative) of the + * source context. It can be an URL to a tar or git repository. * If it is relative URL, the relative path should be obtained from calling * listBuildSourceUploadUrl API. */ diff --git a/lib/services/containerRegistryManagement/lib/models/encodedTaskStep.js b/lib/services/containerRegistryManagement/lib/models/encodedTaskStep.js index 2e96a591fa..0e94f4f381 100644 --- a/lib/services/containerRegistryManagement/lib/models/encodedTaskStep.js +++ b/lib/services/containerRegistryManagement/lib/models/encodedTaskStep.js @@ -20,12 +20,12 @@ const models = require('./index'); class EncodedTaskStep extends models['TaskStepProperties'] { /** * Create a EncodedTaskStep. - * @member {string} encodedTaskContent Base64 encoded value of the + * @property {string} encodedTaskContent Base64 encoded value of the * template/definition file content. - * @member {string} [encodedValuesContent] Base64 encoded value of the + * @property {string} [encodedValuesContent] Base64 encoded value of the * parameters/values file content. - * @member {array} [values] The collection of overridable values that can be - * passed when running a task. + * @property {array} [values] The collection of overridable values that can + * be passed when running a task. */ constructor() { super(); diff --git a/lib/services/containerRegistryManagement/lib/models/encodedTaskStepUpdateParameters.js b/lib/services/containerRegistryManagement/lib/models/encodedTaskStepUpdateParameters.js index f12308b425..be5584f9ba 100644 --- a/lib/services/containerRegistryManagement/lib/models/encodedTaskStepUpdateParameters.js +++ b/lib/services/containerRegistryManagement/lib/models/encodedTaskStepUpdateParameters.js @@ -20,12 +20,12 @@ const models = require('./index'); class EncodedTaskStepUpdateParameters extends models['TaskStepUpdateParameters'] { /** * Create a EncodedTaskStepUpdateParameters. - * @member {string} [encodedTaskContent] Base64 encoded value of the + * @property {string} [encodedTaskContent] Base64 encoded value of the * template/definition file content. - * @member {string} [encodedValuesContent] Base64 encoded value of the + * @property {string} [encodedValuesContent] Base64 encoded value of the * parameters/values file content. - * @member {array} [values] The collection of overridable values that can be - * passed when running a task. + * @property {array} [values] The collection of overridable values that can + * be passed when running a task. */ constructor() { super(); diff --git a/lib/services/containerRegistryManagement/lib/models/event.js b/lib/services/containerRegistryManagement/lib/models/event.js index 1ebb10b49a..6e2508c4df 100644 --- a/lib/services/containerRegistryManagement/lib/models/event.js +++ b/lib/services/containerRegistryManagement/lib/models/event.js @@ -20,76 +20,77 @@ const models = require('./index'); class Event extends models['EventInfo'] { /** * Create a Event. - * @member {object} [eventRequestMessage] The event request message sent to + * @property {object} [eventRequestMessage] The event request message sent to * the service URI. - * @member {object} [eventRequestMessage.content] The content of the event + * @property {object} [eventRequestMessage.content] The content of the event * request message. - * @member {string} [eventRequestMessage.content.id] The event ID. - * @member {date} [eventRequestMessage.content.timestamp] The time at which + * @property {string} [eventRequestMessage.content.id] The event ID. + * @property {date} [eventRequestMessage.content.timestamp] The time at which * the event occurred. - * @member {string} [eventRequestMessage.content.action] The action that + * @property {string} [eventRequestMessage.content.action] The action that * encompasses the provided event. - * @member {object} [eventRequestMessage.content.target] The target of the + * @property {object} [eventRequestMessage.content.target] The target of the * event. - * @member {string} [eventRequestMessage.content.target.mediaType] The MIME + * @property {string} [eventRequestMessage.content.target.mediaType] The MIME * type of the referenced object. - * @member {number} [eventRequestMessage.content.target.size] The number of + * @property {number} [eventRequestMessage.content.target.size] The number of * bytes of the content. Same as Length field. - * @member {string} [eventRequestMessage.content.target.digest] The digest of - * the content, as defined by the Registry V2 HTTP API Specification. - * @member {number} [eventRequestMessage.content.target.length] The number of - * bytes of the content. Same as Size field. - * @member {string} [eventRequestMessage.content.target.repository] The + * @property {string} [eventRequestMessage.content.target.digest] The digest + * of the content, as defined by the Registry V2 HTTP API Specification. + * @property {number} [eventRequestMessage.content.target.length] The number + * of bytes of the content. Same as Size field. + * @property {string} [eventRequestMessage.content.target.repository] The * repository name. - * @member {string} [eventRequestMessage.content.target.url] The direct URL + * @property {string} [eventRequestMessage.content.target.url] The direct URL * to the content. - * @member {string} [eventRequestMessage.content.target.tag] The tag name. - * @member {object} [eventRequestMessage.content.request] The request that + * @property {string} [eventRequestMessage.content.target.tag] The tag name. + * @property {object} [eventRequestMessage.content.request] The request that * generated the event. - * @member {string} [eventRequestMessage.content.request.id] The ID of the + * @property {string} [eventRequestMessage.content.request.id] The ID of the * request that initiated the event. - * @member {string} [eventRequestMessage.content.request.addr] The IP or + * @property {string} [eventRequestMessage.content.request.addr] The IP or * hostname and possibly port of the client connection that initiated the * event. This is the RemoteAddr from the standard http request. - * @member {string} [eventRequestMessage.content.request.host] The externally - * accessible hostname of the registry instance, as specified by the http - * host header on incoming requests. - * @member {string} [eventRequestMessage.content.request.method] The request - * method that generated the event. - * @member {string} [eventRequestMessage.content.request.useragent] The user - * agent header of the request. - * @member {object} [eventRequestMessage.content.actor] The agent that + * @property {string} [eventRequestMessage.content.request.host] The + * externally accessible hostname of the registry instance, as specified by + * the http host header on incoming requests. + * @property {string} [eventRequestMessage.content.request.method] The + * request method that generated the event. + * @property {string} [eventRequestMessage.content.request.useragent] The + * user agent header of the request. + * @property {object} [eventRequestMessage.content.actor] The agent that * initiated the event. For most situations, this could be from the * authorization context of the request. - * @member {string} [eventRequestMessage.content.actor.name] The subject or + * @property {string} [eventRequestMessage.content.actor.name] The subject or * username associated with the request context that generated the event. - * @member {object} [eventRequestMessage.content.source] The registry node + * @property {object} [eventRequestMessage.content.source] The registry node * that generated the event. Put differently, while the actor initiates the * event, the source generates it. - * @member {string} [eventRequestMessage.content.source.addr] The IP or + * @property {string} [eventRequestMessage.content.source.addr] The IP or * hostname and the port of the registry node that generated the event. * Generally, this will be resolved by os.Hostname() along with the running * port. - * @member {string} [eventRequestMessage.content.source.instanceID] The + * @property {string} [eventRequestMessage.content.source.instanceID] The * running instance of an application. Changes after each restart. - * @member {object} [eventRequestMessage.headers] The headers of the event + * @property {object} [eventRequestMessage.headers] The headers of the event * request message. - * @member {string} [eventRequestMessage.method] The HTTP method used to send + * @property {string} [eventRequestMessage.method] The HTTP method used to + * send the event request message. + * @property {string} [eventRequestMessage.requestUri] The URI used to send * the event request message. - * @member {string} [eventRequestMessage.requestUri] The URI used to send the - * event request message. - * @member {string} [eventRequestMessage.version] The HTTP message version. - * @member {object} [eventResponseMessage] The event response message + * @property {string} [eventRequestMessage.version] The HTTP message version. + * @property {object} [eventResponseMessage] The event response message * received from the service URI. - * @member {string} [eventResponseMessage.content] The content of the event + * @property {string} [eventResponseMessage.content] The content of the event * response message. - * @member {object} [eventResponseMessage.headers] The headers of the event + * @property {object} [eventResponseMessage.headers] The headers of the event * response message. - * @member {string} [eventResponseMessage.reasonPhrase] The reason phrase of + * @property {string} [eventResponseMessage.reasonPhrase] The reason phrase + * of the event response message. + * @property {string} [eventResponseMessage.statusCode] The status code of * the event response message. - * @member {string} [eventResponseMessage.statusCode] The status code of the - * event response message. - * @member {string} [eventResponseMessage.version] The HTTP message version. + * @property {string} [eventResponseMessage.version] The HTTP message + * version. */ constructor() { super(); diff --git a/lib/services/containerRegistryManagement/lib/models/eventContent.js b/lib/services/containerRegistryManagement/lib/models/eventContent.js index 6c21c04677..f2d1c80665 100644 --- a/lib/services/containerRegistryManagement/lib/models/eventContent.js +++ b/lib/services/containerRegistryManagement/lib/models/eventContent.js @@ -17,43 +17,46 @@ class EventContent { /** * Create a EventContent. - * @member {string} [id] The event ID. - * @member {date} [timestamp] The time at which the event occurred. - * @member {string} [action] The action that encompasses the provided event. - * @member {object} [target] The target of the event. - * @member {string} [target.mediaType] The MIME type of the referenced + * @property {string} [id] The event ID. + * @property {date} [timestamp] The time at which the event occurred. + * @property {string} [action] The action that encompasses the provided + * event. + * @property {object} [target] The target of the event. + * @property {string} [target.mediaType] The MIME type of the referenced * object. - * @member {number} [target.size] The number of bytes of the content. Same as - * Length field. - * @member {string} [target.digest] The digest of the content, as defined by - * the Registry V2 HTTP API Specification. - * @member {number} [target.length] The number of bytes of the content. Same - * as Size field. - * @member {string} [target.repository] The repository name. - * @member {string} [target.url] The direct URL to the content. - * @member {string} [target.tag] The tag name. - * @member {object} [request] The request that generated the event. - * @member {string} [request.id] The ID of the request that initiated the + * @property {number} [target.size] The number of bytes of the content. Same + * as Length field. + * @property {string} [target.digest] The digest of the content, as defined + * by the Registry V2 HTTP API Specification. + * @property {number} [target.length] The number of bytes of the content. + * Same as Size field. + * @property {string} [target.repository] The repository name. + * @property {string} [target.url] The direct URL to the content. + * @property {string} [target.tag] The tag name. + * @property {object} [request] The request that generated the event. + * @property {string} [request.id] The ID of the request that initiated the * event. - * @member {string} [request.addr] The IP or hostname and possibly port of + * @property {string} [request.addr] The IP or hostname and possibly port of * the client connection that initiated the event. This is the RemoteAddr * from the standard http request. - * @member {string} [request.host] The externally accessible hostname of the - * registry instance, as specified by the http host header on incoming + * @property {string} [request.host] The externally accessible hostname of + * the registry instance, as specified by the http host header on incoming * requests. - * @member {string} [request.method] The request method that generated the + * @property {string} [request.method] The request method that generated the * event. - * @member {string} [request.useragent] The user agent header of the request. - * @member {object} [actor] The agent that initiated the event. For most + * @property {string} [request.useragent] The user agent header of the + * request. + * @property {object} [actor] The agent that initiated the event. For most * situations, this could be from the authorization context of the request. - * @member {string} [actor.name] The subject or username associated with the - * request context that generated the event. - * @member {object} [source] The registry node that generated the event. Put - * differently, while the actor initiates the event, the source generates it. - * @member {string} [source.addr] The IP or hostname and the port of the + * @property {string} [actor.name] The subject or username associated with + * the request context that generated the event. + * @property {object} [source] The registry node that generated the event. + * Put differently, while the actor initiates the event, the source generates + * it. + * @property {string} [source.addr] The IP or hostname and the port of the * registry node that generated the event. Generally, this will be resolved * by os.Hostname() along with the running port. - * @member {string} [source.instanceID] The running instance of an + * @property {string} [source.instanceID] The running instance of an * application. Changes after each restart. */ constructor() { diff --git a/lib/services/containerRegistryManagement/lib/models/eventInfo.js b/lib/services/containerRegistryManagement/lib/models/eventInfo.js index 188e3a4684..bf8199ddda 100644 --- a/lib/services/containerRegistryManagement/lib/models/eventInfo.js +++ b/lib/services/containerRegistryManagement/lib/models/eventInfo.js @@ -17,7 +17,7 @@ class EventInfo { /** * Create a EventInfo. - * @member {string} [id] The event ID. + * @property {string} [id] The event ID. */ constructor() { } diff --git a/lib/services/containerRegistryManagement/lib/models/eventListResult.js b/lib/services/containerRegistryManagement/lib/models/eventListResult.js index 0db0d01992..d25599494c 100644 --- a/lib/services/containerRegistryManagement/lib/models/eventListResult.js +++ b/lib/services/containerRegistryManagement/lib/models/eventListResult.js @@ -16,7 +16,7 @@ class EventListResult extends Array { /** * Create a EventListResult. - * @member {string} [nextLink] The URI that can be used to request the next + * @property {string} [nextLink] The URI that can be used to request the next * list of events. */ constructor() { diff --git a/lib/services/containerRegistryManagement/lib/models/eventRequestMessage.js b/lib/services/containerRegistryManagement/lib/models/eventRequestMessage.js index 2cb95eb72c..b5cc1ba4a6 100644 --- a/lib/services/containerRegistryManagement/lib/models/eventRequestMessage.js +++ b/lib/services/containerRegistryManagement/lib/models/eventRequestMessage.js @@ -17,55 +17,55 @@ class EventRequestMessage { /** * Create a EventRequestMessage. - * @member {object} [content] The content of the event request message. - * @member {string} [content.id] The event ID. - * @member {date} [content.timestamp] The time at which the event occurred. - * @member {string} [content.action] The action that encompasses the provided - * event. - * @member {object} [content.target] The target of the event. - * @member {string} [content.target.mediaType] The MIME type of the + * @property {object} [content] The content of the event request message. + * @property {string} [content.id] The event ID. + * @property {date} [content.timestamp] The time at which the event occurred. + * @property {string} [content.action] The action that encompasses the + * provided event. + * @property {object} [content.target] The target of the event. + * @property {string} [content.target.mediaType] The MIME type of the * referenced object. - * @member {number} [content.target.size] The number of bytes of the content. - * Same as Length field. - * @member {string} [content.target.digest] The digest of the content, as + * @property {number} [content.target.size] The number of bytes of the + * content. Same as Length field. + * @property {string} [content.target.digest] The digest of the content, as * defined by the Registry V2 HTTP API Specification. - * @member {number} [content.target.length] The number of bytes of the + * @property {number} [content.target.length] The number of bytes of the * content. Same as Size field. - * @member {string} [content.target.repository] The repository name. - * @member {string} [content.target.url] The direct URL to the content. - * @member {string} [content.target.tag] The tag name. - * @member {object} [content.request] The request that generated the event. - * @member {string} [content.request.id] The ID of the request that initiated - * the event. - * @member {string} [content.request.addr] The IP or hostname and possibly + * @property {string} [content.target.repository] The repository name. + * @property {string} [content.target.url] The direct URL to the content. + * @property {string} [content.target.tag] The tag name. + * @property {object} [content.request] The request that generated the event. + * @property {string} [content.request.id] The ID of the request that + * initiated the event. + * @property {string} [content.request.addr] The IP or hostname and possibly * port of the client connection that initiated the event. This is the * RemoteAddr from the standard http request. - * @member {string} [content.request.host] The externally accessible hostname - * of the registry instance, as specified by the http host header on incoming - * requests. - * @member {string} [content.request.method] The request method that + * @property {string} [content.request.host] The externally accessible + * hostname of the registry instance, as specified by the http host header on + * incoming requests. + * @property {string} [content.request.method] The request method that * generated the event. - * @member {string} [content.request.useragent] The user agent header of the - * request. - * @member {object} [content.actor] The agent that initiated the event. For + * @property {string} [content.request.useragent] The user agent header of + * the request. + * @property {object} [content.actor] The agent that initiated the event. For * most situations, this could be from the authorization context of the * request. - * @member {string} [content.actor.name] The subject or username associated + * @property {string} [content.actor.name] The subject or username associated * with the request context that generated the event. - * @member {object} [content.source] The registry node that generated the + * @property {object} [content.source] The registry node that generated the * event. Put differently, while the actor initiates the event, the source * generates it. - * @member {string} [content.source.addr] The IP or hostname and the port of - * the registry node that generated the event. Generally, this will be + * @property {string} [content.source.addr] The IP or hostname and the port + * of the registry node that generated the event. Generally, this will be * resolved by os.Hostname() along with the running port. - * @member {string} [content.source.instanceID] The running instance of an + * @property {string} [content.source.instanceID] The running instance of an * application. Changes after each restart. - * @member {object} [headers] The headers of the event request message. - * @member {string} [method] The HTTP method used to send the event request + * @property {object} [headers] The headers of the event request message. + * @property {string} [method] The HTTP method used to send the event request * message. - * @member {string} [requestUri] The URI used to send the event request + * @property {string} [requestUri] The URI used to send the event request * message. - * @member {string} [version] The HTTP message version. + * @property {string} [version] The HTTP message version. */ constructor() { } diff --git a/lib/services/containerRegistryManagement/lib/models/eventResponseMessage.js b/lib/services/containerRegistryManagement/lib/models/eventResponseMessage.js index a9a47dc980..ba414438cd 100644 --- a/lib/services/containerRegistryManagement/lib/models/eventResponseMessage.js +++ b/lib/services/containerRegistryManagement/lib/models/eventResponseMessage.js @@ -17,13 +17,13 @@ class EventResponseMessage { /** * Create a EventResponseMessage. - * @member {string} [content] The content of the event response message. - * @member {object} [headers] The headers of the event response message. - * @member {string} [reasonPhrase] The reason phrase of the event response + * @property {string} [content] The content of the event response message. + * @property {object} [headers] The headers of the event response message. + * @property {string} [reasonPhrase] The reason phrase of the event response * message. - * @member {string} [statusCode] The status code of the event response + * @property {string} [statusCode] The status code of the event response * message. - * @member {string} [version] The HTTP message version. + * @property {string} [version] The HTTP message version. */ constructor() { } diff --git a/lib/services/containerRegistryManagement/lib/models/fileTaskRunRequest.js b/lib/services/containerRegistryManagement/lib/models/fileTaskRunRequest.js index dac8ec2d1a..4f91bc3c70 100644 --- a/lib/services/containerRegistryManagement/lib/models/fileTaskRunRequest.js +++ b/lib/services/containerRegistryManagement/lib/models/fileTaskRunRequest.js @@ -20,27 +20,27 @@ const models = require('./index'); class FileTaskRunRequest extends models['RunRequest'] { /** * Create a FileTaskRunRequest. - * @member {string} taskFilePath The template/definition file path relative + * @property {string} taskFilePath The template/definition file path relative * to the source. - * @member {string} [valuesFilePath] The values/parameters file path relative - * to the source. - * @member {array} [values] The collection of overridable values that can be - * passed when running a task. - * @member {number} [timeout] Run timeout in seconds. Default value: 3600 . - * @member {object} platform The platform properties against which the run + * @property {string} [valuesFilePath] The values/parameters file path + * relative to the source. + * @property {array} [values] The collection of overridable values that can + * be passed when running a task. + * @property {number} [timeout] Run timeout in seconds. Default value: 3600 . + * @property {object} platform The platform properties against which the run * has to happen. - * @member {string} [platform.os] The operating system type required for the - * run. Possible values include: 'Windows', 'Linux' - * @member {string} [platform.architecture] The OS architecture. Possible + * @property {string} [platform.os] The operating system type required for + * the run. Possible values include: 'Windows', 'Linux' + * @property {string} [platform.architecture] The OS architecture. Possible * values include: 'amd64', 'x86', 'arm' - * @member {string} [platform.variant] Variant of the CPU. Possible values + * @property {string} [platform.variant] Variant of the CPU. Possible values * include: 'v6', 'v7', 'v8' - * @member {object} [agentConfiguration] The machine configuration of the run - * agent. - * @member {number} [agentConfiguration.cpu] The CPU configuration in terms + * @property {object} [agentConfiguration] The machine configuration of the + * run agent. + * @property {number} [agentConfiguration.cpu] The CPU configuration in terms * of number of cores required for the run. - * @member {string} [sourceLocation] The URL(absolute or relative) of the - * source context. It can be an URL to a tar or git repoistory. + * @property {string} [sourceLocation] The URL(absolute or relative) of the + * source context. It can be an URL to a tar or git repository. * If it is relative URL, the relative path should be obtained from calling * listBuildSourceUploadUrl API. */ diff --git a/lib/services/containerRegistryManagement/lib/models/fileTaskStep.js b/lib/services/containerRegistryManagement/lib/models/fileTaskStep.js index f0b7d2092b..a7cd95564c 100644 --- a/lib/services/containerRegistryManagement/lib/models/fileTaskStep.js +++ b/lib/services/containerRegistryManagement/lib/models/fileTaskStep.js @@ -20,12 +20,12 @@ const models = require('./index'); class FileTaskStep extends models['TaskStepProperties'] { /** * Create a FileTaskStep. - * @member {string} taskFilePath The task template/definition file path + * @property {string} taskFilePath The task template/definition file path * relative to the source context. - * @member {string} [valuesFilePath] The task values/parameters file path + * @property {string} [valuesFilePath] The task values/parameters file path * relative to the source context. - * @member {array} [values] The collection of overridable values that can be - * passed when running a task. + * @property {array} [values] The collection of overridable values that can + * be passed when running a task. */ constructor() { super(); diff --git a/lib/services/containerRegistryManagement/lib/models/fileTaskStepUpdateParameters.js b/lib/services/containerRegistryManagement/lib/models/fileTaskStepUpdateParameters.js index c83b5f4884..2a7c507274 100644 --- a/lib/services/containerRegistryManagement/lib/models/fileTaskStepUpdateParameters.js +++ b/lib/services/containerRegistryManagement/lib/models/fileTaskStepUpdateParameters.js @@ -20,12 +20,12 @@ const models = require('./index'); class FileTaskStepUpdateParameters extends models['TaskStepUpdateParameters'] { /** * Create a FileTaskStepUpdateParameters. - * @member {string} [taskFilePath] The task template/definition file path + * @property {string} [taskFilePath] The task template/definition file path * relative to the source context. - * @member {string} [valuesFilePath] The values/parameters file path relative - * to the source context. - * @member {array} [values] The collection of overridable values that can be - * passed when running a task. + * @property {string} [valuesFilePath] The values/parameters file path + * relative to the source context. + * @property {array} [values] The collection of overridable values that can + * be passed when running a task. */ constructor() { super(); diff --git a/lib/services/containerRegistryManagement/lib/models/imageDescriptor.js b/lib/services/containerRegistryManagement/lib/models/imageDescriptor.js index 2b1c7f723b..88c5d574e3 100644 --- a/lib/services/containerRegistryManagement/lib/models/imageDescriptor.js +++ b/lib/services/containerRegistryManagement/lib/models/imageDescriptor.js @@ -17,10 +17,10 @@ class ImageDescriptor { /** * Create a ImageDescriptor. - * @member {string} [registry] The registry login server. - * @member {string} [repository] The repository name. - * @member {string} [tag] The tag name. - * @member {string} [digest] The sha256-based digest of the image manifest. + * @property {string} [registry] The registry login server. + * @property {string} [repository] The repository name. + * @property {string} [tag] The tag name. + * @property {string} [digest] The sha256-based digest of the image manifest. */ constructor() { } diff --git a/lib/services/containerRegistryManagement/lib/models/imageUpdateTrigger.js b/lib/services/containerRegistryManagement/lib/models/imageUpdateTrigger.js index 9301807a67..35ee9cdd1c 100644 --- a/lib/services/containerRegistryManagement/lib/models/imageUpdateTrigger.js +++ b/lib/services/containerRegistryManagement/lib/models/imageUpdateTrigger.js @@ -17,9 +17,10 @@ class ImageUpdateTrigger { /** * Create a ImageUpdateTrigger. - * @member {string} [id] The unique ID of the trigger. - * @member {date} [timestamp] The timestamp when the image update happened. - * @member {array} [images] The list of image updates that caused the build. + * @property {string} [id] The unique ID of the trigger. + * @property {date} [timestamp] The timestamp when the image update happened. + * @property {array} [images] The list of image updates that caused the + * build. */ constructor() { } diff --git a/lib/services/containerRegistryManagement/lib/models/importImageParameters.js b/lib/services/containerRegistryManagement/lib/models/importImageParameters.js index 47526cfb7e..15df147337 100644 --- a/lib/services/containerRegistryManagement/lib/models/importImageParameters.js +++ b/lib/services/containerRegistryManagement/lib/models/importImageParameters.js @@ -16,29 +16,30 @@ class ImportImageParameters { /** * Create a ImportImageParameters. - * @member {object} source The source of the image. - * @member {string} [source.resourceId] The resource identifier of the source - * Azure Container Registry. - * @member {string} [source.registryUri] The address of the source registry + * @property {object} source The source of the image. + * @property {string} [source.resourceId] The resource identifier of the + * source Azure Container Registry. + * @property {string} [source.registryUri] The address of the source registry * (e.g. 'mcr.microsoft.com'). - * @member {object} [source.credentials] Credentials used when importing from - * a registry uri. - * @member {string} [source.credentials.username] The username to + * @property {object} [source.credentials] Credentials used when importing + * from a registry uri. + * @property {string} [source.credentials.username] The username to * authenticate with the source registry. - * @member {string} [source.credentials.password] The password used to + * @property {string} [source.credentials.password] The password used to * authenticate with the source registry. - * @member {string} [source.sourceImage] Repository name of the source image. + * @property {string} [source.sourceImage] Repository name of the source + * image. * Specify an image by repository ('hello-world'). This will use the 'latest' * tag. * Specify an image by tag ('hello-world:latest'). * Specify an image by sha256-based manifest digest * ('hello-world@sha256:abc123'). - * @member {array} [targetTags] List of strings of the form repo[:tag]. When - * tag is omitted the source will be used (or 'latest' if source tag is also - * omitted). - * @member {array} [untaggedTargetRepositories] List of strings of repository - * names to do a manifest only copy. No tag will be created. - * @member {string} [mode] When Force, any existing target tags will be + * @property {array} [targetTags] List of strings of the form repo[:tag]. + * When tag is omitted the source will be used (or 'latest' if source tag is + * also omitted). + * @property {array} [untaggedTargetRepositories] List of strings of + * repository names to do a manifest only copy. No tag will be created. + * @property {string} [mode] When Force, any existing target tags will be * overwritten. When NoForce, any existing target tags will fail the * operation before any copying begins. Possible values include: 'NoForce', * 'Force'. Default value: 'NoForce' . diff --git a/lib/services/containerRegistryManagement/lib/models/importSource.js b/lib/services/containerRegistryManagement/lib/models/importSource.js index 12dfd4899c..d04bd0611b 100644 --- a/lib/services/containerRegistryManagement/lib/models/importSource.js +++ b/lib/services/containerRegistryManagement/lib/models/importSource.js @@ -16,17 +16,17 @@ class ImportSource { /** * Create a ImportSource. - * @member {string} [resourceId] The resource identifier of the source Azure - * Container Registry. - * @member {string} [registryUri] The address of the source registry (e.g. + * @property {string} [resourceId] The resource identifier of the source + * Azure Container Registry. + * @property {string} [registryUri] The address of the source registry (e.g. * 'mcr.microsoft.com'). - * @member {object} [credentials] Credentials used when importing from a + * @property {object} [credentials] Credentials used when importing from a * registry uri. - * @member {string} [credentials.username] The username to authenticate with - * the source registry. - * @member {string} [credentials.password] The password used to authenticate + * @property {string} [credentials.username] The username to authenticate * with the source registry. - * @member {string} sourceImage Repository name of the source image. + * @property {string} [credentials.password] The password used to + * authenticate with the source registry. + * @property {string} sourceImage Repository name of the source image. * Specify an image by repository ('hello-world'). This will use the 'latest' * tag. * Specify an image by tag ('hello-world:latest'). diff --git a/lib/services/containerRegistryManagement/lib/models/importSourceCredentials.js b/lib/services/containerRegistryManagement/lib/models/importSourceCredentials.js index 1645b2d3f8..fc50eeb040 100644 --- a/lib/services/containerRegistryManagement/lib/models/importSourceCredentials.js +++ b/lib/services/containerRegistryManagement/lib/models/importSourceCredentials.js @@ -16,9 +16,9 @@ class ImportSourceCredentials { /** * Create a ImportSourceCredentials. - * @member {string} [username] The username to authenticate with the source + * @property {string} [username] The username to authenticate with the source * registry. - * @member {string} password The password used to authenticate with the + * @property {string} password The password used to authenticate with the * source registry. */ constructor() { diff --git a/lib/services/containerRegistryManagement/lib/models/index.d.ts b/lib/services/containerRegistryManagement/lib/models/index.d.ts index f30f253a7e..a30f827423 100644 --- a/lib/services/containerRegistryManagement/lib/models/index.d.ts +++ b/lib/services/containerRegistryManagement/lib/models/index.d.ts @@ -1,2055 +1,1812 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { BaseResource } from 'ms-rest-azure'; -import { CloudError } from 'ms-rest-azure'; -import * as moment from 'moment'; +import { BaseResource, CloudError } from "ms-rest-azure"; +import * as moment from "moment"; -export { BaseResource } from 'ms-rest-azure'; -export { CloudError } from 'ms-rest-azure'; +export { + BaseResource, + CloudError +}; -/** - * @class - * Initializes a new instance of the ImportSourceCredentials class. - * @constructor - * @member {string} [username] The username to authenticate with the source - * registry. - * @member {string} password The password used to authenticate with the source - * registry. - */ export interface ImportSourceCredentials { + /** + * The username to authenticate with the source registry. + */ username?: string; + /** + * The password used to authenticate with the source registry. + */ password: string; } -/** - * @class - * Initializes a new instance of the ImportSource class. - * @constructor - * @member {string} [resourceId] The resource identifier of the source Azure - * Container Registry. - * @member {string} [registryUri] The address of the source registry (e.g. - * 'mcr.microsoft.com'). - * @member {object} [credentials] Credentials used when importing from a - * registry uri. - * @member {string} [credentials.username] The username to authenticate with - * the source registry. - * @member {string} [credentials.password] The password used to authenticate - * with the source registry. - * @member {string} sourceImage Repository name of the source image. - * Specify an image by repository ('hello-world'). This will use the 'latest' - * tag. - * Specify an image by tag ('hello-world:latest'). - * Specify an image by sha256-based manifest digest - * ('hello-world@sha256:abc123'). - */ export interface ImportSource { + /** + * The resource identifier of the source Azure Container Registry. + */ resourceId?: string; + /** + * The address of the source registry (e.g. 'mcr.microsoft.com'). + */ registryUri?: string; + /** + * Credentials used when importing from a registry uri. + */ credentials?: ImportSourceCredentials; + /** + * Repository name of the source image. + * Specify an image by repository ('hello-world'). This will use the 'latest' tag. + * Specify an image by tag ('hello-world:latest'). + * Specify an image by sha256-based manifest digest ('hello-world@sha256:abc123'). + */ sourceImage: string; } -/** - * @class - * Initializes a new instance of the ImportImageParameters class. - * @constructor - * @member {object} source The source of the image. - * @member {string} [source.resourceId] The resource identifier of the source - * Azure Container Registry. - * @member {string} [source.registryUri] The address of the source registry - * (e.g. 'mcr.microsoft.com'). - * @member {object} [source.credentials] Credentials used when importing from a - * registry uri. - * @member {string} [source.credentials.username] The username to authenticate - * with the source registry. - * @member {string} [source.credentials.password] The password used to - * authenticate with the source registry. - * @member {string} [source.sourceImage] Repository name of the source image. - * Specify an image by repository ('hello-world'). This will use the 'latest' - * tag. - * Specify an image by tag ('hello-world:latest'). - * Specify an image by sha256-based manifest digest - * ('hello-world@sha256:abc123'). - * @member {array} [targetTags] List of strings of the form repo[:tag]. When - * tag is omitted the source will be used (or 'latest' if source tag is also - * omitted). - * @member {array} [untaggedTargetRepositories] List of strings of repository - * names to do a manifest only copy. No tag will be created. - * @member {string} [mode] When Force, any existing target tags will be - * overwritten. When NoForce, any existing target tags will fail the operation - * before any copying begins. Possible values include: 'NoForce', 'Force'. - * Default value: 'NoForce' . - */ export interface ImportImageParameters { + /** + * The source of the image. + */ source: ImportSource; + /** + * List of strings of the form repo[:tag]. When tag is omitted the source will be used (or + * 'latest' if source tag is also omitted). + */ targetTags?: string[]; + /** + * List of strings of repository names to do a manifest only copy. No tag will be created. + */ untaggedTargetRepositories?: string[]; + /** + * When Force, any existing target tags will be overwritten. When NoForce, any existing target + * tags will fail the operation before any copying begins. Possible values include: 'NoForce', + * 'Force' + */ mode?: string; } /** - * @class - * Initializes a new instance of the RegistryNameCheckRequest class. - * @constructor * A request to check whether a container registry name is available. - * - * @member {string} name The name of the container registry. - */ +*/ export interface RegistryNameCheckRequest { + /** + * The name of the container registry. + */ name: string; } /** - * @class - * Initializes a new instance of the RegistryNameStatus class. - * @constructor - * The result of a request to check the availability of a container registry - * name. - * - * @member {boolean} [nameAvailable] The value that indicates whether the name - * is available. - * @member {string} [reason] If any, the reason that the name is not available. - * @member {string} [message] If any, the error message that provides more - * detail for the reason that the name is not available. - */ + * The result of a request to check the availability of a container registry name. +*/ export interface RegistryNameStatus { + /** + * The value that indicates whether the name is available. + */ nameAvailable?: boolean; + /** + * If any, the reason that the name is not available. + */ reason?: string; + /** + * If any, the error message that provides more detail for the reason that the name is not + * available. + */ message?: string; } /** - * @class - * Initializes a new instance of the OperationDisplayDefinition class. - * @constructor * The display information for a container registry operation. - * - * @member {string} [provider] The resource provider name: - * Microsoft.ContainerRegistry. - * @member {string} [resource] The resource on which the operation is - * performed. - * @member {string} [operation] The operation that users can perform. - * @member {string} [description] The description for the operation. - */ +*/ export interface OperationDisplayDefinition { + /** + * The resource provider name: Microsoft.ContainerRegistry. + */ provider?: string; + /** + * The resource on which the operation is performed. + */ resource?: string; + /** + * The operation that users can perform. + */ operation?: string; + /** + * The description for the operation. + */ description?: string; } /** - * @class - * Initializes a new instance of the OperationMetricSpecificationDefinition class. - * @constructor * The definition of Azure Monitoring metric. - * - * @member {string} [name] Metric name. - * @member {string} [displayName] Metric display name. - * @member {string} [displayDescription] Metric description. - * @member {string} [unit] Metric unit. - * @member {string} [aggregationType] Metric aggregation type. - * @member {string} [internalMetricName] Internal metric name. - */ +*/ export interface OperationMetricSpecificationDefinition { + /** + * Metric name. + */ name?: string; + /** + * Metric display name. + */ displayName?: string; + /** + * Metric description. + */ displayDescription?: string; + /** + * Metric unit. + */ unit?: string; + /** + * Metric aggregation type. + */ aggregationType?: string; + /** + * Internal metric name. + */ internalMetricName?: string; } /** - * @class - * Initializes a new instance of the OperationServiceSpecificationDefinition class. - * @constructor * The definition of Azure Monitoring metrics list. - * - * @member {array} [metricSpecifications] A list of Azure Monitoring metrics - * definition. - */ +*/ export interface OperationServiceSpecificationDefinition { + /** + * A list of Azure Monitoring metrics definition. + */ metricSpecifications?: OperationMetricSpecificationDefinition[]; } /** - * @class - * Initializes a new instance of the OperationDefinition class. - * @constructor * The definition of a container registry operation. - * - * @member {string} [origin] The origin information of the container registry - * operation. - * @member {string} [name] Operation name: {provider}/{resource}/{operation}. - * @member {object} [display] The display information for the container - * registry operation. - * @member {string} [display.provider] The resource provider name: - * Microsoft.ContainerRegistry. - * @member {string} [display.resource] The resource on which the operation is - * performed. - * @member {string} [display.operation] The operation that users can perform. - * @member {string} [display.description] The description for the operation. - * @member {object} [serviceSpecification] The definition of Azure Monitoring - * service. - * @member {array} [serviceSpecification.metricSpecifications] A list of Azure - * Monitoring metrics definition. - */ +*/ export interface OperationDefinition { + /** + * The origin information of the container registry operation. + */ origin?: string; + /** + * Operation name: {provider}/{resource}/{operation}. + */ name?: string; + /** + * The display information for the container registry operation. + */ display?: OperationDisplayDefinition; + /** + * The definition of Azure Monitoring service. + */ serviceSpecification?: OperationServiceSpecificationDefinition; } /** - * @class - * Initializes a new instance of the Sku class. - * @constructor * The SKU of a container registry. - * - * @member {string} name The SKU name of the container registry. Required for - * registry creation. Possible values include: 'Classic', 'Basic', 'Standard', - * 'Premium' - * @member {string} [tier] The SKU tier based on the SKU name. Possible values - * include: 'Classic', 'Basic', 'Standard', 'Premium' - */ +*/ export interface Sku { + /** + * The SKU name of the container registry. Required for registry creation. Possible values + * include: 'Classic', 'Basic', 'Standard', 'Premium' + */ name: string; + /** + * The SKU tier based on the SKU name. Possible values include: 'Classic', 'Basic', 'Standard', + * 'Premium' + */ readonly tier?: string; } /** - * @class - * Initializes a new instance of the Status class. - * @constructor * The status of an Azure resource at the time the operation was called. - * - * @member {string} [displayStatus] The short label for the status. - * @member {string} [message] The detailed message for the status, including - * alerts and error messages. - * @member {date} [timestamp] The timestamp when the status was changed to the - * current value. - */ +*/ export interface Status { + /** + * The short label for the status. + */ readonly displayStatus?: string; + /** + * The detailed message for the status, including alerts and error messages. + */ readonly message?: string; + /** + * The timestamp when the status was changed to the current value. + */ readonly timestamp?: Date; } /** - * @class - * Initializes a new instance of the StorageAccountProperties class. - * @constructor - * The properties of a storage account for a container registry. Only - * applicable to Classic SKU. - * - * @member {string} id The resource ID of the storage account. - */ + * The properties of a storage account for a container registry. Only applicable to Classic SKU. +*/ export interface StorageAccountProperties { + /** + * The resource ID of the storage account. + */ + id: string; +} + +/** + * The virtual network rule for a container registry. +*/ +export interface VirtualNetworkRule { + /** + * Resource ID of a subnet, for example: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + */ id: string; } /** - * @class - * Initializes a new instance of the Resource class. - * @constructor + * The network rule set for a container registry. +*/ +export interface NetworkRuleSet { + /** + * The default action of allow or deny when no other rules match. Possible values include: + * 'Allow', 'Deny' + */ + defaultAction: string; + /** + * The virtual network rules. + */ + virtualNetworkRules?: VirtualNetworkRule[]; +} + +/** * An Azure resource. - * - * @member {string} [id] The resource ID. - * @member {string} [name] The name of the resource. - * @member {string} [type] The type of the resource. - * @member {string} location The location of the resource. This cannot be - * changed after the resource is created. - * @member {object} [tags] The tags of the resource. - */ +*/ export interface Resource extends BaseResource { + /** + * The resource ID. + */ readonly id?: string; + /** + * The name of the resource. + */ readonly name?: string; + /** + * The type of the resource. + */ readonly type?: string; + /** + * The location of the resource. This cannot be changed after the resource is created. + */ location: string; + /** + * The tags of the resource. + */ tags?: { [propertyName: string]: string }; } /** - * @class - * Initializes a new instance of the Registry class. - * @constructor * An object that represents a container registry. - * - * @member {object} sku The SKU of the container registry. - * @member {string} [sku.name] The SKU name of the container registry. Required - * for registry creation. Possible values include: 'Classic', 'Basic', - * 'Standard', 'Premium' - * @member {string} [sku.tier] The SKU tier based on the SKU name. Possible - * values include: 'Classic', 'Basic', 'Standard', 'Premium' - * @member {string} [loginServer] The URL that can be used to log into the - * container registry. - * @member {date} [creationDate] The creation date of the container registry in - * ISO8601 format. - * @member {string} [provisioningState] The provisioning state of the container - * registry at the time the operation was called. Possible values include: - * 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' - * @member {object} [status] The status of the container registry at the time - * the operation was called. - * @member {string} [status.displayStatus] The short label for the status. - * @member {string} [status.message] The detailed message for the status, - * including alerts and error messages. - * @member {date} [status.timestamp] The timestamp when the status was changed - * to the current value. - * @member {boolean} [adminUserEnabled] The value that indicates whether the - * admin user is enabled. Default value: false . - * @member {object} [storageAccount] The properties of the storage account for - * the container registry. Only applicable to Classic SKU. - * @member {string} [storageAccount.id] The resource ID of the storage account. - */ +*/ export interface Registry extends Resource { + /** + * The SKU of the container registry. + */ sku: Sku; + /** + * The URL that can be used to log into the container registry. + */ readonly loginServer?: string; + /** + * The creation date of the container registry in ISO8601 format. + */ readonly creationDate?: Date; + /** + * The provisioning state of the container registry at the time the operation was called. + * Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' + */ readonly provisioningState?: string; + /** + * The status of the container registry at the time the operation was called. + */ readonly status?: Status; + /** + * The value that indicates whether the admin user is enabled. + */ adminUserEnabled?: boolean; + /** + * The properties of the storage account for the container registry. Only applicable to Classic + * SKU. + */ storageAccount?: StorageAccountProperties; + /** + * The network rule set for a container registry. + */ + networkRuleSet?: NetworkRuleSet; } /** - * @class - * Initializes a new instance of the RegistryUpdateParameters class. - * @constructor * The parameters for updating a container registry. - * - * @member {object} [tags] The tags for the container registry. - * @member {object} [sku] The SKU of the container registry. - * @member {string} [sku.name] The SKU name of the container registry. Required - * for registry creation. Possible values include: 'Classic', 'Basic', - * 'Standard', 'Premium' - * @member {string} [sku.tier] The SKU tier based on the SKU name. Possible - * values include: 'Classic', 'Basic', 'Standard', 'Premium' - * @member {boolean} [adminUserEnabled] The value that indicates whether the - * admin user is enabled. - * @member {object} [storageAccount] The parameters of a storage account for - * the container registry. Only applicable to Classic SKU. If specified, the - * storage account must be in the same physical location as the container - * registry. - * @member {string} [storageAccount.id] The resource ID of the storage account. - */ +*/ export interface RegistryUpdateParameters { + /** + * The tags for the container registry. + */ tags?: { [propertyName: string]: string }; + /** + * The SKU of the container registry. + */ sku?: Sku; + /** + * The value that indicates whether the admin user is enabled. + */ adminUserEnabled?: boolean; + /** + * The parameters of a storage account for the container registry. Only applicable to Classic + * SKU. If specified, the storage account must be in the same physical location as the container + * registry. + */ storageAccount?: StorageAccountProperties; + /** + * The network rule set for a container registry. + */ + networkRuleSet?: NetworkRuleSet; } /** - * @class - * Initializes a new instance of the RegistryPassword class. - * @constructor * The login password for the container registry. - * - * @member {string} [name] The password name. Possible values include: - * 'password', 'password2' - * @member {string} [value] The password value. - */ +*/ export interface RegistryPassword { + /** + * The password name. Possible values include: 'password', 'password2' + */ name?: string; + /** + * The password value. + */ value?: string; } /** - * @class - * Initializes a new instance of the RegistryListCredentialsResult class. - * @constructor * The response from the ListCredentials operation. - * - * @member {string} [username] The username for a container registry. - * @member {array} [passwords] The list of passwords for a container registry. - */ +*/ export interface RegistryListCredentialsResult { + /** + * The username for a container registry. + */ username?: string; + /** + * The list of passwords for a container registry. + */ passwords?: RegistryPassword[]; } /** - * @class - * Initializes a new instance of the RegenerateCredentialParameters class. - * @constructor * The parameters used to regenerate the login credential. - * - * @member {string} name Specifies name of the password which should be - * regenerated -- password or password2. Possible values include: 'password', - * 'password2' - */ +*/ export interface RegenerateCredentialParameters { + /** + * Specifies name of the password which should be regenerated -- password or password2. Possible + * values include: 'password', 'password2' + */ name: string; } /** - * @class - * Initializes a new instance of the RegistryUsage class. - * @constructor * The quota usage for a container registry. - * - * @member {string} [name] The name of the usage. - * @member {number} [limit] The limit of the usage. - * @member {number} [currentValue] The current value of the usage. - * @member {string} [unit] The unit of measurement. Possible values include: - * 'Count', 'Bytes' - */ +*/ export interface RegistryUsage { + /** + * The name of the usage. + */ name?: string; + /** + * The limit of the usage. + */ limit?: number; + /** + * The current value of the usage. + */ currentValue?: number; + /** + * The unit of measurement. Possible values include: 'Count', 'Bytes' + */ unit?: string; } /** - * @class - * Initializes a new instance of the RegistryUsageListResult class. - * @constructor * The result of a request to get container registry quota usages. - * - * @member {array} [value] The list of container registry quota usages. - */ +*/ export interface RegistryUsageListResult { + /** + * The list of container registry quota usages. + */ value?: RegistryUsage[]; } /** - * @class - * Initializes a new instance of the QuarantinePolicy class. - * @constructor * An object that represents quarantine policy for a container registry. - * - * @member {string} [status] The value that indicates whether the policy is - * enabled or not. Possible values include: 'enabled', 'disabled' - */ +*/ export interface QuarantinePolicy { + /** + * The value that indicates whether the policy is enabled or not. Possible values include: + * 'enabled', 'disabled' + */ status?: string; } /** - * @class - * Initializes a new instance of the TrustPolicy class. - * @constructor * An object that represents content trust policy for a container registry. - * - * @member {string} [type] The type of trust policy. Possible values include: - * 'Notary' - * @member {string} [status] The value that indicates whether the policy is - * enabled or not. Possible values include: 'enabled', 'disabled' - */ +*/ export interface TrustPolicy { + /** + * The type of trust policy. Possible values include: 'Notary' + */ type?: string; + /** + * The value that indicates whether the policy is enabled or not. Possible values include: + * 'enabled', 'disabled' + */ status?: string; } /** - * @class - * Initializes a new instance of the RegistryPolicies class. - * @constructor * An object that represents policies for a container registry. - * - * @member {object} [quarantinePolicy] An object that represents quarantine - * policy for a container registry. - * @member {string} [quarantinePolicy.status] The value that indicates whether - * the policy is enabled or not. Possible values include: 'enabled', 'disabled' - * @member {object} [trustPolicy] An object that represents content trust - * policy for a container registry. - * @member {string} [trustPolicy.type] The type of trust policy. Possible - * values include: 'Notary' - * @member {string} [trustPolicy.status] The value that indicates whether the - * policy is enabled or not. Possible values include: 'enabled', 'disabled' - */ +*/ export interface RegistryPolicies { + /** + * An object that represents quarantine policy for a container registry. + */ quarantinePolicy?: QuarantinePolicy; + /** + * An object that represents content trust policy for a container registry. + */ trustPolicy?: TrustPolicy; } /** - * @class - * Initializes a new instance of the Replication class. - * @constructor * An object that represents a replication for a container registry. - * - * @member {string} [provisioningState] The provisioning state of the - * replication at the time the operation was called. Possible values include: - * 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' - * @member {object} [status] The status of the replication at the time the - * operation was called. - * @member {string} [status.displayStatus] The short label for the status. - * @member {string} [status.message] The detailed message for the status, - * including alerts and error messages. - * @member {date} [status.timestamp] The timestamp when the status was changed - * to the current value. - */ +*/ export interface Replication extends Resource { + /** + * The provisioning state of the replication at the time the operation was called. Possible + * values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' + */ readonly provisioningState?: string; + /** + * The status of the replication at the time the operation was called. + */ readonly status?: Status; } /** - * @class - * Initializes a new instance of the ReplicationUpdateParameters class. - * @constructor * The parameters for updating a replication. - * - * @member {object} [tags] The tags for the replication. - */ +*/ export interface ReplicationUpdateParameters { + /** + * The tags for the replication. + */ tags?: { [propertyName: string]: string }; } /** - * @class - * Initializes a new instance of the Webhook class. - * @constructor * An object that represents a webhook for a container registry. - * - * @member {string} [status] The status of the webhook at the time the - * operation was called. Possible values include: 'enabled', 'disabled' - * @member {string} [scope] The scope of repositories where the event can be - * triggered. For example, 'foo:*' means events for all tags under repository - * 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to - * 'foo:latest'. Empty means all events. - * @member {array} actions The list of actions that trigger the webhook to post - * notifications. - * @member {string} [provisioningState] The provisioning state of the webhook - * at the time the operation was called. Possible values include: 'Creating', - * 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' - */ +*/ export interface Webhook extends Resource { + /** + * The status of the webhook at the time the operation was called. Possible values include: + * 'enabled', 'disabled' + */ status?: string; + /** + * The scope of repositories where the event can be triggered. For example, 'foo:*' means events + * for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is + * equivalent to 'foo:latest'. Empty means all events. + */ scope?: string; + /** + * The list of actions that trigger the webhook to post notifications. + */ actions: string[]; + /** + * The provisioning state of the webhook at the time the operation was called. Possible values + * include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' + */ readonly provisioningState?: string; } /** - * @class - * Initializes a new instance of the WebhookCreateParameters class. - * @constructor * The parameters for creating a webhook. - * - * @member {object} [tags] The tags for the webhook. - * @member {string} location The location of the webhook. This cannot be - * changed after the resource is created. - * @member {string} serviceUri The service URI for the webhook to post - * notifications. - * @member {object} [customHeaders] Custom headers that will be added to the - * webhook notifications. - * @member {string} [status] The status of the webhook at the time the - * operation was called. Possible values include: 'enabled', 'disabled' - * @member {string} [scope] The scope of repositories where the event can be - * triggered. For example, 'foo:*' means events for all tags under repository - * 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to - * 'foo:latest'. Empty means all events. - * @member {array} actions The list of actions that trigger the webhook to post - * notifications. - */ +*/ export interface WebhookCreateParameters { + /** + * The tags for the webhook. + */ tags?: { [propertyName: string]: string }; + /** + * The location of the webhook. This cannot be changed after the resource is created. + */ location: string; + /** + * The service URI for the webhook to post notifications. + */ serviceUri: string; + /** + * Custom headers that will be added to the webhook notifications. + */ customHeaders?: { [propertyName: string]: string }; + /** + * The status of the webhook at the time the operation was called. Possible values include: + * 'enabled', 'disabled' + */ status?: string; + /** + * The scope of repositories where the event can be triggered. For example, 'foo:*' means events + * for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is + * equivalent to 'foo:latest'. Empty means all events. + */ scope?: string; + /** + * The list of actions that trigger the webhook to post notifications. + */ actions: string[]; } /** - * @class - * Initializes a new instance of the WebhookUpdateParameters class. - * @constructor * The parameters for updating a webhook. - * - * @member {object} [tags] The tags for the webhook. - * @member {string} [serviceUri] The service URI for the webhook to post - * notifications. - * @member {object} [customHeaders] Custom headers that will be added to the - * webhook notifications. - * @member {string} [status] The status of the webhook at the time the - * operation was called. Possible values include: 'enabled', 'disabled' - * @member {string} [scope] The scope of repositories where the event can be - * triggered. For example, 'foo:*' means events for all tags under repository - * 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to - * 'foo:latest'. Empty means all events. - * @member {array} [actions] The list of actions that trigger the webhook to - * post notifications. - */ +*/ export interface WebhookUpdateParameters { + /** + * The tags for the webhook. + */ tags?: { [propertyName: string]: string }; + /** + * The service URI for the webhook to post notifications. + */ serviceUri?: string; + /** + * Custom headers that will be added to the webhook notifications. + */ customHeaders?: { [propertyName: string]: string }; + /** + * The status of the webhook at the time the operation was called. Possible values include: + * 'enabled', 'disabled' + */ status?: string; + /** + * The scope of repositories where the event can be triggered. For example, 'foo:*' means events + * for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is + * equivalent to 'foo:latest'. Empty means all events. + */ scope?: string; + /** + * The list of actions that trigger the webhook to post notifications. + */ actions?: string[]; } /** - * @class - * Initializes a new instance of the EventInfo class. - * @constructor * The basic information of an event. - * - * @member {string} [id] The event ID. - */ +*/ export interface EventInfo { + /** + * The event ID. + */ id?: string; } /** - * @class - * Initializes a new instance of the CallbackConfig class. - * @constructor * The configuration of service URI and custom headers for the webhook. - * - * @member {string} serviceUri The service URI for the webhook to post - * notifications. - * @member {object} [customHeaders] Custom headers that will be added to the - * webhook notifications. - */ +*/ export interface CallbackConfig { + /** + * The service URI for the webhook to post notifications. + */ serviceUri: string; + /** + * Custom headers that will be added to the webhook notifications. + */ customHeaders?: { [propertyName: string]: string }; } /** - * @class - * Initializes a new instance of the Target class. - * @constructor * The target of the event. - * - * @member {string} [mediaType] The MIME type of the referenced object. - * @member {number} [size] The number of bytes of the content. Same as Length - * field. - * @member {string} [digest] The digest of the content, as defined by the - * Registry V2 HTTP API Specification. - * @member {number} [length] The number of bytes of the content. Same as Size - * field. - * @member {string} [repository] The repository name. - * @member {string} [url] The direct URL to the content. - * @member {string} [tag] The tag name. - */ +*/ export interface Target { + /** + * The MIME type of the referenced object. + */ mediaType?: string; + /** + * The number of bytes of the content. Same as Length field. + */ size?: number; + /** + * The digest of the content, as defined by the Registry V2 HTTP API Specification. + */ digest?: string; + /** + * The number of bytes of the content. Same as Size field. + */ length?: number; + /** + * The repository name. + */ repository?: string; + /** + * The direct URL to the content. + */ url?: string; + /** + * The tag name. + */ tag?: string; } /** - * @class - * Initializes a new instance of the Request class. - * @constructor * The request that generated the event. - * - * @member {string} [id] The ID of the request that initiated the event. - * @member {string} [addr] The IP or hostname and possibly port of the client - * connection that initiated the event. This is the RemoteAddr from the - * standard http request. - * @member {string} [host] The externally accessible hostname of the registry - * instance, as specified by the http host header on incoming requests. - * @member {string} [method] The request method that generated the event. - * @member {string} [useragent] The user agent header of the request. - */ +*/ export interface Request { + /** + * The ID of the request that initiated the event. + */ id?: string; + /** + * The IP or hostname and possibly port of the client connection that initiated the event. This + * is the RemoteAddr from the standard http request. + */ addr?: string; + /** + * The externally accessible hostname of the registry instance, as specified by the http host + * header on incoming requests. + */ host?: string; + /** + * The request method that generated the event. + */ method?: string; + /** + * The user agent header of the request. + */ useragent?: string; } /** - * @class - * Initializes a new instance of the Actor class. - * @constructor - * The agent that initiated the event. For most situations, this could be from - * the authorization context of the request. - * - * @member {string} [name] The subject or username associated with the request - * context that generated the event. - */ + * The agent that initiated the event. For most situations, this could be from the authorization + * context of the request. +*/ export interface Actor { + /** + * The subject or username associated with the request context that generated the event. + */ name?: string; } /** - * @class - * Initializes a new instance of the Source class. - * @constructor - * The registry node that generated the event. Put differently, while the actor - * initiates the event, the source generates it. - * - * @member {string} [addr] The IP or hostname and the port of the registry node - * that generated the event. Generally, this will be resolved by os.Hostname() - * along with the running port. - * @member {string} [instanceID] The running instance of an application. - * Changes after each restart. - */ + * The registry node that generated the event. Put differently, while the actor initiates the + * event, the source generates it. +*/ export interface Source { + /** + * The IP or hostname and the port of the registry node that generated the event. Generally, this + * will be resolved by os.Hostname() along with the running port. + */ addr?: string; + /** + * The running instance of an application. Changes after each restart. + */ instanceID?: string; } /** - * @class - * Initializes a new instance of the EventContent class. - * @constructor * The content of the event request message. - * - * @member {string} [id] The event ID. - * @member {date} [timestamp] The time at which the event occurred. - * @member {string} [action] The action that encompasses the provided event. - * @member {object} [target] The target of the event. - * @member {string} [target.mediaType] The MIME type of the referenced object. - * @member {number} [target.size] The number of bytes of the content. Same as - * Length field. - * @member {string} [target.digest] The digest of the content, as defined by - * the Registry V2 HTTP API Specification. - * @member {number} [target.length] The number of bytes of the content. Same as - * Size field. - * @member {string} [target.repository] The repository name. - * @member {string} [target.url] The direct URL to the content. - * @member {string} [target.tag] The tag name. - * @member {object} [request] The request that generated the event. - * @member {string} [request.id] The ID of the request that initiated the - * event. - * @member {string} [request.addr] The IP or hostname and possibly port of the - * client connection that initiated the event. This is the RemoteAddr from the - * standard http request. - * @member {string} [request.host] The externally accessible hostname of the - * registry instance, as specified by the http host header on incoming - * requests. - * @member {string} [request.method] The request method that generated the - * event. - * @member {string} [request.useragent] The user agent header of the request. - * @member {object} [actor] The agent that initiated the event. For most - * situations, this could be from the authorization context of the request. - * @member {string} [actor.name] The subject or username associated with the - * request context that generated the event. - * @member {object} [source] The registry node that generated the event. Put - * differently, while the actor initiates the event, the source generates it. - * @member {string} [source.addr] The IP or hostname and the port of the - * registry node that generated the event. Generally, this will be resolved by - * os.Hostname() along with the running port. - * @member {string} [source.instanceID] The running instance of an application. - * Changes after each restart. - */ +*/ export interface EventContent { + /** + * The event ID. + */ id?: string; + /** + * The time at which the event occurred. + */ timestamp?: Date; + /** + * The action that encompasses the provided event. + */ action?: string; + /** + * The target of the event. + */ target?: Target; + /** + * The request that generated the event. + */ request?: Request; + /** + * The agent that initiated the event. For most situations, this could be from the authorization + * context of the request. + */ actor?: Actor; + /** + * The registry node that generated the event. Put differently, while the actor initiates the + * event, the source generates it. + */ source?: Source; } /** - * @class - * Initializes a new instance of the EventRequestMessage class. - * @constructor * The event request message sent to the service URI. - * - * @member {object} [content] The content of the event request message. - * @member {string} [content.id] The event ID. - * @member {date} [content.timestamp] The time at which the event occurred. - * @member {string} [content.action] The action that encompasses the provided - * event. - * @member {object} [content.target] The target of the event. - * @member {string} [content.target.mediaType] The MIME type of the referenced - * object. - * @member {number} [content.target.size] The number of bytes of the content. - * Same as Length field. - * @member {string} [content.target.digest] The digest of the content, as - * defined by the Registry V2 HTTP API Specification. - * @member {number} [content.target.length] The number of bytes of the content. - * Same as Size field. - * @member {string} [content.target.repository] The repository name. - * @member {string} [content.target.url] The direct URL to the content. - * @member {string} [content.target.tag] The tag name. - * @member {object} [content.request] The request that generated the event. - * @member {string} [content.request.id] The ID of the request that initiated - * the event. - * @member {string} [content.request.addr] The IP or hostname and possibly port - * of the client connection that initiated the event. This is the RemoteAddr - * from the standard http request. - * @member {string} [content.request.host] The externally accessible hostname - * of the registry instance, as specified by the http host header on incoming - * requests. - * @member {string} [content.request.method] The request method that generated - * the event. - * @member {string} [content.request.useragent] The user agent header of the - * request. - * @member {object} [content.actor] The agent that initiated the event. For - * most situations, this could be from the authorization context of the - * request. - * @member {string} [content.actor.name] The subject or username associated - * with the request context that generated the event. - * @member {object} [content.source] The registry node that generated the - * event. Put differently, while the actor initiates the event, the source - * generates it. - * @member {string} [content.source.addr] The IP or hostname and the port of - * the registry node that generated the event. Generally, this will be resolved - * by os.Hostname() along with the running port. - * @member {string} [content.source.instanceID] The running instance of an - * application. Changes after each restart. - * @member {object} [headers] The headers of the event request message. - * @member {string} [method] The HTTP method used to send the event request - * message. - * @member {string} [requestUri] The URI used to send the event request - * message. - * @member {string} [version] The HTTP message version. - */ +*/ export interface EventRequestMessage { + /** + * The content of the event request message. + */ content?: EventContent; + /** + * The headers of the event request message. + */ headers?: { [propertyName: string]: string }; + /** + * The HTTP method used to send the event request message. + */ method?: string; + /** + * The URI used to send the event request message. + */ requestUri?: string; + /** + * The HTTP message version. + */ version?: string; } /** - * @class - * Initializes a new instance of the EventResponseMessage class. - * @constructor * The event response message received from the service URI. - * - * @member {string} [content] The content of the event response message. - * @member {object} [headers] The headers of the event response message. - * @member {string} [reasonPhrase] The reason phrase of the event response - * message. - * @member {string} [statusCode] The status code of the event response message. - * @member {string} [version] The HTTP message version. - */ +*/ export interface EventResponseMessage { + /** + * The content of the event response message. + */ content?: string; + /** + * The headers of the event response message. + */ headers?: { [propertyName: string]: string }; + /** + * The reason phrase of the event response message. + */ reasonPhrase?: string; + /** + * The status code of the event response message. + */ statusCode?: string; + /** + * The HTTP message version. + */ version?: string; } /** - * @class - * Initializes a new instance of the Event class. - * @constructor * The event for a webhook. - * - * @member {object} [eventRequestMessage] The event request message sent to the - * service URI. - * @member {object} [eventRequestMessage.content] The content of the event - * request message. - * @member {string} [eventRequestMessage.content.id] The event ID. - * @member {date} [eventRequestMessage.content.timestamp] The time at which the - * event occurred. - * @member {string} [eventRequestMessage.content.action] The action that - * encompasses the provided event. - * @member {object} [eventRequestMessage.content.target] The target of the - * event. - * @member {string} [eventRequestMessage.content.target.mediaType] The MIME - * type of the referenced object. - * @member {number} [eventRequestMessage.content.target.size] The number of - * bytes of the content. Same as Length field. - * @member {string} [eventRequestMessage.content.target.digest] The digest of - * the content, as defined by the Registry V2 HTTP API Specification. - * @member {number} [eventRequestMessage.content.target.length] The number of - * bytes of the content. Same as Size field. - * @member {string} [eventRequestMessage.content.target.repository] The - * repository name. - * @member {string} [eventRequestMessage.content.target.url] The direct URL to - * the content. - * @member {string} [eventRequestMessage.content.target.tag] The tag name. - * @member {object} [eventRequestMessage.content.request] The request that - * generated the event. - * @member {string} [eventRequestMessage.content.request.id] The ID of the - * request that initiated the event. - * @member {string} [eventRequestMessage.content.request.addr] The IP or - * hostname and possibly port of the client connection that initiated the - * event. This is the RemoteAddr from the standard http request. - * @member {string} [eventRequestMessage.content.request.host] The externally - * accessible hostname of the registry instance, as specified by the http host - * header on incoming requests. - * @member {string} [eventRequestMessage.content.request.method] The request - * method that generated the event. - * @member {string} [eventRequestMessage.content.request.useragent] The user - * agent header of the request. - * @member {object} [eventRequestMessage.content.actor] The agent that - * initiated the event. For most situations, this could be from the - * authorization context of the request. - * @member {string} [eventRequestMessage.content.actor.name] The subject or - * username associated with the request context that generated the event. - * @member {object} [eventRequestMessage.content.source] The registry node that - * generated the event. Put differently, while the actor initiates the event, - * the source generates it. - * @member {string} [eventRequestMessage.content.source.addr] The IP or - * hostname and the port of the registry node that generated the event. - * Generally, this will be resolved by os.Hostname() along with the running - * port. - * @member {string} [eventRequestMessage.content.source.instanceID] The running - * instance of an application. Changes after each restart. - * @member {object} [eventRequestMessage.headers] The headers of the event - * request message. - * @member {string} [eventRequestMessage.method] The HTTP method used to send - * the event request message. - * @member {string} [eventRequestMessage.requestUri] The URI used to send the - * event request message. - * @member {string} [eventRequestMessage.version] The HTTP message version. - * @member {object} [eventResponseMessage] The event response message received - * from the service URI. - * @member {string} [eventResponseMessage.content] The content of the event - * response message. - * @member {object} [eventResponseMessage.headers] The headers of the event - * response message. - * @member {string} [eventResponseMessage.reasonPhrase] The reason phrase of - * the event response message. - * @member {string} [eventResponseMessage.statusCode] The status code of the - * event response message. - * @member {string} [eventResponseMessage.version] The HTTP message version. - */ +*/ export interface Event extends EventInfo { + /** + * The event request message sent to the service URI. + */ eventRequestMessage?: EventRequestMessage; + /** + * The event response message received from the service URI. + */ eventResponseMessage?: EventResponseMessage; } /** - * @class - * Initializes a new instance of the RunRequest class. - * @constructor * The request parameters for scheduling a run. - * - * @member {boolean} [isArchiveEnabled] The value that indicates whether - * archiving is enabled for the run or not. Default value: false . - * @member {string} type Polymorphic Discriminator - */ +*/ export interface RunRequest { + /** + * The value that indicates whether archiving is enabled for the run or not. + */ isArchiveEnabled?: boolean; + /** + * Polymorphic Discriminator + */ type: string; } /** - * @class - * Initializes a new instance of the ImageDescriptor class. - * @constructor * Properties for a registry image. - * - * @member {string} [registry] The registry login server. - * @member {string} [repository] The repository name. - * @member {string} [tag] The tag name. - * @member {string} [digest] The sha256-based digest of the image manifest. - */ +*/ export interface ImageDescriptor { + /** + * The registry login server. + */ registry?: string; + /** + * The repository name. + */ repository?: string; + /** + * The tag name. + */ tag?: string; + /** + * The sha256-based digest of the image manifest. + */ digest?: string; } /** - * @class - * Initializes a new instance of the ImageUpdateTrigger class. - * @constructor * The image update trigger that caused a build. - * - * @member {string} [id] The unique ID of the trigger. - * @member {date} [timestamp] The timestamp when the image update happened. - * @member {array} [images] The list of image updates that caused the build. - */ +*/ export interface ImageUpdateTrigger { + /** + * The unique ID of the trigger. + */ id?: string; + /** + * The timestamp when the image update happened. + */ timestamp?: Date; + /** + * The list of image updates that caused the build. + */ images?: ImageDescriptor[]; } /** - * @class - * Initializes a new instance of the SourceTriggerDescriptor class. - * @constructor * The source trigger that caused a run. - * - * @member {string} [id] The unique ID of the trigger. - * @member {string} [eventType] The event type of the trigger. - * @member {string} [commitId] The unique ID that identifies a commit. - * @member {string} [pullRequestId] The unique ID that identifies pull request. - * @member {string} [repositoryUrl] The repository URL. - * @member {string} [branchName] The branch name in the repository. - * @member {string} [providerType] The source control provider type. - */ +*/ export interface SourceTriggerDescriptor { + /** + * The unique ID of the trigger. + */ id?: string; + /** + * The event type of the trigger. + */ eventType?: string; + /** + * The unique ID that identifies a commit. + */ commitId?: string; + /** + * The unique ID that identifies pull request. + */ pullRequestId?: string; + /** + * The repository URL. + */ repositoryUrl?: string; + /** + * The branch name in the repository. + */ branchName?: string; + /** + * The source control provider type. + */ providerType?: string; } /** - * @class - * Initializes a new instance of the PlatformProperties class. - * @constructor * The platform properties against which the run has to happen. - * - * @member {string} os The operating system type required for the run. Possible - * values include: 'Windows', 'Linux' - * @member {string} [architecture] The OS architecture. Possible values - * include: 'amd64', 'x86', 'arm' - * @member {string} [variant] Variant of the CPU. Possible values include: - * 'v6', 'v7', 'v8' - */ +*/ export interface PlatformProperties { + /** + * The operating system type required for the run. Possible values include: 'Windows', 'Linux' + */ os: string; + /** + * The OS architecture. Possible values include: 'amd64', 'x86', 'arm' + */ architecture?: string; + /** + * Variant of the CPU. Possible values include: 'v6', 'v7', 'v8' + */ variant?: string; } /** - * @class - * Initializes a new instance of the AgentProperties class. - * @constructor * The properties that determine the run agent configuration. - * - * @member {number} [cpu] The CPU configuration in terms of number of cores - * required for the run. - */ +*/ export interface AgentProperties { + /** + * The CPU configuration in terms of number of cores required for the run. + */ cpu?: number; } /** - * @class - * Initializes a new instance of the ProxyResource class. - * @constructor - * The resource model definition for a ARM proxy resource. It will have - * everything other than required location and tags. - * - * @member {string} [id] The resource ID. - * @member {string} [name] The name of the resource. - * @member {string} [type] The type of the resource. - */ + * The resource model definition for a ARM proxy resource. It will have everything other than + * required location and tags. +*/ export interface ProxyResource extends BaseResource { + /** + * The resource ID. + */ readonly id?: string; + /** + * The name of the resource. + */ readonly name?: string; + /** + * The type of the resource. + */ readonly type?: string; } /** - * @class - * Initializes a new instance of the Run class. - * @constructor * Run resource properties - * - * @member {string} [runId] The unique identifier for the run. - * @member {string} [status] The current status of the run. Possible values - * include: 'Queued', 'Started', 'Running', 'Succeeded', 'Failed', 'Canceled', - * 'Error', 'Timeout' - * @member {date} [lastUpdatedTime] The last updated time for the run. - * @member {string} [runType] The type of run. Possible values include: - * 'QuickBuild', 'QuickRun', 'AutoBuild', 'AutoRun' - * @member {date} [createTime] The time the run was scheduled. - * @member {date} [startTime] The time the run started. - * @member {date} [finishTime] The time the run finished. - * @member {array} [outputImages] The list of all images that were generated - * from the run. This is applicable if the run generates base image - * dependencies. - * @member {string} [task] The task against which run was scheduled. - * @member {object} [imageUpdateTrigger] The image update trigger that caused - * the run. This is applicable if the task has base image trigger configured. - * @member {string} [imageUpdateTrigger.id] The unique ID of the trigger. - * @member {date} [imageUpdateTrigger.timestamp] The timestamp when the image - * update happened. - * @member {array} [imageUpdateTrigger.images] The list of image updates that - * caused the build. - * @member {object} [sourceTrigger] The source trigger that caused the run. - * @member {string} [sourceTrigger.id] The unique ID of the trigger. - * @member {string} [sourceTrigger.eventType] The event type of the trigger. - * @member {string} [sourceTrigger.commitId] The unique ID that identifies a - * commit. - * @member {string} [sourceTrigger.pullRequestId] The unique ID that identifies - * pull request. - * @member {string} [sourceTrigger.repositoryUrl] The repository URL. - * @member {string} [sourceTrigger.branchName] The branch name in the - * repository. - * @member {string} [sourceTrigger.providerType] The source control provider - * type. - * @member {boolean} [isArchiveEnabled] The value that indicates whether - * archiving is enabled or not. Default value: false . - * @member {object} [platform] The platform properties against which the run - * will happen. - * @member {string} [platform.os] The operating system type required for the - * run. Possible values include: 'Windows', 'Linux' - * @member {string} [platform.architecture] The OS architecture. Possible - * values include: 'amd64', 'x86', 'arm' - * @member {string} [platform.variant] Variant of the CPU. Possible values - * include: 'v6', 'v7', 'v8' - * @member {object} [agentConfiguration] The machine configuration of the run - * agent. - * @member {number} [agentConfiguration.cpu] The CPU configuration in terms of - * number of cores required for the run. - * @member {string} [provisioningState] The provisioning state of a run. - * Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', - * 'Failed', 'Canceled' - */ +*/ export interface Run extends ProxyResource { + /** + * The unique identifier for the run. + */ runId?: string; + /** + * The current status of the run. Possible values include: 'Queued', 'Started', 'Running', + * 'Succeeded', 'Failed', 'Canceled', 'Error', 'Timeout' + */ status?: string; + /** + * The last updated time for the run. + */ lastUpdatedTime?: Date; + /** + * The type of run. Possible values include: 'QuickBuild', 'QuickRun', 'AutoBuild', 'AutoRun' + */ runType?: string; + /** + * The time the run was scheduled. + */ createTime?: Date; + /** + * The time the run started. + */ startTime?: Date; + /** + * The time the run finished. + */ finishTime?: Date; + /** + * The list of all images that were generated from the run. This is applicable if the run + * generates base image dependencies. + */ outputImages?: ImageDescriptor[]; + /** + * The task against which run was scheduled. + */ task?: string; + /** + * The image update trigger that caused the run. This is applicable if the task has base image + * trigger configured. + */ imageUpdateTrigger?: ImageUpdateTrigger; + /** + * The source trigger that caused the run. + */ sourceTrigger?: SourceTriggerDescriptor; + /** + * The value that indicates whether archiving is enabled or not. + */ isArchiveEnabled?: boolean; + /** + * The platform properties against which the run will happen. + */ platform?: PlatformProperties; + /** + * The machine configuration of the run agent. + */ agentConfiguration?: AgentProperties; + /** + * The provisioning state of a run. Possible values include: 'Creating', 'Updating', 'Deleting', + * 'Succeeded', 'Failed', 'Canceled' + */ provisioningState?: string; } /** - * @class - * Initializes a new instance of the SourceUploadDefinition class. - * @constructor * The properties of a response to source upload request. - * - * @member {string} [uploadUrl] The URL where the client can upload the source. - * @member {string} [relativePath] The relative path to the source. This is - * used to submit the subsequent queue build request. - */ +*/ export interface SourceUploadDefinition { + /** + * The URL where the client can upload the source. + */ uploadUrl?: string; + /** + * The relative path to the source. This is used to submit the subsequent queue build request. + */ relativePath?: string; } /** - * @class - * Initializes a new instance of the RunFilter class. - * @constructor * Properties that are enabled for Odata querying on runs. - * - * @member {string} [runId] The unique identifier for the run. - * @member {string} [runType] The type of run. Possible values include: - * 'QuickBuild', 'QuickRun', 'AutoBuild', 'AutoRun' - * @member {string} [status] The current status of the run. Possible values - * include: 'Queued', 'Started', 'Running', 'Succeeded', 'Failed', 'Canceled', - * 'Error', 'Timeout' - * @member {date} [createTime] The create time for a run. - * @member {date} [finishTime] The time the run finished. - * @member {string} [outputImageManifests] The list of comma-separated image - * manifests that were generated from the run. This is applicable if the run is - * of - * build type. - * @member {boolean} [isArchiveEnabled] The value that indicates whether - * archiving is enabled or not. - * @member {string} [taskName] The name of the task that the run corresponds - * to. - */ +*/ export interface RunFilter { + /** + * The unique identifier for the run. + */ runId?: string; + /** + * The type of run. Possible values include: 'QuickBuild', 'QuickRun', 'AutoBuild', 'AutoRun' + */ runType?: string; + /** + * The current status of the run. Possible values include: 'Queued', 'Started', 'Running', + * 'Succeeded', 'Failed', 'Canceled', 'Error', 'Timeout' + */ status?: string; + /** + * The create time for a run. + */ createTime?: Date; + /** + * The time the run finished. + */ finishTime?: Date; + /** + * The list of comma-separated image manifests that were generated from the run. This is + * applicable if the run is of + * build type. + */ outputImageManifests?: string; + /** + * The value that indicates whether archiving is enabled or not. + */ isArchiveEnabled?: boolean; + /** + * The name of the task that the run corresponds to. + */ taskName?: string; } /** - * @class - * Initializes a new instance of the RunUpdateParameters class. - * @constructor * The set of run properties that can be updated. - * - * @member {boolean} [isArchiveEnabled] The value that indicates whether - * archiving is enabled or not. - */ +*/ export interface RunUpdateParameters { + /** + * The value that indicates whether archiving is enabled or not. + */ isArchiveEnabled?: boolean; } /** - * @class - * Initializes a new instance of the RunGetLogResult class. - * @constructor * The result of get log link operation. - * - * @member {string} [logLink] The link to logs for a run on a azure container - * registry. - */ +*/ export interface RunGetLogResult { + /** + * The link to logs for a run on a azure container registry. + */ logLink?: string; } /** - * @class - * Initializes a new instance of the BaseImageDependency class. - * @constructor * Properties that describe a base image dependency. - * - * @member {string} [type] The type of the base image dependency. Possible - * values include: 'BuildTime', 'RunTime' - * @member {string} [registry] The registry login server. - * @member {string} [repository] The repository name. - * @member {string} [tag] The tag name. - * @member {string} [digest] The sha256-based digest of the image manifest. - */ +*/ export interface BaseImageDependency { + /** + * The type of the base image dependency. Possible values include: 'BuildTime', 'RunTime' + */ type?: string; + /** + * The registry login server. + */ registry?: string; + /** + * The repository name. + */ repository?: string; + /** + * The tag name. + */ tag?: string; + /** + * The sha256-based digest of the image manifest. + */ digest?: string; } /** - * @class - * Initializes a new instance of the TaskStepProperties class. - * @constructor * Base properties for any task step. - * - * @member {array} [baseImageDependencies] List of base image dependencies for - * a step. - * @member {string} [contextPath] The URL(absolute or relative) of the source - * context for the task step. - * @member {string} [contextAccessToken] The token (git PAT or SAS token of - * storage account blob) associated with the context for a step. - * @member {string} type Polymorphic Discriminator - */ +*/ export interface TaskStepProperties { + /** + * List of base image dependencies for a step. + */ readonly baseImageDependencies?: BaseImageDependency[]; + /** + * The URL(absolute or relative) of the source context for the task step. + */ contextPath?: string; + /** + * The token (git PAT or SAS token of storage account blob) associated with the context for a + * step. + */ contextAccessToken?: string; + /** + * Polymorphic Discriminator + */ type: string; } /** - * @class - * Initializes a new instance of the AuthInfo class. - * @constructor * The authorization properties for accessing the source code repository. - * - * @member {string} tokenType The type of Auth token. Possible values include: - * 'PAT', 'OAuth' - * @member {string} token The access token used to access the source control - * provider. - * @member {string} [refreshToken] The refresh token used to refresh the access - * token. - * @member {string} [scope] The scope of the access token. - * @member {number} [expiresIn] Time in seconds that the token remains valid - */ +*/ export interface AuthInfo { + /** + * The type of Auth token. Possible values include: 'PAT', 'OAuth' + */ tokenType: string; + /** + * The access token used to access the source control provider. + */ token: string; + /** + * The refresh token used to refresh the access token. + */ refreshToken?: string; + /** + * The scope of the access token. + */ scope?: string; + /** + * Time in seconds that the token remains valid + */ expiresIn?: number; } /** - * @class - * Initializes a new instance of the SourceProperties class. - * @constructor * The properties of the source code repository. - * - * @member {string} sourceControlType The type of source control service. - * Possible values include: 'Github', 'VisualStudioTeamService' - * @member {string} repositoryUrl The full URL to the source code respository - * @member {string} [branch] The branch name of the source code. - * @member {object} [sourceControlAuthProperties] The authorization properties - * for accessing the source code repository and to set up - * webhooks for notifications. - * @member {string} [sourceControlAuthProperties.tokenType] The type of Auth - * token. Possible values include: 'PAT', 'OAuth' - * @member {string} [sourceControlAuthProperties.token] The access token used - * to access the source control provider. - * @member {string} [sourceControlAuthProperties.refreshToken] The refresh - * token used to refresh the access token. - * @member {string} [sourceControlAuthProperties.scope] The scope of the access - * token. - * @member {number} [sourceControlAuthProperties.expiresIn] Time in seconds - * that the token remains valid - */ +*/ export interface SourceProperties { + /** + * The type of source control service. Possible values include: 'Github', + * 'VisualStudioTeamService' + */ sourceControlType: string; + /** + * The full URL to the source code repository + */ repositoryUrl: string; + /** + * The branch name of the source code. + */ branch?: string; + /** + * The authorization properties for accessing the source code repository and to set up + * webhooks for notifications. + */ sourceControlAuthProperties?: AuthInfo; } /** - * @class - * Initializes a new instance of the SourceTrigger class. - * @constructor * The properties of a source based trigger. - * - * @member {object} sourceRepository The properties that describes the - * source(code) for the task. - * @member {string} [sourceRepository.sourceControlType] The type of source - * control service. Possible values include: 'Github', - * 'VisualStudioTeamService' - * @member {string} [sourceRepository.repositoryUrl] The full URL to the source - * code respository - * @member {string} [sourceRepository.branch] The branch name of the source - * code. - * @member {object} [sourceRepository.sourceControlAuthProperties] The - * authorization properties for accessing the source code repository and to set - * up - * webhooks for notifications. - * @member {string} [sourceRepository.sourceControlAuthProperties.tokenType] - * The type of Auth token. Possible values include: 'PAT', 'OAuth' - * @member {string} [sourceRepository.sourceControlAuthProperties.token] The - * access token used to access the source control provider. - * @member {string} [sourceRepository.sourceControlAuthProperties.refreshToken] - * The refresh token used to refresh the access token. - * @member {string} [sourceRepository.sourceControlAuthProperties.scope] The - * scope of the access token. - * @member {number} [sourceRepository.sourceControlAuthProperties.expiresIn] - * Time in seconds that the token remains valid - * @member {array} sourceTriggerEvents The source event corresponding to the - * trigger. - * @member {string} [status] The current status of trigger. Possible values - * include: 'Disabled', 'Enabled' - * @member {string} name The name of the trigger. - */ +*/ export interface SourceTrigger { + /** + * The properties that describes the source(code) for the task. + */ sourceRepository: SourceProperties; + /** + * The source event corresponding to the trigger. + */ sourceTriggerEvents: string[]; + /** + * The current status of trigger. Possible values include: 'Disabled', 'Enabled' + */ status?: string; + /** + * The name of the trigger. + */ name: string; } /** - * @class - * Initializes a new instance of the BaseImageTrigger class. - * @constructor * The trigger based on base image dependency. - * - * @member {string} baseImageTriggerType The type of the auto trigger for base - * image dependency updates. Possible values include: 'All', 'Runtime' - * @member {string} [status] The current status of trigger. Possible values - * include: 'Disabled', 'Enabled' - * @member {string} name The name of the trigger. - */ +*/ export interface BaseImageTrigger { + /** + * The type of the auto trigger for base image dependency updates. Possible values include: + * 'All', 'Runtime' + */ baseImageTriggerType: string; + /** + * The current status of trigger. Possible values include: 'Disabled', 'Enabled' + */ status?: string; + /** + * The name of the trigger. + */ name: string; } /** - * @class - * Initializes a new instance of the TriggerProperties class. - * @constructor * The properties of a trigger. - * - * @member {array} [sourceTriggers] The collection of triggers based on source - * code repository. - * @member {object} [baseImageTrigger] The trigger based on base image - * dependencies. - * @member {string} [baseImageTrigger.baseImageTriggerType] The type of the - * auto trigger for base image dependency updates. Possible values include: - * 'All', 'Runtime' - * @member {string} [baseImageTrigger.status] The current status of trigger. - * Possible values include: 'Disabled', 'Enabled' - * @member {string} [baseImageTrigger.name] The name of the trigger. - */ +*/ export interface TriggerProperties { + /** + * The collection of triggers based on source code repository. + */ sourceTriggers?: SourceTrigger[]; + /** + * The trigger based on base image dependencies. + */ baseImageTrigger?: BaseImageTrigger; } /** - * @class - * Initializes a new instance of the Task class. - * @constructor * The task that has the ARM resource and task properties. - * The task will have all information to schedule a run against it. - * - * @member {string} [provisioningState] The provisioning state of the task. - * Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', - * 'Failed', 'Canceled' - * @member {date} [creationDate] The creation date of task. - * @member {string} [status] The current status of task. Possible values - * include: 'Disabled', 'Enabled' - * @member {object} platform The platform properties against which the run has - * to happen. - * @member {string} [platform.os] The operating system type required for the - * run. Possible values include: 'Windows', 'Linux' - * @member {string} [platform.architecture] The OS architecture. Possible - * values include: 'amd64', 'x86', 'arm' - * @member {string} [platform.variant] Variant of the CPU. Possible values - * include: 'v6', 'v7', 'v8' - * @member {object} [agentConfiguration] The machine configuration of the run - * agent. - * @member {number} [agentConfiguration.cpu] The CPU configuration in terms of - * number of cores required for the run. - * @member {number} [timeout] Run timeout in seconds. Default value: 3600 . - * @member {object} step The properties of a task step. - * @member {array} [step.baseImageDependencies] List of base image dependencies - * for a step. - * @member {string} [step.contextPath] The URL(absolute or relative) of the - * source context for the task step. - * @member {string} [step.contextAccessToken] The token (git PAT or SAS token - * of storage account blob) associated with the context for a step. - * @member {string} [step.type] Polymorphic Discriminator - * @member {object} [trigger] The properties that describe all triggers for the - * task. - * @member {array} [trigger.sourceTriggers] The collection of triggers based on - * source code repository. - * @member {object} [trigger.baseImageTrigger] The trigger based on base image - * dependencies. - * @member {string} [trigger.baseImageTrigger.baseImageTriggerType] The type of - * the auto trigger for base image dependency updates. Possible values include: - * 'All', 'Runtime' - * @member {string} [trigger.baseImageTrigger.status] The current status of - * trigger. Possible values include: 'Disabled', 'Enabled' - * @member {string} [trigger.baseImageTrigger.name] The name of the trigger. - */ + * The task will have all information to schedule a run against it. +*/ export interface Task extends Resource { + /** + * The provisioning state of the task. Possible values include: 'Creating', 'Updating', + * 'Deleting', 'Succeeded', 'Failed', 'Canceled' + */ readonly provisioningState?: string; + /** + * The creation date of task. + */ readonly creationDate?: Date; + /** + * The current status of task. Possible values include: 'Disabled', 'Enabled' + */ status?: string; + /** + * The platform properties against which the run has to happen. + */ platform: PlatformProperties; + /** + * The machine configuration of the run agent. + */ agentConfiguration?: AgentProperties; + /** + * Run timeout in seconds. + */ timeout?: number; + /** + * The properties of a task step. + */ step: TaskStepProperties; + /** + * The properties that describe all triggers for the task. + */ trigger?: TriggerProperties; } /** - * @class - * Initializes a new instance of the PlatformUpdateParameters class. - * @constructor * The properties for updating the platform configuration. - * - * @member {string} [os] The operating system type required for the run. - * Possible values include: 'Windows', 'Linux' - * @member {string} [architecture] The OS architecture. Possible values - * include: 'amd64', 'x86', 'arm' - * @member {string} [variant] Variant of the CPU. Possible values include: - * 'v6', 'v7', 'v8' - */ +*/ export interface PlatformUpdateParameters { + /** + * The operating system type required for the run. Possible values include: 'Windows', 'Linux' + */ os?: string; + /** + * The OS architecture. Possible values include: 'amd64', 'x86', 'arm' + */ architecture?: string; + /** + * Variant of the CPU. Possible values include: 'v6', 'v7', 'v8' + */ variant?: string; } /** - * @class - * Initializes a new instance of the TaskStepUpdateParameters class. - * @constructor * Base properties for updating any task step. - * - * @member {string} [contextPath] The URL(absolute or relative) of the source - * context for the task step. - * @member {string} [contextAccessToken] The token (git PAT or SAS token of - * storage account blob) associated with the context for a step. - * @member {string} type Polymorphic Discriminator - */ +*/ export interface TaskStepUpdateParameters { + /** + * The URL(absolute or relative) of the source context for the task step. + */ contextPath?: string; + /** + * The token (git PAT or SAS token of storage account blob) associated with the context for a + * step. + */ contextAccessToken?: string; + /** + * Polymorphic Discriminator + */ type: string; } /** - * @class - * Initializes a new instance of the AuthInfoUpdateParameters class. - * @constructor * The authorization properties for accessing the source code repository. - * - * @member {string} [tokenType] The type of Auth token. Possible values - * include: 'PAT', 'OAuth' - * @member {string} [token] The access token used to access the source control - * provider. - * @member {string} [refreshToken] The refresh token used to refresh the access - * token. - * @member {string} [scope] The scope of the access token. - * @member {number} [expiresIn] Time in seconds that the token remains valid - */ +*/ export interface AuthInfoUpdateParameters { + /** + * The type of Auth token. Possible values include: 'PAT', 'OAuth' + */ tokenType?: string; + /** + * The access token used to access the source control provider. + */ token?: string; + /** + * The refresh token used to refresh the access token. + */ refreshToken?: string; + /** + * The scope of the access token. + */ scope?: string; + /** + * Time in seconds that the token remains valid + */ expiresIn?: number; } /** - * @class - * Initializes a new instance of the SourceUpdateParameters class. - * @constructor * The properties for updating the source code repository. - * - * @member {string} [sourceControlType] The type of source control service. - * Possible values include: 'Github', 'VisualStudioTeamService' - * @member {string} [repositoryUrl] The full URL to the source code respository - * @member {string} [branch] The branch name of the source code. - * @member {object} [sourceControlAuthProperties] The authorization properties - * for accessing the source code repository and to set up - * webhooks for notifications. - * @member {string} [sourceControlAuthProperties.tokenType] The type of Auth - * token. Possible values include: 'PAT', 'OAuth' - * @member {string} [sourceControlAuthProperties.token] The access token used - * to access the source control provider. - * @member {string} [sourceControlAuthProperties.refreshToken] The refresh - * token used to refresh the access token. - * @member {string} [sourceControlAuthProperties.scope] The scope of the access - * token. - * @member {number} [sourceControlAuthProperties.expiresIn] Time in seconds - * that the token remains valid - */ +*/ export interface SourceUpdateParameters { + /** + * The type of source control service. Possible values include: 'Github', + * 'VisualStudioTeamService' + */ sourceControlType?: string; + /** + * The full URL to the source code repository + */ repositoryUrl?: string; + /** + * The branch name of the source code. + */ branch?: string; + /** + * The authorization properties for accessing the source code repository and to set up + * webhooks for notifications. + */ sourceControlAuthProperties?: AuthInfoUpdateParameters; } /** - * @class - * Initializes a new instance of the SourceTriggerUpdateParameters class. - * @constructor * The properties for updating a source based trigger. - * - * @member {object} [sourceRepository] The properties that describes the - * source(code) for the task. - * @member {string} [sourceRepository.sourceControlType] The type of source - * control service. Possible values include: 'Github', - * 'VisualStudioTeamService' - * @member {string} [sourceRepository.repositoryUrl] The full URL to the source - * code respository - * @member {string} [sourceRepository.branch] The branch name of the source - * code. - * @member {object} [sourceRepository.sourceControlAuthProperties] The - * authorization properties for accessing the source code repository and to set - * up - * webhooks for notifications. - * @member {string} [sourceRepository.sourceControlAuthProperties.tokenType] - * The type of Auth token. Possible values include: 'PAT', 'OAuth' - * @member {string} [sourceRepository.sourceControlAuthProperties.token] The - * access token used to access the source control provider. - * @member {string} [sourceRepository.sourceControlAuthProperties.refreshToken] - * The refresh token used to refresh the access token. - * @member {string} [sourceRepository.sourceControlAuthProperties.scope] The - * scope of the access token. - * @member {number} [sourceRepository.sourceControlAuthProperties.expiresIn] - * Time in seconds that the token remains valid - * @member {array} [sourceTriggerEvents] The source event corresponding to the - * trigger. - * @member {string} [status] The current status of trigger. Possible values - * include: 'Disabled', 'Enabled' - * @member {string} name The name of the trigger. - */ +*/ export interface SourceTriggerUpdateParameters { + /** + * The properties that describes the source(code) for the task. + */ sourceRepository?: SourceUpdateParameters; + /** + * The source event corresponding to the trigger. + */ sourceTriggerEvents?: string[]; + /** + * The current status of trigger. Possible values include: 'Disabled', 'Enabled' + */ status?: string; + /** + * The name of the trigger. + */ name: string; } /** - * @class - * Initializes a new instance of the BaseImageTriggerUpdateParameters class. - * @constructor * The properties for updating base image dependency trigger. - * - * @member {string} [baseImageTriggerType] The type of the auto trigger for - * base image dependency updates. Possible values include: 'All', 'Runtime' - * @member {string} [status] The current status of trigger. Possible values - * include: 'Disabled', 'Enabled' - * @member {string} name The name of the trigger. - */ +*/ export interface BaseImageTriggerUpdateParameters { + /** + * The type of the auto trigger for base image dependency updates. Possible values include: + * 'All', 'Runtime' + */ baseImageTriggerType?: string; + /** + * The current status of trigger. Possible values include: 'Disabled', 'Enabled' + */ status?: string; + /** + * The name of the trigger. + */ name: string; } /** - * @class - * Initializes a new instance of the TriggerUpdateParameters class. - * @constructor * The properties for updating triggers. - * - * @member {array} [sourceTriggers] The collection of triggers based on source - * code repository. - * @member {object} [baseImageTrigger] The trigger based on base image - * dependencies. - * @member {string} [baseImageTrigger.baseImageTriggerType] The type of the - * auto trigger for base image dependency updates. Possible values include: - * 'All', 'Runtime' - * @member {string} [baseImageTrigger.status] The current status of trigger. - * Possible values include: 'Disabled', 'Enabled' - * @member {string} [baseImageTrigger.name] The name of the trigger. - */ +*/ export interface TriggerUpdateParameters { + /** + * The collection of triggers based on source code repository. + */ sourceTriggers?: SourceTriggerUpdateParameters[]; + /** + * The trigger based on base image dependencies. + */ baseImageTrigger?: BaseImageTriggerUpdateParameters; } /** - * @class - * Initializes a new instance of the TaskUpdateParameters class. - * @constructor * The parameters for updating a task. - * - * @member {string} [status] The current status of task. Possible values - * include: 'Disabled', 'Enabled' - * @member {object} [platform] The platform properties against which the run - * has to happen. - * @member {string} [platform.os] The operating system type required for the - * run. Possible values include: 'Windows', 'Linux' - * @member {string} [platform.architecture] The OS architecture. Possible - * values include: 'amd64', 'x86', 'arm' - * @member {string} [platform.variant] Variant of the CPU. Possible values - * include: 'v6', 'v7', 'v8' - * @member {object} [agentConfiguration] The machine configuration of the run - * agent. - * @member {number} [agentConfiguration.cpu] The CPU configuration in terms of - * number of cores required for the run. - * @member {number} [timeout] Run timeout in seconds. - * @member {object} [step] The properties for updating a task step. - * @member {string} [step.contextPath] The URL(absolute or relative) of the - * source context for the task step. - * @member {string} [step.contextAccessToken] The token (git PAT or SAS token - * of storage account blob) associated with the context for a step. - * @member {string} [step.type] Polymorphic Discriminator - * @member {object} [trigger] The properties for updating trigger properties. - * @member {array} [trigger.sourceTriggers] The collection of triggers based on - * source code repository. - * @member {object} [trigger.baseImageTrigger] The trigger based on base image - * dependencies. - * @member {string} [trigger.baseImageTrigger.baseImageTriggerType] The type of - * the auto trigger for base image dependency updates. Possible values include: - * 'All', 'Runtime' - * @member {string} [trigger.baseImageTrigger.status] The current status of - * trigger. Possible values include: 'Disabled', 'Enabled' - * @member {string} [trigger.baseImageTrigger.name] The name of the trigger. - * @member {object} [tags] The ARM resource tags. - */ +*/ export interface TaskUpdateParameters { + /** + * The current status of task. Possible values include: 'Disabled', 'Enabled' + */ status?: string; + /** + * The platform properties against which the run has to happen. + */ platform?: PlatformUpdateParameters; + /** + * The machine configuration of the run agent. + */ agentConfiguration?: AgentProperties; + /** + * Run timeout in seconds. + */ timeout?: number; + /** + * The properties for updating a task step. + */ step?: TaskStepUpdateParameters; + /** + * The properties for updating trigger properties. + */ trigger?: TriggerUpdateParameters; + /** + * The ARM resource tags. + */ tags?: { [propertyName: string]: string }; } /** - * @class - * Initializes a new instance of the Argument class. - * @constructor * The properties of a run argument. - * - * @member {string} name The name of the argument. - * @member {string} value The value of the argument. - * @member {boolean} [isSecret] Flag to indicate whether the argument - * represents a secret and want to be removed from build logs. Default value: - * false . - */ +*/ export interface Argument { + /** + * The name of the argument. + */ name: string; + /** + * The value of the argument. + */ value: string; + /** + * Flag to indicate whether the argument represents a secret and want to be removed from build + * logs. + */ isSecret?: boolean; } /** - * @class - * Initializes a new instance of the DockerBuildRequest class. - * @constructor * The parameters for a docker quick build. - * - * @member {array} [imageNames] The fully qualified image names including the - * repository and tag. - * @member {boolean} [isPushEnabled] The value of this property indicates - * whether the image built should be pushed to the registry or not. Default - * value: true . - * @member {boolean} [noCache] The value of this property indicates whether the - * image cache is enabled or not. Default value: false . - * @member {string} dockerFilePath The Docker file path relative to the source - * location. - * @member {array} [argumentsProperty] The collection of override arguments to - * be used when executing the run. - * @member {number} [timeout] Run timeout in seconds. Default value: 3600 . - * @member {object} platform The platform properties against which the run has - * to happen. - * @member {string} [platform.os] The operating system type required for the - * run. Possible values include: 'Windows', 'Linux' - * @member {string} [platform.architecture] The OS architecture. Possible - * values include: 'amd64', 'x86', 'arm' - * @member {string} [platform.variant] Variant of the CPU. Possible values - * include: 'v6', 'v7', 'v8' - * @member {object} [agentConfiguration] The machine configuration of the run - * agent. - * @member {number} [agentConfiguration.cpu] The CPU configuration in terms of - * number of cores required for the run. - * @member {string} [sourceLocation] The URL(absolute or relative) of the - * source context. It can be an URL to a tar or git repoistory. - * If it is relative URL, the relative path should be obtained from calling - * listBuildSourceUploadUrl API. - */ +*/ export interface DockerBuildRequest extends RunRequest { + /** + * The fully qualified image names including the repository and tag. + */ imageNames?: string[]; + /** + * The value of this property indicates whether the image built should be pushed to the registry + * or not. + */ isPushEnabled?: boolean; + /** + * The value of this property indicates whether the image cache is enabled or not. + */ noCache?: boolean; + /** + * The Docker file path relative to the source location. + */ dockerFilePath: string; + /** + * The collection of override arguments to be used when executing the run. + */ argumentsProperty?: Argument[]; + /** + * Run timeout in seconds. + */ timeout?: number; + /** + * The platform properties against which the run has to happen. + */ platform: PlatformProperties; + /** + * The machine configuration of the run agent. + */ agentConfiguration?: AgentProperties; + /** + * The URL(absolute or relative) of the source context. It can be an URL to a tar or git + * repository. + * If it is relative URL, the relative path should be obtained from calling + * listBuildSourceUploadUrl API. + */ sourceLocation?: string; } /** - * @class - * Initializes a new instance of the SetValue class. - * @constructor * The properties of a overridable value that can be passed to a task template. - * - * @member {string} name The name of the overridable value. - * @member {string} value The overridable value. - * @member {boolean} [isSecret] Flag to indicate whether the value represents a - * secret or not. Default value: false . - */ +*/ export interface SetValue { + /** + * The name of the overridable value. + */ name: string; + /** + * The overridable value. + */ value: string; + /** + * Flag to indicate whether the value represents a secret or not. + */ isSecret?: boolean; } /** - * @class - * Initializes a new instance of the FileTaskRunRequest class. - * @constructor * The request parameters for a scheduling run against a task file. - * - * @member {string} taskFilePath The template/definition file path relative to - * the source. - * @member {string} [valuesFilePath] The values/parameters file path relative - * to the source. - * @member {array} [values] The collection of overridable values that can be - * passed when running a task. - * @member {number} [timeout] Run timeout in seconds. Default value: 3600 . - * @member {object} platform The platform properties against which the run has - * to happen. - * @member {string} [platform.os] The operating system type required for the - * run. Possible values include: 'Windows', 'Linux' - * @member {string} [platform.architecture] The OS architecture. Possible - * values include: 'amd64', 'x86', 'arm' - * @member {string} [platform.variant] Variant of the CPU. Possible values - * include: 'v6', 'v7', 'v8' - * @member {object} [agentConfiguration] The machine configuration of the run - * agent. - * @member {number} [agentConfiguration.cpu] The CPU configuration in terms of - * number of cores required for the run. - * @member {string} [sourceLocation] The URL(absolute or relative) of the - * source context. It can be an URL to a tar or git repoistory. - * If it is relative URL, the relative path should be obtained from calling - * listBuildSourceUploadUrl API. - */ +*/ export interface FileTaskRunRequest extends RunRequest { + /** + * The template/definition file path relative to the source. + */ taskFilePath: string; + /** + * The values/parameters file path relative to the source. + */ valuesFilePath?: string; + /** + * The collection of overridable values that can be passed when running a task. + */ values?: SetValue[]; + /** + * Run timeout in seconds. + */ timeout?: number; + /** + * The platform properties against which the run has to happen. + */ platform: PlatformProperties; + /** + * The machine configuration of the run agent. + */ agentConfiguration?: AgentProperties; + /** + * The URL(absolute or relative) of the source context. It can be an URL to a tar or git + * repository. + * If it is relative URL, the relative path should be obtained from calling + * listBuildSourceUploadUrl API. + */ sourceLocation?: string; } /** - * @class - * Initializes a new instance of the TaskRunRequest class. - * @constructor * The parameters for a task run request. - * - * @member {string} taskName The name of task against which run has to be - * queued. - * @member {array} [values] The collection of overridable values that can be - * passed when running a task. - */ +*/ export interface TaskRunRequest extends RunRequest { + /** + * The name of task against which run has to be queued. + */ taskName: string; + /** + * The collection of overridable values that can be passed when running a task. + */ values?: SetValue[]; } /** - * @class - * Initializes a new instance of the EncodedTaskRunRequest class. - * @constructor * The parameters for a quick task run request. - * - * @member {string} encodedTaskContent Base64 encoded value of the - * template/definition file content. - * @member {string} [encodedValuesContent] Base64 encoded value of the - * parameters/values file content. - * @member {array} [values] The collection of overridable values that can be - * passed when running a task. - * @member {number} [timeout] Run timeout in seconds. Default value: 3600 . - * @member {object} platform The platform properties against which the run has - * to happen. - * @member {string} [platform.os] The operating system type required for the - * run. Possible values include: 'Windows', 'Linux' - * @member {string} [platform.architecture] The OS architecture. Possible - * values include: 'amd64', 'x86', 'arm' - * @member {string} [platform.variant] Variant of the CPU. Possible values - * include: 'v6', 'v7', 'v8' - * @member {object} [agentConfiguration] The machine configuration of the run - * agent. - * @member {number} [agentConfiguration.cpu] The CPU configuration in terms of - * number of cores required for the run. - * @member {string} [sourceLocation] The URL(absolute or relative) of the - * source context. It can be an URL to a tar or git repoistory. - * If it is relative URL, the relative path should be obtained from calling - * listBuildSourceUploadUrl API. - */ +*/ export interface EncodedTaskRunRequest extends RunRequest { + /** + * Base64 encoded value of the template/definition file content. + */ encodedTaskContent: string; + /** + * Base64 encoded value of the parameters/values file content. + */ encodedValuesContent?: string; + /** + * The collection of overridable values that can be passed when running a task. + */ values?: SetValue[]; + /** + * Run timeout in seconds. + */ timeout?: number; + /** + * The platform properties against which the run has to happen. + */ platform: PlatformProperties; + /** + * The machine configuration of the run agent. + */ agentConfiguration?: AgentProperties; + /** + * The URL(absolute or relative) of the source context. It can be an URL to a tar or git + * repository. + * If it is relative URL, the relative path should be obtained from calling + * listBuildSourceUploadUrl API. + */ sourceLocation?: string; } /** - * @class - * Initializes a new instance of the DockerBuildStep class. - * @constructor * The Docker build step. - * - * @member {array} [imageNames] The fully qualified image names including the - * repository and tag. - * @member {boolean} [isPushEnabled] The value of this property indicates - * whether the image built should be pushed to the registry or not. Default - * value: true . - * @member {boolean} [noCache] The value of this property indicates whether the - * image cache is enabled or not. Default value: false . - * @member {string} dockerFilePath The Docker file path relative to the source - * context. - * @member {array} [argumentsProperty] The collection of override arguments to - * be used when executing this build step. - */ +*/ export interface DockerBuildStep extends TaskStepProperties { + /** + * The fully qualified image names including the repository and tag. + */ imageNames?: string[]; + /** + * The value of this property indicates whether the image built should be pushed to the registry + * or not. + */ isPushEnabled?: boolean; + /** + * The value of this property indicates whether the image cache is enabled or not. + */ noCache?: boolean; + /** + * The Docker file path relative to the source context. + */ dockerFilePath: string; + /** + * The collection of override arguments to be used when executing this build step. + */ argumentsProperty?: Argument[]; } /** - * @class - * Initializes a new instance of the FileTaskStep class. - * @constructor * The properties of a task step. - * - * @member {string} taskFilePath The task template/definition file path - * relative to the source context. - * @member {string} [valuesFilePath] The task values/parameters file path - * relative to the source context. - * @member {array} [values] The collection of overridable values that can be - * passed when running a task. - */ +*/ export interface FileTaskStep extends TaskStepProperties { + /** + * The task template/definition file path relative to the source context. + */ taskFilePath: string; + /** + * The task values/parameters file path relative to the source context. + */ valuesFilePath?: string; + /** + * The collection of overridable values that can be passed when running a task. + */ values?: SetValue[]; } /** - * @class - * Initializes a new instance of the EncodedTaskStep class. - * @constructor * The properties of a encoded task step. - * - * @member {string} encodedTaskContent Base64 encoded value of the - * template/definition file content. - * @member {string} [encodedValuesContent] Base64 encoded value of the - * parameters/values file content. - * @member {array} [values] The collection of overridable values that can be - * passed when running a task. - */ +*/ export interface EncodedTaskStep extends TaskStepProperties { + /** + * Base64 encoded value of the template/definition file content. + */ encodedTaskContent: string; + /** + * Base64 encoded value of the parameters/values file content. + */ encodedValuesContent?: string; + /** + * The collection of overridable values that can be passed when running a task. + */ values?: SetValue[]; } /** - * @class - * Initializes a new instance of the DockerBuildStepUpdateParameters class. - * @constructor * The properties for updating a docker build step. - * - * @member {array} [imageNames] The fully qualified image names including the - * repository and tag. - * @member {boolean} [isPushEnabled] The value of this property indicates - * whether the image built should be pushed to the registry or not. - * @member {boolean} [noCache] The value of this property indicates whether the - * image cache is enabled or not. - * @member {string} [dockerFilePath] The Docker file path relative to the - * source context. - * @member {array} [argumentsProperty] The collection of override arguments to - * be used when executing this build step. - */ +*/ export interface DockerBuildStepUpdateParameters extends TaskStepUpdateParameters { + /** + * The fully qualified image names including the repository and tag. + */ imageNames?: string[]; + /** + * The value of this property indicates whether the image built should be pushed to the registry + * or not. + */ isPushEnabled?: boolean; + /** + * The value of this property indicates whether the image cache is enabled or not. + */ noCache?: boolean; + /** + * The Docker file path relative to the source context. + */ dockerFilePath?: string; + /** + * The collection of override arguments to be used when executing this build step. + */ argumentsProperty?: Argument[]; } /** - * @class - * Initializes a new instance of the FileTaskStepUpdateParameters class. - * @constructor * The properties of updating a task step. - * - * @member {string} [taskFilePath] The task template/definition file path - * relative to the source context. - * @member {string} [valuesFilePath] The values/parameters file path relative - * to the source context. - * @member {array} [values] The collection of overridable values that can be - * passed when running a task. - */ +*/ export interface FileTaskStepUpdateParameters extends TaskStepUpdateParameters { + /** + * The task template/definition file path relative to the source context. + */ taskFilePath?: string; + /** + * The values/parameters file path relative to the source context. + */ valuesFilePath?: string; + /** + * The collection of overridable values that can be passed when running a task. + */ values?: SetValue[]; } /** - * @class - * Initializes a new instance of the EncodedTaskStepUpdateParameters class. - * @constructor * The properties for updating encoded task step. - * - * @member {string} [encodedTaskContent] Base64 encoded value of the - * template/definition file content. - * @member {string} [encodedValuesContent] Base64 encoded value of the - * parameters/values file content. - * @member {array} [values] The collection of overridable values that can be - * passed when running a task. - */ +*/ export interface EncodedTaskStepUpdateParameters extends TaskStepUpdateParameters { + /** + * Base64 encoded value of the template/definition file content. + */ encodedTaskContent?: string; + /** + * Base64 encoded value of the parameters/values file content. + */ encodedValuesContent?: string; + /** + * The collection of overridable values that can be passed when running a task. + */ values?: SetValue[]; } - /** - * @class - * Initializes a new instance of the RegistryListResult class. - * @constructor * The result of a request to list container registries. - * - * @member {string} [nextLink] The URI that can be used to request the next - * list of container registries. - */ +*/ export interface RegistryListResult extends Array { + /** + * The URI that can be used to request the next list of container registries. + */ nextLink?: string; } /** - * @class - * Initializes a new instance of the OperationListResult class. - * @constructor * The result of a request to list container registry operations. - * - * @member {string} [nextLink] The URI that can be used to request the next - * list of container registry operations. - */ +*/ export interface OperationListResult extends Array { + /** + * The URI that can be used to request the next list of container registry operations. + */ nextLink?: string; } /** - * @class - * Initializes a new instance of the ReplicationListResult class. - * @constructor * The result of a request to list replications for a container registry. - * - * @member {string} [nextLink] The URI that can be used to request the next - * list of replications. - */ +*/ export interface ReplicationListResult extends Array { + /** + * The URI that can be used to request the next list of replications. + */ nextLink?: string; } /** - * @class - * Initializes a new instance of the WebhookListResult class. - * @constructor * The result of a request to list webhooks for a container registry. - * - * @member {string} [nextLink] The URI that can be used to request the next - * list of webhooks. - */ +*/ export interface WebhookListResult extends Array { + /** + * The URI that can be used to request the next list of webhooks. + */ nextLink?: string; } /** - * @class - * Initializes a new instance of the EventListResult class. - * @constructor * The result of a request to list events for a webhook. - * - * @member {string} [nextLink] The URI that can be used to request the next - * list of events. - */ +*/ export interface EventListResult extends Array { + /** + * The URI that can be used to request the next list of events. + */ nextLink?: string; } /** - * @class - * Initializes a new instance of the RunListResult class. - * @constructor * Collection of runs. - * - * @member {string} [nextLink] The URI that can be used to request the next set - * of paged results. - */ +*/ export interface RunListResult extends Array { + /** + * The URI that can be used to request the next set of paged results. + */ nextLink?: string; } /** - * @class - * Initializes a new instance of the TaskListResult class. - * @constructor * The collection of tasks. - * - * @member {string} [nextLink] The URI that can be used to request the next set - * of paged results. - */ +*/ export interface TaskListResult extends Array { + /** + * The URI that can be used to request the next set of paged results. + */ nextLink?: string; } diff --git a/lib/services/containerRegistryManagement/lib/models/index.js b/lib/services/containerRegistryManagement/lib/models/index.js index 5b0f4c8e2b..3cfb4545a7 100644 --- a/lib/services/containerRegistryManagement/lib/models/index.js +++ b/lib/services/containerRegistryManagement/lib/models/index.js @@ -30,6 +30,8 @@ exports.OperationDefinition = require('./operationDefinition'); exports.Sku = require('./sku'); exports.Status = require('./status'); exports.StorageAccountProperties = require('./storageAccountProperties'); +exports.VirtualNetworkRule = require('./virtualNetworkRule'); +exports.NetworkRuleSet = require('./networkRuleSet'); exports.Resource = require('./resource'); exports.Registry = require('./registry'); exports.RegistryUpdateParameters = require('./registryUpdateParameters'); diff --git a/lib/services/containerRegistryManagement/lib/models/networkRuleSet.js b/lib/services/containerRegistryManagement/lib/models/networkRuleSet.js new file mode 100644 index 0000000000..e857a6c438 --- /dev/null +++ b/lib/services/containerRegistryManagement/lib/models/networkRuleSet.js @@ -0,0 +1,71 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * The network rule set for a container registry. + * + */ +class NetworkRuleSet { + /** + * Create a NetworkRuleSet. + * @property {string} defaultAction The default action of allow or deny when + * no other rules match. Possible values include: 'Allow', 'Deny'. Default + * value: 'Allow' . + * @property {array} [virtualNetworkRules] The virtual network rules. + */ + constructor() { + } + + /** + * Defines the metadata of NetworkRuleSet + * + * @returns {object} metadata of NetworkRuleSet + * + */ + mapper() { + return { + required: false, + serializedName: 'NetworkRuleSet', + type: { + name: 'Composite', + className: 'NetworkRuleSet', + modelProperties: { + defaultAction: { + required: true, + serializedName: 'defaultAction', + defaultValue: 'Allow', + type: { + name: 'String' + } + }, + virtualNetworkRules: { + required: false, + serializedName: 'virtualNetworkRules', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'VirtualNetworkRuleElementType', + type: { + name: 'Composite', + className: 'VirtualNetworkRule' + } + } + } + } + } + } + }; + } +} + +module.exports = NetworkRuleSet; diff --git a/lib/services/containerRegistryManagement/lib/models/operationDefinition.js b/lib/services/containerRegistryManagement/lib/models/operationDefinition.js index e41849d0d2..94ca0ad21a 100644 --- a/lib/services/containerRegistryManagement/lib/models/operationDefinition.js +++ b/lib/services/containerRegistryManagement/lib/models/operationDefinition.js @@ -17,20 +17,23 @@ class OperationDefinition { /** * Create a OperationDefinition. - * @member {string} [origin] The origin information of the container registry - * operation. - * @member {string} [name] Operation name: {provider}/{resource}/{operation}. - * @member {object} [display] The display information for the container + * @property {string} [origin] The origin information of the container + * registry operation. + * @property {string} [name] Operation name: + * {provider}/{resource}/{operation}. + * @property {object} [display] The display information for the container * registry operation. - * @member {string} [display.provider] The resource provider name: + * @property {string} [display.provider] The resource provider name: * Microsoft.ContainerRegistry. - * @member {string} [display.resource] The resource on which the operation is - * performed. - * @member {string} [display.operation] The operation that users can perform. - * @member {string} [display.description] The description for the operation. - * @member {object} [serviceSpecification] The definition of Azure Monitoring - * service. - * @member {array} [serviceSpecification.metricSpecifications] A list of + * @property {string} [display.resource] The resource on which the operation + * is performed. + * @property {string} [display.operation] The operation that users can + * perform. + * @property {string} [display.description] The description for the + * operation. + * @property {object} [serviceSpecification] The definition of Azure + * Monitoring service. + * @property {array} [serviceSpecification.metricSpecifications] A list of * Azure Monitoring metrics definition. */ constructor() { diff --git a/lib/services/containerRegistryManagement/lib/models/operationDisplayDefinition.js b/lib/services/containerRegistryManagement/lib/models/operationDisplayDefinition.js index 2d31fa5146..fdd7d8f07e 100644 --- a/lib/services/containerRegistryManagement/lib/models/operationDisplayDefinition.js +++ b/lib/services/containerRegistryManagement/lib/models/operationDisplayDefinition.js @@ -17,12 +17,12 @@ class OperationDisplayDefinition { /** * Create a OperationDisplayDefinition. - * @member {string} [provider] The resource provider name: + * @property {string} [provider] The resource provider name: * Microsoft.ContainerRegistry. - * @member {string} [resource] The resource on which the operation is + * @property {string} [resource] The resource on which the operation is * performed. - * @member {string} [operation] The operation that users can perform. - * @member {string} [description] The description for the operation. + * @property {string} [operation] The operation that users can perform. + * @property {string} [description] The description for the operation. */ constructor() { } diff --git a/lib/services/containerRegistryManagement/lib/models/operationListResult.js b/lib/services/containerRegistryManagement/lib/models/operationListResult.js index e0abee0a71..58bd1c5ff7 100644 --- a/lib/services/containerRegistryManagement/lib/models/operationListResult.js +++ b/lib/services/containerRegistryManagement/lib/models/operationListResult.js @@ -16,7 +16,7 @@ class OperationListResult extends Array { /** * Create a OperationListResult. - * @member {string} [nextLink] The URI that can be used to request the next + * @property {string} [nextLink] The URI that can be used to request the next * list of container registry operations. */ constructor() { diff --git a/lib/services/containerRegistryManagement/lib/models/operationMetricSpecificationDefinition.js b/lib/services/containerRegistryManagement/lib/models/operationMetricSpecificationDefinition.js index 7b071e928f..dc4d9d4451 100644 --- a/lib/services/containerRegistryManagement/lib/models/operationMetricSpecificationDefinition.js +++ b/lib/services/containerRegistryManagement/lib/models/operationMetricSpecificationDefinition.js @@ -17,12 +17,12 @@ class OperationMetricSpecificationDefinition { /** * Create a OperationMetricSpecificationDefinition. - * @member {string} [name] Metric name. - * @member {string} [displayName] Metric display name. - * @member {string} [displayDescription] Metric description. - * @member {string} [unit] Metric unit. - * @member {string} [aggregationType] Metric aggregation type. - * @member {string} [internalMetricName] Internal metric name. + * @property {string} [name] Metric name. + * @property {string} [displayName] Metric display name. + * @property {string} [displayDescription] Metric description. + * @property {string} [unit] Metric unit. + * @property {string} [aggregationType] Metric aggregation type. + * @property {string} [internalMetricName] Internal metric name. */ constructor() { } diff --git a/lib/services/containerRegistryManagement/lib/models/operationServiceSpecificationDefinition.js b/lib/services/containerRegistryManagement/lib/models/operationServiceSpecificationDefinition.js index 0474a63311..eadf42c396 100644 --- a/lib/services/containerRegistryManagement/lib/models/operationServiceSpecificationDefinition.js +++ b/lib/services/containerRegistryManagement/lib/models/operationServiceSpecificationDefinition.js @@ -17,8 +17,8 @@ class OperationServiceSpecificationDefinition { /** * Create a OperationServiceSpecificationDefinition. - * @member {array} [metricSpecifications] A list of Azure Monitoring metrics - * definition. + * @property {array} [metricSpecifications] A list of Azure Monitoring + * metrics definition. */ constructor() { } diff --git a/lib/services/containerRegistryManagement/lib/models/platformProperties.js b/lib/services/containerRegistryManagement/lib/models/platformProperties.js index a3c90aba84..5ba2aa4687 100644 --- a/lib/services/containerRegistryManagement/lib/models/platformProperties.js +++ b/lib/services/containerRegistryManagement/lib/models/platformProperties.js @@ -17,11 +17,11 @@ class PlatformProperties { /** * Create a PlatformProperties. - * @member {string} os The operating system type required for the run. + * @property {string} os The operating system type required for the run. * Possible values include: 'Windows', 'Linux' - * @member {string} [architecture] The OS architecture. Possible values + * @property {string} [architecture] The OS architecture. Possible values * include: 'amd64', 'x86', 'arm' - * @member {string} [variant] Variant of the CPU. Possible values include: + * @property {string} [variant] Variant of the CPU. Possible values include: * 'v6', 'v7', 'v8' */ constructor() { diff --git a/lib/services/containerRegistryManagement/lib/models/platformUpdateParameters.js b/lib/services/containerRegistryManagement/lib/models/platformUpdateParameters.js index df811ebf64..4f0812a6d5 100644 --- a/lib/services/containerRegistryManagement/lib/models/platformUpdateParameters.js +++ b/lib/services/containerRegistryManagement/lib/models/platformUpdateParameters.js @@ -17,11 +17,11 @@ class PlatformUpdateParameters { /** * Create a PlatformUpdateParameters. - * @member {string} [os] The operating system type required for the run. + * @property {string} [os] The operating system type required for the run. * Possible values include: 'Windows', 'Linux' - * @member {string} [architecture] The OS architecture. Possible values + * @property {string} [architecture] The OS architecture. Possible values * include: 'amd64', 'x86', 'arm' - * @member {string} [variant] Variant of the CPU. Possible values include: + * @property {string} [variant] Variant of the CPU. Possible values include: * 'v6', 'v7', 'v8' */ constructor() { diff --git a/lib/services/containerRegistryManagement/lib/models/proxyResource.js b/lib/services/containerRegistryManagement/lib/models/proxyResource.js index 6bc01330b6..9cbfbab186 100644 --- a/lib/services/containerRegistryManagement/lib/models/proxyResource.js +++ b/lib/services/containerRegistryManagement/lib/models/proxyResource.js @@ -21,9 +21,9 @@ const models = require('./index'); class ProxyResource extends models['BaseResource'] { /** * Create a ProxyResource. - * @member {string} [id] The resource ID. - * @member {string} [name] The name of the resource. - * @member {string} [type] The type of the resource. + * @property {string} [id] The resource ID. + * @property {string} [name] The name of the resource. + * @property {string} [type] The type of the resource. */ constructor() { super(); diff --git a/lib/services/containerRegistryManagement/lib/models/quarantinePolicy.js b/lib/services/containerRegistryManagement/lib/models/quarantinePolicy.js index 1157c77a09..52775a8e3a 100644 --- a/lib/services/containerRegistryManagement/lib/models/quarantinePolicy.js +++ b/lib/services/containerRegistryManagement/lib/models/quarantinePolicy.js @@ -17,7 +17,7 @@ class QuarantinePolicy { /** * Create a QuarantinePolicy. - * @member {string} [status] The value that indicates whether the policy is + * @property {string} [status] The value that indicates whether the policy is * enabled or not. Possible values include: 'enabled', 'disabled' */ constructor() { diff --git a/lib/services/containerRegistryManagement/lib/models/regenerateCredentialParameters.js b/lib/services/containerRegistryManagement/lib/models/regenerateCredentialParameters.js index 1c774358fb..d054b7c8c8 100644 --- a/lib/services/containerRegistryManagement/lib/models/regenerateCredentialParameters.js +++ b/lib/services/containerRegistryManagement/lib/models/regenerateCredentialParameters.js @@ -17,7 +17,7 @@ class RegenerateCredentialParameters { /** * Create a RegenerateCredentialParameters. - * @member {string} name Specifies name of the password which should be + * @property {string} name Specifies name of the password which should be * regenerated -- password or password2. Possible values include: 'password', * 'password2' */ diff --git a/lib/services/containerRegistryManagement/lib/models/registry.js b/lib/services/containerRegistryManagement/lib/models/registry.js index 5cc411d10d..735d479846 100644 --- a/lib/services/containerRegistryManagement/lib/models/registry.js +++ b/lib/services/containerRegistryManagement/lib/models/registry.js @@ -20,33 +20,40 @@ const models = require('./index'); class Registry extends models['Resource'] { /** * Create a Registry. - * @member {object} sku The SKU of the container registry. - * @member {string} [sku.name] The SKU name of the container registry. + * @property {object} sku The SKU of the container registry. + * @property {string} [sku.name] The SKU name of the container registry. * Required for registry creation. Possible values include: 'Classic', * 'Basic', 'Standard', 'Premium' - * @member {string} [sku.tier] The SKU tier based on the SKU name. Possible + * @property {string} [sku.tier] The SKU tier based on the SKU name. Possible * values include: 'Classic', 'Basic', 'Standard', 'Premium' - * @member {string} [loginServer] The URL that can be used to log into the + * @property {string} [loginServer] The URL that can be used to log into the * container registry. - * @member {date} [creationDate] The creation date of the container registry - * in ISO8601 format. - * @member {string} [provisioningState] The provisioning state of the + * @property {date} [creationDate] The creation date of the container + * registry in ISO8601 format. + * @property {string} [provisioningState] The provisioning state of the * container registry at the time the operation was called. Possible values * include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', * 'Canceled' - * @member {object} [status] The status of the container registry at the time - * the operation was called. - * @member {string} [status.displayStatus] The short label for the status. - * @member {string} [status.message] The detailed message for the status, + * @property {object} [status] The status of the container registry at the + * time the operation was called. + * @property {string} [status.displayStatus] The short label for the status. + * @property {string} [status.message] The detailed message for the status, * including alerts and error messages. - * @member {date} [status.timestamp] The timestamp when the status was + * @property {date} [status.timestamp] The timestamp when the status was * changed to the current value. - * @member {boolean} [adminUserEnabled] The value that indicates whether the - * admin user is enabled. Default value: false . - * @member {object} [storageAccount] The properties of the storage account + * @property {boolean} [adminUserEnabled] The value that indicates whether + * the admin user is enabled. Default value: false . + * @property {object} [storageAccount] The properties of the storage account * for the container registry. Only applicable to Classic SKU. - * @member {string} [storageAccount.id] The resource ID of the storage + * @property {string} [storageAccount.id] The resource ID of the storage * account. + * @property {object} [networkRuleSet] The network rule set for a container + * registry. + * @property {string} [networkRuleSet.defaultAction] The default action of + * allow or deny when no other rules match. Possible values include: 'Allow', + * 'Deny' + * @property {array} [networkRuleSet.virtualNetworkRules] The virtual network + * rules. */ constructor() { super(); @@ -167,6 +174,14 @@ class Registry extends models['Resource'] { name: 'Composite', className: 'StorageAccountProperties' } + }, + networkRuleSet: { + required: false, + serializedName: 'properties.networkRuleSet', + type: { + name: 'Composite', + className: 'NetworkRuleSet' + } } } } diff --git a/lib/services/containerRegistryManagement/lib/models/registryListCredentialsResult.js b/lib/services/containerRegistryManagement/lib/models/registryListCredentialsResult.js index efc57692b8..b2ac6db70d 100644 --- a/lib/services/containerRegistryManagement/lib/models/registryListCredentialsResult.js +++ b/lib/services/containerRegistryManagement/lib/models/registryListCredentialsResult.js @@ -17,8 +17,8 @@ class RegistryListCredentialsResult { /** * Create a RegistryListCredentialsResult. - * @member {string} [username] The username for a container registry. - * @member {array} [passwords] The list of passwords for a container + * @property {string} [username] The username for a container registry. + * @property {array} [passwords] The list of passwords for a container * registry. */ constructor() { diff --git a/lib/services/containerRegistryManagement/lib/models/registryListResult.js b/lib/services/containerRegistryManagement/lib/models/registryListResult.js index 8c8cbb710e..5228659cf6 100644 --- a/lib/services/containerRegistryManagement/lib/models/registryListResult.js +++ b/lib/services/containerRegistryManagement/lib/models/registryListResult.js @@ -16,7 +16,7 @@ class RegistryListResult extends Array { /** * Create a RegistryListResult. - * @member {string} [nextLink] The URI that can be used to request the next + * @property {string} [nextLink] The URI that can be used to request the next * list of container registries. */ constructor() { diff --git a/lib/services/containerRegistryManagement/lib/models/registryNameCheckRequest.js b/lib/services/containerRegistryManagement/lib/models/registryNameCheckRequest.js index 043ebb19e1..2caeb8990f 100644 --- a/lib/services/containerRegistryManagement/lib/models/registryNameCheckRequest.js +++ b/lib/services/containerRegistryManagement/lib/models/registryNameCheckRequest.js @@ -17,7 +17,7 @@ class RegistryNameCheckRequest { /** * Create a RegistryNameCheckRequest. - * @member {string} name The name of the container registry. + * @property {string} name The name of the container registry. */ constructor() { } @@ -42,7 +42,7 @@ class RegistryNameCheckRequest { constraints: { MaxLength: 50, MinLength: 5, - Pattern: '^[a-zA-Z0-9]*$' + Pattern: /^[a-zA-Z0-9]*$/ }, type: { name: 'String' diff --git a/lib/services/containerRegistryManagement/lib/models/registryNameStatus.js b/lib/services/containerRegistryManagement/lib/models/registryNameStatus.js index 2b02ca7c49..317cc4dff2 100644 --- a/lib/services/containerRegistryManagement/lib/models/registryNameStatus.js +++ b/lib/services/containerRegistryManagement/lib/models/registryNameStatus.js @@ -18,11 +18,11 @@ class RegistryNameStatus { /** * Create a RegistryNameStatus. - * @member {boolean} [nameAvailable] The value that indicates whether the + * @property {boolean} [nameAvailable] The value that indicates whether the * name is available. - * @member {string} [reason] If any, the reason that the name is not + * @property {string} [reason] If any, the reason that the name is not * available. - * @member {string} [message] If any, the error message that provides more + * @property {string} [message] If any, the error message that provides more * detail for the reason that the name is not available. */ constructor() { diff --git a/lib/services/containerRegistryManagement/lib/models/registryPassword.js b/lib/services/containerRegistryManagement/lib/models/registryPassword.js index 4b999036f4..ee94f9371e 100644 --- a/lib/services/containerRegistryManagement/lib/models/registryPassword.js +++ b/lib/services/containerRegistryManagement/lib/models/registryPassword.js @@ -17,9 +17,9 @@ class RegistryPassword { /** * Create a RegistryPassword. - * @member {string} [name] The password name. Possible values include: + * @property {string} [name] The password name. Possible values include: * 'password', 'password2' - * @member {string} [value] The password value. + * @property {string} [value] The password value. */ constructor() { } diff --git a/lib/services/containerRegistryManagement/lib/models/registryPolicies.js b/lib/services/containerRegistryManagement/lib/models/registryPolicies.js index 5ad2aaa411..ab4ba6f9c0 100644 --- a/lib/services/containerRegistryManagement/lib/models/registryPolicies.js +++ b/lib/services/containerRegistryManagement/lib/models/registryPolicies.js @@ -17,17 +17,18 @@ class RegistryPolicies { /** * Create a RegistryPolicies. - * @member {object} [quarantinePolicy] An object that represents quarantine + * @property {object} [quarantinePolicy] An object that represents quarantine * policy for a container registry. - * @member {string} [quarantinePolicy.status] The value that indicates + * @property {string} [quarantinePolicy.status] The value that indicates * whether the policy is enabled or not. Possible values include: 'enabled', * 'disabled' - * @member {object} [trustPolicy] An object that represents content trust + * @property {object} [trustPolicy] An object that represents content trust * policy for a container registry. - * @member {string} [trustPolicy.type] The type of trust policy. Possible + * @property {string} [trustPolicy.type] The type of trust policy. Possible * values include: 'Notary' - * @member {string} [trustPolicy.status] The value that indicates whether the - * policy is enabled or not. Possible values include: 'enabled', 'disabled' + * @property {string} [trustPolicy.status] The value that indicates whether + * the policy is enabled or not. Possible values include: 'enabled', + * 'disabled' */ constructor() { } diff --git a/lib/services/containerRegistryManagement/lib/models/registryUpdateParameters.js b/lib/services/containerRegistryManagement/lib/models/registryUpdateParameters.js index 1b5b26a0e9..ce63b0530c 100644 --- a/lib/services/containerRegistryManagement/lib/models/registryUpdateParameters.js +++ b/lib/services/containerRegistryManagement/lib/models/registryUpdateParameters.js @@ -17,21 +17,28 @@ class RegistryUpdateParameters { /** * Create a RegistryUpdateParameters. - * @member {object} [tags] The tags for the container registry. - * @member {object} [sku] The SKU of the container registry. - * @member {string} [sku.name] The SKU name of the container registry. + * @property {object} [tags] The tags for the container registry. + * @property {object} [sku] The SKU of the container registry. + * @property {string} [sku.name] The SKU name of the container registry. * Required for registry creation. Possible values include: 'Classic', * 'Basic', 'Standard', 'Premium' - * @member {string} [sku.tier] The SKU tier based on the SKU name. Possible + * @property {string} [sku.tier] The SKU tier based on the SKU name. Possible * values include: 'Classic', 'Basic', 'Standard', 'Premium' - * @member {boolean} [adminUserEnabled] The value that indicates whether the - * admin user is enabled. - * @member {object} [storageAccount] The parameters of a storage account for - * the container registry. Only applicable to Classic SKU. If specified, the - * storage account must be in the same physical location as the container + * @property {boolean} [adminUserEnabled] The value that indicates whether + * the admin user is enabled. + * @property {object} [storageAccount] The parameters of a storage account + * for the container registry. Only applicable to Classic SKU. If specified, + * the storage account must be in the same physical location as the container * registry. - * @member {string} [storageAccount.id] The resource ID of the storage + * @property {string} [storageAccount.id] The resource ID of the storage * account. + * @property {object} [networkRuleSet] The network rule set for a container + * registry. + * @property {string} [networkRuleSet.defaultAction] The default action of + * allow or deny when no other rules match. Possible values include: 'Allow', + * 'Deny' + * @property {array} [networkRuleSet.virtualNetworkRules] The virtual network + * rules. */ constructor() { } @@ -86,6 +93,14 @@ class RegistryUpdateParameters { name: 'Composite', className: 'StorageAccountProperties' } + }, + networkRuleSet: { + required: false, + serializedName: 'properties.networkRuleSet', + type: { + name: 'Composite', + className: 'NetworkRuleSet' + } } } } diff --git a/lib/services/containerRegistryManagement/lib/models/registryUsage.js b/lib/services/containerRegistryManagement/lib/models/registryUsage.js index 5b4172726f..4825aedd8b 100644 --- a/lib/services/containerRegistryManagement/lib/models/registryUsage.js +++ b/lib/services/containerRegistryManagement/lib/models/registryUsage.js @@ -17,11 +17,11 @@ class RegistryUsage { /** * Create a RegistryUsage. - * @member {string} [name] The name of the usage. - * @member {number} [limit] The limit of the usage. - * @member {number} [currentValue] The current value of the usage. - * @member {string} [unit] The unit of measurement. Possible values include: - * 'Count', 'Bytes' + * @property {string} [name] The name of the usage. + * @property {number} [limit] The limit of the usage. + * @property {number} [currentValue] The current value of the usage. + * @property {string} [unit] The unit of measurement. Possible values + * include: 'Count', 'Bytes' */ constructor() { } diff --git a/lib/services/containerRegistryManagement/lib/models/registryUsageListResult.js b/lib/services/containerRegistryManagement/lib/models/registryUsageListResult.js index 7f8c8f829f..08a54960c9 100644 --- a/lib/services/containerRegistryManagement/lib/models/registryUsageListResult.js +++ b/lib/services/containerRegistryManagement/lib/models/registryUsageListResult.js @@ -17,7 +17,7 @@ class RegistryUsageListResult { /** * Create a RegistryUsageListResult. - * @member {array} [value] The list of container registry quota usages. + * @property {array} [value] The list of container registry quota usages. */ constructor() { } diff --git a/lib/services/containerRegistryManagement/lib/models/replication.js b/lib/services/containerRegistryManagement/lib/models/replication.js index be21b08fa7..5f81ca8169 100644 --- a/lib/services/containerRegistryManagement/lib/models/replication.js +++ b/lib/services/containerRegistryManagement/lib/models/replication.js @@ -20,15 +20,15 @@ const models = require('./index'); class Replication extends models['Resource'] { /** * Create a Replication. - * @member {string} [provisioningState] The provisioning state of the + * @property {string} [provisioningState] The provisioning state of the * replication at the time the operation was called. Possible values include: * 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' - * @member {object} [status] The status of the replication at the time the + * @property {object} [status] The status of the replication at the time the * operation was called. - * @member {string} [status.displayStatus] The short label for the status. - * @member {string} [status.message] The detailed message for the status, + * @property {string} [status.displayStatus] The short label for the status. + * @property {string} [status.message] The detailed message for the status, * including alerts and error messages. - * @member {date} [status.timestamp] The timestamp when the status was + * @property {date} [status.timestamp] The timestamp when the status was * changed to the current value. */ constructor() { diff --git a/lib/services/containerRegistryManagement/lib/models/replicationListResult.js b/lib/services/containerRegistryManagement/lib/models/replicationListResult.js index 49209165ec..d06675dc54 100644 --- a/lib/services/containerRegistryManagement/lib/models/replicationListResult.js +++ b/lib/services/containerRegistryManagement/lib/models/replicationListResult.js @@ -16,7 +16,7 @@ class ReplicationListResult extends Array { /** * Create a ReplicationListResult. - * @member {string} [nextLink] The URI that can be used to request the next + * @property {string} [nextLink] The URI that can be used to request the next * list of replications. */ constructor() { diff --git a/lib/services/containerRegistryManagement/lib/models/replicationUpdateParameters.js b/lib/services/containerRegistryManagement/lib/models/replicationUpdateParameters.js index ebc76e0dab..72ad5048f6 100644 --- a/lib/services/containerRegistryManagement/lib/models/replicationUpdateParameters.js +++ b/lib/services/containerRegistryManagement/lib/models/replicationUpdateParameters.js @@ -17,7 +17,7 @@ class ReplicationUpdateParameters { /** * Create a ReplicationUpdateParameters. - * @member {object} [tags] The tags for the replication. + * @property {object} [tags] The tags for the replication. */ constructor() { } diff --git a/lib/services/containerRegistryManagement/lib/models/request.js b/lib/services/containerRegistryManagement/lib/models/request.js index 0563d31203..db0c49e8e2 100644 --- a/lib/services/containerRegistryManagement/lib/models/request.js +++ b/lib/services/containerRegistryManagement/lib/models/request.js @@ -17,14 +17,15 @@ class Request { /** * Create a Request. - * @member {string} [id] The ID of the request that initiated the event. - * @member {string} [addr] The IP or hostname and possibly port of the client - * connection that initiated the event. This is the RemoteAddr from the - * standard http request. - * @member {string} [host] The externally accessible hostname of the registry - * instance, as specified by the http host header on incoming requests. - * @member {string} [method] The request method that generated the event. - * @member {string} [useragent] The user agent header of the request. + * @property {string} [id] The ID of the request that initiated the event. + * @property {string} [addr] The IP or hostname and possibly port of the + * client connection that initiated the event. This is the RemoteAddr from + * the standard http request. + * @property {string} [host] The externally accessible hostname of the + * registry instance, as specified by the http host header on incoming + * requests. + * @property {string} [method] The request method that generated the event. + * @property {string} [useragent] The user agent header of the request. */ constructor() { } diff --git a/lib/services/containerRegistryManagement/lib/models/resource.js b/lib/services/containerRegistryManagement/lib/models/resource.js index a8735b8e52..d76fa1783d 100644 --- a/lib/services/containerRegistryManagement/lib/models/resource.js +++ b/lib/services/containerRegistryManagement/lib/models/resource.js @@ -20,12 +20,12 @@ const models = require('./index'); class Resource extends models['BaseResource'] { /** * Create a Resource. - * @member {string} [id] The resource ID. - * @member {string} [name] The name of the resource. - * @member {string} [type] The type of the resource. - * @member {string} location The location of the resource. This cannot be + * @property {string} [id] The resource ID. + * @property {string} [name] The name of the resource. + * @property {string} [type] The type of the resource. + * @property {string} location The location of the resource. This cannot be * changed after the resource is created. - * @member {object} [tags] The tags of the resource. + * @property {object} [tags] The tags of the resource. */ constructor() { super(); diff --git a/lib/services/containerRegistryManagement/lib/models/run.js b/lib/services/containerRegistryManagement/lib/models/run.js index 8b8ad0f373..5fc4f78fa7 100644 --- a/lib/services/containerRegistryManagement/lib/models/run.js +++ b/lib/services/containerRegistryManagement/lib/models/run.js @@ -20,54 +20,56 @@ const models = require('./index'); class Run extends models['ProxyResource'] { /** * Create a Run. - * @member {string} [runId] The unique identifier for the run. - * @member {string} [status] The current status of the run. Possible values + * @property {string} [runId] The unique identifier for the run. + * @property {string} [status] The current status of the run. Possible values * include: 'Queued', 'Started', 'Running', 'Succeeded', 'Failed', * 'Canceled', 'Error', 'Timeout' - * @member {date} [lastUpdatedTime] The last updated time for the run. - * @member {string} [runType] The type of run. Possible values include: + * @property {date} [lastUpdatedTime] The last updated time for the run. + * @property {string} [runType] The type of run. Possible values include: * 'QuickBuild', 'QuickRun', 'AutoBuild', 'AutoRun' - * @member {date} [createTime] The time the run was scheduled. - * @member {date} [startTime] The time the run started. - * @member {date} [finishTime] The time the run finished. - * @member {array} [outputImages] The list of all images that were generated - * from the run. This is applicable if the run generates base image + * @property {date} [createTime] The time the run was scheduled. + * @property {date} [startTime] The time the run started. + * @property {date} [finishTime] The time the run finished. + * @property {array} [outputImages] The list of all images that were + * generated from the run. This is applicable if the run generates base image * dependencies. - * @member {string} [task] The task against which run was scheduled. - * @member {object} [imageUpdateTrigger] The image update trigger that caused - * the run. This is applicable if the task has base image trigger configured. - * @member {string} [imageUpdateTrigger.id] The unique ID of the trigger. - * @member {date} [imageUpdateTrigger.timestamp] The timestamp when the image - * update happened. - * @member {array} [imageUpdateTrigger.images] The list of image updates that - * caused the build. - * @member {object} [sourceTrigger] The source trigger that caused the run. - * @member {string} [sourceTrigger.id] The unique ID of the trigger. - * @member {string} [sourceTrigger.eventType] The event type of the trigger. - * @member {string} [sourceTrigger.commitId] The unique ID that identifies a - * commit. - * @member {string} [sourceTrigger.pullRequestId] The unique ID that + * @property {string} [task] The task against which run was scheduled. + * @property {object} [imageUpdateTrigger] The image update trigger that + * caused the run. This is applicable if the task has base image trigger + * configured. + * @property {string} [imageUpdateTrigger.id] The unique ID of the trigger. + * @property {date} [imageUpdateTrigger.timestamp] The timestamp when the + * image update happened. + * @property {array} [imageUpdateTrigger.images] The list of image updates + * that caused the build. + * @property {object} [sourceTrigger] The source trigger that caused the run. + * @property {string} [sourceTrigger.id] The unique ID of the trigger. + * @property {string} [sourceTrigger.eventType] The event type of the + * trigger. + * @property {string} [sourceTrigger.commitId] The unique ID that identifies + * a commit. + * @property {string} [sourceTrigger.pullRequestId] The unique ID that * identifies pull request. - * @member {string} [sourceTrigger.repositoryUrl] The repository URL. - * @member {string} [sourceTrigger.branchName] The branch name in the + * @property {string} [sourceTrigger.repositoryUrl] The repository URL. + * @property {string} [sourceTrigger.branchName] The branch name in the * repository. - * @member {string} [sourceTrigger.providerType] The source control provider - * type. - * @member {boolean} [isArchiveEnabled] The value that indicates whether + * @property {string} [sourceTrigger.providerType] The source control + * provider type. + * @property {boolean} [isArchiveEnabled] The value that indicates whether * archiving is enabled or not. Default value: false . - * @member {object} [platform] The platform properties against which the run - * will happen. - * @member {string} [platform.os] The operating system type required for the - * run. Possible values include: 'Windows', 'Linux' - * @member {string} [platform.architecture] The OS architecture. Possible + * @property {object} [platform] The platform properties against which the + * run will happen. + * @property {string} [platform.os] The operating system type required for + * the run. Possible values include: 'Windows', 'Linux' + * @property {string} [platform.architecture] The OS architecture. Possible * values include: 'amd64', 'x86', 'arm' - * @member {string} [platform.variant] Variant of the CPU. Possible values + * @property {string} [platform.variant] Variant of the CPU. Possible values * include: 'v6', 'v7', 'v8' - * @member {object} [agentConfiguration] The machine configuration of the run - * agent. - * @member {number} [agentConfiguration.cpu] The CPU configuration in terms + * @property {object} [agentConfiguration] The machine configuration of the + * run agent. + * @property {number} [agentConfiguration.cpu] The CPU configuration in terms * of number of cores required for the run. - * @member {string} [provisioningState] The provisioning state of a run. + * @property {string} [provisioningState] The provisioning state of a run. * Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', * 'Failed', 'Canceled' */ diff --git a/lib/services/containerRegistryManagement/lib/models/runFilter.js b/lib/services/containerRegistryManagement/lib/models/runFilter.js index 83b6528ccf..e69c4b02fc 100644 --- a/lib/services/containerRegistryManagement/lib/models/runFilter.js +++ b/lib/services/containerRegistryManagement/lib/models/runFilter.js @@ -17,22 +17,22 @@ class RunFilter { /** * Create a RunFilter. - * @member {string} [runId] The unique identifier for the run. - * @member {string} [runType] The type of run. Possible values include: + * @property {string} [runId] The unique identifier for the run. + * @property {string} [runType] The type of run. Possible values include: * 'QuickBuild', 'QuickRun', 'AutoBuild', 'AutoRun' - * @member {string} [status] The current status of the run. Possible values + * @property {string} [status] The current status of the run. Possible values * include: 'Queued', 'Started', 'Running', 'Succeeded', 'Failed', * 'Canceled', 'Error', 'Timeout' - * @member {date} [createTime] The create time for a run. - * @member {date} [finishTime] The time the run finished. - * @member {string} [outputImageManifests] The list of comma-separated image - * manifests that were generated from the run. This is applicable if the run - * is of + * @property {date} [createTime] The create time for a run. + * @property {date} [finishTime] The time the run finished. + * @property {string} [outputImageManifests] The list of comma-separated + * image manifests that were generated from the run. This is applicable if + * the run is of * build type. - * @member {boolean} [isArchiveEnabled] The value that indicates whether + * @property {boolean} [isArchiveEnabled] The value that indicates whether * archiving is enabled or not. - * @member {string} [taskName] The name of the task that the run corresponds - * to. + * @property {string} [taskName] The name of the task that the run + * corresponds to. */ constructor() { } diff --git a/lib/services/containerRegistryManagement/lib/models/runGetLogResult.js b/lib/services/containerRegistryManagement/lib/models/runGetLogResult.js index afe8df834e..f013546843 100644 --- a/lib/services/containerRegistryManagement/lib/models/runGetLogResult.js +++ b/lib/services/containerRegistryManagement/lib/models/runGetLogResult.js @@ -17,8 +17,8 @@ class RunGetLogResult { /** * Create a RunGetLogResult. - * @member {string} [logLink] The link to logs for a run on a azure container - * registry. + * @property {string} [logLink] The link to logs for a run on a azure + * container registry. */ constructor() { } diff --git a/lib/services/containerRegistryManagement/lib/models/runListResult.js b/lib/services/containerRegistryManagement/lib/models/runListResult.js index 6052c64db3..781b926ade 100644 --- a/lib/services/containerRegistryManagement/lib/models/runListResult.js +++ b/lib/services/containerRegistryManagement/lib/models/runListResult.js @@ -16,7 +16,7 @@ class RunListResult extends Array { /** * Create a RunListResult. - * @member {string} [nextLink] The URI that can be used to request the next + * @property {string} [nextLink] The URI that can be used to request the next * set of paged results. */ constructor() { diff --git a/lib/services/containerRegistryManagement/lib/models/runRequest.js b/lib/services/containerRegistryManagement/lib/models/runRequest.js index c5cb76253c..ba2f62395f 100644 --- a/lib/services/containerRegistryManagement/lib/models/runRequest.js +++ b/lib/services/containerRegistryManagement/lib/models/runRequest.js @@ -17,9 +17,9 @@ class RunRequest { /** * Create a RunRequest. - * @member {boolean} [isArchiveEnabled] The value that indicates whether + * @property {boolean} [isArchiveEnabled] The value that indicates whether * archiving is enabled for the run or not. Default value: false . - * @member {string} type Polymorphic Discriminator + * @property {string} type Polymorphic Discriminator */ constructor() { } diff --git a/lib/services/containerRegistryManagement/lib/models/runUpdateParameters.js b/lib/services/containerRegistryManagement/lib/models/runUpdateParameters.js index 1ebbe3fff1..07c71bddac 100644 --- a/lib/services/containerRegistryManagement/lib/models/runUpdateParameters.js +++ b/lib/services/containerRegistryManagement/lib/models/runUpdateParameters.js @@ -17,7 +17,7 @@ class RunUpdateParameters { /** * Create a RunUpdateParameters. - * @member {boolean} [isArchiveEnabled] The value that indicates whether + * @property {boolean} [isArchiveEnabled] The value that indicates whether * archiving is enabled or not. */ constructor() { diff --git a/lib/services/containerRegistryManagement/lib/models/setValue.js b/lib/services/containerRegistryManagement/lib/models/setValue.js index c0937b1aea..1d9ef87ccb 100644 --- a/lib/services/containerRegistryManagement/lib/models/setValue.js +++ b/lib/services/containerRegistryManagement/lib/models/setValue.js @@ -17,10 +17,10 @@ class SetValue { /** * Create a SetValue. - * @member {string} name The name of the overridable value. - * @member {string} value The overridable value. - * @member {boolean} [isSecret] Flag to indicate whether the value represents - * a secret or not. Default value: false . + * @property {string} name The name of the overridable value. + * @property {string} value The overridable value. + * @property {boolean} [isSecret] Flag to indicate whether the value + * represents a secret or not. Default value: false . */ constructor() { } diff --git a/lib/services/containerRegistryManagement/lib/models/sku.js b/lib/services/containerRegistryManagement/lib/models/sku.js index f3568e3ee1..a4cbe142f6 100644 --- a/lib/services/containerRegistryManagement/lib/models/sku.js +++ b/lib/services/containerRegistryManagement/lib/models/sku.js @@ -17,10 +17,10 @@ class Sku { /** * Create a Sku. - * @member {string} name The SKU name of the container registry. Required for - * registry creation. Possible values include: 'Classic', 'Basic', + * @property {string} name The SKU name of the container registry. Required + * for registry creation. Possible values include: 'Classic', 'Basic', * 'Standard', 'Premium' - * @member {string} [tier] The SKU tier based on the SKU name. Possible + * @property {string} [tier] The SKU tier based on the SKU name. Possible * values include: 'Classic', 'Basic', 'Standard', 'Premium' */ constructor() { diff --git a/lib/services/containerRegistryManagement/lib/models/source.js b/lib/services/containerRegistryManagement/lib/models/source.js index fdb3521d8b..f4f9b3c13b 100644 --- a/lib/services/containerRegistryManagement/lib/models/source.js +++ b/lib/services/containerRegistryManagement/lib/models/source.js @@ -18,10 +18,10 @@ class Source { /** * Create a Source. - * @member {string} [addr] The IP or hostname and the port of the registry + * @property {string} [addr] The IP or hostname and the port of the registry * node that generated the event. Generally, this will be resolved by * os.Hostname() along with the running port. - * @member {string} [instanceID] The running instance of an application. + * @property {string} [instanceID] The running instance of an application. * Changes after each restart. */ constructor() { diff --git a/lib/services/containerRegistryManagement/lib/models/sourceProperties.js b/lib/services/containerRegistryManagement/lib/models/sourceProperties.js index c78fcf34aa..d8e90cbbf3 100644 --- a/lib/services/containerRegistryManagement/lib/models/sourceProperties.js +++ b/lib/services/containerRegistryManagement/lib/models/sourceProperties.js @@ -17,22 +17,23 @@ class SourceProperties { /** * Create a SourceProperties. - * @member {string} sourceControlType The type of source control service. + * @property {string} sourceControlType The type of source control service. * Possible values include: 'Github', 'VisualStudioTeamService' - * @member {string} repositoryUrl The full URL to the source code respository - * @member {string} [branch] The branch name of the source code. - * @member {object} [sourceControlAuthProperties] The authorization + * @property {string} repositoryUrl The full URL to the source code + * repository + * @property {string} [branch] The branch name of the source code. + * @property {object} [sourceControlAuthProperties] The authorization * properties for accessing the source code repository and to set up * webhooks for notifications. - * @member {string} [sourceControlAuthProperties.tokenType] The type of Auth - * token. Possible values include: 'PAT', 'OAuth' - * @member {string} [sourceControlAuthProperties.token] The access token used - * to access the source control provider. - * @member {string} [sourceControlAuthProperties.refreshToken] The refresh + * @property {string} [sourceControlAuthProperties.tokenType] The type of + * Auth token. Possible values include: 'PAT', 'OAuth' + * @property {string} [sourceControlAuthProperties.token] The access token + * used to access the source control provider. + * @property {string} [sourceControlAuthProperties.refreshToken] The refresh * token used to refresh the access token. - * @member {string} [sourceControlAuthProperties.scope] The scope of the + * @property {string} [sourceControlAuthProperties.scope] The scope of the * access token. - * @member {number} [sourceControlAuthProperties.expiresIn] Time in seconds + * @property {number} [sourceControlAuthProperties.expiresIn] Time in seconds * that the token remains valid */ constructor() { diff --git a/lib/services/containerRegistryManagement/lib/models/sourceTrigger.js b/lib/services/containerRegistryManagement/lib/models/sourceTrigger.js index 1c7f8c9d0f..425b3134da 100644 --- a/lib/services/containerRegistryManagement/lib/models/sourceTrigger.js +++ b/lib/services/containerRegistryManagement/lib/models/sourceTrigger.js @@ -17,35 +17,37 @@ class SourceTrigger { /** * Create a SourceTrigger. - * @member {object} sourceRepository The properties that describes the + * @property {object} sourceRepository The properties that describes the * source(code) for the task. - * @member {string} [sourceRepository.sourceControlType] The type of source + * @property {string} [sourceRepository.sourceControlType] The type of source * control service. Possible values include: 'Github', * 'VisualStudioTeamService' - * @member {string} [sourceRepository.repositoryUrl] The full URL to the - * source code respository - * @member {string} [sourceRepository.branch] The branch name of the source + * @property {string} [sourceRepository.repositoryUrl] The full URL to the + * source code repository + * @property {string} [sourceRepository.branch] The branch name of the source * code. - * @member {object} [sourceRepository.sourceControlAuthProperties] The + * @property {object} [sourceRepository.sourceControlAuthProperties] The * authorization properties for accessing the source code repository and to * set up * webhooks for notifications. - * @member {string} [sourceRepository.sourceControlAuthProperties.tokenType] - * The type of Auth token. Possible values include: 'PAT', 'OAuth' - * @member {string} [sourceRepository.sourceControlAuthProperties.token] The - * access token used to access the source control provider. - * @member {string} + * @property {string} + * [sourceRepository.sourceControlAuthProperties.tokenType] The type of Auth + * token. Possible values include: 'PAT', 'OAuth' + * @property {string} [sourceRepository.sourceControlAuthProperties.token] + * The access token used to access the source control provider. + * @property {string} * [sourceRepository.sourceControlAuthProperties.refreshToken] The refresh * token used to refresh the access token. - * @member {string} [sourceRepository.sourceControlAuthProperties.scope] The - * scope of the access token. - * @member {number} [sourceRepository.sourceControlAuthProperties.expiresIn] - * Time in seconds that the token remains valid - * @member {array} sourceTriggerEvents The source event corresponding to the - * trigger. - * @member {string} [status] The current status of trigger. Possible values + * @property {string} [sourceRepository.sourceControlAuthProperties.scope] + * The scope of the access token. + * @property {number} + * [sourceRepository.sourceControlAuthProperties.expiresIn] Time in seconds + * that the token remains valid + * @property {array} sourceTriggerEvents The source event corresponding to + * the trigger. + * @property {string} [status] The current status of trigger. Possible values * include: 'Disabled', 'Enabled' - * @member {string} name The name of the trigger. + * @property {string} name The name of the trigger. */ constructor() { } diff --git a/lib/services/containerRegistryManagement/lib/models/sourceTriggerDescriptor.js b/lib/services/containerRegistryManagement/lib/models/sourceTriggerDescriptor.js index 6bf83c3d08..7cf83f3c50 100644 --- a/lib/services/containerRegistryManagement/lib/models/sourceTriggerDescriptor.js +++ b/lib/services/containerRegistryManagement/lib/models/sourceTriggerDescriptor.js @@ -17,14 +17,14 @@ class SourceTriggerDescriptor { /** * Create a SourceTriggerDescriptor. - * @member {string} [id] The unique ID of the trigger. - * @member {string} [eventType] The event type of the trigger. - * @member {string} [commitId] The unique ID that identifies a commit. - * @member {string} [pullRequestId] The unique ID that identifies pull + * @property {string} [id] The unique ID of the trigger. + * @property {string} [eventType] The event type of the trigger. + * @property {string} [commitId] The unique ID that identifies a commit. + * @property {string} [pullRequestId] The unique ID that identifies pull * request. - * @member {string} [repositoryUrl] The repository URL. - * @member {string} [branchName] The branch name in the repository. - * @member {string} [providerType] The source control provider type. + * @property {string} [repositoryUrl] The repository URL. + * @property {string} [branchName] The branch name in the repository. + * @property {string} [providerType] The source control provider type. */ constructor() { } diff --git a/lib/services/containerRegistryManagement/lib/models/sourceTriggerUpdateParameters.js b/lib/services/containerRegistryManagement/lib/models/sourceTriggerUpdateParameters.js index b7bb10a97c..a50ef920e6 100644 --- a/lib/services/containerRegistryManagement/lib/models/sourceTriggerUpdateParameters.js +++ b/lib/services/containerRegistryManagement/lib/models/sourceTriggerUpdateParameters.js @@ -17,35 +17,37 @@ class SourceTriggerUpdateParameters { /** * Create a SourceTriggerUpdateParameters. - * @member {object} [sourceRepository] The properties that describes the + * @property {object} [sourceRepository] The properties that describes the * source(code) for the task. - * @member {string} [sourceRepository.sourceControlType] The type of source + * @property {string} [sourceRepository.sourceControlType] The type of source * control service. Possible values include: 'Github', * 'VisualStudioTeamService' - * @member {string} [sourceRepository.repositoryUrl] The full URL to the - * source code respository - * @member {string} [sourceRepository.branch] The branch name of the source + * @property {string} [sourceRepository.repositoryUrl] The full URL to the + * source code repository + * @property {string} [sourceRepository.branch] The branch name of the source * code. - * @member {object} [sourceRepository.sourceControlAuthProperties] The + * @property {object} [sourceRepository.sourceControlAuthProperties] The * authorization properties for accessing the source code repository and to * set up * webhooks for notifications. - * @member {string} [sourceRepository.sourceControlAuthProperties.tokenType] - * The type of Auth token. Possible values include: 'PAT', 'OAuth' - * @member {string} [sourceRepository.sourceControlAuthProperties.token] The - * access token used to access the source control provider. - * @member {string} + * @property {string} + * [sourceRepository.sourceControlAuthProperties.tokenType] The type of Auth + * token. Possible values include: 'PAT', 'OAuth' + * @property {string} [sourceRepository.sourceControlAuthProperties.token] + * The access token used to access the source control provider. + * @property {string} * [sourceRepository.sourceControlAuthProperties.refreshToken] The refresh * token used to refresh the access token. - * @member {string} [sourceRepository.sourceControlAuthProperties.scope] The - * scope of the access token. - * @member {number} [sourceRepository.sourceControlAuthProperties.expiresIn] - * Time in seconds that the token remains valid - * @member {array} [sourceTriggerEvents] The source event corresponding to + * @property {string} [sourceRepository.sourceControlAuthProperties.scope] + * The scope of the access token. + * @property {number} + * [sourceRepository.sourceControlAuthProperties.expiresIn] Time in seconds + * that the token remains valid + * @property {array} [sourceTriggerEvents] The source event corresponding to * the trigger. - * @member {string} [status] The current status of trigger. Possible values + * @property {string} [status] The current status of trigger. Possible values * include: 'Disabled', 'Enabled' - * @member {string} name The name of the trigger. + * @property {string} name The name of the trigger. */ constructor() { } diff --git a/lib/services/containerRegistryManagement/lib/models/sourceUpdateParameters.js b/lib/services/containerRegistryManagement/lib/models/sourceUpdateParameters.js index 3c748030e1..7fa1ca0567 100644 --- a/lib/services/containerRegistryManagement/lib/models/sourceUpdateParameters.js +++ b/lib/services/containerRegistryManagement/lib/models/sourceUpdateParameters.js @@ -17,23 +17,23 @@ class SourceUpdateParameters { /** * Create a SourceUpdateParameters. - * @member {string} [sourceControlType] The type of source control service. + * @property {string} [sourceControlType] The type of source control service. * Possible values include: 'Github', 'VisualStudioTeamService' - * @member {string} [repositoryUrl] The full URL to the source code - * respository - * @member {string} [branch] The branch name of the source code. - * @member {object} [sourceControlAuthProperties] The authorization + * @property {string} [repositoryUrl] The full URL to the source code + * repository + * @property {string} [branch] The branch name of the source code. + * @property {object} [sourceControlAuthProperties] The authorization * properties for accessing the source code repository and to set up * webhooks for notifications. - * @member {string} [sourceControlAuthProperties.tokenType] The type of Auth - * token. Possible values include: 'PAT', 'OAuth' - * @member {string} [sourceControlAuthProperties.token] The access token used - * to access the source control provider. - * @member {string} [sourceControlAuthProperties.refreshToken] The refresh + * @property {string} [sourceControlAuthProperties.tokenType] The type of + * Auth token. Possible values include: 'PAT', 'OAuth' + * @property {string} [sourceControlAuthProperties.token] The access token + * used to access the source control provider. + * @property {string} [sourceControlAuthProperties.refreshToken] The refresh * token used to refresh the access token. - * @member {string} [sourceControlAuthProperties.scope] The scope of the + * @property {string} [sourceControlAuthProperties.scope] The scope of the * access token. - * @member {number} [sourceControlAuthProperties.expiresIn] Time in seconds + * @property {number} [sourceControlAuthProperties.expiresIn] Time in seconds * that the token remains valid */ constructor() { diff --git a/lib/services/containerRegistryManagement/lib/models/sourceUploadDefinition.js b/lib/services/containerRegistryManagement/lib/models/sourceUploadDefinition.js index 8d802bc172..2bb3e0e627 100644 --- a/lib/services/containerRegistryManagement/lib/models/sourceUploadDefinition.js +++ b/lib/services/containerRegistryManagement/lib/models/sourceUploadDefinition.js @@ -17,9 +17,9 @@ class SourceUploadDefinition { /** * Create a SourceUploadDefinition. - * @member {string} [uploadUrl] The URL where the client can upload the + * @property {string} [uploadUrl] The URL where the client can upload the * source. - * @member {string} [relativePath] The relative path to the source. This is + * @property {string} [relativePath] The relative path to the source. This is * used to submit the subsequent queue build request. */ constructor() { diff --git a/lib/services/containerRegistryManagement/lib/models/status.js b/lib/services/containerRegistryManagement/lib/models/status.js index 1d98fafb26..6697ccbf7b 100644 --- a/lib/services/containerRegistryManagement/lib/models/status.js +++ b/lib/services/containerRegistryManagement/lib/models/status.js @@ -17,10 +17,10 @@ class Status { /** * Create a Status. - * @member {string} [displayStatus] The short label for the status. - * @member {string} [message] The detailed message for the status, including - * alerts and error messages. - * @member {date} [timestamp] The timestamp when the status was changed to + * @property {string} [displayStatus] The short label for the status. + * @property {string} [message] The detailed message for the status, + * including alerts and error messages. + * @property {date} [timestamp] The timestamp when the status was changed to * the current value. */ constructor() { diff --git a/lib/services/containerRegistryManagement/lib/models/storageAccountProperties.js b/lib/services/containerRegistryManagement/lib/models/storageAccountProperties.js index b1cb9dde69..e00b7697a2 100644 --- a/lib/services/containerRegistryManagement/lib/models/storageAccountProperties.js +++ b/lib/services/containerRegistryManagement/lib/models/storageAccountProperties.js @@ -18,7 +18,7 @@ class StorageAccountProperties { /** * Create a StorageAccountProperties. - * @member {string} id The resource ID of the storage account. + * @property {string} id The resource ID of the storage account. */ constructor() { } diff --git a/lib/services/containerRegistryManagement/lib/models/target.js b/lib/services/containerRegistryManagement/lib/models/target.js index 7ffed4f85a..f666425388 100644 --- a/lib/services/containerRegistryManagement/lib/models/target.js +++ b/lib/services/containerRegistryManagement/lib/models/target.js @@ -17,16 +17,16 @@ class Target { /** * Create a Target. - * @member {string} [mediaType] The MIME type of the referenced object. - * @member {number} [size] The number of bytes of the content. Same as Length - * field. - * @member {string} [digest] The digest of the content, as defined by the + * @property {string} [mediaType] The MIME type of the referenced object. + * @property {number} [size] The number of bytes of the content. Same as + * Length field. + * @property {string} [digest] The digest of the content, as defined by the * Registry V2 HTTP API Specification. - * @member {number} [length] The number of bytes of the content. Same as Size - * field. - * @member {string} [repository] The repository name. - * @member {string} [url] The direct URL to the content. - * @member {string} [tag] The tag name. + * @property {number} [length] The number of bytes of the content. Same as + * Size field. + * @property {string} [repository] The repository name. + * @property {string} [url] The direct URL to the content. + * @property {string} [tag] The tag name. */ constructor() { } diff --git a/lib/services/containerRegistryManagement/lib/models/task.js b/lib/services/containerRegistryManagement/lib/models/task.js index b1046d27bc..8e2af15744 100644 --- a/lib/services/containerRegistryManagement/lib/models/task.js +++ b/lib/services/containerRegistryManagement/lib/models/task.js @@ -14,52 +14,53 @@ const models = require('./index'); /** * The task that has the ARM resource and task properties. - * The task will have all information to schedule a run against it. + * The task will have all information to schedule a run against it. * * @extends models['Resource'] */ class Task extends models['Resource'] { /** * Create a Task. - * @member {string} [provisioningState] The provisioning state of the task. + * @property {string} [provisioningState] The provisioning state of the task. * Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', * 'Failed', 'Canceled' - * @member {date} [creationDate] The creation date of task. - * @member {string} [status] The current status of task. Possible values + * @property {date} [creationDate] The creation date of task. + * @property {string} [status] The current status of task. Possible values * include: 'Disabled', 'Enabled' - * @member {object} platform The platform properties against which the run + * @property {object} platform The platform properties against which the run * has to happen. - * @member {string} [platform.os] The operating system type required for the - * run. Possible values include: 'Windows', 'Linux' - * @member {string} [platform.architecture] The OS architecture. Possible + * @property {string} [platform.os] The operating system type required for + * the run. Possible values include: 'Windows', 'Linux' + * @property {string} [platform.architecture] The OS architecture. Possible * values include: 'amd64', 'x86', 'arm' - * @member {string} [platform.variant] Variant of the CPU. Possible values + * @property {string} [platform.variant] Variant of the CPU. Possible values * include: 'v6', 'v7', 'v8' - * @member {object} [agentConfiguration] The machine configuration of the run - * agent. - * @member {number} [agentConfiguration.cpu] The CPU configuration in terms + * @property {object} [agentConfiguration] The machine configuration of the + * run agent. + * @property {number} [agentConfiguration.cpu] The CPU configuration in terms * of number of cores required for the run. - * @member {number} [timeout] Run timeout in seconds. Default value: 3600 . - * @member {object} step The properties of a task step. - * @member {array} [step.baseImageDependencies] List of base image + * @property {number} [timeout] Run timeout in seconds. Default value: 3600 . + * @property {object} step The properties of a task step. + * @property {array} [step.baseImageDependencies] List of base image * dependencies for a step. - * @member {string} [step.contextPath] The URL(absolute or relative) of the + * @property {string} [step.contextPath] The URL(absolute or relative) of the * source context for the task step. - * @member {string} [step.contextAccessToken] The token (git PAT or SAS token - * of storage account blob) associated with the context for a step. - * @member {string} [step.type] Polymorphic Discriminator - * @member {object} [trigger] The properties that describe all triggers for + * @property {string} [step.contextAccessToken] The token (git PAT or SAS + * token of storage account blob) associated with the context for a step. + * @property {string} [step.type] Polymorphic Discriminator + * @property {object} [trigger] The properties that describe all triggers for * the task. - * @member {array} [trigger.sourceTriggers] The collection of triggers based - * on source code repository. - * @member {object} [trigger.baseImageTrigger] The trigger based on base + * @property {array} [trigger.sourceTriggers] The collection of triggers + * based on source code repository. + * @property {object} [trigger.baseImageTrigger] The trigger based on base * image dependencies. - * @member {string} [trigger.baseImageTrigger.baseImageTriggerType] The type - * of the auto trigger for base image dependency updates. Possible values - * include: 'All', 'Runtime' - * @member {string} [trigger.baseImageTrigger.status] The current status of + * @property {string} [trigger.baseImageTrigger.baseImageTriggerType] The + * type of the auto trigger for base image dependency updates. Possible + * values include: 'All', 'Runtime' + * @property {string} [trigger.baseImageTrigger.status] The current status of * trigger. Possible values include: 'Disabled', 'Enabled' - * @member {string} [trigger.baseImageTrigger.name] The name of the trigger. + * @property {string} [trigger.baseImageTrigger.name] The name of the + * trigger. */ constructor() { super(); diff --git a/lib/services/containerRegistryManagement/lib/models/taskListResult.js b/lib/services/containerRegistryManagement/lib/models/taskListResult.js index 3b5f4ac383..e05b2f2077 100644 --- a/lib/services/containerRegistryManagement/lib/models/taskListResult.js +++ b/lib/services/containerRegistryManagement/lib/models/taskListResult.js @@ -16,7 +16,7 @@ class TaskListResult extends Array { /** * Create a TaskListResult. - * @member {string} [nextLink] The URI that can be used to request the next + * @property {string} [nextLink] The URI that can be used to request the next * set of paged results. */ constructor() { diff --git a/lib/services/containerRegistryManagement/lib/models/taskRunRequest.js b/lib/services/containerRegistryManagement/lib/models/taskRunRequest.js index 0d65fa1d5f..fcb72dd48c 100644 --- a/lib/services/containerRegistryManagement/lib/models/taskRunRequest.js +++ b/lib/services/containerRegistryManagement/lib/models/taskRunRequest.js @@ -20,10 +20,10 @@ const models = require('./index'); class TaskRunRequest extends models['RunRequest'] { /** * Create a TaskRunRequest. - * @member {string} taskName The name of task against which run has to be + * @property {string} taskName The name of task against which run has to be * queued. - * @member {array} [values] The collection of overridable values that can be - * passed when running a task. + * @property {array} [values] The collection of overridable values that can + * be passed when running a task. */ constructor() { super(); diff --git a/lib/services/containerRegistryManagement/lib/models/taskStepProperties.js b/lib/services/containerRegistryManagement/lib/models/taskStepProperties.js index 7b735a06db..86d6ce7151 100644 --- a/lib/services/containerRegistryManagement/lib/models/taskStepProperties.js +++ b/lib/services/containerRegistryManagement/lib/models/taskStepProperties.js @@ -17,13 +17,13 @@ class TaskStepProperties { /** * Create a TaskStepProperties. - * @member {array} [baseImageDependencies] List of base image dependencies + * @property {array} [baseImageDependencies] List of base image dependencies * for a step. - * @member {string} [contextPath] The URL(absolute or relative) of the source - * context for the task step. - * @member {string} [contextAccessToken] The token (git PAT or SAS token of + * @property {string} [contextPath] The URL(absolute or relative) of the + * source context for the task step. + * @property {string} [contextAccessToken] The token (git PAT or SAS token of * storage account blob) associated with the context for a step. - * @member {string} type Polymorphic Discriminator + * @property {string} type Polymorphic Discriminator */ constructor() { } diff --git a/lib/services/containerRegistryManagement/lib/models/taskStepUpdateParameters.js b/lib/services/containerRegistryManagement/lib/models/taskStepUpdateParameters.js index 9f65840c63..eae77591ea 100644 --- a/lib/services/containerRegistryManagement/lib/models/taskStepUpdateParameters.js +++ b/lib/services/containerRegistryManagement/lib/models/taskStepUpdateParameters.js @@ -17,11 +17,11 @@ class TaskStepUpdateParameters { /** * Create a TaskStepUpdateParameters. - * @member {string} [contextPath] The URL(absolute or relative) of the source - * context for the task step. - * @member {string} [contextAccessToken] The token (git PAT or SAS token of + * @property {string} [contextPath] The URL(absolute or relative) of the + * source context for the task step. + * @property {string} [contextAccessToken] The token (git PAT or SAS token of * storage account blob) associated with the context for a step. - * @member {string} type Polymorphic Discriminator + * @property {string} type Polymorphic Discriminator */ constructor() { } diff --git a/lib/services/containerRegistryManagement/lib/models/taskUpdateParameters.js b/lib/services/containerRegistryManagement/lib/models/taskUpdateParameters.js index ceca37cbb6..489b049d90 100644 --- a/lib/services/containerRegistryManagement/lib/models/taskUpdateParameters.js +++ b/lib/services/containerRegistryManagement/lib/models/taskUpdateParameters.js @@ -17,39 +17,41 @@ class TaskUpdateParameters { /** * Create a TaskUpdateParameters. - * @member {string} [status] The current status of task. Possible values + * @property {string} [status] The current status of task. Possible values * include: 'Disabled', 'Enabled' - * @member {object} [platform] The platform properties against which the run - * has to happen. - * @member {string} [platform.os] The operating system type required for the - * run. Possible values include: 'Windows', 'Linux' - * @member {string} [platform.architecture] The OS architecture. Possible + * @property {object} [platform] The platform properties against which the + * run has to happen. + * @property {string} [platform.os] The operating system type required for + * the run. Possible values include: 'Windows', 'Linux' + * @property {string} [platform.architecture] The OS architecture. Possible * values include: 'amd64', 'x86', 'arm' - * @member {string} [platform.variant] Variant of the CPU. Possible values + * @property {string} [platform.variant] Variant of the CPU. Possible values * include: 'v6', 'v7', 'v8' - * @member {object} [agentConfiguration] The machine configuration of the run - * agent. - * @member {number} [agentConfiguration.cpu] The CPU configuration in terms + * @property {object} [agentConfiguration] The machine configuration of the + * run agent. + * @property {number} [agentConfiguration.cpu] The CPU configuration in terms * of number of cores required for the run. - * @member {number} [timeout] Run timeout in seconds. - * @member {object} [step] The properties for updating a task step. - * @member {string} [step.contextPath] The URL(absolute or relative) of the + * @property {number} [timeout] Run timeout in seconds. + * @property {object} [step] The properties for updating a task step. + * @property {string} [step.contextPath] The URL(absolute or relative) of the * source context for the task step. - * @member {string} [step.contextAccessToken] The token (git PAT or SAS token - * of storage account blob) associated with the context for a step. - * @member {string} [step.type] Polymorphic Discriminator - * @member {object} [trigger] The properties for updating trigger properties. - * @member {array} [trigger.sourceTriggers] The collection of triggers based - * on source code repository. - * @member {object} [trigger.baseImageTrigger] The trigger based on base + * @property {string} [step.contextAccessToken] The token (git PAT or SAS + * token of storage account blob) associated with the context for a step. + * @property {string} [step.type] Polymorphic Discriminator + * @property {object} [trigger] The properties for updating trigger + * properties. + * @property {array} [trigger.sourceTriggers] The collection of triggers + * based on source code repository. + * @property {object} [trigger.baseImageTrigger] The trigger based on base * image dependencies. - * @member {string} [trigger.baseImageTrigger.baseImageTriggerType] The type - * of the auto trigger for base image dependency updates. Possible values - * include: 'All', 'Runtime' - * @member {string} [trigger.baseImageTrigger.status] The current status of + * @property {string} [trigger.baseImageTrigger.baseImageTriggerType] The + * type of the auto trigger for base image dependency updates. Possible + * values include: 'All', 'Runtime' + * @property {string} [trigger.baseImageTrigger.status] The current status of * trigger. Possible values include: 'Disabled', 'Enabled' - * @member {string} [trigger.baseImageTrigger.name] The name of the trigger. - * @member {object} [tags] The ARM resource tags. + * @property {string} [trigger.baseImageTrigger.name] The name of the + * trigger. + * @property {object} [tags] The ARM resource tags. */ constructor() { } diff --git a/lib/services/containerRegistryManagement/lib/models/triggerProperties.js b/lib/services/containerRegistryManagement/lib/models/triggerProperties.js index 2753642f60..b7dd943a99 100644 --- a/lib/services/containerRegistryManagement/lib/models/triggerProperties.js +++ b/lib/services/containerRegistryManagement/lib/models/triggerProperties.js @@ -17,16 +17,16 @@ class TriggerProperties { /** * Create a TriggerProperties. - * @member {array} [sourceTriggers] The collection of triggers based on + * @property {array} [sourceTriggers] The collection of triggers based on * source code repository. - * @member {object} [baseImageTrigger] The trigger based on base image + * @property {object} [baseImageTrigger] The trigger based on base image * dependencies. - * @member {string} [baseImageTrigger.baseImageTriggerType] The type of the + * @property {string} [baseImageTrigger.baseImageTriggerType] The type of the * auto trigger for base image dependency updates. Possible values include: * 'All', 'Runtime' - * @member {string} [baseImageTrigger.status] The current status of trigger. - * Possible values include: 'Disabled', 'Enabled' - * @member {string} [baseImageTrigger.name] The name of the trigger. + * @property {string} [baseImageTrigger.status] The current status of + * trigger. Possible values include: 'Disabled', 'Enabled' + * @property {string} [baseImageTrigger.name] The name of the trigger. */ constructor() { } diff --git a/lib/services/containerRegistryManagement/lib/models/triggerUpdateParameters.js b/lib/services/containerRegistryManagement/lib/models/triggerUpdateParameters.js index f8d3b6e5b6..59a03ea3ac 100644 --- a/lib/services/containerRegistryManagement/lib/models/triggerUpdateParameters.js +++ b/lib/services/containerRegistryManagement/lib/models/triggerUpdateParameters.js @@ -17,16 +17,16 @@ class TriggerUpdateParameters { /** * Create a TriggerUpdateParameters. - * @member {array} [sourceTriggers] The collection of triggers based on + * @property {array} [sourceTriggers] The collection of triggers based on * source code repository. - * @member {object} [baseImageTrigger] The trigger based on base image + * @property {object} [baseImageTrigger] The trigger based on base image * dependencies. - * @member {string} [baseImageTrigger.baseImageTriggerType] The type of the + * @property {string} [baseImageTrigger.baseImageTriggerType] The type of the * auto trigger for base image dependency updates. Possible values include: * 'All', 'Runtime' - * @member {string} [baseImageTrigger.status] The current status of trigger. - * Possible values include: 'Disabled', 'Enabled' - * @member {string} [baseImageTrigger.name] The name of the trigger. + * @property {string} [baseImageTrigger.status] The current status of + * trigger. Possible values include: 'Disabled', 'Enabled' + * @property {string} [baseImageTrigger.name] The name of the trigger. */ constructor() { } diff --git a/lib/services/containerRegistryManagement/lib/models/trustPolicy.js b/lib/services/containerRegistryManagement/lib/models/trustPolicy.js index ceeff24eab..9af6dca7b0 100644 --- a/lib/services/containerRegistryManagement/lib/models/trustPolicy.js +++ b/lib/services/containerRegistryManagement/lib/models/trustPolicy.js @@ -17,9 +17,9 @@ class TrustPolicy { /** * Create a TrustPolicy. - * @member {string} [type] The type of trust policy. Possible values include: - * 'Notary' - * @member {string} [status] The value that indicates whether the policy is + * @property {string} [type] The type of trust policy. Possible values + * include: 'Notary' + * @property {string} [status] The value that indicates whether the policy is * enabled or not. Possible values include: 'enabled', 'disabled' */ constructor() { diff --git a/lib/services/containerRegistryManagement/lib/models/virtualNetworkRule.js b/lib/services/containerRegistryManagement/lib/models/virtualNetworkRule.js new file mode 100644 index 0000000000..d3b25400f0 --- /dev/null +++ b/lib/services/containerRegistryManagement/lib/models/virtualNetworkRule.js @@ -0,0 +1,53 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * The virtual network rule for a container registry. + * + */ +class VirtualNetworkRule { + /** + * Create a VirtualNetworkRule. + * @property {string} id Resource ID of a subnet, for example: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + */ + constructor() { + } + + /** + * Defines the metadata of VirtualNetworkRule + * + * @returns {object} metadata of VirtualNetworkRule + * + */ + mapper() { + return { + required: false, + serializedName: 'VirtualNetworkRule', + type: { + name: 'Composite', + className: 'VirtualNetworkRule', + modelProperties: { + id: { + required: true, + serializedName: 'id', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = VirtualNetworkRule; diff --git a/lib/services/containerRegistryManagement/lib/models/webhook.js b/lib/services/containerRegistryManagement/lib/models/webhook.js index c1b8c0801f..1d3a8dea2c 100644 --- a/lib/services/containerRegistryManagement/lib/models/webhook.js +++ b/lib/services/containerRegistryManagement/lib/models/webhook.js @@ -20,17 +20,17 @@ const models = require('./index'); class Webhook extends models['Resource'] { /** * Create a Webhook. - * @member {string} [status] The status of the webhook at the time the + * @property {string} [status] The status of the webhook at the time the * operation was called. Possible values include: 'enabled', 'disabled' - * @member {string} [scope] The scope of repositories where the event can be - * triggered. For example, 'foo:*' means events for all tags under repository - * 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to - * 'foo:latest'. Empty means all events. - * @member {array} actions The list of actions that trigger the webhook to + * @property {string} [scope] The scope of repositories where the event can + * be triggered. For example, 'foo:*' means events for all tags under + * repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is + * equivalent to 'foo:latest'. Empty means all events. + * @property {array} actions The list of actions that trigger the webhook to * post notifications. - * @member {string} [provisioningState] The provisioning state of the webhook - * at the time the operation was called. Possible values include: 'Creating', - * 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' + * @property {string} [provisioningState] The provisioning state of the + * webhook at the time the operation was called. Possible values include: + * 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' */ constructor() { super(); diff --git a/lib/services/containerRegistryManagement/lib/models/webhookCreateParameters.js b/lib/services/containerRegistryManagement/lib/models/webhookCreateParameters.js index 3e161be847..36ff466fa2 100644 --- a/lib/services/containerRegistryManagement/lib/models/webhookCreateParameters.js +++ b/lib/services/containerRegistryManagement/lib/models/webhookCreateParameters.js @@ -17,20 +17,20 @@ class WebhookCreateParameters { /** * Create a WebhookCreateParameters. - * @member {object} [tags] The tags for the webhook. - * @member {string} location The location of the webhook. This cannot be + * @property {object} [tags] The tags for the webhook. + * @property {string} location The location of the webhook. This cannot be * changed after the resource is created. - * @member {string} serviceUri The service URI for the webhook to post + * @property {string} serviceUri The service URI for the webhook to post * notifications. - * @member {object} [customHeaders] Custom headers that will be added to the - * webhook notifications. - * @member {string} [status] The status of the webhook at the time the + * @property {object} [customHeaders] Custom headers that will be added to + * the webhook notifications. + * @property {string} [status] The status of the webhook at the time the * operation was called. Possible values include: 'enabled', 'disabled' - * @member {string} [scope] The scope of repositories where the event can be - * triggered. For example, 'foo:*' means events for all tags under repository - * 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to - * 'foo:latest'. Empty means all events. - * @member {array} actions The list of actions that trigger the webhook to + * @property {string} [scope] The scope of repositories where the event can + * be triggered. For example, 'foo:*' means events for all tags under + * repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is + * equivalent to 'foo:latest'. Empty means all events. + * @property {array} actions The list of actions that trigger the webhook to * post notifications. */ constructor() { diff --git a/lib/services/containerRegistryManagement/lib/models/webhookListResult.js b/lib/services/containerRegistryManagement/lib/models/webhookListResult.js index f45a5b9863..20e51d5c1e 100644 --- a/lib/services/containerRegistryManagement/lib/models/webhookListResult.js +++ b/lib/services/containerRegistryManagement/lib/models/webhookListResult.js @@ -16,7 +16,7 @@ class WebhookListResult extends Array { /** * Create a WebhookListResult. - * @member {string} [nextLink] The URI that can be used to request the next + * @property {string} [nextLink] The URI that can be used to request the next * list of webhooks. */ constructor() { diff --git a/lib/services/containerRegistryManagement/lib/models/webhookUpdateParameters.js b/lib/services/containerRegistryManagement/lib/models/webhookUpdateParameters.js index 577ae2a0b0..db47c6fae3 100644 --- a/lib/services/containerRegistryManagement/lib/models/webhookUpdateParameters.js +++ b/lib/services/containerRegistryManagement/lib/models/webhookUpdateParameters.js @@ -17,19 +17,19 @@ class WebhookUpdateParameters { /** * Create a WebhookUpdateParameters. - * @member {object} [tags] The tags for the webhook. - * @member {string} [serviceUri] The service URI for the webhook to post + * @property {object} [tags] The tags for the webhook. + * @property {string} [serviceUri] The service URI for the webhook to post * notifications. - * @member {object} [customHeaders] Custom headers that will be added to the - * webhook notifications. - * @member {string} [status] The status of the webhook at the time the + * @property {object} [customHeaders] Custom headers that will be added to + * the webhook notifications. + * @property {string} [status] The status of the webhook at the time the * operation was called. Possible values include: 'enabled', 'disabled' - * @member {string} [scope] The scope of repositories where the event can be - * triggered. For example, 'foo:*' means events for all tags under repository - * 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to - * 'foo:latest'. Empty means all events. - * @member {array} [actions] The list of actions that trigger the webhook to - * post notifications. + * @property {string} [scope] The scope of repositories where the event can + * be triggered. For example, 'foo:*' means events for all tags under + * repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is + * equivalent to 'foo:latest'. Empty means all events. + * @property {array} [actions] The list of actions that trigger the webhook + * to post notifications. */ constructor() { } diff --git a/lib/services/containerRegistryManagement/lib/operations/index.d.ts b/lib/services/containerRegistryManagement/lib/operations/index.d.ts index 199e1d387b..1decc4ffef 100644 --- a/lib/services/containerRegistryManagement/lib/operations/index.d.ts +++ b/lib/services/containerRegistryManagement/lib/operations/index.d.ts @@ -316,6 +316,16 @@ export interface Registries { * @param {string} registry.storageAccount.id The resource ID of the storage * account. * + * @param {object} [registry.networkRuleSet] The network rule set for a + * container registry. + * + * @param {string} registry.networkRuleSet.defaultAction The default action of + * allow or deny when no other rules match. Possible values include: 'Allow', + * 'Deny' + * + * @param {array} [registry.networkRuleSet.virtualNetworkRules] The virtual + * network rules. + * * @param {string} registry.location The location of the resource. This cannot * be changed after the resource is created. * @@ -359,6 +369,16 @@ export interface Registries { * @param {string} registry.storageAccount.id The resource ID of the storage * account. * + * @param {object} [registry.networkRuleSet] The network rule set for a + * container registry. + * + * @param {string} registry.networkRuleSet.defaultAction The default action of + * allow or deny when no other rules match. Possible values include: 'Allow', + * 'Deny' + * + * @param {array} [registry.networkRuleSet.virtualNetworkRules] The virtual + * network rules. + * * @param {string} registry.location The location of the resource. This cannot * be changed after the resource is created. * @@ -488,6 +508,16 @@ export interface Registries { * @param {string} registryUpdateParameters.storageAccount.id The resource ID * of the storage account. * + * @param {object} [registryUpdateParameters.networkRuleSet] The network rule + * set for a container registry. + * + * @param {string} registryUpdateParameters.networkRuleSet.defaultAction The + * default action of allow or deny when no other rules match. Possible values + * include: 'Allow', 'Deny' + * + * @param {array} [registryUpdateParameters.networkRuleSet.virtualNetworkRules] + * The virtual network rules. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -533,6 +563,16 @@ export interface Registries { * @param {string} registryUpdateParameters.storageAccount.id The resource ID * of the storage account. * + * @param {object} [registryUpdateParameters.networkRuleSet] The network rule + * set for a container registry. + * + * @param {string} registryUpdateParameters.networkRuleSet.defaultAction The + * default action of allow or deny when no other rules match. Possible values + * include: 'Allow', 'Deny' + * + * @param {array} [registryUpdateParameters.networkRuleSet.virtualNetworkRules] + * The virtual network rules. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1343,6 +1383,16 @@ export interface Registries { * @param {string} registry.storageAccount.id The resource ID of the storage * account. * + * @param {object} [registry.networkRuleSet] The network rule set for a + * container registry. + * + * @param {string} registry.networkRuleSet.defaultAction The default action of + * allow or deny when no other rules match. Possible values include: 'Allow', + * 'Deny' + * + * @param {array} [registry.networkRuleSet.virtualNetworkRules] The virtual + * network rules. + * * @param {string} registry.location The location of the resource. This cannot * be changed after the resource is created. * @@ -1386,6 +1436,16 @@ export interface Registries { * @param {string} registry.storageAccount.id The resource ID of the storage * account. * + * @param {object} [registry.networkRuleSet] The network rule set for a + * container registry. + * + * @param {string} registry.networkRuleSet.defaultAction The default action of + * allow or deny when no other rules match. Possible values include: 'Allow', + * 'Deny' + * + * @param {array} [registry.networkRuleSet.virtualNetworkRules] The virtual + * network rules. + * * @param {string} registry.location The location of the resource. This cannot * be changed after the resource is created. * @@ -1515,6 +1575,16 @@ export interface Registries { * @param {string} registryUpdateParameters.storageAccount.id The resource ID * of the storage account. * + * @param {object} [registryUpdateParameters.networkRuleSet] The network rule + * set for a container registry. + * + * @param {string} registryUpdateParameters.networkRuleSet.defaultAction The + * default action of allow or deny when no other rules match. Possible values + * include: 'Allow', 'Deny' + * + * @param {array} [registryUpdateParameters.networkRuleSet.virtualNetworkRules] + * The virtual network rules. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1560,6 +1630,16 @@ export interface Registries { * @param {string} registryUpdateParameters.storageAccount.id The resource ID * of the storage account. * + * @param {object} [registryUpdateParameters.networkRuleSet] The network rule + * set for a container registry. + * + * @param {string} registryUpdateParameters.networkRuleSet.defaultAction The + * default action of allow or deny when no other rules match. Possible values + * include: 'Allow', 'Deny' + * + * @param {array} [registryUpdateParameters.networkRuleSet.virtualNetworkRules] + * The virtual network rules. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the diff --git a/lib/services/containerRegistryManagement/lib/operations/registries.js b/lib/services/containerRegistryManagement/lib/operations/registries.js index 1bf3f83810..149d097a6e 100644 --- a/lib/services/containerRegistryManagement/lib/operations/registries.js +++ b/lib/services/containerRegistryManagement/lib/operations/registries.js @@ -324,6 +324,12 @@ function _get(resourceGroupName, registryName, options, callback) { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -463,6 +469,16 @@ function _get(resourceGroupName, registryName, options, callback) { * @param {string} registry.storageAccount.id The resource ID of the storage * account. * + * @param {object} [registry.networkRuleSet] The network rule set for a + * container registry. + * + * @param {string} registry.networkRuleSet.defaultAction The default action of + * allow or deny when no other rules match. Possible values include: 'Allow', + * 'Deny' + * + * @param {array} [registry.networkRuleSet.virtualNetworkRules] The virtual + * network rules. + * * @param {string} registry.location The location of the resource. This cannot * be changed after the resource is created. * @@ -635,6 +651,16 @@ function _deleteMethod(resourceGroupName, registryName, options, callback) { * @param {string} registryUpdateParameters.storageAccount.id The resource ID * of the storage account. * + * @param {object} [registryUpdateParameters.networkRuleSet] The network rule + * set for a container registry. + * + * @param {string} registryUpdateParameters.networkRuleSet.defaultAction The + * default action of allow or deny when no other rules match. Possible values + * include: 'Allow', 'Deny' + * + * @param {array} [registryUpdateParameters.networkRuleSet.virtualNetworkRules] + * The virtual network rules. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -748,6 +774,12 @@ function _listByResourceGroup(resourceGroupName, options, callback) { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); } @@ -1020,6 +1052,12 @@ function _listCredentials(resourceGroupName, registryName, options, callback) { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -1187,6 +1225,12 @@ function _regenerateCredential(resourceGroupName, registryName, regenerateCreden if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -1363,6 +1407,12 @@ function _listUsages(resourceGroupName, registryName, options, callback) { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -1521,6 +1571,12 @@ function _listPolicies(resourceGroupName, registryName, options, callback) { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -1866,6 +1922,12 @@ function _getBuildSourceUploadUrl(resourceGroupName, registryName, options, call if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -2064,6 +2126,12 @@ function _beginImportImage(resourceGroupName, registryName, parameters, options, if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -2202,6 +2270,16 @@ function _beginImportImage(resourceGroupName, registryName, parameters, options, * @param {string} registry.storageAccount.id The resource ID of the storage * account. * + * @param {object} [registry.networkRuleSet] The network rule set for a + * container registry. + * + * @param {string} registry.networkRuleSet.defaultAction The default action of + * allow or deny when no other rules match. Possible values include: 'Allow', + * 'Deny' + * + * @param {array} [registry.networkRuleSet.virtualNetworkRules] The virtual + * network rules. + * * @param {string} registry.location The location of the resource. This cannot * be changed after the resource is created. * @@ -2244,6 +2322,12 @@ function _beginCreate(resourceGroupName, registryName, registry, options, callba if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -2435,6 +2519,12 @@ function _beginDeleteMethod(resourceGroupName, registryName, options, callback) if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -2563,6 +2653,16 @@ function _beginDeleteMethod(resourceGroupName, registryName, options, callback) * @param {string} registryUpdateParameters.storageAccount.id The resource ID * of the storage account. * + * @param {object} [registryUpdateParameters.networkRuleSet] The network rule + * set for a container registry. + * + * @param {string} registryUpdateParameters.networkRuleSet.defaultAction The + * default action of allow or deny when no other rules match. Possible values + * include: 'Allow', 'Deny' + * + * @param {array} [registryUpdateParameters.networkRuleSet.virtualNetworkRules] + * The virtual network rules. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2600,6 +2700,12 @@ function _beginUpdate(resourceGroupName, registryName, registryUpdateParameters, if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -2812,6 +2918,12 @@ function _beginUpdatePolicies(resourceGroupName, registryName, registryPoliciesU if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -2995,6 +3107,12 @@ function _beginScheduleRun(resourceGroupName, registryName, runRequest, options, if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -3788,6 +3906,16 @@ class Registries { * @param {string} registry.storageAccount.id The resource ID of the storage * account. * + * @param {object} [registry.networkRuleSet] The network rule set for a + * container registry. + * + * @param {string} registry.networkRuleSet.defaultAction The default action of + * allow or deny when no other rules match. Possible values include: 'Allow', + * 'Deny' + * + * @param {array} [registry.networkRuleSet.virtualNetworkRules] The virtual + * network rules. + * * @param {string} registry.location The location of the resource. This cannot * be changed after the resource is created. * @@ -3843,6 +3971,16 @@ class Registries { * @param {string} registry.storageAccount.id The resource ID of the storage * account. * + * @param {object} [registry.networkRuleSet] The network rule set for a + * container registry. + * + * @param {string} registry.networkRuleSet.defaultAction The default action of + * allow or deny when no other rules match. Possible values include: 'Allow', + * 'Deny' + * + * @param {array} [registry.networkRuleSet.virtualNetworkRules] The virtual + * network rules. + * * @param {string} registry.location The location of the resource. This cannot * be changed after the resource is created. * @@ -4014,6 +4152,16 @@ class Registries { * @param {string} registryUpdateParameters.storageAccount.id The resource ID * of the storage account. * + * @param {object} [registryUpdateParameters.networkRuleSet] The network rule + * set for a container registry. + * + * @param {string} registryUpdateParameters.networkRuleSet.defaultAction The + * default action of allow or deny when no other rules match. Possible values + * include: 'Allow', 'Deny' + * + * @param {array} [registryUpdateParameters.networkRuleSet.virtualNetworkRules] + * The virtual network rules. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -4071,6 +4219,16 @@ class Registries { * @param {string} registryUpdateParameters.storageAccount.id The resource ID * of the storage account. * + * @param {object} [registryUpdateParameters.networkRuleSet] The network rule + * set for a container registry. + * + * @param {string} registryUpdateParameters.networkRuleSet.defaultAction The + * default action of allow or deny when no other rules match. Possible values + * include: 'Allow', 'Deny' + * + * @param {array} [registryUpdateParameters.networkRuleSet.virtualNetworkRules] + * The virtual network rules. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5166,6 +5324,16 @@ class Registries { * @param {string} registry.storageAccount.id The resource ID of the storage * account. * + * @param {object} [registry.networkRuleSet] The network rule set for a + * container registry. + * + * @param {string} registry.networkRuleSet.defaultAction The default action of + * allow or deny when no other rules match. Possible values include: 'Allow', + * 'Deny' + * + * @param {array} [registry.networkRuleSet.virtualNetworkRules] The virtual + * network rules. + * * @param {string} registry.location The location of the resource. This cannot * be changed after the resource is created. * @@ -5221,6 +5389,16 @@ class Registries { * @param {string} registry.storageAccount.id The resource ID of the storage * account. * + * @param {object} [registry.networkRuleSet] The network rule set for a + * container registry. + * + * @param {string} registry.networkRuleSet.defaultAction The default action of + * allow or deny when no other rules match. Possible values include: 'Allow', + * 'Deny' + * + * @param {array} [registry.networkRuleSet.virtualNetworkRules] The virtual + * network rules. + * * @param {string} registry.location The location of the resource. This cannot * be changed after the resource is created. * @@ -5392,6 +5570,16 @@ class Registries { * @param {string} registryUpdateParameters.storageAccount.id The resource ID * of the storage account. * + * @param {object} [registryUpdateParameters.networkRuleSet] The network rule + * set for a container registry. + * + * @param {string} registryUpdateParameters.networkRuleSet.defaultAction The + * default action of allow or deny when no other rules match. Possible values + * include: 'Allow', 'Deny' + * + * @param {array} [registryUpdateParameters.networkRuleSet.virtualNetworkRules] + * The virtual network rules. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5449,6 +5637,16 @@ class Registries { * @param {string} registryUpdateParameters.storageAccount.id The resource ID * of the storage account. * + * @param {object} [registryUpdateParameters.networkRuleSet] The network rule + * set for a container registry. + * + * @param {string} registryUpdateParameters.networkRuleSet.defaultAction The + * default action of allow or deny when no other rules match. Possible values + * include: 'Allow', 'Deny' + * + * @param {array} [registryUpdateParameters.networkRuleSet.virtualNetworkRules] + * The virtual network rules. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the diff --git a/lib/services/containerRegistryManagement/lib/operations/replications.js b/lib/services/containerRegistryManagement/lib/operations/replications.js index 691f1b4b09..43b53cf6b2 100644 --- a/lib/services/containerRegistryManagement/lib/operations/replications.js +++ b/lib/services/containerRegistryManagement/lib/operations/replications.js @@ -61,6 +61,12 @@ function _get(resourceGroupName, registryName, replicationName, options, callbac if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -480,6 +486,12 @@ function _list(resourceGroupName, registryName, options, callback) { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -648,6 +660,12 @@ function _beginCreate(resourceGroupName, registryName, replicationName, replicat if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -859,6 +877,12 @@ function _beginDeleteMethod(resourceGroupName, registryName, replicationName, op if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -1027,6 +1051,12 @@ function _beginUpdate(resourceGroupName, registryName, replicationName, replicat if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } diff --git a/lib/services/containerRegistryManagement/lib/operations/runs.js b/lib/services/containerRegistryManagement/lib/operations/runs.js index 0175450ea5..a8ee5cf813 100644 --- a/lib/services/containerRegistryManagement/lib/operations/runs.js +++ b/lib/services/containerRegistryManagement/lib/operations/runs.js @@ -68,6 +68,12 @@ function _list(resourceGroupName, registryName, options, callback) { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -240,6 +246,12 @@ function _get(resourceGroupName, registryName, runId, options, callback) { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -490,6 +502,12 @@ function _getLogSasUrl(resourceGroupName, registryName, runId, options, callback if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -725,6 +743,12 @@ function _beginUpdate(resourceGroupName, registryName, runId, runUpdateParameter if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -922,6 +946,12 @@ function _beginCancel(resourceGroupName, registryName, runId, options, callback) if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } diff --git a/lib/services/containerRegistryManagement/lib/operations/tasks.js b/lib/services/containerRegistryManagement/lib/operations/tasks.js index 8f98b6030e..96ec812f24 100644 --- a/lib/services/containerRegistryManagement/lib/operations/tasks.js +++ b/lib/services/containerRegistryManagement/lib/operations/tasks.js @@ -59,6 +59,12 @@ function _list(resourceGroupName, registryName, options, callback) { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -219,6 +225,12 @@ function _get(resourceGroupName, registryName, taskName, options, callback) { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -745,6 +757,12 @@ function _getDetails(resourceGroupName, registryName, taskName, options, callbac if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -984,6 +1002,12 @@ function _beginCreate(resourceGroupName, registryName, taskName, taskCreateParam if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -1195,6 +1219,12 @@ function _beginDeleteMethod(resourceGroupName, registryName, taskName, options, if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -1415,6 +1445,12 @@ function _beginUpdate(resourceGroupName, registryName, taskName, taskUpdateParam if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } diff --git a/lib/services/containerRegistryManagement/lib/operations/webhooks.js b/lib/services/containerRegistryManagement/lib/operations/webhooks.js index 1def15c336..da6d9e7c6a 100644 --- a/lib/services/containerRegistryManagement/lib/operations/webhooks.js +++ b/lib/services/containerRegistryManagement/lib/operations/webhooks.js @@ -61,6 +61,12 @@ function _get(resourceGroupName, registryName, webhookName, options, callback) { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -514,6 +520,12 @@ function _list(resourceGroupName, registryName, options, callback) { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -674,6 +686,12 @@ function _ping(resourceGroupName, registryName, webhookName, options, callback) if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -852,6 +870,12 @@ function _getCallbackConfig(resourceGroupName, registryName, webhookName, option if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -1030,6 +1054,12 @@ function _listEvents(resourceGroupName, registryName, webhookName, options, call if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -1234,6 +1264,12 @@ function _beginCreate(resourceGroupName, registryName, webhookName, webhookCreat if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -1445,6 +1481,12 @@ function _beginDeleteMethod(resourceGroupName, registryName, webhookName, option if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -1629,6 +1671,12 @@ function _beginUpdate(resourceGroupName, registryName, webhookName, webhookUpdat if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } diff --git a/lib/services/containerRegistryManagement/package.json b/lib/services/containerRegistryManagement/package.json index d58352f46d..5a4fbf9af1 100644 --- a/lib/services/containerRegistryManagement/package.json +++ b/lib/services/containerRegistryManagement/package.json @@ -2,7 +2,7 @@ "name": "azure-arm-containerregistry", "author": "Microsoft Corporation", "description": "ContainerRegistryManagementClient Library with typescript type definitions for node", - "version": "4.2.0", + "version": "4.3.0", "dependencies": { "ms-rest": "^2.3.3", "ms-rest-azure": "^2.5.5" @@ -22,4 +22,4 @@ "bugs": { "url": "https://github.com/azure/azure-sdk-for-node/issues" } -} \ No newline at end of file +} diff --git a/lib/services/customVision/prediction/README.md b/lib/services/customVision/prediction/README.md new file mode 100644 index 0000000000..3c3b032fd4 --- /dev/null +++ b/lib/services/customVision/prediction/README.md @@ -0,0 +1,50 @@ +--- +uid: azure-cognitiveservices-customvision-prediction +summary: *content + +--- +**This SDK will be deprecated next year and will be replaced by a new TypeScript-based isomorphic SDK (found at https://github.com/Azure/azure-sdk-for-js) which works on Node.js and browsers.** +## Microsoft Azure SDK for Node.js - PredictionAPIClient + +This project provides a Node.js package for accessing Azure. Right now it supports: +- **Node.js version 6.x.x or higher** + +### Features + + +### How to Install + +```bash +npm install azure-cognitiveservices-customvision-prediction +``` + +### How to use + +#### Authentication, client creation, and predictImageUrl as an example. + +```javascript +const msRest = require("ms-rest"); +const PredictionAPIClient = require("azure-cognitiveservices-customvision-prediction"); +const token = ""; +const creds = new msRest.TokenCredentials(token); +const subscriptionId = ""; +const client = new PredictionAPIClient(creds, subscriptionId); +const projectId = ec7b1657-199d-4d8a-bbb2-89a11a42e02a; +const imageUrl = { + url: "testurl" +}; +const iterationId = ec7b1657-199d-4d8a-bbb2-89a11a42e02a; +const application = "testapplication"; + +client.predictImageUrl(projectId, imageUrl, iterationId, application).then((result) => { + console.log("The result is:"); + console.log(result); +}).catch((err) => { + console.log('An error occurred:'); + console.dir(err, {depth: null, colors: true}); +}); +``` + +### Related projects + +- [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node) diff --git a/lib/services/customVision/prediction/lib/models/boundingBox.js b/lib/services/customVision/prediction/lib/models/boundingBox.js index 16b84990ae..1dd1a18c05 100644 --- a/lib/services/customVision/prediction/lib/models/boundingBox.js +++ b/lib/services/customVision/prediction/lib/models/boundingBox.js @@ -16,10 +16,10 @@ class BoundingBox { /** * Create a BoundingBox. - * @member {number} [left] - * @member {number} [top] - * @member {number} [width] - * @member {number} [height] + * @property {number} [left] + * @property {number} [top] + * @property {number} [width] + * @property {number} [height] */ constructor() { } diff --git a/lib/services/customVision/prediction/lib/models/imagePrediction.js b/lib/services/customVision/prediction/lib/models/imagePrediction.js index 003115673c..682587f610 100644 --- a/lib/services/customVision/prediction/lib/models/imagePrediction.js +++ b/lib/services/customVision/prediction/lib/models/imagePrediction.js @@ -10,19 +10,17 @@ 'use strict'; -const models = require('./index'); - /** * Class representing a ImagePrediction. */ class ImagePrediction { /** * Create a ImagePrediction. - * @member {uuid} [id] - * @member {uuid} [project] - * @member {uuid} [iteration] - * @member {date} [created] - * @member {array} [predictions] + * @property {uuid} [id] + * @property {uuid} [project] + * @property {uuid} [iteration] + * @property {date} [created] + * @property {array} [predictions] */ constructor() { } diff --git a/lib/services/customVision/prediction/lib/models/imageUrl.js b/lib/services/customVision/prediction/lib/models/imageUrl.js index c2877ae04f..31cb128ce9 100644 --- a/lib/services/customVision/prediction/lib/models/imageUrl.js +++ b/lib/services/customVision/prediction/lib/models/imageUrl.js @@ -16,7 +16,7 @@ class ImageUrl { /** * Create a ImageUrl. - * @member {string} [url] + * @property {string} [url] */ constructor() { } diff --git a/lib/services/customVision/prediction/lib/models/index.d.ts b/lib/services/customVision/prediction/lib/models/index.d.ts index 15855e9f9a..eee742031b 100644 --- a/lib/services/customVision/prediction/lib/models/index.d.ts +++ b/lib/services/customVision/prediction/lib/models/index.d.ts @@ -1,35 +1,17 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import * as moment from "moment"; - -/** - * @class - * Initializes a new instance of the ImageUrl class. - * @constructor - * @member {string} [url] - */ export interface ImageUrl { url?: string; } -/** - * @class - * Initializes a new instance of the BoundingBox class. - * @constructor - * @member {number} [left] - * @member {number} [top] - * @member {number} [width] - * @member {number} [height] - */ export interface BoundingBox { left?: number; top?: number; @@ -37,19 +19,6 @@ export interface BoundingBox { height?: number; } -/** - * @class - * Initializes a new instance of the Prediction class. - * @constructor - * @member {number} [probability] - * @member {uuid} [tagId] - * @member {string} [tagName] - * @member {object} [boundingBox] - * @member {number} [boundingBox.left] - * @member {number} [boundingBox.top] - * @member {number} [boundingBox.width] - * @member {number} [boundingBox.height] - */ export interface Prediction { readonly probability?: number; readonly tagId?: string; @@ -57,16 +26,6 @@ export interface Prediction { readonly boundingBox?: BoundingBox; } -/** - * @class - * Initializes a new instance of the ImagePrediction class. - * @constructor - * @member {uuid} [id] - * @member {uuid} [project] - * @member {uuid} [iteration] - * @member {date} [created] - * @member {array} [predictions] - */ export interface ImagePrediction { readonly id?: string; readonly project?: string; diff --git a/lib/services/customVision/prediction/lib/models/prediction.js b/lib/services/customVision/prediction/lib/models/prediction.js index a58e6b4dd5..b069516a77 100644 --- a/lib/services/customVision/prediction/lib/models/prediction.js +++ b/lib/services/customVision/prediction/lib/models/prediction.js @@ -10,22 +10,20 @@ 'use strict'; -const models = require('./index'); - /** * Class representing a Prediction. */ class Prediction { /** * Create a Prediction. - * @member {number} [probability] - * @member {uuid} [tagId] - * @member {string} [tagName] - * @member {object} [boundingBox] - * @member {number} [boundingBox.left] - * @member {number} [boundingBox.top] - * @member {number} [boundingBox.width] - * @member {number} [boundingBox.height] + * @property {number} [probability] + * @property {uuid} [tagId] + * @property {string} [tagName] + * @property {object} [boundingBox] + * @property {number} [boundingBox.left] + * @property {number} [boundingBox.top] + * @property {number} [boundingBox.width] + * @property {number} [boundingBox.height] */ constructor() { } diff --git a/lib/services/customVision/prediction/lib/predictionAPIClient.d.ts b/lib/services/customVision/prediction/lib/predictionAPIClient.d.ts index d9d6c42e63..b5cf3de061 100644 --- a/lib/services/customVision/prediction/lib/predictionAPIClient.d.ts +++ b/lib/services/customVision/prediction/lib/predictionAPIClient.d.ts @@ -19,7 +19,7 @@ export default class PredictionAPIClient extends ServiceClient { * * @param {string} apiKey - * - * @param {string} [baseUri] - The base URI of the service. + * @param {string} endpoint - Supported Cognitive Services endpoints * * @param {object} [options] - The parameter options * @@ -31,10 +31,12 @@ export default class PredictionAPIClient extends ServiceClient { * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy * */ - constructor(apiKey: string, baseUri?: string, options?: ServiceClientOptions); + constructor(apiKey: string, endpoint: string, options?: ServiceClientOptions); apiKey: string; + endpoint: string; + /** * @summary Predict an image url and saves the result diff --git a/lib/services/customVision/prediction/lib/predictionAPIClient.js b/lib/services/customVision/prediction/lib/predictionAPIClient.js index 3e55923ebc..5866f85630 100644 --- a/lib/services/customVision/prediction/lib/predictionAPIClient.js +++ b/lib/services/customVision/prediction/lib/predictionAPIClient.js @@ -70,6 +70,9 @@ function _predictImageUrl(projectId, imageUrl, options, callback) { let application = (options && options.application !== undefined) ? options.application : undefined; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } @@ -91,7 +94,8 @@ function _predictImageUrl(projectId, imageUrl, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Prediction/{projectId}/url'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + '{projectId}/url'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); let queryParameters = []; if (iterationId !== null && iterationId !== undefined) { @@ -235,6 +239,9 @@ function _predictImage(projectId, imageData, options, callback) { let application = (options && options.application !== undefined) ? options.application : undefined; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } @@ -256,7 +263,8 @@ function _predictImage(projectId, imageData, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Prediction/{projectId}/image'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + '{projectId}/image'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); let queryParameters = []; if (iterationId !== null && iterationId !== undefined) { @@ -394,6 +402,9 @@ function _predictImageUrlWithNoStore(projectId, imageUrl, options, callback) { let application = (options && options.application !== undefined) ? options.application : undefined; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } @@ -415,7 +426,8 @@ function _predictImageUrlWithNoStore(projectId, imageUrl, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Prediction/{projectId}/url/nostore'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + '{projectId}/url/nostore'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); let queryParameters = []; if (iterationId !== null && iterationId !== undefined) { @@ -559,6 +571,9 @@ function _predictImageWithNoStore(projectId, imageData, options, callback) { let application = (options && options.application !== undefined) ? options.application : undefined; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } @@ -580,7 +595,8 @@ function _predictImageWithNoStore(projectId, imageData, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Prediction/{projectId}/image/nostore'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + '{projectId}/image/nostore'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); let queryParameters = []; if (iterationId !== null && iterationId !== undefined) { @@ -674,27 +690,28 @@ class PredictionAPIClient extends ServiceClient { /** * Create a PredictionAPIClient. * @param {string} apiKey - - * @param {string} [baseUri] - The base URI of the service. + * @param {string} endpoint - Supported Cognitive Services endpoints * @param {object} [options] - The parameter options * @param {Array} [options.filters] - Filters to be added to the request pipeline * @param {object} [options.requestOptions] - Options for the underlying request object * {@link https://github.com/request/request#requestoptions-callback Options doc} * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy */ - constructor(apiKey, baseUri, options) { + constructor(apiKey, endpoint, options) { if (apiKey === null || apiKey === undefined) { throw new Error('\'apiKey\' cannot be null.'); } + if (endpoint === null || endpoint === undefined) { + throw new Error('\'endpoint\' cannot be null.'); + } if (!options) options = {}; super(null, options); - this.baseUri = baseUri; - if (!this.baseUri) { - this.baseUri = 'https://api.cognitive.microsoft.com/customvision/v2.0'; - } + this.baseUri = '{Endpoint}/customvision/v2.0/Prediction'; this.apiKey = apiKey; + this.endpoint = endpoint; let packageInfo = this.getPackageJsonInfo(__dirname); this.addUserAgentInfo(`${packageInfo.name}/${packageInfo.version}`); diff --git a/lib/services/customVision/prediction/package.json b/lib/services/customVision/prediction/package.json index e49c7eb582..18c76dba2d 100644 --- a/lib/services/customVision/prediction/package.json +++ b/lib/services/customVision/prediction/package.json @@ -2,7 +2,7 @@ "name": "azure-cognitiveservices-customvision-prediction", "author": "Microsoft Corporation", "description": "PredictionAPIClient Library with typescript type definitions for node", - "version": "1.1.0-preview", + "version": "2.0.0", "dependencies": { "ms-rest": "^2.3.3" }, @@ -13,7 +13,7 @@ "license": "MIT", "main": "./lib/predictionAPIClient.js", "types": "./lib/predictionAPIClient.d.ts", - "homepage": "https://github.com/azure/azure-sdk-for-node/lib/services/customVision/prediction", + "homepage": "https://github.com/azure/azure-sdk-for-node/tree/master/lib/services/customVision/prediction", "repository": { "type": "git", "url": "https://github.com/azure/azure-sdk-for-node.git" @@ -21,4 +21,4 @@ "bugs": { "url": "https://github.com/azure/azure-sdk-for-node/issues" } -} \ No newline at end of file +} diff --git a/lib/services/customVision/training/README.md b/lib/services/customVision/training/README.md new file mode 100644 index 0000000000..17700bc3c6 --- /dev/null +++ b/lib/services/customVision/training/README.md @@ -0,0 +1,44 @@ +--- +uid: azure-cognitiveservices-customvision-training +summary: *content + +--- +**This SDK will be deprecated next year and will be replaced by a new TypeScript-based isomorphic SDK (found at https://github.com/Azure/azure-sdk-for-js) which works on Node.js and browsers.** +## Microsoft Azure SDK for Node.js - TrainingAPIClient + +This project provides a Node.js package for accessing Azure. Right now it supports: +- **Node.js version 6.x.x or higher** + +### Features + + +### How to Install + +```bash +npm install azure-cognitiveservices-customvision-training +``` + +### How to use + +#### Authentication, client creation, and getDomains as an example. + +```javascript +const msRest = require("ms-rest"); +const TrainingAPIClient = require("azure-cognitiveservices-customvision-training"); +const token = ""; +const creds = new msRest.TokenCredentials(token); +const subscriptionId = ""; +const client = new TrainingAPIClient(creds, subscriptionId); + +client.getDomains().then((result) => { + console.log("The result is:"); + console.log(result); +}).catch((err) => { + console.log('An error occurred:'); + console.dir(err, {depth: null, colors: true}); +}); +``` + +### Related projects + +- [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node) diff --git a/lib/services/customVision/training/lib/models/boundingBox.js b/lib/services/customVision/training/lib/models/boundingBox.js index 294df1c1ed..1dd1a18c05 100644 --- a/lib/services/customVision/training/lib/models/boundingBox.js +++ b/lib/services/customVision/training/lib/models/boundingBox.js @@ -16,10 +16,10 @@ class BoundingBox { /** * Create a BoundingBox. - * @member {number} [left] - * @member {number} [top] - * @member {number} [width] - * @member {number} [height] + * @property {number} [left] + * @property {number} [top] + * @property {number} [width] + * @property {number} [height] */ constructor() { } @@ -40,6 +40,7 @@ class BoundingBox { modelProperties: { left: { required: false, + nullable: false, serializedName: 'left', type: { name: 'Number' @@ -47,6 +48,7 @@ class BoundingBox { }, top: { required: false, + nullable: false, serializedName: 'top', type: { name: 'Number' @@ -54,6 +56,7 @@ class BoundingBox { }, width: { required: false, + nullable: false, serializedName: 'width', type: { name: 'Number' @@ -61,6 +64,7 @@ class BoundingBox { }, height: { required: false, + nullable: false, serializedName: 'height', type: { name: 'Number' diff --git a/lib/services/customVision/training/lib/models/domain.js b/lib/services/customVision/training/lib/models/domain.js index 6cd251aef1..5627f7c5cd 100644 --- a/lib/services/customVision/training/lib/models/domain.js +++ b/lib/services/customVision/training/lib/models/domain.js @@ -16,12 +16,12 @@ class Domain { /** * Create a Domain. - * @member {uuid} [id] - * @member {string} [name] - * @member {string} [type] Possible values include: 'Classification', + * @property {uuid} [id] + * @property {string} [name] + * @property {string} [type] Possible values include: 'Classification', * 'ObjectDetection' - * @member {boolean} [exportable] - * @member {boolean} [enabled] + * @property {boolean} [exportable] + * @property {boolean} [enabled] */ constructor() { } @@ -42,6 +42,7 @@ class Domain { modelProperties: { id: { required: false, + nullable: false, readOnly: true, serializedName: 'id', type: { @@ -50,6 +51,7 @@ class Domain { }, name: { required: false, + nullable: true, readOnly: true, serializedName: 'name', type: { @@ -58,6 +60,7 @@ class Domain { }, type: { required: false, + nullable: false, readOnly: true, serializedName: 'type', type: { @@ -66,6 +69,7 @@ class Domain { }, exportable: { required: false, + nullable: false, readOnly: true, serializedName: 'exportable', type: { @@ -74,6 +78,7 @@ class Domain { }, enabled: { required: false, + nullable: false, readOnly: true, serializedName: 'enabled', type: { diff --git a/lib/services/customVision/training/lib/models/exportModel.js b/lib/services/customVision/training/lib/models/exportModel.js index 148f02bdad..f351ac0633 100644 --- a/lib/services/customVision/training/lib/models/exportModel.js +++ b/lib/services/customVision/training/lib/models/exportModel.js @@ -16,13 +16,16 @@ class ExportModel { /** * Create a ExportModel. - * @member {string} [platform] Possible values include: 'CoreML', - * 'TensorFlow', 'DockerFile', 'ONNX' - * @member {string} [status] Possible values include: 'Exporting', 'Failed', - * 'Done' - * @member {string} [downloadUri] - * @member {string} [flavor] Possible values include: 'Linux', 'Windows' - * @member {boolean} [newerVersionAvailable] + * @property {string} [platform] Platform of the export. Possible values + * include: 'CoreML', 'TensorFlow', 'DockerFile', 'ONNX' + * @property {string} [status] Status of the export. Possible values include: + * 'Exporting', 'Failed', 'Done' + * @property {string} [downloadUri] URI used to download the model. + * @property {string} [flavor] Flavor of the export. Possible values include: + * 'Linux', 'Windows', 'ONNX10', 'ONNX12' + * @property {boolean} [newerVersionAvailable] Indicates an updated version + * of the export package is available and should be re-exported for the + * latest changes. */ constructor() { } @@ -43,6 +46,7 @@ class ExportModel { modelProperties: { platform: { required: false, + nullable: false, readOnly: true, serializedName: 'platform', type: { @@ -51,6 +55,7 @@ class ExportModel { }, status: { required: false, + nullable: false, readOnly: true, serializedName: 'status', type: { @@ -59,6 +64,7 @@ class ExportModel { }, downloadUri: { required: false, + nullable: true, readOnly: true, serializedName: 'downloadUri', type: { @@ -67,6 +73,7 @@ class ExportModel { }, flavor: { required: false, + nullable: true, readOnly: true, serializedName: 'flavor', type: { @@ -75,6 +82,7 @@ class ExportModel { }, newerVersionAvailable: { required: false, + nullable: false, readOnly: true, serializedName: 'newerVersionAvailable', type: { diff --git a/lib/services/customVision/training/lib/models/image.js b/lib/services/customVision/training/lib/models/image.js index 40eb631947..f554873d48 100644 --- a/lib/services/customVision/training/lib/models/image.js +++ b/lib/services/customVision/training/lib/models/image.js @@ -10,23 +10,25 @@ 'use strict'; -const models = require('./index'); - /** - * Image model to be sent as JSON + * Image model to be sent as JSON. * */ class Image { /** * Create a Image. - * @member {uuid} [id] - * @member {date} [created] - * @member {number} [width] - * @member {number} [height] - * @member {string} [imageUri] - * @member {string} [thumbnailUri] - * @member {array} [tags] - * @member {array} [regions] + * @property {uuid} [id] Id of the image. + * @property {date} [created] Date the image was created. + * @property {number} [width] Width of the image. + * @property {number} [height] Height of the image. + * @property {string} [resizedImageUri] The URI to the (resized) image used + * for training. + * @property {string} [thumbnailUri] The URI to the thumbnail of the original + * image. + * @property {string} [originalImageUri] The URI to the original uploaded + * image. + * @property {array} [tags] Tags associated with this image. + * @property {array} [regions] Regions associated with this image. */ constructor() { } @@ -47,6 +49,7 @@ class Image { modelProperties: { id: { required: false, + nullable: false, readOnly: true, serializedName: 'id', type: { @@ -55,6 +58,7 @@ class Image { }, created: { required: false, + nullable: false, readOnly: true, serializedName: 'created', type: { @@ -63,6 +67,7 @@ class Image { }, width: { required: false, + nullable: false, readOnly: true, serializedName: 'width', type: { @@ -71,30 +76,43 @@ class Image { }, height: { required: false, + nullable: false, readOnly: true, serializedName: 'height', type: { name: 'Number' } }, - imageUri: { + resizedImageUri: { required: false, + nullable: true, readOnly: true, - serializedName: 'imageUri', + serializedName: 'resizedImageUri', type: { name: 'String' } }, thumbnailUri: { required: false, + nullable: true, readOnly: true, serializedName: 'thumbnailUri', type: { name: 'String' } }, + originalImageUri: { + required: false, + nullable: true, + readOnly: true, + serializedName: 'originalImageUri', + type: { + name: 'String' + } + }, tags: { required: false, + nullable: true, readOnly: true, serializedName: 'tags', type: { @@ -111,6 +129,7 @@ class Image { }, regions: { required: false, + nullable: true, readOnly: true, serializedName: 'regions', type: { diff --git a/lib/services/customVision/training/lib/models/imageCreateResult.js b/lib/services/customVision/training/lib/models/imageCreateResult.js index 7858a68d42..bc1f0559e4 100644 --- a/lib/services/customVision/training/lib/models/imageCreateResult.js +++ b/lib/services/customVision/training/lib/models/imageCreateResult.js @@ -10,28 +10,31 @@ 'use strict'; -const models = require('./index'); - /** * Class representing a ImageCreateResult. */ class ImageCreateResult { /** * Create a ImageCreateResult. - * @member {string} [sourceUrl] - * @member {string} [status] Possible values include: 'OK', 'OKDuplicate', - * 'ErrorSource', 'ErrorImageFormat', 'ErrorImageSize', 'ErrorStorage', - * 'ErrorLimitExceed', 'ErrorTagLimitExceed', 'ErrorRegionLimitExceed', - * 'ErrorUnknown' - * @member {object} [image] - * @member {uuid} [image.id] - * @member {date} [image.created] - * @member {number} [image.width] - * @member {number} [image.height] - * @member {string} [image.imageUri] - * @member {string} [image.thumbnailUri] - * @member {array} [image.tags] - * @member {array} [image.regions] + * @property {string} [sourceUrl] Source URL of the image. + * @property {string} [status] Status of the image creation. Possible values + * include: 'OK', 'OKDuplicate', 'ErrorSource', 'ErrorImageFormat', + * 'ErrorImageSize', 'ErrorStorage', 'ErrorLimitExceed', + * 'ErrorTagLimitExceed', 'ErrorRegionLimitExceed', 'ErrorUnknown', + * 'ErrorNegativeAndRegularTagOnSameImage' + * @property {object} [image] The image. + * @property {uuid} [image.id] Id of the image. + * @property {date} [image.created] Date the image was created. + * @property {number} [image.width] Width of the image. + * @property {number} [image.height] Height of the image. + * @property {string} [image.resizedImageUri] The URI to the (resized) image + * used for training. + * @property {string} [image.thumbnailUri] The URI to the thumbnail of the + * original image. + * @property {string} [image.originalImageUri] The URI to the original + * uploaded image. + * @property {array} [image.tags] Tags associated with this image. + * @property {array} [image.regions] Regions associated with this image. */ constructor() { } @@ -52,6 +55,7 @@ class ImageCreateResult { modelProperties: { sourceUrl: { required: false, + nullable: true, readOnly: true, serializedName: 'sourceUrl', type: { @@ -60,6 +64,7 @@ class ImageCreateResult { }, status: { required: false, + nullable: false, readOnly: true, serializedName: 'status', type: { diff --git a/lib/services/customVision/training/lib/models/imageCreateSummary.js b/lib/services/customVision/training/lib/models/imageCreateSummary.js index f5ccc33ce2..c0ef1aedb8 100644 --- a/lib/services/customVision/training/lib/models/imageCreateSummary.js +++ b/lib/services/customVision/training/lib/models/imageCreateSummary.js @@ -10,16 +10,15 @@ 'use strict'; -const models = require('./index'); - /** * Class representing a ImageCreateSummary. */ class ImageCreateSummary { /** * Create a ImageCreateSummary. - * @member {boolean} [isBatchSuccessful] - * @member {array} [images] + * @property {boolean} [isBatchSuccessful] True if all of the images in the + * batch were created successfully, otherwise false. + * @property {array} [images] List of the image creation results. */ constructor() { } @@ -40,6 +39,7 @@ class ImageCreateSummary { modelProperties: { isBatchSuccessful: { required: false, + nullable: false, readOnly: true, serializedName: 'isBatchSuccessful', type: { @@ -48,6 +48,7 @@ class ImageCreateSummary { }, images: { required: false, + nullable: true, readOnly: true, serializedName: 'images', type: { diff --git a/lib/services/customVision/training/lib/models/imageFileCreateBatch.js b/lib/services/customVision/training/lib/models/imageFileCreateBatch.js index 584ae1ae28..42b9c133fd 100644 --- a/lib/services/customVision/training/lib/models/imageFileCreateBatch.js +++ b/lib/services/customVision/training/lib/models/imageFileCreateBatch.js @@ -10,16 +10,14 @@ 'use strict'; -const models = require('./index'); - /** * Class representing a ImageFileCreateBatch. */ class ImageFileCreateBatch { /** * Create a ImageFileCreateBatch. - * @member {array} [images] - * @member {array} [tagIds] + * @property {array} [images] + * @property {array} [tagIds] */ constructor() { } @@ -40,6 +38,7 @@ class ImageFileCreateBatch { modelProperties: { images: { required: false, + nullable: true, serializedName: 'images', type: { name: 'Sequence', @@ -55,6 +54,7 @@ class ImageFileCreateBatch { }, tagIds: { required: false, + nullable: true, serializedName: 'tagIds', type: { name: 'Sequence', diff --git a/lib/services/customVision/training/lib/models/imageFileCreateEntry.js b/lib/services/customVision/training/lib/models/imageFileCreateEntry.js index 6e0d705d5f..c43e4c4dd1 100644 --- a/lib/services/customVision/training/lib/models/imageFileCreateEntry.js +++ b/lib/services/customVision/training/lib/models/imageFileCreateEntry.js @@ -10,18 +10,16 @@ 'use strict'; -const models = require('./index'); - /** * Class representing a ImageFileCreateEntry. */ class ImageFileCreateEntry { /** * Create a ImageFileCreateEntry. - * @member {string} [name] - * @member {buffer} [contents] - * @member {array} [tagIds] - * @member {array} [regions] + * @property {string} [name] + * @property {buffer} [contents] + * @property {array} [tagIds] + * @property {array} [regions] */ constructor() { } @@ -42,6 +40,7 @@ class ImageFileCreateEntry { modelProperties: { name: { required: false, + nullable: true, serializedName: 'name', type: { name: 'String' @@ -49,6 +48,7 @@ class ImageFileCreateEntry { }, contents: { required: false, + nullable: true, serializedName: 'contents', type: { name: 'ByteArray' @@ -56,6 +56,7 @@ class ImageFileCreateEntry { }, tagIds: { required: false, + nullable: true, serializedName: 'tagIds', type: { name: 'Sequence', @@ -70,6 +71,7 @@ class ImageFileCreateEntry { }, regions: { required: false, + nullable: true, serializedName: 'regions', type: { name: 'Sequence', diff --git a/lib/services/customVision/training/lib/models/imageIdCreateBatch.js b/lib/services/customVision/training/lib/models/imageIdCreateBatch.js index 54f8031dbe..3d3be80439 100644 --- a/lib/services/customVision/training/lib/models/imageIdCreateBatch.js +++ b/lib/services/customVision/training/lib/models/imageIdCreateBatch.js @@ -10,16 +10,14 @@ 'use strict'; -const models = require('./index'); - /** * Class representing a ImageIdCreateBatch. */ class ImageIdCreateBatch { /** * Create a ImageIdCreateBatch. - * @member {array} [images] - * @member {array} [tagIds] + * @property {array} [images] + * @property {array} [tagIds] */ constructor() { } @@ -40,6 +38,7 @@ class ImageIdCreateBatch { modelProperties: { images: { required: false, + nullable: true, serializedName: 'images', type: { name: 'Sequence', @@ -55,6 +54,7 @@ class ImageIdCreateBatch { }, tagIds: { required: false, + nullable: true, serializedName: 'tagIds', type: { name: 'Sequence', diff --git a/lib/services/customVision/training/lib/models/imageIdCreateEntry.js b/lib/services/customVision/training/lib/models/imageIdCreateEntry.js index 7062f097af..25731b8a68 100644 --- a/lib/services/customVision/training/lib/models/imageIdCreateEntry.js +++ b/lib/services/customVision/training/lib/models/imageIdCreateEntry.js @@ -10,17 +10,15 @@ 'use strict'; -const models = require('./index'); - /** * Class representing a ImageIdCreateEntry. */ class ImageIdCreateEntry { /** * Create a ImageIdCreateEntry. - * @member {uuid} [id] - * @member {array} [tagIds] - * @member {array} [regions] + * @property {uuid} [id] + * @property {array} [tagIds] + * @property {array} [regions] */ constructor() { } @@ -41,6 +39,7 @@ class ImageIdCreateEntry { modelProperties: { id: { required: false, + nullable: false, serializedName: 'id', type: { name: 'String' @@ -48,6 +47,7 @@ class ImageIdCreateEntry { }, tagIds: { required: false, + nullable: true, serializedName: 'tagIds', type: { name: 'Sequence', @@ -62,6 +62,7 @@ class ImageIdCreateEntry { }, regions: { required: false, + nullable: true, serializedName: 'regions', type: { name: 'Sequence', diff --git a/lib/services/customVision/training/lib/models/imagePerformance.js b/lib/services/customVision/training/lib/models/imagePerformance.js index 4f28ca6df2..8f1a6cb08a 100644 --- a/lib/services/customVision/training/lib/models/imagePerformance.js +++ b/lib/services/customVision/training/lib/models/imagePerformance.js @@ -10,24 +10,22 @@ 'use strict'; -const models = require('./index'); - /** - * Image performance model + * Image performance model. * */ class ImagePerformance { /** * Create a ImagePerformance. - * @member {array} [predictions] - * @member {uuid} [id] - * @member {date} [created] - * @member {number} [width] - * @member {number} [height] - * @member {string} [imageUri] - * @member {string} [thumbnailUri] - * @member {array} [tags] - * @member {array} [regions] + * @property {array} [predictions] + * @property {uuid} [id] + * @property {date} [created] + * @property {number} [width] + * @property {number} [height] + * @property {string} [imageUri] + * @property {string} [thumbnailUri] + * @property {array} [tags] + * @property {array} [regions] */ constructor() { } @@ -48,6 +46,7 @@ class ImagePerformance { modelProperties: { predictions: { required: false, + nullable: true, readOnly: true, serializedName: 'predictions', type: { @@ -64,6 +63,7 @@ class ImagePerformance { }, id: { required: false, + nullable: false, readOnly: true, serializedName: 'id', type: { @@ -72,6 +72,7 @@ class ImagePerformance { }, created: { required: false, + nullable: false, readOnly: true, serializedName: 'created', type: { @@ -80,6 +81,7 @@ class ImagePerformance { }, width: { required: false, + nullable: false, readOnly: true, serializedName: 'width', type: { @@ -88,6 +90,7 @@ class ImagePerformance { }, height: { required: false, + nullable: false, readOnly: true, serializedName: 'height', type: { @@ -96,6 +99,7 @@ class ImagePerformance { }, imageUri: { required: false, + nullable: true, readOnly: true, serializedName: 'imageUri', type: { @@ -104,6 +108,7 @@ class ImagePerformance { }, thumbnailUri: { required: false, + nullable: true, readOnly: true, serializedName: 'thumbnailUri', type: { @@ -112,6 +117,7 @@ class ImagePerformance { }, tags: { required: false, + nullable: true, readOnly: true, serializedName: 'tags', type: { @@ -128,6 +134,7 @@ class ImagePerformance { }, regions: { required: false, + nullable: true, readOnly: true, serializedName: 'regions', type: { diff --git a/lib/services/customVision/training/lib/models/imagePrediction.js b/lib/services/customVision/training/lib/models/imagePrediction.js index 5a97c4f55e..682587f610 100644 --- a/lib/services/customVision/training/lib/models/imagePrediction.js +++ b/lib/services/customVision/training/lib/models/imagePrediction.js @@ -10,19 +10,17 @@ 'use strict'; -const models = require('./index'); - /** * Class representing a ImagePrediction. */ class ImagePrediction { /** * Create a ImagePrediction. - * @member {uuid} [id] - * @member {uuid} [project] - * @member {uuid} [iteration] - * @member {date} [created] - * @member {array} [predictions] + * @property {uuid} [id] + * @property {uuid} [project] + * @property {uuid} [iteration] + * @property {date} [created] + * @property {array} [predictions] */ constructor() { } @@ -43,6 +41,7 @@ class ImagePrediction { modelProperties: { id: { required: false, + nullable: false, readOnly: true, serializedName: 'id', type: { @@ -51,6 +50,7 @@ class ImagePrediction { }, project: { required: false, + nullable: false, readOnly: true, serializedName: 'project', type: { @@ -59,6 +59,7 @@ class ImagePrediction { }, iteration: { required: false, + nullable: false, readOnly: true, serializedName: 'iteration', type: { @@ -67,6 +68,7 @@ class ImagePrediction { }, created: { required: false, + nullable: false, readOnly: true, serializedName: 'created', type: { @@ -75,6 +77,7 @@ class ImagePrediction { }, predictions: { required: false, + nullable: true, readOnly: true, serializedName: 'predictions', type: { diff --git a/lib/services/customVision/training/lib/models/imageRegion.js b/lib/services/customVision/training/lib/models/imageRegion.js index 1bedae48da..9f0e4a6188 100644 --- a/lib/services/customVision/training/lib/models/imageRegion.js +++ b/lib/services/customVision/training/lib/models/imageRegion.js @@ -16,14 +16,14 @@ class ImageRegion { /** * Create a ImageRegion. - * @member {uuid} [regionId] - * @member {string} [tagName] - * @member {date} [created] - * @member {uuid} [tagId] - * @member {number} [left] - * @member {number} [top] - * @member {number} [width] - * @member {number} [height] + * @property {uuid} [regionId] + * @property {string} [tagName] + * @property {date} [created] + * @property {uuid} [tagId] Id of the tag associated with this region. + * @property {number} [left] + * @property {number} [top] + * @property {number} [width] + * @property {number} [height] */ constructor() { } @@ -44,6 +44,7 @@ class ImageRegion { modelProperties: { regionId: { required: false, + nullable: false, readOnly: true, serializedName: 'regionId', type: { @@ -52,6 +53,7 @@ class ImageRegion { }, tagName: { required: false, + nullable: true, readOnly: true, serializedName: 'tagName', type: { @@ -60,6 +62,7 @@ class ImageRegion { }, created: { required: false, + nullable: false, readOnly: true, serializedName: 'created', type: { @@ -68,6 +71,7 @@ class ImageRegion { }, tagId: { required: false, + nullable: false, serializedName: 'tagId', type: { name: 'String' @@ -75,6 +79,7 @@ class ImageRegion { }, left: { required: false, + nullable: false, serializedName: 'left', type: { name: 'Number' @@ -82,6 +87,7 @@ class ImageRegion { }, top: { required: false, + nullable: false, serializedName: 'top', type: { name: 'Number' @@ -89,6 +95,7 @@ class ImageRegion { }, width: { required: false, + nullable: false, serializedName: 'width', type: { name: 'Number' @@ -96,6 +103,7 @@ class ImageRegion { }, height: { required: false, + nullable: false, serializedName: 'height', type: { name: 'Number' diff --git a/lib/services/customVision/training/lib/models/imageRegionCreateBatch.js b/lib/services/customVision/training/lib/models/imageRegionCreateBatch.js index 64be7ef374..1c7f01e265 100644 --- a/lib/services/customVision/training/lib/models/imageRegionCreateBatch.js +++ b/lib/services/customVision/training/lib/models/imageRegionCreateBatch.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Batch of image region information to create. * @@ -19,7 +17,7 @@ const models = require('./index'); class ImageRegionCreateBatch { /** * Create a ImageRegionCreateBatch. - * @member {array} [regions] + * @property {array} [regions] */ constructor() { } @@ -40,6 +38,7 @@ class ImageRegionCreateBatch { modelProperties: { regions: { required: false, + nullable: true, serializedName: 'regions', type: { name: 'Sequence', diff --git a/lib/services/customVision/training/lib/models/imageRegionCreateEntry.js b/lib/services/customVision/training/lib/models/imageRegionCreateEntry.js index b5420dd516..6083b3c910 100644 --- a/lib/services/customVision/training/lib/models/imageRegionCreateEntry.js +++ b/lib/services/customVision/training/lib/models/imageRegionCreateEntry.js @@ -11,17 +11,18 @@ 'use strict'; /** - * Class representing a ImageRegionCreateEntry. + * Entry associating a region to an image. + * */ class ImageRegionCreateEntry { /** * Create a ImageRegionCreateEntry. - * @member {uuid} [imageId] - * @member {uuid} [tagId] - * @member {number} [left] - * @member {number} [top] - * @member {number} [width] - * @member {number} [height] + * @property {uuid} [imageId] Id of the image. + * @property {uuid} [tagId] Id of the tag associated with this region. + * @property {number} [left] + * @property {number} [top] + * @property {number} [width] + * @property {number} [height] */ constructor() { } @@ -42,6 +43,7 @@ class ImageRegionCreateEntry { modelProperties: { imageId: { required: false, + nullable: false, serializedName: 'imageId', type: { name: 'String' @@ -49,6 +51,7 @@ class ImageRegionCreateEntry { }, tagId: { required: false, + nullable: false, serializedName: 'tagId', type: { name: 'String' @@ -56,6 +59,7 @@ class ImageRegionCreateEntry { }, left: { required: false, + nullable: false, serializedName: 'left', type: { name: 'Number' @@ -63,6 +67,7 @@ class ImageRegionCreateEntry { }, top: { required: false, + nullable: false, serializedName: 'top', type: { name: 'Number' @@ -70,6 +75,7 @@ class ImageRegionCreateEntry { }, width: { required: false, + nullable: false, serializedName: 'width', type: { name: 'Number' @@ -77,6 +83,7 @@ class ImageRegionCreateEntry { }, height: { required: false, + nullable: false, serializedName: 'height', type: { name: 'Number' diff --git a/lib/services/customVision/training/lib/models/imageRegionCreateResult.js b/lib/services/customVision/training/lib/models/imageRegionCreateResult.js index 5c2b6725df..81658389cb 100644 --- a/lib/services/customVision/training/lib/models/imageRegionCreateResult.js +++ b/lib/services/customVision/training/lib/models/imageRegionCreateResult.js @@ -16,15 +16,15 @@ class ImageRegionCreateResult { /** * Create a ImageRegionCreateResult. - * @member {uuid} [imageId] - * @member {uuid} [regionId] - * @member {string} [tagName] - * @member {date} [created] - * @member {uuid} [tagId] - * @member {number} [left] - * @member {number} [top] - * @member {number} [width] - * @member {number} [height] + * @property {uuid} [imageId] + * @property {uuid} [regionId] + * @property {string} [tagName] + * @property {date} [created] + * @property {uuid} [tagId] Id of the tag associated with this region. + * @property {number} [left] + * @property {number} [top] + * @property {number} [width] + * @property {number} [height] */ constructor() { } @@ -45,6 +45,7 @@ class ImageRegionCreateResult { modelProperties: { imageId: { required: false, + nullable: false, readOnly: true, serializedName: 'imageId', type: { @@ -53,6 +54,7 @@ class ImageRegionCreateResult { }, regionId: { required: false, + nullable: false, readOnly: true, serializedName: 'regionId', type: { @@ -61,6 +63,7 @@ class ImageRegionCreateResult { }, tagName: { required: false, + nullable: true, readOnly: true, serializedName: 'tagName', type: { @@ -69,6 +72,7 @@ class ImageRegionCreateResult { }, created: { required: false, + nullable: false, readOnly: true, serializedName: 'created', type: { @@ -77,6 +81,7 @@ class ImageRegionCreateResult { }, tagId: { required: false, + nullable: false, serializedName: 'tagId', type: { name: 'String' @@ -84,6 +89,7 @@ class ImageRegionCreateResult { }, left: { required: false, + nullable: false, serializedName: 'left', type: { name: 'Number' @@ -91,6 +97,7 @@ class ImageRegionCreateResult { }, top: { required: false, + nullable: false, serializedName: 'top', type: { name: 'Number' @@ -98,6 +105,7 @@ class ImageRegionCreateResult { }, width: { required: false, + nullable: false, serializedName: 'width', type: { name: 'Number' @@ -105,6 +113,7 @@ class ImageRegionCreateResult { }, height: { required: false, + nullable: false, serializedName: 'height', type: { name: 'Number' diff --git a/lib/services/customVision/training/lib/models/imageRegionCreateSummary.js b/lib/services/customVision/training/lib/models/imageRegionCreateSummary.js index 0f43580a71..531760476b 100644 --- a/lib/services/customVision/training/lib/models/imageRegionCreateSummary.js +++ b/lib/services/customVision/training/lib/models/imageRegionCreateSummary.js @@ -10,17 +10,15 @@ 'use strict'; -const models = require('./index'); - /** * Class representing a ImageRegionCreateSummary. */ class ImageRegionCreateSummary { /** * Create a ImageRegionCreateSummary. - * @member {array} [created] - * @member {array} [duplicated] - * @member {array} [exceeded] + * @property {array} [created] + * @property {array} [duplicated] + * @property {array} [exceeded] */ constructor() { } @@ -41,6 +39,7 @@ class ImageRegionCreateSummary { modelProperties: { created: { required: false, + nullable: true, serializedName: 'created', type: { name: 'Sequence', @@ -56,6 +55,7 @@ class ImageRegionCreateSummary { }, duplicated: { required: false, + nullable: true, serializedName: 'duplicated', type: { name: 'Sequence', @@ -71,6 +71,7 @@ class ImageRegionCreateSummary { }, exceeded: { required: false, + nullable: true, serializedName: 'exceeded', type: { name: 'Sequence', diff --git a/lib/services/customVision/training/lib/models/imageRegionProposal.js b/lib/services/customVision/training/lib/models/imageRegionProposal.js index fd3c3e1f46..4fea5b5467 100644 --- a/lib/services/customVision/training/lib/models/imageRegionProposal.js +++ b/lib/services/customVision/training/lib/models/imageRegionProposal.js @@ -10,17 +10,15 @@ 'use strict'; -const models = require('./index'); - /** * Class representing a ImageRegionProposal. */ class ImageRegionProposal { /** * Create a ImageRegionProposal. - * @member {uuid} [projectId] - * @member {uuid} [imageId] - * @member {array} [proposals] + * @property {uuid} [projectId] + * @property {uuid} [imageId] + * @property {array} [proposals] */ constructor() { } @@ -41,6 +39,7 @@ class ImageRegionProposal { modelProperties: { projectId: { required: false, + nullable: false, readOnly: true, serializedName: 'projectId', type: { @@ -49,6 +48,7 @@ class ImageRegionProposal { }, imageId: { required: false, + nullable: false, readOnly: true, serializedName: 'imageId', type: { @@ -57,6 +57,7 @@ class ImageRegionProposal { }, proposals: { required: false, + nullable: true, readOnly: true, serializedName: 'proposals', type: { diff --git a/lib/services/customVision/training/lib/models/imageTag.js b/lib/services/customVision/training/lib/models/imageTag.js index fd12e20128..1017851b23 100644 --- a/lib/services/customVision/training/lib/models/imageTag.js +++ b/lib/services/customVision/training/lib/models/imageTag.js @@ -16,9 +16,9 @@ class ImageTag { /** * Create a ImageTag. - * @member {uuid} [tagId] - * @member {string} [tagName] - * @member {date} [created] + * @property {uuid} [tagId] + * @property {string} [tagName] + * @property {date} [created] */ constructor() { } @@ -39,6 +39,7 @@ class ImageTag { modelProperties: { tagId: { required: false, + nullable: false, readOnly: true, serializedName: 'tagId', type: { @@ -47,6 +48,7 @@ class ImageTag { }, tagName: { required: false, + nullable: true, readOnly: true, serializedName: 'tagName', type: { @@ -55,6 +57,7 @@ class ImageTag { }, created: { required: false, + nullable: false, readOnly: true, serializedName: 'created', type: { diff --git a/lib/services/customVision/training/lib/models/imageTagCreateBatch.js b/lib/services/customVision/training/lib/models/imageTagCreateBatch.js index f277960281..a2aa933237 100644 --- a/lib/services/customVision/training/lib/models/imageTagCreateBatch.js +++ b/lib/services/customVision/training/lib/models/imageTagCreateBatch.js @@ -10,15 +10,14 @@ 'use strict'; -const models = require('./index'); - /** - * Class representing a ImageTagCreateBatch. + * Batch of image tags. + * */ class ImageTagCreateBatch { /** * Create a ImageTagCreateBatch. - * @member {array} [tags] + * @property {array} [tags] Image Tag entries to include in this batch. */ constructor() { } @@ -39,6 +38,7 @@ class ImageTagCreateBatch { modelProperties: { tags: { required: false, + nullable: true, serializedName: 'tags', type: { name: 'Sequence', diff --git a/lib/services/customVision/training/lib/models/imageTagCreateEntry.js b/lib/services/customVision/training/lib/models/imageTagCreateEntry.js index 7b9655341e..13f49fc14a 100644 --- a/lib/services/customVision/training/lib/models/imageTagCreateEntry.js +++ b/lib/services/customVision/training/lib/models/imageTagCreateEntry.js @@ -11,13 +11,14 @@ 'use strict'; /** - * Class representing a ImageTagCreateEntry. + * Entry associating a tag to an image. + * */ class ImageTagCreateEntry { /** * Create a ImageTagCreateEntry. - * @member {uuid} [imageId] - * @member {uuid} [tagId] + * @property {uuid} [imageId] Id of the image. + * @property {uuid} [tagId] Id of the tag. */ constructor() { } @@ -38,6 +39,7 @@ class ImageTagCreateEntry { modelProperties: { imageId: { required: false, + nullable: false, serializedName: 'imageId', type: { name: 'String' @@ -45,6 +47,7 @@ class ImageTagCreateEntry { }, tagId: { required: false, + nullable: false, serializedName: 'tagId', type: { name: 'String' diff --git a/lib/services/customVision/training/lib/models/imageTagCreateSummary.js b/lib/services/customVision/training/lib/models/imageTagCreateSummary.js index b3327418f2..b24a288413 100644 --- a/lib/services/customVision/training/lib/models/imageTagCreateSummary.js +++ b/lib/services/customVision/training/lib/models/imageTagCreateSummary.js @@ -10,17 +10,15 @@ 'use strict'; -const models = require('./index'); - /** * Class representing a ImageTagCreateSummary. */ class ImageTagCreateSummary { /** * Create a ImageTagCreateSummary. - * @member {array} [created] - * @member {array} [duplicated] - * @member {array} [exceeded] + * @property {array} [created] + * @property {array} [duplicated] + * @property {array} [exceeded] */ constructor() { } @@ -41,6 +39,7 @@ class ImageTagCreateSummary { modelProperties: { created: { required: false, + nullable: true, serializedName: 'created', type: { name: 'Sequence', @@ -56,6 +55,7 @@ class ImageTagCreateSummary { }, duplicated: { required: false, + nullable: true, serializedName: 'duplicated', type: { name: 'Sequence', @@ -71,6 +71,7 @@ class ImageTagCreateSummary { }, exceeded: { required: false, + nullable: true, serializedName: 'exceeded', type: { name: 'Sequence', diff --git a/lib/services/customVision/training/lib/models/imageUrl.js b/lib/services/customVision/training/lib/models/imageUrl.js index 6f97292cdd..31cb128ce9 100644 --- a/lib/services/customVision/training/lib/models/imageUrl.js +++ b/lib/services/customVision/training/lib/models/imageUrl.js @@ -16,7 +16,7 @@ class ImageUrl { /** * Create a ImageUrl. - * @member {string} [url] + * @property {string} [url] */ constructor() { } @@ -37,6 +37,7 @@ class ImageUrl { modelProperties: { url: { required: false, + nullable: true, serializedName: 'url', type: { name: 'String' diff --git a/lib/services/customVision/training/lib/models/imageUrlCreateBatch.js b/lib/services/customVision/training/lib/models/imageUrlCreateBatch.js index 27da5f0223..add1ab85f7 100644 --- a/lib/services/customVision/training/lib/models/imageUrlCreateBatch.js +++ b/lib/services/customVision/training/lib/models/imageUrlCreateBatch.js @@ -10,16 +10,14 @@ 'use strict'; -const models = require('./index'); - /** * Class representing a ImageUrlCreateBatch. */ class ImageUrlCreateBatch { /** * Create a ImageUrlCreateBatch. - * @member {array} [images] - * @member {array} [tagIds] + * @property {array} [images] + * @property {array} [tagIds] */ constructor() { } @@ -40,6 +38,7 @@ class ImageUrlCreateBatch { modelProperties: { images: { required: false, + nullable: true, serializedName: 'images', type: { name: 'Sequence', @@ -55,6 +54,7 @@ class ImageUrlCreateBatch { }, tagIds: { required: false, + nullable: true, serializedName: 'tagIds', type: { name: 'Sequence', diff --git a/lib/services/customVision/training/lib/models/imageUrlCreateEntry.js b/lib/services/customVision/training/lib/models/imageUrlCreateEntry.js index b5574abdc3..1b1feb004f 100644 --- a/lib/services/customVision/training/lib/models/imageUrlCreateEntry.js +++ b/lib/services/customVision/training/lib/models/imageUrlCreateEntry.js @@ -10,17 +10,15 @@ 'use strict'; -const models = require('./index'); - /** * Class representing a ImageUrlCreateEntry. */ class ImageUrlCreateEntry { /** * Create a ImageUrlCreateEntry. - * @member {string} [url] - * @member {array} [tagIds] - * @member {array} [regions] + * @property {string} [url] + * @property {array} [tagIds] + * @property {array} [regions] */ constructor() { } @@ -41,6 +39,7 @@ class ImageUrlCreateEntry { modelProperties: { url: { required: false, + nullable: true, serializedName: 'url', type: { name: 'String' @@ -48,6 +47,7 @@ class ImageUrlCreateEntry { }, tagIds: { required: false, + nullable: true, serializedName: 'tagIds', type: { name: 'Sequence', @@ -62,6 +62,7 @@ class ImageUrlCreateEntry { }, regions: { required: false, + nullable: true, serializedName: 'regions', type: { name: 'Sequence', diff --git a/lib/services/customVision/training/lib/models/index.d.ts b/lib/services/customVision/training/lib/models/index.d.ts index 979a7f3cbc..767b7d2bd1 100644 --- a/lib/services/customVision/training/lib/models/index.d.ts +++ b/lib/services/customVision/training/lib/models/index.d.ts @@ -1,66 +1,113 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import * as moment from "moment"; - -/** - * @class - * Initializes a new instance of the Domain class. - * @constructor - * @member {uuid} [id] - * @member {string} [name] - * @member {string} [type] Possible values include: 'Classification', - * 'ObjectDetection' - * @member {boolean} [exportable] - * @member {boolean} [enabled] - */ export interface Domain { readonly id?: string; readonly name?: string; + /** + * Possible values include: 'Classification', 'ObjectDetection' + */ readonly type?: string; readonly exportable?: boolean; readonly enabled?: boolean; } /** - * @class - * Initializes a new instance of the ImageTag class. - * @constructor - * @member {uuid} [tagId] - * @member {string} [tagName] - * @member {date} [created] - */ + * Entry associating a tag to an image. +*/ +export interface ImageTagCreateEntry { + /** + * Id of the image. + */ + imageId?: string; + /** + * Id of the tag. + */ + tagId?: string; +} + +/** + * Batch of image tags. +*/ +export interface ImageTagCreateBatch { + /** + * Image Tag entries to include in this batch. + */ + tags?: ImageTagCreateEntry[]; +} + +export interface ImageTagCreateSummary { + created?: ImageTagCreateEntry[]; + duplicated?: ImageTagCreateEntry[]; + exceeded?: ImageTagCreateEntry[]; +} + +/** + * Entry associating a region to an image. +*/ +export interface ImageRegionCreateEntry { + /** + * Id of the image. + */ + imageId?: string; + /** + * Id of the tag associated with this region. + */ + tagId?: string; + left?: number; + top?: number; + width?: number; + height?: number; +} + +/** + * Batch of image region information to create. +*/ +export interface ImageRegionCreateBatch { + regions?: ImageRegionCreateEntry[]; +} + +export interface ImageRegionCreateResult { + readonly imageId?: string; + readonly regionId?: string; + readonly tagName?: string; + readonly created?: Date; + /** + * Id of the tag associated with this region. + */ + tagId?: string; + left?: number; + top?: number; + width?: number; + height?: number; +} + +export interface ImageRegionCreateSummary { + created?: ImageRegionCreateResult[]; + duplicated?: ImageRegionCreateEntry[]; + exceeded?: ImageRegionCreateEntry[]; +} + export interface ImageTag { readonly tagId?: string; readonly tagName?: string; readonly created?: Date; } -/** - * @class - * Initializes a new instance of the ImageRegion class. - * @constructor - * @member {uuid} [regionId] - * @member {string} [tagName] - * @member {date} [created] - * @member {uuid} [tagId] - * @member {number} [left] - * @member {number} [top] - * @member {number} [width] - * @member {number} [height] - */ export interface ImageRegion { readonly regionId?: string; readonly tagName?: string; readonly created?: Date; + /** + * Id of the tag associated with this region. + */ tagId?: string; left?: number; top?: number; @@ -69,79 +116,80 @@ export interface ImageRegion { } /** - * @class - * Initializes a new instance of the Image class. - * @constructor - * Image model to be sent as JSON - * - * @member {uuid} [id] - * @member {date} [created] - * @member {number} [width] - * @member {number} [height] - * @member {string} [imageUri] - * @member {string} [thumbnailUri] - * @member {array} [tags] - * @member {array} [regions] - */ + * Image model to be sent as JSON. +*/ export interface Image { + /** + * Id of the image. + */ readonly id?: string; + /** + * Date the image was created. + */ readonly created?: Date; + /** + * Width of the image. + */ readonly width?: number; + /** + * Height of the image. + */ readonly height?: number; - readonly imageUri?: string; + /** + * The URI to the (resized) image used for training. + */ + readonly resizedImageUri?: string; + /** + * The URI to the thumbnail of the original image. + */ readonly thumbnailUri?: string; + /** + * The URI to the original uploaded image. + */ + readonly originalImageUri?: string; + /** + * Tags associated with this image. + */ readonly tags?: ImageTag[]; + /** + * Regions associated with this image. + */ readonly regions?: ImageRegion[]; } -/** - * @class - * Initializes a new instance of the ImageCreateResult class. - * @constructor - * @member {string} [sourceUrl] - * @member {string} [status] Possible values include: 'OK', 'OKDuplicate', - * 'ErrorSource', 'ErrorImageFormat', 'ErrorImageSize', 'ErrorStorage', - * 'ErrorLimitExceed', 'ErrorTagLimitExceed', 'ErrorRegionLimitExceed', - * 'ErrorUnknown' - * @member {object} [image] - * @member {uuid} [image.id] - * @member {date} [image.created] - * @member {number} [image.width] - * @member {number} [image.height] - * @member {string} [image.imageUri] - * @member {string} [image.thumbnailUri] - * @member {array} [image.tags] - * @member {array} [image.regions] - */ export interface ImageCreateResult { + /** + * Source URL of the image. + */ readonly sourceUrl?: string; + /** + * Status of the image creation. Possible values include: 'OK', 'OKDuplicate', 'ErrorSource', + * 'ErrorImageFormat', 'ErrorImageSize', 'ErrorStorage', 'ErrorLimitExceed', + * 'ErrorTagLimitExceed', 'ErrorRegionLimitExceed', 'ErrorUnknown', + * 'ErrorNegativeAndRegularTagOnSameImage' + */ readonly status?: string; + /** + * The image. + */ readonly image?: Image; } -/** - * @class - * Initializes a new instance of the ImageCreateSummary class. - * @constructor - * @member {boolean} [isBatchSuccessful] - * @member {array} [images] - */ export interface ImageCreateSummary { + /** + * True if all of the images in the batch were created successfully, otherwise false. + */ readonly isBatchSuccessful?: boolean; + /** + * List of the image creation results. + */ readonly images?: ImageCreateResult[]; } -/** - * @class - * Initializes a new instance of the Region class. - * @constructor - * @member {uuid} [tagId] - * @member {number} [left] - * @member {number} [top] - * @member {number} [width] - * @member {number} [height] - */ export interface Region { + /** + * Id of the tag associated with this region. + */ tagId?: string; left?: number; top?: number; @@ -149,15 +197,6 @@ export interface Region { height?: number; } -/** - * @class - * Initializes a new instance of the ImageFileCreateEntry class. - * @constructor - * @member {string} [name] - * @member {buffer} [contents] - * @member {array} [tagIds] - * @member {array} [regions] - */ export interface ImageFileCreateEntry { name?: string; contents?: Buffer; @@ -165,187 +204,33 @@ export interface ImageFileCreateEntry { regions?: Region[]; } -/** - * @class - * Initializes a new instance of the ImageFileCreateBatch class. - * @constructor - * @member {array} [images] - * @member {array} [tagIds] - */ export interface ImageFileCreateBatch { images?: ImageFileCreateEntry[]; tagIds?: string[]; } -/** - * @class - * Initializes a new instance of the ImageUrlCreateEntry class. - * @constructor - * @member {string} [url] - * @member {array} [tagIds] - * @member {array} [regions] - */ export interface ImageUrlCreateEntry { url?: string; tagIds?: string[]; regions?: Region[]; } -/** - * @class - * Initializes a new instance of the ImageUrlCreateBatch class. - * @constructor - * @member {array} [images] - * @member {array} [tagIds] - */ export interface ImageUrlCreateBatch { images?: ImageUrlCreateEntry[]; tagIds?: string[]; } -/** - * @class - * Initializes a new instance of the ImageIdCreateEntry class. - * @constructor - * @member {uuid} [id] - * @member {array} [tagIds] - * @member {array} [regions] - */ export interface ImageIdCreateEntry { id?: string; tagIds?: string[]; regions?: Region[]; } -/** - * @class - * Initializes a new instance of the ImageIdCreateBatch class. - * @constructor - * @member {array} [images] - * @member {array} [tagIds] - */ export interface ImageIdCreateBatch { images?: ImageIdCreateEntry[]; tagIds?: string[]; } -/** - * @class - * Initializes a new instance of the ImageTagCreateEntry class. - * @constructor - * @member {uuid} [imageId] - * @member {uuid} [tagId] - */ -export interface ImageTagCreateEntry { - imageId?: string; - tagId?: string; -} - -/** - * @class - * Initializes a new instance of the ImageTagCreateBatch class. - * @constructor - * @member {array} [tags] - */ -export interface ImageTagCreateBatch { - tags?: ImageTagCreateEntry[]; -} - -/** - * @class - * Initializes a new instance of the ImageTagCreateSummary class. - * @constructor - * @member {array} [created] - * @member {array} [duplicated] - * @member {array} [exceeded] - */ -export interface ImageTagCreateSummary { - created?: ImageTagCreateEntry[]; - duplicated?: ImageTagCreateEntry[]; - exceeded?: ImageTagCreateEntry[]; -} - -/** - * @class - * Initializes a new instance of the ImageRegionCreateEntry class. - * @constructor - * @member {uuid} [imageId] - * @member {uuid} [tagId] - * @member {number} [left] - * @member {number} [top] - * @member {number} [width] - * @member {number} [height] - */ -export interface ImageRegionCreateEntry { - imageId?: string; - tagId?: string; - left?: number; - top?: number; - width?: number; - height?: number; -} - -/** - * @class - * Initializes a new instance of the ImageRegionCreateBatch class. - * @constructor - * Batch of image region information to create. - * - * @member {array} [regions] - */ -export interface ImageRegionCreateBatch { - regions?: ImageRegionCreateEntry[]; -} - -/** - * @class - * Initializes a new instance of the ImageRegionCreateResult class. - * @constructor - * @member {uuid} [imageId] - * @member {uuid} [regionId] - * @member {string} [tagName] - * @member {date} [created] - * @member {uuid} [tagId] - * @member {number} [left] - * @member {number} [top] - * @member {number} [width] - * @member {number} [height] - */ -export interface ImageRegionCreateResult { - readonly imageId?: string; - readonly regionId?: string; - readonly tagName?: string; - readonly created?: Date; - tagId?: string; - left?: number; - top?: number; - width?: number; - height?: number; -} - -/** - * @class - * Initializes a new instance of the ImageRegionCreateSummary class. - * @constructor - * @member {array} [created] - * @member {array} [duplicated] - * @member {array} [exceeded] - */ -export interface ImageRegionCreateSummary { - created?: ImageRegionCreateResult[]; - duplicated?: ImageRegionCreateEntry[]; - exceeded?: ImageRegionCreateEntry[]; -} - -/** - * @class - * Initializes a new instance of the BoundingBox class. - * @constructor - * @member {number} [left] - * @member {number} [top] - * @member {number} [width] - * @member {number} [height] - */ export interface BoundingBox { left?: number; top?: number; @@ -353,69 +238,49 @@ export interface BoundingBox { height?: number; } -/** - * @class - * Initializes a new instance of the RegionProposal class. - * @constructor - * @member {number} [confidence] - * @member {object} [boundingBox] - * @member {number} [boundingBox.left] - * @member {number} [boundingBox.top] - * @member {number} [boundingBox.width] - * @member {number} [boundingBox.height] - */ export interface RegionProposal { readonly confidence?: number; readonly boundingBox?: BoundingBox; } -/** - * @class - * Initializes a new instance of the ImageRegionProposal class. - * @constructor - * @member {uuid} [projectId] - * @member {uuid} [imageId] - * @member {array} [proposals] - */ export interface ImageRegionProposal { readonly projectId?: string; readonly imageId?: string; readonly proposals?: RegionProposal[]; } -/** - * @class - * Initializes a new instance of the PredictionQueryTag class. - * @constructor - * @member {uuid} [id] - * @member {number} [minThreshold] - * @member {number} [maxThreshold] - */ +export interface ImageUrl { + url?: string; +} + +export interface Prediction { + readonly probability?: number; + readonly tagId?: string; + readonly tagName?: string; + readonly boundingBox?: BoundingBox; +} + +export interface ImagePrediction { + readonly id?: string; + readonly project?: string; + readonly iteration?: string; + readonly created?: Date; + readonly predictions?: Prediction[]; +} + export interface PredictionQueryTag { readonly id?: string; readonly minThreshold?: number; readonly maxThreshold?: number; } -/** - * @class - * Initializes a new instance of the PredictionQueryToken class. - * @constructor - * @member {string} [session] - * @member {string} [continuation] - * @member {number} [maxCount] - * @member {string} [orderBy] Possible values include: 'Newest', 'Oldest', - * 'Suggested' - * @member {array} [tags] - * @member {uuid} [iterationId] - * @member {date} [startTime] - * @member {date} [endTime] - * @member {string} [application] - */ export interface PredictionQueryToken { session?: string; continuation?: string; maxCount?: number; + /** + * Possible values include: 'Newest', 'Oldest', 'Suggested' + */ orderBy?: string; tags?: PredictionQueryTag[]; iterationId?: string; @@ -425,43 +290,24 @@ export interface PredictionQueryToken { } /** - * @class - * Initializes a new instance of the Prediction class. - * @constructor - * @member {number} [probability] - * @member {uuid} [tagId] - * @member {string} [tagName] - * @member {object} [boundingBox] - * @member {number} [boundingBox.left] - * @member {number} [boundingBox.top] - * @member {number} [boundingBox.width] - * @member {number} [boundingBox.height] - */ -export interface Prediction { - readonly probability?: number; - readonly tagId?: string; - readonly tagName?: string; - readonly boundingBox?: BoundingBox; -} - -/** - * @class - * Initializes a new instance of the StoredImagePrediction class. - * @constructor - * result of an image classification request - * - * @member {string} [imageUri] - * @member {string} [thumbnailUri] - * @member {uuid} [domain] - * @member {uuid} [id] - * @member {uuid} [project] - * @member {uuid} [iteration] - * @member {date} [created] - * @member {array} [predictions] - */ + * result of an image classification request. +*/ export interface StoredImagePrediction { - readonly imageUri?: string; + /** + * The URI to the (resized) prediction image. + */ + readonly resizedImageUri?: string; + /** + * The URI to the thumbnail of the original prediction image. + */ readonly thumbnailUri?: string; + /** + * The URI to the original prediction image. + */ + readonly originalImageUri?: string; + /** + * Domain used for the prediction. + */ readonly domain?: string; readonly id?: string; readonly project?: string; @@ -470,207 +316,72 @@ export interface StoredImagePrediction { readonly predictions?: Prediction[]; } -/** - * @class - * Initializes a new instance of the PredictionQueryResult class. - * @constructor - * @member {object} [token] - * @member {string} [token.session] - * @member {string} [token.continuation] - * @member {number} [token.maxCount] - * @member {string} [token.orderBy] Possible values include: 'Newest', - * 'Oldest', 'Suggested' - * @member {array} [token.tags] - * @member {uuid} [token.iterationId] - * @member {date} [token.startTime] - * @member {date} [token.endTime] - * @member {string} [token.application] - * @member {array} [results] - */ export interface PredictionQueryResult { readonly token?: PredictionQueryToken; readonly results?: StoredImagePrediction[]; } /** - * @class - * Initializes a new instance of the ImageUrl class. - * @constructor - * @member {string} [url] - */ -export interface ImageUrl { - url?: string; -} - -/** - * @class - * Initializes a new instance of the ImagePrediction class. - * @constructor - * @member {uuid} [id] - * @member {uuid} [project] - * @member {uuid} [iteration] - * @member {date} [created] - * @member {array} [predictions] - */ -export interface ImagePrediction { - readonly id?: string; - readonly project?: string; - readonly iteration?: string; - readonly created?: Date; - readonly predictions?: Prediction[]; -} - -/** - * @class - * Initializes a new instance of the Iteration class. - * @constructor - * Iteration model to be sent over JSON - * - * @member {uuid} [id] Gets the id of the iteration - * @member {string} [name] Gets or sets the name of the iteration - * @member {boolean} [isDefault] Gets or sets a value indicating whether the - * iteration is the default iteration for the project - * @member {string} [status] Gets the current iteration status - * @member {date} [created] Gets the time this iteration was completed - * @member {date} [lastModified] Gets the time this iteration was last modified - * @member {date} [trainedAt] Gets the time this iteration was last modified - * @member {uuid} [projectId] Gets the project id of the iteration - * @member {boolean} [exportable] Whether the iteration can be exported to - * another format for download - * @member {uuid} [domainId] Get or sets a guid of the domain the iteration has - * been trained on - * @member {string} [classificationType] Gets the classification type of the - * project. Possible values include: 'Multiclass', 'Multilabel' - */ -export interface Iteration { - readonly id?: string; - name?: string; - isDefault?: boolean; - readonly status?: string; - readonly created?: Date; - readonly lastModified?: Date; - readonly trainedAt?: Date; - readonly projectId?: string; - readonly exportable?: boolean; - readonly domainId?: string; - readonly classificationType?: string; -} - -/** - * @class - * Initializes a new instance of the ProjectSettings class. - * @constructor - * Represents settings associated with a project - * - * @member {uuid} [domainId] Gets or sets the id of the Domain to use with this - * project - * @member {string} [classificationType] Gets or sets the classification type - * of the project. Possible values include: 'Multiclass', 'Multilabel' - */ -export interface ProjectSettings { - domainId?: string; - classificationType?: string; -} - -/** - * @class - * Initializes a new instance of the Project class. - * @constructor - * Represents a project - * - * @member {uuid} [id] Gets the project id - * @member {string} [name] Gets or sets the name of the project - * @member {string} [description] Gets or sets the description of the project - * @member {object} [settings] Gets or sets the project settings - * @member {uuid} [settings.domainId] Gets or sets the id of the Domain to use - * with this project - * @member {string} [settings.classificationType] Gets or sets the - * classification type of the project. Possible values include: 'Multiclass', - * 'Multilabel' - * @member {date} [created] Gets the date this project was created - * @member {date} [lastModified] Gets the date this project was last modifed - * @member {string} [thumbnailUri] Gets the thumbnail url representing the - * project - */ -export interface Project { - readonly id?: string; - name?: string; - description?: string; - settings?: ProjectSettings; - readonly created?: Date; - readonly lastModified?: Date; - readonly thumbnailUri?: string; -} - -/** - * @class - * Initializes a new instance of the TagPerformance class. - * @constructor - * Represents performance data for a particular tag in a trained iteration - * - * @member {uuid} [id] - * @member {string} [name] - * @member {number} [precision] Gets the precision - * @member {number} [precisionStdDeviation] Gets the standard deviation for the - * precision - * @member {number} [recall] Gets the recall - * @member {number} [recallStdDeviation] Gets the standard deviation for the - * recall - * @member {number} [averagePrecision] Gets the average precision when - * applicable - */ + * Represents performance data for a particular tag in a trained iteration. +*/ export interface TagPerformance { readonly id?: string; readonly name?: string; + /** + * Gets the precision. + */ readonly precision?: number; + /** + * Gets the standard deviation for the precision. + */ readonly precisionStdDeviation?: number; + /** + * Gets the recall. + */ readonly recall?: number; + /** + * Gets the standard deviation for the recall. + */ readonly recallStdDeviation?: number; + /** + * Gets the average precision when applicable. + */ readonly averagePrecision?: number; } /** - * @class - * Initializes a new instance of the IterationPerformance class. - * @constructor - * Represents the detailed performance data for a trained iteration - * - * @member {array} [perTagPerformance] Gets the per-tag performance details for - * this iteration - * @member {number} [precision] Gets the precision - * @member {number} [precisionStdDeviation] Gets the standard deviation for the - * precision - * @member {number} [recall] Gets the recall - * @member {number} [recallStdDeviation] Gets the standard deviation for the - * recall - * @member {number} [averagePrecision] Gets the average precision when - * applicable - */ + * Represents the detailed performance data for a trained iteration. +*/ export interface IterationPerformance { + /** + * Gets the per-tag performance details for this iteration. + */ readonly perTagPerformance?: TagPerformance[]; + /** + * Gets the precision. + */ readonly precision?: number; + /** + * Gets the standard deviation for the precision. + */ readonly precisionStdDeviation?: number; + /** + * Gets the recall. + */ readonly recall?: number; + /** + * Gets the standard deviation for the recall. + */ readonly recallStdDeviation?: number; + /** + * Gets the average precision when applicable. + */ readonly averagePrecision?: number; } /** - * @class - * Initializes a new instance of the ImagePerformance class. - * @constructor - * Image performance model - * - * @member {array} [predictions] - * @member {uuid} [id] - * @member {date} [created] - * @member {number} [width] - * @member {number} [height] - * @member {string} [imageUri] - * @member {string} [thumbnailUri] - * @member {array} [tags] - * @member {array} [regions] - */ + * Image performance model. +*/ export interface ImagePerformance { readonly predictions?: Prediction[]; readonly id?: string; @@ -684,39 +395,152 @@ export interface ImagePerformance { } /** - * @class - * Initializes a new instance of the ExportModel class. - * @constructor - * @member {string} [platform] Possible values include: 'CoreML', 'TensorFlow', - * 'DockerFile', 'ONNX' - * @member {string} [status] Possible values include: 'Exporting', 'Failed', - * 'Done' - * @member {string} [downloadUri] - * @member {string} [flavor] Possible values include: 'Linux', 'Windows' - * @member {boolean} [newerVersionAvailable] - */ + * Represents settings associated with a project. +*/ +export interface ProjectSettings { + /** + * Gets or sets the id of the Domain to use with this project. + */ + domainId?: string; + /** + * Gets or sets the classification type of the project. Possible values include: 'Multiclass', + * 'Multilabel' + */ + classificationType?: string; +} + +/** + * Represents a project. +*/ +export interface Project { + /** + * Gets The project id. + */ + readonly id?: string; + /** + * Gets or sets the name of the project. + */ + name?: string; + /** + * Gets or sets the description of the project. + */ + description?: string; + /** + * Gets or sets the project settings. + */ + settings?: ProjectSettings; + /** + * Gets the date this project was created. + */ + readonly created?: Date; + /** + * Gets the date this project was last modifed. + */ + readonly lastModified?: Date; + /** + * Gets the thumbnail url representing the project. + */ + readonly thumbnailUri?: string; +} + +/** + * Iteration model to be sent over JSON. +*/ +export interface Iteration { + /** + * Gets the id of the iteration. + */ + readonly id?: string; + /** + * Gets or sets the name of the iteration. + */ + name?: string; + /** + * Gets or sets a value indicating whether the iteration is the default iteration for the + * project. + */ + isDefault?: boolean; + /** + * Gets the current iteration status. + */ + readonly status?: string; + /** + * Gets the time this iteration was completed. + */ + readonly created?: Date; + /** + * Gets the time this iteration was last modified. + */ + readonly lastModified?: Date; + /** + * Gets the time this iteration was last modified. + */ + readonly trainedAt?: Date; + /** + * Gets The project id. of the iteration. + */ + readonly projectId?: string; + /** + * Whether the iteration can be exported to another format for download. + */ + readonly exportable?: boolean; + /** + * Get or sets a guid of the domain the iteration has been trained on. + */ + readonly domainId?: string; + /** + * Gets the classification type of the project. Possible values include: 'Multiclass', + * 'Multilabel' + */ + readonly classificationType?: string; +} + export interface ExportModel { + /** + * Platform of the export. Possible values include: 'CoreML', 'TensorFlow', 'DockerFile', 'ONNX' + */ readonly platform?: string; + /** + * Status of the export. Possible values include: 'Exporting', 'Failed', 'Done' + */ readonly status?: string; + /** + * URI used to download the model. + */ readonly downloadUri?: string; + /** + * Flavor of the export. Possible values include: 'Linux', 'Windows', 'ONNX10', 'ONNX12' + */ readonly flavor?: string; + /** + * Indicates an updated version of the export package is available and should be re-exported for + * the latest changes. + */ readonly newerVersionAvailable?: boolean; } /** - * @class - * Initializes a new instance of the Tag class. - * @constructor - * Represents a Tag - * - * @member {uuid} [id] Gets the Tag ID - * @member {string} [name] Gets or sets the name of the tag - * @member {string} [description] Gets or sets the description of the tag - * @member {number} [imageCount] Gets the number of images with this tag - */ + * Represents a Tag. +*/ export interface Tag { + /** + * Gets the Tag ID. + */ readonly id?: string; + /** + * Gets or sets the name of the tag. + */ name?: string; + /** + * Gets or sets the description of the tag. + */ description?: string; + /** + * Gets or sets the type of the tag. Possible values include: 'Regular', 'Negative' + */ + type?: string; + /** + * Gets the number of images with this tag. + */ readonly imageCount?: number; } diff --git a/lib/services/customVision/training/lib/models/index.js b/lib/services/customVision/training/lib/models/index.js index f83c7ff149..73bd1ce372 100644 --- a/lib/services/customVision/training/lib/models/index.js +++ b/lib/services/customVision/training/lib/models/index.js @@ -15,6 +15,13 @@ 'use strict'; exports.Domain = require('./domain'); +exports.ImageTagCreateEntry = require('./imageTagCreateEntry'); +exports.ImageTagCreateBatch = require('./imageTagCreateBatch'); +exports.ImageTagCreateSummary = require('./imageTagCreateSummary'); +exports.ImageRegionCreateEntry = require('./imageRegionCreateEntry'); +exports.ImageRegionCreateBatch = require('./imageRegionCreateBatch'); +exports.ImageRegionCreateResult = require('./imageRegionCreateResult'); +exports.ImageRegionCreateSummary = require('./imageRegionCreateSummary'); exports.ImageTag = require('./imageTag'); exports.ImageRegion = require('./imageRegion'); exports.Image = require('./image'); @@ -27,28 +34,21 @@ exports.ImageUrlCreateEntry = require('./imageUrlCreateEntry'); exports.ImageUrlCreateBatch = require('./imageUrlCreateBatch'); exports.ImageIdCreateEntry = require('./imageIdCreateEntry'); exports.ImageIdCreateBatch = require('./imageIdCreateBatch'); -exports.ImageTagCreateEntry = require('./imageTagCreateEntry'); -exports.ImageTagCreateBatch = require('./imageTagCreateBatch'); -exports.ImageTagCreateSummary = require('./imageTagCreateSummary'); -exports.ImageRegionCreateEntry = require('./imageRegionCreateEntry'); -exports.ImageRegionCreateBatch = require('./imageRegionCreateBatch'); -exports.ImageRegionCreateResult = require('./imageRegionCreateResult'); -exports.ImageRegionCreateSummary = require('./imageRegionCreateSummary'); exports.BoundingBox = require('./boundingBox'); exports.RegionProposal = require('./regionProposal'); exports.ImageRegionProposal = require('./imageRegionProposal'); +exports.ImageUrl = require('./imageUrl'); +exports.Prediction = require('./prediction'); +exports.ImagePrediction = require('./imagePrediction'); exports.PredictionQueryTag = require('./predictionQueryTag'); exports.PredictionQueryToken = require('./predictionQueryToken'); -exports.Prediction = require('./prediction'); exports.StoredImagePrediction = require('./storedImagePrediction'); exports.PredictionQueryResult = require('./predictionQueryResult'); -exports.ImageUrl = require('./imageUrl'); -exports.ImagePrediction = require('./imagePrediction'); -exports.Iteration = require('./iteration'); -exports.ProjectSettings = require('./projectSettings'); -exports.Project = require('./project'); exports.TagPerformance = require('./tagPerformance'); exports.IterationPerformance = require('./iterationPerformance'); exports.ImagePerformance = require('./imagePerformance'); +exports.ProjectSettings = require('./projectSettings'); +exports.Project = require('./project'); +exports.Iteration = require('./iteration'); exports.ExportModel = require('./exportModel'); exports.Tag = require('./tag'); diff --git a/lib/services/customVision/training/lib/models/iteration.js b/lib/services/customVision/training/lib/models/iteration.js index 939593bbf1..5d6592bba0 100644 --- a/lib/services/customVision/training/lib/models/iteration.js +++ b/lib/services/customVision/training/lib/models/iteration.js @@ -11,28 +11,29 @@ 'use strict'; /** - * Iteration model to be sent over JSON + * Iteration model to be sent over JSON. * */ class Iteration { /** * Create a Iteration. - * @member {uuid} [id] Gets the id of the iteration - * @member {string} [name] Gets or sets the name of the iteration - * @member {boolean} [isDefault] Gets or sets a value indicating whether the - * iteration is the default iteration for the project - * @member {string} [status] Gets the current iteration status - * @member {date} [created] Gets the time this iteration was completed - * @member {date} [lastModified] Gets the time this iteration was last - * modified - * @member {date} [trainedAt] Gets the time this iteration was last modified - * @member {uuid} [projectId] Gets the project id of the iteration - * @member {boolean} [exportable] Whether the iteration can be exported to - * another format for download - * @member {uuid} [domainId] Get or sets a guid of the domain the iteration - * has been trained on - * @member {string} [classificationType] Gets the classification type of the - * project. Possible values include: 'Multiclass', 'Multilabel' + * @property {uuid} [id] Gets the id of the iteration. + * @property {string} [name] Gets or sets the name of the iteration. + * @property {boolean} [isDefault] Gets or sets a value indicating whether + * the iteration is the default iteration for the project. + * @property {string} [status] Gets the current iteration status. + * @property {date} [created] Gets the time this iteration was completed. + * @property {date} [lastModified] Gets the time this iteration was last + * modified. + * @property {date} [trainedAt] Gets the time this iteration was last + * modified. + * @property {uuid} [projectId] Gets The project id. of the iteration. + * @property {boolean} [exportable] Whether the iteration can be exported to + * another format for download. + * @property {uuid} [domainId] Get or sets a guid of the domain the iteration + * has been trained on. + * @property {string} [classificationType] Gets the classification type of + * the project. Possible values include: 'Multiclass', 'Multilabel' */ constructor() { } @@ -53,6 +54,7 @@ class Iteration { modelProperties: { id: { required: false, + nullable: false, readOnly: true, serializedName: 'id', type: { @@ -61,6 +63,7 @@ class Iteration { }, name: { required: false, + nullable: true, serializedName: 'name', type: { name: 'String' @@ -68,6 +71,7 @@ class Iteration { }, isDefault: { required: false, + nullable: false, serializedName: 'isDefault', type: { name: 'Boolean' @@ -75,6 +79,7 @@ class Iteration { }, status: { required: false, + nullable: true, readOnly: true, serializedName: 'status', type: { @@ -83,6 +88,7 @@ class Iteration { }, created: { required: false, + nullable: false, readOnly: true, serializedName: 'created', type: { @@ -91,6 +97,7 @@ class Iteration { }, lastModified: { required: false, + nullable: false, readOnly: true, serializedName: 'lastModified', type: { @@ -99,6 +106,7 @@ class Iteration { }, trainedAt: { required: false, + nullable: true, readOnly: true, serializedName: 'trainedAt', type: { @@ -107,6 +115,7 @@ class Iteration { }, projectId: { required: false, + nullable: false, readOnly: true, serializedName: 'projectId', type: { @@ -115,6 +124,7 @@ class Iteration { }, exportable: { required: false, + nullable: false, readOnly: true, serializedName: 'exportable', type: { @@ -123,6 +133,7 @@ class Iteration { }, domainId: { required: false, + nullable: true, readOnly: true, serializedName: 'domainId', type: { @@ -131,6 +142,7 @@ class Iteration { }, classificationType: { required: false, + nullable: true, readOnly: true, serializedName: 'classificationType', type: { diff --git a/lib/services/customVision/training/lib/models/iterationPerformance.js b/lib/services/customVision/training/lib/models/iterationPerformance.js index 54b1ee5d47..a0349f84b1 100644 --- a/lib/services/customVision/training/lib/models/iterationPerformance.js +++ b/lib/services/customVision/training/lib/models/iterationPerformance.js @@ -10,25 +10,23 @@ 'use strict'; -const models = require('./index'); - /** - * Represents the detailed performance data for a trained iteration + * Represents the detailed performance data for a trained iteration. * */ class IterationPerformance { /** * Create a IterationPerformance. - * @member {array} [perTagPerformance] Gets the per-tag performance details - * for this iteration - * @member {number} [precision] Gets the precision - * @member {number} [precisionStdDeviation] Gets the standard deviation for - * the precision - * @member {number} [recall] Gets the recall - * @member {number} [recallStdDeviation] Gets the standard deviation for the - * recall - * @member {number} [averagePrecision] Gets the average precision when - * applicable + * @property {array} [perTagPerformance] Gets the per-tag performance details + * for this iteration. + * @property {number} [precision] Gets the precision. + * @property {number} [precisionStdDeviation] Gets the standard deviation for + * the precision. + * @property {number} [recall] Gets the recall. + * @property {number} [recallStdDeviation] Gets the standard deviation for + * the recall. + * @property {number} [averagePrecision] Gets the average precision when + * applicable. */ constructor() { } @@ -49,6 +47,7 @@ class IterationPerformance { modelProperties: { perTagPerformance: { required: false, + nullable: true, readOnly: true, serializedName: 'perTagPerformance', type: { @@ -65,6 +64,7 @@ class IterationPerformance { }, precision: { required: false, + nullable: false, readOnly: true, serializedName: 'precision', type: { @@ -73,6 +73,7 @@ class IterationPerformance { }, precisionStdDeviation: { required: false, + nullable: false, readOnly: true, serializedName: 'precisionStdDeviation', type: { @@ -81,6 +82,7 @@ class IterationPerformance { }, recall: { required: false, + nullable: false, readOnly: true, serializedName: 'recall', type: { @@ -89,6 +91,7 @@ class IterationPerformance { }, recallStdDeviation: { required: false, + nullable: false, readOnly: true, serializedName: 'recallStdDeviation', type: { @@ -97,6 +100,7 @@ class IterationPerformance { }, averagePrecision: { required: false, + nullable: true, readOnly: true, serializedName: 'averagePrecision', type: { diff --git a/lib/services/customVision/training/lib/models/prediction.js b/lib/services/customVision/training/lib/models/prediction.js index fc8ea02918..b069516a77 100644 --- a/lib/services/customVision/training/lib/models/prediction.js +++ b/lib/services/customVision/training/lib/models/prediction.js @@ -10,22 +10,20 @@ 'use strict'; -const models = require('./index'); - /** * Class representing a Prediction. */ class Prediction { /** * Create a Prediction. - * @member {number} [probability] - * @member {uuid} [tagId] - * @member {string} [tagName] - * @member {object} [boundingBox] - * @member {number} [boundingBox.left] - * @member {number} [boundingBox.top] - * @member {number} [boundingBox.width] - * @member {number} [boundingBox.height] + * @property {number} [probability] + * @property {uuid} [tagId] + * @property {string} [tagName] + * @property {object} [boundingBox] + * @property {number} [boundingBox.left] + * @property {number} [boundingBox.top] + * @property {number} [boundingBox.width] + * @property {number} [boundingBox.height] */ constructor() { } @@ -46,6 +44,7 @@ class Prediction { modelProperties: { probability: { required: false, + nullable: false, readOnly: true, serializedName: 'probability', type: { @@ -54,6 +53,7 @@ class Prediction { }, tagId: { required: false, + nullable: false, readOnly: true, serializedName: 'tagId', type: { @@ -62,6 +62,7 @@ class Prediction { }, tagName: { required: false, + nullable: true, readOnly: true, serializedName: 'tagName', type: { diff --git a/lib/services/customVision/training/lib/models/predictionQueryResult.js b/lib/services/customVision/training/lib/models/predictionQueryResult.js index f4ac0f961f..2d16a6d156 100644 --- a/lib/services/customVision/training/lib/models/predictionQueryResult.js +++ b/lib/services/customVision/training/lib/models/predictionQueryResult.js @@ -10,26 +10,24 @@ 'use strict'; -const models = require('./index'); - /** * Class representing a PredictionQueryResult. */ class PredictionQueryResult { /** * Create a PredictionQueryResult. - * @member {object} [token] - * @member {string} [token.session] - * @member {string} [token.continuation] - * @member {number} [token.maxCount] - * @member {string} [token.orderBy] Possible values include: 'Newest', + * @property {object} [token] + * @property {string} [token.session] + * @property {string} [token.continuation] + * @property {number} [token.maxCount] + * @property {string} [token.orderBy] Possible values include: 'Newest', * 'Oldest', 'Suggested' - * @member {array} [token.tags] - * @member {uuid} [token.iterationId] - * @member {date} [token.startTime] - * @member {date} [token.endTime] - * @member {string} [token.application] - * @member {array} [results] + * @property {array} [token.tags] + * @property {uuid} [token.iterationId] + * @property {date} [token.startTime] + * @property {date} [token.endTime] + * @property {string} [token.application] + * @property {array} [results] */ constructor() { } @@ -59,6 +57,7 @@ class PredictionQueryResult { }, results: { required: false, + nullable: true, readOnly: true, serializedName: 'results', type: { diff --git a/lib/services/customVision/training/lib/models/predictionQueryTag.js b/lib/services/customVision/training/lib/models/predictionQueryTag.js index 1e991136cb..7268f9ef81 100644 --- a/lib/services/customVision/training/lib/models/predictionQueryTag.js +++ b/lib/services/customVision/training/lib/models/predictionQueryTag.js @@ -16,9 +16,9 @@ class PredictionQueryTag { /** * Create a PredictionQueryTag. - * @member {uuid} [id] - * @member {number} [minThreshold] - * @member {number} [maxThreshold] + * @property {uuid} [id] + * @property {number} [minThreshold] + * @property {number} [maxThreshold] */ constructor() { } @@ -39,6 +39,7 @@ class PredictionQueryTag { modelProperties: { id: { required: false, + nullable: false, readOnly: true, serializedName: 'id', type: { @@ -47,6 +48,7 @@ class PredictionQueryTag { }, minThreshold: { required: false, + nullable: false, readOnly: true, serializedName: 'minThreshold', type: { @@ -55,6 +57,7 @@ class PredictionQueryTag { }, maxThreshold: { required: false, + nullable: false, readOnly: true, serializedName: 'maxThreshold', type: { diff --git a/lib/services/customVision/training/lib/models/predictionQueryToken.js b/lib/services/customVision/training/lib/models/predictionQueryToken.js index e58cdfd992..b13a32336b 100644 --- a/lib/services/customVision/training/lib/models/predictionQueryToken.js +++ b/lib/services/customVision/training/lib/models/predictionQueryToken.js @@ -10,24 +10,22 @@ 'use strict'; -const models = require('./index'); - /** * Class representing a PredictionQueryToken. */ class PredictionQueryToken { /** * Create a PredictionQueryToken. - * @member {string} [session] - * @member {string} [continuation] - * @member {number} [maxCount] - * @member {string} [orderBy] Possible values include: 'Newest', 'Oldest', + * @property {string} [session] + * @property {string} [continuation] + * @property {number} [maxCount] + * @property {string} [orderBy] Possible values include: 'Newest', 'Oldest', * 'Suggested' - * @member {array} [tags] - * @member {uuid} [iterationId] - * @member {date} [startTime] - * @member {date} [endTime] - * @member {string} [application] + * @property {array} [tags] + * @property {uuid} [iterationId] + * @property {date} [startTime] + * @property {date} [endTime] + * @property {string} [application] */ constructor() { } @@ -48,6 +46,7 @@ class PredictionQueryToken { modelProperties: { session: { required: false, + nullable: true, serializedName: 'session', type: { name: 'String' @@ -55,6 +54,7 @@ class PredictionQueryToken { }, continuation: { required: false, + nullable: true, serializedName: 'continuation', type: { name: 'String' @@ -62,6 +62,7 @@ class PredictionQueryToken { }, maxCount: { required: false, + nullable: false, serializedName: 'maxCount', type: { name: 'Number' @@ -69,6 +70,7 @@ class PredictionQueryToken { }, orderBy: { required: false, + nullable: false, serializedName: 'orderBy', type: { name: 'String' @@ -76,6 +78,7 @@ class PredictionQueryToken { }, tags: { required: false, + nullable: true, serializedName: 'tags', type: { name: 'Sequence', @@ -91,6 +94,7 @@ class PredictionQueryToken { }, iterationId: { required: false, + nullable: true, serializedName: 'iterationId', type: { name: 'String' @@ -98,6 +102,7 @@ class PredictionQueryToken { }, startTime: { required: false, + nullable: true, serializedName: 'startTime', type: { name: 'DateTime' @@ -105,6 +110,7 @@ class PredictionQueryToken { }, endTime: { required: false, + nullable: true, serializedName: 'endTime', type: { name: 'DateTime' @@ -112,6 +118,7 @@ class PredictionQueryToken { }, application: { required: false, + nullable: true, serializedName: 'application', type: { name: 'String' diff --git a/lib/services/customVision/training/lib/models/project.js b/lib/services/customVision/training/lib/models/project.js index f5bb16a44f..ae364fb038 100644 --- a/lib/services/customVision/training/lib/models/project.js +++ b/lib/services/customVision/training/lib/models/project.js @@ -10,28 +10,28 @@ 'use strict'; -const models = require('./index'); - /** - * Represents a project + * Represents a project. * */ class Project { /** * Create a Project. - * @member {uuid} [id] Gets the project id - * @member {string} [name] Gets or sets the name of the project - * @member {string} [description] Gets or sets the description of the project - * @member {object} [settings] Gets or sets the project settings - * @member {uuid} [settings.domainId] Gets or sets the id of the Domain to - * use with this project - * @member {string} [settings.classificationType] Gets or sets the + * @property {uuid} [id] Gets The project id. + * @property {string} [name] Gets or sets the name of the project. + * @property {string} [description] Gets or sets the description of the + * project. + * @property {object} [settings] Gets or sets the project settings. + * @property {uuid} [settings.domainId] Gets or sets the id of the Domain to + * use with this project. + * @property {string} [settings.classificationType] Gets or sets the * classification type of the project. Possible values include: 'Multiclass', * 'Multilabel' - * @member {date} [created] Gets the date this project was created - * @member {date} [lastModified] Gets the date this project was last modifed - * @member {string} [thumbnailUri] Gets the thumbnail url representing the - * project + * @property {date} [created] Gets the date this project was created. + * @property {date} [lastModified] Gets the date this project was last + * modifed. + * @property {string} [thumbnailUri] Gets the thumbnail url representing the + * project. */ constructor() { } @@ -52,6 +52,7 @@ class Project { modelProperties: { id: { required: false, + nullable: false, readOnly: true, serializedName: 'id', type: { @@ -60,6 +61,7 @@ class Project { }, name: { required: false, + nullable: true, serializedName: 'name', type: { name: 'String' @@ -67,6 +69,7 @@ class Project { }, description: { required: false, + nullable: true, serializedName: 'description', type: { name: 'String' @@ -82,6 +85,7 @@ class Project { }, created: { required: false, + nullable: false, readOnly: true, serializedName: 'created', type: { @@ -90,6 +94,7 @@ class Project { }, lastModified: { required: false, + nullable: false, readOnly: true, serializedName: 'lastModified', type: { @@ -98,6 +103,7 @@ class Project { }, thumbnailUri: { required: false, + nullable: true, readOnly: true, serializedName: 'thumbnailUri', type: { diff --git a/lib/services/customVision/training/lib/models/projectSettings.js b/lib/services/customVision/training/lib/models/projectSettings.js index 1fcde5df96..bb5f9c78cb 100644 --- a/lib/services/customVision/training/lib/models/projectSettings.js +++ b/lib/services/customVision/training/lib/models/projectSettings.js @@ -11,16 +11,16 @@ 'use strict'; /** - * Represents settings associated with a project + * Represents settings associated with a project. * */ class ProjectSettings { /** * Create a ProjectSettings. - * @member {uuid} [domainId] Gets or sets the id of the Domain to use with - * this project - * @member {string} [classificationType] Gets or sets the classification type - * of the project. Possible values include: 'Multiclass', 'Multilabel' + * @property {uuid} [domainId] Gets or sets the id of the Domain to use with + * this project. + * @property {string} [classificationType] Gets or sets the classification + * type of the project. Possible values include: 'Multiclass', 'Multilabel' */ constructor() { } @@ -41,6 +41,7 @@ class ProjectSettings { modelProperties: { domainId: { required: false, + nullable: false, serializedName: 'domainId', type: { name: 'String' @@ -48,6 +49,7 @@ class ProjectSettings { }, classificationType: { required: false, + nullable: true, serializedName: 'classificationType', type: { name: 'String' diff --git a/lib/services/customVision/training/lib/models/region.js b/lib/services/customVision/training/lib/models/region.js index 9ee7894ddc..4dfbc6a615 100644 --- a/lib/services/customVision/training/lib/models/region.js +++ b/lib/services/customVision/training/lib/models/region.js @@ -16,11 +16,11 @@ class Region { /** * Create a Region. - * @member {uuid} [tagId] - * @member {number} [left] - * @member {number} [top] - * @member {number} [width] - * @member {number} [height] + * @property {uuid} [tagId] Id of the tag associated with this region. + * @property {number} [left] + * @property {number} [top] + * @property {number} [width] + * @property {number} [height] */ constructor() { } @@ -41,6 +41,7 @@ class Region { modelProperties: { tagId: { required: false, + nullable: false, serializedName: 'tagId', type: { name: 'String' @@ -48,6 +49,7 @@ class Region { }, left: { required: false, + nullable: false, serializedName: 'left', type: { name: 'Number' @@ -55,6 +57,7 @@ class Region { }, top: { required: false, + nullable: false, serializedName: 'top', type: { name: 'Number' @@ -62,6 +65,7 @@ class Region { }, width: { required: false, + nullable: false, serializedName: 'width', type: { name: 'Number' @@ -69,6 +73,7 @@ class Region { }, height: { required: false, + nullable: false, serializedName: 'height', type: { name: 'Number' diff --git a/lib/services/customVision/training/lib/models/regionProposal.js b/lib/services/customVision/training/lib/models/regionProposal.js index cf2fe1cbd3..f4026b8ea0 100644 --- a/lib/services/customVision/training/lib/models/regionProposal.js +++ b/lib/services/customVision/training/lib/models/regionProposal.js @@ -10,20 +10,18 @@ 'use strict'; -const models = require('./index'); - /** * Class representing a RegionProposal. */ class RegionProposal { /** * Create a RegionProposal. - * @member {number} [confidence] - * @member {object} [boundingBox] - * @member {number} [boundingBox.left] - * @member {number} [boundingBox.top] - * @member {number} [boundingBox.width] - * @member {number} [boundingBox.height] + * @property {number} [confidence] + * @property {object} [boundingBox] + * @property {number} [boundingBox.left] + * @property {number} [boundingBox.top] + * @property {number} [boundingBox.width] + * @property {number} [boundingBox.height] */ constructor() { } @@ -44,6 +42,7 @@ class RegionProposal { modelProperties: { confidence: { required: false, + nullable: false, readOnly: true, serializedName: 'confidence', type: { diff --git a/lib/services/customVision/training/lib/models/storedImagePrediction.js b/lib/services/customVision/training/lib/models/storedImagePrediction.js index 7fc87dd11a..b5d10902f3 100644 --- a/lib/services/customVision/training/lib/models/storedImagePrediction.js +++ b/lib/services/customVision/training/lib/models/storedImagePrediction.js @@ -10,23 +10,25 @@ 'use strict'; -const models = require('./index'); - /** - * result of an image classification request + * result of an image classification request. * */ class StoredImagePrediction { /** * Create a StoredImagePrediction. - * @member {string} [imageUri] - * @member {string} [thumbnailUri] - * @member {uuid} [domain] - * @member {uuid} [id] - * @member {uuid} [project] - * @member {uuid} [iteration] - * @member {date} [created] - * @member {array} [predictions] + * @property {string} [resizedImageUri] The URI to the (resized) prediction + * image. + * @property {string} [thumbnailUri] The URI to the thumbnail of the original + * prediction image. + * @property {string} [originalImageUri] The URI to the original prediction + * image. + * @property {uuid} [domain] Domain used for the prediction. + * @property {uuid} [id] + * @property {uuid} [project] + * @property {uuid} [iteration] + * @property {date} [created] + * @property {array} [predictions] */ constructor() { } @@ -45,24 +47,36 @@ class StoredImagePrediction { name: 'Composite', className: 'StoredImagePrediction', modelProperties: { - imageUri: { + resizedImageUri: { required: false, + nullable: true, readOnly: true, - serializedName: 'imageUri', + serializedName: 'resizedImageUri', type: { name: 'String' } }, thumbnailUri: { required: false, + nullable: true, readOnly: true, serializedName: 'thumbnailUri', type: { name: 'String' } }, + originalImageUri: { + required: false, + nullable: true, + readOnly: true, + serializedName: 'originalImageUri', + type: { + name: 'String' + } + }, domain: { required: false, + nullable: false, readOnly: true, serializedName: 'domain', type: { @@ -71,6 +85,7 @@ class StoredImagePrediction { }, id: { required: false, + nullable: false, readOnly: true, serializedName: 'id', type: { @@ -79,6 +94,7 @@ class StoredImagePrediction { }, project: { required: false, + nullable: false, readOnly: true, serializedName: 'project', type: { @@ -87,6 +103,7 @@ class StoredImagePrediction { }, iteration: { required: false, + nullable: false, readOnly: true, serializedName: 'iteration', type: { @@ -95,6 +112,7 @@ class StoredImagePrediction { }, created: { required: false, + nullable: false, readOnly: true, serializedName: 'created', type: { @@ -103,6 +121,7 @@ class StoredImagePrediction { }, predictions: { required: false, + nullable: true, readOnly: true, serializedName: 'predictions', type: { diff --git a/lib/services/customVision/training/lib/models/tag.js b/lib/services/customVision/training/lib/models/tag.js index 539910a9e2..c75fd69d31 100644 --- a/lib/services/customVision/training/lib/models/tag.js +++ b/lib/services/customVision/training/lib/models/tag.js @@ -11,16 +11,18 @@ 'use strict'; /** - * Represents a Tag + * Represents a Tag. * */ class Tag { /** * Create a Tag. - * @member {uuid} [id] Gets the Tag ID - * @member {string} [name] Gets or sets the name of the tag - * @member {string} [description] Gets or sets the description of the tag - * @member {number} [imageCount] Gets the number of images with this tag + * @property {uuid} [id] Gets the Tag ID. + * @property {string} [name] Gets or sets the name of the tag. + * @property {string} [description] Gets or sets the description of the tag. + * @property {string} [type] Gets or sets the type of the tag. Possible + * values include: 'Regular', 'Negative' + * @property {number} [imageCount] Gets the number of images with this tag. */ constructor() { } @@ -41,6 +43,7 @@ class Tag { modelProperties: { id: { required: false, + nullable: false, readOnly: true, serializedName: 'id', type: { @@ -49,6 +52,7 @@ class Tag { }, name: { required: false, + nullable: true, serializedName: 'name', type: { name: 'String' @@ -56,13 +60,23 @@ class Tag { }, description: { required: false, + nullable: true, serializedName: 'description', type: { name: 'String' } }, + type: { + required: false, + nullable: false, + serializedName: 'type', + type: { + name: 'String' + } + }, imageCount: { required: false, + nullable: false, readOnly: true, serializedName: 'imageCount', type: { diff --git a/lib/services/customVision/training/lib/models/tagPerformance.js b/lib/services/customVision/training/lib/models/tagPerformance.js index a839799129..5cca7a274f 100644 --- a/lib/services/customVision/training/lib/models/tagPerformance.js +++ b/lib/services/customVision/training/lib/models/tagPerformance.js @@ -11,22 +11,22 @@ 'use strict'; /** - * Represents performance data for a particular tag in a trained iteration + * Represents performance data for a particular tag in a trained iteration. * */ class TagPerformance { /** * Create a TagPerformance. - * @member {uuid} [id] - * @member {string} [name] - * @member {number} [precision] Gets the precision - * @member {number} [precisionStdDeviation] Gets the standard deviation for - * the precision - * @member {number} [recall] Gets the recall - * @member {number} [recallStdDeviation] Gets the standard deviation for the - * recall - * @member {number} [averagePrecision] Gets the average precision when - * applicable + * @property {uuid} [id] + * @property {string} [name] + * @property {number} [precision] Gets the precision. + * @property {number} [precisionStdDeviation] Gets the standard deviation for + * the precision. + * @property {number} [recall] Gets the recall. + * @property {number} [recallStdDeviation] Gets the standard deviation for + * the recall. + * @property {number} [averagePrecision] Gets the average precision when + * applicable. */ constructor() { } @@ -47,6 +47,7 @@ class TagPerformance { modelProperties: { id: { required: false, + nullable: false, readOnly: true, serializedName: 'id', type: { @@ -55,6 +56,7 @@ class TagPerformance { }, name: { required: false, + nullable: true, readOnly: true, serializedName: 'name', type: { @@ -63,6 +65,7 @@ class TagPerformance { }, precision: { required: false, + nullable: false, readOnly: true, serializedName: 'precision', type: { @@ -71,6 +74,7 @@ class TagPerformance { }, precisionStdDeviation: { required: false, + nullable: false, readOnly: true, serializedName: 'precisionStdDeviation', type: { @@ -79,6 +83,7 @@ class TagPerformance { }, recall: { required: false, + nullable: false, readOnly: true, serializedName: 'recall', type: { @@ -87,6 +92,7 @@ class TagPerformance { }, recallStdDeviation: { required: false, + nullable: false, readOnly: true, serializedName: 'recallStdDeviation', type: { @@ -95,6 +101,7 @@ class TagPerformance { }, averagePrecision: { required: false, + nullable: true, readOnly: true, serializedName: 'averagePrecision', type: { diff --git a/lib/services/customVision/training/lib/trainingAPIClient.d.ts b/lib/services/customVision/training/lib/trainingAPIClient.d.ts index 58bd7b0778..4e0159ccae 100644 --- a/lib/services/customVision/training/lib/trainingAPIClient.d.ts +++ b/lib/services/customVision/training/lib/trainingAPIClient.d.ts @@ -19,7 +19,7 @@ export default class TrainingAPIClient extends ServiceClient { * * @param {string} apiKey - * - * @param {string} [baseUri] - The base URI of the service. + * @param {string} endpoint - Supported Cognitive Services endpoints * * @param {object} [options] - The parameter options * @@ -31,13 +31,15 @@ export default class TrainingAPIClient extends ServiceClient { * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy * */ - constructor(apiKey: string, baseUri?: string, options?: ServiceClientOptions); + constructor(apiKey: string, endpoint: string, options?: ServiceClientOptions); apiKey: string; + endpoint: string; + /** - * @summary Get a list of the available domains + * @summary Get a list of the available domains. * * @param {object} [options] Optional Parameters. * @@ -53,7 +55,7 @@ export default class TrainingAPIClient extends ServiceClient { getDomainsWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Get a list of the available domains + * @summary Get a list of the available domains. * * @param {object} [options] Optional Parameters. * @@ -87,9 +89,9 @@ export default class TrainingAPIClient extends ServiceClient { /** - * @summary Get information about a specific domain + * @summary Get information about a specific domain. * - * @param {uuid} domainId The id of the domain to get information about + * @param {uuid} domainId The id of the domain to get information about. * * @param {object} [options] Optional Parameters. * @@ -105,9 +107,9 @@ export default class TrainingAPIClient extends ServiceClient { getDomainWithHttpOperationResponse(domainId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Get information about a specific domain + * @summary Get information about a specific domain. * - * @param {uuid} domainId The id of the domain to get information about + * @param {uuid} domainId The id of the domain to get information about. * * @param {object} [options] Optional Parameters. * @@ -142,73 +144,113 @@ export default class TrainingAPIClient extends ServiceClient { /** - * @summary Get tagged images for a given project iteration + * @summary Gets the number of images tagged with the provided {tagIds}. * - * This API supports batching and range selection. By default it will only - * return first 50 images matching images. - * Use the {take} and {skip} parameters to control how many images to return in - * a given batch. * The filtering is on an and/or relationship. For example, if the provided tag * ids are for the "Dog" and * "Cat" tags, then only images tagged with Dog and/or Cat will be returned * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace - * - * @param {array} [options.tagIds] A list of tags ids to filter the images. - * Defaults to all tagged images when null. Limited to 20 - * - * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible - * values include: 'Newest', 'Oldest' + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. * - * @param {number} [options.take] Maximum number of images to return. Defaults - * to 50, limited to 256 - * - * @param {number} [options.skip] Number of images to skip before beginning the - * image batch. Defaults to 0 + * @param {array} [options.tagIds] A list of tags ids to filter the images to + * count. Defaults to all tags when null. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getTaggedImagesWithHttpOperationResponse(projectId: string, options?: { iterationId? : string, tagIds? : string[], orderBy? : string, take? : number, skip? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + getTaggedImageCountWithHttpOperationResponse(projectId: string, options?: { iterationId? : string, tagIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Get tagged images for a given project iteration + * @summary Gets the number of images tagged with the provided {tagIds}. * - * This API supports batching and range selection. By default it will only - * return first 50 images matching images. - * Use the {take} and {skip} parameters to control how many images to return in - * a given batch. * The filtering is on an and/or relationship. For example, if the provided tag * ids are for the "Dog" and * "Cat" tags, then only images tagged with Dog and/or Cat will be returned * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. * - * @param {array} [options.tagIds] A list of tags ids to filter the images. - * Defaults to all tagged images when null. Limited to 20 + * @param {array} [options.tagIds] A list of tags ids to filter the images to + * count. Defaults to all tags when null. * - * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible - * values include: 'Newest', 'Oldest' + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {number} [options.take] Maximum number of images to return. Defaults - * to 50, limited to 256 + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {number} [options.skip] Number of images to skip before beginning the - * image batch. Defaults to 0 + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {Number} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {Number} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getTaggedImageCount(projectId: string, options?: { iterationId? : string, tagIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; + getTaggedImageCount(projectId: string, callback: ServiceCallback): void; + getTaggedImageCount(projectId: string, options: { iterationId? : string, tagIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Gets the number of untagged images. + * + * This API returns the images which have no tags for a given project and + * optionally an iteration. If no iteration is specified the + * current workspace is used. + * + * @param {uuid} projectId The project id. + * + * @param {object} [options] Optional Parameters. + * + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getUntaggedImageCountWithHttpOperationResponse(projectId: string, options?: { iterationId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets the number of untagged images. + * + * This API returns the images which have no tags for a given project and + * optionally an iteration. If no iteration is specified the + * current workspace is used. + * + * @param {uuid} projectId The project id. + * + * @param {object} [options] Optional Parameters. + * + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -220,7 +262,7 @@ export default class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned. * - * @resolve {Array} - The deserialized result object. + * @resolve {Number} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -228,73 +270,114 @@ export default class TrainingAPIClient extends ServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Array} [result] - The deserialized result object if an error did not occur. + * {Number} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getTaggedImages(projectId: string, options?: { iterationId? : string, tagIds? : string[], orderBy? : string, take? : number, skip? : number, customHeaders? : { [headerName: string]: string; } }): Promise; - getTaggedImages(projectId: string, callback: ServiceCallback): void; - getTaggedImages(projectId: string, options: { iterationId? : string, tagIds? : string[], orderBy? : string, take? : number, skip? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getUntaggedImageCount(projectId: string, options?: { iterationId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + getUntaggedImageCount(projectId: string, callback: ServiceCallback): void; + getUntaggedImageCount(projectId: string, options: { iterationId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Get untagged images for a given project iteration + * @summary Associate a set of images with a set of tags. * - * This API supports batching and range selection. By default it will only - * return first 50 images matching images. - * Use the {take} and {skip} parameters to control how many images to return in - * a given batch. + * @param {uuid} projectId The project id. + * + * @param {object} batch Batch of image tags. Limited to 128 tags per batch. * - * @param {uuid} projectId The project id + * @param {array} [batch.tags] Image Tag entries to include in this batch. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible - * values include: 'Newest', 'Oldest' + * @returns {Promise} A promise is returned * - * @param {number} [options.take] Maximum number of images to return. Defaults - * to 50, limited to 256 + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {number} [options.skip] Number of images to skip before beginning the - * image batch. Defaults to 0 + * @reject {Error|ServiceError} - The error object. + */ + createImageTagsWithHttpOperationResponse(projectId: string, batch: models.ImageTagCreateBatch, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Associate a set of images with a set of tags. + * + * @param {uuid} projectId The project id. + * + * @param {object} batch Batch of image tags. Limited to 128 tags per batch. + * + * @param {array} [batch.tags] Image Tag entries to include in this batch. + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * - * @returns {Promise} A promise is returned + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @reject {Error|ServiceError} - The error object. + * {Promise} A promise is returned. + * + * @resolve {ImageTagCreateSummary} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ImageTagCreateSummary} [result] - The deserialized result object if an error did not occur. + * See {@link ImageTagCreateSummary} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getUntaggedImagesWithHttpOperationResponse(projectId: string, options?: { iterationId? : string, orderBy? : string, take? : number, skip? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + createImageTags(projectId: string, batch: models.ImageTagCreateBatch, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createImageTags(projectId: string, batch: models.ImageTagCreateBatch, callback: ServiceCallback): void; + createImageTags(projectId: string, batch: models.ImageTagCreateBatch, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** - * @summary Get untagged images for a given project iteration + * @summary Remove a set of tags from a set of images. * - * This API supports batching and range selection. By default it will only - * return first 50 images matching images. - * Use the {take} and {skip} parameters to control how many images to return in - * a given batch. + * @param {uuid} projectId The project id. * - * @param {uuid} projectId The project id + * @param {array} imageIds Image ids. Limited to 64 images. + * + * @param {array} tagIds Tags to be deleted from the specified images. Limted + * to 20 tags. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible - * values include: 'Newest', 'Oldest' + * @returns {Promise} A promise is returned * - * @param {number} [options.take] Maximum number of images to return. Defaults - * to 50, limited to 256 + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {number} [options.skip] Number of images to skip before beginning the - * image batch. Defaults to 0 + * @reject {Error|ServiceError} - The error object. + */ + deleteImageTagsWithHttpOperationResponse(projectId: string, imageIds: string[], tagIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Remove a set of tags from a set of images. + * + * @param {uuid} projectId The project id. + * + * @param {array} imageIds Image ids. Limited to 64 images. + * + * @param {array} tagIds Tags to be deleted from the specified images. Limted + * to 20 tags. + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -306,7 +389,7 @@ export default class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned. * - * @resolve {Array} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -314,59 +397,59 @@ export default class TrainingAPIClient extends ServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Array} [result] - The deserialized result object if an error did not occur. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getUntaggedImages(projectId: string, options?: { iterationId? : string, orderBy? : string, take? : number, skip? : number, customHeaders? : { [headerName: string]: string; } }): Promise; - getUntaggedImages(projectId: string, callback: ServiceCallback): void; - getUntaggedImages(projectId: string, options: { iterationId? : string, orderBy? : string, take? : number, skip? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteImageTags(projectId: string, imageIds: string[], tagIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteImageTags(projectId: string, imageIds: string[], tagIds: string[], callback: ServiceCallback): void; + deleteImageTags(projectId: string, imageIds: string[], tagIds: string[], options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Gets the number of images tagged with the provided {tagIds} + * @summary Create a set of image regions. * - * The filtering is on an and/or relationship. For example, if the provided tag - * ids are for the "Dog" and - * "Cat" tags, then only images tagged with Dog and/or Cat will be returned + * This API accepts a batch of image regions, and optionally tags, to update + * existing images with region information. + * There is a limit of 64 entries in the batch. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {object} [options] Optional Parameters. + * @param {object} batch Batch of image regions which include a tag and + * bounding box. Limited to 64. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {array} [batch.regions] * - * @param {array} [options.tagIds] A list of tags ids to filter the images to - * count. Defaults to all tags when null. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getTaggedImageCountWithHttpOperationResponse(projectId: string, options?: { iterationId? : string, tagIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; + createImageRegionsWithHttpOperationResponse(projectId: string, batch: models.ImageRegionCreateBatch, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Gets the number of images tagged with the provided {tagIds} + * @summary Create a set of image regions. * - * The filtering is on an and/or relationship. For example, if the provided tag - * ids are for the "Dog" and - * "Cat" tags, then only images tagged with Dog and/or Cat will be returned + * This API accepts a batch of image regions, and optionally tags, to update + * existing images with region information. + * There is a limit of 64 entries in the batch. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {object} [options] Optional Parameters. + * @param {object} batch Batch of image regions which include a tag and + * bounding box. Limited to 64. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {array} [batch.regions] * - * @param {array} [options.tagIds] A list of tags ids to filter the images to - * count. Defaults to all tags when null. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -378,7 +461,7 @@ export default class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned. * - * @resolve {Number} - The deserialized result object. + * @resolve {ImageRegionCreateSummary} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -386,54 +469,48 @@ export default class TrainingAPIClient extends ServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Number} [result] - The deserialized result object if an error did not occur. + * {ImageRegionCreateSummary} [result] - The deserialized result object if an error did not occur. + * See {@link ImageRegionCreateSummary} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getTaggedImageCount(projectId: string, options?: { iterationId? : string, tagIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; - getTaggedImageCount(projectId: string, callback: ServiceCallback): void; - getTaggedImageCount(projectId: string, options: { iterationId? : string, tagIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createImageRegions(projectId: string, batch: models.ImageRegionCreateBatch, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createImageRegions(projectId: string, batch: models.ImageRegionCreateBatch, callback: ServiceCallback): void; + createImageRegions(projectId: string, batch: models.ImageRegionCreateBatch, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Gets the number of untagged images + * @summary Delete a set of image regions. * - * This API returns the images which have no tags for a given project and - * optionally an iteration. If no iteration is specified the - * current workspace is used. + * @param {uuid} projectId The project id. * - * @param {uuid} projectId The project id + * @param {array} regionIds Regions to delete. Limited to 64. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace - * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getUntaggedImageCountWithHttpOperationResponse(projectId: string, options?: { iterationId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteImageRegionsWithHttpOperationResponse(projectId: string, regionIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Gets the number of untagged images + * @summary Delete a set of image regions. * - * This API returns the images which have no tags for a given project and - * optionally an iteration. If no iteration is specified the - * current workspace is used. + * @param {uuid} projectId The project id. * - * @param {uuid} projectId The project id + * @param {array} regionIds Regions to delete. Limited to 64. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -444,7 +521,7 @@ export default class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned. * - * @resolve {Number} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -452,32 +529,45 @@ export default class TrainingAPIClient extends ServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Number} [result] - The deserialized result object if an error did not occur. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getUntaggedImageCount(projectId: string, options?: { iterationId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - getUntaggedImageCount(projectId: string, callback: ServiceCallback): void; - getUntaggedImageCount(projectId: string, options: { iterationId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteImageRegions(projectId: string, regionIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteImageRegions(projectId: string, regionIds: string[], callback: ServiceCallback): void; + deleteImageRegions(projectId: string, regionIds: string[], options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Get images by id for a given project iteration + * @summary Get tagged images for a given project iteration. * - * This API will return a set of Images for the specified tags and optionally - * iteration. If no iteration is specified the - * current workspace is used. + * This API supports batching and range selection. By default it will only + * return first 50 images matching images. + * Use the {take} and {skip} parameters to control how many images to return in + * a given batch. + * The filtering is on an and/or relationship. For example, if the provided tag + * ids are for the "Dog" and + * "Cat" tags, then only images tagged with Dog and/or Cat will be returned * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {array} [options.imageIds] The list of image ids to retrieve. Limited - * to 256 + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. + * + * @param {array} [options.tagIds] A list of tags ids to filter the images. + * Defaults to all tagged images when null. Limited to 20. + * + * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible + * values include: 'Newest', 'Oldest' + * + * @param {number} [options.take] Maximum number of images to return. Defaults + * to 50, limited to 256. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {number} [options.skip] Number of images to skip before beginning the + * image batch. Defaults to 0. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -488,23 +578,36 @@ export default class TrainingAPIClient extends ServiceClient { * * @reject {Error|ServiceError} - The error object. */ - getImagesByIdsWithHttpOperationResponse(projectId: string, options?: { imageIds? : string[], iterationId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + getTaggedImagesWithHttpOperationResponse(projectId: string, options?: { iterationId? : string, tagIds? : string[], orderBy? : string, take? : number, skip? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Get images by id for a given project iteration + * @summary Get tagged images for a given project iteration. * - * This API will return a set of Images for the specified tags and optionally - * iteration. If no iteration is specified the - * current workspace is used. + * This API supports batching and range selection. By default it will only + * return first 50 images matching images. + * Use the {take} and {skip} parameters to control how many images to return in + * a given batch. + * The filtering is on an and/or relationship. For example, if the provided tag + * ids are for the "Dog" and + * "Cat" tags, then only images tagged with Dog and/or Cat will be returned * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {array} [options.imageIds] The list of image ids to retrieve. Limited - * to 256 + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {array} [options.tagIds] A list of tags ids to filter the images. + * Defaults to all tagged images when null. Limited to 20. + * + * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible + * values include: 'Newest', 'Oldest' + * + * @param {number} [options.take] Maximum number of images to return. Defaults + * to 50, limited to 256. + * + * @param {number} [options.skip] Number of images to skip before beginning the + * image batch. Defaults to 0. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -530,53 +633,67 @@ export default class TrainingAPIClient extends ServiceClient { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getImagesByIds(projectId: string, options?: { imageIds? : string[], iterationId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - getImagesByIds(projectId: string, callback: ServiceCallback): void; - getImagesByIds(projectId: string, options: { imageIds? : string[], iterationId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getTaggedImages(projectId: string, options?: { iterationId? : string, tagIds? : string[], orderBy? : string, take? : number, skip? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getTaggedImages(projectId: string, callback: ServiceCallback): void; + getTaggedImages(projectId: string, options: { iterationId? : string, tagIds? : string[], orderBy? : string, take? : number, skip? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Add the provided images to the set of training images - * - * This API accepts body content as multipart/form-data and - * application/octet-stream. When using multipart - * multiple image files can be sent at once, with a maximum of 64 files + * @summary Get untagged images for a given project iteration. * - * @param {uuid} projectId The project id + * This API supports batching and range selection. By default it will only + * return first 50 images matching images. + * Use the {take} and {skip} parameters to control how many images to return in + * a given batch. * - * @param {object} imageData + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {array} [options.tagIds] The tags ids with which to tag each image. - * Limited to 20 + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. + * + * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible + * values include: 'Newest', 'Oldest' + * + * @param {number} [options.take] Maximum number of images to return. Defaults + * to 50, limited to 256. + * + * @param {number} [options.skip] Number of images to skip before beginning the + * image batch. Defaults to 0. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - createImagesFromDataWithHttpOperationResponse(projectId: string, imageData: stream.Readable, options?: { tagIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; + getUntaggedImagesWithHttpOperationResponse(projectId: string, options?: { iterationId? : string, orderBy? : string, take? : number, skip? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Add the provided images to the set of training images - * - * This API accepts body content as multipart/form-data and - * application/octet-stream. When using multipart - * multiple image files can be sent at once, with a maximum of 64 files + * @summary Get untagged images for a given project iteration. * - * @param {uuid} projectId The project id + * This API supports batching and range selection. By default it will only + * return first 50 images matching images. + * Use the {take} and {skip} parameters to control how many images to return in + * a given batch. * - * @param {object} imageData + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {array} [options.tagIds] The tags ids with which to tag each image. - * Limited to 20 + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. + * + * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible + * values include: 'Newest', 'Oldest' + * + * @param {number} [options.take] Maximum number of images to return. Defaults + * to 50, limited to 256. + * + * @param {number} [options.skip] Number of images to skip before beginning the + * image batch. Defaults to 0. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -588,7 +705,7 @@ export default class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned. * - * @resolve {ImageCreateSummary} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -596,49 +713,60 @@ export default class TrainingAPIClient extends ServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ImageCreateSummary} [result] - The deserialized result object if an error did not occur. - * See {@link ImageCreateSummary} for more information. + * {Array} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createImagesFromData(projectId: string, imageData: stream.Readable, options?: { tagIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; - createImagesFromData(projectId: string, imageData: stream.Readable, callback: ServiceCallback): void; - createImagesFromData(projectId: string, imageData: stream.Readable, options: { tagIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getUntaggedImages(projectId: string, options?: { iterationId? : string, orderBy? : string, take? : number, skip? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getUntaggedImages(projectId: string, callback: ServiceCallback): void; + getUntaggedImages(projectId: string, options: { iterationId? : string, orderBy? : string, take? : number, skip? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Delete images from the set of training images + * @summary Get images by id for a given project iteration. * - * @param {uuid} projectId The project id + * This API will return a set of Images for the specified tags and optionally + * iteration. If no iteration is specified the + * current workspace is used. * - * @param {array} imageIds Ids of the images to be deleted. Limted to 256 - * images per batch + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * + * @param {array} [options.imageIds] The list of image ids to retrieve. Limited + * to 256. + * + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deleteImagesWithHttpOperationResponse(projectId: string, imageIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getImagesByIdsWithHttpOperationResponse(projectId: string, options?: { imageIds? : string[], iterationId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Delete images from the set of training images + * @summary Get images by id for a given project iteration. * - * @param {uuid} projectId The project id + * This API will return a set of Images for the specified tags and optionally + * iteration. If no iteration is specified the + * current workspace is used. * - * @param {array} imageIds Ids of the images to be deleted. Limted to 256 - * images per batch + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * + * @param {array} [options.imageIds] The list of image ids to retrieve. Limited + * to 256. + * + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -649,7 +777,7 @@ export default class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -657,34 +785,33 @@ export default class TrainingAPIClient extends ServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {Array} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteImages(projectId: string, imageIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteImages(projectId: string, imageIds: string[], callback: ServiceCallback): void; - deleteImages(projectId: string, imageIds: string[], options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getImagesByIds(projectId: string, options?: { imageIds? : string[], iterationId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + getImagesByIds(projectId: string, callback: ServiceCallback): void; + getImagesByIds(projectId: string, options: { imageIds? : string[], iterationId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Add the provided batch of images to the set of training images + * @summary Add the provided images to the set of training images. * - * This API accepts a batch of files, and optionally tags, to create images. - * There is a limit of 64 images and 20 tags. - * - * @param {uuid} projectId The project id - * - * @param {object} batch The batch of image files to add. Limited to 64 images - * and 20 tags per batch + * This API accepts body content as multipart/form-data and + * application/octet-stream. When using multipart + * multiple image files can be sent at once, with a maximum of 64 files * - * @param {array} [batch.images] + * @param {uuid} projectId The project id. * - * @param {array} [batch.tagIds] + * @param {object} imageData Binary image data. * * @param {object} [options] Optional Parameters. * + * @param {array} [options.tagIds] The tags ids with which to tag each image. + * Limited to 20. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -694,25 +821,24 @@ export default class TrainingAPIClient extends ServiceClient { * * @reject {Error|ServiceError} - The error object. */ - createImagesFromFilesWithHttpOperationResponse(projectId: string, batch: models.ImageFileCreateBatch, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createImagesFromDataWithHttpOperationResponse(projectId: string, imageData: stream.Readable, options?: { tagIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Add the provided batch of images to the set of training images - * - * This API accepts a batch of files, and optionally tags, to create images. - * There is a limit of 64 images and 20 tags. + * @summary Add the provided images to the set of training images. * - * @param {uuid} projectId The project id - * - * @param {object} batch The batch of image files to add. Limited to 64 images - * and 20 tags per batch + * This API accepts body content as multipart/form-data and + * application/octet-stream. When using multipart + * multiple image files can be sent at once, with a maximum of 64 files * - * @param {array} [batch.images] + * @param {uuid} projectId The project id. * - * @param {array} [batch.tagIds] + * @param {object} imageData Binary image data. * * @param {object} [options] Optional Parameters. * + * @param {array} [options.tagIds] The tags ids with which to tag each image. + * Limited to 20. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -738,25 +864,18 @@ export default class TrainingAPIClient extends ServiceClient { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createImagesFromFiles(projectId: string, batch: models.ImageFileCreateBatch, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createImagesFromFiles(projectId: string, batch: models.ImageFileCreateBatch, callback: ServiceCallback): void; - createImagesFromFiles(projectId: string, batch: models.ImageFileCreateBatch, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createImagesFromData(projectId: string, imageData: stream.Readable, options?: { tagIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; + createImagesFromData(projectId: string, imageData: stream.Readable, callback: ServiceCallback): void; + createImagesFromData(projectId: string, imageData: stream.Readable, options: { tagIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Add the provided images urls to the set of training images + * @summary Delete images from the set of training images. * - * This API accepts a batch of urls, and optionally tags, to create images. - * There is a limit of 64 images and 20 tags. - * - * @param {uuid} projectId The project id - * - * @param {object} batch Image urls and tag ids. Limited to 64 images and 20 - * tags per batch - * - * @param {array} [batch.images] + * @param {uuid} projectId The project id. * - * @param {array} [batch.tagIds] + * @param {array} imageIds Ids of the images to be deleted. Limted to 256 + * images per batch. * * @param {object} [options] Optional Parameters. * @@ -765,26 +884,19 @@ export default class TrainingAPIClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - createImagesFromUrlsWithHttpOperationResponse(projectId: string, batch: models.ImageUrlCreateBatch, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteImagesWithHttpOperationResponse(projectId: string, imageIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - /** - * @summary Add the provided images urls to the set of training images - * - * This API accepts a batch of urls, and optionally tags, to create images. - * There is a limit of 64 images and 20 tags. - * - * @param {uuid} projectId The project id - * - * @param {object} batch Image urls and tag ids. Limited to 64 images and 20 - * tags per batch + /** + * @summary Delete images from the set of training images. * - * @param {array} [batch.images] + * @param {uuid} projectId The project id. * - * @param {array} [batch.tagIds] + * @param {array} imageIds Ids of the images to be deleted. Limted to 256 + * images per batch. * * @param {object} [options] Optional Parameters. * @@ -798,7 +910,7 @@ export default class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned. * - * @resolve {ImageCreateSummary} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -806,28 +918,27 @@ export default class TrainingAPIClient extends ServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ImageCreateSummary} [result] - The deserialized result object if an error did not occur. - * See {@link ImageCreateSummary} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createImagesFromUrls(projectId: string, batch: models.ImageUrlCreateBatch, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createImagesFromUrls(projectId: string, batch: models.ImageUrlCreateBatch, callback: ServiceCallback): void; - createImagesFromUrls(projectId: string, batch: models.ImageUrlCreateBatch, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteImages(projectId: string, imageIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteImages(projectId: string, imageIds: string[], callback: ServiceCallback): void; + deleteImages(projectId: string, imageIds: string[], options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Add the specified predicted images to the set of training images + * @summary Add the provided batch of images to the set of training images. * - * This API creates a batch of images from predicted images specified. There is - * a limit of 64 images and 20 tags. + * This API accepts a batch of files, and optionally tags, to create images. + * There is a limit of 64 images and 20 tags. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {object} batch Image and tag ids. Limted to 64 images and 20 tags per - * batch + * @param {object} batch The batch of image files to add. Limited to 64 images + * and 20 tags per batch. * * @param {array} [batch.images] * @@ -844,18 +955,18 @@ export default class TrainingAPIClient extends ServiceClient { * * @reject {Error|ServiceError} - The error object. */ - createImagesFromPredictionsWithHttpOperationResponse(projectId: string, batch: models.ImageIdCreateBatch, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createImagesFromFilesWithHttpOperationResponse(projectId: string, batch: models.ImageFileCreateBatch, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Add the specified predicted images to the set of training images + * @summary Add the provided batch of images to the set of training images. * - * This API creates a batch of images from predicted images specified. There is - * a limit of 64 images and 20 tags. + * This API accepts a batch of files, and optionally tags, to create images. + * There is a limit of 64 images and 20 tags. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {object} batch Image and tag ids. Limted to 64 images and 20 tags per - * batch + * @param {object} batch The batch of image files to add. Limited to 64 images + * and 20 tags per batch. * * @param {array} [batch.images] * @@ -888,19 +999,25 @@ export default class TrainingAPIClient extends ServiceClient { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createImagesFromPredictions(projectId: string, batch: models.ImageIdCreateBatch, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createImagesFromPredictions(projectId: string, batch: models.ImageIdCreateBatch, callback: ServiceCallback): void; - createImagesFromPredictions(projectId: string, batch: models.ImageIdCreateBatch, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createImagesFromFiles(projectId: string, batch: models.ImageFileCreateBatch, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createImagesFromFiles(projectId: string, batch: models.ImageFileCreateBatch, callback: ServiceCallback): void; + createImagesFromFiles(projectId: string, batch: models.ImageFileCreateBatch, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Associate a set of images with a set of tags + * @summary Add the provided images urls to the set of training images. + * + * This API accepts a batch of urls, and optionally tags, to create images. + * There is a limit of 64 images and 20 tags. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. + * + * @param {object} batch Image urls and tag ids. Limited to 64 images and 20 + * tags per batch. * - * @param {object} batch Batch of image tags. Limited to 128 tags per batch + * @param {array} [batch.images] * - * @param {array} [batch.tags] + * @param {array} [batch.tagIds] * * @param {object} [options] Optional Parameters. * @@ -909,20 +1026,26 @@ export default class TrainingAPIClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - createImageTagsWithHttpOperationResponse(projectId: string, batch: models.ImageTagCreateBatch, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createImagesFromUrlsWithHttpOperationResponse(projectId: string, batch: models.ImageUrlCreateBatch, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Associate a set of images with a set of tags + * @summary Add the provided images urls to the set of training images. + * + * This API accepts a batch of urls, and optionally tags, to create images. + * There is a limit of 64 images and 20 tags. + * + * @param {uuid} projectId The project id. * - * @param {uuid} projectId The project id + * @param {object} batch Image urls and tag ids. Limited to 64 images and 20 + * tags per batch. * - * @param {object} batch Batch of image tags. Limited to 128 tags per batch + * @param {array} [batch.images] * - * @param {array} [batch.tags] + * @param {array} [batch.tagIds] * * @param {object} [options] Optional Parameters. * @@ -936,7 +1059,7 @@ export default class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned. * - * @resolve {ImageTagCreateSummary} - The deserialized result object. + * @resolve {ImageCreateSummary} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -944,27 +1067,32 @@ export default class TrainingAPIClient extends ServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ImageTagCreateSummary} [result] - The deserialized result object if an error did not occur. - * See {@link ImageTagCreateSummary} for more information. + * {ImageCreateSummary} [result] - The deserialized result object if an error did not occur. + * See {@link ImageCreateSummary} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createImageTags(projectId: string, batch: models.ImageTagCreateBatch, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createImageTags(projectId: string, batch: models.ImageTagCreateBatch, callback: ServiceCallback): void; - createImageTags(projectId: string, batch: models.ImageTagCreateBatch, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createImagesFromUrls(projectId: string, batch: models.ImageUrlCreateBatch, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createImagesFromUrls(projectId: string, batch: models.ImageUrlCreateBatch, callback: ServiceCallback): void; + createImagesFromUrls(projectId: string, batch: models.ImageUrlCreateBatch, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Remove a set of tags from a set of images + * @summary Add the specified predicted images to the set of training images. * - * @param {uuid} projectId The project id + * This API creates a batch of images from predicted images specified. There is + * a limit of 64 images and 20 tags. * - * @param {array} imageIds Image ids. Limited to 64 images + * @param {uuid} projectId The project id. * - * @param {array} tagIds Tags to be deleted from the specified images. Limted - * to 20 tags + * @param {object} batch Image and tag ids. Limted to 64 images and 20 tags per + * batch. + * + * @param {array} [batch.images] + * + * @param {array} [batch.tagIds] * * @param {object} [options] Optional Parameters. * @@ -973,21 +1101,26 @@ export default class TrainingAPIClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deleteImageTagsWithHttpOperationResponse(projectId: string, imageIds: string[], tagIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createImagesFromPredictionsWithHttpOperationResponse(projectId: string, batch: models.ImageIdCreateBatch, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Remove a set of tags from a set of images + * @summary Add the specified predicted images to the set of training images. * - * @param {uuid} projectId The project id + * This API creates a batch of images from predicted images specified. There is + * a limit of 64 images and 20 tags. * - * @param {array} imageIds Image ids. Limited to 64 images + * @param {uuid} projectId The project id. * - * @param {array} tagIds Tags to be deleted from the specified images. Limted - * to 20 tags + * @param {object} batch Image and tag ids. Limted to 64 images and 20 tags per + * batch. + * + * @param {array} [batch.images] + * + * @param {array} [batch.tagIds] * * @param {object} [options] Optional Parameters. * @@ -1001,7 +1134,7 @@ export default class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {ImageCreateSummary} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1009,30 +1142,28 @@ export default class TrainingAPIClient extends ServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {ImageCreateSummary} [result] - The deserialized result object if an error did not occur. + * See {@link ImageCreateSummary} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteImageTags(projectId: string, imageIds: string[], tagIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteImageTags(projectId: string, imageIds: string[], tagIds: string[], callback: ServiceCallback): void; - deleteImageTags(projectId: string, imageIds: string[], tagIds: string[], options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createImagesFromPredictions(projectId: string, batch: models.ImageIdCreateBatch, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createImagesFromPredictions(projectId: string, batch: models.ImageIdCreateBatch, callback: ServiceCallback): void; + createImagesFromPredictions(projectId: string, batch: models.ImageIdCreateBatch, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Create a set of image regions - * - * This API accepts a batch of image regions, and optionally tags, to update - * existing images with region information. - * There is a limit of 64 entries in the batch. + * @summary Get region proposals for an image. Returns empty array if no + * proposals are found. * - * @param {uuid} projectId The project id + * This API will get region proposals for an image along with confidences for + * the region. It returns an empty array if no proposals are found. * - * @param {object} batch Batch of image regions which include a tag and - * bounding box. Limited to 64 + * @param {uuid} projectId The project id. * - * @param {array} [batch.regions] + * @param {uuid} imageId The image id. * * @param {object} [options] Optional Parameters. * @@ -1041,25 +1172,22 @@ export default class TrainingAPIClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - createImageRegionsWithHttpOperationResponse(projectId: string, batch: models.ImageRegionCreateBatch, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getImageRegionProposalsWithHttpOperationResponse(projectId: string, imageId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Create a set of image regions - * - * This API accepts a batch of image regions, and optionally tags, to update - * existing images with region information. - * There is a limit of 64 entries in the batch. + * @summary Get region proposals for an image. Returns empty array if no + * proposals are found. * - * @param {uuid} projectId The project id + * This API will get region proposals for an image along with confidences for + * the region. It returns an empty array if no proposals are found. * - * @param {object} batch Batch of image regions which include a tag and - * bounding box. Limited to 64 + * @param {uuid} projectId The project id. * - * @param {array} [batch.regions] + * @param {uuid} imageId The image id. * * @param {object} [options] Optional Parameters. * @@ -1073,7 +1201,7 @@ export default class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned. * - * @resolve {ImageRegionCreateSummary} - The deserialized result object. + * @resolve {ImageRegionProposal} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1081,25 +1209,25 @@ export default class TrainingAPIClient extends ServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ImageRegionCreateSummary} [result] - The deserialized result object if an error did not occur. - * See {@link ImageRegionCreateSummary} for more - * information. + * {ImageRegionProposal} [result] - The deserialized result object if an error did not occur. + * See {@link ImageRegionProposal} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createImageRegions(projectId: string, batch: models.ImageRegionCreateBatch, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createImageRegions(projectId: string, batch: models.ImageRegionCreateBatch, callback: ServiceCallback): void; - createImageRegions(projectId: string, batch: models.ImageRegionCreateBatch, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getImageRegionProposals(projectId: string, imageId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getImageRegionProposals(projectId: string, imageId: string, callback: ServiceCallback): void; + getImageRegionProposals(projectId: string, imageId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Delete a set of image regions + * @summary Delete a set of predicted images and their associated prediction + * results. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {array} regionIds Regions to delete. Limited to 64 + * @param {array} ids The prediction ids. Limited to 64. * * @param {object} [options] Optional Parameters. * @@ -1112,14 +1240,15 @@ export default class TrainingAPIClient extends ServiceClient { * * @reject {Error|ServiceError} - The error object. */ - deleteImageRegionsWithHttpOperationResponse(projectId: string, regionIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deletePredictionWithHttpOperationResponse(projectId: string, ids: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Delete a set of image regions + * @summary Delete a set of predicted images and their associated prediction + * results. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {array} regionIds Regions to delete. Limited to 64 + * @param {array} ids The prediction ids. Limited to 64. * * @param {object} [options] Optional Parameters. * @@ -1147,48 +1276,54 @@ export default class TrainingAPIClient extends ServiceClient { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteImageRegions(projectId: string, regionIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteImageRegions(projectId: string, regionIds: string[], callback: ServiceCallback): void; - deleteImageRegions(projectId: string, regionIds: string[], options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deletePrediction(projectId: string, ids: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deletePrediction(projectId: string, ids: string[], callback: ServiceCallback): void; + deletePrediction(projectId: string, ids: string[], options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Get region proposals for an image. Returns empty array if no - * proposals are found. + * @summary Quick test an image url. * - * This API will get region proposals for an image along with confidences for - * the region. It returns an empty array if no proposals are found. + * @param {uuid} projectId The project to evaluate against. * - * @param {uuid} projectId The project id + * @param {object} imageUrl An {Iris.Web.Api.Models.ImageUrl} that contains the + * url of the image to be evaluated. * - * @param {uuid} imageId The image id + * @param {string} [imageUrl.url] * * @param {object} [options] Optional Parameters. * + * @param {uuid} [options.iterationId] Optional. Specifies the id of a + * particular iteration to evaluate against. + * The default iteration for the project will be used when not specified. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getImageRegionProposalsWithHttpOperationResponse(projectId: string, imageId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + quickTestImageUrlWithHttpOperationResponse(projectId: string, imageUrl: models.ImageUrl, options?: { iterationId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Get region proposals for an image. Returns empty array if no - * proposals are found. + * @summary Quick test an image url. * - * This API will get region proposals for an image along with confidences for - * the region. It returns an empty array if no proposals are found. + * @param {uuid} projectId The project to evaluate against. * - * @param {uuid} projectId The project id + * @param {object} imageUrl An {Iris.Web.Api.Models.ImageUrl} that contains the + * url of the image to be evaluated. * - * @param {uuid} imageId The image id + * @param {string} [imageUrl.url] * * @param {object} [options] Optional Parameters. * + * @param {uuid} [options.iterationId] Optional. Specifies the id of a + * particular iteration to evaluate against. + * The default iteration for the project will be used when not specified. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1199,7 +1334,7 @@ export default class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned. * - * @resolve {ImageRegionProposal} - The deserialized result object. + * @resolve {ImagePrediction} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1207,49 +1342,55 @@ export default class TrainingAPIClient extends ServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ImageRegionProposal} [result] - The deserialized result object if an error did not occur. - * See {@link ImageRegionProposal} for more information. + * {ImagePrediction} [result] - The deserialized result object if an error did not occur. + * See {@link ImagePrediction} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getImageRegionProposals(projectId: string, imageId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getImageRegionProposals(projectId: string, imageId: string, callback: ServiceCallback): void; - getImageRegionProposals(projectId: string, imageId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + quickTestImageUrl(projectId: string, imageUrl: models.ImageUrl, options?: { iterationId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + quickTestImageUrl(projectId: string, imageUrl: models.ImageUrl, callback: ServiceCallback): void; + quickTestImageUrl(projectId: string, imageUrl: models.ImageUrl, options: { iterationId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Delete a set of predicted images and their associated prediction - * results + * @summary Quick test an image. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {array} ids The prediction ids. Limited to 64 + * @param {object} imageData Binary image data. * * @param {object} [options] Optional Parameters. * + * @param {uuid} [options.iterationId] Optional. Specifies the id of a + * particular iteration to evaluate against. + * The default iteration for the project will be used when not specified. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deletePredictionWithHttpOperationResponse(projectId: string, ids: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + quickTestImageWithHttpOperationResponse(projectId: string, imageData: stream.Readable, options?: { iterationId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Delete a set of predicted images and their associated prediction - * results + * @summary Quick test an image. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {array} ids The prediction ids. Limited to 64 + * @param {object} imageData Binary image data. * * @param {object} [options] Optional Parameters. * + * @param {uuid} [options.iterationId] Optional. Specifies the id of a + * particular iteration to evaluate against. + * The default iteration for the project will be used when not specified. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1260,7 +1401,7 @@ export default class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {ImagePrediction} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1268,24 +1409,25 @@ export default class TrainingAPIClient extends ServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {ImagePrediction} [result] - The deserialized result object if an error did not occur. + * See {@link ImagePrediction} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deletePrediction(projectId: string, ids: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deletePrediction(projectId: string, ids: string[], callback: ServiceCallback): void; - deletePrediction(projectId: string, ids: string[], options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + quickTestImage(projectId: string, imageData: stream.Readable, options?: { iterationId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + quickTestImage(projectId: string, imageData: stream.Readable, callback: ServiceCallback): void; + quickTestImage(projectId: string, imageData: stream.Readable, options: { iterationId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Get images that were sent to your prediction endpoint + * @summary Get images that were sent to your prediction endpoint. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} query Parameters used to query the predictions. Limited to - * combining 2 tags + * combining 2 tags. * * @param {string} [query.session] * @@ -1320,12 +1462,12 @@ export default class TrainingAPIClient extends ServiceClient { queryPredictionsWithHttpOperationResponse(projectId: string, query: models.PredictionQueryToken, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Get images that were sent to your prediction endpoint + * @summary Get images that were sent to your prediction endpoint. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} query Parameters used to query the predictions. Limited to - * combining 2 tags + * combining 2 tags. * * @param {string} [query.session] * @@ -1379,47 +1521,45 @@ export default class TrainingAPIClient extends ServiceClient { /** - * @summary Quick test an image url + * @summary Get detailed performance information about an iteration. * - * @param {uuid} projectId The project to evaluate against + * @param {uuid} projectId The id of the project the iteration belongs to. * - * @param {object} imageUrl An {Iris.Web.Api.Models.ImageUrl} that contains the - * url of the image to be evaluated - * - * @param {string} [imageUrl.url] + * @param {uuid} iterationId The id of the iteration to get. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] Optional. Specifies the id of a - * particular iteration to evaluate against. - * The default iteration for the project will be used when not specified. + * @param {number} [options.threshold] The threshold used to determine true + * predictions. + * + * @param {number} [options.overlapThreshold] If applicable, the bounding box + * overlap threshold used to determine true predictions. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - quickTestImageUrlWithHttpOperationResponse(projectId: string, imageUrl: models.ImageUrl, options?: { iterationId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + getIterationPerformanceWithHttpOperationResponse(projectId: string, iterationId: string, options?: { threshold? : number, overlapThreshold? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Quick test an image url - * - * @param {uuid} projectId The project to evaluate against + * @summary Get detailed performance information about an iteration. * - * @param {object} imageUrl An {Iris.Web.Api.Models.ImageUrl} that contains the - * url of the image to be evaluated + * @param {uuid} projectId The id of the project the iteration belongs to. * - * @param {string} [imageUrl.url] + * @param {uuid} iterationId The id of the iteration to get. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] Optional. Specifies the id of a - * particular iteration to evaluate against. - * The default iteration for the project will be used when not specified. + * @param {number} [options.threshold] The threshold used to determine true + * predictions. + * + * @param {number} [options.overlapThreshold] If applicable, the bounding box + * overlap threshold used to determine true predictions. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1431,7 +1571,7 @@ export default class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned. * - * @resolve {ImagePrediction} - The deserialized result object. + * @resolve {IterationPerformance} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1439,54 +1579,86 @@ export default class TrainingAPIClient extends ServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ImagePrediction} [result] - The deserialized result object if an error did not occur. - * See {@link ImagePrediction} for more information. + * {IterationPerformance} [result] - The deserialized result object if an error did not occur. + * See {@link IterationPerformance} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - quickTestImageUrl(projectId: string, imageUrl: models.ImageUrl, options?: { iterationId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - quickTestImageUrl(projectId: string, imageUrl: models.ImageUrl, callback: ServiceCallback): void; - quickTestImageUrl(projectId: string, imageUrl: models.ImageUrl, options: { iterationId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getIterationPerformance(projectId: string, iterationId: string, options?: { threshold? : number, overlapThreshold? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getIterationPerformance(projectId: string, iterationId: string, callback: ServiceCallback): void; + getIterationPerformance(projectId: string, iterationId: string, options: { threshold? : number, overlapThreshold? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Quick test an image + * @summary Get image with its prediction for a given project iteration. + * + * This API supports batching and range selection. By default it will only + * return first 50 images matching images. + * Use the {take} and {skip} parameters to control how many images to return in + * a given batch. + * The filtering is on an and/or relationship. For example, if the provided tag + * ids are for the "Dog" and + * "Cat" tags, then only images tagged with Dog and/or Cat will be returned * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {object} imageData + * @param {uuid} iterationId The iteration id. Defaults to workspace. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] Optional. Specifies the id of a - * particular iteration to evaluate against. - * The default iteration for the project will be used when not specified. + * @param {array} [options.tagIds] A list of tags ids to filter the images. + * Defaults to all tagged images when null. Limited to 20. + * + * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible + * values include: 'Newest', 'Oldest' + * + * @param {number} [options.take] Maximum number of images to return. Defaults + * to 50, limited to 256. + * + * @param {number} [options.skip] Number of images to skip before beginning the + * image batch. Defaults to 0. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - quickTestImageWithHttpOperationResponse(projectId: string, imageData: stream.Readable, options?: { iterationId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + getImagePerformancesWithHttpOperationResponse(projectId: string, iterationId: string, options?: { tagIds? : string[], orderBy? : string, take? : number, skip? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Quick test an image + * @summary Get image with its prediction for a given project iteration. + * + * This API supports batching and range selection. By default it will only + * return first 50 images matching images. + * Use the {take} and {skip} parameters to control how many images to return in + * a given batch. + * The filtering is on an and/or relationship. For example, if the provided tag + * ids are for the "Dog" and + * "Cat" tags, then only images tagged with Dog and/or Cat will be returned * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {object} imageData + * @param {uuid} iterationId The iteration id. Defaults to workspace. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] Optional. Specifies the id of a - * particular iteration to evaluate against. - * The default iteration for the project will be used when not specified. + * @param {array} [options.tagIds] A list of tags ids to filter the images. + * Defaults to all tagged images when null. Limited to 20. + * + * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible + * values include: 'Newest', 'Oldest' + * + * @param {number} [options.take] Maximum number of images to return. Defaults + * to 50, limited to 256. + * + * @param {number} [options.skip] Number of images to skip before beginning the + * image batch. Defaults to 0. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1498,7 +1670,7 @@ export default class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned. * - * @resolve {ImagePrediction} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1506,43 +1678,64 @@ export default class TrainingAPIClient extends ServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ImagePrediction} [result] - The deserialized result object if an error did not occur. - * See {@link ImagePrediction} for more information. + * {Array} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - quickTestImage(projectId: string, imageData: stream.Readable, options?: { iterationId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - quickTestImage(projectId: string, imageData: stream.Readable, callback: ServiceCallback): void; - quickTestImage(projectId: string, imageData: stream.Readable, options: { iterationId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getImagePerformances(projectId: string, iterationId: string, options?: { tagIds? : string[], orderBy? : string, take? : number, skip? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getImagePerformances(projectId: string, iterationId: string, callback: ServiceCallback): void; + getImagePerformances(projectId: string, iterationId: string, options: { tagIds? : string[], orderBy? : string, take? : number, skip? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Queues project for training + * @summary Gets the number of images tagged with the provided {tagIds} that + * have prediction results from + * training for the provided iteration {iterationId}. + * + * The filtering is on an and/or relationship. For example, if the provided tag + * ids are for the "Dog" and + * "Cat" tags, then only images tagged with Dog and/or Cat will be returned + * + * @param {uuid} projectId The project id. * - * @param {uuid} projectId The project id + * @param {uuid} iterationId The iteration id. Defaults to workspace. * * @param {object} [options] Optional Parameters. * + * @param {array} [options.tagIds] A list of tags ids to filter the images to + * count. Defaults to all tags when null. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - trainProjectWithHttpOperationResponse(projectId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getImagePerformanceCountWithHttpOperationResponse(projectId: string, iterationId: string, options?: { tagIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Queues project for training + * @summary Gets the number of images tagged with the provided {tagIds} that + * have prediction results from + * training for the provided iteration {iterationId}. + * + * The filtering is on an and/or relationship. For example, if the provided tag + * ids are for the "Dog" and + * "Cat" tags, then only images tagged with Dog and/or Cat will be returned + * + * @param {uuid} projectId The project id. * - * @param {uuid} projectId The project id + * @param {uuid} iterationId The iteration id. Defaults to workspace. * * @param {object} [options] Optional Parameters. * + * @param {array} [options.tagIds] A list of tags ids to filter the images to + * count. Defaults to all tags when null. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1553,7 +1746,7 @@ export default class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned. * - * @resolve {Iteration} - The deserialized result object. + * @resolve {Number} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1561,20 +1754,19 @@ export default class TrainingAPIClient extends ServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Iteration} [result] - The deserialized result object if an error did not occur. - * See {@link Iteration} for more information. + * {Number} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - trainProject(projectId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - trainProject(projectId: string, callback: ServiceCallback): void; - trainProject(projectId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getImagePerformanceCount(projectId: string, iterationId: string, options?: { tagIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; + getImagePerformanceCount(projectId: string, iterationId: string, callback: ServiceCallback): void; + getImagePerformanceCount(projectId: string, iterationId: string, options: { tagIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Get your projects + * @summary Get your projects. * * @param {object} [options] Optional Parameters. * @@ -1590,7 +1782,7 @@ export default class TrainingAPIClient extends ServiceClient { getProjectsWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Get your projects + * @summary Get your projects. * * @param {object} [options] Optional Parameters. * @@ -1624,16 +1816,16 @@ export default class TrainingAPIClient extends ServiceClient { /** - * @summary Create a project + * @summary Create a project. * - * @param {string} name Name of the project + * @param {string} name Name of the project. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.description] The description of the project + * @param {string} [options.description] The description of the project. * * @param {uuid} [options.domainId] The id of the domain to use for this - * project. Defaults to General + * project. Defaults to General. * * @param {string} [options.classificationType] The type of classifier to * create for this project. Possible values include: 'Multiclass', 'Multilabel' @@ -1650,16 +1842,16 @@ export default class TrainingAPIClient extends ServiceClient { createProjectWithHttpOperationResponse(name: string, options?: { description? : string, domainId? : string, classificationType? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Create a project + * @summary Create a project. * - * @param {string} name Name of the project + * @param {string} name Name of the project. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.description] The description of the project + * @param {string} [options.description] The description of the project. * * @param {uuid} [options.domainId] The id of the domain to use for this - * project. Defaults to General + * project. Defaults to General. * * @param {string} [options.classificationType] The type of classifier to * create for this project. Possible values include: 'Multiclass', 'Multilabel' @@ -1695,9 +1887,9 @@ export default class TrainingAPIClient extends ServiceClient { /** - * @summary Get a specific project + * @summary Get a specific project. * - * @param {uuid} projectId The id of the project to get + * @param {uuid} projectId The id of the project to get. * * @param {object} [options] Optional Parameters. * @@ -1713,9 +1905,9 @@ export default class TrainingAPIClient extends ServiceClient { getProjectWithHttpOperationResponse(projectId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Get a specific project + * @summary Get a specific project. * - * @param {uuid} projectId The id of the project to get + * @param {uuid} projectId The id of the project to get. * * @param {object} [options] Optional Parameters. * @@ -1750,9 +1942,9 @@ export default class TrainingAPIClient extends ServiceClient { /** - * @summary Delete a specific project + * @summary Delete a specific project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * @@ -1768,9 +1960,9 @@ export default class TrainingAPIClient extends ServiceClient { deleteProjectWithHttpOperationResponse(projectId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Delete a specific project + * @summary Delete a specific project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * @@ -1804,21 +1996,21 @@ export default class TrainingAPIClient extends ServiceClient { /** - * @summary Update a specific project + * @summary Update a specific project. * - * @param {uuid} projectId The id of the project to update + * @param {uuid} projectId The id of the project to update. * - * @param {object} updatedProject The updated project model + * @param {object} updatedProject The updated project model. * - * @param {string} [updatedProject.name] Gets or sets the name of the project + * @param {string} [updatedProject.name] Gets or sets the name of the project. * * @param {string} [updatedProject.description] Gets or sets the description of - * the project + * the project. * - * @param {object} [updatedProject.settings] Gets or sets the project settings + * @param {object} [updatedProject.settings] Gets or sets the project settings. * * @param {uuid} [updatedProject.settings.domainId] Gets or sets the id of the - * Domain to use with this project + * Domain to use with this project. * * @param {string} [updatedProject.settings.classificationType] Gets or sets * the classification type of the project. Possible values include: @@ -1838,21 +2030,21 @@ export default class TrainingAPIClient extends ServiceClient { updateProjectWithHttpOperationResponse(projectId: string, updatedProject: models.Project, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Update a specific project + * @summary Update a specific project. * - * @param {uuid} projectId The id of the project to update + * @param {uuid} projectId The id of the project to update. * - * @param {object} updatedProject The updated project model + * @param {object} updatedProject The updated project model. * - * @param {string} [updatedProject.name] Gets or sets the name of the project + * @param {string} [updatedProject.name] Gets or sets the name of the project. * * @param {string} [updatedProject.description] Gets or sets the description of - * the project + * the project. * - * @param {object} [updatedProject.settings] Gets or sets the project settings + * @param {object} [updatedProject.settings] Gets or sets the project settings. * * @param {uuid} [updatedProject.settings.domainId] Gets or sets the id of the - * Domain to use with this project + * Domain to use with this project. * * @param {string} [updatedProject.settings.classificationType] Gets or sets * the classification type of the project. Possible values include: @@ -1891,9 +2083,9 @@ export default class TrainingAPIClient extends ServiceClient { /** - * @summary Get iterations for the project + * @summary Get iterations for the project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * @@ -1909,9 +2101,9 @@ export default class TrainingAPIClient extends ServiceClient { getIterationsWithHttpOperationResponse(projectId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Get iterations for the project + * @summary Get iterations for the project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * @@ -1945,11 +2137,11 @@ export default class TrainingAPIClient extends ServiceClient { /** - * @summary Get a specific iteration + * @summary Get a specific iteration. * - * @param {uuid} projectId The id of the project the iteration belongs to + * @param {uuid} projectId The id of the project the iteration belongs to. * - * @param {uuid} iterationId The id of the iteration to get + * @param {uuid} iterationId The id of the iteration to get. * * @param {object} [options] Optional Parameters. * @@ -1965,11 +2157,11 @@ export default class TrainingAPIClient extends ServiceClient { getIterationWithHttpOperationResponse(projectId: string, iterationId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Get a specific iteration + * @summary Get a specific iteration. * - * @param {uuid} projectId The id of the project the iteration belongs to + * @param {uuid} projectId The id of the project the iteration belongs to. * - * @param {uuid} iterationId The id of the iteration to get + * @param {uuid} iterationId The id of the iteration to get. * * @param {object} [options] Optional Parameters. * @@ -2004,11 +2196,11 @@ export default class TrainingAPIClient extends ServiceClient { /** - * @summary Delete a specific iteration of a project + * @summary Delete a specific iteration of a project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} iterationId The iteration id + * @param {uuid} iterationId The iteration id. * * @param {object} [options] Optional Parameters. * @@ -2024,11 +2216,11 @@ export default class TrainingAPIClient extends ServiceClient { deleteIterationWithHttpOperationResponse(projectId: string, iterationId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Delete a specific iteration of a project + * @summary Delete a specific iteration of a project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} iterationId The iteration id + * @param {uuid} iterationId The iteration id. * * @param {object} [options] Optional Parameters. * @@ -2062,19 +2254,19 @@ export default class TrainingAPIClient extends ServiceClient { /** - * @summary Update a specific iteration + * @summary Update a specific iteration. * - * @param {uuid} projectId Project id + * @param {uuid} projectId Project id. * - * @param {uuid} iterationId Iteration id + * @param {uuid} iterationId Iteration id. * - * @param {object} updatedIteration The updated iteration model + * @param {object} updatedIteration The updated iteration model. * * @param {string} [updatedIteration.name] Gets or sets the name of the - * iteration + * iteration. * * @param {boolean} [updatedIteration.isDefault] Gets or sets a value - * indicating whether the iteration is the default iteration for the project + * indicating whether the iteration is the default iteration for the project. * * @param {object} [options] Optional Parameters. * @@ -2090,19 +2282,19 @@ export default class TrainingAPIClient extends ServiceClient { updateIterationWithHttpOperationResponse(projectId: string, iterationId: string, updatedIteration: models.Iteration, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Update a specific iteration + * @summary Update a specific iteration. * - * @param {uuid} projectId Project id + * @param {uuid} projectId Project id. * - * @param {uuid} iterationId Iteration id + * @param {uuid} iterationId Iteration id. * - * @param {object} updatedIteration The updated iteration model + * @param {object} updatedIteration The updated iteration model. * * @param {string} [updatedIteration.name] Gets or sets the name of the - * iteration + * iteration. * * @param {boolean} [updatedIteration.isDefault] Gets or sets a value - * indicating whether the iteration is the default iteration for the project + * indicating whether the iteration is the default iteration for the project. * * @param {object} [options] Optional Parameters. * @@ -2137,221 +2329,30 @@ export default class TrainingAPIClient extends ServiceClient { /** - * @summary Get detailed performance information about an iteration - * - * @param {uuid} projectId The id of the project the iteration belongs to - * - * @param {uuid} iterationId The id of the iteration to get - * - * @param {object} [options] Optional Parameters. - * - * @param {number} [options.threshold] The threshold used to determine true - * predictions - * - * @param {number} [options.overlapThreshold] If applicable, the bounding box - * overlap threshold used to determine true predictions - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - getIterationPerformanceWithHttpOperationResponse(projectId: string, iterationId: string, options?: { threshold? : number, overlapThreshold? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * @summary Get detailed performance information about an iteration - * - * @param {uuid} projectId The id of the project the iteration belongs to - * - * @param {uuid} iterationId The id of the iteration to get - * - * @param {object} [options] Optional Parameters. - * - * @param {number} [options.threshold] The threshold used to determine true - * predictions - * - * @param {number} [options.overlapThreshold] If applicable, the bounding box - * overlap threshold used to determine true predictions - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {IterationPerformance} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {IterationPerformance} [result] - The deserialized result object if an error did not occur. - * See {@link IterationPerformance} for more information. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - getIterationPerformance(projectId: string, iterationId: string, options?: { threshold? : number, overlapThreshold? : number, customHeaders? : { [headerName: string]: string; } }): Promise; - getIterationPerformance(projectId: string, iterationId: string, callback: ServiceCallback): void; - getIterationPerformance(projectId: string, iterationId: string, options: { threshold? : number, overlapThreshold? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * @summary Get image with its prediction for a given project iteration - * - * This API supports batching and range selection. By default it will only - * return first 50 images matching images. - * Use the {take} and {skip} parameters to control how many images to return in - * a given batch. - * The filtering is on an and/or relationship. For example, if the provided tag - * ids are for the "Dog" and - * "Cat" tags, then only images tagged with Dog and/or Cat will be returned - * - * @param {uuid} projectId The project id - * - * @param {uuid} iterationId The iteration id. Defaults to workspace - * - * @param {object} [options] Optional Parameters. - * - * @param {array} [options.tagIds] A list of tags ids to filter the images. - * Defaults to all tagged images when null. Limited to 20 - * - * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible - * values include: 'Newest', 'Oldest' - * - * @param {number} [options.take] Maximum number of images to return. Defaults - * to 50, limited to 256 - * - * @param {number} [options.skip] Number of images to skip before beginning the - * image batch. Defaults to 0 - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - getImagePerformancesWithHttpOperationResponse(projectId: string, iterationId: string, options?: { tagIds? : string[], orderBy? : string, take? : number, skip? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * @summary Get image with its prediction for a given project iteration - * - * This API supports batching and range selection. By default it will only - * return first 50 images matching images. - * Use the {take} and {skip} parameters to control how many images to return in - * a given batch. - * The filtering is on an and/or relationship. For example, if the provided tag - * ids are for the "Dog" and - * "Cat" tags, then only images tagged with Dog and/or Cat will be returned - * - * @param {uuid} projectId The project id - * - * @param {uuid} iterationId The iteration id. Defaults to workspace - * - * @param {object} [options] Optional Parameters. - * - * @param {array} [options.tagIds] A list of tags ids to filter the images. - * Defaults to all tagged images when null. Limited to 20 - * - * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible - * values include: 'Newest', 'Oldest' - * - * @param {number} [options.take] Maximum number of images to return. Defaults - * to 50, limited to 256 - * - * @param {number} [options.skip] Number of images to skip before beginning the - * image batch. Defaults to 0 - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {Array} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {Array} [result] - The deserialized result object if an error did not occur. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - getImagePerformances(projectId: string, iterationId: string, options?: { tagIds? : string[], orderBy? : string, take? : number, skip? : number, customHeaders? : { [headerName: string]: string; } }): Promise; - getImagePerformances(projectId: string, iterationId: string, callback: ServiceCallback): void; - getImagePerformances(projectId: string, iterationId: string, options: { tagIds? : string[], orderBy? : string, take? : number, skip? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * @summary Gets the number of images tagged with the provided {tagIds} that - * have prediction results from - * training for the provided iteration {iterationId} - * - * The filtering is on an and/or relationship. For example, if the provided tag - * ids are for the "Dog" and - * "Cat" tags, then only images tagged with Dog and/or Cat will be returned - * - * @param {uuid} projectId The project id + * @summary Queues project for training. * - * @param {uuid} iterationId The iteration id. Defaults to workspace + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {array} [options.tagIds] A list of tags ids to filter the images to - * count. Defaults to all tags when null. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getImagePerformanceCountWithHttpOperationResponse(projectId: string, iterationId: string, options?: { tagIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; + trainProjectWithHttpOperationResponse(projectId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Gets the number of images tagged with the provided {tagIds} that - * have prediction results from - * training for the provided iteration {iterationId} - * - * The filtering is on an and/or relationship. For example, if the provided tag - * ids are for the "Dog" and - * "Cat" tags, then only images tagged with Dog and/or Cat will be returned - * - * @param {uuid} projectId The project id + * @summary Queues project for training. * - * @param {uuid} iterationId The iteration id. Defaults to workspace + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {array} [options.tagIds] A list of tags ids to filter the images to - * count. Defaults to all tags when null. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2362,7 +2363,7 @@ export default class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned. * - * @resolve {Number} - The deserialized result object. + * @resolve {Iteration} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -2370,23 +2371,24 @@ export default class TrainingAPIClient extends ServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Number} [result] - The deserialized result object if an error did not occur. + * {Iteration} [result] - The deserialized result object if an error did not occur. + * See {@link Iteration} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getImagePerformanceCount(projectId: string, iterationId: string, options?: { tagIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; - getImagePerformanceCount(projectId: string, iterationId: string, callback: ServiceCallback): void; - getImagePerformanceCount(projectId: string, iterationId: string, options: { tagIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + trainProject(projectId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + trainProject(projectId: string, callback: ServiceCallback): void; + trainProject(projectId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Get the list of exports for a specific iteration + * @summary Get the list of exports for a specific iteration. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} iterationId The iteration id + * @param {uuid} iterationId The iteration id. * * @param {object} [options] Optional Parameters. * @@ -2402,11 +2404,11 @@ export default class TrainingAPIClient extends ServiceClient { getExportsWithHttpOperationResponse(projectId: string, iterationId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Get the list of exports for a specific iteration + * @summary Get the list of exports for a specific iteration. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} iterationId The iteration id + * @param {uuid} iterationId The iteration id. * * @param {object} [options] Optional Parameters. * @@ -2440,19 +2442,19 @@ export default class TrainingAPIClient extends ServiceClient { /** - * @summary Export a trained iteration + * @summary Export a trained iteration. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} iterationId The iteration id + * @param {uuid} iterationId The iteration id. * - * @param {string} platform The target platform (coreml or tensorflow). - * Possible values include: 'CoreML', 'TensorFlow', 'DockerFile', 'ONNX' + * @param {string} platform The target platform. Possible values include: + * 'CoreML', 'TensorFlow', 'DockerFile', 'ONNX' * * @param {object} [options] Optional Parameters. * - * @param {string} [options.flavor] The flavor of the target platform (Windows, - * Linux, ARM, or GPU). Possible values include: 'Linux', 'Windows' + * @param {string} [options.flavor] The flavor of the target platform. Possible + * values include: 'Linux', 'Windows', 'ONNX10', 'ONNX12' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2466,19 +2468,19 @@ export default class TrainingAPIClient extends ServiceClient { exportIterationWithHttpOperationResponse(projectId: string, iterationId: string, platform: string, options?: { flavor? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Export a trained iteration + * @summary Export a trained iteration. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} iterationId The iteration id + * @param {uuid} iterationId The iteration id. * - * @param {string} platform The target platform (coreml or tensorflow). - * Possible values include: 'CoreML', 'TensorFlow', 'DockerFile', 'ONNX' + * @param {string} platform The target platform. Possible values include: + * 'CoreML', 'TensorFlow', 'DockerFile', 'ONNX' * * @param {object} [options] Optional Parameters. * - * @param {string} [options.flavor] The flavor of the target platform (Windows, - * Linux, ARM, or GPU). Possible values include: 'Linux', 'Windows' + * @param {string} [options.flavor] The flavor of the target platform. Possible + * values include: 'Linux', 'Windows', 'ONNX10', 'ONNX12' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2511,16 +2513,16 @@ export default class TrainingAPIClient extends ServiceClient { /** - * @summary Get information about a specific tag + * @summary Get information about a specific tag. * - * @param {uuid} projectId The project this tag belongs to + * @param {uuid} projectId The project this tag belongs to. * - * @param {uuid} tagId The tag id + * @param {uuid} tagId The tag id. * * @param {object} [options] Optional Parameters. * * @param {uuid} [options.iterationId] The iteration to retrieve this tag from. - * Optional, defaults to current training set + * Optional, defaults to current training set. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2534,16 +2536,16 @@ export default class TrainingAPIClient extends ServiceClient { getTagWithHttpOperationResponse(projectId: string, tagId: string, options?: { iterationId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Get information about a specific tag + * @summary Get information about a specific tag. * - * @param {uuid} projectId The project this tag belongs to + * @param {uuid} projectId The project this tag belongs to. * - * @param {uuid} tagId The tag id + * @param {uuid} tagId The tag id. * * @param {object} [options] Optional Parameters. * * @param {uuid} [options.iterationId] The iteration to retrieve this tag from. - * Optional, defaults to current training set + * Optional, defaults to current training set. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2576,11 +2578,11 @@ export default class TrainingAPIClient extends ServiceClient { /** - * @summary Delete a tag from the project + * @summary Delete a tag from the project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} tagId Id of the tag to be deleted + * @param {uuid} tagId Id of the tag to be deleted. * * @param {object} [options] Optional Parameters. * @@ -2596,11 +2598,11 @@ export default class TrainingAPIClient extends ServiceClient { deleteTagWithHttpOperationResponse(projectId: string, tagId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Delete a tag from the project + * @summary Delete a tag from the project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} tagId Id of the tag to be deleted + * @param {uuid} tagId Id of the tag to be deleted. * * @param {object} [options] Optional Parameters. * @@ -2634,18 +2636,21 @@ export default class TrainingAPIClient extends ServiceClient { /** - * @summary Update a tag + * @summary Update a tag. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} tagId The id of the target tag + * @param {uuid} tagId The id of the target tag. * - * @param {object} updatedTag The updated tag model + * @param {object} updatedTag The updated tag model. * - * @param {string} [updatedTag.name] Gets or sets the name of the tag + * @param {string} [updatedTag.name] Gets or sets the name of the tag. * * @param {string} [updatedTag.description] Gets or sets the description of the - * tag + * tag. + * + * @param {string} [updatedTag.type] Gets or sets the type of the tag. Possible + * values include: 'Regular', 'Negative' * * @param {object} [options] Optional Parameters. * @@ -2661,18 +2666,21 @@ export default class TrainingAPIClient extends ServiceClient { updateTagWithHttpOperationResponse(projectId: string, tagId: string, updatedTag: models.Tag, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Update a tag + * @summary Update a tag. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} tagId The id of the target tag + * @param {uuid} tagId The id of the target tag. * - * @param {object} updatedTag The updated tag model + * @param {object} updatedTag The updated tag model. * - * @param {string} [updatedTag.name] Gets or sets the name of the tag + * @param {string} [updatedTag.name] Gets or sets the name of the tag. * * @param {string} [updatedTag.description] Gets or sets the description of the - * tag + * tag. + * + * @param {string} [updatedTag.type] Gets or sets the type of the tag. Possible + * values include: 'Regular', 'Negative' * * @param {object} [options] Optional Parameters. * @@ -2707,13 +2715,13 @@ export default class TrainingAPIClient extends ServiceClient { /** - * @summary Get the tags for a given project and iteration + * @summary Get the tags for a given project and iteration. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2727,13 +2735,13 @@ export default class TrainingAPIClient extends ServiceClient { getTagsWithHttpOperationResponse(projectId: string, options?: { iterationId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Get the tags for a given project and iteration + * @summary Get the tags for a given project and iteration. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2765,15 +2773,18 @@ export default class TrainingAPIClient extends ServiceClient { /** - * @summary Create a tag for the project + * @summary Create a tag for the project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {string} name The tag name + * @param {string} name The tag name. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.description] Optional description for the tag + * @param {string} [options.description] Optional description for the tag. + * + * @param {string} [options.type] Optional type for the tag. Possible values + * include: 'Regular', 'Negative' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2784,18 +2795,21 @@ export default class TrainingAPIClient extends ServiceClient { * * @reject {Error|ServiceError} - The error object. */ - createTagWithHttpOperationResponse(projectId: string, name: string, options?: { description? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + createTagWithHttpOperationResponse(projectId: string, name: string, options?: { description? : string, type? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Create a tag for the project + * @summary Create a tag for the project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {string} name The tag name + * @param {string} name The tag name. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.description] Optional description for the tag + * @param {string} [options.description] Optional description for the tag. + * + * @param {string} [options.type] Optional type for the tag. Possible values + * include: 'Regular', 'Negative' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2822,9 +2836,9 @@ export default class TrainingAPIClient extends ServiceClient { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createTag(projectId: string, name: string, options?: { description? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + createTag(projectId: string, name: string, options?: { description? : string, type? : string, customHeaders? : { [headerName: string]: string; } }): Promise; createTag(projectId: string, name: string, callback: ServiceCallback): void; - createTag(projectId: string, name: string, options: { description? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createTag(projectId: string, name: string, options: { description? : string, type? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } export { TrainingAPIClient, models as TrainingAPIModels }; diff --git a/lib/services/customVision/training/lib/trainingAPIClient.js b/lib/services/customVision/training/lib/trainingAPIClient.js index 4b89372da2..16d486b971 100644 --- a/lib/services/customVision/training/lib/trainingAPIClient.js +++ b/lib/services/customVision/training/lib/trainingAPIClient.js @@ -22,7 +22,7 @@ const models = require('./models'); /** - * @summary Get a list of the available domains + * @summary Get a list of the available domains. * * @param {object} [options] Optional Parameters. * @@ -53,6 +53,9 @@ function _getDomains(options, callback) { } // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); } @@ -63,6 +66,7 @@ function _getDomains(options, callback) { // Construct URL let baseUrl = this.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'domains'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); // Create HTTP transport objects let httpRequest = new WebResource(); @@ -150,9 +154,9 @@ function _getDomains(options, callback) { } /** - * @summary Get information about a specific domain + * @summary Get information about a specific domain. * - * @param {uuid} domainId The id of the domain to get information about + * @param {uuid} domainId The id of the domain to get information about. * * @param {object} [options] Optional Parameters. * @@ -184,6 +188,9 @@ function _getDomain(domainId, options, callback) { } // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (domainId === null || domainId === undefined || typeof domainId.valueOf() !== 'string' || !msRest.isValidUuid(domainId)) { throw new Error('domainId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } @@ -197,6 +204,7 @@ function _getDomain(domainId, options, callback) { // Construct URL let baseUrl = this.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'domains/{domainId}'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{domainId}', encodeURIComponent(domainId.toString())); // Create HTTP transport objects @@ -271,33 +279,20 @@ function _getDomain(domainId, options, callback) { } /** - * @summary Get tagged images for a given project iteration + * @summary Gets the number of images tagged with the provided {tagIds}. * - * This API supports batching and range selection. By default it will only - * return first 50 images matching images. - * Use the {take} and {skip} parameters to control how many images to return in - * a given batch. * The filtering is on an and/or relationship. For example, if the provided tag * ids are for the "Dog" and * "Cat" tags, then only images tagged with Dog and/or Cat will be returned * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace - * - * @param {array} [options.tagIds] A list of tags ids to filter the images. - * Defaults to all tagged images when null. Limited to 20 - * - * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible - * values include: 'Newest', 'Oldest' - * - * @param {number} [options.take] Maximum number of images to return. Defaults - * to 50, limited to 256 + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. * - * @param {number} [options.skip] Number of images to skip before beginning the - * image batch. Defaults to 0 + * @param {array} [options.tagIds] A list of tags ids to filter the images to + * count. Defaults to all tags when null. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -308,13 +303,13 @@ function _getDomain(domainId, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * {number} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getTaggedImages(projectId, options, callback) { +function _getTaggedImageCount(projectId, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -326,11 +321,11 @@ function _getTaggedImages(projectId, options, callback) { } let iterationId = (options && options.iterationId !== undefined) ? options.iterationId : undefined; let tagIds = (options && options.tagIds !== undefined) ? options.tagIds : undefined; - let orderBy = (options && options.orderBy !== undefined) ? options.orderBy : undefined; - let take = (options && options.take !== undefined) ? options.take : 50; - let skip = (options && options.skip !== undefined) ? options.skip : 0; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } @@ -344,15 +339,6 @@ function _getTaggedImages(projectId, options, callback) { } } } - if (orderBy !== null && orderBy !== undefined && typeof orderBy.valueOf() !== 'string') { - throw new Error('orderBy must be of type string.'); - } - if (take !== null && take !== undefined && typeof take !== 'number') { - throw new Error('take must be of type number.'); - } - if (skip !== null && skip !== undefined && typeof skip !== 'number') { - throw new Error('skip must be of type number.'); - } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); } @@ -362,7 +348,8 @@ function _getTaggedImages(projectId, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/tagged'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/tagged/count'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); let queryParameters = []; if (iterationId !== null && iterationId !== undefined) { @@ -371,15 +358,6 @@ function _getTaggedImages(projectId, options, callback) { if (tagIds !== null && tagIds !== undefined) { queryParameters.push('tagIds=' + encodeURIComponent(tagIds.join(','))); } - if (orderBy !== null && orderBy !== undefined) { - queryParameters.push('orderBy=' + encodeURIComponent(orderBy)); - } - if (take !== null && take !== undefined) { - queryParameters.push('take=' + encodeURIComponent(take.toString())); - } - if (skip !== null && skip !== undefined) { - queryParameters.push('skip=' + encodeURIComponent(skip.toString())); - } if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -444,15 +422,7 @@ function _getTaggedImages(projectId, options, callback) { required: false, serializedName: 'parsedResponse', type: { - name: 'Sequence', - element: { - required: false, - serializedName: 'ImageElementType', - type: { - name: 'Composite', - className: 'Image' - } - } + name: 'Number' } }; result = client.deserialize(resultMapper, parsedResponse, 'result'); @@ -470,27 +440,17 @@ function _getTaggedImages(projectId, options, callback) { } /** - * @summary Get untagged images for a given project iteration + * @summary Gets the number of untagged images. * - * This API supports batching and range selection. By default it will only - * return first 50 images matching images. - * Use the {take} and {skip} parameters to control how many images to return in - * a given batch. + * This API returns the images which have no tags for a given project and + * optionally an iteration. If no iteration is specified the + * current workspace is used. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace - * - * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible - * values include: 'Newest', 'Oldest' - * - * @param {number} [options.take] Maximum number of images to return. Defaults - * to 50, limited to 256 - * - * @param {number} [options.skip] Number of images to skip before beginning the - * image batch. Defaults to 0 + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -501,13 +461,13 @@ function _getTaggedImages(projectId, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * {number} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getUntaggedImages(projectId, options, callback) { +function _getUntaggedImageCount(projectId, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -518,26 +478,17 @@ function _getUntaggedImages(projectId, options, callback) { throw new Error('callback cannot be null.'); } let iterationId = (options && options.iterationId !== undefined) ? options.iterationId : undefined; - let orderBy = (options && options.orderBy !== undefined) ? options.orderBy : undefined; - let take = (options && options.take !== undefined) ? options.take : 50; - let skip = (options && options.skip !== undefined) ? options.skip : 0; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } if (iterationId !== null && iterationId !== undefined && !(typeof iterationId.valueOf() === 'string' && msRest.isValidUuid(iterationId))) { throw new Error('iterationId must be of type string and must be a valid uuid.'); } - if (orderBy !== null && orderBy !== undefined && typeof orderBy.valueOf() !== 'string') { - throw new Error('orderBy must be of type string.'); - } - if (take !== null && take !== undefined && typeof take !== 'number') { - throw new Error('take must be of type number.'); - } - if (skip !== null && skip !== undefined && typeof skip !== 'number') { - throw new Error('skip must be of type number.'); - } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); } @@ -547,21 +498,13 @@ function _getUntaggedImages(projectId, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/untagged'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/untagged/count'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); let queryParameters = []; if (iterationId !== null && iterationId !== undefined) { queryParameters.push('iterationId=' + encodeURIComponent(iterationId.toString())); } - if (orderBy !== null && orderBy !== undefined) { - queryParameters.push('orderBy=' + encodeURIComponent(orderBy)); - } - if (take !== null && take !== undefined) { - queryParameters.push('take=' + encodeURIComponent(take.toString())); - } - if (skip !== null && skip !== undefined) { - queryParameters.push('skip=' + encodeURIComponent(skip.toString())); - } if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -626,15 +569,7 @@ function _getUntaggedImages(projectId, options, callback) { required: false, serializedName: 'parsedResponse', type: { - name: 'Sequence', - element: { - required: false, - serializedName: 'ImageElementType', - type: { - name: 'Composite', - className: 'Image' - } - } + name: 'Number' } }; result = client.deserialize(resultMapper, parsedResponse, 'result'); @@ -652,20 +587,15 @@ function _getUntaggedImages(projectId, options, callback) { } /** - * @summary Gets the number of images tagged with the provided {tagIds} - * - * The filtering is on an and/or relationship. For example, if the provided tag - * ids are for the "Dog" and - * "Cat" tags, then only images tagged with Dog and/or Cat will be returned + * @summary Associate a set of images with a set of tags. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {object} [options] Optional Parameters. + * @param {object} batch Batch of image tags. Limited to 128 tags per batch. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {array} [batch.tags] Image Tag entries to include in this batch. * - * @param {array} [options.tagIds] A list of tags ids to filter the images to - * count. Defaults to all tags when null. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -676,13 +606,14 @@ function _getUntaggedImages(projectId, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {number} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ImageTagCreateSummary} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getTaggedImageCount(projectId, options, callback) { +function _createImageTags(projectId, batch, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -692,22 +623,16 @@ function _getTaggedImageCount(projectId, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let iterationId = (options && options.iterationId !== undefined) ? options.iterationId : undefined; - let tagIds = (options && options.tagIds !== undefined) ? options.tagIds : undefined; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (iterationId !== null && iterationId !== undefined && !(typeof iterationId.valueOf() === 'string' && msRest.isValidUuid(iterationId))) { - throw new Error('iterationId must be of type string and must be a valid uuid.'); - } - if (Array.isArray(tagIds)) { - for (let i = 0; i < tagIds.length; i++) { - if (tagIds[i] !== null && tagIds[i] !== undefined && typeof tagIds[i].valueOf() !== 'string') { - throw new Error('tagIds[i] must be of type string.'); - } - } + if (batch === null || batch === undefined) { + throw new Error('batch cannot be null or undefined.'); } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); @@ -718,22 +643,13 @@ function _getTaggedImageCount(projectId, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/tagged/count'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/tags'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); - let queryParameters = []; - if (iterationId !== null && iterationId !== undefined) { - queryParameters.push('iterationId=' + encodeURIComponent(iterationId.toString())); - } - if (tagIds !== null && tagIds !== undefined) { - queryParameters.push('tagIds=' + encodeURIComponent(tagIds.join(','))); - } - if (queryParameters.length > 0) { - requestUrl += '?' + queryParameters.join('&'); - } // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -748,7 +664,21 @@ function _getTaggedImageCount(projectId, options, callback) { } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (batch !== null && batch !== undefined) { + let requestModelMapper = new client.models['ImageTagCreateBatch']().mapper(); + requestModel = client.serialize(requestModelMapper, batch, 'batch'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(batch, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -787,13 +717,7 @@ function _getTaggedImageCount(projectId, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = { - required: false, - serializedName: 'parsedResponse', - type: { - name: 'Number' - } - }; + let resultMapper = new client.models['ImageTagCreateSummary']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -809,17 +733,16 @@ function _getTaggedImageCount(projectId, options, callback) { } /** - * @summary Gets the number of untagged images + * @summary Remove a set of tags from a set of images. * - * This API returns the images which have no tags for a given project and - * optionally an iteration. If no iteration is specified the - * current workspace is used. + * @param {uuid} projectId The project id. * - * @param {uuid} projectId The project id + * @param {array} imageIds Image ids. Limited to 64 images. * - * @param {object} [options] Optional Parameters. + * @param {array} tagIds Tags to be deleted from the specified images. Limted + * to 20 tags. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -830,13 +753,13 @@ function _getTaggedImageCount(projectId, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {number} [result] - The deserialized result object if an error did not occur. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getUntaggedImageCount(projectId, options, callback) { +function _deleteImageTags(projectId, imageIds, tagIds, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -846,14 +769,29 @@ function _getUntaggedImageCount(projectId, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let iterationId = (options && options.iterationId !== undefined) ? options.iterationId : undefined; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (iterationId !== null && iterationId !== undefined && !(typeof iterationId.valueOf() === 'string' && msRest.isValidUuid(iterationId))) { - throw new Error('iterationId must be of type string and must be a valid uuid.'); + if (!Array.isArray(imageIds)) { + throw new Error('imageIds cannot be null or undefined and it must be of type array.'); + } + for (let i = 0; i < imageIds.length; i++) { + if (imageIds[i] !== null && imageIds[i] !== undefined && typeof imageIds[i].valueOf() !== 'string') { + throw new Error('imageIds[i] must be of type string.'); + } + } + if (!Array.isArray(tagIds)) { + throw new Error('tagIds cannot be null or undefined and it must be of type array.'); + } + for (let i1 = 0; i1 < tagIds.length; i1++) { + if (tagIds[i1] !== null && tagIds[i1] !== undefined && typeof tagIds[i1].valueOf() !== 'string') { + throw new Error('tagIds[i1] must be of type string.'); + } } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); @@ -864,19 +802,19 @@ function _getUntaggedImageCount(projectId, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/untagged/count'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/tags'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); let queryParameters = []; - if (iterationId !== null && iterationId !== undefined) { - queryParameters.push('iterationId=' + encodeURIComponent(iterationId.toString())); - } + queryParameters.push('imageIds=' + encodeURIComponent(imageIds.join(','))); + queryParameters.push('tagIds=' + encodeURIComponent(tagIds.join(','))); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'DELETE'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -898,7 +836,7 @@ function _getUntaggedImageCount(projectId, options, callback) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -923,49 +861,26 @@ function _getUntaggedImageCount(projectId, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = { - required: false, - serializedName: 'parsedResponse', - type: { - name: 'Number' - } - }; - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); } /** - * @summary Get images by id for a given project iteration + * @summary Create a set of image regions. * - * This API will return a set of Images for the specified tags and optionally - * iteration. If no iteration is specified the - * current workspace is used. + * This API accepts a batch of image regions, and optionally tags, to update + * existing images with region information. + * There is a limit of 64 entries in the batch. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {object} [options] Optional Parameters. + * @param {object} batch Batch of image regions which include a tag and + * bounding box. Limited to 64. * - * @param {array} [options.imageIds] The list of image ids to retrieve. Limited - * to 256 + * @param {array} [batch.regions] * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -976,13 +891,15 @@ function _getUntaggedImageCount(projectId, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ImageRegionCreateSummary} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getImagesByIds(projectId, options, callback) { +function _createImageRegions(projectId, batch, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -992,22 +909,16 @@ function _getImagesByIds(projectId, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let imageIds = (options && options.imageIds !== undefined) ? options.imageIds : undefined; - let iterationId = (options && options.iterationId !== undefined) ? options.iterationId : undefined; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (Array.isArray(imageIds)) { - for (let i = 0; i < imageIds.length; i++) { - if (imageIds[i] !== null && imageIds[i] !== undefined && typeof imageIds[i].valueOf() !== 'string') { - throw new Error('imageIds[i] must be of type string.'); - } - } - } - if (iterationId !== null && iterationId !== undefined && !(typeof iterationId.valueOf() === 'string' && msRest.isValidUuid(iterationId))) { - throw new Error('iterationId must be of type string and must be a valid uuid.'); + if (batch === null || batch === undefined) { + throw new Error('batch cannot be null or undefined.'); } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); @@ -1018,22 +929,13 @@ function _getImagesByIds(projectId, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/id'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/regions'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); - let queryParameters = []; - if (imageIds !== null && imageIds !== undefined) { - queryParameters.push('imageIds=' + encodeURIComponent(imageIds.join(','))); - } - if (iterationId !== null && iterationId !== undefined) { - queryParameters.push('iterationId=' + encodeURIComponent(iterationId.toString())); - } - if (queryParameters.length > 0) { - requestUrl += '?' + queryParameters.join('&'); - } // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -1048,7 +950,21 @@ function _getImagesByIds(projectId, options, callback) { } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (batch !== null && batch !== undefined) { + let requestModelMapper = new client.models['ImageRegionCreateBatch']().mapper(); + requestModel = client.serialize(requestModelMapper, batch, 'batch'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(batch, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -1087,21 +1003,7 @@ function _getImagesByIds(projectId, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = { - required: false, - serializedName: 'parsedResponse', - type: { - name: 'Sequence', - element: { - required: false, - serializedName: 'ImageElementType', - type: { - name: 'Composite', - className: 'Image' - } - } - } - }; + let resultMapper = new client.models['ImageRegionCreateSummary']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -1117,21 +1019,14 @@ function _getImagesByIds(projectId, options, callback) { } /** - * @summary Add the provided images to the set of training images - * - * This API accepts body content as multipart/form-data and - * application/octet-stream. When using multipart - * multiple image files can be sent at once, with a maximum of 64 files + * @summary Delete a set of image regions. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {object} imageData + * @param {array} regionIds Regions to delete. Limited to 64. * * @param {object} [options] Optional Parameters. * - * @param {array} [options.tagIds] The tags ids with which to tag each image. - * Limited to 20 - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1141,14 +1036,13 @@ function _getImagesByIds(projectId, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ImageCreateSummary} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createImagesFromData(projectId, imageData, options, callback) { +function _deleteImageRegions(projectId, regionIds, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -1158,21 +1052,21 @@ function _createImagesFromData(projectId, imageData, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let tagIds = (options && options.tagIds !== undefined) ? options.tagIds : undefined; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (Array.isArray(tagIds)) { - for (let i = 0; i < tagIds.length; i++) { - if (tagIds[i] !== null && tagIds[i] !== undefined && typeof tagIds[i].valueOf() !== 'string') { - throw new Error('tagIds[i] must be of type string.'); - } - } + if (!Array.isArray(regionIds)) { + throw new Error('regionIds cannot be null or undefined and it must be of type array.'); } - if (imageData === null || imageData === undefined) { - throw new Error('imageData cannot be null or undefined and it must be of type object.'); + for (let i = 0; i < regionIds.length; i++) { + if (regionIds[i] !== null && regionIds[i] !== undefined && typeof regionIds[i].valueOf() !== 'string') { + throw new Error('regionIds[i] must be of type string.'); + } } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); @@ -1183,23 +1077,22 @@ function _createImagesFromData(projectId, imageData, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/regions'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); let queryParameters = []; - if (tagIds !== null && tagIds !== undefined) { - queryParameters.push('tagIds=' + encodeURIComponent(tagIds.join(','))); - } + queryParameters.push('regionIds=' + encodeURIComponent(regionIds.join(','))); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'POST'; + httpRequest.method = 'DELETE'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers - httpRequest.headers['Content-Type'] = 'multipart/form-data'; + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; if (this.apiKey !== undefined && this.apiKey !== null) { httpRequest.headers['Training-Key'] = this.apiKey; } @@ -1210,19 +1103,14 @@ function _createImagesFromData(projectId, imageData, options, callback) { } } } - // Serialize Request - let formData = {}; - if (imageData !== undefined && imageData !== null) { - formData['imageData'] = imageData; - } - httpRequest.formData = formData; + httpRequest.body = null; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -1247,38 +1135,40 @@ function _createImagesFromData(projectId, imageData, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ImageCreateSummary']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); } /** - * @summary Delete images from the set of training images + * @summary Get tagged images for a given project iteration. * - * @param {uuid} projectId The project id + * This API supports batching and range selection. By default it will only + * return first 50 images matching images. + * Use the {take} and {skip} parameters to control how many images to return in + * a given batch. + * The filtering is on an and/or relationship. For example, if the provided tag + * ids are for the "Dog" and + * "Cat" tags, then only images tagged with Dog and/or Cat will be returned * - * @param {array} imageIds Ids of the images to be deleted. Limted to 256 - * images per batch + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. + * + * @param {array} [options.tagIds] A list of tags ids to filter the images. + * Defaults to all tagged images when null. Limited to 20. + * + * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible + * values include: 'Newest', 'Oldest' + * + * @param {number} [options.take] Maximum number of images to return. Defaults + * to 50, limited to 256. + * + * @param {number} [options.skip] Number of images to skip before beginning the + * image batch. Defaults to 0. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1288,13 +1178,13 @@ function _createImagesFromData(projectId, imageData, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteImages(projectId, imageIds, options, callback) { +function _getTaggedImages(projectId, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -1304,19 +1194,38 @@ function _deleteImages(projectId, imageIds, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let iterationId = (options && options.iterationId !== undefined) ? options.iterationId : undefined; + let tagIds = (options && options.tagIds !== undefined) ? options.tagIds : undefined; + let orderBy = (options && options.orderBy !== undefined) ? options.orderBy : undefined; + let take = (options && options.take !== undefined) ? options.take : 50; + let skip = (options && options.skip !== undefined) ? options.skip : 0; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (!Array.isArray(imageIds)) { - throw new Error('imageIds cannot be null or undefined and it must be of type array.'); + if (iterationId !== null && iterationId !== undefined && !(typeof iterationId.valueOf() === 'string' && msRest.isValidUuid(iterationId))) { + throw new Error('iterationId must be of type string and must be a valid uuid.'); } - for (let i = 0; i < imageIds.length; i++) { - if (imageIds[i] !== null && imageIds[i] !== undefined && typeof imageIds[i].valueOf() !== 'string') { - throw new Error('imageIds[i] must be of type string.'); + if (Array.isArray(tagIds)) { + for (let i = 0; i < tagIds.length; i++) { + if (tagIds[i] !== null && tagIds[i] !== undefined && typeof tagIds[i].valueOf() !== 'string') { + throw new Error('tagIds[i] must be of type string.'); + } } } + if (orderBy !== null && orderBy !== undefined && typeof orderBy.valueOf() !== 'string') { + throw new Error('orderBy must be of type string.'); + } + if (take !== null && take !== undefined && typeof take !== 'number') { + throw new Error('take must be of type number.'); + } + if (skip !== null && skip !== undefined && typeof skip !== 'number') { + throw new Error('skip must be of type number.'); + } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); } @@ -1326,17 +1235,32 @@ function _deleteImages(projectId, imageIds, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/tagged'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); let queryParameters = []; - queryParameters.push('imageIds=' + encodeURIComponent(imageIds.join(','))); + if (iterationId !== null && iterationId !== undefined) { + queryParameters.push('iterationId=' + encodeURIComponent(iterationId.toString())); + } + if (tagIds !== null && tagIds !== undefined) { + queryParameters.push('tagIds=' + encodeURIComponent(tagIds.join(','))); + } + if (orderBy !== null && orderBy !== undefined) { + queryParameters.push('orderBy=' + encodeURIComponent(orderBy)); + } + if (take !== null && take !== undefined) { + queryParameters.push('take=' + encodeURIComponent(take.toString())); + } + if (skip !== null && skip !== undefined) { + queryParameters.push('skip=' + encodeURIComponent(skip.toString())); + } if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'DELETE'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -1358,7 +1282,7 @@ function _deleteImages(projectId, imageIds, options, callback) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 204) { + if (statusCode !== 200) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -1383,27 +1307,64 @@ function _deleteImages(projectId, imageIds, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ImageElementType', + type: { + name: 'Composite', + className: 'Image' + } + } + } + }; + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } return callback(null, result, httpRequest, response); }); } /** - * @summary Add the provided batch of images to the set of training images + * @summary Get untagged images for a given project iteration. * - * This API accepts a batch of files, and optionally tags, to create images. - * There is a limit of 64 images and 20 tags. + * This API supports batching and range selection. By default it will only + * return first 50 images matching images. + * Use the {take} and {skip} parameters to control how many images to return in + * a given batch. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {object} batch The batch of image files to add. Limited to 64 images - * and 20 tags per batch + * @param {object} [options] Optional Parameters. * - * @param {array} [batch.images] + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. * - * @param {array} [batch.tagIds] + * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible + * values include: 'Newest', 'Oldest' * - * @param {object} [options] Optional Parameters. + * @param {number} [options.take] Maximum number of images to return. Defaults + * to 50, limited to 256. + * + * @param {number} [options.skip] Number of images to skip before beginning the + * image batch. Defaults to 0. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1414,14 +1375,13 @@ function _deleteImages(projectId, imageIds, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ImageCreateSummary} for more information. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createImagesFromFiles(projectId, batch, options, callback) { +function _getUntaggedImages(projectId, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -1431,29 +1391,62 @@ function _createImagesFromFiles(projectId, batch, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let iterationId = (options && options.iterationId !== undefined) ? options.iterationId : undefined; + let orderBy = (options && options.orderBy !== undefined) ? options.orderBy : undefined; + let take = (options && options.take !== undefined) ? options.take : 50; + let skip = (options && options.skip !== undefined) ? options.skip : 0; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (batch === null || batch === undefined) { - throw new Error('batch cannot be null or undefined.'); + if (iterationId !== null && iterationId !== undefined && !(typeof iterationId.valueOf() === 'string' && msRest.isValidUuid(iterationId))) { + throw new Error('iterationId must be of type string and must be a valid uuid.'); } - if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { - throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); + if (orderBy !== null && orderBy !== undefined && typeof orderBy.valueOf() !== 'string') { + throw new Error('orderBy must be of type string.'); } - } catch (error) { - return callback(error); + if (take !== null && take !== undefined && typeof take !== 'number') { + throw new Error('take must be of type number.'); + } + if (skip !== null && skip !== undefined && typeof skip !== 'number') { + throw new Error('skip must be of type number.'); + } + if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { + throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); + } + } catch (error) { + return callback(error); } // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/files'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/untagged'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); + let queryParameters = []; + if (iterationId !== null && iterationId !== undefined) { + queryParameters.push('iterationId=' + encodeURIComponent(iterationId.toString())); + } + if (orderBy !== null && orderBy !== undefined) { + queryParameters.push('orderBy=' + encodeURIComponent(orderBy)); + } + if (take !== null && take !== undefined) { + queryParameters.push('take=' + encodeURIComponent(take.toString())); + } + if (skip !== null && skip !== undefined) { + queryParameters.push('skip=' + encodeURIComponent(skip.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'POST'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -1468,21 +1461,7 @@ function _createImagesFromFiles(projectId, batch, options, callback) { } } } - // Serialize Request - let requestContent = null; - let requestModel = null; - try { - if (batch !== null && batch !== undefined) { - let requestModelMapper = new client.models['ImageFileCreateBatch']().mapper(); - requestModel = client.serialize(requestModelMapper, batch, 'batch'); - requestContent = JSON.stringify(requestModel); - } - } catch (error) { - let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(batch, null, 2)}.`); - return callback(serializationError); - } - httpRequest.body = requestContent; + httpRequest.body = null; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -1521,7 +1500,21 @@ function _createImagesFromFiles(projectId, batch, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ImageCreateSummary']().mapper(); + let resultMapper = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ImageElementType', + type: { + name: 'Composite', + className: 'Image' + } + } + } + }; result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -1537,21 +1530,20 @@ function _createImagesFromFiles(projectId, batch, options, callback) { } /** - * @summary Add the provided images urls to the set of training images - * - * This API accepts a batch of urls, and optionally tags, to create images. - * There is a limit of 64 images and 20 tags. + * @summary Get images by id for a given project iteration. * - * @param {uuid} projectId The project id + * This API will return a set of Images for the specified tags and optionally + * iteration. If no iteration is specified the + * current workspace is used. * - * @param {object} batch Image urls and tag ids. Limited to 64 images and 20 - * tags per batch + * @param {uuid} projectId The project id. * - * @param {array} [batch.images] + * @param {object} [options] Optional Parameters. * - * @param {array} [batch.tagIds] + * @param {array} [options.imageIds] The list of image ids to retrieve. Limited + * to 256. * - * @param {object} [options] Optional Parameters. + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1562,14 +1554,13 @@ function _createImagesFromFiles(projectId, batch, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ImageCreateSummary} for more information. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createImagesFromUrls(projectId, batch, options, callback) { +function _getImagesByIds(projectId, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -1579,13 +1570,25 @@ function _createImagesFromUrls(projectId, batch, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let imageIds = (options && options.imageIds !== undefined) ? options.imageIds : undefined; + let iterationId = (options && options.iterationId !== undefined) ? options.iterationId : undefined; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (batch === null || batch === undefined) { - throw new Error('batch cannot be null or undefined.'); + if (Array.isArray(imageIds)) { + for (let i = 0; i < imageIds.length; i++) { + if (imageIds[i] !== null && imageIds[i] !== undefined && typeof imageIds[i].valueOf() !== 'string') { + throw new Error('imageIds[i] must be of type string.'); + } + } + } + if (iterationId !== null && iterationId !== undefined && !(typeof iterationId.valueOf() === 'string' && msRest.isValidUuid(iterationId))) { + throw new Error('iterationId must be of type string and must be a valid uuid.'); } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); @@ -1596,12 +1599,23 @@ function _createImagesFromUrls(projectId, batch, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/urls'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/id'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); + let queryParameters = []; + if (imageIds !== null && imageIds !== undefined) { + queryParameters.push('imageIds=' + encodeURIComponent(imageIds.join(','))); + } + if (iterationId !== null && iterationId !== undefined) { + queryParameters.push('iterationId=' + encodeURIComponent(iterationId.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'POST'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -1616,21 +1630,7 @@ function _createImagesFromUrls(projectId, batch, options, callback) { } } } - // Serialize Request - let requestContent = null; - let requestModel = null; - try { - if (batch !== null && batch !== undefined) { - let requestModelMapper = new client.models['ImageUrlCreateBatch']().mapper(); - requestModel = client.serialize(requestModelMapper, batch, 'batch'); - requestContent = JSON.stringify(requestModel); - } - } catch (error) { - let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(batch, null, 2)}.`); - return callback(serializationError); - } - httpRequest.body = requestContent; + httpRequest.body = null; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -1669,7 +1669,21 @@ function _createImagesFromUrls(projectId, batch, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ImageCreateSummary']().mapper(); + let resultMapper = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ImageElementType', + type: { + name: 'Composite', + className: 'Image' + } + } + } + }; result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -1685,22 +1699,21 @@ function _createImagesFromUrls(projectId, batch, options, callback) { } /** - * @summary Add the specified predicted images to the set of training images - * - * This API creates a batch of images from predicted images specified. There is - * a limit of 64 images and 20 tags. - * - * @param {uuid} projectId The project id + * @summary Add the provided images to the set of training images. * - * @param {object} batch Image and tag ids. Limted to 64 images and 20 tags per - * batch + * This API accepts body content as multipart/form-data and + * application/octet-stream. When using multipart + * multiple image files can be sent at once, with a maximum of 64 files * - * @param {array} [batch.images] + * @param {uuid} projectId The project id. * - * @param {array} [batch.tagIds] + * @param {object} imageData Binary image data. * * @param {object} [options] Optional Parameters. * + * @param {array} [options.tagIds] The tags ids with which to tag each image. + * Limited to 20. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1717,7 +1730,7 @@ function _createImagesFromUrls(projectId, batch, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createImagesFromPredictions(projectId, batch, options, callback) { +function _createImagesFromData(projectId, imageData, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -1727,13 +1740,24 @@ function _createImagesFromPredictions(projectId, batch, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let tagIds = (options && options.tagIds !== undefined) ? options.tagIds : undefined; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (batch === null || batch === undefined) { - throw new Error('batch cannot be null or undefined.'); + if (Array.isArray(tagIds)) { + for (let i = 0; i < tagIds.length; i++) { + if (tagIds[i] !== null && tagIds[i] !== undefined && typeof tagIds[i].valueOf() !== 'string') { + throw new Error('tagIds[i] must be of type string.'); + } + } + } + if (imageData === null || imageData === undefined) { + throw new Error('imageData cannot be null or undefined and it must be of type object.'); } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); @@ -1744,8 +1768,16 @@ function _createImagesFromPredictions(projectId, batch, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/predictions'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); + let queryParameters = []; + if (tagIds !== null && tagIds !== undefined) { + queryParameters.push('tagIds=' + encodeURIComponent(tagIds.join(','))); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } // Create HTTP transport objects let httpRequest = new WebResource(); @@ -1753,7 +1785,7 @@ function _createImagesFromPredictions(projectId, batch, options, callback) { httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers - httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + httpRequest.headers['Content-Type'] = 'multipart/form-data'; if (this.apiKey !== undefined && this.apiKey !== null) { httpRequest.headers['Training-Key'] = this.apiKey; } @@ -1765,20 +1797,11 @@ function _createImagesFromPredictions(projectId, batch, options, callback) { } } // Serialize Request - let requestContent = null; - let requestModel = null; - try { - if (batch !== null && batch !== undefined) { - let requestModelMapper = new client.models['ImageIdCreateBatch']().mapper(); - requestModel = client.serialize(requestModelMapper, batch, 'batch'); - requestContent = JSON.stringify(requestModel); - } - } catch (error) { - let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(batch, null, 2)}.`); - return callback(serializationError); + let formData = {}; + if (imageData !== undefined && imageData !== null) { + formData['imageData'] = imageData; } - httpRequest.body = requestContent; + httpRequest.formData = formData; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -1833,13 +1856,12 @@ function _createImagesFromPredictions(projectId, batch, options, callback) { } /** - * @summary Associate a set of images with a set of tags - * - * @param {uuid} projectId The project id + * @summary Delete images from the set of training images. * - * @param {object} batch Batch of image tags. Limited to 128 tags per batch + * @param {uuid} projectId The project id. * - * @param {array} [batch.tags] + * @param {array} imageIds Ids of the images to be deleted. Limted to 256 + * images per batch. * * @param {object} [options] Optional Parameters. * @@ -1852,14 +1874,13 @@ function _createImagesFromPredictions(projectId, batch, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ImageTagCreateSummary} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createImageTags(projectId, batch, options, callback) { +function _deleteImages(projectId, imageIds, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -1871,11 +1892,19 @@ function _createImageTags(projectId, batch, options, callback) { } // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (batch === null || batch === undefined) { - throw new Error('batch cannot be null or undefined.'); + if (!Array.isArray(imageIds)) { + throw new Error('imageIds cannot be null or undefined and it must be of type array.'); + } + for (let i = 0; i < imageIds.length; i++) { + if (imageIds[i] !== null && imageIds[i] !== undefined && typeof imageIds[i].valueOf() !== 'string') { + throw new Error('imageIds[i] must be of type string.'); + } } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); @@ -1886,12 +1915,18 @@ function _createImageTags(projectId, batch, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/tags'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); + let queryParameters = []; + queryParameters.push('imageIds=' + encodeURIComponent(imageIds.join(','))); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'POST'; + httpRequest.method = 'DELETE'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -1906,28 +1941,14 @@ function _createImageTags(projectId, batch, options, callback) { } } } - // Serialize Request - let requestContent = null; - let requestModel = null; - try { - if (batch !== null && batch !== undefined) { - let requestModelMapper = new client.models['ImageTagCreateBatch']().mapper(); - requestModel = client.serialize(requestModelMapper, batch, 'batch'); - requestContent = JSON.stringify(requestModel); - } - } catch (error) { - let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(batch, null, 2)}.`); - return callback(serializationError); - } - httpRequest.body = requestContent; + httpRequest.body = null; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -1952,37 +1973,25 @@ function _createImageTags(projectId, batch, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ImageTagCreateSummary']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); } /** - * @summary Remove a set of tags from a set of images + * @summary Add the provided batch of images to the set of training images. * - * @param {uuid} projectId The project id + * This API accepts a batch of files, and optionally tags, to create images. + * There is a limit of 64 images and 20 tags. * - * @param {array} imageIds Image ids. Limited to 64 images + * @param {uuid} projectId The project id. * - * @param {array} tagIds Tags to be deleted from the specified images. Limted - * to 20 tags + * @param {object} batch The batch of image files to add. Limited to 64 images + * and 20 tags per batch. + * + * @param {array} [batch.images] + * + * @param {array} [batch.tagIds] * * @param {object} [options] Optional Parameters. * @@ -1995,13 +2004,14 @@ function _createImageTags(projectId, batch, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ImageCreateSummary} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteImageTags(projectId, imageIds, tagIds, options, callback) { +function _createImagesFromFiles(projectId, batch, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -2013,24 +2023,14 @@ function _deleteImageTags(projectId, imageIds, tagIds, options, callback) { } // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (!Array.isArray(imageIds)) { - throw new Error('imageIds cannot be null or undefined and it must be of type array.'); - } - for (let i = 0; i < imageIds.length; i++) { - if (imageIds[i] !== null && imageIds[i] !== undefined && typeof imageIds[i].valueOf() !== 'string') { - throw new Error('imageIds[i] must be of type string.'); - } - } - if (!Array.isArray(tagIds)) { - throw new Error('tagIds cannot be null or undefined and it must be of type array.'); - } - for (let i1 = 0; i1 < tagIds.length; i1++) { - if (tagIds[i1] !== null && tagIds[i1] !== undefined && typeof tagIds[i1].valueOf() !== 'string') { - throw new Error('tagIds[i1] must be of type string.'); - } + if (batch === null || batch === undefined) { + throw new Error('batch cannot be null or undefined.'); } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); @@ -2041,18 +2041,13 @@ function _deleteImageTags(projectId, imageIds, tagIds, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/tags'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/files'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); - let queryParameters = []; - queryParameters.push('imageIds=' + encodeURIComponent(imageIds.join(','))); - queryParameters.push('tagIds=' + encodeURIComponent(tagIds.join(','))); - if (queryParameters.length > 0) { - requestUrl += '?' + queryParameters.join('&'); - } // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'DELETE'; + httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -2067,14 +2062,28 @@ function _deleteImageTags(projectId, imageIds, tagIds, options, callback) { } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (batch !== null && batch !== undefined) { + let requestModelMapper = new client.models['ImageFileCreateBatch']().mapper(); + requestModel = client.serialize(requestModelMapper, batch, 'batch'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(batch, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 204) { + if (statusCode !== 200) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -2099,24 +2108,42 @@ function _deleteImageTags(projectId, imageIds, tagIds, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ImageCreateSummary']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } return callback(null, result, httpRequest, response); }); } /** - * @summary Create a set of image regions + * @summary Add the provided images urls to the set of training images. * - * This API accepts a batch of image regions, and optionally tags, to update - * existing images with region information. - * There is a limit of 64 entries in the batch. + * This API accepts a batch of urls, and optionally tags, to create images. + * There is a limit of 64 images and 20 tags. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {object} batch Batch of image regions which include a tag and - * bounding box. Limited to 64 + * @param {object} batch Image urls and tag ids. Limited to 64 images and 20 + * tags per batch. * - * @param {array} [batch.regions] + * @param {array} [batch.images] + * + * @param {array} [batch.tagIds] * * @param {object} [options] Optional Parameters. * @@ -2130,14 +2157,13 @@ function _deleteImageTags(projectId, imageIds, tagIds, options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ImageRegionCreateSummary} for more - * information. + * See {@link ImageCreateSummary} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createImageRegions(projectId, batch, options, callback) { +function _createImagesFromUrls(projectId, batch, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -2149,6 +2175,9 @@ function _createImageRegions(projectId, batch, options, callback) { } // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } @@ -2164,7 +2193,8 @@ function _createImageRegions(projectId, batch, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/regions'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/urls'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); // Create HTTP transport objects @@ -2189,7 +2219,7 @@ function _createImageRegions(projectId, batch, options, callback) { let requestModel = null; try { if (batch !== null && batch !== undefined) { - let requestModelMapper = new client.models['ImageRegionCreateBatch']().mapper(); + let requestModelMapper = new client.models['ImageUrlCreateBatch']().mapper(); requestModel = client.serialize(requestModelMapper, batch, 'batch'); requestContent = JSON.stringify(requestModel); } @@ -2237,7 +2267,7 @@ function _createImageRegions(projectId, batch, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ImageRegionCreateSummary']().mapper(); + let resultMapper = new client.models['ImageCreateSummary']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -2253,11 +2283,19 @@ function _createImageRegions(projectId, batch, options, callback) { } /** - * @summary Delete a set of image regions + * @summary Add the specified predicted images to the set of training images. + * + * This API creates a batch of images from predicted images specified. There is + * a limit of 64 images and 20 tags. + * + * @param {uuid} projectId The project id. + * + * @param {object} batch Image and tag ids. Limted to 64 images and 20 tags per + * batch. * - * @param {uuid} projectId The project id + * @param {array} [batch.images] * - * @param {array} regionIds Regions to delete. Limited to 64 + * @param {array} [batch.tagIds] * * @param {object} [options] Optional Parameters. * @@ -2270,13 +2308,14 @@ function _createImageRegions(projectId, batch, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ImageCreateSummary} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteImageRegions(projectId, regionIds, options, callback) { +function _createImagesFromPredictions(projectId, batch, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -2288,16 +2327,14 @@ function _deleteImageRegions(projectId, regionIds, options, callback) { } // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (!Array.isArray(regionIds)) { - throw new Error('regionIds cannot be null or undefined and it must be of type array.'); - } - for (let i = 0; i < regionIds.length; i++) { - if (regionIds[i] !== null && regionIds[i] !== undefined && typeof regionIds[i].valueOf() !== 'string') { - throw new Error('regionIds[i] must be of type string.'); - } + if (batch === null || batch === undefined) { + throw new Error('batch cannot be null or undefined.'); } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); @@ -2308,17 +2345,13 @@ function _deleteImageRegions(projectId, regionIds, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/regions'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/predictions'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); - let queryParameters = []; - queryParameters.push('regionIds=' + encodeURIComponent(regionIds.join(','))); - if (queryParameters.length > 0) { - requestUrl += '?' + queryParameters.join('&'); - } // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'DELETE'; + httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -2333,14 +2366,28 @@ function _deleteImageRegions(projectId, regionIds, options, callback) { } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (batch !== null && batch !== undefined) { + let requestModelMapper = new client.models['ImageIdCreateBatch']().mapper(); + requestModel = client.serialize(requestModelMapper, batch, 'batch'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(batch, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 204) { + if (statusCode !== 200) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -2365,6 +2412,23 @@ function _deleteImageRegions(projectId, regionIds, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ImageCreateSummary']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } return callback(null, result, httpRequest, response); }); @@ -2377,9 +2441,9 @@ function _deleteImageRegions(projectId, regionIds, options, callback) { * This API will get region proposals for an image along with confidences for * the region. It returns an empty array if no proposals are found. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} imageId The image id + * @param {uuid} imageId The image id. * * @param {object} [options] Optional Parameters. * @@ -2411,6 +2475,9 @@ function _getImageRegionProposals(projectId, imageId, options, callback) { } // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } @@ -2427,6 +2494,7 @@ function _getImageRegionProposals(projectId, imageId, options, callback) { // Construct URL let baseUrl = this.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + '{projectId}/images/{imageId}/regionproposals'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); requestUrl = requestUrl.replace('{imageId}', encodeURIComponent(imageId.toString())); @@ -2503,11 +2571,11 @@ function _getImageRegionProposals(projectId, imageId, options, callback) { /** * @summary Delete a set of predicted images and their associated prediction - * results + * results. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {array} ids The prediction ids. Limited to 64 + * @param {array} ids The prediction ids. Limited to 64. * * @param {object} [options] Optional Parameters. * @@ -2538,6 +2606,9 @@ function _deletePrediction(projectId, ids, options, callback) { } // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } @@ -2559,6 +2630,7 @@ function _deletePrediction(projectId, ids, options, callback) { // Construct URL let baseUrl = this.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/predictions'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); let queryParameters = []; queryParameters.push('ids=' + encodeURIComponent(ids.join(','))); @@ -2621,34 +2693,21 @@ function _deletePrediction(projectId, ids, options, callback) { } /** - * @summary Get images that were sent to your prediction endpoint - * - * @param {uuid} projectId The project id - * - * @param {object} query Parameters used to query the predictions. Limited to - * combining 2 tags - * - * @param {string} [query.session] - * - * @param {string} [query.continuation] - * - * @param {number} [query.maxCount] - * - * @param {string} [query.orderBy] Possible values include: 'Newest', 'Oldest', - * 'Suggested' - * - * @param {array} [query.tags] - * - * @param {uuid} [query.iterationId] + * @summary Quick test an image url. * - * @param {date} [query.startTime] + * @param {uuid} projectId The project to evaluate against. * - * @param {date} [query.endTime] + * @param {object} imageUrl An {Iris.Web.Api.Models.ImageUrl} that contains the + * url of the image to be evaluated. * - * @param {string} [query.application] + * @param {string} [imageUrl.url] * * @param {object} [options] Optional Parameters. * + * @param {uuid} [options.iterationId] Optional. Specifies the id of a + * particular iteration to evaluate against. + * The default iteration for the project will be used when not specified. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2659,13 +2718,13 @@ function _deletePrediction(projectId, ids, options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PredictionQueryResult} for more information. + * See {@link ImagePrediction} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _queryPredictions(projectId, query, options, callback) { +function _quickTestImageUrl(projectId, imageUrl, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -2675,13 +2734,20 @@ function _queryPredictions(projectId, query, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let iterationId = (options && options.iterationId !== undefined) ? options.iterationId : undefined; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (query === null || query === undefined) { - throw new Error('query cannot be null or undefined.'); + if (imageUrl === null || imageUrl === undefined) { + throw new Error('imageUrl cannot be null or undefined.'); + } + if (iterationId !== null && iterationId !== undefined && !(typeof iterationId.valueOf() === 'string' && msRest.isValidUuid(iterationId))) { + throw new Error('iterationId must be of type string and must be a valid uuid.'); } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); @@ -2692,8 +2758,16 @@ function _queryPredictions(projectId, query, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/predictions/query'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/quicktest/url'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); + let queryParameters = []; + if (iterationId !== null && iterationId !== undefined) { + queryParameters.push('iterationId=' + encodeURIComponent(iterationId.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } // Create HTTP transport objects let httpRequest = new WebResource(); @@ -2716,14 +2790,14 @@ function _queryPredictions(projectId, query, options, callback) { let requestContent = null; let requestModel = null; try { - if (query !== null && query !== undefined) { - let requestModelMapper = new client.models['PredictionQueryToken']().mapper(); - requestModel = client.serialize(requestModelMapper, query, 'query'); + if (imageUrl !== null && imageUrl !== undefined) { + let requestModelMapper = new client.models['ImageUrl']().mapper(); + requestModel = client.serialize(requestModelMapper, imageUrl, 'imageUrl'); requestContent = JSON.stringify(requestModel); } } catch (error) { let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(query, null, 2)}.`); + `payload - ${JSON.stringify(imageUrl, null, 2)}.`); return callback(serializationError); } httpRequest.body = requestContent; @@ -2765,7 +2839,7 @@ function _queryPredictions(projectId, query, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['PredictionQueryResult']().mapper(); + let resultMapper = new client.models['ImagePrediction']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -2781,14 +2855,11 @@ function _queryPredictions(projectId, query, options, callback) { } /** - * @summary Quick test an image url - * - * @param {uuid} projectId The project to evaluate against + * @summary Quick test an image. * - * @param {object} imageUrl An {Iris.Web.Api.Models.ImageUrl} that contains the - * url of the image to be evaluated + * @param {uuid} projectId The project id. * - * @param {string} [imageUrl.url] + * @param {object} imageData Binary image data. * * @param {object} [options] Optional Parameters. * @@ -2812,7 +2883,7 @@ function _queryPredictions(projectId, query, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _quickTestImageUrl(projectId, imageUrl, options, callback) { +function _quickTestImage(projectId, imageData, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -2825,15 +2896,18 @@ function _quickTestImageUrl(projectId, imageUrl, options, callback) { let iterationId = (options && options.iterationId !== undefined) ? options.iterationId : undefined; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (imageUrl === null || imageUrl === undefined) { - throw new Error('imageUrl cannot be null or undefined.'); - } if (iterationId !== null && iterationId !== undefined && !(typeof iterationId.valueOf() === 'string' && msRest.isValidUuid(iterationId))) { throw new Error('iterationId must be of type string and must be a valid uuid.'); } + if (imageData === null || imageData === undefined) { + throw new Error('imageData cannot be null or undefined and it must be of type object.'); + } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); } @@ -2843,7 +2917,8 @@ function _quickTestImageUrl(projectId, imageUrl, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/quicktest/url'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/quicktest/image'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); let queryParameters = []; if (iterationId !== null && iterationId !== undefined) { @@ -2859,7 +2934,7 @@ function _quickTestImageUrl(projectId, imageUrl, options, callback) { httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers - httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + httpRequest.headers['Content-Type'] = 'multipart/form-data'; if (this.apiKey !== undefined && this.apiKey !== null) { httpRequest.headers['Training-Key'] = this.apiKey; } @@ -2871,20 +2946,11 @@ function _quickTestImageUrl(projectId, imageUrl, options, callback) { } } // Serialize Request - let requestContent = null; - let requestModel = null; - try { - if (imageUrl !== null && imageUrl !== undefined) { - let requestModelMapper = new client.models['ImageUrl']().mapper(); - requestModel = client.serialize(requestModelMapper, imageUrl, 'imageUrl'); - requestContent = JSON.stringify(requestModel); - } - } catch (error) { - let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(imageUrl, null, 2)}.`); - return callback(serializationError); + let formData = {}; + if (imageData !== undefined && imageData !== null) { + formData['imageData'] = imageData; } - httpRequest.body = requestContent; + httpRequest.formData = formData; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -2939,17 +3005,33 @@ function _quickTestImageUrl(projectId, imageUrl, options, callback) { } /** - * @summary Quick test an image + * @summary Get images that were sent to your prediction endpoint. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {object} imageData + * @param {object} query Parameters used to query the predictions. Limited to + * combining 2 tags. * - * @param {object} [options] Optional Parameters. + * @param {string} [query.session] * - * @param {uuid} [options.iterationId] Optional. Specifies the id of a - * particular iteration to evaluate against. - * The default iteration for the project will be used when not specified. + * @param {string} [query.continuation] + * + * @param {number} [query.maxCount] + * + * @param {string} [query.orderBy] Possible values include: 'Newest', 'Oldest', + * 'Suggested' + * + * @param {array} [query.tags] + * + * @param {uuid} [query.iterationId] + * + * @param {date} [query.startTime] + * + * @param {date} [query.endTime] + * + * @param {string} [query.application] + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2961,13 +3043,13 @@ function _quickTestImageUrl(projectId, imageUrl, options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ImagePrediction} for more information. + * See {@link PredictionQueryResult} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _quickTestImage(projectId, imageData, options, callback) { +function _queryPredictions(projectId, query, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -2977,17 +3059,16 @@ function _quickTestImage(projectId, imageData, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let iterationId = (options && options.iterationId !== undefined) ? options.iterationId : undefined; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (iterationId !== null && iterationId !== undefined && !(typeof iterationId.valueOf() === 'string' && msRest.isValidUuid(iterationId))) { - throw new Error('iterationId must be of type string and must be a valid uuid.'); - } - if (imageData === null || imageData === undefined) { - throw new Error('imageData cannot be null or undefined and it must be of type object.'); + if (query === null || query === undefined) { + throw new Error('query cannot be null or undefined.'); } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); @@ -2998,15 +3079,9 @@ function _quickTestImage(projectId, imageData, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/quicktest/image'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/predictions/query'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); - let queryParameters = []; - if (iterationId !== null && iterationId !== undefined) { - queryParameters.push('iterationId=' + encodeURIComponent(iterationId.toString())); - } - if (queryParameters.length > 0) { - requestUrl += '?' + queryParameters.join('&'); - } // Create HTTP transport objects let httpRequest = new WebResource(); @@ -3014,7 +3089,7 @@ function _quickTestImage(projectId, imageData, options, callback) { httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers - httpRequest.headers['Content-Type'] = 'multipart/form-data'; + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; if (this.apiKey !== undefined && this.apiKey !== null) { httpRequest.headers['Training-Key'] = this.apiKey; } @@ -3026,11 +3101,20 @@ function _quickTestImage(projectId, imageData, options, callback) { } } // Serialize Request - let formData = {}; - if (imageData !== undefined && imageData !== null) { - formData['imageData'] = imageData; + let requestContent = null; + let requestModel = null; + try { + if (query !== null && query !== undefined) { + let requestModelMapper = new client.models['PredictionQueryToken']().mapper(); + requestModel = client.serialize(requestModelMapper, query, 'query'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(query, null, 2)}.`); + return callback(serializationError); } - httpRequest.formData = formData; + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -3069,7 +3153,7 @@ function _quickTestImage(projectId, imageData, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ImagePrediction']().mapper(); + let resultMapper = new client.models['PredictionQueryResult']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -3085,12 +3169,20 @@ function _quickTestImage(projectId, imageData, options, callback) { } /** - * @summary Queues project for training + * @summary Get detailed performance information about an iteration. + * + * @param {uuid} projectId The id of the project the iteration belongs to. * - * @param {uuid} projectId The project id + * @param {uuid} iterationId The id of the iteration to get. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.threshold] The threshold used to determine true + * predictions. + * + * @param {number} [options.overlapThreshold] If applicable, the bounding box + * overlap threshold used to determine true predictions. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -3101,13 +3193,13 @@ function _quickTestImage(projectId, imageData, options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link Iteration} for more information. + * See {@link IterationPerformance} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _trainProject(projectId, options, callback) { +function _getIterationPerformance(projectId, iterationId, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -3117,11 +3209,25 @@ function _trainProject(projectId, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let threshold = (options && options.threshold !== undefined) ? options.threshold : undefined; + let overlapThreshold = (options && options.overlapThreshold !== undefined) ? options.overlapThreshold : undefined; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } + if (iterationId === null || iterationId === undefined || typeof iterationId.valueOf() !== 'string' || !msRest.isValidUuid(iterationId)) { + throw new Error('iterationId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + } + if (threshold !== null && threshold !== undefined && typeof threshold !== 'number') { + throw new Error('threshold must be of type number.'); + } + if (overlapThreshold !== null && overlapThreshold !== undefined && typeof overlapThreshold !== 'number') { + throw new Error('overlapThreshold must be of type number.'); + } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); } @@ -3131,12 +3237,24 @@ function _trainProject(projectId, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/train'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/iterations/{iterationId}/performance'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); + requestUrl = requestUrl.replace('{iterationId}', encodeURIComponent(iterationId.toString())); + let queryParameters = []; + if (threshold !== null && threshold !== undefined) { + queryParameters.push('threshold=' + encodeURIComponent(threshold.toString())); + } + if (overlapThreshold !== null && overlapThreshold !== undefined) { + queryParameters.push('overlapThreshold=' + encodeURIComponent(overlapThreshold.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'POST'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -3190,7 +3308,7 @@ function _trainProject(projectId, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['Iteration']().mapper(); + let resultMapper = new client.models['IterationPerformance']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -3206,10 +3324,34 @@ function _trainProject(projectId, options, callback) { } /** - * @summary Get your projects + * @summary Get image with its prediction for a given project iteration. + * + * This API supports batching and range selection. By default it will only + * return first 50 images matching images. + * Use the {take} and {skip} parameters to control how many images to return in + * a given batch. + * The filtering is on an and/or relationship. For example, if the provided tag + * ids are for the "Dog" and + * "Cat" tags, then only images tagged with Dog and/or Cat will be returned + * + * @param {uuid} projectId The project id. + * + * @param {uuid} iterationId The iteration id. Defaults to workspace. * * @param {object} [options] Optional Parameters. * + * @param {array} [options.tagIds] A list of tags ids to filter the images. + * Defaults to all tagged images when null. Limited to 20. + * + * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible + * values include: 'Newest', 'Oldest' + * + * @param {number} [options.take] Maximum number of images to return. Defaults + * to 50, limited to 256. + * + * @param {number} [options.skip] Number of images to skip before beginning the + * image batch. Defaults to 0. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -3225,7 +3367,7 @@ function _trainProject(projectId, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getProjects(options, callback) { +function _getImagePerformances(projectId, iterationId, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -3235,8 +3377,37 @@ function _getProjects(options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let tagIds = (options && options.tagIds !== undefined) ? options.tagIds : undefined; + let orderBy = (options && options.orderBy !== undefined) ? options.orderBy : undefined; + let take = (options && options.take !== undefined) ? options.take : 50; + let skip = (options && options.skip !== undefined) ? options.skip : 0; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } + if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { + throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + } + if (iterationId === null || iterationId === undefined || typeof iterationId.valueOf() !== 'string' || !msRest.isValidUuid(iterationId)) { + throw new Error('iterationId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + } + if (Array.isArray(tagIds)) { + for (let i = 0; i < tagIds.length; i++) { + if (tagIds[i] !== null && tagIds[i] !== undefined && typeof tagIds[i].valueOf() !== 'string') { + throw new Error('tagIds[i] must be of type string.'); + } + } + } + if (orderBy !== null && orderBy !== undefined && typeof orderBy.valueOf() !== 'string') { + throw new Error('orderBy must be of type string.'); + } + if (take !== null && take !== undefined && typeof take !== 'number') { + throw new Error('take must be of type number.'); + } + if (skip !== null && skip !== undefined && typeof skip !== 'number') { + throw new Error('skip must be of type number.'); + } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); } @@ -3246,7 +3417,26 @@ function _getProjects(options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/iterations/{iterationId}/performance/images'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); + requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); + requestUrl = requestUrl.replace('{iterationId}', encodeURIComponent(iterationId.toString())); + let queryParameters = []; + if (tagIds !== null && tagIds !== undefined) { + queryParameters.push('tagIds=' + encodeURIComponent(tagIds.join(','))); + } + if (orderBy !== null && orderBy !== undefined) { + queryParameters.push('orderBy=' + encodeURIComponent(orderBy)); + } + if (take !== null && take !== undefined) { + queryParameters.push('take=' + encodeURIComponent(take.toString())); + } + if (skip !== null && skip !== undefined) { + queryParameters.push('skip=' + encodeURIComponent(skip.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } // Create HTTP transport objects let httpRequest = new WebResource(); @@ -3311,10 +3501,10 @@ function _getProjects(options, callback) { name: 'Sequence', element: { required: false, - serializedName: 'ProjectElementType', + serializedName: 'ImagePerformanceElementType', type: { name: 'Composite', - className: 'Project' + className: 'ImagePerformance' } } } @@ -3334,19 +3524,22 @@ function _getProjects(options, callback) { } /** - * @summary Create a project + * @summary Gets the number of images tagged with the provided {tagIds} that + * have prediction results from + * training for the provided iteration {iterationId}. * - * @param {string} name Name of the project + * The filtering is on an and/or relationship. For example, if the provided tag + * ids are for the "Dog" and + * "Cat" tags, then only images tagged with Dog and/or Cat will be returned * - * @param {object} [options] Optional Parameters. + * @param {uuid} projectId The project id. * - * @param {string} [options.description] The description of the project + * @param {uuid} iterationId The iteration id. Defaults to workspace. * - * @param {uuid} [options.domainId] The id of the domain to use for this - * project. Defaults to General + * @param {object} [options] Optional Parameters. * - * @param {string} [options.classificationType] The type of classifier to - * create for this project. Possible values include: 'Multiclass', 'Multilabel' + * @param {array} [options.tagIds] A list of tags ids to filter the images to + * count. Defaults to all tags when null. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -3357,14 +3550,13 @@ function _getProjects(options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link Project} for more information. + * {number} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createProject(name, options, callback) { +function _getImagePerformanceCount(projectId, iterationId, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -3374,22 +3566,24 @@ function _createProject(name, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let description = (options && options.description !== undefined) ? options.description : undefined; - let domainId = (options && options.domainId !== undefined) ? options.domainId : undefined; - let classificationType = (options && options.classificationType !== undefined) ? options.classificationType : undefined; + let tagIds = (options && options.tagIds !== undefined) ? options.tagIds : undefined; // Validate try { - if (name === null || name === undefined || typeof name.valueOf() !== 'string') { - throw new Error('name cannot be null or undefined and it must be of type string.'); + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); } - if (description !== null && description !== undefined && typeof description.valueOf() !== 'string') { - throw new Error('description must be of type string.'); + if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { + throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (domainId !== null && domainId !== undefined && !(typeof domainId.valueOf() === 'string' && msRest.isValidUuid(domainId))) { - throw new Error('domainId must be of type string and must be a valid uuid.'); + if (iterationId === null || iterationId === undefined || typeof iterationId.valueOf() !== 'string' || !msRest.isValidUuid(iterationId)) { + throw new Error('iterationId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (classificationType !== null && classificationType !== undefined && typeof classificationType.valueOf() !== 'string') { - throw new Error('classificationType must be of type string.'); + if (Array.isArray(tagIds)) { + for (let i = 0; i < tagIds.length; i++) { + if (tagIds[i] !== null && tagIds[i] !== undefined && typeof tagIds[i].valueOf() !== 'string') { + throw new Error('tagIds[i] must be of type string.'); + } + } } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); @@ -3400,17 +3594,13 @@ function _createProject(name, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/iterations/{iterationId}/performance/images/count'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); + requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); + requestUrl = requestUrl.replace('{iterationId}', encodeURIComponent(iterationId.toString())); let queryParameters = []; - queryParameters.push('name=' + encodeURIComponent(name)); - if (description !== null && description !== undefined) { - queryParameters.push('description=' + encodeURIComponent(description)); - } - if (domainId !== null && domainId !== undefined) { - queryParameters.push('domainId=' + encodeURIComponent(domainId.toString())); - } - if (classificationType !== null && classificationType !== undefined) { - queryParameters.push('classificationType=' + encodeURIComponent(classificationType)); + if (tagIds !== null && tagIds !== undefined) { + queryParameters.push('tagIds=' + encodeURIComponent(tagIds.join(','))); } if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); @@ -3418,7 +3608,7 @@ function _createProject(name, options, callback) { // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'POST'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -3472,7 +3662,13 @@ function _createProject(name, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['Project']().mapper(); + let resultMapper = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'Number' + } + }; result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -3488,9 +3684,7 @@ function _createProject(name, options, callback) { } /** - * @summary Get a specific project - * - * @param {uuid} projectId The id of the project to get + * @summary Get your projects. * * @param {object} [options] Optional Parameters. * @@ -3503,14 +3697,13 @@ function _createProject(name, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link Project} for more information. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getProject(projectId, options, callback) { +function _getProjects(options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -3522,8 +3715,8 @@ function _getProject(projectId, options, callback) { } // Validate try { - if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { - throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); @@ -3534,8 +3727,8 @@ function _getProject(projectId, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}'; - requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); // Create HTTP transport objects let httpRequest = new WebResource(); @@ -3593,8 +3786,22 @@ function _getProject(projectId, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['Project']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); + let resultMapper = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ProjectElementType', + type: { + name: 'Composite', + className: 'Project' + } + } + } + }; + result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); @@ -3609,12 +3816,20 @@ function _getProject(projectId, options, callback) { } /** - * @summary Delete a specific project + * @summary Create a project. * - * @param {uuid} projectId The project id + * @param {string} name Name of the project. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.description] The description of the project. + * + * @param {uuid} [options.domainId] The id of the domain to use for this + * project. Defaults to General. + * + * @param {string} [options.classificationType] The type of classifier to + * create for this project. Possible values include: 'Multiclass', 'Multilabel' + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -3624,13 +3839,14 @@ function _getProject(projectId, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Project} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteProject(projectId, options, callback) { +function _createProject(name, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -3640,10 +3856,25 @@ function _deleteProject(projectId, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let description = (options && options.description !== undefined) ? options.description : undefined; + let domainId = (options && options.domainId !== undefined) ? options.domainId : undefined; + let classificationType = (options && options.classificationType !== undefined) ? options.classificationType : undefined; // Validate try { - if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { - throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } + if (name === null || name === undefined || typeof name.valueOf() !== 'string') { + throw new Error('name cannot be null or undefined and it must be of type string.'); + } + if (description !== null && description !== undefined && typeof description.valueOf() !== 'string') { + throw new Error('description must be of type string.'); + } + if (domainId !== null && domainId !== undefined && !(typeof domainId.valueOf() === 'string' && msRest.isValidUuid(domainId))) { + throw new Error('domainId must be of type string and must be a valid uuid.'); + } + if (classificationType !== null && classificationType !== undefined && typeof classificationType.valueOf() !== 'string') { + throw new Error('classificationType must be of type string.'); } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); @@ -3654,12 +3885,26 @@ function _deleteProject(projectId, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}'; - requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); + let queryParameters = []; + queryParameters.push('name=' + encodeURIComponent(name)); + if (description !== null && description !== undefined) { + queryParameters.push('description=' + encodeURIComponent(description)); + } + if (domainId !== null && domainId !== undefined) { + queryParameters.push('domainId=' + encodeURIComponent(domainId.toString())); + } + if (classificationType !== null && classificationType !== undefined) { + queryParameters.push('classificationType=' + encodeURIComponent(classificationType)); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'DELETE'; + httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -3681,7 +3926,7 @@ function _deleteProject(projectId, options, callback) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 204) { + if (statusCode !== 200) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -3706,31 +3951,32 @@ function _deleteProject(projectId, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['Project']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } return callback(null, result, httpRequest, response); }); } /** - * @summary Update a specific project - * - * @param {uuid} projectId The id of the project to update - * - * @param {object} updatedProject The updated project model - * - * @param {string} [updatedProject.name] Gets or sets the name of the project - * - * @param {string} [updatedProject.description] Gets or sets the description of - * the project - * - * @param {object} [updatedProject.settings] Gets or sets the project settings + * @summary Get a specific project. * - * @param {uuid} [updatedProject.settings.domainId] Gets or sets the id of the - * Domain to use with this project - * - * @param {string} [updatedProject.settings.classificationType] Gets or sets - * the classification type of the project. Possible values include: - * 'Multiclass', 'Multilabel' + * @param {uuid} projectId The id of the project to get. * * @param {object} [options] Optional Parameters. * @@ -3750,7 +3996,7 @@ function _deleteProject(projectId, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _updateProject(projectId, updatedProject, options, callback) { +function _getProject(projectId, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -3762,12 +4008,12 @@ function _updateProject(projectId, updatedProject, options, callback) { } // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (updatedProject === null || updatedProject === undefined) { - throw new Error('updatedProject cannot be null or undefined.'); - } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); } @@ -3778,11 +4024,12 @@ function _updateProject(projectId, updatedProject, options, callback) { // Construct URL let baseUrl = this.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'PATCH'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -3797,21 +4044,7 @@ function _updateProject(projectId, updatedProject, options, callback) { } } } - // Serialize Request - let requestContent = null; - let requestModel = null; - try { - if (updatedProject !== null && updatedProject !== undefined) { - let requestModelMapper = new client.models['Project']().mapper(); - requestModel = client.serialize(requestModelMapper, updatedProject, 'updatedProject'); - requestContent = JSON.stringify(requestModel); - } - } catch (error) { - let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(updatedProject, null, 2)}.`); - return callback(serializationError); - } - httpRequest.body = requestContent; + httpRequest.body = null; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -3866,9 +4099,9 @@ function _updateProject(projectId, updatedProject, options, callback) { } /** - * @summary Get iterations for the project + * @summary Delete a specific project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * @@ -3881,13 +4114,13 @@ function _updateProject(projectId, updatedProject, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getIterations(projectId, options, callback) { +function _deleteProject(projectId, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -3899,6 +4132,9 @@ function _getIterations(projectId, options, callback) { } // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } @@ -3911,12 +4147,13 @@ function _getIterations(projectId, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/iterations'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'DELETE'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -3938,7 +4175,7 @@ function _getIterations(projectId, options, callback) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -3963,48 +4200,31 @@ function _getIterations(projectId, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = { - required: false, - serializedName: 'parsedResponse', - type: { - name: 'Sequence', - element: { - required: false, - serializedName: 'IterationElementType', - type: { - name: 'Composite', - className: 'Iteration' - } - } - } - }; - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); } /** - * @summary Get a specific iteration + * @summary Update a specific project. + * + * @param {uuid} projectId The id of the project to update. * - * @param {uuid} projectId The id of the project the iteration belongs to + * @param {object} updatedProject The updated project model. * - * @param {uuid} iterationId The id of the iteration to get + * @param {string} [updatedProject.name] Gets or sets the name of the project. + * + * @param {string} [updatedProject.description] Gets or sets the description of + * the project. + * + * @param {object} [updatedProject.settings] Gets or sets the project settings. + * + * @param {uuid} [updatedProject.settings.domainId] Gets or sets the id of the + * Domain to use with this project. + * + * @param {string} [updatedProject.settings.classificationType] Gets or sets + * the classification type of the project. Possible values include: + * 'Multiclass', 'Multilabel' * * @param {object} [options] Optional Parameters. * @@ -4018,13 +4238,13 @@ function _getIterations(projectId, options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link Iteration} for more information. + * See {@link Project} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getIteration(projectId, iterationId, options, callback) { +function _updateProject(projectId, updatedProject, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -4036,11 +4256,14 @@ function _getIteration(projectId, iterationId, options, callback) { } // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (iterationId === null || iterationId === undefined || typeof iterationId.valueOf() !== 'string' || !msRest.isValidUuid(iterationId)) { - throw new Error('iterationId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + if (updatedProject === null || updatedProject === undefined) { + throw new Error('updatedProject cannot be null or undefined.'); } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); @@ -4051,13 +4274,13 @@ function _getIteration(projectId, iterationId, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/iterations/{iterationId}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); - requestUrl = requestUrl.replace('{iterationId}', encodeURIComponent(iterationId.toString())); // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'PATCH'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -4072,7 +4295,21 @@ function _getIteration(projectId, iterationId, options, callback) { } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (updatedProject !== null && updatedProject !== undefined) { + let requestModelMapper = new client.models['Project']().mapper(); + requestModel = client.serialize(requestModelMapper, updatedProject, 'updatedProject'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(updatedProject, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -4111,7 +4348,7 @@ function _getIteration(projectId, iterationId, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['Iteration']().mapper(); + let resultMapper = new client.models['Project']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -4127,11 +4364,9 @@ function _getIteration(projectId, iterationId, options, callback) { } /** - * @summary Delete a specific iteration of a project - * - * @param {uuid} projectId The project id + * @summary Get iterations for the project. * - * @param {uuid} iterationId The iteration id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * @@ -4144,13 +4379,13 @@ function _getIteration(projectId, iterationId, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteIteration(projectId, iterationId, options, callback) { +function _getIterations(projectId, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -4162,12 +4397,12 @@ function _deleteIteration(projectId, iterationId, options, callback) { } // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (iterationId === null || iterationId === undefined || typeof iterationId.valueOf() !== 'string' || !msRest.isValidUuid(iterationId)) { - throw new Error('iterationId cannot be null or undefined and it must be of type string and must be a valid uuid.'); - } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); } @@ -4177,13 +4412,13 @@ function _deleteIteration(projectId, iterationId, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/iterations/{iterationId}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/iterations'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); - requestUrl = requestUrl.replace('{iterationId}', encodeURIComponent(iterationId.toString())); // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'DELETE'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -4205,7 +4440,7 @@ function _deleteIteration(projectId, iterationId, options, callback) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 204) { + if (statusCode !== 200) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -4230,25 +4465,48 @@ function _deleteIteration(projectId, iterationId, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'IterationElementType', + type: { + name: 'Composite', + className: 'Iteration' + } + } + } + }; + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } return callback(null, result, httpRequest, response); }); } /** - * @summary Update a specific iteration + * @summary Get a specific iteration. * - * @param {uuid} projectId Project id + * @param {uuid} projectId The id of the project the iteration belongs to. * - * @param {uuid} iterationId Iteration id - * - * @param {object} updatedIteration The updated iteration model - * - * @param {string} [updatedIteration.name] Gets or sets the name of the - * iteration - * - * @param {boolean} [updatedIteration.isDefault] Gets or sets a value - * indicating whether the iteration is the default iteration for the project + * @param {uuid} iterationId The id of the iteration to get. * * @param {object} [options] Optional Parameters. * @@ -4268,7 +4526,7 @@ function _deleteIteration(projectId, iterationId, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _updateIteration(projectId, iterationId, updatedIteration, options, callback) { +function _getIteration(projectId, iterationId, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -4280,15 +4538,15 @@ function _updateIteration(projectId, iterationId, updatedIteration, options, cal } // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } if (iterationId === null || iterationId === undefined || typeof iterationId.valueOf() !== 'string' || !msRest.isValidUuid(iterationId)) { throw new Error('iterationId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (updatedIteration === null || updatedIteration === undefined) { - throw new Error('updatedIteration cannot be null or undefined.'); - } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); } @@ -4299,12 +4557,13 @@ function _updateIteration(projectId, iterationId, updatedIteration, options, cal // Construct URL let baseUrl = this.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/iterations/{iterationId}'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); requestUrl = requestUrl.replace('{iterationId}', encodeURIComponent(iterationId.toString())); // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'PATCH'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -4319,21 +4578,7 @@ function _updateIteration(projectId, iterationId, updatedIteration, options, cal } } } - // Serialize Request - let requestContent = null; - let requestModel = null; - try { - if (updatedIteration !== null && updatedIteration !== undefined) { - let requestModelMapper = new client.models['Iteration']().mapper(); - requestModel = client.serialize(requestModelMapper, updatedIteration, 'updatedIteration'); - requestContent = JSON.stringify(requestModel); - } - } catch (error) { - let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(updatedIteration, null, 2)}.`); - return callback(serializationError); - } - httpRequest.body = requestContent; + httpRequest.body = null; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -4388,20 +4633,14 @@ function _updateIteration(projectId, iterationId, updatedIteration, options, cal } /** - * @summary Get detailed performance information about an iteration + * @summary Delete a specific iteration of a project. * - * @param {uuid} projectId The id of the project the iteration belongs to + * @param {uuid} projectId The project id. * - * @param {uuid} iterationId The id of the iteration to get + * @param {uuid} iterationId The iteration id. * * @param {object} [options] Optional Parameters. * - * @param {number} [options.threshold] The threshold used to determine true - * predictions - * - * @param {number} [options.overlapThreshold] If applicable, the bounding box - * overlap threshold used to determine true predictions - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -4411,14 +4650,13 @@ function _updateIteration(projectId, iterationId, updatedIteration, options, cal * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link IterationPerformance} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getIterationPerformance(projectId, iterationId, options, callback) { +function _deleteIteration(projectId, iterationId, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -4428,22 +4666,17 @@ function _getIterationPerformance(projectId, iterationId, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let threshold = (options && options.threshold !== undefined) ? options.threshold : undefined; - let overlapThreshold = (options && options.overlapThreshold !== undefined) ? options.overlapThreshold : undefined; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } if (iterationId === null || iterationId === undefined || typeof iterationId.valueOf() !== 'string' || !msRest.isValidUuid(iterationId)) { throw new Error('iterationId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (threshold !== null && threshold !== undefined && typeof threshold !== 'number') { - throw new Error('threshold must be of type number.'); - } - if (overlapThreshold !== null && overlapThreshold !== undefined && typeof overlapThreshold !== 'number') { - throw new Error('overlapThreshold must be of type number.'); - } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); } @@ -4453,23 +4686,14 @@ function _getIterationPerformance(projectId, iterationId, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/iterations/{iterationId}/performance'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/iterations/{iterationId}'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); requestUrl = requestUrl.replace('{iterationId}', encodeURIComponent(iterationId.toString())); - let queryParameters = []; - if (threshold !== null && threshold !== undefined) { - queryParameters.push('threshold=' + encodeURIComponent(threshold.toString())); - } - if (overlapThreshold !== null && overlapThreshold !== undefined) { - queryParameters.push('overlapThreshold=' + encodeURIComponent(overlapThreshold.toString())); - } - if (queryParameters.length > 0) { - requestUrl += '?' + queryParameters.join('&'); - } // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'DELETE'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -4491,7 +4715,7 @@ function _getIterationPerformance(projectId, iterationId, options, callback) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -4516,56 +4740,27 @@ function _getIterationPerformance(projectId, iterationId, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['IterationPerformance']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); } /** - * @summary Get image with its prediction for a given project iteration - * - * This API supports batching and range selection. By default it will only - * return first 50 images matching images. - * Use the {take} and {skip} parameters to control how many images to return in - * a given batch. - * The filtering is on an and/or relationship. For example, if the provided tag - * ids are for the "Dog" and - * "Cat" tags, then only images tagged with Dog and/or Cat will be returned + * @summary Update a specific iteration. * - * @param {uuid} projectId The project id + * @param {uuid} projectId Project id. * - * @param {uuid} iterationId The iteration id. Defaults to workspace + * @param {uuid} iterationId Iteration id. * - * @param {object} [options] Optional Parameters. - * - * @param {array} [options.tagIds] A list of tags ids to filter the images. - * Defaults to all tagged images when null. Limited to 20 + * @param {object} updatedIteration The updated iteration model. * - * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible - * values include: 'Newest', 'Oldest' + * @param {string} [updatedIteration.name] Gets or sets the name of the + * iteration. * - * @param {number} [options.take] Maximum number of images to return. Defaults - * to 50, limited to 256 + * @param {boolean} [updatedIteration.isDefault] Gets or sets a value + * indicating whether the iteration is the default iteration for the project. * - * @param {number} [options.skip] Number of images to skip before beginning the - * image batch. Defaults to 0 + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -4576,13 +4771,14 @@ function _getIterationPerformance(projectId, iterationId, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Iteration} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getImagePerformances(projectId, iterationId, options, callback) { +function _updateIteration(projectId, iterationId, updatedIteration, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -4592,33 +4788,19 @@ function _getImagePerformances(projectId, iterationId, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let tagIds = (options && options.tagIds !== undefined) ? options.tagIds : undefined; - let orderBy = (options && options.orderBy !== undefined) ? options.orderBy : undefined; - let take = (options && options.take !== undefined) ? options.take : 50; - let skip = (options && options.skip !== undefined) ? options.skip : 0; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } if (iterationId === null || iterationId === undefined || typeof iterationId.valueOf() !== 'string' || !msRest.isValidUuid(iterationId)) { throw new Error('iterationId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (Array.isArray(tagIds)) { - for (let i = 0; i < tagIds.length; i++) { - if (tagIds[i] !== null && tagIds[i] !== undefined && typeof tagIds[i].valueOf() !== 'string') { - throw new Error('tagIds[i] must be of type string.'); - } - } - } - if (orderBy !== null && orderBy !== undefined && typeof orderBy.valueOf() !== 'string') { - throw new Error('orderBy must be of type string.'); - } - if (take !== null && take !== undefined && typeof take !== 'number') { - throw new Error('take must be of type number.'); - } - if (skip !== null && skip !== undefined && typeof skip !== 'number') { - throw new Error('skip must be of type number.'); + if (updatedIteration === null || updatedIteration === undefined) { + throw new Error('updatedIteration cannot be null or undefined.'); } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); @@ -4629,29 +4811,14 @@ function _getImagePerformances(projectId, iterationId, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/iterations/{iterationId}/performance/images'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/iterations/{iterationId}'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); requestUrl = requestUrl.replace('{iterationId}', encodeURIComponent(iterationId.toString())); - let queryParameters = []; - if (tagIds !== null && tagIds !== undefined) { - queryParameters.push('tagIds=' + encodeURIComponent(tagIds.join(','))); - } - if (orderBy !== null && orderBy !== undefined) { - queryParameters.push('orderBy=' + encodeURIComponent(orderBy)); - } - if (take !== null && take !== undefined) { - queryParameters.push('take=' + encodeURIComponent(take.toString())); - } - if (skip !== null && skip !== undefined) { - queryParameters.push('skip=' + encodeURIComponent(skip.toString())); - } - if (queryParameters.length > 0) { - requestUrl += '?' + queryParameters.join('&'); - } // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'PATCH'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -4666,7 +4833,21 @@ function _getImagePerformances(projectId, iterationId, options, callback) { } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (updatedIteration !== null && updatedIteration !== undefined) { + let requestModelMapper = new client.models['Iteration']().mapper(); + requestModel = client.serialize(requestModelMapper, updatedIteration, 'updatedIteration'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(updatedIteration, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -4705,21 +4886,7 @@ function _getImagePerformances(projectId, iterationId, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = { - required: false, - serializedName: 'parsedResponse', - type: { - name: 'Sequence', - element: { - required: false, - serializedName: 'ImagePerformanceElementType', - type: { - name: 'Composite', - className: 'ImagePerformance' - } - } - } - }; + let resultMapper = new client.models['Iteration']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -4735,23 +4902,12 @@ function _getImagePerformances(projectId, iterationId, options, callback) { } /** - * @summary Gets the number of images tagged with the provided {tagIds} that - * have prediction results from - * training for the provided iteration {iterationId} - * - * The filtering is on an and/or relationship. For example, if the provided tag - * ids are for the "Dog" and - * "Cat" tags, then only images tagged with Dog and/or Cat will be returned - * - * @param {uuid} projectId The project id + * @summary Queues project for training. * - * @param {uuid} iterationId The iteration id. Defaults to workspace + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {array} [options.tagIds] A list of tags ids to filter the images to - * count. Defaults to all tags when null. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -4761,13 +4917,14 @@ function _getImagePerformances(projectId, iterationId, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {number} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Iteration} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getImagePerformanceCount(projectId, iterationId, options, callback) { +function _trainProject(projectId, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -4777,22 +4934,14 @@ function _getImagePerformanceCount(projectId, iterationId, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let tagIds = (options && options.tagIds !== undefined) ? options.tagIds : undefined; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (iterationId === null || iterationId === undefined || typeof iterationId.valueOf() !== 'string' || !msRest.isValidUuid(iterationId)) { - throw new Error('iterationId cannot be null or undefined and it must be of type string and must be a valid uuid.'); - } - if (Array.isArray(tagIds)) { - for (let i = 0; i < tagIds.length; i++) { - if (tagIds[i] !== null && tagIds[i] !== undefined && typeof tagIds[i].valueOf() !== 'string') { - throw new Error('tagIds[i] must be of type string.'); - } - } - } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); } @@ -4802,20 +4951,13 @@ function _getImagePerformanceCount(projectId, iterationId, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/iterations/{iterationId}/performance/images/count'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/train'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); - requestUrl = requestUrl.replace('{iterationId}', encodeURIComponent(iterationId.toString())); - let queryParameters = []; - if (tagIds !== null && tagIds !== undefined) { - queryParameters.push('tagIds=' + encodeURIComponent(tagIds.join(','))); - } - if (queryParameters.length > 0) { - requestUrl += '?' + queryParameters.join('&'); - } // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -4869,13 +5011,7 @@ function _getImagePerformanceCount(projectId, iterationId, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = { - required: false, - serializedName: 'parsedResponse', - type: { - name: 'Number' - } - }; + let resultMapper = new client.models['Iteration']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -4891,11 +5027,11 @@ function _getImagePerformanceCount(projectId, iterationId, options, callback) { } /** - * @summary Get the list of exports for a specific iteration + * @summary Get the list of exports for a specific iteration. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} iterationId The iteration id + * @param {uuid} iterationId The iteration id. * * @param {object} [options] Optional Parameters. * @@ -4926,6 +5062,9 @@ function _getExports(projectId, iterationId, options, callback) { } // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } @@ -4942,6 +5081,7 @@ function _getExports(projectId, iterationId, options, callback) { // Construct URL let baseUrl = this.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/iterations/{iterationId}/export'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); requestUrl = requestUrl.replace('{iterationId}', encodeURIComponent(iterationId.toString())); @@ -5031,19 +5171,19 @@ function _getExports(projectId, iterationId, options, callback) { } /** - * @summary Export a trained iteration + * @summary Export a trained iteration. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} iterationId The iteration id + * @param {uuid} iterationId The iteration id. * - * @param {string} platform The target platform (coreml or tensorflow). - * Possible values include: 'CoreML', 'TensorFlow', 'DockerFile', 'ONNX' + * @param {string} platform The target platform. Possible values include: + * 'CoreML', 'TensorFlow', 'DockerFile', 'ONNX' * * @param {object} [options] Optional Parameters. * - * @param {string} [options.flavor] The flavor of the target platform (Windows, - * Linux, ARM, or GPU). Possible values include: 'Linux', 'Windows' + * @param {string} [options.flavor] The flavor of the target platform. Possible + * values include: 'Linux', 'Windows', 'ONNX10', 'ONNX12' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -5074,6 +5214,9 @@ function _exportIteration(projectId, iterationId, platform, options, callback) { let flavor = (options && options.flavor !== undefined) ? options.flavor : undefined; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } @@ -5096,6 +5239,7 @@ function _exportIteration(projectId, iterationId, platform, options, callback) { // Construct URL let baseUrl = this.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/iterations/{iterationId}/export'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); requestUrl = requestUrl.replace('{iterationId}', encodeURIComponent(iterationId.toString())); let queryParameters = []; @@ -5179,16 +5323,16 @@ function _exportIteration(projectId, iterationId, platform, options, callback) { } /** - * @summary Get information about a specific tag + * @summary Get information about a specific tag. * - * @param {uuid} projectId The project this tag belongs to + * @param {uuid} projectId The project this tag belongs to. * - * @param {uuid} tagId The tag id + * @param {uuid} tagId The tag id. * * @param {object} [options] Optional Parameters. * * @param {uuid} [options.iterationId] The iteration to retrieve this tag from. - * Optional, defaults to current training set + * Optional, defaults to current training set. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -5219,6 +5363,9 @@ function _getTag(projectId, tagId, options, callback) { let iterationId = (options && options.iterationId !== undefined) ? options.iterationId : undefined; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } @@ -5238,6 +5385,7 @@ function _getTag(projectId, tagId, options, callback) { // Construct URL let baseUrl = this.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/tags/{tagId}'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); requestUrl = requestUrl.replace('{tagId}', encodeURIComponent(tagId.toString())); let queryParameters = []; @@ -5320,11 +5468,11 @@ function _getTag(projectId, tagId, options, callback) { } /** - * @summary Delete a tag from the project + * @summary Delete a tag from the project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} tagId Id of the tag to be deleted + * @param {uuid} tagId Id of the tag to be deleted. * * @param {object} [options] Optional Parameters. * @@ -5355,6 +5503,9 @@ function _deleteTag(projectId, tagId, options, callback) { } // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } @@ -5371,6 +5522,7 @@ function _deleteTag(projectId, tagId, options, callback) { // Construct URL let baseUrl = this.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/tags/{tagId}'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); requestUrl = requestUrl.replace('{tagId}', encodeURIComponent(tagId.toString())); @@ -5429,18 +5581,21 @@ function _deleteTag(projectId, tagId, options, callback) { } /** - * @summary Update a tag + * @summary Update a tag. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} tagId The id of the target tag + * @param {uuid} tagId The id of the target tag. * - * @param {object} updatedTag The updated tag model + * @param {object} updatedTag The updated tag model. * - * @param {string} [updatedTag.name] Gets or sets the name of the tag + * @param {string} [updatedTag.name] Gets or sets the name of the tag. * * @param {string} [updatedTag.description] Gets or sets the description of the - * tag + * tag. + * + * @param {string} [updatedTag.type] Gets or sets the type of the tag. Possible + * values include: 'Regular', 'Negative' * * @param {object} [options] Optional Parameters. * @@ -5472,6 +5627,9 @@ function _updateTag(projectId, tagId, updatedTag, options, callback) { } // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } @@ -5491,6 +5649,7 @@ function _updateTag(projectId, tagId, updatedTag, options, callback) { // Construct URL let baseUrl = this.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/tags/{tagId}'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); requestUrl = requestUrl.replace('{tagId}', encodeURIComponent(tagId.toString())); @@ -5580,13 +5739,13 @@ function _updateTag(projectId, tagId, updatedTag, options, callback) { } /** - * @summary Get the tags for a given project and iteration + * @summary Get the tags for a given project and iteration. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -5616,6 +5775,9 @@ function _getTags(projectId, options, callback) { let iterationId = (options && options.iterationId !== undefined) ? options.iterationId : undefined; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } @@ -5632,6 +5794,7 @@ function _getTags(projectId, options, callback) { // Construct URL let baseUrl = this.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/tags'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); let queryParameters = []; if (iterationId !== null && iterationId !== undefined) { @@ -5727,15 +5890,18 @@ function _getTags(projectId, options, callback) { } /** - * @summary Create a tag for the project + * @summary Create a tag for the project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {string} name The tag name + * @param {string} name The tag name. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.description] Optional description for the tag + * @param {string} [options.description] Optional description for the tag. + * + * @param {string} [options.type] Optional type for the tag. Possible values + * include: 'Regular', 'Negative' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -5764,8 +5930,12 @@ function _createTag(projectId, name, options, callback) { throw new Error('callback cannot be null.'); } let description = (options && options.description !== undefined) ? options.description : undefined; + let type = (options && options.type !== undefined) ? options.type : undefined; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } @@ -5775,6 +5945,9 @@ function _createTag(projectId, name, options, callback) { if (description !== null && description !== undefined && typeof description.valueOf() !== 'string') { throw new Error('description must be of type string.'); } + if (type !== null && type !== undefined && typeof type.valueOf() !== 'string') { + throw new Error('type must be of type string.'); + } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); } @@ -5785,12 +5958,16 @@ function _createTag(projectId, name, options, callback) { // Construct URL let baseUrl = this.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/tags'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); let queryParameters = []; queryParameters.push('name=' + encodeURIComponent(name)); if (description !== null && description !== undefined) { queryParameters.push('description=' + encodeURIComponent(description)); } + if (type !== null && type !== undefined) { + queryParameters.push('type=' + encodeURIComponent(type)); + } if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -5871,53 +6048,56 @@ class TrainingAPIClient extends ServiceClient { /** * Create a TrainingAPIClient. * @param {string} apiKey - - * @param {string} [baseUri] - The base URI of the service. + * @param {string} endpoint - Supported Cognitive Services endpoints * @param {object} [options] - The parameter options * @param {Array} [options.filters] - Filters to be added to the request pipeline * @param {object} [options.requestOptions] - Options for the underlying request object * {@link https://github.com/request/request#requestoptions-callback Options doc} * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy */ - constructor(apiKey, baseUri, options) { + constructor(apiKey, endpoint, options) { if (apiKey === null || apiKey === undefined) { throw new Error('\'apiKey\' cannot be null.'); } + if (endpoint === null || endpoint === undefined) { + throw new Error('\'endpoint\' cannot be null.'); + } if (!options) options = {}; super(null, options); - this.baseUri = baseUri; - if (!this.baseUri) { - this.baseUri = 'https://southcentralus.api.cognitive.microsoft.com/customvision/v2.1/Training'; - } + this.baseUri = '{Endpoint}/customvision/v2.2/Training'; this.apiKey = apiKey; + this.endpoint = endpoint; let packageInfo = this.getPackageJsonInfo(__dirname); this.addUserAgentInfo(`${packageInfo.name}/${packageInfo.version}`); this.models = models; this._getDomains = _getDomains; this._getDomain = _getDomain; - this._getTaggedImages = _getTaggedImages; - this._getUntaggedImages = _getUntaggedImages; this._getTaggedImageCount = _getTaggedImageCount; this._getUntaggedImageCount = _getUntaggedImageCount; + this._createImageTags = _createImageTags; + this._deleteImageTags = _deleteImageTags; + this._createImageRegions = _createImageRegions; + this._deleteImageRegions = _deleteImageRegions; + this._getTaggedImages = _getTaggedImages; + this._getUntaggedImages = _getUntaggedImages; this._getImagesByIds = _getImagesByIds; this._createImagesFromData = _createImagesFromData; this._deleteImages = _deleteImages; this._createImagesFromFiles = _createImagesFromFiles; this._createImagesFromUrls = _createImagesFromUrls; this._createImagesFromPredictions = _createImagesFromPredictions; - this._createImageTags = _createImageTags; - this._deleteImageTags = _deleteImageTags; - this._createImageRegions = _createImageRegions; - this._deleteImageRegions = _deleteImageRegions; this._getImageRegionProposals = _getImageRegionProposals; this._deletePrediction = _deletePrediction; - this._queryPredictions = _queryPredictions; this._quickTestImageUrl = _quickTestImageUrl; this._quickTestImage = _quickTestImage; - this._trainProject = _trainProject; + this._queryPredictions = _queryPredictions; + this._getIterationPerformance = _getIterationPerformance; + this._getImagePerformances = _getImagePerformances; + this._getImagePerformanceCount = _getImagePerformanceCount; this._getProjects = _getProjects; this._createProject = _createProject; this._getProject = _getProject; @@ -5927,9 +6107,7 @@ class TrainingAPIClient extends ServiceClient { this._getIteration = _getIteration; this._deleteIteration = _deleteIteration; this._updateIteration = _updateIteration; - this._getIterationPerformance = _getIterationPerformance; - this._getImagePerformances = _getImagePerformances; - this._getImagePerformanceCount = _getImagePerformanceCount; + this._trainProject = _trainProject; this._getExports = _getExports; this._exportIteration = _exportIteration; this._getTag = _getTag; @@ -5941,7 +6119,7 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get a list of the available domains + * @summary Get a list of the available domains. * * @param {object} [options] Optional Parameters. * @@ -5969,7 +6147,7 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get a list of the available domains + * @summary Get a list of the available domains. * * @param {object} [options] Optional Parameters. * @@ -6018,9 +6196,9 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get information about a specific domain + * @summary Get information about a specific domain. * - * @param {uuid} domainId The id of the domain to get information about + * @param {uuid} domainId The id of the domain to get information about. * * @param {object} [options] Optional Parameters. * @@ -6048,9 +6226,9 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get information about a specific domain + * @summary Get information about a specific domain. * - * @param {uuid} domainId The id of the domain to get information about + * @param {uuid} domainId The id of the domain to get information about. * * @param {object} [options] Optional Parameters. * @@ -6100,48 +6278,35 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get tagged images for a given project iteration + * @summary Gets the number of images tagged with the provided {tagIds}. * - * This API supports batching and range selection. By default it will only - * return first 50 images matching images. - * Use the {take} and {skip} parameters to control how many images to return in - * a given batch. * The filtering is on an and/or relationship. For example, if the provided tag * ids are for the "Dog" and * "Cat" tags, then only images tagged with Dog and/or Cat will be returned * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. * - * @param {array} [options.tagIds] A list of tags ids to filter the images. - * Defaults to all tagged images when null. Limited to 20 - * - * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible - * values include: 'Newest', 'Oldest' - * - * @param {number} [options.take] Maximum number of images to return. Defaults - * to 50, limited to 256 - * - * @param {number} [options.skip] Number of images to skip before beginning the - * image batch. Defaults to 0 + * @param {array} [options.tagIds] A list of tags ids to filter the images to + * count. Defaults to all tags when null. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getTaggedImagesWithHttpOperationResponse(projectId, options) { + getTaggedImageCountWithHttpOperationResponse(projectId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getTaggedImages(projectId, options, (err, result, request, response) => { + self._getTaggedImageCount(projectId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -6152,33 +6317,113 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get tagged images for a given project iteration + * @summary Gets the number of images tagged with the provided {tagIds}. * - * This API supports batching and range selection. By default it will only - * return first 50 images matching images. - * Use the {take} and {skip} parameters to control how many images to return in - * a given batch. * The filtering is on an and/or relationship. For example, if the provided tag * ids are for the "Dog" and * "Cat" tags, then only images tagged with Dog and/or Cat will be returned * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. * - * @param {array} [options.tagIds] A list of tags ids to filter the images. - * Defaults to all tagged images when null. Limited to 20 + * @param {array} [options.tagIds] A list of tags ids to filter the images to + * count. Defaults to all tags when null. * - * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible - * values include: 'Newest', 'Oldest' + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {number} [options.take] Maximum number of images to return. Defaults - * to 50, limited to 256 + * @param {function} [optionalCallback] - The optional callback. * - * @param {number} [options.skip] Number of images to skip before beginning the - * image batch. Defaults to 0 + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {Number} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {number} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getTaggedImageCount(projectId, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getTaggedImageCount(projectId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getTaggedImageCount(projectId, options, optionalCallback); + } + } + + /** + * @summary Gets the number of untagged images. + * + * This API returns the images which have no tags for a given project and + * optionally an iteration. If no iteration is specified the + * current workspace is used. + * + * @param {uuid} projectId The project id. + * + * @param {object} [options] Optional Parameters. + * + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getUntaggedImageCountWithHttpOperationResponse(projectId, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getUntaggedImageCount(projectId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets the number of untagged images. + * + * This API returns the images which have no tags for a given project and + * optionally an iteration. If no iteration is specified the + * current workspace is used. + * + * @param {uuid} projectId The project id. + * + * @param {object} [options] Optional Parameters. + * + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -6190,7 +6435,7 @@ class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {Array} - The deserialized result object. + * @resolve {Number} - The deserialized result object. * * @reject {Error} - The error object. * @@ -6198,13 +6443,13 @@ class TrainingAPIClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * {number} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getTaggedImages(projectId, options, optionalCallback) { + getUntaggedImageCount(projectId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -6213,54 +6458,133 @@ class TrainingAPIClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getTaggedImages(projectId, options, (err, result, request, response) => { + self._getUntaggedImageCount(projectId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getTaggedImages(projectId, options, optionalCallback); + return self._getUntaggedImageCount(projectId, options, optionalCallback); } } /** - * @summary Get untagged images for a given project iteration + * @summary Associate a set of images with a set of tags. * - * This API supports batching and range selection. By default it will only - * return first 50 images matching images. - * Use the {take} and {skip} parameters to control how many images to return in - * a given batch. + * @param {uuid} projectId The project id. * - * @param {uuid} projectId The project id + * @param {object} batch Batch of image tags. Limited to 128 tags per batch. + * + * @param {array} [batch.tags] Image Tag entries to include in this batch. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible - * values include: 'Newest', 'Oldest' + * @returns {Promise} A promise is returned * - * @param {number} [options.take] Maximum number of images to return. Defaults - * to 50, limited to 256 + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {number} [options.skip] Number of images to skip before beginning the - * image batch. Defaults to 0 + * @reject {Error} - The error object. + */ + createImageTagsWithHttpOperationResponse(projectId, batch, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._createImageTags(projectId, batch, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Associate a set of images with a set of tags. + * + * @param {uuid} projectId The project id. + * + * @param {object} batch Batch of image tags. Limited to 128 tags per batch. + * + * @param {array} [batch.tags] Image Tag entries to include in this batch. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ImageTagCreateSummary} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ImageTagCreateSummary} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + createImageTags(projectId, batch, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._createImageTags(projectId, batch, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createImageTags(projectId, batch, options, optionalCallback); + } + } + + /** + * @summary Remove a set of tags from a set of images. + * + * @param {uuid} projectId The project id. + * + * @param {array} imageIds Image ids. Limited to 64 images. + * + * @param {array} tagIds Tags to be deleted from the specified images. Limted + * to 20 tags. + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getUntaggedImagesWithHttpOperationResponse(projectId, options) { + deleteImageTagsWithHttpOperationResponse(projectId, imageIds, tagIds, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getUntaggedImages(projectId, options, (err, result, request, response) => { + self._deleteImageTags(projectId, imageIds, tagIds, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -6271,27 +6595,115 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get untagged images for a given project iteration + * @summary Remove a set of tags from a set of images. * - * This API supports batching and range selection. By default it will only - * return first 50 images matching images. - * Use the {take} and {skip} parameters to control how many images to return in - * a given batch. + * @param {uuid} projectId The project id. * - * @param {uuid} projectId The project id + * @param {array} imageIds Image ids. Limited to 64 images. + * + * @param {array} tagIds Tags to be deleted from the specified images. Limted + * to 20 tags. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. * - * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible - * values include: 'Newest', 'Oldest' + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. * - * @param {number} [options.take] Maximum number of images to return. Defaults - * to 50, limited to 256 + * {Promise} A promise is returned * - * @param {number} [options.skip] Number of images to skip before beginning the - * image batch. Defaults to 0 + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + deleteImageTags(projectId, imageIds, tagIds, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteImageTags(projectId, imageIds, tagIds, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteImageTags(projectId, imageIds, tagIds, options, optionalCallback); + } + } + + /** + * @summary Create a set of image regions. + * + * This API accepts a batch of image regions, and optionally tags, to update + * existing images with region information. + * There is a limit of 64 entries in the batch. + * + * @param {uuid} projectId The project id. + * + * @param {object} batch Batch of image regions which include a tag and + * bounding box. Limited to 64. + * + * @param {array} [batch.regions] + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + createImageRegionsWithHttpOperationResponse(projectId, batch, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._createImageRegions(projectId, batch, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Create a set of image regions. + * + * This API accepts a batch of image regions, and optionally tags, to update + * existing images with region information. + * There is a limit of 64 entries in the batch. + * + * @param {uuid} projectId The project id. + * + * @param {object} batch Batch of image regions which include a tag and + * bounding box. Limited to 64. + * + * @param {array} [batch.regions] + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -6303,7 +6715,7 @@ class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {Array} - The deserialized result object. + * @resolve {ImageRegionCreateSummary} - The deserialized result object. * * @reject {Error} - The error object. * @@ -6311,13 +6723,15 @@ class TrainingAPIClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ImageRegionCreateSummary} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getUntaggedImages(projectId, options, optionalCallback) { + createImageRegions(projectId, batch, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -6326,47 +6740,145 @@ class TrainingAPIClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getUntaggedImages(projectId, options, (err, result, request, response) => { + self._createImageRegions(projectId, batch, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getUntaggedImages(projectId, options, optionalCallback); + return self._createImageRegions(projectId, batch, options, optionalCallback); } } /** - * @summary Gets the number of images tagged with the provided {tagIds} + * @summary Delete a set of image regions. + * + * @param {uuid} projectId The project id. + * + * @param {array} regionIds Regions to delete. Limited to 64. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + deleteImageRegionsWithHttpOperationResponse(projectId, regionIds, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._deleteImageRegions(projectId, regionIds, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Delete a set of image regions. + * + * @param {uuid} projectId The project id. + * + * @param {array} regionIds Regions to delete. Limited to 64. + * + * @param {object} [options] Optional Parameters. * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + deleteImageRegions(projectId, regionIds, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteImageRegions(projectId, regionIds, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteImageRegions(projectId, regionIds, options, optionalCallback); + } + } + + /** + * @summary Get tagged images for a given project iteration. + * + * This API supports batching and range selection. By default it will only + * return first 50 images matching images. + * Use the {take} and {skip} parameters to control how many images to return in + * a given batch. * The filtering is on an and/or relationship. For example, if the provided tag * ids are for the "Dog" and * "Cat" tags, then only images tagged with Dog and/or Cat will be returned * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. + * + * @param {array} [options.tagIds] A list of tags ids to filter the images. + * Defaults to all tagged images when null. Limited to 20. + * + * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible + * values include: 'Newest', 'Oldest' + * + * @param {number} [options.take] Maximum number of images to return. Defaults + * to 50, limited to 256. * - * @param {array} [options.tagIds] A list of tags ids to filter the images to - * count. Defaults to all tags when null. + * @param {number} [options.skip] Number of images to skip before beginning the + * image batch. Defaults to 0. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getTaggedImageCountWithHttpOperationResponse(projectId, options) { + getTaggedImagesWithHttpOperationResponse(projectId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getTaggedImageCount(projectId, options, (err, result, request, response) => { + self._getTaggedImages(projectId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -6377,20 +6889,33 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Gets the number of images tagged with the provided {tagIds} + * @summary Get tagged images for a given project iteration. * + * This API supports batching and range selection. By default it will only + * return first 50 images matching images. + * Use the {take} and {skip} parameters to control how many images to return in + * a given batch. * The filtering is on an and/or relationship. For example, if the provided tag * ids are for the "Dog" and * "Cat" tags, then only images tagged with Dog and/or Cat will be returned * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. * - * @param {array} [options.tagIds] A list of tags ids to filter the images to - * count. Defaults to all tags when null. + * @param {array} [options.tagIds] A list of tags ids to filter the images. + * Defaults to all tagged images when null. Limited to 20. + * + * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible + * values include: 'Newest', 'Oldest' + * + * @param {number} [options.take] Maximum number of images to return. Defaults + * to 50, limited to 256. + * + * @param {number} [options.skip] Number of images to skip before beginning the + * image batch. Defaults to 0. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -6402,7 +6927,7 @@ class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {Number} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error} - The error object. * @@ -6410,13 +6935,13 @@ class TrainingAPIClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {number} [result] - The deserialized result object if an error did not occur. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getTaggedImageCount(projectId, options, optionalCallback) { + getTaggedImages(projectId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -6425,44 +6950,54 @@ class TrainingAPIClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getTaggedImageCount(projectId, options, (err, result, request, response) => { + self._getTaggedImages(projectId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getTaggedImageCount(projectId, options, optionalCallback); + return self._getTaggedImages(projectId, options, optionalCallback); } } /** - * @summary Gets the number of untagged images + * @summary Get untagged images for a given project iteration. * - * This API returns the images which have no tags for a given project and - * optionally an iteration. If no iteration is specified the - * current workspace is used. + * This API supports batching and range selection. By default it will only + * return first 50 images matching images. + * Use the {take} and {skip} parameters to control how many images to return in + * a given batch. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. + * + * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible + * values include: 'Newest', 'Oldest' + * + * @param {number} [options.take] Maximum number of images to return. Defaults + * to 50, limited to 256. + * + * @param {number} [options.skip] Number of images to skip before beginning the + * image batch. Defaults to 0. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getUntaggedImageCountWithHttpOperationResponse(projectId, options) { + getUntaggedImagesWithHttpOperationResponse(projectId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getUntaggedImageCount(projectId, options, (err, result, request, response) => { + self._getUntaggedImages(projectId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -6473,17 +7008,27 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Gets the number of untagged images + * @summary Get untagged images for a given project iteration. * - * This API returns the images which have no tags for a given project and - * optionally an iteration. If no iteration is specified the - * current workspace is used. + * This API supports batching and range selection. By default it will only + * return first 50 images matching images. + * Use the {take} and {skip} parameters to control how many images to return in + * a given batch. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. + * + * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible + * values include: 'Newest', 'Oldest' + * + * @param {number} [options.take] Maximum number of images to return. Defaults + * to 50, limited to 256. + * + * @param {number} [options.skip] Number of images to skip before beginning the + * image batch. Defaults to 0. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -6495,7 +7040,7 @@ class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {Number} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error} - The error object. * @@ -6503,13 +7048,13 @@ class TrainingAPIClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {number} [result] - The deserialized result object if an error did not occur. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getUntaggedImageCount(projectId, options, optionalCallback) { + getUntaggedImages(projectId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -6518,32 +7063,32 @@ class TrainingAPIClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getUntaggedImageCount(projectId, options, (err, result, request, response) => { + self._getUntaggedImages(projectId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getUntaggedImageCount(projectId, options, optionalCallback); + return self._getUntaggedImages(projectId, options, optionalCallback); } } /** - * @summary Get images by id for a given project iteration + * @summary Get images by id for a given project iteration. * * This API will return a set of Images for the specified tags and optionally * iteration. If no iteration is specified the * current workspace is used. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * * @param {array} [options.imageIds] The list of image ids to retrieve. Limited - * to 256 + * to 256. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -6569,20 +7114,20 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get images by id for a given project iteration + * @summary Get images by id for a given project iteration. * * This API will return a set of Images for the specified tags and optionally * iteration. If no iteration is specified the * current workspace is used. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * * @param {array} [options.imageIds] The list of image ids to retrieve. Limited - * to 256 + * to 256. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -6629,20 +7174,20 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Add the provided images to the set of training images + * @summary Add the provided images to the set of training images. * * This API accepts body content as multipart/form-data and * application/octet-stream. When using multipart * multiple image files can be sent at once, with a maximum of 64 files * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {object} imageData + * @param {object} imageData Binary image data. * * @param {object} [options] Optional Parameters. * * @param {array} [options.tagIds] The tags ids with which to tag each image. - * Limited to 20 + * Limited to 20. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -6668,20 +7213,20 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Add the provided images to the set of training images + * @summary Add the provided images to the set of training images. * * This API accepts body content as multipart/form-data and * application/octet-stream. When using multipart * multiple image files can be sent at once, with a maximum of 64 files * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {object} imageData + * @param {object} imageData Binary image data. * * @param {object} [options] Optional Parameters. * * @param {array} [options.tagIds] The tags ids with which to tag each image. - * Limited to 20 + * Limited to 20. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -6729,12 +7274,12 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Delete images from the set of training images + * @summary Delete images from the set of training images. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {array} imageIds Ids of the images to be deleted. Limted to 256 - * images per batch + * images per batch. * * @param {object} [options] Optional Parameters. * @@ -6762,12 +7307,12 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Delete images from the set of training images + * @summary Delete images from the set of training images. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {array} imageIds Ids of the images to be deleted. Limted to 256 - * images per batch + * images per batch. * * @param {object} [options] Optional Parameters. * @@ -6816,15 +7361,15 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Add the provided batch of images to the set of training images + * @summary Add the provided batch of images to the set of training images. * * This API accepts a batch of files, and optionally tags, to create images. * There is a limit of 64 images and 20 tags. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} batch The batch of image files to add. Limited to 64 images - * and 20 tags per batch + * and 20 tags per batch. * * @param {array} [batch.images] * @@ -6856,15 +7401,15 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Add the provided batch of images to the set of training images + * @summary Add the provided batch of images to the set of training images. * * This API accepts a batch of files, and optionally tags, to create images. * There is a limit of 64 images and 20 tags. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} batch The batch of image files to add. Limited to 64 images - * and 20 tags per batch + * and 20 tags per batch. * * @param {array} [batch.images] * @@ -6918,15 +7463,15 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Add the provided images urls to the set of training images + * @summary Add the provided images urls to the set of training images. * * This API accepts a batch of urls, and optionally tags, to create images. * There is a limit of 64 images and 20 tags. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} batch Image urls and tag ids. Limited to 64 images and 20 - * tags per batch + * tags per batch. * * @param {array} [batch.images] * @@ -6958,15 +7503,15 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Add the provided images urls to the set of training images + * @summary Add the provided images urls to the set of training images. * * This API accepts a batch of urls, and optionally tags, to create images. * There is a limit of 64 images and 20 tags. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} batch Image urls and tag ids. Limited to 64 images and 20 - * tags per batch + * tags per batch. * * @param {array} [batch.images] * @@ -7015,211 +7560,24 @@ class TrainingAPIClient extends ServiceClient { }); }); } else { - return self._createImagesFromUrls(projectId, batch, options, optionalCallback); - } - } - - /** - * @summary Add the specified predicted images to the set of training images - * - * This API creates a batch of images from predicted images specified. There is - * a limit of 64 images and 20 tags. - * - * @param {uuid} projectId The project id - * - * @param {object} batch Image and tag ids. Limted to 64 images and 20 tags per - * batch - * - * @param {array} [batch.images] - * - * @param {array} [batch.tagIds] - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error} - The error object. - */ - createImagesFromPredictionsWithHttpOperationResponse(projectId, batch, options) { - let client = this; - let self = this; - return new Promise((resolve, reject) => { - self._createImagesFromPredictions(projectId, batch, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * @summary Add the specified predicted images to the set of training images - * - * This API creates a batch of images from predicted images specified. There is - * a limit of 64 images and 20 tags. - * - * @param {uuid} projectId The project id - * - * @param {object} batch Image and tag ids. Limted to 64 images and 20 tags per - * batch - * - * @param {array} [batch.images] - * - * @param {array} [batch.tagIds] - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} [optionalCallback] - The optional callback. - * - * @returns {function|Promise} If a callback was passed as the last parameter - * then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned - * - * @resolve {ImageCreateSummary} - The deserialized result object. - * - * @reject {Error} - The error object. - * - * {function} optionalCallback(err, result, request, response) - * - * {Error} err - The Error object if an error occurred, null otherwise. - * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ImageCreateSummary} for more information. - * - * {object} [request] - The HTTP Request object if an error did not occur. - * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ - createImagesFromPredictions(projectId, batch, options, optionalCallback) { - let client = this; - let self = this; - if (!optionalCallback && typeof options === 'function') { - optionalCallback = options; - options = null; - } - if (!optionalCallback) { - return new Promise((resolve, reject) => { - self._createImagesFromPredictions(projectId, batch, options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._createImagesFromPredictions(projectId, batch, options, optionalCallback); - } - } - - /** - * @summary Associate a set of images with a set of tags - * - * @param {uuid} projectId The project id - * - * @param {object} batch Batch of image tags. Limited to 128 tags per batch - * - * @param {array} [batch.tags] - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error} - The error object. - */ - createImageTagsWithHttpOperationResponse(projectId, batch, options) { - let client = this; - let self = this; - return new Promise((resolve, reject) => { - self._createImageTags(projectId, batch, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * @summary Associate a set of images with a set of tags - * - * @param {uuid} projectId The project id - * - * @param {object} batch Batch of image tags. Limited to 128 tags per batch - * - * @param {array} [batch.tags] - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} [optionalCallback] - The optional callback. - * - * @returns {function|Promise} If a callback was passed as the last parameter - * then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned - * - * @resolve {ImageTagCreateSummary} - The deserialized result object. - * - * @reject {Error} - The error object. - * - * {function} optionalCallback(err, result, request, response) - * - * {Error} err - The Error object if an error occurred, null otherwise. - * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ImageTagCreateSummary} for more information. - * - * {object} [request] - The HTTP Request object if an error did not occur. - * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ - createImageTags(projectId, batch, options, optionalCallback) { - let client = this; - let self = this; - if (!optionalCallback && typeof options === 'function') { - optionalCallback = options; - options = null; - } - if (!optionalCallback) { - return new Promise((resolve, reject) => { - self._createImageTags(projectId, batch, options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._createImageTags(projectId, batch, options, optionalCallback); + return self._createImagesFromUrls(projectId, batch, options, optionalCallback); } } /** - * @summary Remove a set of tags from a set of images + * @summary Add the specified predicted images to the set of training images. * - * @param {uuid} projectId The project id + * This API creates a batch of images from predicted images specified. There is + * a limit of 64 images and 20 tags. * - * @param {array} imageIds Image ids. Limited to 64 images + * @param {uuid} projectId The project id. * - * @param {array} tagIds Tags to be deleted from the specified images. Limted - * to 20 tags + * @param {object} batch Image and tag ids. Limted to 64 images and 20 tags per + * batch. + * + * @param {array} [batch.images] + * + * @param {array} [batch.tagIds] * * @param {object} [options] Optional Parameters. * @@ -7228,15 +7586,15 @@ class TrainingAPIClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - deleteImageTagsWithHttpOperationResponse(projectId, imageIds, tagIds, options) { + createImagesFromPredictionsWithHttpOperationResponse(projectId, batch, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._deleteImageTags(projectId, imageIds, tagIds, options, (err, result, request, response) => { + self._createImagesFromPredictions(projectId, batch, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -7247,14 +7605,19 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Remove a set of tags from a set of images + * @summary Add the specified predicted images to the set of training images. + * + * This API creates a batch of images from predicted images specified. There is + * a limit of 64 images and 20 tags. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {array} imageIds Image ids. Limited to 64 images + * @param {object} batch Image and tag ids. Limted to 64 images and 20 tags per + * batch. * - * @param {array} tagIds Tags to be deleted from the specified images. Limted - * to 20 tags + * @param {array} [batch.images] + * + * @param {array} [batch.tagIds] * * @param {object} [options] Optional Parameters. * @@ -7268,7 +7631,7 @@ class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {ImageCreateSummary} - The deserialized result object. * * @reject {Error} - The error object. * @@ -7276,13 +7639,14 @@ class TrainingAPIClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ImageCreateSummary} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteImageTags(projectId, imageIds, tagIds, options, optionalCallback) { + createImagesFromPredictions(projectId, batch, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -7291,30 +7655,27 @@ class TrainingAPIClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteImageTags(projectId, imageIds, tagIds, options, (err, result, request, response) => { + self._createImagesFromPredictions(projectId, batch, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteImageTags(projectId, imageIds, tagIds, options, optionalCallback); + return self._createImagesFromPredictions(projectId, batch, options, optionalCallback); } } /** - * @summary Create a set of image regions - * - * This API accepts a batch of image regions, and optionally tags, to update - * existing images with region information. - * There is a limit of 64 entries in the batch. + * @summary Get region proposals for an image. Returns empty array if no + * proposals are found. * - * @param {uuid} projectId The project id + * This API will get region proposals for an image along with confidences for + * the region. It returns an empty array if no proposals are found. * - * @param {object} batch Batch of image regions which include a tag and - * bounding box. Limited to 64 + * @param {uuid} projectId The project id. * - * @param {array} [batch.regions] + * @param {uuid} imageId The image id. * * @param {object} [options] Optional Parameters. * @@ -7323,15 +7684,15 @@ class TrainingAPIClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - createImageRegionsWithHttpOperationResponse(projectId, batch, options) { + getImageRegionProposalsWithHttpOperationResponse(projectId, imageId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._createImageRegions(projectId, batch, options, (err, result, request, response) => { + self._getImageRegionProposals(projectId, imageId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -7342,18 +7703,15 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Create a set of image regions - * - * This API accepts a batch of image regions, and optionally tags, to update - * existing images with region information. - * There is a limit of 64 entries in the batch. + * @summary Get region proposals for an image. Returns empty array if no + * proposals are found. * - * @param {uuid} projectId The project id + * This API will get region proposals for an image along with confidences for + * the region. It returns an empty array if no proposals are found. * - * @param {object} batch Batch of image regions which include a tag and - * bounding box. Limited to 64 + * @param {uuid} projectId The project id. * - * @param {array} [batch.regions] + * @param {uuid} imageId The image id. * * @param {object} [options] Optional Parameters. * @@ -7367,7 +7725,7 @@ class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ImageRegionCreateSummary} - The deserialized result object. + * @resolve {ImageRegionProposal} - The deserialized result object. * * @reject {Error} - The error object. * @@ -7376,14 +7734,13 @@ class TrainingAPIClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ImageRegionCreateSummary} for more - * information. + * See {@link ImageRegionProposal} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createImageRegions(projectId, batch, options, optionalCallback) { + getImageRegionProposals(projectId, imageId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -7392,23 +7749,24 @@ class TrainingAPIClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createImageRegions(projectId, batch, options, (err, result, request, response) => { + self._getImageRegionProposals(projectId, imageId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createImageRegions(projectId, batch, options, optionalCallback); + return self._getImageRegionProposals(projectId, imageId, options, optionalCallback); } } /** - * @summary Delete a set of image regions + * @summary Delete a set of predicted images and their associated prediction + * results. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {array} regionIds Regions to delete. Limited to 64 + * @param {array} ids The prediction ids. Limited to 64. * * @param {object} [options] Optional Parameters. * @@ -7421,11 +7779,11 @@ class TrainingAPIClient extends ServiceClient { * * @reject {Error} - The error object. */ - deleteImageRegionsWithHttpOperationResponse(projectId, regionIds, options) { + deletePredictionWithHttpOperationResponse(projectId, ids, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._deleteImageRegions(projectId, regionIds, options, (err, result, request, response) => { + self._deletePrediction(projectId, ids, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -7436,11 +7794,12 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Delete a set of image regions + * @summary Delete a set of predicted images and their associated prediction + * results. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {array} regionIds Regions to delete. Limited to 64 + * @param {array} ids The prediction ids. Limited to 64. * * @param {object} [options] Optional Parameters. * @@ -7468,7 +7827,7 @@ class TrainingAPIClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteImageRegions(projectId, regionIds, options, optionalCallback) { + deletePrediction(projectId, ids, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -7477,44 +7836,47 @@ class TrainingAPIClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteImageRegions(projectId, regionIds, options, (err, result, request, response) => { + self._deletePrediction(projectId, ids, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteImageRegions(projectId, regionIds, options, optionalCallback); + return self._deletePrediction(projectId, ids, options, optionalCallback); } } /** - * @summary Get region proposals for an image. Returns empty array if no - * proposals are found. + * @summary Quick test an image url. * - * This API will get region proposals for an image along with confidences for - * the region. It returns an empty array if no proposals are found. + * @param {uuid} projectId The project to evaluate against. * - * @param {uuid} projectId The project id + * @param {object} imageUrl An {Iris.Web.Api.Models.ImageUrl} that contains the + * url of the image to be evaluated. * - * @param {uuid} imageId The image id + * @param {string} [imageUrl.url] * * @param {object} [options] Optional Parameters. * + * @param {uuid} [options.iterationId] Optional. Specifies the id of a + * particular iteration to evaluate against. + * The default iteration for the project will be used when not specified. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getImageRegionProposalsWithHttpOperationResponse(projectId, imageId, options) { + quickTestImageUrlWithHttpOperationResponse(projectId, imageUrl, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getImageRegionProposals(projectId, imageId, options, (err, result, request, response) => { + self._quickTestImageUrl(projectId, imageUrl, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -7525,18 +7887,21 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get region proposals for an image. Returns empty array if no - * proposals are found. + * @summary Quick test an image url. * - * This API will get region proposals for an image along with confidences for - * the region. It returns an empty array if no proposals are found. + * @param {uuid} projectId The project to evaluate against. * - * @param {uuid} projectId The project id + * @param {object} imageUrl An {Iris.Web.Api.Models.ImageUrl} that contains the + * url of the image to be evaluated. * - * @param {uuid} imageId The image id + * @param {string} [imageUrl.url] * * @param {object} [options] Optional Parameters. * + * @param {uuid} [options.iterationId] Optional. Specifies the id of a + * particular iteration to evaluate against. + * The default iteration for the project will be used when not specified. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -7547,7 +7912,7 @@ class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ImageRegionProposal} - The deserialized result object. + * @resolve {ImagePrediction} - The deserialized result object. * * @reject {Error} - The error object. * @@ -7556,13 +7921,13 @@ class TrainingAPIClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ImageRegionProposal} for more information. + * See {@link ImagePrediction} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getImageRegionProposals(projectId, imageId, options, optionalCallback) { + quickTestImageUrl(projectId, imageUrl, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -7571,41 +7936,44 @@ class TrainingAPIClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getImageRegionProposals(projectId, imageId, options, (err, result, request, response) => { + self._quickTestImageUrl(projectId, imageUrl, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getImageRegionProposals(projectId, imageId, options, optionalCallback); + return self._quickTestImageUrl(projectId, imageUrl, options, optionalCallback); } } /** - * @summary Delete a set of predicted images and their associated prediction - * results + * @summary Quick test an image. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {array} ids The prediction ids. Limited to 64 + * @param {object} imageData Binary image data. * * @param {object} [options] Optional Parameters. * + * @param {uuid} [options.iterationId] Optional. Specifies the id of a + * particular iteration to evaluate against. + * The default iteration for the project will be used when not specified. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - deletePredictionWithHttpOperationResponse(projectId, ids, options) { + quickTestImageWithHttpOperationResponse(projectId, imageData, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._deletePrediction(projectId, ids, options, (err, result, request, response) => { + self._quickTestImage(projectId, imageData, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -7616,15 +7984,18 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Delete a set of predicted images and their associated prediction - * results + * @summary Quick test an image. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {array} ids The prediction ids. Limited to 64 + * @param {object} imageData Binary image data. * * @param {object} [options] Optional Parameters. * + * @param {uuid} [options.iterationId] Optional. Specifies the id of a + * particular iteration to evaluate against. + * The default iteration for the project will be used when not specified. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -7635,7 +8006,7 @@ class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {ImagePrediction} - The deserialized result object. * * @reject {Error} - The error object. * @@ -7643,13 +8014,14 @@ class TrainingAPIClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ImagePrediction} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deletePrediction(projectId, ids, options, optionalCallback) { + quickTestImage(projectId, imageData, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -7658,24 +8030,24 @@ class TrainingAPIClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deletePrediction(projectId, ids, options, (err, result, request, response) => { + self._quickTestImage(projectId, imageData, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deletePrediction(projectId, ids, options, optionalCallback); + return self._quickTestImage(projectId, imageData, options, optionalCallback); } } /** - * @summary Get images that were sent to your prediction endpoint + * @summary Get images that were sent to your prediction endpoint. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} query Parameters used to query the predictions. Limited to - * combining 2 tags + * combining 2 tags. * * @param {string} [query.session] * @@ -7722,12 +8094,12 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get images that were sent to your prediction endpoint + * @summary Get images that were sent to your prediction endpoint. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} query Parameters used to query the predictions. Limited to - * combining 2 tags + * combining 2 tags. * * @param {string} [query.session] * @@ -7796,35 +8168,34 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Quick test an image url + * @summary Get detailed performance information about an iteration. * - * @param {uuid} projectId The project to evaluate against - * - * @param {object} imageUrl An {Iris.Web.Api.Models.ImageUrl} that contains the - * url of the image to be evaluated + * @param {uuid} projectId The id of the project the iteration belongs to. * - * @param {string} [imageUrl.url] + * @param {uuid} iterationId The id of the iteration to get. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] Optional. Specifies the id of a - * particular iteration to evaluate against. - * The default iteration for the project will be used when not specified. + * @param {number} [options.threshold] The threshold used to determine true + * predictions. + * + * @param {number} [options.overlapThreshold] If applicable, the bounding box + * overlap threshold used to determine true predictions. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - quickTestImageUrlWithHttpOperationResponse(projectId, imageUrl, options) { + getIterationPerformanceWithHttpOperationResponse(projectId, iterationId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._quickTestImageUrl(projectId, imageUrl, options, (err, result, request, response) => { + self._getIterationPerformance(projectId, iterationId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -7835,20 +8206,19 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Quick test an image url - * - * @param {uuid} projectId The project to evaluate against + * @summary Get detailed performance information about an iteration. * - * @param {object} imageUrl An {Iris.Web.Api.Models.ImageUrl} that contains the - * url of the image to be evaluated + * @param {uuid} projectId The id of the project the iteration belongs to. * - * @param {string} [imageUrl.url] + * @param {uuid} iterationId The id of the iteration to get. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] Optional. Specifies the id of a - * particular iteration to evaluate against. - * The default iteration for the project will be used when not specified. + * @param {number} [options.threshold] The threshold used to determine true + * predictions. + * + * @param {number} [options.overlapThreshold] If applicable, the bounding box + * overlap threshold used to determine true predictions. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -7860,7 +8230,7 @@ class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ImagePrediction} - The deserialized result object. + * @resolve {IterationPerformance} - The deserialized result object. * * @reject {Error} - The error object. * @@ -7869,13 +8239,13 @@ class TrainingAPIClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ImagePrediction} for more information. + * See {@link IterationPerformance} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - quickTestImageUrl(projectId, imageUrl, options, optionalCallback) { + getIterationPerformance(projectId, iterationId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -7884,44 +8254,60 @@ class TrainingAPIClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._quickTestImageUrl(projectId, imageUrl, options, (err, result, request, response) => { + self._getIterationPerformance(projectId, iterationId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._quickTestImageUrl(projectId, imageUrl, options, optionalCallback); + return self._getIterationPerformance(projectId, iterationId, options, optionalCallback); } } /** - * @summary Quick test an image + * @summary Get image with its prediction for a given project iteration. + * + * This API supports batching and range selection. By default it will only + * return first 50 images matching images. + * Use the {take} and {skip} parameters to control how many images to return in + * a given batch. + * The filtering is on an and/or relationship. For example, if the provided tag + * ids are for the "Dog" and + * "Cat" tags, then only images tagged with Dog and/or Cat will be returned * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {object} imageData + * @param {uuid} iterationId The iteration id. Defaults to workspace. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] Optional. Specifies the id of a - * particular iteration to evaluate against. - * The default iteration for the project will be used when not specified. + * @param {array} [options.tagIds] A list of tags ids to filter the images. + * Defaults to all tagged images when null. Limited to 20. + * + * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible + * values include: 'Newest', 'Oldest' + * + * @param {number} [options.take] Maximum number of images to return. Defaults + * to 50, limited to 256. + * + * @param {number} [options.skip] Number of images to skip before beginning the + * image batch. Defaults to 0. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - quickTestImageWithHttpOperationResponse(projectId, imageData, options) { + getImagePerformancesWithHttpOperationResponse(projectId, iterationId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._quickTestImage(projectId, imageData, options, (err, result, request, response) => { + self._getImagePerformances(projectId, iterationId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -7932,17 +8318,33 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Quick test an image + * @summary Get image with its prediction for a given project iteration. + * + * This API supports batching and range selection. By default it will only + * return first 50 images matching images. + * Use the {take} and {skip} parameters to control how many images to return in + * a given batch. + * The filtering is on an and/or relationship. For example, if the provided tag + * ids are for the "Dog" and + * "Cat" tags, then only images tagged with Dog and/or Cat will be returned * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {object} imageData + * @param {uuid} iterationId The iteration id. Defaults to workspace. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] Optional. Specifies the id of a - * particular iteration to evaluate against. - * The default iteration for the project will be used when not specified. + * @param {array} [options.tagIds] A list of tags ids to filter the images. + * Defaults to all tagged images when null. Limited to 20. + * + * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible + * values include: 'Newest', 'Oldest' + * + * @param {number} [options.take] Maximum number of images to return. Defaults + * to 50, limited to 256. + * + * @param {number} [options.skip] Number of images to skip before beginning the + * image batch. Defaults to 0. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -7954,7 +8356,7 @@ class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ImagePrediction} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error} - The error object. * @@ -7962,14 +8364,13 @@ class TrainingAPIClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ImagePrediction} for more information. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - quickTestImage(projectId, imageData, options, optionalCallback) { + getImagePerformances(projectId, iterationId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -7978,38 +8379,49 @@ class TrainingAPIClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._quickTestImage(projectId, imageData, options, (err, result, request, response) => { + self._getImagePerformances(projectId, iterationId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._quickTestImage(projectId, imageData, options, optionalCallback); + return self._getImagePerformances(projectId, iterationId, options, optionalCallback); } } /** - * @summary Queues project for training + * @summary Gets the number of images tagged with the provided {tagIds} that + * have prediction results from + * training for the provided iteration {iterationId}. + * + * The filtering is on an and/or relationship. For example, if the provided tag + * ids are for the "Dog" and + * "Cat" tags, then only images tagged with Dog and/or Cat will be returned + * + * @param {uuid} projectId The project id. * - * @param {uuid} projectId The project id + * @param {uuid} iterationId The iteration id. Defaults to workspace. * * @param {object} [options] Optional Parameters. * + * @param {array} [options.tagIds] A list of tags ids to filter the images to + * count. Defaults to all tags when null. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - trainProjectWithHttpOperationResponse(projectId, options) { + getImagePerformanceCountWithHttpOperationResponse(projectId, iterationId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._trainProject(projectId, options, (err, result, request, response) => { + self._getImagePerformanceCount(projectId, iterationId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -8020,12 +8432,23 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Queues project for training + * @summary Gets the number of images tagged with the provided {tagIds} that + * have prediction results from + * training for the provided iteration {iterationId}. + * + * The filtering is on an and/or relationship. For example, if the provided tag + * ids are for the "Dog" and + * "Cat" tags, then only images tagged with Dog and/or Cat will be returned + * + * @param {uuid} projectId The project id. * - * @param {uuid} projectId The project id + * @param {uuid} iterationId The iteration id. Defaults to workspace. * * @param {object} [options] Optional Parameters. * + * @param {array} [options.tagIds] A list of tags ids to filter the images to + * count. Defaults to all tags when null. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -8036,7 +8459,7 @@ class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {Iteration} - The deserialized result object. + * @resolve {Number} - The deserialized result object. * * @reject {Error} - The error object. * @@ -8044,14 +8467,13 @@ class TrainingAPIClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link Iteration} for more information. + * {number} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - trainProject(projectId, options, optionalCallback) { + getImagePerformanceCount(projectId, iterationId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -8060,19 +8482,19 @@ class TrainingAPIClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._trainProject(projectId, options, (err, result, request, response) => { + self._getImagePerformanceCount(projectId, iterationId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._trainProject(projectId, options, optionalCallback); + return self._getImagePerformanceCount(projectId, iterationId, options, optionalCallback); } } /** - * @summary Get your projects + * @summary Get your projects. * * @param {object} [options] Optional Parameters. * @@ -8100,7 +8522,7 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get your projects + * @summary Get your projects. * * @param {object} [options] Optional Parameters. * @@ -8149,16 +8571,16 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Create a project + * @summary Create a project. * - * @param {string} name Name of the project + * @param {string} name Name of the project. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.description] The description of the project + * @param {string} [options.description] The description of the project. * * @param {uuid} [options.domainId] The id of the domain to use for this - * project. Defaults to General + * project. Defaults to General. * * @param {string} [options.classificationType] The type of classifier to * create for this project. Possible values include: 'Multiclass', 'Multilabel' @@ -8187,16 +8609,16 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Create a project + * @summary Create a project. * - * @param {string} name Name of the project + * @param {string} name Name of the project. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.description] The description of the project + * @param {string} [options.description] The description of the project. * * @param {uuid} [options.domainId] The id of the domain to use for this - * project. Defaults to General + * project. Defaults to General. * * @param {string} [options.classificationType] The type of classifier to * create for this project. Possible values include: 'Multiclass', 'Multilabel' @@ -8247,9 +8669,9 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get a specific project + * @summary Get a specific project. * - * @param {uuid} projectId The id of the project to get + * @param {uuid} projectId The id of the project to get. * * @param {object} [options] Optional Parameters. * @@ -8277,9 +8699,9 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get a specific project + * @summary Get a specific project. * - * @param {uuid} projectId The id of the project to get + * @param {uuid} projectId The id of the project to get. * * @param {object} [options] Optional Parameters. * @@ -8329,9 +8751,9 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Delete a specific project + * @summary Delete a specific project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * @@ -8359,9 +8781,9 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Delete a specific project + * @summary Delete a specific project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * @@ -8410,21 +8832,21 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Update a specific project + * @summary Update a specific project. * - * @param {uuid} projectId The id of the project to update + * @param {uuid} projectId The id of the project to update. * - * @param {object} updatedProject The updated project model + * @param {object} updatedProject The updated project model. * - * @param {string} [updatedProject.name] Gets or sets the name of the project + * @param {string} [updatedProject.name] Gets or sets the name of the project. * * @param {string} [updatedProject.description] Gets or sets the description of - * the project + * the project. * - * @param {object} [updatedProject.settings] Gets or sets the project settings + * @param {object} [updatedProject.settings] Gets or sets the project settings. * * @param {uuid} [updatedProject.settings.domainId] Gets or sets the id of the - * Domain to use with this project + * Domain to use with this project. * * @param {string} [updatedProject.settings.classificationType] Gets or sets * the classification type of the project. Possible values include: @@ -8456,21 +8878,21 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Update a specific project + * @summary Update a specific project. * - * @param {uuid} projectId The id of the project to update + * @param {uuid} projectId The id of the project to update. * - * @param {object} updatedProject The updated project model + * @param {object} updatedProject The updated project model. * - * @param {string} [updatedProject.name] Gets or sets the name of the project + * @param {string} [updatedProject.name] Gets or sets the name of the project. * * @param {string} [updatedProject.description] Gets or sets the description of - * the project + * the project. * - * @param {object} [updatedProject.settings] Gets or sets the project settings + * @param {object} [updatedProject.settings] Gets or sets the project settings. * * @param {uuid} [updatedProject.settings.domainId] Gets or sets the id of the - * Domain to use with this project + * Domain to use with this project. * * @param {string} [updatedProject.settings.classificationType] Gets or sets * the classification type of the project. Possible values include: @@ -8524,9 +8946,9 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get iterations for the project + * @summary Get iterations for the project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * @@ -8554,9 +8976,9 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get iterations for the project + * @summary Get iterations for the project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * @@ -8605,11 +9027,11 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get a specific iteration + * @summary Get a specific iteration. * - * @param {uuid} projectId The id of the project the iteration belongs to + * @param {uuid} projectId The id of the project the iteration belongs to. * - * @param {uuid} iterationId The id of the iteration to get + * @param {uuid} iterationId The id of the iteration to get. * * @param {object} [options] Optional Parameters. * @@ -8637,11 +9059,11 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get a specific iteration + * @summary Get a specific iteration. * - * @param {uuid} projectId The id of the project the iteration belongs to + * @param {uuid} projectId The id of the project the iteration belongs to. * - * @param {uuid} iterationId The id of the iteration to get + * @param {uuid} iterationId The id of the iteration to get. * * @param {object} [options] Optional Parameters. * @@ -8691,11 +9113,11 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Delete a specific iteration of a project + * @summary Delete a specific iteration of a project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} iterationId The iteration id + * @param {uuid} iterationId The iteration id. * * @param {object} [options] Optional Parameters. * @@ -8723,11 +9145,11 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Delete a specific iteration of a project + * @summary Delete a specific iteration of a project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} iterationId The iteration id + * @param {uuid} iterationId The iteration id. * * @param {object} [options] Optional Parameters. * @@ -8776,19 +9198,19 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Update a specific iteration + * @summary Update a specific iteration. * - * @param {uuid} projectId Project id + * @param {uuid} projectId Project id. * - * @param {uuid} iterationId Iteration id + * @param {uuid} iterationId Iteration id. * - * @param {object} updatedIteration The updated iteration model + * @param {object} updatedIteration The updated iteration model. * * @param {string} [updatedIteration.name] Gets or sets the name of the - * iteration + * iteration. * * @param {boolean} [updatedIteration.isDefault] Gets or sets a value - * indicating whether the iteration is the default iteration for the project + * indicating whether the iteration is the default iteration for the project. * * @param {object} [options] Optional Parameters. * @@ -8816,19 +9238,19 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Update a specific iteration + * @summary Update a specific iteration. * - * @param {uuid} projectId Project id + * @param {uuid} projectId Project id. * - * @param {uuid} iterationId Iteration id + * @param {uuid} iterationId Iteration id. * - * @param {object} updatedIteration The updated iteration model + * @param {object} updatedIteration The updated iteration model. * * @param {string} [updatedIteration.name] Gets or sets the name of the - * iteration + * iteration. * * @param {boolean} [updatedIteration.isDefault] Gets or sets a value - * indicating whether the iteration is the default iteration for the project + * indicating whether the iteration is the default iteration for the project. * * @param {object} [options] Optional Parameters. * @@ -8878,34 +9300,26 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get detailed performance information about an iteration + * @summary Queues project for training. * - * @param {uuid} projectId The id of the project the iteration belongs to - * - * @param {uuid} iterationId The id of the iteration to get + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {number} [options.threshold] The threshold used to determine true - * predictions - * - * @param {number} [options.overlapThreshold] If applicable, the bounding box - * overlap threshold used to determine true predictions - * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getIterationPerformanceWithHttpOperationResponse(projectId, iterationId, options) { + trainProjectWithHttpOperationResponse(projectId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getIterationPerformance(projectId, iterationId, options, (err, result, request, response) => { + self._trainProject(projectId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -8916,20 +9330,12 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get detailed performance information about an iteration - * - * @param {uuid} projectId The id of the project the iteration belongs to + * @summary Queues project for training. * - * @param {uuid} iterationId The id of the iteration to get + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {number} [options.threshold] The threshold used to determine true - * predictions - * - * @param {number} [options.overlapThreshold] If applicable, the bounding box - * overlap threshold used to determine true predictions - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -8940,7 +9346,7 @@ class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {IterationPerformance} - The deserialized result object. + * @resolve {Iteration} - The deserialized result object. * * @reject {Error} - The error object. * @@ -8949,241 +9355,13 @@ class TrainingAPIClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link IterationPerformance} for more information. - * - * {object} [request] - The HTTP Request object if an error did not occur. - * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ - getIterationPerformance(projectId, iterationId, options, optionalCallback) { - let client = this; - let self = this; - if (!optionalCallback && typeof options === 'function') { - optionalCallback = options; - options = null; - } - if (!optionalCallback) { - return new Promise((resolve, reject) => { - self._getIterationPerformance(projectId, iterationId, options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._getIterationPerformance(projectId, iterationId, options, optionalCallback); - } - } - - /** - * @summary Get image with its prediction for a given project iteration - * - * This API supports batching and range selection. By default it will only - * return first 50 images matching images. - * Use the {take} and {skip} parameters to control how many images to return in - * a given batch. - * The filtering is on an and/or relationship. For example, if the provided tag - * ids are for the "Dog" and - * "Cat" tags, then only images tagged with Dog and/or Cat will be returned - * - * @param {uuid} projectId The project id - * - * @param {uuid} iterationId The iteration id. Defaults to workspace - * - * @param {object} [options] Optional Parameters. - * - * @param {array} [options.tagIds] A list of tags ids to filter the images. - * Defaults to all tagged images when null. Limited to 20 - * - * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible - * values include: 'Newest', 'Oldest' - * - * @param {number} [options.take] Maximum number of images to return. Defaults - * to 50, limited to 256 - * - * @param {number} [options.skip] Number of images to skip before beginning the - * image batch. Defaults to 0 - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error} - The error object. - */ - getImagePerformancesWithHttpOperationResponse(projectId, iterationId, options) { - let client = this; - let self = this; - return new Promise((resolve, reject) => { - self._getImagePerformances(projectId, iterationId, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * @summary Get image with its prediction for a given project iteration - * - * This API supports batching and range selection. By default it will only - * return first 50 images matching images. - * Use the {take} and {skip} parameters to control how many images to return in - * a given batch. - * The filtering is on an and/or relationship. For example, if the provided tag - * ids are for the "Dog" and - * "Cat" tags, then only images tagged with Dog and/or Cat will be returned - * - * @param {uuid} projectId The project id - * - * @param {uuid} iterationId The iteration id. Defaults to workspace - * - * @param {object} [options] Optional Parameters. - * - * @param {array} [options.tagIds] A list of tags ids to filter the images. - * Defaults to all tagged images when null. Limited to 20 - * - * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible - * values include: 'Newest', 'Oldest' - * - * @param {number} [options.take] Maximum number of images to return. Defaults - * to 50, limited to 256 - * - * @param {number} [options.skip] Number of images to skip before beginning the - * image batch. Defaults to 0 - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} [optionalCallback] - The optional callback. - * - * @returns {function|Promise} If a callback was passed as the last parameter - * then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned - * - * @resolve {Array} - The deserialized result object. - * - * @reject {Error} - The error object. - * - * {function} optionalCallback(err, result, request, response) - * - * {Error} err - The Error object if an error occurred, null otherwise. - * - * {array} [result] - The deserialized result object if an error did not occur. - * - * {object} [request] - The HTTP Request object if an error did not occur. - * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ - getImagePerformances(projectId, iterationId, options, optionalCallback) { - let client = this; - let self = this; - if (!optionalCallback && typeof options === 'function') { - optionalCallback = options; - options = null; - } - if (!optionalCallback) { - return new Promise((resolve, reject) => { - self._getImagePerformances(projectId, iterationId, options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._getImagePerformances(projectId, iterationId, options, optionalCallback); - } - } - - /** - * @summary Gets the number of images tagged with the provided {tagIds} that - * have prediction results from - * training for the provided iteration {iterationId} - * - * The filtering is on an and/or relationship. For example, if the provided tag - * ids are for the "Dog" and - * "Cat" tags, then only images tagged with Dog and/or Cat will be returned - * - * @param {uuid} projectId The project id - * - * @param {uuid} iterationId The iteration id. Defaults to workspace - * - * @param {object} [options] Optional Parameters. - * - * @param {array} [options.tagIds] A list of tags ids to filter the images to - * count. Defaults to all tags when null. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error} - The error object. - */ - getImagePerformanceCountWithHttpOperationResponse(projectId, iterationId, options) { - let client = this; - let self = this; - return new Promise((resolve, reject) => { - self._getImagePerformanceCount(projectId, iterationId, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * @summary Gets the number of images tagged with the provided {tagIds} that - * have prediction results from - * training for the provided iteration {iterationId} - * - * The filtering is on an and/or relationship. For example, if the provided tag - * ids are for the "Dog" and - * "Cat" tags, then only images tagged with Dog and/or Cat will be returned - * - * @param {uuid} projectId The project id - * - * @param {uuid} iterationId The iteration id. Defaults to workspace - * - * @param {object} [options] Optional Parameters. - * - * @param {array} [options.tagIds] A list of tags ids to filter the images to - * count. Defaults to all tags when null. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} [optionalCallback] - The optional callback. - * - * @returns {function|Promise} If a callback was passed as the last parameter - * then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned - * - * @resolve {Number} - The deserialized result object. - * - * @reject {Error} - The error object. - * - * {function} optionalCallback(err, result, request, response) - * - * {Error} err - The Error object if an error occurred, null otherwise. - * - * {number} [result] - The deserialized result object if an error did not occur. + * See {@link Iteration} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getImagePerformanceCount(projectId, iterationId, options, optionalCallback) { + trainProject(projectId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -9192,23 +9370,23 @@ class TrainingAPIClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getImagePerformanceCount(projectId, iterationId, options, (err, result, request, response) => { + self._trainProject(projectId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getImagePerformanceCount(projectId, iterationId, options, optionalCallback); + return self._trainProject(projectId, options, optionalCallback); } } /** - * @summary Get the list of exports for a specific iteration + * @summary Get the list of exports for a specific iteration. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} iterationId The iteration id + * @param {uuid} iterationId The iteration id. * * @param {object} [options] Optional Parameters. * @@ -9236,11 +9414,11 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get the list of exports for a specific iteration + * @summary Get the list of exports for a specific iteration. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} iterationId The iteration id + * @param {uuid} iterationId The iteration id. * * @param {object} [options] Optional Parameters. * @@ -9289,19 +9467,19 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Export a trained iteration + * @summary Export a trained iteration. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} iterationId The iteration id + * @param {uuid} iterationId The iteration id. * - * @param {string} platform The target platform (coreml or tensorflow). - * Possible values include: 'CoreML', 'TensorFlow', 'DockerFile', 'ONNX' + * @param {string} platform The target platform. Possible values include: + * 'CoreML', 'TensorFlow', 'DockerFile', 'ONNX' * * @param {object} [options] Optional Parameters. * - * @param {string} [options.flavor] The flavor of the target platform (Windows, - * Linux, ARM, or GPU). Possible values include: 'Linux', 'Windows' + * @param {string} [options.flavor] The flavor of the target platform. Possible + * values include: 'Linux', 'Windows', 'ONNX10', 'ONNX12' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -9327,19 +9505,19 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Export a trained iteration + * @summary Export a trained iteration. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} iterationId The iteration id + * @param {uuid} iterationId The iteration id. * - * @param {string} platform The target platform (coreml or tensorflow). - * Possible values include: 'CoreML', 'TensorFlow', 'DockerFile', 'ONNX' + * @param {string} platform The target platform. Possible values include: + * 'CoreML', 'TensorFlow', 'DockerFile', 'ONNX' * * @param {object} [options] Optional Parameters. * - * @param {string} [options.flavor] The flavor of the target platform (Windows, - * Linux, ARM, or GPU). Possible values include: 'Linux', 'Windows' + * @param {string} [options.flavor] The flavor of the target platform. Possible + * values include: 'Linux', 'Windows', 'ONNX10', 'ONNX12' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -9387,16 +9565,16 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get information about a specific tag + * @summary Get information about a specific tag. * - * @param {uuid} projectId The project this tag belongs to + * @param {uuid} projectId The project this tag belongs to. * - * @param {uuid} tagId The tag id + * @param {uuid} tagId The tag id. * * @param {object} [options] Optional Parameters. * * @param {uuid} [options.iterationId] The iteration to retrieve this tag from. - * Optional, defaults to current training set + * Optional, defaults to current training set. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -9422,16 +9600,16 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get information about a specific tag + * @summary Get information about a specific tag. * - * @param {uuid} projectId The project this tag belongs to + * @param {uuid} projectId The project this tag belongs to. * - * @param {uuid} tagId The tag id + * @param {uuid} tagId The tag id. * * @param {object} [options] Optional Parameters. * * @param {uuid} [options.iterationId] The iteration to retrieve this tag from. - * Optional, defaults to current training set + * Optional, defaults to current training set. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -9479,11 +9657,11 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Delete a tag from the project + * @summary Delete a tag from the project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} tagId Id of the tag to be deleted + * @param {uuid} tagId Id of the tag to be deleted. * * @param {object} [options] Optional Parameters. * @@ -9511,11 +9689,11 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Delete a tag from the project + * @summary Delete a tag from the project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} tagId Id of the tag to be deleted + * @param {uuid} tagId Id of the tag to be deleted. * * @param {object} [options] Optional Parameters. * @@ -9564,18 +9742,21 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Update a tag + * @summary Update a tag. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} tagId The id of the target tag + * @param {uuid} tagId The id of the target tag. * - * @param {object} updatedTag The updated tag model + * @param {object} updatedTag The updated tag model. * - * @param {string} [updatedTag.name] Gets or sets the name of the tag + * @param {string} [updatedTag.name] Gets or sets the name of the tag. * * @param {string} [updatedTag.description] Gets or sets the description of the - * tag + * tag. + * + * @param {string} [updatedTag.type] Gets or sets the type of the tag. Possible + * values include: 'Regular', 'Negative' * * @param {object} [options] Optional Parameters. * @@ -9603,18 +9784,21 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Update a tag + * @summary Update a tag. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} tagId The id of the target tag + * @param {uuid} tagId The id of the target tag. * - * @param {object} updatedTag The updated tag model + * @param {object} updatedTag The updated tag model. * - * @param {string} [updatedTag.name] Gets or sets the name of the tag + * @param {string} [updatedTag.name] Gets or sets the name of the tag. * * @param {string} [updatedTag.description] Gets or sets the description of the - * tag + * tag. + * + * @param {string} [updatedTag.type] Gets or sets the type of the tag. Possible + * values include: 'Regular', 'Negative' * * @param {object} [options] Optional Parameters. * @@ -9664,13 +9848,13 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get the tags for a given project and iteration + * @summary Get the tags for a given project and iteration. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -9696,13 +9880,13 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get the tags for a given project and iteration + * @summary Get the tags for a given project and iteration. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -9749,15 +9933,18 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Create a tag for the project + * @summary Create a tag for the project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {string} name The tag name + * @param {string} name The tag name. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.description] Optional description for the tag + * @param {string} [options.description] Optional description for the tag. + * + * @param {string} [options.type] Optional type for the tag. Possible values + * include: 'Regular', 'Negative' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -9783,15 +9970,18 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Create a tag for the project + * @summary Create a tag for the project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {string} name The tag name + * @param {string} name The tag name. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.description] Optional description for the tag + * @param {string} [options.description] Optional description for the tag. + * + * @param {string} [options.type] Optional type for the tag. Possible values + * include: 'Regular', 'Negative' * * @param {object} [options.customHeaders] Headers that will be added to the * request diff --git a/lib/services/customVision/training/package.json b/lib/services/customVision/training/package.json index ddadee7b65..6b0a02943b 100644 --- a/lib/services/customVision/training/package.json +++ b/lib/services/customVision/training/package.json @@ -2,7 +2,7 @@ "name": "azure-cognitiveservices-customvision-training", "author": "Microsoft Corporation", "description": "TrainingAPIClient Library with typescript type definitions for node", - "version": "1.1.0-preview", + "version": "2.0.0", "dependencies": { "ms-rest": "^2.3.3" }, @@ -13,12 +13,12 @@ "license": "MIT", "main": "./lib/trainingAPIClient.js", "types": "./lib/trainingAPIClient.d.ts", - "homepage": "http://github.com/azure/azure-sdk-for-node", + "homepage": "https://github.com/azure/azure-sdk-for-node/tree/master/lib/services/customVision/training", "repository": { "type": "git", "url": "https://github.com/azure/azure-sdk-for-node.git" }, "bugs": { - "url": "http://github.com/Azure/azure-sdk-for-node/issues" + "url": "https://github.com/azure/azure-sdk-for-node/issues" } -} \ No newline at end of file +} diff --git a/lib/services/entitySearch/lib/entitySearchAPIClient.d.ts b/lib/services/entitySearch/lib/entitySearchClient.d.ts similarity index 57% rename from lib/services/entitySearch/lib/entitySearchAPIClient.d.ts rename to lib/services/entitySearch/lib/entitySearchClient.d.ts index b751f36fa1..567557d4bb 100644 --- a/lib/services/entitySearch/lib/entitySearchAPIClient.d.ts +++ b/lib/services/entitySearch/lib/entitySearchClient.d.ts @@ -12,16 +12,24 @@ import { ServiceClient, ServiceClientOptions, ServiceClientCredentials } from 'm import * as models from "./models"; import * as operations from "./operations"; -export default class EntitySearchAPIClient extends ServiceClient { +/** + * EntitySearchClientOptions for EntitySearchClient. + */ +declare interface EntitySearchClientOptions extends ServiceClientOptions { + /** + * @property {string} [endpoint] - Supported Cognitive Services endpoints (protocol and hostname, for example: "https://westus.api.cognitive.microsoft.com", "https://api.cognitive.microsoft.com"). + */ + endpoint?: string; +} + +export default class EntitySearchClient extends ServiceClient { /** * @class - * Initializes a new instance of the EntitySearchAPIClient class. + * Initializes a new instance of the EntitySearchClient class. * @constructor * * @param {credentials} credentials - Subscription credentials which uniquely identify client subscription. * - * @param {string} [baseUri] - The base URI of the service. - * * @param {object} [options] - The parameter options * * @param {Array} [options.filters] - Filters to be added to the request pipeline @@ -31,13 +39,17 @@ export default class EntitySearchAPIClient extends ServiceClient { * * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy * + * @param {string} [options.endpoint] - Supported Cognitive Services endpoints (protocol and hostname, for example: "https://westus.api.cognitive.microsoft.com", "https://api.cognitive.microsoft.com"). + * */ - constructor(credentials: ServiceClientCredentials, baseUri?: string, options?: ServiceClientOptions); + constructor(credentials: ServiceClientCredentials, options?: EntitySearchClientOptions); credentials: ServiceClientCredentials; + endpoint: string; + // Operation groups entitiesOperations: operations.EntitiesOperations; } -export { EntitySearchAPIClient, models as EntitySearchAPIModels }; +export { EntitySearchClient, models as EntitySearchModels }; diff --git a/lib/services/entitySearch/lib/entitySearchAPIClient.js b/lib/services/entitySearch/lib/entitySearchClient.js similarity index 67% rename from lib/services/entitySearch/lib/entitySearchAPIClient.js rename to lib/services/entitySearch/lib/entitySearchClient.js index 0647127672..fd4ae941ca 100644 --- a/lib/services/entitySearch/lib/entitySearchAPIClient.js +++ b/lib/services/entitySearch/lib/entitySearchClient.js @@ -21,19 +21,19 @@ const models = require('./models'); const operations = require('./operations'); -/** Class representing a EntitySearchAPIClient. */ -class EntitySearchAPIClient extends ServiceClient { +/** Class representing a EntitySearchClient. */ +class EntitySearchClient extends ServiceClient { /** - * Create a EntitySearchAPIClient. + * Create a EntitySearchClient. * @param {credentials} credentials - Subscription credentials which uniquely identify client subscription. - * @param {string} [baseUri] - The base URI of the service. * @param {object} [options] - The parameter options * @param {Array} [options.filters] - Filters to be added to the request pipeline * @param {object} [options.requestOptions] - Options for the underlying request object * {@link https://github.com/request/request#requestoptions-callback Options doc} * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy + * @param {string} [options.endpoint] - Supported Cognitive Services endpoints (protocol and hostname, for example: "https://westus.api.cognitive.microsoft.com", "https://api.cognitive.microsoft.com"). */ - constructor(credentials, baseUri, options) { + constructor(credentials, options) { if (credentials === null || credentials === undefined) { throw new Error('\'credentials\' cannot be null.'); } @@ -42,14 +42,15 @@ class EntitySearchAPIClient extends ServiceClient { super(credentials, options); - this.baseUri = baseUri; - if (!this.baseUri) { - this.baseUri = 'https://api.cognitive.microsoft.com/bing/v7.0'; - } + this.endpoint = 'https://api.cognitive.microsoft.com'; + this.baseUri = '{Endpoint}/bing/v7.0'; this.credentials = credentials; let packageInfo = this.getPackageJsonInfo(__dirname); this.addUserAgentInfo(`${packageInfo.name}/${packageInfo.version}`); + if(options.endpoint !== null && options.endpoint !== undefined) { + this.endpoint = options.endpoint; + } this.entitiesOperations = new operations.EntitiesOperations(this); this.models = models; msRest.addSerializationMixin(this); @@ -57,7 +58,7 @@ class EntitySearchAPIClient extends ServiceClient { } -module.exports = EntitySearchAPIClient; -module.exports['default'] = EntitySearchAPIClient; -module.exports.EntitySearchAPIClient = EntitySearchAPIClient; -module.exports.EntitySearchAPIModels = models; +module.exports = EntitySearchClient; +module.exports['default'] = EntitySearchClient; +module.exports.EntitySearchClient = EntitySearchClient; +module.exports.EntitySearchModels = models; diff --git a/lib/services/entitySearch/lib/models/airport.js b/lib/services/entitySearch/lib/models/airport.js index 434275f55b..a4ccbf6efd 100644 --- a/lib/services/entitySearch/lib/models/airport.js +++ b/lib/services/entitySearch/lib/models/airport.js @@ -19,8 +19,8 @@ const models = require('./index'); class Airport extends models['CivicStructure'] { /** * Create a Airport. - * @member {string} [iataCode] - * @member {string} [icaoCode] + * @property {string} [iataCode] + * @property {string} [icaoCode] */ constructor() { super(); diff --git a/lib/services/entitySearch/lib/models/contractualRulesAttribution.js b/lib/services/entitySearch/lib/models/contractualRulesAttribution.js index 2bfa083d1d..d2a92b57b3 100644 --- a/lib/services/entitySearch/lib/models/contractualRulesAttribution.js +++ b/lib/services/entitySearch/lib/models/contractualRulesAttribution.js @@ -19,7 +19,7 @@ const models = require('./index'); class ContractualRulesAttribution extends models['ContractualRulesContractualRule'] { /** * Create a ContractualRulesAttribution. - * @member {boolean} [mustBeCloseToContent] A Boolean value that determines + * @property {boolean} [mustBeCloseToContent] A Boolean value that determines * whether the contents of the rule must be placed in close proximity to the * field that the rule applies to. If true, the contents must be placed in * close proximity. If false, or this field does not exist, the contents may diff --git a/lib/services/entitySearch/lib/models/contractualRulesContractualRule.js b/lib/services/entitySearch/lib/models/contractualRulesContractualRule.js index f382803833..5a3b7529c6 100644 --- a/lib/services/entitySearch/lib/models/contractualRulesContractualRule.js +++ b/lib/services/entitySearch/lib/models/contractualRulesContractualRule.js @@ -16,9 +16,9 @@ class ContractualRulesContractualRule { /** * Create a ContractualRulesContractualRule. - * @member {string} [targetPropertyName] The name of the field that the rule - * applies to. - * @member {string} _type Polymorphic Discriminator + * @property {string} [targetPropertyName] The name of the field that the + * rule applies to. + * @property {string} _type Polymorphic Discriminator */ constructor() { } diff --git a/lib/services/entitySearch/lib/models/contractualRulesLicenseAttribution.js b/lib/services/entitySearch/lib/models/contractualRulesLicenseAttribution.js index b06eb3bf0a..f9a61169ed 100644 --- a/lib/services/entitySearch/lib/models/contractualRulesLicenseAttribution.js +++ b/lib/services/entitySearch/lib/models/contractualRulesLicenseAttribution.js @@ -20,9 +20,9 @@ const models = require('./index'); class ContractualRulesLicenseAttribution extends models['ContractualRulesAttribution'] { /** * Create a ContractualRulesLicenseAttribution. - * @member {object} [license] The license under which the content may be + * @property {object} [license] The license under which the content may be * used. - * @member {string} [licenseNotice] The license to display next to the + * @property {string} [licenseNotice] The license to display next to the * targeted field. */ constructor() { diff --git a/lib/services/entitySearch/lib/models/contractualRulesLinkAttribution.js b/lib/services/entitySearch/lib/models/contractualRulesLinkAttribution.js index 7fa2af515e..bfbac0384b 100644 --- a/lib/services/entitySearch/lib/models/contractualRulesLinkAttribution.js +++ b/lib/services/entitySearch/lib/models/contractualRulesLinkAttribution.js @@ -20,10 +20,10 @@ const models = require('./index'); class ContractualRulesLinkAttribution extends models['ContractualRulesAttribution'] { /** * Create a ContractualRulesLinkAttribution. - * @member {string} text The attribution text. - * @member {string} url The URL to the provider's website. Use text and URL + * @property {string} text The attribution text. + * @property {string} url The URL to the provider's website. Use text and URL * to create the hyperlink. - * @member {boolean} [optionalForListDisplay] Indicates whether this + * @property {boolean} [optionalForListDisplay] Indicates whether this * provider's attribution is optional. */ constructor() { diff --git a/lib/services/entitySearch/lib/models/contractualRulesMediaAttribution.js b/lib/services/entitySearch/lib/models/contractualRulesMediaAttribution.js index d38051203e..59dca5082a 100644 --- a/lib/services/entitySearch/lib/models/contractualRulesMediaAttribution.js +++ b/lib/services/entitySearch/lib/models/contractualRulesMediaAttribution.js @@ -20,9 +20,9 @@ const models = require('./index'); class ContractualRulesMediaAttribution extends models['ContractualRulesAttribution'] { /** * Create a ContractualRulesMediaAttribution. - * @member {string} [url] The URL that you use to create of hyperlink of the - * media content. For example, if the target is an image, you would use the - * URL to make the image clickable. + * @property {string} [url] The URL that you use to create of hyperlink of + * the media content. For example, if the target is an image, you would use + * the URL to make the image clickable. */ constructor() { super(); diff --git a/lib/services/entitySearch/lib/models/contractualRulesTextAttribution.js b/lib/services/entitySearch/lib/models/contractualRulesTextAttribution.js index 951d755349..214877aa8d 100644 --- a/lib/services/entitySearch/lib/models/contractualRulesTextAttribution.js +++ b/lib/services/entitySearch/lib/models/contractualRulesTextAttribution.js @@ -20,12 +20,12 @@ const models = require('./index'); class ContractualRulesTextAttribution extends models['ContractualRulesAttribution'] { /** * Create a ContractualRulesTextAttribution. - * @member {string} text The attribution text. Text attribution applies to + * @property {string} text The attribution text. Text attribution applies to * the entity as a whole and should be displayed immediately following the * entity presentation. If there are multiple text or link attribution rules * that do not specify a target, you should concatenate them and display them * using a "Data from:" label. - * @member {boolean} [optionalForListDisplay] Indicates whether this + * @property {boolean} [optionalForListDisplay] Indicates whether this * provider's attribution is optional. */ constructor() { diff --git a/lib/services/entitySearch/lib/models/creativeWork.js b/lib/services/entitySearch/lib/models/creativeWork.js index 8baab03de7..1c0749c4e2 100644 --- a/lib/services/entitySearch/lib/models/creativeWork.js +++ b/lib/services/entitySearch/lib/models/creativeWork.js @@ -19,9 +19,9 @@ const models = require('./index'); class CreativeWork extends models['Thing'] { /** * Create a CreativeWork. - * @member {string} [thumbnailUrl] The URL to a thumbnail of the item. - * @member {array} [provider] The source of the creative work. - * @member {string} [text] + * @property {string} [thumbnailUrl] The URL to a thumbnail of the item. + * @property {array} [provider] The source of the creative work. + * @property {string} [text] */ constructor() { super(); diff --git a/lib/services/entitySearch/lib/models/entities.js b/lib/services/entitySearch/lib/models/entities.js index eecd0043bb..81e9c87bcb 100644 --- a/lib/services/entitySearch/lib/models/entities.js +++ b/lib/services/entitySearch/lib/models/entities.js @@ -20,8 +20,8 @@ const models = require('./index'); class Entities extends models['SearchResultsAnswer'] { /** * Create a Entities. - * @member {string} [queryScenario] The supported query scenario. This field - * is set to DominantEntity or DisambiguationItem. The field is set to + * @property {string} [queryScenario] The supported query scenario. This + * field is set to DominantEntity or DisambiguationItem. The field is set to * DominantEntity if Bing determines that only a single entity satisfies the * request. For example, a book, movie, person, or attraction. If multiple * entities could satisfy the request, the field is set to @@ -31,7 +31,7 @@ class Entities extends models['SearchResultsAnswer'] { * entity's type would likely be DominantEntity. Possible values include: * 'DominantEntity', 'DominantEntityWithDisambiguation', 'Disambiguation', * 'List', 'ListWithPivot'. Default value: 'DominantEntity' . - * @member {array} value A list of entities. + * @property {array} value A list of entities. */ constructor() { super(); diff --git a/lib/services/entitySearch/lib/models/entitiesEntityPresentationInfo.js b/lib/services/entitySearch/lib/models/entitiesEntityPresentationInfo.js index de6ba61119..e4a03abf33 100644 --- a/lib/services/entitySearch/lib/models/entitiesEntityPresentationInfo.js +++ b/lib/services/entitySearch/lib/models/entitiesEntityPresentationInfo.js @@ -17,14 +17,14 @@ class EntitiesEntityPresentationInfo { /** * Create a EntitiesEntityPresentationInfo. - * @member {string} entityScenario The supported scenario. Possible values + * @property {string} entityScenario The supported scenario. Possible values * include: 'DominantEntity', 'DisambiguationItem', 'ListItem'. Default * value: 'DominantEntity' . - * @member {array} [entityTypeHints] A list of hints that indicate the + * @property {array} [entityTypeHints] A list of hints that indicate the * entity's type. The list could contain a single hint such as Movie or a * list of hints such as Place, LocalBusiness, Restaurant. Each successive * hint in the array narrows the entity's type. - * @member {string} [entityTypeDisplayHint] A display version of the entity + * @property {string} [entityTypeDisplayHint] A display version of the entity * hint. For example, if entityTypeHints is Artist, this field may be set to * American Singer. */ @@ -61,7 +61,7 @@ class EntitiesEntityPresentationInfo { name: 'Sequence', element: { required: false, - serializedName: 'StringElementType', + serializedName: 'EntityTypeElementType', type: { name: 'String' } diff --git a/lib/services/entitySearch/lib/models/errorModel.js b/lib/services/entitySearch/lib/models/errorModel.js index 29a10321dd..d827e4885e 100644 --- a/lib/services/entitySearch/lib/models/errorModel.js +++ b/lib/services/entitySearch/lib/models/errorModel.js @@ -17,22 +17,22 @@ class ErrorModel { /** * Create a ErrorModel. - * @member {string} code The error code that identifies the category of + * @property {string} code The error code that identifies the category of * error. Possible values include: 'None', 'ServerError', 'InvalidRequest', * 'RateLimitExceeded', 'InvalidAuthorization', 'InsufficientAuthorization'. * Default value: 'None' . - * @member {string} [subCode] The error code that further helps to identify + * @property {string} [subCode] The error code that further helps to identify * the error. Possible values include: 'UnexpectedError', 'ResourceError', * 'NotImplemented', 'ParameterMissing', 'ParameterInvalidValue', * 'HttpNotAllowed', 'Blocked', 'AuthorizationMissing', * 'AuthorizationRedundancy', 'AuthorizationDisabled', 'AuthorizationExpired' - * @member {string} message A description of the error. - * @member {string} [moreDetails] A description that provides additional + * @property {string} message A description of the error. + * @property {string} [moreDetails] A description that provides additional * information about the error. - * @member {string} [parameter] The parameter in the request that caused the - * error. - * @member {string} [value] The parameter's value in the request that was not - * valid. + * @property {string} [parameter] The parameter in the request that caused + * the error. + * @property {string} [value] The parameter's value in the request that was + * not valid. */ constructor() { } diff --git a/lib/services/entitySearch/lib/models/errorResponse.js b/lib/services/entitySearch/lib/models/errorResponse.js index 2dd0874c95..cea5452827 100644 --- a/lib/services/entitySearch/lib/models/errorResponse.js +++ b/lib/services/entitySearch/lib/models/errorResponse.js @@ -20,8 +20,8 @@ const models = require('./index'); class ErrorResponse extends models['Response'] { /** * Create a ErrorResponse. - * @member {array} errors A list of errors that describe the reasons why the - * request failed. + * @property {array} errors A list of errors that describe the reasons why + * the request failed. */ constructor() { super(); diff --git a/lib/services/entitySearch/lib/models/hotel.js b/lib/services/entitySearch/lib/models/hotel.js index 17235ec10e..d9e3e9bcba 100644 --- a/lib/services/entitySearch/lib/models/hotel.js +++ b/lib/services/entitySearch/lib/models/hotel.js @@ -19,8 +19,8 @@ const models = require('./index'); class Hotel extends models['LodgingBusiness'] { /** * Create a Hotel. - * @member {string} [hotelClass] - * @member {array} [amenities] + * @property {string} [hotelClass] + * @property {array} [amenities] */ constructor() { super(); diff --git a/lib/services/entitySearch/lib/models/identifiable.js b/lib/services/entitySearch/lib/models/identifiable.js index 6cc9e3d679..51ceb85de4 100644 --- a/lib/services/entitySearch/lib/models/identifiable.js +++ b/lib/services/entitySearch/lib/models/identifiable.js @@ -20,7 +20,7 @@ const models = require('./index'); class Identifiable extends models['ResponseBase'] { /** * Create a Identifiable. - * @member {string} [id] A String identifier. + * @property {string} [id] A String identifier. */ constructor() { super(); diff --git a/lib/services/entitySearch/lib/models/imageObject.js b/lib/services/entitySearch/lib/models/imageObject.js index 4116d70049..f2367c9a7d 100644 --- a/lib/services/entitySearch/lib/models/imageObject.js +++ b/lib/services/entitySearch/lib/models/imageObject.js @@ -20,7 +20,7 @@ const models = require('./index'); class ImageObject extends models['MediaObject'] { /** * Create a ImageObject. - * @member {object} [thumbnail] The URL to a thumbnail of the image + * @property {object} [thumbnail] The URL to a thumbnail of the image */ constructor() { super(); diff --git a/lib/services/entitySearch/lib/models/index.d.ts b/lib/services/entitySearch/lib/models/index.d.ts index 75e4afd2d1..d77e246c31 100644 --- a/lib/services/entitySearch/lib/models/index.d.ts +++ b/lib/services/entitySearch/lib/models/index.d.ts @@ -1,675 +1,467 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import * as moment from "moment"; - /** - * @class - * Initializes a new instance of the QueryContext class. - * @constructor * Defines the query context that Bing used for the request. - * - * @member {string} originalQuery The query string as specified in the request. - * @member {string} [alteredQuery] The query string used by Bing to perform the - * query. Bing uses the altered query string if the original query string - * contained spelling mistakes. For example, if the query string is "saling - * downwind", the altered query string will be "sailing downwind". This field - * is included only if the original query string contains a spelling mistake. - * @member {string} [alterationOverrideQuery] The query string to use to force - * Bing to use the original string. For example, if the query string is "saling - * downwind", the override query string will be "+saling downwind". Remember to - * encode the query string which results in "%2Bsaling+downwind". This field is - * included only if the original query string contains a spelling mistake. - * @member {boolean} [adultIntent] A Boolean value that indicates whether the - * specified query has adult intent. The value is true if the query has adult - * intent; otherwise, false. - * @member {boolean} [askUserForLocation] A Boolean value that indicates - * whether Bing requires the user's location to provide accurate results. If - * you specified the user's location by using the X-MSEdge-ClientIP and - * X-Search-Location headers, you can ignore this field. For location aware - * queries, such as "today's weather" or "restaurants near me" that need the - * user's location to provide accurate results, this field is set to true. For - * location aware queries that include the location (for example, "Seattle - * weather"), this field is set to false. This field is also set to false for - * queries that are not location aware, such as "best sellers". */ export interface QueryContext { + /** + * The query string as specified in the request. + */ originalQuery: string; + /** + * The query string used by Bing to perform the query. Bing uses the altered query string if the + * original query string contained spelling mistakes. For example, if the query string is "saling + * downwind", the altered query string will be "sailing downwind". This field is included only if + * the original query string contains a spelling mistake. + */ readonly alteredQuery?: string; + /** + * The query string to use to force Bing to use the original string. For example, if the query + * string is "saling downwind", the override query string will be "+saling downwind". Remember to + * encode the query string which results in "%2Bsaling+downwind". This field is included only if + * the original query string contains a spelling mistake. + */ readonly alterationOverrideQuery?: string; + /** + * A Boolean value that indicates whether the specified query has adult intent. The value is true + * if the query has adult intent; otherwise, false. + */ readonly adultIntent?: boolean; + /** + * A Boolean value that indicates whether Bing requires the user's location to provide accurate + * results. If you specified the user's location by using the X-MSEdge-ClientIP and + * X-Search-Location headers, you can ignore this field. For location aware queries, such as + * "today's weather" or "restaurants near me" that need the user's location to provide accurate + * results, this field is set to true. For location aware queries that include the location (for + * example, "Seattle weather"), this field is set to false. This field is also set to false for + * queries that are not location aware, such as "best sellers". + */ readonly askUserForLocation?: boolean; } -/** - * @class - * Initializes a new instance of the ResponseBase class. - * @constructor - * @member {string} _type Polymorphic Discriminator - */ export interface ResponseBase { + /** + * Polymorphic Discriminator + */ _type: string; } /** - * @class - * Initializes a new instance of the Identifiable class. - * @constructor * Defines the identity of a resource. - * - * @member {string} [id] A String identifier. - */ +*/ export interface Identifiable extends ResponseBase { + /** + * A String identifier. + */ readonly id?: string; } /** - * @class - * Initializes a new instance of the Response class. - * @constructor - * Defines a response. All schemas that could be returned at the root of a - * response should inherit from this - * - * @member {array} [contractualRules] A list of rules that you must adhere to - * if you display the item. - * @member {string} [webSearchUrl] The URL To Bing's search result for this - * item. - */ + * Defines a response. All schemas that could be returned at the root of a response should inherit + * from this +*/ export interface Response extends Identifiable { + /** + * A list of rules that you must adhere to if you display the item. + */ readonly contractualRules?: ContractualRulesContractualRule[]; + /** + * The URL To Bing's search result for this item. + */ readonly webSearchUrl?: string; } -/** - * @class - * Initializes a new instance of the Thing class. - * @constructor - * @member {string} [name] The name of the thing represented by this object. - * @member {string} [url] The URL to get more information about the thing - * represented by this object. - * @member {object} [image] - * @member {object} [image.thumbnail] The URL to a thumbnail of the image - * @member {string} [description] A short description of the item. - * @member {object} [entityPresentationInfo] Additional information about the - * entity such as hints that you can use to determine the entity's type. To - * determine the entity's type, use the entityScenario and entityTypeHint - * fields. - * @member {string} [entityPresentationInfo.entityScenario] The supported - * scenario. Possible values include: 'DominantEntity', 'DisambiguationItem', - * 'ListItem' - * @member {array} [entityPresentationInfo.entityTypeHints] A list of hints - * that indicate the entity's type. The list could contain a single hint such - * as Movie or a list of hints such as Place, LocalBusiness, Restaurant. Each - * successive hint in the array narrows the entity's type. - * @member {string} [entityPresentationInfo.entityTypeDisplayHint] A display - * version of the entity hint. For example, if entityTypeHints is Artist, this - * field may be set to American Singer. - * @member {string} [bingId] An ID that uniquely identifies this item. - */ export interface Thing extends Response { + /** + * The name of the thing represented by this object. + */ readonly name?: string; + /** + * The URL to get more information about the thing represented by this object. + */ readonly url?: string; readonly image?: ImageObject; + /** + * A short description of the item. + */ readonly description?: string; + /** + * Additional information about the entity such as hints that you can use to determine the + * entity's type. To determine the entity's type, use the entityScenario and entityTypeHint + * fields. + */ readonly entityPresentationInfo?: EntitiesEntityPresentationInfo; + /** + * An ID that uniquely identifies this item. + */ readonly bingId?: string; } -/** - * @class - * Initializes a new instance of the CreativeWork class. - * @constructor - * @member {string} [thumbnailUrl] The URL to a thumbnail of the item. - * @member {array} [provider] The source of the creative work. - * @member {string} [text] - */ export interface CreativeWork extends Thing { + /** + * The URL to a thumbnail of the item. + */ readonly thumbnailUrl?: string; + /** + * The source of the creative work. + */ readonly provider?: Thing[]; readonly text?: string; } -/** - * @class - * Initializes a new instance of the MediaObject class. - * @constructor - * @member {string} [contentUrl] Original URL to retrieve the source (file) for - * the media object (e.g the source URL for the image). - * @member {string} [hostPageUrl] URL of the page that hosts the media object. - * @member {number} [width] The width of the source media object, in pixels. - * @member {number} [height] The height of the source media object, in pixels. - */ export interface MediaObject extends CreativeWork { + /** + * Original URL to retrieve the source (file) for the media object (e.g the source URL for the + * image). + */ readonly contentUrl?: string; + /** + * URL of the page that hosts the media object. + */ readonly hostPageUrl?: string; + /** + * The width of the source media object, in pixels. + */ readonly width?: number; + /** + * The height of the source media object, in pixels. + */ readonly height?: number; } /** - * @class - * Initializes a new instance of the ImageObject class. - * @constructor * Defines an image - * - * @member {object} [thumbnail] The URL to a thumbnail of the image - */ +*/ export interface ImageObject extends MediaObject { + /** + * The URL to a thumbnail of the image + */ readonly thumbnail?: ImageObject; } /** - * @class - * Initializes a new instance of the EntitiesEntityPresentationInfo class. - * @constructor * Defines additional information about an entity such as type hints. - * - * @member {string} entityScenario The supported scenario. Possible values - * include: 'DominantEntity', 'DisambiguationItem', 'ListItem'. Default value: - * 'DominantEntity' . - * @member {array} [entityTypeHints] A list of hints that indicate the entity's - * type. The list could contain a single hint such as Movie or a list of hints - * such as Place, LocalBusiness, Restaurant. Each successive hint in the array - * narrows the entity's type. - * @member {string} [entityTypeDisplayHint] A display version of the entity - * hint. For example, if entityTypeHints is Artist, this field may be set to - * American Singer. - */ +*/ export interface EntitiesEntityPresentationInfo { + /** + * The supported scenario. Possible values include: 'DominantEntity', 'DisambiguationItem', + * 'ListItem' + */ entityScenario: string; + /** + * A list of hints that indicate the entity's type. The list could contain a single hint such as + * Movie or a list of hints such as Place, LocalBusiness, Restaurant. Each successive hint in the + * array narrows the entity's type. + */ readonly entityTypeHints?: string[]; + /** + * A display version of the entity hint. For example, if entityTypeHints is Artist, this field + * may be set to American Singer. + */ readonly entityTypeDisplayHint?: string; } -/** - * @class - * Initializes a new instance of the Answer class. - * @constructor - */ export interface Answer extends Response { } -/** - * @class - * Initializes a new instance of the SearchResultsAnswer class. - * @constructor - * @member {object} [queryContext] - * @member {string} [queryContext.originalQuery] The query string as specified - * in the request. - * @member {string} [queryContext.alteredQuery] The query string used by Bing - * to perform the query. Bing uses the altered query string if the original - * query string contained spelling mistakes. For example, if the query string - * is "saling downwind", the altered query string will be "sailing downwind". - * This field is included only if the original query string contains a spelling - * mistake. - * @member {string} [queryContext.alterationOverrideQuery] The query string to - * use to force Bing to use the original string. For example, if the query - * string is "saling downwind", the override query string will be "+saling - * downwind". Remember to encode the query string which results in - * "%2Bsaling+downwind". This field is included only if the original query - * string contains a spelling mistake. - * @member {boolean} [queryContext.adultIntent] A Boolean value that indicates - * whether the specified query has adult intent. The value is true if the query - * has adult intent; otherwise, false. - * @member {boolean} [queryContext.askUserForLocation] A Boolean value that - * indicates whether Bing requires the user's location to provide accurate - * results. If you specified the user's location by using the X-MSEdge-ClientIP - * and X-Search-Location headers, you can ignore this field. For location aware - * queries, such as "today's weather" or "restaurants near me" that need the - * user's location to provide accurate results, this field is set to true. For - * location aware queries that include the location (for example, "Seattle - * weather"), this field is set to false. This field is also set to false for - * queries that are not location aware, such as "best sellers". - */ export interface SearchResultsAnswer extends Answer { readonly queryContext?: QueryContext; } /** - * @class - * Initializes a new instance of the Entities class. - * @constructor * Defines an entity answer. - * - * @member {string} [queryScenario] The supported query scenario. This field is - * set to DominantEntity or DisambiguationItem. The field is set to - * DominantEntity if Bing determines that only a single entity satisfies the - * request. For example, a book, movie, person, or attraction. If multiple - * entities could satisfy the request, the field is set to DisambiguationItem. - * For example, if the request uses the generic title of a movie franchise, the - * entity's type would likely be DisambiguationItem. But, if the request - * specifies a specific title from the franchise, the entity's type would - * likely be DominantEntity. Possible values include: 'DominantEntity', - * 'DominantEntityWithDisambiguation', 'Disambiguation', 'List', - * 'ListWithPivot'. Default value: 'DominantEntity' . - * @member {array} value A list of entities. - */ +*/ export interface Entities extends SearchResultsAnswer { + /** + * The supported query scenario. This field is set to DominantEntity or DisambiguationItem. The + * field is set to DominantEntity if Bing determines that only a single entity satisfies the + * request. For example, a book, movie, person, or attraction. If multiple entities could satisfy + * the request, the field is set to DisambiguationItem. For example, if the request uses the + * generic title of a movie franchise, the entity's type would likely be DisambiguationItem. But, + * if the request specifies a specific title from the franchise, the entity's type would likely + * be DominantEntity. Possible values include: 'DominantEntity', + * 'DominantEntityWithDisambiguation', 'Disambiguation', 'List', 'ListWithPivot' + */ readonly queryScenario?: string; + /** + * A list of entities. + */ value: Thing[]; } /** - * @class - * Initializes a new instance of the Places class. - * @constructor * Defines a local entity answer. - * - * @member {array} value A list of local entities, such as restaurants or - * hotels. - */ +*/ export interface Places extends SearchResultsAnswer { + /** + * A list of local entities, such as restaurants or hotels. + */ value: Thing[]; } /** - * @class - * Initializes a new instance of the SearchResponse class. - * @constructor - * Defines the top-level object that the response includes when the request - * succeeds. - * - * @member {object} [queryContext] An object that contains the query string - * that Bing used for the request. This object contains the query string as - * entered by the user. It may also contain an altered query string that Bing - * used for the query if the query string contained a spelling mistake. - * @member {string} [queryContext.originalQuery] The query string as specified - * in the request. - * @member {string} [queryContext.alteredQuery] The query string used by Bing - * to perform the query. Bing uses the altered query string if the original - * query string contained spelling mistakes. For example, if the query string - * is "saling downwind", the altered query string will be "sailing downwind". - * This field is included only if the original query string contains a spelling - * mistake. - * @member {string} [queryContext.alterationOverrideQuery] The query string to - * use to force Bing to use the original string. For example, if the query - * string is "saling downwind", the override query string will be "+saling - * downwind". Remember to encode the query string which results in - * "%2Bsaling+downwind". This field is included only if the original query - * string contains a spelling mistake. - * @member {boolean} [queryContext.adultIntent] A Boolean value that indicates - * whether the specified query has adult intent. The value is true if the query - * has adult intent; otherwise, false. - * @member {boolean} [queryContext.askUserForLocation] A Boolean value that - * indicates whether Bing requires the user's location to provide accurate - * results. If you specified the user's location by using the X-MSEdge-ClientIP - * and X-Search-Location headers, you can ignore this field. For location aware - * queries, such as "today's weather" or "restaurants near me" that need the - * user's location to provide accurate results, this field is set to true. For - * location aware queries that include the location (for example, "Seattle - * weather"), this field is set to false. This field is also set to false for - * queries that are not location aware, such as "best sellers". - * @member {object} [entities] A list of entities that are relevant to the - * search query. - * @member {string} [entities.queryScenario] The supported query scenario. This - * field is set to DominantEntity or DisambiguationItem. The field is set to - * DominantEntity if Bing determines that only a single entity satisfies the - * request. For example, a book, movie, person, or attraction. If multiple - * entities could satisfy the request, the field is set to DisambiguationItem. - * For example, if the request uses the generic title of a movie franchise, the - * entity's type would likely be DisambiguationItem. But, if the request - * specifies a specific title from the franchise, the entity's type would - * likely be DominantEntity. Possible values include: 'DominantEntity', - * 'DominantEntityWithDisambiguation', 'Disambiguation', 'List', - * 'ListWithPivot' - * @member {array} [entities.value] A list of entities. - * @member {object} [places] A list of local entities such as restaurants or - * hotels that are relevant to the query. - * @member {array} [places.value] A list of local entities, such as restaurants - * or hotels. - */ + * Defines the top-level object that the response includes when the request succeeds. +*/ export interface SearchResponse extends Response { + /** + * An object that contains the query string that Bing used for the request. This object contains + * the query string as entered by the user. It may also contain an altered query string that Bing + * used for the query if the query string contained a spelling mistake. + */ readonly queryContext?: QueryContext; + /** + * A list of entities that are relevant to the search query. + */ readonly entities?: Entities; + /** + * A list of local entities such as restaurants or hotels that are relevant to the query. + */ readonly places?: Places; } -/** - * @class - * Initializes a new instance of the ContractualRulesContractualRule class. - * @constructor - * @member {string} [targetPropertyName] The name of the field that the rule - * applies to. - * @member {string} _type Polymorphic Discriminator - */ export interface ContractualRulesContractualRule { + /** + * The name of the field that the rule applies to. + */ readonly targetPropertyName?: string; + /** + * Polymorphic Discriminator + */ _type: string; } /** - * @class - * Initializes a new instance of the ErrorModel class. - * @constructor * Defines the error that occurred. - * - * @member {string} code The error code that identifies the category of error. - * Possible values include: 'None', 'ServerError', 'InvalidRequest', - * 'RateLimitExceeded', 'InvalidAuthorization', 'InsufficientAuthorization'. - * Default value: 'None' . - * @member {string} [subCode] The error code that further helps to identify the - * error. Possible values include: 'UnexpectedError', 'ResourceError', - * 'NotImplemented', 'ParameterMissing', 'ParameterInvalidValue', - * 'HttpNotAllowed', 'Blocked', 'AuthorizationMissing', - * 'AuthorizationRedundancy', 'AuthorizationDisabled', 'AuthorizationExpired' - * @member {string} message A description of the error. - * @member {string} [moreDetails] A description that provides additional - * information about the error. - * @member {string} [parameter] The parameter in the request that caused the - * error. - * @member {string} [value] The parameter's value in the request that was not - * valid. - */ +*/ export interface ErrorModel { + /** + * The error code that identifies the category of error. Possible values include: 'None', + * 'ServerError', 'InvalidRequest', 'RateLimitExceeded', 'InvalidAuthorization', + * 'InsufficientAuthorization' + */ code: string; + /** + * The error code that further helps to identify the error. Possible values include: + * 'UnexpectedError', 'ResourceError', 'NotImplemented', 'ParameterMissing', + * 'ParameterInvalidValue', 'HttpNotAllowed', 'Blocked', 'AuthorizationMissing', + * 'AuthorizationRedundancy', 'AuthorizationDisabled', 'AuthorizationExpired' + */ readonly subCode?: string; + /** + * A description of the error. + */ message: string; + /** + * A description that provides additional information about the error. + */ readonly moreDetails?: string; + /** + * The parameter in the request that caused the error. + */ readonly parameter?: string; + /** + * The parameter's value in the request that was not valid. + */ readonly value?: string; } /** - * @class - * Initializes a new instance of the ErrorResponse class. - * @constructor * The top-level response that represents a failed request. - * - * @member {array} errors A list of errors that describe the reasons why the - * request failed. - */ +*/ export interface ErrorResponse extends Response { + /** + * A list of errors that describe the reasons why the request failed. + */ errors: ErrorModel[]; } -/** - * @class - * Initializes a new instance of the Intangible class. - * @constructor - */ export interface Intangible extends Thing { } -/** - * @class - * Initializes a new instance of the StructuredValue class. - * @constructor - */ export interface StructuredValue extends Intangible { } /** - * @class - * Initializes a new instance of the PostalAddress class. - * @constructor * Defines a postal address. - * - * @member {string} [streetAddress] - * @member {string} [addressLocality] The city where the street address is - * located. For example, Seattle. - * @member {string} [addressSubregion] - * @member {string} [addressRegion] The state or province code where the street - * address is located. This could be the two-letter code. For example, WA, or - * the full name , Washington. - * @member {string} [postalCode] The zip code or postal code where the street - * address is located. For example, 98052. - * @member {string} [postOfficeBoxNumber] - * @member {string} [addressCountry] The country/region where the street - * address is located. This could be the two-letter ISO code. For example, US, - * or the full name, United States. - * @member {string} [countryIso] The two letter ISO code of this countr. For - * example, US. - * @member {string} [neighborhood] The neighborhood where the street address is - * located. For example, Westlake. - * @member {string} [addressRegionAbbreviation] Region Abbreviation. For - * example, WA. - * @member {string} [text] The complete address. For example, 2100 Westlake Ave - * N, Bellevue, WA 98052. - */ +*/ export interface PostalAddress extends StructuredValue { readonly streetAddress?: string; + /** + * The city where the street address is located. For example, Seattle. + */ readonly addressLocality?: string; readonly addressSubregion?: string; + /** + * The state or province code where the street address is located. This could be the two-letter + * code. For example, WA, or the full name , Washington. + */ readonly addressRegion?: string; + /** + * The zip code or postal code where the street address is located. For example, 98052. + */ readonly postalCode?: string; readonly postOfficeBoxNumber?: string; + /** + * The country/region where the street address is located. This could be the two-letter ISO code. + * For example, US, or the full name, United States. + */ readonly addressCountry?: string; + /** + * The two letter ISO code of this country. For example, US. + */ readonly countryIso?: string; + /** + * The neighborhood where the street address is located. For example, Westlake. + */ readonly neighborhood?: string; + /** + * Region Abbreviation. For example, WA. + */ readonly addressRegionAbbreviation?: string; + /** + * The complete address. For example, 2100 Westlake Ave N, Bellevue, WA 98052. + */ readonly text?: string; } /** - * @class - * Initializes a new instance of the Place class. - * @constructor * Defines information about a local entity, such as a restaurant or hotel. - * - * @member {object} [address] The postal address of where the entity is located - * @member {string} [address.streetAddress] - * @member {string} [address.addressLocality] The city where the street address - * is located. For example, Seattle. - * @member {string} [address.addressSubregion] - * @member {string} [address.addressRegion] The state or province code where - * the street address is located. This could be the two-letter code. For - * example, WA, or the full name , Washington. - * @member {string} [address.postalCode] The zip code or postal code where the - * street address is located. For example, 98052. - * @member {string} [address.postOfficeBoxNumber] - * @member {string} [address.addressCountry] The country/region where the - * street address is located. This could be the two-letter ISO code. For - * example, US, or the full name, United States. - * @member {string} [address.countryIso] The two letter ISO code of this - * countr. For example, US. - * @member {string} [address.neighborhood] The neighborhood where the street - * address is located. For example, Westlake. - * @member {string} [address.addressRegionAbbreviation] Region Abbreviation. - * For example, WA. - * @member {string} [address.text] The complete address. For example, 2100 - * Westlake Ave N, Bellevue, WA 98052. - * @member {string} [telephone] The entity's telephone number - */ +*/ export interface Place extends Thing { + /** + * The postal address of where the entity is located + */ readonly address?: PostalAddress; + /** + * The entity's telephone number + */ readonly telephone?: string; } /** - * @class - * Initializes a new instance of the Organization class. - * @constructor * Defines an organization. - * - */ +*/ export interface Organization extends Thing { } -/** - * @class - * Initializes a new instance of the LocalBusiness class. - * @constructor - * @member {string} [priceRange] $$. - * @member {array} [panoramas] - * @member {boolean} [isPermanentlyClosed] - * @member {string} [tagLine] - */ export interface LocalBusiness extends Place { + /** + * $$. + */ readonly priceRange?: string; readonly panoramas?: ImageObject[]; readonly isPermanentlyClosed?: boolean; readonly tagLine?: string; } -/** - * @class - * Initializes a new instance of the EntertainmentBusiness class. - * @constructor - */ export interface EntertainmentBusiness extends LocalBusiness { } -/** - * @class - * Initializes a new instance of the MovieTheater class. - * @constructor - * @member {number} [screenCount] - */ export interface MovieTheater extends EntertainmentBusiness { readonly screenCount?: number; } -/** - * @class - * Initializes a new instance of the ContractualRulesAttribution class. - * @constructor - * @member {boolean} [mustBeCloseToContent] A Boolean value that determines - * whether the contents of the rule must be placed in close proximity to the - * field that the rule applies to. If true, the contents must be placed in - * close proximity. If false, or this field does not exist, the contents may be - * placed at the caller's discretion. - */ export interface ContractualRulesAttribution extends ContractualRulesContractualRule { + /** + * A Boolean value that determines whether the contents of the rule must be placed in close + * proximity to the field that the rule applies to. If true, the contents must be placed in close + * proximity. If false, or this field does not exist, the contents may be placed at the caller's + * discretion. + */ readonly mustBeCloseToContent?: boolean; } -/** - * @class - * Initializes a new instance of the CivicStructure class. - * @constructor - */ export interface CivicStructure extends Place { } -/** - * @class - * Initializes a new instance of the TouristAttraction class. - * @constructor - */ export interface TouristAttraction extends Place { } -/** - * @class - * Initializes a new instance of the Airport class. - * @constructor - * @member {string} [iataCode] - * @member {string} [icaoCode] - */ export interface Airport extends CivicStructure { readonly iataCode?: string; readonly icaoCode?: string; } /** - * @class - * Initializes a new instance of the License class. - * @constructor * Defines the license under which the text or photo may be used. - * - */ +*/ export interface License extends CreativeWork { } /** - * @class - * Initializes a new instance of the ContractualRulesLicenseAttribution class. - * @constructor * Defines a contractual rule for license attribution. - * - * @member {object} [license] The license under which the content may be used. - * @member {string} [licenseNotice] The license to display next to the targeted - * field. - */ +*/ export interface ContractualRulesLicenseAttribution extends ContractualRulesAttribution { + /** + * The license under which the content may be used. + */ readonly license?: License; + /** + * The license to display next to the targeted field. + */ readonly licenseNotice?: string; } /** - * @class - * Initializes a new instance of the ContractualRulesLinkAttribution class. - * @constructor * Defines a contractual rule for link attribution. - * - * @member {string} text The attribution text. - * @member {string} url The URL to the provider's website. Use text and URL to - * create the hyperlink. - * @member {boolean} [optionalForListDisplay] Indicates whether this provider's - * attribution is optional. - */ +*/ export interface ContractualRulesLinkAttribution extends ContractualRulesAttribution { + /** + * The attribution text. + */ text: string; + /** + * The URL to the provider's website. Use text and URL to create the hyperlink. + */ url: string; + /** + * Indicates whether this provider's attribution is optional. + */ readonly optionalForListDisplay?: boolean; } /** - * @class - * Initializes a new instance of the ContractualRulesMediaAttribution class. - * @constructor * Defines a contractual rule for media attribution. - * - * @member {string} [url] The URL that you use to create of hyperlink of the - * media content. For example, if the target is an image, you would use the URL - * to make the image clickable. - */ +*/ export interface ContractualRulesMediaAttribution extends ContractualRulesAttribution { + /** + * The URL that you use to create of hyperlink of the media content. For example, if the target + * is an image, you would use the URL to make the image clickable. + */ readonly url?: string; } /** - * @class - * Initializes a new instance of the ContractualRulesTextAttribution class. - * @constructor * Defines a contractual rule for text attribution. - * - * @member {string} text The attribution text. Text attribution applies to the - * entity as a whole and should be displayed immediately following the entity - * presentation. If there are multiple text or link attribution rules that do - * not specify a target, you should concatenate them and display them using a - * "Data from:" label. - * @member {boolean} [optionalForListDisplay] Indicates whether this provider's - * attribution is optional. - */ +*/ export interface ContractualRulesTextAttribution extends ContractualRulesAttribution { + /** + * The attribution text. Text attribution applies to the entity as a whole and should be + * displayed immediately following the entity presentation. If there are multiple text or link + * attribution rules that do not specify a target, you should concatenate them and display them + * using a "Data from:" label. + */ text: string; + /** + * Indicates whether this provider's attribution is optional. + */ readonly optionalForListDisplay?: boolean; } -/** - * @class - * Initializes a new instance of the FoodEstablishment class. - * @constructor - */ export interface FoodEstablishment extends LocalBusiness { } -/** - * @class - * Initializes a new instance of the LodgingBusiness class. - * @constructor - */ export interface LodgingBusiness extends LocalBusiness { } -/** - * @class - * Initializes a new instance of the Restaurant class. - * @constructor - * @member {boolean} [acceptsReservations] - * @member {string} [reservationUrl] - * @member {array} [servesCuisine] - * @member {string} [menuUrl] - */ export interface Restaurant extends FoodEstablishment { readonly acceptsReservations?: boolean; readonly reservationUrl?: string; @@ -677,13 +469,6 @@ export interface Restaurant extends FoodEstablishment { readonly menuUrl?: string; } -/** - * @class - * Initializes a new instance of the Hotel class. - * @constructor - * @member {string} [hotelClass] - * @member {array} [amenities] - */ export interface Hotel extends LodgingBusiness { readonly hotelClass?: string; readonly amenities?: string[]; diff --git a/lib/services/entitySearch/lib/models/localBusiness.js b/lib/services/entitySearch/lib/models/localBusiness.js index e6c21dba1b..3d9b48c5d4 100644 --- a/lib/services/entitySearch/lib/models/localBusiness.js +++ b/lib/services/entitySearch/lib/models/localBusiness.js @@ -19,10 +19,10 @@ const models = require('./index'); class LocalBusiness extends models['Place'] { /** * Create a LocalBusiness. - * @member {string} [priceRange] $$. - * @member {array} [panoramas] - * @member {boolean} [isPermanentlyClosed] - * @member {string} [tagLine] + * @property {string} [priceRange] $$. + * @property {array} [panoramas] + * @property {boolean} [isPermanentlyClosed] + * @property {string} [tagLine] */ constructor() { super(); diff --git a/lib/services/entitySearch/lib/models/mediaObject.js b/lib/services/entitySearch/lib/models/mediaObject.js index c3197f38bc..4207094f95 100644 --- a/lib/services/entitySearch/lib/models/mediaObject.js +++ b/lib/services/entitySearch/lib/models/mediaObject.js @@ -19,12 +19,13 @@ const models = require('./index'); class MediaObject extends models['CreativeWork'] { /** * Create a MediaObject. - * @member {string} [contentUrl] Original URL to retrieve the source (file) + * @property {string} [contentUrl] Original URL to retrieve the source (file) * for the media object (e.g the source URL for the image). - * @member {string} [hostPageUrl] URL of the page that hosts the media + * @property {string} [hostPageUrl] URL of the page that hosts the media * object. - * @member {number} [width] The width of the source media object, in pixels. - * @member {number} [height] The height of the source media object, in + * @property {number} [width] The width of the source media object, in + * pixels. + * @property {number} [height] The height of the source media object, in * pixels. */ constructor() { diff --git a/lib/services/entitySearch/lib/models/movieTheater.js b/lib/services/entitySearch/lib/models/movieTheater.js index e87a7b2458..3a0e9838d4 100644 --- a/lib/services/entitySearch/lib/models/movieTheater.js +++ b/lib/services/entitySearch/lib/models/movieTheater.js @@ -19,7 +19,7 @@ const models = require('./index'); class MovieTheater extends models['EntertainmentBusiness'] { /** * Create a MovieTheater. - * @member {number} [screenCount] + * @property {number} [screenCount] */ constructor() { super(); diff --git a/lib/services/entitySearch/lib/models/place.js b/lib/services/entitySearch/lib/models/place.js index f0764f74fc..800b969ec1 100644 --- a/lib/services/entitySearch/lib/models/place.js +++ b/lib/services/entitySearch/lib/models/place.js @@ -20,30 +20,30 @@ const models = require('./index'); class Place extends models['Thing'] { /** * Create a Place. - * @member {object} [address] The postal address of where the entity is + * @property {object} [address] The postal address of where the entity is * located - * @member {string} [address.streetAddress] - * @member {string} [address.addressLocality] The city where the street + * @property {string} [address.streetAddress] + * @property {string} [address.addressLocality] The city where the street * address is located. For example, Seattle. - * @member {string} [address.addressSubregion] - * @member {string} [address.addressRegion] The state or province code where - * the street address is located. This could be the two-letter code. For - * example, WA, or the full name , Washington. - * @member {string} [address.postalCode] The zip code or postal code where + * @property {string} [address.addressSubregion] + * @property {string} [address.addressRegion] The state or province code + * where the street address is located. This could be the two-letter code. + * For example, WA, or the full name , Washington. + * @property {string} [address.postalCode] The zip code or postal code where * the street address is located. For example, 98052. - * @member {string} [address.postOfficeBoxNumber] - * @member {string} [address.addressCountry] The country/region where the + * @property {string} [address.postOfficeBoxNumber] + * @property {string} [address.addressCountry] The country/region where the * street address is located. This could be the two-letter ISO code. For * example, US, or the full name, United States. - * @member {string} [address.countryIso] The two letter ISO code of this - * countr. For example, US. - * @member {string} [address.neighborhood] The neighborhood where the street - * address is located. For example, Westlake. - * @member {string} [address.addressRegionAbbreviation] Region Abbreviation. - * For example, WA. - * @member {string} [address.text] The complete address. For example, 2100 + * @property {string} [address.countryIso] The two letter ISO code of this + * country. For example, US. + * @property {string} [address.neighborhood] The neighborhood where the + * street address is located. For example, Westlake. + * @property {string} [address.addressRegionAbbreviation] Region + * Abbreviation. For example, WA. + * @property {string} [address.text] The complete address. For example, 2100 * Westlake Ave N, Bellevue, WA 98052. - * @member {string} [telephone] The entity's telephone number + * @property {string} [telephone] The entity's telephone number */ constructor() { super(); diff --git a/lib/services/entitySearch/lib/models/places.js b/lib/services/entitySearch/lib/models/places.js index 183d961056..0dd672a45b 100644 --- a/lib/services/entitySearch/lib/models/places.js +++ b/lib/services/entitySearch/lib/models/places.js @@ -20,7 +20,7 @@ const models = require('./index'); class Places extends models['SearchResultsAnswer'] { /** * Create a Places. - * @member {array} value A list of local entities, such as restaurants or + * @property {array} value A list of local entities, such as restaurants or * hotels. */ constructor() { diff --git a/lib/services/entitySearch/lib/models/postalAddress.js b/lib/services/entitySearch/lib/models/postalAddress.js index 5f8992679b..02c501ee1b 100644 --- a/lib/services/entitySearch/lib/models/postalAddress.js +++ b/lib/services/entitySearch/lib/models/postalAddress.js @@ -20,26 +20,26 @@ const models = require('./index'); class PostalAddress extends models['StructuredValue'] { /** * Create a PostalAddress. - * @member {string} [streetAddress] - * @member {string} [addressLocality] The city where the street address is + * @property {string} [streetAddress] + * @property {string} [addressLocality] The city where the street address is * located. For example, Seattle. - * @member {string} [addressSubregion] - * @member {string} [addressRegion] The state or province code where the + * @property {string} [addressSubregion] + * @property {string} [addressRegion] The state or province code where the * street address is located. This could be the two-letter code. For example, * WA, or the full name , Washington. - * @member {string} [postalCode] The zip code or postal code where the street - * address is located. For example, 98052. - * @member {string} [postOfficeBoxNumber] - * @member {string} [addressCountry] The country/region where the street + * @property {string} [postalCode] The zip code or postal code where the + * street address is located. For example, 98052. + * @property {string} [postOfficeBoxNumber] + * @property {string} [addressCountry] The country/region where the street * address is located. This could be the two-letter ISO code. For example, * US, or the full name, United States. - * @member {string} [countryIso] The two letter ISO code of this countr. For - * example, US. - * @member {string} [neighborhood] The neighborhood where the street address - * is located. For example, Westlake. - * @member {string} [addressRegionAbbreviation] Region Abbreviation. For + * @property {string} [countryIso] The two letter ISO code of this country. + * For example, US. + * @property {string} [neighborhood] The neighborhood where the street + * address is located. For example, Westlake. + * @property {string} [addressRegionAbbreviation] Region Abbreviation. For * example, WA. - * @member {string} [text] The complete address. For example, 2100 Westlake + * @property {string} [text] The complete address. For example, 2100 Westlake * Ave N, Bellevue, WA 98052. */ constructor() { diff --git a/lib/services/entitySearch/lib/models/queryContext.js b/lib/services/entitySearch/lib/models/queryContext.js index fd7a4ba07c..9cae9ff2d8 100644 --- a/lib/services/entitySearch/lib/models/queryContext.js +++ b/lib/services/entitySearch/lib/models/queryContext.js @@ -17,23 +17,23 @@ class QueryContext { /** * Create a QueryContext. - * @member {string} originalQuery The query string as specified in the + * @property {string} originalQuery The query string as specified in the * request. - * @member {string} [alteredQuery] The query string used by Bing to perform + * @property {string} [alteredQuery] The query string used by Bing to perform * the query. Bing uses the altered query string if the original query string * contained spelling mistakes. For example, if the query string is "saling * downwind", the altered query string will be "sailing downwind". This field * is included only if the original query string contains a spelling mistake. - * @member {string} [alterationOverrideQuery] The query string to use to + * @property {string} [alterationOverrideQuery] The query string to use to * force Bing to use the original string. For example, if the query string is * "saling downwind", the override query string will be "+saling downwind". * Remember to encode the query string which results in "%2Bsaling+downwind". * This field is included only if the original query string contains a * spelling mistake. - * @member {boolean} [adultIntent] A Boolean value that indicates whether the - * specified query has adult intent. The value is true if the query has adult - * intent; otherwise, false. - * @member {boolean} [askUserForLocation] A Boolean value that indicates + * @property {boolean} [adultIntent] A Boolean value that indicates whether + * the specified query has adult intent. The value is true if the query has + * adult intent; otherwise, false. + * @property {boolean} [askUserForLocation] A Boolean value that indicates * whether Bing requires the user's location to provide accurate results. If * you specified the user's location by using the X-MSEdge-ClientIP and * X-Search-Location headers, you can ignore this field. For location aware diff --git a/lib/services/entitySearch/lib/models/response.js b/lib/services/entitySearch/lib/models/response.js index 0fdcd1ba02..78ea913eda 100644 --- a/lib/services/entitySearch/lib/models/response.js +++ b/lib/services/entitySearch/lib/models/response.js @@ -21,9 +21,9 @@ const models = require('./index'); class Response extends models['Identifiable'] { /** * Create a Response. - * @member {array} [contractualRules] A list of rules that you must adhere to - * if you display the item. - * @member {string} [webSearchUrl] The URL To Bing's search result for this + * @property {array} [contractualRules] A list of rules that you must adhere + * to if you display the item. + * @property {string} [webSearchUrl] The URL To Bing's search result for this * item. */ constructor() { diff --git a/lib/services/entitySearch/lib/models/responseBase.js b/lib/services/entitySearch/lib/models/responseBase.js index ffe3d9ee1b..557d5ec790 100644 --- a/lib/services/entitySearch/lib/models/responseBase.js +++ b/lib/services/entitySearch/lib/models/responseBase.js @@ -16,7 +16,7 @@ class ResponseBase { /** * Create a ResponseBase. - * @member {string} _type Polymorphic Discriminator + * @property {string} _type Polymorphic Discriminator */ constructor() { } diff --git a/lib/services/entitySearch/lib/models/restaurant.js b/lib/services/entitySearch/lib/models/restaurant.js index 045f204d56..6dac1dafd9 100644 --- a/lib/services/entitySearch/lib/models/restaurant.js +++ b/lib/services/entitySearch/lib/models/restaurant.js @@ -19,10 +19,10 @@ const models = require('./index'); class Restaurant extends models['FoodEstablishment'] { /** * Create a Restaurant. - * @member {boolean} [acceptsReservations] - * @member {string} [reservationUrl] - * @member {array} [servesCuisine] - * @member {string} [menuUrl] + * @property {boolean} [acceptsReservations] + * @property {string} [reservationUrl] + * @property {array} [servesCuisine] + * @property {string} [menuUrl] */ constructor() { super(); diff --git a/lib/services/entitySearch/lib/models/searchResponse.js b/lib/services/entitySearch/lib/models/searchResponse.js index 93e57b5272..74fbc3bca6 100644 --- a/lib/services/entitySearch/lib/models/searchResponse.js +++ b/lib/services/entitySearch/lib/models/searchResponse.js @@ -21,28 +21,28 @@ const models = require('./index'); class SearchResponse extends models['Response'] { /** * Create a SearchResponse. - * @member {object} [queryContext] An object that contains the query string + * @property {object} [queryContext] An object that contains the query string * that Bing used for the request. This object contains the query string as * entered by the user. It may also contain an altered query string that Bing * used for the query if the query string contained a spelling mistake. - * @member {string} [queryContext.originalQuery] The query string as + * @property {string} [queryContext.originalQuery] The query string as * specified in the request. - * @member {string} [queryContext.alteredQuery] The query string used by Bing - * to perform the query. Bing uses the altered query string if the original - * query string contained spelling mistakes. For example, if the query string - * is "saling downwind", the altered query string will be "sailing downwind". - * This field is included only if the original query string contains a - * spelling mistake. - * @member {string} [queryContext.alterationOverrideQuery] The query string + * @property {string} [queryContext.alteredQuery] The query string used by + * Bing to perform the query. Bing uses the altered query string if the + * original query string contained spelling mistakes. For example, if the + * query string is "saling downwind", the altered query string will be + * "sailing downwind". This field is included only if the original query + * string contains a spelling mistake. + * @property {string} [queryContext.alterationOverrideQuery] The query string * to use to force Bing to use the original string. For example, if the query * string is "saling downwind", the override query string will be "+saling * downwind". Remember to encode the query string which results in * "%2Bsaling+downwind". This field is included only if the original query * string contains a spelling mistake. - * @member {boolean} [queryContext.adultIntent] A Boolean value that + * @property {boolean} [queryContext.adultIntent] A Boolean value that * indicates whether the specified query has adult intent. The value is true * if the query has adult intent; otherwise, false. - * @member {boolean} [queryContext.askUserForLocation] A Boolean value that + * @property {boolean} [queryContext.askUserForLocation] A Boolean value that * indicates whether Bing requires the user's location to provide accurate * results. If you specified the user's location by using the * X-MSEdge-ClientIP and X-Search-Location headers, you can ignore this @@ -52,9 +52,9 @@ class SearchResponse extends models['Response'] { * include the location (for example, "Seattle weather"), this field is set * to false. This field is also set to false for queries that are not * location aware, such as "best sellers". - * @member {object} [entities] A list of entities that are relevant to the + * @property {object} [entities] A list of entities that are relevant to the * search query. - * @member {string} [entities.queryScenario] The supported query scenario. + * @property {string} [entities.queryScenario] The supported query scenario. * This field is set to DominantEntity or DisambiguationItem. The field is * set to DominantEntity if Bing determines that only a single entity * satisfies the request. For example, a book, movie, person, or attraction. @@ -65,10 +65,10 @@ class SearchResponse extends models['Response'] { * entity's type would likely be DominantEntity. Possible values include: * 'DominantEntity', 'DominantEntityWithDisambiguation', 'Disambiguation', * 'List', 'ListWithPivot' - * @member {array} [entities.value] A list of entities. - * @member {object} [places] A list of local entities such as restaurants or - * hotels that are relevant to the query. - * @member {array} [places.value] A list of local entities, such as + * @property {array} [entities.value] A list of entities. + * @property {object} [places] A list of local entities such as restaurants + * or hotels that are relevant to the query. + * @property {array} [places.value] A list of local entities, such as * restaurants or hotels. */ constructor() { diff --git a/lib/services/entitySearch/lib/models/searchResultsAnswer.js b/lib/services/entitySearch/lib/models/searchResultsAnswer.js index 5badad4964..62c91e2aec 100644 --- a/lib/services/entitySearch/lib/models/searchResultsAnswer.js +++ b/lib/services/entitySearch/lib/models/searchResultsAnswer.js @@ -19,25 +19,25 @@ const models = require('./index'); class SearchResultsAnswer extends models['Answer'] { /** * Create a SearchResultsAnswer. - * @member {object} [queryContext] - * @member {string} [queryContext.originalQuery] The query string as + * @property {object} [queryContext] + * @property {string} [queryContext.originalQuery] The query string as * specified in the request. - * @member {string} [queryContext.alteredQuery] The query string used by Bing - * to perform the query. Bing uses the altered query string if the original - * query string contained spelling mistakes. For example, if the query string - * is "saling downwind", the altered query string will be "sailing downwind". - * This field is included only if the original query string contains a - * spelling mistake. - * @member {string} [queryContext.alterationOverrideQuery] The query string + * @property {string} [queryContext.alteredQuery] The query string used by + * Bing to perform the query. Bing uses the altered query string if the + * original query string contained spelling mistakes. For example, if the + * query string is "saling downwind", the altered query string will be + * "sailing downwind". This field is included only if the original query + * string contains a spelling mistake. + * @property {string} [queryContext.alterationOverrideQuery] The query string * to use to force Bing to use the original string. For example, if the query * string is "saling downwind", the override query string will be "+saling * downwind". Remember to encode the query string which results in * "%2Bsaling+downwind". This field is included only if the original query * string contains a spelling mistake. - * @member {boolean} [queryContext.adultIntent] A Boolean value that + * @property {boolean} [queryContext.adultIntent] A Boolean value that * indicates whether the specified query has adult intent. The value is true * if the query has adult intent; otherwise, false. - * @member {boolean} [queryContext.askUserForLocation] A Boolean value that + * @property {boolean} [queryContext.askUserForLocation] A Boolean value that * indicates whether Bing requires the user's location to provide accurate * results. If you specified the user's location by using the * X-MSEdge-ClientIP and X-Search-Location headers, you can ignore this diff --git a/lib/services/entitySearch/lib/models/thing.js b/lib/services/entitySearch/lib/models/thing.js index 406e4c1b5e..44a9a0833a 100644 --- a/lib/services/entitySearch/lib/models/thing.js +++ b/lib/services/entitySearch/lib/models/thing.js @@ -19,27 +19,28 @@ const models = require('./index'); class Thing extends models['Response'] { /** * Create a Thing. - * @member {string} [name] The name of the thing represented by this object. - * @member {string} [url] The URL to get more information about the thing + * @property {string} [name] The name of the thing represented by this + * object. + * @property {string} [url] The URL to get more information about the thing * represented by this object. - * @member {object} [image] - * @member {object} [image.thumbnail] The URL to a thumbnail of the image - * @member {string} [description] A short description of the item. - * @member {object} [entityPresentationInfo] Additional information about the - * entity such as hints that you can use to determine the entity's type. To - * determine the entity's type, use the entityScenario and entityTypeHint + * @property {object} [image] + * @property {object} [image.thumbnail] The URL to a thumbnail of the image + * @property {string} [description] A short description of the item. + * @property {object} [entityPresentationInfo] Additional information about + * the entity such as hints that you can use to determine the entity's type. + * To determine the entity's type, use the entityScenario and entityTypeHint * fields. - * @member {string} [entityPresentationInfo.entityScenario] The supported + * @property {string} [entityPresentationInfo.entityScenario] The supported * scenario. Possible values include: 'DominantEntity', 'DisambiguationItem', * 'ListItem' - * @member {array} [entityPresentationInfo.entityTypeHints] A list of hints + * @property {array} [entityPresentationInfo.entityTypeHints] A list of hints * that indicate the entity's type. The list could contain a single hint such * as Movie or a list of hints such as Place, LocalBusiness, Restaurant. Each * successive hint in the array narrows the entity's type. - * @member {string} [entityPresentationInfo.entityTypeDisplayHint] A display - * version of the entity hint. For example, if entityTypeHints is Artist, - * this field may be set to American Singer. - * @member {string} [bingId] An ID that uniquely identifies this item. + * @property {string} [entityPresentationInfo.entityTypeDisplayHint] A + * display version of the entity hint. For example, if entityTypeHints is + * Artist, this field may be set to American Singer. + * @property {string} [bingId] An ID that uniquely identifies this item. */ constructor() { super(); diff --git a/lib/services/entitySearch/lib/operations/entitiesOperations.js b/lib/services/entitySearch/lib/operations/entitiesOperations.js index 7d00bf3a4a..3214fc167f 100644 --- a/lib/services/entitySearch/lib/operations/entitiesOperations.js +++ b/lib/services/entitySearch/lib/operations/entitiesOperations.js @@ -225,6 +225,9 @@ function _search(query, options, callback) { let xBingApisSDK = 'true'; // Validate try { + if (this.client.endpoint === null || this.client.endpoint === undefined || typeof this.client.endpoint.valueOf() !== 'string') { + throw new Error('this.client.endpoint cannot be null or undefined and it must be of type string.'); + } if (acceptLanguage !== null && acceptLanguage !== undefined && typeof acceptLanguage.valueOf() !== 'string') { throw new Error('acceptLanguage must be of type string.'); } @@ -279,6 +282,7 @@ function _search(query, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'entities'; + requestUrl = requestUrl.replace('{Endpoint}', this.client.endpoint); let queryParameters = []; if (countryCode !== null && countryCode !== undefined) { queryParameters.push('cc=' + encodeURIComponent(countryCode)); @@ -400,7 +404,7 @@ function _search(query, options, callback) { class EntitiesOperations { /** * Create a EntitiesOperations. - * @param {EntitySearchAPIClient} client Reference to the service client. + * @param {EntitySearchClient} client Reference to the service client. */ constructor(client) { this.client = client; diff --git a/lib/services/entitySearch/lib/operations/index.d.ts b/lib/services/entitySearch/lib/operations/index.d.ts index aad73566dd..947cb87f42 100644 --- a/lib/services/entitySearch/lib/operations/index.d.ts +++ b/lib/services/entitySearch/lib/operations/index.d.ts @@ -16,7 +16,7 @@ import * as models from '../models'; * @class * EntitiesOperations * __NOTE__: An instance of this class is automatically created for an - * instance of the EntitySearchAPIClient. + * instance of the EntitySearchClient. */ export interface EntitiesOperations { diff --git a/lib/services/entitySearch/package.json b/lib/services/entitySearch/package.json index da081bf2e1..27154b0ba6 100644 --- a/lib/services/entitySearch/package.json +++ b/lib/services/entitySearch/package.json @@ -1,24 +1,24 @@ { "name": "azure-cognitiveservices-entitysearch", "author": "Microsoft Corporation", - "description": "EntitySearchAPIClient Library with typescript type definitions for node", - "version": "1.2.0", + "description": "EntitySearchClient Library with typescript type definitions for node", + "version": "2.0.0", "dependencies": { - "ms-rest": "^2.3.2" + "ms-rest": "^2.3.3" }, "keywords": [ "node", "azure" ], "license": "MIT", - "main": "./lib/entitySearchAPIClient.js", - "types": "./lib/entitySearchAPIClient.d.ts", - "homepage": "http://github.com/azure/azure-sdk-for-node", + "main": "./lib/entitySearchClient.js", + "types": "./lib/entitySearchClient.d.ts", + "homepage": "https://github.com/azure/azure-sdk-for-node/tree/master/lib/services/entitySearch", "repository": { "type": "git", "url": "https://github.com/azure/azure-sdk-for-node.git" }, "bugs": { - "url": "http://github.com/Azure/azure-sdk-for-node/issues" + "url": "https://github.com/azure/azure-sdk-for-node/issues" } -} \ No newline at end of file +} diff --git a/lib/services/hdInsightManagement/README.md b/lib/services/hdInsightManagement/README.md index 3f1c3b8d46..1b1a6cd1fb 100644 --- a/lib/services/hdInsightManagement/README.md +++ b/lib/services/hdInsightManagement/README.md @@ -3,40 +3,43 @@ uid: azure-arm-hdinsight summary: *content --- -# Microsoft Azure SDK for Node.js - HDInsightManagementClient +**This SDK will be deprecated next year and will be replaced by a new TypeScript-based isomorphic SDK (found at https://github.com/Azure/azure-sdk-for-js) which works on Node.js and browsers.** +## Microsoft Azure SDK for Node.js - HDInsightManagementClient + This project provides a Node.js package for accessing Azure. Right now it supports: - **Node.js version 6.x.x or higher** -## Features +### Features -## How to Install +### How to Install ```bash npm install azure-arm-hdinsight ``` -## How to use +### How to use -### Authentication, client creation and get clusters as an example. +#### Authentication, client creation, and get clusters as an example. ```javascript const msRestAzure = require("ms-rest-azure"); const HDInsightManagementClient = require("azure-arm-hdinsight"); msRestAzure.interactiveLogin().then((creds) => { - const subscriptionId = ""; - const client = new HDInsightManagementClient(creds, subscriptionId); - const resourceGroupName = "testresourceGroupName"; - const clusterName = "testclusterName"; - return client.clusters.get(resourceGroupName, clusterName).then((result) => { - console.log("The result is:"); - console.log(result); - }); + const subscriptionId = ""; + const client = new HDInsightManagementClient(creds, subscriptionId); + const resourceGroupName = "testresourceGroupName"; + const clusterName = "testclusterName"; + + return client.clusters.get(resourceGroupName, clusterName).then((result) => { + console.log("The result is:"); + console.log(result); + }); }).catch((err) => { console.log('An error occurred:'); console.dir(err, {depth: null, colors: true}); }); - -## Related projects +``` +### Related projects - [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node) diff --git a/lib/services/hdInsightManagement/lib/models/application.js b/lib/services/hdInsightManagement/lib/models/application.js index 948e9e9f9f..06c82d894f 100644 --- a/lib/services/hdInsightManagement/lib/models/application.js +++ b/lib/services/hdInsightManagement/lib/models/application.js @@ -20,29 +20,29 @@ const models = require('./index'); class Application extends models['ProxyResource'] { /** * Create a Application. - * @member {string} [etag] The ETag for the application - * @member {object} [tags] The tags for the application. - * @member {object} [properties] The properties of the application. - * @member {object} [properties.computeProfile] The list of roles in the + * @property {string} [etag] The ETag for the application + * @property {object} [tags] The tags for the application. + * @property {object} [properties] The properties of the application. + * @property {object} [properties.computeProfile] The list of roles in the * cluster. - * @member {array} [properties.computeProfile.roles] The list of roles in the - * cluster. - * @member {array} [properties.installScriptActions] The list of install - * script actions. - * @member {array} [properties.uninstallScriptActions] The list of uninstall + * @property {array} [properties.computeProfile.roles] The list of roles in + * the cluster. + * @property {array} [properties.installScriptActions] The list of install * script actions. - * @member {array} [properties.httpsEndpoints] The list of application HTTPS - * endpoints. - * @member {array} [properties.sshEndpoints] The list of application SSH + * @property {array} [properties.uninstallScriptActions] The list of + * uninstall script actions. + * @property {array} [properties.httpsEndpoints] The list of application + * HTTPS endpoints. + * @property {array} [properties.sshEndpoints] The list of application SSH * endpoints. - * @member {string} [properties.provisioningState] The provisioning state of - * the application. - * @member {string} [properties.applicationType] The application type. - * @member {string} [properties.applicationState] The application state. - * @member {array} [properties.errors] The list of errors. - * @member {string} [properties.createdDate] The application create date + * @property {string} [properties.provisioningState] The provisioning state + * of the application. + * @property {string} [properties.applicationType] The application type. + * @property {string} [properties.applicationState] The application state. + * @property {array} [properties.errors] The list of errors. + * @property {string} [properties.createdDate] The application create date * time. - * @member {string} [properties.marketplaceIdentifier] The marketplace + * @property {string} [properties.marketplaceIdentifier] The marketplace * identifier. */ constructor() { diff --git a/lib/services/hdInsightManagement/lib/models/applicationGetEndpoint.js b/lib/services/hdInsightManagement/lib/models/applicationGetEndpoint.js index ae30baa84a..a8aa0d2e43 100644 --- a/lib/services/hdInsightManagement/lib/models/applicationGetEndpoint.js +++ b/lib/services/hdInsightManagement/lib/models/applicationGetEndpoint.js @@ -17,9 +17,9 @@ class ApplicationGetEndpoint { /** * Create a ApplicationGetEndpoint. - * @member {string} [location] The location of the endpoint. - * @member {number} [destinationPort] The destination port to connect to. - * @member {number} [publicPort] The public port to connect to. + * @property {string} [location] The location of the endpoint. + * @property {number} [destinationPort] The destination port to connect to. + * @property {number} [publicPort] The public port to connect to. */ constructor() { } diff --git a/lib/services/hdInsightManagement/lib/models/applicationGetHttpsEndpoint.js b/lib/services/hdInsightManagement/lib/models/applicationGetHttpsEndpoint.js index e70b41fa23..00067f5b26 100644 --- a/lib/services/hdInsightManagement/lib/models/applicationGetHttpsEndpoint.js +++ b/lib/services/hdInsightManagement/lib/models/applicationGetHttpsEndpoint.js @@ -17,11 +17,11 @@ class ApplicationGetHttpsEndpoint { /** * Create a ApplicationGetHttpsEndpoint. - * @member {array} [accessModes] The list of access modes for the + * @property {array} [accessModes] The list of access modes for the * application. - * @member {string} [location] The location of the endpoint. - * @member {number} [destinationPort] The destination port to connect to. - * @member {number} [publicPort] The public port to connect to. + * @property {string} [location] The location of the endpoint. + * @property {number} [destinationPort] The destination port to connect to. + * @property {number} [publicPort] The public port to connect to. */ constructor() { } diff --git a/lib/services/hdInsightManagement/lib/models/applicationListResult.js b/lib/services/hdInsightManagement/lib/models/applicationListResult.js index e2c3aea269..38bcc3d715 100644 --- a/lib/services/hdInsightManagement/lib/models/applicationListResult.js +++ b/lib/services/hdInsightManagement/lib/models/applicationListResult.js @@ -17,8 +17,8 @@ class ApplicationListResult extends Array { /** * Create a ApplicationListResult. - * @member {string} [nextLink] The URL to get the next set of operation list - * results if there are any. + * @property {string} [nextLink] The URL to get the next set of operation + * list results if there are any. */ constructor() { super(); diff --git a/lib/services/hdInsightManagement/lib/models/applicationProperties.js b/lib/services/hdInsightManagement/lib/models/applicationProperties.js index 56a383f31c..3aa6adc45f 100644 --- a/lib/services/hdInsightManagement/lib/models/applicationProperties.js +++ b/lib/services/hdInsightManagement/lib/models/applicationProperties.js @@ -17,20 +17,22 @@ class ApplicationProperties { /** * Create a ApplicationProperties. - * @member {object} [computeProfile] The list of roles in the cluster. - * @member {array} [computeProfile.roles] The list of roles in the cluster. - * @member {array} [installScriptActions] The list of install script actions. - * @member {array} [uninstallScriptActions] The list of uninstall script + * @property {object} [computeProfile] The list of roles in the cluster. + * @property {array} [computeProfile.roles] The list of roles in the cluster. + * @property {array} [installScriptActions] The list of install script * actions. - * @member {array} [httpsEndpoints] The list of application HTTPS endpoints. - * @member {array} [sshEndpoints] The list of application SSH endpoints. - * @member {string} [provisioningState] The provisioning state of the + * @property {array} [uninstallScriptActions] The list of uninstall script + * actions. + * @property {array} [httpsEndpoints] The list of application HTTPS + * endpoints. + * @property {array} [sshEndpoints] The list of application SSH endpoints. + * @property {string} [provisioningState] The provisioning state of the * application. - * @member {string} [applicationType] The application type. - * @member {string} [applicationState] The application state. - * @member {array} [errors] The list of errors. - * @member {string} [createdDate] The application create date time. - * @member {string} [marketplaceIdentifier] The marketplace identifier. + * @property {string} [applicationType] The application type. + * @property {string} [applicationState] The application state. + * @property {array} [errors] The list of errors. + * @property {string} [createdDate] The application create date time. + * @property {string} [marketplaceIdentifier] The marketplace identifier. */ constructor() { } diff --git a/lib/services/hdInsightManagement/lib/models/cluster.js b/lib/services/hdInsightManagement/lib/models/cluster.js index 1729397f80..d79eeba0c8 100644 --- a/lib/services/hdInsightManagement/lib/models/cluster.js +++ b/lib/services/hdInsightManagement/lib/models/cluster.js @@ -20,70 +20,86 @@ const models = require('./index'); class Cluster extends models['TrackedResource'] { /** * Create a Cluster. - * @member {string} [etag] The ETag for the resource - * @member {object} [properties] The properties of the cluster. - * @member {string} [properties.clusterVersion] The version of the cluster. - * @member {string} [properties.osType] The type of operating system. + * @property {string} [etag] The ETag for the resource + * @property {object} [properties] The properties of the cluster. + * @property {string} [properties.clusterVersion] The version of the cluster. + * @property {string} [properties.osType] The type of operating system. * Possible values include: 'Windows', 'Linux' - * @member {string} [properties.tier] The cluster tier. Possible values + * @property {string} [properties.tier] The cluster tier. Possible values * include: 'Standard', 'Premium' - * @member {object} [properties.clusterDefinition] The cluster definition. - * @member {string} [properties.clusterDefinition.blueprint] The link to the - * blueprint. - * @member {string} [properties.clusterDefinition.kind] The type of cluster. - * @member {object} [properties.clusterDefinition.componentVersion] The + * @property {object} [properties.clusterDefinition] The cluster definition. + * @property {string} [properties.clusterDefinition.blueprint] The link to + * the blueprint. + * @property {string} [properties.clusterDefinition.kind] The type of + * cluster. + * @property {object} [properties.clusterDefinition.componentVersion] The * versions of different services in the cluster. - * @member {object} [properties.clusterDefinition.configurations] The cluster - * configurations. - * @member {object} [properties.securityProfile] The security profile. - * @member {string} [properties.securityProfile.directoryType] The directory - * type. Possible values include: 'ActiveDirectory' - * @member {string} [properties.securityProfile.domain] The organization's + * @property {object} [properties.clusterDefinition.configurations] The + * cluster configurations. + * @property {object} [properties.securityProfile] The security profile. + * @property {string} [properties.securityProfile.directoryType] The + * directory type. Possible values include: 'ActiveDirectory' + * @property {string} [properties.securityProfile.domain] The organization's * active directory domain. - * @member {string} [properties.securityProfile.organizationalUnitDN] The + * @property {string} [properties.securityProfile.organizationalUnitDN] The * organizational unit within the Active Directory to place the cluster and * service accounts. - * @member {array} [properties.securityProfile.ldapsUrls] The LDAPS protocol - * URLs to communicate with the Active Directory. - * @member {string} [properties.securityProfile.domainUsername] The domain + * @property {array} [properties.securityProfile.ldapsUrls] The LDAPS + * protocol URLs to communicate with the Active Directory. + * @property {string} [properties.securityProfile.domainUsername] The domain * user account that will have admin privileges on the cluster. - * @member {string} [properties.securityProfile.domainUserPassword] The + * @property {string} [properties.securityProfile.domainUserPassword] The * domain admin password. - * @member {array} [properties.securityProfile.clusterUsersGroupDNs] + * @property {array} [properties.securityProfile.clusterUsersGroupDNs] * Optional. The Distinguished Names for cluster user groups - * @member {string} [properties.securityProfile.aaddsResourceId] The resource - * ID of the user's Azure Active Directory Domain Service. - * @member {string} [properties.securityProfile.msiResourceId] User assigned - * identity that has permissions to read and create cluster-related artifacts - * in the user's AADDS. - * @member {object} [properties.computeProfile] The compute profile. - * @member {array} [properties.computeProfile.roles] The list of roles in the - * cluster. - * @member {string} [properties.provisioningState] The provisioning state, + * @property {string} [properties.securityProfile.aaddsResourceId] The + * resource ID of the user's Azure Active Directory Domain Service. + * @property {string} [properties.securityProfile.msiResourceId] User + * assigned identity that has permissions to read and create cluster-related + * artifacts in the user's AADDS. + * @property {object} [properties.computeProfile] The compute profile. + * @property {array} [properties.computeProfile.roles] The list of roles in + * the cluster. + * @property {string} [properties.provisioningState] The provisioning state, * which only appears in the response. Possible values include: 'InProgress', * 'Failed', 'Succeeded', 'Canceled', 'Deleting' - * @member {string} [properties.createdDate] The date on which the cluster + * @property {string} [properties.createdDate] The date on which the cluster * was created. - * @member {string} [properties.clusterState] The state of the cluster. - * @member {object} [properties.quotaInfo] The quota information. - * @member {number} [properties.quotaInfo.coresUsed] The cores used by the + * @property {string} [properties.clusterState] The state of the cluster. + * @property {object} [properties.quotaInfo] The quota information. + * @property {number} [properties.quotaInfo.coresUsed] The cores used by the * cluster. - * @member {array} [properties.errors] The list of errors. - * @member {array} [properties.connectivityEndpoints] The list of + * @property {array} [properties.errors] The list of errors. + * @property {array} [properties.connectivityEndpoints] The list of * connectivity endpoints. - * @member {object} [identity] The identity of the cluster, if configured. - * @member {string} [identity.principalId] The principal id of cluster + * @property {object} [properties.diskEncryptionProperties] The disk + * encryption properties. + * @property {string} [properties.diskEncryptionProperties.vaultUri] Base key + * vault URI where the customers key is located eg. + * https://myvault.vault.azure.net + * @property {string} [properties.diskEncryptionProperties.keyName] Key name + * that is used for enabling disk encryption. + * @property {string} [properties.diskEncryptionProperties.keyVersion] + * Specific key version that is used for enabling disk encryption. + * @property {string} + * [properties.diskEncryptionProperties.encryptionAlgorithm] Algorithm + * identifier for encryption, default RSA-OAEP. Possible values include: + * 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5' + * @property {string} [properties.diskEncryptionProperties.msiResourceId] + * Resource ID of Managed Identity that is used to access the key vault. + * @property {object} [identity] The identity of the cluster, if configured. + * @property {string} [identity.principalId] The principal id of cluster * identity. This property will only be provided for a system assigned * identity. - * @member {string} [identity.tenantId] The tenant id associated with the + * @property {string} [identity.tenantId] The tenant id associated with the * cluster. This property will only be provided for a system assigned * identity. - * @member {string} [identity.type] The type of identity used for the + * @property {string} [identity.type] The type of identity used for the * cluster. The type 'SystemAssigned, UserAssigned' includes both an * implicitly created identity and a set of user assigned identities. * Possible values include: 'SystemAssigned', 'UserAssigned', * 'SystemAssigned, UserAssigned', 'None' - * @member {object} [identity.userAssignedIdentities] The list of user + * @property {object} [identity.userAssignedIdentities] The list of user * identities associated with the cluster. The user identity dictionary key * references will be ARM resource ids in the form: * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. diff --git a/lib/services/hdInsightManagement/lib/models/clusterCreateParametersExtended.js b/lib/services/hdInsightManagement/lib/models/clusterCreateParametersExtended.js index 107334b35e..5f0185b3ed 100644 --- a/lib/services/hdInsightManagement/lib/models/clusterCreateParametersExtended.js +++ b/lib/services/hdInsightManagement/lib/models/clusterCreateParametersExtended.js @@ -17,62 +17,78 @@ class ClusterCreateParametersExtended { /** * Create a ClusterCreateParametersExtended. - * @member {string} [location] The location of the cluster. - * @member {object} [tags] The resource tags. - * @member {object} [properties] The cluster create parameters. - * @member {string} [properties.clusterVersion] The version of the cluster. - * @member {string} [properties.osType] The type of operating system. + * @property {string} [location] The location of the cluster. + * @property {object} [tags] The resource tags. + * @property {object} [properties] The cluster create parameters. + * @property {string} [properties.clusterVersion] The version of the cluster. + * @property {string} [properties.osType] The type of operating system. * Possible values include: 'Windows', 'Linux' - * @member {string} [properties.tier] The cluster tier. Possible values + * @property {string} [properties.tier] The cluster tier. Possible values * include: 'Standard', 'Premium' - * @member {object} [properties.clusterDefinition] The cluster definition. - * @member {string} [properties.clusterDefinition.blueprint] The link to the - * blueprint. - * @member {string} [properties.clusterDefinition.kind] The type of cluster. - * @member {object} [properties.clusterDefinition.componentVersion] The + * @property {object} [properties.clusterDefinition] The cluster definition. + * @property {string} [properties.clusterDefinition.blueprint] The link to + * the blueprint. + * @property {string} [properties.clusterDefinition.kind] The type of + * cluster. + * @property {object} [properties.clusterDefinition.componentVersion] The * versions of different services in the cluster. - * @member {object} [properties.clusterDefinition.configurations] The cluster - * configurations. - * @member {object} [properties.securityProfile] The security profile. - * @member {string} [properties.securityProfile.directoryType] The directory - * type. Possible values include: 'ActiveDirectory' - * @member {string} [properties.securityProfile.domain] The organization's + * @property {object} [properties.clusterDefinition.configurations] The + * cluster configurations. + * @property {object} [properties.securityProfile] The security profile. + * @property {string} [properties.securityProfile.directoryType] The + * directory type. Possible values include: 'ActiveDirectory' + * @property {string} [properties.securityProfile.domain] The organization's * active directory domain. - * @member {string} [properties.securityProfile.organizationalUnitDN] The + * @property {string} [properties.securityProfile.organizationalUnitDN] The * organizational unit within the Active Directory to place the cluster and * service accounts. - * @member {array} [properties.securityProfile.ldapsUrls] The LDAPS protocol - * URLs to communicate with the Active Directory. - * @member {string} [properties.securityProfile.domainUsername] The domain + * @property {array} [properties.securityProfile.ldapsUrls] The LDAPS + * protocol URLs to communicate with the Active Directory. + * @property {string} [properties.securityProfile.domainUsername] The domain * user account that will have admin privileges on the cluster. - * @member {string} [properties.securityProfile.domainUserPassword] The + * @property {string} [properties.securityProfile.domainUserPassword] The * domain admin password. - * @member {array} [properties.securityProfile.clusterUsersGroupDNs] + * @property {array} [properties.securityProfile.clusterUsersGroupDNs] * Optional. The Distinguished Names for cluster user groups - * @member {string} [properties.securityProfile.aaddsResourceId] The resource - * ID of the user's Azure Active Directory Domain Service. - * @member {string} [properties.securityProfile.msiResourceId] User assigned - * identity that has permissions to read and create cluster-related artifacts - * in the user's AADDS. - * @member {object} [properties.computeProfile] The compute profile. - * @member {array} [properties.computeProfile.roles] The list of roles in the - * cluster. - * @member {object} [properties.storageProfile] The storage profile. - * @member {array} [properties.storageProfile.storageaccounts] The list of + * @property {string} [properties.securityProfile.aaddsResourceId] The + * resource ID of the user's Azure Active Directory Domain Service. + * @property {string} [properties.securityProfile.msiResourceId] User + * assigned identity that has permissions to read and create cluster-related + * artifacts in the user's AADDS. + * @property {object} [properties.computeProfile] The compute profile. + * @property {array} [properties.computeProfile.roles] The list of roles in + * the cluster. + * @property {object} [properties.storageProfile] The storage profile. + * @property {array} [properties.storageProfile.storageaccounts] The list of * storage accounts in the cluster. - * @member {object} [identity] The identity of the cluster, if configured. - * @member {string} [identity.principalId] The principal id of cluster + * @property {object} [properties.diskEncryptionProperties] The disk + * encryption properties. + * @property {string} [properties.diskEncryptionProperties.vaultUri] Base key + * vault URI where the customers key is located eg. + * https://myvault.vault.azure.net + * @property {string} [properties.diskEncryptionProperties.keyName] Key name + * that is used for enabling disk encryption. + * @property {string} [properties.diskEncryptionProperties.keyVersion] + * Specific key version that is used for enabling disk encryption. + * @property {string} + * [properties.diskEncryptionProperties.encryptionAlgorithm] Algorithm + * identifier for encryption, default RSA-OAEP. Possible values include: + * 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5' + * @property {string} [properties.diskEncryptionProperties.msiResourceId] + * Resource ID of Managed Identity that is used to access the key vault. + * @property {object} [identity] The identity of the cluster, if configured. + * @property {string} [identity.principalId] The principal id of cluster * identity. This property will only be provided for a system assigned * identity. - * @member {string} [identity.tenantId] The tenant id associated with the + * @property {string} [identity.tenantId] The tenant id associated with the * cluster. This property will only be provided for a system assigned * identity. - * @member {string} [identity.type] The type of identity used for the + * @property {string} [identity.type] The type of identity used for the * cluster. The type 'SystemAssigned, UserAssigned' includes both an * implicitly created identity and a set of user assigned identities. * Possible values include: 'SystemAssigned', 'UserAssigned', * 'SystemAssigned, UserAssigned', 'None' - * @member {object} [identity.userAssignedIdentities] The list of user + * @property {object} [identity.userAssignedIdentities] The list of user * identities associated with the cluster. The user identity dictionary key * references will be ARM resource ids in the form: * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. diff --git a/lib/services/hdInsightManagement/lib/models/clusterCreateProperties.js b/lib/services/hdInsightManagement/lib/models/clusterCreateProperties.js index 9e4cec42e3..644e35cf4e 100644 --- a/lib/services/hdInsightManagement/lib/models/clusterCreateProperties.js +++ b/lib/services/hdInsightManagement/lib/models/clusterCreateProperties.js @@ -17,44 +17,58 @@ class ClusterCreateProperties { /** * Create a ClusterCreateProperties. - * @member {string} [clusterVersion] The version of the cluster. - * @member {string} [osType] The type of operating system. Possible values + * @property {string} [clusterVersion] The version of the cluster. + * @property {string} [osType] The type of operating system. Possible values * include: 'Windows', 'Linux' - * @member {string} [tier] The cluster tier. Possible values include: + * @property {string} [tier] The cluster tier. Possible values include: * 'Standard', 'Premium' - * @member {object} [clusterDefinition] The cluster definition. - * @member {string} [clusterDefinition.blueprint] The link to the blueprint. - * @member {string} [clusterDefinition.kind] The type of cluster. - * @member {object} [clusterDefinition.componentVersion] The versions of + * @property {object} [clusterDefinition] The cluster definition. + * @property {string} [clusterDefinition.blueprint] The link to the + * blueprint. + * @property {string} [clusterDefinition.kind] The type of cluster. + * @property {object} [clusterDefinition.componentVersion] The versions of * different services in the cluster. - * @member {object} [clusterDefinition.configurations] The cluster + * @property {object} [clusterDefinition.configurations] The cluster * configurations. - * @member {object} [securityProfile] The security profile. - * @member {string} [securityProfile.directoryType] The directory type. + * @property {object} [securityProfile] The security profile. + * @property {string} [securityProfile.directoryType] The directory type. * Possible values include: 'ActiveDirectory' - * @member {string} [securityProfile.domain] The organization's active + * @property {string} [securityProfile.domain] The organization's active * directory domain. - * @member {string} [securityProfile.organizationalUnitDN] The organizational - * unit within the Active Directory to place the cluster and service - * accounts. - * @member {array} [securityProfile.ldapsUrls] The LDAPS protocol URLs to + * @property {string} [securityProfile.organizationalUnitDN] The + * organizational unit within the Active Directory to place the cluster and + * service accounts. + * @property {array} [securityProfile.ldapsUrls] The LDAPS protocol URLs to * communicate with the Active Directory. - * @member {string} [securityProfile.domainUsername] The domain user account - * that will have admin privileges on the cluster. - * @member {string} [securityProfile.domainUserPassword] The domain admin + * @property {string} [securityProfile.domainUsername] The domain user + * account that will have admin privileges on the cluster. + * @property {string} [securityProfile.domainUserPassword] The domain admin * password. - * @member {array} [securityProfile.clusterUsersGroupDNs] Optional. The + * @property {array} [securityProfile.clusterUsersGroupDNs] Optional. The * Distinguished Names for cluster user groups - * @member {string} [securityProfile.aaddsResourceId] The resource ID of the - * user's Azure Active Directory Domain Service. - * @member {string} [securityProfile.msiResourceId] User assigned identity + * @property {string} [securityProfile.aaddsResourceId] The resource ID of + * the user's Azure Active Directory Domain Service. + * @property {string} [securityProfile.msiResourceId] User assigned identity * that has permissions to read and create cluster-related artifacts in the * user's AADDS. - * @member {object} [computeProfile] The compute profile. - * @member {array} [computeProfile.roles] The list of roles in the cluster. - * @member {object} [storageProfile] The storage profile. - * @member {array} [storageProfile.storageaccounts] The list of storage + * @property {object} [computeProfile] The compute profile. + * @property {array} [computeProfile.roles] The list of roles in the cluster. + * @property {object} [storageProfile] The storage profile. + * @property {array} [storageProfile.storageaccounts] The list of storage * accounts in the cluster. + * @property {object} [diskEncryptionProperties] The disk encryption + * properties. + * @property {string} [diskEncryptionProperties.vaultUri] Base key vault URI + * where the customers key is located eg. https://myvault.vault.azure.net + * @property {string} [diskEncryptionProperties.keyName] Key name that is + * used for enabling disk encryption. + * @property {string} [diskEncryptionProperties.keyVersion] Specific key + * version that is used for enabling disk encryption. + * @property {string} [diskEncryptionProperties.encryptionAlgorithm] + * Algorithm identifier for encryption, default RSA-OAEP. Possible values + * include: 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5' + * @property {string} [diskEncryptionProperties.msiResourceId] Resource ID of + * Managed Identity that is used to access the key vault. */ constructor() { } @@ -127,6 +141,14 @@ class ClusterCreateProperties { name: 'Composite', className: 'StorageProfile' } + }, + diskEncryptionProperties: { + required: false, + serializedName: 'diskEncryptionProperties', + type: { + name: 'Composite', + className: 'DiskEncryptionProperties' + } } } } diff --git a/lib/services/hdInsightManagement/lib/models/clusterDefinition.js b/lib/services/hdInsightManagement/lib/models/clusterDefinition.js index 5383294934..4e46ee97bf 100644 --- a/lib/services/hdInsightManagement/lib/models/clusterDefinition.js +++ b/lib/services/hdInsightManagement/lib/models/clusterDefinition.js @@ -17,11 +17,11 @@ class ClusterDefinition { /** * Create a ClusterDefinition. - * @member {string} [blueprint] The link to the blueprint. - * @member {string} [kind] The type of cluster. - * @member {object} [componentVersion] The versions of different services in - * the cluster. - * @member {object} [configurations] The cluster configurations. + * @property {string} [blueprint] The link to the blueprint. + * @property {string} [kind] The type of cluster. + * @property {object} [componentVersion] The versions of different services + * in the cluster. + * @property {object} [configurations] The cluster configurations. */ constructor() { } diff --git a/lib/services/hdInsightManagement/lib/models/clusterDiskEncryptionParameters.js b/lib/services/hdInsightManagement/lib/models/clusterDiskEncryptionParameters.js new file mode 100644 index 0000000000..27a9b30ae1 --- /dev/null +++ b/lib/services/hdInsightManagement/lib/models/clusterDiskEncryptionParameters.js @@ -0,0 +1,71 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * The Disk Encryption Cluster request parameters. + * + */ +class ClusterDiskEncryptionParameters { + /** + * Create a ClusterDiskEncryptionParameters. + * @property {string} [vaultUri] Base key vault URI where the customers key + * is located eg. https://myvault.vault.azure.net + * @property {string} [keyName] Key name that is used for enabling disk + * encryption. + * @property {string} [keyVersion] Specific key version that is used for + * enabling disk encryption. + */ + constructor() { + } + + /** + * Defines the metadata of ClusterDiskEncryptionParameters + * + * @returns {object} metadata of ClusterDiskEncryptionParameters + * + */ + mapper() { + return { + required: false, + serializedName: 'ClusterDiskEncryptionParameters', + type: { + name: 'Composite', + className: 'ClusterDiskEncryptionParameters', + modelProperties: { + vaultUri: { + required: false, + serializedName: 'vaultUri', + type: { + name: 'String' + } + }, + keyName: { + required: false, + serializedName: 'keyName', + type: { + name: 'String' + } + }, + keyVersion: { + required: false, + serializedName: 'keyVersion', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ClusterDiskEncryptionParameters; diff --git a/lib/services/hdInsightManagement/lib/models/clusterGetProperties.js b/lib/services/hdInsightManagement/lib/models/clusterGetProperties.js index bc5dcbc986..697b36f7ba 100644 --- a/lib/services/hdInsightManagement/lib/models/clusterGetProperties.js +++ b/lib/services/hdInsightManagement/lib/models/clusterGetProperties.js @@ -17,51 +17,66 @@ class ClusterGetProperties { /** * Create a ClusterGetProperties. - * @member {string} [clusterVersion] The version of the cluster. - * @member {string} [osType] The type of operating system. Possible values + * @property {string} [clusterVersion] The version of the cluster. + * @property {string} [osType] The type of operating system. Possible values * include: 'Windows', 'Linux' - * @member {string} [tier] The cluster tier. Possible values include: + * @property {string} [tier] The cluster tier. Possible values include: * 'Standard', 'Premium' - * @member {object} clusterDefinition The cluster definition. - * @member {string} [clusterDefinition.blueprint] The link to the blueprint. - * @member {string} [clusterDefinition.kind] The type of cluster. - * @member {object} [clusterDefinition.componentVersion] The versions of + * @property {object} clusterDefinition The cluster definition. + * @property {string} [clusterDefinition.blueprint] The link to the + * blueprint. + * @property {string} [clusterDefinition.kind] The type of cluster. + * @property {object} [clusterDefinition.componentVersion] The versions of * different services in the cluster. - * @member {object} [clusterDefinition.configurations] The cluster + * @property {object} [clusterDefinition.configurations] The cluster * configurations. - * @member {object} [securityProfile] The security profile. - * @member {string} [securityProfile.directoryType] The directory type. + * @property {object} [securityProfile] The security profile. + * @property {string} [securityProfile.directoryType] The directory type. * Possible values include: 'ActiveDirectory' - * @member {string} [securityProfile.domain] The organization's active + * @property {string} [securityProfile.domain] The organization's active * directory domain. - * @member {string} [securityProfile.organizationalUnitDN] The organizational - * unit within the Active Directory to place the cluster and service - * accounts. - * @member {array} [securityProfile.ldapsUrls] The LDAPS protocol URLs to + * @property {string} [securityProfile.organizationalUnitDN] The + * organizational unit within the Active Directory to place the cluster and + * service accounts. + * @property {array} [securityProfile.ldapsUrls] The LDAPS protocol URLs to * communicate with the Active Directory. - * @member {string} [securityProfile.domainUsername] The domain user account - * that will have admin privileges on the cluster. - * @member {string} [securityProfile.domainUserPassword] The domain admin + * @property {string} [securityProfile.domainUsername] The domain user + * account that will have admin privileges on the cluster. + * @property {string} [securityProfile.domainUserPassword] The domain admin * password. - * @member {array} [securityProfile.clusterUsersGroupDNs] Optional. The + * @property {array} [securityProfile.clusterUsersGroupDNs] Optional. The * Distinguished Names for cluster user groups - * @member {string} [securityProfile.aaddsResourceId] The resource ID of the - * user's Azure Active Directory Domain Service. - * @member {string} [securityProfile.msiResourceId] User assigned identity + * @property {string} [securityProfile.aaddsResourceId] The resource ID of + * the user's Azure Active Directory Domain Service. + * @property {string} [securityProfile.msiResourceId] User assigned identity * that has permissions to read and create cluster-related artifacts in the * user's AADDS. - * @member {object} [computeProfile] The compute profile. - * @member {array} [computeProfile.roles] The list of roles in the cluster. - * @member {string} [provisioningState] The provisioning state, which only + * @property {object} [computeProfile] The compute profile. + * @property {array} [computeProfile.roles] The list of roles in the cluster. + * @property {string} [provisioningState] The provisioning state, which only * appears in the response. Possible values include: 'InProgress', 'Failed', * 'Succeeded', 'Canceled', 'Deleting' - * @member {string} [createdDate] The date on which the cluster was created. - * @member {string} [clusterState] The state of the cluster. - * @member {object} [quotaInfo] The quota information. - * @member {number} [quotaInfo.coresUsed] The cores used by the cluster. - * @member {array} [errors] The list of errors. - * @member {array} [connectivityEndpoints] The list of connectivity + * @property {string} [createdDate] The date on which the cluster was + * created. + * @property {string} [clusterState] The state of the cluster. + * @property {object} [quotaInfo] The quota information. + * @property {number} [quotaInfo.coresUsed] The cores used by the cluster. + * @property {array} [errors] The list of errors. + * @property {array} [connectivityEndpoints] The list of connectivity * endpoints. + * @property {object} [diskEncryptionProperties] The disk encryption + * properties. + * @property {string} [diskEncryptionProperties.vaultUri] Base key vault URI + * where the customers key is located eg. https://myvault.vault.azure.net + * @property {string} [diskEncryptionProperties.keyName] Key name that is + * used for enabling disk encryption. + * @property {string} [diskEncryptionProperties.keyVersion] Specific key + * version that is used for enabling disk encryption. + * @property {string} [diskEncryptionProperties.encryptionAlgorithm] + * Algorithm identifier for encryption, default RSA-OAEP. Possible values + * include: 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5' + * @property {string} [diskEncryptionProperties.msiResourceId] Resource ID of + * Managed Identity that is used to access the key vault. */ constructor() { } @@ -186,6 +201,14 @@ class ClusterGetProperties { } } } + }, + diskEncryptionProperties: { + required: false, + serializedName: 'diskEncryptionProperties', + type: { + name: 'Composite', + className: 'DiskEncryptionProperties' + } } } } diff --git a/lib/services/hdInsightManagement/lib/models/clusterIdentity.js b/lib/services/hdInsightManagement/lib/models/clusterIdentity.js index 68ca7b954f..0840764814 100644 --- a/lib/services/hdInsightManagement/lib/models/clusterIdentity.js +++ b/lib/services/hdInsightManagement/lib/models/clusterIdentity.js @@ -17,15 +17,15 @@ class ClusterIdentity { /** * Create a ClusterIdentity. - * @member {string} [principalId] The principal id of cluster identity. This - * property will only be provided for a system assigned identity. - * @member {string} [tenantId] The tenant id associated with the cluster. + * @property {string} [principalId] The principal id of cluster identity. * This property will only be provided for a system assigned identity. - * @member {string} [type] The type of identity used for the cluster. The + * @property {string} [tenantId] The tenant id associated with the cluster. + * This property will only be provided for a system assigned identity. + * @property {string} [type] The type of identity used for the cluster. The * type 'SystemAssigned, UserAssigned' includes both an implicitly created * identity and a set of user assigned identities. Possible values include: * 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' - * @member {object} [userAssignedIdentities] The list of user identities + * @property {object} [userAssignedIdentities] The list of user identities * associated with the cluster. The user identity dictionary key references * will be ARM resource ids in the form: * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. diff --git a/lib/services/hdInsightManagement/lib/models/clusterIdentityUserAssignedIdentitiesValue.js b/lib/services/hdInsightManagement/lib/models/clusterIdentityUserAssignedIdentitiesValue.js index 1f81b839d9..1c5af8a949 100644 --- a/lib/services/hdInsightManagement/lib/models/clusterIdentityUserAssignedIdentitiesValue.js +++ b/lib/services/hdInsightManagement/lib/models/clusterIdentityUserAssignedIdentitiesValue.js @@ -16,8 +16,9 @@ class ClusterIdentityUserAssignedIdentitiesValue { /** * Create a ClusterIdentityUserAssignedIdentitiesValue. - * @member {string} [principalId] The principal id of user assigned identity. - * @member {string} [clientId] The client id of user assigned identity. + * @property {string} [principalId] The principal id of user assigned + * identity. + * @property {string} [clientId] The client id of user assigned identity. */ constructor() { } diff --git a/lib/services/hdInsightManagement/lib/models/clusterListPersistedScriptActionsResult.js b/lib/services/hdInsightManagement/lib/models/clusterListPersistedScriptActionsResult.js index 220986673e..795d917d3f 100644 --- a/lib/services/hdInsightManagement/lib/models/clusterListPersistedScriptActionsResult.js +++ b/lib/services/hdInsightManagement/lib/models/clusterListPersistedScriptActionsResult.js @@ -17,8 +17,8 @@ class ClusterListPersistedScriptActionsResult { /** * Create a ClusterListPersistedScriptActionsResult. - * @member {array} [value] The list of Persisted Script Actions. - * @member {string} [nextLink] The link (url) to the next page of results. + * @property {array} [value] The list of Persisted Script Actions. + * @property {string} [nextLink] The link (url) to the next page of results. */ constructor() { } diff --git a/lib/services/hdInsightManagement/lib/models/clusterListResult.js b/lib/services/hdInsightManagement/lib/models/clusterListResult.js index 1a631acfea..c4a0b88722 100644 --- a/lib/services/hdInsightManagement/lib/models/clusterListResult.js +++ b/lib/services/hdInsightManagement/lib/models/clusterListResult.js @@ -16,7 +16,7 @@ class ClusterListResult extends Array { /** * Create a ClusterListResult. - * @member {string} [nextLink] The link (url) to the next page of results. + * @property {string} [nextLink] The link (url) to the next page of results. */ constructor() { super(); diff --git a/lib/services/hdInsightManagement/lib/models/clusterListRuntimeScriptActionDetailResult.js b/lib/services/hdInsightManagement/lib/models/clusterListRuntimeScriptActionDetailResult.js index 8f4730c4c6..0e5f005ad0 100644 --- a/lib/services/hdInsightManagement/lib/models/clusterListRuntimeScriptActionDetailResult.js +++ b/lib/services/hdInsightManagement/lib/models/clusterListRuntimeScriptActionDetailResult.js @@ -17,9 +17,9 @@ class ClusterListRuntimeScriptActionDetailResult { /** * Create a ClusterListRuntimeScriptActionDetailResult. - * @member {array} [value] The list of persisted script action details for + * @property {array} [value] The list of persisted script action details for * the cluster. - * @member {string} [nextLink] The link (url) to the next page of results. + * @property {string} [nextLink] The link (url) to the next page of results. */ constructor() { } diff --git a/lib/services/hdInsightManagement/lib/models/clusterMonitoringRequest.js b/lib/services/hdInsightManagement/lib/models/clusterMonitoringRequest.js index f3e9c3ee65..418f250754 100644 --- a/lib/services/hdInsightManagement/lib/models/clusterMonitoringRequest.js +++ b/lib/services/hdInsightManagement/lib/models/clusterMonitoringRequest.js @@ -17,9 +17,9 @@ class ClusterMonitoringRequest { /** * Create a ClusterMonitoringRequest. - * @member {string} [workspaceId] The Operations Management Suite (OMS) + * @property {string} [workspaceId] The Operations Management Suite (OMS) * workspace ID. - * @member {string} [primaryKey] The Operations Management Suite (OMS) + * @property {string} [primaryKey] The Operations Management Suite (OMS) * workspace key. */ constructor() { diff --git a/lib/services/hdInsightManagement/lib/models/clusterMonitoringResponse.js b/lib/services/hdInsightManagement/lib/models/clusterMonitoringResponse.js index 31ff720c34..be74045da3 100644 --- a/lib/services/hdInsightManagement/lib/models/clusterMonitoringResponse.js +++ b/lib/services/hdInsightManagement/lib/models/clusterMonitoringResponse.js @@ -17,9 +17,9 @@ class ClusterMonitoringResponse { /** * Create a ClusterMonitoringResponse. - * @member {boolean} [clusterMonitoringEnabled] The status of the Operations - * Management Suite (OMS) on the HDInsight cluster. - * @member {string} [workspaceId] The workspace ID of the Operations + * @property {boolean} [clusterMonitoringEnabled] The status of the + * Operations Management Suite (OMS) on the HDInsight cluster. + * @property {string} [workspaceId] The workspace ID of the Operations * Management Suite (OMS) on the HDInsight cluster. */ constructor() { diff --git a/lib/services/hdInsightManagement/lib/models/clusterPatchParameters.js b/lib/services/hdInsightManagement/lib/models/clusterPatchParameters.js index 1b9ef6a912..4534968139 100644 --- a/lib/services/hdInsightManagement/lib/models/clusterPatchParameters.js +++ b/lib/services/hdInsightManagement/lib/models/clusterPatchParameters.js @@ -17,7 +17,7 @@ class ClusterPatchParameters { /** * Create a ClusterPatchParameters. - * @member {object} [tags] The resource tags. + * @property {object} [tags] The resource tags. */ constructor() { } diff --git a/lib/services/hdInsightManagement/lib/models/clusterResizeParameters.js b/lib/services/hdInsightManagement/lib/models/clusterResizeParameters.js index 7213bf2099..6451a20034 100644 --- a/lib/services/hdInsightManagement/lib/models/clusterResizeParameters.js +++ b/lib/services/hdInsightManagement/lib/models/clusterResizeParameters.js @@ -17,7 +17,7 @@ class ClusterResizeParameters { /** * Create a ClusterResizeParameters. - * @member {number} [targetInstanceCount] The target instance count for the + * @property {number} [targetInstanceCount] The target instance count for the * operation. */ constructor() { diff --git a/lib/services/hdInsightManagement/lib/models/computeProfile.js b/lib/services/hdInsightManagement/lib/models/computeProfile.js index 2d1af1b30e..d714fb225d 100644 --- a/lib/services/hdInsightManagement/lib/models/computeProfile.js +++ b/lib/services/hdInsightManagement/lib/models/computeProfile.js @@ -17,7 +17,7 @@ class ComputeProfile { /** * Create a ComputeProfile. - * @member {array} [roles] The list of roles in the cluster. + * @property {array} [roles] The list of roles in the cluster. */ constructor() { } diff --git a/lib/services/hdInsightManagement/lib/models/connectivityEndpoint.js b/lib/services/hdInsightManagement/lib/models/connectivityEndpoint.js index 40174d8520..e90cf624e8 100644 --- a/lib/services/hdInsightManagement/lib/models/connectivityEndpoint.js +++ b/lib/services/hdInsightManagement/lib/models/connectivityEndpoint.js @@ -17,10 +17,10 @@ class ConnectivityEndpoint { /** * Create a ConnectivityEndpoint. - * @member {string} [name] The name of the endpoint. - * @member {string} [protocol] The protocol of the endpoint. - * @member {string} [location] The location of the endpoint. - * @member {number} [port] The port to connect to. + * @property {string} [name] The name of the endpoint. + * @property {string} [protocol] The protocol of the endpoint. + * @property {string} [location] The location of the endpoint. + * @property {number} [port] The port to connect to. */ constructor() { } diff --git a/lib/services/hdInsightManagement/lib/models/dataDisksGroups.js b/lib/services/hdInsightManagement/lib/models/dataDisksGroups.js index 642a1a2ef3..8c9cb792ac 100644 --- a/lib/services/hdInsightManagement/lib/models/dataDisksGroups.js +++ b/lib/services/hdInsightManagement/lib/models/dataDisksGroups.js @@ -17,10 +17,10 @@ class DataDisksGroups { /** * Create a DataDisksGroups. - * @member {number} [disksPerNode] The number of disks per node. - * @member {string} [storageAccountType] ReadOnly. The storage account type. - * Do not set this value. - * @member {number} [diskSizeGB] ReadOnly. The DiskSize in GB. Do not set + * @property {number} [disksPerNode] The number of disks per node. + * @property {string} [storageAccountType] ReadOnly. The storage account + * type. Do not set this value. + * @property {number} [diskSizeGB] ReadOnly. The DiskSize in GB. Do not set * this value. */ constructor() { diff --git a/lib/services/hdInsightManagement/lib/models/diskEncryptionProperties.js b/lib/services/hdInsightManagement/lib/models/diskEncryptionProperties.js new file mode 100644 index 0000000000..d474ad19a9 --- /dev/null +++ b/lib/services/hdInsightManagement/lib/models/diskEncryptionProperties.js @@ -0,0 +1,90 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * The disk encryption properties + * + */ +class DiskEncryptionProperties { + /** + * Create a DiskEncryptionProperties. + * @property {string} [vaultUri] Base key vault URI where the customers key + * is located eg. https://myvault.vault.azure.net + * @property {string} [keyName] Key name that is used for enabling disk + * encryption. + * @property {string} [keyVersion] Specific key version that is used for + * enabling disk encryption. + * @property {string} [encryptionAlgorithm] Algorithm identifier for + * encryption, default RSA-OAEP. Possible values include: 'RSA-OAEP', + * 'RSA-OAEP-256', 'RSA1_5' + * @property {string} [msiResourceId] Resource ID of Managed Identity that is + * used to access the key vault. + */ + constructor() { + } + + /** + * Defines the metadata of DiskEncryptionProperties + * + * @returns {object} metadata of DiskEncryptionProperties + * + */ + mapper() { + return { + required: false, + serializedName: 'DiskEncryptionProperties', + type: { + name: 'Composite', + className: 'DiskEncryptionProperties', + modelProperties: { + vaultUri: { + required: false, + serializedName: 'vaultUri', + type: { + name: 'String' + } + }, + keyName: { + required: false, + serializedName: 'keyName', + type: { + name: 'String' + } + }, + keyVersion: { + required: false, + serializedName: 'keyVersion', + type: { + name: 'String' + } + }, + encryptionAlgorithm: { + required: false, + serializedName: 'encryptionAlgorithm', + type: { + name: 'String' + } + }, + msiResourceId: { + required: false, + serializedName: 'msiResourceId', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = DiskEncryptionProperties; diff --git a/lib/services/hdInsightManagement/lib/models/errorResponse.js b/lib/services/hdInsightManagement/lib/models/errorResponse.js index f952d62061..fc85ac1b8b 100644 --- a/lib/services/hdInsightManagement/lib/models/errorResponse.js +++ b/lib/services/hdInsightManagement/lib/models/errorResponse.js @@ -17,8 +17,8 @@ class ErrorResponse { /** * Create a ErrorResponse. - * @member {string} [code] Error code - * @member {string} [message] Error message indicating why the operation + * @property {string} [code] Error code + * @property {string} [message] Error message indicating why the operation * failed. */ constructor() { diff --git a/lib/services/hdInsightManagement/lib/models/errors.js b/lib/services/hdInsightManagement/lib/models/errors.js index ab1430cd14..4deee28cff 100644 --- a/lib/services/hdInsightManagement/lib/models/errors.js +++ b/lib/services/hdInsightManagement/lib/models/errors.js @@ -17,8 +17,8 @@ class Errors { /** * Create a Errors. - * @member {string} [code] The error code. - * @member {string} [message] The error message. + * @property {string} [code] The error code. + * @property {string} [message] The error message. */ constructor() { } diff --git a/lib/services/hdInsightManagement/lib/models/executeScriptActionParameters.js b/lib/services/hdInsightManagement/lib/models/executeScriptActionParameters.js index bc6eb15ead..186b4ed1bf 100644 --- a/lib/services/hdInsightManagement/lib/models/executeScriptActionParameters.js +++ b/lib/services/hdInsightManagement/lib/models/executeScriptActionParameters.js @@ -17,9 +17,9 @@ class ExecuteScriptActionParameters { /** * Create a ExecuteScriptActionParameters. - * @member {array} [scriptActions] The list of run time script actions. - * @member {boolean} persistOnSuccess Gets or sets if the scripts needs to be - * persisted. + * @property {array} [scriptActions] The list of run time script actions. + * @property {boolean} persistOnSuccess Gets or sets if the scripts needs to + * be persisted. */ constructor() { } diff --git a/lib/services/hdInsightManagement/lib/models/extension.js b/lib/services/hdInsightManagement/lib/models/extension.js index 3b478e2586..8042f25ff5 100644 --- a/lib/services/hdInsightManagement/lib/models/extension.js +++ b/lib/services/hdInsightManagement/lib/models/extension.js @@ -17,9 +17,9 @@ class Extension { /** * Create a Extension. - * @member {string} [workspaceId] The workspace ID for the cluster monitoring - * extension. - * @member {string} [primaryKey] The certificate for the cluster monitoring + * @property {string} [workspaceId] The workspace ID for the cluster + * monitoring extension. + * @property {string} [primaryKey] The certificate for the cluster monitoring * extensions. */ constructor() { diff --git a/lib/services/hdInsightManagement/lib/models/hardwareProfile.js b/lib/services/hdInsightManagement/lib/models/hardwareProfile.js index 3dacb65447..cef80eb591 100644 --- a/lib/services/hdInsightManagement/lib/models/hardwareProfile.js +++ b/lib/services/hdInsightManagement/lib/models/hardwareProfile.js @@ -17,7 +17,7 @@ class HardwareProfile { /** * Create a HardwareProfile. - * @member {string} [vmSize] The size of the VM + * @property {string} [vmSize] The size of the VM */ constructor() { } diff --git a/lib/services/hdInsightManagement/lib/models/index.d.ts b/lib/services/hdInsightManagement/lib/models/index.d.ts index fb99d9d241..ebbfcc4f2d 100644 --- a/lib/services/hdInsightManagement/lib/models/index.d.ts +++ b/lib/services/hdInsightManagement/lib/models/index.d.ts @@ -1,1158 +1,1049 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { BaseResource } from 'ms-rest-azure'; -import { CloudError } from 'ms-rest-azure'; -import * as moment from 'moment'; +import { BaseResource, CloudError } from "ms-rest-azure"; +import * as moment from "moment"; -export { BaseResource } from 'ms-rest-azure'; -export { CloudError } from 'ms-rest-azure'; +export { + BaseResource, + CloudError +}; /** - * @class - * Initializes a new instance of the ClusterDefinition class. - * @constructor * The cluster definition. - * - * @member {string} [blueprint] The link to the blueprint. - * @member {string} [kind] The type of cluster. - * @member {object} [componentVersion] The versions of different services in - * the cluster. - * @member {object} [configurations] The cluster configurations. */ export interface ClusterDefinition { + /** + * The link to the blueprint. + */ blueprint?: string; + /** + * The type of cluster. + */ kind?: string; + /** + * The versions of different services in the cluster. + */ componentVersion?: { [propertyName: string]: string }; + /** + * The cluster configurations. + */ configurations?: any; } /** - * @class - * Initializes a new instance of the SecurityProfile class. - * @constructor - * The security profile which contains Ssh public key for the HDInsight - * cluster. - * - * @member {string} [directoryType] The directory type. Possible values - * include: 'ActiveDirectory' - * @member {string} [domain] The organization's active directory domain. - * @member {string} [organizationalUnitDN] The organizational unit within the - * Active Directory to place the cluster and service accounts. - * @member {array} [ldapsUrls] The LDAPS protocol URLs to communicate with the - * Active Directory. - * @member {string} [domainUsername] The domain user account that will have - * admin privileges on the cluster. - * @member {string} [domainUserPassword] The domain admin password. - * @member {array} [clusterUsersGroupDNs] Optional. The Distinguished Names for - * cluster user groups - * @member {string} [aaddsResourceId] The resource ID of the user's Azure - * Active Directory Domain Service. - * @member {string} [msiResourceId] User assigned identity that has permissions - * to read and create cluster-related artifacts in the user's AADDS. + * The security profile which contains Ssh public key for the HDInsight cluster. */ export interface SecurityProfile { + /** + * The directory type. Possible values include: 'ActiveDirectory' + */ directoryType?: string; + /** + * The organization's active directory domain. + */ domain?: string; + /** + * The organizational unit within the Active Directory to place the cluster and service accounts. + */ organizationalUnitDN?: string; + /** + * The LDAPS protocol URLs to communicate with the Active Directory. + */ ldapsUrls?: string[]; + /** + * The domain user account that will have admin privileges on the cluster. + */ domainUsername?: string; + /** + * The domain admin password. + */ domainUserPassword?: string; + /** + * Optional. The Distinguished Names for cluster user groups + */ clusterUsersGroupDNs?: string[]; + /** + * The resource ID of the user's Azure Active Directory Domain Service. + */ aaddsResourceId?: string; + /** + * User assigned identity that has permissions to read and create cluster-related artifacts in + * the user's AADDS. + */ msiResourceId?: string; } /** - * @class - * Initializes a new instance of the HardwareProfile class. - * @constructor * The hardware profile. - * - * @member {string} [vmSize] The size of the VM */ export interface HardwareProfile { + /** + * The size of the VM + */ vmSize?: string; } /** - * @class - * Initializes a new instance of the VirtualNetworkProfile class. - * @constructor * The virtual network properties. - * - * @member {string} [id] The ID of the virtual network. - * @member {string} [subnet] The name of the subnet. */ export interface VirtualNetworkProfile { + /** + * The ID of the virtual network. + */ id?: string; + /** + * The name of the subnet. + */ subnet?: string; } /** - * @class - * Initializes a new instance of the DataDisksGroups class. - * @constructor * The data disks groups for the role. - * - * @member {number} [disksPerNode] The number of disks per node. - * @member {string} [storageAccountType] ReadOnly. The storage account type. Do - * not set this value. - * @member {number} [diskSizeGB] ReadOnly. The DiskSize in GB. Do not set this - * value. */ export interface DataDisksGroups { + /** + * The number of disks per node. + */ disksPerNode?: number; + /** + * ReadOnly. The storage account type. Do not set this value. + */ readonly storageAccountType?: string; + /** + * ReadOnly. The DiskSize in GB. Do not set this value. + */ readonly diskSizeGB?: number; } /** - * @class - * Initializes a new instance of the SshPublicKey class. - * @constructor * The SSH public key for the cluster nodes. - * - * @member {string} [certificateData] The certificate for SSH. */ export interface SshPublicKey { + /** + * The certificate for SSH. + */ certificateData?: string; } /** - * @class - * Initializes a new instance of the SshProfile class. - * @constructor * The list of SSH public keys. - * - * @member {array} [publicKeys] The list of SSH public keys. */ export interface SshProfile { + /** + * The list of SSH public keys. + */ publicKeys?: SshPublicKey[]; } /** - * @class - * Initializes a new instance of the LinuxOperatingSystemProfile class. - * @constructor * The ssh username, password, and ssh public key. - * - * @member {string} [username] The username. - * @member {string} [password] The password. - * @member {object} [sshProfile] The SSH profile. - * @member {array} [sshProfile.publicKeys] The list of SSH public keys. */ export interface LinuxOperatingSystemProfile { + /** + * The username. + */ username?: string; + /** + * The password. + */ password?: string; + /** + * The SSH profile. + */ sshProfile?: SshProfile; } /** - * @class - * Initializes a new instance of the OsProfile class. - * @constructor * The Linux operation systems profile. - * - * @member {object} [linuxOperatingSystemProfile] The Linux OS profile. - * @member {string} [linuxOperatingSystemProfile.username] The username. - * @member {string} [linuxOperatingSystemProfile.password] The password. - * @member {object} [linuxOperatingSystemProfile.sshProfile] The SSH profile. - * @member {array} [linuxOperatingSystemProfile.sshProfile.publicKeys] The list - * of SSH public keys. */ export interface OsProfile { + /** + * The Linux OS profile. + */ linuxOperatingSystemProfile?: LinuxOperatingSystemProfile; } /** - * @class - * Initializes a new instance of the ScriptAction class. - * @constructor * Describes a script action on role on the cluster. - * - * @member {string} name The name of the script action. - * @member {string} uri The URI to the script. - * @member {string} parameters The parameters for the script provided. */ export interface ScriptAction { + /** + * The name of the script action. + */ name: string; + /** + * The URI to the script. + */ uri: string; + /** + * The parameters for the script provided. + */ parameters: string; } /** - * @class - * Initializes a new instance of the Role class. - * @constructor * Describes a role on the cluster. - * - * @member {string} [name] The name of the role. - * @member {number} [minInstanceCount] The minimum instance count of the - * cluster. - * @member {number} [targetInstanceCount] The instance count of the cluster. - * @member {object} [hardwareProfile] The hardware profile. - * @member {string} [hardwareProfile.vmSize] The size of the VM - * @member {object} [osProfile] The operating system profile. - * @member {object} [osProfile.linuxOperatingSystemProfile] The Linux OS - * profile. - * @member {string} [osProfile.linuxOperatingSystemProfile.username] The - * username. - * @member {string} [osProfile.linuxOperatingSystemProfile.password] The - * password. - * @member {object} [osProfile.linuxOperatingSystemProfile.sshProfile] The SSH - * profile. - * @member {array} - * [osProfile.linuxOperatingSystemProfile.sshProfile.publicKeys] The list of - * SSH public keys. - * @member {object} [virtualNetworkProfile] The virtual network profile. - * @member {string} [virtualNetworkProfile.id] The ID of the virtual network. - * @member {string} [virtualNetworkProfile.subnet] The name of the subnet. - * @member {array} [dataDisksGroups] The data disks groups for the role. - * @member {array} [scriptActions] The list of script actions on the role. */ export interface Role { + /** + * The name of the role. + */ name?: string; + /** + * The minimum instance count of the cluster. + */ minInstanceCount?: number; + /** + * The instance count of the cluster. + */ targetInstanceCount?: number; + /** + * The hardware profile. + */ hardwareProfile?: HardwareProfile; + /** + * The operating system profile. + */ osProfile?: OsProfile; + /** + * The virtual network profile. + */ virtualNetworkProfile?: VirtualNetworkProfile; + /** + * The data disks groups for the role. + */ dataDisksGroups?: DataDisksGroups[]; + /** + * The list of script actions on the role. + */ scriptActions?: ScriptAction[]; } /** - * @class - * Initializes a new instance of the ComputeProfile class. - * @constructor * Describes the compute profile. - * - * @member {array} [roles] The list of roles in the cluster. */ export interface ComputeProfile { + /** + * The list of roles in the cluster. + */ roles?: Role[]; } /** - * @class - * Initializes a new instance of the StorageAccount class. - * @constructor * The storage Account. - * - * @member {string} [name] The name of the storage account. - * @member {boolean} [isDefault] Whether or not the storage account is the - * default storage account. - * @member {string} [container] The container in the storage account, only to - * be specified for WASB storage accounts. - * @member {string} [fileSystem] The filesystem, only to be specified for Azure - * Data Lake Storage type Gen 2. - * @member {string} [key] The storage account access key. */ export interface StorageAccount { + /** + * The name of the storage account. + */ name?: string; + /** + * Whether or not the storage account is the default storage account. + */ isDefault?: boolean; + /** + * The container in the storage account, only to be specified for WASB storage accounts. + */ container?: string; + /** + * The filesystem, only to be specified for Azure Data Lake Storage type Gen 2. + */ fileSystem?: string; + /** + * The storage account access key. + */ key?: string; } /** - * @class - * Initializes a new instance of the StorageProfile class. - * @constructor * The storage profile. - * - * @member {array} [storageaccounts] The list of storage accounts in the - * cluster. */ export interface StorageProfile { + /** + * The list of storage accounts in the cluster. + */ storageaccounts?: StorageAccount[]; } /** - * @class - * Initializes a new instance of the ClusterCreateProperties class. - * @constructor + * The disk encryption properties + */ +export interface DiskEncryptionProperties { + /** + * Base key vault URI where the customers key is located eg. https://myvault.vault.azure.net + */ + vaultUri?: string; + /** + * Key name that is used for enabling disk encryption. + */ + keyName?: string; + /** + * Specific key version that is used for enabling disk encryption. + */ + keyVersion?: string; + /** + * Algorithm identifier for encryption, default RSA-OAEP. Possible values include: 'RSA-OAEP', + * 'RSA-OAEP-256', 'RSA1_5' + */ + encryptionAlgorithm?: string; + /** + * Resource ID of Managed Identity that is used to access the key vault. + */ + msiResourceId?: string; +} + +/** * The cluster create parameters. - * - * @member {string} [clusterVersion] The version of the cluster. - * @member {string} [osType] The type of operating system. Possible values - * include: 'Windows', 'Linux' - * @member {string} [tier] The cluster tier. Possible values include: - * 'Standard', 'Premium' - * @member {object} [clusterDefinition] The cluster definition. - * @member {string} [clusterDefinition.blueprint] The link to the blueprint. - * @member {string} [clusterDefinition.kind] The type of cluster. - * @member {object} [clusterDefinition.componentVersion] The versions of - * different services in the cluster. - * @member {object} [clusterDefinition.configurations] The cluster - * configurations. - * @member {object} [securityProfile] The security profile. - * @member {string} [securityProfile.directoryType] The directory type. - * Possible values include: 'ActiveDirectory' - * @member {string} [securityProfile.domain] The organization's active - * directory domain. - * @member {string} [securityProfile.organizationalUnitDN] The organizational - * unit within the Active Directory to place the cluster and service accounts. - * @member {array} [securityProfile.ldapsUrls] The LDAPS protocol URLs to - * communicate with the Active Directory. - * @member {string} [securityProfile.domainUsername] The domain user account - * that will have admin privileges on the cluster. - * @member {string} [securityProfile.domainUserPassword] The domain admin - * password. - * @member {array} [securityProfile.clusterUsersGroupDNs] Optional. The - * Distinguished Names for cluster user groups - * @member {string} [securityProfile.aaddsResourceId] The resource ID of the - * user's Azure Active Directory Domain Service. - * @member {string} [securityProfile.msiResourceId] User assigned identity that - * has permissions to read and create cluster-related artifacts in the user's - * AADDS. - * @member {object} [computeProfile] The compute profile. - * @member {array} [computeProfile.roles] The list of roles in the cluster. - * @member {object} [storageProfile] The storage profile. - * @member {array} [storageProfile.storageaccounts] The list of storage - * accounts in the cluster. */ export interface ClusterCreateProperties { + /** + * The version of the cluster. + */ clusterVersion?: string; + /** + * The type of operating system. Possible values include: 'Windows', 'Linux' + */ osType?: string; + /** + * The cluster tier. Possible values include: 'Standard', 'Premium' + */ tier?: string; + /** + * The cluster definition. + */ clusterDefinition?: ClusterDefinition; + /** + * The security profile. + */ securityProfile?: SecurityProfile; + /** + * The compute profile. + */ computeProfile?: ComputeProfile; + /** + * The storage profile. + */ storageProfile?: StorageProfile; + /** + * The disk encryption properties. + */ + diskEncryptionProperties?: DiskEncryptionProperties; } -/** - * @class - * Initializes a new instance of the ClusterIdentityUserAssignedIdentitiesValue class. - * @constructor - * @member {string} [principalId] The principal id of user assigned identity. - * @member {string} [clientId] The client id of user assigned identity. - */ export interface ClusterIdentityUserAssignedIdentitiesValue { + /** + * The principal id of user assigned identity. + */ readonly principalId?: string; + /** + * The client id of user assigned identity. + */ readonly clientId?: string; } /** - * @class - * Initializes a new instance of the ClusterIdentity class. - * @constructor * Identity for the cluster. - * - * @member {string} [principalId] The principal id of cluster identity. This - * property will only be provided for a system assigned identity. - * @member {string} [tenantId] The tenant id associated with the cluster. This - * property will only be provided for a system assigned identity. - * @member {string} [type] The type of identity used for the cluster. The type - * 'SystemAssigned, UserAssigned' includes both an implicitly created identity - * and a set of user assigned identities. Possible values include: - * 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' - * @member {object} [userAssignedIdentities] The list of user identities - * associated with the cluster. The user identity dictionary key references - * will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - */ +*/ export interface ClusterIdentity { + /** + * The principal id of cluster identity. This property will only be provided for a system + * assigned identity. + */ readonly principalId?: string; + /** + * The tenant id associated with the cluster. This property will only be provided for a system + * assigned identity. + */ readonly tenantId?: string; + /** + * The type of identity used for the cluster. The type 'SystemAssigned, UserAssigned' includes + * both an implicitly created identity and a set of user assigned identities. Possible values + * include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' + */ type?: string; + /** + * The list of user identities associated with the cluster. The user identity dictionary key + * references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + */ userAssignedIdentities?: { [propertyName: string]: ClusterIdentityUserAssignedIdentitiesValue }; } /** - * @class - * Initializes a new instance of the ClusterCreateParametersExtended class. - * @constructor * The CreateCluster request parameters. - * - * @member {string} [location] The location of the cluster. - * @member {object} [tags] The resource tags. - * @member {object} [properties] The cluster create parameters. - * @member {string} [properties.clusterVersion] The version of the cluster. - * @member {string} [properties.osType] The type of operating system. Possible - * values include: 'Windows', 'Linux' - * @member {string} [properties.tier] The cluster tier. Possible values - * include: 'Standard', 'Premium' - * @member {object} [properties.clusterDefinition] The cluster definition. - * @member {string} [properties.clusterDefinition.blueprint] The link to the - * blueprint. - * @member {string} [properties.clusterDefinition.kind] The type of cluster. - * @member {object} [properties.clusterDefinition.componentVersion] The - * versions of different services in the cluster. - * @member {object} [properties.clusterDefinition.configurations] The cluster - * configurations. - * @member {object} [properties.securityProfile] The security profile. - * @member {string} [properties.securityProfile.directoryType] The directory - * type. Possible values include: 'ActiveDirectory' - * @member {string} [properties.securityProfile.domain] The organization's - * active directory domain. - * @member {string} [properties.securityProfile.organizationalUnitDN] The - * organizational unit within the Active Directory to place the cluster and - * service accounts. - * @member {array} [properties.securityProfile.ldapsUrls] The LDAPS protocol - * URLs to communicate with the Active Directory. - * @member {string} [properties.securityProfile.domainUsername] The domain user - * account that will have admin privileges on the cluster. - * @member {string} [properties.securityProfile.domainUserPassword] The domain - * admin password. - * @member {array} [properties.securityProfile.clusterUsersGroupDNs] Optional. - * The Distinguished Names for cluster user groups - * @member {string} [properties.securityProfile.aaddsResourceId] The resource - * ID of the user's Azure Active Directory Domain Service. - * @member {string} [properties.securityProfile.msiResourceId] User assigned - * identity that has permissions to read and create cluster-related artifacts - * in the user's AADDS. - * @member {object} [properties.computeProfile] The compute profile. - * @member {array} [properties.computeProfile.roles] The list of roles in the - * cluster. - * @member {object} [properties.storageProfile] The storage profile. - * @member {array} [properties.storageProfile.storageaccounts] The list of - * storage accounts in the cluster. - * @member {object} [identity] The identity of the cluster, if configured. - * @member {string} [identity.principalId] The principal id of cluster - * identity. This property will only be provided for a system assigned - * identity. - * @member {string} [identity.tenantId] The tenant id associated with the - * cluster. This property will only be provided for a system assigned identity. - * @member {string} [identity.type] The type of identity used for the cluster. - * The type 'SystemAssigned, UserAssigned' includes both an implicitly created - * identity and a set of user assigned identities. Possible values include: - * 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' - * @member {object} [identity.userAssignedIdentities] The list of user - * identities associated with the cluster. The user identity dictionary key - * references will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - */ +*/ export interface ClusterCreateParametersExtended { + /** + * The location of the cluster. + */ location?: string; + /** + * The resource tags. + */ tags?: { [propertyName: string]: string }; + /** + * The cluster create parameters. + */ properties?: ClusterCreateProperties; + /** + * The identity of the cluster, if configured. + */ identity?: ClusterIdentity; } /** - * @class - * Initializes a new instance of the ClusterPatchParameters class. - * @constructor * The PatchCluster request parameters - * - * @member {object} [tags] The resource tags. - */ +*/ export interface ClusterPatchParameters { + /** + * The resource tags. + */ tags?: { [propertyName: string]: string }; } /** - * @class - * Initializes a new instance of the QuotaInfo class. - * @constructor * The quota properties for the cluster. - * - * @member {number} [coresUsed] The cores used by the cluster. - */ +*/ export interface QuotaInfo { + /** + * The cores used by the cluster. + */ coresUsed?: number; } /** - * @class - * Initializes a new instance of the Errors class. - * @constructor * The error message associated with the cluster creation. - * - * @member {string} [code] The error code. - * @member {string} [message] The error message. - */ +*/ export interface Errors { + /** + * The error code. + */ code?: string; + /** + * The error message. + */ message?: string; } /** - * @class - * Initializes a new instance of the ConnectivityEndpoint class. - * @constructor * The connectivity properties - * - * @member {string} [name] The name of the endpoint. - * @member {string} [protocol] The protocol of the endpoint. - * @member {string} [location] The location of the endpoint. - * @member {number} [port] The port to connect to. - */ +*/ export interface ConnectivityEndpoint { + /** + * The name of the endpoint. + */ name?: string; + /** + * The protocol of the endpoint. + */ protocol?: string; + /** + * The location of the endpoint. + */ location?: string; + /** + * The port to connect to. + */ port?: number; } /** - * @class - * Initializes a new instance of the ClusterGetProperties class. - * @constructor * The properties of cluster. - * - * @member {string} [clusterVersion] The version of the cluster. - * @member {string} [osType] The type of operating system. Possible values - * include: 'Windows', 'Linux' - * @member {string} [tier] The cluster tier. Possible values include: - * 'Standard', 'Premium' - * @member {object} clusterDefinition The cluster definition. - * @member {string} [clusterDefinition.blueprint] The link to the blueprint. - * @member {string} [clusterDefinition.kind] The type of cluster. - * @member {object} [clusterDefinition.componentVersion] The versions of - * different services in the cluster. - * @member {object} [clusterDefinition.configurations] The cluster - * configurations. - * @member {object} [securityProfile] The security profile. - * @member {string} [securityProfile.directoryType] The directory type. - * Possible values include: 'ActiveDirectory' - * @member {string} [securityProfile.domain] The organization's active - * directory domain. - * @member {string} [securityProfile.organizationalUnitDN] The organizational - * unit within the Active Directory to place the cluster and service accounts. - * @member {array} [securityProfile.ldapsUrls] The LDAPS protocol URLs to - * communicate with the Active Directory. - * @member {string} [securityProfile.domainUsername] The domain user account - * that will have admin privileges on the cluster. - * @member {string} [securityProfile.domainUserPassword] The domain admin - * password. - * @member {array} [securityProfile.clusterUsersGroupDNs] Optional. The - * Distinguished Names for cluster user groups - * @member {string} [securityProfile.aaddsResourceId] The resource ID of the - * user's Azure Active Directory Domain Service. - * @member {string} [securityProfile.msiResourceId] User assigned identity that - * has permissions to read and create cluster-related artifacts in the user's - * AADDS. - * @member {object} [computeProfile] The compute profile. - * @member {array} [computeProfile.roles] The list of roles in the cluster. - * @member {string} [provisioningState] The provisioning state, which only - * appears in the response. Possible values include: 'InProgress', 'Failed', - * 'Succeeded', 'Canceled', 'Deleting' - * @member {string} [createdDate] The date on which the cluster was created. - * @member {string} [clusterState] The state of the cluster. - * @member {object} [quotaInfo] The quota information. - * @member {number} [quotaInfo.coresUsed] The cores used by the cluster. - * @member {array} [errors] The list of errors. - * @member {array} [connectivityEndpoints] The list of connectivity endpoints. - */ +*/ export interface ClusterGetProperties { + /** + * The version of the cluster. + */ clusterVersion?: string; + /** + * The type of operating system. Possible values include: 'Windows', 'Linux' + */ osType?: string; + /** + * The cluster tier. Possible values include: 'Standard', 'Premium' + */ tier?: string; + /** + * The cluster definition. + */ clusterDefinition: ClusterDefinition; + /** + * The security profile. + */ securityProfile?: SecurityProfile; + /** + * The compute profile. + */ computeProfile?: ComputeProfile; + /** + * The provisioning state, which only appears in the response. Possible values include: + * 'InProgress', 'Failed', 'Succeeded', 'Canceled', 'Deleting' + */ provisioningState?: string; + /** + * The date on which the cluster was created. + */ createdDate?: string; + /** + * The state of the cluster. + */ clusterState?: string; + /** + * The quota information. + */ quotaInfo?: QuotaInfo; + /** + * The list of errors. + */ errors?: Errors[]; + /** + * The list of connectivity endpoints. + */ connectivityEndpoints?: ConnectivityEndpoint[]; + /** + * The disk encryption properties. + */ + diskEncryptionProperties?: DiskEncryptionProperties; } /** - * @class - * Initializes a new instance of the Resource class. - * @constructor * The core properties of ARM resources - * - * @member {string} [id] Fully qualified resource Id for the resource. - * @member {string} [name] The name of the resource - * @member {string} [type] The type of the resource. - */ +*/ export interface Resource extends BaseResource { + /** + * Fully qualified resource Id for the resource. + */ readonly id?: string; + /** + * The name of the resource + */ readonly name?: string; + /** + * The type of the resource. + */ readonly type?: string; } /** - * @class - * Initializes a new instance of the TrackedResource class. - * @constructor * The resource model definition for a ARM tracked top level resource - * - * @member {string} [location] The Azure Region where the resource lives - * @member {object} [tags] Resource tags. - */ +*/ export interface TrackedResource extends Resource { + /** + * The Azure Region where the resource lives + */ location?: string; + /** + * Resource tags. + */ tags?: { [propertyName: string]: string }; } /** - * @class - * Initializes a new instance of the Cluster class. - * @constructor * The HDInsight cluster. - * - * @member {string} [etag] The ETag for the resource - * @member {object} [properties] The properties of the cluster. - * @member {string} [properties.clusterVersion] The version of the cluster. - * @member {string} [properties.osType] The type of operating system. Possible - * values include: 'Windows', 'Linux' - * @member {string} [properties.tier] The cluster tier. Possible values - * include: 'Standard', 'Premium' - * @member {object} [properties.clusterDefinition] The cluster definition. - * @member {string} [properties.clusterDefinition.blueprint] The link to the - * blueprint. - * @member {string} [properties.clusterDefinition.kind] The type of cluster. - * @member {object} [properties.clusterDefinition.componentVersion] The - * versions of different services in the cluster. - * @member {object} [properties.clusterDefinition.configurations] The cluster - * configurations. - * @member {object} [properties.securityProfile] The security profile. - * @member {string} [properties.securityProfile.directoryType] The directory - * type. Possible values include: 'ActiveDirectory' - * @member {string} [properties.securityProfile.domain] The organization's - * active directory domain. - * @member {string} [properties.securityProfile.organizationalUnitDN] The - * organizational unit within the Active Directory to place the cluster and - * service accounts. - * @member {array} [properties.securityProfile.ldapsUrls] The LDAPS protocol - * URLs to communicate with the Active Directory. - * @member {string} [properties.securityProfile.domainUsername] The domain user - * account that will have admin privileges on the cluster. - * @member {string} [properties.securityProfile.domainUserPassword] The domain - * admin password. - * @member {array} [properties.securityProfile.clusterUsersGroupDNs] Optional. - * The Distinguished Names for cluster user groups - * @member {string} [properties.securityProfile.aaddsResourceId] The resource - * ID of the user's Azure Active Directory Domain Service. - * @member {string} [properties.securityProfile.msiResourceId] User assigned - * identity that has permissions to read and create cluster-related artifacts - * in the user's AADDS. - * @member {object} [properties.computeProfile] The compute profile. - * @member {array} [properties.computeProfile.roles] The list of roles in the - * cluster. - * @member {string} [properties.provisioningState] The provisioning state, - * which only appears in the response. Possible values include: 'InProgress', - * 'Failed', 'Succeeded', 'Canceled', 'Deleting' - * @member {string} [properties.createdDate] The date on which the cluster was - * created. - * @member {string} [properties.clusterState] The state of the cluster. - * @member {object} [properties.quotaInfo] The quota information. - * @member {number} [properties.quotaInfo.coresUsed] The cores used by the - * cluster. - * @member {array} [properties.errors] The list of errors. - * @member {array} [properties.connectivityEndpoints] The list of connectivity - * endpoints. - * @member {object} [identity] The identity of the cluster, if configured. - * @member {string} [identity.principalId] The principal id of cluster - * identity. This property will only be provided for a system assigned - * identity. - * @member {string} [identity.tenantId] The tenant id associated with the - * cluster. This property will only be provided for a system assigned identity. - * @member {string} [identity.type] The type of identity used for the cluster. - * The type 'SystemAssigned, UserAssigned' includes both an implicitly created - * identity and a set of user assigned identities. Possible values include: - * 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' - * @member {object} [identity.userAssignedIdentities] The list of user - * identities associated with the cluster. The user identity dictionary key - * references will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - */ +*/ export interface Cluster extends TrackedResource { + /** + * The ETag for the resource + */ etag?: string; + /** + * The properties of the cluster. + */ properties?: ClusterGetProperties; + /** + * The identity of the cluster, if configured. + */ identity?: ClusterIdentity; } /** - * @class - * Initializes a new instance of the RuntimeScriptAction class. - * @constructor * Describes a script action on a running cluster. - * - * @member {string} name The name of the script action. - * @member {string} uri The URI to the script. - * @member {string} [parameters] The parameters for the script - * @member {array} roles The list of roles where script will be executed. - * @member {string} [applicationName] The application name of the script - * action, if any. - */ +*/ export interface RuntimeScriptAction { + /** + * The name of the script action. + */ name: string; + /** + * The URI to the script. + */ uri: string; + /** + * The parameters for the script + */ parameters?: string; + /** + * The list of roles where script will be executed. + */ roles: string[]; + /** + * The application name of the script action, if any. + */ readonly applicationName?: string; } /** - * @class - * Initializes a new instance of the ExecuteScriptActionParameters class. - * @constructor * The parameters for the script actions to execute on a running cluster. - * - * @member {array} [scriptActions] The list of run time script actions. - * @member {boolean} persistOnSuccess Gets or sets if the scripts needs to be - * persisted. - */ +*/ export interface ExecuteScriptActionParameters { + /** + * The list of run time script actions. + */ scriptActions?: RuntimeScriptAction[]; + /** + * Gets or sets if the scripts needs to be persisted. + */ persistOnSuccess: boolean; } /** - * @class - * Initializes a new instance of the ClusterListPersistedScriptActionsResult class. - * @constructor * The ListPersistedScriptActions operation response. - * - * @member {array} [value] The list of Persisted Script Actions. - * @member {string} [nextLink] The link (url) to the next page of results. - */ +*/ export interface ClusterListPersistedScriptActionsResult { + /** + * The list of Persisted Script Actions. + */ value?: RuntimeScriptAction[]; + /** + * The link (url) to the next page of results. + */ readonly nextLink?: string; } /** - * @class - * Initializes a new instance of the ScriptActionExecutionSummary class. - * @constructor * The execution summary of a script action. - * - * @member {string} [status] The status of script action execution. - * @member {number} [instanceCount] The instance count for a given script - * action execution status. - */ +*/ export interface ScriptActionExecutionSummary { + /** + * The status of script action execution. + */ readonly status?: string; + /** + * The instance count for a given script action execution status. + */ readonly instanceCount?: number; } /** - * @class - * Initializes a new instance of the RuntimeScriptActionDetail class. - * @constructor * The execution details of a script action. - * - * @member {number} [scriptExecutionId] The execution id of the script action. - * @member {string} [startTime] The start time of script action execution. - * @member {string} [endTime] The end time of script action execution. - * @member {string} [status] The current execution status of the script action. - * @member {string} [operation] The reason why the script action was executed. - * @member {array} [executionSummary] The summary of script action execution - * result. - * @member {string} [debugInformation] The script action execution debug - * information. - */ +*/ export interface RuntimeScriptActionDetail extends RuntimeScriptAction { + /** + * The execution id of the script action. + */ readonly scriptExecutionId?: number; + /** + * The start time of script action execution. + */ readonly startTime?: string; + /** + * The end time of script action execution. + */ readonly endTime?: string; + /** + * The current execution status of the script action. + */ readonly status?: string; + /** + * The reason why the script action was executed. + */ readonly operation?: string; + /** + * The summary of script action execution result. + */ readonly executionSummary?: ScriptActionExecutionSummary[]; + /** + * The script action execution debug information. + */ readonly debugInformation?: string; } /** - * @class - * Initializes a new instance of the ClusterListRuntimeScriptActionDetailResult class. - * @constructor * The list runtime script action detail response. - * - * @member {array} [value] The list of persisted script action details for the - * cluster. - * @member {string} [nextLink] The link (url) to the next page of results. - */ +*/ export interface ClusterListRuntimeScriptActionDetailResult { + /** + * The list of persisted script action details for the cluster. + */ readonly value?: RuntimeScriptActionDetail[]; + /** + * The link (url) to the next page of results. + */ readonly nextLink?: string; } /** - * @class - * Initializes a new instance of the ClusterResizeParameters class. - * @constructor * The Resize Cluster request parameters. - * - * @member {number} [targetInstanceCount] The target instance count for the - * operation. - */ +*/ export interface ClusterResizeParameters { + /** + * The target instance count for the operation. + */ targetInstanceCount?: number; } /** - * @class - * Initializes a new instance of the OperationResource class. - * @constructor + * The Disk Encryption Cluster request parameters. +*/ +export interface ClusterDiskEncryptionParameters { + /** + * Base key vault URI where the customers key is located eg. https://myvault.vault.azure.net + */ + vaultUri?: string; + /** + * Key name that is used for enabling disk encryption. + */ + keyName?: string; + /** + * Specific key version that is used for enabling disk encryption. + */ + keyVersion?: string; +} + +/** * The azure async operation response. - * - * @member {string} [status] The async operation state. Possible values - * include: 'InProgress', 'Succeeded', 'Failed' - * @member {object} [error] The operation error information. - * @member {string} [error.code] The error code. - * @member {string} [error.message] The error message. - */ +*/ export interface OperationResource { + /** + * The async operation state. Possible values include: 'InProgress', 'Succeeded', 'Failed' + */ status?: string; + /** + * The operation error information. + */ error?: Errors; } /** - * @class - * Initializes a new instance of the ProxyResource class. - * @constructor - * The resource model definition for a ARM proxy resource. It will have - * everything other than required location and tags - * - */ + * The resource model definition for a ARM proxy resource. It will have everything other than + * required location and tags +*/ export interface ProxyResource extends Resource { } /** - * @class - * Initializes a new instance of the ErrorResponse class. - * @constructor * Describes the format of Error response. - * - * @member {string} [code] Error code - * @member {string} [message] Error message indicating why the operation - * failed. - */ +*/ export interface ErrorResponse { + /** + * Error code + */ code?: string; + /** + * Error message indicating why the operation failed. + */ message?: string; } /** - * @class - * Initializes a new instance of the ApplicationGetHttpsEndpoint class. - * @constructor * Gets the application HTTP endpoints. - * - * @member {array} [accessModes] The list of access modes for the application. - * @member {string} [location] The location of the endpoint. - * @member {number} [destinationPort] The destination port to connect to. - * @member {number} [publicPort] The public port to connect to. - */ +*/ export interface ApplicationGetHttpsEndpoint { + /** + * The list of access modes for the application. + */ accessModes?: string[]; + /** + * The location of the endpoint. + */ location?: string; + /** + * The destination port to connect to. + */ destinationPort?: number; + /** + * The public port to connect to. + */ publicPort?: number; } /** - * @class - * Initializes a new instance of the ApplicationGetEndpoint class. - * @constructor * Gets the application SSH endpoint - * - * @member {string} [location] The location of the endpoint. - * @member {number} [destinationPort] The destination port to connect to. - * @member {number} [publicPort] The public port to connect to. - */ +*/ export interface ApplicationGetEndpoint { + /** + * The location of the endpoint. + */ location?: string; + /** + * The destination port to connect to. + */ destinationPort?: number; + /** + * The public port to connect to. + */ publicPort?: number; } /** - * @class - * Initializes a new instance of the ApplicationProperties class. - * @constructor * The HDInsight cluster application GET response. - * - * @member {object} [computeProfile] The list of roles in the cluster. - * @member {array} [computeProfile.roles] The list of roles in the cluster. - * @member {array} [installScriptActions] The list of install script actions. - * @member {array} [uninstallScriptActions] The list of uninstall script - * actions. - * @member {array} [httpsEndpoints] The list of application HTTPS endpoints. - * @member {array} [sshEndpoints] The list of application SSH endpoints. - * @member {string} [provisioningState] The provisioning state of the - * application. - * @member {string} [applicationType] The application type. - * @member {string} [applicationState] The application state. - * @member {array} [errors] The list of errors. - * @member {string} [createdDate] The application create date time. - * @member {string} [marketplaceIdentifier] The marketplace identifier. - */ +*/ export interface ApplicationProperties { + /** + * The list of roles in the cluster. + */ computeProfile?: ComputeProfile; + /** + * The list of install script actions. + */ installScriptActions?: RuntimeScriptAction[]; + /** + * The list of uninstall script actions. + */ uninstallScriptActions?: RuntimeScriptAction[]; + /** + * The list of application HTTPS endpoints. + */ httpsEndpoints?: ApplicationGetHttpsEndpoint[]; + /** + * The list of application SSH endpoints. + */ sshEndpoints?: ApplicationGetEndpoint[]; + /** + * The provisioning state of the application. + */ readonly provisioningState?: string; + /** + * The application type. + */ applicationType?: string; + /** + * The application state. + */ readonly applicationState?: string; + /** + * The list of errors. + */ errors?: Errors[]; + /** + * The application create date time. + */ readonly createdDate?: string; + /** + * The marketplace identifier. + */ readonly marketplaceIdentifier?: string; } /** - * @class - * Initializes a new instance of the Application class. - * @constructor * The HDInsight cluster application - * - * @member {string} [etag] The ETag for the application - * @member {object} [tags] The tags for the application. - * @member {object} [properties] The properties of the application. - * @member {object} [properties.computeProfile] The list of roles in the - * cluster. - * @member {array} [properties.computeProfile.roles] The list of roles in the - * cluster. - * @member {array} [properties.installScriptActions] The list of install script - * actions. - * @member {array} [properties.uninstallScriptActions] The list of uninstall - * script actions. - * @member {array} [properties.httpsEndpoints] The list of application HTTPS - * endpoints. - * @member {array} [properties.sshEndpoints] The list of application SSH - * endpoints. - * @member {string} [properties.provisioningState] The provisioning state of - * the application. - * @member {string} [properties.applicationType] The application type. - * @member {string} [properties.applicationState] The application state. - * @member {array} [properties.errors] The list of errors. - * @member {string} [properties.createdDate] The application create date time. - * @member {string} [properties.marketplaceIdentifier] The marketplace - * identifier. - */ +*/ export interface Application extends ProxyResource { + /** + * The ETag for the application + */ etag?: string; + /** + * The tags for the application. + */ tags?: { [propertyName: string]: string }; + /** + * The properties of the application. + */ properties?: ApplicationProperties; } /** - * @class - * Initializes a new instance of the LocalizedName class. - * @constructor * The details about the localizable name of a type of usage. - * - * @member {string} [value] The name of the used resource. - * @member {string} [localizedValue] The localized name of the used resource. - */ +*/ export interface LocalizedName { + /** + * The name of the used resource. + */ value?: string; + /** + * The localized name of the used resource. + */ localizedValue?: string; } /** - * @class - * Initializes a new instance of the Usage class. - * @constructor * The details about the usage of a particular limited resource. - * - * @member {string} [unit] The type of measurement for usage. - * @member {number} [currentValue] The current usage. - * @member {number} [limit] The maximum allowed usage. - * @member {object} [name] The details about the localizable name of the used - * resource. - * @member {string} [name.value] The name of the used resource. - * @member {string} [name.localizedValue] The localized name of the used - * resource. - */ +*/ export interface Usage { + /** + * The type of measurement for usage. + */ unit?: string; + /** + * The current usage. + */ currentValue?: number; + /** + * The maximum allowed usage. + */ limit?: number; + /** + * The details about the localizable name of the used resource. + */ name?: LocalizedName; } /** - * @class - * Initializes a new instance of the UsagesListResult class. - * @constructor * The response for the operation to get regional usages for a subscription. - * - * @member {array} [value] The list of usages. - */ +*/ export interface UsagesListResult { + /** + * The list of usages. + */ value?: Usage[]; } /** - * @class - * Initializes a new instance of the Extension class. - * @constructor * Cluster monitoring extensions - * - * @member {string} [workspaceId] The workspace ID for the cluster monitoring - * extension. - * @member {string} [primaryKey] The certificate for the cluster monitoring - * extensions. - */ +*/ export interface Extension { + /** + * The workspace ID for the cluster monitoring extension. + */ workspaceId?: string; + /** + * The certificate for the cluster monitoring extensions. + */ primaryKey?: string; } /** - * @class - * Initializes a new instance of the ClusterMonitoringResponse class. - * @constructor * The Operations Management Suite (OMS) status response - * - * @member {boolean} [clusterMonitoringEnabled] The status of the Operations - * Management Suite (OMS) on the HDInsight cluster. - * @member {string} [workspaceId] The workspace ID of the Operations Management - * Suite (OMS) on the HDInsight cluster. - */ +*/ export interface ClusterMonitoringResponse { + /** + * The status of the Operations Management Suite (OMS) on the HDInsight cluster. + */ clusterMonitoringEnabled?: boolean; + /** + * The workspace ID of the Operations Management Suite (OMS) on the HDInsight cluster. + */ workspaceId?: string; } /** - * @class - * Initializes a new instance of the ClusterMonitoringRequest class. - * @constructor * The Operations Management Suite (OMS) parameters. - * - * @member {string} [workspaceId] The Operations Management Suite (OMS) - * workspace ID. - * @member {string} [primaryKey] The Operations Management Suite (OMS) - * workspace key. - */ +*/ export interface ClusterMonitoringRequest { + /** + * The Operations Management Suite (OMS) workspace ID. + */ workspaceId?: string; + /** + * The Operations Management Suite (OMS) workspace key. + */ primaryKey?: string; } /** - * @class - * Initializes a new instance of the ScriptActionPersistedGetResponseSpec class. - * @constructor * The persisted script action for cluster. - * - * @member {string} [name] The name of script action. - * @member {string} [uri] The URI to the script. - * @member {string} [parameters] The parameters for the script provided. - * @member {array} [roles] The list of roles where script will be executed. - * @member {string} [applicationName] The application name for the script - * action. - */ +*/ export interface ScriptActionPersistedGetResponseSpec { + /** + * The name of script action. + */ name?: string; + /** + * The URI to the script. + */ uri?: string; + /** + * The parameters for the script provided. + */ parameters?: string; + /** + * The list of roles where script will be executed. + */ roles?: string[]; + /** + * The application name for the script action. + */ applicationName?: string; } /** - * @class - * Initializes a new instance of the OperationDisplay class. - * @constructor * The object that represents the operation. - * - * @member {string} [provider] The service provider: Microsoft.HDInsight - * @member {string} [resource] The resource on which the operation is - * performed: Cluster, Applications, etc. - * @member {string} [operation] The operation type: read, write, delete, etc. - */ +*/ export interface OperationDisplay { + /** + * The service provider: Microsoft.HDInsight + */ provider?: string; + /** + * The resource on which the operation is performed: Cluster, Applications, etc. + */ resource?: string; + /** + * The operation type: read, write, delete, etc. + */ operation?: string; } /** - * @class - * Initializes a new instance of the Operation class. - * @constructor * The HDInsight REST API operation. - * - * @member {string} [name] The operation name: - * {provider}/{resource}/{operation} - * @member {object} [display] The object that represents the operation. - * @member {string} [display.provider] The service provider: - * Microsoft.HDInsight - * @member {string} [display.resource] The resource on which the operation is - * performed: Cluster, Applications, etc. - * @member {string} [display.operation] The operation type: read, write, - * delete, etc. - */ +*/ export interface Operation { + /** + * The operation name: {provider}/{resource}/{operation} + */ name?: string; + /** + * The object that represents the operation. + */ display?: OperationDisplay; } - /** - * @class - * Initializes a new instance of the ClusterListResult class. - * @constructor * The List Cluster operation response. - * - * @member {string} [nextLink] The link (url) to the next page of results. - */ +*/ export interface ClusterListResult extends Array { + /** + * The link (url) to the next page of results. + */ readonly nextLink?: string; } /** - * @class - * Initializes a new instance of the ApplicationListResult class. - * @constructor - * Result of the request to list cluster Applications. It contains a list of - * operations and a URL link to get the next set of results. - * - * @member {string} [nextLink] The URL to get the next set of operation list - * results if there are any. - */ + * Result of the request to list cluster Applications. It contains a list of operations and a URL + * link to get the next set of results. +*/ export interface ApplicationListResult extends Array { + /** + * The URL to get the next set of operation list results if there are any. + */ readonly nextLink?: string; } /** - * @class - * Initializes a new instance of the ScriptActionsList class. - * @constructor * The persisted script action for the cluster. - * - * @member {string} [nextLink] The link (url) to the next page of results. - */ +*/ export interface ScriptActionsList extends Array { + /** + * The link (url) to the next page of results. + */ readonly nextLink?: string; } /** - * @class - * Initializes a new instance of the ScriptActionExecutionHistoryList class. - * @constructor * The list script execution history response. - * - * @member {string} [nextLink] The link (url) to the next page of results. - */ +*/ export interface ScriptActionExecutionHistoryList extends Array { + /** + * The link (url) to the next page of results. + */ readonly nextLink?: string; } /** - * @class - * Initializes a new instance of the OperationListResult class. - * @constructor - * Result of the request to list HDInsight operations. It contains a list of - * operations and a URL link to get the next set of results. - * - * @member {string} [nextLink] The URL to get the next set of operation list - * results if there are any. - */ + * Result of the request to list HDInsight operations. It contains a list of operations and a URL + * link to get the next set of results. +*/ export interface OperationListResult extends Array { + /** + * The URL to get the next set of operation list results if there are any. + */ nextLink?: string; } diff --git a/lib/services/hdInsightManagement/lib/models/index.js b/lib/services/hdInsightManagement/lib/models/index.js index d9fce93bce..3d79a33a08 100644 --- a/lib/services/hdInsightManagement/lib/models/index.js +++ b/lib/services/hdInsightManagement/lib/models/index.js @@ -32,6 +32,7 @@ exports.Role = require('./role'); exports.ComputeProfile = require('./computeProfile'); exports.StorageAccount = require('./storageAccount'); exports.StorageProfile = require('./storageProfile'); +exports.DiskEncryptionProperties = require('./diskEncryptionProperties'); exports.ClusterCreateProperties = require('./clusterCreateProperties'); exports.ClusterIdentityUserAssignedIdentitiesValue = require('./clusterIdentityUserAssignedIdentitiesValue'); exports.ClusterIdentity = require('./clusterIdentity'); @@ -51,6 +52,7 @@ exports.ScriptActionExecutionSummary = require('./scriptActionExecutionSummary') exports.RuntimeScriptActionDetail = require('./runtimeScriptActionDetail'); exports.ClusterListRuntimeScriptActionDetailResult = require('./clusterListRuntimeScriptActionDetailResult'); exports.ClusterResizeParameters = require('./clusterResizeParameters'); +exports.ClusterDiskEncryptionParameters = require('./clusterDiskEncryptionParameters'); exports.OperationResource = require('./operationResource'); exports.ProxyResource = require('./proxyResource'); exports.ErrorResponse = require('./errorResponse'); diff --git a/lib/services/hdInsightManagement/lib/models/linuxOperatingSystemProfile.js b/lib/services/hdInsightManagement/lib/models/linuxOperatingSystemProfile.js index d8e4625855..22738fb4f1 100644 --- a/lib/services/hdInsightManagement/lib/models/linuxOperatingSystemProfile.js +++ b/lib/services/hdInsightManagement/lib/models/linuxOperatingSystemProfile.js @@ -17,10 +17,10 @@ class LinuxOperatingSystemProfile { /** * Create a LinuxOperatingSystemProfile. - * @member {string} [username] The username. - * @member {string} [password] The password. - * @member {object} [sshProfile] The SSH profile. - * @member {array} [sshProfile.publicKeys] The list of SSH public keys. + * @property {string} [username] The username. + * @property {string} [password] The password. + * @property {object} [sshProfile] The SSH profile. + * @property {array} [sshProfile.publicKeys] The list of SSH public keys. */ constructor() { } diff --git a/lib/services/hdInsightManagement/lib/models/localizedName.js b/lib/services/hdInsightManagement/lib/models/localizedName.js index e293961473..51eb715be4 100644 --- a/lib/services/hdInsightManagement/lib/models/localizedName.js +++ b/lib/services/hdInsightManagement/lib/models/localizedName.js @@ -17,8 +17,9 @@ class LocalizedName { /** * Create a LocalizedName. - * @member {string} [value] The name of the used resource. - * @member {string} [localizedValue] The localized name of the used resource. + * @property {string} [value] The name of the used resource. + * @property {string} [localizedValue] The localized name of the used + * resource. */ constructor() { } diff --git a/lib/services/hdInsightManagement/lib/models/operation.js b/lib/services/hdInsightManagement/lib/models/operation.js index 2896b2e26d..5c47954771 100644 --- a/lib/services/hdInsightManagement/lib/models/operation.js +++ b/lib/services/hdInsightManagement/lib/models/operation.js @@ -17,14 +17,14 @@ class Operation { /** * Create a Operation. - * @member {string} [name] The operation name: + * @property {string} [name] The operation name: * {provider}/{resource}/{operation} - * @member {object} [display] The object that represents the operation. - * @member {string} [display.provider] The service provider: + * @property {object} [display] The object that represents the operation. + * @property {string} [display.provider] The service provider: * Microsoft.HDInsight - * @member {string} [display.resource] The resource on which the operation is - * performed: Cluster, Applications, etc. - * @member {string} [display.operation] The operation type: read, write, + * @property {string} [display.resource] The resource on which the operation + * is performed: Cluster, Applications, etc. + * @property {string} [display.operation] The operation type: read, write, * delete, etc. */ constructor() { diff --git a/lib/services/hdInsightManagement/lib/models/operationDisplay.js b/lib/services/hdInsightManagement/lib/models/operationDisplay.js index 1bbb9f1f22..baa89cf07e 100644 --- a/lib/services/hdInsightManagement/lib/models/operationDisplay.js +++ b/lib/services/hdInsightManagement/lib/models/operationDisplay.js @@ -17,10 +17,11 @@ class OperationDisplay { /** * Create a OperationDisplay. - * @member {string} [provider] The service provider: Microsoft.HDInsight - * @member {string} [resource] The resource on which the operation is + * @property {string} [provider] The service provider: Microsoft.HDInsight + * @property {string} [resource] The resource on which the operation is * performed: Cluster, Applications, etc. - * @member {string} [operation] The operation type: read, write, delete, etc. + * @property {string} [operation] The operation type: read, write, delete, + * etc. */ constructor() { } diff --git a/lib/services/hdInsightManagement/lib/models/operationListResult.js b/lib/services/hdInsightManagement/lib/models/operationListResult.js index a6ae70b33c..3887dd3a1c 100644 --- a/lib/services/hdInsightManagement/lib/models/operationListResult.js +++ b/lib/services/hdInsightManagement/lib/models/operationListResult.js @@ -17,8 +17,8 @@ class OperationListResult extends Array { /** * Create a OperationListResult. - * @member {string} [nextLink] The URL to get the next set of operation list - * results if there are any. + * @property {string} [nextLink] The URL to get the next set of operation + * list results if there are any. */ constructor() { super(); diff --git a/lib/services/hdInsightManagement/lib/models/operationResource.js b/lib/services/hdInsightManagement/lib/models/operationResource.js index a83cdd3be5..1f48b45bda 100644 --- a/lib/services/hdInsightManagement/lib/models/operationResource.js +++ b/lib/services/hdInsightManagement/lib/models/operationResource.js @@ -17,11 +17,11 @@ class OperationResource { /** * Create a OperationResource. - * @member {string} [status] The async operation state. Possible values + * @property {string} [status] The async operation state. Possible values * include: 'InProgress', 'Succeeded', 'Failed' - * @member {object} [error] The operation error information. - * @member {string} [error.code] The error code. - * @member {string} [error.message] The error message. + * @property {object} [error] The operation error information. + * @property {string} [error.code] The error code. + * @property {string} [error.message] The error message. */ constructor() { } diff --git a/lib/services/hdInsightManagement/lib/models/osProfile.js b/lib/services/hdInsightManagement/lib/models/osProfile.js index 6b54fbc2ca..fd25c7eea6 100644 --- a/lib/services/hdInsightManagement/lib/models/osProfile.js +++ b/lib/services/hdInsightManagement/lib/models/osProfile.js @@ -17,11 +17,12 @@ class OsProfile { /** * Create a OsProfile. - * @member {object} [linuxOperatingSystemProfile] The Linux OS profile. - * @member {string} [linuxOperatingSystemProfile.username] The username. - * @member {string} [linuxOperatingSystemProfile.password] The password. - * @member {object} [linuxOperatingSystemProfile.sshProfile] The SSH profile. - * @member {array} [linuxOperatingSystemProfile.sshProfile.publicKeys] The + * @property {object} [linuxOperatingSystemProfile] The Linux OS profile. + * @property {string} [linuxOperatingSystemProfile.username] The username. + * @property {string} [linuxOperatingSystemProfile.password] The password. + * @property {object} [linuxOperatingSystemProfile.sshProfile] The SSH + * profile. + * @property {array} [linuxOperatingSystemProfile.sshProfile.publicKeys] The * list of SSH public keys. */ constructor() { diff --git a/lib/services/hdInsightManagement/lib/models/quotaInfo.js b/lib/services/hdInsightManagement/lib/models/quotaInfo.js index 8e765bcb8d..68f7fdc9cf 100644 --- a/lib/services/hdInsightManagement/lib/models/quotaInfo.js +++ b/lib/services/hdInsightManagement/lib/models/quotaInfo.js @@ -17,7 +17,7 @@ class QuotaInfo { /** * Create a QuotaInfo. - * @member {number} [coresUsed] The cores used by the cluster. + * @property {number} [coresUsed] The cores used by the cluster. */ constructor() { } diff --git a/lib/services/hdInsightManagement/lib/models/resource.js b/lib/services/hdInsightManagement/lib/models/resource.js index d12ac7693d..7de8a5734e 100644 --- a/lib/services/hdInsightManagement/lib/models/resource.js +++ b/lib/services/hdInsightManagement/lib/models/resource.js @@ -20,9 +20,9 @@ const models = require('./index'); class Resource extends models['BaseResource'] { /** * Create a Resource. - * @member {string} [id] Fully qualified resource Id for the resource. - * @member {string} [name] The name of the resource - * @member {string} [type] The type of the resource. + * @property {string} [id] Fully qualified resource Id for the resource. + * @property {string} [name] The name of the resource + * @property {string} [type] The type of the resource. */ constructor() { super(); diff --git a/lib/services/hdInsightManagement/lib/models/role.js b/lib/services/hdInsightManagement/lib/models/role.js index 7a0313e045..8fb737edb1 100644 --- a/lib/services/hdInsightManagement/lib/models/role.js +++ b/lib/services/hdInsightManagement/lib/models/role.js @@ -17,29 +17,31 @@ class Role { /** * Create a Role. - * @member {string} [name] The name of the role. - * @member {number} [minInstanceCount] The minimum instance count of the + * @property {string} [name] The name of the role. + * @property {number} [minInstanceCount] The minimum instance count of the * cluster. - * @member {number} [targetInstanceCount] The instance count of the cluster. - * @member {object} [hardwareProfile] The hardware profile. - * @member {string} [hardwareProfile.vmSize] The size of the VM - * @member {object} [osProfile] The operating system profile. - * @member {object} [osProfile.linuxOperatingSystemProfile] The Linux OS + * @property {number} [targetInstanceCount] The instance count of the + * cluster. + * @property {object} [hardwareProfile] The hardware profile. + * @property {string} [hardwareProfile.vmSize] The size of the VM + * @property {object} [osProfile] The operating system profile. + * @property {object} [osProfile.linuxOperatingSystemProfile] The Linux OS * profile. - * @member {string} [osProfile.linuxOperatingSystemProfile.username] The + * @property {string} [osProfile.linuxOperatingSystemProfile.username] The * username. - * @member {string} [osProfile.linuxOperatingSystemProfile.password] The + * @property {string} [osProfile.linuxOperatingSystemProfile.password] The * password. - * @member {object} [osProfile.linuxOperatingSystemProfile.sshProfile] The + * @property {object} [osProfile.linuxOperatingSystemProfile.sshProfile] The * SSH profile. - * @member {array} + * @property {array} * [osProfile.linuxOperatingSystemProfile.sshProfile.publicKeys] The list of * SSH public keys. - * @member {object} [virtualNetworkProfile] The virtual network profile. - * @member {string} [virtualNetworkProfile.id] The ID of the virtual network. - * @member {string} [virtualNetworkProfile.subnet] The name of the subnet. - * @member {array} [dataDisksGroups] The data disks groups for the role. - * @member {array} [scriptActions] The list of script actions on the role. + * @property {object} [virtualNetworkProfile] The virtual network profile. + * @property {string} [virtualNetworkProfile.id] The ID of the virtual + * network. + * @property {string} [virtualNetworkProfile.subnet] The name of the subnet. + * @property {array} [dataDisksGroups] The data disks groups for the role. + * @property {array} [scriptActions] The list of script actions on the role. */ constructor() { } diff --git a/lib/services/hdInsightManagement/lib/models/runtimeScriptAction.js b/lib/services/hdInsightManagement/lib/models/runtimeScriptAction.js index 2c4e64af6d..87eb33b306 100644 --- a/lib/services/hdInsightManagement/lib/models/runtimeScriptAction.js +++ b/lib/services/hdInsightManagement/lib/models/runtimeScriptAction.js @@ -17,11 +17,11 @@ class RuntimeScriptAction { /** * Create a RuntimeScriptAction. - * @member {string} name The name of the script action. - * @member {string} uri The URI to the script. - * @member {string} [parameters] The parameters for the script - * @member {array} roles The list of roles where script will be executed. - * @member {string} [applicationName] The application name of the script + * @property {string} name The name of the script action. + * @property {string} uri The URI to the script. + * @property {string} [parameters] The parameters for the script + * @property {array} roles The list of roles where script will be executed. + * @property {string} [applicationName] The application name of the script * action, if any. */ constructor() { diff --git a/lib/services/hdInsightManagement/lib/models/runtimeScriptActionDetail.js b/lib/services/hdInsightManagement/lib/models/runtimeScriptActionDetail.js index 8d96ddb756..ce3647df27 100644 --- a/lib/services/hdInsightManagement/lib/models/runtimeScriptActionDetail.js +++ b/lib/services/hdInsightManagement/lib/models/runtimeScriptActionDetail.js @@ -20,17 +20,17 @@ const models = require('./index'); class RuntimeScriptActionDetail extends models['RuntimeScriptAction'] { /** * Create a RuntimeScriptActionDetail. - * @member {number} [scriptExecutionId] The execution id of the script + * @property {number} [scriptExecutionId] The execution id of the script * action. - * @member {string} [startTime] The start time of script action execution. - * @member {string} [endTime] The end time of script action execution. - * @member {string} [status] The current execution status of the script + * @property {string} [startTime] The start time of script action execution. + * @property {string} [endTime] The end time of script action execution. + * @property {string} [status] The current execution status of the script * action. - * @member {string} [operation] The reason why the script action was + * @property {string} [operation] The reason why the script action was * executed. - * @member {array} [executionSummary] The summary of script action execution - * result. - * @member {string} [debugInformation] The script action execution debug + * @property {array} [executionSummary] The summary of script action + * execution result. + * @property {string} [debugInformation] The script action execution debug * information. */ constructor() { diff --git a/lib/services/hdInsightManagement/lib/models/scriptAction.js b/lib/services/hdInsightManagement/lib/models/scriptAction.js index 64c467f8ca..5ee67ed1e2 100644 --- a/lib/services/hdInsightManagement/lib/models/scriptAction.js +++ b/lib/services/hdInsightManagement/lib/models/scriptAction.js @@ -17,9 +17,9 @@ class ScriptAction { /** * Create a ScriptAction. - * @member {string} name The name of the script action. - * @member {string} uri The URI to the script. - * @member {string} parameters The parameters for the script provided. + * @property {string} name The name of the script action. + * @property {string} uri The URI to the script. + * @property {string} parameters The parameters for the script provided. */ constructor() { } diff --git a/lib/services/hdInsightManagement/lib/models/scriptActionExecutionHistoryList.js b/lib/services/hdInsightManagement/lib/models/scriptActionExecutionHistoryList.js index 05da10f6a5..f900568767 100644 --- a/lib/services/hdInsightManagement/lib/models/scriptActionExecutionHistoryList.js +++ b/lib/services/hdInsightManagement/lib/models/scriptActionExecutionHistoryList.js @@ -16,7 +16,7 @@ class ScriptActionExecutionHistoryList extends Array { /** * Create a ScriptActionExecutionHistoryList. - * @member {string} [nextLink] The link (url) to the next page of results. + * @property {string} [nextLink] The link (url) to the next page of results. */ constructor() { super(); diff --git a/lib/services/hdInsightManagement/lib/models/scriptActionExecutionSummary.js b/lib/services/hdInsightManagement/lib/models/scriptActionExecutionSummary.js index 707e548917..1f9f8e0432 100644 --- a/lib/services/hdInsightManagement/lib/models/scriptActionExecutionSummary.js +++ b/lib/services/hdInsightManagement/lib/models/scriptActionExecutionSummary.js @@ -17,8 +17,8 @@ class ScriptActionExecutionSummary { /** * Create a ScriptActionExecutionSummary. - * @member {string} [status] The status of script action execution. - * @member {number} [instanceCount] The instance count for a given script + * @property {string} [status] The status of script action execution. + * @property {number} [instanceCount] The instance count for a given script * action execution status. */ constructor() { diff --git a/lib/services/hdInsightManagement/lib/models/scriptActionPersistedGetResponseSpec.js b/lib/services/hdInsightManagement/lib/models/scriptActionPersistedGetResponseSpec.js index 5b1dfd812f..223a20788f 100644 --- a/lib/services/hdInsightManagement/lib/models/scriptActionPersistedGetResponseSpec.js +++ b/lib/services/hdInsightManagement/lib/models/scriptActionPersistedGetResponseSpec.js @@ -17,11 +17,11 @@ class ScriptActionPersistedGetResponseSpec { /** * Create a ScriptActionPersistedGetResponseSpec. - * @member {string} [name] The name of script action. - * @member {string} [uri] The URI to the script. - * @member {string} [parameters] The parameters for the script provided. - * @member {array} [roles] The list of roles where script will be executed. - * @member {string} [applicationName] The application name for the script + * @property {string} [name] The name of script action. + * @property {string} [uri] The URI to the script. + * @property {string} [parameters] The parameters for the script provided. + * @property {array} [roles] The list of roles where script will be executed. + * @property {string} [applicationName] The application name for the script * action. */ constructor() { diff --git a/lib/services/hdInsightManagement/lib/models/scriptActionsList.js b/lib/services/hdInsightManagement/lib/models/scriptActionsList.js index b48c4fe8aa..c60a0018fd 100644 --- a/lib/services/hdInsightManagement/lib/models/scriptActionsList.js +++ b/lib/services/hdInsightManagement/lib/models/scriptActionsList.js @@ -16,7 +16,7 @@ class ScriptActionsList extends Array { /** * Create a ScriptActionsList. - * @member {string} [nextLink] The link (url) to the next page of results. + * @property {string} [nextLink] The link (url) to the next page of results. */ constructor() { super(); diff --git a/lib/services/hdInsightManagement/lib/models/securityProfile.js b/lib/services/hdInsightManagement/lib/models/securityProfile.js index 6729d72348..d074328c43 100644 --- a/lib/services/hdInsightManagement/lib/models/securityProfile.js +++ b/lib/services/hdInsightManagement/lib/models/securityProfile.js @@ -18,21 +18,21 @@ class SecurityProfile { /** * Create a SecurityProfile. - * @member {string} [directoryType] The directory type. Possible values + * @property {string} [directoryType] The directory type. Possible values * include: 'ActiveDirectory' - * @member {string} [domain] The organization's active directory domain. - * @member {string} [organizationalUnitDN] The organizational unit within the - * Active Directory to place the cluster and service accounts. - * @member {array} [ldapsUrls] The LDAPS protocol URLs to communicate with + * @property {string} [domain] The organization's active directory domain. + * @property {string} [organizationalUnitDN] The organizational unit within + * the Active Directory to place the cluster and service accounts. + * @property {array} [ldapsUrls] The LDAPS protocol URLs to communicate with * the Active Directory. - * @member {string} [domainUsername] The domain user account that will have + * @property {string} [domainUsername] The domain user account that will have * admin privileges on the cluster. - * @member {string} [domainUserPassword] The domain admin password. - * @member {array} [clusterUsersGroupDNs] Optional. The Distinguished Names + * @property {string} [domainUserPassword] The domain admin password. + * @property {array} [clusterUsersGroupDNs] Optional. The Distinguished Names * for cluster user groups - * @member {string} [aaddsResourceId] The resource ID of the user's Azure + * @property {string} [aaddsResourceId] The resource ID of the user's Azure * Active Directory Domain Service. - * @member {string} [msiResourceId] User assigned identity that has + * @property {string} [msiResourceId] User assigned identity that has * permissions to read and create cluster-related artifacts in the user's * AADDS. */ diff --git a/lib/services/hdInsightManagement/lib/models/sshProfile.js b/lib/services/hdInsightManagement/lib/models/sshProfile.js index d6554aed73..736766a82e 100644 --- a/lib/services/hdInsightManagement/lib/models/sshProfile.js +++ b/lib/services/hdInsightManagement/lib/models/sshProfile.js @@ -17,7 +17,7 @@ class SshProfile { /** * Create a SshProfile. - * @member {array} [publicKeys] The list of SSH public keys. + * @property {array} [publicKeys] The list of SSH public keys. */ constructor() { } diff --git a/lib/services/hdInsightManagement/lib/models/sshPublicKey.js b/lib/services/hdInsightManagement/lib/models/sshPublicKey.js index fdf0a2d5aa..1fe9ec82b6 100644 --- a/lib/services/hdInsightManagement/lib/models/sshPublicKey.js +++ b/lib/services/hdInsightManagement/lib/models/sshPublicKey.js @@ -17,7 +17,7 @@ class SshPublicKey { /** * Create a SshPublicKey. - * @member {string} [certificateData] The certificate for SSH. + * @property {string} [certificateData] The certificate for SSH. */ constructor() { } diff --git a/lib/services/hdInsightManagement/lib/models/storageAccount.js b/lib/services/hdInsightManagement/lib/models/storageAccount.js index b7aa335f48..f95e791f1b 100644 --- a/lib/services/hdInsightManagement/lib/models/storageAccount.js +++ b/lib/services/hdInsightManagement/lib/models/storageAccount.js @@ -17,14 +17,14 @@ class StorageAccount { /** * Create a StorageAccount. - * @member {string} [name] The name of the storage account. - * @member {boolean} [isDefault] Whether or not the storage account is the + * @property {string} [name] The name of the storage account. + * @property {boolean} [isDefault] Whether or not the storage account is the * default storage account. - * @member {string} [container] The container in the storage account, only to - * be specified for WASB storage accounts. - * @member {string} [fileSystem] The filesystem, only to be specified for + * @property {string} [container] The container in the storage account, only + * to be specified for WASB storage accounts. + * @property {string} [fileSystem] The filesystem, only to be specified for * Azure Data Lake Storage type Gen 2. - * @member {string} [key] The storage account access key. + * @property {string} [key] The storage account access key. */ constructor() { } diff --git a/lib/services/hdInsightManagement/lib/models/storageProfile.js b/lib/services/hdInsightManagement/lib/models/storageProfile.js index 052ad37e66..ff2b95943a 100644 --- a/lib/services/hdInsightManagement/lib/models/storageProfile.js +++ b/lib/services/hdInsightManagement/lib/models/storageProfile.js @@ -17,7 +17,7 @@ class StorageProfile { /** * Create a StorageProfile. - * @member {array} [storageaccounts] The list of storage accounts in the + * @property {array} [storageaccounts] The list of storage accounts in the * cluster. */ constructor() { diff --git a/lib/services/hdInsightManagement/lib/models/trackedResource.js b/lib/services/hdInsightManagement/lib/models/trackedResource.js index 3111dfa308..16546acf7b 100644 --- a/lib/services/hdInsightManagement/lib/models/trackedResource.js +++ b/lib/services/hdInsightManagement/lib/models/trackedResource.js @@ -20,8 +20,8 @@ const models = require('./index'); class TrackedResource extends models['Resource'] { /** * Create a TrackedResource. - * @member {string} [location] The Azure Region where the resource lives - * @member {object} [tags] Resource tags. + * @property {string} [location] The Azure Region where the resource lives + * @property {object} [tags] Resource tags. */ constructor() { super(); diff --git a/lib/services/hdInsightManagement/lib/models/usage.js b/lib/services/hdInsightManagement/lib/models/usage.js index 008f23f04b..e179f487c9 100644 --- a/lib/services/hdInsightManagement/lib/models/usage.js +++ b/lib/services/hdInsightManagement/lib/models/usage.js @@ -17,13 +17,13 @@ class Usage { /** * Create a Usage. - * @member {string} [unit] The type of measurement for usage. - * @member {number} [currentValue] The current usage. - * @member {number} [limit] The maximum allowed usage. - * @member {object} [name] The details about the localizable name of the used - * resource. - * @member {string} [name.value] The name of the used resource. - * @member {string} [name.localizedValue] The localized name of the used + * @property {string} [unit] The type of measurement for usage. + * @property {number} [currentValue] The current usage. + * @property {number} [limit] The maximum allowed usage. + * @property {object} [name] The details about the localizable name of the + * used resource. + * @property {string} [name.value] The name of the used resource. + * @property {string} [name.localizedValue] The localized name of the used * resource. */ constructor() { diff --git a/lib/services/hdInsightManagement/lib/models/usagesListResult.js b/lib/services/hdInsightManagement/lib/models/usagesListResult.js index 317ea904f3..1955b71780 100644 --- a/lib/services/hdInsightManagement/lib/models/usagesListResult.js +++ b/lib/services/hdInsightManagement/lib/models/usagesListResult.js @@ -17,7 +17,7 @@ class UsagesListResult { /** * Create a UsagesListResult. - * @member {array} [value] The list of usages. + * @property {array} [value] The list of usages. */ constructor() { } diff --git a/lib/services/hdInsightManagement/lib/models/virtualNetworkProfile.js b/lib/services/hdInsightManagement/lib/models/virtualNetworkProfile.js index 2b30efb3cb..6bc2f147d8 100644 --- a/lib/services/hdInsightManagement/lib/models/virtualNetworkProfile.js +++ b/lib/services/hdInsightManagement/lib/models/virtualNetworkProfile.js @@ -17,8 +17,8 @@ class VirtualNetworkProfile { /** * Create a VirtualNetworkProfile. - * @member {string} [id] The ID of the virtual network. - * @member {string} [subnet] The name of the subnet. + * @property {string} [id] The ID of the virtual network. + * @property {string} [subnet] The name of the subnet. */ constructor() { } diff --git a/lib/services/hdInsightManagement/lib/operations/clusters.js b/lib/services/hdInsightManagement/lib/operations/clusters.js index bc05de32ca..0fa7f3e46f 100644 --- a/lib/services/hdInsightManagement/lib/operations/clusters.js +++ b/lib/services/hdInsightManagement/lib/operations/clusters.js @@ -96,6 +96,28 @@ const WebResource = msRest.WebResource; * @param {array} [parameters.properties.storageProfile.storageaccounts] The * list of storage accounts in the cluster. * + * @param {object} [parameters.properties.diskEncryptionProperties] The disk + * encryption properties. + * + * @param {string} [parameters.properties.diskEncryptionProperties.vaultUri] + * Base key vault URI where the customers key is located eg. + * https://myvault.vault.azure.net + * + * @param {string} [parameters.properties.diskEncryptionProperties.keyName] Key + * name that is used for enabling disk encryption. + * + * @param {string} [parameters.properties.diskEncryptionProperties.keyVersion] + * Specific key version that is used for enabling disk encryption. + * + * @param {string} + * [parameters.properties.diskEncryptionProperties.encryptionAlgorithm] + * Algorithm identifier for encryption, default RSA-OAEP. Possible values + * include: 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5' + * + * @param {string} + * [parameters.properties.diskEncryptionProperties.msiResourceId] Resource ID + * of Managed Identity that is used to access the key vault. + * * @param {object} [parameters.identity] The identity of the cluster, if * configured. * @@ -899,6 +921,80 @@ function _list(options, callback) { } +/** + * Rotate disk encryption key of the specified HDInsight cluster. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} clusterName The name of the cluster. + * + * @param {object} parameters The parameters for the disk encryption operation. + * + * @param {string} [parameters.vaultUri] Base key vault URI where the customers + * key is located eg. https://myvault.vault.azure.net + * + * @param {string} [parameters.keyName] Key name that is used for enabling disk + * encryption. + * + * @param {string} [parameters.keyVersion] Specific key version that is used + * for enabling disk encryption. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _rotateDiskEncryptionKey(resourceGroupName, clusterName, parameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginRotateDiskEncryptionKey(resourceGroupName, clusterName, parameters, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + + return callback(null, result, httpRequest, response); + }); + }); +} + + /** * Executes script actions on the specified HDInsight cluster. * @@ -1050,6 +1146,28 @@ function _executeScriptActions(resourceGroupName, clusterName, parameters, optio * @param {array} [parameters.properties.storageProfile.storageaccounts] The * list of storage accounts in the cluster. * + * @param {object} [parameters.properties.diskEncryptionProperties] The disk + * encryption properties. + * + * @param {string} [parameters.properties.diskEncryptionProperties.vaultUri] + * Base key vault URI where the customers key is located eg. + * https://myvault.vault.azure.net + * + * @param {string} [parameters.properties.diskEncryptionProperties.keyName] Key + * name that is used for enabling disk encryption. + * + * @param {string} [parameters.properties.diskEncryptionProperties.keyVersion] + * Specific key version that is used for enabling disk encryption. + * + * @param {string} + * [parameters.properties.diskEncryptionProperties.encryptionAlgorithm] + * Algorithm identifier for encryption, default RSA-OAEP. Possible values + * include: 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5' + * + * @param {string} + * [parameters.properties.diskEncryptionProperties.msiResourceId] Resource ID + * of Managed Identity that is used to access the key vault. + * * @param {object} [parameters.identity] The identity of the cluster, if * configured. * @@ -1500,6 +1618,162 @@ function _beginResize(resourceGroupName, clusterName, parameters, options, callb }); } +/** + * Rotate disk encryption key of the specified HDInsight cluster. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} clusterName The name of the cluster. + * + * @param {object} parameters The parameters for the disk encryption operation. + * + * @param {string} [parameters.vaultUri] Base key vault URI where the customers + * key is located eg. https://myvault.vault.azure.net + * + * @param {string} [parameters.keyName] Key name that is used for enabling disk + * encryption. + * + * @param {string} [parameters.keyVersion] Specific key version that is used + * for enabling disk encryption. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginRotateDiskEncryptionKey(resourceGroupName, clusterName, parameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (clusterName === null || clusterName === undefined || typeof clusterName.valueOf() !== 'string') { + throw new Error('clusterName cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (parameters === null || parameters === undefined) { + throw new Error('parameters cannot be null or undefined.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/rotatediskencryptionkey'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{clusterName}', encodeURIComponent(clusterName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (parameters !== null && parameters !== undefined) { + let requestModelMapper = new client.models['ClusterDiskEncryptionParameters']().mapper(); + requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(parameters, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorResponse']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + /** * Executes script actions on the specified HDInsight cluster. * @@ -1924,10 +2198,12 @@ class Clusters { this._listByResourceGroup = _listByResourceGroup; this._resize = _resize; this._list = _list; + this._rotateDiskEncryptionKey = _rotateDiskEncryptionKey; this._executeScriptActions = _executeScriptActions; this._beginCreate = _beginCreate; this._beginDeleteMethod = _beginDeleteMethod; this._beginResize = _beginResize; + this._beginRotateDiskEncryptionKey = _beginRotateDiskEncryptionKey; this._beginExecuteScriptActions = _beginExecuteScriptActions; this._listByResourceGroupNext = _listByResourceGroupNext; this._listNext = _listNext; @@ -2014,6 +2290,28 @@ class Clusters { * @param {array} [parameters.properties.storageProfile.storageaccounts] The * list of storage accounts in the cluster. * + * @param {object} [parameters.properties.diskEncryptionProperties] The disk + * encryption properties. + * + * @param {string} [parameters.properties.diskEncryptionProperties.vaultUri] + * Base key vault URI where the customers key is located eg. + * https://myvault.vault.azure.net + * + * @param {string} [parameters.properties.diskEncryptionProperties.keyName] Key + * name that is used for enabling disk encryption. + * + * @param {string} [parameters.properties.diskEncryptionProperties.keyVersion] + * Specific key version that is used for enabling disk encryption. + * + * @param {string} + * [parameters.properties.diskEncryptionProperties.encryptionAlgorithm] + * Algorithm identifier for encryption, default RSA-OAEP. Possible values + * include: 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5' + * + * @param {string} + * [parameters.properties.diskEncryptionProperties.msiResourceId] Resource ID + * of Managed Identity that is used to access the key vault. + * * @param {object} [parameters.identity] The identity of the cluster, if * configured. * @@ -2134,6 +2432,28 @@ class Clusters { * @param {array} [parameters.properties.storageProfile.storageaccounts] The * list of storage accounts in the cluster. * + * @param {object} [parameters.properties.diskEncryptionProperties] The disk + * encryption properties. + * + * @param {string} [parameters.properties.diskEncryptionProperties.vaultUri] + * Base key vault URI where the customers key is located eg. + * https://myvault.vault.azure.net + * + * @param {string} [parameters.properties.diskEncryptionProperties.keyName] Key + * name that is used for enabling disk encryption. + * + * @param {string} [parameters.properties.diskEncryptionProperties.keyVersion] + * Specific key version that is used for enabling disk encryption. + * + * @param {string} + * [parameters.properties.diskEncryptionProperties.encryptionAlgorithm] + * Algorithm identifier for encryption, default RSA-OAEP. Possible values + * include: 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5' + * + * @param {string} + * [parameters.properties.diskEncryptionProperties.msiResourceId] Resource ID + * of Managed Identity that is used to access the key vault. + * * @param {object} [parameters.identity] The identity of the cluster, if * configured. * @@ -2715,6 +3035,113 @@ class Clusters { } } + /** + * Rotate disk encryption key of the specified HDInsight cluster. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} clusterName The name of the cluster. + * + * @param {object} parameters The parameters for the disk encryption operation. + * + * @param {string} [parameters.vaultUri] Base key vault URI where the customers + * key is located eg. https://myvault.vault.azure.net + * + * @param {string} [parameters.keyName] Key name that is used for enabling disk + * encryption. + * + * @param {string} [parameters.keyVersion] Specific key version that is used + * for enabling disk encryption. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + rotateDiskEncryptionKeyWithHttpOperationResponse(resourceGroupName, clusterName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._rotateDiskEncryptionKey(resourceGroupName, clusterName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Rotate disk encryption key of the specified HDInsight cluster. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} clusterName The name of the cluster. + * + * @param {object} parameters The parameters for the disk encryption operation. + * + * @param {string} [parameters.vaultUri] Base key vault URI where the customers + * key is located eg. https://myvault.vault.azure.net + * + * @param {string} [parameters.keyName] Key name that is used for enabling disk + * encryption. + * + * @param {string} [parameters.keyVersion] Specific key version that is used + * for enabling disk encryption. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + rotateDiskEncryptionKey(resourceGroupName, clusterName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._rotateDiskEncryptionKey(resourceGroupName, clusterName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._rotateDiskEncryptionKey(resourceGroupName, clusterName, parameters, options, optionalCallback); + } + } + /** * Executes script actions on the specified HDInsight cluster. * @@ -2897,6 +3324,28 @@ class Clusters { * @param {array} [parameters.properties.storageProfile.storageaccounts] The * list of storage accounts in the cluster. * + * @param {object} [parameters.properties.diskEncryptionProperties] The disk + * encryption properties. + * + * @param {string} [parameters.properties.diskEncryptionProperties.vaultUri] + * Base key vault URI where the customers key is located eg. + * https://myvault.vault.azure.net + * + * @param {string} [parameters.properties.diskEncryptionProperties.keyName] Key + * name that is used for enabling disk encryption. + * + * @param {string} [parameters.properties.diskEncryptionProperties.keyVersion] + * Specific key version that is used for enabling disk encryption. + * + * @param {string} + * [parameters.properties.diskEncryptionProperties.encryptionAlgorithm] + * Algorithm identifier for encryption, default RSA-OAEP. Possible values + * include: 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5' + * + * @param {string} + * [parameters.properties.diskEncryptionProperties.msiResourceId] Resource ID + * of Managed Identity that is used to access the key vault. + * * @param {object} [parameters.identity] The identity of the cluster, if * configured. * @@ -3017,6 +3466,28 @@ class Clusters { * @param {array} [parameters.properties.storageProfile.storageaccounts] The * list of storage accounts in the cluster. * + * @param {object} [parameters.properties.diskEncryptionProperties] The disk + * encryption properties. + * + * @param {string} [parameters.properties.diskEncryptionProperties.vaultUri] + * Base key vault URI where the customers key is located eg. + * https://myvault.vault.azure.net + * + * @param {string} [parameters.properties.diskEncryptionProperties.keyName] Key + * name that is used for enabling disk encryption. + * + * @param {string} [parameters.properties.diskEncryptionProperties.keyVersion] + * Specific key version that is used for enabling disk encryption. + * + * @param {string} + * [parameters.properties.diskEncryptionProperties.encryptionAlgorithm] + * Algorithm identifier for encryption, default RSA-OAEP. Possible values + * include: 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5' + * + * @param {string} + * [parameters.properties.diskEncryptionProperties.msiResourceId] Resource ID + * of Managed Identity that is used to access the key vault. + * * @param {object} [parameters.identity] The identity of the cluster, if * configured. * @@ -3258,6 +3729,113 @@ class Clusters { } } + /** + * Rotate disk encryption key of the specified HDInsight cluster. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} clusterName The name of the cluster. + * + * @param {object} parameters The parameters for the disk encryption operation. + * + * @param {string} [parameters.vaultUri] Base key vault URI where the customers + * key is located eg. https://myvault.vault.azure.net + * + * @param {string} [parameters.keyName] Key name that is used for enabling disk + * encryption. + * + * @param {string} [parameters.keyVersion] Specific key version that is used + * for enabling disk encryption. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginRotateDiskEncryptionKeyWithHttpOperationResponse(resourceGroupName, clusterName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginRotateDiskEncryptionKey(resourceGroupName, clusterName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Rotate disk encryption key of the specified HDInsight cluster. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} clusterName The name of the cluster. + * + * @param {object} parameters The parameters for the disk encryption operation. + * + * @param {string} [parameters.vaultUri] Base key vault URI where the customers + * key is located eg. https://myvault.vault.azure.net + * + * @param {string} [parameters.keyName] Key name that is used for enabling disk + * encryption. + * + * @param {string} [parameters.keyVersion] Specific key version that is used + * for enabling disk encryption. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginRotateDiskEncryptionKey(resourceGroupName, clusterName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginRotateDiskEncryptionKey(resourceGroupName, clusterName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginRotateDiskEncryptionKey(resourceGroupName, clusterName, parameters, options, optionalCallback); + } + } + /** * Executes script actions on the specified HDInsight cluster. * diff --git a/lib/services/hdInsightManagement/lib/operations/index.d.ts b/lib/services/hdInsightManagement/lib/operations/index.d.ts index 168023edfd..835fee92e0 100644 --- a/lib/services/hdInsightManagement/lib/operations/index.d.ts +++ b/lib/services/hdInsightManagement/lib/operations/index.d.ts @@ -102,6 +102,28 @@ export interface Clusters { * @param {array} [parameters.properties.storageProfile.storageaccounts] The * list of storage accounts in the cluster. * + * @param {object} [parameters.properties.diskEncryptionProperties] The disk + * encryption properties. + * + * @param {string} [parameters.properties.diskEncryptionProperties.vaultUri] + * Base key vault URI where the customers key is located eg. + * https://myvault.vault.azure.net + * + * @param {string} [parameters.properties.diskEncryptionProperties.keyName] Key + * name that is used for enabling disk encryption. + * + * @param {string} [parameters.properties.diskEncryptionProperties.keyVersion] + * Specific key version that is used for enabling disk encryption. + * + * @param {string} + * [parameters.properties.diskEncryptionProperties.encryptionAlgorithm] + * Algorithm identifier for encryption, default RSA-OAEP. Possible values + * include: 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5' + * + * @param {string} + * [parameters.properties.diskEncryptionProperties.msiResourceId] Resource ID + * of Managed Identity that is used to access the key vault. + * * @param {object} [parameters.identity] The identity of the cluster, if * configured. * @@ -210,6 +232,28 @@ export interface Clusters { * @param {array} [parameters.properties.storageProfile.storageaccounts] The * list of storage accounts in the cluster. * + * @param {object} [parameters.properties.diskEncryptionProperties] The disk + * encryption properties. + * + * @param {string} [parameters.properties.diskEncryptionProperties.vaultUri] + * Base key vault URI where the customers key is located eg. + * https://myvault.vault.azure.net + * + * @param {string} [parameters.properties.diskEncryptionProperties.keyName] Key + * name that is used for enabling disk encryption. + * + * @param {string} [parameters.properties.diskEncryptionProperties.keyVersion] + * Specific key version that is used for enabling disk encryption. + * + * @param {string} + * [parameters.properties.diskEncryptionProperties.encryptionAlgorithm] + * Algorithm identifier for encryption, default RSA-OAEP. Possible values + * include: 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5' + * + * @param {string} + * [parameters.properties.diskEncryptionProperties.msiResourceId] Resource ID + * of Managed Identity that is used to access the key vault. + * * @param {object} [parameters.identity] The identity of the cluster, if * configured. * @@ -614,6 +658,86 @@ export interface Clusters { list(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** + * Rotate disk encryption key of the specified HDInsight cluster. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} clusterName The name of the cluster. + * + * @param {object} parameters The parameters for the disk encryption operation. + * + * @param {string} [parameters.vaultUri] Base key vault URI where the customers + * key is located eg. https://myvault.vault.azure.net + * + * @param {string} [parameters.keyName] Key name that is used for enabling disk + * encryption. + * + * @param {string} [parameters.keyVersion] Specific key version that is used + * for enabling disk encryption. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + rotateDiskEncryptionKeyWithHttpOperationResponse(resourceGroupName: string, clusterName: string, parameters: models.ClusterDiskEncryptionParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Rotate disk encryption key of the specified HDInsight cluster. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} clusterName The name of the cluster. + * + * @param {object} parameters The parameters for the disk encryption operation. + * + * @param {string} [parameters.vaultUri] Base key vault URI where the customers + * key is located eg. https://myvault.vault.azure.net + * + * @param {string} [parameters.keyName] Key name that is used for enabling disk + * encryption. + * + * @param {string} [parameters.keyVersion] Specific key version that is used + * for enabling disk encryption. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + rotateDiskEncryptionKey(resourceGroupName: string, clusterName: string, parameters: models.ClusterDiskEncryptionParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + rotateDiskEncryptionKey(resourceGroupName: string, clusterName: string, parameters: models.ClusterDiskEncryptionParameters, callback: ServiceCallback): void; + rotateDiskEncryptionKey(resourceGroupName: string, clusterName: string, parameters: models.ClusterDiskEncryptionParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + /** * Executes script actions on the specified HDInsight cluster. * @@ -769,6 +893,28 @@ export interface Clusters { * @param {array} [parameters.properties.storageProfile.storageaccounts] The * list of storage accounts in the cluster. * + * @param {object} [parameters.properties.diskEncryptionProperties] The disk + * encryption properties. + * + * @param {string} [parameters.properties.diskEncryptionProperties.vaultUri] + * Base key vault URI where the customers key is located eg. + * https://myvault.vault.azure.net + * + * @param {string} [parameters.properties.diskEncryptionProperties.keyName] Key + * name that is used for enabling disk encryption. + * + * @param {string} [parameters.properties.diskEncryptionProperties.keyVersion] + * Specific key version that is used for enabling disk encryption. + * + * @param {string} + * [parameters.properties.diskEncryptionProperties.encryptionAlgorithm] + * Algorithm identifier for encryption, default RSA-OAEP. Possible values + * include: 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5' + * + * @param {string} + * [parameters.properties.diskEncryptionProperties.msiResourceId] Resource ID + * of Managed Identity that is used to access the key vault. + * * @param {object} [parameters.identity] The identity of the cluster, if * configured. * @@ -877,6 +1023,28 @@ export interface Clusters { * @param {array} [parameters.properties.storageProfile.storageaccounts] The * list of storage accounts in the cluster. * + * @param {object} [parameters.properties.diskEncryptionProperties] The disk + * encryption properties. + * + * @param {string} [parameters.properties.diskEncryptionProperties.vaultUri] + * Base key vault URI where the customers key is located eg. + * https://myvault.vault.azure.net + * + * @param {string} [parameters.properties.diskEncryptionProperties.keyName] Key + * name that is used for enabling disk encryption. + * + * @param {string} [parameters.properties.diskEncryptionProperties.keyVersion] + * Specific key version that is used for enabling disk encryption. + * + * @param {string} + * [parameters.properties.diskEncryptionProperties.encryptionAlgorithm] + * Algorithm identifier for encryption, default RSA-OAEP. Possible values + * include: 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5' + * + * @param {string} + * [parameters.properties.diskEncryptionProperties.msiResourceId] Resource ID + * of Managed Identity that is used to access the key vault. + * * @param {object} [parameters.identity] The identity of the cluster, if * configured. * @@ -1049,6 +1217,86 @@ export interface Clusters { beginResize(resourceGroupName: string, clusterName: string, parameters: models.ClusterResizeParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** + * Rotate disk encryption key of the specified HDInsight cluster. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} clusterName The name of the cluster. + * + * @param {object} parameters The parameters for the disk encryption operation. + * + * @param {string} [parameters.vaultUri] Base key vault URI where the customers + * key is located eg. https://myvault.vault.azure.net + * + * @param {string} [parameters.keyName] Key name that is used for enabling disk + * encryption. + * + * @param {string} [parameters.keyVersion] Specific key version that is used + * for enabling disk encryption. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginRotateDiskEncryptionKeyWithHttpOperationResponse(resourceGroupName: string, clusterName: string, parameters: models.ClusterDiskEncryptionParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Rotate disk encryption key of the specified HDInsight cluster. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} clusterName The name of the cluster. + * + * @param {object} parameters The parameters for the disk encryption operation. + * + * @param {string} [parameters.vaultUri] Base key vault URI where the customers + * key is located eg. https://myvault.vault.azure.net + * + * @param {string} [parameters.keyName] Key name that is used for enabling disk + * encryption. + * + * @param {string} [parameters.keyVersion] Specific key version that is used + * for enabling disk encryption. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginRotateDiskEncryptionKey(resourceGroupName: string, clusterName: string, parameters: models.ClusterDiskEncryptionParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginRotateDiskEncryptionKey(resourceGroupName: string, clusterName: string, parameters: models.ClusterDiskEncryptionParameters, callback: ServiceCallback): void; + beginRotateDiskEncryptionKey(resourceGroupName: string, clusterName: string, parameters: models.ClusterDiskEncryptionParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + /** * Executes script actions on the specified HDInsight cluster. * diff --git a/lib/services/hdInsightManagement/package.json b/lib/services/hdInsightManagement/package.json index df6b494cac..286a4605f5 100644 --- a/lib/services/hdInsightManagement/package.json +++ b/lib/services/hdInsightManagement/package.json @@ -2,7 +2,7 @@ "name": "azure-arm-hdinsight", "author": "Microsoft Corporation", "description": "HDInsightManagementClient Library with typescript type definitions for node", - "version": "0.10.0", + "version": "0.11.0", "dependencies": { "ms-rest": "^2.3.3", "ms-rest-azure": "^2.5.5" @@ -22,4 +22,4 @@ "bugs": { "url": "https://github.com/azure/azure-sdk-for-node/issues" } -} \ No newline at end of file +} diff --git a/lib/services/imageSearch/lib/imageSearchClient.d.ts b/lib/services/imageSearch/lib/imageSearchClient.d.ts new file mode 100644 index 0000000000..7adb2d9677 --- /dev/null +++ b/lib/services/imageSearch/lib/imageSearchClient.d.ts @@ -0,0 +1,55 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import { ServiceClient, ServiceClientOptions, ServiceClientCredentials } from 'ms-rest'; +import * as models from "./models"; +import * as operations from "./operations"; + +/** + * ImageSearchClientOptions for ImageSearchClient. + */ +declare interface ImageSearchClientOptions extends ServiceClientOptions { + /** + * @property {string} [endpoint] - Supported Cognitive Services endpoints (protocol and hostname, for example: "https://westus.api.cognitive.microsoft.com", "https://api.cognitive.microsoft.com"). + */ + endpoint?: string; +} + +export default class ImageSearchClient extends ServiceClient { + /** + * @class + * Initializes a new instance of the ImageSearchClient class. + * @constructor + * + * @param {credentials} credentials - Subscription credentials which uniquely identify client subscription. + * + * @param {object} [options] - The parameter options + * + * @param {Array} [options.filters] - Filters to be added to the request pipeline + * + * @param {object} [options.requestOptions] - Options for the underlying request object + * {@link https://github.com/request/request#requestoptions-callback Options doc} + * + * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy + * + * @param {string} [options.endpoint] - Supported Cognitive Services endpoints (protocol and hostname, for example: "https://westus.api.cognitive.microsoft.com", "https://api.cognitive.microsoft.com"). + * + */ + constructor(credentials: ServiceClientCredentials, options?: ImageSearchClientOptions); + + credentials: ServiceClientCredentials; + + endpoint: string; + + // Operation groups + imagesOperations: operations.ImagesOperations; +} + +export { ImageSearchClient, models as ImageSearchModels }; diff --git a/lib/services/imageSearch/lib/imageSearchAPIClient.js b/lib/services/imageSearch/lib/imageSearchClient.js similarity index 67% rename from lib/services/imageSearch/lib/imageSearchAPIClient.js rename to lib/services/imageSearch/lib/imageSearchClient.js index 36afb827c5..5bac84d27a 100644 --- a/lib/services/imageSearch/lib/imageSearchAPIClient.js +++ b/lib/services/imageSearch/lib/imageSearchClient.js @@ -21,19 +21,19 @@ const models = require('./models'); const operations = require('./operations'); -/** Class representing a ImageSearchAPIClient. */ -class ImageSearchAPIClient extends ServiceClient { +/** Class representing a ImageSearchClient. */ +class ImageSearchClient extends ServiceClient { /** - * Create a ImageSearchAPIClient. + * Create a ImageSearchClient. * @param {credentials} credentials - Subscription credentials which uniquely identify client subscription. - * @param {string} [baseUri] - The base URI of the service. * @param {object} [options] - The parameter options * @param {Array} [options.filters] - Filters to be added to the request pipeline * @param {object} [options.requestOptions] - Options for the underlying request object * {@link https://github.com/request/request#requestoptions-callback Options doc} * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy + * @param {string} [options.endpoint] - Supported Cognitive Services endpoints (protocol and hostname, for example: "https://westus.api.cognitive.microsoft.com", "https://api.cognitive.microsoft.com"). */ - constructor(credentials, baseUri, options) { + constructor(credentials, options) { if (credentials === null || credentials === undefined) { throw new Error('\'credentials\' cannot be null.'); } @@ -42,14 +42,15 @@ class ImageSearchAPIClient extends ServiceClient { super(credentials, options); - this.baseUri = baseUri; - if (!this.baseUri) { - this.baseUri = 'https://api.cognitive.microsoft.com/bing/v7.0'; - } + this.endpoint = 'https://api.cognitive.microsoft.com'; + this.baseUri = '{Endpoint}/bing/v7.0'; this.credentials = credentials; let packageInfo = this.getPackageJsonInfo(__dirname); this.addUserAgentInfo(`${packageInfo.name}/${packageInfo.version}`); + if(options.endpoint !== null && options.endpoint !== undefined) { + this.endpoint = options.endpoint; + } this.imagesOperations = new operations.ImagesOperations(this); this.models = models; msRest.addSerializationMixin(this); @@ -57,7 +58,7 @@ class ImageSearchAPIClient extends ServiceClient { } -module.exports = ImageSearchAPIClient; -module.exports['default'] = ImageSearchAPIClient; -module.exports.ImageSearchAPIClient = ImageSearchAPIClient; -module.exports.ImageSearchAPIModels = models; +module.exports = ImageSearchClient; +module.exports['default'] = ImageSearchClient; +module.exports.ImageSearchClient = ImageSearchClient; +module.exports.ImageSearchModels = models; diff --git a/lib/services/imageSearch/lib/models/aggregateOffer.js b/lib/services/imageSearch/lib/models/aggregateOffer.js index cb82cb7cad..8d2d7a8434 100644 --- a/lib/services/imageSearch/lib/models/aggregateOffer.js +++ b/lib/services/imageSearch/lib/models/aggregateOffer.js @@ -20,7 +20,7 @@ const models = require('./index'); class AggregateOffer extends models['Offer'] { /** * Create a AggregateOffer. - * @member {array} [offers] A list of offers from merchants that have + * @property {array} [offers] A list of offers from merchants that have * offerings related to the image. */ constructor() { diff --git a/lib/services/imageSearch/lib/models/aggregateRating.js b/lib/services/imageSearch/lib/models/aggregateRating.js index 3726e1d297..b1e311c978 100644 --- a/lib/services/imageSearch/lib/models/aggregateRating.js +++ b/lib/services/imageSearch/lib/models/aggregateRating.js @@ -20,7 +20,7 @@ const models = require('./index'); class AggregateRating extends models['Rating'] { /** * Create a AggregateRating. - * @member {number} [reviewCount] The number of times the recipe has been + * @property {number} [reviewCount] The number of times the recipe has been * rated or reviewed. */ constructor() { diff --git a/lib/services/imageSearch/lib/models/creativeWork.js b/lib/services/imageSearch/lib/models/creativeWork.js index 81456d12ae..237bea3425 100644 --- a/lib/services/imageSearch/lib/models/creativeWork.js +++ b/lib/services/imageSearch/lib/models/creativeWork.js @@ -21,11 +21,11 @@ const models = require('./index'); class CreativeWork extends models['Thing'] { /** * Create a CreativeWork. - * @member {string} [thumbnailUrl] The URL to a thumbnail of the item. - * @member {array} [provider] The source of the creative work. - * @member {string} [datePublished] The date on which the CreativeWork was + * @property {string} [thumbnailUrl] The URL to a thumbnail of the item. + * @property {array} [provider] The source of the creative work. + * @property {string} [datePublished] The date on which the CreativeWork was * published. - * @member {string} [text] Text content of this creative work + * @property {string} [text] Text content of this creative work */ constructor() { super(); diff --git a/lib/services/imageSearch/lib/models/errorModel.js b/lib/services/imageSearch/lib/models/errorModel.js index 29a10321dd..d827e4885e 100644 --- a/lib/services/imageSearch/lib/models/errorModel.js +++ b/lib/services/imageSearch/lib/models/errorModel.js @@ -17,22 +17,22 @@ class ErrorModel { /** * Create a ErrorModel. - * @member {string} code The error code that identifies the category of + * @property {string} code The error code that identifies the category of * error. Possible values include: 'None', 'ServerError', 'InvalidRequest', * 'RateLimitExceeded', 'InvalidAuthorization', 'InsufficientAuthorization'. * Default value: 'None' . - * @member {string} [subCode] The error code that further helps to identify + * @property {string} [subCode] The error code that further helps to identify * the error. Possible values include: 'UnexpectedError', 'ResourceError', * 'NotImplemented', 'ParameterMissing', 'ParameterInvalidValue', * 'HttpNotAllowed', 'Blocked', 'AuthorizationMissing', * 'AuthorizationRedundancy', 'AuthorizationDisabled', 'AuthorizationExpired' - * @member {string} message A description of the error. - * @member {string} [moreDetails] A description that provides additional + * @property {string} message A description of the error. + * @property {string} [moreDetails] A description that provides additional * information about the error. - * @member {string} [parameter] The parameter in the request that caused the - * error. - * @member {string} [value] The parameter's value in the request that was not - * valid. + * @property {string} [parameter] The parameter in the request that caused + * the error. + * @property {string} [value] The parameter's value in the request that was + * not valid. */ constructor() { } diff --git a/lib/services/imageSearch/lib/models/errorResponse.js b/lib/services/imageSearch/lib/models/errorResponse.js index f24c1e64b3..e37d2932b9 100644 --- a/lib/services/imageSearch/lib/models/errorResponse.js +++ b/lib/services/imageSearch/lib/models/errorResponse.js @@ -20,8 +20,8 @@ const models = require('./index'); class ErrorResponse extends models['Response'] { /** * Create a ErrorResponse. - * @member {array} errors A list of errors that describe the reasons why the - * request failed. + * @property {array} errors A list of errors that describe the reasons why + * the request failed. */ constructor() { super(); diff --git a/lib/services/imageSearch/lib/models/identifiable.js b/lib/services/imageSearch/lib/models/identifiable.js index 6cc9e3d679..51ceb85de4 100644 --- a/lib/services/imageSearch/lib/models/identifiable.js +++ b/lib/services/imageSearch/lib/models/identifiable.js @@ -20,7 +20,7 @@ const models = require('./index'); class Identifiable extends models['ResponseBase'] { /** * Create a Identifiable. - * @member {string} [id] A String identifier. + * @property {string} [id] A String identifier. */ constructor() { super(); diff --git a/lib/services/imageSearch/lib/models/imageGallery.js b/lib/services/imageSearch/lib/models/imageGallery.js index 8e24b5b1cd..1a85b99a95 100644 --- a/lib/services/imageSearch/lib/models/imageGallery.js +++ b/lib/services/imageSearch/lib/models/imageGallery.js @@ -20,12 +20,12 @@ const models = require('./index'); class ImageGallery extends models['CollectionPage'] { /** * Create a ImageGallery. - * @member {string} [source] The publisher or social network where the images - * were found. You must attribute the publisher as the source where the - * collection was found. - * @member {number} [imagesCount] The number of related images found in the + * @property {string} [source] The publisher or social network where the + * images were found. You must attribute the publisher as the source where + * the collection was found. + * @property {number} [imagesCount] The number of related images found in the * collection. - * @member {number} [followersCount] The number of users on the social + * @property {number} [followersCount] The number of users on the social * network that follow the creator. */ constructor() { diff --git a/lib/services/imageSearch/lib/models/imageInsights.js b/lib/services/imageSearch/lib/models/imageInsights.js index 6a57409b31..c721fa3471 100644 --- a/lib/services/imageSearch/lib/models/imageInsights.js +++ b/lib/services/imageSearch/lib/models/imageInsights.js @@ -26,123 +26,123 @@ const models = require('./index'); class ImageInsights extends models['Response'] { /** * Create a ImageInsights. - * @member {string} [imageInsightsToken] A token that you use in a subsequent - * call to the Image Search API to get more information about the image. For - * information about using this token, see the insightsToken query parameter. - * This token has the same usage as the token in the Image object. - * @member {object} [bestRepresentativeQuery] The query term that best + * @property {string} [imageInsightsToken] A token that you use in a + * subsequent call to the Image Search API to get more information about the + * image. For information about using this token, see the insightsToken query + * parameter. This token has the same usage as the token in the Image object. + * @property {object} [bestRepresentativeQuery] The query term that best * represents the image. Clicking the link in the Query object, takes the * user to a webpage with more pictures of the image. - * @member {string} [bestRepresentativeQuery.text] The query string. Use this - * string as the query term in a new search request. - * @member {string} [bestRepresentativeQuery.displayText] The display version - * of the query term. This version of the query term may contain special - * characters that highlight the search term found in the query string. The - * string contains the highlighting characters only if the query enabled hit - * highlighting - * @member {string} [bestRepresentativeQuery.webSearchUrl] The URL that takes - * the user to the Bing search results page for the query.Only related search - * results include this field. - * @member {string} [bestRepresentativeQuery.searchLink] The URL that you use - * to get the results of the related search. Before using the URL, you must - * append query parameters as appropriate and include the + * @property {string} [bestRepresentativeQuery.text] The query string. Use + * this string as the query term in a new search request. + * @property {string} [bestRepresentativeQuery.displayText] The display + * version of the query term. This version of the query term may contain + * special characters that highlight the search term found in the query + * string. The string contains the highlighting characters only if the query + * enabled hit highlighting + * @property {string} [bestRepresentativeQuery.webSearchUrl] The URL that + * takes the user to the Bing search results page for the query.Only related + * search results include this field. + * @property {string} [bestRepresentativeQuery.searchLink] The URL that you + * use to get the results of the related search. Before using the URL, you + * must append query parameters as appropriate and include the * Ocp-Apim-Subscription-Key header. Use this URL if you're displaying the * results in your own user interface. Otherwise, use the webSearchUrl URL. - * @member {object} [bestRepresentativeQuery.thumbnail] The URL to a + * @property {object} [bestRepresentativeQuery.thumbnail] The URL to a * thumbnail of a related image. - * @member {object} [bestRepresentativeQuery.thumbnail.thumbnail] The URL to - * a thumbnail of the image - * @member {string} [bestRepresentativeQuery.thumbnail.imageInsightsToken] + * @property {object} [bestRepresentativeQuery.thumbnail.thumbnail] The URL + * to a thumbnail of the image + * @property {string} [bestRepresentativeQuery.thumbnail.imageInsightsToken] * The token that you use in a subsequent call to the Image Search API to get * additional information about the image. For information about using this * token, see the insightsToken query parameter. - * @member {object} [bestRepresentativeQuery.thumbnail.insightsMetadata] A + * @property {object} [bestRepresentativeQuery.thumbnail.insightsMetadata] A * count of the number of websites where you can shop or perform other * actions related to the image. For example, if the image is of an apple * pie, this object includes a count of the number of websites where you can * buy an apple pie. To indicate the number of offers in your UX, include * badging such as a shopping cart icon that contains the count. When the - * user clicks on the icon, use imageInisghtsToken to get the list of + * user clicks on the icon, use imageInsightsToken to get the list of * websites. - * @member {number} + * @property {number} * [bestRepresentativeQuery.thumbnail.insightsMetadata.shoppingSourcesCount] * The number of websites that offer goods of the products seen in the image. - * @member {number} + * @property {number} * [bestRepresentativeQuery.thumbnail.insightsMetadata.recipeSourcesCount] * The number of websites that offer recipes of the food seen in the image. - * @member {object} + * @property {object} * [bestRepresentativeQuery.thumbnail.insightsMetadata.aggregateOffer] A * summary of the online offers of products found in the image. For example, * if the image is of a dress, the offer might identify the lowest price and * the number of offers found. Only visually similar products insights * include this field. The offer includes the following fields: Name, * AggregateRating, OfferCount, and LowPrice. - * @member {array} + * @property {array} * [bestRepresentativeQuery.thumbnail.insightsMetadata.aggregateOffer.offers] * A list of offers from merchants that have offerings related to the image. - * @member {string} [bestRepresentativeQuery.thumbnail.imageId] Unique Id for - * the image - * @member {string} [bestRepresentativeQuery.thumbnail.accentColor] A + * @property {string} [bestRepresentativeQuery.thumbnail.imageId] Unique Id + * for the image + * @property {string} [bestRepresentativeQuery.thumbnail.accentColor] A * three-byte hexadecimal number that represents the color that dominates the * image. Use the color as the temporary background in your client until the * image is loaded. - * @member {string} [bestRepresentativeQuery.thumbnail.visualWords] Visual + * @property {string} [bestRepresentativeQuery.thumbnail.visualWords] Visual * representation of the image. Used for getting more sizes - * @member {object} [imageCaption] The caption to use for the image. - * @member {string} [imageCaption.caption] A caption about the image. - * @member {string} [imageCaption.dataSourceUrl] The URL to the website where - * the caption was found. You must attribute the caption to the source. For - * example, by displaying the domain name from the URL next to the caption - * and using the URL to link to the source website. - * @member {array} [imageCaption.relatedSearches] A list of entities found in - * the caption. Use the contents of the Query object to find the entity in + * @property {object} [imageCaption] The caption to use for the image. + * @property {string} [imageCaption.caption] A caption about the image. + * @property {string} [imageCaption.dataSourceUrl] The URL to the website + * where the caption was found. You must attribute the caption to the source. + * For example, by displaying the domain name from the URL next to the + * caption and using the URL to link to the source website. + * @property {array} [imageCaption.relatedSearches] A list of entities found + * in the caption. Use the contents of the Query object to find the entity in * the caption and create a link. The link takes the user to images of the * entity. - * @member {object} [relatedCollections] A list of links to webpages that + * @property {object} [relatedCollections] A list of links to webpages that * contain related images. - * @member {array} [relatedCollections.value] A list of webpages that contain - * related images. - * @member {object} [pagesIncluding] A list of webpages that contain the + * @property {array} [relatedCollections.value] A list of webpages that + * contain related images. + * @property {object} [pagesIncluding] A list of webpages that contain the * image. To access the webpage, use the URL in the image's hostPageUrl * field. - * @member {array} [pagesIncluding.value] A list of images. - * @member {object} [shoppingSources] A list of merchants that offer items + * @property {array} [pagesIncluding.value] A list of images. + * @property {object} [shoppingSources] A list of merchants that offer items * related to the image. For example, if the image is of an apple pie, the * list contains merchants that are selling apple pies. - * @member {array} [shoppingSources.offers] A list of offers from merchants + * @property {array} [shoppingSources.offers] A list of offers from merchants * that have offerings related to the image. - * @member {object} [relatedSearches] A list of related queries made by + * @property {object} [relatedSearches] A list of related queries made by * others. - * @member {array} [relatedSearches.value] A list of related searches. - * @member {object} [recipes] A list of recipes related to the image. For + * @property {array} [relatedSearches.value] A list of related searches. + * @property {object} [recipes] A list of recipes related to the image. For * example, if the image is of an apple pie, the list contains recipes for * making an apple pie. - * @member {array} [recipes.value] A list of recipes. - * @member {object} [visuallySimilarImages] A list of images that are + * @property {array} [recipes.value] A list of recipes. + * @property {object} [visuallySimilarImages] A list of images that are * visually similar to the original image. For example, if the specified * image is of a sunset over a body of water, the list of similar images are * of a sunset over a body of water. If the specified image is of a person, * similar images might be of the same person or they might be of persons * dressed similarly or in a similar setting. The criteria for similarity * continues to evolve. - * @member {array} [visuallySimilarImages.value] A list of images. - * @member {object} [visuallySimilarProducts] A list of images that contain + * @property {array} [visuallySimilarImages.value] A list of images. + * @property {object} [visuallySimilarProducts] A list of images that contain * products that are visually similar to products found in the original * image. For example, if the specified image contains a dress, the list of * similar images contain a dress. The image provides summary information * about offers that Bing found online for the product. - * @member {array} [visuallySimilarProducts.value] A list of images. - * @member {object} [recognizedEntityGroups] A list of groups that contain + * @property {array} [visuallySimilarProducts.value] A list of images. + * @property {object} [recognizedEntityGroups] A list of groups that contain * images of entities that match the entity found in the specified image. For * example, the response might include images from the general celebrity * group if the entity was recognized in that group. - * @member {array} [recognizedEntityGroups.value] A list of recognized + * @property {array} [recognizedEntityGroups.value] A list of recognized * entities. - * @member {object} [imageTags] A list of characteristics of the content + * @property {object} [imageTags] A list of characteristics of the content * found in the image. For example, if the image is of a person, the tags * might indicate the person's gender and the type of clothes they're * wearing. - * @member {array} [imageTags.value] A list of tags that describe the + * @property {array} [imageTags.value] A list of tags that describe the * characteristics of the content found in the image. For example, if the * image is of a musical artist, the list might include Female, Dress, and * Music to indicate the person is female music artist that's wearing a diff --git a/lib/services/imageSearch/lib/models/imageInsightsImageCaption.js b/lib/services/imageSearch/lib/models/imageInsightsImageCaption.js index f21e949da4..ca642d26fb 100644 --- a/lib/services/imageSearch/lib/models/imageInsightsImageCaption.js +++ b/lib/services/imageSearch/lib/models/imageInsightsImageCaption.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Defines an image's caption. * @@ -19,12 +17,12 @@ const models = require('./index'); class ImageInsightsImageCaption { /** * Create a ImageInsightsImageCaption. - * @member {string} caption A caption about the image. - * @member {string} dataSourceUrl The URL to the website where the caption + * @property {string} caption A caption about the image. + * @property {string} dataSourceUrl The URL to the website where the caption * was found. You must attribute the caption to the source. For example, by * displaying the domain name from the URL next to the caption and using the * URL to link to the source website. - * @member {array} relatedSearches A list of entities found in the caption. + * @property {array} relatedSearches A list of entities found in the caption. * Use the contents of the Query object to find the entity in the caption and * create a link. The link takes the user to images of the entity. */ diff --git a/lib/services/imageSearch/lib/models/imageObject.js b/lib/services/imageSearch/lib/models/imageObject.js index 4f20534df4..271071eb61 100644 --- a/lib/services/imageSearch/lib/models/imageObject.js +++ b/lib/services/imageSearch/lib/models/imageObject.js @@ -20,35 +20,35 @@ const models = require('./index'); class ImageObject extends models['MediaObject'] { /** * Create a ImageObject. - * @member {object} [thumbnail] The URL to a thumbnail of the image - * @member {string} [imageInsightsToken] The token that you use in a + * @property {object} [thumbnail] The URL to a thumbnail of the image + * @property {string} [imageInsightsToken] The token that you use in a * subsequent call to the Image Search API to get additional information * about the image. For information about using this token, see the * insightsToken query parameter. - * @member {object} [insightsMetadata] A count of the number of websites + * @property {object} [insightsMetadata] A count of the number of websites * where you can shop or perform other actions related to the image. For * example, if the image is of an apple pie, this object includes a count of * the number of websites where you can buy an apple pie. To indicate the * number of offers in your UX, include badging such as a shopping cart icon * that contains the count. When the user clicks on the icon, use - * imageInisghtsToken to get the list of websites. - * @member {number} [insightsMetadata.shoppingSourcesCount] The number of + * imageInsightsToken to get the list of websites. + * @property {number} [insightsMetadata.shoppingSourcesCount] The number of * websites that offer goods of the products seen in the image. - * @member {number} [insightsMetadata.recipeSourcesCount] The number of + * @property {number} [insightsMetadata.recipeSourcesCount] The number of * websites that offer recipes of the food seen in the image. - * @member {object} [insightsMetadata.aggregateOffer] A summary of the online - * offers of products found in the image. For example, if the image is of a - * dress, the offer might identify the lowest price and the number of offers - * found. Only visually similar products insights include this field. The - * offer includes the following fields: Name, AggregateRating, OfferCount, - * and LowPrice. - * @member {array} [insightsMetadata.aggregateOffer.offers] A list of offers - * from merchants that have offerings related to the image. - * @member {string} [imageId] Unique Id for the image - * @member {string} [accentColor] A three-byte hexadecimal number that + * @property {object} [insightsMetadata.aggregateOffer] A summary of the + * online offers of products found in the image. For example, if the image is + * of a dress, the offer might identify the lowest price and the number of + * offers found. Only visually similar products insights include this field. + * The offer includes the following fields: Name, AggregateRating, + * OfferCount, and LowPrice. + * @property {array} [insightsMetadata.aggregateOffer.offers] A list of + * offers from merchants that have offerings related to the image. + * @property {string} [imageId] Unique Id for the image + * @property {string} [accentColor] A three-byte hexadecimal number that * represents the color that dominates the image. Use the color as the * temporary background in your client until the image is loaded. - * @member {string} [visualWords] Visual representation of the image. Used + * @property {string} [visualWords] Visual representation of the image. Used * for getting more sizes */ constructor() { diff --git a/lib/services/imageSearch/lib/models/imageTagsModule.js b/lib/services/imageSearch/lib/models/imageTagsModule.js index bbdfc63e55..56869f903f 100644 --- a/lib/services/imageSearch/lib/models/imageTagsModule.js +++ b/lib/services/imageSearch/lib/models/imageTagsModule.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Defines the characteristics of content found in an image. * @@ -19,10 +17,10 @@ const models = require('./index'); class ImageTagsModule { /** * Create a ImageTagsModule. - * @member {array} value A list of tags that describe the characteristics of - * the content found in the image. For example, if the image is of a musical - * artist, the list might include Female, Dress, and Music to indicate the - * person is female music artist that's wearing a dress. + * @property {array} value A list of tags that describe the characteristics + * of the content found in the image. For example, if the image is of a + * musical artist, the list might include Female, Dress, and Music to + * indicate the person is female music artist that's wearing a dress. */ constructor() { } diff --git a/lib/services/imageSearch/lib/models/images.js b/lib/services/imageSearch/lib/models/images.js index 8811ec41ff..c2797b586a 100644 --- a/lib/services/imageSearch/lib/models/images.js +++ b/lib/services/imageSearch/lib/models/images.js @@ -20,21 +20,21 @@ const models = require('./index'); class Images extends models['SearchResultsAnswer'] { /** * Create a Images. - * @member {number} [nextOffset] Used as part of deduping. Tells client the + * @property {number} [nextOffset] Used as part of deduping. Tells client the * next offset that client should use in the next pagination request - * @member {array} value A list of image objects that are relevant to the + * @property {array} value A list of image objects that are relevant to the * query. If there are no results, the List is empty. - * @member {array} [queryExpansions] A list of expanded queries that narrows - * the original query. For example, if the query was Microsoft Surface, the - * expanded queries might be: Microsoft Surface Pro 3, Microsoft Surface RT, - * Microsoft Surface Phone, and Microsoft Surface Hub. - * @member {array} [pivotSuggestions] A list of segments in the original + * @property {array} [queryExpansions] A list of expanded queries that + * narrows the original query. For example, if the query was Microsoft + * Surface, the expanded queries might be: Microsoft Surface Pro 3, Microsoft + * Surface RT, Microsoft Surface Phone, and Microsoft Surface Hub. + * @property {array} [pivotSuggestions] A list of segments in the original * query. For example, if the query was Red Flowers, Bing might segment the * query into Red and Flowers. The Flowers pivot may contain query * suggestions such as Red Peonies and Red Daisies, and the Red pivot may * contain query suggestions such as Green Flowers and Yellow Flowers. - * @member {array} [similarTerms] A list of terms that are similar in meaning - * to the user's query term. + * @property {array} [similarTerms] A list of terms that are similar in + * meaning to the user's query term. */ constructor() { super(); diff --git a/lib/services/imageSearch/lib/models/imagesImageMetadata.js b/lib/services/imageSearch/lib/models/imagesImageMetadata.js index 76fb1f6b0d..e6bdf5d624 100644 --- a/lib/services/imageSearch/lib/models/imagesImageMetadata.js +++ b/lib/services/imageSearch/lib/models/imagesImageMetadata.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Defines a count of the number of websites where you can shop or perform * other actions related to the image. @@ -20,16 +18,16 @@ const models = require('./index'); class ImagesImageMetadata { /** * Create a ImagesImageMetadata. - * @member {number} [shoppingSourcesCount] The number of websites that offer - * goods of the products seen in the image. - * @member {number} [recipeSourcesCount] The number of websites that offer + * @property {number} [shoppingSourcesCount] The number of websites that + * offer goods of the products seen in the image. + * @property {number} [recipeSourcesCount] The number of websites that offer * recipes of the food seen in the image. - * @member {object} [aggregateOffer] A summary of the online offers of + * @property {object} [aggregateOffer] A summary of the online offers of * products found in the image. For example, if the image is of a dress, the * offer might identify the lowest price and the number of offers found. Only * visually similar products insights include this field. The offer includes * the following fields: Name, AggregateRating, OfferCount, and LowPrice. - * @member {array} [aggregateOffer.offers] A list of offers from merchants + * @property {array} [aggregateOffer.offers] A list of offers from merchants * that have offerings related to the image. */ constructor() { diff --git a/lib/services/imageSearch/lib/models/imagesModule.js b/lib/services/imageSearch/lib/models/imagesModule.js index 145cb925c0..8e14996955 100644 --- a/lib/services/imageSearch/lib/models/imagesModule.js +++ b/lib/services/imageSearch/lib/models/imagesModule.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Defines a list of images. * @@ -19,7 +17,7 @@ const models = require('./index'); class ImagesModule { /** * Create a ImagesModule. - * @member {array} [value] A list of images. + * @property {array} [value] A list of images. */ constructor() { } diff --git a/lib/services/imageSearch/lib/models/index.d.ts b/lib/services/imageSearch/lib/models/index.d.ts index 5cc18c55cc..2f2a660c5d 100644 --- a/lib/services/imageSearch/lib/models/index.d.ts +++ b/lib/services/imageSearch/lib/models/index.d.ts @@ -1,1103 +1,796 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import * as moment from "moment"; - /** - * @class - * Initializes a new instance of the ResponseBase class. - * @constructor * Response base - * - * @member {string} _type Polymorphic Discriminator */ export interface ResponseBase { + /** + * Polymorphic Discriminator + */ _type: string; } /** - * @class - * Initializes a new instance of the Identifiable class. - * @constructor * Defines the identity of a resource. - * - * @member {string} [id] A String identifier. */ export interface Identifiable extends ResponseBase { + /** + * A String identifier. + */ readonly id?: string; } /** - * @class - * Initializes a new instance of the Response class. - * @constructor - * Defines a response. All schemas that could be returned at the root of a - * response should inherit from this - * - * @member {string} [readLink] The URL that returns this resource. - * @member {string} [webSearchUrl] The URL To Bing's search result for this - * item. + * Defines a response. All schemas that could be returned at the root of a response should inherit + * from this */ export interface Response extends Identifiable { + /** + * The URL that returns this resource. + */ readonly readLink?: string; + /** + * The URL To Bing's search result for this item. + */ readonly webSearchUrl?: string; } /** - * @class - * Initializes a new instance of the Thing class. - * @constructor * Defines a thing. - * - * @member {string} [name] The name of the thing represented by this object. - * @member {string} [url] The URL to get more information about the thing - * represented by this object. - * @member {object} [image] An image of the item. - * @member {object} [image.thumbnail] The URL to a thumbnail of the image - * @member {string} [image.imageInsightsToken] The token that you use in a - * subsequent call to the Image Search API to get additional information about - * the image. For information about using this token, see the insightsToken - * query parameter. - * @member {object} [image.insightsMetadata] A count of the number of websites - * where you can shop or perform other actions related to the image. For - * example, if the image is of an apple pie, this object includes a count of - * the number of websites where you can buy an apple pie. To indicate the - * number of offers in your UX, include badging such as a shopping cart icon - * that contains the count. When the user clicks on the icon, use - * imageInisghtsToken to get the list of websites. - * @member {number} [image.insightsMetadata.shoppingSourcesCount] The number of - * websites that offer goods of the products seen in the image. - * @member {number} [image.insightsMetadata.recipeSourcesCount] The number of - * websites that offer recipes of the food seen in the image. - * @member {object} [image.insightsMetadata.aggregateOffer] A summary of the - * online offers of products found in the image. For example, if the image is - * of a dress, the offer might identify the lowest price and the number of - * offers found. Only visually similar products insights include this field. - * The offer includes the following fields: Name, AggregateRating, OfferCount, - * and LowPrice. - * @member {array} [image.insightsMetadata.aggregateOffer.offers] A list of - * offers from merchants that have offerings related to the image. - * @member {string} [image.imageId] Unique Id for the image - * @member {string} [image.accentColor] A three-byte hexadecimal number that - * represents the color that dominates the image. Use the color as the - * temporary background in your client until the image is loaded. - * @member {string} [image.visualWords] Visual representation of the image. - * Used for getting more sizes - * @member {string} [description] A short description of the item. - * @member {string} [alternateName] An alias for the item - * @member {string} [bingId] An ID that uniquely identifies this item. */ export interface Thing extends Response { + /** + * The name of the thing represented by this object. + */ readonly name?: string; + /** + * The URL to get more information about the thing represented by this object. + */ readonly url?: string; + /** + * An image of the item. + */ readonly image?: ImageObject; + /** + * A short description of the item. + */ readonly description?: string; + /** + * An alias for the item + */ readonly alternateName?: string; + /** + * An ID that uniquely identifies this item. + */ readonly bingId?: string; } /** - * @class - * Initializes a new instance of the Organization class. - * @constructor * Defines an organization. - * */ export interface Organization extends Thing { } /** - * @class - * Initializes a new instance of the PropertiesItem class. - * @constructor * Defines an item. - * - * @member {string} [text] Text representation of an item. - * @member {string} _type Polymorphic Discriminator */ export interface PropertiesItem { + /** + * Text representation of an item. + */ readonly text?: string; + /** + * Polymorphic Discriminator + */ _type: string; } /** - * @class - * Initializes a new instance of the Rating class. - * @constructor * Defines a rating. - * - * @member {number} ratingValue The mean (average) rating. The possible values - * are 1.0 through 5.0. - * @member {number} [bestRating] The highest rated review. The possible values - * are 1.0 through 5.0. */ export interface Rating extends PropertiesItem { + /** + * The mean (average) rating. The possible values are 1.0 through 5.0. + */ ratingValue: number; + /** + * The highest rated review. The possible values are 1.0 through 5.0. + */ readonly bestRating?: number; } /** - * @class - * Initializes a new instance of the AggregateRating class. - * @constructor * Defines the metrics that indicate how well an item was rated by others. - * - * @member {number} [reviewCount] The number of times the recipe has been rated - * or reviewed. */ export interface AggregateRating extends Rating { + /** + * The number of times the recipe has been rated or reviewed. + */ readonly reviewCount?: number; } /** - * @class - * Initializes a new instance of the Offer class. - * @constructor * Defines a merchant's offer. - * - * @member {object} [seller] Seller for this offer - * @member {number} [price] The item's price. - * @member {string} [priceCurrency] The monetary currency. For example, USD. - * Possible values include: 'USD', 'CAD', 'GBP', 'EUR', 'COP', 'JPY', 'CNY', - * 'AUD', 'INR', 'AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', 'ARS', 'AWG', 'AZN', - * 'BAM', 'BBD', 'BDT', 'BGN', 'BHD', 'BIF', 'BMD', 'BND', 'BOB', 'BOV', 'BRL', - * 'BSD', 'BTN', 'BWP', 'BYR', 'BZD', 'CDF', 'CHE', 'CHF', 'CHW', 'CLF', 'CLP', - * 'COU', 'CRC', 'CUC', 'CUP', 'CVE', 'CZK', 'DJF', 'DKK', 'DOP', 'DZD', 'EGP', - * 'ERN', 'ETB', 'FJD', 'FKP', 'GEL', 'GHS', 'GIP', 'GMD', 'GNF', 'GTQ', 'GYD', - * 'HKD', 'HNL', 'HRK', 'HTG', 'HUF', 'IDR', 'ILS', 'IQD', 'IRR', 'ISK', 'JMD', - * 'JOD', 'KES', 'KGS', 'KHR', 'KMF', 'KPW', 'KRW', 'KWD', 'KYD', 'KZT', 'LAK', - * 'LBP', 'LKR', 'LRD', 'LSL', 'LYD', 'MAD', 'MDL', 'MGA', 'MKD', 'MMK', 'MNT', - * 'MOP', 'MRO', 'MUR', 'MVR', 'MWK', 'MXN', 'MXV', 'MYR', 'MZN', 'NAD', 'NGN', - * 'NIO', 'NOK', 'NPR', 'NZD', 'OMR', 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', 'PLN', - * 'PYG', 'QAR', 'RON', 'RSD', 'RUB', 'RWF', 'SAR', 'SBD', 'SCR', 'SDG', 'SEK', - * 'SGD', 'SHP', 'SLL', 'SOS', 'SRD', 'SSP', 'STD', 'SYP', 'SZL', 'THB', 'TJS', - * 'TMT', 'TND', 'TOP', 'TRY', 'TTD', 'TWD', 'TZS', 'UAH', 'UGX', 'UYU', 'UZS', - * 'VEF', 'VND', 'VUV', 'WST', 'XAF', 'XCD', 'XOF', 'XPF', 'YER', 'ZAR', 'ZMW'. - * Default value: 'USD' . - * @member {string} [availability] The item's availability. The following are - * the possible values: Discontinued, InStock, InStoreOnly, - * LimitedAvailability, OnlineOnly, OutOfStock, PreOrder, SoldOut. Possible - * values include: 'Discontinued', 'InStock', 'InStoreOnly', - * 'LimitedAvailability', 'OnlineOnly', 'OutOfStock', 'PreOrder', 'SoldOut' - * @member {object} [aggregateRating] An aggregated rating that indicates how - * well the product has been rated by others. - * @member {number} [aggregateRating.reviewCount] The number of times the - * recipe has been rated or reviewed. - * @member {string} [lastUpdated] The last date that the offer was updated. The - * date is in the form YYYY-MM-DD. */ export interface Offer extends Thing { + /** + * Seller for this offer + */ readonly seller?: Organization; + /** + * The item's price. + */ readonly price?: number; + /** + * The monetary currency. For example, USD. Possible values include: 'USD', 'CAD', 'GBP', 'EUR', + * 'COP', 'JPY', 'CNY', 'AUD', 'INR', 'AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', 'ARS', 'AWG', + * 'AZN', 'BAM', 'BBD', 'BDT', 'BGN', 'BHD', 'BIF', 'BMD', 'BND', 'BOB', 'BOV', 'BRL', 'BSD', + * 'BTN', 'BWP', 'BYR', 'BZD', 'CDF', 'CHE', 'CHF', 'CHW', 'CLF', 'CLP', 'COU', 'CRC', 'CUC', + * 'CUP', 'CVE', 'CZK', 'DJF', 'DKK', 'DOP', 'DZD', 'EGP', 'ERN', 'ETB', 'FJD', 'FKP', 'GEL', + * 'GHS', 'GIP', 'GMD', 'GNF', 'GTQ', 'GYD', 'HKD', 'HNL', 'HRK', 'HTG', 'HUF', 'IDR', 'ILS', + * 'IQD', 'IRR', 'ISK', 'JMD', 'JOD', 'KES', 'KGS', 'KHR', 'KMF', 'KPW', 'KRW', 'KWD', 'KYD', + * 'KZT', 'LAK', 'LBP', 'LKR', 'LRD', 'LSL', 'LYD', 'MAD', 'MDL', 'MGA', 'MKD', 'MMK', 'MNT', + * 'MOP', 'MRO', 'MUR', 'MVR', 'MWK', 'MXN', 'MXV', 'MYR', 'MZN', 'NAD', 'NGN', 'NIO', 'NOK', + * 'NPR', 'NZD', 'OMR', 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', 'PLN', 'PYG', 'QAR', 'RON', 'RSD', + * 'RUB', 'RWF', 'SAR', 'SBD', 'SCR', 'SDG', 'SEK', 'SGD', 'SHP', 'SLL', 'SOS', 'SRD', 'SSP', + * 'STD', 'SYP', 'SZL', 'THB', 'TJS', 'TMT', 'TND', 'TOP', 'TRY', 'TTD', 'TWD', 'TZS', 'UAH', + * 'UGX', 'UYU', 'UZS', 'VEF', 'VND', 'VUV', 'WST', 'XAF', 'XCD', 'XOF', 'XPF', 'YER', 'ZAR', + * 'ZMW' + */ readonly priceCurrency?: string; + /** + * The item's availability. The following are the possible values: Discontinued, InStock, + * InStoreOnly, LimitedAvailability, OnlineOnly, OutOfStock, PreOrder, SoldOut. Possible values + * include: 'Discontinued', 'InStock', 'InStoreOnly', 'LimitedAvailability', 'OnlineOnly', + * 'OutOfStock', 'PreOrder', 'SoldOut' + */ readonly availability?: string; + /** + * An aggregated rating that indicates how well the product has been rated by others. + */ readonly aggregateRating?: AggregateRating; + /** + * The last date that the offer was updated. The date is in the form YYYY-MM-DD. + */ readonly lastUpdated?: string; } /** - * @class - * Initializes a new instance of the AggregateOffer class. - * @constructor * Defines a list of offers from merchants that are related to the image. - * - * @member {array} [offers] A list of offers from merchants that have offerings - * related to the image. */ export interface AggregateOffer extends Offer { + /** + * A list of offers from merchants that have offerings related to the image. + */ readonly offers?: Offer[]; } /** - * @class - * Initializes a new instance of the ImagesImageMetadata class. - * @constructor - * Defines a count of the number of websites where you can shop or perform - * other actions related to the image. - * - * @member {number} [shoppingSourcesCount] The number of websites that offer - * goods of the products seen in the image. - * @member {number} [recipeSourcesCount] The number of websites that offer - * recipes of the food seen in the image. - * @member {object} [aggregateOffer] A summary of the online offers of products - * found in the image. For example, if the image is of a dress, the offer might - * identify the lowest price and the number of offers found. Only visually - * similar products insights include this field. The offer includes the - * following fields: Name, AggregateRating, OfferCount, and LowPrice. - * @member {array} [aggregateOffer.offers] A list of offers from merchants that - * have offerings related to the image. + * Defines a count of the number of websites where you can shop or perform other actions related to + * the image. */ export interface ImagesImageMetadata { + /** + * The number of websites that offer goods of the products seen in the image. + */ readonly shoppingSourcesCount?: number; + /** + * The number of websites that offer recipes of the food seen in the image. + */ readonly recipeSourcesCount?: number; + /** + * A summary of the online offers of products found in the image. For example, if the image is of + * a dress, the offer might identify the lowest price and the number of offers found. Only + * visually similar products insights include this field. The offer includes the following + * fields: Name, AggregateRating, OfferCount, and LowPrice. + */ readonly aggregateOffer?: AggregateOffer; } /** - * @class - * Initializes a new instance of the CreativeWork class. - * @constructor - * The most generic kind of creative work, including books, movies, - * photographs, software programs, etc. - * - * @member {string} [thumbnailUrl] The URL to a thumbnail of the item. - * @member {array} [provider] The source of the creative work. - * @member {string} [datePublished] The date on which the CreativeWork was - * published. - * @member {string} [text] Text content of this creative work + * The most generic kind of creative work, including books, movies, photographs, software programs, + * etc. */ export interface CreativeWork extends Thing { + /** + * The URL to a thumbnail of the item. + */ readonly thumbnailUrl?: string; + /** + * The source of the creative work. + */ readonly provider?: Thing[]; + /** + * The date on which the CreativeWork was published. + */ readonly datePublished?: string; + /** + * Text content of this creative work + */ readonly text?: string; } /** - * @class - * Initializes a new instance of the MediaObject class. - * @constructor * Defines a media object. - * - * @member {string} [contentUrl] Original URL to retrieve the source (file) for - * the media object (e.g the source URL for the image). - * @member {string} [hostPageUrl] URL of the page that hosts the media object. - * @member {string} [contentSize] Size of the media object content (use format - * "value unit" e.g "1024 B"). - * @member {string} [encodingFormat] Encoding format (e.g mp3, mp4, jpeg, etc). - * @member {string} [hostPageDisplayUrl] Display URL of the page that hosts the - * media object. - * @member {number} [width] The width of the source media object, in pixels. - * @member {number} [height] The height of the source media object, in pixels. */ export interface MediaObject extends CreativeWork { + /** + * Original URL to retrieve the source (file) for the media object (e.g the source URL for the + * image). + */ readonly contentUrl?: string; + /** + * URL of the page that hosts the media object. + */ readonly hostPageUrl?: string; + /** + * Size of the media object content (use format "value unit" e.g "1024 B"). + */ readonly contentSize?: string; + /** + * Encoding format (e.g mp3, mp4, jpeg, etc). + */ readonly encodingFormat?: string; + /** + * Display URL of the page that hosts the media object. + */ readonly hostPageDisplayUrl?: string; + /** + * The width of the source media object, in pixels. + */ readonly width?: number; + /** + * The height of the source media object, in pixels. + */ readonly height?: number; } /** - * @class - * Initializes a new instance of the ImageObject class. - * @constructor * Defines an image - * - * @member {object} [thumbnail] The URL to a thumbnail of the image - * @member {string} [imageInsightsToken] The token that you use in a subsequent - * call to the Image Search API to get additional information about the image. - * For information about using this token, see the insightsToken query - * parameter. - * @member {object} [insightsMetadata] A count of the number of websites where - * you can shop or perform other actions related to the image. For example, if - * the image is of an apple pie, this object includes a count of the number of - * websites where you can buy an apple pie. To indicate the number of offers in - * your UX, include badging such as a shopping cart icon that contains the - * count. When the user clicks on the icon, use imageInisghtsToken to get the - * list of websites. - * @member {number} [insightsMetadata.shoppingSourcesCount] The number of - * websites that offer goods of the products seen in the image. - * @member {number} [insightsMetadata.recipeSourcesCount] The number of - * websites that offer recipes of the food seen in the image. - * @member {object} [insightsMetadata.aggregateOffer] A summary of the online - * offers of products found in the image. For example, if the image is of a - * dress, the offer might identify the lowest price and the number of offers - * found. Only visually similar products insights include this field. The offer - * includes the following fields: Name, AggregateRating, OfferCount, and - * LowPrice. - * @member {array} [insightsMetadata.aggregateOffer.offers] A list of offers - * from merchants that have offerings related to the image. - * @member {string} [imageId] Unique Id for the image - * @member {string} [accentColor] A three-byte hexadecimal number that - * represents the color that dominates the image. Use the color as the - * temporary background in your client until the image is loaded. - * @member {string} [visualWords] Visual representation of the image. Used for - * getting more sizes */ export interface ImageObject extends MediaObject { + /** + * The URL to a thumbnail of the image + */ readonly thumbnail?: ImageObject; + /** + * The token that you use in a subsequent call to the Image Search API to get additional + * information about the image. For information about using this token, see the insightsToken + * query parameter. + */ readonly imageInsightsToken?: string; + /** + * A count of the number of websites where you can shop or perform other actions related to the + * image. For example, if the image is of an apple pie, this object includes a count of the + * number of websites where you can buy an apple pie. To indicate the number of offers in your + * UX, include badging such as a shopping cart icon that contains the count. When the user clicks + * on the icon, use imageInsightsToken to get the list of websites. + */ readonly insightsMetadata?: ImagesImageMetadata; + /** + * Unique Id for the image + */ readonly imageId?: string; + /** + * A three-byte hexadecimal number that represents the color that dominates the image. Use the + * color as the temporary background in your client until the image is loaded. + */ readonly accentColor?: string; + /** + * Visual representation of the image. Used for getting more sizes + */ readonly visualWords?: string; } /** - * @class - * Initializes a new instance of the Query class. - * @constructor * Defines a search query. - * - * @member {string} text The query string. Use this string as the query term in - * a new search request. - * @member {string} [displayText] The display version of the query term. This - * version of the query term may contain special characters that highlight the - * search term found in the query string. The string contains the highlighting - * characters only if the query enabled hit highlighting - * @member {string} [webSearchUrl] The URL that takes the user to the Bing - * search results page for the query.Only related search results include this - * field. - * @member {string} [searchLink] The URL that you use to get the results of the - * related search. Before using the URL, you must append query parameters as - * appropriate and include the Ocp-Apim-Subscription-Key header. Use this URL - * if you're displaying the results in your own user interface. Otherwise, use - * the webSearchUrl URL. - * @member {object} [thumbnail] The URL to a thumbnail of a related image. - * @member {object} [thumbnail.thumbnail] The URL to a thumbnail of the image - * @member {string} [thumbnail.imageInsightsToken] The token that you use in a - * subsequent call to the Image Search API to get additional information about - * the image. For information about using this token, see the insightsToken - * query parameter. - * @member {object} [thumbnail.insightsMetadata] A count of the number of - * websites where you can shop or perform other actions related to the image. - * For example, if the image is of an apple pie, this object includes a count - * of the number of websites where you can buy an apple pie. To indicate the - * number of offers in your UX, include badging such as a shopping cart icon - * that contains the count. When the user clicks on the icon, use - * imageInisghtsToken to get the list of websites. - * @member {number} [thumbnail.insightsMetadata.shoppingSourcesCount] The - * number of websites that offer goods of the products seen in the image. - * @member {number} [thumbnail.insightsMetadata.recipeSourcesCount] The number - * of websites that offer recipes of the food seen in the image. - * @member {object} [thumbnail.insightsMetadata.aggregateOffer] A summary of - * the online offers of products found in the image. For example, if the image - * is of a dress, the offer might identify the lowest price and the number of - * offers found. Only visually similar products insights include this field. - * The offer includes the following fields: Name, AggregateRating, OfferCount, - * and LowPrice. - * @member {array} [thumbnail.insightsMetadata.aggregateOffer.offers] A list of - * offers from merchants that have offerings related to the image. - * @member {string} [thumbnail.imageId] Unique Id for the image - * @member {string} [thumbnail.accentColor] A three-byte hexadecimal number - * that represents the color that dominates the image. Use the color as the - * temporary background in your client until the image is loaded. - * @member {string} [thumbnail.visualWords] Visual representation of the image. - * Used for getting more sizes */ export interface Query { + /** + * The query string. Use this string as the query term in a new search request. + */ text: string; + /** + * The display version of the query term. This version of the query term may contain special + * characters that highlight the search term found in the query string. The string contains the + * highlighting characters only if the query enabled hit highlighting + */ readonly displayText?: string; + /** + * The URL that takes the user to the Bing search results page for the query.Only related search + * results include this field. + */ readonly webSearchUrl?: string; + /** + * The URL that you use to get the results of the related search. Before using the URL, you must + * append query parameters as appropriate and include the Ocp-Apim-Subscription-Key header. Use + * this URL if you're displaying the results in your own user interface. Otherwise, use the + * webSearchUrl URL. + */ readonly searchLink?: string; + /** + * The URL to a thumbnail of a related image. + */ readonly thumbnail?: ImageObject; } /** - * @class - * Initializes a new instance of the PivotSuggestions class. - * @constructor * Defines the pivot segment. - * - * @member {string} pivot The segment from the original query to pivot on. - * @member {array} suggestions A list of suggested queries for the pivot. */ export interface PivotSuggestions { + /** + * The segment from the original query to pivot on. + */ pivot: string; + /** + * A list of suggested queries for the pivot. + */ suggestions: Query[]; } /** - * @class - * Initializes a new instance of the Answer class. - * @constructor * Defines an answer. - * */ export interface Answer extends Response { } /** - * @class - * Initializes a new instance of the SearchResultsAnswer class. - * @constructor * Defines a search result answer. - * - * @member {number} [totalEstimatedMatches] The estimated number of webpages - * that are relevant to the query. Use this number along with the count and - * offset query parameters to page the results. */ export interface SearchResultsAnswer extends Answer { + /** + * The estimated number of webpages that are relevant to the query. Use this number along with + * the count and offset query parameters to page the results. + */ readonly totalEstimatedMatches?: number; } /** - * @class - * Initializes a new instance of the Images class. - * @constructor * Defines an image answer - * - * @member {number} [nextOffset] Used as part of deduping. Tells client the - * next offset that client should use in the next pagination request - * @member {array} value A list of image objects that are relevant to the - * query. If there are no results, the List is empty. - * @member {array} [queryExpansions] A list of expanded queries that narrows - * the original query. For example, if the query was Microsoft Surface, the - * expanded queries might be: Microsoft Surface Pro 3, Microsoft Surface RT, - * Microsoft Surface Phone, and Microsoft Surface Hub. - * @member {array} [pivotSuggestions] A list of segments in the original query. - * For example, if the query was Red Flowers, Bing might segment the query into - * Red and Flowers. The Flowers pivot may contain query suggestions such as Red - * Peonies and Red Daisies, and the Red pivot may contain query suggestions - * such as Green Flowers and Yellow Flowers. - * @member {array} [similarTerms] A list of terms that are similar in meaning - * to the user's query term. */ export interface Images extends SearchResultsAnswer { + /** + * Used as part of deduping. Tells client the next offset that client should use in the next + * pagination request + */ readonly nextOffset?: number; + /** + * A list of image objects that are relevant to the query. If there are no results, the List is + * empty. + */ value: ImageObject[]; + /** + * A list of expanded queries that narrows the original query. For example, if the query was + * Microsoft Surface, the expanded queries might be: Microsoft Surface Pro 3, Microsoft Surface + * RT, Microsoft Surface Phone, and Microsoft Surface Hub. + */ readonly queryExpansions?: Query[]; + /** + * A list of segments in the original query. For example, if the query was Red Flowers, Bing + * might segment the query into Red and Flowers. The Flowers pivot may contain query suggestions + * such as Red Peonies and Red Daisies, and the Red pivot may contain query suggestions such as + * Green Flowers and Yellow Flowers. + */ readonly pivotSuggestions?: PivotSuggestions[]; + /** + * A list of terms that are similar in meaning to the user's query term. + */ readonly similarTerms?: Query[]; } /** - * @class - * Initializes a new instance of the ErrorModel class. - * @constructor * Defines the error that occurred. - * - * @member {string} code The error code that identifies the category of error. - * Possible values include: 'None', 'ServerError', 'InvalidRequest', - * 'RateLimitExceeded', 'InvalidAuthorization', 'InsufficientAuthorization'. - * Default value: 'None' . - * @member {string} [subCode] The error code that further helps to identify the - * error. Possible values include: 'UnexpectedError', 'ResourceError', - * 'NotImplemented', 'ParameterMissing', 'ParameterInvalidValue', - * 'HttpNotAllowed', 'Blocked', 'AuthorizationMissing', - * 'AuthorizationRedundancy', 'AuthorizationDisabled', 'AuthorizationExpired' - * @member {string} message A description of the error. - * @member {string} [moreDetails] A description that provides additional - * information about the error. - * @member {string} [parameter] The parameter in the request that caused the - * error. - * @member {string} [value] The parameter's value in the request that was not - * valid. */ export interface ErrorModel { + /** + * The error code that identifies the category of error. Possible values include: 'None', + * 'ServerError', 'InvalidRequest', 'RateLimitExceeded', 'InvalidAuthorization', + * 'InsufficientAuthorization' + */ code: string; + /** + * The error code that further helps to identify the error. Possible values include: + * 'UnexpectedError', 'ResourceError', 'NotImplemented', 'ParameterMissing', + * 'ParameterInvalidValue', 'HttpNotAllowed', 'Blocked', 'AuthorizationMissing', + * 'AuthorizationRedundancy', 'AuthorizationDisabled', 'AuthorizationExpired' + */ readonly subCode?: string; + /** + * A description of the error. + */ message: string; + /** + * A description that provides additional information about the error. + */ readonly moreDetails?: string; + /** + * The parameter in the request that caused the error. + */ readonly parameter?: string; + /** + * The parameter's value in the request that was not valid. + */ readonly value?: string; } /** - * @class - * Initializes a new instance of the ErrorResponse class. - * @constructor * The top-level response that represents a failed request. - * - * @member {array} errors A list of errors that describe the reasons why the - * request failed. */ export interface ErrorResponse extends Response { + /** + * A list of errors that describe the reasons why the request failed. + */ errors: ErrorModel[]; } /** - * @class - * Initializes a new instance of the ImageInsightsImageCaption class. - * @constructor * Defines an image's caption. - * - * @member {string} caption A caption about the image. - * @member {string} dataSourceUrl The URL to the website where the caption was - * found. You must attribute the caption to the source. For example, by - * displaying the domain name from the URL next to the caption and using the - * URL to link to the source website. - * @member {array} relatedSearches A list of entities found in the caption. Use - * the contents of the Query object to find the entity in the caption and - * create a link. The link takes the user to images of the entity. */ export interface ImageInsightsImageCaption { + /** + * A caption about the image. + */ caption: string; + /** + * The URL to the website where the caption was found. You must attribute the caption to the + * source. For example, by displaying the domain name from the URL next to the caption and using + * the URL to link to the source website. + */ dataSourceUrl: string; + /** + * A list of entities found in the caption. Use the contents of the Query object to find the + * entity in the caption and create a link. The link takes the user to images of the entity. + */ relatedSearches: Query[]; } /** - * @class - * Initializes a new instance of the WebPage class. - * @constructor * Defines a webpage that is relevant to the query. - * */ export interface WebPage extends CreativeWork { } /** - * @class - * Initializes a new instance of the CollectionPage class. - * @constructor * Defines a link to a webpage that contains a collection. - * */ export interface CollectionPage extends WebPage { } /** - * @class - * Initializes a new instance of the ImageGallery class. - * @constructor * Defines a link to a webpage that contains a collection of related images. - * - * @member {string} [source] The publisher or social network where the images - * were found. You must attribute the publisher as the source where the - * collection was found. - * @member {number} [imagesCount] The number of related images found in the - * collection. - * @member {number} [followersCount] The number of users on the social network - * that follow the creator. */ export interface ImageGallery extends CollectionPage { + /** + * The publisher or social network where the images were found. You must attribute the publisher + * as the source where the collection was found. + */ readonly source?: string; + /** + * The number of related images found in the collection. + */ readonly imagesCount?: number; + /** + * The number of users on the social network that follow the creator. + */ readonly followersCount?: number; } /** - * @class - * Initializes a new instance of the RelatedCollectionsModule class. - * @constructor * Defines a list of webpages that contain related images. - * - * @member {array} [value] A list of webpages that contain related images. */ export interface RelatedCollectionsModule { + /** + * A list of webpages that contain related images. + */ readonly value?: ImageGallery[]; } /** - * @class - * Initializes a new instance of the ImagesModule class. - * @constructor * Defines a list of images. - * - * @member {array} [value] A list of images. */ export interface ImagesModule { + /** + * A list of images. + */ readonly value?: ImageObject[]; } /** - * @class - * Initializes a new instance of the RelatedSearchesModule class. - * @constructor * Defines a list of related searches. - * - * @member {array} [value] A list of related searches. */ export interface RelatedSearchesModule { + /** + * A list of related searches. + */ readonly value?: Query[]; } /** - * @class - * Initializes a new instance of the Recipe class. - * @constructor * Defines a cooking recipe. - * - * @member {string} [cookTime] The amount of time the food takes to cook. For - * example, PT25M. For information about the time format, see - * http://en.wikipedia.org/wiki/ISO_8601#Durations. - * @member {string} [prepTime] The amount of time required to prepare the - * ingredients. For example, PT15M. For information about the time format, see - * http://en.wikipedia.org/wiki/ISO_8601#Durations. - * @member {string} [totalTime] The total amount of time it takes to prepare - * and cook the recipe. For example, PT45M. For information about the time - * format, see http://en.wikipedia.org/wiki/ISO_8601#Durations. */ export interface Recipe extends CreativeWork { + /** + * The amount of time the food takes to cook. For example, PT25M. For information about the time + * format, see http://en.wikipedia.org/wiki/ISO_8601#Durations. + */ readonly cookTime?: string; + /** + * The amount of time required to prepare the ingredients. For example, PT15M. For information + * about the time format, see http://en.wikipedia.org/wiki/ISO_8601#Durations. + */ readonly prepTime?: string; + /** + * The total amount of time it takes to prepare and cook the recipe. For example, PT45M. For + * information about the time format, see http://en.wikipedia.org/wiki/ISO_8601#Durations. + */ readonly totalTime?: string; } /** - * @class - * Initializes a new instance of the RecipesModule class. - * @constructor * Defines a list of recipes. - * - * @member {array} [value] A list of recipes. */ export interface RecipesModule { + /** + * A list of recipes. + */ readonly value?: Recipe[]; } /** - * @class - * Initializes a new instance of the Intangible class. - * @constructor - * A utility class that serves as the umbrella for a number of 'intangible' - * things such as quantities, structured values, etc. - * + * A utility class that serves as the umbrella for a number of 'intangible' things such as + * quantities, structured values, etc. */ export interface Intangible extends Thing { } -/** - * @class - * Initializes a new instance of the StructuredValue class. - * @constructor - */ export interface StructuredValue extends Intangible { } /** - * @class - * Initializes a new instance of the NormalizedRectangle class. - * @constructor - * Defines a region of an image. The region is defined by the coordinates of - * the top, left corner and bottom, right corner of the region. The coordinates - * are fractional values of the original image's width and height in the range - * 0.0 through 1.0. - * - * @member {number} left The left coordinate. - * @member {number} top The top coordinate - * @member {number} right The right coordinate - * @member {number} bottom The bottom coordinate - */ + * Defines a region of an image. The region is defined by the coordinates of the top, left corner + * and bottom, right corner of the region. The coordinates are fractional values of the original + * image's width and height in the range 0.0 through 1.0. +*/ export interface NormalizedRectangle extends StructuredValue { + /** + * The left coordinate. + */ left: number; + /** + * The top coordinate + */ top: number; + /** + * The right coordinate + */ right: number; + /** + * The bottom coordinate + */ bottom: number; } /** - * @class - * Initializes a new instance of the RecognizedEntity class. - * @constructor * Defines a recognized entity. - * - * @member {object} [entity] The entity that was recognized. The following are - * the possible entity objects: Person - * @member {string} [entity.name] The name of the thing represented by this - * object. - * @member {string} [entity.url] The URL to get more information about the - * thing represented by this object. - * @member {object} [entity.image] An image of the item. - * @member {object} [entity.image.thumbnail] The URL to a thumbnail of the - * image - * @member {string} [entity.image.imageInsightsToken] The token that you use in - * a subsequent call to the Image Search API to get additional information - * about the image. For information about using this token, see the - * insightsToken query parameter. - * @member {object} [entity.image.insightsMetadata] A count of the number of - * websites where you can shop or perform other actions related to the image. - * For example, if the image is of an apple pie, this object includes a count - * of the number of websites where you can buy an apple pie. To indicate the - * number of offers in your UX, include badging such as a shopping cart icon - * that contains the count. When the user clicks on the icon, use - * imageInisghtsToken to get the list of websites. - * @member {number} [entity.image.insightsMetadata.shoppingSourcesCount] The - * number of websites that offer goods of the products seen in the image. - * @member {number} [entity.image.insightsMetadata.recipeSourcesCount] The - * number of websites that offer recipes of the food seen in the image. - * @member {object} [entity.image.insightsMetadata.aggregateOffer] A summary of - * the online offers of products found in the image. For example, if the image - * is of a dress, the offer might identify the lowest price and the number of - * offers found. Only visually similar products insights include this field. - * The offer includes the following fields: Name, AggregateRating, OfferCount, - * and LowPrice. - * @member {array} [entity.image.insightsMetadata.aggregateOffer.offers] A list - * of offers from merchants that have offerings related to the image. - * @member {string} [entity.image.imageId] Unique Id for the image - * @member {string} [entity.image.accentColor] A three-byte hexadecimal number - * that represents the color that dominates the image. Use the color as the - * temporary background in your client until the image is loaded. - * @member {string} [entity.image.visualWords] Visual representation of the - * image. Used for getting more sizes - * @member {string} [entity.description] A short description of the item. - * @member {string} [entity.alternateName] An alias for the item - * @member {string} [entity.bingId] An ID that uniquely identifies this item. - * @member {number} [matchConfidence] The confidence that Bing has that the - * entity in the image matches this entity. The confidence ranges from 0.0 - * through 1.0 with 1.0 being very confident. - */ +*/ export interface RecognizedEntity extends Response { + /** + * The entity that was recognized. The following are the possible entity objects: Person + */ readonly entity?: Thing; + /** + * The confidence that Bing has that the entity in the image matches this entity. The confidence + * ranges from 0.0 through 1.0 with 1.0 being very confident. + */ readonly matchConfidence?: number; } /** - * @class - * Initializes a new instance of the RecognizedEntityRegion class. - * @constructor - * Defines a region of the image where an entity was found and a list of - * entities that might match it. - * - * @member {object} [region] A region of the image that contains an entity. The - * values of the rectangle are relative to the width and height of the original - * image and are in the range 0.0 through 1.0. For example, if the image is - * 300x200 and the region's top, left corner is at point (10, 20) and the - * bottom, right corner is at point (290, 150), then the normalized rectangle - * is: Left = 0.0333333333333333, Top = 0.1, Right = 0.9666666666666667, Bottom - * = 0.75. For people, the region represents the person's face. - * @member {number} [region.left] The left coordinate. - * @member {number} [region.top] The top coordinate - * @member {number} [region.right] The right coordinate - * @member {number} [region.bottom] The bottom coordinate - * @member {array} [matchingEntities] A list of entities that Bing believes - * match the entity found in the region. The entities are in descending order - * of confidence (see the matchConfidence field of RecognizedEntity). - */ + * Defines a region of the image where an entity was found and a list of entities that might match + * it. +*/ export interface RecognizedEntityRegion extends Response { + /** + * A region of the image that contains an entity. The values of the rectangle are relative to the + * width and height of the original image and are in the range 0.0 through 1.0. For example, if + * the image is 300x200 and the region's top, left corner is at point (10, 20) and the bottom, + * right corner is at point (290, 150), then the normalized rectangle is: Left = + * 0.0333333333333333, Top = 0.1, Right = 0.9666666666666667, Bottom = 0.75. For people, the + * region represents the person's face. + */ readonly region?: NormalizedRectangle; + /** + * A list of entities that Bing believes match the entity found in the region. The entities are + * in descending order of confidence (see the matchConfidence field of RecognizedEntity). + */ readonly matchingEntities?: RecognizedEntity[]; } /** - * @class - * Initializes a new instance of the RecognizedEntityGroup class. - * @constructor * Defines a group of previously recognized entities. - * - * @member {array} recognizedEntityRegions The regions of the image that - * contain entities. - * @member {string} name The name of the group where images of the entity were - * also found. The following are possible groups. CelebRecognitionAnnotations: - * Similar to CelebrityAnnotations but provides a higher probability of an - * accurate match. CelebrityAnnotations: Contains celebrities such as actors, - * politicians, athletes, and historical figures. - */ +*/ export interface RecognizedEntityGroup { + /** + * The regions of the image that contain entities. + */ recognizedEntityRegions: RecognizedEntityRegion[]; + /** + * The name of the group where images of the entity were also found. The following are possible + * groups. CelebRecognitionAnnotations: Similar to CelebrityAnnotations but provides a higher + * probability of an accurate match. CelebrityAnnotations: Contains celebrities such as actors, + * politicians, athletes, and historical figures. + */ name: string; } /** - * @class - * Initializes a new instance of the RecognizedEntitiesModule class. - * @constructor * Defines a list of previously recognized entities. - * - * @member {array} [value] A list of recognized entities. - */ +*/ export interface RecognizedEntitiesModule { + /** + * A list of recognized entities. + */ readonly value?: RecognizedEntityGroup[]; } /** - * @class - * Initializes a new instance of the InsightsTag class. - * @constructor * Defines a characteristic of the content found in the image. - * - * @member {string} [name] The name of the characteristic. For example, cat, - * kitty, calico cat. - */ +*/ export interface InsightsTag { + /** + * The name of the characteristic. For example, cat, kitty, calico cat. + */ readonly name?: string; } /** - * @class - * Initializes a new instance of the ImageTagsModule class. - * @constructor * Defines the characteristics of content found in an image. - * - * @member {array} value A list of tags that describe the characteristics of - * the content found in the image. For example, if the image is of a musical - * artist, the list might include Female, Dress, and Music to indicate the - * person is female music artist that's wearing a dress. - */ +*/ export interface ImageTagsModule { + /** + * A list of tags that describe the characteristics of the content found in the image. For + * example, if the image is of a musical artist, the list might include Female, Dress, and Music + * to indicate the person is female music artist that's wearing a dress. + */ value: InsightsTag[]; } /** - * @class - * Initializes a new instance of the ImageInsights class. - * @constructor - * The top-level object that the response includes when an image insights - * request succeeds. For information about requesting image insights, see the + * The top-level object that the response includes when an image insights request succeeds. For + * information about requesting image insights, see the * [insightsToken](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#insightstoken) - * query parameter. The modules query parameter affects the fields that Bing - * includes in the response. If you set + * query parameter. The modules query parameter affects the fields that Bing includes in the + * response. If you set * [modules](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#modulesrequested) * to only Caption, then this object includes only the imageCaption field. - * - * @member {string} [imageInsightsToken] A token that you use in a subsequent - * call to the Image Search API to get more information about the image. For - * information about using this token, see the insightsToken query parameter. - * This token has the same usage as the token in the Image object. - * @member {object} [bestRepresentativeQuery] The query term that best - * represents the image. Clicking the link in the Query object, takes the user - * to a webpage with more pictures of the image. - * @member {string} [bestRepresentativeQuery.text] The query string. Use this - * string as the query term in a new search request. - * @member {string} [bestRepresentativeQuery.displayText] The display version - * of the query term. This version of the query term may contain special - * characters that highlight the search term found in the query string. The - * string contains the highlighting characters only if the query enabled hit - * highlighting - * @member {string} [bestRepresentativeQuery.webSearchUrl] The URL that takes - * the user to the Bing search results page for the query.Only related search - * results include this field. - * @member {string} [bestRepresentativeQuery.searchLink] The URL that you use - * to get the results of the related search. Before using the URL, you must - * append query parameters as appropriate and include the - * Ocp-Apim-Subscription-Key header. Use this URL if you're displaying the - * results in your own user interface. Otherwise, use the webSearchUrl URL. - * @member {object} [bestRepresentativeQuery.thumbnail] The URL to a thumbnail - * of a related image. - * @member {object} [bestRepresentativeQuery.thumbnail.thumbnail] The URL to a - * thumbnail of the image - * @member {string} [bestRepresentativeQuery.thumbnail.imageInsightsToken] The - * token that you use in a subsequent call to the Image Search API to get - * additional information about the image. For information about using this - * token, see the insightsToken query parameter. - * @member {object} [bestRepresentativeQuery.thumbnail.insightsMetadata] A - * count of the number of websites where you can shop or perform other actions - * related to the image. For example, if the image is of an apple pie, this - * object includes a count of the number of websites where you can buy an apple - * pie. To indicate the number of offers in your UX, include badging such as a - * shopping cart icon that contains the count. When the user clicks on the - * icon, use imageInisghtsToken to get the list of websites. - * @member {number} - * [bestRepresentativeQuery.thumbnail.insightsMetadata.shoppingSourcesCount] - * The number of websites that offer goods of the products seen in the image. - * @member {number} - * [bestRepresentativeQuery.thumbnail.insightsMetadata.recipeSourcesCount] The - * number of websites that offer recipes of the food seen in the image. - * @member {object} - * [bestRepresentativeQuery.thumbnail.insightsMetadata.aggregateOffer] A - * summary of the online offers of products found in the image. For example, if - * the image is of a dress, the offer might identify the lowest price and the - * number of offers found. Only visually similar products insights include this - * field. The offer includes the following fields: Name, AggregateRating, - * OfferCount, and LowPrice. - * @member {array} - * [bestRepresentativeQuery.thumbnail.insightsMetadata.aggregateOffer.offers] A - * list of offers from merchants that have offerings related to the image. - * @member {string} [bestRepresentativeQuery.thumbnail.imageId] Unique Id for - * the image - * @member {string} [bestRepresentativeQuery.thumbnail.accentColor] A - * three-byte hexadecimal number that represents the color that dominates the - * image. Use the color as the temporary background in your client until the - * image is loaded. - * @member {string} [bestRepresentativeQuery.thumbnail.visualWords] Visual - * representation of the image. Used for getting more sizes - * @member {object} [imageCaption] The caption to use for the image. - * @member {string} [imageCaption.caption] A caption about the image. - * @member {string} [imageCaption.dataSourceUrl] The URL to the website where - * the caption was found. You must attribute the caption to the source. For - * example, by displaying the domain name from the URL next to the caption and - * using the URL to link to the source website. - * @member {array} [imageCaption.relatedSearches] A list of entities found in - * the caption. Use the contents of the Query object to find the entity in the - * caption and create a link. The link takes the user to images of the entity. - * @member {object} [relatedCollections] A list of links to webpages that - * contain related images. - * @member {array} [relatedCollections.value] A list of webpages that contain - * related images. - * @member {object} [pagesIncluding] A list of webpages that contain the image. - * To access the webpage, use the URL in the image's hostPageUrl field. - * @member {array} [pagesIncluding.value] A list of images. - * @member {object} [shoppingSources] A list of merchants that offer items - * related to the image. For example, if the image is of an apple pie, the list - * contains merchants that are selling apple pies. - * @member {array} [shoppingSources.offers] A list of offers from merchants - * that have offerings related to the image. - * @member {object} [relatedSearches] A list of related queries made by others. - * @member {array} [relatedSearches.value] A list of related searches. - * @member {object} [recipes] A list of recipes related to the image. For - * example, if the image is of an apple pie, the list contains recipes for - * making an apple pie. - * @member {array} [recipes.value] A list of recipes. - * @member {object} [visuallySimilarImages] A list of images that are visually - * similar to the original image. For example, if the specified image is of a - * sunset over a body of water, the list of similar images are of a sunset over - * a body of water. If the specified image is of a person, similar images might - * be of the same person or they might be of persons dressed similarly or in a - * similar setting. The criteria for similarity continues to evolve. - * @member {array} [visuallySimilarImages.value] A list of images. - * @member {object} [visuallySimilarProducts] A list of images that contain - * products that are visually similar to products found in the original image. - * For example, if the specified image contains a dress, the list of similar - * images contain a dress. The image provides summary information about offers - * that Bing found online for the product. - * @member {array} [visuallySimilarProducts.value] A list of images. - * @member {object} [recognizedEntityGroups] A list of groups that contain - * images of entities that match the entity found in the specified image. For - * example, the response might include images from the general celebrity group - * if the entity was recognized in that group. - * @member {array} [recognizedEntityGroups.value] A list of recognized - * entities. - * @member {object} [imageTags] A list of characteristics of the content found - * in the image. For example, if the image is of a person, the tags might - * indicate the person's gender and the type of clothes they're wearing. - * @member {array} [imageTags.value] A list of tags that describe the - * characteristics of the content found in the image. For example, if the image - * is of a musical artist, the list might include Female, Dress, and Music to - * indicate the person is female music artist that's wearing a dress. - */ +*/ export interface ImageInsights extends Response { + /** + * A token that you use in a subsequent call to the Image Search API to get more information + * about the image. For information about using this token, see the insightsToken query + * parameter. This token has the same usage as the token in the Image object. + */ readonly imageInsightsToken?: string; + /** + * The query term that best represents the image. Clicking the link in the Query object, takes + * the user to a webpage with more pictures of the image. + */ readonly bestRepresentativeQuery?: Query; + /** + * The caption to use for the image. + */ readonly imageCaption?: ImageInsightsImageCaption; + /** + * A list of links to webpages that contain related images. + */ readonly relatedCollections?: RelatedCollectionsModule; + /** + * A list of webpages that contain the image. To access the webpage, use the URL in the image's + * hostPageUrl field. + */ readonly pagesIncluding?: ImagesModule; + /** + * A list of merchants that offer items related to the image. For example, if the image is of an + * apple pie, the list contains merchants that are selling apple pies. + */ readonly shoppingSources?: AggregateOffer; + /** + * A list of related queries made by others. + */ readonly relatedSearches?: RelatedSearchesModule; + /** + * A list of recipes related to the image. For example, if the image is of an apple pie, the list + * contains recipes for making an apple pie. + */ readonly recipes?: RecipesModule; + /** + * A list of images that are visually similar to the original image. For example, if the + * specified image is of a sunset over a body of water, the list of similar images are of a + * sunset over a body of water. If the specified image is of a person, similar images might be of + * the same person or they might be of persons dressed similarly or in a similar setting. The + * criteria for similarity continues to evolve. + */ readonly visuallySimilarImages?: ImagesModule; + /** + * A list of images that contain products that are visually similar to products found in the + * original image. For example, if the specified image contains a dress, the list of similar + * images contain a dress. The image provides summary information about offers that Bing found + * online for the product. + */ readonly visuallySimilarProducts?: ImagesModule; + /** + * A list of groups that contain images of entities that match the entity found in the specified + * image. For example, the response might include images from the general celebrity group if the + * entity was recognized in that group. + */ readonly recognizedEntityGroups?: RecognizedEntitiesModule; + /** + * A list of characteristics of the content found in the image. For example, if the image is of a + * person, the tags might indicate the person's gender and the type of clothes they're wearing. + */ readonly imageTags?: ImageTagsModule; } /** - * @class - * Initializes a new instance of the TrendingImagesTile class. - * @constructor * Defines an image tile. - * - * @member {object} query A query that returns a Bing search results page with - * more images of the subject. For example, if the category is Popular People - * Searches, then the thumbnail is of a popular person. The query would return - * a Bing search results page with more images of that person. - * @member {string} [query.text] The query string. Use this string as the query - * term in a new search request. - * @member {string} [query.displayText] The display version of the query term. - * This version of the query term may contain special characters that highlight - * the search term found in the query string. The string contains the - * highlighting characters only if the query enabled hit highlighting - * @member {string} [query.webSearchUrl] The URL that takes the user to the - * Bing search results page for the query.Only related search results include - * this field. - * @member {string} [query.searchLink] The URL that you use to get the results - * of the related search. Before using the URL, you must append query - * parameters as appropriate and include the Ocp-Apim-Subscription-Key header. - * Use this URL if you're displaying the results in your own user interface. - * Otherwise, use the webSearchUrl URL. - * @member {object} [query.thumbnail] The URL to a thumbnail of a related - * image. - * @member {object} [query.thumbnail.thumbnail] The URL to a thumbnail of the - * image - * @member {string} [query.thumbnail.imageInsightsToken] The token that you use - * in a subsequent call to the Image Search API to get additional information - * about the image. For information about using this token, see the - * insightsToken query parameter. - * @member {object} [query.thumbnail.insightsMetadata] A count of the number of - * websites where you can shop or perform other actions related to the image. - * For example, if the image is of an apple pie, this object includes a count - * of the number of websites where you can buy an apple pie. To indicate the - * number of offers in your UX, include badging such as a shopping cart icon - * that contains the count. When the user clicks on the icon, use - * imageInisghtsToken to get the list of websites. - * @member {number} [query.thumbnail.insightsMetadata.shoppingSourcesCount] The - * number of websites that offer goods of the products seen in the image. - * @member {number} [query.thumbnail.insightsMetadata.recipeSourcesCount] The - * number of websites that offer recipes of the food seen in the image. - * @member {object} [query.thumbnail.insightsMetadata.aggregateOffer] A summary - * of the online offers of products found in the image. For example, if the - * image is of a dress, the offer might identify the lowest price and the - * number of offers found. Only visually similar products insights include this - * field. The offer includes the following fields: Name, AggregateRating, - * OfferCount, and LowPrice. - * @member {array} [query.thumbnail.insightsMetadata.aggregateOffer.offers] A - * list of offers from merchants that have offerings related to the image. - * @member {string} [query.thumbnail.imageId] Unique Id for the image - * @member {string} [query.thumbnail.accentColor] A three-byte hexadecimal - * number that represents the color that dominates the image. Use the color as - * the temporary background in your client until the image is loaded. - * @member {string} [query.thumbnail.visualWords] Visual representation of the - * image. Used for getting more sizes - * @member {object} image The image's thumbnail. - * @member {object} [image.thumbnail] The URL to a thumbnail of the image - * @member {string} [image.imageInsightsToken] The token that you use in a - * subsequent call to the Image Search API to get additional information about - * the image. For information about using this token, see the insightsToken - * query parameter. - * @member {object} [image.insightsMetadata] A count of the number of websites - * where you can shop or perform other actions related to the image. For - * example, if the image is of an apple pie, this object includes a count of - * the number of websites where you can buy an apple pie. To indicate the - * number of offers in your UX, include badging such as a shopping cart icon - * that contains the count. When the user clicks on the icon, use - * imageInisghtsToken to get the list of websites. - * @member {number} [image.insightsMetadata.shoppingSourcesCount] The number of - * websites that offer goods of the products seen in the image. - * @member {number} [image.insightsMetadata.recipeSourcesCount] The number of - * websites that offer recipes of the food seen in the image. - * @member {object} [image.insightsMetadata.aggregateOffer] A summary of the - * online offers of products found in the image. For example, if the image is - * of a dress, the offer might identify the lowest price and the number of - * offers found. Only visually similar products insights include this field. - * The offer includes the following fields: Name, AggregateRating, OfferCount, - * and LowPrice. - * @member {array} [image.insightsMetadata.aggregateOffer.offers] A list of - * offers from merchants that have offerings related to the image. - * @member {string} [image.imageId] Unique Id for the image - * @member {string} [image.accentColor] A three-byte hexadecimal number that - * represents the color that dominates the image. Use the color as the - * temporary background in your client until the image is loaded. - * @member {string} [image.visualWords] Visual representation of the image. - * Used for getting more sizes - */ +*/ export interface TrendingImagesTile { + /** + * A query that returns a Bing search results page with more images of the subject. For example, + * if the category is Popular People Searches, then the thumbnail is of a popular person. The + * query would return a Bing search results page with more images of that person. + */ query: Query; + /** + * The image's thumbnail. + */ image: ImageObject; } /** - * @class - * Initializes a new instance of the TrendingImagesCategory class. - * @constructor * Defines the category of trending images. - * - * @member {string} title The name of the image category. For example, Popular - * People Searches. - * @member {array} tiles A list of images that are trending in the category. - * Each tile contains an image and a URL that returns more images of the - * subject. For example, if the category is Popular People Searches, the image - * is of a popular person and the URL would return more images of that person. - */ +*/ export interface TrendingImagesCategory { + /** + * The name of the image category. For example, Popular People Searches. + */ title: string; + /** + * A list of images that are trending in the category. Each tile contains an image and a URL that + * returns more images of the subject. For example, if the category is Popular People Searches, + * the image is of a popular person and the URL would return more images of that person. + */ tiles: TrendingImagesTile[]; } /** - * @class - * Initializes a new instance of the TrendingImages class. - * @constructor - * The top-level object that the response includes when a trending images - * request succeeds. - * - * @member {array} categories A list that identifies categories of images and a - * list of trending images in that category. - */ + * The top-level object that the response includes when a trending images request succeeds. +*/ export interface TrendingImages extends Response { + /** + * A list that identifies categories of images and a list of trending images in that category. + */ categories: TrendingImagesCategory[]; } /** - * @class - * Initializes a new instance of the Person class. - * @constructor * Defines a person. - * - * @member {string} [jobTitle] The person's job title. - * @member {string} [twitterProfile] The URL of the person's twitter profile. - */ +*/ export interface Person extends Thing { + /** + * The person's job title. + */ readonly jobTitle?: string; + /** + * The URL of the person's twitter profile. + */ readonly twitterProfile?: string; } diff --git a/lib/services/imageSearch/lib/models/insightsTag.js b/lib/services/imageSearch/lib/models/insightsTag.js index debc36cfdd..18c91036d3 100644 --- a/lib/services/imageSearch/lib/models/insightsTag.js +++ b/lib/services/imageSearch/lib/models/insightsTag.js @@ -17,8 +17,8 @@ class InsightsTag { /** * Create a InsightsTag. - * @member {string} [name] The name of the characteristic. For example, cat, - * kitty, calico cat. + * @property {string} [name] The name of the characteristic. For example, + * cat, kitty, calico cat. */ constructor() { } diff --git a/lib/services/imageSearch/lib/models/mediaObject.js b/lib/services/imageSearch/lib/models/mediaObject.js index 2183a24c39..0bf8f14e82 100644 --- a/lib/services/imageSearch/lib/models/mediaObject.js +++ b/lib/services/imageSearch/lib/models/mediaObject.js @@ -20,18 +20,19 @@ const models = require('./index'); class MediaObject extends models['CreativeWork'] { /** * Create a MediaObject. - * @member {string} [contentUrl] Original URL to retrieve the source (file) + * @property {string} [contentUrl] Original URL to retrieve the source (file) * for the media object (e.g the source URL for the image). - * @member {string} [hostPageUrl] URL of the page that hosts the media + * @property {string} [hostPageUrl] URL of the page that hosts the media * object. - * @member {string} [contentSize] Size of the media object content (use + * @property {string} [contentSize] Size of the media object content (use * format "value unit" e.g "1024 B"). - * @member {string} [encodingFormat] Encoding format (e.g mp3, mp4, jpeg, + * @property {string} [encodingFormat] Encoding format (e.g mp3, mp4, jpeg, * etc). - * @member {string} [hostPageDisplayUrl] Display URL of the page that hosts + * @property {string} [hostPageDisplayUrl] Display URL of the page that hosts * the media object. - * @member {number} [width] The width of the source media object, in pixels. - * @member {number} [height] The height of the source media object, in + * @property {number} [width] The width of the source media object, in + * pixels. + * @property {number} [height] The height of the source media object, in * pixels. */ constructor() { diff --git a/lib/services/imageSearch/lib/models/normalizedRectangle.js b/lib/services/imageSearch/lib/models/normalizedRectangle.js index d25af7ae4d..abe9d1e6e8 100644 --- a/lib/services/imageSearch/lib/models/normalizedRectangle.js +++ b/lib/services/imageSearch/lib/models/normalizedRectangle.js @@ -23,10 +23,10 @@ const models = require('./index'); class NormalizedRectangle extends models['StructuredValue'] { /** * Create a NormalizedRectangle. - * @member {number} left The left coordinate. - * @member {number} top The top coordinate - * @member {number} right The right coordinate - * @member {number} bottom The bottom coordinate + * @property {number} left The left coordinate. + * @property {number} top The top coordinate + * @property {number} right The right coordinate + * @property {number} bottom The bottom coordinate */ constructor() { super(); diff --git a/lib/services/imageSearch/lib/models/offer.js b/lib/services/imageSearch/lib/models/offer.js index 944e328b2f..ca4245350b 100644 --- a/lib/services/imageSearch/lib/models/offer.js +++ b/lib/services/imageSearch/lib/models/offer.js @@ -20,36 +20,36 @@ const models = require('./index'); class Offer extends models['Thing'] { /** * Create a Offer. - * @member {object} [seller] Seller for this offer - * @member {number} [price] The item's price. - * @member {string} [priceCurrency] The monetary currency. For example, USD. - * Possible values include: 'USD', 'CAD', 'GBP', 'EUR', 'COP', 'JPY', 'CNY', - * 'AUD', 'INR', 'AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', 'ARS', 'AWG', - * 'AZN', 'BAM', 'BBD', 'BDT', 'BGN', 'BHD', 'BIF', 'BMD', 'BND', 'BOB', - * 'BOV', 'BRL', 'BSD', 'BTN', 'BWP', 'BYR', 'BZD', 'CDF', 'CHE', 'CHF', - * 'CHW', 'CLF', 'CLP', 'COU', 'CRC', 'CUC', 'CUP', 'CVE', 'CZK', 'DJF', - * 'DKK', 'DOP', 'DZD', 'EGP', 'ERN', 'ETB', 'FJD', 'FKP', 'GEL', 'GHS', - * 'GIP', 'GMD', 'GNF', 'GTQ', 'GYD', 'HKD', 'HNL', 'HRK', 'HTG', 'HUF', - * 'IDR', 'ILS', 'IQD', 'IRR', 'ISK', 'JMD', 'JOD', 'KES', 'KGS', 'KHR', - * 'KMF', 'KPW', 'KRW', 'KWD', 'KYD', 'KZT', 'LAK', 'LBP', 'LKR', 'LRD', - * 'LSL', 'LYD', 'MAD', 'MDL', 'MGA', 'MKD', 'MMK', 'MNT', 'MOP', 'MRO', - * 'MUR', 'MVR', 'MWK', 'MXN', 'MXV', 'MYR', 'MZN', 'NAD', 'NGN', 'NIO', - * 'NOK', 'NPR', 'NZD', 'OMR', 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', 'PLN', - * 'PYG', 'QAR', 'RON', 'RSD', 'RUB', 'RWF', 'SAR', 'SBD', 'SCR', 'SDG', - * 'SEK', 'SGD', 'SHP', 'SLL', 'SOS', 'SRD', 'SSP', 'STD', 'SYP', 'SZL', - * 'THB', 'TJS', 'TMT', 'TND', 'TOP', 'TRY', 'TTD', 'TWD', 'TZS', 'UAH', - * 'UGX', 'UYU', 'UZS', 'VEF', 'VND', 'VUV', 'WST', 'XAF', 'XCD', 'XOF', - * 'XPF', 'YER', 'ZAR', 'ZMW'. Default value: 'USD' . - * @member {string} [availability] The item's availability. The following are - * the possible values: Discontinued, InStock, InStoreOnly, + * @property {object} [seller] Seller for this offer + * @property {number} [price] The item's price. + * @property {string} [priceCurrency] The monetary currency. For example, + * USD. Possible values include: 'USD', 'CAD', 'GBP', 'EUR', 'COP', 'JPY', + * 'CNY', 'AUD', 'INR', 'AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', 'ARS', + * 'AWG', 'AZN', 'BAM', 'BBD', 'BDT', 'BGN', 'BHD', 'BIF', 'BMD', 'BND', + * 'BOB', 'BOV', 'BRL', 'BSD', 'BTN', 'BWP', 'BYR', 'BZD', 'CDF', 'CHE', + * 'CHF', 'CHW', 'CLF', 'CLP', 'COU', 'CRC', 'CUC', 'CUP', 'CVE', 'CZK', + * 'DJF', 'DKK', 'DOP', 'DZD', 'EGP', 'ERN', 'ETB', 'FJD', 'FKP', 'GEL', + * 'GHS', 'GIP', 'GMD', 'GNF', 'GTQ', 'GYD', 'HKD', 'HNL', 'HRK', 'HTG', + * 'HUF', 'IDR', 'ILS', 'IQD', 'IRR', 'ISK', 'JMD', 'JOD', 'KES', 'KGS', + * 'KHR', 'KMF', 'KPW', 'KRW', 'KWD', 'KYD', 'KZT', 'LAK', 'LBP', 'LKR', + * 'LRD', 'LSL', 'LYD', 'MAD', 'MDL', 'MGA', 'MKD', 'MMK', 'MNT', 'MOP', + * 'MRO', 'MUR', 'MVR', 'MWK', 'MXN', 'MXV', 'MYR', 'MZN', 'NAD', 'NGN', + * 'NIO', 'NOK', 'NPR', 'NZD', 'OMR', 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', + * 'PLN', 'PYG', 'QAR', 'RON', 'RSD', 'RUB', 'RWF', 'SAR', 'SBD', 'SCR', + * 'SDG', 'SEK', 'SGD', 'SHP', 'SLL', 'SOS', 'SRD', 'SSP', 'STD', 'SYP', + * 'SZL', 'THB', 'TJS', 'TMT', 'TND', 'TOP', 'TRY', 'TTD', 'TWD', 'TZS', + * 'UAH', 'UGX', 'UYU', 'UZS', 'VEF', 'VND', 'VUV', 'WST', 'XAF', 'XCD', + * 'XOF', 'XPF', 'YER', 'ZAR', 'ZMW'. Default value: 'USD' . + * @property {string} [availability] The item's availability. The following + * are the possible values: Discontinued, InStock, InStoreOnly, * LimitedAvailability, OnlineOnly, OutOfStock, PreOrder, SoldOut. Possible * values include: 'Discontinued', 'InStock', 'InStoreOnly', * 'LimitedAvailability', 'OnlineOnly', 'OutOfStock', 'PreOrder', 'SoldOut' - * @member {object} [aggregateRating] An aggregated rating that indicates how - * well the product has been rated by others. - * @member {number} [aggregateRating.reviewCount] The number of times the + * @property {object} [aggregateRating] An aggregated rating that indicates + * how well the product has been rated by others. + * @property {number} [aggregateRating.reviewCount] The number of times the * recipe has been rated or reviewed. - * @member {string} [lastUpdated] The last date that the offer was updated. + * @property {string} [lastUpdated] The last date that the offer was updated. * The date is in the form YYYY-MM-DD. */ constructor() { diff --git a/lib/services/imageSearch/lib/models/person.js b/lib/services/imageSearch/lib/models/person.js index e7a51c88cb..7332675608 100644 --- a/lib/services/imageSearch/lib/models/person.js +++ b/lib/services/imageSearch/lib/models/person.js @@ -20,8 +20,9 @@ const models = require('./index'); class Person extends models['Thing'] { /** * Create a Person. - * @member {string} [jobTitle] The person's job title. - * @member {string} [twitterProfile] The URL of the person's twitter profile. + * @property {string} [jobTitle] The person's job title. + * @property {string} [twitterProfile] The URL of the person's twitter + * profile. */ constructor() { super(); diff --git a/lib/services/imageSearch/lib/models/pivotSuggestions.js b/lib/services/imageSearch/lib/models/pivotSuggestions.js index 11b15a736d..4f592eec0c 100644 --- a/lib/services/imageSearch/lib/models/pivotSuggestions.js +++ b/lib/services/imageSearch/lib/models/pivotSuggestions.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Defines the pivot segment. * @@ -19,8 +17,8 @@ const models = require('./index'); class PivotSuggestions { /** * Create a PivotSuggestions. - * @member {string} pivot The segment from the original query to pivot on. - * @member {array} suggestions A list of suggested queries for the pivot. + * @property {string} pivot The segment from the original query to pivot on. + * @property {array} suggestions A list of suggested queries for the pivot. */ constructor() { } diff --git a/lib/services/imageSearch/lib/models/propertiesItem.js b/lib/services/imageSearch/lib/models/propertiesItem.js index 305d567fbe..f0d4255576 100644 --- a/lib/services/imageSearch/lib/models/propertiesItem.js +++ b/lib/services/imageSearch/lib/models/propertiesItem.js @@ -17,8 +17,8 @@ class PropertiesItem { /** * Create a PropertiesItem. - * @member {string} [text] Text representation of an item. - * @member {string} _type Polymorphic Discriminator + * @property {string} [text] Text representation of an item. + * @property {string} _type Polymorphic Discriminator */ constructor() { } diff --git a/lib/services/imageSearch/lib/models/query.js b/lib/services/imageSearch/lib/models/query.js index 311df82488..9644d94515 100644 --- a/lib/services/imageSearch/lib/models/query.js +++ b/lib/services/imageSearch/lib/models/query.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Defines a search query. * @@ -19,50 +17,51 @@ const models = require('./index'); class Query { /** * Create a Query. - * @member {string} text The query string. Use this string as the query term - * in a new search request. - * @member {string} [displayText] The display version of the query term. This - * version of the query term may contain special characters that highlight - * the search term found in the query string. The string contains the - * highlighting characters only if the query enabled hit highlighting - * @member {string} [webSearchUrl] The URL that takes the user to the Bing + * @property {string} text The query string. Use this string as the query + * term in a new search request. + * @property {string} [displayText] The display version of the query term. + * This version of the query term may contain special characters that + * highlight the search term found in the query string. The string contains + * the highlighting characters only if the query enabled hit highlighting + * @property {string} [webSearchUrl] The URL that takes the user to the Bing * search results page for the query.Only related search results include this * field. - * @member {string} [searchLink] The URL that you use to get the results of + * @property {string} [searchLink] The URL that you use to get the results of * the related search. Before using the URL, you must append query parameters * as appropriate and include the Ocp-Apim-Subscription-Key header. Use this * URL if you're displaying the results in your own user interface. * Otherwise, use the webSearchUrl URL. - * @member {object} [thumbnail] The URL to a thumbnail of a related image. - * @member {object} [thumbnail.thumbnail] The URL to a thumbnail of the image - * @member {string} [thumbnail.imageInsightsToken] The token that you use in - * a subsequent call to the Image Search API to get additional information + * @property {object} [thumbnail] The URL to a thumbnail of a related image. + * @property {object} [thumbnail.thumbnail] The URL to a thumbnail of the + * image + * @property {string} [thumbnail.imageInsightsToken] The token that you use + * in a subsequent call to the Image Search API to get additional information * about the image. For information about using this token, see the * insightsToken query parameter. - * @member {object} [thumbnail.insightsMetadata] A count of the number of + * @property {object} [thumbnail.insightsMetadata] A count of the number of * websites where you can shop or perform other actions related to the image. * For example, if the image is of an apple pie, this object includes a count * of the number of websites where you can buy an apple pie. To indicate the * number of offers in your UX, include badging such as a shopping cart icon * that contains the count. When the user clicks on the icon, use - * imageInisghtsToken to get the list of websites. - * @member {number} [thumbnail.insightsMetadata.shoppingSourcesCount] The + * imageInsightsToken to get the list of websites. + * @property {number} [thumbnail.insightsMetadata.shoppingSourcesCount] The * number of websites that offer goods of the products seen in the image. - * @member {number} [thumbnail.insightsMetadata.recipeSourcesCount] The + * @property {number} [thumbnail.insightsMetadata.recipeSourcesCount] The * number of websites that offer recipes of the food seen in the image. - * @member {object} [thumbnail.insightsMetadata.aggregateOffer] A summary of - * the online offers of products found in the image. For example, if the + * @property {object} [thumbnail.insightsMetadata.aggregateOffer] A summary + * of the online offers of products found in the image. For example, if the * image is of a dress, the offer might identify the lowest price and the * number of offers found. Only visually similar products insights include * this field. The offer includes the following fields: Name, * AggregateRating, OfferCount, and LowPrice. - * @member {array} [thumbnail.insightsMetadata.aggregateOffer.offers] A list - * of offers from merchants that have offerings related to the image. - * @member {string} [thumbnail.imageId] Unique Id for the image - * @member {string} [thumbnail.accentColor] A three-byte hexadecimal number + * @property {array} [thumbnail.insightsMetadata.aggregateOffer.offers] A + * list of offers from merchants that have offerings related to the image. + * @property {string} [thumbnail.imageId] Unique Id for the image + * @property {string} [thumbnail.accentColor] A three-byte hexadecimal number * that represents the color that dominates the image. Use the color as the * temporary background in your client until the image is loaded. - * @member {string} [thumbnail.visualWords] Visual representation of the + * @property {string} [thumbnail.visualWords] Visual representation of the * image. Used for getting more sizes */ constructor() { diff --git a/lib/services/imageSearch/lib/models/rating.js b/lib/services/imageSearch/lib/models/rating.js index d9e3588f00..a253d29c97 100644 --- a/lib/services/imageSearch/lib/models/rating.js +++ b/lib/services/imageSearch/lib/models/rating.js @@ -20,9 +20,9 @@ const models = require('./index'); class Rating extends models['PropertiesItem'] { /** * Create a Rating. - * @member {number} ratingValue The mean (average) rating. The possible + * @property {number} ratingValue The mean (average) rating. The possible * values are 1.0 through 5.0. - * @member {number} [bestRating] The highest rated review. The possible + * @property {number} [bestRating] The highest rated review. The possible * values are 1.0 through 5.0. */ constructor() { diff --git a/lib/services/imageSearch/lib/models/recipe.js b/lib/services/imageSearch/lib/models/recipe.js index 37fc1dce8c..944a218d27 100644 --- a/lib/services/imageSearch/lib/models/recipe.js +++ b/lib/services/imageSearch/lib/models/recipe.js @@ -20,15 +20,15 @@ const models = require('./index'); class Recipe extends models['CreativeWork'] { /** * Create a Recipe. - * @member {string} [cookTime] The amount of time the food takes to cook. For - * example, PT25M. For information about the time format, see + * @property {string} [cookTime] The amount of time the food takes to cook. + * For example, PT25M. For information about the time format, see * http://en.wikipedia.org/wiki/ISO_8601#Durations. - * @member {string} [prepTime] The amount of time required to prepare the + * @property {string} [prepTime] The amount of time required to prepare the * ingredients. For example, PT15M. For information about the time format, * see http://en.wikipedia.org/wiki/ISO_8601#Durations. - * @member {string} [totalTime] The total amount of time it takes to prepare - * and cook the recipe. For example, PT45M. For information about the time - * format, see http://en.wikipedia.org/wiki/ISO_8601#Durations. + * @property {string} [totalTime] The total amount of time it takes to + * prepare and cook the recipe. For example, PT45M. For information about the + * time format, see http://en.wikipedia.org/wiki/ISO_8601#Durations. */ constructor() { super(); diff --git a/lib/services/imageSearch/lib/models/recipesModule.js b/lib/services/imageSearch/lib/models/recipesModule.js index c80c9f51ea..1144d8c827 100644 --- a/lib/services/imageSearch/lib/models/recipesModule.js +++ b/lib/services/imageSearch/lib/models/recipesModule.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Defines a list of recipes. * @@ -19,7 +17,7 @@ const models = require('./index'); class RecipesModule { /** * Create a RecipesModule. - * @member {array} [value] A list of recipes. + * @property {array} [value] A list of recipes. */ constructor() { } diff --git a/lib/services/imageSearch/lib/models/recognizedEntitiesModule.js b/lib/services/imageSearch/lib/models/recognizedEntitiesModule.js index f1a3b1154a..3d6d1bffc2 100644 --- a/lib/services/imageSearch/lib/models/recognizedEntitiesModule.js +++ b/lib/services/imageSearch/lib/models/recognizedEntitiesModule.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Defines a list of previously recognized entities. * @@ -19,7 +17,7 @@ const models = require('./index'); class RecognizedEntitiesModule { /** * Create a RecognizedEntitiesModule. - * @member {array} [value] A list of recognized entities. + * @property {array} [value] A list of recognized entities. */ constructor() { } diff --git a/lib/services/imageSearch/lib/models/recognizedEntity.js b/lib/services/imageSearch/lib/models/recognizedEntity.js index 59a8d33797..4ad6844079 100644 --- a/lib/services/imageSearch/lib/models/recognizedEntity.js +++ b/lib/services/imageSearch/lib/models/recognizedEntity.js @@ -20,48 +20,49 @@ const models = require('./index'); class RecognizedEntity extends models['Response'] { /** * Create a RecognizedEntity. - * @member {object} [entity] The entity that was recognized. The following + * @property {object} [entity] The entity that was recognized. The following * are the possible entity objects: Person - * @member {string} [entity.name] The name of the thing represented by this + * @property {string} [entity.name] The name of the thing represented by this * object. - * @member {string} [entity.url] The URL to get more information about the + * @property {string} [entity.url] The URL to get more information about the * thing represented by this object. - * @member {object} [entity.image] An image of the item. - * @member {object} [entity.image.thumbnail] The URL to a thumbnail of the + * @property {object} [entity.image] An image of the item. + * @property {object} [entity.image.thumbnail] The URL to a thumbnail of the * image - * @member {string} [entity.image.imageInsightsToken] The token that you use - * in a subsequent call to the Image Search API to get additional information - * about the image. For information about using this token, see the - * insightsToken query parameter. - * @member {object} [entity.image.insightsMetadata] A count of the number of - * websites where you can shop or perform other actions related to the image. - * For example, if the image is of an apple pie, this object includes a count - * of the number of websites where you can buy an apple pie. To indicate the - * number of offers in your UX, include badging such as a shopping cart icon - * that contains the count. When the user clicks on the icon, use - * imageInisghtsToken to get the list of websites. - * @member {number} [entity.image.insightsMetadata.shoppingSourcesCount] The - * number of websites that offer goods of the products seen in the image. - * @member {number} [entity.image.insightsMetadata.recipeSourcesCount] The + * @property {string} [entity.image.imageInsightsToken] The token that you + * use in a subsequent call to the Image Search API to get additional + * information about the image. For information about using this token, see + * the insightsToken query parameter. + * @property {object} [entity.image.insightsMetadata] A count of the number + * of websites where you can shop or perform other actions related to the + * image. For example, if the image is of an apple pie, this object includes + * a count of the number of websites where you can buy an apple pie. To + * indicate the number of offers in your UX, include badging such as a + * shopping cart icon that contains the count. When the user clicks on the + * icon, use imageInsightsToken to get the list of websites. + * @property {number} [entity.image.insightsMetadata.shoppingSourcesCount] + * The number of websites that offer goods of the products seen in the image. + * @property {number} [entity.image.insightsMetadata.recipeSourcesCount] The * number of websites that offer recipes of the food seen in the image. - * @member {object} [entity.image.insightsMetadata.aggregateOffer] A summary - * of the online offers of products found in the image. For example, if the - * image is of a dress, the offer might identify the lowest price and the - * number of offers found. Only visually similar products insights include - * this field. The offer includes the following fields: Name, + * @property {object} [entity.image.insightsMetadata.aggregateOffer] A + * summary of the online offers of products found in the image. For example, + * if the image is of a dress, the offer might identify the lowest price and + * the number of offers found. Only visually similar products insights + * include this field. The offer includes the following fields: Name, * AggregateRating, OfferCount, and LowPrice. - * @member {array} [entity.image.insightsMetadata.aggregateOffer.offers] A + * @property {array} [entity.image.insightsMetadata.aggregateOffer.offers] A * list of offers from merchants that have offerings related to the image. - * @member {string} [entity.image.imageId] Unique Id for the image - * @member {string} [entity.image.accentColor] A three-byte hexadecimal + * @property {string} [entity.image.imageId] Unique Id for the image + * @property {string} [entity.image.accentColor] A three-byte hexadecimal * number that represents the color that dominates the image. Use the color * as the temporary background in your client until the image is loaded. - * @member {string} [entity.image.visualWords] Visual representation of the + * @property {string} [entity.image.visualWords] Visual representation of the * image. Used for getting more sizes - * @member {string} [entity.description] A short description of the item. - * @member {string} [entity.alternateName] An alias for the item - * @member {string} [entity.bingId] An ID that uniquely identifies this item. - * @member {number} [matchConfidence] The confidence that Bing has that the + * @property {string} [entity.description] A short description of the item. + * @property {string} [entity.alternateName] An alias for the item + * @property {string} [entity.bingId] An ID that uniquely identifies this + * item. + * @property {number} [matchConfidence] The confidence that Bing has that the * entity in the image matches this entity. The confidence ranges from 0.0 * through 1.0 with 1.0 being very confident. */ diff --git a/lib/services/imageSearch/lib/models/recognizedEntityGroup.js b/lib/services/imageSearch/lib/models/recognizedEntityGroup.js index 41277935d7..290d9f0c7f 100644 --- a/lib/services/imageSearch/lib/models/recognizedEntityGroup.js +++ b/lib/services/imageSearch/lib/models/recognizedEntityGroup.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Defines a group of previously recognized entities. * @@ -19,9 +17,9 @@ const models = require('./index'); class RecognizedEntityGroup { /** * Create a RecognizedEntityGroup. - * @member {array} recognizedEntityRegions The regions of the image that + * @property {array} recognizedEntityRegions The regions of the image that * contain entities. - * @member {string} name The name of the group where images of the entity + * @property {string} name The name of the group where images of the entity * were also found. The following are possible groups. * CelebRecognitionAnnotations: Similar to CelebrityAnnotations but provides * a higher probability of an accurate match. CelebrityAnnotations: Contains diff --git a/lib/services/imageSearch/lib/models/recognizedEntityRegion.js b/lib/services/imageSearch/lib/models/recognizedEntityRegion.js index 7a2746ec56..475b08b793 100644 --- a/lib/services/imageSearch/lib/models/recognizedEntityRegion.js +++ b/lib/services/imageSearch/lib/models/recognizedEntityRegion.js @@ -21,7 +21,7 @@ const models = require('./index'); class RecognizedEntityRegion extends models['Response'] { /** * Create a RecognizedEntityRegion. - * @member {object} [region] A region of the image that contains an entity. + * @property {object} [region] A region of the image that contains an entity. * The values of the rectangle are relative to the width and height of the * original image and are in the range 0.0 through 1.0. For example, if the * image is 300x200 and the region's top, left corner is at point (10, 20) @@ -29,11 +29,11 @@ class RecognizedEntityRegion extends models['Response'] { * rectangle is: Left = 0.0333333333333333, Top = 0.1, Right = * 0.9666666666666667, Bottom = 0.75. For people, the region represents the * person's face. - * @member {number} [region.left] The left coordinate. - * @member {number} [region.top] The top coordinate - * @member {number} [region.right] The right coordinate - * @member {number} [region.bottom] The bottom coordinate - * @member {array} [matchingEntities] A list of entities that Bing believes + * @property {number} [region.left] The left coordinate. + * @property {number} [region.top] The top coordinate + * @property {number} [region.right] The right coordinate + * @property {number} [region.bottom] The bottom coordinate + * @property {array} [matchingEntities] A list of entities that Bing believes * match the entity found in the region. The entities are in descending order * of confidence (see the matchConfidence field of RecognizedEntity). */ diff --git a/lib/services/imageSearch/lib/models/relatedCollectionsModule.js b/lib/services/imageSearch/lib/models/relatedCollectionsModule.js index e71e528c7a..a5672af172 100644 --- a/lib/services/imageSearch/lib/models/relatedCollectionsModule.js +++ b/lib/services/imageSearch/lib/models/relatedCollectionsModule.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Defines a list of webpages that contain related images. * @@ -19,7 +17,7 @@ const models = require('./index'); class RelatedCollectionsModule { /** * Create a RelatedCollectionsModule. - * @member {array} [value] A list of webpages that contain related images. + * @property {array} [value] A list of webpages that contain related images. */ constructor() { } diff --git a/lib/services/imageSearch/lib/models/relatedSearchesModule.js b/lib/services/imageSearch/lib/models/relatedSearchesModule.js index 82e3452b0d..7d96b49549 100644 --- a/lib/services/imageSearch/lib/models/relatedSearchesModule.js +++ b/lib/services/imageSearch/lib/models/relatedSearchesModule.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Defines a list of related searches. * @@ -19,7 +17,7 @@ const models = require('./index'); class RelatedSearchesModule { /** * Create a RelatedSearchesModule. - * @member {array} [value] A list of related searches. + * @property {array} [value] A list of related searches. */ constructor() { } diff --git a/lib/services/imageSearch/lib/models/response.js b/lib/services/imageSearch/lib/models/response.js index 5f42c01a24..66c19b4195 100644 --- a/lib/services/imageSearch/lib/models/response.js +++ b/lib/services/imageSearch/lib/models/response.js @@ -21,8 +21,8 @@ const models = require('./index'); class Response extends models['Identifiable'] { /** * Create a Response. - * @member {string} [readLink] The URL that returns this resource. - * @member {string} [webSearchUrl] The URL To Bing's search result for this + * @property {string} [readLink] The URL that returns this resource. + * @property {string} [webSearchUrl] The URL To Bing's search result for this * item. */ constructor() { diff --git a/lib/services/imageSearch/lib/models/responseBase.js b/lib/services/imageSearch/lib/models/responseBase.js index 28a5d0d020..902b737a95 100644 --- a/lib/services/imageSearch/lib/models/responseBase.js +++ b/lib/services/imageSearch/lib/models/responseBase.js @@ -17,7 +17,7 @@ class ResponseBase { /** * Create a ResponseBase. - * @member {string} _type Polymorphic Discriminator + * @property {string} _type Polymorphic Discriminator */ constructor() { } diff --git a/lib/services/imageSearch/lib/models/searchResultsAnswer.js b/lib/services/imageSearch/lib/models/searchResultsAnswer.js index 34d1203a51..76668d1ac4 100644 --- a/lib/services/imageSearch/lib/models/searchResultsAnswer.js +++ b/lib/services/imageSearch/lib/models/searchResultsAnswer.js @@ -20,9 +20,9 @@ const models = require('./index'); class SearchResultsAnswer extends models['Answer'] { /** * Create a SearchResultsAnswer. - * @member {number} [totalEstimatedMatches] The estimated number of webpages - * that are relevant to the query. Use this number along with the count and - * offset query parameters to page the results. + * @property {number} [totalEstimatedMatches] The estimated number of + * webpages that are relevant to the query. Use this number along with the + * count and offset query parameters to page the results. */ constructor() { super(); diff --git a/lib/services/imageSearch/lib/models/thing.js b/lib/services/imageSearch/lib/models/thing.js index 6deb992b12..e8637edae3 100644 --- a/lib/services/imageSearch/lib/models/thing.js +++ b/lib/services/imageSearch/lib/models/thing.js @@ -20,43 +20,44 @@ const models = require('./index'); class Thing extends models['Response'] { /** * Create a Thing. - * @member {string} [name] The name of the thing represented by this object. - * @member {string} [url] The URL to get more information about the thing + * @property {string} [name] The name of the thing represented by this + * object. + * @property {string} [url] The URL to get more information about the thing * represented by this object. - * @member {object} [image] An image of the item. - * @member {object} [image.thumbnail] The URL to a thumbnail of the image - * @member {string} [image.imageInsightsToken] The token that you use in a + * @property {object} [image] An image of the item. + * @property {object} [image.thumbnail] The URL to a thumbnail of the image + * @property {string} [image.imageInsightsToken] The token that you use in a * subsequent call to the Image Search API to get additional information * about the image. For information about using this token, see the * insightsToken query parameter. - * @member {object} [image.insightsMetadata] A count of the number of + * @property {object} [image.insightsMetadata] A count of the number of * websites where you can shop or perform other actions related to the image. * For example, if the image is of an apple pie, this object includes a count * of the number of websites where you can buy an apple pie. To indicate the * number of offers in your UX, include badging such as a shopping cart icon * that contains the count. When the user clicks on the icon, use - * imageInisghtsToken to get the list of websites. - * @member {number} [image.insightsMetadata.shoppingSourcesCount] The number - * of websites that offer goods of the products seen in the image. - * @member {number} [image.insightsMetadata.recipeSourcesCount] The number of - * websites that offer recipes of the food seen in the image. - * @member {object} [image.insightsMetadata.aggregateOffer] A summary of the - * online offers of products found in the image. For example, if the image is - * of a dress, the offer might identify the lowest price and the number of - * offers found. Only visually similar products insights include this field. - * The offer includes the following fields: Name, AggregateRating, - * OfferCount, and LowPrice. - * @member {array} [image.insightsMetadata.aggregateOffer.offers] A list of + * imageInsightsToken to get the list of websites. + * @property {number} [image.insightsMetadata.shoppingSourcesCount] The + * number of websites that offer goods of the products seen in the image. + * @property {number} [image.insightsMetadata.recipeSourcesCount] The number + * of websites that offer recipes of the food seen in the image. + * @property {object} [image.insightsMetadata.aggregateOffer] A summary of + * the online offers of products found in the image. For example, if the + * image is of a dress, the offer might identify the lowest price and the + * number of offers found. Only visually similar products insights include + * this field. The offer includes the following fields: Name, + * AggregateRating, OfferCount, and LowPrice. + * @property {array} [image.insightsMetadata.aggregateOffer.offers] A list of * offers from merchants that have offerings related to the image. - * @member {string} [image.imageId] Unique Id for the image - * @member {string} [image.accentColor] A three-byte hexadecimal number that - * represents the color that dominates the image. Use the color as the + * @property {string} [image.imageId] Unique Id for the image + * @property {string} [image.accentColor] A three-byte hexadecimal number + * that represents the color that dominates the image. Use the color as the * temporary background in your client until the image is loaded. - * @member {string} [image.visualWords] Visual representation of the image. + * @property {string} [image.visualWords] Visual representation of the image. * Used for getting more sizes - * @member {string} [description] A short description of the item. - * @member {string} [alternateName] An alias for the item - * @member {string} [bingId] An ID that uniquely identifies this item. + * @property {string} [description] A short description of the item. + * @property {string} [alternateName] An alias for the item + * @property {string} [bingId] An ID that uniquely identifies this item. */ constructor() { super(); diff --git a/lib/services/imageSearch/lib/models/trendingImages.js b/lib/services/imageSearch/lib/models/trendingImages.js index cda5439f77..b7b54482cc 100644 --- a/lib/services/imageSearch/lib/models/trendingImages.js +++ b/lib/services/imageSearch/lib/models/trendingImages.js @@ -21,8 +21,8 @@ const models = require('./index'); class TrendingImages extends models['Response'] { /** * Create a TrendingImages. - * @member {array} categories A list that identifies categories of images and - * a list of trending images in that category. + * @property {array} categories A list that identifies categories of images + * and a list of trending images in that category. */ constructor() { super(); diff --git a/lib/services/imageSearch/lib/models/trendingImagesCategory.js b/lib/services/imageSearch/lib/models/trendingImagesCategory.js index 693ec222c8..5c5c015299 100644 --- a/lib/services/imageSearch/lib/models/trendingImagesCategory.js +++ b/lib/services/imageSearch/lib/models/trendingImagesCategory.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Defines the category of trending images. * @@ -19,13 +17,13 @@ const models = require('./index'); class TrendingImagesCategory { /** * Create a TrendingImagesCategory. - * @member {string} title The name of the image category. For example, + * @property {string} title The name of the image category. For example, * Popular People Searches. - * @member {array} tiles A list of images that are trending in the category. - * Each tile contains an image and a URL that returns more images of the - * subject. For example, if the category is Popular People Searches, the - * image is of a popular person and the URL would return more images of that - * person. + * @property {array} tiles A list of images that are trending in the + * category. Each tile contains an image and a URL that returns more images + * of the subject. For example, if the category is Popular People Searches, + * the image is of a popular person and the URL would return more images of + * that person. */ constructor() { } diff --git a/lib/services/imageSearch/lib/models/trendingImagesTile.js b/lib/services/imageSearch/lib/models/trendingImagesTile.js index de2135b8b5..678ec1e520 100644 --- a/lib/services/imageSearch/lib/models/trendingImagesTile.js +++ b/lib/services/imageSearch/lib/models/trendingImagesTile.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Defines an image tile. * @@ -19,87 +17,87 @@ const models = require('./index'); class TrendingImagesTile { /** * Create a TrendingImagesTile. - * @member {object} query A query that returns a Bing search results page + * @property {object} query A query that returns a Bing search results page * with more images of the subject. For example, if the category is Popular * People Searches, then the thumbnail is of a popular person. The query * would return a Bing search results page with more images of that person. - * @member {string} [query.text] The query string. Use this string as the + * @property {string} [query.text] The query string. Use this string as the * query term in a new search request. - * @member {string} [query.displayText] The display version of the query + * @property {string} [query.displayText] The display version of the query * term. This version of the query term may contain special characters that * highlight the search term found in the query string. The string contains * the highlighting characters only if the query enabled hit highlighting - * @member {string} [query.webSearchUrl] The URL that takes the user to the + * @property {string} [query.webSearchUrl] The URL that takes the user to the * Bing search results page for the query.Only related search results include * this field. - * @member {string} [query.searchLink] The URL that you use to get the + * @property {string} [query.searchLink] The URL that you use to get the * results of the related search. Before using the URL, you must append query * parameters as appropriate and include the Ocp-Apim-Subscription-Key * header. Use this URL if you're displaying the results in your own user * interface. Otherwise, use the webSearchUrl URL. - * @member {object} [query.thumbnail] The URL to a thumbnail of a related + * @property {object} [query.thumbnail] The URL to a thumbnail of a related * image. - * @member {object} [query.thumbnail.thumbnail] The URL to a thumbnail of the - * image - * @member {string} [query.thumbnail.imageInsightsToken] The token that you + * @property {object} [query.thumbnail.thumbnail] The URL to a thumbnail of + * the image + * @property {string} [query.thumbnail.imageInsightsToken] The token that you * use in a subsequent call to the Image Search API to get additional * information about the image. For information about using this token, see * the insightsToken query parameter. - * @member {object} [query.thumbnail.insightsMetadata] A count of the number - * of websites where you can shop or perform other actions related to the - * image. For example, if the image is of an apple pie, this object includes - * a count of the number of websites where you can buy an apple pie. To - * indicate the number of offers in your UX, include badging such as a + * @property {object} [query.thumbnail.insightsMetadata] A count of the + * number of websites where you can shop or perform other actions related to + * the image. For example, if the image is of an apple pie, this object + * includes a count of the number of websites where you can buy an apple pie. + * To indicate the number of offers in your UX, include badging such as a * shopping cart icon that contains the count. When the user clicks on the - * icon, use imageInisghtsToken to get the list of websites. - * @member {number} [query.thumbnail.insightsMetadata.shoppingSourcesCount] + * icon, use imageInsightsToken to get the list of websites. + * @property {number} [query.thumbnail.insightsMetadata.shoppingSourcesCount] * The number of websites that offer goods of the products seen in the image. - * @member {number} [query.thumbnail.insightsMetadata.recipeSourcesCount] The - * number of websites that offer recipes of the food seen in the image. - * @member {object} [query.thumbnail.insightsMetadata.aggregateOffer] A + * @property {number} [query.thumbnail.insightsMetadata.recipeSourcesCount] + * The number of websites that offer recipes of the food seen in the image. + * @property {object} [query.thumbnail.insightsMetadata.aggregateOffer] A * summary of the online offers of products found in the image. For example, * if the image is of a dress, the offer might identify the lowest price and * the number of offers found. Only visually similar products insights * include this field. The offer includes the following fields: Name, * AggregateRating, OfferCount, and LowPrice. - * @member {array} [query.thumbnail.insightsMetadata.aggregateOffer.offers] A - * list of offers from merchants that have offerings related to the image. - * @member {string} [query.thumbnail.imageId] Unique Id for the image - * @member {string} [query.thumbnail.accentColor] A three-byte hexadecimal + * @property {array} [query.thumbnail.insightsMetadata.aggregateOffer.offers] + * A list of offers from merchants that have offerings related to the image. + * @property {string} [query.thumbnail.imageId] Unique Id for the image + * @property {string} [query.thumbnail.accentColor] A three-byte hexadecimal * number that represents the color that dominates the image. Use the color * as the temporary background in your client until the image is loaded. - * @member {string} [query.thumbnail.visualWords] Visual representation of + * @property {string} [query.thumbnail.visualWords] Visual representation of * the image. Used for getting more sizes - * @member {object} image The image's thumbnail. - * @member {object} [image.thumbnail] The URL to a thumbnail of the image - * @member {string} [image.imageInsightsToken] The token that you use in a + * @property {object} image The image's thumbnail. + * @property {object} [image.thumbnail] The URL to a thumbnail of the image + * @property {string} [image.imageInsightsToken] The token that you use in a * subsequent call to the Image Search API to get additional information * about the image. For information about using this token, see the * insightsToken query parameter. - * @member {object} [image.insightsMetadata] A count of the number of + * @property {object} [image.insightsMetadata] A count of the number of * websites where you can shop or perform other actions related to the image. * For example, if the image is of an apple pie, this object includes a count * of the number of websites where you can buy an apple pie. To indicate the * number of offers in your UX, include badging such as a shopping cart icon * that contains the count. When the user clicks on the icon, use - * imageInisghtsToken to get the list of websites. - * @member {number} [image.insightsMetadata.shoppingSourcesCount] The number - * of websites that offer goods of the products seen in the image. - * @member {number} [image.insightsMetadata.recipeSourcesCount] The number of - * websites that offer recipes of the food seen in the image. - * @member {object} [image.insightsMetadata.aggregateOffer] A summary of the - * online offers of products found in the image. For example, if the image is - * of a dress, the offer might identify the lowest price and the number of - * offers found. Only visually similar products insights include this field. - * The offer includes the following fields: Name, AggregateRating, - * OfferCount, and LowPrice. - * @member {array} [image.insightsMetadata.aggregateOffer.offers] A list of + * imageInsightsToken to get the list of websites. + * @property {number} [image.insightsMetadata.shoppingSourcesCount] The + * number of websites that offer goods of the products seen in the image. + * @property {number} [image.insightsMetadata.recipeSourcesCount] The number + * of websites that offer recipes of the food seen in the image. + * @property {object} [image.insightsMetadata.aggregateOffer] A summary of + * the online offers of products found in the image. For example, if the + * image is of a dress, the offer might identify the lowest price and the + * number of offers found. Only visually similar products insights include + * this field. The offer includes the following fields: Name, + * AggregateRating, OfferCount, and LowPrice. + * @property {array} [image.insightsMetadata.aggregateOffer.offers] A list of * offers from merchants that have offerings related to the image. - * @member {string} [image.imageId] Unique Id for the image - * @member {string} [image.accentColor] A three-byte hexadecimal number that - * represents the color that dominates the image. Use the color as the + * @property {string} [image.imageId] Unique Id for the image + * @property {string} [image.accentColor] A three-byte hexadecimal number + * that represents the color that dominates the image. Use the color as the * temporary background in your client until the image is loaded. - * @member {string} [image.visualWords] Visual representation of the image. + * @property {string} [image.visualWords] Visual representation of the image. * Used for getting more sizes */ constructor() { diff --git a/lib/services/imageSearch/lib/operations/imagesOperations.js b/lib/services/imageSearch/lib/operations/imagesOperations.js index 0c8a4cfaee..d6a2a76c38 100644 --- a/lib/services/imageSearch/lib/operations/imagesOperations.js +++ b/lib/services/imageSearch/lib/operations/imagesOperations.js @@ -410,6 +410,9 @@ function _search(query, options, callback) { let xBingApisSDK = 'true'; // Validate try { + if (this.client.endpoint === null || this.client.endpoint === undefined || typeof this.client.endpoint.valueOf() !== 'string') { + throw new Error('this.client.endpoint cannot be null or undefined and it must be of type string.'); + } if (acceptLanguage !== null && acceptLanguage !== undefined && typeof acceptLanguage.valueOf() !== 'string') { throw new Error('acceptLanguage must be of type string.'); } @@ -501,6 +504,7 @@ function _search(query, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'images/search'; + requestUrl = requestUrl.replace('{Endpoint}', this.client.endpoint); let queryParameters = []; if (aspect !== null && aspect !== undefined) { queryParameters.push('aspect=' + encodeURIComponent(aspect)); @@ -1013,6 +1017,9 @@ function _details(query, options, callback) { let xBingApisSDK = 'true'; // Validate try { + if (this.client.endpoint === null || this.client.endpoint === undefined || typeof this.client.endpoint.valueOf() !== 'string') { + throw new Error('this.client.endpoint cannot be null or undefined and it must be of type string.'); + } if (acceptLanguage !== null && acceptLanguage !== undefined && typeof acceptLanguage.valueOf() !== 'string') { throw new Error('acceptLanguage must be of type string.'); } @@ -1084,6 +1091,7 @@ function _details(query, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'images/details'; + requestUrl = requestUrl.replace('{Endpoint}', this.client.endpoint); let queryParameters = []; if (cropBottom !== null && cropBottom !== undefined) { queryParameters.push('cab=' + encodeURIComponent(cropBottom.toString())); @@ -1449,6 +1457,9 @@ function _trending(options, callback) { let xBingApisSDK = 'true'; // Validate try { + if (this.client.endpoint === null || this.client.endpoint === undefined || typeof this.client.endpoint.valueOf() !== 'string') { + throw new Error('this.client.endpoint cannot be null or undefined and it must be of type string.'); + } if (acceptLanguage !== null && acceptLanguage !== undefined && typeof acceptLanguage.valueOf() !== 'string') { throw new Error('acceptLanguage must be of type string.'); } @@ -1483,6 +1494,7 @@ function _trending(options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'images/trending'; + requestUrl = requestUrl.replace('{Endpoint}', this.client.endpoint); let queryParameters = []; if (countryCode !== null && countryCode !== undefined) { queryParameters.push('cc=' + encodeURIComponent(countryCode)); @@ -1594,7 +1606,7 @@ function _trending(options, callback) { class ImagesOperations { /** * Create a ImagesOperations. - * @param {ImageSearchAPIClient} client Reference to the service client. + * @param {ImageSearchClient} client Reference to the service client. */ constructor(client) { this.client = client; diff --git a/lib/services/imageSearch/lib/operations/index.d.ts b/lib/services/imageSearch/lib/operations/index.d.ts index 6dc637b1fc..4aceef9bcb 100644 --- a/lib/services/imageSearch/lib/operations/index.d.ts +++ b/lib/services/imageSearch/lib/operations/index.d.ts @@ -16,7 +16,7 @@ import * as models from '../models'; * @class * ImagesOperations * __NOTE__: An instance of this class is automatically created for an - * instance of the ImageSearchAPIClient. + * instance of the ImageSearchClient. */ export interface ImagesOperations { diff --git a/lib/services/imageSearch/package.json b/lib/services/imageSearch/package.json index 2003ac6cd6..cab085e2a8 100644 --- a/lib/services/imageSearch/package.json +++ b/lib/services/imageSearch/package.json @@ -1,8 +1,8 @@ { "name": "azure-cognitiveservices-imagesearch", "author": "Microsoft Corporation", - "description": "ImageSearchAPIClient Library with typescript type definitions for node", - "version": "1.1.0", + "description": "ImageSearchClient Library with typescript type definitions for node", + "version": "2.0.0", "dependencies": { "ms-rest": "^2.3.3" }, @@ -11,14 +11,14 @@ "azure" ], "license": "MIT", - "main": "./lib/imageSearchAPIClient.js", - "types": "./lib/imageSearchAPIClient.d.ts", - "homepage": "http://github.com/azure/azure-sdk-for-node", + "main": "./lib/imageSearchClient.js", + "types": "./lib/imageSearchClient.d.ts", + "homepage": "https://github.com/azure/azure-sdk-for-node/tree/master/lib/services/imageSearch", "repository": { "type": "git", "url": "https://github.com/azure/azure-sdk-for-node.git" }, "bugs": { - "url": "http://github.com/Azure/azure-sdk-for-node/issues" + "url": "https://github.com/azure/azure-sdk-for-node/issues" } -} \ No newline at end of file +} diff --git a/lib/services/keyVault/package.json b/lib/services/keyVault/package.json index 02e19c048a..6361d9f263 100644 --- a/lib/services/keyVault/package.json +++ b/lib/services/keyVault/package.json @@ -2,7 +2,7 @@ "name": "azure-keyvault", "author": "Microsoft Corporation", "description": "KeyVaultClient Library with typescript type definitions for node", - "version": "3.1.0", + "version": "3.0.4", "dependencies": { "ms-rest": "^2.3.2", "ms-rest-azure": "^2.5.5" diff --git a/lib/services/logicManagement/README.md b/lib/services/logicManagement/README.md index 13683f4f53..9f4a33ce62 100644 --- a/lib/services/logicManagement/README.md +++ b/lib/services/logicManagement/README.md @@ -3,40 +3,43 @@ uid: azure-arm-logic summary: *content --- -# Microsoft Azure SDK for Node.js - LogicManagementClient +**This SDK will be deprecated next year and will be replaced by a new TypeScript-based isomorphic SDK (found at https://github.com/Azure/azure-sdk-for-js) which works on Node.js and browsers.** +## Microsoft Azure SDK for Node.js - LogicManagementClient + This project provides a Node.js package for accessing Azure. Right now it supports: - **Node.js version 6.x.x or higher** -## Features +### Features -## How to Install +### How to Install ```bash npm install azure-arm-logic ``` -## How to use +### How to use -### Authentication, client creation and listBySubscription workflows as an example. +#### Authentication, client creation, and listBySubscription workflows as an example. ```javascript const msRestAzure = require("ms-rest-azure"); const LogicManagementClient = require("azure-arm-logic"); msRestAzure.interactiveLogin().then((creds) => { - const subscriptionId = ""; - const client = new LogicManagementClient(creds, subscriptionId); - const top = 1; - const filter = "testfilter"; - return client.workflows.listBySubscription(top, filter).then((result) => { - console.log("The result is:"); - console.log(result); - }); + const subscriptionId = ""; + const client = new LogicManagementClient(creds, subscriptionId); + const top = 1; + const filter = "testfilter"; + + return client.workflows.listBySubscription(top, filter).then((result) => { + console.log("The result is:"); + console.log(result); + }); }).catch((err) => { console.log('An error occurred:'); console.dir(err, {depth: null, colors: true}); }); - -## Related projects +``` +### Related projects - [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node) diff --git a/lib/services/logicManagement/lib/logicManagementClient.d.ts b/lib/services/logicManagement/lib/logicManagementClient.d.ts index 9c6a7d813f..f9918481b2 100644 --- a/lib/services/logicManagement/lib/logicManagementClient.d.ts +++ b/lib/services/logicManagement/lib/logicManagementClient.d.ts @@ -64,6 +64,8 @@ export default class LogicManagementClient extends AzureServiceClient { workflowRuns: operations.WorkflowRuns; workflowRunActions: operations.WorkflowRunActions; workflowRunActionRepetitions: operations.WorkflowRunActionRepetitions; + workflowRunActionRepetitionsRequestHistories: operations.WorkflowRunActionRepetitionsRequestHistories; + workflowRunActionRequestHistories: operations.WorkflowRunActionRequestHistories; workflowRunActionScopeRepetitions: operations.WorkflowRunActionScopeRepetitions; workflowRunOperations: operations.WorkflowRunOperations; integrationAccounts: operations.IntegrationAccounts; diff --git a/lib/services/logicManagement/lib/logicManagementClient.js b/lib/services/logicManagement/lib/logicManagementClient.js index 5a26bf5fb0..06baa7badf 100644 --- a/lib/services/logicManagement/lib/logicManagementClient.js +++ b/lib/services/logicManagement/lib/logicManagementClient.js @@ -80,6 +80,8 @@ class LogicManagementClient extends ServiceClient { this.workflowRuns = new operations.WorkflowRuns(this); this.workflowRunActions = new operations.WorkflowRunActions(this); this.workflowRunActionRepetitions = new operations.WorkflowRunActionRepetitions(this); + this.workflowRunActionRepetitionsRequestHistories = new operations.WorkflowRunActionRepetitionsRequestHistories(this); + this.workflowRunActionRequestHistories = new operations.WorkflowRunActionRequestHistories(this); this.workflowRunActionScopeRepetitions = new operations.WorkflowRunActionScopeRepetitions(this); this.workflowRunOperations = new operations.WorkflowRunOperations(this); this.integrationAccounts = new operations.IntegrationAccounts(this); diff --git a/lib/services/logicManagement/lib/models/aS2AcknowledgementConnectionSettings.js b/lib/services/logicManagement/lib/models/aS2AcknowledgementConnectionSettings.js index 22622a355a..2cb3139de7 100644 --- a/lib/services/logicManagement/lib/models/aS2AcknowledgementConnectionSettings.js +++ b/lib/services/logicManagement/lib/models/aS2AcknowledgementConnectionSettings.js @@ -17,14 +17,14 @@ class AS2AcknowledgementConnectionSettings { /** * Create a AS2AcknowledgementConnectionSettings. - * @member {boolean} ignoreCertificateNameMismatch The value indicating + * @property {boolean} ignoreCertificateNameMismatch The value indicating * whether to ignore mismatch in certificate name. - * @member {boolean} supportHttpStatusCodeContinue The value indicating + * @property {boolean} supportHttpStatusCodeContinue The value indicating * whether to support HTTP status code 'CONTINUE'. - * @member {boolean} keepHttpConnectionAlive The value indicating whether to - * keep the connection alive. - * @member {boolean} unfoldHttpHeaders The value indicating whether to unfold - * the HTTP headers. + * @property {boolean} keepHttpConnectionAlive The value indicating whether + * to keep the connection alive. + * @property {boolean} unfoldHttpHeaders The value indicating whether to + * unfold the HTTP headers. */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/aS2AgreementContent.js b/lib/services/logicManagement/lib/models/aS2AgreementContent.js index 4416e9faaf..2bc3b98c8f 100644 --- a/lib/services/logicManagement/lib/models/aS2AgreementContent.js +++ b/lib/services/logicManagement/lib/models/aS2AgreementContent.js @@ -17,340 +17,342 @@ class AS2AgreementContent { /** * Create a AS2AgreementContent. - * @member {object} receiveAgreement The AS2 one-way receive agreement. - * @member {object} [receiveAgreement.senderBusinessIdentity] The sender + * @property {object} receiveAgreement The AS2 one-way receive agreement. + * @property {object} [receiveAgreement.senderBusinessIdentity] The sender * business identity - * @member {string} [receiveAgreement.senderBusinessIdentity.qualifier] The + * @property {string} [receiveAgreement.senderBusinessIdentity.qualifier] The * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [receiveAgreement.senderBusinessIdentity.value] The user - * defined business identity value. - * @member {object} [receiveAgreement.receiverBusinessIdentity] The receiver - * business identity - * @member {string} [receiveAgreement.receiverBusinessIdentity.qualifier] The - * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [receiveAgreement.receiverBusinessIdentity.value] The + * @property {string} [receiveAgreement.senderBusinessIdentity.value] The + * user defined business identity value. + * @property {object} [receiveAgreement.receiverBusinessIdentity] The + * receiver business identity + * @property {string} [receiveAgreement.receiverBusinessIdentity.qualifier] + * The business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 + * @property {string} [receiveAgreement.receiverBusinessIdentity.value] The * user defined business identity value. - * @member {object} [receiveAgreement.protocolSettings] The AS2 protocol + * @property {object} [receiveAgreement.protocolSettings] The AS2 protocol * settings. - * @member {object} + * @property {object} * [receiveAgreement.protocolSettings.messageConnectionSettings] The message * connection settings. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.messageConnectionSettings.ignoreCertificateNameMismatch] * The value indicating whether to ignore mismatch in certificate name. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.messageConnectionSettings.supportHttpStatusCodeContinue] * The value indicating whether to support HTTP status code 'CONTINUE'. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.messageConnectionSettings.keepHttpConnectionAlive] * The value indicating whether to keep the connection alive. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.messageConnectionSettings.unfoldHttpHeaders] * The value indicating whether to unfold the HTTP headers. - * @member {object} + * @property {object} * [receiveAgreement.protocolSettings.acknowledgementConnectionSettings] The * acknowledgement connection settings. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.acknowledgementConnectionSettings.ignoreCertificateNameMismatch] * The value indicating whether to ignore mismatch in certificate name. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.acknowledgementConnectionSettings.supportHttpStatusCodeContinue] * The value indicating whether to support HTTP status code 'CONTINUE'. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.acknowledgementConnectionSettings.keepHttpConnectionAlive] * The value indicating whether to keep the connection alive. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.acknowledgementConnectionSettings.unfoldHttpHeaders] * The value indicating whether to unfold the HTTP headers. - * @member {object} [receiveAgreement.protocolSettings.mdnSettings] The MDN + * @property {object} [receiveAgreement.protocolSettings.mdnSettings] The MDN * settings. - * @member {boolean} [receiveAgreement.protocolSettings.mdnSettings.needMdn] - * The value indicating whether to send or request a MDN. - * @member {boolean} [receiveAgreement.protocolSettings.mdnSettings.signMdn] - * The value indicating whether the MDN needs to be signed or not. - * @member {boolean} + * @property {boolean} + * [receiveAgreement.protocolSettings.mdnSettings.needMdn] The value + * indicating whether to send or request a MDN. + * @property {boolean} + * [receiveAgreement.protocolSettings.mdnSettings.signMdn] The value + * indicating whether the MDN needs to be signed or not. + * @property {boolean} * [receiveAgreement.protocolSettings.mdnSettings.sendMdnAsynchronously] The * value indicating whether to send the asynchronous MDN. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.mdnSettings.receiptDeliveryUrl] The * receipt delivery URL. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.mdnSettings.dispositionNotificationTo] * The disposition notification to header value. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.mdnSettings.signOutboundMdnIfOptional] * The value indicating whether to sign the outbound MDN if optional. - * @member {string} [receiveAgreement.protocolSettings.mdnSettings.mdnText] + * @property {string} [receiveAgreement.protocolSettings.mdnSettings.mdnText] * The MDN text. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.mdnSettings.sendInboundMdnToMessageBox] * The value indicating whether to send inbound MDN to message box. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.mdnSettings.micHashingAlgorithm] The * signing or hashing algorithm. Possible values include: 'NotSpecified', * 'None', 'MD5', 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512' - * @member {object} [receiveAgreement.protocolSettings.securitySettings] The - * security settings. - * @member {boolean} + * @property {object} [receiveAgreement.protocolSettings.securitySettings] + * The security settings. + * @property {boolean} * [receiveAgreement.protocolSettings.securitySettings.overrideGroupSigningCertificate] * The value indicating whether to send or request a MDN. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.securitySettings.signingCertificateName] * The name of the signing certificate. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.securitySettings.encryptionCertificateName] * The name of the encryption certificate. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.securitySettings.enableNrrForInboundEncodedMessages] * The value indicating whether to enable NRR for inbound encoded messages. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.securitySettings.enableNrrForInboundDecodedMessages] * The value indicating whether to enable NRR for inbound decoded messages. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.securitySettings.enableNrrForOutboundMdn] * The value indicating whether to enable NRR for outbound MDN. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.securitySettings.enableNrrForOutboundEncodedMessages] * The value indicating whether to enable NRR for outbound encoded messages. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.securitySettings.enableNrrForOutboundDecodedMessages] * The value indicating whether to enable NRR for outbound decoded messages. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.securitySettings.enableNrrForInboundMdn] * The value indicating whether to enable NRR for inbound MDN. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.securitySettings.sha2AlgorithmFormat] * The Sha2 algorithm format. Valid values are Sha2, ShaHashSize, * ShaHyphenHashSize, Sha2UnderscoreHashSize. - * @member {object} [receiveAgreement.protocolSettings.validationSettings] + * @property {object} [receiveAgreement.protocolSettings.validationSettings] * The validation settings. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.validationSettings.overrideMessageProperties] * The value indicating whether to override incoming message properties with * those in agreement. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.validationSettings.encryptMessage] The * value indicating whether the message has to be encrypted. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.validationSettings.signMessage] The * value indicating whether the message has to be signed. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.validationSettings.compressMessage] The * value indicating whether the message has to be compressed. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.validationSettings.checkDuplicateMessage] * The value indicating whether to check for duplicate message. - * @member {number} + * @property {number} * [receiveAgreement.protocolSettings.validationSettings.interchangeDuplicatesValidityDays] * The number of days to look back for duplicate interchange. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.validationSettings.checkCertificateRevocationListOnSend] * The value indicating whether to check for certificate revocation list on * send. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.validationSettings.checkCertificateRevocationListOnReceive] * The value indicating whether to check for certificate revocation list on * receive. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.validationSettings.encryptionAlgorithm] * The encryption algorithm. Possible values include: 'NotSpecified', 'None', * 'DES3', 'RC2', 'AES128', 'AES192', 'AES256' - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.validationSettings.signingAlgorithm] * The signing algorithm. Possible values include: 'NotSpecified', 'Default', * 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512' - * @member {object} [receiveAgreement.protocolSettings.envelopeSettings] The - * envelope settings. - * @member {string} + * @property {object} [receiveAgreement.protocolSettings.envelopeSettings] + * The envelope settings. + * @property {string} * [receiveAgreement.protocolSettings.envelopeSettings.messageContentType] * The message content type. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.envelopeSettings.transmitFileNameInMimeHeader] * The value indicating whether to transmit file name in mime header. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.envelopeSettings.fileNameTemplate] The * template for file name. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.envelopeSettings.suspendMessageOnFileNameGenerationError] * The value indicating whether to suspend message on file name generation * error. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.envelopeSettings.autogenerateFileName] * The value indicating whether to auto generate file name. - * @member {object} [receiveAgreement.protocolSettings.errorSettings] The + * @property {object} [receiveAgreement.protocolSettings.errorSettings] The * error settings. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.errorSettings.suspendDuplicateMessage] * The value indicating whether to suspend duplicate message. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.errorSettings.resendIfMdnNotReceived] * The value indicating whether to resend message If MDN is not received. - * @member {object} sendAgreement The AS2 one-way send agreement. - * @member {object} [sendAgreement.senderBusinessIdentity] The sender + * @property {object} sendAgreement The AS2 one-way send agreement. + * @property {object} [sendAgreement.senderBusinessIdentity] The sender * business identity - * @member {string} [sendAgreement.senderBusinessIdentity.qualifier] The + * @property {string} [sendAgreement.senderBusinessIdentity.qualifier] The * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [sendAgreement.senderBusinessIdentity.value] The user + * @property {string} [sendAgreement.senderBusinessIdentity.value] The user * defined business identity value. - * @member {object} [sendAgreement.receiverBusinessIdentity] The receiver + * @property {object} [sendAgreement.receiverBusinessIdentity] The receiver * business identity - * @member {string} [sendAgreement.receiverBusinessIdentity.qualifier] The + * @property {string} [sendAgreement.receiverBusinessIdentity.qualifier] The * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [sendAgreement.receiverBusinessIdentity.value] The user + * @property {string} [sendAgreement.receiverBusinessIdentity.value] The user * defined business identity value. - * @member {object} [sendAgreement.protocolSettings] The AS2 protocol + * @property {object} [sendAgreement.protocolSettings] The AS2 protocol * settings. - * @member {object} + * @property {object} * [sendAgreement.protocolSettings.messageConnectionSettings] The message * connection settings. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.messageConnectionSettings.ignoreCertificateNameMismatch] * The value indicating whether to ignore mismatch in certificate name. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.messageConnectionSettings.supportHttpStatusCodeContinue] * The value indicating whether to support HTTP status code 'CONTINUE'. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.messageConnectionSettings.keepHttpConnectionAlive] * The value indicating whether to keep the connection alive. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.messageConnectionSettings.unfoldHttpHeaders] * The value indicating whether to unfold the HTTP headers. - * @member {object} + * @property {object} * [sendAgreement.protocolSettings.acknowledgementConnectionSettings] The * acknowledgement connection settings. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.acknowledgementConnectionSettings.ignoreCertificateNameMismatch] * The value indicating whether to ignore mismatch in certificate name. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.acknowledgementConnectionSettings.supportHttpStatusCodeContinue] * The value indicating whether to support HTTP status code 'CONTINUE'. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.acknowledgementConnectionSettings.keepHttpConnectionAlive] * The value indicating whether to keep the connection alive. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.acknowledgementConnectionSettings.unfoldHttpHeaders] * The value indicating whether to unfold the HTTP headers. - * @member {object} [sendAgreement.protocolSettings.mdnSettings] The MDN + * @property {object} [sendAgreement.protocolSettings.mdnSettings] The MDN * settings. - * @member {boolean} [sendAgreement.protocolSettings.mdnSettings.needMdn] The - * value indicating whether to send or request a MDN. - * @member {boolean} [sendAgreement.protocolSettings.mdnSettings.signMdn] The - * value indicating whether the MDN needs to be signed or not. - * @member {boolean} + * @property {boolean} [sendAgreement.protocolSettings.mdnSettings.needMdn] + * The value indicating whether to send or request a MDN. + * @property {boolean} [sendAgreement.protocolSettings.mdnSettings.signMdn] + * The value indicating whether the MDN needs to be signed or not. + * @property {boolean} * [sendAgreement.protocolSettings.mdnSettings.sendMdnAsynchronously] The * value indicating whether to send the asynchronous MDN. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.mdnSettings.receiptDeliveryUrl] The * receipt delivery URL. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.mdnSettings.dispositionNotificationTo] The * disposition notification to header value. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.mdnSettings.signOutboundMdnIfOptional] The * value indicating whether to sign the outbound MDN if optional. - * @member {string} [sendAgreement.protocolSettings.mdnSettings.mdnText] The - * MDN text. - * @member {boolean} + * @property {string} [sendAgreement.protocolSettings.mdnSettings.mdnText] + * The MDN text. + * @property {boolean} * [sendAgreement.protocolSettings.mdnSettings.sendInboundMdnToMessageBox] * The value indicating whether to send inbound MDN to message box. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.mdnSettings.micHashingAlgorithm] The * signing or hashing algorithm. Possible values include: 'NotSpecified', * 'None', 'MD5', 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512' - * @member {object} [sendAgreement.protocolSettings.securitySettings] The + * @property {object} [sendAgreement.protocolSettings.securitySettings] The * security settings. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.securitySettings.overrideGroupSigningCertificate] * The value indicating whether to send or request a MDN. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.securitySettings.signingCertificateName] * The name of the signing certificate. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.securitySettings.encryptionCertificateName] * The name of the encryption certificate. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.securitySettings.enableNrrForInboundEncodedMessages] * The value indicating whether to enable NRR for inbound encoded messages. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.securitySettings.enableNrrForInboundDecodedMessages] * The value indicating whether to enable NRR for inbound decoded messages. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.securitySettings.enableNrrForOutboundMdn] * The value indicating whether to enable NRR for outbound MDN. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.securitySettings.enableNrrForOutboundEncodedMessages] * The value indicating whether to enable NRR for outbound encoded messages. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.securitySettings.enableNrrForOutboundDecodedMessages] * The value indicating whether to enable NRR for outbound decoded messages. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.securitySettings.enableNrrForInboundMdn] * The value indicating whether to enable NRR for inbound MDN. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.securitySettings.sha2AlgorithmFormat] The * Sha2 algorithm format. Valid values are Sha2, ShaHashSize, * ShaHyphenHashSize, Sha2UnderscoreHashSize. - * @member {object} [sendAgreement.protocolSettings.validationSettings] The + * @property {object} [sendAgreement.protocolSettings.validationSettings] The * validation settings. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.validationSettings.overrideMessageProperties] * The value indicating whether to override incoming message properties with * those in agreement. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.validationSettings.encryptMessage] The * value indicating whether the message has to be encrypted. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.validationSettings.signMessage] The value * indicating whether the message has to be signed. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.validationSettings.compressMessage] The * value indicating whether the message has to be compressed. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.validationSettings.checkDuplicateMessage] * The value indicating whether to check for duplicate message. - * @member {number} + * @property {number} * [sendAgreement.protocolSettings.validationSettings.interchangeDuplicatesValidityDays] * The number of days to look back for duplicate interchange. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.validationSettings.checkCertificateRevocationListOnSend] * The value indicating whether to check for certificate revocation list on * send. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.validationSettings.checkCertificateRevocationListOnReceive] * The value indicating whether to check for certificate revocation list on * receive. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.validationSettings.encryptionAlgorithm] * The encryption algorithm. Possible values include: 'NotSpecified', 'None', * 'DES3', 'RC2', 'AES128', 'AES192', 'AES256' - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.validationSettings.signingAlgorithm] The * signing algorithm. Possible values include: 'NotSpecified', 'Default', * 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512' - * @member {object} [sendAgreement.protocolSettings.envelopeSettings] The + * @property {object} [sendAgreement.protocolSettings.envelopeSettings] The * envelope settings. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.envelopeSettings.messageContentType] The * message content type. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.envelopeSettings.transmitFileNameInMimeHeader] * The value indicating whether to transmit file name in mime header. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.envelopeSettings.fileNameTemplate] The * template for file name. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.envelopeSettings.suspendMessageOnFileNameGenerationError] * The value indicating whether to suspend message on file name generation * error. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.envelopeSettings.autogenerateFileName] The * value indicating whether to auto generate file name. - * @member {object} [sendAgreement.protocolSettings.errorSettings] The error - * settings. - * @member {boolean} + * @property {object} [sendAgreement.protocolSettings.errorSettings] The + * error settings. + * @property {boolean} * [sendAgreement.protocolSettings.errorSettings.suspendDuplicateMessage] The * value indicating whether to suspend duplicate message. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.errorSettings.resendIfMdnNotReceived] The * value indicating whether to resend message If MDN is not received. */ diff --git a/lib/services/logicManagement/lib/models/aS2EnvelopeSettings.js b/lib/services/logicManagement/lib/models/aS2EnvelopeSettings.js index 4827d27b48..2c03a83a55 100644 --- a/lib/services/logicManagement/lib/models/aS2EnvelopeSettings.js +++ b/lib/services/logicManagement/lib/models/aS2EnvelopeSettings.js @@ -17,13 +17,13 @@ class AS2EnvelopeSettings { /** * Create a AS2EnvelopeSettings. - * @member {string} messageContentType The message content type. - * @member {boolean} transmitFileNameInMimeHeader The value indicating + * @property {string} messageContentType The message content type. + * @property {boolean} transmitFileNameInMimeHeader The value indicating * whether to transmit file name in mime header. - * @member {string} fileNameTemplate The template for file name. - * @member {boolean} suspendMessageOnFileNameGenerationError The value + * @property {string} fileNameTemplate The template for file name. + * @property {boolean} suspendMessageOnFileNameGenerationError The value * indicating whether to suspend message on file name generation error. - * @member {boolean} autogenerateFileName The value indicating whether to + * @property {boolean} autogenerateFileName The value indicating whether to * auto generate file name. */ constructor() { diff --git a/lib/services/logicManagement/lib/models/aS2ErrorSettings.js b/lib/services/logicManagement/lib/models/aS2ErrorSettings.js index a52c1df388..463fa41df0 100644 --- a/lib/services/logicManagement/lib/models/aS2ErrorSettings.js +++ b/lib/services/logicManagement/lib/models/aS2ErrorSettings.js @@ -17,9 +17,9 @@ class AS2ErrorSettings { /** * Create a AS2ErrorSettings. - * @member {boolean} suspendDuplicateMessage The value indicating whether to - * suspend duplicate message. - * @member {boolean} resendIfMdnNotReceived The value indicating whether to + * @property {boolean} suspendDuplicateMessage The value indicating whether + * to suspend duplicate message. + * @property {boolean} resendIfMdnNotReceived The value indicating whether to * resend message If MDN is not received. */ constructor() { diff --git a/lib/services/logicManagement/lib/models/aS2MdnSettings.js b/lib/services/logicManagement/lib/models/aS2MdnSettings.js index a53335a89c..715f3885d7 100644 --- a/lib/services/logicManagement/lib/models/aS2MdnSettings.js +++ b/lib/services/logicManagement/lib/models/aS2MdnSettings.js @@ -17,21 +17,21 @@ class AS2MdnSettings { /** * Create a AS2MdnSettings. - * @member {boolean} needMdn The value indicating whether to send or request - * a MDN. - * @member {boolean} signMdn The value indicating whether the MDN needs to be - * signed or not. - * @member {boolean} sendMdnAsynchronously The value indicating whether to + * @property {boolean} needMdn The value indicating whether to send or + * request a MDN. + * @property {boolean} signMdn The value indicating whether the MDN needs to + * be signed or not. + * @property {boolean} sendMdnAsynchronously The value indicating whether to * send the asynchronous MDN. - * @member {string} [receiptDeliveryUrl] The receipt delivery URL. - * @member {string} [dispositionNotificationTo] The disposition notification - * to header value. - * @member {boolean} signOutboundMdnIfOptional The value indicating whether + * @property {string} [receiptDeliveryUrl] The receipt delivery URL. + * @property {string} [dispositionNotificationTo] The disposition + * notification to header value. + * @property {boolean} signOutboundMdnIfOptional The value indicating whether * to sign the outbound MDN if optional. - * @member {string} [mdnText] The MDN text. - * @member {boolean} sendInboundMdnToMessageBox The value indicating whether - * to send inbound MDN to message box. - * @member {string} micHashingAlgorithm The signing or hashing algorithm. + * @property {string} [mdnText] The MDN text. + * @property {boolean} sendInboundMdnToMessageBox The value indicating + * whether to send inbound MDN to message box. + * @property {string} micHashingAlgorithm The signing or hashing algorithm. * Possible values include: 'NotSpecified', 'None', 'MD5', 'SHA1', 'SHA2256', * 'SHA2384', 'SHA2512' */ diff --git a/lib/services/logicManagement/lib/models/aS2MessageConnectionSettings.js b/lib/services/logicManagement/lib/models/aS2MessageConnectionSettings.js index 3f51d34d65..1a82b2df91 100644 --- a/lib/services/logicManagement/lib/models/aS2MessageConnectionSettings.js +++ b/lib/services/logicManagement/lib/models/aS2MessageConnectionSettings.js @@ -17,14 +17,14 @@ class AS2MessageConnectionSettings { /** * Create a AS2MessageConnectionSettings. - * @member {boolean} ignoreCertificateNameMismatch The value indicating + * @property {boolean} ignoreCertificateNameMismatch The value indicating * whether to ignore mismatch in certificate name. - * @member {boolean} supportHttpStatusCodeContinue The value indicating + * @property {boolean} supportHttpStatusCodeContinue The value indicating * whether to support HTTP status code 'CONTINUE'. - * @member {boolean} keepHttpConnectionAlive The value indicating whether to - * keep the connection alive. - * @member {boolean} unfoldHttpHeaders The value indicating whether to unfold - * the HTTP headers. + * @property {boolean} keepHttpConnectionAlive The value indicating whether + * to keep the connection alive. + * @property {boolean} unfoldHttpHeaders The value indicating whether to + * unfold the HTTP headers. */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/aS2OneWayAgreement.js b/lib/services/logicManagement/lib/models/aS2OneWayAgreement.js index 18cf1224ca..ff12bf5031 100644 --- a/lib/services/logicManagement/lib/models/aS2OneWayAgreement.js +++ b/lib/services/logicManagement/lib/models/aS2OneWayAgreement.js @@ -17,149 +17,155 @@ class AS2OneWayAgreement { /** * Create a AS2OneWayAgreement. - * @member {object} senderBusinessIdentity The sender business identity - * @member {string} [senderBusinessIdentity.qualifier] The business identity - * qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [senderBusinessIdentity.value] The user defined business - * identity value. - * @member {object} receiverBusinessIdentity The receiver business identity - * @member {string} [receiverBusinessIdentity.qualifier] The business + * @property {object} senderBusinessIdentity The sender business identity + * @property {string} [senderBusinessIdentity.qualifier] The business * identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [receiverBusinessIdentity.value] The user defined + * @property {string} [senderBusinessIdentity.value] The user defined * business identity value. - * @member {object} protocolSettings The AS2 protocol settings. - * @member {object} [protocolSettings.messageConnectionSettings] The message - * connection settings. - * @member {boolean} + * @property {object} receiverBusinessIdentity The receiver business identity + * @property {string} [receiverBusinessIdentity.qualifier] The business + * identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 + * @property {string} [receiverBusinessIdentity.value] The user defined + * business identity value. + * @property {object} protocolSettings The AS2 protocol settings. + * @property {object} [protocolSettings.messageConnectionSettings] The + * message connection settings. + * @property {boolean} * [protocolSettings.messageConnectionSettings.ignoreCertificateNameMismatch] * The value indicating whether to ignore mismatch in certificate name. - * @member {boolean} + * @property {boolean} * [protocolSettings.messageConnectionSettings.supportHttpStatusCodeContinue] * The value indicating whether to support HTTP status code 'CONTINUE'. - * @member {boolean} + * @property {boolean} * [protocolSettings.messageConnectionSettings.keepHttpConnectionAlive] The * value indicating whether to keep the connection alive. - * @member {boolean} + * @property {boolean} * [protocolSettings.messageConnectionSettings.unfoldHttpHeaders] The value * indicating whether to unfold the HTTP headers. - * @member {object} [protocolSettings.acknowledgementConnectionSettings] The - * acknowledgement connection settings. - * @member {boolean} + * @property {object} [protocolSettings.acknowledgementConnectionSettings] + * The acknowledgement connection settings. + * @property {boolean} * [protocolSettings.acknowledgementConnectionSettings.ignoreCertificateNameMismatch] * The value indicating whether to ignore mismatch in certificate name. - * @member {boolean} + * @property {boolean} * [protocolSettings.acknowledgementConnectionSettings.supportHttpStatusCodeContinue] * The value indicating whether to support HTTP status code 'CONTINUE'. - * @member {boolean} + * @property {boolean} * [protocolSettings.acknowledgementConnectionSettings.keepHttpConnectionAlive] * The value indicating whether to keep the connection alive. - * @member {boolean} + * @property {boolean} * [protocolSettings.acknowledgementConnectionSettings.unfoldHttpHeaders] The * value indicating whether to unfold the HTTP headers. - * @member {object} [protocolSettings.mdnSettings] The MDN settings. - * @member {boolean} [protocolSettings.mdnSettings.needMdn] The value + * @property {object} [protocolSettings.mdnSettings] The MDN settings. + * @property {boolean} [protocolSettings.mdnSettings.needMdn] The value * indicating whether to send or request a MDN. - * @member {boolean} [protocolSettings.mdnSettings.signMdn] The value + * @property {boolean} [protocolSettings.mdnSettings.signMdn] The value * indicating whether the MDN needs to be signed or not. - * @member {boolean} [protocolSettings.mdnSettings.sendMdnAsynchronously] The - * value indicating whether to send the asynchronous MDN. - * @member {string} [protocolSettings.mdnSettings.receiptDeliveryUrl] The + * @property {boolean} [protocolSettings.mdnSettings.sendMdnAsynchronously] + * The value indicating whether to send the asynchronous MDN. + * @property {string} [protocolSettings.mdnSettings.receiptDeliveryUrl] The * receipt delivery URL. - * @member {string} [protocolSettings.mdnSettings.dispositionNotificationTo] - * The disposition notification to header value. - * @member {boolean} [protocolSettings.mdnSettings.signOutboundMdnIfOptional] - * The value indicating whether to sign the outbound MDN if optional. - * @member {string} [protocolSettings.mdnSettings.mdnText] The MDN text. - * @member {boolean} + * @property {string} + * [protocolSettings.mdnSettings.dispositionNotificationTo] The disposition + * notification to header value. + * @property {boolean} + * [protocolSettings.mdnSettings.signOutboundMdnIfOptional] The value + * indicating whether to sign the outbound MDN if optional. + * @property {string} [protocolSettings.mdnSettings.mdnText] The MDN text. + * @property {boolean} * [protocolSettings.mdnSettings.sendInboundMdnToMessageBox] The value * indicating whether to send inbound MDN to message box. - * @member {string} [protocolSettings.mdnSettings.micHashingAlgorithm] The + * @property {string} [protocolSettings.mdnSettings.micHashingAlgorithm] The * signing or hashing algorithm. Possible values include: 'NotSpecified', * 'None', 'MD5', 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512' - * @member {object} [protocolSettings.securitySettings] The security + * @property {object} [protocolSettings.securitySettings] The security * settings. - * @member {boolean} + * @property {boolean} * [protocolSettings.securitySettings.overrideGroupSigningCertificate] The * value indicating whether to send or request a MDN. - * @member {string} + * @property {string} * [protocolSettings.securitySettings.signingCertificateName] The name of the * signing certificate. - * @member {string} + * @property {string} * [protocolSettings.securitySettings.encryptionCertificateName] The name of * the encryption certificate. - * @member {boolean} + * @property {boolean} * [protocolSettings.securitySettings.enableNrrForInboundEncodedMessages] The * value indicating whether to enable NRR for inbound encoded messages. - * @member {boolean} + * @property {boolean} * [protocolSettings.securitySettings.enableNrrForInboundDecodedMessages] The * value indicating whether to enable NRR for inbound decoded messages. - * @member {boolean} + * @property {boolean} * [protocolSettings.securitySettings.enableNrrForOutboundMdn] The value * indicating whether to enable NRR for outbound MDN. - * @member {boolean} + * @property {boolean} * [protocolSettings.securitySettings.enableNrrForOutboundEncodedMessages] * The value indicating whether to enable NRR for outbound encoded messages. - * @member {boolean} + * @property {boolean} * [protocolSettings.securitySettings.enableNrrForOutboundDecodedMessages] * The value indicating whether to enable NRR for outbound decoded messages. - * @member {boolean} + * @property {boolean} * [protocolSettings.securitySettings.enableNrrForInboundMdn] The value * indicating whether to enable NRR for inbound MDN. - * @member {string} [protocolSettings.securitySettings.sha2AlgorithmFormat] + * @property {string} [protocolSettings.securitySettings.sha2AlgorithmFormat] * The Sha2 algorithm format. Valid values are Sha2, ShaHashSize, * ShaHyphenHashSize, Sha2UnderscoreHashSize. - * @member {object} [protocolSettings.validationSettings] The validation + * @property {object} [protocolSettings.validationSettings] The validation * settings. - * @member {boolean} + * @property {boolean} * [protocolSettings.validationSettings.overrideMessageProperties] The value * indicating whether to override incoming message properties with those in * agreement. - * @member {boolean} [protocolSettings.validationSettings.encryptMessage] The - * value indicating whether the message has to be encrypted. - * @member {boolean} [protocolSettings.validationSettings.signMessage] The + * @property {boolean} [protocolSettings.validationSettings.encryptMessage] + * The value indicating whether the message has to be encrypted. + * @property {boolean} [protocolSettings.validationSettings.signMessage] The * value indicating whether the message has to be signed. - * @member {boolean} [protocolSettings.validationSettings.compressMessage] + * @property {boolean} [protocolSettings.validationSettings.compressMessage] * The value indicating whether the message has to be compressed. - * @member {boolean} + * @property {boolean} * [protocolSettings.validationSettings.checkDuplicateMessage] The value * indicating whether to check for duplicate message. - * @member {number} + * @property {number} * [protocolSettings.validationSettings.interchangeDuplicatesValidityDays] * The number of days to look back for duplicate interchange. - * @member {boolean} + * @property {boolean} * [protocolSettings.validationSettings.checkCertificateRevocationListOnSend] * The value indicating whether to check for certificate revocation list on * send. - * @member {boolean} + * @property {boolean} * [protocolSettings.validationSettings.checkCertificateRevocationListOnReceive] * The value indicating whether to check for certificate revocation list on * receive. - * @member {string} [protocolSettings.validationSettings.encryptionAlgorithm] - * The encryption algorithm. Possible values include: 'NotSpecified', 'None', - * 'DES3', 'RC2', 'AES128', 'AES192', 'AES256' - * @member {string} [protocolSettings.validationSettings.signingAlgorithm] + * @property {string} + * [protocolSettings.validationSettings.encryptionAlgorithm] The encryption + * algorithm. Possible values include: 'NotSpecified', 'None', 'DES3', 'RC2', + * 'AES128', 'AES192', 'AES256' + * @property {string} [protocolSettings.validationSettings.signingAlgorithm] * The signing algorithm. Possible values include: 'NotSpecified', 'Default', * 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512' - * @member {object} [protocolSettings.envelopeSettings] The envelope + * @property {object} [protocolSettings.envelopeSettings] The envelope * settings. - * @member {string} [protocolSettings.envelopeSettings.messageContentType] + * @property {string} [protocolSettings.envelopeSettings.messageContentType] * The message content type. - * @member {boolean} + * @property {boolean} * [protocolSettings.envelopeSettings.transmitFileNameInMimeHeader] The value * indicating whether to transmit file name in mime header. - * @member {string} [protocolSettings.envelopeSettings.fileNameTemplate] The - * template for file name. - * @member {boolean} + * @property {string} [protocolSettings.envelopeSettings.fileNameTemplate] + * The template for file name. + * @property {boolean} * [protocolSettings.envelopeSettings.suspendMessageOnFileNameGenerationError] * The value indicating whether to suspend message on file name generation * error. - * @member {boolean} [protocolSettings.envelopeSettings.autogenerateFileName] - * The value indicating whether to auto generate file name. - * @member {object} [protocolSettings.errorSettings] The error settings. - * @member {boolean} [protocolSettings.errorSettings.suspendDuplicateMessage] - * The value indicating whether to suspend duplicate message. - * @member {boolean} [protocolSettings.errorSettings.resendIfMdnNotReceived] - * The value indicating whether to resend message If MDN is not received. + * @property {boolean} + * [protocolSettings.envelopeSettings.autogenerateFileName] The value + * indicating whether to auto generate file name. + * @property {object} [protocolSettings.errorSettings] The error settings. + * @property {boolean} + * [protocolSettings.errorSettings.suspendDuplicateMessage] The value + * indicating whether to suspend duplicate message. + * @property {boolean} + * [protocolSettings.errorSettings.resendIfMdnNotReceived] The value + * indicating whether to resend message If MDN is not received. */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/aS2ProtocolSettings.js b/lib/services/logicManagement/lib/models/aS2ProtocolSettings.js index 6229d5dbae..baaa76378d 100644 --- a/lib/services/logicManagement/lib/models/aS2ProtocolSettings.js +++ b/lib/services/logicManagement/lib/models/aS2ProtocolSettings.js @@ -17,114 +17,114 @@ class AS2ProtocolSettings { /** * Create a AS2ProtocolSettings. - * @member {object} messageConnectionSettings The message connection + * @property {object} messageConnectionSettings The message connection * settings. - * @member {boolean} + * @property {boolean} * [messageConnectionSettings.ignoreCertificateNameMismatch] The value * indicating whether to ignore mismatch in certificate name. - * @member {boolean} + * @property {boolean} * [messageConnectionSettings.supportHttpStatusCodeContinue] The value * indicating whether to support HTTP status code 'CONTINUE'. - * @member {boolean} [messageConnectionSettings.keepHttpConnectionAlive] The - * value indicating whether to keep the connection alive. - * @member {boolean} [messageConnectionSettings.unfoldHttpHeaders] The value - * indicating whether to unfold the HTTP headers. - * @member {object} acknowledgementConnectionSettings The acknowledgement + * @property {boolean} [messageConnectionSettings.keepHttpConnectionAlive] + * The value indicating whether to keep the connection alive. + * @property {boolean} [messageConnectionSettings.unfoldHttpHeaders] The + * value indicating whether to unfold the HTTP headers. + * @property {object} acknowledgementConnectionSettings The acknowledgement * connection settings. - * @member {boolean} + * @property {boolean} * [acknowledgementConnectionSettings.ignoreCertificateNameMismatch] The * value indicating whether to ignore mismatch in certificate name. - * @member {boolean} + * @property {boolean} * [acknowledgementConnectionSettings.supportHttpStatusCodeContinue] The * value indicating whether to support HTTP status code 'CONTINUE'. - * @member {boolean} + * @property {boolean} * [acknowledgementConnectionSettings.keepHttpConnectionAlive] The value * indicating whether to keep the connection alive. - * @member {boolean} [acknowledgementConnectionSettings.unfoldHttpHeaders] + * @property {boolean} [acknowledgementConnectionSettings.unfoldHttpHeaders] * The value indicating whether to unfold the HTTP headers. - * @member {object} mdnSettings The MDN settings. - * @member {boolean} [mdnSettings.needMdn] The value indicating whether to + * @property {object} mdnSettings The MDN settings. + * @property {boolean} [mdnSettings.needMdn] The value indicating whether to * send or request a MDN. - * @member {boolean} [mdnSettings.signMdn] The value indicating whether the + * @property {boolean} [mdnSettings.signMdn] The value indicating whether the * MDN needs to be signed or not. - * @member {boolean} [mdnSettings.sendMdnAsynchronously] The value indicating - * whether to send the asynchronous MDN. - * @member {string} [mdnSettings.receiptDeliveryUrl] The receipt delivery + * @property {boolean} [mdnSettings.sendMdnAsynchronously] The value + * indicating whether to send the asynchronous MDN. + * @property {string} [mdnSettings.receiptDeliveryUrl] The receipt delivery * URL. - * @member {string} [mdnSettings.dispositionNotificationTo] The disposition + * @property {string} [mdnSettings.dispositionNotificationTo] The disposition * notification to header value. - * @member {boolean} [mdnSettings.signOutboundMdnIfOptional] The value + * @property {boolean} [mdnSettings.signOutboundMdnIfOptional] The value * indicating whether to sign the outbound MDN if optional. - * @member {string} [mdnSettings.mdnText] The MDN text. - * @member {boolean} [mdnSettings.sendInboundMdnToMessageBox] The value + * @property {string} [mdnSettings.mdnText] The MDN text. + * @property {boolean} [mdnSettings.sendInboundMdnToMessageBox] The value * indicating whether to send inbound MDN to message box. - * @member {string} [mdnSettings.micHashingAlgorithm] The signing or hashing - * algorithm. Possible values include: 'NotSpecified', 'None', 'MD5', 'SHA1', - * 'SHA2256', 'SHA2384', 'SHA2512' - * @member {object} securitySettings The security settings. - * @member {boolean} [securitySettings.overrideGroupSigningCertificate] The + * @property {string} [mdnSettings.micHashingAlgorithm] The signing or + * hashing algorithm. Possible values include: 'NotSpecified', 'None', 'MD5', + * 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512' + * @property {object} securitySettings The security settings. + * @property {boolean} [securitySettings.overrideGroupSigningCertificate] The * value indicating whether to send or request a MDN. - * @member {string} [securitySettings.signingCertificateName] The name of the - * signing certificate. - * @member {string} [securitySettings.encryptionCertificateName] The name of - * the encryption certificate. - * @member {boolean} [securitySettings.enableNrrForInboundEncodedMessages] + * @property {string} [securitySettings.signingCertificateName] The name of + * the signing certificate. + * @property {string} [securitySettings.encryptionCertificateName] The name + * of the encryption certificate. + * @property {boolean} [securitySettings.enableNrrForInboundEncodedMessages] * The value indicating whether to enable NRR for inbound encoded messages. - * @member {boolean} [securitySettings.enableNrrForInboundDecodedMessages] + * @property {boolean} [securitySettings.enableNrrForInboundDecodedMessages] * The value indicating whether to enable NRR for inbound decoded messages. - * @member {boolean} [securitySettings.enableNrrForOutboundMdn] The value + * @property {boolean} [securitySettings.enableNrrForOutboundMdn] The value * indicating whether to enable NRR for outbound MDN. - * @member {boolean} [securitySettings.enableNrrForOutboundEncodedMessages] + * @property {boolean} [securitySettings.enableNrrForOutboundEncodedMessages] * The value indicating whether to enable NRR for outbound encoded messages. - * @member {boolean} [securitySettings.enableNrrForOutboundDecodedMessages] + * @property {boolean} [securitySettings.enableNrrForOutboundDecodedMessages] * The value indicating whether to enable NRR for outbound decoded messages. - * @member {boolean} [securitySettings.enableNrrForInboundMdn] The value + * @property {boolean} [securitySettings.enableNrrForInboundMdn] The value * indicating whether to enable NRR for inbound MDN. - * @member {string} [securitySettings.sha2AlgorithmFormat] The Sha2 algorithm - * format. Valid values are Sha2, ShaHashSize, ShaHyphenHashSize, + * @property {string} [securitySettings.sha2AlgorithmFormat] The Sha2 + * algorithm format. Valid values are Sha2, ShaHashSize, ShaHyphenHashSize, * Sha2UnderscoreHashSize. - * @member {object} validationSettings The validation settings. - * @member {boolean} [validationSettings.overrideMessageProperties] The value - * indicating whether to override incoming message properties with those in - * agreement. - * @member {boolean} [validationSettings.encryptMessage] The value indicating - * whether the message has to be encrypted. - * @member {boolean} [validationSettings.signMessage] The value indicating + * @property {object} validationSettings The validation settings. + * @property {boolean} [validationSettings.overrideMessageProperties] The + * value indicating whether to override incoming message properties with + * those in agreement. + * @property {boolean} [validationSettings.encryptMessage] The value + * indicating whether the message has to be encrypted. + * @property {boolean} [validationSettings.signMessage] The value indicating * whether the message has to be signed. - * @member {boolean} [validationSettings.compressMessage] The value + * @property {boolean} [validationSettings.compressMessage] The value * indicating whether the message has to be compressed. - * @member {boolean} [validationSettings.checkDuplicateMessage] The value + * @property {boolean} [validationSettings.checkDuplicateMessage] The value * indicating whether to check for duplicate message. - * @member {number} [validationSettings.interchangeDuplicatesValidityDays] + * @property {number} [validationSettings.interchangeDuplicatesValidityDays] * The number of days to look back for duplicate interchange. - * @member {boolean} + * @property {boolean} * [validationSettings.checkCertificateRevocationListOnSend] The value * indicating whether to check for certificate revocation list on send. - * @member {boolean} + * @property {boolean} * [validationSettings.checkCertificateRevocationListOnReceive] The value * indicating whether to check for certificate revocation list on receive. - * @member {string} [validationSettings.encryptionAlgorithm] The encryption + * @property {string} [validationSettings.encryptionAlgorithm] The encryption * algorithm. Possible values include: 'NotSpecified', 'None', 'DES3', 'RC2', * 'AES128', 'AES192', 'AES256' - * @member {string} [validationSettings.signingAlgorithm] The signing + * @property {string} [validationSettings.signingAlgorithm] The signing * algorithm. Possible values include: 'NotSpecified', 'Default', 'SHA1', * 'SHA2256', 'SHA2384', 'SHA2512' - * @member {object} envelopeSettings The envelope settings. - * @member {string} [envelopeSettings.messageContentType] The message content - * type. - * @member {boolean} [envelopeSettings.transmitFileNameInMimeHeader] The + * @property {object} envelopeSettings The envelope settings. + * @property {string} [envelopeSettings.messageContentType] The message + * content type. + * @property {boolean} [envelopeSettings.transmitFileNameInMimeHeader] The * value indicating whether to transmit file name in mime header. - * @member {string} [envelopeSettings.fileNameTemplate] The template for file - * name. - * @member {boolean} + * @property {string} [envelopeSettings.fileNameTemplate] The template for + * file name. + * @property {boolean} * [envelopeSettings.suspendMessageOnFileNameGenerationError] The value * indicating whether to suspend message on file name generation error. - * @member {boolean} [envelopeSettings.autogenerateFileName] The value + * @property {boolean} [envelopeSettings.autogenerateFileName] The value * indicating whether to auto generate file name. - * @member {object} errorSettings The error settings. - * @member {boolean} [errorSettings.suspendDuplicateMessage] The value + * @property {object} errorSettings The error settings. + * @property {boolean} [errorSettings.suspendDuplicateMessage] The value * indicating whether to suspend duplicate message. - * @member {boolean} [errorSettings.resendIfMdnNotReceived] The value + * @property {boolean} [errorSettings.resendIfMdnNotReceived] The value * indicating whether to resend message If MDN is not received. */ constructor() { diff --git a/lib/services/logicManagement/lib/models/aS2SecuritySettings.js b/lib/services/logicManagement/lib/models/aS2SecuritySettings.js index b30d320eef..b57df242cd 100644 --- a/lib/services/logicManagement/lib/models/aS2SecuritySettings.js +++ b/lib/services/logicManagement/lib/models/aS2SecuritySettings.js @@ -17,25 +17,25 @@ class AS2SecuritySettings { /** * Create a AS2SecuritySettings. - * @member {boolean} overrideGroupSigningCertificate The value indicating + * @property {boolean} overrideGroupSigningCertificate The value indicating * whether to send or request a MDN. - * @member {string} [signingCertificateName] The name of the signing + * @property {string} [signingCertificateName] The name of the signing * certificate. - * @member {string} [encryptionCertificateName] The name of the encryption + * @property {string} [encryptionCertificateName] The name of the encryption * certificate. - * @member {boolean} enableNrrForInboundEncodedMessages The value indicating - * whether to enable NRR for inbound encoded messages. - * @member {boolean} enableNrrForInboundDecodedMessages The value indicating - * whether to enable NRR for inbound decoded messages. - * @member {boolean} enableNrrForOutboundMdn The value indicating whether to - * enable NRR for outbound MDN. - * @member {boolean} enableNrrForOutboundEncodedMessages The value indicating - * whether to enable NRR for outbound encoded messages. - * @member {boolean} enableNrrForOutboundDecodedMessages The value indicating - * whether to enable NRR for outbound decoded messages. - * @member {boolean} enableNrrForInboundMdn The value indicating whether to + * @property {boolean} enableNrrForInboundEncodedMessages The value + * indicating whether to enable NRR for inbound encoded messages. + * @property {boolean} enableNrrForInboundDecodedMessages The value + * indicating whether to enable NRR for inbound decoded messages. + * @property {boolean} enableNrrForOutboundMdn The value indicating whether + * to enable NRR for outbound MDN. + * @property {boolean} enableNrrForOutboundEncodedMessages The value + * indicating whether to enable NRR for outbound encoded messages. + * @property {boolean} enableNrrForOutboundDecodedMessages The value + * indicating whether to enable NRR for outbound decoded messages. + * @property {boolean} enableNrrForInboundMdn The value indicating whether to * enable NRR for inbound MDN. - * @member {string} [sha2AlgorithmFormat] The Sha2 algorithm format. Valid + * @property {string} [sha2AlgorithmFormat] The Sha2 algorithm format. Valid * values are Sha2, ShaHashSize, ShaHyphenHashSize, Sha2UnderscoreHashSize. */ constructor() { diff --git a/lib/services/logicManagement/lib/models/aS2ValidationSettings.js b/lib/services/logicManagement/lib/models/aS2ValidationSettings.js index 629454191f..8c0f62ba70 100644 --- a/lib/services/logicManagement/lib/models/aS2ValidationSettings.js +++ b/lib/services/logicManagement/lib/models/aS2ValidationSettings.js @@ -17,27 +17,27 @@ class AS2ValidationSettings { /** * Create a AS2ValidationSettings. - * @member {boolean} overrideMessageProperties The value indicating whether + * @property {boolean} overrideMessageProperties The value indicating whether * to override incoming message properties with those in agreement. - * @member {boolean} encryptMessage The value indicating whether the message - * has to be encrypted. - * @member {boolean} signMessage The value indicating whether the message has - * to be signed. - * @member {boolean} compressMessage The value indicating whether the message - * has to be compressed. - * @member {boolean} checkDuplicateMessage The value indicating whether to + * @property {boolean} encryptMessage The value indicating whether the + * message has to be encrypted. + * @property {boolean} signMessage The value indicating whether the message + * has to be signed. + * @property {boolean} compressMessage The value indicating whether the + * message has to be compressed. + * @property {boolean} checkDuplicateMessage The value indicating whether to * check for duplicate message. - * @member {number} interchangeDuplicatesValidityDays The number of days to + * @property {number} interchangeDuplicatesValidityDays The number of days to * look back for duplicate interchange. - * @member {boolean} checkCertificateRevocationListOnSend The value + * @property {boolean} checkCertificateRevocationListOnSend The value * indicating whether to check for certificate revocation list on send. - * @member {boolean} checkCertificateRevocationListOnReceive The value + * @property {boolean} checkCertificateRevocationListOnReceive The value * indicating whether to check for certificate revocation list on receive. - * @member {string} encryptionAlgorithm The encryption algorithm. Possible + * @property {string} encryptionAlgorithm The encryption algorithm. Possible * values include: 'NotSpecified', 'None', 'DES3', 'RC2', 'AES128', 'AES192', * 'AES256' - * @member {string} [signingAlgorithm] The signing algorithm. Possible values - * include: 'NotSpecified', 'Default', 'SHA1', 'SHA2256', 'SHA2384', + * @property {string} [signingAlgorithm] The signing algorithm. Possible + * values include: 'NotSpecified', 'Default', 'SHA1', 'SHA2256', 'SHA2384', * 'SHA2512' */ constructor() { diff --git a/lib/services/logicManagement/lib/models/agreementContent.js b/lib/services/logicManagement/lib/models/agreementContent.js index c3b500b349..7131beff28 100644 --- a/lib/services/logicManagement/lib/models/agreementContent.js +++ b/lib/services/logicManagement/lib/models/agreementContent.js @@ -17,1452 +17,1473 @@ class AgreementContent { /** * Create a AgreementContent. - * @member {object} [aS2] The AS2 agreement content. - * @member {object} [aS2.receiveAgreement] The AS2 one-way receive agreement. - * @member {object} [aS2.receiveAgreement.senderBusinessIdentity] The sender - * business identity - * @member {string} [aS2.receiveAgreement.senderBusinessIdentity.qualifier] + * @property {object} [aS2] The AS2 agreement content. + * @property {object} [aS2.receiveAgreement] The AS2 one-way receive + * agreement. + * @property {object} [aS2.receiveAgreement.senderBusinessIdentity] The + * sender business identity + * @property {string} [aS2.receiveAgreement.senderBusinessIdentity.qualifier] * The business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [aS2.receiveAgreement.senderBusinessIdentity.value] The + * @property {string} [aS2.receiveAgreement.senderBusinessIdentity.value] The * user defined business identity value. - * @member {object} [aS2.receiveAgreement.receiverBusinessIdentity] The + * @property {object} [aS2.receiveAgreement.receiverBusinessIdentity] The * receiver business identity - * @member {string} [aS2.receiveAgreement.receiverBusinessIdentity.qualifier] - * The business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [aS2.receiveAgreement.receiverBusinessIdentity.value] The - * user defined business identity value. - * @member {object} [aS2.receiveAgreement.protocolSettings] The AS2 protocol - * settings. - * @member {object} + * @property {string} + * [aS2.receiveAgreement.receiverBusinessIdentity.qualifier] The business + * identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 + * @property {string} [aS2.receiveAgreement.receiverBusinessIdentity.value] + * The user defined business identity value. + * @property {object} [aS2.receiveAgreement.protocolSettings] The AS2 + * protocol settings. + * @property {object} * [aS2.receiveAgreement.protocolSettings.messageConnectionSettings] The * message connection settings. - * @member {boolean} + * @property {boolean} * [aS2.receiveAgreement.protocolSettings.messageConnectionSettings.ignoreCertificateNameMismatch] * The value indicating whether to ignore mismatch in certificate name. - * @member {boolean} + * @property {boolean} * [aS2.receiveAgreement.protocolSettings.messageConnectionSettings.supportHttpStatusCodeContinue] * The value indicating whether to support HTTP status code 'CONTINUE'. - * @member {boolean} + * @property {boolean} * [aS2.receiveAgreement.protocolSettings.messageConnectionSettings.keepHttpConnectionAlive] * The value indicating whether to keep the connection alive. - * @member {boolean} + * @property {boolean} * [aS2.receiveAgreement.protocolSettings.messageConnectionSettings.unfoldHttpHeaders] * The value indicating whether to unfold the HTTP headers. - * @member {object} + * @property {object} * [aS2.receiveAgreement.protocolSettings.acknowledgementConnectionSettings] * The acknowledgement connection settings. - * @member {boolean} + * @property {boolean} * [aS2.receiveAgreement.protocolSettings.acknowledgementConnectionSettings.ignoreCertificateNameMismatch] * The value indicating whether to ignore mismatch in certificate name. - * @member {boolean} + * @property {boolean} * [aS2.receiveAgreement.protocolSettings.acknowledgementConnectionSettings.supportHttpStatusCodeContinue] * The value indicating whether to support HTTP status code 'CONTINUE'. - * @member {boolean} + * @property {boolean} * [aS2.receiveAgreement.protocolSettings.acknowledgementConnectionSettings.keepHttpConnectionAlive] * The value indicating whether to keep the connection alive. - * @member {boolean} + * @property {boolean} * [aS2.receiveAgreement.protocolSettings.acknowledgementConnectionSettings.unfoldHttpHeaders] * The value indicating whether to unfold the HTTP headers. - * @member {object} [aS2.receiveAgreement.protocolSettings.mdnSettings] The + * @property {object} [aS2.receiveAgreement.protocolSettings.mdnSettings] The * MDN settings. - * @member {boolean} + * @property {boolean} * [aS2.receiveAgreement.protocolSettings.mdnSettings.needMdn] The value * indicating whether to send or request a MDN. - * @member {boolean} + * @property {boolean} * [aS2.receiveAgreement.protocolSettings.mdnSettings.signMdn] The value * indicating whether the MDN needs to be signed or not. - * @member {boolean} + * @property {boolean} * [aS2.receiveAgreement.protocolSettings.mdnSettings.sendMdnAsynchronously] * The value indicating whether to send the asynchronous MDN. - * @member {string} + * @property {string} * [aS2.receiveAgreement.protocolSettings.mdnSettings.receiptDeliveryUrl] The * receipt delivery URL. - * @member {string} + * @property {string} * [aS2.receiveAgreement.protocolSettings.mdnSettings.dispositionNotificationTo] * The disposition notification to header value. - * @member {boolean} + * @property {boolean} * [aS2.receiveAgreement.protocolSettings.mdnSettings.signOutboundMdnIfOptional] * The value indicating whether to sign the outbound MDN if optional. - * @member {string} + * @property {string} * [aS2.receiveAgreement.protocolSettings.mdnSettings.mdnText] The MDN text. - * @member {boolean} + * @property {boolean} * [aS2.receiveAgreement.protocolSettings.mdnSettings.sendInboundMdnToMessageBox] * The value indicating whether to send inbound MDN to message box. - * @member {string} + * @property {string} * [aS2.receiveAgreement.protocolSettings.mdnSettings.micHashingAlgorithm] * The signing or hashing algorithm. Possible values include: 'NotSpecified', * 'None', 'MD5', 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512' - * @member {object} [aS2.receiveAgreement.protocolSettings.securitySettings] - * The security settings. - * @member {boolean} + * @property {object} + * [aS2.receiveAgreement.protocolSettings.securitySettings] The security + * settings. + * @property {boolean} * [aS2.receiveAgreement.protocolSettings.securitySettings.overrideGroupSigningCertificate] * The value indicating whether to send or request a MDN. - * @member {string} + * @property {string} * [aS2.receiveAgreement.protocolSettings.securitySettings.signingCertificateName] * The name of the signing certificate. - * @member {string} + * @property {string} * [aS2.receiveAgreement.protocolSettings.securitySettings.encryptionCertificateName] * The name of the encryption certificate. - * @member {boolean} + * @property {boolean} * [aS2.receiveAgreement.protocolSettings.securitySettings.enableNrrForInboundEncodedMessages] * The value indicating whether to enable NRR for inbound encoded messages. - * @member {boolean} + * @property {boolean} * [aS2.receiveAgreement.protocolSettings.securitySettings.enableNrrForInboundDecodedMessages] * The value indicating whether to enable NRR for inbound decoded messages. - * @member {boolean} + * @property {boolean} * [aS2.receiveAgreement.protocolSettings.securitySettings.enableNrrForOutboundMdn] * The value indicating whether to enable NRR for outbound MDN. - * @member {boolean} + * @property {boolean} * [aS2.receiveAgreement.protocolSettings.securitySettings.enableNrrForOutboundEncodedMessages] * The value indicating whether to enable NRR for outbound encoded messages. - * @member {boolean} + * @property {boolean} * [aS2.receiveAgreement.protocolSettings.securitySettings.enableNrrForOutboundDecodedMessages] * The value indicating whether to enable NRR for outbound decoded messages. - * @member {boolean} + * @property {boolean} * [aS2.receiveAgreement.protocolSettings.securitySettings.enableNrrForInboundMdn] * The value indicating whether to enable NRR for inbound MDN. - * @member {string} + * @property {string} * [aS2.receiveAgreement.protocolSettings.securitySettings.sha2AlgorithmFormat] * The Sha2 algorithm format. Valid values are Sha2, ShaHashSize, * ShaHyphenHashSize, Sha2UnderscoreHashSize. - * @member {object} + * @property {object} * [aS2.receiveAgreement.protocolSettings.validationSettings] The validation * settings. - * @member {boolean} + * @property {boolean} * [aS2.receiveAgreement.protocolSettings.validationSettings.overrideMessageProperties] * The value indicating whether to override incoming message properties with * those in agreement. - * @member {boolean} + * @property {boolean} * [aS2.receiveAgreement.protocolSettings.validationSettings.encryptMessage] * The value indicating whether the message has to be encrypted. - * @member {boolean} + * @property {boolean} * [aS2.receiveAgreement.protocolSettings.validationSettings.signMessage] The * value indicating whether the message has to be signed. - * @member {boolean} + * @property {boolean} * [aS2.receiveAgreement.protocolSettings.validationSettings.compressMessage] * The value indicating whether the message has to be compressed. - * @member {boolean} + * @property {boolean} * [aS2.receiveAgreement.protocolSettings.validationSettings.checkDuplicateMessage] * The value indicating whether to check for duplicate message. - * @member {number} + * @property {number} * [aS2.receiveAgreement.protocolSettings.validationSettings.interchangeDuplicatesValidityDays] * The number of days to look back for duplicate interchange. - * @member {boolean} + * @property {boolean} * [aS2.receiveAgreement.protocolSettings.validationSettings.checkCertificateRevocationListOnSend] * The value indicating whether to check for certificate revocation list on * send. - * @member {boolean} + * @property {boolean} * [aS2.receiveAgreement.protocolSettings.validationSettings.checkCertificateRevocationListOnReceive] * The value indicating whether to check for certificate revocation list on * receive. - * @member {string} + * @property {string} * [aS2.receiveAgreement.protocolSettings.validationSettings.encryptionAlgorithm] * The encryption algorithm. Possible values include: 'NotSpecified', 'None', * 'DES3', 'RC2', 'AES128', 'AES192', 'AES256' - * @member {string} + * @property {string} * [aS2.receiveAgreement.protocolSettings.validationSettings.signingAlgorithm] * The signing algorithm. Possible values include: 'NotSpecified', 'Default', * 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512' - * @member {object} [aS2.receiveAgreement.protocolSettings.envelopeSettings] - * The envelope settings. - * @member {string} + * @property {object} + * [aS2.receiveAgreement.protocolSettings.envelopeSettings] The envelope + * settings. + * @property {string} * [aS2.receiveAgreement.protocolSettings.envelopeSettings.messageContentType] * The message content type. - * @member {boolean} + * @property {boolean} * [aS2.receiveAgreement.protocolSettings.envelopeSettings.transmitFileNameInMimeHeader] * The value indicating whether to transmit file name in mime header. - * @member {string} + * @property {string} * [aS2.receiveAgreement.protocolSettings.envelopeSettings.fileNameTemplate] * The template for file name. - * @member {boolean} + * @property {boolean} * [aS2.receiveAgreement.protocolSettings.envelopeSettings.suspendMessageOnFileNameGenerationError] * The value indicating whether to suspend message on file name generation * error. - * @member {boolean} + * @property {boolean} * [aS2.receiveAgreement.protocolSettings.envelopeSettings.autogenerateFileName] * The value indicating whether to auto generate file name. - * @member {object} [aS2.receiveAgreement.protocolSettings.errorSettings] The - * error settings. - * @member {boolean} + * @property {object} [aS2.receiveAgreement.protocolSettings.errorSettings] + * The error settings. + * @property {boolean} * [aS2.receiveAgreement.protocolSettings.errorSettings.suspendDuplicateMessage] * The value indicating whether to suspend duplicate message. - * @member {boolean} + * @property {boolean} * [aS2.receiveAgreement.protocolSettings.errorSettings.resendIfMdnNotReceived] * The value indicating whether to resend message If MDN is not received. - * @member {object} [aS2.sendAgreement] The AS2 one-way send agreement. - * @member {object} [aS2.sendAgreement.senderBusinessIdentity] The sender - * business identity - * @member {string} [aS2.sendAgreement.senderBusinessIdentity.qualifier] The - * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [aS2.sendAgreement.senderBusinessIdentity.value] The user - * defined business identity value. - * @member {object} [aS2.sendAgreement.receiverBusinessIdentity] The receiver + * @property {object} [aS2.sendAgreement] The AS2 one-way send agreement. + * @property {object} [aS2.sendAgreement.senderBusinessIdentity] The sender * business identity - * @member {string} [aS2.sendAgreement.receiverBusinessIdentity.qualifier] + * @property {string} [aS2.sendAgreement.senderBusinessIdentity.qualifier] * The business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [aS2.sendAgreement.receiverBusinessIdentity.value] The + * @property {string} [aS2.sendAgreement.senderBusinessIdentity.value] The * user defined business identity value. - * @member {object} [aS2.sendAgreement.protocolSettings] The AS2 protocol + * @property {object} [aS2.sendAgreement.receiverBusinessIdentity] The + * receiver business identity + * @property {string} [aS2.sendAgreement.receiverBusinessIdentity.qualifier] + * The business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 + * @property {string} [aS2.sendAgreement.receiverBusinessIdentity.value] The + * user defined business identity value. + * @property {object} [aS2.sendAgreement.protocolSettings] The AS2 protocol * settings. - * @member {object} + * @property {object} * [aS2.sendAgreement.protocolSettings.messageConnectionSettings] The message * connection settings. - * @member {boolean} + * @property {boolean} * [aS2.sendAgreement.protocolSettings.messageConnectionSettings.ignoreCertificateNameMismatch] * The value indicating whether to ignore mismatch in certificate name. - * @member {boolean} + * @property {boolean} * [aS2.sendAgreement.protocolSettings.messageConnectionSettings.supportHttpStatusCodeContinue] * The value indicating whether to support HTTP status code 'CONTINUE'. - * @member {boolean} + * @property {boolean} * [aS2.sendAgreement.protocolSettings.messageConnectionSettings.keepHttpConnectionAlive] * The value indicating whether to keep the connection alive. - * @member {boolean} + * @property {boolean} * [aS2.sendAgreement.protocolSettings.messageConnectionSettings.unfoldHttpHeaders] * The value indicating whether to unfold the HTTP headers. - * @member {object} + * @property {object} * [aS2.sendAgreement.protocolSettings.acknowledgementConnectionSettings] The * acknowledgement connection settings. - * @member {boolean} + * @property {boolean} * [aS2.sendAgreement.protocolSettings.acknowledgementConnectionSettings.ignoreCertificateNameMismatch] * The value indicating whether to ignore mismatch in certificate name. - * @member {boolean} + * @property {boolean} * [aS2.sendAgreement.protocolSettings.acknowledgementConnectionSettings.supportHttpStatusCodeContinue] * The value indicating whether to support HTTP status code 'CONTINUE'. - * @member {boolean} + * @property {boolean} * [aS2.sendAgreement.protocolSettings.acknowledgementConnectionSettings.keepHttpConnectionAlive] * The value indicating whether to keep the connection alive. - * @member {boolean} + * @property {boolean} * [aS2.sendAgreement.protocolSettings.acknowledgementConnectionSettings.unfoldHttpHeaders] * The value indicating whether to unfold the HTTP headers. - * @member {object} [aS2.sendAgreement.protocolSettings.mdnSettings] The MDN - * settings. - * @member {boolean} [aS2.sendAgreement.protocolSettings.mdnSettings.needMdn] - * The value indicating whether to send or request a MDN. - * @member {boolean} [aS2.sendAgreement.protocolSettings.mdnSettings.signMdn] - * The value indicating whether the MDN needs to be signed or not. - * @member {boolean} + * @property {object} [aS2.sendAgreement.protocolSettings.mdnSettings] The + * MDN settings. + * @property {boolean} + * [aS2.sendAgreement.protocolSettings.mdnSettings.needMdn] The value + * indicating whether to send or request a MDN. + * @property {boolean} + * [aS2.sendAgreement.protocolSettings.mdnSettings.signMdn] The value + * indicating whether the MDN needs to be signed or not. + * @property {boolean} * [aS2.sendAgreement.protocolSettings.mdnSettings.sendMdnAsynchronously] The * value indicating whether to send the asynchronous MDN. - * @member {string} + * @property {string} * [aS2.sendAgreement.protocolSettings.mdnSettings.receiptDeliveryUrl] The * receipt delivery URL. - * @member {string} + * @property {string} * [aS2.sendAgreement.protocolSettings.mdnSettings.dispositionNotificationTo] * The disposition notification to header value. - * @member {boolean} + * @property {boolean} * [aS2.sendAgreement.protocolSettings.mdnSettings.signOutboundMdnIfOptional] * The value indicating whether to sign the outbound MDN if optional. - * @member {string} [aS2.sendAgreement.protocolSettings.mdnSettings.mdnText] - * The MDN text. - * @member {boolean} + * @property {string} + * [aS2.sendAgreement.protocolSettings.mdnSettings.mdnText] The MDN text. + * @property {boolean} * [aS2.sendAgreement.protocolSettings.mdnSettings.sendInboundMdnToMessageBox] * The value indicating whether to send inbound MDN to message box. - * @member {string} + * @property {string} * [aS2.sendAgreement.protocolSettings.mdnSettings.micHashingAlgorithm] The * signing or hashing algorithm. Possible values include: 'NotSpecified', * 'None', 'MD5', 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512' - * @member {object} [aS2.sendAgreement.protocolSettings.securitySettings] The - * security settings. - * @member {boolean} + * @property {object} [aS2.sendAgreement.protocolSettings.securitySettings] + * The security settings. + * @property {boolean} * [aS2.sendAgreement.protocolSettings.securitySettings.overrideGroupSigningCertificate] * The value indicating whether to send or request a MDN. - * @member {string} + * @property {string} * [aS2.sendAgreement.protocolSettings.securitySettings.signingCertificateName] * The name of the signing certificate. - * @member {string} + * @property {string} * [aS2.sendAgreement.protocolSettings.securitySettings.encryptionCertificateName] * The name of the encryption certificate. - * @member {boolean} + * @property {boolean} * [aS2.sendAgreement.protocolSettings.securitySettings.enableNrrForInboundEncodedMessages] * The value indicating whether to enable NRR for inbound encoded messages. - * @member {boolean} + * @property {boolean} * [aS2.sendAgreement.protocolSettings.securitySettings.enableNrrForInboundDecodedMessages] * The value indicating whether to enable NRR for inbound decoded messages. - * @member {boolean} + * @property {boolean} * [aS2.sendAgreement.protocolSettings.securitySettings.enableNrrForOutboundMdn] * The value indicating whether to enable NRR for outbound MDN. - * @member {boolean} + * @property {boolean} * [aS2.sendAgreement.protocolSettings.securitySettings.enableNrrForOutboundEncodedMessages] * The value indicating whether to enable NRR for outbound encoded messages. - * @member {boolean} + * @property {boolean} * [aS2.sendAgreement.protocolSettings.securitySettings.enableNrrForOutboundDecodedMessages] * The value indicating whether to enable NRR for outbound decoded messages. - * @member {boolean} + * @property {boolean} * [aS2.sendAgreement.protocolSettings.securitySettings.enableNrrForInboundMdn] * The value indicating whether to enable NRR for inbound MDN. - * @member {string} + * @property {string} * [aS2.sendAgreement.protocolSettings.securitySettings.sha2AlgorithmFormat] * The Sha2 algorithm format. Valid values are Sha2, ShaHashSize, * ShaHyphenHashSize, Sha2UnderscoreHashSize. - * @member {object} [aS2.sendAgreement.protocolSettings.validationSettings] + * @property {object} [aS2.sendAgreement.protocolSettings.validationSettings] * The validation settings. - * @member {boolean} + * @property {boolean} * [aS2.sendAgreement.protocolSettings.validationSettings.overrideMessageProperties] * The value indicating whether to override incoming message properties with * those in agreement. - * @member {boolean} + * @property {boolean} * [aS2.sendAgreement.protocolSettings.validationSettings.encryptMessage] The * value indicating whether the message has to be encrypted. - * @member {boolean} + * @property {boolean} * [aS2.sendAgreement.protocolSettings.validationSettings.signMessage] The * value indicating whether the message has to be signed. - * @member {boolean} + * @property {boolean} * [aS2.sendAgreement.protocolSettings.validationSettings.compressMessage] * The value indicating whether the message has to be compressed. - * @member {boolean} + * @property {boolean} * [aS2.sendAgreement.protocolSettings.validationSettings.checkDuplicateMessage] * The value indicating whether to check for duplicate message. - * @member {number} + * @property {number} * [aS2.sendAgreement.protocolSettings.validationSettings.interchangeDuplicatesValidityDays] * The number of days to look back for duplicate interchange. - * @member {boolean} + * @property {boolean} * [aS2.sendAgreement.protocolSettings.validationSettings.checkCertificateRevocationListOnSend] * The value indicating whether to check for certificate revocation list on * send. - * @member {boolean} + * @property {boolean} * [aS2.sendAgreement.protocolSettings.validationSettings.checkCertificateRevocationListOnReceive] * The value indicating whether to check for certificate revocation list on * receive. - * @member {string} + * @property {string} * [aS2.sendAgreement.protocolSettings.validationSettings.encryptionAlgorithm] * The encryption algorithm. Possible values include: 'NotSpecified', 'None', * 'DES3', 'RC2', 'AES128', 'AES192', 'AES256' - * @member {string} + * @property {string} * [aS2.sendAgreement.protocolSettings.validationSettings.signingAlgorithm] * The signing algorithm. Possible values include: 'NotSpecified', 'Default', * 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512' - * @member {object} [aS2.sendAgreement.protocolSettings.envelopeSettings] The - * envelope settings. - * @member {string} + * @property {object} [aS2.sendAgreement.protocolSettings.envelopeSettings] + * The envelope settings. + * @property {string} * [aS2.sendAgreement.protocolSettings.envelopeSettings.messageContentType] * The message content type. - * @member {boolean} + * @property {boolean} * [aS2.sendAgreement.protocolSettings.envelopeSettings.transmitFileNameInMimeHeader] * The value indicating whether to transmit file name in mime header. - * @member {string} + * @property {string} * [aS2.sendAgreement.protocolSettings.envelopeSettings.fileNameTemplate] The * template for file name. - * @member {boolean} + * @property {boolean} * [aS2.sendAgreement.protocolSettings.envelopeSettings.suspendMessageOnFileNameGenerationError] * The value indicating whether to suspend message on file name generation * error. - * @member {boolean} + * @property {boolean} * [aS2.sendAgreement.protocolSettings.envelopeSettings.autogenerateFileName] * The value indicating whether to auto generate file name. - * @member {object} [aS2.sendAgreement.protocolSettings.errorSettings] The + * @property {object} [aS2.sendAgreement.protocolSettings.errorSettings] The * error settings. - * @member {boolean} + * @property {boolean} * [aS2.sendAgreement.protocolSettings.errorSettings.suspendDuplicateMessage] * The value indicating whether to suspend duplicate message. - * @member {boolean} + * @property {boolean} * [aS2.sendAgreement.protocolSettings.errorSettings.resendIfMdnNotReceived] * The value indicating whether to resend message If MDN is not received. - * @member {object} [x12] The X12 agreement content. - * @member {object} [x12.receiveAgreement] The X12 one-way receive agreement. - * @member {object} [x12.receiveAgreement.senderBusinessIdentity] The sender - * business identity - * @member {string} [x12.receiveAgreement.senderBusinessIdentity.qualifier] + * @property {object} [x12] The X12 agreement content. + * @property {object} [x12.receiveAgreement] The X12 one-way receive + * agreement. + * @property {object} [x12.receiveAgreement.senderBusinessIdentity] The + * sender business identity + * @property {string} [x12.receiveAgreement.senderBusinessIdentity.qualifier] * The business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [x12.receiveAgreement.senderBusinessIdentity.value] The + * @property {string} [x12.receiveAgreement.senderBusinessIdentity.value] The * user defined business identity value. - * @member {object} [x12.receiveAgreement.receiverBusinessIdentity] The + * @property {object} [x12.receiveAgreement.receiverBusinessIdentity] The * receiver business identity - * @member {string} [x12.receiveAgreement.receiverBusinessIdentity.qualifier] - * The business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [x12.receiveAgreement.receiverBusinessIdentity.value] The - * user defined business identity value. - * @member {object} [x12.receiveAgreement.protocolSettings] The X12 protocol - * settings. - * @member {object} + * @property {string} + * [x12.receiveAgreement.receiverBusinessIdentity.qualifier] The business + * identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 + * @property {string} [x12.receiveAgreement.receiverBusinessIdentity.value] + * The user defined business identity value. + * @property {object} [x12.receiveAgreement.protocolSettings] The X12 + * protocol settings. + * @property {object} * [x12.receiveAgreement.protocolSettings.validationSettings] The X12 * validation settings. - * @member {boolean} + * @property {boolean} * [x12.receiveAgreement.protocolSettings.validationSettings.validateCharacterSet] * The value indicating whether to validate character set in the message. - * @member {boolean} + * @property {boolean} * [x12.receiveAgreement.protocolSettings.validationSettings.checkDuplicateInterchangeControlNumber] * The value indicating whether to check for duplicate interchange control * number. - * @member {number} + * @property {number} * [x12.receiveAgreement.protocolSettings.validationSettings.interchangeControlNumberValidityDays] * The validity period of interchange control number. - * @member {boolean} + * @property {boolean} * [x12.receiveAgreement.protocolSettings.validationSettings.checkDuplicateGroupControlNumber] * The value indicating whether to check for duplicate group control number. - * @member {boolean} + * @property {boolean} * [x12.receiveAgreement.protocolSettings.validationSettings.checkDuplicateTransactionSetControlNumber] * The value indicating whether to check for duplicate transaction set * control number. - * @member {boolean} + * @property {boolean} * [x12.receiveAgreement.protocolSettings.validationSettings.validateEdiTypes] * The value indicating whether to Whether to validate EDI types. - * @member {boolean} + * @property {boolean} * [x12.receiveAgreement.protocolSettings.validationSettings.validateXsdTypes] * The value indicating whether to Whether to validate XSD types. - * @member {boolean} + * @property {boolean} * [x12.receiveAgreement.protocolSettings.validationSettings.allowLeadingAndTrailingSpacesAndZeroes] * The value indicating whether to allow leading and trailing spaces and * zeroes. - * @member {boolean} + * @property {boolean} * [x12.receiveAgreement.protocolSettings.validationSettings.trimLeadingAndTrailingSpacesAndZeroes] * The value indicating whether to trim leading and trailing spaces and * zeroes. - * @member {string} + * @property {string} * [x12.receiveAgreement.protocolSettings.validationSettings.trailingSeparatorPolicy] * The trailing separator policy. Possible values include: 'NotSpecified', * 'NotAllowed', 'Optional', 'Mandatory' - * @member {object} [x12.receiveAgreement.protocolSettings.framingSettings] + * @property {object} [x12.receiveAgreement.protocolSettings.framingSettings] * The X12 framing settings. - * @member {number} + * @property {number} * [x12.receiveAgreement.protocolSettings.framingSettings.dataElementSeparator] * The data element separator. - * @member {number} + * @property {number} * [x12.receiveAgreement.protocolSettings.framingSettings.componentSeparator] * The component separator. - * @member {boolean} + * @property {boolean} * [x12.receiveAgreement.protocolSettings.framingSettings.replaceSeparatorsInPayload] * The value indicating whether to replace separators in payload. - * @member {number} + * @property {number} * [x12.receiveAgreement.protocolSettings.framingSettings.replaceCharacter] * The replacement character. - * @member {number} + * @property {number} * [x12.receiveAgreement.protocolSettings.framingSettings.segmentTerminator] * The segment terminator. - * @member {string} + * @property {string} * [x12.receiveAgreement.protocolSettings.framingSettings.characterSet] The * X12 character set. Possible values include: 'NotSpecified', 'Basic', * 'Extended', 'UTF8' - * @member {string} + * @property {string} * [x12.receiveAgreement.protocolSettings.framingSettings.segmentTerminatorSuffix] * The segment terminator suffix. Possible values include: 'NotSpecified', * 'None', 'CR', 'LF', 'CRLF' - * @member {object} [x12.receiveAgreement.protocolSettings.envelopeSettings] - * The X12 envelope settings. - * @member {number} + * @property {object} + * [x12.receiveAgreement.protocolSettings.envelopeSettings] The X12 envelope + * settings. + * @property {number} * [x12.receiveAgreement.protocolSettings.envelopeSettings.controlStandardsId] * The controls standards id. - * @member {boolean} + * @property {boolean} * [x12.receiveAgreement.protocolSettings.envelopeSettings.useControlStandardsIdAsRepetitionCharacter] * The value indicating whether to use control standards id as repetition * character. - * @member {string} + * @property {string} * [x12.receiveAgreement.protocolSettings.envelopeSettings.senderApplicationId] * The sender application id. - * @member {string} + * @property {string} * [x12.receiveAgreement.protocolSettings.envelopeSettings.receiverApplicationId] * The receiver application id. - * @member {string} + * @property {string} * [x12.receiveAgreement.protocolSettings.envelopeSettings.controlVersionNumber] * The control version number. - * @member {number} + * @property {number} * [x12.receiveAgreement.protocolSettings.envelopeSettings.interchangeControlNumberLowerBound] * The interchange control number lower bound. - * @member {number} + * @property {number} * [x12.receiveAgreement.protocolSettings.envelopeSettings.interchangeControlNumberUpperBound] * The interchange control number upper bound. - * @member {boolean} + * @property {boolean} * [x12.receiveAgreement.protocolSettings.envelopeSettings.rolloverInterchangeControlNumber] * The value indicating whether to rollover interchange control number. - * @member {boolean} + * @property {boolean} * [x12.receiveAgreement.protocolSettings.envelopeSettings.enableDefaultGroupHeaders] * The value indicating whether to enable default group headers. - * @member {string} + * @property {string} * [x12.receiveAgreement.protocolSettings.envelopeSettings.functionalGroupId] * The functional group id. - * @member {number} + * @property {number} * [x12.receiveAgreement.protocolSettings.envelopeSettings.groupControlNumberLowerBound] * The group control number lower bound. - * @member {number} + * @property {number} * [x12.receiveAgreement.protocolSettings.envelopeSettings.groupControlNumberUpperBound] * The group control number upper bound. - * @member {boolean} + * @property {boolean} * [x12.receiveAgreement.protocolSettings.envelopeSettings.rolloverGroupControlNumber] * The value indicating whether to rollover group control number. - * @member {string} + * @property {string} * [x12.receiveAgreement.protocolSettings.envelopeSettings.groupHeaderAgencyCode] * The group header agency code. - * @member {string} + * @property {string} * [x12.receiveAgreement.protocolSettings.envelopeSettings.groupHeaderVersion] * The group header version. - * @member {number} + * @property {number} * [x12.receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberLowerBound] * The transaction set control number lower bound. - * @member {number} + * @property {number} * [x12.receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberUpperBound] * The transaction set control number upper bound. - * @member {boolean} + * @property {boolean} * [x12.receiveAgreement.protocolSettings.envelopeSettings.rolloverTransactionSetControlNumber] * The value indicating whether to rollover transaction set control number. - * @member {string} + * @property {string} * [x12.receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberPrefix] * The transaction set control number prefix. - * @member {string} + * @property {string} * [x12.receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberSuffix] * The transaction set control number suffix. - * @member {boolean} + * @property {boolean} * [x12.receiveAgreement.protocolSettings.envelopeSettings.overwriteExistingTransactionSetControlNumber] * The value indicating whether to overwrite existing transaction set control * number. - * @member {string} + * @property {string} * [x12.receiveAgreement.protocolSettings.envelopeSettings.groupHeaderDateFormat] * The group header date format. Possible values include: 'NotSpecified', * 'CCYYMMDD', 'YYMMDD' - * @member {string} + * @property {string} * [x12.receiveAgreement.protocolSettings.envelopeSettings.groupHeaderTimeFormat] * The group header time format. Possible values include: 'NotSpecified', * 'HHMM', 'HHMMSS', 'HHMMSSdd', 'HHMMSSd' - * @member {string} + * @property {string} * [x12.receiveAgreement.protocolSettings.envelopeSettings.usageIndicator] * The usage indicator. Possible values include: 'NotSpecified', 'Test', * 'Information', 'Production' - * @member {object} + * @property {object} * [x12.receiveAgreement.protocolSettings.acknowledgementSettings] The X12 * acknowledgment settings. - * @member {boolean} + * @property {boolean} * [x12.receiveAgreement.protocolSettings.acknowledgementSettings.needTechnicalAcknowledgement] * The value indicating whether technical acknowledgement is needed. - * @member {boolean} + * @property {boolean} * [x12.receiveAgreement.protocolSettings.acknowledgementSettings.batchTechnicalAcknowledgements] * The value indicating whether to batch the technical acknowledgements. - * @member {boolean} + * @property {boolean} * [x12.receiveAgreement.protocolSettings.acknowledgementSettings.needFunctionalAcknowledgement] * The value indicating whether functional acknowledgement is needed. - * @member {string} + * @property {string} * [x12.receiveAgreement.protocolSettings.acknowledgementSettings.functionalAcknowledgementVersion] * The functional acknowledgement version. - * @member {boolean} + * @property {boolean} * [x12.receiveAgreement.protocolSettings.acknowledgementSettings.batchFunctionalAcknowledgements] * The value indicating whether to batch functional acknowledgements. - * @member {boolean} + * @property {boolean} * [x12.receiveAgreement.protocolSettings.acknowledgementSettings.needImplementationAcknowledgement] * The value indicating whether implementation acknowledgement is needed. - * @member {string} + * @property {string} * [x12.receiveAgreement.protocolSettings.acknowledgementSettings.implementationAcknowledgementVersion] * The implementation acknowledgement version. - * @member {boolean} + * @property {boolean} * [x12.receiveAgreement.protocolSettings.acknowledgementSettings.batchImplementationAcknowledgements] * The value indicating whether to batch implementation acknowledgements. - * @member {boolean} + * @property {boolean} * [x12.receiveAgreement.protocolSettings.acknowledgementSettings.needLoopForValidMessages] * The value indicating whether a loop is needed for valid messages. - * @member {boolean} + * @property {boolean} * [x12.receiveAgreement.protocolSettings.acknowledgementSettings.sendSynchronousAcknowledgement] * The value indicating whether to send synchronous acknowledgement. - * @member {string} + * @property {string} * [x12.receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberPrefix] * The acknowledgement control number prefix. - * @member {string} + * @property {string} * [x12.receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberSuffix] * The acknowledgement control number suffix. - * @member {number} + * @property {number} * [x12.receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberLowerBound] * The acknowledgement control number lower bound. - * @member {number} + * @property {number} * [x12.receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberUpperBound] * The acknowledgement control number upper bound. - * @member {boolean} + * @property {boolean} * [x12.receiveAgreement.protocolSettings.acknowledgementSettings.rolloverAcknowledgementControlNumber] * The value indicating whether to rollover acknowledgement control number. - * @member {object} [x12.receiveAgreement.protocolSettings.messageFilter] The - * X12 message filter. - * @member {string} + * @property {object} [x12.receiveAgreement.protocolSettings.messageFilter] + * The X12 message filter. + * @property {string} * [x12.receiveAgreement.protocolSettings.messageFilter.messageFilterType] * The message filter type. Possible values include: 'NotSpecified', * 'Include', 'Exclude' - * @member {object} [x12.receiveAgreement.protocolSettings.securitySettings] - * The X12 security settings. - * @member {string} + * @property {object} + * [x12.receiveAgreement.protocolSettings.securitySettings] The X12 security + * settings. + * @property {string} * [x12.receiveAgreement.protocolSettings.securitySettings.authorizationQualifier] * The authorization qualifier. - * @member {string} + * @property {string} * [x12.receiveAgreement.protocolSettings.securitySettings.authorizationValue] * The authorization value. - * @member {string} + * @property {string} * [x12.receiveAgreement.protocolSettings.securitySettings.securityQualifier] * The security qualifier. - * @member {string} + * @property {string} * [x12.receiveAgreement.protocolSettings.securitySettings.passwordValue] The * password value. - * @member {object} + * @property {object} * [x12.receiveAgreement.protocolSettings.processingSettings] The X12 * processing settings. - * @member {boolean} + * @property {boolean} * [x12.receiveAgreement.protocolSettings.processingSettings.maskSecurityInfo] * The value indicating whether to mask security information. - * @member {boolean} + * @property {boolean} * [x12.receiveAgreement.protocolSettings.processingSettings.convertImpliedDecimal] * The value indicating whether to convert numerical type to implied decimal. - * @member {boolean} + * @property {boolean} * [x12.receiveAgreement.protocolSettings.processingSettings.preserveInterchange] * The value indicating whether to preserve interchange. - * @member {boolean} + * @property {boolean} * [x12.receiveAgreement.protocolSettings.processingSettings.suspendInterchangeOnError] * The value indicating whether to suspend interchange on error. - * @member {boolean} + * @property {boolean} * [x12.receiveAgreement.protocolSettings.processingSettings.createEmptyXmlTagsForTrailingSeparators] * The value indicating whether to create empty xml tags for trailing * separators. - * @member {boolean} + * @property {boolean} * [x12.receiveAgreement.protocolSettings.processingSettings.useDotAsDecimalSeparator] * The value indicating whether to use dot as decimal separator. - * @member {array} [x12.receiveAgreement.protocolSettings.envelopeOverrides] - * The X12 envelope override settings. - * @member {array} + * @property {array} + * [x12.receiveAgreement.protocolSettings.envelopeOverrides] The X12 envelope + * override settings. + * @property {array} * [x12.receiveAgreement.protocolSettings.validationOverrides] The X12 * validation override settings. - * @member {array} [x12.receiveAgreement.protocolSettings.messageFilterList] - * The X12 message filter list. - * @member {array} [x12.receiveAgreement.protocolSettings.schemaReferences] + * @property {array} + * [x12.receiveAgreement.protocolSettings.messageFilterList] The X12 message + * filter list. + * @property {array} [x12.receiveAgreement.protocolSettings.schemaReferences] * The X12 schema references. - * @member {array} + * @property {array} * [x12.receiveAgreement.protocolSettings.x12DelimiterOverrides] The X12 * delimiter override settings. - * @member {object} [x12.sendAgreement] The X12 one-way send agreement. - * @member {object} [x12.sendAgreement.senderBusinessIdentity] The sender + * @property {object} [x12.sendAgreement] The X12 one-way send agreement. + * @property {object} [x12.sendAgreement.senderBusinessIdentity] The sender * business identity - * @member {string} [x12.sendAgreement.senderBusinessIdentity.qualifier] The - * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [x12.sendAgreement.senderBusinessIdentity.value] The user - * defined business identity value. - * @member {object} [x12.sendAgreement.receiverBusinessIdentity] The receiver - * business identity - * @member {string} [x12.sendAgreement.receiverBusinessIdentity.qualifier] + * @property {string} [x12.sendAgreement.senderBusinessIdentity.qualifier] + * The business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 + * @property {string} [x12.sendAgreement.senderBusinessIdentity.value] The + * user defined business identity value. + * @property {object} [x12.sendAgreement.receiverBusinessIdentity] The + * receiver business identity + * @property {string} [x12.sendAgreement.receiverBusinessIdentity.qualifier] * The business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [x12.sendAgreement.receiverBusinessIdentity.value] The + * @property {string} [x12.sendAgreement.receiverBusinessIdentity.value] The * user defined business identity value. - * @member {object} [x12.sendAgreement.protocolSettings] The X12 protocol + * @property {object} [x12.sendAgreement.protocolSettings] The X12 protocol * settings. - * @member {object} [x12.sendAgreement.protocolSettings.validationSettings] + * @property {object} [x12.sendAgreement.protocolSettings.validationSettings] * The X12 validation settings. - * @member {boolean} + * @property {boolean} * [x12.sendAgreement.protocolSettings.validationSettings.validateCharacterSet] * The value indicating whether to validate character set in the message. - * @member {boolean} + * @property {boolean} * [x12.sendAgreement.protocolSettings.validationSettings.checkDuplicateInterchangeControlNumber] * The value indicating whether to check for duplicate interchange control * number. - * @member {number} + * @property {number} * [x12.sendAgreement.protocolSettings.validationSettings.interchangeControlNumberValidityDays] * The validity period of interchange control number. - * @member {boolean} + * @property {boolean} * [x12.sendAgreement.protocolSettings.validationSettings.checkDuplicateGroupControlNumber] * The value indicating whether to check for duplicate group control number. - * @member {boolean} + * @property {boolean} * [x12.sendAgreement.protocolSettings.validationSettings.checkDuplicateTransactionSetControlNumber] * The value indicating whether to check for duplicate transaction set * control number. - * @member {boolean} + * @property {boolean} * [x12.sendAgreement.protocolSettings.validationSettings.validateEdiTypes] * The value indicating whether to Whether to validate EDI types. - * @member {boolean} + * @property {boolean} * [x12.sendAgreement.protocolSettings.validationSettings.validateXsdTypes] * The value indicating whether to Whether to validate XSD types. - * @member {boolean} + * @property {boolean} * [x12.sendAgreement.protocolSettings.validationSettings.allowLeadingAndTrailingSpacesAndZeroes] * The value indicating whether to allow leading and trailing spaces and * zeroes. - * @member {boolean} + * @property {boolean} * [x12.sendAgreement.protocolSettings.validationSettings.trimLeadingAndTrailingSpacesAndZeroes] * The value indicating whether to trim leading and trailing spaces and * zeroes. - * @member {string} + * @property {string} * [x12.sendAgreement.protocolSettings.validationSettings.trailingSeparatorPolicy] * The trailing separator policy. Possible values include: 'NotSpecified', * 'NotAllowed', 'Optional', 'Mandatory' - * @member {object} [x12.sendAgreement.protocolSettings.framingSettings] The - * X12 framing settings. - * @member {number} + * @property {object} [x12.sendAgreement.protocolSettings.framingSettings] + * The X12 framing settings. + * @property {number} * [x12.sendAgreement.protocolSettings.framingSettings.dataElementSeparator] * The data element separator. - * @member {number} + * @property {number} * [x12.sendAgreement.protocolSettings.framingSettings.componentSeparator] * The component separator. - * @member {boolean} + * @property {boolean} * [x12.sendAgreement.protocolSettings.framingSettings.replaceSeparatorsInPayload] * The value indicating whether to replace separators in payload. - * @member {number} + * @property {number} * [x12.sendAgreement.protocolSettings.framingSettings.replaceCharacter] The * replacement character. - * @member {number} + * @property {number} * [x12.sendAgreement.protocolSettings.framingSettings.segmentTerminator] The * segment terminator. - * @member {string} + * @property {string} * [x12.sendAgreement.protocolSettings.framingSettings.characterSet] The X12 * character set. Possible values include: 'NotSpecified', 'Basic', * 'Extended', 'UTF8' - * @member {string} + * @property {string} * [x12.sendAgreement.protocolSettings.framingSettings.segmentTerminatorSuffix] * The segment terminator suffix. Possible values include: 'NotSpecified', * 'None', 'CR', 'LF', 'CRLF' - * @member {object} [x12.sendAgreement.protocolSettings.envelopeSettings] The - * X12 envelope settings. - * @member {number} + * @property {object} [x12.sendAgreement.protocolSettings.envelopeSettings] + * The X12 envelope settings. + * @property {number} * [x12.sendAgreement.protocolSettings.envelopeSettings.controlStandardsId] * The controls standards id. - * @member {boolean} + * @property {boolean} * [x12.sendAgreement.protocolSettings.envelopeSettings.useControlStandardsIdAsRepetitionCharacter] * The value indicating whether to use control standards id as repetition * character. - * @member {string} + * @property {string} * [x12.sendAgreement.protocolSettings.envelopeSettings.senderApplicationId] * The sender application id. - * @member {string} + * @property {string} * [x12.sendAgreement.protocolSettings.envelopeSettings.receiverApplicationId] * The receiver application id. - * @member {string} + * @property {string} * [x12.sendAgreement.protocolSettings.envelopeSettings.controlVersionNumber] * The control version number. - * @member {number} + * @property {number} * [x12.sendAgreement.protocolSettings.envelopeSettings.interchangeControlNumberLowerBound] * The interchange control number lower bound. - * @member {number} + * @property {number} * [x12.sendAgreement.protocolSettings.envelopeSettings.interchangeControlNumberUpperBound] * The interchange control number upper bound. - * @member {boolean} + * @property {boolean} * [x12.sendAgreement.protocolSettings.envelopeSettings.rolloverInterchangeControlNumber] * The value indicating whether to rollover interchange control number. - * @member {boolean} + * @property {boolean} * [x12.sendAgreement.protocolSettings.envelopeSettings.enableDefaultGroupHeaders] * The value indicating whether to enable default group headers. - * @member {string} + * @property {string} * [x12.sendAgreement.protocolSettings.envelopeSettings.functionalGroupId] * The functional group id. - * @member {number} + * @property {number} * [x12.sendAgreement.protocolSettings.envelopeSettings.groupControlNumberLowerBound] * The group control number lower bound. - * @member {number} + * @property {number} * [x12.sendAgreement.protocolSettings.envelopeSettings.groupControlNumberUpperBound] * The group control number upper bound. - * @member {boolean} + * @property {boolean} * [x12.sendAgreement.protocolSettings.envelopeSettings.rolloverGroupControlNumber] * The value indicating whether to rollover group control number. - * @member {string} + * @property {string} * [x12.sendAgreement.protocolSettings.envelopeSettings.groupHeaderAgencyCode] * The group header agency code. - * @member {string} + * @property {string} * [x12.sendAgreement.protocolSettings.envelopeSettings.groupHeaderVersion] * The group header version. - * @member {number} + * @property {number} * [x12.sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberLowerBound] * The transaction set control number lower bound. - * @member {number} + * @property {number} * [x12.sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberUpperBound] * The transaction set control number upper bound. - * @member {boolean} + * @property {boolean} * [x12.sendAgreement.protocolSettings.envelopeSettings.rolloverTransactionSetControlNumber] * The value indicating whether to rollover transaction set control number. - * @member {string} + * @property {string} * [x12.sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberPrefix] * The transaction set control number prefix. - * @member {string} + * @property {string} * [x12.sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberSuffix] * The transaction set control number suffix. - * @member {boolean} + * @property {boolean} * [x12.sendAgreement.protocolSettings.envelopeSettings.overwriteExistingTransactionSetControlNumber] * The value indicating whether to overwrite existing transaction set control * number. - * @member {string} + * @property {string} * [x12.sendAgreement.protocolSettings.envelopeSettings.groupHeaderDateFormat] * The group header date format. Possible values include: 'NotSpecified', * 'CCYYMMDD', 'YYMMDD' - * @member {string} + * @property {string} * [x12.sendAgreement.protocolSettings.envelopeSettings.groupHeaderTimeFormat] * The group header time format. Possible values include: 'NotSpecified', * 'HHMM', 'HHMMSS', 'HHMMSSdd', 'HHMMSSd' - * @member {string} + * @property {string} * [x12.sendAgreement.protocolSettings.envelopeSettings.usageIndicator] The * usage indicator. Possible values include: 'NotSpecified', 'Test', * 'Information', 'Production' - * @member {object} + * @property {object} * [x12.sendAgreement.protocolSettings.acknowledgementSettings] The X12 * acknowledgment settings. - * @member {boolean} + * @property {boolean} * [x12.sendAgreement.protocolSettings.acknowledgementSettings.needTechnicalAcknowledgement] * The value indicating whether technical acknowledgement is needed. - * @member {boolean} + * @property {boolean} * [x12.sendAgreement.protocolSettings.acknowledgementSettings.batchTechnicalAcknowledgements] * The value indicating whether to batch the technical acknowledgements. - * @member {boolean} + * @property {boolean} * [x12.sendAgreement.protocolSettings.acknowledgementSettings.needFunctionalAcknowledgement] * The value indicating whether functional acknowledgement is needed. - * @member {string} + * @property {string} * [x12.sendAgreement.protocolSettings.acknowledgementSettings.functionalAcknowledgementVersion] * The functional acknowledgement version. - * @member {boolean} + * @property {boolean} * [x12.sendAgreement.protocolSettings.acknowledgementSettings.batchFunctionalAcknowledgements] * The value indicating whether to batch functional acknowledgements. - * @member {boolean} + * @property {boolean} * [x12.sendAgreement.protocolSettings.acknowledgementSettings.needImplementationAcknowledgement] * The value indicating whether implementation acknowledgement is needed. - * @member {string} + * @property {string} * [x12.sendAgreement.protocolSettings.acknowledgementSettings.implementationAcknowledgementVersion] * The implementation acknowledgement version. - * @member {boolean} + * @property {boolean} * [x12.sendAgreement.protocolSettings.acknowledgementSettings.batchImplementationAcknowledgements] * The value indicating whether to batch implementation acknowledgements. - * @member {boolean} + * @property {boolean} * [x12.sendAgreement.protocolSettings.acknowledgementSettings.needLoopForValidMessages] * The value indicating whether a loop is needed for valid messages. - * @member {boolean} + * @property {boolean} * [x12.sendAgreement.protocolSettings.acknowledgementSettings.sendSynchronousAcknowledgement] * The value indicating whether to send synchronous acknowledgement. - * @member {string} + * @property {string} * [x12.sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberPrefix] * The acknowledgement control number prefix. - * @member {string} + * @property {string} * [x12.sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberSuffix] * The acknowledgement control number suffix. - * @member {number} + * @property {number} * [x12.sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberLowerBound] * The acknowledgement control number lower bound. - * @member {number} + * @property {number} * [x12.sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberUpperBound] * The acknowledgement control number upper bound. - * @member {boolean} + * @property {boolean} * [x12.sendAgreement.protocolSettings.acknowledgementSettings.rolloverAcknowledgementControlNumber] * The value indicating whether to rollover acknowledgement control number. - * @member {object} [x12.sendAgreement.protocolSettings.messageFilter] The + * @property {object} [x12.sendAgreement.protocolSettings.messageFilter] The * X12 message filter. - * @member {string} + * @property {string} * [x12.sendAgreement.protocolSettings.messageFilter.messageFilterType] The * message filter type. Possible values include: 'NotSpecified', 'Include', * 'Exclude' - * @member {object} [x12.sendAgreement.protocolSettings.securitySettings] The - * X12 security settings. - * @member {string} + * @property {object} [x12.sendAgreement.protocolSettings.securitySettings] + * The X12 security settings. + * @property {string} * [x12.sendAgreement.protocolSettings.securitySettings.authorizationQualifier] * The authorization qualifier. - * @member {string} + * @property {string} * [x12.sendAgreement.protocolSettings.securitySettings.authorizationValue] * The authorization value. - * @member {string} + * @property {string} * [x12.sendAgreement.protocolSettings.securitySettings.securityQualifier] * The security qualifier. - * @member {string} + * @property {string} * [x12.sendAgreement.protocolSettings.securitySettings.passwordValue] The * password value. - * @member {object} [x12.sendAgreement.protocolSettings.processingSettings] + * @property {object} [x12.sendAgreement.protocolSettings.processingSettings] * The X12 processing settings. - * @member {boolean} + * @property {boolean} * [x12.sendAgreement.protocolSettings.processingSettings.maskSecurityInfo] * The value indicating whether to mask security information. - * @member {boolean} + * @property {boolean} * [x12.sendAgreement.protocolSettings.processingSettings.convertImpliedDecimal] * The value indicating whether to convert numerical type to implied decimal. - * @member {boolean} + * @property {boolean} * [x12.sendAgreement.protocolSettings.processingSettings.preserveInterchange] * The value indicating whether to preserve interchange. - * @member {boolean} + * @property {boolean} * [x12.sendAgreement.protocolSettings.processingSettings.suspendInterchangeOnError] * The value indicating whether to suspend interchange on error. - * @member {boolean} + * @property {boolean} * [x12.sendAgreement.protocolSettings.processingSettings.createEmptyXmlTagsForTrailingSeparators] * The value indicating whether to create empty xml tags for trailing * separators. - * @member {boolean} + * @property {boolean} * [x12.sendAgreement.protocolSettings.processingSettings.useDotAsDecimalSeparator] * The value indicating whether to use dot as decimal separator. - * @member {array} [x12.sendAgreement.protocolSettings.envelopeOverrides] The - * X12 envelope override settings. - * @member {array} [x12.sendAgreement.protocolSettings.validationOverrides] + * @property {array} [x12.sendAgreement.protocolSettings.envelopeOverrides] + * The X12 envelope override settings. + * @property {array} [x12.sendAgreement.protocolSettings.validationOverrides] * The X12 validation override settings. - * @member {array} [x12.sendAgreement.protocolSettings.messageFilterList] The - * X12 message filter list. - * @member {array} [x12.sendAgreement.protocolSettings.schemaReferences] The - * X12 schema references. - * @member {array} [x12.sendAgreement.protocolSettings.x12DelimiterOverrides] - * The X12 delimiter override settings. - * @member {object} [edifact] The EDIFACT agreement content. - * @member {object} [edifact.receiveAgreement] The EDIFACT one-way receive + * @property {array} [x12.sendAgreement.protocolSettings.messageFilterList] + * The X12 message filter list. + * @property {array} [x12.sendAgreement.protocolSettings.schemaReferences] + * The X12 schema references. + * @property {array} + * [x12.sendAgreement.protocolSettings.x12DelimiterOverrides] The X12 + * delimiter override settings. + * @property {object} [edifact] The EDIFACT agreement content. + * @property {object} [edifact.receiveAgreement] The EDIFACT one-way receive * agreement. - * @member {object} [edifact.receiveAgreement.senderBusinessIdentity] The + * @property {object} [edifact.receiveAgreement.senderBusinessIdentity] The * sender business identity - * @member {string} + * @property {string} * [edifact.receiveAgreement.senderBusinessIdentity.qualifier] The business * identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [edifact.receiveAgreement.senderBusinessIdentity.value] + * @property {string} [edifact.receiveAgreement.senderBusinessIdentity.value] * The user defined business identity value. - * @member {object} [edifact.receiveAgreement.receiverBusinessIdentity] The + * @property {object} [edifact.receiveAgreement.receiverBusinessIdentity] The * receiver business identity - * @member {string} + * @property {string} * [edifact.receiveAgreement.receiverBusinessIdentity.qualifier] The business * identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [edifact.receiveAgreement.receiverBusinessIdentity.value] - * The user defined business identity value. - * @member {object} [edifact.receiveAgreement.protocolSettings] The EDIFACT + * @property {string} + * [edifact.receiveAgreement.receiverBusinessIdentity.value] The user defined + * business identity value. + * @property {object} [edifact.receiveAgreement.protocolSettings] The EDIFACT * protocol settings. - * @member {object} + * @property {object} * [edifact.receiveAgreement.protocolSettings.validationSettings] The EDIFACT * validation settings. - * @member {boolean} + * @property {boolean} * [edifact.receiveAgreement.protocolSettings.validationSettings.validateCharacterSet] * The value indicating whether to validate character set in the message. - * @member {boolean} + * @property {boolean} * [edifact.receiveAgreement.protocolSettings.validationSettings.checkDuplicateInterchangeControlNumber] * The value indicating whether to check for duplicate interchange control * number. - * @member {number} + * @property {number} * [edifact.receiveAgreement.protocolSettings.validationSettings.interchangeControlNumberValidityDays] * The validity period of interchange control number. - * @member {boolean} + * @property {boolean} * [edifact.receiveAgreement.protocolSettings.validationSettings.checkDuplicateGroupControlNumber] * The value indicating whether to check for duplicate group control number. - * @member {boolean} + * @property {boolean} * [edifact.receiveAgreement.protocolSettings.validationSettings.checkDuplicateTransactionSetControlNumber] * The value indicating whether to check for duplicate transaction set * control number. - * @member {boolean} + * @property {boolean} * [edifact.receiveAgreement.protocolSettings.validationSettings.validateEdiTypes] * The value indicating whether to Whether to validate EDI types. - * @member {boolean} + * @property {boolean} * [edifact.receiveAgreement.protocolSettings.validationSettings.validateXsdTypes] * The value indicating whether to Whether to validate XSD types. - * @member {boolean} + * @property {boolean} * [edifact.receiveAgreement.protocolSettings.validationSettings.allowLeadingAndTrailingSpacesAndZeroes] * The value indicating whether to allow leading and trailing spaces and * zeroes. - * @member {boolean} + * @property {boolean} * [edifact.receiveAgreement.protocolSettings.validationSettings.trimLeadingAndTrailingSpacesAndZeroes] * The value indicating whether to trim leading and trailing spaces and * zeroes. - * @member {string} + * @property {string} * [edifact.receiveAgreement.protocolSettings.validationSettings.trailingSeparatorPolicy] * The trailing separator policy. Possible values include: 'NotSpecified', * 'NotAllowed', 'Optional', 'Mandatory' - * @member {object} + * @property {object} * [edifact.receiveAgreement.protocolSettings.framingSettings] The EDIFACT * framing settings. - * @member {string} + * @property {string} * [edifact.receiveAgreement.protocolSettings.framingSettings.serviceCodeListDirectoryVersion] * The service code list directory version. - * @member {string} + * @property {string} * [edifact.receiveAgreement.protocolSettings.framingSettings.characterEncoding] * The character encoding. - * @member {number} + * @property {number} * [edifact.receiveAgreement.protocolSettings.framingSettings.protocolVersion] * The protocol version. - * @member {number} + * @property {number} * [edifact.receiveAgreement.protocolSettings.framingSettings.dataElementSeparator] * The data element separator. - * @member {number} + * @property {number} * [edifact.receiveAgreement.protocolSettings.framingSettings.componentSeparator] * The component separator. - * @member {number} + * @property {number} * [edifact.receiveAgreement.protocolSettings.framingSettings.segmentTerminator] * The segment terminator. - * @member {number} + * @property {number} * [edifact.receiveAgreement.protocolSettings.framingSettings.releaseIndicator] * The release indicator. - * @member {number} + * @property {number} * [edifact.receiveAgreement.protocolSettings.framingSettings.repetitionSeparator] * The repetition separator. - * @member {string} + * @property {string} * [edifact.receiveAgreement.protocolSettings.framingSettings.characterSet] * The EDIFACT frame setting characterSet. Possible values include: * 'NotSpecified', 'UNOB', 'UNOA', 'UNOC', 'UNOD', 'UNOE', 'UNOF', 'UNOG', * 'UNOH', 'UNOI', 'UNOJ', 'UNOK', 'UNOX', 'UNOY', 'KECA' - * @member {string} + * @property {string} * [edifact.receiveAgreement.protocolSettings.framingSettings.decimalPointIndicator] * The EDIFACT frame setting decimal indicator. Possible values include: * 'NotSpecified', 'Comma', 'Decimal' - * @member {string} + * @property {string} * [edifact.receiveAgreement.protocolSettings.framingSettings.segmentTerminatorSuffix] * The EDIFACT frame setting segment terminator suffix. Possible values * include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' - * @member {object} + * @property {object} * [edifact.receiveAgreement.protocolSettings.envelopeSettings] The EDIFACT * envelope settings. - * @member {string} + * @property {string} * [edifact.receiveAgreement.protocolSettings.envelopeSettings.groupAssociationAssignedCode] * The group association assigned code. - * @member {string} + * @property {string} * [edifact.receiveAgreement.protocolSettings.envelopeSettings.communicationAgreementId] * The communication agreement id. - * @member {boolean} + * @property {boolean} * [edifact.receiveAgreement.protocolSettings.envelopeSettings.applyDelimiterStringAdvice] * The value indicating whether to apply delimiter string advice. - * @member {boolean} + * @property {boolean} * [edifact.receiveAgreement.protocolSettings.envelopeSettings.createGroupingSegments] * The value indicating whether to create grouping segments. - * @member {boolean} + * @property {boolean} * [edifact.receiveAgreement.protocolSettings.envelopeSettings.enableDefaultGroupHeaders] * The value indicating whether to enable default group headers. - * @member {string} + * @property {string} * [edifact.receiveAgreement.protocolSettings.envelopeSettings.recipientReferencePasswordValue] * The recipient reference password value. - * @member {string} + * @property {string} * [edifact.receiveAgreement.protocolSettings.envelopeSettings.recipientReferencePasswordQualifier] * The recipient reference password qualifier. - * @member {string} + * @property {string} * [edifact.receiveAgreement.protocolSettings.envelopeSettings.applicationReferenceId] * The application reference id. - * @member {string} + * @property {string} * [edifact.receiveAgreement.protocolSettings.envelopeSettings.processingPriorityCode] * The processing priority code. - * @member {number} + * @property {number} * [edifact.receiveAgreement.protocolSettings.envelopeSettings.interchangeControlNumberLowerBound] * The interchange control number lower bound. - * @member {number} + * @property {number} * [edifact.receiveAgreement.protocolSettings.envelopeSettings.interchangeControlNumberUpperBound] * The interchange control number upper bound. - * @member {boolean} + * @property {boolean} * [edifact.receiveAgreement.protocolSettings.envelopeSettings.rolloverInterchangeControlNumber] * The value indicating whether to rollover interchange control number. - * @member {string} + * @property {string} * [edifact.receiveAgreement.protocolSettings.envelopeSettings.interchangeControlNumberPrefix] * The interchange control number prefix. - * @member {string} + * @property {string} * [edifact.receiveAgreement.protocolSettings.envelopeSettings.interchangeControlNumberSuffix] * The interchange control number suffix. - * @member {string} + * @property {string} * [edifact.receiveAgreement.protocolSettings.envelopeSettings.senderReverseRoutingAddress] * The sender reverse routing address. - * @member {string} + * @property {string} * [edifact.receiveAgreement.protocolSettings.envelopeSettings.receiverReverseRoutingAddress] * The receiver reverse routing address. - * @member {string} + * @property {string} * [edifact.receiveAgreement.protocolSettings.envelopeSettings.functionalGroupId] * The functional group id. - * @member {string} + * @property {string} * [edifact.receiveAgreement.protocolSettings.envelopeSettings.groupControllingAgencyCode] * The group controlling agency code. - * @member {string} + * @property {string} * [edifact.receiveAgreement.protocolSettings.envelopeSettings.groupMessageVersion] * The group message version. - * @member {string} + * @property {string} * [edifact.receiveAgreement.protocolSettings.envelopeSettings.groupMessageRelease] * The group message release. - * @member {number} + * @property {number} * [edifact.receiveAgreement.protocolSettings.envelopeSettings.groupControlNumberLowerBound] * The group control number lower bound. - * @member {number} + * @property {number} * [edifact.receiveAgreement.protocolSettings.envelopeSettings.groupControlNumberUpperBound] * The group control number upper bound. - * @member {boolean} + * @property {boolean} * [edifact.receiveAgreement.protocolSettings.envelopeSettings.rolloverGroupControlNumber] * The value indicating whether to rollover group control number. - * @member {string} + * @property {string} * [edifact.receiveAgreement.protocolSettings.envelopeSettings.groupControlNumberPrefix] * The group control number prefix. - * @member {string} + * @property {string} * [edifact.receiveAgreement.protocolSettings.envelopeSettings.groupControlNumberSuffix] * The group control number suffix. - * @member {string} + * @property {string} * [edifact.receiveAgreement.protocolSettings.envelopeSettings.groupApplicationReceiverQualifier] * The group application receiver qualifier. - * @member {string} + * @property {string} * [edifact.receiveAgreement.protocolSettings.envelopeSettings.groupApplicationReceiverId] * The group application receiver id. - * @member {string} + * @property {string} * [edifact.receiveAgreement.protocolSettings.envelopeSettings.groupApplicationSenderQualifier] * The group application sender qualifier. - * @member {string} + * @property {string} * [edifact.receiveAgreement.protocolSettings.envelopeSettings.groupApplicationSenderId] * The group application sender id. - * @member {string} + * @property {string} * [edifact.receiveAgreement.protocolSettings.envelopeSettings.groupApplicationPassword] * The group application password. - * @member {boolean} + * @property {boolean} * [edifact.receiveAgreement.protocolSettings.envelopeSettings.overwriteExistingTransactionSetControlNumber] * The value indicating whether to overwrite existing transaction set control * number. - * @member {string} + * @property {string} * [edifact.receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberPrefix] * The transaction set control number prefix. - * @member {string} + * @property {string} * [edifact.receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberSuffix] * The transaction set control number suffix. - * @member {number} + * @property {number} * [edifact.receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberLowerBound] * The transaction set control number lower bound. - * @member {number} + * @property {number} * [edifact.receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberUpperBound] * The transaction set control number upper bound. - * @member {boolean} + * @property {boolean} * [edifact.receiveAgreement.protocolSettings.envelopeSettings.rolloverTransactionSetControlNumber] * The value indicating whether to rollover transaction set control number. - * @member {boolean} + * @property {boolean} * [edifact.receiveAgreement.protocolSettings.envelopeSettings.isTestInterchange] * The value indicating whether the message is a test interchange. - * @member {string} + * @property {string} * [edifact.receiveAgreement.protocolSettings.envelopeSettings.senderInternalIdentification] * The sender internal identification. - * @member {string} + * @property {string} * [edifact.receiveAgreement.protocolSettings.envelopeSettings.senderInternalSubIdentification] * The sender internal sub identification. - * @member {string} + * @property {string} * [edifact.receiveAgreement.protocolSettings.envelopeSettings.receiverInternalIdentification] * The receiver internal identification. - * @member {string} + * @property {string} * [edifact.receiveAgreement.protocolSettings.envelopeSettings.receiverInternalSubIdentification] * The receiver internal sub identification. - * @member {object} + * @property {object} * [edifact.receiveAgreement.protocolSettings.acknowledgementSettings] The * EDIFACT acknowledgement settings. - * @member {boolean} + * @property {boolean} * [edifact.receiveAgreement.protocolSettings.acknowledgementSettings.needTechnicalAcknowledgement] * The value indicating whether technical acknowledgement is needed. - * @member {boolean} + * @property {boolean} * [edifact.receiveAgreement.protocolSettings.acknowledgementSettings.batchTechnicalAcknowledgements] * The value indicating whether to batch the technical acknowledgements. - * @member {boolean} + * @property {boolean} * [edifact.receiveAgreement.protocolSettings.acknowledgementSettings.needFunctionalAcknowledgement] * The value indicating whether functional acknowledgement is needed. - * @member {boolean} + * @property {boolean} * [edifact.receiveAgreement.protocolSettings.acknowledgementSettings.batchFunctionalAcknowledgements] * The value indicating whether to batch functional acknowledgements. - * @member {boolean} + * @property {boolean} * [edifact.receiveAgreement.protocolSettings.acknowledgementSettings.needLoopForValidMessages] * The value indicating whether a loop is needed for valid messages. - * @member {boolean} + * @property {boolean} * [edifact.receiveAgreement.protocolSettings.acknowledgementSettings.sendSynchronousAcknowledgement] * The value indicating whether to send synchronous acknowledgement. - * @member {string} + * @property {string} * [edifact.receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberPrefix] * The acknowledgement control number prefix. - * @member {string} + * @property {string} * [edifact.receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberSuffix] * The acknowledgement control number suffix. - * @member {number} + * @property {number} * [edifact.receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberLowerBound] * The acknowledgement control number lower bound. - * @member {number} + * @property {number} * [edifact.receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberUpperBound] * The acknowledgement control number upper bound. - * @member {boolean} + * @property {boolean} * [edifact.receiveAgreement.protocolSettings.acknowledgementSettings.rolloverAcknowledgementControlNumber] * The value indicating whether to rollover acknowledgement control number. - * @member {object} [edifact.receiveAgreement.protocolSettings.messageFilter] - * The EDIFACT message filter. - * @member {string} + * @property {object} + * [edifact.receiveAgreement.protocolSettings.messageFilter] The EDIFACT + * message filter. + * @property {string} * [edifact.receiveAgreement.protocolSettings.messageFilter.messageFilterType] * The message filter type. Possible values include: 'NotSpecified', * 'Include', 'Exclude' - * @member {object} + * @property {object} * [edifact.receiveAgreement.protocolSettings.processingSettings] The EDIFACT * processing Settings. - * @member {boolean} + * @property {boolean} * [edifact.receiveAgreement.protocolSettings.processingSettings.maskSecurityInfo] * The value indicating whether to mask security information. - * @member {boolean} + * @property {boolean} * [edifact.receiveAgreement.protocolSettings.processingSettings.preserveInterchange] * The value indicating whether to preserve interchange. - * @member {boolean} + * @property {boolean} * [edifact.receiveAgreement.protocolSettings.processingSettings.suspendInterchangeOnError] * The value indicating whether to suspend interchange on error. - * @member {boolean} + * @property {boolean} * [edifact.receiveAgreement.protocolSettings.processingSettings.createEmptyXmlTagsForTrailingSeparators] * The value indicating whether to create empty xml tags for trailing * separators. - * @member {boolean} + * @property {boolean} * [edifact.receiveAgreement.protocolSettings.processingSettings.useDotAsDecimalSeparator] * The value indicating whether to use dot as decimal separator. - * @member {array} + * @property {array} * [edifact.receiveAgreement.protocolSettings.envelopeOverrides] The EDIFACT * envelope override settings. - * @member {array} + * @property {array} * [edifact.receiveAgreement.protocolSettings.messageFilterList] The EDIFACT * message filter list. - * @member {array} + * @property {array} * [edifact.receiveAgreement.protocolSettings.schemaReferences] The EDIFACT * schema references. - * @member {array} + * @property {array} * [edifact.receiveAgreement.protocolSettings.validationOverrides] The * EDIFACT validation override settings. - * @member {array} + * @property {array} * [edifact.receiveAgreement.protocolSettings.edifactDelimiterOverrides] The * EDIFACT delimiter override settings. - * @member {object} [edifact.sendAgreement] The EDIFACT one-way send + * @property {object} [edifact.sendAgreement] The EDIFACT one-way send * agreement. - * @member {object} [edifact.sendAgreement.senderBusinessIdentity] The sender - * business identity - * @member {string} [edifact.sendAgreement.senderBusinessIdentity.qualifier] - * The business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [edifact.sendAgreement.senderBusinessIdentity.value] The - * user defined business identity value. - * @member {object} [edifact.sendAgreement.receiverBusinessIdentity] The + * @property {object} [edifact.sendAgreement.senderBusinessIdentity] The + * sender business identity + * @property {string} + * [edifact.sendAgreement.senderBusinessIdentity.qualifier] The business + * identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 + * @property {string} [edifact.sendAgreement.senderBusinessIdentity.value] + * The user defined business identity value. + * @property {object} [edifact.sendAgreement.receiverBusinessIdentity] The * receiver business identity - * @member {string} + * @property {string} * [edifact.sendAgreement.receiverBusinessIdentity.qualifier] The business * identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [edifact.sendAgreement.receiverBusinessIdentity.value] + * @property {string} [edifact.sendAgreement.receiverBusinessIdentity.value] * The user defined business identity value. - * @member {object} [edifact.sendAgreement.protocolSettings] The EDIFACT + * @property {object} [edifact.sendAgreement.protocolSettings] The EDIFACT * protocol settings. - * @member {object} + * @property {object} * [edifact.sendAgreement.protocolSettings.validationSettings] The EDIFACT * validation settings. - * @member {boolean} + * @property {boolean} * [edifact.sendAgreement.protocolSettings.validationSettings.validateCharacterSet] * The value indicating whether to validate character set in the message. - * @member {boolean} + * @property {boolean} * [edifact.sendAgreement.protocolSettings.validationSettings.checkDuplicateInterchangeControlNumber] * The value indicating whether to check for duplicate interchange control * number. - * @member {number} + * @property {number} * [edifact.sendAgreement.protocolSettings.validationSettings.interchangeControlNumberValidityDays] * The validity period of interchange control number. - * @member {boolean} + * @property {boolean} * [edifact.sendAgreement.protocolSettings.validationSettings.checkDuplicateGroupControlNumber] * The value indicating whether to check for duplicate group control number. - * @member {boolean} + * @property {boolean} * [edifact.sendAgreement.protocolSettings.validationSettings.checkDuplicateTransactionSetControlNumber] * The value indicating whether to check for duplicate transaction set * control number. - * @member {boolean} + * @property {boolean} * [edifact.sendAgreement.protocolSettings.validationSettings.validateEdiTypes] * The value indicating whether to Whether to validate EDI types. - * @member {boolean} + * @property {boolean} * [edifact.sendAgreement.protocolSettings.validationSettings.validateXsdTypes] * The value indicating whether to Whether to validate XSD types. - * @member {boolean} + * @property {boolean} * [edifact.sendAgreement.protocolSettings.validationSettings.allowLeadingAndTrailingSpacesAndZeroes] * The value indicating whether to allow leading and trailing spaces and * zeroes. - * @member {boolean} + * @property {boolean} * [edifact.sendAgreement.protocolSettings.validationSettings.trimLeadingAndTrailingSpacesAndZeroes] * The value indicating whether to trim leading and trailing spaces and * zeroes. - * @member {string} + * @property {string} * [edifact.sendAgreement.protocolSettings.validationSettings.trailingSeparatorPolicy] * The trailing separator policy. Possible values include: 'NotSpecified', * 'NotAllowed', 'Optional', 'Mandatory' - * @member {object} [edifact.sendAgreement.protocolSettings.framingSettings] - * The EDIFACT framing settings. - * @member {string} + * @property {object} + * [edifact.sendAgreement.protocolSettings.framingSettings] The EDIFACT + * framing settings. + * @property {string} * [edifact.sendAgreement.protocolSettings.framingSettings.serviceCodeListDirectoryVersion] * The service code list directory version. - * @member {string} + * @property {string} * [edifact.sendAgreement.protocolSettings.framingSettings.characterEncoding] * The character encoding. - * @member {number} + * @property {number} * [edifact.sendAgreement.protocolSettings.framingSettings.protocolVersion] * The protocol version. - * @member {number} + * @property {number} * [edifact.sendAgreement.protocolSettings.framingSettings.dataElementSeparator] * The data element separator. - * @member {number} + * @property {number} * [edifact.sendAgreement.protocolSettings.framingSettings.componentSeparator] * The component separator. - * @member {number} + * @property {number} * [edifact.sendAgreement.protocolSettings.framingSettings.segmentTerminator] * The segment terminator. - * @member {number} + * @property {number} * [edifact.sendAgreement.protocolSettings.framingSettings.releaseIndicator] * The release indicator. - * @member {number} + * @property {number} * [edifact.sendAgreement.protocolSettings.framingSettings.repetitionSeparator] * The repetition separator. - * @member {string} + * @property {string} * [edifact.sendAgreement.protocolSettings.framingSettings.characterSet] The * EDIFACT frame setting characterSet. Possible values include: * 'NotSpecified', 'UNOB', 'UNOA', 'UNOC', 'UNOD', 'UNOE', 'UNOF', 'UNOG', * 'UNOH', 'UNOI', 'UNOJ', 'UNOK', 'UNOX', 'UNOY', 'KECA' - * @member {string} + * @property {string} * [edifact.sendAgreement.protocolSettings.framingSettings.decimalPointIndicator] * The EDIFACT frame setting decimal indicator. Possible values include: * 'NotSpecified', 'Comma', 'Decimal' - * @member {string} + * @property {string} * [edifact.sendAgreement.protocolSettings.framingSettings.segmentTerminatorSuffix] * The EDIFACT frame setting segment terminator suffix. Possible values * include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' - * @member {object} [edifact.sendAgreement.protocolSettings.envelopeSettings] - * The EDIFACT envelope settings. - * @member {string} + * @property {object} + * [edifact.sendAgreement.protocolSettings.envelopeSettings] The EDIFACT + * envelope settings. + * @property {string} * [edifact.sendAgreement.protocolSettings.envelopeSettings.groupAssociationAssignedCode] * The group association assigned code. - * @member {string} + * @property {string} * [edifact.sendAgreement.protocolSettings.envelopeSettings.communicationAgreementId] * The communication agreement id. - * @member {boolean} + * @property {boolean} * [edifact.sendAgreement.protocolSettings.envelopeSettings.applyDelimiterStringAdvice] * The value indicating whether to apply delimiter string advice. - * @member {boolean} + * @property {boolean} * [edifact.sendAgreement.protocolSettings.envelopeSettings.createGroupingSegments] * The value indicating whether to create grouping segments. - * @member {boolean} + * @property {boolean} * [edifact.sendAgreement.protocolSettings.envelopeSettings.enableDefaultGroupHeaders] * The value indicating whether to enable default group headers. - * @member {string} + * @property {string} * [edifact.sendAgreement.protocolSettings.envelopeSettings.recipientReferencePasswordValue] * The recipient reference password value. - * @member {string} + * @property {string} * [edifact.sendAgreement.protocolSettings.envelopeSettings.recipientReferencePasswordQualifier] * The recipient reference password qualifier. - * @member {string} + * @property {string} * [edifact.sendAgreement.protocolSettings.envelopeSettings.applicationReferenceId] * The application reference id. - * @member {string} + * @property {string} * [edifact.sendAgreement.protocolSettings.envelopeSettings.processingPriorityCode] * The processing priority code. - * @member {number} + * @property {number} * [edifact.sendAgreement.protocolSettings.envelopeSettings.interchangeControlNumberLowerBound] * The interchange control number lower bound. - * @member {number} + * @property {number} * [edifact.sendAgreement.protocolSettings.envelopeSettings.interchangeControlNumberUpperBound] * The interchange control number upper bound. - * @member {boolean} + * @property {boolean} * [edifact.sendAgreement.protocolSettings.envelopeSettings.rolloverInterchangeControlNumber] * The value indicating whether to rollover interchange control number. - * @member {string} + * @property {string} * [edifact.sendAgreement.protocolSettings.envelopeSettings.interchangeControlNumberPrefix] * The interchange control number prefix. - * @member {string} + * @property {string} * [edifact.sendAgreement.protocolSettings.envelopeSettings.interchangeControlNumberSuffix] * The interchange control number suffix. - * @member {string} + * @property {string} * [edifact.sendAgreement.protocolSettings.envelopeSettings.senderReverseRoutingAddress] * The sender reverse routing address. - * @member {string} + * @property {string} * [edifact.sendAgreement.protocolSettings.envelopeSettings.receiverReverseRoutingAddress] * The receiver reverse routing address. - * @member {string} + * @property {string} * [edifact.sendAgreement.protocolSettings.envelopeSettings.functionalGroupId] * The functional group id. - * @member {string} + * @property {string} * [edifact.sendAgreement.protocolSettings.envelopeSettings.groupControllingAgencyCode] * The group controlling agency code. - * @member {string} + * @property {string} * [edifact.sendAgreement.protocolSettings.envelopeSettings.groupMessageVersion] * The group message version. - * @member {string} + * @property {string} * [edifact.sendAgreement.protocolSettings.envelopeSettings.groupMessageRelease] * The group message release. - * @member {number} + * @property {number} * [edifact.sendAgreement.protocolSettings.envelopeSettings.groupControlNumberLowerBound] * The group control number lower bound. - * @member {number} + * @property {number} * [edifact.sendAgreement.protocolSettings.envelopeSettings.groupControlNumberUpperBound] * The group control number upper bound. - * @member {boolean} + * @property {boolean} * [edifact.sendAgreement.protocolSettings.envelopeSettings.rolloverGroupControlNumber] * The value indicating whether to rollover group control number. - * @member {string} + * @property {string} * [edifact.sendAgreement.protocolSettings.envelopeSettings.groupControlNumberPrefix] * The group control number prefix. - * @member {string} + * @property {string} * [edifact.sendAgreement.protocolSettings.envelopeSettings.groupControlNumberSuffix] * The group control number suffix. - * @member {string} + * @property {string} * [edifact.sendAgreement.protocolSettings.envelopeSettings.groupApplicationReceiverQualifier] * The group application receiver qualifier. - * @member {string} + * @property {string} * [edifact.sendAgreement.protocolSettings.envelopeSettings.groupApplicationReceiverId] * The group application receiver id. - * @member {string} + * @property {string} * [edifact.sendAgreement.protocolSettings.envelopeSettings.groupApplicationSenderQualifier] * The group application sender qualifier. - * @member {string} + * @property {string} * [edifact.sendAgreement.protocolSettings.envelopeSettings.groupApplicationSenderId] * The group application sender id. - * @member {string} + * @property {string} * [edifact.sendAgreement.protocolSettings.envelopeSettings.groupApplicationPassword] * The group application password. - * @member {boolean} + * @property {boolean} * [edifact.sendAgreement.protocolSettings.envelopeSettings.overwriteExistingTransactionSetControlNumber] * The value indicating whether to overwrite existing transaction set control * number. - * @member {string} + * @property {string} * [edifact.sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberPrefix] * The transaction set control number prefix. - * @member {string} + * @property {string} * [edifact.sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberSuffix] * The transaction set control number suffix. - * @member {number} + * @property {number} * [edifact.sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberLowerBound] * The transaction set control number lower bound. - * @member {number} + * @property {number} * [edifact.sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberUpperBound] * The transaction set control number upper bound. - * @member {boolean} + * @property {boolean} * [edifact.sendAgreement.protocolSettings.envelopeSettings.rolloverTransactionSetControlNumber] * The value indicating whether to rollover transaction set control number. - * @member {boolean} + * @property {boolean} * [edifact.sendAgreement.protocolSettings.envelopeSettings.isTestInterchange] * The value indicating whether the message is a test interchange. - * @member {string} + * @property {string} * [edifact.sendAgreement.protocolSettings.envelopeSettings.senderInternalIdentification] * The sender internal identification. - * @member {string} + * @property {string} * [edifact.sendAgreement.protocolSettings.envelopeSettings.senderInternalSubIdentification] * The sender internal sub identification. - * @member {string} + * @property {string} * [edifact.sendAgreement.protocolSettings.envelopeSettings.receiverInternalIdentification] * The receiver internal identification. - * @member {string} + * @property {string} * [edifact.sendAgreement.protocolSettings.envelopeSettings.receiverInternalSubIdentification] * The receiver internal sub identification. - * @member {object} + * @property {object} * [edifact.sendAgreement.protocolSettings.acknowledgementSettings] The * EDIFACT acknowledgement settings. - * @member {boolean} + * @property {boolean} * [edifact.sendAgreement.protocolSettings.acknowledgementSettings.needTechnicalAcknowledgement] * The value indicating whether technical acknowledgement is needed. - * @member {boolean} + * @property {boolean} * [edifact.sendAgreement.protocolSettings.acknowledgementSettings.batchTechnicalAcknowledgements] * The value indicating whether to batch the technical acknowledgements. - * @member {boolean} + * @property {boolean} * [edifact.sendAgreement.protocolSettings.acknowledgementSettings.needFunctionalAcknowledgement] * The value indicating whether functional acknowledgement is needed. - * @member {boolean} + * @property {boolean} * [edifact.sendAgreement.protocolSettings.acknowledgementSettings.batchFunctionalAcknowledgements] * The value indicating whether to batch functional acknowledgements. - * @member {boolean} + * @property {boolean} * [edifact.sendAgreement.protocolSettings.acknowledgementSettings.needLoopForValidMessages] * The value indicating whether a loop is needed for valid messages. - * @member {boolean} + * @property {boolean} * [edifact.sendAgreement.protocolSettings.acknowledgementSettings.sendSynchronousAcknowledgement] * The value indicating whether to send synchronous acknowledgement. - * @member {string} + * @property {string} * [edifact.sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberPrefix] * The acknowledgement control number prefix. - * @member {string} + * @property {string} * [edifact.sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberSuffix] * The acknowledgement control number suffix. - * @member {number} + * @property {number} * [edifact.sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberLowerBound] * The acknowledgement control number lower bound. - * @member {number} + * @property {number} * [edifact.sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberUpperBound] * The acknowledgement control number upper bound. - * @member {boolean} + * @property {boolean} * [edifact.sendAgreement.protocolSettings.acknowledgementSettings.rolloverAcknowledgementControlNumber] * The value indicating whether to rollover acknowledgement control number. - * @member {object} [edifact.sendAgreement.protocolSettings.messageFilter] + * @property {object} [edifact.sendAgreement.protocolSettings.messageFilter] * The EDIFACT message filter. - * @member {string} + * @property {string} * [edifact.sendAgreement.protocolSettings.messageFilter.messageFilterType] * The message filter type. Possible values include: 'NotSpecified', * 'Include', 'Exclude' - * @member {object} + * @property {object} * [edifact.sendAgreement.protocolSettings.processingSettings] The EDIFACT * processing Settings. - * @member {boolean} + * @property {boolean} * [edifact.sendAgreement.protocolSettings.processingSettings.maskSecurityInfo] * The value indicating whether to mask security information. - * @member {boolean} + * @property {boolean} * [edifact.sendAgreement.protocolSettings.processingSettings.preserveInterchange] * The value indicating whether to preserve interchange. - * @member {boolean} + * @property {boolean} * [edifact.sendAgreement.protocolSettings.processingSettings.suspendInterchangeOnError] * The value indicating whether to suspend interchange on error. - * @member {boolean} + * @property {boolean} * [edifact.sendAgreement.protocolSettings.processingSettings.createEmptyXmlTagsForTrailingSeparators] * The value indicating whether to create empty xml tags for trailing * separators. - * @member {boolean} + * @property {boolean} * [edifact.sendAgreement.protocolSettings.processingSettings.useDotAsDecimalSeparator] * The value indicating whether to use dot as decimal separator. - * @member {array} [edifact.sendAgreement.protocolSettings.envelopeOverrides] - * The EDIFACT envelope override settings. - * @member {array} [edifact.sendAgreement.protocolSettings.messageFilterList] - * The EDIFACT message filter list. - * @member {array} [edifact.sendAgreement.protocolSettings.schemaReferences] - * The EDIFACT schema references. - * @member {array} + * @property {array} + * [edifact.sendAgreement.protocolSettings.envelopeOverrides] The EDIFACT + * envelope override settings. + * @property {array} + * [edifact.sendAgreement.protocolSettings.messageFilterList] The EDIFACT + * message filter list. + * @property {array} + * [edifact.sendAgreement.protocolSettings.schemaReferences] The EDIFACT + * schema references. + * @property {array} * [edifact.sendAgreement.protocolSettings.validationOverrides] The EDIFACT * validation override settings. - * @member {array} + * @property {array} * [edifact.sendAgreement.protocolSettings.edifactDelimiterOverrides] The * EDIFACT delimiter override settings. */ diff --git a/lib/services/logicManagement/lib/models/artifactContentPropertiesDefinition.js b/lib/services/logicManagement/lib/models/artifactContentPropertiesDefinition.js index fdbf96fb93..daddb9f7ed 100644 --- a/lib/services/logicManagement/lib/models/artifactContentPropertiesDefinition.js +++ b/lib/services/logicManagement/lib/models/artifactContentPropertiesDefinition.js @@ -20,18 +20,18 @@ const models = require('./index'); class ArtifactContentPropertiesDefinition extends models['ArtifactProperties'] { /** * Create a ArtifactContentPropertiesDefinition. - * @member {object} [content] - * @member {string} [contentType] The content type. - * @member {object} [contentLink] The content link. - * @member {string} [contentLink.uri] The content link URI. - * @member {string} [contentLink.contentVersion] The content version. - * @member {number} [contentLink.contentSize] The content size. - * @member {object} [contentLink.contentHash] The content hash. - * @member {string} [contentLink.contentHash.algorithm] The algorithm of the + * @property {object} [content] + * @property {string} [contentType] The content type. + * @property {object} [contentLink] The content link. + * @property {string} [contentLink.uri] The content link URI. + * @property {string} [contentLink.contentVersion] The content version. + * @property {number} [contentLink.contentSize] The content size. + * @property {object} [contentLink.contentHash] The content hash. + * @property {string} [contentLink.contentHash.algorithm] The algorithm of + * the content hash. + * @property {string} [contentLink.contentHash.value] The value of the * content hash. - * @member {string} [contentLink.contentHash.value] The value of the content - * hash. - * @member {object} [contentLink.metadata] The metadata. + * @property {object} [contentLink.metadata] The metadata. */ constructor() { super(); diff --git a/lib/services/logicManagement/lib/models/artifactProperties.js b/lib/services/logicManagement/lib/models/artifactProperties.js index 9470a5c55d..ff7afeea72 100644 --- a/lib/services/logicManagement/lib/models/artifactProperties.js +++ b/lib/services/logicManagement/lib/models/artifactProperties.js @@ -17,9 +17,9 @@ class ArtifactProperties { /** * Create a ArtifactProperties. - * @member {date} [createdTime] The artifact creation time. - * @member {date} [changedTime] The artifact changed time. - * @member {object} [metadata] + * @property {date} [createdTime] The artifact creation time. + * @property {date} [changedTime] The artifact changed time. + * @property {object} [metadata] */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/assemblyDefinition.js b/lib/services/logicManagement/lib/models/assemblyDefinition.js index 28774b9f64..60f3227903 100644 --- a/lib/services/logicManagement/lib/models/assemblyDefinition.js +++ b/lib/services/logicManagement/lib/models/assemblyDefinition.js @@ -20,11 +20,11 @@ const models = require('./index'); class AssemblyDefinition extends models['Resource'] { /** * Create a AssemblyDefinition. - * @member {object} properties The assembly properties. - * @member {string} [properties.assemblyName] The assembly name. - * @member {string} [properties.assemblyVersion] The assembly version. - * @member {string} [properties.assemblyCulture] The assembly culture. - * @member {string} [properties.assemblyPublicKeyToken] The assembly public + * @property {object} properties The assembly properties. + * @property {string} [properties.assemblyName] The assembly name. + * @property {string} [properties.assemblyVersion] The assembly version. + * @property {string} [properties.assemblyCulture] The assembly culture. + * @property {string} [properties.assemblyPublicKeyToken] The assembly public * key token. */ constructor() { diff --git a/lib/services/logicManagement/lib/models/assemblyProperties.js b/lib/services/logicManagement/lib/models/assemblyProperties.js index 96a0c07445..8fda4f7ea9 100644 --- a/lib/services/logicManagement/lib/models/assemblyProperties.js +++ b/lib/services/logicManagement/lib/models/assemblyProperties.js @@ -20,10 +20,10 @@ const models = require('./index'); class AssemblyProperties extends models['ArtifactContentPropertiesDefinition'] { /** * Create a AssemblyProperties. - * @member {string} assemblyName The assembly name. - * @member {string} [assemblyVersion] The assembly version. - * @member {string} [assemblyCulture] The assembly culture. - * @member {string} [assemblyPublicKeyToken] The assembly public key token. + * @property {string} assemblyName The assembly name. + * @property {string} [assemblyVersion] The assembly version. + * @property {string} [assemblyCulture] The assembly culture. + * @property {string} [assemblyPublicKeyToken] The assembly public key token. */ constructor() { super(); diff --git a/lib/services/logicManagement/lib/models/azureResourceErrorInfo.js b/lib/services/logicManagement/lib/models/azureResourceErrorInfo.js index eec422d28f..6e22b508ad 100644 --- a/lib/services/logicManagement/lib/models/azureResourceErrorInfo.js +++ b/lib/services/logicManagement/lib/models/azureResourceErrorInfo.js @@ -20,8 +20,8 @@ const models = require('./index'); class AzureResourceErrorInfo extends models['ErrorInfo'] { /** * Create a AzureResourceErrorInfo. - * @member {string} message The error message. - * @member {array} [details] The error details. + * @property {string} message The error message. + * @property {array} [details] The error details. */ constructor() { super(); diff --git a/lib/services/logicManagement/lib/models/b2BPartnerContent.js b/lib/services/logicManagement/lib/models/b2BPartnerContent.js index 96712a3a03..719e6a9814 100644 --- a/lib/services/logicManagement/lib/models/b2BPartnerContent.js +++ b/lib/services/logicManagement/lib/models/b2BPartnerContent.js @@ -17,7 +17,7 @@ class B2BPartnerContent { /** * Create a B2BPartnerContent. - * @member {array} [businessIdentities] The list of partner business + * @property {array} [businessIdentities] The list of partner business * identities. */ constructor() { diff --git a/lib/services/logicManagement/lib/models/batchConfiguration.js b/lib/services/logicManagement/lib/models/batchConfiguration.js index 94496ca543..4af868571a 100644 --- a/lib/services/logicManagement/lib/models/batchConfiguration.js +++ b/lib/services/logicManagement/lib/models/batchConfiguration.js @@ -20,36 +20,39 @@ const models = require('./index'); class BatchConfiguration extends models['Resource'] { /** * Create a BatchConfiguration. - * @member {object} properties The batch configuration properties. - * @member {string} [properties.batchGroupName] The name of the batch group. - * @member {object} [properties.releaseCriteria] The batch release criteria. - * @member {number} [properties.releaseCriteria.messageCount] The message + * @property {object} properties The batch configuration properties. + * @property {string} [properties.batchGroupName] The name of the batch + * group. + * @property {object} [properties.releaseCriteria] The batch release + * criteria. + * @property {number} [properties.releaseCriteria.messageCount] The message * count. - * @member {number} [properties.releaseCriteria.batchSize] The batch size in - * bytes. - * @member {object} [properties.releaseCriteria.recurrence] The recurrence. - * @member {string} [properties.releaseCriteria.recurrence.frequency] The + * @property {number} [properties.releaseCriteria.batchSize] The batch size + * in bytes. + * @property {object} [properties.releaseCriteria.recurrence] The recurrence. + * @property {string} [properties.releaseCriteria.recurrence.frequency] The * frequency. Possible values include: 'NotSpecified', 'Second', 'Minute', * 'Hour', 'Day', 'Week', 'Month', 'Year' - * @member {number} [properties.releaseCriteria.recurrence.interval] The + * @property {number} [properties.releaseCriteria.recurrence.interval] The * interval. - * @member {string} [properties.releaseCriteria.recurrence.startTime] The + * @property {string} [properties.releaseCriteria.recurrence.startTime] The * start time. - * @member {string} [properties.releaseCriteria.recurrence.endTime] The end + * @property {string} [properties.releaseCriteria.recurrence.endTime] The end * time. - * @member {string} [properties.releaseCriteria.recurrence.timeZone] The time - * zone. - * @member {object} [properties.releaseCriteria.recurrence.schedule] The + * @property {string} [properties.releaseCriteria.recurrence.timeZone] The + * time zone. + * @property {object} [properties.releaseCriteria.recurrence.schedule] The * recurrence schedule. - * @member {array} [properties.releaseCriteria.recurrence.schedule.minutes] + * @property {array} [properties.releaseCriteria.recurrence.schedule.minutes] * The minutes. - * @member {array} [properties.releaseCriteria.recurrence.schedule.hours] The - * hours. - * @member {array} [properties.releaseCriteria.recurrence.schedule.weekDays] - * The days of the week. - * @member {array} [properties.releaseCriteria.recurrence.schedule.monthDays] - * The month days. - * @member {array} + * @property {array} [properties.releaseCriteria.recurrence.schedule.hours] + * The hours. + * @property {array} + * [properties.releaseCriteria.recurrence.schedule.weekDays] The days of the + * week. + * @property {array} + * [properties.releaseCriteria.recurrence.schedule.monthDays] The month days. + * @property {array} * [properties.releaseCriteria.recurrence.schedule.monthlyOccurrences] The * monthly occurrences. */ diff --git a/lib/services/logicManagement/lib/models/batchConfigurationProperties.js b/lib/services/logicManagement/lib/models/batchConfigurationProperties.js index 293bf38ca1..de474fd5a4 100644 --- a/lib/services/logicManagement/lib/models/batchConfigurationProperties.js +++ b/lib/services/logicManagement/lib/models/batchConfigurationProperties.js @@ -20,27 +20,28 @@ const models = require('./index'); class BatchConfigurationProperties extends models['ArtifactProperties'] { /** * Create a BatchConfigurationProperties. - * @member {string} batchGroupName The name of the batch group. - * @member {object} releaseCriteria The batch release criteria. - * @member {number} [releaseCriteria.messageCount] The message count. - * @member {number} [releaseCriteria.batchSize] The batch size in bytes. - * @member {object} [releaseCriteria.recurrence] The recurrence. - * @member {string} [releaseCriteria.recurrence.frequency] The frequency. + * @property {string} batchGroupName The name of the batch group. + * @property {object} releaseCriteria The batch release criteria. + * @property {number} [releaseCriteria.messageCount] The message count. + * @property {number} [releaseCriteria.batchSize] The batch size in bytes. + * @property {object} [releaseCriteria.recurrence] The recurrence. + * @property {string} [releaseCriteria.recurrence.frequency] The frequency. * Possible values include: 'NotSpecified', 'Second', 'Minute', 'Hour', * 'Day', 'Week', 'Month', 'Year' - * @member {number} [releaseCriteria.recurrence.interval] The interval. - * @member {string} [releaseCriteria.recurrence.startTime] The start time. - * @member {string} [releaseCriteria.recurrence.endTime] The end time. - * @member {string} [releaseCriteria.recurrence.timeZone] The time zone. - * @member {object} [releaseCriteria.recurrence.schedule] The recurrence + * @property {number} [releaseCriteria.recurrence.interval] The interval. + * @property {string} [releaseCriteria.recurrence.startTime] The start time. + * @property {string} [releaseCriteria.recurrence.endTime] The end time. + * @property {string} [releaseCriteria.recurrence.timeZone] The time zone. + * @property {object} [releaseCriteria.recurrence.schedule] The recurrence * schedule. - * @member {array} [releaseCriteria.recurrence.schedule.minutes] The minutes. - * @member {array} [releaseCriteria.recurrence.schedule.hours] The hours. - * @member {array} [releaseCriteria.recurrence.schedule.weekDays] The days of - * the week. - * @member {array} [releaseCriteria.recurrence.schedule.monthDays] The month - * days. - * @member {array} [releaseCriteria.recurrence.schedule.monthlyOccurrences] + * @property {array} [releaseCriteria.recurrence.schedule.minutes] The + * minutes. + * @property {array} [releaseCriteria.recurrence.schedule.hours] The hours. + * @property {array} [releaseCriteria.recurrence.schedule.weekDays] The days + * of the week. + * @property {array} [releaseCriteria.recurrence.schedule.monthDays] The + * month days. + * @property {array} [releaseCriteria.recurrence.schedule.monthlyOccurrences] * The monthly occurrences. */ constructor() { diff --git a/lib/services/logicManagement/lib/models/batchReleaseCriteria.js b/lib/services/logicManagement/lib/models/batchReleaseCriteria.js index d6a56c1b02..baace77008 100644 --- a/lib/services/logicManagement/lib/models/batchReleaseCriteria.js +++ b/lib/services/logicManagement/lib/models/batchReleaseCriteria.js @@ -17,22 +17,22 @@ class BatchReleaseCriteria { /** * Create a BatchReleaseCriteria. - * @member {number} [messageCount] The message count. - * @member {number} [batchSize] The batch size in bytes. - * @member {object} [recurrence] The recurrence. - * @member {string} [recurrence.frequency] The frequency. Possible values + * @property {number} [messageCount] The message count. + * @property {number} [batchSize] The batch size in bytes. + * @property {object} [recurrence] The recurrence. + * @property {string} [recurrence.frequency] The frequency. Possible values * include: 'NotSpecified', 'Second', 'Minute', 'Hour', 'Day', 'Week', * 'Month', 'Year' - * @member {number} [recurrence.interval] The interval. - * @member {string} [recurrence.startTime] The start time. - * @member {string} [recurrence.endTime] The end time. - * @member {string} [recurrence.timeZone] The time zone. - * @member {object} [recurrence.schedule] The recurrence schedule. - * @member {array} [recurrence.schedule.minutes] The minutes. - * @member {array} [recurrence.schedule.hours] The hours. - * @member {array} [recurrence.schedule.weekDays] The days of the week. - * @member {array} [recurrence.schedule.monthDays] The month days. - * @member {array} [recurrence.schedule.monthlyOccurrences] The monthly + * @property {number} [recurrence.interval] The interval. + * @property {string} [recurrence.startTime] The start time. + * @property {string} [recurrence.endTime] The end time. + * @property {string} [recurrence.timeZone] The time zone. + * @property {object} [recurrence.schedule] The recurrence schedule. + * @property {array} [recurrence.schedule.minutes] The minutes. + * @property {array} [recurrence.schedule.hours] The hours. + * @property {array} [recurrence.schedule.weekDays] The days of the week. + * @property {array} [recurrence.schedule.monthDays] The month days. + * @property {array} [recurrence.schedule.monthlyOccurrences] The monthly * occurrences. */ constructor() { diff --git a/lib/services/logicManagement/lib/models/businessIdentity.js b/lib/services/logicManagement/lib/models/businessIdentity.js index 71bb71a661..225a1aed0f 100644 --- a/lib/services/logicManagement/lib/models/businessIdentity.js +++ b/lib/services/logicManagement/lib/models/businessIdentity.js @@ -17,9 +17,9 @@ class BusinessIdentity { /** * Create a BusinessIdentity. - * @member {string} qualifier The business identity qualifier e.g. + * @property {string} qualifier The business identity qualifier e.g. * as2identity, ZZ, ZZZ, 31, 32 - * @member {string} value The user defined business identity value. + * @property {string} value The user defined business identity value. */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/callbackUrl.js b/lib/services/logicManagement/lib/models/callbackUrl.js index 110e59caa5..59985815d3 100644 --- a/lib/services/logicManagement/lib/models/callbackUrl.js +++ b/lib/services/logicManagement/lib/models/callbackUrl.js @@ -17,7 +17,7 @@ class CallbackUrl { /** * Create a CallbackUrl. - * @member {string} [value] The URL value. + * @property {string} [value] The URL value. */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/contentHash.js b/lib/services/logicManagement/lib/models/contentHash.js index 128f3038b0..b5d25a36a5 100644 --- a/lib/services/logicManagement/lib/models/contentHash.js +++ b/lib/services/logicManagement/lib/models/contentHash.js @@ -17,8 +17,8 @@ class ContentHash { /** * Create a ContentHash. - * @member {string} [algorithm] The algorithm of the content hash. - * @member {string} [value] The value of the content hash. + * @property {string} [algorithm] The algorithm of the content hash. + * @property {string} [value] The value of the content hash. */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/contentLink.js b/lib/services/logicManagement/lib/models/contentLink.js index 2e2b5246a3..f39ea43a37 100644 --- a/lib/services/logicManagement/lib/models/contentLink.js +++ b/lib/services/logicManagement/lib/models/contentLink.js @@ -17,14 +17,14 @@ class ContentLink { /** * Create a ContentLink. - * @member {string} [uri] The content link URI. - * @member {string} [contentVersion] The content version. - * @member {number} [contentSize] The content size. - * @member {object} [contentHash] The content hash. - * @member {string} [contentHash.algorithm] The algorithm of the content + * @property {string} [uri] The content link URI. + * @property {string} [contentVersion] The content version. + * @property {number} [contentSize] The content size. + * @property {object} [contentHash] The content hash. + * @property {string} [contentHash.algorithm] The algorithm of the content * hash. - * @member {string} [contentHash.value] The value of the content hash. - * @member {object} [metadata] The metadata. + * @property {string} [contentHash.value] The value of the content hash. + * @property {object} [metadata] The metadata. */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/correlation.js b/lib/services/logicManagement/lib/models/correlation.js index f4f788b804..e118dbf798 100644 --- a/lib/services/logicManagement/lib/models/correlation.js +++ b/lib/services/logicManagement/lib/models/correlation.js @@ -17,7 +17,7 @@ class Correlation { /** * Create a Correlation. - * @member {string} [clientTrackingId] The client tracking id. + * @property {string} [clientTrackingId] The client tracking id. */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/edifactAcknowledgementSettings.js b/lib/services/logicManagement/lib/models/edifactAcknowledgementSettings.js index 904f9906b8..9d8c29144c 100644 --- a/lib/services/logicManagement/lib/models/edifactAcknowledgementSettings.js +++ b/lib/services/logicManagement/lib/models/edifactAcknowledgementSettings.js @@ -17,27 +17,27 @@ class EdifactAcknowledgementSettings { /** * Create a EdifactAcknowledgementSettings. - * @member {boolean} needTechnicalAcknowledgement The value indicating + * @property {boolean} needTechnicalAcknowledgement The value indicating * whether technical acknowledgement is needed. - * @member {boolean} batchTechnicalAcknowledgements The value indicating + * @property {boolean} batchTechnicalAcknowledgements The value indicating * whether to batch the technical acknowledgements. - * @member {boolean} needFunctionalAcknowledgement The value indicating + * @property {boolean} needFunctionalAcknowledgement The value indicating * whether functional acknowledgement is needed. - * @member {boolean} batchFunctionalAcknowledgements The value indicating + * @property {boolean} batchFunctionalAcknowledgements The value indicating * whether to batch functional acknowledgements. - * @member {boolean} needLoopForValidMessages The value indicating whether a - * loop is needed for valid messages. - * @member {boolean} sendSynchronousAcknowledgement The value indicating + * @property {boolean} needLoopForValidMessages The value indicating whether + * a loop is needed for valid messages. + * @property {boolean} sendSynchronousAcknowledgement The value indicating * whether to send synchronous acknowledgement. - * @member {string} [acknowledgementControlNumberPrefix] The acknowledgement - * control number prefix. - * @member {string} [acknowledgementControlNumberSuffix] The acknowledgement - * control number suffix. - * @member {number} acknowledgementControlNumberLowerBound The + * @property {string} [acknowledgementControlNumberPrefix] The + * acknowledgement control number prefix. + * @property {string} [acknowledgementControlNumberSuffix] The + * acknowledgement control number suffix. + * @property {number} acknowledgementControlNumberLowerBound The * acknowledgement control number lower bound. - * @member {number} acknowledgementControlNumberUpperBound The + * @property {number} acknowledgementControlNumberUpperBound The * acknowledgement control number upper bound. - * @member {boolean} rolloverAcknowledgementControlNumber The value + * @property {boolean} rolloverAcknowledgementControlNumber The value * indicating whether to rollover acknowledgement control number. */ constructor() { diff --git a/lib/services/logicManagement/lib/models/edifactAgreementContent.js b/lib/services/logicManagement/lib/models/edifactAgreementContent.js index d5bf566457..1d2377db06 100644 --- a/lib/services/logicManagement/lib/models/edifactAgreementContent.js +++ b/lib/services/logicManagement/lib/models/edifactAgreementContent.js @@ -17,580 +17,582 @@ class EdifactAgreementContent { /** * Create a EdifactAgreementContent. - * @member {object} receiveAgreement The EDIFACT one-way receive agreement. - * @member {object} [receiveAgreement.senderBusinessIdentity] The sender + * @property {object} receiveAgreement The EDIFACT one-way receive agreement. + * @property {object} [receiveAgreement.senderBusinessIdentity] The sender * business identity - * @member {string} [receiveAgreement.senderBusinessIdentity.qualifier] The + * @property {string} [receiveAgreement.senderBusinessIdentity.qualifier] The * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [receiveAgreement.senderBusinessIdentity.value] The user - * defined business identity value. - * @member {object} [receiveAgreement.receiverBusinessIdentity] The receiver - * business identity - * @member {string} [receiveAgreement.receiverBusinessIdentity.qualifier] The - * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [receiveAgreement.receiverBusinessIdentity.value] The + * @property {string} [receiveAgreement.senderBusinessIdentity.value] The * user defined business identity value. - * @member {object} [receiveAgreement.protocolSettings] The EDIFACT protocol - * settings. - * @member {object} [receiveAgreement.protocolSettings.validationSettings] + * @property {object} [receiveAgreement.receiverBusinessIdentity] The + * receiver business identity + * @property {string} [receiveAgreement.receiverBusinessIdentity.qualifier] + * The business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 + * @property {string} [receiveAgreement.receiverBusinessIdentity.value] The + * user defined business identity value. + * @property {object} [receiveAgreement.protocolSettings] The EDIFACT + * protocol settings. + * @property {object} [receiveAgreement.protocolSettings.validationSettings] * The EDIFACT validation settings. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.validationSettings.validateCharacterSet] * The value indicating whether to validate character set in the message. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.validationSettings.checkDuplicateInterchangeControlNumber] * The value indicating whether to check for duplicate interchange control * number. - * @member {number} + * @property {number} * [receiveAgreement.protocolSettings.validationSettings.interchangeControlNumberValidityDays] * The validity period of interchange control number. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.validationSettings.checkDuplicateGroupControlNumber] * The value indicating whether to check for duplicate group control number. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.validationSettings.checkDuplicateTransactionSetControlNumber] * The value indicating whether to check for duplicate transaction set * control number. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.validationSettings.validateEdiTypes] * The value indicating whether to Whether to validate EDI types. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.validationSettings.validateXsdTypes] * The value indicating whether to Whether to validate XSD types. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.validationSettings.allowLeadingAndTrailingSpacesAndZeroes] * The value indicating whether to allow leading and trailing spaces and * zeroes. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.validationSettings.trimLeadingAndTrailingSpacesAndZeroes] * The value indicating whether to trim leading and trailing spaces and * zeroes. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.validationSettings.trailingSeparatorPolicy] * The trailing separator policy. Possible values include: 'NotSpecified', * 'NotAllowed', 'Optional', 'Mandatory' - * @member {object} [receiveAgreement.protocolSettings.framingSettings] The + * @property {object} [receiveAgreement.protocolSettings.framingSettings] The * EDIFACT framing settings. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.framingSettings.serviceCodeListDirectoryVersion] * The service code list directory version. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.framingSettings.characterEncoding] The * character encoding. - * @member {number} + * @property {number} * [receiveAgreement.protocolSettings.framingSettings.protocolVersion] The * protocol version. - * @member {number} + * @property {number} * [receiveAgreement.protocolSettings.framingSettings.dataElementSeparator] * The data element separator. - * @member {number} + * @property {number} * [receiveAgreement.protocolSettings.framingSettings.componentSeparator] The * component separator. - * @member {number} + * @property {number} * [receiveAgreement.protocolSettings.framingSettings.segmentTerminator] The * segment terminator. - * @member {number} + * @property {number} * [receiveAgreement.protocolSettings.framingSettings.releaseIndicator] The * release indicator. - * @member {number} + * @property {number} * [receiveAgreement.protocolSettings.framingSettings.repetitionSeparator] * The repetition separator. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.framingSettings.characterSet] The * EDIFACT frame setting characterSet. Possible values include: * 'NotSpecified', 'UNOB', 'UNOA', 'UNOC', 'UNOD', 'UNOE', 'UNOF', 'UNOG', * 'UNOH', 'UNOI', 'UNOJ', 'UNOK', 'UNOX', 'UNOY', 'KECA' - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.framingSettings.decimalPointIndicator] * The EDIFACT frame setting decimal indicator. Possible values include: * 'NotSpecified', 'Comma', 'Decimal' - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.framingSettings.segmentTerminatorSuffix] * The EDIFACT frame setting segment terminator suffix. Possible values * include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' - * @member {object} [receiveAgreement.protocolSettings.envelopeSettings] The - * EDIFACT envelope settings. - * @member {string} + * @property {object} [receiveAgreement.protocolSettings.envelopeSettings] + * The EDIFACT envelope settings. + * @property {string} * [receiveAgreement.protocolSettings.envelopeSettings.groupAssociationAssignedCode] * The group association assigned code. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.envelopeSettings.communicationAgreementId] * The communication agreement id. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.envelopeSettings.applyDelimiterStringAdvice] * The value indicating whether to apply delimiter string advice. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.envelopeSettings.createGroupingSegments] * The value indicating whether to create grouping segments. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.envelopeSettings.enableDefaultGroupHeaders] * The value indicating whether to enable default group headers. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.envelopeSettings.recipientReferencePasswordValue] * The recipient reference password value. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.envelopeSettings.recipientReferencePasswordQualifier] * The recipient reference password qualifier. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.envelopeSettings.applicationReferenceId] * The application reference id. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.envelopeSettings.processingPriorityCode] * The processing priority code. - * @member {number} + * @property {number} * [receiveAgreement.protocolSettings.envelopeSettings.interchangeControlNumberLowerBound] * The interchange control number lower bound. - * @member {number} + * @property {number} * [receiveAgreement.protocolSettings.envelopeSettings.interchangeControlNumberUpperBound] * The interchange control number upper bound. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.envelopeSettings.rolloverInterchangeControlNumber] * The value indicating whether to rollover interchange control number. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.envelopeSettings.interchangeControlNumberPrefix] * The interchange control number prefix. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.envelopeSettings.interchangeControlNumberSuffix] * The interchange control number suffix. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.envelopeSettings.senderReverseRoutingAddress] * The sender reverse routing address. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.envelopeSettings.receiverReverseRoutingAddress] * The receiver reverse routing address. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.envelopeSettings.functionalGroupId] The * functional group id. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.envelopeSettings.groupControllingAgencyCode] * The group controlling agency code. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.envelopeSettings.groupMessageVersion] * The group message version. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.envelopeSettings.groupMessageRelease] * The group message release. - * @member {number} + * @property {number} * [receiveAgreement.protocolSettings.envelopeSettings.groupControlNumberLowerBound] * The group control number lower bound. - * @member {number} + * @property {number} * [receiveAgreement.protocolSettings.envelopeSettings.groupControlNumberUpperBound] * The group control number upper bound. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.envelopeSettings.rolloverGroupControlNumber] * The value indicating whether to rollover group control number. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.envelopeSettings.groupControlNumberPrefix] * The group control number prefix. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.envelopeSettings.groupControlNumberSuffix] * The group control number suffix. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.envelopeSettings.groupApplicationReceiverQualifier] * The group application receiver qualifier. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.envelopeSettings.groupApplicationReceiverId] * The group application receiver id. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.envelopeSettings.groupApplicationSenderQualifier] * The group application sender qualifier. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.envelopeSettings.groupApplicationSenderId] * The group application sender id. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.envelopeSettings.groupApplicationPassword] * The group application password. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.envelopeSettings.overwriteExistingTransactionSetControlNumber] * The value indicating whether to overwrite existing transaction set control * number. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberPrefix] * The transaction set control number prefix. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberSuffix] * The transaction set control number suffix. - * @member {number} + * @property {number} * [receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberLowerBound] * The transaction set control number lower bound. - * @member {number} + * @property {number} * [receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberUpperBound] * The transaction set control number upper bound. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.envelopeSettings.rolloverTransactionSetControlNumber] * The value indicating whether to rollover transaction set control number. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.envelopeSettings.isTestInterchange] The * value indicating whether the message is a test interchange. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.envelopeSettings.senderInternalIdentification] * The sender internal identification. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.envelopeSettings.senderInternalSubIdentification] * The sender internal sub identification. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.envelopeSettings.receiverInternalIdentification] * The receiver internal identification. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.envelopeSettings.receiverInternalSubIdentification] * The receiver internal sub identification. - * @member {object} + * @property {object} * [receiveAgreement.protocolSettings.acknowledgementSettings] The EDIFACT * acknowledgement settings. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.acknowledgementSettings.needTechnicalAcknowledgement] * The value indicating whether technical acknowledgement is needed. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.acknowledgementSettings.batchTechnicalAcknowledgements] * The value indicating whether to batch the technical acknowledgements. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.acknowledgementSettings.needFunctionalAcknowledgement] * The value indicating whether functional acknowledgement is needed. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.acknowledgementSettings.batchFunctionalAcknowledgements] * The value indicating whether to batch functional acknowledgements. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.acknowledgementSettings.needLoopForValidMessages] * The value indicating whether a loop is needed for valid messages. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.acknowledgementSettings.sendSynchronousAcknowledgement] * The value indicating whether to send synchronous acknowledgement. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberPrefix] * The acknowledgement control number prefix. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberSuffix] * The acknowledgement control number suffix. - * @member {number} + * @property {number} * [receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberLowerBound] * The acknowledgement control number lower bound. - * @member {number} + * @property {number} * [receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberUpperBound] * The acknowledgement control number upper bound. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.acknowledgementSettings.rolloverAcknowledgementControlNumber] * The value indicating whether to rollover acknowledgement control number. - * @member {object} [receiveAgreement.protocolSettings.messageFilter] The + * @property {object} [receiveAgreement.protocolSettings.messageFilter] The * EDIFACT message filter. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.messageFilter.messageFilterType] The * message filter type. Possible values include: 'NotSpecified', 'Include', * 'Exclude' - * @member {object} [receiveAgreement.protocolSettings.processingSettings] + * @property {object} [receiveAgreement.protocolSettings.processingSettings] * The EDIFACT processing Settings. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.processingSettings.maskSecurityInfo] * The value indicating whether to mask security information. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.processingSettings.preserveInterchange] * The value indicating whether to preserve interchange. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.processingSettings.suspendInterchangeOnError] * The value indicating whether to suspend interchange on error. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.processingSettings.createEmptyXmlTagsForTrailingSeparators] * The value indicating whether to create empty xml tags for trailing * separators. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.processingSettings.useDotAsDecimalSeparator] * The value indicating whether to use dot as decimal separator. - * @member {array} [receiveAgreement.protocolSettings.envelopeOverrides] The - * EDIFACT envelope override settings. - * @member {array} [receiveAgreement.protocolSettings.messageFilterList] The - * EDIFACT message filter list. - * @member {array} [receiveAgreement.protocolSettings.schemaReferences] The + * @property {array} [receiveAgreement.protocolSettings.envelopeOverrides] + * The EDIFACT envelope override settings. + * @property {array} [receiveAgreement.protocolSettings.messageFilterList] + * The EDIFACT message filter list. + * @property {array} [receiveAgreement.protocolSettings.schemaReferences] The * EDIFACT schema references. - * @member {array} [receiveAgreement.protocolSettings.validationOverrides] + * @property {array} [receiveAgreement.protocolSettings.validationOverrides] * The EDIFACT validation override settings. - * @member {array} + * @property {array} * [receiveAgreement.protocolSettings.edifactDelimiterOverrides] The EDIFACT * delimiter override settings. - * @member {object} sendAgreement The EDIFACT one-way send agreement. - * @member {object} [sendAgreement.senderBusinessIdentity] The sender + * @property {object} sendAgreement The EDIFACT one-way send agreement. + * @property {object} [sendAgreement.senderBusinessIdentity] The sender * business identity - * @member {string} [sendAgreement.senderBusinessIdentity.qualifier] The + * @property {string} [sendAgreement.senderBusinessIdentity.qualifier] The * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [sendAgreement.senderBusinessIdentity.value] The user + * @property {string} [sendAgreement.senderBusinessIdentity.value] The user * defined business identity value. - * @member {object} [sendAgreement.receiverBusinessIdentity] The receiver + * @property {object} [sendAgreement.receiverBusinessIdentity] The receiver * business identity - * @member {string} [sendAgreement.receiverBusinessIdentity.qualifier] The + * @property {string} [sendAgreement.receiverBusinessIdentity.qualifier] The * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [sendAgreement.receiverBusinessIdentity.value] The user + * @property {string} [sendAgreement.receiverBusinessIdentity.value] The user * defined business identity value. - * @member {object} [sendAgreement.protocolSettings] The EDIFACT protocol + * @property {object} [sendAgreement.protocolSettings] The EDIFACT protocol * settings. - * @member {object} [sendAgreement.protocolSettings.validationSettings] The + * @property {object} [sendAgreement.protocolSettings.validationSettings] The * EDIFACT validation settings. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.validationSettings.validateCharacterSet] * The value indicating whether to validate character set in the message. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.validationSettings.checkDuplicateInterchangeControlNumber] * The value indicating whether to check for duplicate interchange control * number. - * @member {number} + * @property {number} * [sendAgreement.protocolSettings.validationSettings.interchangeControlNumberValidityDays] * The validity period of interchange control number. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.validationSettings.checkDuplicateGroupControlNumber] * The value indicating whether to check for duplicate group control number. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.validationSettings.checkDuplicateTransactionSetControlNumber] * The value indicating whether to check for duplicate transaction set * control number. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.validationSettings.validateEdiTypes] The * value indicating whether to Whether to validate EDI types. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.validationSettings.validateXsdTypes] The * value indicating whether to Whether to validate XSD types. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.validationSettings.allowLeadingAndTrailingSpacesAndZeroes] * The value indicating whether to allow leading and trailing spaces and * zeroes. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.validationSettings.trimLeadingAndTrailingSpacesAndZeroes] * The value indicating whether to trim leading and trailing spaces and * zeroes. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.validationSettings.trailingSeparatorPolicy] * The trailing separator policy. Possible values include: 'NotSpecified', * 'NotAllowed', 'Optional', 'Mandatory' - * @member {object} [sendAgreement.protocolSettings.framingSettings] The + * @property {object} [sendAgreement.protocolSettings.framingSettings] The * EDIFACT framing settings. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.framingSettings.serviceCodeListDirectoryVersion] * The service code list directory version. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.framingSettings.characterEncoding] The * character encoding. - * @member {number} + * @property {number} * [sendAgreement.protocolSettings.framingSettings.protocolVersion] The * protocol version. - * @member {number} + * @property {number} * [sendAgreement.protocolSettings.framingSettings.dataElementSeparator] The * data element separator. - * @member {number} + * @property {number} * [sendAgreement.protocolSettings.framingSettings.componentSeparator] The * component separator. - * @member {number} + * @property {number} * [sendAgreement.protocolSettings.framingSettings.segmentTerminator] The * segment terminator. - * @member {number} + * @property {number} * [sendAgreement.protocolSettings.framingSettings.releaseIndicator] The * release indicator. - * @member {number} + * @property {number} * [sendAgreement.protocolSettings.framingSettings.repetitionSeparator] The * repetition separator. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.framingSettings.characterSet] The EDIFACT * frame setting characterSet. Possible values include: 'NotSpecified', * 'UNOB', 'UNOA', 'UNOC', 'UNOD', 'UNOE', 'UNOF', 'UNOG', 'UNOH', 'UNOI', * 'UNOJ', 'UNOK', 'UNOX', 'UNOY', 'KECA' - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.framingSettings.decimalPointIndicator] The * EDIFACT frame setting decimal indicator. Possible values include: * 'NotSpecified', 'Comma', 'Decimal' - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.framingSettings.segmentTerminatorSuffix] * The EDIFACT frame setting segment terminator suffix. Possible values * include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' - * @member {object} [sendAgreement.protocolSettings.envelopeSettings] The + * @property {object} [sendAgreement.protocolSettings.envelopeSettings] The * EDIFACT envelope settings. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.envelopeSettings.groupAssociationAssignedCode] * The group association assigned code. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.envelopeSettings.communicationAgreementId] * The communication agreement id. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.envelopeSettings.applyDelimiterStringAdvice] * The value indicating whether to apply delimiter string advice. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.envelopeSettings.createGroupingSegments] * The value indicating whether to create grouping segments. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.envelopeSettings.enableDefaultGroupHeaders] * The value indicating whether to enable default group headers. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.envelopeSettings.recipientReferencePasswordValue] * The recipient reference password value. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.envelopeSettings.recipientReferencePasswordQualifier] * The recipient reference password qualifier. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.envelopeSettings.applicationReferenceId] * The application reference id. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.envelopeSettings.processingPriorityCode] * The processing priority code. - * @member {number} + * @property {number} * [sendAgreement.protocolSettings.envelopeSettings.interchangeControlNumberLowerBound] * The interchange control number lower bound. - * @member {number} + * @property {number} * [sendAgreement.protocolSettings.envelopeSettings.interchangeControlNumberUpperBound] * The interchange control number upper bound. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.envelopeSettings.rolloverInterchangeControlNumber] * The value indicating whether to rollover interchange control number. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.envelopeSettings.interchangeControlNumberPrefix] * The interchange control number prefix. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.envelopeSettings.interchangeControlNumberSuffix] * The interchange control number suffix. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.envelopeSettings.senderReverseRoutingAddress] * The sender reverse routing address. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.envelopeSettings.receiverReverseRoutingAddress] * The receiver reverse routing address. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.envelopeSettings.functionalGroupId] The * functional group id. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.envelopeSettings.groupControllingAgencyCode] * The group controlling agency code. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.envelopeSettings.groupMessageVersion] The * group message version. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.envelopeSettings.groupMessageRelease] The * group message release. - * @member {number} + * @property {number} * [sendAgreement.protocolSettings.envelopeSettings.groupControlNumberLowerBound] * The group control number lower bound. - * @member {number} + * @property {number} * [sendAgreement.protocolSettings.envelopeSettings.groupControlNumberUpperBound] * The group control number upper bound. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.envelopeSettings.rolloverGroupControlNumber] * The value indicating whether to rollover group control number. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.envelopeSettings.groupControlNumberPrefix] * The group control number prefix. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.envelopeSettings.groupControlNumberSuffix] * The group control number suffix. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.envelopeSettings.groupApplicationReceiverQualifier] * The group application receiver qualifier. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.envelopeSettings.groupApplicationReceiverId] * The group application receiver id. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.envelopeSettings.groupApplicationSenderQualifier] * The group application sender qualifier. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.envelopeSettings.groupApplicationSenderId] * The group application sender id. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.envelopeSettings.groupApplicationPassword] * The group application password. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.envelopeSettings.overwriteExistingTransactionSetControlNumber] * The value indicating whether to overwrite existing transaction set control * number. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberPrefix] * The transaction set control number prefix. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberSuffix] * The transaction set control number suffix. - * @member {number} + * @property {number} * [sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberLowerBound] * The transaction set control number lower bound. - * @member {number} + * @property {number} * [sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberUpperBound] * The transaction set control number upper bound. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.envelopeSettings.rolloverTransactionSetControlNumber] * The value indicating whether to rollover transaction set control number. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.envelopeSettings.isTestInterchange] The * value indicating whether the message is a test interchange. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.envelopeSettings.senderInternalIdentification] * The sender internal identification. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.envelopeSettings.senderInternalSubIdentification] * The sender internal sub identification. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.envelopeSettings.receiverInternalIdentification] * The receiver internal identification. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.envelopeSettings.receiverInternalSubIdentification] * The receiver internal sub identification. - * @member {object} [sendAgreement.protocolSettings.acknowledgementSettings] - * The EDIFACT acknowledgement settings. - * @member {boolean} + * @property {object} + * [sendAgreement.protocolSettings.acknowledgementSettings] The EDIFACT + * acknowledgement settings. + * @property {boolean} * [sendAgreement.protocolSettings.acknowledgementSettings.needTechnicalAcknowledgement] * The value indicating whether technical acknowledgement is needed. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.acknowledgementSettings.batchTechnicalAcknowledgements] * The value indicating whether to batch the technical acknowledgements. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.acknowledgementSettings.needFunctionalAcknowledgement] * The value indicating whether functional acknowledgement is needed. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.acknowledgementSettings.batchFunctionalAcknowledgements] * The value indicating whether to batch functional acknowledgements. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.acknowledgementSettings.needLoopForValidMessages] * The value indicating whether a loop is needed for valid messages. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.acknowledgementSettings.sendSynchronousAcknowledgement] * The value indicating whether to send synchronous acknowledgement. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberPrefix] * The acknowledgement control number prefix. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberSuffix] * The acknowledgement control number suffix. - * @member {number} + * @property {number} * [sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberLowerBound] * The acknowledgement control number lower bound. - * @member {number} + * @property {number} * [sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberUpperBound] * The acknowledgement control number upper bound. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.acknowledgementSettings.rolloverAcknowledgementControlNumber] * The value indicating whether to rollover acknowledgement control number. - * @member {object} [sendAgreement.protocolSettings.messageFilter] The + * @property {object} [sendAgreement.protocolSettings.messageFilter] The * EDIFACT message filter. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.messageFilter.messageFilterType] The * message filter type. Possible values include: 'NotSpecified', 'Include', * 'Exclude' - * @member {object} [sendAgreement.protocolSettings.processingSettings] The + * @property {object} [sendAgreement.protocolSettings.processingSettings] The * EDIFACT processing Settings. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.processingSettings.maskSecurityInfo] The * value indicating whether to mask security information. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.processingSettings.preserveInterchange] * The value indicating whether to preserve interchange. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.processingSettings.suspendInterchangeOnError] * The value indicating whether to suspend interchange on error. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.processingSettings.createEmptyXmlTagsForTrailingSeparators] * The value indicating whether to create empty xml tags for trailing * separators. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.processingSettings.useDotAsDecimalSeparator] * The value indicating whether to use dot as decimal separator. - * @member {array} [sendAgreement.protocolSettings.envelopeOverrides] The + * @property {array} [sendAgreement.protocolSettings.envelopeOverrides] The * EDIFACT envelope override settings. - * @member {array} [sendAgreement.protocolSettings.messageFilterList] The + * @property {array} [sendAgreement.protocolSettings.messageFilterList] The * EDIFACT message filter list. - * @member {array} [sendAgreement.protocolSettings.schemaReferences] The + * @property {array} [sendAgreement.protocolSettings.schemaReferences] The * EDIFACT schema references. - * @member {array} [sendAgreement.protocolSettings.validationOverrides] The + * @property {array} [sendAgreement.protocolSettings.validationOverrides] The * EDIFACT validation override settings. - * @member {array} [sendAgreement.protocolSettings.edifactDelimiterOverrides] - * The EDIFACT delimiter override settings. + * @property {array} + * [sendAgreement.protocolSettings.edifactDelimiterOverrides] The EDIFACT + * delimiter override settings. */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/edifactDelimiterOverride.js b/lib/services/logicManagement/lib/models/edifactDelimiterOverride.js index 964455ae94..4d8405efa5 100644 --- a/lib/services/logicManagement/lib/models/edifactDelimiterOverride.js +++ b/lib/services/logicManagement/lib/models/edifactDelimiterOverride.js @@ -17,21 +17,21 @@ class EdifactDelimiterOverride { /** * Create a EdifactDelimiterOverride. - * @member {string} [messageId] The message id. - * @member {string} [messageVersion] The message version. - * @member {string} [messageRelease] The message release. - * @member {number} dataElementSeparator The data element separator. - * @member {number} componentSeparator The component separator. - * @member {number} segmentTerminator The segment terminator. - * @member {number} repetitionSeparator The repetition separator. - * @member {string} segmentTerminatorSuffix The segment terminator suffix. + * @property {string} [messageId] The message id. + * @property {string} [messageVersion] The message version. + * @property {string} [messageRelease] The message release. + * @property {number} dataElementSeparator The data element separator. + * @property {number} componentSeparator The component separator. + * @property {number} segmentTerminator The segment terminator. + * @property {number} repetitionSeparator The repetition separator. + * @property {string} segmentTerminatorSuffix The segment terminator suffix. * Possible values include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' - * @member {string} decimalPointIndicator The decimal point indicator. + * @property {string} decimalPointIndicator The decimal point indicator. * Possible values include: 'NotSpecified', 'Comma', 'Decimal' - * @member {number} releaseIndicator The release indicator. - * @member {string} [messageAssociationAssignedCode] The message association - * assigned code. - * @member {string} [targetNamespace] The target namespace on which this + * @property {number} releaseIndicator The release indicator. + * @property {string} [messageAssociationAssignedCode] The message + * association assigned code. + * @property {string} [targetNamespace] The target namespace on which this * delimiter settings has to be applied. */ constructor() { diff --git a/lib/services/logicManagement/lib/models/edifactEnvelopeOverride.js b/lib/services/logicManagement/lib/models/edifactEnvelopeOverride.js index 008890156f..69113c6402 100644 --- a/lib/services/logicManagement/lib/models/edifactEnvelopeOverride.js +++ b/lib/services/logicManagement/lib/models/edifactEnvelopeOverride.js @@ -17,30 +17,31 @@ class EdifactEnvelopeOverride { /** * Create a EdifactEnvelopeOverride. - * @member {string} [messageId] The message id on which this envelope + * @property {string} [messageId] The message id on which this envelope * settings has to be applied. - * @member {string} [messageVersion] The message version on which this + * @property {string} [messageVersion] The message version on which this * envelope settings has to be applied. - * @member {string} [messageRelease] The message release version on which + * @property {string} [messageRelease] The message release version on which * this envelope settings has to be applied. - * @member {string} [messageAssociationAssignedCode] The message association - * assigned code. - * @member {string} [targetNamespace] The target namespace on which this + * @property {string} [messageAssociationAssignedCode] The message + * association assigned code. + * @property {string} [targetNamespace] The target namespace on which this * envelope settings has to be applied. - * @member {string} [functionalGroupId] The functional group id. - * @member {string} [senderApplicationQualifier] The sender application + * @property {string} [functionalGroupId] The functional group id. + * @property {string} [senderApplicationQualifier] The sender application * qualifier. - * @member {string} [senderApplicationId] The sender application id. - * @member {string} [receiverApplicationQualifier] The receiver application + * @property {string} [senderApplicationId] The sender application id. + * @property {string} [receiverApplicationQualifier] The receiver application * qualifier. - * @member {string} [receiverApplicationId] The receiver application id. - * @member {string} [controllingAgencyCode] The controlling agency code. - * @member {string} [groupHeaderMessageVersion] The group header message + * @property {string} [receiverApplicationId] The receiver application id. + * @property {string} [controllingAgencyCode] The controlling agency code. + * @property {string} [groupHeaderMessageVersion] The group header message * version. - * @member {string} [groupHeaderMessageRelease] The group header message + * @property {string} [groupHeaderMessageRelease] The group header message * release. - * @member {string} [associationAssignedCode] The association assigned code. - * @member {string} [applicationPassword] The application password. + * @property {string} [associationAssignedCode] The association assigned + * code. + * @property {string} [applicationPassword] The application password. */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/edifactEnvelopeSettings.js b/lib/services/logicManagement/lib/models/edifactEnvelopeSettings.js index 5c2a90dea7..b3bfe2e500 100644 --- a/lib/services/logicManagement/lib/models/edifactEnvelopeSettings.js +++ b/lib/services/logicManagement/lib/models/edifactEnvelopeSettings.js @@ -17,83 +17,83 @@ class EdifactEnvelopeSettings { /** * Create a EdifactEnvelopeSettings. - * @member {string} [groupAssociationAssignedCode] The group association + * @property {string} [groupAssociationAssignedCode] The group association * assigned code. - * @member {string} [communicationAgreementId] The communication agreement + * @property {string} [communicationAgreementId] The communication agreement * id. - * @member {boolean} applyDelimiterStringAdvice The value indicating whether - * to apply delimiter string advice. - * @member {boolean} createGroupingSegments The value indicating whether to + * @property {boolean} applyDelimiterStringAdvice The value indicating + * whether to apply delimiter string advice. + * @property {boolean} createGroupingSegments The value indicating whether to * create grouping segments. - * @member {boolean} enableDefaultGroupHeaders The value indicating whether + * @property {boolean} enableDefaultGroupHeaders The value indicating whether * to enable default group headers. - * @member {string} [recipientReferencePasswordValue] The recipient reference - * password value. - * @member {string} [recipientReferencePasswordQualifier] The recipient + * @property {string} [recipientReferencePasswordValue] The recipient + * reference password value. + * @property {string} [recipientReferencePasswordQualifier] The recipient * reference password qualifier. - * @member {string} [applicationReferenceId] The application reference id. - * @member {string} [processingPriorityCode] The processing priority code. - * @member {number} interchangeControlNumberLowerBound The interchange + * @property {string} [applicationReferenceId] The application reference id. + * @property {string} [processingPriorityCode] The processing priority code. + * @property {number} interchangeControlNumberLowerBound The interchange * control number lower bound. - * @member {number} interchangeControlNumberUpperBound The interchange + * @property {number} interchangeControlNumberUpperBound The interchange * control number upper bound. - * @member {boolean} rolloverInterchangeControlNumber The value indicating + * @property {boolean} rolloverInterchangeControlNumber The value indicating * whether to rollover interchange control number. - * @member {string} [interchangeControlNumberPrefix] The interchange control - * number prefix. - * @member {string} [interchangeControlNumberSuffix] The interchange control - * number suffix. - * @member {string} [senderReverseRoutingAddress] The sender reverse routing - * address. - * @member {string} [receiverReverseRoutingAddress] The receiver reverse + * @property {string} [interchangeControlNumberPrefix] The interchange + * control number prefix. + * @property {string} [interchangeControlNumberSuffix] The interchange + * control number suffix. + * @property {string} [senderReverseRoutingAddress] The sender reverse * routing address. - * @member {string} [functionalGroupId] The functional group id. - * @member {string} [groupControllingAgencyCode] The group controlling agency - * code. - * @member {string} [groupMessageVersion] The group message version. - * @member {string} [groupMessageRelease] The group message release. - * @member {number} groupControlNumberLowerBound The group control number + * @property {string} [receiverReverseRoutingAddress] The receiver reverse + * routing address. + * @property {string} [functionalGroupId] The functional group id. + * @property {string} [groupControllingAgencyCode] The group controlling + * agency code. + * @property {string} [groupMessageVersion] The group message version. + * @property {string} [groupMessageRelease] The group message release. + * @property {number} groupControlNumberLowerBound The group control number * lower bound. - * @member {number} groupControlNumberUpperBound The group control number + * @property {number} groupControlNumberUpperBound The group control number * upper bound. - * @member {boolean} rolloverGroupControlNumber The value indicating whether - * to rollover group control number. - * @member {string} [groupControlNumberPrefix] The group control number + * @property {boolean} rolloverGroupControlNumber The value indicating + * whether to rollover group control number. + * @property {string} [groupControlNumberPrefix] The group control number * prefix. - * @member {string} [groupControlNumberSuffix] The group control number + * @property {string} [groupControlNumberSuffix] The group control number * suffix. - * @member {string} [groupApplicationReceiverQualifier] The group application - * receiver qualifier. - * @member {string} [groupApplicationReceiverId] The group application + * @property {string} [groupApplicationReceiverQualifier] The group + * application receiver qualifier. + * @property {string} [groupApplicationReceiverId] The group application * receiver id. - * @member {string} [groupApplicationSenderQualifier] The group application + * @property {string} [groupApplicationSenderQualifier] The group application * sender qualifier. - * @member {string} [groupApplicationSenderId] The group application sender + * @property {string} [groupApplicationSenderId] The group application sender * id. - * @member {string} [groupApplicationPassword] The group application + * @property {string} [groupApplicationPassword] The group application * password. - * @member {boolean} overwriteExistingTransactionSetControlNumber The value + * @property {boolean} overwriteExistingTransactionSetControlNumber The value * indicating whether to overwrite existing transaction set control number. - * @member {string} [transactionSetControlNumberPrefix] The transaction set + * @property {string} [transactionSetControlNumberPrefix] The transaction set * control number prefix. - * @member {string} [transactionSetControlNumberSuffix] The transaction set + * @property {string} [transactionSetControlNumberSuffix] The transaction set * control number suffix. - * @member {number} transactionSetControlNumberLowerBound The transaction set - * control number lower bound. - * @member {number} transactionSetControlNumberUpperBound The transaction set - * control number upper bound. - * @member {boolean} rolloverTransactionSetControlNumber The value indicating - * whether to rollover transaction set control number. - * @member {boolean} isTestInterchange The value indicating whether the + * @property {number} transactionSetControlNumberLowerBound The transaction + * set control number lower bound. + * @property {number} transactionSetControlNumberUpperBound The transaction + * set control number upper bound. + * @property {boolean} rolloverTransactionSetControlNumber The value + * indicating whether to rollover transaction set control number. + * @property {boolean} isTestInterchange The value indicating whether the * message is a test interchange. - * @member {string} [senderInternalIdentification] The sender internal - * identification. - * @member {string} [senderInternalSubIdentification] The sender internal sub + * @property {string} [senderInternalIdentification] The sender internal * identification. - * @member {string} [receiverInternalIdentification] The receiver internal - * identification. - * @member {string} [receiverInternalSubIdentification] The receiver internal + * @property {string} [senderInternalSubIdentification] The sender internal * sub identification. + * @property {string} [receiverInternalIdentification] The receiver internal + * identification. + * @property {string} [receiverInternalSubIdentification] The receiver + * internal sub identification. */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/edifactFramingSettings.js b/lib/services/logicManagement/lib/models/edifactFramingSettings.js index 57f9d9b279..60eb384e9f 100644 --- a/lib/services/logicManagement/lib/models/edifactFramingSettings.js +++ b/lib/services/logicManagement/lib/models/edifactFramingSettings.js @@ -17,24 +17,24 @@ class EdifactFramingSettings { /** * Create a EdifactFramingSettings. - * @member {string} [serviceCodeListDirectoryVersion] The service code list + * @property {string} [serviceCodeListDirectoryVersion] The service code list * directory version. - * @member {string} [characterEncoding] The character encoding. - * @member {number} protocolVersion The protocol version. - * @member {number} dataElementSeparator The data element separator. - * @member {number} componentSeparator The component separator. - * @member {number} segmentTerminator The segment terminator. - * @member {number} releaseIndicator The release indicator. - * @member {number} repetitionSeparator The repetition separator. - * @member {string} characterSet The EDIFACT frame setting characterSet. + * @property {string} [characterEncoding] The character encoding. + * @property {number} protocolVersion The protocol version. + * @property {number} dataElementSeparator The data element separator. + * @property {number} componentSeparator The component separator. + * @property {number} segmentTerminator The segment terminator. + * @property {number} releaseIndicator The release indicator. + * @property {number} repetitionSeparator The repetition separator. + * @property {string} characterSet The EDIFACT frame setting characterSet. * Possible values include: 'NotSpecified', 'UNOB', 'UNOA', 'UNOC', 'UNOD', * 'UNOE', 'UNOF', 'UNOG', 'UNOH', 'UNOI', 'UNOJ', 'UNOK', 'UNOX', 'UNOY', * 'KECA' - * @member {string} decimalPointIndicator The EDIFACT frame setting decimal + * @property {string} decimalPointIndicator The EDIFACT frame setting decimal * indicator. Possible values include: 'NotSpecified', 'Comma', 'Decimal' - * @member {string} segmentTerminatorSuffix The EDIFACT frame setting segment - * terminator suffix. Possible values include: 'NotSpecified', 'None', 'CR', - * 'LF', 'CRLF' + * @property {string} segmentTerminatorSuffix The EDIFACT frame setting + * segment terminator suffix. Possible values include: 'NotSpecified', + * 'None', 'CR', 'LF', 'CRLF' */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/edifactMessageFilter.js b/lib/services/logicManagement/lib/models/edifactMessageFilter.js index 37f1f2c92c..7578631204 100644 --- a/lib/services/logicManagement/lib/models/edifactMessageFilter.js +++ b/lib/services/logicManagement/lib/models/edifactMessageFilter.js @@ -17,7 +17,7 @@ class EdifactMessageFilter { /** * Create a EdifactMessageFilter. - * @member {string} messageFilterType The message filter type. Possible + * @property {string} messageFilterType The message filter type. Possible * values include: 'NotSpecified', 'Include', 'Exclude' */ constructor() { diff --git a/lib/services/logicManagement/lib/models/edifactMessageIdentifier.js b/lib/services/logicManagement/lib/models/edifactMessageIdentifier.js index 9d2ca40a79..00b2b72b09 100644 --- a/lib/services/logicManagement/lib/models/edifactMessageIdentifier.js +++ b/lib/services/logicManagement/lib/models/edifactMessageIdentifier.js @@ -17,8 +17,8 @@ class EdifactMessageIdentifier { /** * Create a EdifactMessageIdentifier. - * @member {string} messageId The message id on which this envelope settings - * has to be applied. + * @property {string} messageId The message id on which this envelope + * settings has to be applied. */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/edifactOneWayAgreement.js b/lib/services/logicManagement/lib/models/edifactOneWayAgreement.js index d86d7f6a06..75e5727f49 100644 --- a/lib/services/logicManagement/lib/models/edifactOneWayAgreement.js +++ b/lib/services/logicManagement/lib/models/edifactOneWayAgreement.js @@ -17,270 +17,271 @@ class EdifactOneWayAgreement { /** * Create a EdifactOneWayAgreement. - * @member {object} senderBusinessIdentity The sender business identity - * @member {string} [senderBusinessIdentity.qualifier] The business identity - * qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [senderBusinessIdentity.value] The user defined business - * identity value. - * @member {object} receiverBusinessIdentity The receiver business identity - * @member {string} [receiverBusinessIdentity.qualifier] The business + * @property {object} senderBusinessIdentity The sender business identity + * @property {string} [senderBusinessIdentity.qualifier] The business * identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [receiverBusinessIdentity.value] The user defined + * @property {string} [senderBusinessIdentity.value] The user defined * business identity value. - * @member {object} protocolSettings The EDIFACT protocol settings. - * @member {object} [protocolSettings.validationSettings] The EDIFACT + * @property {object} receiverBusinessIdentity The receiver business identity + * @property {string} [receiverBusinessIdentity.qualifier] The business + * identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 + * @property {string} [receiverBusinessIdentity.value] The user defined + * business identity value. + * @property {object} protocolSettings The EDIFACT protocol settings. + * @property {object} [protocolSettings.validationSettings] The EDIFACT * validation settings. - * @member {boolean} + * @property {boolean} * [protocolSettings.validationSettings.validateCharacterSet] The value * indicating whether to validate character set in the message. - * @member {boolean} + * @property {boolean} * [protocolSettings.validationSettings.checkDuplicateInterchangeControlNumber] * The value indicating whether to check for duplicate interchange control * number. - * @member {number} + * @property {number} * [protocolSettings.validationSettings.interchangeControlNumberValidityDays] * The validity period of interchange control number. - * @member {boolean} + * @property {boolean} * [protocolSettings.validationSettings.checkDuplicateGroupControlNumber] The * value indicating whether to check for duplicate group control number. - * @member {boolean} + * @property {boolean} * [protocolSettings.validationSettings.checkDuplicateTransactionSetControlNumber] * The value indicating whether to check for duplicate transaction set * control number. - * @member {boolean} [protocolSettings.validationSettings.validateEdiTypes] + * @property {boolean} [protocolSettings.validationSettings.validateEdiTypes] * The value indicating whether to Whether to validate EDI types. - * @member {boolean} [protocolSettings.validationSettings.validateXsdTypes] + * @property {boolean} [protocolSettings.validationSettings.validateXsdTypes] * The value indicating whether to Whether to validate XSD types. - * @member {boolean} + * @property {boolean} * [protocolSettings.validationSettings.allowLeadingAndTrailingSpacesAndZeroes] * The value indicating whether to allow leading and trailing spaces and * zeroes. - * @member {boolean} + * @property {boolean} * [protocolSettings.validationSettings.trimLeadingAndTrailingSpacesAndZeroes] * The value indicating whether to trim leading and trailing spaces and * zeroes. - * @member {string} + * @property {string} * [protocolSettings.validationSettings.trailingSeparatorPolicy] The trailing * separator policy. Possible values include: 'NotSpecified', 'NotAllowed', * 'Optional', 'Mandatory' - * @member {object} [protocolSettings.framingSettings] The EDIFACT framing + * @property {object} [protocolSettings.framingSettings] The EDIFACT framing * settings. - * @member {string} + * @property {string} * [protocolSettings.framingSettings.serviceCodeListDirectoryVersion] The * service code list directory version. - * @member {string} [protocolSettings.framingSettings.characterEncoding] The - * character encoding. - * @member {number} [protocolSettings.framingSettings.protocolVersion] The + * @property {string} [protocolSettings.framingSettings.characterEncoding] + * The character encoding. + * @property {number} [protocolSettings.framingSettings.protocolVersion] The * protocol version. - * @member {number} [protocolSettings.framingSettings.dataElementSeparator] + * @property {number} [protocolSettings.framingSettings.dataElementSeparator] * The data element separator. - * @member {number} [protocolSettings.framingSettings.componentSeparator] The - * component separator. - * @member {number} [protocolSettings.framingSettings.segmentTerminator] The - * segment terminator. - * @member {number} [protocolSettings.framingSettings.releaseIndicator] The + * @property {number} [protocolSettings.framingSettings.componentSeparator] + * The component separator. + * @property {number} [protocolSettings.framingSettings.segmentTerminator] + * The segment terminator. + * @property {number} [protocolSettings.framingSettings.releaseIndicator] The * release indicator. - * @member {number} [protocolSettings.framingSettings.repetitionSeparator] + * @property {number} [protocolSettings.framingSettings.repetitionSeparator] * The repetition separator. - * @member {string} [protocolSettings.framingSettings.characterSet] The + * @property {string} [protocolSettings.framingSettings.characterSet] The * EDIFACT frame setting characterSet. Possible values include: * 'NotSpecified', 'UNOB', 'UNOA', 'UNOC', 'UNOD', 'UNOE', 'UNOF', 'UNOG', * 'UNOH', 'UNOI', 'UNOJ', 'UNOK', 'UNOX', 'UNOY', 'KECA' - * @member {string} [protocolSettings.framingSettings.decimalPointIndicator] - * The EDIFACT frame setting decimal indicator. Possible values include: - * 'NotSpecified', 'Comma', 'Decimal' - * @member {string} + * @property {string} + * [protocolSettings.framingSettings.decimalPointIndicator] The EDIFACT frame + * setting decimal indicator. Possible values include: 'NotSpecified', + * 'Comma', 'Decimal' + * @property {string} * [protocolSettings.framingSettings.segmentTerminatorSuffix] The EDIFACT * frame setting segment terminator suffix. Possible values include: * 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' - * @member {object} [protocolSettings.envelopeSettings] The EDIFACT envelope - * settings. - * @member {string} + * @property {object} [protocolSettings.envelopeSettings] The EDIFACT + * envelope settings. + * @property {string} * [protocolSettings.envelopeSettings.groupAssociationAssignedCode] The group * association assigned code. - * @member {string} + * @property {string} * [protocolSettings.envelopeSettings.communicationAgreementId] The * communication agreement id. - * @member {boolean} + * @property {boolean} * [protocolSettings.envelopeSettings.applyDelimiterStringAdvice] The value * indicating whether to apply delimiter string advice. - * @member {boolean} + * @property {boolean} * [protocolSettings.envelopeSettings.createGroupingSegments] The value * indicating whether to create grouping segments. - * @member {boolean} + * @property {boolean} * [protocolSettings.envelopeSettings.enableDefaultGroupHeaders] The value * indicating whether to enable default group headers. - * @member {string} + * @property {string} * [protocolSettings.envelopeSettings.recipientReferencePasswordValue] The * recipient reference password value. - * @member {string} + * @property {string} * [protocolSettings.envelopeSettings.recipientReferencePasswordQualifier] * The recipient reference password qualifier. - * @member {string} + * @property {string} * [protocolSettings.envelopeSettings.applicationReferenceId] The application * reference id. - * @member {string} + * @property {string} * [protocolSettings.envelopeSettings.processingPriorityCode] The processing * priority code. - * @member {number} + * @property {number} * [protocolSettings.envelopeSettings.interchangeControlNumberLowerBound] The * interchange control number lower bound. - * @member {number} + * @property {number} * [protocolSettings.envelopeSettings.interchangeControlNumberUpperBound] The * interchange control number upper bound. - * @member {boolean} + * @property {boolean} * [protocolSettings.envelopeSettings.rolloverInterchangeControlNumber] The * value indicating whether to rollover interchange control number. - * @member {string} + * @property {string} * [protocolSettings.envelopeSettings.interchangeControlNumberPrefix] The * interchange control number prefix. - * @member {string} + * @property {string} * [protocolSettings.envelopeSettings.interchangeControlNumberSuffix] The * interchange control number suffix. - * @member {string} + * @property {string} * [protocolSettings.envelopeSettings.senderReverseRoutingAddress] The sender * reverse routing address. - * @member {string} + * @property {string} * [protocolSettings.envelopeSettings.receiverReverseRoutingAddress] The * receiver reverse routing address. - * @member {string} [protocolSettings.envelopeSettings.functionalGroupId] The - * functional group id. - * @member {string} + * @property {string} [protocolSettings.envelopeSettings.functionalGroupId] + * The functional group id. + * @property {string} * [protocolSettings.envelopeSettings.groupControllingAgencyCode] The group * controlling agency code. - * @member {string} [protocolSettings.envelopeSettings.groupMessageVersion] + * @property {string} [protocolSettings.envelopeSettings.groupMessageVersion] * The group message version. - * @member {string} [protocolSettings.envelopeSettings.groupMessageRelease] + * @property {string} [protocolSettings.envelopeSettings.groupMessageRelease] * The group message release. - * @member {number} + * @property {number} * [protocolSettings.envelopeSettings.groupControlNumberLowerBound] The group * control number lower bound. - * @member {number} + * @property {number} * [protocolSettings.envelopeSettings.groupControlNumberUpperBound] The group * control number upper bound. - * @member {boolean} + * @property {boolean} * [protocolSettings.envelopeSettings.rolloverGroupControlNumber] The value * indicating whether to rollover group control number. - * @member {string} + * @property {string} * [protocolSettings.envelopeSettings.groupControlNumberPrefix] The group * control number prefix. - * @member {string} + * @property {string} * [protocolSettings.envelopeSettings.groupControlNumberSuffix] The group * control number suffix. - * @member {string} + * @property {string} * [protocolSettings.envelopeSettings.groupApplicationReceiverQualifier] The * group application receiver qualifier. - * @member {string} + * @property {string} * [protocolSettings.envelopeSettings.groupApplicationReceiverId] The group * application receiver id. - * @member {string} + * @property {string} * [protocolSettings.envelopeSettings.groupApplicationSenderQualifier] The * group application sender qualifier. - * @member {string} + * @property {string} * [protocolSettings.envelopeSettings.groupApplicationSenderId] The group * application sender id. - * @member {string} + * @property {string} * [protocolSettings.envelopeSettings.groupApplicationPassword] The group * application password. - * @member {boolean} + * @property {boolean} * [protocolSettings.envelopeSettings.overwriteExistingTransactionSetControlNumber] * The value indicating whether to overwrite existing transaction set control * number. - * @member {string} + * @property {string} * [protocolSettings.envelopeSettings.transactionSetControlNumberPrefix] The * transaction set control number prefix. - * @member {string} + * @property {string} * [protocolSettings.envelopeSettings.transactionSetControlNumberSuffix] The * transaction set control number suffix. - * @member {number} + * @property {number} * [protocolSettings.envelopeSettings.transactionSetControlNumberLowerBound] * The transaction set control number lower bound. - * @member {number} + * @property {number} * [protocolSettings.envelopeSettings.transactionSetControlNumberUpperBound] * The transaction set control number upper bound. - * @member {boolean} + * @property {boolean} * [protocolSettings.envelopeSettings.rolloverTransactionSetControlNumber] * The value indicating whether to rollover transaction set control number. - * @member {boolean} [protocolSettings.envelopeSettings.isTestInterchange] + * @property {boolean} [protocolSettings.envelopeSettings.isTestInterchange] * The value indicating whether the message is a test interchange. - * @member {string} + * @property {string} * [protocolSettings.envelopeSettings.senderInternalIdentification] The * sender internal identification. - * @member {string} + * @property {string} * [protocolSettings.envelopeSettings.senderInternalSubIdentification] The * sender internal sub identification. - * @member {string} + * @property {string} * [protocolSettings.envelopeSettings.receiverInternalIdentification] The * receiver internal identification. - * @member {string} + * @property {string} * [protocolSettings.envelopeSettings.receiverInternalSubIdentification] The * receiver internal sub identification. - * @member {object} [protocolSettings.acknowledgementSettings] The EDIFACT + * @property {object} [protocolSettings.acknowledgementSettings] The EDIFACT * acknowledgement settings. - * @member {boolean} + * @property {boolean} * [protocolSettings.acknowledgementSettings.needTechnicalAcknowledgement] * The value indicating whether technical acknowledgement is needed. - * @member {boolean} + * @property {boolean} * [protocolSettings.acknowledgementSettings.batchTechnicalAcknowledgements] * The value indicating whether to batch the technical acknowledgements. - * @member {boolean} + * @property {boolean} * [protocolSettings.acknowledgementSettings.needFunctionalAcknowledgement] * The value indicating whether functional acknowledgement is needed. - * @member {boolean} + * @property {boolean} * [protocolSettings.acknowledgementSettings.batchFunctionalAcknowledgements] * The value indicating whether to batch functional acknowledgements. - * @member {boolean} + * @property {boolean} * [protocolSettings.acknowledgementSettings.needLoopForValidMessages] The * value indicating whether a loop is needed for valid messages. - * @member {boolean} + * @property {boolean} * [protocolSettings.acknowledgementSettings.sendSynchronousAcknowledgement] * The value indicating whether to send synchronous acknowledgement. - * @member {string} + * @property {string} * [protocolSettings.acknowledgementSettings.acknowledgementControlNumberPrefix] * The acknowledgement control number prefix. - * @member {string} + * @property {string} * [protocolSettings.acknowledgementSettings.acknowledgementControlNumberSuffix] * The acknowledgement control number suffix. - * @member {number} + * @property {number} * [protocolSettings.acknowledgementSettings.acknowledgementControlNumberLowerBound] * The acknowledgement control number lower bound. - * @member {number} + * @property {number} * [protocolSettings.acknowledgementSettings.acknowledgementControlNumberUpperBound] * The acknowledgement control number upper bound. - * @member {boolean} + * @property {boolean} * [protocolSettings.acknowledgementSettings.rolloverAcknowledgementControlNumber] * The value indicating whether to rollover acknowledgement control number. - * @member {object} [protocolSettings.messageFilter] The EDIFACT message + * @property {object} [protocolSettings.messageFilter] The EDIFACT message * filter. - * @member {string} [protocolSettings.messageFilter.messageFilterType] The + * @property {string} [protocolSettings.messageFilter.messageFilterType] The * message filter type. Possible values include: 'NotSpecified', 'Include', * 'Exclude' - * @member {object} [protocolSettings.processingSettings] The EDIFACT + * @property {object} [protocolSettings.processingSettings] The EDIFACT * processing Settings. - * @member {boolean} [protocolSettings.processingSettings.maskSecurityInfo] + * @property {boolean} [protocolSettings.processingSettings.maskSecurityInfo] * The value indicating whether to mask security information. - * @member {boolean} + * @property {boolean} * [protocolSettings.processingSettings.preserveInterchange] The value * indicating whether to preserve interchange. - * @member {boolean} + * @property {boolean} * [protocolSettings.processingSettings.suspendInterchangeOnError] The value * indicating whether to suspend interchange on error. - * @member {boolean} + * @property {boolean} * [protocolSettings.processingSettings.createEmptyXmlTagsForTrailingSeparators] * The value indicating whether to create empty xml tags for trailing * separators. - * @member {boolean} + * @property {boolean} * [protocolSettings.processingSettings.useDotAsDecimalSeparator] The value * indicating whether to use dot as decimal separator. - * @member {array} [protocolSettings.envelopeOverrides] The EDIFACT envelope - * override settings. - * @member {array} [protocolSettings.messageFilterList] The EDIFACT message + * @property {array} [protocolSettings.envelopeOverrides] The EDIFACT + * envelope override settings. + * @property {array} [protocolSettings.messageFilterList] The EDIFACT message * filter list. - * @member {array} [protocolSettings.schemaReferences] The EDIFACT schema + * @property {array} [protocolSettings.schemaReferences] The EDIFACT schema * references. - * @member {array} [protocolSettings.validationOverrides] The EDIFACT + * @property {array} [protocolSettings.validationOverrides] The EDIFACT * validation override settings. - * @member {array} [protocolSettings.edifactDelimiterOverrides] The EDIFACT + * @property {array} [protocolSettings.edifactDelimiterOverrides] The EDIFACT * delimiter override settings. */ constructor() { diff --git a/lib/services/logicManagement/lib/models/edifactProcessingSettings.js b/lib/services/logicManagement/lib/models/edifactProcessingSettings.js index dec6068a20..6f42d16c8f 100644 --- a/lib/services/logicManagement/lib/models/edifactProcessingSettings.js +++ b/lib/services/logicManagement/lib/models/edifactProcessingSettings.js @@ -17,16 +17,16 @@ class EdifactProcessingSettings { /** * Create a EdifactProcessingSettings. - * @member {boolean} maskSecurityInfo The value indicating whether to mask + * @property {boolean} maskSecurityInfo The value indicating whether to mask * security information. - * @member {boolean} preserveInterchange The value indicating whether to + * @property {boolean} preserveInterchange The value indicating whether to * preserve interchange. - * @member {boolean} suspendInterchangeOnError The value indicating whether + * @property {boolean} suspendInterchangeOnError The value indicating whether * to suspend interchange on error. - * @member {boolean} createEmptyXmlTagsForTrailingSeparators The value + * @property {boolean} createEmptyXmlTagsForTrailingSeparators The value * indicating whether to create empty xml tags for trailing separators. - * @member {boolean} useDotAsDecimalSeparator The value indicating whether to - * use dot as decimal separator. + * @property {boolean} useDotAsDecimalSeparator The value indicating whether + * to use dot as decimal separator. */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/edifactProtocolSettings.js b/lib/services/logicManagement/lib/models/edifactProtocolSettings.js index b2a08f99a8..af7c6a3542 100644 --- a/lib/services/logicManagement/lib/models/edifactProtocolSettings.js +++ b/lib/services/logicManagement/lib/models/edifactProtocolSettings.js @@ -17,194 +17,201 @@ class EdifactProtocolSettings { /** * Create a EdifactProtocolSettings. - * @member {object} validationSettings The EDIFACT validation settings. - * @member {boolean} [validationSettings.validateCharacterSet] The value + * @property {object} validationSettings The EDIFACT validation settings. + * @property {boolean} [validationSettings.validateCharacterSet] The value * indicating whether to validate character set in the message. - * @member {boolean} + * @property {boolean} * [validationSettings.checkDuplicateInterchangeControlNumber] The value * indicating whether to check for duplicate interchange control number. - * @member {number} [validationSettings.interchangeControlNumberValidityDays] - * The validity period of interchange control number. - * @member {boolean} [validationSettings.checkDuplicateGroupControlNumber] + * @property {number} + * [validationSettings.interchangeControlNumberValidityDays] The validity + * period of interchange control number. + * @property {boolean} [validationSettings.checkDuplicateGroupControlNumber] * The value indicating whether to check for duplicate group control number. - * @member {boolean} + * @property {boolean} * [validationSettings.checkDuplicateTransactionSetControlNumber] The value * indicating whether to check for duplicate transaction set control number. - * @member {boolean} [validationSettings.validateEdiTypes] The value + * @property {boolean} [validationSettings.validateEdiTypes] The value * indicating whether to Whether to validate EDI types. - * @member {boolean} [validationSettings.validateXsdTypes] The value + * @property {boolean} [validationSettings.validateXsdTypes] The value * indicating whether to Whether to validate XSD types. - * @member {boolean} + * @property {boolean} * [validationSettings.allowLeadingAndTrailingSpacesAndZeroes] The value * indicating whether to allow leading and trailing spaces and zeroes. - * @member {boolean} + * @property {boolean} * [validationSettings.trimLeadingAndTrailingSpacesAndZeroes] The value * indicating whether to trim leading and trailing spaces and zeroes. - * @member {string} [validationSettings.trailingSeparatorPolicy] The trailing - * separator policy. Possible values include: 'NotSpecified', 'NotAllowed', - * 'Optional', 'Mandatory' - * @member {object} framingSettings The EDIFACT framing settings. - * @member {string} [framingSettings.serviceCodeListDirectoryVersion] The + * @property {string} [validationSettings.trailingSeparatorPolicy] The + * trailing separator policy. Possible values include: 'NotSpecified', + * 'NotAllowed', 'Optional', 'Mandatory' + * @property {object} framingSettings The EDIFACT framing settings. + * @property {string} [framingSettings.serviceCodeListDirectoryVersion] The * service code list directory version. - * @member {string} [framingSettings.characterEncoding] The character + * @property {string} [framingSettings.characterEncoding] The character * encoding. - * @member {number} [framingSettings.protocolVersion] The protocol version. - * @member {number} [framingSettings.dataElementSeparator] The data element + * @property {number} [framingSettings.protocolVersion] The protocol version. + * @property {number} [framingSettings.dataElementSeparator] The data element * separator. - * @member {number} [framingSettings.componentSeparator] The component + * @property {number} [framingSettings.componentSeparator] The component * separator. - * @member {number} [framingSettings.segmentTerminator] The segment + * @property {number} [framingSettings.segmentTerminator] The segment * terminator. - * @member {number} [framingSettings.releaseIndicator] The release indicator. - * @member {number} [framingSettings.repetitionSeparator] The repetition + * @property {number} [framingSettings.releaseIndicator] The release + * indicator. + * @property {number} [framingSettings.repetitionSeparator] The repetition * separator. - * @member {string} [framingSettings.characterSet] The EDIFACT frame setting - * characterSet. Possible values include: 'NotSpecified', 'UNOB', 'UNOA', - * 'UNOC', 'UNOD', 'UNOE', 'UNOF', 'UNOG', 'UNOH', 'UNOI', 'UNOJ', 'UNOK', - * 'UNOX', 'UNOY', 'KECA' - * @member {string} [framingSettings.decimalPointIndicator] The EDIFACT frame - * setting decimal indicator. Possible values include: 'NotSpecified', + * @property {string} [framingSettings.characterSet] The EDIFACT frame + * setting characterSet. Possible values include: 'NotSpecified', 'UNOB', + * 'UNOA', 'UNOC', 'UNOD', 'UNOE', 'UNOF', 'UNOG', 'UNOH', 'UNOI', 'UNOJ', + * 'UNOK', 'UNOX', 'UNOY', 'KECA' + * @property {string} [framingSettings.decimalPointIndicator] The EDIFACT + * frame setting decimal indicator. Possible values include: 'NotSpecified', * 'Comma', 'Decimal' - * @member {string} [framingSettings.segmentTerminatorSuffix] The EDIFACT + * @property {string} [framingSettings.segmentTerminatorSuffix] The EDIFACT * frame setting segment terminator suffix. Possible values include: * 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' - * @member {object} envelopeSettings The EDIFACT envelope settings. - * @member {string} [envelopeSettings.groupAssociationAssignedCode] The group - * association assigned code. - * @member {string} [envelopeSettings.communicationAgreementId] The + * @property {object} envelopeSettings The EDIFACT envelope settings. + * @property {string} [envelopeSettings.groupAssociationAssignedCode] The + * group association assigned code. + * @property {string} [envelopeSettings.communicationAgreementId] The * communication agreement id. - * @member {boolean} [envelopeSettings.applyDelimiterStringAdvice] The value - * indicating whether to apply delimiter string advice. - * @member {boolean} [envelopeSettings.createGroupingSegments] The value + * @property {boolean} [envelopeSettings.applyDelimiterStringAdvice] The + * value indicating whether to apply delimiter string advice. + * @property {boolean} [envelopeSettings.createGroupingSegments] The value * indicating whether to create grouping segments. - * @member {boolean} [envelopeSettings.enableDefaultGroupHeaders] The value + * @property {boolean} [envelopeSettings.enableDefaultGroupHeaders] The value * indicating whether to enable default group headers. - * @member {string} [envelopeSettings.recipientReferencePasswordValue] The + * @property {string} [envelopeSettings.recipientReferencePasswordValue] The * recipient reference password value. - * @member {string} [envelopeSettings.recipientReferencePasswordQualifier] + * @property {string} [envelopeSettings.recipientReferencePasswordQualifier] * The recipient reference password qualifier. - * @member {string} [envelopeSettings.applicationReferenceId] The application - * reference id. - * @member {string} [envelopeSettings.processingPriorityCode] The processing - * priority code. - * @member {number} [envelopeSettings.interchangeControlNumberLowerBound] The - * interchange control number lower bound. - * @member {number} [envelopeSettings.interchangeControlNumberUpperBound] The - * interchange control number upper bound. - * @member {boolean} [envelopeSettings.rolloverInterchangeControlNumber] The - * value indicating whether to rollover interchange control number. - * @member {string} [envelopeSettings.interchangeControlNumberPrefix] The + * @property {string} [envelopeSettings.applicationReferenceId] The + * application reference id. + * @property {string} [envelopeSettings.processingPriorityCode] The + * processing priority code. + * @property {number} [envelopeSettings.interchangeControlNumberLowerBound] + * The interchange control number lower bound. + * @property {number} [envelopeSettings.interchangeControlNumberUpperBound] + * The interchange control number upper bound. + * @property {boolean} [envelopeSettings.rolloverInterchangeControlNumber] + * The value indicating whether to rollover interchange control number. + * @property {string} [envelopeSettings.interchangeControlNumberPrefix] The * interchange control number prefix. - * @member {string} [envelopeSettings.interchangeControlNumberSuffix] The + * @property {string} [envelopeSettings.interchangeControlNumberSuffix] The * interchange control number suffix. - * @member {string} [envelopeSettings.senderReverseRoutingAddress] The sender - * reverse routing address. - * @member {string} [envelopeSettings.receiverReverseRoutingAddress] The + * @property {string} [envelopeSettings.senderReverseRoutingAddress] The + * sender reverse routing address. + * @property {string} [envelopeSettings.receiverReverseRoutingAddress] The * receiver reverse routing address. - * @member {string} [envelopeSettings.functionalGroupId] The functional group - * id. - * @member {string} [envelopeSettings.groupControllingAgencyCode] The group + * @property {string} [envelopeSettings.functionalGroupId] The functional + * group id. + * @property {string} [envelopeSettings.groupControllingAgencyCode] The group * controlling agency code. - * @member {string} [envelopeSettings.groupMessageVersion] The group message - * version. - * @member {string} [envelopeSettings.groupMessageRelease] The group message - * release. - * @member {number} [envelopeSettings.groupControlNumberLowerBound] The group - * control number lower bound. - * @member {number} [envelopeSettings.groupControlNumberUpperBound] The group - * control number upper bound. - * @member {boolean} [envelopeSettings.rolloverGroupControlNumber] The value - * indicating whether to rollover group control number. - * @member {string} [envelopeSettings.groupControlNumberPrefix] The group + * @property {string} [envelopeSettings.groupMessageVersion] The group + * message version. + * @property {string} [envelopeSettings.groupMessageRelease] The group + * message release. + * @property {number} [envelopeSettings.groupControlNumberLowerBound] The + * group control number lower bound. + * @property {number} [envelopeSettings.groupControlNumberUpperBound] The + * group control number upper bound. + * @property {boolean} [envelopeSettings.rolloverGroupControlNumber] The + * value indicating whether to rollover group control number. + * @property {string} [envelopeSettings.groupControlNumberPrefix] The group * control number prefix. - * @member {string} [envelopeSettings.groupControlNumberSuffix] The group + * @property {string} [envelopeSettings.groupControlNumberSuffix] The group * control number suffix. - * @member {string} [envelopeSettings.groupApplicationReceiverQualifier] The - * group application receiver qualifier. - * @member {string} [envelopeSettings.groupApplicationReceiverId] The group + * @property {string} [envelopeSettings.groupApplicationReceiverQualifier] + * The group application receiver qualifier. + * @property {string} [envelopeSettings.groupApplicationReceiverId] The group * application receiver id. - * @member {string} [envelopeSettings.groupApplicationSenderQualifier] The + * @property {string} [envelopeSettings.groupApplicationSenderQualifier] The * group application sender qualifier. - * @member {string} [envelopeSettings.groupApplicationSenderId] The group + * @property {string} [envelopeSettings.groupApplicationSenderId] The group * application sender id. - * @member {string} [envelopeSettings.groupApplicationPassword] The group + * @property {string} [envelopeSettings.groupApplicationPassword] The group * application password. - * @member {boolean} + * @property {boolean} * [envelopeSettings.overwriteExistingTransactionSetControlNumber] The value * indicating whether to overwrite existing transaction set control number. - * @member {string} [envelopeSettings.transactionSetControlNumberPrefix] The - * transaction set control number prefix. - * @member {string} [envelopeSettings.transactionSetControlNumberSuffix] The - * transaction set control number suffix. - * @member {number} [envelopeSettings.transactionSetControlNumberLowerBound] - * The transaction set control number lower bound. - * @member {number} [envelopeSettings.transactionSetControlNumberUpperBound] - * The transaction set control number upper bound. - * @member {boolean} [envelopeSettings.rolloverTransactionSetControlNumber] + * @property {string} [envelopeSettings.transactionSetControlNumberPrefix] + * The transaction set control number prefix. + * @property {string} [envelopeSettings.transactionSetControlNumberSuffix] + * The transaction set control number suffix. + * @property {number} + * [envelopeSettings.transactionSetControlNumberLowerBound] The transaction + * set control number lower bound. + * @property {number} + * [envelopeSettings.transactionSetControlNumberUpperBound] The transaction + * set control number upper bound. + * @property {boolean} [envelopeSettings.rolloverTransactionSetControlNumber] * The value indicating whether to rollover transaction set control number. - * @member {boolean} [envelopeSettings.isTestInterchange] The value + * @property {boolean} [envelopeSettings.isTestInterchange] The value * indicating whether the message is a test interchange. - * @member {string} [envelopeSettings.senderInternalIdentification] The + * @property {string} [envelopeSettings.senderInternalIdentification] The * sender internal identification. - * @member {string} [envelopeSettings.senderInternalSubIdentification] The + * @property {string} [envelopeSettings.senderInternalSubIdentification] The * sender internal sub identification. - * @member {string} [envelopeSettings.receiverInternalIdentification] The + * @property {string} [envelopeSettings.receiverInternalIdentification] The * receiver internal identification. - * @member {string} [envelopeSettings.receiverInternalSubIdentification] The - * receiver internal sub identification. - * @member {object} acknowledgementSettings The EDIFACT acknowledgement + * @property {string} [envelopeSettings.receiverInternalSubIdentification] + * The receiver internal sub identification. + * @property {object} acknowledgementSettings The EDIFACT acknowledgement * settings. - * @member {boolean} [acknowledgementSettings.needTechnicalAcknowledgement] + * @property {boolean} [acknowledgementSettings.needTechnicalAcknowledgement] * The value indicating whether technical acknowledgement is needed. - * @member {boolean} [acknowledgementSettings.batchTechnicalAcknowledgements] - * The value indicating whether to batch the technical acknowledgements. - * @member {boolean} [acknowledgementSettings.needFunctionalAcknowledgement] - * The value indicating whether functional acknowledgement is needed. - * @member {boolean} + * @property {boolean} + * [acknowledgementSettings.batchTechnicalAcknowledgements] The value + * indicating whether to batch the technical acknowledgements. + * @property {boolean} + * [acknowledgementSettings.needFunctionalAcknowledgement] The value + * indicating whether functional acknowledgement is needed. + * @property {boolean} * [acknowledgementSettings.batchFunctionalAcknowledgements] The value * indicating whether to batch functional acknowledgements. - * @member {boolean} [acknowledgementSettings.needLoopForValidMessages] The + * @property {boolean} [acknowledgementSettings.needLoopForValidMessages] The * value indicating whether a loop is needed for valid messages. - * @member {boolean} [acknowledgementSettings.sendSynchronousAcknowledgement] - * The value indicating whether to send synchronous acknowledgement. - * @member {string} + * @property {boolean} + * [acknowledgementSettings.sendSynchronousAcknowledgement] The value + * indicating whether to send synchronous acknowledgement. + * @property {string} * [acknowledgementSettings.acknowledgementControlNumberPrefix] The * acknowledgement control number prefix. - * @member {string} + * @property {string} * [acknowledgementSettings.acknowledgementControlNumberSuffix] The * acknowledgement control number suffix. - * @member {number} + * @property {number} * [acknowledgementSettings.acknowledgementControlNumberLowerBound] The * acknowledgement control number lower bound. - * @member {number} + * @property {number} * [acknowledgementSettings.acknowledgementControlNumberUpperBound] The * acknowledgement control number upper bound. - * @member {boolean} + * @property {boolean} * [acknowledgementSettings.rolloverAcknowledgementControlNumber] The value * indicating whether to rollover acknowledgement control number. - * @member {object} messageFilter The EDIFACT message filter. - * @member {string} [messageFilter.messageFilterType] The message filter + * @property {object} messageFilter The EDIFACT message filter. + * @property {string} [messageFilter.messageFilterType] The message filter * type. Possible values include: 'NotSpecified', 'Include', 'Exclude' - * @member {object} processingSettings The EDIFACT processing Settings. - * @member {boolean} [processingSettings.maskSecurityInfo] The value + * @property {object} processingSettings The EDIFACT processing Settings. + * @property {boolean} [processingSettings.maskSecurityInfo] The value * indicating whether to mask security information. - * @member {boolean} [processingSettings.preserveInterchange] The value + * @property {boolean} [processingSettings.preserveInterchange] The value * indicating whether to preserve interchange. - * @member {boolean} [processingSettings.suspendInterchangeOnError] The value - * indicating whether to suspend interchange on error. - * @member {boolean} + * @property {boolean} [processingSettings.suspendInterchangeOnError] The + * value indicating whether to suspend interchange on error. + * @property {boolean} * [processingSettings.createEmptyXmlTagsForTrailingSeparators] The value * indicating whether to create empty xml tags for trailing separators. - * @member {boolean} [processingSettings.useDotAsDecimalSeparator] The value - * indicating whether to use dot as decimal separator. - * @member {array} [envelopeOverrides] The EDIFACT envelope override + * @property {boolean} [processingSettings.useDotAsDecimalSeparator] The + * value indicating whether to use dot as decimal separator. + * @property {array} [envelopeOverrides] The EDIFACT envelope override * settings. - * @member {array} [messageFilterList] The EDIFACT message filter list. - * @member {array} schemaReferences The EDIFACT schema references. - * @member {array} [validationOverrides] The EDIFACT validation override - * settings. - * @member {array} [edifactDelimiterOverrides] The EDIFACT delimiter override + * @property {array} [messageFilterList] The EDIFACT message filter list. + * @property {array} schemaReferences The EDIFACT schema references. + * @property {array} [validationOverrides] The EDIFACT validation override * settings. + * @property {array} [edifactDelimiterOverrides] The EDIFACT delimiter + * override settings. */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/edifactSchemaReference.js b/lib/services/logicManagement/lib/models/edifactSchemaReference.js index d3906b7dc7..05f8f51bf7 100644 --- a/lib/services/logicManagement/lib/models/edifactSchemaReference.js +++ b/lib/services/logicManagement/lib/models/edifactSchemaReference.js @@ -17,14 +17,15 @@ class EdifactSchemaReference { /** * Create a EdifactSchemaReference. - * @member {string} messageId The message id. - * @member {string} messageVersion The message version. - * @member {string} messageRelease The message release version. - * @member {string} [senderApplicationId] The sender application id. - * @member {string} [senderApplicationQualifier] The sender application + * @property {string} messageId The message id. + * @property {string} messageVersion The message version. + * @property {string} messageRelease The message release version. + * @property {string} [senderApplicationId] The sender application id. + * @property {string} [senderApplicationQualifier] The sender application * qualifier. - * @member {string} [associationAssignedCode] The association assigned code. - * @member {string} schemaName The schema name. + * @property {string} [associationAssignedCode] The association assigned + * code. + * @property {string} schemaName The schema name. */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/edifactValidationOverride.js b/lib/services/logicManagement/lib/models/edifactValidationOverride.js index 9474a59be7..c7237798cd 100644 --- a/lib/services/logicManagement/lib/models/edifactValidationOverride.js +++ b/lib/services/logicManagement/lib/models/edifactValidationOverride.js @@ -17,20 +17,20 @@ class EdifactValidationOverride { /** * Create a EdifactValidationOverride. - * @member {string} messageId The message id on which the validation settings - * has to be applied. - * @member {boolean} enforceCharacterSet The value indicating whether to + * @property {string} messageId The message id on which the validation + * settings has to be applied. + * @property {boolean} enforceCharacterSet The value indicating whether to * validate character Set. - * @member {boolean} validateEdiTypes The value indicating whether to + * @property {boolean} validateEdiTypes The value indicating whether to * validate EDI types. - * @member {boolean} validateXsdTypes The value indicating whether to + * @property {boolean} validateXsdTypes The value indicating whether to * validate XSD types. - * @member {boolean} allowLeadingAndTrailingSpacesAndZeroes The value + * @property {boolean} allowLeadingAndTrailingSpacesAndZeroes The value * indicating whether to allow leading and trailing spaces and zeroes. - * @member {string} trailingSeparatorPolicy The trailing separator policy. + * @property {string} trailingSeparatorPolicy The trailing separator policy. * Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', * 'Mandatory' - * @member {boolean} trimLeadingAndTrailingSpacesAndZeroes The value + * @property {boolean} trimLeadingAndTrailingSpacesAndZeroes The value * indicating whether to trim leading and trailing spaces and zeroes. */ constructor() { diff --git a/lib/services/logicManagement/lib/models/edifactValidationSettings.js b/lib/services/logicManagement/lib/models/edifactValidationSettings.js index d199a25248..602c217cec 100644 --- a/lib/services/logicManagement/lib/models/edifactValidationSettings.js +++ b/lib/services/logicManagement/lib/models/edifactValidationSettings.js @@ -17,25 +17,25 @@ class EdifactValidationSettings { /** * Create a EdifactValidationSettings. - * @member {boolean} validateCharacterSet The value indicating whether to + * @property {boolean} validateCharacterSet The value indicating whether to * validate character set in the message. - * @member {boolean} checkDuplicateInterchangeControlNumber The value + * @property {boolean} checkDuplicateInterchangeControlNumber The value * indicating whether to check for duplicate interchange control number. - * @member {number} interchangeControlNumberValidityDays The validity period - * of interchange control number. - * @member {boolean} checkDuplicateGroupControlNumber The value indicating + * @property {number} interchangeControlNumberValidityDays The validity + * period of interchange control number. + * @property {boolean} checkDuplicateGroupControlNumber The value indicating * whether to check for duplicate group control number. - * @member {boolean} checkDuplicateTransactionSetControlNumber The value + * @property {boolean} checkDuplicateTransactionSetControlNumber The value * indicating whether to check for duplicate transaction set control number. - * @member {boolean} validateEdiTypes The value indicating whether to Whether - * to validate EDI types. - * @member {boolean} validateXsdTypes The value indicating whether to Whether - * to validate XSD types. - * @member {boolean} allowLeadingAndTrailingSpacesAndZeroes The value + * @property {boolean} validateEdiTypes The value indicating whether to + * Whether to validate EDI types. + * @property {boolean} validateXsdTypes The value indicating whether to + * Whether to validate XSD types. + * @property {boolean} allowLeadingAndTrailingSpacesAndZeroes The value * indicating whether to allow leading and trailing spaces and zeroes. - * @member {boolean} trimLeadingAndTrailingSpacesAndZeroes The value + * @property {boolean} trimLeadingAndTrailingSpacesAndZeroes The value * indicating whether to trim leading and trailing spaces and zeroes. - * @member {string} trailingSeparatorPolicy The trailing separator policy. + * @property {string} trailingSeparatorPolicy The trailing separator policy. * Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', * 'Mandatory' */ diff --git a/lib/services/logicManagement/lib/models/errorInfo.js b/lib/services/logicManagement/lib/models/errorInfo.js index 441a6d7c45..2f1ab4c503 100644 --- a/lib/services/logicManagement/lib/models/errorInfo.js +++ b/lib/services/logicManagement/lib/models/errorInfo.js @@ -17,7 +17,7 @@ class ErrorInfo { /** * Create a ErrorInfo. - * @member {string} code The error code. + * @property {string} code The error code. */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/errorProperties.js b/lib/services/logicManagement/lib/models/errorProperties.js index dc7d907230..742fb05211 100644 --- a/lib/services/logicManagement/lib/models/errorProperties.js +++ b/lib/services/logicManagement/lib/models/errorProperties.js @@ -18,8 +18,8 @@ class ErrorProperties { /** * Create a ErrorProperties. - * @member {string} [code] Error code. - * @member {string} [message] Error message indicating why the operation + * @property {string} [code] Error code. + * @property {string} [message] Error message indicating why the operation * failed. */ constructor() { diff --git a/lib/services/logicManagement/lib/models/errorResponse.js b/lib/services/logicManagement/lib/models/errorResponse.js index 4237e9f11c..99717e581e 100644 --- a/lib/services/logicManagement/lib/models/errorResponse.js +++ b/lib/services/logicManagement/lib/models/errorResponse.js @@ -18,9 +18,9 @@ class ErrorResponse { /** * Create a ErrorResponse. - * @member {object} [error] The error properties. - * @member {string} [error.code] Error code. - * @member {string} [error.message] Error message indicating why the + * @property {object} [error] The error properties. + * @property {string} [error.code] Error code. + * @property {string} [error.message] Error message indicating why the * operation failed. */ constructor() { diff --git a/lib/services/logicManagement/lib/models/expression.js b/lib/services/logicManagement/lib/models/expression.js index 98fdbfb6d2..a75ab40ad8 100644 --- a/lib/services/logicManagement/lib/models/expression.js +++ b/lib/services/logicManagement/lib/models/expression.js @@ -16,12 +16,12 @@ class Expression { /** * Create a Expression. - * @member {string} [text] - * @member {object} [value] - * @member {array} [subexpressions] - * @member {object} [error] - * @member {string} [error.message] The error message. - * @member {array} [error.details] The error details. + * @property {string} [text] + * @property {object} [value] + * @property {array} [subexpressions] + * @property {object} [error] + * @property {string} [error.message] The error message. + * @property {array} [error.details] The error details. */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/expressionRoot.js b/lib/services/logicManagement/lib/models/expressionRoot.js index 6d24d0396b..6357fb6743 100644 --- a/lib/services/logicManagement/lib/models/expressionRoot.js +++ b/lib/services/logicManagement/lib/models/expressionRoot.js @@ -19,7 +19,7 @@ const models = require('./index'); class ExpressionRoot extends models['Expression'] { /** * Create a ExpressionRoot. - * @member {string} [path] The path. + * @property {string} [path] The path. */ constructor() { super(); diff --git a/lib/services/logicManagement/lib/models/expressionTraces.js b/lib/services/logicManagement/lib/models/expressionTraces.js index 4159b8fcda..acb740499d 100644 --- a/lib/services/logicManagement/lib/models/expressionTraces.js +++ b/lib/services/logicManagement/lib/models/expressionTraces.js @@ -16,7 +16,7 @@ class ExpressionTraces extends Array { /** * Create a ExpressionTraces. - * @member {array} [inputs] + * @property {array} [inputs] */ constructor() { super(); diff --git a/lib/services/logicManagement/lib/models/generateUpgradedDefinitionParameters.js b/lib/services/logicManagement/lib/models/generateUpgradedDefinitionParameters.js index 5661de518c..df2f728342 100644 --- a/lib/services/logicManagement/lib/models/generateUpgradedDefinitionParameters.js +++ b/lib/services/logicManagement/lib/models/generateUpgradedDefinitionParameters.js @@ -17,7 +17,7 @@ class GenerateUpgradedDefinitionParameters { /** * Create a GenerateUpgradedDefinitionParameters. - * @member {string} [targetSchemaVersion] The target schema version. + * @property {string} [targetSchemaVersion] The target schema version. */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/getCallbackUrlParameters.js b/lib/services/logicManagement/lib/models/getCallbackUrlParameters.js index 885a74e49a..2027398dfa 100644 --- a/lib/services/logicManagement/lib/models/getCallbackUrlParameters.js +++ b/lib/services/logicManagement/lib/models/getCallbackUrlParameters.js @@ -17,8 +17,8 @@ class GetCallbackUrlParameters { /** * Create a GetCallbackUrlParameters. - * @member {date} [notAfter] The expiry time. - * @member {string} [keyType] The key type. Possible values include: + * @property {date} [notAfter] The expiry time. + * @property {string} [keyType] The key type. Possible values include: * 'NotSpecified', 'Primary', 'Secondary' */ constructor() { diff --git a/lib/services/logicManagement/lib/models/index.d.ts b/lib/services/logicManagement/lib/models/index.d.ts index 111214b220..3890f4e527 100644 --- a/lib/services/logicManagement/lib/models/index.d.ts +++ b/lib/services/logicManagement/lib/models/index.d.ts @@ -1,8045 +1,2830 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { BaseResource } from 'ms-rest-azure'; -import { CloudError } from 'ms-rest-azure'; -import * as moment from 'moment'; +import { BaseResource, CloudError } from "ms-rest-azure"; +import * as moment from "moment"; -export { BaseResource } from 'ms-rest-azure'; -export { CloudError } from 'ms-rest-azure'; +export { + BaseResource, + CloudError +}; /** - * @class - * Initializes a new instance of the Resource class. - * @constructor * The base resource type. - * - * @member {string} [id] The resource id. - * @member {string} [name] Gets the resource name. - * @member {string} [type] Gets the resource type. - * @member {string} [location] The resource location. - * @member {object} [tags] The resource tags. */ export interface Resource extends BaseResource { + /** + * The resource id. + */ readonly id?: string; + /** + * Gets the resource name. + */ readonly name?: string; + /** + * Gets the resource type. + */ readonly type?: string; + /** + * The resource location. + */ location?: string; + /** + * The resource tags. + */ tags?: { [propertyName: string]: string }; } /** - * @class - * Initializes a new instance of the SubResource class. - * @constructor * The sub resource type. - * - * @member {string} [id] The resource id. */ export interface SubResource extends BaseResource { + /** + * The resource id. + */ readonly id?: string; } /** - * @class - * Initializes a new instance of the ResourceReference class. - * @constructor * The resource reference. - * - * @member {string} [id] The resource id. - * @member {string} [name] Gets the resource name. - * @member {string} [type] Gets the resource type. */ export interface ResourceReference { - readonly id?: string; + /** + * The resource id. + */ + id?: string; + /** + * Gets the resource name. + */ readonly name?: string; + /** + * Gets the resource type. + */ readonly type?: string; } /** - * @class - * Initializes a new instance of the Sku class. - * @constructor * The sku type. - * - * @member {string} name The name. Possible values include: 'NotSpecified', - * 'Free', 'Shared', 'Basic', 'Standard', 'Premium' - * @member {object} [plan] The reference to plan. - * @member {string} [plan.id] The resource id. - * @member {string} [plan.name] Gets the resource name. - * @member {string} [plan.type] Gets the resource type. */ export interface Sku { + /** + * The name. Possible values include: 'NotSpecified', 'Free', 'Shared', 'Basic', 'Standard', + * 'Premium' + */ name: string; + /** + * The reference to plan. + */ plan?: ResourceReference; } /** - * @class - * Initializes a new instance of the WorkflowParameter class. - * @constructor * The workflow parameters. - * - * @member {string} [type] The type. Possible values include: 'NotSpecified', - * 'String', 'SecureString', 'Int', 'Float', 'Bool', 'Array', 'Object', - * 'SecureObject' - * @member {object} [value] The value. - * @member {object} [metadata] The metadata. - * @member {string} [description] The description. */ export interface WorkflowParameter { + /** + * The type. Possible values include: 'NotSpecified', 'String', 'SecureString', 'Int', 'Float', + * 'Bool', 'Array', 'Object', 'SecureObject' + */ type?: string; + /** + * The value. + */ value?: any; + /** + * The metadata. + */ metadata?: any; + /** + * The description. + */ description?: string; } /** - * @class - * Initializes a new instance of the Workflow class. - * @constructor * The workflow type. - * - * @member {string} [provisioningState] Gets the provisioning state. Possible - * values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', 'Creating', - * 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', 'Succeeded', - * 'Moving', 'Updating', 'Registering', 'Registered', 'Unregistering', - * 'Unregistered', 'Completed' - * @member {date} [createdTime] Gets the created time. - * @member {date} [changedTime] Gets the changed time. - * @member {string} [state] The state. Possible values include: 'NotSpecified', - * 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' - * @member {string} [version] Gets the version. - * @member {string} [accessEndpoint] Gets the access endpoint. - * @member {object} [sku] The sku. - * @member {string} [sku.name] The name. Possible values include: - * 'NotSpecified', 'Free', 'Shared', 'Basic', 'Standard', 'Premium' - * @member {object} [sku.plan] The reference to plan. - * @member {string} [sku.plan.id] The resource id. - * @member {string} [sku.plan.name] Gets the resource name. - * @member {string} [sku.plan.type] Gets the resource type. - * @member {object} [integrationAccount] The integration account. - * @member {string} [integrationAccount.id] The resource id. - * @member {string} [integrationAccount.name] Gets the resource name. - * @member {string} [integrationAccount.type] Gets the resource type. - * @member {object} [definition] The definition. - * @member {object} [parameters] The parameters. */ export interface Workflow extends Resource { + /** + * Gets the provisioning state. Possible values include: 'NotSpecified', 'Accepted', 'Running', + * 'Ready', 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', 'Succeeded', + * 'Moving', 'Updating', 'Registering', 'Registered', 'Unregistering', 'Unregistered', + * 'Completed' + */ readonly provisioningState?: string; + /** + * Gets the created time. + */ readonly createdTime?: Date; + /** + * Gets the changed time. + */ readonly changedTime?: Date; + /** + * The state. Possible values include: 'NotSpecified', 'Completed', 'Enabled', 'Disabled', + * 'Deleted', 'Suspended' + */ state?: string; + /** + * Gets the version. + */ readonly version?: string; + /** + * Gets the access endpoint. + */ readonly accessEndpoint?: string; + /** + * The sku. + */ sku?: Sku; + /** + * The integration account. + */ integrationAccount?: ResourceReference; + /** + * The definition. + */ definition?: any; + /** + * The parameters. + */ parameters?: { [propertyName: string]: WorkflowParameter }; } /** - * @class - * Initializes a new instance of the WorkflowFilter class. - * @constructor * The workflow filter. - * - * @member {string} [state] The state of workflows. Possible values include: - * 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' */ export interface WorkflowFilter { + /** + * The state of workflows. Possible values include: 'NotSpecified', 'Completed', 'Enabled', + * 'Disabled', 'Deleted', 'Suspended' + */ state?: string; } /** - * @class - * Initializes a new instance of the WorkflowVersion class. - * @constructor * The workflow version. - * - * @member {date} [createdTime] Gets the created time. - * @member {date} [changedTime] Gets the changed time. - * @member {string} [state] The state. Possible values include: 'NotSpecified', - * 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' - * @member {string} [version] Gets the version. - * @member {string} [accessEndpoint] Gets the access endpoint. - * @member {object} [sku] The sku. - * @member {string} [sku.name] The name. Possible values include: - * 'NotSpecified', 'Free', 'Shared', 'Basic', 'Standard', 'Premium' - * @member {object} [sku.plan] The reference to plan. - * @member {string} [sku.plan.id] The resource id. - * @member {string} [sku.plan.name] Gets the resource name. - * @member {string} [sku.plan.type] Gets the resource type. - * @member {object} [integrationAccount] The integration account. - * @member {string} [integrationAccount.id] The resource id. - * @member {string} [integrationAccount.name] Gets the resource name. - * @member {string} [integrationAccount.type] Gets the resource type. - * @member {object} [definition] The definition. - * @member {object} [parameters] The parameters. */ export interface WorkflowVersion extends Resource { + /** + * Gets the created time. + */ readonly createdTime?: Date; + /** + * Gets the changed time. + */ readonly changedTime?: Date; + /** + * The state. Possible values include: 'NotSpecified', 'Completed', 'Enabled', 'Disabled', + * 'Deleted', 'Suspended' + */ state?: string; + /** + * Gets the version. + */ readonly version?: string; + /** + * Gets the access endpoint. + */ readonly accessEndpoint?: string; + /** + * The sku. + */ sku?: Sku; + /** + * The integration account. + */ integrationAccount?: ResourceReference; + /** + * The definition. + */ definition?: any; + /** + * The parameters. + */ parameters?: { [propertyName: string]: WorkflowParameter }; } /** - * @class - * Initializes a new instance of the RecurrenceScheduleOccurrence class. - * @constructor * The recurrence schedule occurrence. - * - * @member {string} [day] The day of the week. Possible values include: - * 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' - * @member {number} [occurrence] The occurrence. */ export interface RecurrenceScheduleOccurrence { + /** + * The day of the week. Possible values include: 'Sunday', 'Monday', 'Tuesday', 'Wednesday', + * 'Thursday', 'Friday', 'Saturday' + */ day?: string; + /** + * The occurrence. + */ occurrence?: number; } /** - * @class - * Initializes a new instance of the RecurrenceSchedule class. - * @constructor * The recurrence schedule. - * - * @member {array} [minutes] The minutes. - * @member {array} [hours] The hours. - * @member {array} [weekDays] The days of the week. - * @member {array} [monthDays] The month days. - * @member {array} [monthlyOccurrences] The monthly occurrences. */ export interface RecurrenceSchedule { + /** + * The minutes. + */ minutes?: number[]; + /** + * The hours. + */ hours?: number[]; + /** + * The days of the week. + */ weekDays?: string[]; + /** + * The month days. + */ monthDays?: number[]; + /** + * The monthly occurrences. + */ monthlyOccurrences?: RecurrenceScheduleOccurrence[]; } /** - * @class - * Initializes a new instance of the WorkflowTriggerRecurrence class. - * @constructor * The workflow trigger recurrence. - * - * @member {string} [frequency] The frequency. Possible values include: - * 'NotSpecified', 'Second', 'Minute', 'Hour', 'Day', 'Week', 'Month', 'Year' - * @member {number} [interval] The interval. - * @member {string} [startTime] The start time. - * @member {string} [endTime] The end time. - * @member {string} [timeZone] The time zone. - * @member {object} [schedule] The recurrence schedule. - * @member {array} [schedule.minutes] The minutes. - * @member {array} [schedule.hours] The hours. - * @member {array} [schedule.weekDays] The days of the week. - * @member {array} [schedule.monthDays] The month days. - * @member {array} [schedule.monthlyOccurrences] The monthly occurrences. */ export interface WorkflowTriggerRecurrence { + /** + * The frequency. Possible values include: 'NotSpecified', 'Second', 'Minute', 'Hour', 'Day', + * 'Week', 'Month', 'Year' + */ frequency?: string; + /** + * The interval. + */ interval?: number; + /** + * The start time. + */ startTime?: string; + /** + * The end time. + */ endTime?: string; + /** + * The time zone. + */ timeZone?: string; + /** + * The recurrence schedule. + */ schedule?: RecurrenceSchedule; } /** - * @class - * Initializes a new instance of the WorkflowTrigger class. - * @constructor * The workflow trigger. - * - * @member {string} [provisioningState] Gets the provisioning state. Possible - * values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', 'Creating', - * 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', 'Succeeded', - * 'Moving', 'Updating', 'Registering', 'Registered', 'Unregistering', - * 'Unregistered', 'Completed' - * @member {date} [createdTime] Gets the created time. - * @member {date} [changedTime] Gets the changed time. - * @member {string} [state] Gets the state. Possible values include: - * 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' - * @member {string} [status] Gets the status. Possible values include: - * 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', - * 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', - * 'Ignored' - * @member {date} [lastExecutionTime] Gets the last execution time. - * @member {date} [nextExecutionTime] Gets the next execution time. - * @member {object} [recurrence] Gets the workflow trigger recurrence. - * @member {string} [recurrence.frequency] The frequency. Possible values - * include: 'NotSpecified', 'Second', 'Minute', 'Hour', 'Day', 'Week', 'Month', - * 'Year' - * @member {number} [recurrence.interval] The interval. - * @member {string} [recurrence.startTime] The start time. - * @member {string} [recurrence.endTime] The end time. - * @member {string} [recurrence.timeZone] The time zone. - * @member {object} [recurrence.schedule] The recurrence schedule. - * @member {array} [recurrence.schedule.minutes] The minutes. - * @member {array} [recurrence.schedule.hours] The hours. - * @member {array} [recurrence.schedule.weekDays] The days of the week. - * @member {array} [recurrence.schedule.monthDays] The month days. - * @member {array} [recurrence.schedule.monthlyOccurrences] The monthly - * occurrences. - * @member {object} [workflow] Gets the reference to workflow. - * @member {string} [workflow.id] The resource id. - * @member {string} [workflow.name] Gets the resource name. - * @member {string} [workflow.type] Gets the resource type. - * @member {string} [name] Gets the workflow trigger name. - * @member {string} [type] Gets the workflow trigger type. */ export interface WorkflowTrigger extends SubResource { + /** + * Gets the provisioning state. Possible values include: 'NotSpecified', 'Accepted', 'Running', + * 'Ready', 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', 'Succeeded', + * 'Moving', 'Updating', 'Registering', 'Registered', 'Unregistering', 'Unregistered', + * 'Completed' + */ readonly provisioningState?: string; + /** + * Gets the created time. + */ readonly createdTime?: Date; + /** + * Gets the changed time. + */ readonly changedTime?: Date; + /** + * Gets the state. Possible values include: 'NotSpecified', 'Completed', 'Enabled', 'Disabled', + * 'Deleted', 'Suspended' + */ readonly state?: string; + /** + * Gets the status. Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', + * 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', + * 'Ignored' + */ readonly status?: string; + /** + * Gets the last execution time. + */ readonly lastExecutionTime?: Date; + /** + * Gets the next execution time. + */ readonly nextExecutionTime?: Date; + /** + * Gets the workflow trigger recurrence. + */ readonly recurrence?: WorkflowTriggerRecurrence; + /** + * Gets the reference to workflow. + */ readonly workflow?: ResourceReference; + /** + * Gets the workflow trigger name. + */ readonly name?: string; + /** + * Gets the workflow trigger type. + */ readonly type?: string; } /** - * @class - * Initializes a new instance of the WorkflowTriggerFilter class. - * @constructor * The workflow trigger filter. - * - * @member {string} [state] The state of workflow trigger. Possible values - * include: 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', - * 'Suspended' */ export interface WorkflowTriggerFilter { + /** + * The state of workflow trigger. Possible values include: 'NotSpecified', 'Completed', + * 'Enabled', 'Disabled', 'Deleted', 'Suspended' + */ state?: string; } /** - * @class - * Initializes a new instance of the WorkflowTriggerListCallbackUrlQueries class. - * @constructor * Gets the workflow trigger callback URL query parameters. - * - * @member {string} [apiVersion] The api version. - * @member {string} [sp] The SAS permissions. - * @member {string} [sv] The SAS version. - * @member {string} [sig] The SAS signature. - * @member {string} [se] The SAS timestamp. */ export interface WorkflowTriggerListCallbackUrlQueries { + /** + * The api version. + */ apiVersion?: string; + /** + * The SAS permissions. + */ sp?: string; + /** + * The SAS version. + */ sv?: string; + /** + * The SAS signature. + */ sig?: string; + /** + * The SAS timestamp. + */ se?: string; } /** - * @class - * Initializes a new instance of the WorkflowTriggerCallbackUrl class. - * @constructor * The workflow trigger callback URL. - * - * @member {string} [value] Gets the workflow trigger callback URL. - * @member {string} [method] Gets the workflow trigger callback URL HTTP - * method. - * @member {string} [basePath] Gets the workflow trigger callback URL base - * path. - * @member {string} [relativePath] Gets the workflow trigger callback URL - * relative path. - * @member {array} [relativePathParameters] Gets the workflow trigger callback - * URL relative path parameters. - * @member {object} [queries] Gets the workflow trigger callback URL query - * parameters. - * @member {string} [queries.apiVersion] The api version. - * @member {string} [queries.sp] The SAS permissions. - * @member {string} [queries.sv] The SAS version. - * @member {string} [queries.sig] The SAS signature. - * @member {string} [queries.se] The SAS timestamp. */ export interface WorkflowTriggerCallbackUrl { + /** + * Gets the workflow trigger callback URL. + */ readonly value?: string; + /** + * Gets the workflow trigger callback URL HTTP method. + */ readonly method?: string; + /** + * Gets the workflow trigger callback URL base path. + */ readonly basePath?: string; + /** + * Gets the workflow trigger callback URL relative path. + */ readonly relativePath?: string; + /** + * Gets the workflow trigger callback URL relative path parameters. + */ relativePathParameters?: string[]; + /** + * Gets the workflow trigger callback URL query parameters. + */ queries?: WorkflowTriggerListCallbackUrlQueries; } /** - * @class - * Initializes a new instance of the Correlation class. - * @constructor * The correlation property. - * - * @member {string} [clientTrackingId] The client tracking id. */ export interface Correlation { + /** + * The client tracking id. + */ clientTrackingId?: string; } /** - * @class - * Initializes a new instance of the ContentHash class. - * @constructor * The content hash. - * - * @member {string} [algorithm] The algorithm of the content hash. - * @member {string} [value] The value of the content hash. */ export interface ContentHash { + /** + * The algorithm of the content hash. + */ algorithm?: string; + /** + * The value of the content hash. + */ value?: string; } /** - * @class - * Initializes a new instance of the ContentLink class. - * @constructor * The content link. - * - * @member {string} [uri] The content link URI. - * @member {string} [contentVersion] The content version. - * @member {number} [contentSize] The content size. - * @member {object} [contentHash] The content hash. - * @member {string} [contentHash.algorithm] The algorithm of the content hash. - * @member {string} [contentHash.value] The value of the content hash. - * @member {object} [metadata] The metadata. */ export interface ContentLink { + /** + * The content link URI. + */ uri?: string; + /** + * The content version. + */ contentVersion?: string; + /** + * The content size. + */ contentSize?: number; + /** + * The content hash. + */ contentHash?: ContentHash; + /** + * The metadata. + */ metadata?: any; } /** - * @class - * Initializes a new instance of the WorkflowTriggerHistory class. - * @constructor * The workflow trigger history. - * - * @member {date} [startTime] Gets the start time. - * @member {date} [endTime] Gets the end time. - * @member {string} [status] Gets the status. Possible values include: - * 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', - * 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', - * 'Ignored' - * @member {string} [code] Gets the code. - * @member {object} [error] Gets the error. - * @member {string} [trackingId] Gets the tracking id. - * @member {object} [correlation] The run correlation. - * @member {string} [correlation.clientTrackingId] The client tracking id. - * @member {object} [inputsLink] Gets the link to input parameters. - * @member {string} [inputsLink.uri] The content link URI. - * @member {string} [inputsLink.contentVersion] The content version. - * @member {number} [inputsLink.contentSize] The content size. - * @member {object} [inputsLink.contentHash] The content hash. - * @member {string} [inputsLink.contentHash.algorithm] The algorithm of the - * content hash. - * @member {string} [inputsLink.contentHash.value] The value of the content - * hash. - * @member {object} [inputsLink.metadata] The metadata. - * @member {object} [outputsLink] Gets the link to output parameters. - * @member {string} [outputsLink.uri] The content link URI. - * @member {string} [outputsLink.contentVersion] The content version. - * @member {number} [outputsLink.contentSize] The content size. - * @member {object} [outputsLink.contentHash] The content hash. - * @member {string} [outputsLink.contentHash.algorithm] The algorithm of the - * content hash. - * @member {string} [outputsLink.contentHash.value] The value of the content - * hash. - * @member {object} [outputsLink.metadata] The metadata. - * @member {boolean} [fired] Gets a value indicating whether trigger was fired. - * @member {object} [run] Gets the reference to workflow run. - * @member {string} [run.id] The resource id. - * @member {string} [run.name] Gets the resource name. - * @member {string} [run.type] Gets the resource type. - * @member {string} [name] Gets the workflow trigger history name. - * @member {string} [type] Gets the workflow trigger history type. */ export interface WorkflowTriggerHistory extends SubResource { + /** + * Gets the start time. + */ readonly startTime?: Date; + /** + * Gets the end time. + */ readonly endTime?: Date; + /** + * Gets the status. Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', + * 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', + * 'Ignored' + */ readonly status?: string; + /** + * Gets the code. + */ readonly code?: string; + /** + * Gets the error. + */ readonly error?: any; + /** + * Gets the tracking id. + */ readonly trackingId?: string; + /** + * The run correlation. + */ correlation?: Correlation; + /** + * Gets the link to input parameters. + */ readonly inputsLink?: ContentLink; + /** + * Gets the link to output parameters. + */ readonly outputsLink?: ContentLink; + /** + * Gets a value indicating whether trigger was fired. + */ readonly fired?: boolean; + /** + * Gets the reference to workflow run. + */ readonly run?: ResourceReference; + /** + * Gets the workflow trigger history name. + */ readonly name?: string; + /** + * Gets the workflow trigger history type. + */ readonly type?: string; } /** - * @class - * Initializes a new instance of the WorkflowTriggerHistoryFilter class. - * @constructor * The workflow trigger history filter. - * - * @member {string} [status] The status of workflow trigger history. Possible - * values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', - * 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', - * 'Aborted', 'Ignored' */ export interface WorkflowTriggerHistoryFilter { + /** + * The status of workflow trigger history. Possible values include: 'NotSpecified', 'Paused', + * 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', + * 'TimedOut', 'Aborted', 'Ignored' + */ status?: string; } /** - * @class - * Initializes a new instance of the WorkflowRunTrigger class. - * @constructor * The workflow run trigger. - * - * @member {string} [name] Gets the name. - * @member {object} [inputs] Gets the inputs. - * @member {object} [inputsLink] Gets the link to inputs. - * @member {string} [inputsLink.uri] The content link URI. - * @member {string} [inputsLink.contentVersion] The content version. - * @member {number} [inputsLink.contentSize] The content size. - * @member {object} [inputsLink.contentHash] The content hash. - * @member {string} [inputsLink.contentHash.algorithm] The algorithm of the - * content hash. - * @member {string} [inputsLink.contentHash.value] The value of the content - * hash. - * @member {object} [inputsLink.metadata] The metadata. - * @member {object} [outputs] Gets the outputs. - * @member {object} [outputsLink] Gets the link to outputs. - * @member {string} [outputsLink.uri] The content link URI. - * @member {string} [outputsLink.contentVersion] The content version. - * @member {number} [outputsLink.contentSize] The content size. - * @member {object} [outputsLink.contentHash] The content hash. - * @member {string} [outputsLink.contentHash.algorithm] The algorithm of the - * content hash. - * @member {string} [outputsLink.contentHash.value] The value of the content - * hash. - * @member {object} [outputsLink.metadata] The metadata. - * @member {date} [scheduledTime] Gets the scheduled time. - * @member {date} [startTime] Gets the start time. - * @member {date} [endTime] Gets the end time. - * @member {string} [trackingId] Gets the tracking id. - * @member {object} [correlation] The run correlation. - * @member {string} [correlation.clientTrackingId] The client tracking id. - * @member {string} [code] Gets the code. - * @member {string} [status] Gets the status. Possible values include: - * 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', - * 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', - * 'Ignored' - * @member {object} [error] Gets the error. - * @member {object} [trackedProperties] Gets the tracked properties. */ export interface WorkflowRunTrigger { + /** + * Gets the name. + */ readonly name?: string; + /** + * Gets the inputs. + */ readonly inputs?: any; + /** + * Gets the link to inputs. + */ readonly inputsLink?: ContentLink; + /** + * Gets the outputs. + */ readonly outputs?: any; + /** + * Gets the link to outputs. + */ readonly outputsLink?: ContentLink; + /** + * Gets the scheduled time. + */ readonly scheduledTime?: Date; + /** + * Gets the start time. + */ readonly startTime?: Date; + /** + * Gets the end time. + */ readonly endTime?: Date; + /** + * Gets the tracking id. + */ readonly trackingId?: string; + /** + * The run correlation. + */ correlation?: Correlation; + /** + * Gets the code. + */ readonly code?: string; + /** + * Gets the status. Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', + * 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', + * 'Ignored' + */ readonly status?: string; + /** + * Gets the error. + */ readonly error?: any; + /** + * Gets the tracked properties. + */ readonly trackedProperties?: any; } /** - * @class - * Initializes a new instance of the WorkflowOutputParameter class. - * @constructor * The workflow output parameter. - * - * @member {object} [error] Gets the error. */ export interface WorkflowOutputParameter extends WorkflowParameter { + /** + * Gets the error. + */ readonly error?: any; } /** - * @class - * Initializes a new instance of the WorkflowRun class. - * @constructor * The workflow run. - * - * @member {date} [waitEndTime] Gets the wait end time. - * @member {date} [startTime] Gets the start time. - * @member {date} [endTime] Gets the end time. - * @member {string} [status] Gets the status. Possible values include: - * 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', - * 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', - * 'Ignored' - * @member {string} [code] Gets the code. - * @member {object} [error] Gets the error. - * @member {string} [correlationId] Gets the correlation id. - * @member {object} [correlation] The run correlation. - * @member {string} [correlation.clientTrackingId] The client tracking id. - * @member {object} [workflow] Gets the reference to workflow version. - * @member {string} [workflow.id] The resource id. - * @member {string} [workflow.name] Gets the resource name. - * @member {string} [workflow.type] Gets the resource type. - * @member {object} [trigger] Gets the fired trigger. - * @member {string} [trigger.name] Gets the name. - * @member {object} [trigger.inputs] Gets the inputs. - * @member {object} [trigger.inputsLink] Gets the link to inputs. - * @member {string} [trigger.inputsLink.uri] The content link URI. - * @member {string} [trigger.inputsLink.contentVersion] The content version. - * @member {number} [trigger.inputsLink.contentSize] The content size. - * @member {object} [trigger.inputsLink.contentHash] The content hash. - * @member {string} [trigger.inputsLink.contentHash.algorithm] The algorithm of - * the content hash. - * @member {string} [trigger.inputsLink.contentHash.value] The value of the - * content hash. - * @member {object} [trigger.inputsLink.metadata] The metadata. - * @member {object} [trigger.outputs] Gets the outputs. - * @member {object} [trigger.outputsLink] Gets the link to outputs. - * @member {string} [trigger.outputsLink.uri] The content link URI. - * @member {string} [trigger.outputsLink.contentVersion] The content version. - * @member {number} [trigger.outputsLink.contentSize] The content size. - * @member {object} [trigger.outputsLink.contentHash] The content hash. - * @member {string} [trigger.outputsLink.contentHash.algorithm] The algorithm - * of the content hash. - * @member {string} [trigger.outputsLink.contentHash.value] The value of the - * content hash. - * @member {object} [trigger.outputsLink.metadata] The metadata. - * @member {date} [trigger.scheduledTime] Gets the scheduled time. - * @member {date} [trigger.startTime] Gets the start time. - * @member {date} [trigger.endTime] Gets the end time. - * @member {string} [trigger.trackingId] Gets the tracking id. - * @member {object} [trigger.correlation] The run correlation. - * @member {string} [trigger.correlation.clientTrackingId] The client tracking - * id. - * @member {string} [trigger.code] Gets the code. - * @member {string} [trigger.status] Gets the status. Possible values include: - * 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', - * 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', - * 'Ignored' - * @member {object} [trigger.error] Gets the error. - * @member {object} [trigger.trackedProperties] Gets the tracked properties. - * @member {object} [outputs] Gets the outputs. - * @member {object} [response] Gets the response of the flow run. - * @member {string} [response.name] Gets the name. - * @member {object} [response.inputs] Gets the inputs. - * @member {object} [response.inputsLink] Gets the link to inputs. - * @member {string} [response.inputsLink.uri] The content link URI. - * @member {string} [response.inputsLink.contentVersion] The content version. - * @member {number} [response.inputsLink.contentSize] The content size. - * @member {object} [response.inputsLink.contentHash] The content hash. - * @member {string} [response.inputsLink.contentHash.algorithm] The algorithm - * of the content hash. - * @member {string} [response.inputsLink.contentHash.value] The value of the - * content hash. - * @member {object} [response.inputsLink.metadata] The metadata. - * @member {object} [response.outputs] Gets the outputs. - * @member {object} [response.outputsLink] Gets the link to outputs. - * @member {string} [response.outputsLink.uri] The content link URI. - * @member {string} [response.outputsLink.contentVersion] The content version. - * @member {number} [response.outputsLink.contentSize] The content size. - * @member {object} [response.outputsLink.contentHash] The content hash. - * @member {string} [response.outputsLink.contentHash.algorithm] The algorithm - * of the content hash. - * @member {string} [response.outputsLink.contentHash.value] The value of the - * content hash. - * @member {object} [response.outputsLink.metadata] The metadata. - * @member {date} [response.scheduledTime] Gets the scheduled time. - * @member {date} [response.startTime] Gets the start time. - * @member {date} [response.endTime] Gets the end time. - * @member {string} [response.trackingId] Gets the tracking id. - * @member {object} [response.correlation] The run correlation. - * @member {string} [response.correlation.clientTrackingId] The client tracking - * id. - * @member {string} [response.code] Gets the code. - * @member {string} [response.status] Gets the status. Possible values include: - * 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', - * 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', - * 'Ignored' - * @member {object} [response.error] Gets the error. - * @member {object} [response.trackedProperties] Gets the tracked properties. - * @member {string} [name] Gets the workflow run name. - * @member {string} [type] Gets the workflow run type. */ export interface WorkflowRun extends SubResource { + /** + * Gets the wait end time. + */ readonly waitEndTime?: Date; + /** + * Gets the start time. + */ readonly startTime?: Date; + /** + * Gets the end time. + */ readonly endTime?: Date; + /** + * Gets the status. Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', + * 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', + * 'Ignored' + */ readonly status?: string; + /** + * Gets the code. + */ readonly code?: string; + /** + * Gets the error. + */ readonly error?: any; + /** + * Gets the correlation id. + */ readonly correlationId?: string; + /** + * The run correlation. + */ correlation?: Correlation; + /** + * Gets the reference to workflow version. + */ readonly workflow?: ResourceReference; + /** + * Gets the fired trigger. + */ readonly trigger?: WorkflowRunTrigger; + /** + * Gets the outputs. + */ readonly outputs?: { [propertyName: string]: WorkflowOutputParameter }; + /** + * Gets the response of the flow run. + */ readonly response?: WorkflowRunTrigger; + /** + * Gets the workflow run name. + */ readonly name?: string; + /** + * Gets the workflow run type. + */ readonly type?: string; } /** - * @class - * Initializes a new instance of the WorkflowRunFilter class. - * @constructor * The workflow run filter. - * - * @member {string} [status] The status of workflow run. Possible values - * include: 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', - * 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', - * 'Aborted', 'Ignored' */ export interface WorkflowRunFilter { + /** + * The status of workflow run. Possible values include: 'NotSpecified', 'Paused', 'Running', + * 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', + * 'Aborted', 'Ignored' + */ status?: string; } /** - * @class - * Initializes a new instance of the ErrorProperties class. - * @constructor - * Error properties indicate why the Logic service was not able to process the - * incoming request. The reason is provided in the error message. - * - * @member {string} [code] Error code. - * @member {string} [message] Error message indicating why the operation - * failed. + * Error properties indicate why the Logic service was not able to process the incoming request. + * The reason is provided in the error message. */ export interface ErrorProperties { + /** + * Error code. + */ code?: string; + /** + * Error message indicating why the operation failed. + */ message?: string; } /** - * @class - * Initializes a new instance of the ErrorResponse class. - * @constructor - * Error response indicates Logic service is not able to process the incoming - * request. The error property contains the error details. - * - * @member {object} [error] The error properties. - * @member {string} [error.code] Error code. - * @member {string} [error.message] Error message indicating why the operation - * failed. + * Error response indicates Logic service is not able to process the incoming request. The error + * property contains the error details. */ export interface ErrorResponse { + /** + * The error properties. + */ error?: ErrorProperties; } /** - * @class - * Initializes a new instance of the RetryHistory class. - * @constructor * The retry history. - * - * @member {date} [startTime] Gets the start time. - * @member {date} [endTime] Gets the end time. - * @member {string} [code] Gets the status code. - * @member {string} [clientRequestId] Gets the client request Id. - * @member {string} [serviceRequestId] Gets the service request Id. - * @member {object} [error] Gets the error response. - * @member {object} [error.error] The error properties. - * @member {string} [error.error.code] Error code. - * @member {string} [error.error.message] Error message indicating why the - * operation failed. */ export interface RetryHistory { + /** + * Gets the start time. + */ startTime?: Date; + /** + * Gets the end time. + */ endTime?: Date; + /** + * Gets the status code. + */ code?: string; + /** + * Gets the client request Id. + */ clientRequestId?: string; + /** + * Gets the service request Id. + */ serviceRequestId?: string; + /** + * Gets the error response. + */ error?: ErrorResponse; } /** - * @class - * Initializes a new instance of the WorkflowRunAction class. - * @constructor * The workflow run action. - * - * @member {date} [startTime] Gets the start time. - * @member {date} [endTime] Gets the end time. - * @member {string} [status] Gets the status. Possible values include: - * 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', - * 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', - * 'Ignored' - * @member {string} [code] Gets the code. - * @member {object} [error] Gets the error. - * @member {string} [trackingId] Gets the tracking id. - * @member {object} [correlation] The correlation properties. - * @member {string} [correlation.clientTrackingId] The client tracking id. - * @member {object} [inputsLink] Gets the link to inputs. - * @member {string} [inputsLink.uri] The content link URI. - * @member {string} [inputsLink.contentVersion] The content version. - * @member {number} [inputsLink.contentSize] The content size. - * @member {object} [inputsLink.contentHash] The content hash. - * @member {string} [inputsLink.contentHash.algorithm] The algorithm of the - * content hash. - * @member {string} [inputsLink.contentHash.value] The value of the content - * hash. - * @member {object} [inputsLink.metadata] The metadata. - * @member {object} [outputsLink] Gets the link to outputs. - * @member {string} [outputsLink.uri] The content link URI. - * @member {string} [outputsLink.contentVersion] The content version. - * @member {number} [outputsLink.contentSize] The content size. - * @member {object} [outputsLink.contentHash] The content hash. - * @member {string} [outputsLink.contentHash.algorithm] The algorithm of the - * content hash. - * @member {string} [outputsLink.contentHash.value] The value of the content - * hash. - * @member {object} [outputsLink.metadata] The metadata. - * @member {object} [trackedProperties] Gets the tracked properties. - * @member {array} [retryHistory] Gets the retry histories. - * @member {string} [name] Gets the workflow run action name. - * @member {string} [type] Gets the workflow run action type. */ export interface WorkflowRunAction extends SubResource { + /** + * Gets the start time. + */ readonly startTime?: Date; + /** + * Gets the end time. + */ readonly endTime?: Date; + /** + * Gets the status. Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', + * 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', + * 'Ignored' + */ readonly status?: string; + /** + * Gets the code. + */ readonly code?: string; + /** + * Gets the error. + */ readonly error?: any; + /** + * Gets the tracking id. + */ readonly trackingId?: string; + /** + * The correlation properties. + */ correlation?: Correlation; + /** + * Gets the link to inputs. + */ readonly inputsLink?: ContentLink; + /** + * Gets the link to outputs. + */ readonly outputsLink?: ContentLink; + /** + * Gets the tracked properties. + */ readonly trackedProperties?: any; + /** + * Gets the retry histories. + */ retryHistory?: RetryHistory[]; + /** + * Gets the workflow run action name. + */ readonly name?: string; + /** + * Gets the workflow run action type. + */ readonly type?: string; } /** - * @class - * Initializes a new instance of the WorkflowRunActionFilter class. - * @constructor * The workflow run action filter. - * - * @member {string} [status] The status of workflow run action. Possible values - * include: 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', - * 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', - * 'Aborted', 'Ignored' */ export interface WorkflowRunActionFilter { + /** + * The status of workflow run action. Possible values include: 'NotSpecified', 'Paused', + * 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', + * 'TimedOut', 'Aborted', 'Ignored' + */ status?: string; } /** - * @class - * Initializes a new instance of the RegenerateActionParameter class. - * @constructor * The access key regenerate action content. - * - * @member {string} [keyType] The key type. Possible values include: - * 'NotSpecified', 'Primary', 'Secondary' */ export interface RegenerateActionParameter { + /** + * The key type. Possible values include: 'NotSpecified', 'Primary', 'Secondary' + */ keyType?: string; } /** - * @class - * Initializes a new instance of the GenerateUpgradedDefinitionParameters class. - * @constructor * The parameters to generate upgraded definition. - * - * @member {string} [targetSchemaVersion] The target schema version. */ export interface GenerateUpgradedDefinitionParameters { + /** + * The target schema version. + */ targetSchemaVersion?: string; } /** - * @class - * Initializes a new instance of the IntegrationAccountSku class. - * @constructor * The integration account sku. - * - * @member {string} name The sku name. Possible values include: 'NotSpecified', - * 'Free', 'Basic', 'Standard' */ export interface IntegrationAccountSku { + /** + * The sku name. Possible values include: 'NotSpecified', 'Free', 'Basic', 'Standard' + */ name: string; } /** - * @class - * Initializes a new instance of the IntegrationAccount class. - * @constructor * The integration account. - * - * @member {object} [properties] The integration account properties. - * @member {object} [sku] The sku. - * @member {string} [sku.name] The sku name. Possible values include: - * 'NotSpecified', 'Free', 'Basic', 'Standard' */ export interface IntegrationAccount extends Resource { + /** + * The integration account properties. + */ properties?: any; + /** + * The sku. + */ sku?: IntegrationAccountSku; } /** - * @class - * Initializes a new instance of the GetCallbackUrlParameters class. - * @constructor * The callback url parameters. - * - * @member {date} [notAfter] The expiry time. - * @member {string} [keyType] The key type. Possible values include: - * 'NotSpecified', 'Primary', 'Secondary' */ export interface GetCallbackUrlParameters { + /** + * The expiry time. + */ notAfter?: Date; + /** + * The key type. Possible values include: 'NotSpecified', 'Primary', 'Secondary' + */ keyType?: string; } /** - * @class - * Initializes a new instance of the CallbackUrl class. - * @constructor * The callback url. - * - * @member {string} [value] The URL value. */ export interface CallbackUrl { + /** + * The URL value. + */ value?: string; } /** - * @class - * Initializes a new instance of the IntegrationAccountSchema class. - * @constructor * The integration account schema. - * - * @member {string} schemaType The schema type. Possible values include: - * 'NotSpecified', 'Xml' - * @member {string} [targetNamespace] The target namespace of the schema. - * @member {string} [documentName] The document name. - * @member {string} [fileName] The file name. - * @member {date} [createdTime] The created time. - * @member {date} [changedTime] The changed time. - * @member {object} [metadata] The metadata. - * @member {string} [content] The content. - * @member {string} [contentType] The content type. - * @member {object} [contentLink] The content link. - * @member {string} [contentLink.uri] The content link URI. - * @member {string} [contentLink.contentVersion] The content version. - * @member {number} [contentLink.contentSize] The content size. - * @member {object} [contentLink.contentHash] The content hash. - * @member {string} [contentLink.contentHash.algorithm] The algorithm of the - * content hash. - * @member {string} [contentLink.contentHash.value] The value of the content - * hash. - * @member {object} [contentLink.metadata] The metadata. */ export interface IntegrationAccountSchema extends Resource { + /** + * The schema type. Possible values include: 'NotSpecified', 'Xml' + */ schemaType: string; + /** + * The target namespace of the schema. + */ targetNamespace?: string; + /** + * The document name. + */ documentName?: string; + /** + * The file name. + */ fileName?: string; + /** + * The created time. + */ readonly createdTime?: Date; + /** + * The changed time. + */ readonly changedTime?: Date; + /** + * The metadata. + */ metadata?: any; + /** + * The content. + */ content?: string; + /** + * The content type. + */ contentType?: string; + /** + * The content link. + */ readonly contentLink?: ContentLink; } /** - * @class - * Initializes a new instance of the IntegrationAccountSchemaFilter class. - * @constructor * The integration account schema filter for odata query. - * - * @member {string} schemaType The schema type of integration account schema. - * Possible values include: 'NotSpecified', 'Xml' */ export interface IntegrationAccountSchemaFilter { + /** + * The schema type of integration account schema. Possible values include: 'NotSpecified', 'Xml' + */ schemaType: string; } /** - * @class - * Initializes a new instance of the IntegrationAccountMapPropertiesParametersSchema class. - * @constructor * The parameters schema of integration account map. - * - * @member {string} [ref] The reference name. */ export interface IntegrationAccountMapPropertiesParametersSchema { + /** + * The reference name. + */ ref?: string; } /** - * @class - * Initializes a new instance of the IntegrationAccountMap class. - * @constructor * The integration account map. - * - * @member {string} mapType The map type. Possible values include: - * 'NotSpecified', 'Xslt', 'Xslt20', 'Xslt30', 'Liquid' - * @member {object} [parametersSchema] The parameters schema of integration - * account map. - * @member {string} [parametersSchema.ref] The reference name. - * @member {date} [createdTime] The created time. - * @member {date} [changedTime] The changed time. - * @member {string} [content] The content. - * @member {string} [contentType] The content type. - * @member {object} [contentLink] The content link. - * @member {string} [contentLink.uri] The content link URI. - * @member {string} [contentLink.contentVersion] The content version. - * @member {number} [contentLink.contentSize] The content size. - * @member {object} [contentLink.contentHash] The content hash. - * @member {string} [contentLink.contentHash.algorithm] The algorithm of the - * content hash. - * @member {string} [contentLink.contentHash.value] The value of the content - * hash. - * @member {object} [contentLink.metadata] The metadata. - * @member {object} [metadata] The metadata. */ export interface IntegrationAccountMap extends Resource { + /** + * The map type. Possible values include: 'NotSpecified', 'Xslt', 'Xslt20', 'Xslt30', 'Liquid' + */ mapType: string; + /** + * The parameters schema of integration account map. + */ parametersSchema?: IntegrationAccountMapPropertiesParametersSchema; + /** + * The created time. + */ readonly createdTime?: Date; + /** + * The changed time. + */ readonly changedTime?: Date; + /** + * The content. + */ content?: string; + /** + * The content type. + */ contentType?: string; + /** + * The content link. + */ readonly contentLink?: ContentLink; + /** + * The metadata. + */ metadata?: any; } /** - * @class - * Initializes a new instance of the IntegrationAccountMapFilter class. - * @constructor * The integration account map filter for odata query. - * - * @member {string} mapType The map type of integration account map. Possible - * values include: 'NotSpecified', 'Xslt', 'Xslt20', 'Xslt30', 'Liquid' */ export interface IntegrationAccountMapFilter { + /** + * The map type of integration account map. Possible values include: 'NotSpecified', 'Xslt', + * 'Xslt20', 'Xslt30', 'Liquid' + */ mapType: string; } /** - * @class - * Initializes a new instance of the BusinessIdentity class. - * @constructor * The integration account partner's business identity. - * - * @member {string} qualifier The business identity qualifier e.g. as2identity, - * ZZ, ZZZ, 31, 32 - * @member {string} value The user defined business identity value. */ export interface BusinessIdentity { + /** + * The business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 + */ qualifier: string; + /** + * The user defined business identity value. + */ value: string; } /** - * @class - * Initializes a new instance of the B2BPartnerContent class. - * @constructor * The B2B partner content. - * - * @member {array} [businessIdentities] The list of partner business - * identities. */ export interface B2BPartnerContent { + /** + * The list of partner business identities. + */ businessIdentities?: BusinessIdentity[]; } /** - * @class - * Initializes a new instance of the PartnerContent class. - * @constructor * The integration account partner content. - * - * @member {object} [b2b] The B2B partner content. - * @member {array} [b2b.businessIdentities] The list of partner business - * identities. */ export interface PartnerContent { + /** + * The B2B partner content. + */ b2b?: B2BPartnerContent; } /** - * @class - * Initializes a new instance of the IntegrationAccountPartner class. - * @constructor * The integration account partner. - * - * @member {string} partnerType The partner type. Possible values include: - * 'NotSpecified', 'B2B' - * @member {date} [createdTime] The created time. - * @member {date} [changedTime] The changed time. - * @member {object} [metadata] The metadata. - * @member {object} content The partner content. - * @member {object} [content.b2b] The B2B partner content. - * @member {array} [content.b2b.businessIdentities] The list of partner - * business identities. */ export interface IntegrationAccountPartner extends Resource { + /** + * The partner type. Possible values include: 'NotSpecified', 'B2B' + */ partnerType: string; + /** + * The created time. + */ readonly createdTime?: Date; + /** + * The changed time. + */ readonly changedTime?: Date; + /** + * The metadata. + */ metadata?: any; + /** + * The partner content. + */ content: PartnerContent; } /** - * @class - * Initializes a new instance of the IntegrationAccountPartnerFilter class. - * @constructor * The integration account partner filter for odata query. - * - * @member {string} partnerType The partner type of integration account - * partner. Possible values include: 'NotSpecified', 'B2B' */ export interface IntegrationAccountPartnerFilter { + /** + * The partner type of integration account partner. Possible values include: 'NotSpecified', + * 'B2B' + */ partnerType: string; } /** - * @class - * Initializes a new instance of the AS2MessageConnectionSettings class. - * @constructor * The AS2 agreement message connection settings. - * - * @member {boolean} ignoreCertificateNameMismatch The value indicating whether - * to ignore mismatch in certificate name. - * @member {boolean} supportHttpStatusCodeContinue The value indicating whether - * to support HTTP status code 'CONTINUE'. - * @member {boolean} keepHttpConnectionAlive The value indicating whether to - * keep the connection alive. - * @member {boolean} unfoldHttpHeaders The value indicating whether to unfold - * the HTTP headers. */ export interface AS2MessageConnectionSettings { + /** + * The value indicating whether to ignore mismatch in certificate name. + */ ignoreCertificateNameMismatch: boolean; + /** + * The value indicating whether to support HTTP status code 'CONTINUE'. + */ supportHttpStatusCodeContinue: boolean; + /** + * The value indicating whether to keep the connection alive. + */ keepHttpConnectionAlive: boolean; + /** + * The value indicating whether to unfold the HTTP headers. + */ unfoldHttpHeaders: boolean; } /** - * @class - * Initializes a new instance of the AS2AcknowledgementConnectionSettings class. - * @constructor * The AS2 agreement acknowledgement connection settings. - * - * @member {boolean} ignoreCertificateNameMismatch The value indicating whether - * to ignore mismatch in certificate name. - * @member {boolean} supportHttpStatusCodeContinue The value indicating whether - * to support HTTP status code 'CONTINUE'. - * @member {boolean} keepHttpConnectionAlive The value indicating whether to - * keep the connection alive. - * @member {boolean} unfoldHttpHeaders The value indicating whether to unfold - * the HTTP headers. */ export interface AS2AcknowledgementConnectionSettings { + /** + * The value indicating whether to ignore mismatch in certificate name. + */ ignoreCertificateNameMismatch: boolean; + /** + * The value indicating whether to support HTTP status code 'CONTINUE'. + */ supportHttpStatusCodeContinue: boolean; + /** + * The value indicating whether to keep the connection alive. + */ keepHttpConnectionAlive: boolean; + /** + * The value indicating whether to unfold the HTTP headers. + */ unfoldHttpHeaders: boolean; } /** - * @class - * Initializes a new instance of the AS2MdnSettings class. - * @constructor * The AS2 agreement mdn settings. - * - * @member {boolean} needMdn The value indicating whether to send or request a - * MDN. - * @member {boolean} signMdn The value indicating whether the MDN needs to be - * signed or not. - * @member {boolean} sendMdnAsynchronously The value indicating whether to send - * the asynchronous MDN. - * @member {string} [receiptDeliveryUrl] The receipt delivery URL. - * @member {string} [dispositionNotificationTo] The disposition notification to - * header value. - * @member {boolean} signOutboundMdnIfOptional The value indicating whether to - * sign the outbound MDN if optional. - * @member {string} [mdnText] The MDN text. - * @member {boolean} sendInboundMdnToMessageBox The value indicating whether to - * send inbound MDN to message box. - * @member {string} micHashingAlgorithm The signing or hashing algorithm. - * Possible values include: 'NotSpecified', 'None', 'MD5', 'SHA1', 'SHA2256', - * 'SHA2384', 'SHA2512' */ export interface AS2MdnSettings { + /** + * The value indicating whether to send or request a MDN. + */ needMdn: boolean; + /** + * The value indicating whether the MDN needs to be signed or not. + */ signMdn: boolean; + /** + * The value indicating whether to send the asynchronous MDN. + */ sendMdnAsynchronously: boolean; + /** + * The receipt delivery URL. + */ receiptDeliveryUrl?: string; + /** + * The disposition notification to header value. + */ dispositionNotificationTo?: string; + /** + * The value indicating whether to sign the outbound MDN if optional. + */ signOutboundMdnIfOptional: boolean; + /** + * The MDN text. + */ mdnText?: string; + /** + * The value indicating whether to send inbound MDN to message box. + */ sendInboundMdnToMessageBox: boolean; + /** + * The signing or hashing algorithm. Possible values include: 'NotSpecified', 'None', 'MD5', + * 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512' + */ micHashingAlgorithm: string; } /** - * @class - * Initializes a new instance of the AS2SecuritySettings class. - * @constructor * The AS2 agreement security settings. - * - * @member {boolean} overrideGroupSigningCertificate The value indicating - * whether to send or request a MDN. - * @member {string} [signingCertificateName] The name of the signing - * certificate. - * @member {string} [encryptionCertificateName] The name of the encryption - * certificate. - * @member {boolean} enableNrrForInboundEncodedMessages The value indicating - * whether to enable NRR for inbound encoded messages. - * @member {boolean} enableNrrForInboundDecodedMessages The value indicating - * whether to enable NRR for inbound decoded messages. - * @member {boolean} enableNrrForOutboundMdn The value indicating whether to - * enable NRR for outbound MDN. - * @member {boolean} enableNrrForOutboundEncodedMessages The value indicating - * whether to enable NRR for outbound encoded messages. - * @member {boolean} enableNrrForOutboundDecodedMessages The value indicating - * whether to enable NRR for outbound decoded messages. - * @member {boolean} enableNrrForInboundMdn The value indicating whether to - * enable NRR for inbound MDN. - * @member {string} [sha2AlgorithmFormat] The Sha2 algorithm format. Valid - * values are Sha2, ShaHashSize, ShaHyphenHashSize, Sha2UnderscoreHashSize. */ export interface AS2SecuritySettings { + /** + * The value indicating whether to send or request a MDN. + */ overrideGroupSigningCertificate: boolean; + /** + * The name of the signing certificate. + */ signingCertificateName?: string; + /** + * The name of the encryption certificate. + */ encryptionCertificateName?: string; + /** + * The value indicating whether to enable NRR for inbound encoded messages. + */ enableNrrForInboundEncodedMessages: boolean; + /** + * The value indicating whether to enable NRR for inbound decoded messages. + */ enableNrrForInboundDecodedMessages: boolean; + /** + * The value indicating whether to enable NRR for outbound MDN. + */ enableNrrForOutboundMdn: boolean; + /** + * The value indicating whether to enable NRR for outbound encoded messages. + */ enableNrrForOutboundEncodedMessages: boolean; + /** + * The value indicating whether to enable NRR for outbound decoded messages. + */ enableNrrForOutboundDecodedMessages: boolean; + /** + * The value indicating whether to enable NRR for inbound MDN. + */ enableNrrForInboundMdn: boolean; + /** + * The Sha2 algorithm format. Valid values are Sha2, ShaHashSize, ShaHyphenHashSize, + * Sha2UnderscoreHashSize. + */ sha2AlgorithmFormat?: string; } /** - * @class - * Initializes a new instance of the AS2ValidationSettings class. - * @constructor * The AS2 agreement validation settings. - * - * @member {boolean} overrideMessageProperties The value indicating whether to - * override incoming message properties with those in agreement. - * @member {boolean} encryptMessage The value indicating whether the message - * has to be encrypted. - * @member {boolean} signMessage The value indicating whether the message has - * to be signed. - * @member {boolean} compressMessage The value indicating whether the message - * has to be compressed. - * @member {boolean} checkDuplicateMessage The value indicating whether to - * check for duplicate message. - * @member {number} interchangeDuplicatesValidityDays The number of days to - * look back for duplicate interchange. - * @member {boolean} checkCertificateRevocationListOnSend The value indicating - * whether to check for certificate revocation list on send. - * @member {boolean} checkCertificateRevocationListOnReceive The value - * indicating whether to check for certificate revocation list on receive. - * @member {string} encryptionAlgorithm The encryption algorithm. Possible - * values include: 'NotSpecified', 'None', 'DES3', 'RC2', 'AES128', 'AES192', - * 'AES256' - * @member {string} [signingAlgorithm] The signing algorithm. Possible values - * include: 'NotSpecified', 'Default', 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512' */ export interface AS2ValidationSettings { + /** + * The value indicating whether to override incoming message properties with those in agreement. + */ overrideMessageProperties: boolean; + /** + * The value indicating whether the message has to be encrypted. + */ encryptMessage: boolean; + /** + * The value indicating whether the message has to be signed. + */ signMessage: boolean; + /** + * The value indicating whether the message has to be compressed. + */ compressMessage: boolean; + /** + * The value indicating whether to check for duplicate message. + */ checkDuplicateMessage: boolean; + /** + * The number of days to look back for duplicate interchange. + */ interchangeDuplicatesValidityDays: number; + /** + * The value indicating whether to check for certificate revocation list on send. + */ checkCertificateRevocationListOnSend: boolean; + /** + * The value indicating whether to check for certificate revocation list on receive. + */ checkCertificateRevocationListOnReceive: boolean; + /** + * The encryption algorithm. Possible values include: 'NotSpecified', 'None', 'DES3', 'RC2', + * 'AES128', 'AES192', 'AES256' + */ encryptionAlgorithm: string; + /** + * The signing algorithm. Possible values include: 'NotSpecified', 'Default', 'SHA1', 'SHA2256', + * 'SHA2384', 'SHA2512' + */ signingAlgorithm?: string; } /** - * @class - * Initializes a new instance of the AS2EnvelopeSettings class. - * @constructor * The AS2 agreement envelope settings. - * - * @member {string} messageContentType The message content type. - * @member {boolean} transmitFileNameInMimeHeader The value indicating whether - * to transmit file name in mime header. - * @member {string} fileNameTemplate The template for file name. - * @member {boolean} suspendMessageOnFileNameGenerationError The value - * indicating whether to suspend message on file name generation error. - * @member {boolean} autogenerateFileName The value indicating whether to auto - * generate file name. */ export interface AS2EnvelopeSettings { + /** + * The message content type. + */ messageContentType: string; + /** + * The value indicating whether to transmit file name in mime header. + */ transmitFileNameInMimeHeader: boolean; + /** + * The template for file name. + */ fileNameTemplate: string; + /** + * The value indicating whether to suspend message on file name generation error. + */ suspendMessageOnFileNameGenerationError: boolean; + /** + * The value indicating whether to auto generate file name. + */ autogenerateFileName: boolean; } /** - * @class - * Initializes a new instance of the AS2ErrorSettings class. - * @constructor * The AS2 agreement error settings. - * - * @member {boolean} suspendDuplicateMessage The value indicating whether to - * suspend duplicate message. - * @member {boolean} resendIfMdnNotReceived The value indicating whether to - * resend message If MDN is not received. */ export interface AS2ErrorSettings { + /** + * The value indicating whether to suspend duplicate message. + */ suspendDuplicateMessage: boolean; + /** + * The value indicating whether to resend message If MDN is not received. + */ resendIfMdnNotReceived: boolean; } /** - * @class - * Initializes a new instance of the AS2ProtocolSettings class. - * @constructor * The AS2 agreement protocol settings. - * - * @member {object} messageConnectionSettings The message connection settings. - * @member {boolean} [messageConnectionSettings.ignoreCertificateNameMismatch] - * The value indicating whether to ignore mismatch in certificate name. - * @member {boolean} [messageConnectionSettings.supportHttpStatusCodeContinue] - * The value indicating whether to support HTTP status code 'CONTINUE'. - * @member {boolean} [messageConnectionSettings.keepHttpConnectionAlive] The - * value indicating whether to keep the connection alive. - * @member {boolean} [messageConnectionSettings.unfoldHttpHeaders] The value - * indicating whether to unfold the HTTP headers. - * @member {object} acknowledgementConnectionSettings The acknowledgement - * connection settings. - * @member {boolean} - * [acknowledgementConnectionSettings.ignoreCertificateNameMismatch] The value - * indicating whether to ignore mismatch in certificate name. - * @member {boolean} - * [acknowledgementConnectionSettings.supportHttpStatusCodeContinue] The value - * indicating whether to support HTTP status code 'CONTINUE'. - * @member {boolean} - * [acknowledgementConnectionSettings.keepHttpConnectionAlive] The value - * indicating whether to keep the connection alive. - * @member {boolean} [acknowledgementConnectionSettings.unfoldHttpHeaders] The - * value indicating whether to unfold the HTTP headers. - * @member {object} mdnSettings The MDN settings. - * @member {boolean} [mdnSettings.needMdn] The value indicating whether to send - * or request a MDN. - * @member {boolean} [mdnSettings.signMdn] The value indicating whether the MDN - * needs to be signed or not. - * @member {boolean} [mdnSettings.sendMdnAsynchronously] The value indicating - * whether to send the asynchronous MDN. - * @member {string} [mdnSettings.receiptDeliveryUrl] The receipt delivery URL. - * @member {string} [mdnSettings.dispositionNotificationTo] The disposition - * notification to header value. - * @member {boolean} [mdnSettings.signOutboundMdnIfOptional] The value - * indicating whether to sign the outbound MDN if optional. - * @member {string} [mdnSettings.mdnText] The MDN text. - * @member {boolean} [mdnSettings.sendInboundMdnToMessageBox] The value - * indicating whether to send inbound MDN to message box. - * @member {string} [mdnSettings.micHashingAlgorithm] The signing or hashing - * algorithm. Possible values include: 'NotSpecified', 'None', 'MD5', 'SHA1', - * 'SHA2256', 'SHA2384', 'SHA2512' - * @member {object} securitySettings The security settings. - * @member {boolean} [securitySettings.overrideGroupSigningCertificate] The - * value indicating whether to send or request a MDN. - * @member {string} [securitySettings.signingCertificateName] The name of the - * signing certificate. - * @member {string} [securitySettings.encryptionCertificateName] The name of - * the encryption certificate. - * @member {boolean} [securitySettings.enableNrrForInboundEncodedMessages] The - * value indicating whether to enable NRR for inbound encoded messages. - * @member {boolean} [securitySettings.enableNrrForInboundDecodedMessages] The - * value indicating whether to enable NRR for inbound decoded messages. - * @member {boolean} [securitySettings.enableNrrForOutboundMdn] The value - * indicating whether to enable NRR for outbound MDN. - * @member {boolean} [securitySettings.enableNrrForOutboundEncodedMessages] The - * value indicating whether to enable NRR for outbound encoded messages. - * @member {boolean} [securitySettings.enableNrrForOutboundDecodedMessages] The - * value indicating whether to enable NRR for outbound decoded messages. - * @member {boolean} [securitySettings.enableNrrForInboundMdn] The value - * indicating whether to enable NRR for inbound MDN. - * @member {string} [securitySettings.sha2AlgorithmFormat] The Sha2 algorithm - * format. Valid values are Sha2, ShaHashSize, ShaHyphenHashSize, - * Sha2UnderscoreHashSize. - * @member {object} validationSettings The validation settings. - * @member {boolean} [validationSettings.overrideMessageProperties] The value - * indicating whether to override incoming message properties with those in - * agreement. - * @member {boolean} [validationSettings.encryptMessage] The value indicating - * whether the message has to be encrypted. - * @member {boolean} [validationSettings.signMessage] The value indicating - * whether the message has to be signed. - * @member {boolean} [validationSettings.compressMessage] The value indicating - * whether the message has to be compressed. - * @member {boolean} [validationSettings.checkDuplicateMessage] The value - * indicating whether to check for duplicate message. - * @member {number} [validationSettings.interchangeDuplicatesValidityDays] The - * number of days to look back for duplicate interchange. - * @member {boolean} [validationSettings.checkCertificateRevocationListOnSend] - * The value indicating whether to check for certificate revocation list on - * send. - * @member {boolean} - * [validationSettings.checkCertificateRevocationListOnReceive] The value - * indicating whether to check for certificate revocation list on receive. - * @member {string} [validationSettings.encryptionAlgorithm] The encryption - * algorithm. Possible values include: 'NotSpecified', 'None', 'DES3', 'RC2', - * 'AES128', 'AES192', 'AES256' - * @member {string} [validationSettings.signingAlgorithm] The signing - * algorithm. Possible values include: 'NotSpecified', 'Default', 'SHA1', - * 'SHA2256', 'SHA2384', 'SHA2512' - * @member {object} envelopeSettings The envelope settings. - * @member {string} [envelopeSettings.messageContentType] The message content - * type. - * @member {boolean} [envelopeSettings.transmitFileNameInMimeHeader] The value - * indicating whether to transmit file name in mime header. - * @member {string} [envelopeSettings.fileNameTemplate] The template for file - * name. - * @member {boolean} [envelopeSettings.suspendMessageOnFileNameGenerationError] - * The value indicating whether to suspend message on file name generation - * error. - * @member {boolean} [envelopeSettings.autogenerateFileName] The value - * indicating whether to auto generate file name. - * @member {object} errorSettings The error settings. - * @member {boolean} [errorSettings.suspendDuplicateMessage] The value - * indicating whether to suspend duplicate message. - * @member {boolean} [errorSettings.resendIfMdnNotReceived] The value - * indicating whether to resend message If MDN is not received. */ export interface AS2ProtocolSettings { + /** + * The message connection settings. + */ messageConnectionSettings: AS2MessageConnectionSettings; + /** + * The acknowledgement connection settings. + */ acknowledgementConnectionSettings: AS2AcknowledgementConnectionSettings; + /** + * The MDN settings. + */ mdnSettings: AS2MdnSettings; + /** + * The security settings. + */ securitySettings: AS2SecuritySettings; + /** + * The validation settings. + */ validationSettings: AS2ValidationSettings; + /** + * The envelope settings. + */ envelopeSettings: AS2EnvelopeSettings; + /** + * The error settings. + */ errorSettings: AS2ErrorSettings; } /** - * @class - * Initializes a new instance of the AS2OneWayAgreement class. - * @constructor * The integration account AS2 one-way agreement. - * - * @member {object} senderBusinessIdentity The sender business identity - * @member {string} [senderBusinessIdentity.qualifier] The business identity - * qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [senderBusinessIdentity.value] The user defined business - * identity value. - * @member {object} receiverBusinessIdentity The receiver business identity - * @member {string} [receiverBusinessIdentity.qualifier] The business identity - * qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [receiverBusinessIdentity.value] The user defined business - * identity value. - * @member {object} protocolSettings The AS2 protocol settings. - * @member {object} [protocolSettings.messageConnectionSettings] The message - * connection settings. - * @member {boolean} - * [protocolSettings.messageConnectionSettings.ignoreCertificateNameMismatch] - * The value indicating whether to ignore mismatch in certificate name. - * @member {boolean} - * [protocolSettings.messageConnectionSettings.supportHttpStatusCodeContinue] - * The value indicating whether to support HTTP status code 'CONTINUE'. - * @member {boolean} - * [protocolSettings.messageConnectionSettings.keepHttpConnectionAlive] The - * value indicating whether to keep the connection alive. - * @member {boolean} - * [protocolSettings.messageConnectionSettings.unfoldHttpHeaders] The value - * indicating whether to unfold the HTTP headers. - * @member {object} [protocolSettings.acknowledgementConnectionSettings] The - * acknowledgement connection settings. - * @member {boolean} - * [protocolSettings.acknowledgementConnectionSettings.ignoreCertificateNameMismatch] - * The value indicating whether to ignore mismatch in certificate name. - * @member {boolean} - * [protocolSettings.acknowledgementConnectionSettings.supportHttpStatusCodeContinue] - * The value indicating whether to support HTTP status code 'CONTINUE'. - * @member {boolean} - * [protocolSettings.acknowledgementConnectionSettings.keepHttpConnectionAlive] - * The value indicating whether to keep the connection alive. - * @member {boolean} - * [protocolSettings.acknowledgementConnectionSettings.unfoldHttpHeaders] The - * value indicating whether to unfold the HTTP headers. - * @member {object} [protocolSettings.mdnSettings] The MDN settings. - * @member {boolean} [protocolSettings.mdnSettings.needMdn] The value - * indicating whether to send or request a MDN. - * @member {boolean} [protocolSettings.mdnSettings.signMdn] The value - * indicating whether the MDN needs to be signed or not. - * @member {boolean} [protocolSettings.mdnSettings.sendMdnAsynchronously] The - * value indicating whether to send the asynchronous MDN. - * @member {string} [protocolSettings.mdnSettings.receiptDeliveryUrl] The - * receipt delivery URL. - * @member {string} [protocolSettings.mdnSettings.dispositionNotificationTo] - * The disposition notification to header value. - * @member {boolean} [protocolSettings.mdnSettings.signOutboundMdnIfOptional] - * The value indicating whether to sign the outbound MDN if optional. - * @member {string} [protocolSettings.mdnSettings.mdnText] The MDN text. - * @member {boolean} [protocolSettings.mdnSettings.sendInboundMdnToMessageBox] - * The value indicating whether to send inbound MDN to message box. - * @member {string} [protocolSettings.mdnSettings.micHashingAlgorithm] The - * signing or hashing algorithm. Possible values include: 'NotSpecified', - * 'None', 'MD5', 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512' - * @member {object} [protocolSettings.securitySettings] The security settings. - * @member {boolean} - * [protocolSettings.securitySettings.overrideGroupSigningCertificate] The - * value indicating whether to send or request a MDN. - * @member {string} [protocolSettings.securitySettings.signingCertificateName] - * The name of the signing certificate. - * @member {string} - * [protocolSettings.securitySettings.encryptionCertificateName] The name of - * the encryption certificate. - * @member {boolean} - * [protocolSettings.securitySettings.enableNrrForInboundEncodedMessages] The - * value indicating whether to enable NRR for inbound encoded messages. - * @member {boolean} - * [protocolSettings.securitySettings.enableNrrForInboundDecodedMessages] The - * value indicating whether to enable NRR for inbound decoded messages. - * @member {boolean} - * [protocolSettings.securitySettings.enableNrrForOutboundMdn] The value - * indicating whether to enable NRR for outbound MDN. - * @member {boolean} - * [protocolSettings.securitySettings.enableNrrForOutboundEncodedMessages] The - * value indicating whether to enable NRR for outbound encoded messages. - * @member {boolean} - * [protocolSettings.securitySettings.enableNrrForOutboundDecodedMessages] The - * value indicating whether to enable NRR for outbound decoded messages. - * @member {boolean} [protocolSettings.securitySettings.enableNrrForInboundMdn] - * The value indicating whether to enable NRR for inbound MDN. - * @member {string} [protocolSettings.securitySettings.sha2AlgorithmFormat] The - * Sha2 algorithm format. Valid values are Sha2, ShaHashSize, - * ShaHyphenHashSize, Sha2UnderscoreHashSize. - * @member {object} [protocolSettings.validationSettings] The validation - * settings. - * @member {boolean} - * [protocolSettings.validationSettings.overrideMessageProperties] The value - * indicating whether to override incoming message properties with those in - * agreement. - * @member {boolean} [protocolSettings.validationSettings.encryptMessage] The - * value indicating whether the message has to be encrypted. - * @member {boolean} [protocolSettings.validationSettings.signMessage] The - * value indicating whether the message has to be signed. - * @member {boolean} [protocolSettings.validationSettings.compressMessage] The - * value indicating whether the message has to be compressed. - * @member {boolean} - * [protocolSettings.validationSettings.checkDuplicateMessage] The value - * indicating whether to check for duplicate message. - * @member {number} - * [protocolSettings.validationSettings.interchangeDuplicatesValidityDays] The - * number of days to look back for duplicate interchange. - * @member {boolean} - * [protocolSettings.validationSettings.checkCertificateRevocationListOnSend] - * The value indicating whether to check for certificate revocation list on - * send. - * @member {boolean} - * [protocolSettings.validationSettings.checkCertificateRevocationListOnReceive] - * The value indicating whether to check for certificate revocation list on - * receive. - * @member {string} [protocolSettings.validationSettings.encryptionAlgorithm] - * The encryption algorithm. Possible values include: 'NotSpecified', 'None', - * 'DES3', 'RC2', 'AES128', 'AES192', 'AES256' - * @member {string} [protocolSettings.validationSettings.signingAlgorithm] The - * signing algorithm. Possible values include: 'NotSpecified', 'Default', - * 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512' - * @member {object} [protocolSettings.envelopeSettings] The envelope settings. - * @member {string} [protocolSettings.envelopeSettings.messageContentType] The - * message content type. - * @member {boolean} - * [protocolSettings.envelopeSettings.transmitFileNameInMimeHeader] The value - * indicating whether to transmit file name in mime header. - * @member {string} [protocolSettings.envelopeSettings.fileNameTemplate] The - * template for file name. - * @member {boolean} - * [protocolSettings.envelopeSettings.suspendMessageOnFileNameGenerationError] - * The value indicating whether to suspend message on file name generation - * error. - * @member {boolean} [protocolSettings.envelopeSettings.autogenerateFileName] - * The value indicating whether to auto generate file name. - * @member {object} [protocolSettings.errorSettings] The error settings. - * @member {boolean} [protocolSettings.errorSettings.suspendDuplicateMessage] - * The value indicating whether to suspend duplicate message. - * @member {boolean} [protocolSettings.errorSettings.resendIfMdnNotReceived] - * The value indicating whether to resend message If MDN is not received. */ export interface AS2OneWayAgreement { + /** + * The sender business identity + */ senderBusinessIdentity: BusinessIdentity; + /** + * The receiver business identity + */ receiverBusinessIdentity: BusinessIdentity; + /** + * The AS2 protocol settings. + */ protocolSettings: AS2ProtocolSettings; } /** - * @class - * Initializes a new instance of the AS2AgreementContent class. - * @constructor * The integration account AS2 agreement content. - * - * @member {object} receiveAgreement The AS2 one-way receive agreement. - * @member {object} [receiveAgreement.senderBusinessIdentity] The sender - * business identity - * @member {string} [receiveAgreement.senderBusinessIdentity.qualifier] The - * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [receiveAgreement.senderBusinessIdentity.value] The user - * defined business identity value. - * @member {object} [receiveAgreement.receiverBusinessIdentity] The receiver - * business identity - * @member {string} [receiveAgreement.receiverBusinessIdentity.qualifier] The - * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [receiveAgreement.receiverBusinessIdentity.value] The user - * defined business identity value. - * @member {object} [receiveAgreement.protocolSettings] The AS2 protocol - * settings. - * @member {object} - * [receiveAgreement.protocolSettings.messageConnectionSettings] The message - * connection settings. - * @member {boolean} - * [receiveAgreement.protocolSettings.messageConnectionSettings.ignoreCertificateNameMismatch] - * The value indicating whether to ignore mismatch in certificate name. - * @member {boolean} - * [receiveAgreement.protocolSettings.messageConnectionSettings.supportHttpStatusCodeContinue] - * The value indicating whether to support HTTP status code 'CONTINUE'. - * @member {boolean} - * [receiveAgreement.protocolSettings.messageConnectionSettings.keepHttpConnectionAlive] - * The value indicating whether to keep the connection alive. - * @member {boolean} - * [receiveAgreement.protocolSettings.messageConnectionSettings.unfoldHttpHeaders] - * The value indicating whether to unfold the HTTP headers. - * @member {object} - * [receiveAgreement.protocolSettings.acknowledgementConnectionSettings] The - * acknowledgement connection settings. - * @member {boolean} - * [receiveAgreement.protocolSettings.acknowledgementConnectionSettings.ignoreCertificateNameMismatch] - * The value indicating whether to ignore mismatch in certificate name. - * @member {boolean} - * [receiveAgreement.protocolSettings.acknowledgementConnectionSettings.supportHttpStatusCodeContinue] - * The value indicating whether to support HTTP status code 'CONTINUE'. - * @member {boolean} - * [receiveAgreement.protocolSettings.acknowledgementConnectionSettings.keepHttpConnectionAlive] - * The value indicating whether to keep the connection alive. - * @member {boolean} - * [receiveAgreement.protocolSettings.acknowledgementConnectionSettings.unfoldHttpHeaders] - * The value indicating whether to unfold the HTTP headers. - * @member {object} [receiveAgreement.protocolSettings.mdnSettings] The MDN - * settings. - * @member {boolean} [receiveAgreement.protocolSettings.mdnSettings.needMdn] - * The value indicating whether to send or request a MDN. - * @member {boolean} [receiveAgreement.protocolSettings.mdnSettings.signMdn] - * The value indicating whether the MDN needs to be signed or not. - * @member {boolean} - * [receiveAgreement.protocolSettings.mdnSettings.sendMdnAsynchronously] The - * value indicating whether to send the asynchronous MDN. - * @member {string} - * [receiveAgreement.protocolSettings.mdnSettings.receiptDeliveryUrl] The - * receipt delivery URL. - * @member {string} - * [receiveAgreement.protocolSettings.mdnSettings.dispositionNotificationTo] - * The disposition notification to header value. - * @member {boolean} - * [receiveAgreement.protocolSettings.mdnSettings.signOutboundMdnIfOptional] - * The value indicating whether to sign the outbound MDN if optional. - * @member {string} [receiveAgreement.protocolSettings.mdnSettings.mdnText] The - * MDN text. - * @member {boolean} - * [receiveAgreement.protocolSettings.mdnSettings.sendInboundMdnToMessageBox] - * The value indicating whether to send inbound MDN to message box. - * @member {string} - * [receiveAgreement.protocolSettings.mdnSettings.micHashingAlgorithm] The - * signing or hashing algorithm. Possible values include: 'NotSpecified', - * 'None', 'MD5', 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512' - * @member {object} [receiveAgreement.protocolSettings.securitySettings] The - * security settings. - * @member {boolean} - * [receiveAgreement.protocolSettings.securitySettings.overrideGroupSigningCertificate] - * The value indicating whether to send or request a MDN. - * @member {string} - * [receiveAgreement.protocolSettings.securitySettings.signingCertificateName] - * The name of the signing certificate. - * @member {string} - * [receiveAgreement.protocolSettings.securitySettings.encryptionCertificateName] - * The name of the encryption certificate. - * @member {boolean} - * [receiveAgreement.protocolSettings.securitySettings.enableNrrForInboundEncodedMessages] - * The value indicating whether to enable NRR for inbound encoded messages. - * @member {boolean} - * [receiveAgreement.protocolSettings.securitySettings.enableNrrForInboundDecodedMessages] - * The value indicating whether to enable NRR for inbound decoded messages. - * @member {boolean} - * [receiveAgreement.protocolSettings.securitySettings.enableNrrForOutboundMdn] - * The value indicating whether to enable NRR for outbound MDN. - * @member {boolean} - * [receiveAgreement.protocolSettings.securitySettings.enableNrrForOutboundEncodedMessages] - * The value indicating whether to enable NRR for outbound encoded messages. - * @member {boolean} - * [receiveAgreement.protocolSettings.securitySettings.enableNrrForOutboundDecodedMessages] - * The value indicating whether to enable NRR for outbound decoded messages. - * @member {boolean} - * [receiveAgreement.protocolSettings.securitySettings.enableNrrForInboundMdn] - * The value indicating whether to enable NRR for inbound MDN. - * @member {string} - * [receiveAgreement.protocolSettings.securitySettings.sha2AlgorithmFormat] The - * Sha2 algorithm format. Valid values are Sha2, ShaHashSize, - * ShaHyphenHashSize, Sha2UnderscoreHashSize. - * @member {object} [receiveAgreement.protocolSettings.validationSettings] The - * validation settings. - * @member {boolean} - * [receiveAgreement.protocolSettings.validationSettings.overrideMessageProperties] - * The value indicating whether to override incoming message properties with - * those in agreement. - * @member {boolean} - * [receiveAgreement.protocolSettings.validationSettings.encryptMessage] The - * value indicating whether the message has to be encrypted. - * @member {boolean} - * [receiveAgreement.protocolSettings.validationSettings.signMessage] The value - * indicating whether the message has to be signed. - * @member {boolean} - * [receiveAgreement.protocolSettings.validationSettings.compressMessage] The - * value indicating whether the message has to be compressed. - * @member {boolean} - * [receiveAgreement.protocolSettings.validationSettings.checkDuplicateMessage] - * The value indicating whether to check for duplicate message. - * @member {number} - * [receiveAgreement.protocolSettings.validationSettings.interchangeDuplicatesValidityDays] - * The number of days to look back for duplicate interchange. - * @member {boolean} - * [receiveAgreement.protocolSettings.validationSettings.checkCertificateRevocationListOnSend] - * The value indicating whether to check for certificate revocation list on - * send. - * @member {boolean} - * [receiveAgreement.protocolSettings.validationSettings.checkCertificateRevocationListOnReceive] - * The value indicating whether to check for certificate revocation list on - * receive. - * @member {string} - * [receiveAgreement.protocolSettings.validationSettings.encryptionAlgorithm] - * The encryption algorithm. Possible values include: 'NotSpecified', 'None', - * 'DES3', 'RC2', 'AES128', 'AES192', 'AES256' - * @member {string} - * [receiveAgreement.protocolSettings.validationSettings.signingAlgorithm] The - * signing algorithm. Possible values include: 'NotSpecified', 'Default', - * 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512' - * @member {object} [receiveAgreement.protocolSettings.envelopeSettings] The - * envelope settings. - * @member {string} - * [receiveAgreement.protocolSettings.envelopeSettings.messageContentType] The - * message content type. - * @member {boolean} - * [receiveAgreement.protocolSettings.envelopeSettings.transmitFileNameInMimeHeader] - * The value indicating whether to transmit file name in mime header. - * @member {string} - * [receiveAgreement.protocolSettings.envelopeSettings.fileNameTemplate] The - * template for file name. - * @member {boolean} - * [receiveAgreement.protocolSettings.envelopeSettings.suspendMessageOnFileNameGenerationError] - * The value indicating whether to suspend message on file name generation - * error. - * @member {boolean} - * [receiveAgreement.protocolSettings.envelopeSettings.autogenerateFileName] - * The value indicating whether to auto generate file name. - * @member {object} [receiveAgreement.protocolSettings.errorSettings] The error - * settings. - * @member {boolean} - * [receiveAgreement.protocolSettings.errorSettings.suspendDuplicateMessage] - * The value indicating whether to suspend duplicate message. - * @member {boolean} - * [receiveAgreement.protocolSettings.errorSettings.resendIfMdnNotReceived] The - * value indicating whether to resend message If MDN is not received. - * @member {object} sendAgreement The AS2 one-way send agreement. - * @member {object} [sendAgreement.senderBusinessIdentity] The sender business - * identity - * @member {string} [sendAgreement.senderBusinessIdentity.qualifier] The - * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [sendAgreement.senderBusinessIdentity.value] The user - * defined business identity value. - * @member {object} [sendAgreement.receiverBusinessIdentity] The receiver - * business identity - * @member {string} [sendAgreement.receiverBusinessIdentity.qualifier] The - * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [sendAgreement.receiverBusinessIdentity.value] The user - * defined business identity value. - * @member {object} [sendAgreement.protocolSettings] The AS2 protocol settings. - * @member {object} [sendAgreement.protocolSettings.messageConnectionSettings] - * The message connection settings. - * @member {boolean} - * [sendAgreement.protocolSettings.messageConnectionSettings.ignoreCertificateNameMismatch] - * The value indicating whether to ignore mismatch in certificate name. - * @member {boolean} - * [sendAgreement.protocolSettings.messageConnectionSettings.supportHttpStatusCodeContinue] - * The value indicating whether to support HTTP status code 'CONTINUE'. - * @member {boolean} - * [sendAgreement.protocolSettings.messageConnectionSettings.keepHttpConnectionAlive] - * The value indicating whether to keep the connection alive. - * @member {boolean} - * [sendAgreement.protocolSettings.messageConnectionSettings.unfoldHttpHeaders] - * The value indicating whether to unfold the HTTP headers. - * @member {object} - * [sendAgreement.protocolSettings.acknowledgementConnectionSettings] The - * acknowledgement connection settings. - * @member {boolean} - * [sendAgreement.protocolSettings.acknowledgementConnectionSettings.ignoreCertificateNameMismatch] - * The value indicating whether to ignore mismatch in certificate name. - * @member {boolean} - * [sendAgreement.protocolSettings.acknowledgementConnectionSettings.supportHttpStatusCodeContinue] - * The value indicating whether to support HTTP status code 'CONTINUE'. - * @member {boolean} - * [sendAgreement.protocolSettings.acknowledgementConnectionSettings.keepHttpConnectionAlive] - * The value indicating whether to keep the connection alive. - * @member {boolean} - * [sendAgreement.protocolSettings.acknowledgementConnectionSettings.unfoldHttpHeaders] - * The value indicating whether to unfold the HTTP headers. - * @member {object} [sendAgreement.protocolSettings.mdnSettings] The MDN - * settings. - * @member {boolean} [sendAgreement.protocolSettings.mdnSettings.needMdn] The - * value indicating whether to send or request a MDN. - * @member {boolean} [sendAgreement.protocolSettings.mdnSettings.signMdn] The - * value indicating whether the MDN needs to be signed or not. - * @member {boolean} - * [sendAgreement.protocolSettings.mdnSettings.sendMdnAsynchronously] The value - * indicating whether to send the asynchronous MDN. - * @member {string} - * [sendAgreement.protocolSettings.mdnSettings.receiptDeliveryUrl] The receipt - * delivery URL. - * @member {string} - * [sendAgreement.protocolSettings.mdnSettings.dispositionNotificationTo] The - * disposition notification to header value. - * @member {boolean} - * [sendAgreement.protocolSettings.mdnSettings.signOutboundMdnIfOptional] The - * value indicating whether to sign the outbound MDN if optional. - * @member {string} [sendAgreement.protocolSettings.mdnSettings.mdnText] The - * MDN text. - * @member {boolean} - * [sendAgreement.protocolSettings.mdnSettings.sendInboundMdnToMessageBox] The - * value indicating whether to send inbound MDN to message box. - * @member {string} - * [sendAgreement.protocolSettings.mdnSettings.micHashingAlgorithm] The signing - * or hashing algorithm. Possible values include: 'NotSpecified', 'None', - * 'MD5', 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512' - * @member {object} [sendAgreement.protocolSettings.securitySettings] The - * security settings. - * @member {boolean} - * [sendAgreement.protocolSettings.securitySettings.overrideGroupSigningCertificate] - * The value indicating whether to send or request a MDN. - * @member {string} - * [sendAgreement.protocolSettings.securitySettings.signingCertificateName] The - * name of the signing certificate. - * @member {string} - * [sendAgreement.protocolSettings.securitySettings.encryptionCertificateName] - * The name of the encryption certificate. - * @member {boolean} - * [sendAgreement.protocolSettings.securitySettings.enableNrrForInboundEncodedMessages] - * The value indicating whether to enable NRR for inbound encoded messages. - * @member {boolean} - * [sendAgreement.protocolSettings.securitySettings.enableNrrForInboundDecodedMessages] - * The value indicating whether to enable NRR for inbound decoded messages. - * @member {boolean} - * [sendAgreement.protocolSettings.securitySettings.enableNrrForOutboundMdn] - * The value indicating whether to enable NRR for outbound MDN. - * @member {boolean} - * [sendAgreement.protocolSettings.securitySettings.enableNrrForOutboundEncodedMessages] - * The value indicating whether to enable NRR for outbound encoded messages. - * @member {boolean} - * [sendAgreement.protocolSettings.securitySettings.enableNrrForOutboundDecodedMessages] - * The value indicating whether to enable NRR for outbound decoded messages. - * @member {boolean} - * [sendAgreement.protocolSettings.securitySettings.enableNrrForInboundMdn] The - * value indicating whether to enable NRR for inbound MDN. - * @member {string} - * [sendAgreement.protocolSettings.securitySettings.sha2AlgorithmFormat] The - * Sha2 algorithm format. Valid values are Sha2, ShaHashSize, - * ShaHyphenHashSize, Sha2UnderscoreHashSize. - * @member {object} [sendAgreement.protocolSettings.validationSettings] The - * validation settings. - * @member {boolean} - * [sendAgreement.protocolSettings.validationSettings.overrideMessageProperties] - * The value indicating whether to override incoming message properties with - * those in agreement. - * @member {boolean} - * [sendAgreement.protocolSettings.validationSettings.encryptMessage] The value - * indicating whether the message has to be encrypted. - * @member {boolean} - * [sendAgreement.protocolSettings.validationSettings.signMessage] The value - * indicating whether the message has to be signed. - * @member {boolean} - * [sendAgreement.protocolSettings.validationSettings.compressMessage] The - * value indicating whether the message has to be compressed. - * @member {boolean} - * [sendAgreement.protocolSettings.validationSettings.checkDuplicateMessage] - * The value indicating whether to check for duplicate message. - * @member {number} - * [sendAgreement.protocolSettings.validationSettings.interchangeDuplicatesValidityDays] - * The number of days to look back for duplicate interchange. - * @member {boolean} - * [sendAgreement.protocolSettings.validationSettings.checkCertificateRevocationListOnSend] - * The value indicating whether to check for certificate revocation list on - * send. - * @member {boolean} - * [sendAgreement.protocolSettings.validationSettings.checkCertificateRevocationListOnReceive] - * The value indicating whether to check for certificate revocation list on - * receive. - * @member {string} - * [sendAgreement.protocolSettings.validationSettings.encryptionAlgorithm] The - * encryption algorithm. Possible values include: 'NotSpecified', 'None', - * 'DES3', 'RC2', 'AES128', 'AES192', 'AES256' - * @member {string} - * [sendAgreement.protocolSettings.validationSettings.signingAlgorithm] The - * signing algorithm. Possible values include: 'NotSpecified', 'Default', - * 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512' - * @member {object} [sendAgreement.protocolSettings.envelopeSettings] The - * envelope settings. - * @member {string} - * [sendAgreement.protocolSettings.envelopeSettings.messageContentType] The - * message content type. - * @member {boolean} - * [sendAgreement.protocolSettings.envelopeSettings.transmitFileNameInMimeHeader] - * The value indicating whether to transmit file name in mime header. - * @member {string} - * [sendAgreement.protocolSettings.envelopeSettings.fileNameTemplate] The - * template for file name. - * @member {boolean} - * [sendAgreement.protocolSettings.envelopeSettings.suspendMessageOnFileNameGenerationError] - * The value indicating whether to suspend message on file name generation - * error. - * @member {boolean} - * [sendAgreement.protocolSettings.envelopeSettings.autogenerateFileName] The - * value indicating whether to auto generate file name. - * @member {object} [sendAgreement.protocolSettings.errorSettings] The error - * settings. - * @member {boolean} - * [sendAgreement.protocolSettings.errorSettings.suspendDuplicateMessage] The - * value indicating whether to suspend duplicate message. - * @member {boolean} - * [sendAgreement.protocolSettings.errorSettings.resendIfMdnNotReceived] The - * value indicating whether to resend message If MDN is not received. */ export interface AS2AgreementContent { + /** + * The AS2 one-way receive agreement. + */ receiveAgreement: AS2OneWayAgreement; + /** + * The AS2 one-way send agreement. + */ sendAgreement: AS2OneWayAgreement; } /** - * @class - * Initializes a new instance of the X12ValidationSettings class. - * @constructor * The X12 agreement validation settings. - * - * @member {boolean} validateCharacterSet The value indicating whether to - * validate character set in the message. - * @member {boolean} checkDuplicateInterchangeControlNumber The value - * indicating whether to check for duplicate interchange control number. - * @member {number} interchangeControlNumberValidityDays The validity period of - * interchange control number. - * @member {boolean} checkDuplicateGroupControlNumber The value indicating - * whether to check for duplicate group control number. - * @member {boolean} checkDuplicateTransactionSetControlNumber The value - * indicating whether to check for duplicate transaction set control number. - * @member {boolean} validateEdiTypes The value indicating whether to Whether - * to validate EDI types. - * @member {boolean} validateXsdTypes The value indicating whether to Whether - * to validate XSD types. - * @member {boolean} allowLeadingAndTrailingSpacesAndZeroes The value - * indicating whether to allow leading and trailing spaces and zeroes. - * @member {boolean} trimLeadingAndTrailingSpacesAndZeroes The value indicating - * whether to trim leading and trailing spaces and zeroes. - * @member {string} trailingSeparatorPolicy The trailing separator policy. - * Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', - * 'Mandatory' */ export interface X12ValidationSettings { + /** + * The value indicating whether to validate character set in the message. + */ validateCharacterSet: boolean; + /** + * The value indicating whether to check for duplicate interchange control number. + */ checkDuplicateInterchangeControlNumber: boolean; + /** + * The validity period of interchange control number. + */ interchangeControlNumberValidityDays: number; + /** + * The value indicating whether to check for duplicate group control number. + */ checkDuplicateGroupControlNumber: boolean; + /** + * The value indicating whether to check for duplicate transaction set control number. + */ checkDuplicateTransactionSetControlNumber: boolean; + /** + * The value indicating whether to Whether to validate EDI types. + */ validateEdiTypes: boolean; + /** + * The value indicating whether to Whether to validate XSD types. + */ validateXsdTypes: boolean; + /** + * The value indicating whether to allow leading and trailing spaces and zeroes. + */ allowLeadingAndTrailingSpacesAndZeroes: boolean; + /** + * The value indicating whether to trim leading and trailing spaces and zeroes. + */ trimLeadingAndTrailingSpacesAndZeroes: boolean; + /** + * The trailing separator policy. Possible values include: 'NotSpecified', 'NotAllowed', + * 'Optional', 'Mandatory' + */ trailingSeparatorPolicy: string; } /** - * @class - * Initializes a new instance of the X12FramingSettings class. - * @constructor * The X12 agreement framing settings. - * - * @member {number} dataElementSeparator The data element separator. - * @member {number} componentSeparator The component separator. - * @member {boolean} replaceSeparatorsInPayload The value indicating whether to - * replace separators in payload. - * @member {number} replaceCharacter The replacement character. - * @member {number} segmentTerminator The segment terminator. - * @member {string} characterSet The X12 character set. Possible values - * include: 'NotSpecified', 'Basic', 'Extended', 'UTF8' - * @member {string} segmentTerminatorSuffix The segment terminator suffix. - * Possible values include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' */ export interface X12FramingSettings { + /** + * The data element separator. + */ dataElementSeparator: number; + /** + * The component separator. + */ componentSeparator: number; + /** + * The value indicating whether to replace separators in payload. + */ replaceSeparatorsInPayload: boolean; + /** + * The replacement character. + */ replaceCharacter: number; + /** + * The segment terminator. + */ segmentTerminator: number; + /** + * The X12 character set. Possible values include: 'NotSpecified', 'Basic', 'Extended', 'UTF8' + */ characterSet: string; + /** + * The segment terminator suffix. Possible values include: 'NotSpecified', 'None', 'CR', 'LF', + * 'CRLF' + */ segmentTerminatorSuffix: string; } /** - * @class - * Initializes a new instance of the X12EnvelopeSettings class. - * @constructor * The X12 agreement envelope settings. - * - * @member {number} controlStandardsId The controls standards id. - * @member {boolean} useControlStandardsIdAsRepetitionCharacter The value - * indicating whether to use control standards id as repetition character. - * @member {string} senderApplicationId The sender application id. - * @member {string} receiverApplicationId The receiver application id. - * @member {string} controlVersionNumber The control version number. - * @member {number} interchangeControlNumberLowerBound The interchange control - * number lower bound. - * @member {number} interchangeControlNumberUpperBound The interchange control - * number upper bound. - * @member {boolean} rolloverInterchangeControlNumber The value indicating - * whether to rollover interchange control number. - * @member {boolean} enableDefaultGroupHeaders The value indicating whether to - * enable default group headers. - * @member {string} [functionalGroupId] The functional group id. - * @member {number} groupControlNumberLowerBound The group control number lower - * bound. - * @member {number} groupControlNumberUpperBound The group control number upper - * bound. - * @member {boolean} rolloverGroupControlNumber The value indicating whether to - * rollover group control number. - * @member {string} groupHeaderAgencyCode The group header agency code. - * @member {string} groupHeaderVersion The group header version. - * @member {number} transactionSetControlNumberLowerBound The transaction set - * control number lower bound. - * @member {number} transactionSetControlNumberUpperBound The transaction set - * control number upper bound. - * @member {boolean} rolloverTransactionSetControlNumber The value indicating - * whether to rollover transaction set control number. - * @member {string} [transactionSetControlNumberPrefix] The transaction set - * control number prefix. - * @member {string} [transactionSetControlNumberSuffix] The transaction set - * control number suffix. - * @member {boolean} overwriteExistingTransactionSetControlNumber The value - * indicating whether to overwrite existing transaction set control number. - * @member {string} groupHeaderDateFormat The group header date format. - * Possible values include: 'NotSpecified', 'CCYYMMDD', 'YYMMDD' - * @member {string} groupHeaderTimeFormat The group header time format. - * Possible values include: 'NotSpecified', 'HHMM', 'HHMMSS', 'HHMMSSdd', - * 'HHMMSSd' - * @member {string} usageIndicator The usage indicator. Possible values - * include: 'NotSpecified', 'Test', 'Information', 'Production' */ export interface X12EnvelopeSettings { + /** + * The controls standards id. + */ controlStandardsId: number; + /** + * The value indicating whether to use control standards id as repetition character. + */ useControlStandardsIdAsRepetitionCharacter: boolean; + /** + * The sender application id. + */ senderApplicationId: string; + /** + * The receiver application id. + */ receiverApplicationId: string; + /** + * The control version number. + */ controlVersionNumber: string; + /** + * The interchange control number lower bound. + */ interchangeControlNumberLowerBound: number; + /** + * The interchange control number upper bound. + */ interchangeControlNumberUpperBound: number; + /** + * The value indicating whether to rollover interchange control number. + */ rolloverInterchangeControlNumber: boolean; + /** + * The value indicating whether to enable default group headers. + */ enableDefaultGroupHeaders: boolean; + /** + * The functional group id. + */ functionalGroupId?: string; + /** + * The group control number lower bound. + */ groupControlNumberLowerBound: number; + /** + * The group control number upper bound. + */ groupControlNumberUpperBound: number; + /** + * The value indicating whether to rollover group control number. + */ rolloverGroupControlNumber: boolean; + /** + * The group header agency code. + */ groupHeaderAgencyCode: string; + /** + * The group header version. + */ groupHeaderVersion: string; + /** + * The transaction set control number lower bound. + */ transactionSetControlNumberLowerBound: number; + /** + * The transaction set control number upper bound. + */ transactionSetControlNumberUpperBound: number; + /** + * The value indicating whether to rollover transaction set control number. + */ rolloverTransactionSetControlNumber: boolean; + /** + * The transaction set control number prefix. + */ transactionSetControlNumberPrefix?: string; + /** + * The transaction set control number suffix. + */ transactionSetControlNumberSuffix?: string; + /** + * The value indicating whether to overwrite existing transaction set control number. + */ overwriteExistingTransactionSetControlNumber: boolean; + /** + * The group header date format. Possible values include: 'NotSpecified', 'CCYYMMDD', 'YYMMDD' + */ groupHeaderDateFormat: string; + /** + * The group header time format. Possible values include: 'NotSpecified', 'HHMM', 'HHMMSS', + * 'HHMMSSdd', 'HHMMSSd' + */ groupHeaderTimeFormat: string; + /** + * The usage indicator. Possible values include: 'NotSpecified', 'Test', 'Information', + * 'Production' + */ usageIndicator: string; } /** - * @class - * Initializes a new instance of the X12AcknowledgementSettings class. - * @constructor * The X12 agreement acknowledgement settings. - * - * @member {boolean} needTechnicalAcknowledgement The value indicating whether - * technical acknowledgement is needed. - * @member {boolean} batchTechnicalAcknowledgements The value indicating - * whether to batch the technical acknowledgements. - * @member {boolean} needFunctionalAcknowledgement The value indicating whether - * functional acknowledgement is needed. - * @member {string} [functionalAcknowledgementVersion] The functional - * acknowledgement version. - * @member {boolean} batchFunctionalAcknowledgements The value indicating - * whether to batch functional acknowledgements. - * @member {boolean} needImplementationAcknowledgement The value indicating - * whether implementation acknowledgement is needed. - * @member {string} [implementationAcknowledgementVersion] The implementation - * acknowledgement version. - * @member {boolean} batchImplementationAcknowledgements The value indicating - * whether to batch implementation acknowledgements. - * @member {boolean} needLoopForValidMessages The value indicating whether a - * loop is needed for valid messages. - * @member {boolean} sendSynchronousAcknowledgement The value indicating - * whether to send synchronous acknowledgement. - * @member {string} [acknowledgementControlNumberPrefix] The acknowledgement - * control number prefix. - * @member {string} [acknowledgementControlNumberSuffix] The acknowledgement - * control number suffix. - * @member {number} acknowledgementControlNumberLowerBound The acknowledgement - * control number lower bound. - * @member {number} acknowledgementControlNumberUpperBound The acknowledgement - * control number upper bound. - * @member {boolean} rolloverAcknowledgementControlNumber The value indicating - * whether to rollover acknowledgement control number. */ export interface X12AcknowledgementSettings { + /** + * The value indicating whether technical acknowledgement is needed. + */ needTechnicalAcknowledgement: boolean; + /** + * The value indicating whether to batch the technical acknowledgements. + */ batchTechnicalAcknowledgements: boolean; + /** + * The value indicating whether functional acknowledgement is needed. + */ needFunctionalAcknowledgement: boolean; + /** + * The functional acknowledgement version. + */ functionalAcknowledgementVersion?: string; + /** + * The value indicating whether to batch functional acknowledgements. + */ batchFunctionalAcknowledgements: boolean; + /** + * The value indicating whether implementation acknowledgement is needed. + */ needImplementationAcknowledgement: boolean; + /** + * The implementation acknowledgement version. + */ implementationAcknowledgementVersion?: string; + /** + * The value indicating whether to batch implementation acknowledgements. + */ batchImplementationAcknowledgements: boolean; + /** + * The value indicating whether a loop is needed for valid messages. + */ needLoopForValidMessages: boolean; + /** + * The value indicating whether to send synchronous acknowledgement. + */ sendSynchronousAcknowledgement: boolean; + /** + * The acknowledgement control number prefix. + */ acknowledgementControlNumberPrefix?: string; + /** + * The acknowledgement control number suffix. + */ acknowledgementControlNumberSuffix?: string; + /** + * The acknowledgement control number lower bound. + */ acknowledgementControlNumberLowerBound: number; + /** + * The acknowledgement control number upper bound. + */ acknowledgementControlNumberUpperBound: number; + /** + * The value indicating whether to rollover acknowledgement control number. + */ rolloverAcknowledgementControlNumber: boolean; } /** - * @class - * Initializes a new instance of the X12MessageFilter class. - * @constructor * The X12 message filter for odata query. - * - * @member {string} messageFilterType The message filter type. Possible values - * include: 'NotSpecified', 'Include', 'Exclude' */ export interface X12MessageFilter { + /** + * The message filter type. Possible values include: 'NotSpecified', 'Include', 'Exclude' + */ messageFilterType: string; } /** - * @class - * Initializes a new instance of the X12SecuritySettings class. - * @constructor * The X12 agreement security settings. - * - * @member {string} authorizationQualifier The authorization qualifier. - * @member {string} [authorizationValue] The authorization value. - * @member {string} securityQualifier The security qualifier. - * @member {string} [passwordValue] The password value. */ export interface X12SecuritySettings { + /** + * The authorization qualifier. + */ authorizationQualifier: string; + /** + * The authorization value. + */ authorizationValue?: string; + /** + * The security qualifier. + */ securityQualifier: string; + /** + * The password value. + */ passwordValue?: string; } /** - * @class - * Initializes a new instance of the X12ProcessingSettings class. - * @constructor * The X12 processing settings. - * - * @member {boolean} maskSecurityInfo The value indicating whether to mask - * security information. - * @member {boolean} convertImpliedDecimal The value indicating whether to - * convert numerical type to implied decimal. - * @member {boolean} preserveInterchange The value indicating whether to - * preserve interchange. - * @member {boolean} suspendInterchangeOnError The value indicating whether to - * suspend interchange on error. - * @member {boolean} createEmptyXmlTagsForTrailingSeparators The value - * indicating whether to create empty xml tags for trailing separators. - * @member {boolean} useDotAsDecimalSeparator The value indicating whether to - * use dot as decimal separator. */ export interface X12ProcessingSettings { + /** + * The value indicating whether to mask security information. + */ maskSecurityInfo: boolean; + /** + * The value indicating whether to convert numerical type to implied decimal. + */ convertImpliedDecimal: boolean; + /** + * The value indicating whether to preserve interchange. + */ preserveInterchange: boolean; + /** + * The value indicating whether to suspend interchange on error. + */ suspendInterchangeOnError: boolean; + /** + * The value indicating whether to create empty xml tags for trailing separators. + */ createEmptyXmlTagsForTrailingSeparators: boolean; + /** + * The value indicating whether to use dot as decimal separator. + */ useDotAsDecimalSeparator: boolean; } /** - * @class - * Initializes a new instance of the X12EnvelopeOverride class. - * @constructor * The X12 envelope override settings. - * - * @member {string} targetNamespace The target namespace on which this envelope - * settings has to be applied. - * @member {string} protocolVersion The protocol version on which this envelope - * settings has to be applied. - * @member {string} messageId The message id on which this envelope settings - * has to be applied. - * @member {string} responsibleAgencyCode The responsible agency code. - * @member {string} headerVersion The header version. - * @member {string} senderApplicationId The sender application id. - * @member {string} receiverApplicationId The receiver application id. - * @member {string} [functionalIdentifierCode] The functional identifier code. - * @member {string} dateFormat The date format. Possible values include: - * 'NotSpecified', 'CCYYMMDD', 'YYMMDD' - * @member {string} timeFormat The time format. Possible values include: - * 'NotSpecified', 'HHMM', 'HHMMSS', 'HHMMSSdd', 'HHMMSSd' */ export interface X12EnvelopeOverride { + /** + * The target namespace on which this envelope settings has to be applied. + */ targetNamespace: string; + /** + * The protocol version on which this envelope settings has to be applied. + */ protocolVersion: string; + /** + * The message id on which this envelope settings has to be applied. + */ messageId: string; + /** + * The responsible agency code. + */ responsibleAgencyCode: string; + /** + * The header version. + */ headerVersion: string; + /** + * The sender application id. + */ senderApplicationId: string; + /** + * The receiver application id. + */ receiverApplicationId: string; + /** + * The functional identifier code. + */ functionalIdentifierCode?: string; + /** + * The date format. Possible values include: 'NotSpecified', 'CCYYMMDD', 'YYMMDD' + */ dateFormat: string; + /** + * The time format. Possible values include: 'NotSpecified', 'HHMM', 'HHMMSS', 'HHMMSSdd', + * 'HHMMSSd' + */ timeFormat: string; } /** - * @class - * Initializes a new instance of the X12ValidationOverride class. - * @constructor * The X12 validation override settings. - * - * @member {string} messageId The message id on which the validation settings - * has to be applied. - * @member {boolean} validateEdiTypes The value indicating whether to validate - * EDI types. - * @member {boolean} validateXsdTypes The value indicating whether to validate - * XSD types. - * @member {boolean} allowLeadingAndTrailingSpacesAndZeroes The value - * indicating whether to allow leading and trailing spaces and zeroes. - * @member {boolean} validateCharacterSet The value indicating whether to - * validate character Set. - * @member {boolean} trimLeadingAndTrailingSpacesAndZeroes The value indicating - * whether to trim leading and trailing spaces and zeroes. - * @member {string} trailingSeparatorPolicy The trailing separator policy. - * Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', - * 'Mandatory' */ export interface X12ValidationOverride { + /** + * The message id on which the validation settings has to be applied. + */ messageId: string; + /** + * The value indicating whether to validate EDI types. + */ validateEdiTypes: boolean; + /** + * The value indicating whether to validate XSD types. + */ validateXsdTypes: boolean; + /** + * The value indicating whether to allow leading and trailing spaces and zeroes. + */ allowLeadingAndTrailingSpacesAndZeroes: boolean; + /** + * The value indicating whether to validate character Set. + */ validateCharacterSet: boolean; + /** + * The value indicating whether to trim leading and trailing spaces and zeroes. + */ trimLeadingAndTrailingSpacesAndZeroes: boolean; + /** + * The trailing separator policy. Possible values include: 'NotSpecified', 'NotAllowed', + * 'Optional', 'Mandatory' + */ trailingSeparatorPolicy: string; } /** - * @class - * Initializes a new instance of the X12MessageIdentifier class. - * @constructor * The X12 message identifier. - * - * @member {string} messageId The message id. */ export interface X12MessageIdentifier { + /** + * The message id. + */ messageId: string; } /** - * @class - * Initializes a new instance of the X12SchemaReference class. - * @constructor * The X12 schema reference. - * - * @member {string} messageId The message id. - * @member {string} [senderApplicationId] The sender application id. - * @member {string} schemaVersion The schema version. - * @member {string} schemaName The schema name. */ export interface X12SchemaReference { + /** + * The message id. + */ messageId: string; + /** + * The sender application id. + */ senderApplicationId?: string; + /** + * The schema version. + */ schemaVersion: string; + /** + * The schema name. + */ schemaName: string; } /** - * @class - * Initializes a new instance of the X12DelimiterOverrides class. - * @constructor * The X12 delimiter override settings. - * - * @member {string} [protocolVersion] The protocol version. - * @member {string} [messageId] The message id. - * @member {number} dataElementSeparator The data element separator. - * @member {number} componentSeparator The component separator. - * @member {number} segmentTerminator The segment terminator. - * @member {string} segmentTerminatorSuffix The segment terminator suffix. - * Possible values include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' - * @member {number} replaceCharacter The replacement character. - * @member {boolean} replaceSeparatorsInPayload The value indicating whether to - * replace separators in payload. - * @member {string} [targetNamespace] The target namespace on which this - * delimiter settings has to be applied. */ export interface X12DelimiterOverrides { + /** + * The protocol version. + */ protocolVersion?: string; + /** + * The message id. + */ messageId?: string; + /** + * The data element separator. + */ dataElementSeparator: number; + /** + * The component separator. + */ componentSeparator: number; + /** + * The segment terminator. + */ segmentTerminator: number; + /** + * The segment terminator suffix. Possible values include: 'NotSpecified', 'None', 'CR', 'LF', + * 'CRLF' + */ segmentTerminatorSuffix: string; + /** + * The replacement character. + */ replaceCharacter: number; + /** + * The value indicating whether to replace separators in payload. + */ replaceSeparatorsInPayload: boolean; + /** + * The target namespace on which this delimiter settings has to be applied. + */ targetNamespace?: string; } /** - * @class - * Initializes a new instance of the X12ProtocolSettings class. - * @constructor * The X12 agreement protocol settings. - * - * @member {object} validationSettings The X12 validation settings. - * @member {boolean} [validationSettings.validateCharacterSet] The value - * indicating whether to validate character set in the message. - * @member {boolean} - * [validationSettings.checkDuplicateInterchangeControlNumber] The value - * indicating whether to check for duplicate interchange control number. - * @member {number} [validationSettings.interchangeControlNumberValidityDays] - * The validity period of interchange control number. - * @member {boolean} [validationSettings.checkDuplicateGroupControlNumber] The - * value indicating whether to check for duplicate group control number. - * @member {boolean} - * [validationSettings.checkDuplicateTransactionSetControlNumber] The value - * indicating whether to check for duplicate transaction set control number. - * @member {boolean} [validationSettings.validateEdiTypes] The value indicating - * whether to Whether to validate EDI types. - * @member {boolean} [validationSettings.validateXsdTypes] The value indicating - * whether to Whether to validate XSD types. - * @member {boolean} - * [validationSettings.allowLeadingAndTrailingSpacesAndZeroes] The value - * indicating whether to allow leading and trailing spaces and zeroes. - * @member {boolean} [validationSettings.trimLeadingAndTrailingSpacesAndZeroes] - * The value indicating whether to trim leading and trailing spaces and zeroes. - * @member {string} [validationSettings.trailingSeparatorPolicy] The trailing - * separator policy. Possible values include: 'NotSpecified', 'NotAllowed', - * 'Optional', 'Mandatory' - * @member {object} framingSettings The X12 framing settings. - * @member {number} [framingSettings.dataElementSeparator] The data element - * separator. - * @member {number} [framingSettings.componentSeparator] The component - * separator. - * @member {boolean} [framingSettings.replaceSeparatorsInPayload] The value - * indicating whether to replace separators in payload. - * @member {number} [framingSettings.replaceCharacter] The replacement - * character. - * @member {number} [framingSettings.segmentTerminator] The segment terminator. - * @member {string} [framingSettings.characterSet] The X12 character set. - * Possible values include: 'NotSpecified', 'Basic', 'Extended', 'UTF8' - * @member {string} [framingSettings.segmentTerminatorSuffix] The segment - * terminator suffix. Possible values include: 'NotSpecified', 'None', 'CR', - * 'LF', 'CRLF' - * @member {object} envelopeSettings The X12 envelope settings. - * @member {number} [envelopeSettings.controlStandardsId] The controls - * standards id. - * @member {boolean} - * [envelopeSettings.useControlStandardsIdAsRepetitionCharacter] The value - * indicating whether to use control standards id as repetition character. - * @member {string} [envelopeSettings.senderApplicationId] The sender - * application id. - * @member {string} [envelopeSettings.receiverApplicationId] The receiver - * application id. - * @member {string} [envelopeSettings.controlVersionNumber] The control version - * number. - * @member {number} [envelopeSettings.interchangeControlNumberLowerBound] The - * interchange control number lower bound. - * @member {number} [envelopeSettings.interchangeControlNumberUpperBound] The - * interchange control number upper bound. - * @member {boolean} [envelopeSettings.rolloverInterchangeControlNumber] The - * value indicating whether to rollover interchange control number. - * @member {boolean} [envelopeSettings.enableDefaultGroupHeaders] The value - * indicating whether to enable default group headers. - * @member {string} [envelopeSettings.functionalGroupId] The functional group - * id. - * @member {number} [envelopeSettings.groupControlNumberLowerBound] The group - * control number lower bound. - * @member {number} [envelopeSettings.groupControlNumberUpperBound] The group - * control number upper bound. - * @member {boolean} [envelopeSettings.rolloverGroupControlNumber] The value - * indicating whether to rollover group control number. - * @member {string} [envelopeSettings.groupHeaderAgencyCode] The group header - * agency code. - * @member {string} [envelopeSettings.groupHeaderVersion] The group header - * version. - * @member {number} [envelopeSettings.transactionSetControlNumberLowerBound] - * The transaction set control number lower bound. - * @member {number} [envelopeSettings.transactionSetControlNumberUpperBound] - * The transaction set control number upper bound. - * @member {boolean} [envelopeSettings.rolloverTransactionSetControlNumber] The - * value indicating whether to rollover transaction set control number. - * @member {string} [envelopeSettings.transactionSetControlNumberPrefix] The - * transaction set control number prefix. - * @member {string} [envelopeSettings.transactionSetControlNumberSuffix] The - * transaction set control number suffix. - * @member {boolean} - * [envelopeSettings.overwriteExistingTransactionSetControlNumber] The value - * indicating whether to overwrite existing transaction set control number. - * @member {string} [envelopeSettings.groupHeaderDateFormat] The group header - * date format. Possible values include: 'NotSpecified', 'CCYYMMDD', 'YYMMDD' - * @member {string} [envelopeSettings.groupHeaderTimeFormat] The group header - * time format. Possible values include: 'NotSpecified', 'HHMM', 'HHMMSS', - * 'HHMMSSdd', 'HHMMSSd' - * @member {string} [envelopeSettings.usageIndicator] The usage indicator. - * Possible values include: 'NotSpecified', 'Test', 'Information', 'Production' - * @member {object} acknowledgementSettings The X12 acknowledgment settings. - * @member {boolean} [acknowledgementSettings.needTechnicalAcknowledgement] The - * value indicating whether technical acknowledgement is needed. - * @member {boolean} [acknowledgementSettings.batchTechnicalAcknowledgements] - * The value indicating whether to batch the technical acknowledgements. - * @member {boolean} [acknowledgementSettings.needFunctionalAcknowledgement] - * The value indicating whether functional acknowledgement is needed. - * @member {string} [acknowledgementSettings.functionalAcknowledgementVersion] - * The functional acknowledgement version. - * @member {boolean} [acknowledgementSettings.batchFunctionalAcknowledgements] - * The value indicating whether to batch functional acknowledgements. - * @member {boolean} - * [acknowledgementSettings.needImplementationAcknowledgement] The value - * indicating whether implementation acknowledgement is needed. - * @member {string} - * [acknowledgementSettings.implementationAcknowledgementVersion] The - * implementation acknowledgement version. - * @member {boolean} - * [acknowledgementSettings.batchImplementationAcknowledgements] The value - * indicating whether to batch implementation acknowledgements. - * @member {boolean} [acknowledgementSettings.needLoopForValidMessages] The - * value indicating whether a loop is needed for valid messages. - * @member {boolean} [acknowledgementSettings.sendSynchronousAcknowledgement] - * The value indicating whether to send synchronous acknowledgement. - * @member {string} - * [acknowledgementSettings.acknowledgementControlNumberPrefix] The - * acknowledgement control number prefix. - * @member {string} - * [acknowledgementSettings.acknowledgementControlNumberSuffix] The - * acknowledgement control number suffix. - * @member {number} - * [acknowledgementSettings.acknowledgementControlNumberLowerBound] The - * acknowledgement control number lower bound. - * @member {number} - * [acknowledgementSettings.acknowledgementControlNumberUpperBound] The - * acknowledgement control number upper bound. - * @member {boolean} - * [acknowledgementSettings.rolloverAcknowledgementControlNumber] The value - * indicating whether to rollover acknowledgement control number. - * @member {object} messageFilter The X12 message filter. - * @member {string} [messageFilter.messageFilterType] The message filter type. - * Possible values include: 'NotSpecified', 'Include', 'Exclude' - * @member {object} securitySettings The X12 security settings. - * @member {string} [securitySettings.authorizationQualifier] The authorization - * qualifier. - * @member {string} [securitySettings.authorizationValue] The authorization - * value. - * @member {string} [securitySettings.securityQualifier] The security - * qualifier. - * @member {string} [securitySettings.passwordValue] The password value. - * @member {object} processingSettings The X12 processing settings. - * @member {boolean} [processingSettings.maskSecurityInfo] The value indicating - * whether to mask security information. - * @member {boolean} [processingSettings.convertImpliedDecimal] The value - * indicating whether to convert numerical type to implied decimal. - * @member {boolean} [processingSettings.preserveInterchange] The value - * indicating whether to preserve interchange. - * @member {boolean} [processingSettings.suspendInterchangeOnError] The value - * indicating whether to suspend interchange on error. - * @member {boolean} - * [processingSettings.createEmptyXmlTagsForTrailingSeparators] The value - * indicating whether to create empty xml tags for trailing separators. - * @member {boolean} [processingSettings.useDotAsDecimalSeparator] The value - * indicating whether to use dot as decimal separator. - * @member {array} [envelopeOverrides] The X12 envelope override settings. - * @member {array} [validationOverrides] The X12 validation override settings. - * @member {array} [messageFilterList] The X12 message filter list. - * @member {array} schemaReferences The X12 schema references. - * @member {array} [x12DelimiterOverrides] The X12 delimiter override settings. */ export interface X12ProtocolSettings { + /** + * The X12 validation settings. + */ validationSettings: X12ValidationSettings; + /** + * The X12 framing settings. + */ framingSettings: X12FramingSettings; + /** + * The X12 envelope settings. + */ envelopeSettings: X12EnvelopeSettings; + /** + * The X12 acknowledgment settings. + */ acknowledgementSettings: X12AcknowledgementSettings; + /** + * The X12 message filter. + */ messageFilter: X12MessageFilter; + /** + * The X12 security settings. + */ securitySettings: X12SecuritySettings; + /** + * The X12 processing settings. + */ processingSettings: X12ProcessingSettings; + /** + * The X12 envelope override settings. + */ envelopeOverrides?: X12EnvelopeOverride[]; + /** + * The X12 validation override settings. + */ validationOverrides?: X12ValidationOverride[]; + /** + * The X12 message filter list. + */ messageFilterList?: X12MessageIdentifier[]; + /** + * The X12 schema references. + */ schemaReferences: X12SchemaReference[]; + /** + * The X12 delimiter override settings. + */ x12DelimiterOverrides?: X12DelimiterOverrides[]; } /** - * @class - * Initializes a new instance of the X12OneWayAgreement class. - * @constructor * The X12 one-way agreement. - * - * @member {object} senderBusinessIdentity The sender business identity - * @member {string} [senderBusinessIdentity.qualifier] The business identity - * qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [senderBusinessIdentity.value] The user defined business - * identity value. - * @member {object} receiverBusinessIdentity The receiver business identity - * @member {string} [receiverBusinessIdentity.qualifier] The business identity - * qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [receiverBusinessIdentity.value] The user defined business - * identity value. - * @member {object} protocolSettings The X12 protocol settings. - * @member {object} [protocolSettings.validationSettings] The X12 validation - * settings. - * @member {boolean} [protocolSettings.validationSettings.validateCharacterSet] - * The value indicating whether to validate character set in the message. - * @member {boolean} - * [protocolSettings.validationSettings.checkDuplicateInterchangeControlNumber] - * The value indicating whether to check for duplicate interchange control - * number. - * @member {number} - * [protocolSettings.validationSettings.interchangeControlNumberValidityDays] - * The validity period of interchange control number. - * @member {boolean} - * [protocolSettings.validationSettings.checkDuplicateGroupControlNumber] The - * value indicating whether to check for duplicate group control number. - * @member {boolean} - * [protocolSettings.validationSettings.checkDuplicateTransactionSetControlNumber] - * The value indicating whether to check for duplicate transaction set control - * number. - * @member {boolean} [protocolSettings.validationSettings.validateEdiTypes] The - * value indicating whether to Whether to validate EDI types. - * @member {boolean} [protocolSettings.validationSettings.validateXsdTypes] The - * value indicating whether to Whether to validate XSD types. - * @member {boolean} - * [protocolSettings.validationSettings.allowLeadingAndTrailingSpacesAndZeroes] - * The value indicating whether to allow leading and trailing spaces and - * zeroes. - * @member {boolean} - * [protocolSettings.validationSettings.trimLeadingAndTrailingSpacesAndZeroes] - * The value indicating whether to trim leading and trailing spaces and zeroes. - * @member {string} - * [protocolSettings.validationSettings.trailingSeparatorPolicy] The trailing - * separator policy. Possible values include: 'NotSpecified', 'NotAllowed', - * 'Optional', 'Mandatory' - * @member {object} [protocolSettings.framingSettings] The X12 framing - * settings. - * @member {number} [protocolSettings.framingSettings.dataElementSeparator] The - * data element separator. - * @member {number} [protocolSettings.framingSettings.componentSeparator] The - * component separator. - * @member {boolean} - * [protocolSettings.framingSettings.replaceSeparatorsInPayload] The value - * indicating whether to replace separators in payload. - * @member {number} [protocolSettings.framingSettings.replaceCharacter] The - * replacement character. - * @member {number} [protocolSettings.framingSettings.segmentTerminator] The - * segment terminator. - * @member {string} [protocolSettings.framingSettings.characterSet] The X12 - * character set. Possible values include: 'NotSpecified', 'Basic', 'Extended', - * 'UTF8' - * @member {string} [protocolSettings.framingSettings.segmentTerminatorSuffix] - * The segment terminator suffix. Possible values include: 'NotSpecified', - * 'None', 'CR', 'LF', 'CRLF' - * @member {object} [protocolSettings.envelopeSettings] The X12 envelope - * settings. - * @member {number} [protocolSettings.envelopeSettings.controlStandardsId] The - * controls standards id. - * @member {boolean} - * [protocolSettings.envelopeSettings.useControlStandardsIdAsRepetitionCharacter] - * The value indicating whether to use control standards id as repetition - * character. - * @member {string} [protocolSettings.envelopeSettings.senderApplicationId] The - * sender application id. - * @member {string} [protocolSettings.envelopeSettings.receiverApplicationId] - * The receiver application id. - * @member {string} [protocolSettings.envelopeSettings.controlVersionNumber] - * The control version number. - * @member {number} - * [protocolSettings.envelopeSettings.interchangeControlNumberLowerBound] The - * interchange control number lower bound. - * @member {number} - * [protocolSettings.envelopeSettings.interchangeControlNumberUpperBound] The - * interchange control number upper bound. - * @member {boolean} - * [protocolSettings.envelopeSettings.rolloverInterchangeControlNumber] The - * value indicating whether to rollover interchange control number. - * @member {boolean} - * [protocolSettings.envelopeSettings.enableDefaultGroupHeaders] The value - * indicating whether to enable default group headers. - * @member {string} [protocolSettings.envelopeSettings.functionalGroupId] The - * functional group id. - * @member {number} - * [protocolSettings.envelopeSettings.groupControlNumberLowerBound] The group - * control number lower bound. - * @member {number} - * [protocolSettings.envelopeSettings.groupControlNumberUpperBound] The group - * control number upper bound. - * @member {boolean} - * [protocolSettings.envelopeSettings.rolloverGroupControlNumber] The value - * indicating whether to rollover group control number. - * @member {string} [protocolSettings.envelopeSettings.groupHeaderAgencyCode] - * The group header agency code. - * @member {string} [protocolSettings.envelopeSettings.groupHeaderVersion] The - * group header version. - * @member {number} - * [protocolSettings.envelopeSettings.transactionSetControlNumberLowerBound] - * The transaction set control number lower bound. - * @member {number} - * [protocolSettings.envelopeSettings.transactionSetControlNumberUpperBound] - * The transaction set control number upper bound. - * @member {boolean} - * [protocolSettings.envelopeSettings.rolloverTransactionSetControlNumber] The - * value indicating whether to rollover transaction set control number. - * @member {string} - * [protocolSettings.envelopeSettings.transactionSetControlNumberPrefix] The - * transaction set control number prefix. - * @member {string} - * [protocolSettings.envelopeSettings.transactionSetControlNumberSuffix] The - * transaction set control number suffix. - * @member {boolean} - * [protocolSettings.envelopeSettings.overwriteExistingTransactionSetControlNumber] - * The value indicating whether to overwrite existing transaction set control - * number. - * @member {string} [protocolSettings.envelopeSettings.groupHeaderDateFormat] - * The group header date format. Possible values include: 'NotSpecified', - * 'CCYYMMDD', 'YYMMDD' - * @member {string} [protocolSettings.envelopeSettings.groupHeaderTimeFormat] - * The group header time format. Possible values include: 'NotSpecified', - * 'HHMM', 'HHMMSS', 'HHMMSSdd', 'HHMMSSd' - * @member {string} [protocolSettings.envelopeSettings.usageIndicator] The - * usage indicator. Possible values include: 'NotSpecified', 'Test', - * 'Information', 'Production' - * @member {object} [protocolSettings.acknowledgementSettings] The X12 - * acknowledgment settings. - * @member {boolean} - * [protocolSettings.acknowledgementSettings.needTechnicalAcknowledgement] The - * value indicating whether technical acknowledgement is needed. - * @member {boolean} - * [protocolSettings.acknowledgementSettings.batchTechnicalAcknowledgements] - * The value indicating whether to batch the technical acknowledgements. - * @member {boolean} - * [protocolSettings.acknowledgementSettings.needFunctionalAcknowledgement] The - * value indicating whether functional acknowledgement is needed. - * @member {string} - * [protocolSettings.acknowledgementSettings.functionalAcknowledgementVersion] - * The functional acknowledgement version. - * @member {boolean} - * [protocolSettings.acknowledgementSettings.batchFunctionalAcknowledgements] - * The value indicating whether to batch functional acknowledgements. - * @member {boolean} - * [protocolSettings.acknowledgementSettings.needImplementationAcknowledgement] - * The value indicating whether implementation acknowledgement is needed. - * @member {string} - * [protocolSettings.acknowledgementSettings.implementationAcknowledgementVersion] - * The implementation acknowledgement version. - * @member {boolean} - * [protocolSettings.acknowledgementSettings.batchImplementationAcknowledgements] - * The value indicating whether to batch implementation acknowledgements. - * @member {boolean} - * [protocolSettings.acknowledgementSettings.needLoopForValidMessages] The - * value indicating whether a loop is needed for valid messages. - * @member {boolean} - * [protocolSettings.acknowledgementSettings.sendSynchronousAcknowledgement] - * The value indicating whether to send synchronous acknowledgement. - * @member {string} - * [protocolSettings.acknowledgementSettings.acknowledgementControlNumberPrefix] - * The acknowledgement control number prefix. - * @member {string} - * [protocolSettings.acknowledgementSettings.acknowledgementControlNumberSuffix] - * The acknowledgement control number suffix. - * @member {number} - * [protocolSettings.acknowledgementSettings.acknowledgementControlNumberLowerBound] - * The acknowledgement control number lower bound. - * @member {number} - * [protocolSettings.acknowledgementSettings.acknowledgementControlNumberUpperBound] - * The acknowledgement control number upper bound. - * @member {boolean} - * [protocolSettings.acknowledgementSettings.rolloverAcknowledgementControlNumber] - * The value indicating whether to rollover acknowledgement control number. - * @member {object} [protocolSettings.messageFilter] The X12 message filter. - * @member {string} [protocolSettings.messageFilter.messageFilterType] The - * message filter type. Possible values include: 'NotSpecified', 'Include', - * 'Exclude' - * @member {object} [protocolSettings.securitySettings] The X12 security - * settings. - * @member {string} [protocolSettings.securitySettings.authorizationQualifier] - * The authorization qualifier. - * @member {string} [protocolSettings.securitySettings.authorizationValue] The - * authorization value. - * @member {string} [protocolSettings.securitySettings.securityQualifier] The - * security qualifier. - * @member {string} [protocolSettings.securitySettings.passwordValue] The - * password value. - * @member {object} [protocolSettings.processingSettings] The X12 processing - * settings. - * @member {boolean} [protocolSettings.processingSettings.maskSecurityInfo] The - * value indicating whether to mask security information. - * @member {boolean} - * [protocolSettings.processingSettings.convertImpliedDecimal] The value - * indicating whether to convert numerical type to implied decimal. - * @member {boolean} [protocolSettings.processingSettings.preserveInterchange] - * The value indicating whether to preserve interchange. - * @member {boolean} - * [protocolSettings.processingSettings.suspendInterchangeOnError] The value - * indicating whether to suspend interchange on error. - * @member {boolean} - * [protocolSettings.processingSettings.createEmptyXmlTagsForTrailingSeparators] - * The value indicating whether to create empty xml tags for trailing - * separators. - * @member {boolean} - * [protocolSettings.processingSettings.useDotAsDecimalSeparator] The value - * indicating whether to use dot as decimal separator. - * @member {array} [protocolSettings.envelopeOverrides] The X12 envelope - * override settings. - * @member {array} [protocolSettings.validationOverrides] The X12 validation - * override settings. - * @member {array} [protocolSettings.messageFilterList] The X12 message filter - * list. - * @member {array} [protocolSettings.schemaReferences] The X12 schema - * references. - * @member {array} [protocolSettings.x12DelimiterOverrides] The X12 delimiter - * override settings. */ export interface X12OneWayAgreement { + /** + * The sender business identity + */ senderBusinessIdentity: BusinessIdentity; + /** + * The receiver business identity + */ receiverBusinessIdentity: BusinessIdentity; + /** + * The X12 protocol settings. + */ protocolSettings: X12ProtocolSettings; } /** - * @class - * Initializes a new instance of the X12AgreementContent class. - * @constructor * The X12 agreement content. - * - * @member {object} receiveAgreement The X12 one-way receive agreement. - * @member {object} [receiveAgreement.senderBusinessIdentity] The sender - * business identity - * @member {string} [receiveAgreement.senderBusinessIdentity.qualifier] The - * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [receiveAgreement.senderBusinessIdentity.value] The user - * defined business identity value. - * @member {object} [receiveAgreement.receiverBusinessIdentity] The receiver - * business identity - * @member {string} [receiveAgreement.receiverBusinessIdentity.qualifier] The - * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [receiveAgreement.receiverBusinessIdentity.value] The user - * defined business identity value. - * @member {object} [receiveAgreement.protocolSettings] The X12 protocol - * settings. - * @member {object} [receiveAgreement.protocolSettings.validationSettings] The - * X12 validation settings. - * @member {boolean} - * [receiveAgreement.protocolSettings.validationSettings.validateCharacterSet] - * The value indicating whether to validate character set in the message. - * @member {boolean} - * [receiveAgreement.protocolSettings.validationSettings.checkDuplicateInterchangeControlNumber] - * The value indicating whether to check for duplicate interchange control - * number. - * @member {number} - * [receiveAgreement.protocolSettings.validationSettings.interchangeControlNumberValidityDays] - * The validity period of interchange control number. - * @member {boolean} - * [receiveAgreement.protocolSettings.validationSettings.checkDuplicateGroupControlNumber] - * The value indicating whether to check for duplicate group control number. - * @member {boolean} - * [receiveAgreement.protocolSettings.validationSettings.checkDuplicateTransactionSetControlNumber] - * The value indicating whether to check for duplicate transaction set control - * number. - * @member {boolean} - * [receiveAgreement.protocolSettings.validationSettings.validateEdiTypes] The - * value indicating whether to Whether to validate EDI types. - * @member {boolean} - * [receiveAgreement.protocolSettings.validationSettings.validateXsdTypes] The - * value indicating whether to Whether to validate XSD types. - * @member {boolean} - * [receiveAgreement.protocolSettings.validationSettings.allowLeadingAndTrailingSpacesAndZeroes] - * The value indicating whether to allow leading and trailing spaces and - * zeroes. - * @member {boolean} - * [receiveAgreement.protocolSettings.validationSettings.trimLeadingAndTrailingSpacesAndZeroes] - * The value indicating whether to trim leading and trailing spaces and zeroes. - * @member {string} - * [receiveAgreement.protocolSettings.validationSettings.trailingSeparatorPolicy] - * The trailing separator policy. Possible values include: 'NotSpecified', - * 'NotAllowed', 'Optional', 'Mandatory' - * @member {object} [receiveAgreement.protocolSettings.framingSettings] The X12 - * framing settings. - * @member {number} - * [receiveAgreement.protocolSettings.framingSettings.dataElementSeparator] The - * data element separator. - * @member {number} - * [receiveAgreement.protocolSettings.framingSettings.componentSeparator] The - * component separator. - * @member {boolean} - * [receiveAgreement.protocolSettings.framingSettings.replaceSeparatorsInPayload] - * The value indicating whether to replace separators in payload. - * @member {number} - * [receiveAgreement.protocolSettings.framingSettings.replaceCharacter] The - * replacement character. - * @member {number} - * [receiveAgreement.protocolSettings.framingSettings.segmentTerminator] The - * segment terminator. - * @member {string} - * [receiveAgreement.protocolSettings.framingSettings.characterSet] The X12 - * character set. Possible values include: 'NotSpecified', 'Basic', 'Extended', - * 'UTF8' - * @member {string} - * [receiveAgreement.protocolSettings.framingSettings.segmentTerminatorSuffix] - * The segment terminator suffix. Possible values include: 'NotSpecified', - * 'None', 'CR', 'LF', 'CRLF' - * @member {object} [receiveAgreement.protocolSettings.envelopeSettings] The - * X12 envelope settings. - * @member {number} - * [receiveAgreement.protocolSettings.envelopeSettings.controlStandardsId] The - * controls standards id. - * @member {boolean} - * [receiveAgreement.protocolSettings.envelopeSettings.useControlStandardsIdAsRepetitionCharacter] - * The value indicating whether to use control standards id as repetition - * character. - * @member {string} - * [receiveAgreement.protocolSettings.envelopeSettings.senderApplicationId] The - * sender application id. - * @member {string} - * [receiveAgreement.protocolSettings.envelopeSettings.receiverApplicationId] - * The receiver application id. - * @member {string} - * [receiveAgreement.protocolSettings.envelopeSettings.controlVersionNumber] - * The control version number. - * @member {number} - * [receiveAgreement.protocolSettings.envelopeSettings.interchangeControlNumberLowerBound] - * The interchange control number lower bound. - * @member {number} - * [receiveAgreement.protocolSettings.envelopeSettings.interchangeControlNumberUpperBound] - * The interchange control number upper bound. - * @member {boolean} - * [receiveAgreement.protocolSettings.envelopeSettings.rolloverInterchangeControlNumber] - * The value indicating whether to rollover interchange control number. - * @member {boolean} - * [receiveAgreement.protocolSettings.envelopeSettings.enableDefaultGroupHeaders] - * The value indicating whether to enable default group headers. - * @member {string} - * [receiveAgreement.protocolSettings.envelopeSettings.functionalGroupId] The - * functional group id. - * @member {number} - * [receiveAgreement.protocolSettings.envelopeSettings.groupControlNumberLowerBound] - * The group control number lower bound. - * @member {number} - * [receiveAgreement.protocolSettings.envelopeSettings.groupControlNumberUpperBound] - * The group control number upper bound. - * @member {boolean} - * [receiveAgreement.protocolSettings.envelopeSettings.rolloverGroupControlNumber] - * The value indicating whether to rollover group control number. - * @member {string} - * [receiveAgreement.protocolSettings.envelopeSettings.groupHeaderAgencyCode] - * The group header agency code. - * @member {string} - * [receiveAgreement.protocolSettings.envelopeSettings.groupHeaderVersion] The - * group header version. - * @member {number} - * [receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberLowerBound] - * The transaction set control number lower bound. - * @member {number} - * [receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberUpperBound] - * The transaction set control number upper bound. - * @member {boolean} - * [receiveAgreement.protocolSettings.envelopeSettings.rolloverTransactionSetControlNumber] - * The value indicating whether to rollover transaction set control number. - * @member {string} - * [receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberPrefix] - * The transaction set control number prefix. - * @member {string} - * [receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberSuffix] - * The transaction set control number suffix. - * @member {boolean} - * [receiveAgreement.protocolSettings.envelopeSettings.overwriteExistingTransactionSetControlNumber] - * The value indicating whether to overwrite existing transaction set control - * number. - * @member {string} - * [receiveAgreement.protocolSettings.envelopeSettings.groupHeaderDateFormat] - * The group header date format. Possible values include: 'NotSpecified', - * 'CCYYMMDD', 'YYMMDD' - * @member {string} - * [receiveAgreement.protocolSettings.envelopeSettings.groupHeaderTimeFormat] - * The group header time format. Possible values include: 'NotSpecified', - * 'HHMM', 'HHMMSS', 'HHMMSSdd', 'HHMMSSd' - * @member {string} - * [receiveAgreement.protocolSettings.envelopeSettings.usageIndicator] The - * usage indicator. Possible values include: 'NotSpecified', 'Test', - * 'Information', 'Production' - * @member {object} [receiveAgreement.protocolSettings.acknowledgementSettings] - * The X12 acknowledgment settings. - * @member {boolean} - * [receiveAgreement.protocolSettings.acknowledgementSettings.needTechnicalAcknowledgement] - * The value indicating whether technical acknowledgement is needed. - * @member {boolean} - * [receiveAgreement.protocolSettings.acknowledgementSettings.batchTechnicalAcknowledgements] - * The value indicating whether to batch the technical acknowledgements. - * @member {boolean} - * [receiveAgreement.protocolSettings.acknowledgementSettings.needFunctionalAcknowledgement] - * The value indicating whether functional acknowledgement is needed. - * @member {string} - * [receiveAgreement.protocolSettings.acknowledgementSettings.functionalAcknowledgementVersion] - * The functional acknowledgement version. - * @member {boolean} - * [receiveAgreement.protocolSettings.acknowledgementSettings.batchFunctionalAcknowledgements] - * The value indicating whether to batch functional acknowledgements. - * @member {boolean} - * [receiveAgreement.protocolSettings.acknowledgementSettings.needImplementationAcknowledgement] - * The value indicating whether implementation acknowledgement is needed. - * @member {string} - * [receiveAgreement.protocolSettings.acknowledgementSettings.implementationAcknowledgementVersion] - * The implementation acknowledgement version. - * @member {boolean} - * [receiveAgreement.protocolSettings.acknowledgementSettings.batchImplementationAcknowledgements] - * The value indicating whether to batch implementation acknowledgements. - * @member {boolean} - * [receiveAgreement.protocolSettings.acknowledgementSettings.needLoopForValidMessages] - * The value indicating whether a loop is needed for valid messages. - * @member {boolean} - * [receiveAgreement.protocolSettings.acknowledgementSettings.sendSynchronousAcknowledgement] - * The value indicating whether to send synchronous acknowledgement. - * @member {string} - * [receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberPrefix] - * The acknowledgement control number prefix. - * @member {string} - * [receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberSuffix] - * The acknowledgement control number suffix. - * @member {number} - * [receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberLowerBound] - * The acknowledgement control number lower bound. - * @member {number} - * [receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberUpperBound] - * The acknowledgement control number upper bound. - * @member {boolean} - * [receiveAgreement.protocolSettings.acknowledgementSettings.rolloverAcknowledgementControlNumber] - * The value indicating whether to rollover acknowledgement control number. - * @member {object} [receiveAgreement.protocolSettings.messageFilter] The X12 - * message filter. - * @member {string} - * [receiveAgreement.protocolSettings.messageFilter.messageFilterType] The - * message filter type. Possible values include: 'NotSpecified', 'Include', - * 'Exclude' - * @member {object} [receiveAgreement.protocolSettings.securitySettings] The - * X12 security settings. - * @member {string} - * [receiveAgreement.protocolSettings.securitySettings.authorizationQualifier] - * The authorization qualifier. - * @member {string} - * [receiveAgreement.protocolSettings.securitySettings.authorizationValue] The - * authorization value. - * @member {string} - * [receiveAgreement.protocolSettings.securitySettings.securityQualifier] The - * security qualifier. - * @member {string} - * [receiveAgreement.protocolSettings.securitySettings.passwordValue] The - * password value. - * @member {object} [receiveAgreement.protocolSettings.processingSettings] The - * X12 processing settings. - * @member {boolean} - * [receiveAgreement.protocolSettings.processingSettings.maskSecurityInfo] The - * value indicating whether to mask security information. - * @member {boolean} - * [receiveAgreement.protocolSettings.processingSettings.convertImpliedDecimal] - * The value indicating whether to convert numerical type to implied decimal. - * @member {boolean} - * [receiveAgreement.protocolSettings.processingSettings.preserveInterchange] - * The value indicating whether to preserve interchange. - * @member {boolean} - * [receiveAgreement.protocolSettings.processingSettings.suspendInterchangeOnError] - * The value indicating whether to suspend interchange on error. - * @member {boolean} - * [receiveAgreement.protocolSettings.processingSettings.createEmptyXmlTagsForTrailingSeparators] - * The value indicating whether to create empty xml tags for trailing - * separators. - * @member {boolean} - * [receiveAgreement.protocolSettings.processingSettings.useDotAsDecimalSeparator] - * The value indicating whether to use dot as decimal separator. - * @member {array} [receiveAgreement.protocolSettings.envelopeOverrides] The - * X12 envelope override settings. - * @member {array} [receiveAgreement.protocolSettings.validationOverrides] The - * X12 validation override settings. - * @member {array} [receiveAgreement.protocolSettings.messageFilterList] The - * X12 message filter list. - * @member {array} [receiveAgreement.protocolSettings.schemaReferences] The X12 - * schema references. - * @member {array} [receiveAgreement.protocolSettings.x12DelimiterOverrides] - * The X12 delimiter override settings. - * @member {object} sendAgreement The X12 one-way send agreement. - * @member {object} [sendAgreement.senderBusinessIdentity] The sender business - * identity - * @member {string} [sendAgreement.senderBusinessIdentity.qualifier] The - * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [sendAgreement.senderBusinessIdentity.value] The user - * defined business identity value. - * @member {object} [sendAgreement.receiverBusinessIdentity] The receiver - * business identity - * @member {string} [sendAgreement.receiverBusinessIdentity.qualifier] The - * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [sendAgreement.receiverBusinessIdentity.value] The user - * defined business identity value. - * @member {object} [sendAgreement.protocolSettings] The X12 protocol settings. - * @member {object} [sendAgreement.protocolSettings.validationSettings] The X12 - * validation settings. - * @member {boolean} - * [sendAgreement.protocolSettings.validationSettings.validateCharacterSet] The - * value indicating whether to validate character set in the message. - * @member {boolean} - * [sendAgreement.protocolSettings.validationSettings.checkDuplicateInterchangeControlNumber] - * The value indicating whether to check for duplicate interchange control - * number. - * @member {number} - * [sendAgreement.protocolSettings.validationSettings.interchangeControlNumberValidityDays] - * The validity period of interchange control number. - * @member {boolean} - * [sendAgreement.protocolSettings.validationSettings.checkDuplicateGroupControlNumber] - * The value indicating whether to check for duplicate group control number. - * @member {boolean} - * [sendAgreement.protocolSettings.validationSettings.checkDuplicateTransactionSetControlNumber] - * The value indicating whether to check for duplicate transaction set control - * number. - * @member {boolean} - * [sendAgreement.protocolSettings.validationSettings.validateEdiTypes] The - * value indicating whether to Whether to validate EDI types. - * @member {boolean} - * [sendAgreement.protocolSettings.validationSettings.validateXsdTypes] The - * value indicating whether to Whether to validate XSD types. - * @member {boolean} - * [sendAgreement.protocolSettings.validationSettings.allowLeadingAndTrailingSpacesAndZeroes] - * The value indicating whether to allow leading and trailing spaces and - * zeroes. - * @member {boolean} - * [sendAgreement.protocolSettings.validationSettings.trimLeadingAndTrailingSpacesAndZeroes] - * The value indicating whether to trim leading and trailing spaces and zeroes. - * @member {string} - * [sendAgreement.protocolSettings.validationSettings.trailingSeparatorPolicy] - * The trailing separator policy. Possible values include: 'NotSpecified', - * 'NotAllowed', 'Optional', 'Mandatory' - * @member {object} [sendAgreement.protocolSettings.framingSettings] The X12 - * framing settings. - * @member {number} - * [sendAgreement.protocolSettings.framingSettings.dataElementSeparator] The - * data element separator. - * @member {number} - * [sendAgreement.protocolSettings.framingSettings.componentSeparator] The - * component separator. - * @member {boolean} - * [sendAgreement.protocolSettings.framingSettings.replaceSeparatorsInPayload] - * The value indicating whether to replace separators in payload. - * @member {number} - * [sendAgreement.protocolSettings.framingSettings.replaceCharacter] The - * replacement character. - * @member {number} - * [sendAgreement.protocolSettings.framingSettings.segmentTerminator] The - * segment terminator. - * @member {string} - * [sendAgreement.protocolSettings.framingSettings.characterSet] The X12 - * character set. Possible values include: 'NotSpecified', 'Basic', 'Extended', - * 'UTF8' - * @member {string} - * [sendAgreement.protocolSettings.framingSettings.segmentTerminatorSuffix] The - * segment terminator suffix. Possible values include: 'NotSpecified', 'None', - * 'CR', 'LF', 'CRLF' - * @member {object} [sendAgreement.protocolSettings.envelopeSettings] The X12 - * envelope settings. - * @member {number} - * [sendAgreement.protocolSettings.envelopeSettings.controlStandardsId] The - * controls standards id. - * @member {boolean} - * [sendAgreement.protocolSettings.envelopeSettings.useControlStandardsIdAsRepetitionCharacter] - * The value indicating whether to use control standards id as repetition - * character. - * @member {string} - * [sendAgreement.protocolSettings.envelopeSettings.senderApplicationId] The - * sender application id. - * @member {string} - * [sendAgreement.protocolSettings.envelopeSettings.receiverApplicationId] The - * receiver application id. - * @member {string} - * [sendAgreement.protocolSettings.envelopeSettings.controlVersionNumber] The - * control version number. - * @member {number} - * [sendAgreement.protocolSettings.envelopeSettings.interchangeControlNumberLowerBound] - * The interchange control number lower bound. - * @member {number} - * [sendAgreement.protocolSettings.envelopeSettings.interchangeControlNumberUpperBound] - * The interchange control number upper bound. - * @member {boolean} - * [sendAgreement.protocolSettings.envelopeSettings.rolloverInterchangeControlNumber] - * The value indicating whether to rollover interchange control number. - * @member {boolean} - * [sendAgreement.protocolSettings.envelopeSettings.enableDefaultGroupHeaders] - * The value indicating whether to enable default group headers. - * @member {string} - * [sendAgreement.protocolSettings.envelopeSettings.functionalGroupId] The - * functional group id. - * @member {number} - * [sendAgreement.protocolSettings.envelopeSettings.groupControlNumberLowerBound] - * The group control number lower bound. - * @member {number} - * [sendAgreement.protocolSettings.envelopeSettings.groupControlNumberUpperBound] - * The group control number upper bound. - * @member {boolean} - * [sendAgreement.protocolSettings.envelopeSettings.rolloverGroupControlNumber] - * The value indicating whether to rollover group control number. - * @member {string} - * [sendAgreement.protocolSettings.envelopeSettings.groupHeaderAgencyCode] The - * group header agency code. - * @member {string} - * [sendAgreement.protocolSettings.envelopeSettings.groupHeaderVersion] The - * group header version. - * @member {number} - * [sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberLowerBound] - * The transaction set control number lower bound. - * @member {number} - * [sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberUpperBound] - * The transaction set control number upper bound. - * @member {boolean} - * [sendAgreement.protocolSettings.envelopeSettings.rolloverTransactionSetControlNumber] - * The value indicating whether to rollover transaction set control number. - * @member {string} - * [sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberPrefix] - * The transaction set control number prefix. - * @member {string} - * [sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberSuffix] - * The transaction set control number suffix. - * @member {boolean} - * [sendAgreement.protocolSettings.envelopeSettings.overwriteExistingTransactionSetControlNumber] - * The value indicating whether to overwrite existing transaction set control - * number. - * @member {string} - * [sendAgreement.protocolSettings.envelopeSettings.groupHeaderDateFormat] The - * group header date format. Possible values include: 'NotSpecified', - * 'CCYYMMDD', 'YYMMDD' - * @member {string} - * [sendAgreement.protocolSettings.envelopeSettings.groupHeaderTimeFormat] The - * group header time format. Possible values include: 'NotSpecified', 'HHMM', - * 'HHMMSS', 'HHMMSSdd', 'HHMMSSd' - * @member {string} - * [sendAgreement.protocolSettings.envelopeSettings.usageIndicator] The usage - * indicator. Possible values include: 'NotSpecified', 'Test', 'Information', - * 'Production' - * @member {object} [sendAgreement.protocolSettings.acknowledgementSettings] - * The X12 acknowledgment settings. - * @member {boolean} - * [sendAgreement.protocolSettings.acknowledgementSettings.needTechnicalAcknowledgement] - * The value indicating whether technical acknowledgement is needed. - * @member {boolean} - * [sendAgreement.protocolSettings.acknowledgementSettings.batchTechnicalAcknowledgements] - * The value indicating whether to batch the technical acknowledgements. - * @member {boolean} - * [sendAgreement.protocolSettings.acknowledgementSettings.needFunctionalAcknowledgement] - * The value indicating whether functional acknowledgement is needed. - * @member {string} - * [sendAgreement.protocolSettings.acknowledgementSettings.functionalAcknowledgementVersion] - * The functional acknowledgement version. - * @member {boolean} - * [sendAgreement.protocolSettings.acknowledgementSettings.batchFunctionalAcknowledgements] - * The value indicating whether to batch functional acknowledgements. - * @member {boolean} - * [sendAgreement.protocolSettings.acknowledgementSettings.needImplementationAcknowledgement] - * The value indicating whether implementation acknowledgement is needed. - * @member {string} - * [sendAgreement.protocolSettings.acknowledgementSettings.implementationAcknowledgementVersion] - * The implementation acknowledgement version. - * @member {boolean} - * [sendAgreement.protocolSettings.acknowledgementSettings.batchImplementationAcknowledgements] - * The value indicating whether to batch implementation acknowledgements. - * @member {boolean} - * [sendAgreement.protocolSettings.acknowledgementSettings.needLoopForValidMessages] - * The value indicating whether a loop is needed for valid messages. - * @member {boolean} - * [sendAgreement.protocolSettings.acknowledgementSettings.sendSynchronousAcknowledgement] - * The value indicating whether to send synchronous acknowledgement. - * @member {string} - * [sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberPrefix] - * The acknowledgement control number prefix. - * @member {string} - * [sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberSuffix] - * The acknowledgement control number suffix. - * @member {number} - * [sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberLowerBound] - * The acknowledgement control number lower bound. - * @member {number} - * [sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberUpperBound] - * The acknowledgement control number upper bound. - * @member {boolean} - * [sendAgreement.protocolSettings.acknowledgementSettings.rolloverAcknowledgementControlNumber] - * The value indicating whether to rollover acknowledgement control number. - * @member {object} [sendAgreement.protocolSettings.messageFilter] The X12 - * message filter. - * @member {string} - * [sendAgreement.protocolSettings.messageFilter.messageFilterType] The message - * filter type. Possible values include: 'NotSpecified', 'Include', 'Exclude' - * @member {object} [sendAgreement.protocolSettings.securitySettings] The X12 - * security settings. - * @member {string} - * [sendAgreement.protocolSettings.securitySettings.authorizationQualifier] The - * authorization qualifier. - * @member {string} - * [sendAgreement.protocolSettings.securitySettings.authorizationValue] The - * authorization value. - * @member {string} - * [sendAgreement.protocolSettings.securitySettings.securityQualifier] The - * security qualifier. - * @member {string} - * [sendAgreement.protocolSettings.securitySettings.passwordValue] The password - * value. - * @member {object} [sendAgreement.protocolSettings.processingSettings] The X12 - * processing settings. - * @member {boolean} - * [sendAgreement.protocolSettings.processingSettings.maskSecurityInfo] The - * value indicating whether to mask security information. - * @member {boolean} - * [sendAgreement.protocolSettings.processingSettings.convertImpliedDecimal] - * The value indicating whether to convert numerical type to implied decimal. - * @member {boolean} - * [sendAgreement.protocolSettings.processingSettings.preserveInterchange] The - * value indicating whether to preserve interchange. - * @member {boolean} - * [sendAgreement.protocolSettings.processingSettings.suspendInterchangeOnError] - * The value indicating whether to suspend interchange on error. - * @member {boolean} - * [sendAgreement.protocolSettings.processingSettings.createEmptyXmlTagsForTrailingSeparators] - * The value indicating whether to create empty xml tags for trailing - * separators. - * @member {boolean} - * [sendAgreement.protocolSettings.processingSettings.useDotAsDecimalSeparator] - * The value indicating whether to use dot as decimal separator. - * @member {array} [sendAgreement.protocolSettings.envelopeOverrides] The X12 - * envelope override settings. - * @member {array} [sendAgreement.protocolSettings.validationOverrides] The X12 - * validation override settings. - * @member {array} [sendAgreement.protocolSettings.messageFilterList] The X12 - * message filter list. - * @member {array} [sendAgreement.protocolSettings.schemaReferences] The X12 - * schema references. - * @member {array} [sendAgreement.protocolSettings.x12DelimiterOverrides] The - * X12 delimiter override settings. */ export interface X12AgreementContent { + /** + * The X12 one-way receive agreement. + */ receiveAgreement: X12OneWayAgreement; + /** + * The X12 one-way send agreement. + */ sendAgreement: X12OneWayAgreement; } /** - * @class - * Initializes a new instance of the EdifactValidationSettings class. - * @constructor * The Edifact agreement validation settings. - * - * @member {boolean} validateCharacterSet The value indicating whether to - * validate character set in the message. - * @member {boolean} checkDuplicateInterchangeControlNumber The value - * indicating whether to check for duplicate interchange control number. - * @member {number} interchangeControlNumberValidityDays The validity period of - * interchange control number. - * @member {boolean} checkDuplicateGroupControlNumber The value indicating - * whether to check for duplicate group control number. - * @member {boolean} checkDuplicateTransactionSetControlNumber The value - * indicating whether to check for duplicate transaction set control number. - * @member {boolean} validateEdiTypes The value indicating whether to Whether - * to validate EDI types. - * @member {boolean} validateXsdTypes The value indicating whether to Whether - * to validate XSD types. - * @member {boolean} allowLeadingAndTrailingSpacesAndZeroes The value - * indicating whether to allow leading and trailing spaces and zeroes. - * @member {boolean} trimLeadingAndTrailingSpacesAndZeroes The value indicating - * whether to trim leading and trailing spaces and zeroes. - * @member {string} trailingSeparatorPolicy The trailing separator policy. - * Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', - * 'Mandatory' */ export interface EdifactValidationSettings { + /** + * The value indicating whether to validate character set in the message. + */ validateCharacterSet: boolean; + /** + * The value indicating whether to check for duplicate interchange control number. + */ checkDuplicateInterchangeControlNumber: boolean; + /** + * The validity period of interchange control number. + */ interchangeControlNumberValidityDays: number; + /** + * The value indicating whether to check for duplicate group control number. + */ checkDuplicateGroupControlNumber: boolean; + /** + * The value indicating whether to check for duplicate transaction set control number. + */ checkDuplicateTransactionSetControlNumber: boolean; + /** + * The value indicating whether to Whether to validate EDI types. + */ validateEdiTypes: boolean; + /** + * The value indicating whether to Whether to validate XSD types. + */ validateXsdTypes: boolean; + /** + * The value indicating whether to allow leading and trailing spaces and zeroes. + */ allowLeadingAndTrailingSpacesAndZeroes: boolean; + /** + * The value indicating whether to trim leading and trailing spaces and zeroes. + */ trimLeadingAndTrailingSpacesAndZeroes: boolean; + /** + * The trailing separator policy. Possible values include: 'NotSpecified', 'NotAllowed', + * 'Optional', 'Mandatory' + */ trailingSeparatorPolicy: string; } /** - * @class - * Initializes a new instance of the EdifactFramingSettings class. - * @constructor * The Edifact agreement framing settings. - * - * @member {string} [serviceCodeListDirectoryVersion] The service code list - * directory version. - * @member {string} [characterEncoding] The character encoding. - * @member {number} protocolVersion The protocol version. - * @member {number} dataElementSeparator The data element separator. - * @member {number} componentSeparator The component separator. - * @member {number} segmentTerminator The segment terminator. - * @member {number} releaseIndicator The release indicator. - * @member {number} repetitionSeparator The repetition separator. - * @member {string} characterSet The EDIFACT frame setting characterSet. - * Possible values include: 'NotSpecified', 'UNOB', 'UNOA', 'UNOC', 'UNOD', - * 'UNOE', 'UNOF', 'UNOG', 'UNOH', 'UNOI', 'UNOJ', 'UNOK', 'UNOX', 'UNOY', - * 'KECA' - * @member {string} decimalPointIndicator The EDIFACT frame setting decimal - * indicator. Possible values include: 'NotSpecified', 'Comma', 'Decimal' - * @member {string} segmentTerminatorSuffix The EDIFACT frame setting segment - * terminator suffix. Possible values include: 'NotSpecified', 'None', 'CR', - * 'LF', 'CRLF' */ export interface EdifactFramingSettings { + /** + * The service code list directory version. + */ serviceCodeListDirectoryVersion?: string; + /** + * The character encoding. + */ characterEncoding?: string; + /** + * The protocol version. + */ protocolVersion: number; + /** + * The data element separator. + */ dataElementSeparator: number; + /** + * The component separator. + */ componentSeparator: number; + /** + * The segment terminator. + */ segmentTerminator: number; + /** + * The release indicator. + */ releaseIndicator: number; + /** + * The repetition separator. + */ repetitionSeparator: number; + /** + * The EDIFACT frame setting characterSet. Possible values include: 'NotSpecified', 'UNOB', + * 'UNOA', 'UNOC', 'UNOD', 'UNOE', 'UNOF', 'UNOG', 'UNOH', 'UNOI', 'UNOJ', 'UNOK', 'UNOX', + * 'UNOY', 'KECA' + */ characterSet: string; + /** + * The EDIFACT frame setting decimal indicator. Possible values include: 'NotSpecified', 'Comma', + * 'Decimal' + */ decimalPointIndicator: string; + /** + * The EDIFACT frame setting segment terminator suffix. Possible values include: 'NotSpecified', + * 'None', 'CR', 'LF', 'CRLF' + */ segmentTerminatorSuffix: string; } /** - * @class - * Initializes a new instance of the EdifactEnvelopeSettings class. - * @constructor * The Edifact agreement envelope settings. - * - * @member {string} [groupAssociationAssignedCode] The group association - * assigned code. - * @member {string} [communicationAgreementId] The communication agreement id. - * @member {boolean} applyDelimiterStringAdvice The value indicating whether to - * apply delimiter string advice. - * @member {boolean} createGroupingSegments The value indicating whether to - * create grouping segments. - * @member {boolean} enableDefaultGroupHeaders The value indicating whether to - * enable default group headers. - * @member {string} [recipientReferencePasswordValue] The recipient reference - * password value. - * @member {string} [recipientReferencePasswordQualifier] The recipient - * reference password qualifier. - * @member {string} [applicationReferenceId] The application reference id. - * @member {string} [processingPriorityCode] The processing priority code. - * @member {number} interchangeControlNumberLowerBound The interchange control - * number lower bound. - * @member {number} interchangeControlNumberUpperBound The interchange control - * number upper bound. - * @member {boolean} rolloverInterchangeControlNumber The value indicating - * whether to rollover interchange control number. - * @member {string} [interchangeControlNumberPrefix] The interchange control - * number prefix. - * @member {string} [interchangeControlNumberSuffix] The interchange control - * number suffix. - * @member {string} [senderReverseRoutingAddress] The sender reverse routing - * address. - * @member {string} [receiverReverseRoutingAddress] The receiver reverse - * routing address. - * @member {string} [functionalGroupId] The functional group id. - * @member {string} [groupControllingAgencyCode] The group controlling agency - * code. - * @member {string} [groupMessageVersion] The group message version. - * @member {string} [groupMessageRelease] The group message release. - * @member {number} groupControlNumberLowerBound The group control number lower - * bound. - * @member {number} groupControlNumberUpperBound The group control number upper - * bound. - * @member {boolean} rolloverGroupControlNumber The value indicating whether to - * rollover group control number. - * @member {string} [groupControlNumberPrefix] The group control number prefix. - * @member {string} [groupControlNumberSuffix] The group control number suffix. - * @member {string} [groupApplicationReceiverQualifier] The group application - * receiver qualifier. - * @member {string} [groupApplicationReceiverId] The group application receiver - * id. - * @member {string} [groupApplicationSenderQualifier] The group application - * sender qualifier. - * @member {string} [groupApplicationSenderId] The group application sender id. - * @member {string} [groupApplicationPassword] The group application password. - * @member {boolean} overwriteExistingTransactionSetControlNumber The value - * indicating whether to overwrite existing transaction set control number. - * @member {string} [transactionSetControlNumberPrefix] The transaction set - * control number prefix. - * @member {string} [transactionSetControlNumberSuffix] The transaction set - * control number suffix. - * @member {number} transactionSetControlNumberLowerBound The transaction set - * control number lower bound. - * @member {number} transactionSetControlNumberUpperBound The transaction set - * control number upper bound. - * @member {boolean} rolloverTransactionSetControlNumber The value indicating - * whether to rollover transaction set control number. - * @member {boolean} isTestInterchange The value indicating whether the message - * is a test interchange. - * @member {string} [senderInternalIdentification] The sender internal - * identification. - * @member {string} [senderInternalSubIdentification] The sender internal sub - * identification. - * @member {string} [receiverInternalIdentification] The receiver internal - * identification. - * @member {string} [receiverInternalSubIdentification] The receiver internal - * sub identification. */ export interface EdifactEnvelopeSettings { + /** + * The group association assigned code. + */ groupAssociationAssignedCode?: string; + /** + * The communication agreement id. + */ communicationAgreementId?: string; + /** + * The value indicating whether to apply delimiter string advice. + */ applyDelimiterStringAdvice: boolean; + /** + * The value indicating whether to create grouping segments. + */ createGroupingSegments: boolean; + /** + * The value indicating whether to enable default group headers. + */ enableDefaultGroupHeaders: boolean; + /** + * The recipient reference password value. + */ recipientReferencePasswordValue?: string; + /** + * The recipient reference password qualifier. + */ recipientReferencePasswordQualifier?: string; + /** + * The application reference id. + */ applicationReferenceId?: string; + /** + * The processing priority code. + */ processingPriorityCode?: string; + /** + * The interchange control number lower bound. + */ interchangeControlNumberLowerBound: number; + /** + * The interchange control number upper bound. + */ interchangeControlNumberUpperBound: number; + /** + * The value indicating whether to rollover interchange control number. + */ rolloverInterchangeControlNumber: boolean; + /** + * The interchange control number prefix. + */ interchangeControlNumberPrefix?: string; + /** + * The interchange control number suffix. + */ interchangeControlNumberSuffix?: string; + /** + * The sender reverse routing address. + */ senderReverseRoutingAddress?: string; + /** + * The receiver reverse routing address. + */ receiverReverseRoutingAddress?: string; + /** + * The functional group id. + */ functionalGroupId?: string; + /** + * The group controlling agency code. + */ groupControllingAgencyCode?: string; + /** + * The group message version. + */ groupMessageVersion?: string; + /** + * The group message release. + */ groupMessageRelease?: string; + /** + * The group control number lower bound. + */ groupControlNumberLowerBound: number; + /** + * The group control number upper bound. + */ groupControlNumberUpperBound: number; + /** + * The value indicating whether to rollover group control number. + */ rolloverGroupControlNumber: boolean; + /** + * The group control number prefix. + */ groupControlNumberPrefix?: string; + /** + * The group control number suffix. + */ groupControlNumberSuffix?: string; + /** + * The group application receiver qualifier. + */ groupApplicationReceiverQualifier?: string; + /** + * The group application receiver id. + */ groupApplicationReceiverId?: string; + /** + * The group application sender qualifier. + */ groupApplicationSenderQualifier?: string; + /** + * The group application sender id. + */ groupApplicationSenderId?: string; + /** + * The group application password. + */ groupApplicationPassword?: string; + /** + * The value indicating whether to overwrite existing transaction set control number. + */ overwriteExistingTransactionSetControlNumber: boolean; + /** + * The transaction set control number prefix. + */ transactionSetControlNumberPrefix?: string; + /** + * The transaction set control number suffix. + */ transactionSetControlNumberSuffix?: string; + /** + * The transaction set control number lower bound. + */ transactionSetControlNumberLowerBound: number; + /** + * The transaction set control number upper bound. + */ transactionSetControlNumberUpperBound: number; + /** + * The value indicating whether to rollover transaction set control number. + */ rolloverTransactionSetControlNumber: boolean; + /** + * The value indicating whether the message is a test interchange. + */ isTestInterchange: boolean; + /** + * The sender internal identification. + */ senderInternalIdentification?: string; + /** + * The sender internal sub identification. + */ senderInternalSubIdentification?: string; + /** + * The receiver internal identification. + */ receiverInternalIdentification?: string; + /** + * The receiver internal sub identification. + */ receiverInternalSubIdentification?: string; } /** - * @class - * Initializes a new instance of the EdifactAcknowledgementSettings class. - * @constructor * The Edifact agreement acknowledgement settings. - * - * @member {boolean} needTechnicalAcknowledgement The value indicating whether - * technical acknowledgement is needed. - * @member {boolean} batchTechnicalAcknowledgements The value indicating - * whether to batch the technical acknowledgements. - * @member {boolean} needFunctionalAcknowledgement The value indicating whether - * functional acknowledgement is needed. - * @member {boolean} batchFunctionalAcknowledgements The value indicating - * whether to batch functional acknowledgements. - * @member {boolean} needLoopForValidMessages The value indicating whether a - * loop is needed for valid messages. - * @member {boolean} sendSynchronousAcknowledgement The value indicating - * whether to send synchronous acknowledgement. - * @member {string} [acknowledgementControlNumberPrefix] The acknowledgement - * control number prefix. - * @member {string} [acknowledgementControlNumberSuffix] The acknowledgement - * control number suffix. - * @member {number} acknowledgementControlNumberLowerBound The acknowledgement - * control number lower bound. - * @member {number} acknowledgementControlNumberUpperBound The acknowledgement - * control number upper bound. - * @member {boolean} rolloverAcknowledgementControlNumber The value indicating - * whether to rollover acknowledgement control number. */ export interface EdifactAcknowledgementSettings { + /** + * The value indicating whether technical acknowledgement is needed. + */ needTechnicalAcknowledgement: boolean; + /** + * The value indicating whether to batch the technical acknowledgements. + */ batchTechnicalAcknowledgements: boolean; + /** + * The value indicating whether functional acknowledgement is needed. + */ needFunctionalAcknowledgement: boolean; + /** + * The value indicating whether to batch functional acknowledgements. + */ batchFunctionalAcknowledgements: boolean; + /** + * The value indicating whether a loop is needed for valid messages. + */ needLoopForValidMessages: boolean; + /** + * The value indicating whether to send synchronous acknowledgement. + */ sendSynchronousAcknowledgement: boolean; + /** + * The acknowledgement control number prefix. + */ acknowledgementControlNumberPrefix?: string; + /** + * The acknowledgement control number suffix. + */ acknowledgementControlNumberSuffix?: string; + /** + * The acknowledgement control number lower bound. + */ acknowledgementControlNumberLowerBound: number; + /** + * The acknowledgement control number upper bound. + */ acknowledgementControlNumberUpperBound: number; + /** + * The value indicating whether to rollover acknowledgement control number. + */ rolloverAcknowledgementControlNumber: boolean; } /** - * @class - * Initializes a new instance of the EdifactMessageFilter class. - * @constructor * The Edifact message filter for odata query. - * - * @member {string} messageFilterType The message filter type. Possible values - * include: 'NotSpecified', 'Include', 'Exclude' */ export interface EdifactMessageFilter { + /** + * The message filter type. Possible values include: 'NotSpecified', 'Include', 'Exclude' + */ messageFilterType: string; } /** - * @class - * Initializes a new instance of the EdifactProcessingSettings class. - * @constructor * The Edifact agreement protocol settings. - * - * @member {boolean} maskSecurityInfo The value indicating whether to mask - * security information. - * @member {boolean} preserveInterchange The value indicating whether to - * preserve interchange. - * @member {boolean} suspendInterchangeOnError The value indicating whether to - * suspend interchange on error. - * @member {boolean} createEmptyXmlTagsForTrailingSeparators The value - * indicating whether to create empty xml tags for trailing separators. - * @member {boolean} useDotAsDecimalSeparator The value indicating whether to - * use dot as decimal separator. */ export interface EdifactProcessingSettings { + /** + * The value indicating whether to mask security information. + */ maskSecurityInfo: boolean; + /** + * The value indicating whether to preserve interchange. + */ preserveInterchange: boolean; + /** + * The value indicating whether to suspend interchange on error. + */ suspendInterchangeOnError: boolean; + /** + * The value indicating whether to create empty xml tags for trailing separators. + */ createEmptyXmlTagsForTrailingSeparators: boolean; + /** + * The value indicating whether to use dot as decimal separator. + */ useDotAsDecimalSeparator: boolean; } /** - * @class - * Initializes a new instance of the EdifactEnvelopeOverride class. - * @constructor * The Edifact envelope override settings. - * - * @member {string} [messageId] The message id on which this envelope settings - * has to be applied. - * @member {string} [messageVersion] The message version on which this envelope - * settings has to be applied. - * @member {string} [messageRelease] The message release version on which this - * envelope settings has to be applied. - * @member {string} [messageAssociationAssignedCode] The message association - * assigned code. - * @member {string} [targetNamespace] The target namespace on which this - * envelope settings has to be applied. - * @member {string} [functionalGroupId] The functional group id. - * @member {string} [senderApplicationQualifier] The sender application - * qualifier. - * @member {string} [senderApplicationId] The sender application id. - * @member {string} [receiverApplicationQualifier] The receiver application - * qualifier. - * @member {string} [receiverApplicationId] The receiver application id. - * @member {string} [controllingAgencyCode] The controlling agency code. - * @member {string} [groupHeaderMessageVersion] The group header message - * version. - * @member {string} [groupHeaderMessageRelease] The group header message - * release. - * @member {string} [associationAssignedCode] The association assigned code. - * @member {string} [applicationPassword] The application password. */ export interface EdifactEnvelopeOverride { + /** + * The message id on which this envelope settings has to be applied. + */ messageId?: string; + /** + * The message version on which this envelope settings has to be applied. + */ messageVersion?: string; + /** + * The message release version on which this envelope settings has to be applied. + */ messageRelease?: string; + /** + * The message association assigned code. + */ messageAssociationAssignedCode?: string; + /** + * The target namespace on which this envelope settings has to be applied. + */ targetNamespace?: string; + /** + * The functional group id. + */ functionalGroupId?: string; + /** + * The sender application qualifier. + */ senderApplicationQualifier?: string; + /** + * The sender application id. + */ senderApplicationId?: string; + /** + * The receiver application qualifier. + */ receiverApplicationQualifier?: string; + /** + * The receiver application id. + */ receiverApplicationId?: string; + /** + * The controlling agency code. + */ controllingAgencyCode?: string; + /** + * The group header message version. + */ groupHeaderMessageVersion?: string; + /** + * The group header message release. + */ groupHeaderMessageRelease?: string; + /** + * The association assigned code. + */ associationAssignedCode?: string; + /** + * The application password. + */ applicationPassword?: string; } /** - * @class - * Initializes a new instance of the EdifactMessageIdentifier class. - * @constructor * The Edifact message identifier. - * - * @member {string} messageId The message id on which this envelope settings - * has to be applied. */ export interface EdifactMessageIdentifier { + /** + * The message id on which this envelope settings has to be applied. + */ messageId: string; } /** - * @class - * Initializes a new instance of the EdifactSchemaReference class. - * @constructor * The Edifact schema reference. - * - * @member {string} messageId The message id. - * @member {string} messageVersion The message version. - * @member {string} messageRelease The message release version. - * @member {string} [senderApplicationId] The sender application id. - * @member {string} [senderApplicationQualifier] The sender application - * qualifier. - * @member {string} [associationAssignedCode] The association assigned code. - * @member {string} schemaName The schema name. */ export interface EdifactSchemaReference { + /** + * The message id. + */ messageId: string; + /** + * The message version. + */ messageVersion: string; + /** + * The message release version. + */ messageRelease: string; + /** + * The sender application id. + */ senderApplicationId?: string; + /** + * The sender application qualifier. + */ senderApplicationQualifier?: string; + /** + * The association assigned code. + */ associationAssignedCode?: string; + /** + * The schema name. + */ schemaName: string; } /** - * @class - * Initializes a new instance of the EdifactValidationOverride class. - * @constructor * The Edifact validation override settings. - * - * @member {string} messageId The message id on which the validation settings - * has to be applied. - * @member {boolean} enforceCharacterSet The value indicating whether to - * validate character Set. - * @member {boolean} validateEdiTypes The value indicating whether to validate - * EDI types. - * @member {boolean} validateXsdTypes The value indicating whether to validate - * XSD types. - * @member {boolean} allowLeadingAndTrailingSpacesAndZeroes The value - * indicating whether to allow leading and trailing spaces and zeroes. - * @member {string} trailingSeparatorPolicy The trailing separator policy. - * Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', - * 'Mandatory' - * @member {boolean} trimLeadingAndTrailingSpacesAndZeroes The value indicating - * whether to trim leading and trailing spaces and zeroes. */ export interface EdifactValidationOverride { + /** + * The message id on which the validation settings has to be applied. + */ messageId: string; + /** + * The value indicating whether to validate character Set. + */ enforceCharacterSet: boolean; + /** + * The value indicating whether to validate EDI types. + */ validateEdiTypes: boolean; + /** + * The value indicating whether to validate XSD types. + */ validateXsdTypes: boolean; + /** + * The value indicating whether to allow leading and trailing spaces and zeroes. + */ allowLeadingAndTrailingSpacesAndZeroes: boolean; + /** + * The trailing separator policy. Possible values include: 'NotSpecified', 'NotAllowed', + * 'Optional', 'Mandatory' + */ trailingSeparatorPolicy: string; + /** + * The value indicating whether to trim leading and trailing spaces and zeroes. + */ trimLeadingAndTrailingSpacesAndZeroes: boolean; } /** - * @class - * Initializes a new instance of the EdifactDelimiterOverride class. - * @constructor * The Edifact delimiter override settings. - * - * @member {string} [messageId] The message id. - * @member {string} [messageVersion] The message version. - * @member {string} [messageRelease] The message release. - * @member {number} dataElementSeparator The data element separator. - * @member {number} componentSeparator The component separator. - * @member {number} segmentTerminator The segment terminator. - * @member {number} repetitionSeparator The repetition separator. - * @member {string} segmentTerminatorSuffix The segment terminator suffix. - * Possible values include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' - * @member {string} decimalPointIndicator The decimal point indicator. Possible - * values include: 'NotSpecified', 'Comma', 'Decimal' - * @member {number} releaseIndicator The release indicator. - * @member {string} [messageAssociationAssignedCode] The message association - * assigned code. - * @member {string} [targetNamespace] The target namespace on which this - * delimiter settings has to be applied. */ export interface EdifactDelimiterOverride { + /** + * The message id. + */ messageId?: string; + /** + * The message version. + */ messageVersion?: string; + /** + * The message release. + */ messageRelease?: string; + /** + * The data element separator. + */ dataElementSeparator: number; + /** + * The component separator. + */ componentSeparator: number; + /** + * The segment terminator. + */ segmentTerminator: number; + /** + * The repetition separator. + */ repetitionSeparator: number; + /** + * The segment terminator suffix. Possible values include: 'NotSpecified', 'None', 'CR', 'LF', + * 'CRLF' + */ segmentTerminatorSuffix: string; + /** + * The decimal point indicator. Possible values include: 'NotSpecified', 'Comma', 'Decimal' + */ decimalPointIndicator: string; + /** + * The release indicator. + */ releaseIndicator: number; + /** + * The message association assigned code. + */ messageAssociationAssignedCode?: string; + /** + * The target namespace on which this delimiter settings has to be applied. + */ targetNamespace?: string; } /** - * @class - * Initializes a new instance of the EdifactProtocolSettings class. - * @constructor * The Edifact agreement protocol settings. - * - * @member {object} validationSettings The EDIFACT validation settings. - * @member {boolean} [validationSettings.validateCharacterSet] The value - * indicating whether to validate character set in the message. - * @member {boolean} - * [validationSettings.checkDuplicateInterchangeControlNumber] The value - * indicating whether to check for duplicate interchange control number. - * @member {number} [validationSettings.interchangeControlNumberValidityDays] - * The validity period of interchange control number. - * @member {boolean} [validationSettings.checkDuplicateGroupControlNumber] The - * value indicating whether to check for duplicate group control number. - * @member {boolean} - * [validationSettings.checkDuplicateTransactionSetControlNumber] The value - * indicating whether to check for duplicate transaction set control number. - * @member {boolean} [validationSettings.validateEdiTypes] The value indicating - * whether to Whether to validate EDI types. - * @member {boolean} [validationSettings.validateXsdTypes] The value indicating - * whether to Whether to validate XSD types. - * @member {boolean} - * [validationSettings.allowLeadingAndTrailingSpacesAndZeroes] The value - * indicating whether to allow leading and trailing spaces and zeroes. - * @member {boolean} [validationSettings.trimLeadingAndTrailingSpacesAndZeroes] - * The value indicating whether to trim leading and trailing spaces and zeroes. - * @member {string} [validationSettings.trailingSeparatorPolicy] The trailing - * separator policy. Possible values include: 'NotSpecified', 'NotAllowed', - * 'Optional', 'Mandatory' - * @member {object} framingSettings The EDIFACT framing settings. - * @member {string} [framingSettings.serviceCodeListDirectoryVersion] The - * service code list directory version. - * @member {string} [framingSettings.characterEncoding] The character encoding. - * @member {number} [framingSettings.protocolVersion] The protocol version. - * @member {number} [framingSettings.dataElementSeparator] The data element - * separator. - * @member {number} [framingSettings.componentSeparator] The component - * separator. - * @member {number} [framingSettings.segmentTerminator] The segment terminator. - * @member {number} [framingSettings.releaseIndicator] The release indicator. - * @member {number} [framingSettings.repetitionSeparator] The repetition - * separator. - * @member {string} [framingSettings.characterSet] The EDIFACT frame setting - * characterSet. Possible values include: 'NotSpecified', 'UNOB', 'UNOA', - * 'UNOC', 'UNOD', 'UNOE', 'UNOF', 'UNOG', 'UNOH', 'UNOI', 'UNOJ', 'UNOK', - * 'UNOX', 'UNOY', 'KECA' - * @member {string} [framingSettings.decimalPointIndicator] The EDIFACT frame - * setting decimal indicator. Possible values include: 'NotSpecified', 'Comma', - * 'Decimal' - * @member {string} [framingSettings.segmentTerminatorSuffix] The EDIFACT frame - * setting segment terminator suffix. Possible values include: 'NotSpecified', - * 'None', 'CR', 'LF', 'CRLF' - * @member {object} envelopeSettings The EDIFACT envelope settings. - * @member {string} [envelopeSettings.groupAssociationAssignedCode] The group - * association assigned code. - * @member {string} [envelopeSettings.communicationAgreementId] The - * communication agreement id. - * @member {boolean} [envelopeSettings.applyDelimiterStringAdvice] The value - * indicating whether to apply delimiter string advice. - * @member {boolean} [envelopeSettings.createGroupingSegments] The value - * indicating whether to create grouping segments. - * @member {boolean} [envelopeSettings.enableDefaultGroupHeaders] The value - * indicating whether to enable default group headers. - * @member {string} [envelopeSettings.recipientReferencePasswordValue] The - * recipient reference password value. - * @member {string} [envelopeSettings.recipientReferencePasswordQualifier] The - * recipient reference password qualifier. - * @member {string} [envelopeSettings.applicationReferenceId] The application - * reference id. - * @member {string} [envelopeSettings.processingPriorityCode] The processing - * priority code. - * @member {number} [envelopeSettings.interchangeControlNumberLowerBound] The - * interchange control number lower bound. - * @member {number} [envelopeSettings.interchangeControlNumberUpperBound] The - * interchange control number upper bound. - * @member {boolean} [envelopeSettings.rolloverInterchangeControlNumber] The - * value indicating whether to rollover interchange control number. - * @member {string} [envelopeSettings.interchangeControlNumberPrefix] The - * interchange control number prefix. - * @member {string} [envelopeSettings.interchangeControlNumberSuffix] The - * interchange control number suffix. - * @member {string} [envelopeSettings.senderReverseRoutingAddress] The sender - * reverse routing address. - * @member {string} [envelopeSettings.receiverReverseRoutingAddress] The - * receiver reverse routing address. - * @member {string} [envelopeSettings.functionalGroupId] The functional group - * id. - * @member {string} [envelopeSettings.groupControllingAgencyCode] The group - * controlling agency code. - * @member {string} [envelopeSettings.groupMessageVersion] The group message - * version. - * @member {string} [envelopeSettings.groupMessageRelease] The group message - * release. - * @member {number} [envelopeSettings.groupControlNumberLowerBound] The group - * control number lower bound. - * @member {number} [envelopeSettings.groupControlNumberUpperBound] The group - * control number upper bound. - * @member {boolean} [envelopeSettings.rolloverGroupControlNumber] The value - * indicating whether to rollover group control number. - * @member {string} [envelopeSettings.groupControlNumberPrefix] The group - * control number prefix. - * @member {string} [envelopeSettings.groupControlNumberSuffix] The group - * control number suffix. - * @member {string} [envelopeSettings.groupApplicationReceiverQualifier] The - * group application receiver qualifier. - * @member {string} [envelopeSettings.groupApplicationReceiverId] The group - * application receiver id. - * @member {string} [envelopeSettings.groupApplicationSenderQualifier] The - * group application sender qualifier. - * @member {string} [envelopeSettings.groupApplicationSenderId] The group - * application sender id. - * @member {string} [envelopeSettings.groupApplicationPassword] The group - * application password. - * @member {boolean} - * [envelopeSettings.overwriteExistingTransactionSetControlNumber] The value - * indicating whether to overwrite existing transaction set control number. - * @member {string} [envelopeSettings.transactionSetControlNumberPrefix] The - * transaction set control number prefix. - * @member {string} [envelopeSettings.transactionSetControlNumberSuffix] The - * transaction set control number suffix. - * @member {number} [envelopeSettings.transactionSetControlNumberLowerBound] - * The transaction set control number lower bound. - * @member {number} [envelopeSettings.transactionSetControlNumberUpperBound] - * The transaction set control number upper bound. - * @member {boolean} [envelopeSettings.rolloverTransactionSetControlNumber] The - * value indicating whether to rollover transaction set control number. - * @member {boolean} [envelopeSettings.isTestInterchange] The value indicating - * whether the message is a test interchange. - * @member {string} [envelopeSettings.senderInternalIdentification] The sender - * internal identification. - * @member {string} [envelopeSettings.senderInternalSubIdentification] The - * sender internal sub identification. - * @member {string} [envelopeSettings.receiverInternalIdentification] The - * receiver internal identification. - * @member {string} [envelopeSettings.receiverInternalSubIdentification] The - * receiver internal sub identification. - * @member {object} acknowledgementSettings The EDIFACT acknowledgement - * settings. - * @member {boolean} [acknowledgementSettings.needTechnicalAcknowledgement] The - * value indicating whether technical acknowledgement is needed. - * @member {boolean} [acknowledgementSettings.batchTechnicalAcknowledgements] - * The value indicating whether to batch the technical acknowledgements. - * @member {boolean} [acknowledgementSettings.needFunctionalAcknowledgement] - * The value indicating whether functional acknowledgement is needed. - * @member {boolean} [acknowledgementSettings.batchFunctionalAcknowledgements] - * The value indicating whether to batch functional acknowledgements. - * @member {boolean} [acknowledgementSettings.needLoopForValidMessages] The - * value indicating whether a loop is needed for valid messages. - * @member {boolean} [acknowledgementSettings.sendSynchronousAcknowledgement] - * The value indicating whether to send synchronous acknowledgement. - * @member {string} - * [acknowledgementSettings.acknowledgementControlNumberPrefix] The - * acknowledgement control number prefix. - * @member {string} - * [acknowledgementSettings.acknowledgementControlNumberSuffix] The - * acknowledgement control number suffix. - * @member {number} - * [acknowledgementSettings.acknowledgementControlNumberLowerBound] The - * acknowledgement control number lower bound. - * @member {number} - * [acknowledgementSettings.acknowledgementControlNumberUpperBound] The - * acknowledgement control number upper bound. - * @member {boolean} - * [acknowledgementSettings.rolloverAcknowledgementControlNumber] The value - * indicating whether to rollover acknowledgement control number. - * @member {object} messageFilter The EDIFACT message filter. - * @member {string} [messageFilter.messageFilterType] The message filter type. - * Possible values include: 'NotSpecified', 'Include', 'Exclude' - * @member {object} processingSettings The EDIFACT processing Settings. - * @member {boolean} [processingSettings.maskSecurityInfo] The value indicating - * whether to mask security information. - * @member {boolean} [processingSettings.preserveInterchange] The value - * indicating whether to preserve interchange. - * @member {boolean} [processingSettings.suspendInterchangeOnError] The value - * indicating whether to suspend interchange on error. - * @member {boolean} - * [processingSettings.createEmptyXmlTagsForTrailingSeparators] The value - * indicating whether to create empty xml tags for trailing separators. - * @member {boolean} [processingSettings.useDotAsDecimalSeparator] The value - * indicating whether to use dot as decimal separator. - * @member {array} [envelopeOverrides] The EDIFACT envelope override settings. - * @member {array} [messageFilterList] The EDIFACT message filter list. - * @member {array} schemaReferences The EDIFACT schema references. - * @member {array} [validationOverrides] The EDIFACT validation override - * settings. - * @member {array} [edifactDelimiterOverrides] The EDIFACT delimiter override - * settings. */ export interface EdifactProtocolSettings { + /** + * The EDIFACT validation settings. + */ validationSettings: EdifactValidationSettings; + /** + * The EDIFACT framing settings. + */ framingSettings: EdifactFramingSettings; + /** + * The EDIFACT envelope settings. + */ envelopeSettings: EdifactEnvelopeSettings; + /** + * The EDIFACT acknowledgement settings. + */ acknowledgementSettings: EdifactAcknowledgementSettings; + /** + * The EDIFACT message filter. + */ messageFilter: EdifactMessageFilter; + /** + * The EDIFACT processing Settings. + */ processingSettings: EdifactProcessingSettings; + /** + * The EDIFACT envelope override settings. + */ envelopeOverrides?: EdifactEnvelopeOverride[]; + /** + * The EDIFACT message filter list. + */ messageFilterList?: EdifactMessageIdentifier[]; + /** + * The EDIFACT schema references. + */ schemaReferences: EdifactSchemaReference[]; + /** + * The EDIFACT validation override settings. + */ validationOverrides?: EdifactValidationOverride[]; + /** + * The EDIFACT delimiter override settings. + */ edifactDelimiterOverrides?: EdifactDelimiterOverride[]; } /** - * @class - * Initializes a new instance of the EdifactOneWayAgreement class. - * @constructor * The Edifact one way agreement. - * - * @member {object} senderBusinessIdentity The sender business identity - * @member {string} [senderBusinessIdentity.qualifier] The business identity - * qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [senderBusinessIdentity.value] The user defined business - * identity value. - * @member {object} receiverBusinessIdentity The receiver business identity - * @member {string} [receiverBusinessIdentity.qualifier] The business identity - * qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [receiverBusinessIdentity.value] The user defined business - * identity value. - * @member {object} protocolSettings The EDIFACT protocol settings. - * @member {object} [protocolSettings.validationSettings] The EDIFACT - * validation settings. - * @member {boolean} [protocolSettings.validationSettings.validateCharacterSet] - * The value indicating whether to validate character set in the message. - * @member {boolean} - * [protocolSettings.validationSettings.checkDuplicateInterchangeControlNumber] - * The value indicating whether to check for duplicate interchange control - * number. - * @member {number} - * [protocolSettings.validationSettings.interchangeControlNumberValidityDays] - * The validity period of interchange control number. - * @member {boolean} - * [protocolSettings.validationSettings.checkDuplicateGroupControlNumber] The - * value indicating whether to check for duplicate group control number. - * @member {boolean} - * [protocolSettings.validationSettings.checkDuplicateTransactionSetControlNumber] - * The value indicating whether to check for duplicate transaction set control - * number. - * @member {boolean} [protocolSettings.validationSettings.validateEdiTypes] The - * value indicating whether to Whether to validate EDI types. - * @member {boolean} [protocolSettings.validationSettings.validateXsdTypes] The - * value indicating whether to Whether to validate XSD types. - * @member {boolean} - * [protocolSettings.validationSettings.allowLeadingAndTrailingSpacesAndZeroes] - * The value indicating whether to allow leading and trailing spaces and - * zeroes. - * @member {boolean} - * [protocolSettings.validationSettings.trimLeadingAndTrailingSpacesAndZeroes] - * The value indicating whether to trim leading and trailing spaces and zeroes. - * @member {string} - * [protocolSettings.validationSettings.trailingSeparatorPolicy] The trailing - * separator policy. Possible values include: 'NotSpecified', 'NotAllowed', - * 'Optional', 'Mandatory' - * @member {object} [protocolSettings.framingSettings] The EDIFACT framing - * settings. - * @member {string} - * [protocolSettings.framingSettings.serviceCodeListDirectoryVersion] The - * service code list directory version. - * @member {string} [protocolSettings.framingSettings.characterEncoding] The - * character encoding. - * @member {number} [protocolSettings.framingSettings.protocolVersion] The - * protocol version. - * @member {number} [protocolSettings.framingSettings.dataElementSeparator] The - * data element separator. - * @member {number} [protocolSettings.framingSettings.componentSeparator] The - * component separator. - * @member {number} [protocolSettings.framingSettings.segmentTerminator] The - * segment terminator. - * @member {number} [protocolSettings.framingSettings.releaseIndicator] The - * release indicator. - * @member {number} [protocolSettings.framingSettings.repetitionSeparator] The - * repetition separator. - * @member {string} [protocolSettings.framingSettings.characterSet] The EDIFACT - * frame setting characterSet. Possible values include: 'NotSpecified', 'UNOB', - * 'UNOA', 'UNOC', 'UNOD', 'UNOE', 'UNOF', 'UNOG', 'UNOH', 'UNOI', 'UNOJ', - * 'UNOK', 'UNOX', 'UNOY', 'KECA' - * @member {string} [protocolSettings.framingSettings.decimalPointIndicator] - * The EDIFACT frame setting decimal indicator. Possible values include: - * 'NotSpecified', 'Comma', 'Decimal' - * @member {string} [protocolSettings.framingSettings.segmentTerminatorSuffix] - * The EDIFACT frame setting segment terminator suffix. Possible values - * include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' - * @member {object} [protocolSettings.envelopeSettings] The EDIFACT envelope - * settings. - * @member {string} - * [protocolSettings.envelopeSettings.groupAssociationAssignedCode] The group - * association assigned code. - * @member {string} - * [protocolSettings.envelopeSettings.communicationAgreementId] The - * communication agreement id. - * @member {boolean} - * [protocolSettings.envelopeSettings.applyDelimiterStringAdvice] The value - * indicating whether to apply delimiter string advice. - * @member {boolean} [protocolSettings.envelopeSettings.createGroupingSegments] - * The value indicating whether to create grouping segments. - * @member {boolean} - * [protocolSettings.envelopeSettings.enableDefaultGroupHeaders] The value - * indicating whether to enable default group headers. - * @member {string} - * [protocolSettings.envelopeSettings.recipientReferencePasswordValue] The - * recipient reference password value. - * @member {string} - * [protocolSettings.envelopeSettings.recipientReferencePasswordQualifier] The - * recipient reference password qualifier. - * @member {string} [protocolSettings.envelopeSettings.applicationReferenceId] - * The application reference id. - * @member {string} [protocolSettings.envelopeSettings.processingPriorityCode] - * The processing priority code. - * @member {number} - * [protocolSettings.envelopeSettings.interchangeControlNumberLowerBound] The - * interchange control number lower bound. - * @member {number} - * [protocolSettings.envelopeSettings.interchangeControlNumberUpperBound] The - * interchange control number upper bound. - * @member {boolean} - * [protocolSettings.envelopeSettings.rolloverInterchangeControlNumber] The - * value indicating whether to rollover interchange control number. - * @member {string} - * [protocolSettings.envelopeSettings.interchangeControlNumberPrefix] The - * interchange control number prefix. - * @member {string} - * [protocolSettings.envelopeSettings.interchangeControlNumberSuffix] The - * interchange control number suffix. - * @member {string} - * [protocolSettings.envelopeSettings.senderReverseRoutingAddress] The sender - * reverse routing address. - * @member {string} - * [protocolSettings.envelopeSettings.receiverReverseRoutingAddress] The - * receiver reverse routing address. - * @member {string} [protocolSettings.envelopeSettings.functionalGroupId] The - * functional group id. - * @member {string} - * [protocolSettings.envelopeSettings.groupControllingAgencyCode] The group - * controlling agency code. - * @member {string} [protocolSettings.envelopeSettings.groupMessageVersion] The - * group message version. - * @member {string} [protocolSettings.envelopeSettings.groupMessageRelease] The - * group message release. - * @member {number} - * [protocolSettings.envelopeSettings.groupControlNumberLowerBound] The group - * control number lower bound. - * @member {number} - * [protocolSettings.envelopeSettings.groupControlNumberUpperBound] The group - * control number upper bound. - * @member {boolean} - * [protocolSettings.envelopeSettings.rolloverGroupControlNumber] The value - * indicating whether to rollover group control number. - * @member {string} - * [protocolSettings.envelopeSettings.groupControlNumberPrefix] The group - * control number prefix. - * @member {string} - * [protocolSettings.envelopeSettings.groupControlNumberSuffix] The group - * control number suffix. - * @member {string} - * [protocolSettings.envelopeSettings.groupApplicationReceiverQualifier] The - * group application receiver qualifier. - * @member {string} - * [protocolSettings.envelopeSettings.groupApplicationReceiverId] The group - * application receiver id. - * @member {string} - * [protocolSettings.envelopeSettings.groupApplicationSenderQualifier] The - * group application sender qualifier. - * @member {string} - * [protocolSettings.envelopeSettings.groupApplicationSenderId] The group - * application sender id. - * @member {string} - * [protocolSettings.envelopeSettings.groupApplicationPassword] The group - * application password. - * @member {boolean} - * [protocolSettings.envelopeSettings.overwriteExistingTransactionSetControlNumber] - * The value indicating whether to overwrite existing transaction set control - * number. - * @member {string} - * [protocolSettings.envelopeSettings.transactionSetControlNumberPrefix] The - * transaction set control number prefix. - * @member {string} - * [protocolSettings.envelopeSettings.transactionSetControlNumberSuffix] The - * transaction set control number suffix. - * @member {number} - * [protocolSettings.envelopeSettings.transactionSetControlNumberLowerBound] - * The transaction set control number lower bound. - * @member {number} - * [protocolSettings.envelopeSettings.transactionSetControlNumberUpperBound] - * The transaction set control number upper bound. - * @member {boolean} - * [protocolSettings.envelopeSettings.rolloverTransactionSetControlNumber] The - * value indicating whether to rollover transaction set control number. - * @member {boolean} [protocolSettings.envelopeSettings.isTestInterchange] The - * value indicating whether the message is a test interchange. - * @member {string} - * [protocolSettings.envelopeSettings.senderInternalIdentification] The sender - * internal identification. - * @member {string} - * [protocolSettings.envelopeSettings.senderInternalSubIdentification] The - * sender internal sub identification. - * @member {string} - * [protocolSettings.envelopeSettings.receiverInternalIdentification] The - * receiver internal identification. - * @member {string} - * [protocolSettings.envelopeSettings.receiverInternalSubIdentification] The - * receiver internal sub identification. - * @member {object} [protocolSettings.acknowledgementSettings] The EDIFACT - * acknowledgement settings. - * @member {boolean} - * [protocolSettings.acknowledgementSettings.needTechnicalAcknowledgement] The - * value indicating whether technical acknowledgement is needed. - * @member {boolean} - * [protocolSettings.acknowledgementSettings.batchTechnicalAcknowledgements] - * The value indicating whether to batch the technical acknowledgements. - * @member {boolean} - * [protocolSettings.acknowledgementSettings.needFunctionalAcknowledgement] The - * value indicating whether functional acknowledgement is needed. - * @member {boolean} - * [protocolSettings.acknowledgementSettings.batchFunctionalAcknowledgements] - * The value indicating whether to batch functional acknowledgements. - * @member {boolean} - * [protocolSettings.acknowledgementSettings.needLoopForValidMessages] The - * value indicating whether a loop is needed for valid messages. - * @member {boolean} - * [protocolSettings.acknowledgementSettings.sendSynchronousAcknowledgement] - * The value indicating whether to send synchronous acknowledgement. - * @member {string} - * [protocolSettings.acknowledgementSettings.acknowledgementControlNumberPrefix] - * The acknowledgement control number prefix. - * @member {string} - * [protocolSettings.acknowledgementSettings.acknowledgementControlNumberSuffix] - * The acknowledgement control number suffix. - * @member {number} - * [protocolSettings.acknowledgementSettings.acknowledgementControlNumberLowerBound] - * The acknowledgement control number lower bound. - * @member {number} - * [protocolSettings.acknowledgementSettings.acknowledgementControlNumberUpperBound] - * The acknowledgement control number upper bound. - * @member {boolean} - * [protocolSettings.acknowledgementSettings.rolloverAcknowledgementControlNumber] - * The value indicating whether to rollover acknowledgement control number. - * @member {object} [protocolSettings.messageFilter] The EDIFACT message - * filter. - * @member {string} [protocolSettings.messageFilter.messageFilterType] The - * message filter type. Possible values include: 'NotSpecified', 'Include', - * 'Exclude' - * @member {object} [protocolSettings.processingSettings] The EDIFACT - * processing Settings. - * @member {boolean} [protocolSettings.processingSettings.maskSecurityInfo] The - * value indicating whether to mask security information. - * @member {boolean} [protocolSettings.processingSettings.preserveInterchange] - * The value indicating whether to preserve interchange. - * @member {boolean} - * [protocolSettings.processingSettings.suspendInterchangeOnError] The value - * indicating whether to suspend interchange on error. - * @member {boolean} - * [protocolSettings.processingSettings.createEmptyXmlTagsForTrailingSeparators] - * The value indicating whether to create empty xml tags for trailing - * separators. - * @member {boolean} - * [protocolSettings.processingSettings.useDotAsDecimalSeparator] The value - * indicating whether to use dot as decimal separator. - * @member {array} [protocolSettings.envelopeOverrides] The EDIFACT envelope - * override settings. - * @member {array} [protocolSettings.messageFilterList] The EDIFACT message - * filter list. - * @member {array} [protocolSettings.schemaReferences] The EDIFACT schema - * references. - * @member {array} [protocolSettings.validationOverrides] The EDIFACT - * validation override settings. - * @member {array} [protocolSettings.edifactDelimiterOverrides] The EDIFACT - * delimiter override settings. */ export interface EdifactOneWayAgreement { + /** + * The sender business identity + */ senderBusinessIdentity: BusinessIdentity; + /** + * The receiver business identity + */ receiverBusinessIdentity: BusinessIdentity; + /** + * The EDIFACT protocol settings. + */ protocolSettings: EdifactProtocolSettings; } /** - * @class - * Initializes a new instance of the EdifactAgreementContent class. - * @constructor * The Edifact agreement content. - * - * @member {object} receiveAgreement The EDIFACT one-way receive agreement. - * @member {object} [receiveAgreement.senderBusinessIdentity] The sender - * business identity - * @member {string} [receiveAgreement.senderBusinessIdentity.qualifier] The - * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [receiveAgreement.senderBusinessIdentity.value] The user - * defined business identity value. - * @member {object} [receiveAgreement.receiverBusinessIdentity] The receiver - * business identity - * @member {string} [receiveAgreement.receiverBusinessIdentity.qualifier] The - * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [receiveAgreement.receiverBusinessIdentity.value] The user - * defined business identity value. - * @member {object} [receiveAgreement.protocolSettings] The EDIFACT protocol - * settings. - * @member {object} [receiveAgreement.protocolSettings.validationSettings] The - * EDIFACT validation settings. - * @member {boolean} - * [receiveAgreement.protocolSettings.validationSettings.validateCharacterSet] - * The value indicating whether to validate character set in the message. - * @member {boolean} - * [receiveAgreement.protocolSettings.validationSettings.checkDuplicateInterchangeControlNumber] - * The value indicating whether to check for duplicate interchange control - * number. - * @member {number} - * [receiveAgreement.protocolSettings.validationSettings.interchangeControlNumberValidityDays] - * The validity period of interchange control number. - * @member {boolean} - * [receiveAgreement.protocolSettings.validationSettings.checkDuplicateGroupControlNumber] - * The value indicating whether to check for duplicate group control number. - * @member {boolean} - * [receiveAgreement.protocolSettings.validationSettings.checkDuplicateTransactionSetControlNumber] - * The value indicating whether to check for duplicate transaction set control - * number. - * @member {boolean} - * [receiveAgreement.protocolSettings.validationSettings.validateEdiTypes] The - * value indicating whether to Whether to validate EDI types. - * @member {boolean} - * [receiveAgreement.protocolSettings.validationSettings.validateXsdTypes] The - * value indicating whether to Whether to validate XSD types. - * @member {boolean} - * [receiveAgreement.protocolSettings.validationSettings.allowLeadingAndTrailingSpacesAndZeroes] - * The value indicating whether to allow leading and trailing spaces and - * zeroes. - * @member {boolean} - * [receiveAgreement.protocolSettings.validationSettings.trimLeadingAndTrailingSpacesAndZeroes] - * The value indicating whether to trim leading and trailing spaces and zeroes. - * @member {string} - * [receiveAgreement.protocolSettings.validationSettings.trailingSeparatorPolicy] - * The trailing separator policy. Possible values include: 'NotSpecified', - * 'NotAllowed', 'Optional', 'Mandatory' - * @member {object} [receiveAgreement.protocolSettings.framingSettings] The - * EDIFACT framing settings. - * @member {string} - * [receiveAgreement.protocolSettings.framingSettings.serviceCodeListDirectoryVersion] - * The service code list directory version. - * @member {string} - * [receiveAgreement.protocolSettings.framingSettings.characterEncoding] The - * character encoding. - * @member {number} - * [receiveAgreement.protocolSettings.framingSettings.protocolVersion] The - * protocol version. - * @member {number} - * [receiveAgreement.protocolSettings.framingSettings.dataElementSeparator] The - * data element separator. - * @member {number} - * [receiveAgreement.protocolSettings.framingSettings.componentSeparator] The - * component separator. - * @member {number} - * [receiveAgreement.protocolSettings.framingSettings.segmentTerminator] The - * segment terminator. - * @member {number} - * [receiveAgreement.protocolSettings.framingSettings.releaseIndicator] The - * release indicator. - * @member {number} - * [receiveAgreement.protocolSettings.framingSettings.repetitionSeparator] The - * repetition separator. - * @member {string} - * [receiveAgreement.protocolSettings.framingSettings.characterSet] The EDIFACT - * frame setting characterSet. Possible values include: 'NotSpecified', 'UNOB', - * 'UNOA', 'UNOC', 'UNOD', 'UNOE', 'UNOF', 'UNOG', 'UNOH', 'UNOI', 'UNOJ', - * 'UNOK', 'UNOX', 'UNOY', 'KECA' - * @member {string} - * [receiveAgreement.protocolSettings.framingSettings.decimalPointIndicator] - * The EDIFACT frame setting decimal indicator. Possible values include: - * 'NotSpecified', 'Comma', 'Decimal' - * @member {string} - * [receiveAgreement.protocolSettings.framingSettings.segmentTerminatorSuffix] - * The EDIFACT frame setting segment terminator suffix. Possible values - * include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' - * @member {object} [receiveAgreement.protocolSettings.envelopeSettings] The - * EDIFACT envelope settings. - * @member {string} - * [receiveAgreement.protocolSettings.envelopeSettings.groupAssociationAssignedCode] - * The group association assigned code. - * @member {string} - * [receiveAgreement.protocolSettings.envelopeSettings.communicationAgreementId] - * The communication agreement id. - * @member {boolean} - * [receiveAgreement.protocolSettings.envelopeSettings.applyDelimiterStringAdvice] - * The value indicating whether to apply delimiter string advice. - * @member {boolean} - * [receiveAgreement.protocolSettings.envelopeSettings.createGroupingSegments] - * The value indicating whether to create grouping segments. - * @member {boolean} - * [receiveAgreement.protocolSettings.envelopeSettings.enableDefaultGroupHeaders] - * The value indicating whether to enable default group headers. - * @member {string} - * [receiveAgreement.protocolSettings.envelopeSettings.recipientReferencePasswordValue] - * The recipient reference password value. - * @member {string} - * [receiveAgreement.protocolSettings.envelopeSettings.recipientReferencePasswordQualifier] - * The recipient reference password qualifier. - * @member {string} - * [receiveAgreement.protocolSettings.envelopeSettings.applicationReferenceId] - * The application reference id. - * @member {string} - * [receiveAgreement.protocolSettings.envelopeSettings.processingPriorityCode] - * The processing priority code. - * @member {number} - * [receiveAgreement.protocolSettings.envelopeSettings.interchangeControlNumberLowerBound] - * The interchange control number lower bound. - * @member {number} - * [receiveAgreement.protocolSettings.envelopeSettings.interchangeControlNumberUpperBound] - * The interchange control number upper bound. - * @member {boolean} - * [receiveAgreement.protocolSettings.envelopeSettings.rolloverInterchangeControlNumber] - * The value indicating whether to rollover interchange control number. - * @member {string} - * [receiveAgreement.protocolSettings.envelopeSettings.interchangeControlNumberPrefix] - * The interchange control number prefix. - * @member {string} - * [receiveAgreement.protocolSettings.envelopeSettings.interchangeControlNumberSuffix] - * The interchange control number suffix. - * @member {string} - * [receiveAgreement.protocolSettings.envelopeSettings.senderReverseRoutingAddress] - * The sender reverse routing address. - * @member {string} - * [receiveAgreement.protocolSettings.envelopeSettings.receiverReverseRoutingAddress] - * The receiver reverse routing address. - * @member {string} - * [receiveAgreement.protocolSettings.envelopeSettings.functionalGroupId] The - * functional group id. - * @member {string} - * [receiveAgreement.protocolSettings.envelopeSettings.groupControllingAgencyCode] - * The group controlling agency code. - * @member {string} - * [receiveAgreement.protocolSettings.envelopeSettings.groupMessageVersion] The - * group message version. - * @member {string} - * [receiveAgreement.protocolSettings.envelopeSettings.groupMessageRelease] The - * group message release. - * @member {number} - * [receiveAgreement.protocolSettings.envelopeSettings.groupControlNumberLowerBound] - * The group control number lower bound. - * @member {number} - * [receiveAgreement.protocolSettings.envelopeSettings.groupControlNumberUpperBound] - * The group control number upper bound. - * @member {boolean} - * [receiveAgreement.protocolSettings.envelopeSettings.rolloverGroupControlNumber] - * The value indicating whether to rollover group control number. - * @member {string} - * [receiveAgreement.protocolSettings.envelopeSettings.groupControlNumberPrefix] - * The group control number prefix. - * @member {string} - * [receiveAgreement.protocolSettings.envelopeSettings.groupControlNumberSuffix] - * The group control number suffix. - * @member {string} - * [receiveAgreement.protocolSettings.envelopeSettings.groupApplicationReceiverQualifier] - * The group application receiver qualifier. - * @member {string} - * [receiveAgreement.protocolSettings.envelopeSettings.groupApplicationReceiverId] - * The group application receiver id. - * @member {string} - * [receiveAgreement.protocolSettings.envelopeSettings.groupApplicationSenderQualifier] - * The group application sender qualifier. - * @member {string} - * [receiveAgreement.protocolSettings.envelopeSettings.groupApplicationSenderId] - * The group application sender id. - * @member {string} - * [receiveAgreement.protocolSettings.envelopeSettings.groupApplicationPassword] - * The group application password. - * @member {boolean} - * [receiveAgreement.protocolSettings.envelopeSettings.overwriteExistingTransactionSetControlNumber] - * The value indicating whether to overwrite existing transaction set control - * number. - * @member {string} - * [receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberPrefix] - * The transaction set control number prefix. - * @member {string} - * [receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberSuffix] - * The transaction set control number suffix. - * @member {number} - * [receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberLowerBound] - * The transaction set control number lower bound. - * @member {number} - * [receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberUpperBound] - * The transaction set control number upper bound. - * @member {boolean} - * [receiveAgreement.protocolSettings.envelopeSettings.rolloverTransactionSetControlNumber] - * The value indicating whether to rollover transaction set control number. - * @member {boolean} - * [receiveAgreement.protocolSettings.envelopeSettings.isTestInterchange] The - * value indicating whether the message is a test interchange. - * @member {string} - * [receiveAgreement.protocolSettings.envelopeSettings.senderInternalIdentification] - * The sender internal identification. - * @member {string} - * [receiveAgreement.protocolSettings.envelopeSettings.senderInternalSubIdentification] - * The sender internal sub identification. - * @member {string} - * [receiveAgreement.protocolSettings.envelopeSettings.receiverInternalIdentification] - * The receiver internal identification. - * @member {string} - * [receiveAgreement.protocolSettings.envelopeSettings.receiverInternalSubIdentification] - * The receiver internal sub identification. - * @member {object} [receiveAgreement.protocolSettings.acknowledgementSettings] - * The EDIFACT acknowledgement settings. - * @member {boolean} - * [receiveAgreement.protocolSettings.acknowledgementSettings.needTechnicalAcknowledgement] - * The value indicating whether technical acknowledgement is needed. - * @member {boolean} - * [receiveAgreement.protocolSettings.acknowledgementSettings.batchTechnicalAcknowledgements] - * The value indicating whether to batch the technical acknowledgements. - * @member {boolean} - * [receiveAgreement.protocolSettings.acknowledgementSettings.needFunctionalAcknowledgement] - * The value indicating whether functional acknowledgement is needed. - * @member {boolean} - * [receiveAgreement.protocolSettings.acknowledgementSettings.batchFunctionalAcknowledgements] - * The value indicating whether to batch functional acknowledgements. - * @member {boolean} - * [receiveAgreement.protocolSettings.acknowledgementSettings.needLoopForValidMessages] - * The value indicating whether a loop is needed for valid messages. - * @member {boolean} - * [receiveAgreement.protocolSettings.acknowledgementSettings.sendSynchronousAcknowledgement] - * The value indicating whether to send synchronous acknowledgement. - * @member {string} - * [receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberPrefix] - * The acknowledgement control number prefix. - * @member {string} - * [receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberSuffix] - * The acknowledgement control number suffix. - * @member {number} - * [receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberLowerBound] - * The acknowledgement control number lower bound. - * @member {number} - * [receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberUpperBound] - * The acknowledgement control number upper bound. - * @member {boolean} - * [receiveAgreement.protocolSettings.acknowledgementSettings.rolloverAcknowledgementControlNumber] - * The value indicating whether to rollover acknowledgement control number. - * @member {object} [receiveAgreement.protocolSettings.messageFilter] The - * EDIFACT message filter. - * @member {string} - * [receiveAgreement.protocolSettings.messageFilter.messageFilterType] The - * message filter type. Possible values include: 'NotSpecified', 'Include', - * 'Exclude' - * @member {object} [receiveAgreement.protocolSettings.processingSettings] The - * EDIFACT processing Settings. - * @member {boolean} - * [receiveAgreement.protocolSettings.processingSettings.maskSecurityInfo] The - * value indicating whether to mask security information. - * @member {boolean} - * [receiveAgreement.protocolSettings.processingSettings.preserveInterchange] - * The value indicating whether to preserve interchange. - * @member {boolean} - * [receiveAgreement.protocolSettings.processingSettings.suspendInterchangeOnError] - * The value indicating whether to suspend interchange on error. - * @member {boolean} - * [receiveAgreement.protocolSettings.processingSettings.createEmptyXmlTagsForTrailingSeparators] - * The value indicating whether to create empty xml tags for trailing - * separators. - * @member {boolean} - * [receiveAgreement.protocolSettings.processingSettings.useDotAsDecimalSeparator] - * The value indicating whether to use dot as decimal separator. - * @member {array} [receiveAgreement.protocolSettings.envelopeOverrides] The - * EDIFACT envelope override settings. - * @member {array} [receiveAgreement.protocolSettings.messageFilterList] The - * EDIFACT message filter list. - * @member {array} [receiveAgreement.protocolSettings.schemaReferences] The - * EDIFACT schema references. - * @member {array} [receiveAgreement.protocolSettings.validationOverrides] The - * EDIFACT validation override settings. - * @member {array} - * [receiveAgreement.protocolSettings.edifactDelimiterOverrides] The EDIFACT - * delimiter override settings. - * @member {object} sendAgreement The EDIFACT one-way send agreement. - * @member {object} [sendAgreement.senderBusinessIdentity] The sender business - * identity - * @member {string} [sendAgreement.senderBusinessIdentity.qualifier] The - * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [sendAgreement.senderBusinessIdentity.value] The user - * defined business identity value. - * @member {object} [sendAgreement.receiverBusinessIdentity] The receiver - * business identity - * @member {string} [sendAgreement.receiverBusinessIdentity.qualifier] The - * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [sendAgreement.receiverBusinessIdentity.value] The user - * defined business identity value. - * @member {object} [sendAgreement.protocolSettings] The EDIFACT protocol - * settings. - * @member {object} [sendAgreement.protocolSettings.validationSettings] The - * EDIFACT validation settings. - * @member {boolean} - * [sendAgreement.protocolSettings.validationSettings.validateCharacterSet] The - * value indicating whether to validate character set in the message. - * @member {boolean} - * [sendAgreement.protocolSettings.validationSettings.checkDuplicateInterchangeControlNumber] - * The value indicating whether to check for duplicate interchange control - * number. - * @member {number} - * [sendAgreement.protocolSettings.validationSettings.interchangeControlNumberValidityDays] - * The validity period of interchange control number. - * @member {boolean} - * [sendAgreement.protocolSettings.validationSettings.checkDuplicateGroupControlNumber] - * The value indicating whether to check for duplicate group control number. - * @member {boolean} - * [sendAgreement.protocolSettings.validationSettings.checkDuplicateTransactionSetControlNumber] - * The value indicating whether to check for duplicate transaction set control - * number. - * @member {boolean} - * [sendAgreement.protocolSettings.validationSettings.validateEdiTypes] The - * value indicating whether to Whether to validate EDI types. - * @member {boolean} - * [sendAgreement.protocolSettings.validationSettings.validateXsdTypes] The - * value indicating whether to Whether to validate XSD types. - * @member {boolean} - * [sendAgreement.protocolSettings.validationSettings.allowLeadingAndTrailingSpacesAndZeroes] - * The value indicating whether to allow leading and trailing spaces and - * zeroes. - * @member {boolean} - * [sendAgreement.protocolSettings.validationSettings.trimLeadingAndTrailingSpacesAndZeroes] - * The value indicating whether to trim leading and trailing spaces and zeroes. - * @member {string} - * [sendAgreement.protocolSettings.validationSettings.trailingSeparatorPolicy] - * The trailing separator policy. Possible values include: 'NotSpecified', - * 'NotAllowed', 'Optional', 'Mandatory' - * @member {object} [sendAgreement.protocolSettings.framingSettings] The - * EDIFACT framing settings. - * @member {string} - * [sendAgreement.protocolSettings.framingSettings.serviceCodeListDirectoryVersion] - * The service code list directory version. - * @member {string} - * [sendAgreement.protocolSettings.framingSettings.characterEncoding] The - * character encoding. - * @member {number} - * [sendAgreement.protocolSettings.framingSettings.protocolVersion] The - * protocol version. - * @member {number} - * [sendAgreement.protocolSettings.framingSettings.dataElementSeparator] The - * data element separator. - * @member {number} - * [sendAgreement.protocolSettings.framingSettings.componentSeparator] The - * component separator. - * @member {number} - * [sendAgreement.protocolSettings.framingSettings.segmentTerminator] The - * segment terminator. - * @member {number} - * [sendAgreement.protocolSettings.framingSettings.releaseIndicator] The - * release indicator. - * @member {number} - * [sendAgreement.protocolSettings.framingSettings.repetitionSeparator] The - * repetition separator. - * @member {string} - * [sendAgreement.protocolSettings.framingSettings.characterSet] The EDIFACT - * frame setting characterSet. Possible values include: 'NotSpecified', 'UNOB', - * 'UNOA', 'UNOC', 'UNOD', 'UNOE', 'UNOF', 'UNOG', 'UNOH', 'UNOI', 'UNOJ', - * 'UNOK', 'UNOX', 'UNOY', 'KECA' - * @member {string} - * [sendAgreement.protocolSettings.framingSettings.decimalPointIndicator] The - * EDIFACT frame setting decimal indicator. Possible values include: - * 'NotSpecified', 'Comma', 'Decimal' - * @member {string} - * [sendAgreement.protocolSettings.framingSettings.segmentTerminatorSuffix] The - * EDIFACT frame setting segment terminator suffix. Possible values include: - * 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' - * @member {object} [sendAgreement.protocolSettings.envelopeSettings] The - * EDIFACT envelope settings. - * @member {string} - * [sendAgreement.protocolSettings.envelopeSettings.groupAssociationAssignedCode] - * The group association assigned code. - * @member {string} - * [sendAgreement.protocolSettings.envelopeSettings.communicationAgreementId] - * The communication agreement id. - * @member {boolean} - * [sendAgreement.protocolSettings.envelopeSettings.applyDelimiterStringAdvice] - * The value indicating whether to apply delimiter string advice. - * @member {boolean} - * [sendAgreement.protocolSettings.envelopeSettings.createGroupingSegments] The - * value indicating whether to create grouping segments. - * @member {boolean} - * [sendAgreement.protocolSettings.envelopeSettings.enableDefaultGroupHeaders] - * The value indicating whether to enable default group headers. - * @member {string} - * [sendAgreement.protocolSettings.envelopeSettings.recipientReferencePasswordValue] - * The recipient reference password value. - * @member {string} - * [sendAgreement.protocolSettings.envelopeSettings.recipientReferencePasswordQualifier] - * The recipient reference password qualifier. - * @member {string} - * [sendAgreement.protocolSettings.envelopeSettings.applicationReferenceId] The - * application reference id. - * @member {string} - * [sendAgreement.protocolSettings.envelopeSettings.processingPriorityCode] The - * processing priority code. - * @member {number} - * [sendAgreement.protocolSettings.envelopeSettings.interchangeControlNumberLowerBound] - * The interchange control number lower bound. - * @member {number} - * [sendAgreement.protocolSettings.envelopeSettings.interchangeControlNumberUpperBound] - * The interchange control number upper bound. - * @member {boolean} - * [sendAgreement.protocolSettings.envelopeSettings.rolloverInterchangeControlNumber] - * The value indicating whether to rollover interchange control number. - * @member {string} - * [sendAgreement.protocolSettings.envelopeSettings.interchangeControlNumberPrefix] - * The interchange control number prefix. - * @member {string} - * [sendAgreement.protocolSettings.envelopeSettings.interchangeControlNumberSuffix] - * The interchange control number suffix. - * @member {string} - * [sendAgreement.protocolSettings.envelopeSettings.senderReverseRoutingAddress] - * The sender reverse routing address. - * @member {string} - * [sendAgreement.protocolSettings.envelopeSettings.receiverReverseRoutingAddress] - * The receiver reverse routing address. - * @member {string} - * [sendAgreement.protocolSettings.envelopeSettings.functionalGroupId] The - * functional group id. - * @member {string} - * [sendAgreement.protocolSettings.envelopeSettings.groupControllingAgencyCode] - * The group controlling agency code. - * @member {string} - * [sendAgreement.protocolSettings.envelopeSettings.groupMessageVersion] The - * group message version. - * @member {string} - * [sendAgreement.protocolSettings.envelopeSettings.groupMessageRelease] The - * group message release. - * @member {number} - * [sendAgreement.protocolSettings.envelopeSettings.groupControlNumberLowerBound] - * The group control number lower bound. - * @member {number} - * [sendAgreement.protocolSettings.envelopeSettings.groupControlNumberUpperBound] - * The group control number upper bound. - * @member {boolean} - * [sendAgreement.protocolSettings.envelopeSettings.rolloverGroupControlNumber] - * The value indicating whether to rollover group control number. - * @member {string} - * [sendAgreement.protocolSettings.envelopeSettings.groupControlNumberPrefix] - * The group control number prefix. - * @member {string} - * [sendAgreement.protocolSettings.envelopeSettings.groupControlNumberSuffix] - * The group control number suffix. - * @member {string} - * [sendAgreement.protocolSettings.envelopeSettings.groupApplicationReceiverQualifier] - * The group application receiver qualifier. - * @member {string} - * [sendAgreement.protocolSettings.envelopeSettings.groupApplicationReceiverId] - * The group application receiver id. - * @member {string} - * [sendAgreement.protocolSettings.envelopeSettings.groupApplicationSenderQualifier] - * The group application sender qualifier. - * @member {string} - * [sendAgreement.protocolSettings.envelopeSettings.groupApplicationSenderId] - * The group application sender id. - * @member {string} - * [sendAgreement.protocolSettings.envelopeSettings.groupApplicationPassword] - * The group application password. - * @member {boolean} - * [sendAgreement.protocolSettings.envelopeSettings.overwriteExistingTransactionSetControlNumber] - * The value indicating whether to overwrite existing transaction set control - * number. - * @member {string} - * [sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberPrefix] - * The transaction set control number prefix. - * @member {string} - * [sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberSuffix] - * The transaction set control number suffix. - * @member {number} - * [sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberLowerBound] - * The transaction set control number lower bound. - * @member {number} - * [sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberUpperBound] - * The transaction set control number upper bound. - * @member {boolean} - * [sendAgreement.protocolSettings.envelopeSettings.rolloverTransactionSetControlNumber] - * The value indicating whether to rollover transaction set control number. - * @member {boolean} - * [sendAgreement.protocolSettings.envelopeSettings.isTestInterchange] The - * value indicating whether the message is a test interchange. - * @member {string} - * [sendAgreement.protocolSettings.envelopeSettings.senderInternalIdentification] - * The sender internal identification. - * @member {string} - * [sendAgreement.protocolSettings.envelopeSettings.senderInternalSubIdentification] - * The sender internal sub identification. - * @member {string} - * [sendAgreement.protocolSettings.envelopeSettings.receiverInternalIdentification] - * The receiver internal identification. - * @member {string} - * [sendAgreement.protocolSettings.envelopeSettings.receiverInternalSubIdentification] - * The receiver internal sub identification. - * @member {object} [sendAgreement.protocolSettings.acknowledgementSettings] - * The EDIFACT acknowledgement settings. - * @member {boolean} - * [sendAgreement.protocolSettings.acknowledgementSettings.needTechnicalAcknowledgement] - * The value indicating whether technical acknowledgement is needed. - * @member {boolean} - * [sendAgreement.protocolSettings.acknowledgementSettings.batchTechnicalAcknowledgements] - * The value indicating whether to batch the technical acknowledgements. - * @member {boolean} - * [sendAgreement.protocolSettings.acknowledgementSettings.needFunctionalAcknowledgement] - * The value indicating whether functional acknowledgement is needed. - * @member {boolean} - * [sendAgreement.protocolSettings.acknowledgementSettings.batchFunctionalAcknowledgements] - * The value indicating whether to batch functional acknowledgements. - * @member {boolean} - * [sendAgreement.protocolSettings.acknowledgementSettings.needLoopForValidMessages] - * The value indicating whether a loop is needed for valid messages. - * @member {boolean} - * [sendAgreement.protocolSettings.acknowledgementSettings.sendSynchronousAcknowledgement] - * The value indicating whether to send synchronous acknowledgement. - * @member {string} - * [sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberPrefix] - * The acknowledgement control number prefix. - * @member {string} - * [sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberSuffix] - * The acknowledgement control number suffix. - * @member {number} - * [sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberLowerBound] - * The acknowledgement control number lower bound. - * @member {number} - * [sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberUpperBound] - * The acknowledgement control number upper bound. - * @member {boolean} - * [sendAgreement.protocolSettings.acknowledgementSettings.rolloverAcknowledgementControlNumber] - * The value indicating whether to rollover acknowledgement control number. - * @member {object} [sendAgreement.protocolSettings.messageFilter] The EDIFACT - * message filter. - * @member {string} - * [sendAgreement.protocolSettings.messageFilter.messageFilterType] The message - * filter type. Possible values include: 'NotSpecified', 'Include', 'Exclude' - * @member {object} [sendAgreement.protocolSettings.processingSettings] The - * EDIFACT processing Settings. - * @member {boolean} - * [sendAgreement.protocolSettings.processingSettings.maskSecurityInfo] The - * value indicating whether to mask security information. - * @member {boolean} - * [sendAgreement.protocolSettings.processingSettings.preserveInterchange] The - * value indicating whether to preserve interchange. - * @member {boolean} - * [sendAgreement.protocolSettings.processingSettings.suspendInterchangeOnError] - * The value indicating whether to suspend interchange on error. - * @member {boolean} - * [sendAgreement.protocolSettings.processingSettings.createEmptyXmlTagsForTrailingSeparators] - * The value indicating whether to create empty xml tags for trailing - * separators. - * @member {boolean} - * [sendAgreement.protocolSettings.processingSettings.useDotAsDecimalSeparator] - * The value indicating whether to use dot as decimal separator. - * @member {array} [sendAgreement.protocolSettings.envelopeOverrides] The - * EDIFACT envelope override settings. - * @member {array} [sendAgreement.protocolSettings.messageFilterList] The - * EDIFACT message filter list. - * @member {array} [sendAgreement.protocolSettings.schemaReferences] The - * EDIFACT schema references. - * @member {array} [sendAgreement.protocolSettings.validationOverrides] The - * EDIFACT validation override settings. - * @member {array} [sendAgreement.protocolSettings.edifactDelimiterOverrides] - * The EDIFACT delimiter override settings. */ export interface EdifactAgreementContent { + /** + * The EDIFACT one-way receive agreement. + */ receiveAgreement: EdifactOneWayAgreement; + /** + * The EDIFACT one-way send agreement. + */ sendAgreement: EdifactOneWayAgreement; } /** - * @class - * Initializes a new instance of the AgreementContent class. - * @constructor * The integration account agreement content. - * - * @member {object} [aS2] The AS2 agreement content. - * @member {object} [aS2.receiveAgreement] The AS2 one-way receive agreement. - * @member {object} [aS2.receiveAgreement.senderBusinessIdentity] The sender - * business identity - * @member {string} [aS2.receiveAgreement.senderBusinessIdentity.qualifier] The - * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [aS2.receiveAgreement.senderBusinessIdentity.value] The - * user defined business identity value. - * @member {object} [aS2.receiveAgreement.receiverBusinessIdentity] The - * receiver business identity - * @member {string} [aS2.receiveAgreement.receiverBusinessIdentity.qualifier] - * The business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [aS2.receiveAgreement.receiverBusinessIdentity.value] The - * user defined business identity value. - * @member {object} [aS2.receiveAgreement.protocolSettings] The AS2 protocol - * settings. - * @member {object} - * [aS2.receiveAgreement.protocolSettings.messageConnectionSettings] The - * message connection settings. - * @member {boolean} - * [aS2.receiveAgreement.protocolSettings.messageConnectionSettings.ignoreCertificateNameMismatch] - * The value indicating whether to ignore mismatch in certificate name. - * @member {boolean} - * [aS2.receiveAgreement.protocolSettings.messageConnectionSettings.supportHttpStatusCodeContinue] - * The value indicating whether to support HTTP status code 'CONTINUE'. - * @member {boolean} - * [aS2.receiveAgreement.protocolSettings.messageConnectionSettings.keepHttpConnectionAlive] - * The value indicating whether to keep the connection alive. - * @member {boolean} - * [aS2.receiveAgreement.protocolSettings.messageConnectionSettings.unfoldHttpHeaders] - * The value indicating whether to unfold the HTTP headers. - * @member {object} - * [aS2.receiveAgreement.protocolSettings.acknowledgementConnectionSettings] - * The acknowledgement connection settings. - * @member {boolean} - * [aS2.receiveAgreement.protocolSettings.acknowledgementConnectionSettings.ignoreCertificateNameMismatch] - * The value indicating whether to ignore mismatch in certificate name. - * @member {boolean} - * [aS2.receiveAgreement.protocolSettings.acknowledgementConnectionSettings.supportHttpStatusCodeContinue] - * The value indicating whether to support HTTP status code 'CONTINUE'. - * @member {boolean} - * [aS2.receiveAgreement.protocolSettings.acknowledgementConnectionSettings.keepHttpConnectionAlive] - * The value indicating whether to keep the connection alive. - * @member {boolean} - * [aS2.receiveAgreement.protocolSettings.acknowledgementConnectionSettings.unfoldHttpHeaders] - * The value indicating whether to unfold the HTTP headers. - * @member {object} [aS2.receiveAgreement.protocolSettings.mdnSettings] The MDN - * settings. - * @member {boolean} - * [aS2.receiveAgreement.protocolSettings.mdnSettings.needMdn] The value - * indicating whether to send or request a MDN. - * @member {boolean} - * [aS2.receiveAgreement.protocolSettings.mdnSettings.signMdn] The value - * indicating whether the MDN needs to be signed or not. - * @member {boolean} - * [aS2.receiveAgreement.protocolSettings.mdnSettings.sendMdnAsynchronously] - * The value indicating whether to send the asynchronous MDN. - * @member {string} - * [aS2.receiveAgreement.protocolSettings.mdnSettings.receiptDeliveryUrl] The - * receipt delivery URL. - * @member {string} - * [aS2.receiveAgreement.protocolSettings.mdnSettings.dispositionNotificationTo] - * The disposition notification to header value. - * @member {boolean} - * [aS2.receiveAgreement.protocolSettings.mdnSettings.signOutboundMdnIfOptional] - * The value indicating whether to sign the outbound MDN if optional. - * @member {string} [aS2.receiveAgreement.protocolSettings.mdnSettings.mdnText] - * The MDN text. - * @member {boolean} - * [aS2.receiveAgreement.protocolSettings.mdnSettings.sendInboundMdnToMessageBox] - * The value indicating whether to send inbound MDN to message box. - * @member {string} - * [aS2.receiveAgreement.protocolSettings.mdnSettings.micHashingAlgorithm] The - * signing or hashing algorithm. Possible values include: 'NotSpecified', - * 'None', 'MD5', 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512' - * @member {object} [aS2.receiveAgreement.protocolSettings.securitySettings] - * The security settings. - * @member {boolean} - * [aS2.receiveAgreement.protocolSettings.securitySettings.overrideGroupSigningCertificate] - * The value indicating whether to send or request a MDN. - * @member {string} - * [aS2.receiveAgreement.protocolSettings.securitySettings.signingCertificateName] - * The name of the signing certificate. - * @member {string} - * [aS2.receiveAgreement.protocolSettings.securitySettings.encryptionCertificateName] - * The name of the encryption certificate. - * @member {boolean} - * [aS2.receiveAgreement.protocolSettings.securitySettings.enableNrrForInboundEncodedMessages] - * The value indicating whether to enable NRR for inbound encoded messages. - * @member {boolean} - * [aS2.receiveAgreement.protocolSettings.securitySettings.enableNrrForInboundDecodedMessages] - * The value indicating whether to enable NRR for inbound decoded messages. - * @member {boolean} - * [aS2.receiveAgreement.protocolSettings.securitySettings.enableNrrForOutboundMdn] - * The value indicating whether to enable NRR for outbound MDN. - * @member {boolean} - * [aS2.receiveAgreement.protocolSettings.securitySettings.enableNrrForOutboundEncodedMessages] - * The value indicating whether to enable NRR for outbound encoded messages. - * @member {boolean} - * [aS2.receiveAgreement.protocolSettings.securitySettings.enableNrrForOutboundDecodedMessages] - * The value indicating whether to enable NRR for outbound decoded messages. - * @member {boolean} - * [aS2.receiveAgreement.protocolSettings.securitySettings.enableNrrForInboundMdn] - * The value indicating whether to enable NRR for inbound MDN. - * @member {string} - * [aS2.receiveAgreement.protocolSettings.securitySettings.sha2AlgorithmFormat] - * The Sha2 algorithm format. Valid values are Sha2, ShaHashSize, - * ShaHyphenHashSize, Sha2UnderscoreHashSize. - * @member {object} [aS2.receiveAgreement.protocolSettings.validationSettings] - * The validation settings. - * @member {boolean} - * [aS2.receiveAgreement.protocolSettings.validationSettings.overrideMessageProperties] - * The value indicating whether to override incoming message properties with - * those in agreement. - * @member {boolean} - * [aS2.receiveAgreement.protocolSettings.validationSettings.encryptMessage] - * The value indicating whether the message has to be encrypted. - * @member {boolean} - * [aS2.receiveAgreement.protocolSettings.validationSettings.signMessage] The - * value indicating whether the message has to be signed. - * @member {boolean} - * [aS2.receiveAgreement.protocolSettings.validationSettings.compressMessage] - * The value indicating whether the message has to be compressed. - * @member {boolean} - * [aS2.receiveAgreement.protocolSettings.validationSettings.checkDuplicateMessage] - * The value indicating whether to check for duplicate message. - * @member {number} - * [aS2.receiveAgreement.protocolSettings.validationSettings.interchangeDuplicatesValidityDays] - * The number of days to look back for duplicate interchange. - * @member {boolean} - * [aS2.receiveAgreement.protocolSettings.validationSettings.checkCertificateRevocationListOnSend] - * The value indicating whether to check for certificate revocation list on - * send. - * @member {boolean} - * [aS2.receiveAgreement.protocolSettings.validationSettings.checkCertificateRevocationListOnReceive] - * The value indicating whether to check for certificate revocation list on - * receive. - * @member {string} - * [aS2.receiveAgreement.protocolSettings.validationSettings.encryptionAlgorithm] - * The encryption algorithm. Possible values include: 'NotSpecified', 'None', - * 'DES3', 'RC2', 'AES128', 'AES192', 'AES256' - * @member {string} - * [aS2.receiveAgreement.protocolSettings.validationSettings.signingAlgorithm] - * The signing algorithm. Possible values include: 'NotSpecified', 'Default', - * 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512' - * @member {object} [aS2.receiveAgreement.protocolSettings.envelopeSettings] - * The envelope settings. - * @member {string} - * [aS2.receiveAgreement.protocolSettings.envelopeSettings.messageContentType] - * The message content type. - * @member {boolean} - * [aS2.receiveAgreement.protocolSettings.envelopeSettings.transmitFileNameInMimeHeader] - * The value indicating whether to transmit file name in mime header. - * @member {string} - * [aS2.receiveAgreement.protocolSettings.envelopeSettings.fileNameTemplate] - * The template for file name. - * @member {boolean} - * [aS2.receiveAgreement.protocolSettings.envelopeSettings.suspendMessageOnFileNameGenerationError] - * The value indicating whether to suspend message on file name generation - * error. - * @member {boolean} - * [aS2.receiveAgreement.protocolSettings.envelopeSettings.autogenerateFileName] - * The value indicating whether to auto generate file name. - * @member {object} [aS2.receiveAgreement.protocolSettings.errorSettings] The - * error settings. - * @member {boolean} - * [aS2.receiveAgreement.protocolSettings.errorSettings.suspendDuplicateMessage] - * The value indicating whether to suspend duplicate message. - * @member {boolean} - * [aS2.receiveAgreement.protocolSettings.errorSettings.resendIfMdnNotReceived] - * The value indicating whether to resend message If MDN is not received. - * @member {object} [aS2.sendAgreement] The AS2 one-way send agreement. - * @member {object} [aS2.sendAgreement.senderBusinessIdentity] The sender - * business identity - * @member {string} [aS2.sendAgreement.senderBusinessIdentity.qualifier] The - * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [aS2.sendAgreement.senderBusinessIdentity.value] The user - * defined business identity value. - * @member {object} [aS2.sendAgreement.receiverBusinessIdentity] The receiver - * business identity - * @member {string} [aS2.sendAgreement.receiverBusinessIdentity.qualifier] The - * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [aS2.sendAgreement.receiverBusinessIdentity.value] The user - * defined business identity value. - * @member {object} [aS2.sendAgreement.protocolSettings] The AS2 protocol - * settings. - * @member {object} - * [aS2.sendAgreement.protocolSettings.messageConnectionSettings] The message - * connection settings. - * @member {boolean} - * [aS2.sendAgreement.protocolSettings.messageConnectionSettings.ignoreCertificateNameMismatch] - * The value indicating whether to ignore mismatch in certificate name. - * @member {boolean} - * [aS2.sendAgreement.protocolSettings.messageConnectionSettings.supportHttpStatusCodeContinue] - * The value indicating whether to support HTTP status code 'CONTINUE'. - * @member {boolean} - * [aS2.sendAgreement.protocolSettings.messageConnectionSettings.keepHttpConnectionAlive] - * The value indicating whether to keep the connection alive. - * @member {boolean} - * [aS2.sendAgreement.protocolSettings.messageConnectionSettings.unfoldHttpHeaders] - * The value indicating whether to unfold the HTTP headers. - * @member {object} - * [aS2.sendAgreement.protocolSettings.acknowledgementConnectionSettings] The - * acknowledgement connection settings. - * @member {boolean} - * [aS2.sendAgreement.protocolSettings.acknowledgementConnectionSettings.ignoreCertificateNameMismatch] - * The value indicating whether to ignore mismatch in certificate name. - * @member {boolean} - * [aS2.sendAgreement.protocolSettings.acknowledgementConnectionSettings.supportHttpStatusCodeContinue] - * The value indicating whether to support HTTP status code 'CONTINUE'. - * @member {boolean} - * [aS2.sendAgreement.protocolSettings.acknowledgementConnectionSettings.keepHttpConnectionAlive] - * The value indicating whether to keep the connection alive. - * @member {boolean} - * [aS2.sendAgreement.protocolSettings.acknowledgementConnectionSettings.unfoldHttpHeaders] - * The value indicating whether to unfold the HTTP headers. - * @member {object} [aS2.sendAgreement.protocolSettings.mdnSettings] The MDN - * settings. - * @member {boolean} [aS2.sendAgreement.protocolSettings.mdnSettings.needMdn] - * The value indicating whether to send or request a MDN. - * @member {boolean} [aS2.sendAgreement.protocolSettings.mdnSettings.signMdn] - * The value indicating whether the MDN needs to be signed or not. - * @member {boolean} - * [aS2.sendAgreement.protocolSettings.mdnSettings.sendMdnAsynchronously] The - * value indicating whether to send the asynchronous MDN. - * @member {string} - * [aS2.sendAgreement.protocolSettings.mdnSettings.receiptDeliveryUrl] The - * receipt delivery URL. - * @member {string} - * [aS2.sendAgreement.protocolSettings.mdnSettings.dispositionNotificationTo] - * The disposition notification to header value. - * @member {boolean} - * [aS2.sendAgreement.protocolSettings.mdnSettings.signOutboundMdnIfOptional] - * The value indicating whether to sign the outbound MDN if optional. - * @member {string} [aS2.sendAgreement.protocolSettings.mdnSettings.mdnText] - * The MDN text. - * @member {boolean} - * [aS2.sendAgreement.protocolSettings.mdnSettings.sendInboundMdnToMessageBox] - * The value indicating whether to send inbound MDN to message box. - * @member {string} - * [aS2.sendAgreement.protocolSettings.mdnSettings.micHashingAlgorithm] The - * signing or hashing algorithm. Possible values include: 'NotSpecified', - * 'None', 'MD5', 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512' - * @member {object} [aS2.sendAgreement.protocolSettings.securitySettings] The - * security settings. - * @member {boolean} - * [aS2.sendAgreement.protocolSettings.securitySettings.overrideGroupSigningCertificate] - * The value indicating whether to send or request a MDN. - * @member {string} - * [aS2.sendAgreement.protocolSettings.securitySettings.signingCertificateName] - * The name of the signing certificate. - * @member {string} - * [aS2.sendAgreement.protocolSettings.securitySettings.encryptionCertificateName] - * The name of the encryption certificate. - * @member {boolean} - * [aS2.sendAgreement.protocolSettings.securitySettings.enableNrrForInboundEncodedMessages] - * The value indicating whether to enable NRR for inbound encoded messages. - * @member {boolean} - * [aS2.sendAgreement.protocolSettings.securitySettings.enableNrrForInboundDecodedMessages] - * The value indicating whether to enable NRR for inbound decoded messages. - * @member {boolean} - * [aS2.sendAgreement.protocolSettings.securitySettings.enableNrrForOutboundMdn] - * The value indicating whether to enable NRR for outbound MDN. - * @member {boolean} - * [aS2.sendAgreement.protocolSettings.securitySettings.enableNrrForOutboundEncodedMessages] - * The value indicating whether to enable NRR for outbound encoded messages. - * @member {boolean} - * [aS2.sendAgreement.protocolSettings.securitySettings.enableNrrForOutboundDecodedMessages] - * The value indicating whether to enable NRR for outbound decoded messages. - * @member {boolean} - * [aS2.sendAgreement.protocolSettings.securitySettings.enableNrrForInboundMdn] - * The value indicating whether to enable NRR for inbound MDN. - * @member {string} - * [aS2.sendAgreement.protocolSettings.securitySettings.sha2AlgorithmFormat] - * The Sha2 algorithm format. Valid values are Sha2, ShaHashSize, - * ShaHyphenHashSize, Sha2UnderscoreHashSize. - * @member {object} [aS2.sendAgreement.protocolSettings.validationSettings] The - * validation settings. - * @member {boolean} - * [aS2.sendAgreement.protocolSettings.validationSettings.overrideMessageProperties] - * The value indicating whether to override incoming message properties with - * those in agreement. - * @member {boolean} - * [aS2.sendAgreement.protocolSettings.validationSettings.encryptMessage] The - * value indicating whether the message has to be encrypted. - * @member {boolean} - * [aS2.sendAgreement.protocolSettings.validationSettings.signMessage] The - * value indicating whether the message has to be signed. - * @member {boolean} - * [aS2.sendAgreement.protocolSettings.validationSettings.compressMessage] The - * value indicating whether the message has to be compressed. - * @member {boolean} - * [aS2.sendAgreement.protocolSettings.validationSettings.checkDuplicateMessage] - * The value indicating whether to check for duplicate message. - * @member {number} - * [aS2.sendAgreement.protocolSettings.validationSettings.interchangeDuplicatesValidityDays] - * The number of days to look back for duplicate interchange. - * @member {boolean} - * [aS2.sendAgreement.protocolSettings.validationSettings.checkCertificateRevocationListOnSend] - * The value indicating whether to check for certificate revocation list on - * send. - * @member {boolean} - * [aS2.sendAgreement.protocolSettings.validationSettings.checkCertificateRevocationListOnReceive] - * The value indicating whether to check for certificate revocation list on - * receive. - * @member {string} - * [aS2.sendAgreement.protocolSettings.validationSettings.encryptionAlgorithm] - * The encryption algorithm. Possible values include: 'NotSpecified', 'None', - * 'DES3', 'RC2', 'AES128', 'AES192', 'AES256' - * @member {string} - * [aS2.sendAgreement.protocolSettings.validationSettings.signingAlgorithm] The - * signing algorithm. Possible values include: 'NotSpecified', 'Default', - * 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512' - * @member {object} [aS2.sendAgreement.protocolSettings.envelopeSettings] The - * envelope settings. - * @member {string} - * [aS2.sendAgreement.protocolSettings.envelopeSettings.messageContentType] The - * message content type. - * @member {boolean} - * [aS2.sendAgreement.protocolSettings.envelopeSettings.transmitFileNameInMimeHeader] - * The value indicating whether to transmit file name in mime header. - * @member {string} - * [aS2.sendAgreement.protocolSettings.envelopeSettings.fileNameTemplate] The - * template for file name. - * @member {boolean} - * [aS2.sendAgreement.protocolSettings.envelopeSettings.suspendMessageOnFileNameGenerationError] - * The value indicating whether to suspend message on file name generation - * error. - * @member {boolean} - * [aS2.sendAgreement.protocolSettings.envelopeSettings.autogenerateFileName] - * The value indicating whether to auto generate file name. - * @member {object} [aS2.sendAgreement.protocolSettings.errorSettings] The - * error settings. - * @member {boolean} - * [aS2.sendAgreement.protocolSettings.errorSettings.suspendDuplicateMessage] - * The value indicating whether to suspend duplicate message. - * @member {boolean} - * [aS2.sendAgreement.protocolSettings.errorSettings.resendIfMdnNotReceived] - * The value indicating whether to resend message If MDN is not received. - * @member {object} [x12] The X12 agreement content. - * @member {object} [x12.receiveAgreement] The X12 one-way receive agreement. - * @member {object} [x12.receiveAgreement.senderBusinessIdentity] The sender - * business identity - * @member {string} [x12.receiveAgreement.senderBusinessIdentity.qualifier] The - * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [x12.receiveAgreement.senderBusinessIdentity.value] The - * user defined business identity value. - * @member {object} [x12.receiveAgreement.receiverBusinessIdentity] The - * receiver business identity - * @member {string} [x12.receiveAgreement.receiverBusinessIdentity.qualifier] - * The business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [x12.receiveAgreement.receiverBusinessIdentity.value] The - * user defined business identity value. - * @member {object} [x12.receiveAgreement.protocolSettings] The X12 protocol - * settings. - * @member {object} [x12.receiveAgreement.protocolSettings.validationSettings] - * The X12 validation settings. - * @member {boolean} - * [x12.receiveAgreement.protocolSettings.validationSettings.validateCharacterSet] - * The value indicating whether to validate character set in the message. - * @member {boolean} - * [x12.receiveAgreement.protocolSettings.validationSettings.checkDuplicateInterchangeControlNumber] - * The value indicating whether to check for duplicate interchange control - * number. - * @member {number} - * [x12.receiveAgreement.protocolSettings.validationSettings.interchangeControlNumberValidityDays] - * The validity period of interchange control number. - * @member {boolean} - * [x12.receiveAgreement.protocolSettings.validationSettings.checkDuplicateGroupControlNumber] - * The value indicating whether to check for duplicate group control number. - * @member {boolean} - * [x12.receiveAgreement.protocolSettings.validationSettings.checkDuplicateTransactionSetControlNumber] - * The value indicating whether to check for duplicate transaction set control - * number. - * @member {boolean} - * [x12.receiveAgreement.protocolSettings.validationSettings.validateEdiTypes] - * The value indicating whether to Whether to validate EDI types. - * @member {boolean} - * [x12.receiveAgreement.protocolSettings.validationSettings.validateXsdTypes] - * The value indicating whether to Whether to validate XSD types. - * @member {boolean} - * [x12.receiveAgreement.protocolSettings.validationSettings.allowLeadingAndTrailingSpacesAndZeroes] - * The value indicating whether to allow leading and trailing spaces and - * zeroes. - * @member {boolean} - * [x12.receiveAgreement.protocolSettings.validationSettings.trimLeadingAndTrailingSpacesAndZeroes] - * The value indicating whether to trim leading and trailing spaces and zeroes. - * @member {string} - * [x12.receiveAgreement.protocolSettings.validationSettings.trailingSeparatorPolicy] - * The trailing separator policy. Possible values include: 'NotSpecified', - * 'NotAllowed', 'Optional', 'Mandatory' - * @member {object} [x12.receiveAgreement.protocolSettings.framingSettings] The - * X12 framing settings. - * @member {number} - * [x12.receiveAgreement.protocolSettings.framingSettings.dataElementSeparator] - * The data element separator. - * @member {number} - * [x12.receiveAgreement.protocolSettings.framingSettings.componentSeparator] - * The component separator. - * @member {boolean} - * [x12.receiveAgreement.protocolSettings.framingSettings.replaceSeparatorsInPayload] - * The value indicating whether to replace separators in payload. - * @member {number} - * [x12.receiveAgreement.protocolSettings.framingSettings.replaceCharacter] The - * replacement character. - * @member {number} - * [x12.receiveAgreement.protocolSettings.framingSettings.segmentTerminator] - * The segment terminator. - * @member {string} - * [x12.receiveAgreement.protocolSettings.framingSettings.characterSet] The X12 - * character set. Possible values include: 'NotSpecified', 'Basic', 'Extended', - * 'UTF8' - * @member {string} - * [x12.receiveAgreement.protocolSettings.framingSettings.segmentTerminatorSuffix] - * The segment terminator suffix. Possible values include: 'NotSpecified', - * 'None', 'CR', 'LF', 'CRLF' - * @member {object} [x12.receiveAgreement.protocolSettings.envelopeSettings] - * The X12 envelope settings. - * @member {number} - * [x12.receiveAgreement.protocolSettings.envelopeSettings.controlStandardsId] - * The controls standards id. - * @member {boolean} - * [x12.receiveAgreement.protocolSettings.envelopeSettings.useControlStandardsIdAsRepetitionCharacter] - * The value indicating whether to use control standards id as repetition - * character. - * @member {string} - * [x12.receiveAgreement.protocolSettings.envelopeSettings.senderApplicationId] - * The sender application id. - * @member {string} - * [x12.receiveAgreement.protocolSettings.envelopeSettings.receiverApplicationId] - * The receiver application id. - * @member {string} - * [x12.receiveAgreement.protocolSettings.envelopeSettings.controlVersionNumber] - * The control version number. - * @member {number} - * [x12.receiveAgreement.protocolSettings.envelopeSettings.interchangeControlNumberLowerBound] - * The interchange control number lower bound. - * @member {number} - * [x12.receiveAgreement.protocolSettings.envelopeSettings.interchangeControlNumberUpperBound] - * The interchange control number upper bound. - * @member {boolean} - * [x12.receiveAgreement.protocolSettings.envelopeSettings.rolloverInterchangeControlNumber] - * The value indicating whether to rollover interchange control number. - * @member {boolean} - * [x12.receiveAgreement.protocolSettings.envelopeSettings.enableDefaultGroupHeaders] - * The value indicating whether to enable default group headers. - * @member {string} - * [x12.receiveAgreement.protocolSettings.envelopeSettings.functionalGroupId] - * The functional group id. - * @member {number} - * [x12.receiveAgreement.protocolSettings.envelopeSettings.groupControlNumberLowerBound] - * The group control number lower bound. - * @member {number} - * [x12.receiveAgreement.protocolSettings.envelopeSettings.groupControlNumberUpperBound] - * The group control number upper bound. - * @member {boolean} - * [x12.receiveAgreement.protocolSettings.envelopeSettings.rolloverGroupControlNumber] - * The value indicating whether to rollover group control number. - * @member {string} - * [x12.receiveAgreement.protocolSettings.envelopeSettings.groupHeaderAgencyCode] - * The group header agency code. - * @member {string} - * [x12.receiveAgreement.protocolSettings.envelopeSettings.groupHeaderVersion] - * The group header version. - * @member {number} - * [x12.receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberLowerBound] - * The transaction set control number lower bound. - * @member {number} - * [x12.receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberUpperBound] - * The transaction set control number upper bound. - * @member {boolean} - * [x12.receiveAgreement.protocolSettings.envelopeSettings.rolloverTransactionSetControlNumber] - * The value indicating whether to rollover transaction set control number. - * @member {string} - * [x12.receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberPrefix] - * The transaction set control number prefix. - * @member {string} - * [x12.receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberSuffix] - * The transaction set control number suffix. - * @member {boolean} - * [x12.receiveAgreement.protocolSettings.envelopeSettings.overwriteExistingTransactionSetControlNumber] - * The value indicating whether to overwrite existing transaction set control - * number. - * @member {string} - * [x12.receiveAgreement.protocolSettings.envelopeSettings.groupHeaderDateFormat] - * The group header date format. Possible values include: 'NotSpecified', - * 'CCYYMMDD', 'YYMMDD' - * @member {string} - * [x12.receiveAgreement.protocolSettings.envelopeSettings.groupHeaderTimeFormat] - * The group header time format. Possible values include: 'NotSpecified', - * 'HHMM', 'HHMMSS', 'HHMMSSdd', 'HHMMSSd' - * @member {string} - * [x12.receiveAgreement.protocolSettings.envelopeSettings.usageIndicator] The - * usage indicator. Possible values include: 'NotSpecified', 'Test', - * 'Information', 'Production' - * @member {object} - * [x12.receiveAgreement.protocolSettings.acknowledgementSettings] The X12 - * acknowledgment settings. - * @member {boolean} - * [x12.receiveAgreement.protocolSettings.acknowledgementSettings.needTechnicalAcknowledgement] - * The value indicating whether technical acknowledgement is needed. - * @member {boolean} - * [x12.receiveAgreement.protocolSettings.acknowledgementSettings.batchTechnicalAcknowledgements] - * The value indicating whether to batch the technical acknowledgements. - * @member {boolean} - * [x12.receiveAgreement.protocolSettings.acknowledgementSettings.needFunctionalAcknowledgement] - * The value indicating whether functional acknowledgement is needed. - * @member {string} - * [x12.receiveAgreement.protocolSettings.acknowledgementSettings.functionalAcknowledgementVersion] - * The functional acknowledgement version. - * @member {boolean} - * [x12.receiveAgreement.protocolSettings.acknowledgementSettings.batchFunctionalAcknowledgements] - * The value indicating whether to batch functional acknowledgements. - * @member {boolean} - * [x12.receiveAgreement.protocolSettings.acknowledgementSettings.needImplementationAcknowledgement] - * The value indicating whether implementation acknowledgement is needed. - * @member {string} - * [x12.receiveAgreement.protocolSettings.acknowledgementSettings.implementationAcknowledgementVersion] - * The implementation acknowledgement version. - * @member {boolean} - * [x12.receiveAgreement.protocolSettings.acknowledgementSettings.batchImplementationAcknowledgements] - * The value indicating whether to batch implementation acknowledgements. - * @member {boolean} - * [x12.receiveAgreement.protocolSettings.acknowledgementSettings.needLoopForValidMessages] - * The value indicating whether a loop is needed for valid messages. - * @member {boolean} - * [x12.receiveAgreement.protocolSettings.acknowledgementSettings.sendSynchronousAcknowledgement] - * The value indicating whether to send synchronous acknowledgement. - * @member {string} - * [x12.receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberPrefix] - * The acknowledgement control number prefix. - * @member {string} - * [x12.receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberSuffix] - * The acknowledgement control number suffix. - * @member {number} - * [x12.receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberLowerBound] - * The acknowledgement control number lower bound. - * @member {number} - * [x12.receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberUpperBound] - * The acknowledgement control number upper bound. - * @member {boolean} - * [x12.receiveAgreement.protocolSettings.acknowledgementSettings.rolloverAcknowledgementControlNumber] - * The value indicating whether to rollover acknowledgement control number. - * @member {object} [x12.receiveAgreement.protocolSettings.messageFilter] The - * X12 message filter. - * @member {string} - * [x12.receiveAgreement.protocolSettings.messageFilter.messageFilterType] The - * message filter type. Possible values include: 'NotSpecified', 'Include', - * 'Exclude' - * @member {object} [x12.receiveAgreement.protocolSettings.securitySettings] - * The X12 security settings. - * @member {string} - * [x12.receiveAgreement.protocolSettings.securitySettings.authorizationQualifier] - * The authorization qualifier. - * @member {string} - * [x12.receiveAgreement.protocolSettings.securitySettings.authorizationValue] - * The authorization value. - * @member {string} - * [x12.receiveAgreement.protocolSettings.securitySettings.securityQualifier] - * The security qualifier. - * @member {string} - * [x12.receiveAgreement.protocolSettings.securitySettings.passwordValue] The - * password value. - * @member {object} [x12.receiveAgreement.protocolSettings.processingSettings] - * The X12 processing settings. - * @member {boolean} - * [x12.receiveAgreement.protocolSettings.processingSettings.maskSecurityInfo] - * The value indicating whether to mask security information. - * @member {boolean} - * [x12.receiveAgreement.protocolSettings.processingSettings.convertImpliedDecimal] - * The value indicating whether to convert numerical type to implied decimal. - * @member {boolean} - * [x12.receiveAgreement.protocolSettings.processingSettings.preserveInterchange] - * The value indicating whether to preserve interchange. - * @member {boolean} - * [x12.receiveAgreement.protocolSettings.processingSettings.suspendInterchangeOnError] - * The value indicating whether to suspend interchange on error. - * @member {boolean} - * [x12.receiveAgreement.protocolSettings.processingSettings.createEmptyXmlTagsForTrailingSeparators] - * The value indicating whether to create empty xml tags for trailing - * separators. - * @member {boolean} - * [x12.receiveAgreement.protocolSettings.processingSettings.useDotAsDecimalSeparator] - * The value indicating whether to use dot as decimal separator. - * @member {array} [x12.receiveAgreement.protocolSettings.envelopeOverrides] - * The X12 envelope override settings. - * @member {array} [x12.receiveAgreement.protocolSettings.validationOverrides] - * The X12 validation override settings. - * @member {array} [x12.receiveAgreement.protocolSettings.messageFilterList] - * The X12 message filter list. - * @member {array} [x12.receiveAgreement.protocolSettings.schemaReferences] The - * X12 schema references. - * @member {array} - * [x12.receiveAgreement.protocolSettings.x12DelimiterOverrides] The X12 - * delimiter override settings. - * @member {object} [x12.sendAgreement] The X12 one-way send agreement. - * @member {object} [x12.sendAgreement.senderBusinessIdentity] The sender - * business identity - * @member {string} [x12.sendAgreement.senderBusinessIdentity.qualifier] The - * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [x12.sendAgreement.senderBusinessIdentity.value] The user - * defined business identity value. - * @member {object} [x12.sendAgreement.receiverBusinessIdentity] The receiver - * business identity - * @member {string} [x12.sendAgreement.receiverBusinessIdentity.qualifier] The - * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [x12.sendAgreement.receiverBusinessIdentity.value] The user - * defined business identity value. - * @member {object} [x12.sendAgreement.protocolSettings] The X12 protocol - * settings. - * @member {object} [x12.sendAgreement.protocolSettings.validationSettings] The - * X12 validation settings. - * @member {boolean} - * [x12.sendAgreement.protocolSettings.validationSettings.validateCharacterSet] - * The value indicating whether to validate character set in the message. - * @member {boolean} - * [x12.sendAgreement.protocolSettings.validationSettings.checkDuplicateInterchangeControlNumber] - * The value indicating whether to check for duplicate interchange control - * number. - * @member {number} - * [x12.sendAgreement.protocolSettings.validationSettings.interchangeControlNumberValidityDays] - * The validity period of interchange control number. - * @member {boolean} - * [x12.sendAgreement.protocolSettings.validationSettings.checkDuplicateGroupControlNumber] - * The value indicating whether to check for duplicate group control number. - * @member {boolean} - * [x12.sendAgreement.protocolSettings.validationSettings.checkDuplicateTransactionSetControlNumber] - * The value indicating whether to check for duplicate transaction set control - * number. - * @member {boolean} - * [x12.sendAgreement.protocolSettings.validationSettings.validateEdiTypes] The - * value indicating whether to Whether to validate EDI types. - * @member {boolean} - * [x12.sendAgreement.protocolSettings.validationSettings.validateXsdTypes] The - * value indicating whether to Whether to validate XSD types. - * @member {boolean} - * [x12.sendAgreement.protocolSettings.validationSettings.allowLeadingAndTrailingSpacesAndZeroes] - * The value indicating whether to allow leading and trailing spaces and - * zeroes. - * @member {boolean} - * [x12.sendAgreement.protocolSettings.validationSettings.trimLeadingAndTrailingSpacesAndZeroes] - * The value indicating whether to trim leading and trailing spaces and zeroes. - * @member {string} - * [x12.sendAgreement.protocolSettings.validationSettings.trailingSeparatorPolicy] - * The trailing separator policy. Possible values include: 'NotSpecified', - * 'NotAllowed', 'Optional', 'Mandatory' - * @member {object} [x12.sendAgreement.protocolSettings.framingSettings] The - * X12 framing settings. - * @member {number} - * [x12.sendAgreement.protocolSettings.framingSettings.dataElementSeparator] - * The data element separator. - * @member {number} - * [x12.sendAgreement.protocolSettings.framingSettings.componentSeparator] The - * component separator. - * @member {boolean} - * [x12.sendAgreement.protocolSettings.framingSettings.replaceSeparatorsInPayload] - * The value indicating whether to replace separators in payload. - * @member {number} - * [x12.sendAgreement.protocolSettings.framingSettings.replaceCharacter] The - * replacement character. - * @member {number} - * [x12.sendAgreement.protocolSettings.framingSettings.segmentTerminator] The - * segment terminator. - * @member {string} - * [x12.sendAgreement.protocolSettings.framingSettings.characterSet] The X12 - * character set. Possible values include: 'NotSpecified', 'Basic', 'Extended', - * 'UTF8' - * @member {string} - * [x12.sendAgreement.protocolSettings.framingSettings.segmentTerminatorSuffix] - * The segment terminator suffix. Possible values include: 'NotSpecified', - * 'None', 'CR', 'LF', 'CRLF' - * @member {object} [x12.sendAgreement.protocolSettings.envelopeSettings] The - * X12 envelope settings. - * @member {number} - * [x12.sendAgreement.protocolSettings.envelopeSettings.controlStandardsId] The - * controls standards id. - * @member {boolean} - * [x12.sendAgreement.protocolSettings.envelopeSettings.useControlStandardsIdAsRepetitionCharacter] - * The value indicating whether to use control standards id as repetition - * character. - * @member {string} - * [x12.sendAgreement.protocolSettings.envelopeSettings.senderApplicationId] - * The sender application id. - * @member {string} - * [x12.sendAgreement.protocolSettings.envelopeSettings.receiverApplicationId] - * The receiver application id. - * @member {string} - * [x12.sendAgreement.protocolSettings.envelopeSettings.controlVersionNumber] - * The control version number. - * @member {number} - * [x12.sendAgreement.protocolSettings.envelopeSettings.interchangeControlNumberLowerBound] - * The interchange control number lower bound. - * @member {number} - * [x12.sendAgreement.protocolSettings.envelopeSettings.interchangeControlNumberUpperBound] - * The interchange control number upper bound. - * @member {boolean} - * [x12.sendAgreement.protocolSettings.envelopeSettings.rolloverInterchangeControlNumber] - * The value indicating whether to rollover interchange control number. - * @member {boolean} - * [x12.sendAgreement.protocolSettings.envelopeSettings.enableDefaultGroupHeaders] - * The value indicating whether to enable default group headers. - * @member {string} - * [x12.sendAgreement.protocolSettings.envelopeSettings.functionalGroupId] The - * functional group id. - * @member {number} - * [x12.sendAgreement.protocolSettings.envelopeSettings.groupControlNumberLowerBound] - * The group control number lower bound. - * @member {number} - * [x12.sendAgreement.protocolSettings.envelopeSettings.groupControlNumberUpperBound] - * The group control number upper bound. - * @member {boolean} - * [x12.sendAgreement.protocolSettings.envelopeSettings.rolloverGroupControlNumber] - * The value indicating whether to rollover group control number. - * @member {string} - * [x12.sendAgreement.protocolSettings.envelopeSettings.groupHeaderAgencyCode] - * The group header agency code. - * @member {string} - * [x12.sendAgreement.protocolSettings.envelopeSettings.groupHeaderVersion] The - * group header version. - * @member {number} - * [x12.sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberLowerBound] - * The transaction set control number lower bound. - * @member {number} - * [x12.sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberUpperBound] - * The transaction set control number upper bound. - * @member {boolean} - * [x12.sendAgreement.protocolSettings.envelopeSettings.rolloverTransactionSetControlNumber] - * The value indicating whether to rollover transaction set control number. - * @member {string} - * [x12.sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberPrefix] - * The transaction set control number prefix. - * @member {string} - * [x12.sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberSuffix] - * The transaction set control number suffix. - * @member {boolean} - * [x12.sendAgreement.protocolSettings.envelopeSettings.overwriteExistingTransactionSetControlNumber] - * The value indicating whether to overwrite existing transaction set control - * number. - * @member {string} - * [x12.sendAgreement.protocolSettings.envelopeSettings.groupHeaderDateFormat] - * The group header date format. Possible values include: 'NotSpecified', - * 'CCYYMMDD', 'YYMMDD' - * @member {string} - * [x12.sendAgreement.protocolSettings.envelopeSettings.groupHeaderTimeFormat] - * The group header time format. Possible values include: 'NotSpecified', - * 'HHMM', 'HHMMSS', 'HHMMSSdd', 'HHMMSSd' - * @member {string} - * [x12.sendAgreement.protocolSettings.envelopeSettings.usageIndicator] The - * usage indicator. Possible values include: 'NotSpecified', 'Test', - * 'Information', 'Production' - * @member {object} - * [x12.sendAgreement.protocolSettings.acknowledgementSettings] The X12 - * acknowledgment settings. - * @member {boolean} - * [x12.sendAgreement.protocolSettings.acknowledgementSettings.needTechnicalAcknowledgement] - * The value indicating whether technical acknowledgement is needed. - * @member {boolean} - * [x12.sendAgreement.protocolSettings.acknowledgementSettings.batchTechnicalAcknowledgements] - * The value indicating whether to batch the technical acknowledgements. - * @member {boolean} - * [x12.sendAgreement.protocolSettings.acknowledgementSettings.needFunctionalAcknowledgement] - * The value indicating whether functional acknowledgement is needed. - * @member {string} - * [x12.sendAgreement.protocolSettings.acknowledgementSettings.functionalAcknowledgementVersion] - * The functional acknowledgement version. - * @member {boolean} - * [x12.sendAgreement.protocolSettings.acknowledgementSettings.batchFunctionalAcknowledgements] - * The value indicating whether to batch functional acknowledgements. - * @member {boolean} - * [x12.sendAgreement.protocolSettings.acknowledgementSettings.needImplementationAcknowledgement] - * The value indicating whether implementation acknowledgement is needed. - * @member {string} - * [x12.sendAgreement.protocolSettings.acknowledgementSettings.implementationAcknowledgementVersion] - * The implementation acknowledgement version. - * @member {boolean} - * [x12.sendAgreement.protocolSettings.acknowledgementSettings.batchImplementationAcknowledgements] - * The value indicating whether to batch implementation acknowledgements. - * @member {boolean} - * [x12.sendAgreement.protocolSettings.acknowledgementSettings.needLoopForValidMessages] - * The value indicating whether a loop is needed for valid messages. - * @member {boolean} - * [x12.sendAgreement.protocolSettings.acknowledgementSettings.sendSynchronousAcknowledgement] - * The value indicating whether to send synchronous acknowledgement. - * @member {string} - * [x12.sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberPrefix] - * The acknowledgement control number prefix. - * @member {string} - * [x12.sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberSuffix] - * The acknowledgement control number suffix. - * @member {number} - * [x12.sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberLowerBound] - * The acknowledgement control number lower bound. - * @member {number} - * [x12.sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberUpperBound] - * The acknowledgement control number upper bound. - * @member {boolean} - * [x12.sendAgreement.protocolSettings.acknowledgementSettings.rolloverAcknowledgementControlNumber] - * The value indicating whether to rollover acknowledgement control number. - * @member {object} [x12.sendAgreement.protocolSettings.messageFilter] The X12 - * message filter. - * @member {string} - * [x12.sendAgreement.protocolSettings.messageFilter.messageFilterType] The - * message filter type. Possible values include: 'NotSpecified', 'Include', - * 'Exclude' - * @member {object} [x12.sendAgreement.protocolSettings.securitySettings] The - * X12 security settings. - * @member {string} - * [x12.sendAgreement.protocolSettings.securitySettings.authorizationQualifier] - * The authorization qualifier. - * @member {string} - * [x12.sendAgreement.protocolSettings.securitySettings.authorizationValue] The - * authorization value. - * @member {string} - * [x12.sendAgreement.protocolSettings.securitySettings.securityQualifier] The - * security qualifier. - * @member {string} - * [x12.sendAgreement.protocolSettings.securitySettings.passwordValue] The - * password value. - * @member {object} [x12.sendAgreement.protocolSettings.processingSettings] The - * X12 processing settings. - * @member {boolean} - * [x12.sendAgreement.protocolSettings.processingSettings.maskSecurityInfo] The - * value indicating whether to mask security information. - * @member {boolean} - * [x12.sendAgreement.protocolSettings.processingSettings.convertImpliedDecimal] - * The value indicating whether to convert numerical type to implied decimal. - * @member {boolean} - * [x12.sendAgreement.protocolSettings.processingSettings.preserveInterchange] - * The value indicating whether to preserve interchange. - * @member {boolean} - * [x12.sendAgreement.protocolSettings.processingSettings.suspendInterchangeOnError] - * The value indicating whether to suspend interchange on error. - * @member {boolean} - * [x12.sendAgreement.protocolSettings.processingSettings.createEmptyXmlTagsForTrailingSeparators] - * The value indicating whether to create empty xml tags for trailing - * separators. - * @member {boolean} - * [x12.sendAgreement.protocolSettings.processingSettings.useDotAsDecimalSeparator] - * The value indicating whether to use dot as decimal separator. - * @member {array} [x12.sendAgreement.protocolSettings.envelopeOverrides] The - * X12 envelope override settings. - * @member {array} [x12.sendAgreement.protocolSettings.validationOverrides] The - * X12 validation override settings. - * @member {array} [x12.sendAgreement.protocolSettings.messageFilterList] The - * X12 message filter list. - * @member {array} [x12.sendAgreement.protocolSettings.schemaReferences] The - * X12 schema references. - * @member {array} [x12.sendAgreement.protocolSettings.x12DelimiterOverrides] - * The X12 delimiter override settings. - * @member {object} [edifact] The EDIFACT agreement content. - * @member {object} [edifact.receiveAgreement] The EDIFACT one-way receive - * agreement. - * @member {object} [edifact.receiveAgreement.senderBusinessIdentity] The - * sender business identity - * @member {string} [edifact.receiveAgreement.senderBusinessIdentity.qualifier] - * The business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [edifact.receiveAgreement.senderBusinessIdentity.value] The - * user defined business identity value. - * @member {object} [edifact.receiveAgreement.receiverBusinessIdentity] The - * receiver business identity - * @member {string} - * [edifact.receiveAgreement.receiverBusinessIdentity.qualifier] The business - * identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [edifact.receiveAgreement.receiverBusinessIdentity.value] - * The user defined business identity value. - * @member {object} [edifact.receiveAgreement.protocolSettings] The EDIFACT - * protocol settings. - * @member {object} - * [edifact.receiveAgreement.protocolSettings.validationSettings] The EDIFACT - * validation settings. - * @member {boolean} - * [edifact.receiveAgreement.protocolSettings.validationSettings.validateCharacterSet] - * The value indicating whether to validate character set in the message. - * @member {boolean} - * [edifact.receiveAgreement.protocolSettings.validationSettings.checkDuplicateInterchangeControlNumber] - * The value indicating whether to check for duplicate interchange control - * number. - * @member {number} - * [edifact.receiveAgreement.protocolSettings.validationSettings.interchangeControlNumberValidityDays] - * The validity period of interchange control number. - * @member {boolean} - * [edifact.receiveAgreement.protocolSettings.validationSettings.checkDuplicateGroupControlNumber] - * The value indicating whether to check for duplicate group control number. - * @member {boolean} - * [edifact.receiveAgreement.protocolSettings.validationSettings.checkDuplicateTransactionSetControlNumber] - * The value indicating whether to check for duplicate transaction set control - * number. - * @member {boolean} - * [edifact.receiveAgreement.protocolSettings.validationSettings.validateEdiTypes] - * The value indicating whether to Whether to validate EDI types. - * @member {boolean} - * [edifact.receiveAgreement.protocolSettings.validationSettings.validateXsdTypes] - * The value indicating whether to Whether to validate XSD types. - * @member {boolean} - * [edifact.receiveAgreement.protocolSettings.validationSettings.allowLeadingAndTrailingSpacesAndZeroes] - * The value indicating whether to allow leading and trailing spaces and - * zeroes. - * @member {boolean} - * [edifact.receiveAgreement.protocolSettings.validationSettings.trimLeadingAndTrailingSpacesAndZeroes] - * The value indicating whether to trim leading and trailing spaces and zeroes. - * @member {string} - * [edifact.receiveAgreement.protocolSettings.validationSettings.trailingSeparatorPolicy] - * The trailing separator policy. Possible values include: 'NotSpecified', - * 'NotAllowed', 'Optional', 'Mandatory' - * @member {object} [edifact.receiveAgreement.protocolSettings.framingSettings] - * The EDIFACT framing settings. - * @member {string} - * [edifact.receiveAgreement.protocolSettings.framingSettings.serviceCodeListDirectoryVersion] - * The service code list directory version. - * @member {string} - * [edifact.receiveAgreement.protocolSettings.framingSettings.characterEncoding] - * The character encoding. - * @member {number} - * [edifact.receiveAgreement.protocolSettings.framingSettings.protocolVersion] - * The protocol version. - * @member {number} - * [edifact.receiveAgreement.protocolSettings.framingSettings.dataElementSeparator] - * The data element separator. - * @member {number} - * [edifact.receiveAgreement.protocolSettings.framingSettings.componentSeparator] - * The component separator. - * @member {number} - * [edifact.receiveAgreement.protocolSettings.framingSettings.segmentTerminator] - * The segment terminator. - * @member {number} - * [edifact.receiveAgreement.protocolSettings.framingSettings.releaseIndicator] - * The release indicator. - * @member {number} - * [edifact.receiveAgreement.protocolSettings.framingSettings.repetitionSeparator] - * The repetition separator. - * @member {string} - * [edifact.receiveAgreement.protocolSettings.framingSettings.characterSet] The - * EDIFACT frame setting characterSet. Possible values include: 'NotSpecified', - * 'UNOB', 'UNOA', 'UNOC', 'UNOD', 'UNOE', 'UNOF', 'UNOG', 'UNOH', 'UNOI', - * 'UNOJ', 'UNOK', 'UNOX', 'UNOY', 'KECA' - * @member {string} - * [edifact.receiveAgreement.protocolSettings.framingSettings.decimalPointIndicator] - * The EDIFACT frame setting decimal indicator. Possible values include: - * 'NotSpecified', 'Comma', 'Decimal' - * @member {string} - * [edifact.receiveAgreement.protocolSettings.framingSettings.segmentTerminatorSuffix] - * The EDIFACT frame setting segment terminator suffix. Possible values - * include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' - * @member {object} - * [edifact.receiveAgreement.protocolSettings.envelopeSettings] The EDIFACT - * envelope settings. - * @member {string} - * [edifact.receiveAgreement.protocolSettings.envelopeSettings.groupAssociationAssignedCode] - * The group association assigned code. - * @member {string} - * [edifact.receiveAgreement.protocolSettings.envelopeSettings.communicationAgreementId] - * The communication agreement id. - * @member {boolean} - * [edifact.receiveAgreement.protocolSettings.envelopeSettings.applyDelimiterStringAdvice] - * The value indicating whether to apply delimiter string advice. - * @member {boolean} - * [edifact.receiveAgreement.protocolSettings.envelopeSettings.createGroupingSegments] - * The value indicating whether to create grouping segments. - * @member {boolean} - * [edifact.receiveAgreement.protocolSettings.envelopeSettings.enableDefaultGroupHeaders] - * The value indicating whether to enable default group headers. - * @member {string} - * [edifact.receiveAgreement.protocolSettings.envelopeSettings.recipientReferencePasswordValue] - * The recipient reference password value. - * @member {string} - * [edifact.receiveAgreement.protocolSettings.envelopeSettings.recipientReferencePasswordQualifier] - * The recipient reference password qualifier. - * @member {string} - * [edifact.receiveAgreement.protocolSettings.envelopeSettings.applicationReferenceId] - * The application reference id. - * @member {string} - * [edifact.receiveAgreement.protocolSettings.envelopeSettings.processingPriorityCode] - * The processing priority code. - * @member {number} - * [edifact.receiveAgreement.protocolSettings.envelopeSettings.interchangeControlNumberLowerBound] - * The interchange control number lower bound. - * @member {number} - * [edifact.receiveAgreement.protocolSettings.envelopeSettings.interchangeControlNumberUpperBound] - * The interchange control number upper bound. - * @member {boolean} - * [edifact.receiveAgreement.protocolSettings.envelopeSettings.rolloverInterchangeControlNumber] - * The value indicating whether to rollover interchange control number. - * @member {string} - * [edifact.receiveAgreement.protocolSettings.envelopeSettings.interchangeControlNumberPrefix] - * The interchange control number prefix. - * @member {string} - * [edifact.receiveAgreement.protocolSettings.envelopeSettings.interchangeControlNumberSuffix] - * The interchange control number suffix. - * @member {string} - * [edifact.receiveAgreement.protocolSettings.envelopeSettings.senderReverseRoutingAddress] - * The sender reverse routing address. - * @member {string} - * [edifact.receiveAgreement.protocolSettings.envelopeSettings.receiverReverseRoutingAddress] - * The receiver reverse routing address. - * @member {string} - * [edifact.receiveAgreement.protocolSettings.envelopeSettings.functionalGroupId] - * The functional group id. - * @member {string} - * [edifact.receiveAgreement.protocolSettings.envelopeSettings.groupControllingAgencyCode] - * The group controlling agency code. - * @member {string} - * [edifact.receiveAgreement.protocolSettings.envelopeSettings.groupMessageVersion] - * The group message version. - * @member {string} - * [edifact.receiveAgreement.protocolSettings.envelopeSettings.groupMessageRelease] - * The group message release. - * @member {number} - * [edifact.receiveAgreement.protocolSettings.envelopeSettings.groupControlNumberLowerBound] - * The group control number lower bound. - * @member {number} - * [edifact.receiveAgreement.protocolSettings.envelopeSettings.groupControlNumberUpperBound] - * The group control number upper bound. - * @member {boolean} - * [edifact.receiveAgreement.protocolSettings.envelopeSettings.rolloverGroupControlNumber] - * The value indicating whether to rollover group control number. - * @member {string} - * [edifact.receiveAgreement.protocolSettings.envelopeSettings.groupControlNumberPrefix] - * The group control number prefix. - * @member {string} - * [edifact.receiveAgreement.protocolSettings.envelopeSettings.groupControlNumberSuffix] - * The group control number suffix. - * @member {string} - * [edifact.receiveAgreement.protocolSettings.envelopeSettings.groupApplicationReceiverQualifier] - * The group application receiver qualifier. - * @member {string} - * [edifact.receiveAgreement.protocolSettings.envelopeSettings.groupApplicationReceiverId] - * The group application receiver id. - * @member {string} - * [edifact.receiveAgreement.protocolSettings.envelopeSettings.groupApplicationSenderQualifier] - * The group application sender qualifier. - * @member {string} - * [edifact.receiveAgreement.protocolSettings.envelopeSettings.groupApplicationSenderId] - * The group application sender id. - * @member {string} - * [edifact.receiveAgreement.protocolSettings.envelopeSettings.groupApplicationPassword] - * The group application password. - * @member {boolean} - * [edifact.receiveAgreement.protocolSettings.envelopeSettings.overwriteExistingTransactionSetControlNumber] - * The value indicating whether to overwrite existing transaction set control - * number. - * @member {string} - * [edifact.receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberPrefix] - * The transaction set control number prefix. - * @member {string} - * [edifact.receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberSuffix] - * The transaction set control number suffix. - * @member {number} - * [edifact.receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberLowerBound] - * The transaction set control number lower bound. - * @member {number} - * [edifact.receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberUpperBound] - * The transaction set control number upper bound. - * @member {boolean} - * [edifact.receiveAgreement.protocolSettings.envelopeSettings.rolloverTransactionSetControlNumber] - * The value indicating whether to rollover transaction set control number. - * @member {boolean} - * [edifact.receiveAgreement.protocolSettings.envelopeSettings.isTestInterchange] - * The value indicating whether the message is a test interchange. - * @member {string} - * [edifact.receiveAgreement.protocolSettings.envelopeSettings.senderInternalIdentification] - * The sender internal identification. - * @member {string} - * [edifact.receiveAgreement.protocolSettings.envelopeSettings.senderInternalSubIdentification] - * The sender internal sub identification. - * @member {string} - * [edifact.receiveAgreement.protocolSettings.envelopeSettings.receiverInternalIdentification] - * The receiver internal identification. - * @member {string} - * [edifact.receiveAgreement.protocolSettings.envelopeSettings.receiverInternalSubIdentification] - * The receiver internal sub identification. - * @member {object} - * [edifact.receiveAgreement.protocolSettings.acknowledgementSettings] The - * EDIFACT acknowledgement settings. - * @member {boolean} - * [edifact.receiveAgreement.protocolSettings.acknowledgementSettings.needTechnicalAcknowledgement] - * The value indicating whether technical acknowledgement is needed. - * @member {boolean} - * [edifact.receiveAgreement.protocolSettings.acknowledgementSettings.batchTechnicalAcknowledgements] - * The value indicating whether to batch the technical acknowledgements. - * @member {boolean} - * [edifact.receiveAgreement.protocolSettings.acknowledgementSettings.needFunctionalAcknowledgement] - * The value indicating whether functional acknowledgement is needed. - * @member {boolean} - * [edifact.receiveAgreement.protocolSettings.acknowledgementSettings.batchFunctionalAcknowledgements] - * The value indicating whether to batch functional acknowledgements. - * @member {boolean} - * [edifact.receiveAgreement.protocolSettings.acknowledgementSettings.needLoopForValidMessages] - * The value indicating whether a loop is needed for valid messages. - * @member {boolean} - * [edifact.receiveAgreement.protocolSettings.acknowledgementSettings.sendSynchronousAcknowledgement] - * The value indicating whether to send synchronous acknowledgement. - * @member {string} - * [edifact.receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberPrefix] - * The acknowledgement control number prefix. - * @member {string} - * [edifact.receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberSuffix] - * The acknowledgement control number suffix. - * @member {number} - * [edifact.receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberLowerBound] - * The acknowledgement control number lower bound. - * @member {number} - * [edifact.receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberUpperBound] - * The acknowledgement control number upper bound. - * @member {boolean} - * [edifact.receiveAgreement.protocolSettings.acknowledgementSettings.rolloverAcknowledgementControlNumber] - * The value indicating whether to rollover acknowledgement control number. - * @member {object} [edifact.receiveAgreement.protocolSettings.messageFilter] - * The EDIFACT message filter. - * @member {string} - * [edifact.receiveAgreement.protocolSettings.messageFilter.messageFilterType] - * The message filter type. Possible values include: 'NotSpecified', 'Include', - * 'Exclude' - * @member {object} - * [edifact.receiveAgreement.protocolSettings.processingSettings] The EDIFACT - * processing Settings. - * @member {boolean} - * [edifact.receiveAgreement.protocolSettings.processingSettings.maskSecurityInfo] - * The value indicating whether to mask security information. - * @member {boolean} - * [edifact.receiveAgreement.protocolSettings.processingSettings.preserveInterchange] - * The value indicating whether to preserve interchange. - * @member {boolean} - * [edifact.receiveAgreement.protocolSettings.processingSettings.suspendInterchangeOnError] - * The value indicating whether to suspend interchange on error. - * @member {boolean} - * [edifact.receiveAgreement.protocolSettings.processingSettings.createEmptyXmlTagsForTrailingSeparators] - * The value indicating whether to create empty xml tags for trailing - * separators. - * @member {boolean} - * [edifact.receiveAgreement.protocolSettings.processingSettings.useDotAsDecimalSeparator] - * The value indicating whether to use dot as decimal separator. - * @member {array} - * [edifact.receiveAgreement.protocolSettings.envelopeOverrides] The EDIFACT - * envelope override settings. - * @member {array} - * [edifact.receiveAgreement.protocolSettings.messageFilterList] The EDIFACT - * message filter list. - * @member {array} [edifact.receiveAgreement.protocolSettings.schemaReferences] - * The EDIFACT schema references. - * @member {array} - * [edifact.receiveAgreement.protocolSettings.validationOverrides] The EDIFACT - * validation override settings. - * @member {array} - * [edifact.receiveAgreement.protocolSettings.edifactDelimiterOverrides] The - * EDIFACT delimiter override settings. - * @member {object} [edifact.sendAgreement] The EDIFACT one-way send agreement. - * @member {object} [edifact.sendAgreement.senderBusinessIdentity] The sender - * business identity - * @member {string} [edifact.sendAgreement.senderBusinessIdentity.qualifier] - * The business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [edifact.sendAgreement.senderBusinessIdentity.value] The - * user defined business identity value. - * @member {object} [edifact.sendAgreement.receiverBusinessIdentity] The - * receiver business identity - * @member {string} [edifact.sendAgreement.receiverBusinessIdentity.qualifier] - * The business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [edifact.sendAgreement.receiverBusinessIdentity.value] The - * user defined business identity value. - * @member {object} [edifact.sendAgreement.protocolSettings] The EDIFACT - * protocol settings. - * @member {object} [edifact.sendAgreement.protocolSettings.validationSettings] - * The EDIFACT validation settings. - * @member {boolean} - * [edifact.sendAgreement.protocolSettings.validationSettings.validateCharacterSet] - * The value indicating whether to validate character set in the message. - * @member {boolean} - * [edifact.sendAgreement.protocolSettings.validationSettings.checkDuplicateInterchangeControlNumber] - * The value indicating whether to check for duplicate interchange control - * number. - * @member {number} - * [edifact.sendAgreement.protocolSettings.validationSettings.interchangeControlNumberValidityDays] - * The validity period of interchange control number. - * @member {boolean} - * [edifact.sendAgreement.protocolSettings.validationSettings.checkDuplicateGroupControlNumber] - * The value indicating whether to check for duplicate group control number. - * @member {boolean} - * [edifact.sendAgreement.protocolSettings.validationSettings.checkDuplicateTransactionSetControlNumber] - * The value indicating whether to check for duplicate transaction set control - * number. - * @member {boolean} - * [edifact.sendAgreement.protocolSettings.validationSettings.validateEdiTypes] - * The value indicating whether to Whether to validate EDI types. - * @member {boolean} - * [edifact.sendAgreement.protocolSettings.validationSettings.validateXsdTypes] - * The value indicating whether to Whether to validate XSD types. - * @member {boolean} - * [edifact.sendAgreement.protocolSettings.validationSettings.allowLeadingAndTrailingSpacesAndZeroes] - * The value indicating whether to allow leading and trailing spaces and - * zeroes. - * @member {boolean} - * [edifact.sendAgreement.protocolSettings.validationSettings.trimLeadingAndTrailingSpacesAndZeroes] - * The value indicating whether to trim leading and trailing spaces and zeroes. - * @member {string} - * [edifact.sendAgreement.protocolSettings.validationSettings.trailingSeparatorPolicy] - * The trailing separator policy. Possible values include: 'NotSpecified', - * 'NotAllowed', 'Optional', 'Mandatory' - * @member {object} [edifact.sendAgreement.protocolSettings.framingSettings] - * The EDIFACT framing settings. - * @member {string} - * [edifact.sendAgreement.protocolSettings.framingSettings.serviceCodeListDirectoryVersion] - * The service code list directory version. - * @member {string} - * [edifact.sendAgreement.protocolSettings.framingSettings.characterEncoding] - * The character encoding. - * @member {number} - * [edifact.sendAgreement.protocolSettings.framingSettings.protocolVersion] The - * protocol version. - * @member {number} - * [edifact.sendAgreement.protocolSettings.framingSettings.dataElementSeparator] - * The data element separator. - * @member {number} - * [edifact.sendAgreement.protocolSettings.framingSettings.componentSeparator] - * The component separator. - * @member {number} - * [edifact.sendAgreement.protocolSettings.framingSettings.segmentTerminator] - * The segment terminator. - * @member {number} - * [edifact.sendAgreement.protocolSettings.framingSettings.releaseIndicator] - * The release indicator. - * @member {number} - * [edifact.sendAgreement.protocolSettings.framingSettings.repetitionSeparator] - * The repetition separator. - * @member {string} - * [edifact.sendAgreement.protocolSettings.framingSettings.characterSet] The - * EDIFACT frame setting characterSet. Possible values include: 'NotSpecified', - * 'UNOB', 'UNOA', 'UNOC', 'UNOD', 'UNOE', 'UNOF', 'UNOG', 'UNOH', 'UNOI', - * 'UNOJ', 'UNOK', 'UNOX', 'UNOY', 'KECA' - * @member {string} - * [edifact.sendAgreement.protocolSettings.framingSettings.decimalPointIndicator] - * The EDIFACT frame setting decimal indicator. Possible values include: - * 'NotSpecified', 'Comma', 'Decimal' - * @member {string} - * [edifact.sendAgreement.protocolSettings.framingSettings.segmentTerminatorSuffix] - * The EDIFACT frame setting segment terminator suffix. Possible values - * include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' - * @member {object} [edifact.sendAgreement.protocolSettings.envelopeSettings] - * The EDIFACT envelope settings. - * @member {string} - * [edifact.sendAgreement.protocolSettings.envelopeSettings.groupAssociationAssignedCode] - * The group association assigned code. - * @member {string} - * [edifact.sendAgreement.protocolSettings.envelopeSettings.communicationAgreementId] - * The communication agreement id. - * @member {boolean} - * [edifact.sendAgreement.protocolSettings.envelopeSettings.applyDelimiterStringAdvice] - * The value indicating whether to apply delimiter string advice. - * @member {boolean} - * [edifact.sendAgreement.protocolSettings.envelopeSettings.createGroupingSegments] - * The value indicating whether to create grouping segments. - * @member {boolean} - * [edifact.sendAgreement.protocolSettings.envelopeSettings.enableDefaultGroupHeaders] - * The value indicating whether to enable default group headers. - * @member {string} - * [edifact.sendAgreement.protocolSettings.envelopeSettings.recipientReferencePasswordValue] - * The recipient reference password value. - * @member {string} - * [edifact.sendAgreement.protocolSettings.envelopeSettings.recipientReferencePasswordQualifier] - * The recipient reference password qualifier. - * @member {string} - * [edifact.sendAgreement.protocolSettings.envelopeSettings.applicationReferenceId] - * The application reference id. - * @member {string} - * [edifact.sendAgreement.protocolSettings.envelopeSettings.processingPriorityCode] - * The processing priority code. - * @member {number} - * [edifact.sendAgreement.protocolSettings.envelopeSettings.interchangeControlNumberLowerBound] - * The interchange control number lower bound. - * @member {number} - * [edifact.sendAgreement.protocolSettings.envelopeSettings.interchangeControlNumberUpperBound] - * The interchange control number upper bound. - * @member {boolean} - * [edifact.sendAgreement.protocolSettings.envelopeSettings.rolloverInterchangeControlNumber] - * The value indicating whether to rollover interchange control number. - * @member {string} - * [edifact.sendAgreement.protocolSettings.envelopeSettings.interchangeControlNumberPrefix] - * The interchange control number prefix. - * @member {string} - * [edifact.sendAgreement.protocolSettings.envelopeSettings.interchangeControlNumberSuffix] - * The interchange control number suffix. - * @member {string} - * [edifact.sendAgreement.protocolSettings.envelopeSettings.senderReverseRoutingAddress] - * The sender reverse routing address. - * @member {string} - * [edifact.sendAgreement.protocolSettings.envelopeSettings.receiverReverseRoutingAddress] - * The receiver reverse routing address. - * @member {string} - * [edifact.sendAgreement.protocolSettings.envelopeSettings.functionalGroupId] - * The functional group id. - * @member {string} - * [edifact.sendAgreement.protocolSettings.envelopeSettings.groupControllingAgencyCode] - * The group controlling agency code. - * @member {string} - * [edifact.sendAgreement.protocolSettings.envelopeSettings.groupMessageVersion] - * The group message version. - * @member {string} - * [edifact.sendAgreement.protocolSettings.envelopeSettings.groupMessageRelease] - * The group message release. - * @member {number} - * [edifact.sendAgreement.protocolSettings.envelopeSettings.groupControlNumberLowerBound] - * The group control number lower bound. - * @member {number} - * [edifact.sendAgreement.protocolSettings.envelopeSettings.groupControlNumberUpperBound] - * The group control number upper bound. - * @member {boolean} - * [edifact.sendAgreement.protocolSettings.envelopeSettings.rolloverGroupControlNumber] - * The value indicating whether to rollover group control number. - * @member {string} - * [edifact.sendAgreement.protocolSettings.envelopeSettings.groupControlNumberPrefix] - * The group control number prefix. - * @member {string} - * [edifact.sendAgreement.protocolSettings.envelopeSettings.groupControlNumberSuffix] - * The group control number suffix. - * @member {string} - * [edifact.sendAgreement.protocolSettings.envelopeSettings.groupApplicationReceiverQualifier] - * The group application receiver qualifier. - * @member {string} - * [edifact.sendAgreement.protocolSettings.envelopeSettings.groupApplicationReceiverId] - * The group application receiver id. - * @member {string} - * [edifact.sendAgreement.protocolSettings.envelopeSettings.groupApplicationSenderQualifier] - * The group application sender qualifier. - * @member {string} - * [edifact.sendAgreement.protocolSettings.envelopeSettings.groupApplicationSenderId] - * The group application sender id. - * @member {string} - * [edifact.sendAgreement.protocolSettings.envelopeSettings.groupApplicationPassword] - * The group application password. - * @member {boolean} - * [edifact.sendAgreement.protocolSettings.envelopeSettings.overwriteExistingTransactionSetControlNumber] - * The value indicating whether to overwrite existing transaction set control - * number. - * @member {string} - * [edifact.sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberPrefix] - * The transaction set control number prefix. - * @member {string} - * [edifact.sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberSuffix] - * The transaction set control number suffix. - * @member {number} - * [edifact.sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberLowerBound] - * The transaction set control number lower bound. - * @member {number} - * [edifact.sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberUpperBound] - * The transaction set control number upper bound. - * @member {boolean} - * [edifact.sendAgreement.protocolSettings.envelopeSettings.rolloverTransactionSetControlNumber] - * The value indicating whether to rollover transaction set control number. - * @member {boolean} - * [edifact.sendAgreement.protocolSettings.envelopeSettings.isTestInterchange] - * The value indicating whether the message is a test interchange. - * @member {string} - * [edifact.sendAgreement.protocolSettings.envelopeSettings.senderInternalIdentification] - * The sender internal identification. - * @member {string} - * [edifact.sendAgreement.protocolSettings.envelopeSettings.senderInternalSubIdentification] - * The sender internal sub identification. - * @member {string} - * [edifact.sendAgreement.protocolSettings.envelopeSettings.receiverInternalIdentification] - * The receiver internal identification. - * @member {string} - * [edifact.sendAgreement.protocolSettings.envelopeSettings.receiverInternalSubIdentification] - * The receiver internal sub identification. - * @member {object} - * [edifact.sendAgreement.protocolSettings.acknowledgementSettings] The EDIFACT - * acknowledgement settings. - * @member {boolean} - * [edifact.sendAgreement.protocolSettings.acknowledgementSettings.needTechnicalAcknowledgement] - * The value indicating whether technical acknowledgement is needed. - * @member {boolean} - * [edifact.sendAgreement.protocolSettings.acknowledgementSettings.batchTechnicalAcknowledgements] - * The value indicating whether to batch the technical acknowledgements. - * @member {boolean} - * [edifact.sendAgreement.protocolSettings.acknowledgementSettings.needFunctionalAcknowledgement] - * The value indicating whether functional acknowledgement is needed. - * @member {boolean} - * [edifact.sendAgreement.protocolSettings.acknowledgementSettings.batchFunctionalAcknowledgements] - * The value indicating whether to batch functional acknowledgements. - * @member {boolean} - * [edifact.sendAgreement.protocolSettings.acknowledgementSettings.needLoopForValidMessages] - * The value indicating whether a loop is needed for valid messages. - * @member {boolean} - * [edifact.sendAgreement.protocolSettings.acknowledgementSettings.sendSynchronousAcknowledgement] - * The value indicating whether to send synchronous acknowledgement. - * @member {string} - * [edifact.sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberPrefix] - * The acknowledgement control number prefix. - * @member {string} - * [edifact.sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberSuffix] - * The acknowledgement control number suffix. - * @member {number} - * [edifact.sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberLowerBound] - * The acknowledgement control number lower bound. - * @member {number} - * [edifact.sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberUpperBound] - * The acknowledgement control number upper bound. - * @member {boolean} - * [edifact.sendAgreement.protocolSettings.acknowledgementSettings.rolloverAcknowledgementControlNumber] - * The value indicating whether to rollover acknowledgement control number. - * @member {object} [edifact.sendAgreement.protocolSettings.messageFilter] The - * EDIFACT message filter. - * @member {string} - * [edifact.sendAgreement.protocolSettings.messageFilter.messageFilterType] The - * message filter type. Possible values include: 'NotSpecified', 'Include', - * 'Exclude' - * @member {object} [edifact.sendAgreement.protocolSettings.processingSettings] - * The EDIFACT processing Settings. - * @member {boolean} - * [edifact.sendAgreement.protocolSettings.processingSettings.maskSecurityInfo] - * The value indicating whether to mask security information. - * @member {boolean} - * [edifact.sendAgreement.protocolSettings.processingSettings.preserveInterchange] - * The value indicating whether to preserve interchange. - * @member {boolean} - * [edifact.sendAgreement.protocolSettings.processingSettings.suspendInterchangeOnError] - * The value indicating whether to suspend interchange on error. - * @member {boolean} - * [edifact.sendAgreement.protocolSettings.processingSettings.createEmptyXmlTagsForTrailingSeparators] - * The value indicating whether to create empty xml tags for trailing - * separators. - * @member {boolean} - * [edifact.sendAgreement.protocolSettings.processingSettings.useDotAsDecimalSeparator] - * The value indicating whether to use dot as decimal separator. - * @member {array} [edifact.sendAgreement.protocolSettings.envelopeOverrides] - * The EDIFACT envelope override settings. - * @member {array} [edifact.sendAgreement.protocolSettings.messageFilterList] - * The EDIFACT message filter list. - * @member {array} [edifact.sendAgreement.protocolSettings.schemaReferences] - * The EDIFACT schema references. - * @member {array} [edifact.sendAgreement.protocolSettings.validationOverrides] - * The EDIFACT validation override settings. - * @member {array} - * [edifact.sendAgreement.protocolSettings.edifactDelimiterOverrides] The - * EDIFACT delimiter override settings. */ export interface AgreementContent { + /** + * The AS2 agreement content. + */ aS2?: AS2AgreementContent; + /** + * The X12 agreement content. + */ x12?: X12AgreementContent; + /** + * The EDIFACT agreement content. + */ edifact?: EdifactAgreementContent; } /** - * @class - * Initializes a new instance of the IntegrationAccountAgreement class. - * @constructor * The integration account agreement. - * - * @member {date} [createdTime] The created time. - * @member {date} [changedTime] The changed time. - * @member {object} [metadata] The metadata. - * @member {string} agreementType The agreement type. Possible values include: - * 'NotSpecified', 'AS2', 'X12', 'Edifact' - * @member {string} hostPartner The integration account partner that is set as - * host partner for this agreement. - * @member {string} guestPartner The integration account partner that is set as - * guest partner for this agreement. - * @member {object} hostIdentity The business identity of the host partner. - * @member {string} [hostIdentity.qualifier] The business identity qualifier - * e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [hostIdentity.value] The user defined business identity - * value. - * @member {object} guestIdentity The business identity of the guest partner. - * @member {string} [guestIdentity.qualifier] The business identity qualifier - * e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [guestIdentity.value] The user defined business identity - * value. - * @member {object} content The agreement content. - * @member {object} [content.aS2] The AS2 agreement content. - * @member {object} [content.aS2.receiveAgreement] The AS2 one-way receive - * agreement. - * @member {object} [content.aS2.receiveAgreement.senderBusinessIdentity] The - * sender business identity - * @member {string} - * [content.aS2.receiveAgreement.senderBusinessIdentity.qualifier] The business - * identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [content.aS2.receiveAgreement.senderBusinessIdentity.value] - * The user defined business identity value. - * @member {object} [content.aS2.receiveAgreement.receiverBusinessIdentity] The - * receiver business identity - * @member {string} - * [content.aS2.receiveAgreement.receiverBusinessIdentity.qualifier] The - * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} - * [content.aS2.receiveAgreement.receiverBusinessIdentity.value] The user - * defined business identity value. - * @member {object} [content.aS2.receiveAgreement.protocolSettings] The AS2 - * protocol settings. - * @member {object} - * [content.aS2.receiveAgreement.protocolSettings.messageConnectionSettings] - * The message connection settings. - * @member {boolean} - * [content.aS2.receiveAgreement.protocolSettings.messageConnectionSettings.ignoreCertificateNameMismatch] - * The value indicating whether to ignore mismatch in certificate name. - * @member {boolean} - * [content.aS2.receiveAgreement.protocolSettings.messageConnectionSettings.supportHttpStatusCodeContinue] - * The value indicating whether to support HTTP status code 'CONTINUE'. - * @member {boolean} - * [content.aS2.receiveAgreement.protocolSettings.messageConnectionSettings.keepHttpConnectionAlive] - * The value indicating whether to keep the connection alive. - * @member {boolean} - * [content.aS2.receiveAgreement.protocolSettings.messageConnectionSettings.unfoldHttpHeaders] - * The value indicating whether to unfold the HTTP headers. - * @member {object} - * [content.aS2.receiveAgreement.protocolSettings.acknowledgementConnectionSettings] - * The acknowledgement connection settings. - * @member {boolean} - * [content.aS2.receiveAgreement.protocolSettings.acknowledgementConnectionSettings.ignoreCertificateNameMismatch] - * The value indicating whether to ignore mismatch in certificate name. - * @member {boolean} - * [content.aS2.receiveAgreement.protocolSettings.acknowledgementConnectionSettings.supportHttpStatusCodeContinue] - * The value indicating whether to support HTTP status code 'CONTINUE'. - * @member {boolean} - * [content.aS2.receiveAgreement.protocolSettings.acknowledgementConnectionSettings.keepHttpConnectionAlive] - * The value indicating whether to keep the connection alive. - * @member {boolean} - * [content.aS2.receiveAgreement.protocolSettings.acknowledgementConnectionSettings.unfoldHttpHeaders] - * The value indicating whether to unfold the HTTP headers. - * @member {object} [content.aS2.receiveAgreement.protocolSettings.mdnSettings] - * The MDN settings. - * @member {boolean} - * [content.aS2.receiveAgreement.protocolSettings.mdnSettings.needMdn] The - * value indicating whether to send or request a MDN. - * @member {boolean} - * [content.aS2.receiveAgreement.protocolSettings.mdnSettings.signMdn] The - * value indicating whether the MDN needs to be signed or not. - * @member {boolean} - * [content.aS2.receiveAgreement.protocolSettings.mdnSettings.sendMdnAsynchronously] - * The value indicating whether to send the asynchronous MDN. - * @member {string} - * [content.aS2.receiveAgreement.protocolSettings.mdnSettings.receiptDeliveryUrl] - * The receipt delivery URL. - * @member {string} - * [content.aS2.receiveAgreement.protocolSettings.mdnSettings.dispositionNotificationTo] - * The disposition notification to header value. - * @member {boolean} - * [content.aS2.receiveAgreement.protocolSettings.mdnSettings.signOutboundMdnIfOptional] - * The value indicating whether to sign the outbound MDN if optional. - * @member {string} - * [content.aS2.receiveAgreement.protocolSettings.mdnSettings.mdnText] The MDN - * text. - * @member {boolean} - * [content.aS2.receiveAgreement.protocolSettings.mdnSettings.sendInboundMdnToMessageBox] - * The value indicating whether to send inbound MDN to message box. - * @member {string} - * [content.aS2.receiveAgreement.protocolSettings.mdnSettings.micHashingAlgorithm] - * The signing or hashing algorithm. Possible values include: 'NotSpecified', - * 'None', 'MD5', 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512' - * @member {object} - * [content.aS2.receiveAgreement.protocolSettings.securitySettings] The - * security settings. - * @member {boolean} - * [content.aS2.receiveAgreement.protocolSettings.securitySettings.overrideGroupSigningCertificate] - * The value indicating whether to send or request a MDN. - * @member {string} - * [content.aS2.receiveAgreement.protocolSettings.securitySettings.signingCertificateName] - * The name of the signing certificate. - * @member {string} - * [content.aS2.receiveAgreement.protocolSettings.securitySettings.encryptionCertificateName] - * The name of the encryption certificate. - * @member {boolean} - * [content.aS2.receiveAgreement.protocolSettings.securitySettings.enableNrrForInboundEncodedMessages] - * The value indicating whether to enable NRR for inbound encoded messages. - * @member {boolean} - * [content.aS2.receiveAgreement.protocolSettings.securitySettings.enableNrrForInboundDecodedMessages] - * The value indicating whether to enable NRR for inbound decoded messages. - * @member {boolean} - * [content.aS2.receiveAgreement.protocolSettings.securitySettings.enableNrrForOutboundMdn] - * The value indicating whether to enable NRR for outbound MDN. - * @member {boolean} - * [content.aS2.receiveAgreement.protocolSettings.securitySettings.enableNrrForOutboundEncodedMessages] - * The value indicating whether to enable NRR for outbound encoded messages. - * @member {boolean} - * [content.aS2.receiveAgreement.protocolSettings.securitySettings.enableNrrForOutboundDecodedMessages] - * The value indicating whether to enable NRR for outbound decoded messages. - * @member {boolean} - * [content.aS2.receiveAgreement.protocolSettings.securitySettings.enableNrrForInboundMdn] - * The value indicating whether to enable NRR for inbound MDN. - * @member {string} - * [content.aS2.receiveAgreement.protocolSettings.securitySettings.sha2AlgorithmFormat] - * The Sha2 algorithm format. Valid values are Sha2, ShaHashSize, - * ShaHyphenHashSize, Sha2UnderscoreHashSize. - * @member {object} - * [content.aS2.receiveAgreement.protocolSettings.validationSettings] The - * validation settings. - * @member {boolean} - * [content.aS2.receiveAgreement.protocolSettings.validationSettings.overrideMessageProperties] - * The value indicating whether to override incoming message properties with - * those in agreement. - * @member {boolean} - * [content.aS2.receiveAgreement.protocolSettings.validationSettings.encryptMessage] - * The value indicating whether the message has to be encrypted. - * @member {boolean} - * [content.aS2.receiveAgreement.protocolSettings.validationSettings.signMessage] - * The value indicating whether the message has to be signed. - * @member {boolean} - * [content.aS2.receiveAgreement.protocolSettings.validationSettings.compressMessage] - * The value indicating whether the message has to be compressed. - * @member {boolean} - * [content.aS2.receiveAgreement.protocolSettings.validationSettings.checkDuplicateMessage] - * The value indicating whether to check for duplicate message. - * @member {number} - * [content.aS2.receiveAgreement.protocolSettings.validationSettings.interchangeDuplicatesValidityDays] - * The number of days to look back for duplicate interchange. - * @member {boolean} - * [content.aS2.receiveAgreement.protocolSettings.validationSettings.checkCertificateRevocationListOnSend] - * The value indicating whether to check for certificate revocation list on - * send. - * @member {boolean} - * [content.aS2.receiveAgreement.protocolSettings.validationSettings.checkCertificateRevocationListOnReceive] - * The value indicating whether to check for certificate revocation list on - * receive. - * @member {string} - * [content.aS2.receiveAgreement.protocolSettings.validationSettings.encryptionAlgorithm] - * The encryption algorithm. Possible values include: 'NotSpecified', 'None', - * 'DES3', 'RC2', 'AES128', 'AES192', 'AES256' - * @member {string} - * [content.aS2.receiveAgreement.protocolSettings.validationSettings.signingAlgorithm] - * The signing algorithm. Possible values include: 'NotSpecified', 'Default', - * 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512' - * @member {object} - * [content.aS2.receiveAgreement.protocolSettings.envelopeSettings] The - * envelope settings. - * @member {string} - * [content.aS2.receiveAgreement.protocolSettings.envelopeSettings.messageContentType] - * The message content type. - * @member {boolean} - * [content.aS2.receiveAgreement.protocolSettings.envelopeSettings.transmitFileNameInMimeHeader] - * The value indicating whether to transmit file name in mime header. - * @member {string} - * [content.aS2.receiveAgreement.protocolSettings.envelopeSettings.fileNameTemplate] - * The template for file name. - * @member {boolean} - * [content.aS2.receiveAgreement.protocolSettings.envelopeSettings.suspendMessageOnFileNameGenerationError] - * The value indicating whether to suspend message on file name generation - * error. - * @member {boolean} - * [content.aS2.receiveAgreement.protocolSettings.envelopeSettings.autogenerateFileName] - * The value indicating whether to auto generate file name. - * @member {object} - * [content.aS2.receiveAgreement.protocolSettings.errorSettings] The error - * settings. - * @member {boolean} - * [content.aS2.receiveAgreement.protocolSettings.errorSettings.suspendDuplicateMessage] - * The value indicating whether to suspend duplicate message. - * @member {boolean} - * [content.aS2.receiveAgreement.protocolSettings.errorSettings.resendIfMdnNotReceived] - * The value indicating whether to resend message If MDN is not received. - * @member {object} [content.aS2.sendAgreement] The AS2 one-way send agreement. - * @member {object} [content.aS2.sendAgreement.senderBusinessIdentity] The - * sender business identity - * @member {string} - * [content.aS2.sendAgreement.senderBusinessIdentity.qualifier] The business - * identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [content.aS2.sendAgreement.senderBusinessIdentity.value] - * The user defined business identity value. - * @member {object} [content.aS2.sendAgreement.receiverBusinessIdentity] The - * receiver business identity - * @member {string} - * [content.aS2.sendAgreement.receiverBusinessIdentity.qualifier] The business - * identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [content.aS2.sendAgreement.receiverBusinessIdentity.value] - * The user defined business identity value. - * @member {object} [content.aS2.sendAgreement.protocolSettings] The AS2 - * protocol settings. - * @member {object} - * [content.aS2.sendAgreement.protocolSettings.messageConnectionSettings] The - * message connection settings. - * @member {boolean} - * [content.aS2.sendAgreement.protocolSettings.messageConnectionSettings.ignoreCertificateNameMismatch] - * The value indicating whether to ignore mismatch in certificate name. - * @member {boolean} - * [content.aS2.sendAgreement.protocolSettings.messageConnectionSettings.supportHttpStatusCodeContinue] - * The value indicating whether to support HTTP status code 'CONTINUE'. - * @member {boolean} - * [content.aS2.sendAgreement.protocolSettings.messageConnectionSettings.keepHttpConnectionAlive] - * The value indicating whether to keep the connection alive. - * @member {boolean} - * [content.aS2.sendAgreement.protocolSettings.messageConnectionSettings.unfoldHttpHeaders] - * The value indicating whether to unfold the HTTP headers. - * @member {object} - * [content.aS2.sendAgreement.protocolSettings.acknowledgementConnectionSettings] - * The acknowledgement connection settings. - * @member {boolean} - * [content.aS2.sendAgreement.protocolSettings.acknowledgementConnectionSettings.ignoreCertificateNameMismatch] - * The value indicating whether to ignore mismatch in certificate name. - * @member {boolean} - * [content.aS2.sendAgreement.protocolSettings.acknowledgementConnectionSettings.supportHttpStatusCodeContinue] - * The value indicating whether to support HTTP status code 'CONTINUE'. - * @member {boolean} - * [content.aS2.sendAgreement.protocolSettings.acknowledgementConnectionSettings.keepHttpConnectionAlive] - * The value indicating whether to keep the connection alive. - * @member {boolean} - * [content.aS2.sendAgreement.protocolSettings.acknowledgementConnectionSettings.unfoldHttpHeaders] - * The value indicating whether to unfold the HTTP headers. - * @member {object} [content.aS2.sendAgreement.protocolSettings.mdnSettings] - * The MDN settings. - * @member {boolean} - * [content.aS2.sendAgreement.protocolSettings.mdnSettings.needMdn] The value - * indicating whether to send or request a MDN. - * @member {boolean} - * [content.aS2.sendAgreement.protocolSettings.mdnSettings.signMdn] The value - * indicating whether the MDN needs to be signed or not. - * @member {boolean} - * [content.aS2.sendAgreement.protocolSettings.mdnSettings.sendMdnAsynchronously] - * The value indicating whether to send the asynchronous MDN. - * @member {string} - * [content.aS2.sendAgreement.protocolSettings.mdnSettings.receiptDeliveryUrl] - * The receipt delivery URL. - * @member {string} - * [content.aS2.sendAgreement.protocolSettings.mdnSettings.dispositionNotificationTo] - * The disposition notification to header value. - * @member {boolean} - * [content.aS2.sendAgreement.protocolSettings.mdnSettings.signOutboundMdnIfOptional] - * The value indicating whether to sign the outbound MDN if optional. - * @member {string} - * [content.aS2.sendAgreement.protocolSettings.mdnSettings.mdnText] The MDN - * text. - * @member {boolean} - * [content.aS2.sendAgreement.protocolSettings.mdnSettings.sendInboundMdnToMessageBox] - * The value indicating whether to send inbound MDN to message box. - * @member {string} - * [content.aS2.sendAgreement.protocolSettings.mdnSettings.micHashingAlgorithm] - * The signing or hashing algorithm. Possible values include: 'NotSpecified', - * 'None', 'MD5', 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512' - * @member {object} - * [content.aS2.sendAgreement.protocolSettings.securitySettings] The security - * settings. - * @member {boolean} - * [content.aS2.sendAgreement.protocolSettings.securitySettings.overrideGroupSigningCertificate] - * The value indicating whether to send or request a MDN. - * @member {string} - * [content.aS2.sendAgreement.protocolSettings.securitySettings.signingCertificateName] - * The name of the signing certificate. - * @member {string} - * [content.aS2.sendAgreement.protocolSettings.securitySettings.encryptionCertificateName] - * The name of the encryption certificate. - * @member {boolean} - * [content.aS2.sendAgreement.protocolSettings.securitySettings.enableNrrForInboundEncodedMessages] - * The value indicating whether to enable NRR for inbound encoded messages. - * @member {boolean} - * [content.aS2.sendAgreement.protocolSettings.securitySettings.enableNrrForInboundDecodedMessages] - * The value indicating whether to enable NRR for inbound decoded messages. - * @member {boolean} - * [content.aS2.sendAgreement.protocolSettings.securitySettings.enableNrrForOutboundMdn] - * The value indicating whether to enable NRR for outbound MDN. - * @member {boolean} - * [content.aS2.sendAgreement.protocolSettings.securitySettings.enableNrrForOutboundEncodedMessages] - * The value indicating whether to enable NRR for outbound encoded messages. - * @member {boolean} - * [content.aS2.sendAgreement.protocolSettings.securitySettings.enableNrrForOutboundDecodedMessages] - * The value indicating whether to enable NRR for outbound decoded messages. - * @member {boolean} - * [content.aS2.sendAgreement.protocolSettings.securitySettings.enableNrrForInboundMdn] - * The value indicating whether to enable NRR for inbound MDN. - * @member {string} - * [content.aS2.sendAgreement.protocolSettings.securitySettings.sha2AlgorithmFormat] - * The Sha2 algorithm format. Valid values are Sha2, ShaHashSize, - * ShaHyphenHashSize, Sha2UnderscoreHashSize. - * @member {object} - * [content.aS2.sendAgreement.protocolSettings.validationSettings] The - * validation settings. - * @member {boolean} - * [content.aS2.sendAgreement.protocolSettings.validationSettings.overrideMessageProperties] - * The value indicating whether to override incoming message properties with - * those in agreement. - * @member {boolean} - * [content.aS2.sendAgreement.protocolSettings.validationSettings.encryptMessage] - * The value indicating whether the message has to be encrypted. - * @member {boolean} - * [content.aS2.sendAgreement.protocolSettings.validationSettings.signMessage] - * The value indicating whether the message has to be signed. - * @member {boolean} - * [content.aS2.sendAgreement.protocolSettings.validationSettings.compressMessage] - * The value indicating whether the message has to be compressed. - * @member {boolean} - * [content.aS2.sendAgreement.protocolSettings.validationSettings.checkDuplicateMessage] - * The value indicating whether to check for duplicate message. - * @member {number} - * [content.aS2.sendAgreement.protocolSettings.validationSettings.interchangeDuplicatesValidityDays] - * The number of days to look back for duplicate interchange. - * @member {boolean} - * [content.aS2.sendAgreement.protocolSettings.validationSettings.checkCertificateRevocationListOnSend] - * The value indicating whether to check for certificate revocation list on - * send. - * @member {boolean} - * [content.aS2.sendAgreement.protocolSettings.validationSettings.checkCertificateRevocationListOnReceive] - * The value indicating whether to check for certificate revocation list on - * receive. - * @member {string} - * [content.aS2.sendAgreement.protocolSettings.validationSettings.encryptionAlgorithm] - * The encryption algorithm. Possible values include: 'NotSpecified', 'None', - * 'DES3', 'RC2', 'AES128', 'AES192', 'AES256' - * @member {string} - * [content.aS2.sendAgreement.protocolSettings.validationSettings.signingAlgorithm] - * The signing algorithm. Possible values include: 'NotSpecified', 'Default', - * 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512' - * @member {object} - * [content.aS2.sendAgreement.protocolSettings.envelopeSettings] The envelope - * settings. - * @member {string} - * [content.aS2.sendAgreement.protocolSettings.envelopeSettings.messageContentType] - * The message content type. - * @member {boolean} - * [content.aS2.sendAgreement.protocolSettings.envelopeSettings.transmitFileNameInMimeHeader] - * The value indicating whether to transmit file name in mime header. - * @member {string} - * [content.aS2.sendAgreement.protocolSettings.envelopeSettings.fileNameTemplate] - * The template for file name. - * @member {boolean} - * [content.aS2.sendAgreement.protocolSettings.envelopeSettings.suspendMessageOnFileNameGenerationError] - * The value indicating whether to suspend message on file name generation - * error. - * @member {boolean} - * [content.aS2.sendAgreement.protocolSettings.envelopeSettings.autogenerateFileName] - * The value indicating whether to auto generate file name. - * @member {object} [content.aS2.sendAgreement.protocolSettings.errorSettings] - * The error settings. - * @member {boolean} - * [content.aS2.sendAgreement.protocolSettings.errorSettings.suspendDuplicateMessage] - * The value indicating whether to suspend duplicate message. - * @member {boolean} - * [content.aS2.sendAgreement.protocolSettings.errorSettings.resendIfMdnNotReceived] - * The value indicating whether to resend message If MDN is not received. - * @member {object} [content.x12] The X12 agreement content. - * @member {object} [content.x12.receiveAgreement] The X12 one-way receive - * agreement. - * @member {object} [content.x12.receiveAgreement.senderBusinessIdentity] The - * sender business identity - * @member {string} - * [content.x12.receiveAgreement.senderBusinessIdentity.qualifier] The business - * identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [content.x12.receiveAgreement.senderBusinessIdentity.value] - * The user defined business identity value. - * @member {object} [content.x12.receiveAgreement.receiverBusinessIdentity] The - * receiver business identity - * @member {string} - * [content.x12.receiveAgreement.receiverBusinessIdentity.qualifier] The - * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} - * [content.x12.receiveAgreement.receiverBusinessIdentity.value] The user - * defined business identity value. - * @member {object} [content.x12.receiveAgreement.protocolSettings] The X12 - * protocol settings. - * @member {object} - * [content.x12.receiveAgreement.protocolSettings.validationSettings] The X12 - * validation settings. - * @member {boolean} - * [content.x12.receiveAgreement.protocolSettings.validationSettings.validateCharacterSet] - * The value indicating whether to validate character set in the message. - * @member {boolean} - * [content.x12.receiveAgreement.protocolSettings.validationSettings.checkDuplicateInterchangeControlNumber] - * The value indicating whether to check for duplicate interchange control - * number. - * @member {number} - * [content.x12.receiveAgreement.protocolSettings.validationSettings.interchangeControlNumberValidityDays] - * The validity period of interchange control number. - * @member {boolean} - * [content.x12.receiveAgreement.protocolSettings.validationSettings.checkDuplicateGroupControlNumber] - * The value indicating whether to check for duplicate group control number. - * @member {boolean} - * [content.x12.receiveAgreement.protocolSettings.validationSettings.checkDuplicateTransactionSetControlNumber] - * The value indicating whether to check for duplicate transaction set control - * number. - * @member {boolean} - * [content.x12.receiveAgreement.protocolSettings.validationSettings.validateEdiTypes] - * The value indicating whether to Whether to validate EDI types. - * @member {boolean} - * [content.x12.receiveAgreement.protocolSettings.validationSettings.validateXsdTypes] - * The value indicating whether to Whether to validate XSD types. - * @member {boolean} - * [content.x12.receiveAgreement.protocolSettings.validationSettings.allowLeadingAndTrailingSpacesAndZeroes] - * The value indicating whether to allow leading and trailing spaces and - * zeroes. - * @member {boolean} - * [content.x12.receiveAgreement.protocolSettings.validationSettings.trimLeadingAndTrailingSpacesAndZeroes] - * The value indicating whether to trim leading and trailing spaces and zeroes. - * @member {string} - * [content.x12.receiveAgreement.protocolSettings.validationSettings.trailingSeparatorPolicy] - * The trailing separator policy. Possible values include: 'NotSpecified', - * 'NotAllowed', 'Optional', 'Mandatory' - * @member {object} - * [content.x12.receiveAgreement.protocolSettings.framingSettings] The X12 - * framing settings. - * @member {number} - * [content.x12.receiveAgreement.protocolSettings.framingSettings.dataElementSeparator] - * The data element separator. - * @member {number} - * [content.x12.receiveAgreement.protocolSettings.framingSettings.componentSeparator] - * The component separator. - * @member {boolean} - * [content.x12.receiveAgreement.protocolSettings.framingSettings.replaceSeparatorsInPayload] - * The value indicating whether to replace separators in payload. - * @member {number} - * [content.x12.receiveAgreement.protocolSettings.framingSettings.replaceCharacter] - * The replacement character. - * @member {number} - * [content.x12.receiveAgreement.protocolSettings.framingSettings.segmentTerminator] - * The segment terminator. - * @member {string} - * [content.x12.receiveAgreement.protocolSettings.framingSettings.characterSet] - * The X12 character set. Possible values include: 'NotSpecified', 'Basic', - * 'Extended', 'UTF8' - * @member {string} - * [content.x12.receiveAgreement.protocolSettings.framingSettings.segmentTerminatorSuffix] - * The segment terminator suffix. Possible values include: 'NotSpecified', - * 'None', 'CR', 'LF', 'CRLF' - * @member {object} - * [content.x12.receiveAgreement.protocolSettings.envelopeSettings] The X12 - * envelope settings. - * @member {number} - * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.controlStandardsId] - * The controls standards id. - * @member {boolean} - * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.useControlStandardsIdAsRepetitionCharacter] - * The value indicating whether to use control standards id as repetition - * character. - * @member {string} - * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.senderApplicationId] - * The sender application id. - * @member {string} - * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.receiverApplicationId] - * The receiver application id. - * @member {string} - * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.controlVersionNumber] - * The control version number. - * @member {number} - * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.interchangeControlNumberLowerBound] - * The interchange control number lower bound. - * @member {number} - * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.interchangeControlNumberUpperBound] - * The interchange control number upper bound. - * @member {boolean} - * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.rolloverInterchangeControlNumber] - * The value indicating whether to rollover interchange control number. - * @member {boolean} - * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.enableDefaultGroupHeaders] - * The value indicating whether to enable default group headers. - * @member {string} - * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.functionalGroupId] - * The functional group id. - * @member {number} - * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.groupControlNumberLowerBound] - * The group control number lower bound. - * @member {number} - * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.groupControlNumberUpperBound] - * The group control number upper bound. - * @member {boolean} - * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.rolloverGroupControlNumber] - * The value indicating whether to rollover group control number. - * @member {string} - * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.groupHeaderAgencyCode] - * The group header agency code. - * @member {string} - * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.groupHeaderVersion] - * The group header version. - * @member {number} - * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberLowerBound] - * The transaction set control number lower bound. - * @member {number} - * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberUpperBound] - * The transaction set control number upper bound. - * @member {boolean} - * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.rolloverTransactionSetControlNumber] - * The value indicating whether to rollover transaction set control number. - * @member {string} - * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberPrefix] - * The transaction set control number prefix. - * @member {string} - * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberSuffix] - * The transaction set control number suffix. - * @member {boolean} - * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.overwriteExistingTransactionSetControlNumber] - * The value indicating whether to overwrite existing transaction set control - * number. - * @member {string} - * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.groupHeaderDateFormat] - * The group header date format. Possible values include: 'NotSpecified', - * 'CCYYMMDD', 'YYMMDD' - * @member {string} - * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.groupHeaderTimeFormat] - * The group header time format. Possible values include: 'NotSpecified', - * 'HHMM', 'HHMMSS', 'HHMMSSdd', 'HHMMSSd' - * @member {string} - * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.usageIndicator] - * The usage indicator. Possible values include: 'NotSpecified', 'Test', - * 'Information', 'Production' - * @member {object} - * [content.x12.receiveAgreement.protocolSettings.acknowledgementSettings] The - * X12 acknowledgment settings. - * @member {boolean} - * [content.x12.receiveAgreement.protocolSettings.acknowledgementSettings.needTechnicalAcknowledgement] - * The value indicating whether technical acknowledgement is needed. - * @member {boolean} - * [content.x12.receiveAgreement.protocolSettings.acknowledgementSettings.batchTechnicalAcknowledgements] - * The value indicating whether to batch the technical acknowledgements. - * @member {boolean} - * [content.x12.receiveAgreement.protocolSettings.acknowledgementSettings.needFunctionalAcknowledgement] - * The value indicating whether functional acknowledgement is needed. - * @member {string} - * [content.x12.receiveAgreement.protocolSettings.acknowledgementSettings.functionalAcknowledgementVersion] - * The functional acknowledgement version. - * @member {boolean} - * [content.x12.receiveAgreement.protocolSettings.acknowledgementSettings.batchFunctionalAcknowledgements] - * The value indicating whether to batch functional acknowledgements. - * @member {boolean} - * [content.x12.receiveAgreement.protocolSettings.acknowledgementSettings.needImplementationAcknowledgement] - * The value indicating whether implementation acknowledgement is needed. - * @member {string} - * [content.x12.receiveAgreement.protocolSettings.acknowledgementSettings.implementationAcknowledgementVersion] - * The implementation acknowledgement version. - * @member {boolean} - * [content.x12.receiveAgreement.protocolSettings.acknowledgementSettings.batchImplementationAcknowledgements] - * The value indicating whether to batch implementation acknowledgements. - * @member {boolean} - * [content.x12.receiveAgreement.protocolSettings.acknowledgementSettings.needLoopForValidMessages] - * The value indicating whether a loop is needed for valid messages. - * @member {boolean} - * [content.x12.receiveAgreement.protocolSettings.acknowledgementSettings.sendSynchronousAcknowledgement] - * The value indicating whether to send synchronous acknowledgement. - * @member {string} - * [content.x12.receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberPrefix] - * The acknowledgement control number prefix. - * @member {string} - * [content.x12.receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberSuffix] - * The acknowledgement control number suffix. - * @member {number} - * [content.x12.receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberLowerBound] - * The acknowledgement control number lower bound. - * @member {number} - * [content.x12.receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberUpperBound] - * The acknowledgement control number upper bound. - * @member {boolean} - * [content.x12.receiveAgreement.protocolSettings.acknowledgementSettings.rolloverAcknowledgementControlNumber] - * The value indicating whether to rollover acknowledgement control number. - * @member {object} - * [content.x12.receiveAgreement.protocolSettings.messageFilter] The X12 - * message filter. - * @member {string} - * [content.x12.receiveAgreement.protocolSettings.messageFilter.messageFilterType] - * The message filter type. Possible values include: 'NotSpecified', 'Include', - * 'Exclude' - * @member {object} - * [content.x12.receiveAgreement.protocolSettings.securitySettings] The X12 - * security settings. - * @member {string} - * [content.x12.receiveAgreement.protocolSettings.securitySettings.authorizationQualifier] - * The authorization qualifier. - * @member {string} - * [content.x12.receiveAgreement.protocolSettings.securitySettings.authorizationValue] - * The authorization value. - * @member {string} - * [content.x12.receiveAgreement.protocolSettings.securitySettings.securityQualifier] - * The security qualifier. - * @member {string} - * [content.x12.receiveAgreement.protocolSettings.securitySettings.passwordValue] - * The password value. - * @member {object} - * [content.x12.receiveAgreement.protocolSettings.processingSettings] The X12 - * processing settings. - * @member {boolean} - * [content.x12.receiveAgreement.protocolSettings.processingSettings.maskSecurityInfo] - * The value indicating whether to mask security information. - * @member {boolean} - * [content.x12.receiveAgreement.protocolSettings.processingSettings.convertImpliedDecimal] - * The value indicating whether to convert numerical type to implied decimal. - * @member {boolean} - * [content.x12.receiveAgreement.protocolSettings.processingSettings.preserveInterchange] - * The value indicating whether to preserve interchange. - * @member {boolean} - * [content.x12.receiveAgreement.protocolSettings.processingSettings.suspendInterchangeOnError] - * The value indicating whether to suspend interchange on error. - * @member {boolean} - * [content.x12.receiveAgreement.protocolSettings.processingSettings.createEmptyXmlTagsForTrailingSeparators] - * The value indicating whether to create empty xml tags for trailing - * separators. - * @member {boolean} - * [content.x12.receiveAgreement.protocolSettings.processingSettings.useDotAsDecimalSeparator] - * The value indicating whether to use dot as decimal separator. - * @member {array} - * [content.x12.receiveAgreement.protocolSettings.envelopeOverrides] The X12 - * envelope override settings. - * @member {array} - * [content.x12.receiveAgreement.protocolSettings.validationOverrides] The X12 - * validation override settings. - * @member {array} - * [content.x12.receiveAgreement.protocolSettings.messageFilterList] The X12 - * message filter list. - * @member {array} - * [content.x12.receiveAgreement.protocolSettings.schemaReferences] The X12 - * schema references. - * @member {array} - * [content.x12.receiveAgreement.protocolSettings.x12DelimiterOverrides] The - * X12 delimiter override settings. - * @member {object} [content.x12.sendAgreement] The X12 one-way send agreement. - * @member {object} [content.x12.sendAgreement.senderBusinessIdentity] The - * sender business identity - * @member {string} - * [content.x12.sendAgreement.senderBusinessIdentity.qualifier] The business - * identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [content.x12.sendAgreement.senderBusinessIdentity.value] - * The user defined business identity value. - * @member {object} [content.x12.sendAgreement.receiverBusinessIdentity] The - * receiver business identity - * @member {string} - * [content.x12.sendAgreement.receiverBusinessIdentity.qualifier] The business - * identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [content.x12.sendAgreement.receiverBusinessIdentity.value] - * The user defined business identity value. - * @member {object} [content.x12.sendAgreement.protocolSettings] The X12 - * protocol settings. - * @member {object} - * [content.x12.sendAgreement.protocolSettings.validationSettings] The X12 - * validation settings. - * @member {boolean} - * [content.x12.sendAgreement.protocolSettings.validationSettings.validateCharacterSet] - * The value indicating whether to validate character set in the message. - * @member {boolean} - * [content.x12.sendAgreement.protocolSettings.validationSettings.checkDuplicateInterchangeControlNumber] - * The value indicating whether to check for duplicate interchange control - * number. - * @member {number} - * [content.x12.sendAgreement.protocolSettings.validationSettings.interchangeControlNumberValidityDays] - * The validity period of interchange control number. - * @member {boolean} - * [content.x12.sendAgreement.protocolSettings.validationSettings.checkDuplicateGroupControlNumber] - * The value indicating whether to check for duplicate group control number. - * @member {boolean} - * [content.x12.sendAgreement.protocolSettings.validationSettings.checkDuplicateTransactionSetControlNumber] - * The value indicating whether to check for duplicate transaction set control - * number. - * @member {boolean} - * [content.x12.sendAgreement.protocolSettings.validationSettings.validateEdiTypes] - * The value indicating whether to Whether to validate EDI types. - * @member {boolean} - * [content.x12.sendAgreement.protocolSettings.validationSettings.validateXsdTypes] - * The value indicating whether to Whether to validate XSD types. - * @member {boolean} - * [content.x12.sendAgreement.protocolSettings.validationSettings.allowLeadingAndTrailingSpacesAndZeroes] - * The value indicating whether to allow leading and trailing spaces and - * zeroes. - * @member {boolean} - * [content.x12.sendAgreement.protocolSettings.validationSettings.trimLeadingAndTrailingSpacesAndZeroes] - * The value indicating whether to trim leading and trailing spaces and zeroes. - * @member {string} - * [content.x12.sendAgreement.protocolSettings.validationSettings.trailingSeparatorPolicy] - * The trailing separator policy. Possible values include: 'NotSpecified', - * 'NotAllowed', 'Optional', 'Mandatory' - * @member {object} - * [content.x12.sendAgreement.protocolSettings.framingSettings] The X12 framing - * settings. - * @member {number} - * [content.x12.sendAgreement.protocolSettings.framingSettings.dataElementSeparator] - * The data element separator. - * @member {number} - * [content.x12.sendAgreement.protocolSettings.framingSettings.componentSeparator] - * The component separator. - * @member {boolean} - * [content.x12.sendAgreement.protocolSettings.framingSettings.replaceSeparatorsInPayload] - * The value indicating whether to replace separators in payload. - * @member {number} - * [content.x12.sendAgreement.protocolSettings.framingSettings.replaceCharacter] - * The replacement character. - * @member {number} - * [content.x12.sendAgreement.protocolSettings.framingSettings.segmentTerminator] - * The segment terminator. - * @member {string} - * [content.x12.sendAgreement.protocolSettings.framingSettings.characterSet] - * The X12 character set. Possible values include: 'NotSpecified', 'Basic', - * 'Extended', 'UTF8' - * @member {string} - * [content.x12.sendAgreement.protocolSettings.framingSettings.segmentTerminatorSuffix] - * The segment terminator suffix. Possible values include: 'NotSpecified', - * 'None', 'CR', 'LF', 'CRLF' - * @member {object} - * [content.x12.sendAgreement.protocolSettings.envelopeSettings] The X12 - * envelope settings. - * @member {number} - * [content.x12.sendAgreement.protocolSettings.envelopeSettings.controlStandardsId] - * The controls standards id. - * @member {boolean} - * [content.x12.sendAgreement.protocolSettings.envelopeSettings.useControlStandardsIdAsRepetitionCharacter] - * The value indicating whether to use control standards id as repetition - * character. - * @member {string} - * [content.x12.sendAgreement.protocolSettings.envelopeSettings.senderApplicationId] - * The sender application id. - * @member {string} - * [content.x12.sendAgreement.protocolSettings.envelopeSettings.receiverApplicationId] - * The receiver application id. - * @member {string} - * [content.x12.sendAgreement.protocolSettings.envelopeSettings.controlVersionNumber] - * The control version number. - * @member {number} - * [content.x12.sendAgreement.protocolSettings.envelopeSettings.interchangeControlNumberLowerBound] - * The interchange control number lower bound. - * @member {number} - * [content.x12.sendAgreement.protocolSettings.envelopeSettings.interchangeControlNumberUpperBound] - * The interchange control number upper bound. - * @member {boolean} - * [content.x12.sendAgreement.protocolSettings.envelopeSettings.rolloverInterchangeControlNumber] - * The value indicating whether to rollover interchange control number. - * @member {boolean} - * [content.x12.sendAgreement.protocolSettings.envelopeSettings.enableDefaultGroupHeaders] - * The value indicating whether to enable default group headers. - * @member {string} - * [content.x12.sendAgreement.protocolSettings.envelopeSettings.functionalGroupId] - * The functional group id. - * @member {number} - * [content.x12.sendAgreement.protocolSettings.envelopeSettings.groupControlNumberLowerBound] - * The group control number lower bound. - * @member {number} - * [content.x12.sendAgreement.protocolSettings.envelopeSettings.groupControlNumberUpperBound] - * The group control number upper bound. - * @member {boolean} - * [content.x12.sendAgreement.protocolSettings.envelopeSettings.rolloverGroupControlNumber] - * The value indicating whether to rollover group control number. - * @member {string} - * [content.x12.sendAgreement.protocolSettings.envelopeSettings.groupHeaderAgencyCode] - * The group header agency code. - * @member {string} - * [content.x12.sendAgreement.protocolSettings.envelopeSettings.groupHeaderVersion] - * The group header version. - * @member {number} - * [content.x12.sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberLowerBound] - * The transaction set control number lower bound. - * @member {number} - * [content.x12.sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberUpperBound] - * The transaction set control number upper bound. - * @member {boolean} - * [content.x12.sendAgreement.protocolSettings.envelopeSettings.rolloverTransactionSetControlNumber] - * The value indicating whether to rollover transaction set control number. - * @member {string} - * [content.x12.sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberPrefix] - * The transaction set control number prefix. - * @member {string} - * [content.x12.sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberSuffix] - * The transaction set control number suffix. - * @member {boolean} - * [content.x12.sendAgreement.protocolSettings.envelopeSettings.overwriteExistingTransactionSetControlNumber] - * The value indicating whether to overwrite existing transaction set control - * number. - * @member {string} - * [content.x12.sendAgreement.protocolSettings.envelopeSettings.groupHeaderDateFormat] - * The group header date format. Possible values include: 'NotSpecified', - * 'CCYYMMDD', 'YYMMDD' - * @member {string} - * [content.x12.sendAgreement.protocolSettings.envelopeSettings.groupHeaderTimeFormat] - * The group header time format. Possible values include: 'NotSpecified', - * 'HHMM', 'HHMMSS', 'HHMMSSdd', 'HHMMSSd' - * @member {string} - * [content.x12.sendAgreement.protocolSettings.envelopeSettings.usageIndicator] - * The usage indicator. Possible values include: 'NotSpecified', 'Test', - * 'Information', 'Production' - * @member {object} - * [content.x12.sendAgreement.protocolSettings.acknowledgementSettings] The X12 - * acknowledgment settings. - * @member {boolean} - * [content.x12.sendAgreement.protocolSettings.acknowledgementSettings.needTechnicalAcknowledgement] - * The value indicating whether technical acknowledgement is needed. - * @member {boolean} - * [content.x12.sendAgreement.protocolSettings.acknowledgementSettings.batchTechnicalAcknowledgements] - * The value indicating whether to batch the technical acknowledgements. - * @member {boolean} - * [content.x12.sendAgreement.protocolSettings.acknowledgementSettings.needFunctionalAcknowledgement] - * The value indicating whether functional acknowledgement is needed. - * @member {string} - * [content.x12.sendAgreement.protocolSettings.acknowledgementSettings.functionalAcknowledgementVersion] - * The functional acknowledgement version. - * @member {boolean} - * [content.x12.sendAgreement.protocolSettings.acknowledgementSettings.batchFunctionalAcknowledgements] - * The value indicating whether to batch functional acknowledgements. - * @member {boolean} - * [content.x12.sendAgreement.protocolSettings.acknowledgementSettings.needImplementationAcknowledgement] - * The value indicating whether implementation acknowledgement is needed. - * @member {string} - * [content.x12.sendAgreement.protocolSettings.acknowledgementSettings.implementationAcknowledgementVersion] - * The implementation acknowledgement version. - * @member {boolean} - * [content.x12.sendAgreement.protocolSettings.acknowledgementSettings.batchImplementationAcknowledgements] - * The value indicating whether to batch implementation acknowledgements. - * @member {boolean} - * [content.x12.sendAgreement.protocolSettings.acknowledgementSettings.needLoopForValidMessages] - * The value indicating whether a loop is needed for valid messages. - * @member {boolean} - * [content.x12.sendAgreement.protocolSettings.acknowledgementSettings.sendSynchronousAcknowledgement] - * The value indicating whether to send synchronous acknowledgement. - * @member {string} - * [content.x12.sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberPrefix] - * The acknowledgement control number prefix. - * @member {string} - * [content.x12.sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberSuffix] - * The acknowledgement control number suffix. - * @member {number} - * [content.x12.sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberLowerBound] - * The acknowledgement control number lower bound. - * @member {number} - * [content.x12.sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberUpperBound] - * The acknowledgement control number upper bound. - * @member {boolean} - * [content.x12.sendAgreement.protocolSettings.acknowledgementSettings.rolloverAcknowledgementControlNumber] - * The value indicating whether to rollover acknowledgement control number. - * @member {object} [content.x12.sendAgreement.protocolSettings.messageFilter] - * The X12 message filter. - * @member {string} - * [content.x12.sendAgreement.protocolSettings.messageFilter.messageFilterType] - * The message filter type. Possible values include: 'NotSpecified', 'Include', - * 'Exclude' - * @member {object} - * [content.x12.sendAgreement.protocolSettings.securitySettings] The X12 - * security settings. - * @member {string} - * [content.x12.sendAgreement.protocolSettings.securitySettings.authorizationQualifier] - * The authorization qualifier. - * @member {string} - * [content.x12.sendAgreement.protocolSettings.securitySettings.authorizationValue] - * The authorization value. - * @member {string} - * [content.x12.sendAgreement.protocolSettings.securitySettings.securityQualifier] - * The security qualifier. - * @member {string} - * [content.x12.sendAgreement.protocolSettings.securitySettings.passwordValue] - * The password value. - * @member {object} - * [content.x12.sendAgreement.protocolSettings.processingSettings] The X12 - * processing settings. - * @member {boolean} - * [content.x12.sendAgreement.protocolSettings.processingSettings.maskSecurityInfo] - * The value indicating whether to mask security information. - * @member {boolean} - * [content.x12.sendAgreement.protocolSettings.processingSettings.convertImpliedDecimal] - * The value indicating whether to convert numerical type to implied decimal. - * @member {boolean} - * [content.x12.sendAgreement.protocolSettings.processingSettings.preserveInterchange] - * The value indicating whether to preserve interchange. - * @member {boolean} - * [content.x12.sendAgreement.protocolSettings.processingSettings.suspendInterchangeOnError] - * The value indicating whether to suspend interchange on error. - * @member {boolean} - * [content.x12.sendAgreement.protocolSettings.processingSettings.createEmptyXmlTagsForTrailingSeparators] - * The value indicating whether to create empty xml tags for trailing - * separators. - * @member {boolean} - * [content.x12.sendAgreement.protocolSettings.processingSettings.useDotAsDecimalSeparator] - * The value indicating whether to use dot as decimal separator. - * @member {array} - * [content.x12.sendAgreement.protocolSettings.envelopeOverrides] The X12 - * envelope override settings. - * @member {array} - * [content.x12.sendAgreement.protocolSettings.validationOverrides] The X12 - * validation override settings. - * @member {array} - * [content.x12.sendAgreement.protocolSettings.messageFilterList] The X12 - * message filter list. - * @member {array} - * [content.x12.sendAgreement.protocolSettings.schemaReferences] The X12 schema - * references. - * @member {array} - * [content.x12.sendAgreement.protocolSettings.x12DelimiterOverrides] The X12 - * delimiter override settings. - * @member {object} [content.edifact] The EDIFACT agreement content. - * @member {object} [content.edifact.receiveAgreement] The EDIFACT one-way - * receive agreement. - * @member {object} [content.edifact.receiveAgreement.senderBusinessIdentity] - * The sender business identity - * @member {string} - * [content.edifact.receiveAgreement.senderBusinessIdentity.qualifier] The - * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} - * [content.edifact.receiveAgreement.senderBusinessIdentity.value] The user - * defined business identity value. - * @member {object} [content.edifact.receiveAgreement.receiverBusinessIdentity] - * The receiver business identity - * @member {string} - * [content.edifact.receiveAgreement.receiverBusinessIdentity.qualifier] The - * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} - * [content.edifact.receiveAgreement.receiverBusinessIdentity.value] The user - * defined business identity value. - * @member {object} [content.edifact.receiveAgreement.protocolSettings] The - * EDIFACT protocol settings. - * @member {object} - * [content.edifact.receiveAgreement.protocolSettings.validationSettings] The - * EDIFACT validation settings. - * @member {boolean} - * [content.edifact.receiveAgreement.protocolSettings.validationSettings.validateCharacterSet] - * The value indicating whether to validate character set in the message. - * @member {boolean} - * [content.edifact.receiveAgreement.protocolSettings.validationSettings.checkDuplicateInterchangeControlNumber] - * The value indicating whether to check for duplicate interchange control - * number. - * @member {number} - * [content.edifact.receiveAgreement.protocolSettings.validationSettings.interchangeControlNumberValidityDays] - * The validity period of interchange control number. - * @member {boolean} - * [content.edifact.receiveAgreement.protocolSettings.validationSettings.checkDuplicateGroupControlNumber] - * The value indicating whether to check for duplicate group control number. - * @member {boolean} - * [content.edifact.receiveAgreement.protocolSettings.validationSettings.checkDuplicateTransactionSetControlNumber] - * The value indicating whether to check for duplicate transaction set control - * number. - * @member {boolean} - * [content.edifact.receiveAgreement.protocolSettings.validationSettings.validateEdiTypes] - * The value indicating whether to Whether to validate EDI types. - * @member {boolean} - * [content.edifact.receiveAgreement.protocolSettings.validationSettings.validateXsdTypes] - * The value indicating whether to Whether to validate XSD types. - * @member {boolean} - * [content.edifact.receiveAgreement.protocolSettings.validationSettings.allowLeadingAndTrailingSpacesAndZeroes] - * The value indicating whether to allow leading and trailing spaces and - * zeroes. - * @member {boolean} - * [content.edifact.receiveAgreement.protocolSettings.validationSettings.trimLeadingAndTrailingSpacesAndZeroes] - * The value indicating whether to trim leading and trailing spaces and zeroes. - * @member {string} - * [content.edifact.receiveAgreement.protocolSettings.validationSettings.trailingSeparatorPolicy] - * The trailing separator policy. Possible values include: 'NotSpecified', - * 'NotAllowed', 'Optional', 'Mandatory' - * @member {object} - * [content.edifact.receiveAgreement.protocolSettings.framingSettings] The - * EDIFACT framing settings. - * @member {string} - * [content.edifact.receiveAgreement.protocolSettings.framingSettings.serviceCodeListDirectoryVersion] - * The service code list directory version. - * @member {string} - * [content.edifact.receiveAgreement.protocolSettings.framingSettings.characterEncoding] - * The character encoding. - * @member {number} - * [content.edifact.receiveAgreement.protocolSettings.framingSettings.protocolVersion] - * The protocol version. - * @member {number} - * [content.edifact.receiveAgreement.protocolSettings.framingSettings.dataElementSeparator] - * The data element separator. - * @member {number} - * [content.edifact.receiveAgreement.protocolSettings.framingSettings.componentSeparator] - * The component separator. - * @member {number} - * [content.edifact.receiveAgreement.protocolSettings.framingSettings.segmentTerminator] - * The segment terminator. - * @member {number} - * [content.edifact.receiveAgreement.protocolSettings.framingSettings.releaseIndicator] - * The release indicator. - * @member {number} - * [content.edifact.receiveAgreement.protocolSettings.framingSettings.repetitionSeparator] - * The repetition separator. - * @member {string} - * [content.edifact.receiveAgreement.protocolSettings.framingSettings.characterSet] - * The EDIFACT frame setting characterSet. Possible values include: - * 'NotSpecified', 'UNOB', 'UNOA', 'UNOC', 'UNOD', 'UNOE', 'UNOF', 'UNOG', - * 'UNOH', 'UNOI', 'UNOJ', 'UNOK', 'UNOX', 'UNOY', 'KECA' - * @member {string} - * [content.edifact.receiveAgreement.protocolSettings.framingSettings.decimalPointIndicator] - * The EDIFACT frame setting decimal indicator. Possible values include: - * 'NotSpecified', 'Comma', 'Decimal' - * @member {string} - * [content.edifact.receiveAgreement.protocolSettings.framingSettings.segmentTerminatorSuffix] - * The EDIFACT frame setting segment terminator suffix. Possible values - * include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' - * @member {object} - * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings] The - * EDIFACT envelope settings. - * @member {string} - * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.groupAssociationAssignedCode] - * The group association assigned code. - * @member {string} - * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.communicationAgreementId] - * The communication agreement id. - * @member {boolean} - * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.applyDelimiterStringAdvice] - * The value indicating whether to apply delimiter string advice. - * @member {boolean} - * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.createGroupingSegments] - * The value indicating whether to create grouping segments. - * @member {boolean} - * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.enableDefaultGroupHeaders] - * The value indicating whether to enable default group headers. - * @member {string} - * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.recipientReferencePasswordValue] - * The recipient reference password value. - * @member {string} - * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.recipientReferencePasswordQualifier] - * The recipient reference password qualifier. - * @member {string} - * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.applicationReferenceId] - * The application reference id. - * @member {string} - * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.processingPriorityCode] - * The processing priority code. - * @member {number} - * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.interchangeControlNumberLowerBound] - * The interchange control number lower bound. - * @member {number} - * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.interchangeControlNumberUpperBound] - * The interchange control number upper bound. - * @member {boolean} - * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.rolloverInterchangeControlNumber] - * The value indicating whether to rollover interchange control number. - * @member {string} - * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.interchangeControlNumberPrefix] - * The interchange control number prefix. - * @member {string} - * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.interchangeControlNumberSuffix] - * The interchange control number suffix. - * @member {string} - * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.senderReverseRoutingAddress] - * The sender reverse routing address. - * @member {string} - * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.receiverReverseRoutingAddress] - * The receiver reverse routing address. - * @member {string} - * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.functionalGroupId] - * The functional group id. - * @member {string} - * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.groupControllingAgencyCode] - * The group controlling agency code. - * @member {string} - * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.groupMessageVersion] - * The group message version. - * @member {string} - * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.groupMessageRelease] - * The group message release. - * @member {number} - * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.groupControlNumberLowerBound] - * The group control number lower bound. - * @member {number} - * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.groupControlNumberUpperBound] - * The group control number upper bound. - * @member {boolean} - * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.rolloverGroupControlNumber] - * The value indicating whether to rollover group control number. - * @member {string} - * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.groupControlNumberPrefix] - * The group control number prefix. - * @member {string} - * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.groupControlNumberSuffix] - * The group control number suffix. - * @member {string} - * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.groupApplicationReceiverQualifier] - * The group application receiver qualifier. - * @member {string} - * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.groupApplicationReceiverId] - * The group application receiver id. - * @member {string} - * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.groupApplicationSenderQualifier] - * The group application sender qualifier. - * @member {string} - * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.groupApplicationSenderId] - * The group application sender id. - * @member {string} - * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.groupApplicationPassword] - * The group application password. - * @member {boolean} - * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.overwriteExistingTransactionSetControlNumber] - * The value indicating whether to overwrite existing transaction set control - * number. - * @member {string} - * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberPrefix] - * The transaction set control number prefix. - * @member {string} - * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberSuffix] - * The transaction set control number suffix. - * @member {number} - * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberLowerBound] - * The transaction set control number lower bound. - * @member {number} - * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberUpperBound] - * The transaction set control number upper bound. - * @member {boolean} - * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.rolloverTransactionSetControlNumber] - * The value indicating whether to rollover transaction set control number. - * @member {boolean} - * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.isTestInterchange] - * The value indicating whether the message is a test interchange. - * @member {string} - * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.senderInternalIdentification] - * The sender internal identification. - * @member {string} - * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.senderInternalSubIdentification] - * The sender internal sub identification. - * @member {string} - * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.receiverInternalIdentification] - * The receiver internal identification. - * @member {string} - * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.receiverInternalSubIdentification] - * The receiver internal sub identification. - * @member {object} - * [content.edifact.receiveAgreement.protocolSettings.acknowledgementSettings] - * The EDIFACT acknowledgement settings. - * @member {boolean} - * [content.edifact.receiveAgreement.protocolSettings.acknowledgementSettings.needTechnicalAcknowledgement] - * The value indicating whether technical acknowledgement is needed. - * @member {boolean} - * [content.edifact.receiveAgreement.protocolSettings.acknowledgementSettings.batchTechnicalAcknowledgements] - * The value indicating whether to batch the technical acknowledgements. - * @member {boolean} - * [content.edifact.receiveAgreement.protocolSettings.acknowledgementSettings.needFunctionalAcknowledgement] - * The value indicating whether functional acknowledgement is needed. - * @member {boolean} - * [content.edifact.receiveAgreement.protocolSettings.acknowledgementSettings.batchFunctionalAcknowledgements] - * The value indicating whether to batch functional acknowledgements. - * @member {boolean} - * [content.edifact.receiveAgreement.protocolSettings.acknowledgementSettings.needLoopForValidMessages] - * The value indicating whether a loop is needed for valid messages. - * @member {boolean} - * [content.edifact.receiveAgreement.protocolSettings.acknowledgementSettings.sendSynchronousAcknowledgement] - * The value indicating whether to send synchronous acknowledgement. - * @member {string} - * [content.edifact.receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberPrefix] - * The acknowledgement control number prefix. - * @member {string} - * [content.edifact.receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberSuffix] - * The acknowledgement control number suffix. - * @member {number} - * [content.edifact.receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberLowerBound] - * The acknowledgement control number lower bound. - * @member {number} - * [content.edifact.receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberUpperBound] - * The acknowledgement control number upper bound. - * @member {boolean} - * [content.edifact.receiveAgreement.protocolSettings.acknowledgementSettings.rolloverAcknowledgementControlNumber] - * The value indicating whether to rollover acknowledgement control number. - * @member {object} - * [content.edifact.receiveAgreement.protocolSettings.messageFilter] The - * EDIFACT message filter. - * @member {string} - * [content.edifact.receiveAgreement.protocolSettings.messageFilter.messageFilterType] - * The message filter type. Possible values include: 'NotSpecified', 'Include', - * 'Exclude' - * @member {object} - * [content.edifact.receiveAgreement.protocolSettings.processingSettings] The - * EDIFACT processing Settings. - * @member {boolean} - * [content.edifact.receiveAgreement.protocolSettings.processingSettings.maskSecurityInfo] - * The value indicating whether to mask security information. - * @member {boolean} - * [content.edifact.receiveAgreement.protocolSettings.processingSettings.preserveInterchange] - * The value indicating whether to preserve interchange. - * @member {boolean} - * [content.edifact.receiveAgreement.protocolSettings.processingSettings.suspendInterchangeOnError] - * The value indicating whether to suspend interchange on error. - * @member {boolean} - * [content.edifact.receiveAgreement.protocolSettings.processingSettings.createEmptyXmlTagsForTrailingSeparators] - * The value indicating whether to create empty xml tags for trailing - * separators. - * @member {boolean} - * [content.edifact.receiveAgreement.protocolSettings.processingSettings.useDotAsDecimalSeparator] - * The value indicating whether to use dot as decimal separator. - * @member {array} - * [content.edifact.receiveAgreement.protocolSettings.envelopeOverrides] The - * EDIFACT envelope override settings. - * @member {array} - * [content.edifact.receiveAgreement.protocolSettings.messageFilterList] The - * EDIFACT message filter list. - * @member {array} - * [content.edifact.receiveAgreement.protocolSettings.schemaReferences] The - * EDIFACT schema references. - * @member {array} - * [content.edifact.receiveAgreement.protocolSettings.validationOverrides] The - * EDIFACT validation override settings. - * @member {array} - * [content.edifact.receiveAgreement.protocolSettings.edifactDelimiterOverrides] - * The EDIFACT delimiter override settings. - * @member {object} [content.edifact.sendAgreement] The EDIFACT one-way send - * agreement. - * @member {object} [content.edifact.sendAgreement.senderBusinessIdentity] The - * sender business identity - * @member {string} - * [content.edifact.sendAgreement.senderBusinessIdentity.qualifier] The - * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} - * [content.edifact.sendAgreement.senderBusinessIdentity.value] The user - * defined business identity value. - * @member {object} [content.edifact.sendAgreement.receiverBusinessIdentity] - * The receiver business identity - * @member {string} - * [content.edifact.sendAgreement.receiverBusinessIdentity.qualifier] The - * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} - * [content.edifact.sendAgreement.receiverBusinessIdentity.value] The user - * defined business identity value. - * @member {object} [content.edifact.sendAgreement.protocolSettings] The - * EDIFACT protocol settings. - * @member {object} - * [content.edifact.sendAgreement.protocolSettings.validationSettings] The - * EDIFACT validation settings. - * @member {boolean} - * [content.edifact.sendAgreement.protocolSettings.validationSettings.validateCharacterSet] - * The value indicating whether to validate character set in the message. - * @member {boolean} - * [content.edifact.sendAgreement.protocolSettings.validationSettings.checkDuplicateInterchangeControlNumber] - * The value indicating whether to check for duplicate interchange control - * number. - * @member {number} - * [content.edifact.sendAgreement.protocolSettings.validationSettings.interchangeControlNumberValidityDays] - * The validity period of interchange control number. - * @member {boolean} - * [content.edifact.sendAgreement.protocolSettings.validationSettings.checkDuplicateGroupControlNumber] - * The value indicating whether to check for duplicate group control number. - * @member {boolean} - * [content.edifact.sendAgreement.protocolSettings.validationSettings.checkDuplicateTransactionSetControlNumber] - * The value indicating whether to check for duplicate transaction set control - * number. - * @member {boolean} - * [content.edifact.sendAgreement.protocolSettings.validationSettings.validateEdiTypes] - * The value indicating whether to Whether to validate EDI types. - * @member {boolean} - * [content.edifact.sendAgreement.protocolSettings.validationSettings.validateXsdTypes] - * The value indicating whether to Whether to validate XSD types. - * @member {boolean} - * [content.edifact.sendAgreement.protocolSettings.validationSettings.allowLeadingAndTrailingSpacesAndZeroes] - * The value indicating whether to allow leading and trailing spaces and - * zeroes. - * @member {boolean} - * [content.edifact.sendAgreement.protocolSettings.validationSettings.trimLeadingAndTrailingSpacesAndZeroes] - * The value indicating whether to trim leading and trailing spaces and zeroes. - * @member {string} - * [content.edifact.sendAgreement.protocolSettings.validationSettings.trailingSeparatorPolicy] - * The trailing separator policy. Possible values include: 'NotSpecified', - * 'NotAllowed', 'Optional', 'Mandatory' - * @member {object} - * [content.edifact.sendAgreement.protocolSettings.framingSettings] The EDIFACT - * framing settings. - * @member {string} - * [content.edifact.sendAgreement.protocolSettings.framingSettings.serviceCodeListDirectoryVersion] - * The service code list directory version. - * @member {string} - * [content.edifact.sendAgreement.protocolSettings.framingSettings.characterEncoding] - * The character encoding. - * @member {number} - * [content.edifact.sendAgreement.protocolSettings.framingSettings.protocolVersion] - * The protocol version. - * @member {number} - * [content.edifact.sendAgreement.protocolSettings.framingSettings.dataElementSeparator] - * The data element separator. - * @member {number} - * [content.edifact.sendAgreement.protocolSettings.framingSettings.componentSeparator] - * The component separator. - * @member {number} - * [content.edifact.sendAgreement.protocolSettings.framingSettings.segmentTerminator] - * The segment terminator. - * @member {number} - * [content.edifact.sendAgreement.protocolSettings.framingSettings.releaseIndicator] - * The release indicator. - * @member {number} - * [content.edifact.sendAgreement.protocolSettings.framingSettings.repetitionSeparator] - * The repetition separator. - * @member {string} - * [content.edifact.sendAgreement.protocolSettings.framingSettings.characterSet] - * The EDIFACT frame setting characterSet. Possible values include: - * 'NotSpecified', 'UNOB', 'UNOA', 'UNOC', 'UNOD', 'UNOE', 'UNOF', 'UNOG', - * 'UNOH', 'UNOI', 'UNOJ', 'UNOK', 'UNOX', 'UNOY', 'KECA' - * @member {string} - * [content.edifact.sendAgreement.protocolSettings.framingSettings.decimalPointIndicator] - * The EDIFACT frame setting decimal indicator. Possible values include: - * 'NotSpecified', 'Comma', 'Decimal' - * @member {string} - * [content.edifact.sendAgreement.protocolSettings.framingSettings.segmentTerminatorSuffix] - * The EDIFACT frame setting segment terminator suffix. Possible values - * include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' - * @member {object} - * [content.edifact.sendAgreement.protocolSettings.envelopeSettings] The - * EDIFACT envelope settings. - * @member {string} - * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.groupAssociationAssignedCode] - * The group association assigned code. - * @member {string} - * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.communicationAgreementId] - * The communication agreement id. - * @member {boolean} - * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.applyDelimiterStringAdvice] - * The value indicating whether to apply delimiter string advice. - * @member {boolean} - * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.createGroupingSegments] - * The value indicating whether to create grouping segments. - * @member {boolean} - * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.enableDefaultGroupHeaders] - * The value indicating whether to enable default group headers. - * @member {string} - * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.recipientReferencePasswordValue] - * The recipient reference password value. - * @member {string} - * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.recipientReferencePasswordQualifier] - * The recipient reference password qualifier. - * @member {string} - * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.applicationReferenceId] - * The application reference id. - * @member {string} - * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.processingPriorityCode] - * The processing priority code. - * @member {number} - * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.interchangeControlNumberLowerBound] - * The interchange control number lower bound. - * @member {number} - * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.interchangeControlNumberUpperBound] - * The interchange control number upper bound. - * @member {boolean} - * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.rolloverInterchangeControlNumber] - * The value indicating whether to rollover interchange control number. - * @member {string} - * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.interchangeControlNumberPrefix] - * The interchange control number prefix. - * @member {string} - * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.interchangeControlNumberSuffix] - * The interchange control number suffix. - * @member {string} - * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.senderReverseRoutingAddress] - * The sender reverse routing address. - * @member {string} - * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.receiverReverseRoutingAddress] - * The receiver reverse routing address. - * @member {string} - * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.functionalGroupId] - * The functional group id. - * @member {string} - * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.groupControllingAgencyCode] - * The group controlling agency code. - * @member {string} - * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.groupMessageVersion] - * The group message version. - * @member {string} - * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.groupMessageRelease] - * The group message release. - * @member {number} - * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.groupControlNumberLowerBound] - * The group control number lower bound. - * @member {number} - * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.groupControlNumberUpperBound] - * The group control number upper bound. - * @member {boolean} - * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.rolloverGroupControlNumber] - * The value indicating whether to rollover group control number. - * @member {string} - * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.groupControlNumberPrefix] - * The group control number prefix. - * @member {string} - * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.groupControlNumberSuffix] - * The group control number suffix. - * @member {string} - * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.groupApplicationReceiverQualifier] - * The group application receiver qualifier. - * @member {string} - * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.groupApplicationReceiverId] - * The group application receiver id. - * @member {string} - * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.groupApplicationSenderQualifier] - * The group application sender qualifier. - * @member {string} - * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.groupApplicationSenderId] - * The group application sender id. - * @member {string} - * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.groupApplicationPassword] - * The group application password. - * @member {boolean} - * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.overwriteExistingTransactionSetControlNumber] - * The value indicating whether to overwrite existing transaction set control - * number. - * @member {string} - * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberPrefix] - * The transaction set control number prefix. - * @member {string} - * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberSuffix] - * The transaction set control number suffix. - * @member {number} - * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberLowerBound] - * The transaction set control number lower bound. - * @member {number} - * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberUpperBound] - * The transaction set control number upper bound. - * @member {boolean} - * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.rolloverTransactionSetControlNumber] - * The value indicating whether to rollover transaction set control number. - * @member {boolean} - * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.isTestInterchange] - * The value indicating whether the message is a test interchange. - * @member {string} - * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.senderInternalIdentification] - * The sender internal identification. - * @member {string} - * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.senderInternalSubIdentification] - * The sender internal sub identification. - * @member {string} - * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.receiverInternalIdentification] - * The receiver internal identification. - * @member {string} - * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.receiverInternalSubIdentification] - * The receiver internal sub identification. - * @member {object} - * [content.edifact.sendAgreement.protocolSettings.acknowledgementSettings] The - * EDIFACT acknowledgement settings. - * @member {boolean} - * [content.edifact.sendAgreement.protocolSettings.acknowledgementSettings.needTechnicalAcknowledgement] - * The value indicating whether technical acknowledgement is needed. - * @member {boolean} - * [content.edifact.sendAgreement.protocolSettings.acknowledgementSettings.batchTechnicalAcknowledgements] - * The value indicating whether to batch the technical acknowledgements. - * @member {boolean} - * [content.edifact.sendAgreement.protocolSettings.acknowledgementSettings.needFunctionalAcknowledgement] - * The value indicating whether functional acknowledgement is needed. - * @member {boolean} - * [content.edifact.sendAgreement.protocolSettings.acknowledgementSettings.batchFunctionalAcknowledgements] - * The value indicating whether to batch functional acknowledgements. - * @member {boolean} - * [content.edifact.sendAgreement.protocolSettings.acknowledgementSettings.needLoopForValidMessages] - * The value indicating whether a loop is needed for valid messages. - * @member {boolean} - * [content.edifact.sendAgreement.protocolSettings.acknowledgementSettings.sendSynchronousAcknowledgement] - * The value indicating whether to send synchronous acknowledgement. - * @member {string} - * [content.edifact.sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberPrefix] - * The acknowledgement control number prefix. - * @member {string} - * [content.edifact.sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberSuffix] - * The acknowledgement control number suffix. - * @member {number} - * [content.edifact.sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberLowerBound] - * The acknowledgement control number lower bound. - * @member {number} - * [content.edifact.sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberUpperBound] - * The acknowledgement control number upper bound. - * @member {boolean} - * [content.edifact.sendAgreement.protocolSettings.acknowledgementSettings.rolloverAcknowledgementControlNumber] - * The value indicating whether to rollover acknowledgement control number. - * @member {object} - * [content.edifact.sendAgreement.protocolSettings.messageFilter] The EDIFACT - * message filter. - * @member {string} - * [content.edifact.sendAgreement.protocolSettings.messageFilter.messageFilterType] - * The message filter type. Possible values include: 'NotSpecified', 'Include', - * 'Exclude' - * @member {object} - * [content.edifact.sendAgreement.protocolSettings.processingSettings] The - * EDIFACT processing Settings. - * @member {boolean} - * [content.edifact.sendAgreement.protocolSettings.processingSettings.maskSecurityInfo] - * The value indicating whether to mask security information. - * @member {boolean} - * [content.edifact.sendAgreement.protocolSettings.processingSettings.preserveInterchange] - * The value indicating whether to preserve interchange. - * @member {boolean} - * [content.edifact.sendAgreement.protocolSettings.processingSettings.suspendInterchangeOnError] - * The value indicating whether to suspend interchange on error. - * @member {boolean} - * [content.edifact.sendAgreement.protocolSettings.processingSettings.createEmptyXmlTagsForTrailingSeparators] - * The value indicating whether to create empty xml tags for trailing - * separators. - * @member {boolean} - * [content.edifact.sendAgreement.protocolSettings.processingSettings.useDotAsDecimalSeparator] - * The value indicating whether to use dot as decimal separator. - * @member {array} - * [content.edifact.sendAgreement.protocolSettings.envelopeOverrides] The - * EDIFACT envelope override settings. - * @member {array} - * [content.edifact.sendAgreement.protocolSettings.messageFilterList] The - * EDIFACT message filter list. - * @member {array} - * [content.edifact.sendAgreement.protocolSettings.schemaReferences] The - * EDIFACT schema references. - * @member {array} - * [content.edifact.sendAgreement.protocolSettings.validationOverrides] The - * EDIFACT validation override settings. - * @member {array} - * [content.edifact.sendAgreement.protocolSettings.edifactDelimiterOverrides] - * The EDIFACT delimiter override settings. */ export interface IntegrationAccountAgreement extends Resource { + /** + * The created time. + */ readonly createdTime?: Date; + /** + * The changed time. + */ readonly changedTime?: Date; + /** + * The metadata. + */ metadata?: any; + /** + * The agreement type. Possible values include: 'NotSpecified', 'AS2', 'X12', 'Edifact' + */ agreementType: string; + /** + * The integration account partner that is set as host partner for this agreement. + */ hostPartner: string; + /** + * The integration account partner that is set as guest partner for this agreement. + */ guestPartner: string; + /** + * The business identity of the host partner. + */ hostIdentity: BusinessIdentity; + /** + * The business identity of the guest partner. + */ guestIdentity: BusinessIdentity; + /** + * The agreement content. + */ content: AgreementContent; } /** - * @class - * Initializes a new instance of the IntegrationAccountAgreementFilter class. - * @constructor * The integration account agreement filter for odata query. - * - * @member {string} agreementType The agreement type of integration account - * agreement. Possible values include: 'NotSpecified', 'AS2', 'X12', 'Edifact' */ export interface IntegrationAccountAgreementFilter { + /** + * The agreement type of integration account agreement. Possible values include: 'NotSpecified', + * 'AS2', 'X12', 'Edifact' + */ agreementType: string; } /** - * @class - * Initializes a new instance of the KeyVaultKeyReferenceKeyVault class. - * @constructor * The key vault reference. - * - * @member {string} [id] The resource id. - * @member {string} [name] The resource name. - * @member {string} [type] The resource type. */ export interface KeyVaultKeyReferenceKeyVault { + /** + * The resource id. + */ id?: string; + /** + * The resource name. + */ readonly name?: string; + /** + * The resource type. + */ readonly type?: string; } /** - * @class - * Initializes a new instance of the KeyVaultKeyReference class. - * @constructor * The reference to the key vault key. - * - * @member {object} keyVault The key vault reference. - * @member {string} [keyVault.id] The resource id. - * @member {string} [keyVault.name] The resource name. - * @member {string} [keyVault.type] The resource type. - * @member {string} keyName The private key name in key vault. - * @member {string} [keyVersion] The private key version in key vault. */ export interface KeyVaultKeyReference { + /** + * The key vault reference. + */ keyVault: KeyVaultKeyReferenceKeyVault; + /** + * The private key name in key vault. + */ keyName: string; + /** + * The private key version in key vault. + */ keyVersion?: string; } /** - * @class - * Initializes a new instance of the IntegrationAccountCertificate class. - * @constructor * The integration account certificate. - * - * @member {date} [createdTime] The created time. - * @member {date} [changedTime] The changed time. - * @member {object} [metadata] The metadata. - * @member {object} [key] The key details in the key vault. - * @member {object} [key.keyVault] The key vault reference. - * @member {string} [key.keyVault.id] The resource id. - * @member {string} [key.keyVault.name] The resource name. - * @member {string} [key.keyVault.type] The resource type. - * @member {string} [key.keyName] The private key name in key vault. - * @member {string} [key.keyVersion] The private key version in key vault. - * @member {string} [publicCertificate] The public certificate. */ export interface IntegrationAccountCertificate extends Resource { + /** + * The created time. + */ readonly createdTime?: Date; + /** + * The changed time. + */ readonly changedTime?: Date; + /** + * The metadata. + */ metadata?: any; + /** + * The key details in the key vault. + */ key?: KeyVaultKeyReference; + /** + * The public certificate. + */ publicCertificate?: string; } /** - * @class - * Initializes a new instance of the IntegrationAccountSessionFilter class. - * @constructor * The integration account session filter. - * - * @member {date} changedTime The changed time of integration account sessions. */ export interface IntegrationAccountSessionFilter { + /** + * The changed time of integration account sessions. + */ changedTime: Date; } /** - * @class - * Initializes a new instance of the IntegrationAccountSession class. - * @constructor * The integration account session. - * - * @member {date} [createdTime] The created time. - * @member {date} [changedTime] The changed time. - * @member {object} [content] The session content. */ export interface IntegrationAccountSession extends Resource { + /** + * The created time. + */ readonly createdTime?: Date; + /** + * The changed time. + */ readonly changedTime?: Date; + /** + * The session content. + */ content?: any; } /** - * @class - * Initializes a new instance of the OperationDisplay class. - * @constructor * The object that represents the operation. - * - * @member {string} [provider] Service provider: Microsoft.Logic - * @member {string} [resource] Resource on which the operation is performed: - * Profile, endpoint, etc. - * @member {string} [operation] Operation type: Read, write, delete, etc. */ export interface OperationDisplay { + /** + * Service provider: Microsoft.Logic + */ provider?: string; + /** + * Resource on which the operation is performed: Profile, endpoint, etc. + */ resource?: string; + /** + * Operation type: Read, write, delete, etc. + */ operation?: string; } /** - * @class - * Initializes a new instance of the Operation class. - * @constructor * Logic REST API operation - * - * @member {string} [name] Operation name: {provider}/{resource}/{operation} - * @member {object} [display] The object that represents the operation. - * @member {string} [display.provider] Service provider: Microsoft.Logic - * @member {string} [display.resource] Resource on which the operation is - * performed: Profile, endpoint, etc. - * @member {string} [display.operation] Operation type: Read, write, delete, - * etc. */ export interface Operation { + /** + * Operation name: {provider}/{resource}/{operation} + */ name?: string; + /** + * The object that represents the operation. + */ display?: OperationDisplay; } /** - * @class - * Initializes a new instance of the KeyVaultReference class. - * @constructor * The key vault reference. - * */ export interface KeyVaultReference extends ResourceReference { } /** - * @class - * Initializes a new instance of the ListKeyVaultKeysDefinition class. - * @constructor * The list key vault keys definition. - * - * @member {object} keyVault The key vault reference. - * @member {string} [skipToken] The skip token. */ export interface ListKeyVaultKeysDefinition { + /** + * The key vault reference. + */ keyVault: KeyVaultReference; + /** + * The skip token. + */ skipToken?: string; } /** - * @class - * Initializes a new instance of the KeyVaultKeyAttributes class. - * @constructor * The key attributes. - * - * @member {boolean} [enabled] Whether the key is enabled or not. - * @member {number} [created] When the key was created. - * @member {number} [updated] When the key was updated. */ export interface KeyVaultKeyAttributes { + /** + * Whether the key is enabled or not. + */ enabled?: boolean; + /** + * When the key was created. + */ created?: number; + /** + * When the key was updated. + */ updated?: number; } /** - * @class - * Initializes a new instance of the KeyVaultKey class. - * @constructor * The key vault key. - * - * @member {string} [kid] The key id. - * @member {object} [attributes] The key attributes. - * @member {boolean} [attributes.enabled] Whether the key is enabled or not. - * @member {number} [attributes.created] When the key was created. - * @member {number} [attributes.updated] When the key was updated. */ export interface KeyVaultKey { + /** + * The key id. + */ kid?: string; + /** + * The key attributes. + */ attributes?: KeyVaultKeyAttributes; } -/** - * @class - * Initializes a new instance of the TrackingEventErrorInfo class. - * @constructor - * @member {string} [message] - * @member {string} [code] - */ export interface TrackingEventErrorInfo { message?: string; code?: string; } -/** - * @class - * Initializes a new instance of the TrackingEvent class. - * @constructor - * @member {string} eventLevel Possible values include: 'LogAlways', - * 'Critical', 'Error', 'Warning', 'Informational', 'Verbose' - * @member {date} eventTime - * @member {string} recordType Possible values include: 'NotSpecified', - * 'Custom', 'AS2Message', 'AS2MDN', 'X12Interchange', 'X12FunctionalGroup', - * 'X12TransactionSet', 'X12InterchangeAcknowledgment', - * 'X12FunctionalGroupAcknowledgment', 'X12TransactionSetAcknowledgment', - * 'EdifactInterchange', 'EdifactFunctionalGroup', 'EdifactTransactionSet', - * 'EdifactInterchangeAcknowledgment', 'EdifactFunctionalGroupAcknowledgment', - * 'EdifactTransactionSetAcknowledgment' - * @member {object} [error] - * @member {string} [error.message] - * @member {string} [error.code] - */ export interface TrackingEvent { + /** + * Possible values include: 'LogAlways', 'Critical', 'Error', 'Warning', 'Informational', + * 'Verbose' + */ eventLevel: string; eventTime: Date; + /** + * Possible values include: 'NotSpecified', 'Custom', 'AS2Message', 'AS2MDN', 'X12Interchange', + * 'X12FunctionalGroup', 'X12TransactionSet', 'X12InterchangeAcknowledgment', + * 'X12FunctionalGroupAcknowledgment', 'X12TransactionSetAcknowledgment', 'EdifactInterchange', + * 'EdifactFunctionalGroup', 'EdifactTransactionSet', 'EdifactInterchangeAcknowledgment', + * 'EdifactFunctionalGroupAcknowledgment', 'EdifactTransactionSetAcknowledgment' + */ recordType: string; error?: TrackingEventErrorInfo; } -/** - * @class - * Initializes a new instance of the TrackingEventsDefinition class. - * @constructor - * @member {string} sourceType - * @member {string} [trackEventsOptions] Possible values include: 'None', - * 'DisableSourceInfoEnrich' - * @member {array} events - */ export interface TrackingEventsDefinition { sourceType: string; + /** + * Possible values include: 'None', 'DisableSourceInfoEnrich' + */ trackEventsOptions?: string; events: TrackingEvent[]; } -/** - * @class - * Initializes a new instance of the SetTriggerStateActionDefinition class. - * @constructor - * @member {object} source - * @member {string} [source.provisioningState] Gets the provisioning state. - * Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', - * 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', - * 'Succeeded', 'Moving', 'Updating', 'Registering', 'Registered', - * 'Unregistering', 'Unregistered', 'Completed' - * @member {date} [source.createdTime] Gets the created time. - * @member {date} [source.changedTime] Gets the changed time. - * @member {string} [source.state] Gets the state. Possible values include: - * 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' - * @member {string} [source.status] Gets the status. Possible values include: - * 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', - * 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', - * 'Ignored' - * @member {date} [source.lastExecutionTime] Gets the last execution time. - * @member {date} [source.nextExecutionTime] Gets the next execution time. - * @member {object} [source.recurrence] Gets the workflow trigger recurrence. - * @member {string} [source.recurrence.frequency] The frequency. Possible - * values include: 'NotSpecified', 'Second', 'Minute', 'Hour', 'Day', 'Week', - * 'Month', 'Year' - * @member {number} [source.recurrence.interval] The interval. - * @member {string} [source.recurrence.startTime] The start time. - * @member {string} [source.recurrence.endTime] The end time. - * @member {string} [source.recurrence.timeZone] The time zone. - * @member {object} [source.recurrence.schedule] The recurrence schedule. - * @member {array} [source.recurrence.schedule.minutes] The minutes. - * @member {array} [source.recurrence.schedule.hours] The hours. - * @member {array} [source.recurrence.schedule.weekDays] The days of the week. - * @member {array} [source.recurrence.schedule.monthDays] The month days. - * @member {array} [source.recurrence.schedule.monthlyOccurrences] The monthly - * occurrences. - * @member {object} [source.workflow] Gets the reference to workflow. - * @member {string} [source.workflow.id] The resource id. - * @member {string} [source.workflow.name] Gets the resource name. - * @member {string} [source.workflow.type] Gets the resource type. - * @member {string} [source.name] Gets the workflow trigger name. - * @member {string} [source.type] Gets the workflow trigger type. - */ export interface SetTriggerStateActionDefinition { source: WorkflowTrigger; } -/** - * @class - * Initializes a new instance of the Expression class. - * @constructor - * @member {string} [text] - * @member {object} [value] - * @member {array} [subexpressions] - * @member {object} [error] - * @member {string} [error.message] The error message. - * @member {array} [error.details] The error details. - */ export interface Expression { text?: string; value?: any; @@ -8047,630 +2832,563 @@ export interface Expression { error?: AzureResourceErrorInfo; } -/** - * @class - * Initializes a new instance of the ExpressionRoot class. - * @constructor - * @member {string} [path] The path. - */ export interface ExpressionRoot extends Expression { + /** + * The path. + */ path?: string; } /** - * @class - * Initializes a new instance of the ErrorInfo class. - * @constructor * The error info. - * - * @member {string} code The error code. - */ +*/ export interface ErrorInfo { + /** + * The error code. + */ code: string; } /** - * @class - * Initializes a new instance of the AzureResourceErrorInfo class. - * @constructor * The azure resource error info. - * - * @member {string} message The error message. - * @member {array} [details] The error details. - */ +*/ export interface AzureResourceErrorInfo extends ErrorInfo { + /** + * The error message. + */ message: string; + /** + * The error details. + */ details?: AzureResourceErrorInfo[]; } /** - * @class - * Initializes a new instance of the RepetitionIndex class. - * @constructor * The workflow run action repetition index. - * - * @member {string} [scopeName] The scope. - * @member {number} itemIndex The index. - */ +*/ export interface RepetitionIndex { + /** + * The scope. + */ scopeName?: string; + /** + * The index. + */ itemIndex: number; } /** - * @class - * Initializes a new instance of the WorkflowRunActionRepetitionDefinition class. - * @constructor * The workflow run action repetition definition. - * - * @member {date} [startTime] The start time of the workflow scope repetition. - * @member {date} [endTime] The end time of the workflow scope repetition. - * @member {object} [correlation] The correlation properties. - * @member {string} [correlation.actionTrackingId] The action tracking - * identifier. - * @member {string} [status] The status of the workflow scope repetition. - * Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', - * 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', - * 'TimedOut', 'Aborted', 'Ignored' - * @member {string} [code] The workflow scope repetition code. - * @member {object} [error] - * @member {string} [trackingId] Gets the tracking id. - * @member {object} [inputs] Gets the inputs. - * @member {object} [inputsLink] Gets the link to inputs. - * @member {string} [inputsLink.uri] The content link URI. - * @member {string} [inputsLink.contentVersion] The content version. - * @member {number} [inputsLink.contentSize] The content size. - * @member {object} [inputsLink.contentHash] The content hash. - * @member {string} [inputsLink.contentHash.algorithm] The algorithm of the - * content hash. - * @member {string} [inputsLink.contentHash.value] The value of the content - * hash. - * @member {object} [inputsLink.metadata] The metadata. - * @member {object} [outputs] Gets the outputs. - * @member {object} [outputsLink] Gets the link to outputs. - * @member {string} [outputsLink.uri] The content link URI. - * @member {string} [outputsLink.contentVersion] The content version. - * @member {number} [outputsLink.contentSize] The content size. - * @member {object} [outputsLink.contentHash] The content hash. - * @member {string} [outputsLink.contentHash.algorithm] The algorithm of the - * content hash. - * @member {string} [outputsLink.contentHash.value] The value of the content - * hash. - * @member {object} [outputsLink.metadata] The metadata. - * @member {object} [trackedProperties] Gets the tracked properties. - * @member {array} [retryHistory] Gets the retry histories. - * @member {number} [iterationCount] - * @member {array} [repetitionIndexes] The repetition indexes. - */ +*/ export interface WorkflowRunActionRepetitionDefinition extends Resource { + /** + * The start time of the workflow scope repetition. + */ startTime?: Date; + /** + * The end time of the workflow scope repetition. + */ endTime?: Date; + /** + * The correlation properties. + */ correlation?: RunActionCorrelation; + /** + * The status of the workflow scope repetition. Possible values include: 'NotSpecified', + * 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', + * 'Faulted', 'TimedOut', 'Aborted', 'Ignored' + */ status?: string; + /** + * The workflow scope repetition code. + */ code?: string; error?: any; + /** + * Gets the tracking id. + */ readonly trackingId?: string; + /** + * Gets the inputs. + */ readonly inputs?: any; + /** + * Gets the link to inputs. + */ readonly inputsLink?: ContentLink; + /** + * Gets the outputs. + */ readonly outputs?: any; + /** + * Gets the link to outputs. + */ readonly outputsLink?: ContentLink; + /** + * Gets the tracked properties. + */ readonly trackedProperties?: any; + /** + * Gets the retry histories. + */ retryHistory?: RetryHistory[]; iterationCount?: number; + /** + * The repetition indexes. + */ repetitionIndexes?: RepetitionIndex[]; } /** - * @class - * Initializes a new instance of the OperationResultProperties class. - * @constructor * The run operation result properties. - * - * @member {date} [startTime] The start time of the workflow scope repetition. - * @member {date} [endTime] The end time of the workflow scope repetition. - * @member {object} [correlation] The correlation properties. - * @member {string} [correlation.actionTrackingId] The action tracking - * identifier. - * @member {string} [status] The status of the workflow scope repetition. - * Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', - * 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', - * 'TimedOut', 'Aborted', 'Ignored' - * @member {string} [code] The workflow scope repetition code. - * @member {object} [error] - */ +*/ export interface OperationResultProperties { + /** + * The start time of the workflow scope repetition. + */ startTime?: Date; + /** + * The end time of the workflow scope repetition. + */ endTime?: Date; + /** + * The correlation properties. + */ correlation?: RunActionCorrelation; + /** + * The status of the workflow scope repetition. Possible values include: 'NotSpecified', + * 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', + * 'Faulted', 'TimedOut', 'Aborted', 'Ignored' + */ status?: string; + /** + * The workflow scope repetition code. + */ code?: string; error?: any; } /** - * @class - * Initializes a new instance of the OperationResult class. - * @constructor * The operation result definition. - * - * @member {string} [trackingId] Gets the tracking id. - * @member {object} [inputs] Gets the inputs. - * @member {object} [inputsLink] Gets the link to inputs. - * @member {string} [inputsLink.uri] The content link URI. - * @member {string} [inputsLink.contentVersion] The content version. - * @member {number} [inputsLink.contentSize] The content size. - * @member {object} [inputsLink.contentHash] The content hash. - * @member {string} [inputsLink.contentHash.algorithm] The algorithm of the - * content hash. - * @member {string} [inputsLink.contentHash.value] The value of the content - * hash. - * @member {object} [inputsLink.metadata] The metadata. - * @member {object} [outputs] Gets the outputs. - * @member {object} [outputsLink] Gets the link to outputs. - * @member {string} [outputsLink.uri] The content link URI. - * @member {string} [outputsLink.contentVersion] The content version. - * @member {number} [outputsLink.contentSize] The content size. - * @member {object} [outputsLink.contentHash] The content hash. - * @member {string} [outputsLink.contentHash.algorithm] The algorithm of the - * content hash. - * @member {string} [outputsLink.contentHash.value] The value of the content - * hash. - * @member {object} [outputsLink.metadata] The metadata. - * @member {object} [trackedProperties] Gets the tracked properties. - * @member {array} [retryHistory] Gets the retry histories. - * @member {number} [iterationCount] - */ +*/ export interface OperationResult extends OperationResultProperties { + /** + * Gets the tracking id. + */ readonly trackingId?: string; + /** + * Gets the inputs. + */ readonly inputs?: any; + /** + * Gets the link to inputs. + */ readonly inputsLink?: ContentLink; + /** + * Gets the outputs. + */ readonly outputs?: any; + /** + * Gets the link to outputs. + */ readonly outputsLink?: ContentLink; + /** + * Gets the tracked properties. + */ readonly trackedProperties?: any; + /** + * Gets the retry histories. + */ retryHistory?: RetryHistory[]; iterationCount?: number; } /** - * @class - * Initializes a new instance of the RunCorrelation class. - * @constructor * The correlation properties. - * - * @member {string} [clientTrackingId] The client tracking identifier. - * @member {array} [clientKeywords] The client keywords. - */ +*/ export interface RunCorrelation { + /** + * The client tracking identifier. + */ clientTrackingId?: string; + /** + * The client keywords. + */ clientKeywords?: string[]; } /** - * @class - * Initializes a new instance of the RunActionCorrelation class. - * @constructor * The workflow run action correlation properties. - * - * @member {string} [actionTrackingId] The action tracking identifier. - */ +*/ export interface RunActionCorrelation extends RunCorrelation { + /** + * The action tracking identifier. + */ actionTrackingId?: string; } /** - * @class - * Initializes a new instance of the JsonSchema class. - * @constructor * The JSON schema. - * - * @member {string} [title] The JSON title. - * @member {string} [content] The JSON content. - */ +*/ export interface JsonSchema { + /** + * The JSON title. + */ title?: string; + /** + * The JSON content. + */ content?: string; } /** - * @class - * Initializes a new instance of the ArtifactProperties class. - * @constructor * The artifact properties definition. - * - * @member {date} [createdTime] The artifact creation time. - * @member {date} [changedTime] The artifact changed time. - * @member {object} [metadata] - */ +*/ export interface ArtifactProperties { + /** + * The artifact creation time. + */ createdTime?: Date; + /** + * The artifact changed time. + */ changedTime?: Date; metadata?: any; } /** - * @class - * Initializes a new instance of the ArtifactContentPropertiesDefinition class. - * @constructor * The artifact content properties definition. - * - * @member {object} [content] - * @member {string} [contentType] The content type. - * @member {object} [contentLink] The content link. - * @member {string} [contentLink.uri] The content link URI. - * @member {string} [contentLink.contentVersion] The content version. - * @member {number} [contentLink.contentSize] The content size. - * @member {object} [contentLink.contentHash] The content hash. - * @member {string} [contentLink.contentHash.algorithm] The algorithm of the - * content hash. - * @member {string} [contentLink.contentHash.value] The value of the content - * hash. - * @member {object} [contentLink.metadata] The metadata. - */ +*/ export interface ArtifactContentPropertiesDefinition extends ArtifactProperties { content?: any; + /** + * The content type. + */ contentType?: string; + /** + * The content link. + */ contentLink?: ContentLink; } /** - * @class - * Initializes a new instance of the AssemblyProperties class. - * @constructor * The assembly properties definition. - * - * @member {string} assemblyName The assembly name. - * @member {string} [assemblyVersion] The assembly version. - * @member {string} [assemblyCulture] The assembly culture. - * @member {string} [assemblyPublicKeyToken] The assembly public key token. - */ +*/ export interface AssemblyProperties extends ArtifactContentPropertiesDefinition { + /** + * The assembly name. + */ assemblyName: string; + /** + * The assembly version. + */ assemblyVersion?: string; + /** + * The assembly culture. + */ assemblyCulture?: string; + /** + * The assembly public key token. + */ assemblyPublicKeyToken?: string; } /** - * @class - * Initializes a new instance of the AssemblyDefinition class. - * @constructor * The assembly definition. - * - * @member {object} properties The assembly properties. - * @member {string} [properties.assemblyName] The assembly name. - * @member {string} [properties.assemblyVersion] The assembly version. - * @member {string} [properties.assemblyCulture] The assembly culture. - * @member {string} [properties.assemblyPublicKeyToken] The assembly public key - * token. - */ +*/ export interface AssemblyDefinition extends Resource { + /** + * The assembly properties. + */ properties: AssemblyProperties; } /** - * @class - * Initializes a new instance of the BatchReleaseCriteria class. - * @constructor * The batch release criteria. - * - * @member {number} [messageCount] The message count. - * @member {number} [batchSize] The batch size in bytes. - * @member {object} [recurrence] The recurrence. - * @member {string} [recurrence.frequency] The frequency. Possible values - * include: 'NotSpecified', 'Second', 'Minute', 'Hour', 'Day', 'Week', 'Month', - * 'Year' - * @member {number} [recurrence.interval] The interval. - * @member {string} [recurrence.startTime] The start time. - * @member {string} [recurrence.endTime] The end time. - * @member {string} [recurrence.timeZone] The time zone. - * @member {object} [recurrence.schedule] The recurrence schedule. - * @member {array} [recurrence.schedule.minutes] The minutes. - * @member {array} [recurrence.schedule.hours] The hours. - * @member {array} [recurrence.schedule.weekDays] The days of the week. - * @member {array} [recurrence.schedule.monthDays] The month days. - * @member {array} [recurrence.schedule.monthlyOccurrences] The monthly - * occurrences. - */ +*/ export interface BatchReleaseCriteria { + /** + * The message count. + */ messageCount?: number; + /** + * The batch size in bytes. + */ batchSize?: number; + /** + * The recurrence. + */ recurrence?: WorkflowTriggerRecurrence; } /** - * @class - * Initializes a new instance of the BatchConfigurationProperties class. - * @constructor * The batch configuration properties definition. - * - * @member {string} batchGroupName The name of the batch group. - * @member {object} releaseCriteria The batch release criteria. - * @member {number} [releaseCriteria.messageCount] The message count. - * @member {number} [releaseCriteria.batchSize] The batch size in bytes. - * @member {object} [releaseCriteria.recurrence] The recurrence. - * @member {string} [releaseCriteria.recurrence.frequency] The frequency. - * Possible values include: 'NotSpecified', 'Second', 'Minute', 'Hour', 'Day', - * 'Week', 'Month', 'Year' - * @member {number} [releaseCriteria.recurrence.interval] The interval. - * @member {string} [releaseCriteria.recurrence.startTime] The start time. - * @member {string} [releaseCriteria.recurrence.endTime] The end time. - * @member {string} [releaseCriteria.recurrence.timeZone] The time zone. - * @member {object} [releaseCriteria.recurrence.schedule] The recurrence - * schedule. - * @member {array} [releaseCriteria.recurrence.schedule.minutes] The minutes. - * @member {array} [releaseCriteria.recurrence.schedule.hours] The hours. - * @member {array} [releaseCriteria.recurrence.schedule.weekDays] The days of - * the week. - * @member {array} [releaseCriteria.recurrence.schedule.monthDays] The month - * days. - * @member {array} [releaseCriteria.recurrence.schedule.monthlyOccurrences] The - * monthly occurrences. - */ +*/ export interface BatchConfigurationProperties extends ArtifactProperties { + /** + * The name of the batch group. + */ batchGroupName: string; + /** + * The batch release criteria. + */ releaseCriteria: BatchReleaseCriteria; } /** - * @class - * Initializes a new instance of the BatchConfiguration class. - * @constructor * The batch configuration resource definition. - * - * @member {object} properties The batch configuration properties. - * @member {string} [properties.batchGroupName] The name of the batch group. - * @member {object} [properties.releaseCriteria] The batch release criteria. - * @member {number} [properties.releaseCriteria.messageCount] The message - * count. - * @member {number} [properties.releaseCriteria.batchSize] The batch size in - * bytes. - * @member {object} [properties.releaseCriteria.recurrence] The recurrence. - * @member {string} [properties.releaseCriteria.recurrence.frequency] The - * frequency. Possible values include: 'NotSpecified', 'Second', 'Minute', - * 'Hour', 'Day', 'Week', 'Month', 'Year' - * @member {number} [properties.releaseCriteria.recurrence.interval] The - * interval. - * @member {string} [properties.releaseCriteria.recurrence.startTime] The start - * time. - * @member {string} [properties.releaseCriteria.recurrence.endTime] The end - * time. - * @member {string} [properties.releaseCriteria.recurrence.timeZone] The time - * zone. - * @member {object} [properties.releaseCriteria.recurrence.schedule] The - * recurrence schedule. - * @member {array} [properties.releaseCriteria.recurrence.schedule.minutes] The - * minutes. - * @member {array} [properties.releaseCriteria.recurrence.schedule.hours] The - * hours. - * @member {array} [properties.releaseCriteria.recurrence.schedule.weekDays] - * The days of the week. - * @member {array} [properties.releaseCriteria.recurrence.schedule.monthDays] - * The month days. - * @member {array} - * [properties.releaseCriteria.recurrence.schedule.monthlyOccurrences] The - * monthly occurrences. - */ +*/ export interface BatchConfiguration extends Resource { + /** + * The batch configuration properties. + */ properties: BatchConfigurationProperties; } +/** + * A request. +*/ +export interface Request { + /** + * A list of all the headers attached to the request. + */ + headers?: any; + /** + * The destination for the request. + */ + uri?: string; + /** + * The HTTP method used for the request. + */ + method?: string; +} + +/** + * A response. +*/ +export interface Response { + /** + * A list of all the headers attached to the response. + */ + headers?: any; + /** + * The status code of the response. + */ + statusCode?: number; + /** + * Details on the location of the body content. + */ + bodyLink?: ContentLink; +} + +/** + * The request history. +*/ +export interface RequestHistoryProperties { + /** + * The time the request started. + */ + startTime?: Date; + /** + * The time the request ended. + */ + endTime?: Date; + /** + * The request. + */ + request?: Request; + /** + * The response. + */ + response?: Response; +} + +/** + * The request history. +*/ +export interface RequestHistory extends Resource { + /** + * The request history properties. + */ + properties?: RequestHistoryProperties; +} /** - * @class - * Initializes a new instance of the WorkflowListResult class. - * @constructor * The list of workflows. - * - * @member {string} [nextLink] The URL to get the next set of results. - */ +*/ export interface WorkflowListResult extends Array { + /** + * The URL to get the next set of results. + */ nextLink?: string; } /** - * @class - * Initializes a new instance of the WorkflowVersionListResult class. - * @constructor * The list of workflow versions. - * - * @member {string} [nextLink] The URL to get the next set of results. - */ +*/ export interface WorkflowVersionListResult extends Array { + /** + * The URL to get the next set of results. + */ nextLink?: string; } /** - * @class - * Initializes a new instance of the WorkflowTriggerListResult class. - * @constructor * The list of workflow triggers. - * - * @member {string} [nextLink] The URL to get the next set of results. - */ +*/ export interface WorkflowTriggerListResult extends Array { + /** + * The URL to get the next set of results. + */ nextLink?: string; } /** - * @class - * Initializes a new instance of the WorkflowTriggerHistoryListResult class. - * @constructor * The list of workflow trigger histories. - * - * @member {string} [nextLink] The URL to get the next set of results. - */ +*/ export interface WorkflowTriggerHistoryListResult extends Array { + /** + * The URL to get the next set of results. + */ nextLink?: string; } /** - * @class - * Initializes a new instance of the WorkflowRunListResult class. - * @constructor * The list of workflow runs. - * - * @member {string} [nextLink] The URL to get the next set of results. - */ +*/ export interface WorkflowRunListResult extends Array { + /** + * The URL to get the next set of results. + */ nextLink?: string; } /** - * @class - * Initializes a new instance of the WorkflowRunActionListResult class. - * @constructor * The list of workflow run actions. - * - * @member {string} [nextLink] The URL to get the next set of results. - */ +*/ export interface WorkflowRunActionListResult extends Array { + /** + * The URL to get the next set of results. + */ nextLink?: string; } -/** - * @class - * Initializes a new instance of the ExpressionTraces class. - * @constructor - * @member {array} [inputs] - */ export interface ExpressionTraces extends Array { } /** - * @class - * Initializes a new instance of the WorkflowRunActionRepetitionDefinitionCollection class. - * @constructor * A collection of workflow run action repetitions. - * - */ -export interface WorkflowRunActionRepetitionDefinitionCollection extends Array { +*/ +export interface WorkflowRunActionRepetitionDefinitionCollection extends +Array { +} + +/** + * The list of workflow request histories. +*/ +export interface RequestHistoryListResult extends Array { + /** + * The URL to get the next set of results. + */ + nextLink?: string; } /** - * @class - * Initializes a new instance of the IntegrationAccountListResult class. - * @constructor * The list of integration accounts. - * - * @member {string} [nextLink] The URL to get the next set of results. - */ +*/ export interface IntegrationAccountListResult extends Array { + /** + * The URL to get the next set of results. + */ nextLink?: string; } /** - * @class - * Initializes a new instance of the KeyVaultKeyCollection class. - * @constructor * Collection of key vault keys. - * - * @member {string} [skipToken] The skip token. - */ +*/ export interface KeyVaultKeyCollection extends Array { } /** - * @class - * Initializes a new instance of the AssemblyCollection class. - * @constructor * A collection of assembly definitions. - * - */ +*/ export interface AssemblyCollection extends Array { } /** - * @class - * Initializes a new instance of the BatchConfigurationCollection class. - * @constructor * A collection of batch configurations. - * - */ +*/ export interface BatchConfigurationCollection extends Array { } /** - * @class - * Initializes a new instance of the IntegrationAccountSchemaListResult class. - * @constructor * The list of integration account schemas. - * - * @member {string} [nextLink] The URL to get the next set of results. - */ +*/ export interface IntegrationAccountSchemaListResult extends Array { + /** + * The URL to get the next set of results. + */ nextLink?: string; } /** - * @class - * Initializes a new instance of the IntegrationAccountMapListResult class. - * @constructor * The list of integration account maps. - * - * @member {string} [nextLink] The URL to get the next set of results. - */ +*/ export interface IntegrationAccountMapListResult extends Array { + /** + * The URL to get the next set of results. + */ nextLink?: string; } /** - * @class - * Initializes a new instance of the IntegrationAccountPartnerListResult class. - * @constructor * The list of integration account partners. - * - * @member {string} [nextLink] The URL to get the next set of results. - */ +*/ export interface IntegrationAccountPartnerListResult extends Array { + /** + * The URL to get the next set of results. + */ nextLink?: string; } /** - * @class - * Initializes a new instance of the IntegrationAccountAgreementListResult class. - * @constructor * The list of integration account agreements. - * - * @member {string} [nextLink] The URL to get the next set of results. - */ +*/ export interface IntegrationAccountAgreementListResult extends Array { + /** + * The URL to get the next set of results. + */ nextLink?: string; } /** - * @class - * Initializes a new instance of the IntegrationAccountCertificateListResult class. - * @constructor * The list of integration account certificates. - * - * @member {string} [nextLink] The URL to get the next set of results. - */ -export interface IntegrationAccountCertificateListResult extends Array { +*/ +export interface IntegrationAccountCertificateListResult extends +Array { + /** + * The URL to get the next set of results. + */ nextLink?: string; } /** - * @class - * Initializes a new instance of the IntegrationAccountSessionListResult class. - * @constructor * The list of integration account sessions. - * - * @member {string} [nextLink] The URL to get the next set of results. - */ +*/ export interface IntegrationAccountSessionListResult extends Array { + /** + * The URL to get the next set of results. + */ nextLink?: string; } /** - * @class - * Initializes a new instance of the OperationListResult class. - * @constructor - * Result of the request to list Logic operations. It contains a list of - * operations and a URL link to get the next set of results. - * - * @member {string} [nextLink] URL to get the next set of operation list - * results if there are any. - */ + * Result of the request to list Logic operations. It contains a list of operations and a URL link + * to get the next set of results. +*/ export interface OperationListResult extends Array { + /** + * URL to get the next set of operation list results if there are any. + */ nextLink?: string; } diff --git a/lib/services/logicManagement/lib/models/index.js b/lib/services/logicManagement/lib/models/index.js index 10b110b832..ecbd10cfa4 100644 --- a/lib/services/logicManagement/lib/models/index.js +++ b/lib/services/logicManagement/lib/models/index.js @@ -138,6 +138,10 @@ exports.AssemblyDefinition = require('./assemblyDefinition'); exports.BatchReleaseCriteria = require('./batchReleaseCriteria'); exports.BatchConfigurationProperties = require('./batchConfigurationProperties'); exports.BatchConfiguration = require('./batchConfiguration'); +exports.Request = require('./request'); +exports.Response = require('./response'); +exports.RequestHistoryProperties = require('./requestHistoryProperties'); +exports.RequestHistory = require('./requestHistory'); exports.WorkflowListResult = require('./workflowListResult'); exports.WorkflowVersionListResult = require('./workflowVersionListResult'); exports.WorkflowTriggerListResult = require('./workflowTriggerListResult'); @@ -146,6 +150,7 @@ exports.WorkflowRunListResult = require('./workflowRunListResult'); exports.WorkflowRunActionListResult = require('./workflowRunActionListResult'); exports.ExpressionTraces = require('./expressionTraces'); exports.WorkflowRunActionRepetitionDefinitionCollection = require('./workflowRunActionRepetitionDefinitionCollection'); +exports.RequestHistoryListResult = require('./requestHistoryListResult'); exports.IntegrationAccountListResult = require('./integrationAccountListResult'); exports.KeyVaultKeyCollection = require('./keyVaultKeyCollection'); exports.AssemblyCollection = require('./assemblyCollection'); diff --git a/lib/services/logicManagement/lib/models/integrationAccount.js b/lib/services/logicManagement/lib/models/integrationAccount.js index 16c2621136..9808060c66 100644 --- a/lib/services/logicManagement/lib/models/integrationAccount.js +++ b/lib/services/logicManagement/lib/models/integrationAccount.js @@ -20,9 +20,9 @@ const models = require('./index'); class IntegrationAccount extends models['Resource'] { /** * Create a IntegrationAccount. - * @member {object} [properties] The integration account properties. - * @member {object} [sku] The sku. - * @member {string} [sku.name] The sku name. Possible values include: + * @property {object} [properties] The integration account properties. + * @property {object} [sku] The sku. + * @property {string} [sku.name] The sku name. Possible values include: * 'NotSpecified', 'Free', 'Basic', 'Standard' */ constructor() { diff --git a/lib/services/logicManagement/lib/models/integrationAccountAgreement.js b/lib/services/logicManagement/lib/models/integrationAccountAgreement.js index 9d4151172d..22e4866d88 100644 --- a/lib/services/logicManagement/lib/models/integrationAccountAgreement.js +++ b/lib/services/logicManagement/lib/models/integrationAccountAgreement.js @@ -20,1533 +20,1538 @@ const models = require('./index'); class IntegrationAccountAgreement extends models['Resource'] { /** * Create a IntegrationAccountAgreement. - * @member {date} [createdTime] The created time. - * @member {date} [changedTime] The changed time. - * @member {object} [metadata] The metadata. - * @member {string} agreementType The agreement type. Possible values + * @property {date} [createdTime] The created time. + * @property {date} [changedTime] The changed time. + * @property {object} [metadata] The metadata. + * @property {string} agreementType The agreement type. Possible values * include: 'NotSpecified', 'AS2', 'X12', 'Edifact' - * @member {string} hostPartner The integration account partner that is set + * @property {string} hostPartner The integration account partner that is set * as host partner for this agreement. - * @member {string} guestPartner The integration account partner that is set - * as guest partner for this agreement. - * @member {object} hostIdentity The business identity of the host partner. - * @member {string} [hostIdentity.qualifier] The business identity qualifier - * e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [hostIdentity.value] The user defined business identity + * @property {string} guestPartner The integration account partner that is + * set as guest partner for this agreement. + * @property {object} hostIdentity The business identity of the host partner. + * @property {string} [hostIdentity.qualifier] The business identity + * qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 + * @property {string} [hostIdentity.value] The user defined business identity * value. - * @member {object} guestIdentity The business identity of the guest partner. - * @member {string} [guestIdentity.qualifier] The business identity qualifier - * e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [guestIdentity.value] The user defined business identity - * value. - * @member {object} content The agreement content. - * @member {object} [content.aS2] The AS2 agreement content. - * @member {object} [content.aS2.receiveAgreement] The AS2 one-way receive + * @property {object} guestIdentity The business identity of the guest + * partner. + * @property {string} [guestIdentity.qualifier] The business identity + * qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 + * @property {string} [guestIdentity.value] The user defined business + * identity value. + * @property {object} content The agreement content. + * @property {object} [content.aS2] The AS2 agreement content. + * @property {object} [content.aS2.receiveAgreement] The AS2 one-way receive * agreement. - * @member {object} [content.aS2.receiveAgreement.senderBusinessIdentity] The - * sender business identity - * @member {string} + * @property {object} [content.aS2.receiveAgreement.senderBusinessIdentity] + * The sender business identity + * @property {string} * [content.aS2.receiveAgreement.senderBusinessIdentity.qualifier] The * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} + * @property {string} * [content.aS2.receiveAgreement.senderBusinessIdentity.value] The user * defined business identity value. - * @member {object} [content.aS2.receiveAgreement.receiverBusinessIdentity] + * @property {object} [content.aS2.receiveAgreement.receiverBusinessIdentity] * The receiver business identity - * @member {string} + * @property {string} * [content.aS2.receiveAgreement.receiverBusinessIdentity.qualifier] The * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} + * @property {string} * [content.aS2.receiveAgreement.receiverBusinessIdentity.value] The user * defined business identity value. - * @member {object} [content.aS2.receiveAgreement.protocolSettings] The AS2 + * @property {object} [content.aS2.receiveAgreement.protocolSettings] The AS2 * protocol settings. - * @member {object} + * @property {object} * [content.aS2.receiveAgreement.protocolSettings.messageConnectionSettings] * The message connection settings. - * @member {boolean} + * @property {boolean} * [content.aS2.receiveAgreement.protocolSettings.messageConnectionSettings.ignoreCertificateNameMismatch] * The value indicating whether to ignore mismatch in certificate name. - * @member {boolean} + * @property {boolean} * [content.aS2.receiveAgreement.protocolSettings.messageConnectionSettings.supportHttpStatusCodeContinue] * The value indicating whether to support HTTP status code 'CONTINUE'. - * @member {boolean} + * @property {boolean} * [content.aS2.receiveAgreement.protocolSettings.messageConnectionSettings.keepHttpConnectionAlive] * The value indicating whether to keep the connection alive. - * @member {boolean} + * @property {boolean} * [content.aS2.receiveAgreement.protocolSettings.messageConnectionSettings.unfoldHttpHeaders] * The value indicating whether to unfold the HTTP headers. - * @member {object} + * @property {object} * [content.aS2.receiveAgreement.protocolSettings.acknowledgementConnectionSettings] * The acknowledgement connection settings. - * @member {boolean} + * @property {boolean} * [content.aS2.receiveAgreement.protocolSettings.acknowledgementConnectionSettings.ignoreCertificateNameMismatch] * The value indicating whether to ignore mismatch in certificate name. - * @member {boolean} + * @property {boolean} * [content.aS2.receiveAgreement.protocolSettings.acknowledgementConnectionSettings.supportHttpStatusCodeContinue] * The value indicating whether to support HTTP status code 'CONTINUE'. - * @member {boolean} + * @property {boolean} * [content.aS2.receiveAgreement.protocolSettings.acknowledgementConnectionSettings.keepHttpConnectionAlive] * The value indicating whether to keep the connection alive. - * @member {boolean} + * @property {boolean} * [content.aS2.receiveAgreement.protocolSettings.acknowledgementConnectionSettings.unfoldHttpHeaders] * The value indicating whether to unfold the HTTP headers. - * @member {object} + * @property {object} * [content.aS2.receiveAgreement.protocolSettings.mdnSettings] The MDN * settings. - * @member {boolean} + * @property {boolean} * [content.aS2.receiveAgreement.protocolSettings.mdnSettings.needMdn] The * value indicating whether to send or request a MDN. - * @member {boolean} + * @property {boolean} * [content.aS2.receiveAgreement.protocolSettings.mdnSettings.signMdn] The * value indicating whether the MDN needs to be signed or not. - * @member {boolean} + * @property {boolean} * [content.aS2.receiveAgreement.protocolSettings.mdnSettings.sendMdnAsynchronously] * The value indicating whether to send the asynchronous MDN. - * @member {string} + * @property {string} * [content.aS2.receiveAgreement.protocolSettings.mdnSettings.receiptDeliveryUrl] * The receipt delivery URL. - * @member {string} + * @property {string} * [content.aS2.receiveAgreement.protocolSettings.mdnSettings.dispositionNotificationTo] * The disposition notification to header value. - * @member {boolean} + * @property {boolean} * [content.aS2.receiveAgreement.protocolSettings.mdnSettings.signOutboundMdnIfOptional] * The value indicating whether to sign the outbound MDN if optional. - * @member {string} + * @property {string} * [content.aS2.receiveAgreement.protocolSettings.mdnSettings.mdnText] The * MDN text. - * @member {boolean} + * @property {boolean} * [content.aS2.receiveAgreement.protocolSettings.mdnSettings.sendInboundMdnToMessageBox] * The value indicating whether to send inbound MDN to message box. - * @member {string} + * @property {string} * [content.aS2.receiveAgreement.protocolSettings.mdnSettings.micHashingAlgorithm] * The signing or hashing algorithm. Possible values include: 'NotSpecified', * 'None', 'MD5', 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512' - * @member {object} + * @property {object} * [content.aS2.receiveAgreement.protocolSettings.securitySettings] The * security settings. - * @member {boolean} + * @property {boolean} * [content.aS2.receiveAgreement.protocolSettings.securitySettings.overrideGroupSigningCertificate] * The value indicating whether to send or request a MDN. - * @member {string} + * @property {string} * [content.aS2.receiveAgreement.protocolSettings.securitySettings.signingCertificateName] * The name of the signing certificate. - * @member {string} + * @property {string} * [content.aS2.receiveAgreement.protocolSettings.securitySettings.encryptionCertificateName] * The name of the encryption certificate. - * @member {boolean} + * @property {boolean} * [content.aS2.receiveAgreement.protocolSettings.securitySettings.enableNrrForInboundEncodedMessages] * The value indicating whether to enable NRR for inbound encoded messages. - * @member {boolean} + * @property {boolean} * [content.aS2.receiveAgreement.protocolSettings.securitySettings.enableNrrForInboundDecodedMessages] * The value indicating whether to enable NRR for inbound decoded messages. - * @member {boolean} + * @property {boolean} * [content.aS2.receiveAgreement.protocolSettings.securitySettings.enableNrrForOutboundMdn] * The value indicating whether to enable NRR for outbound MDN. - * @member {boolean} + * @property {boolean} * [content.aS2.receiveAgreement.protocolSettings.securitySettings.enableNrrForOutboundEncodedMessages] * The value indicating whether to enable NRR for outbound encoded messages. - * @member {boolean} + * @property {boolean} * [content.aS2.receiveAgreement.protocolSettings.securitySettings.enableNrrForOutboundDecodedMessages] * The value indicating whether to enable NRR for outbound decoded messages. - * @member {boolean} + * @property {boolean} * [content.aS2.receiveAgreement.protocolSettings.securitySettings.enableNrrForInboundMdn] * The value indicating whether to enable NRR for inbound MDN. - * @member {string} + * @property {string} * [content.aS2.receiveAgreement.protocolSettings.securitySettings.sha2AlgorithmFormat] * The Sha2 algorithm format. Valid values are Sha2, ShaHashSize, * ShaHyphenHashSize, Sha2UnderscoreHashSize. - * @member {object} + * @property {object} * [content.aS2.receiveAgreement.protocolSettings.validationSettings] The * validation settings. - * @member {boolean} + * @property {boolean} * [content.aS2.receiveAgreement.protocolSettings.validationSettings.overrideMessageProperties] * The value indicating whether to override incoming message properties with * those in agreement. - * @member {boolean} + * @property {boolean} * [content.aS2.receiveAgreement.protocolSettings.validationSettings.encryptMessage] * The value indicating whether the message has to be encrypted. - * @member {boolean} + * @property {boolean} * [content.aS2.receiveAgreement.protocolSettings.validationSettings.signMessage] * The value indicating whether the message has to be signed. - * @member {boolean} + * @property {boolean} * [content.aS2.receiveAgreement.protocolSettings.validationSettings.compressMessage] * The value indicating whether the message has to be compressed. - * @member {boolean} + * @property {boolean} * [content.aS2.receiveAgreement.protocolSettings.validationSettings.checkDuplicateMessage] * The value indicating whether to check for duplicate message. - * @member {number} + * @property {number} * [content.aS2.receiveAgreement.protocolSettings.validationSettings.interchangeDuplicatesValidityDays] * The number of days to look back for duplicate interchange. - * @member {boolean} + * @property {boolean} * [content.aS2.receiveAgreement.protocolSettings.validationSettings.checkCertificateRevocationListOnSend] * The value indicating whether to check for certificate revocation list on * send. - * @member {boolean} + * @property {boolean} * [content.aS2.receiveAgreement.protocolSettings.validationSettings.checkCertificateRevocationListOnReceive] * The value indicating whether to check for certificate revocation list on * receive. - * @member {string} + * @property {string} * [content.aS2.receiveAgreement.protocolSettings.validationSettings.encryptionAlgorithm] * The encryption algorithm. Possible values include: 'NotSpecified', 'None', * 'DES3', 'RC2', 'AES128', 'AES192', 'AES256' - * @member {string} + * @property {string} * [content.aS2.receiveAgreement.protocolSettings.validationSettings.signingAlgorithm] * The signing algorithm. Possible values include: 'NotSpecified', 'Default', * 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512' - * @member {object} + * @property {object} * [content.aS2.receiveAgreement.protocolSettings.envelopeSettings] The * envelope settings. - * @member {string} + * @property {string} * [content.aS2.receiveAgreement.protocolSettings.envelopeSettings.messageContentType] * The message content type. - * @member {boolean} + * @property {boolean} * [content.aS2.receiveAgreement.protocolSettings.envelopeSettings.transmitFileNameInMimeHeader] * The value indicating whether to transmit file name in mime header. - * @member {string} + * @property {string} * [content.aS2.receiveAgreement.protocolSettings.envelopeSettings.fileNameTemplate] * The template for file name. - * @member {boolean} + * @property {boolean} * [content.aS2.receiveAgreement.protocolSettings.envelopeSettings.suspendMessageOnFileNameGenerationError] * The value indicating whether to suspend message on file name generation * error. - * @member {boolean} + * @property {boolean} * [content.aS2.receiveAgreement.protocolSettings.envelopeSettings.autogenerateFileName] * The value indicating whether to auto generate file name. - * @member {object} + * @property {object} * [content.aS2.receiveAgreement.protocolSettings.errorSettings] The error * settings. - * @member {boolean} + * @property {boolean} * [content.aS2.receiveAgreement.protocolSettings.errorSettings.suspendDuplicateMessage] * The value indicating whether to suspend duplicate message. - * @member {boolean} + * @property {boolean} * [content.aS2.receiveAgreement.protocolSettings.errorSettings.resendIfMdnNotReceived] * The value indicating whether to resend message If MDN is not received. - * @member {object} [content.aS2.sendAgreement] The AS2 one-way send + * @property {object} [content.aS2.sendAgreement] The AS2 one-way send * agreement. - * @member {object} [content.aS2.sendAgreement.senderBusinessIdentity] The + * @property {object} [content.aS2.sendAgreement.senderBusinessIdentity] The * sender business identity - * @member {string} + * @property {string} * [content.aS2.sendAgreement.senderBusinessIdentity.qualifier] The business * identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [content.aS2.sendAgreement.senderBusinessIdentity.value] - * The user defined business identity value. - * @member {object} [content.aS2.sendAgreement.receiverBusinessIdentity] The - * receiver business identity - * @member {string} + * @property {string} + * [content.aS2.sendAgreement.senderBusinessIdentity.value] The user defined + * business identity value. + * @property {object} [content.aS2.sendAgreement.receiverBusinessIdentity] + * The receiver business identity + * @property {string} * [content.aS2.sendAgreement.receiverBusinessIdentity.qualifier] The * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} + * @property {string} * [content.aS2.sendAgreement.receiverBusinessIdentity.value] The user * defined business identity value. - * @member {object} [content.aS2.sendAgreement.protocolSettings] The AS2 + * @property {object} [content.aS2.sendAgreement.protocolSettings] The AS2 * protocol settings. - * @member {object} + * @property {object} * [content.aS2.sendAgreement.protocolSettings.messageConnectionSettings] The * message connection settings. - * @member {boolean} + * @property {boolean} * [content.aS2.sendAgreement.protocolSettings.messageConnectionSettings.ignoreCertificateNameMismatch] * The value indicating whether to ignore mismatch in certificate name. - * @member {boolean} + * @property {boolean} * [content.aS2.sendAgreement.protocolSettings.messageConnectionSettings.supportHttpStatusCodeContinue] * The value indicating whether to support HTTP status code 'CONTINUE'. - * @member {boolean} + * @property {boolean} * [content.aS2.sendAgreement.protocolSettings.messageConnectionSettings.keepHttpConnectionAlive] * The value indicating whether to keep the connection alive. - * @member {boolean} + * @property {boolean} * [content.aS2.sendAgreement.protocolSettings.messageConnectionSettings.unfoldHttpHeaders] * The value indicating whether to unfold the HTTP headers. - * @member {object} + * @property {object} * [content.aS2.sendAgreement.protocolSettings.acknowledgementConnectionSettings] * The acknowledgement connection settings. - * @member {boolean} + * @property {boolean} * [content.aS2.sendAgreement.protocolSettings.acknowledgementConnectionSettings.ignoreCertificateNameMismatch] * The value indicating whether to ignore mismatch in certificate name. - * @member {boolean} + * @property {boolean} * [content.aS2.sendAgreement.protocolSettings.acknowledgementConnectionSettings.supportHttpStatusCodeContinue] * The value indicating whether to support HTTP status code 'CONTINUE'. - * @member {boolean} + * @property {boolean} * [content.aS2.sendAgreement.protocolSettings.acknowledgementConnectionSettings.keepHttpConnectionAlive] * The value indicating whether to keep the connection alive. - * @member {boolean} + * @property {boolean} * [content.aS2.sendAgreement.protocolSettings.acknowledgementConnectionSettings.unfoldHttpHeaders] * The value indicating whether to unfold the HTTP headers. - * @member {object} [content.aS2.sendAgreement.protocolSettings.mdnSettings] - * The MDN settings. - * @member {boolean} + * @property {object} + * [content.aS2.sendAgreement.protocolSettings.mdnSettings] The MDN settings. + * @property {boolean} * [content.aS2.sendAgreement.protocolSettings.mdnSettings.needMdn] The value * indicating whether to send or request a MDN. - * @member {boolean} + * @property {boolean} * [content.aS2.sendAgreement.protocolSettings.mdnSettings.signMdn] The value * indicating whether the MDN needs to be signed or not. - * @member {boolean} + * @property {boolean} * [content.aS2.sendAgreement.protocolSettings.mdnSettings.sendMdnAsynchronously] * The value indicating whether to send the asynchronous MDN. - * @member {string} + * @property {string} * [content.aS2.sendAgreement.protocolSettings.mdnSettings.receiptDeliveryUrl] * The receipt delivery URL. - * @member {string} + * @property {string} * [content.aS2.sendAgreement.protocolSettings.mdnSettings.dispositionNotificationTo] * The disposition notification to header value. - * @member {boolean} + * @property {boolean} * [content.aS2.sendAgreement.protocolSettings.mdnSettings.signOutboundMdnIfOptional] * The value indicating whether to sign the outbound MDN if optional. - * @member {string} + * @property {string} * [content.aS2.sendAgreement.protocolSettings.mdnSettings.mdnText] The MDN * text. - * @member {boolean} + * @property {boolean} * [content.aS2.sendAgreement.protocolSettings.mdnSettings.sendInboundMdnToMessageBox] * The value indicating whether to send inbound MDN to message box. - * @member {string} + * @property {string} * [content.aS2.sendAgreement.protocolSettings.mdnSettings.micHashingAlgorithm] * The signing or hashing algorithm. Possible values include: 'NotSpecified', * 'None', 'MD5', 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512' - * @member {object} + * @property {object} * [content.aS2.sendAgreement.protocolSettings.securitySettings] The security * settings. - * @member {boolean} + * @property {boolean} * [content.aS2.sendAgreement.protocolSettings.securitySettings.overrideGroupSigningCertificate] * The value indicating whether to send or request a MDN. - * @member {string} + * @property {string} * [content.aS2.sendAgreement.protocolSettings.securitySettings.signingCertificateName] * The name of the signing certificate. - * @member {string} + * @property {string} * [content.aS2.sendAgreement.protocolSettings.securitySettings.encryptionCertificateName] * The name of the encryption certificate. - * @member {boolean} + * @property {boolean} * [content.aS2.sendAgreement.protocolSettings.securitySettings.enableNrrForInboundEncodedMessages] * The value indicating whether to enable NRR for inbound encoded messages. - * @member {boolean} + * @property {boolean} * [content.aS2.sendAgreement.protocolSettings.securitySettings.enableNrrForInboundDecodedMessages] * The value indicating whether to enable NRR for inbound decoded messages. - * @member {boolean} + * @property {boolean} * [content.aS2.sendAgreement.protocolSettings.securitySettings.enableNrrForOutboundMdn] * The value indicating whether to enable NRR for outbound MDN. - * @member {boolean} + * @property {boolean} * [content.aS2.sendAgreement.protocolSettings.securitySettings.enableNrrForOutboundEncodedMessages] * The value indicating whether to enable NRR for outbound encoded messages. - * @member {boolean} + * @property {boolean} * [content.aS2.sendAgreement.protocolSettings.securitySettings.enableNrrForOutboundDecodedMessages] * The value indicating whether to enable NRR for outbound decoded messages. - * @member {boolean} + * @property {boolean} * [content.aS2.sendAgreement.protocolSettings.securitySettings.enableNrrForInboundMdn] * The value indicating whether to enable NRR for inbound MDN. - * @member {string} + * @property {string} * [content.aS2.sendAgreement.protocolSettings.securitySettings.sha2AlgorithmFormat] * The Sha2 algorithm format. Valid values are Sha2, ShaHashSize, * ShaHyphenHashSize, Sha2UnderscoreHashSize. - * @member {object} + * @property {object} * [content.aS2.sendAgreement.protocolSettings.validationSettings] The * validation settings. - * @member {boolean} + * @property {boolean} * [content.aS2.sendAgreement.protocolSettings.validationSettings.overrideMessageProperties] * The value indicating whether to override incoming message properties with * those in agreement. - * @member {boolean} + * @property {boolean} * [content.aS2.sendAgreement.protocolSettings.validationSettings.encryptMessage] * The value indicating whether the message has to be encrypted. - * @member {boolean} + * @property {boolean} * [content.aS2.sendAgreement.protocolSettings.validationSettings.signMessage] * The value indicating whether the message has to be signed. - * @member {boolean} + * @property {boolean} * [content.aS2.sendAgreement.protocolSettings.validationSettings.compressMessage] * The value indicating whether the message has to be compressed. - * @member {boolean} + * @property {boolean} * [content.aS2.sendAgreement.protocolSettings.validationSettings.checkDuplicateMessage] * The value indicating whether to check for duplicate message. - * @member {number} + * @property {number} * [content.aS2.sendAgreement.protocolSettings.validationSettings.interchangeDuplicatesValidityDays] * The number of days to look back for duplicate interchange. - * @member {boolean} + * @property {boolean} * [content.aS2.sendAgreement.protocolSettings.validationSettings.checkCertificateRevocationListOnSend] * The value indicating whether to check for certificate revocation list on * send. - * @member {boolean} + * @property {boolean} * [content.aS2.sendAgreement.protocolSettings.validationSettings.checkCertificateRevocationListOnReceive] * The value indicating whether to check for certificate revocation list on * receive. - * @member {string} + * @property {string} * [content.aS2.sendAgreement.protocolSettings.validationSettings.encryptionAlgorithm] * The encryption algorithm. Possible values include: 'NotSpecified', 'None', * 'DES3', 'RC2', 'AES128', 'AES192', 'AES256' - * @member {string} + * @property {string} * [content.aS2.sendAgreement.protocolSettings.validationSettings.signingAlgorithm] * The signing algorithm. Possible values include: 'NotSpecified', 'Default', * 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512' - * @member {object} + * @property {object} * [content.aS2.sendAgreement.protocolSettings.envelopeSettings] The envelope * settings. - * @member {string} + * @property {string} * [content.aS2.sendAgreement.protocolSettings.envelopeSettings.messageContentType] * The message content type. - * @member {boolean} + * @property {boolean} * [content.aS2.sendAgreement.protocolSettings.envelopeSettings.transmitFileNameInMimeHeader] * The value indicating whether to transmit file name in mime header. - * @member {string} + * @property {string} * [content.aS2.sendAgreement.protocolSettings.envelopeSettings.fileNameTemplate] * The template for file name. - * @member {boolean} + * @property {boolean} * [content.aS2.sendAgreement.protocolSettings.envelopeSettings.suspendMessageOnFileNameGenerationError] * The value indicating whether to suspend message on file name generation * error. - * @member {boolean} + * @property {boolean} * [content.aS2.sendAgreement.protocolSettings.envelopeSettings.autogenerateFileName] * The value indicating whether to auto generate file name. - * @member {object} + * @property {object} * [content.aS2.sendAgreement.protocolSettings.errorSettings] The error * settings. - * @member {boolean} + * @property {boolean} * [content.aS2.sendAgreement.protocolSettings.errorSettings.suspendDuplicateMessage] * The value indicating whether to suspend duplicate message. - * @member {boolean} + * @property {boolean} * [content.aS2.sendAgreement.protocolSettings.errorSettings.resendIfMdnNotReceived] * The value indicating whether to resend message If MDN is not received. - * @member {object} [content.x12] The X12 agreement content. - * @member {object} [content.x12.receiveAgreement] The X12 one-way receive + * @property {object} [content.x12] The X12 agreement content. + * @property {object} [content.x12.receiveAgreement] The X12 one-way receive * agreement. - * @member {object} [content.x12.receiveAgreement.senderBusinessIdentity] The - * sender business identity - * @member {string} + * @property {object} [content.x12.receiveAgreement.senderBusinessIdentity] + * The sender business identity + * @property {string} * [content.x12.receiveAgreement.senderBusinessIdentity.qualifier] The * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} + * @property {string} * [content.x12.receiveAgreement.senderBusinessIdentity.value] The user * defined business identity value. - * @member {object} [content.x12.receiveAgreement.receiverBusinessIdentity] + * @property {object} [content.x12.receiveAgreement.receiverBusinessIdentity] * The receiver business identity - * @member {string} + * @property {string} * [content.x12.receiveAgreement.receiverBusinessIdentity.qualifier] The * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} + * @property {string} * [content.x12.receiveAgreement.receiverBusinessIdentity.value] The user * defined business identity value. - * @member {object} [content.x12.receiveAgreement.protocolSettings] The X12 + * @property {object} [content.x12.receiveAgreement.protocolSettings] The X12 * protocol settings. - * @member {object} + * @property {object} * [content.x12.receiveAgreement.protocolSettings.validationSettings] The X12 * validation settings. - * @member {boolean} + * @property {boolean} * [content.x12.receiveAgreement.protocolSettings.validationSettings.validateCharacterSet] * The value indicating whether to validate character set in the message. - * @member {boolean} + * @property {boolean} * [content.x12.receiveAgreement.protocolSettings.validationSettings.checkDuplicateInterchangeControlNumber] * The value indicating whether to check for duplicate interchange control * number. - * @member {number} + * @property {number} * [content.x12.receiveAgreement.protocolSettings.validationSettings.interchangeControlNumberValidityDays] * The validity period of interchange control number. - * @member {boolean} + * @property {boolean} * [content.x12.receiveAgreement.protocolSettings.validationSettings.checkDuplicateGroupControlNumber] * The value indicating whether to check for duplicate group control number. - * @member {boolean} + * @property {boolean} * [content.x12.receiveAgreement.protocolSettings.validationSettings.checkDuplicateTransactionSetControlNumber] * The value indicating whether to check for duplicate transaction set * control number. - * @member {boolean} + * @property {boolean} * [content.x12.receiveAgreement.protocolSettings.validationSettings.validateEdiTypes] * The value indicating whether to Whether to validate EDI types. - * @member {boolean} + * @property {boolean} * [content.x12.receiveAgreement.protocolSettings.validationSettings.validateXsdTypes] * The value indicating whether to Whether to validate XSD types. - * @member {boolean} + * @property {boolean} * [content.x12.receiveAgreement.protocolSettings.validationSettings.allowLeadingAndTrailingSpacesAndZeroes] * The value indicating whether to allow leading and trailing spaces and * zeroes. - * @member {boolean} + * @property {boolean} * [content.x12.receiveAgreement.protocolSettings.validationSettings.trimLeadingAndTrailingSpacesAndZeroes] * The value indicating whether to trim leading and trailing spaces and * zeroes. - * @member {string} + * @property {string} * [content.x12.receiveAgreement.protocolSettings.validationSettings.trailingSeparatorPolicy] * The trailing separator policy. Possible values include: 'NotSpecified', * 'NotAllowed', 'Optional', 'Mandatory' - * @member {object} + * @property {object} * [content.x12.receiveAgreement.protocolSettings.framingSettings] The X12 * framing settings. - * @member {number} + * @property {number} * [content.x12.receiveAgreement.protocolSettings.framingSettings.dataElementSeparator] * The data element separator. - * @member {number} + * @property {number} * [content.x12.receiveAgreement.protocolSettings.framingSettings.componentSeparator] * The component separator. - * @member {boolean} + * @property {boolean} * [content.x12.receiveAgreement.protocolSettings.framingSettings.replaceSeparatorsInPayload] * The value indicating whether to replace separators in payload. - * @member {number} + * @property {number} * [content.x12.receiveAgreement.protocolSettings.framingSettings.replaceCharacter] * The replacement character. - * @member {number} + * @property {number} * [content.x12.receiveAgreement.protocolSettings.framingSettings.segmentTerminator] * The segment terminator. - * @member {string} + * @property {string} * [content.x12.receiveAgreement.protocolSettings.framingSettings.characterSet] * The X12 character set. Possible values include: 'NotSpecified', 'Basic', * 'Extended', 'UTF8' - * @member {string} + * @property {string} * [content.x12.receiveAgreement.protocolSettings.framingSettings.segmentTerminatorSuffix] * The segment terminator suffix. Possible values include: 'NotSpecified', * 'None', 'CR', 'LF', 'CRLF' - * @member {object} + * @property {object} * [content.x12.receiveAgreement.protocolSettings.envelopeSettings] The X12 * envelope settings. - * @member {number} + * @property {number} * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.controlStandardsId] * The controls standards id. - * @member {boolean} + * @property {boolean} * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.useControlStandardsIdAsRepetitionCharacter] * The value indicating whether to use control standards id as repetition * character. - * @member {string} + * @property {string} * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.senderApplicationId] * The sender application id. - * @member {string} + * @property {string} * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.receiverApplicationId] * The receiver application id. - * @member {string} + * @property {string} * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.controlVersionNumber] * The control version number. - * @member {number} + * @property {number} * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.interchangeControlNumberLowerBound] * The interchange control number lower bound. - * @member {number} + * @property {number} * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.interchangeControlNumberUpperBound] * The interchange control number upper bound. - * @member {boolean} + * @property {boolean} * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.rolloverInterchangeControlNumber] * The value indicating whether to rollover interchange control number. - * @member {boolean} + * @property {boolean} * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.enableDefaultGroupHeaders] * The value indicating whether to enable default group headers. - * @member {string} + * @property {string} * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.functionalGroupId] * The functional group id. - * @member {number} + * @property {number} * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.groupControlNumberLowerBound] * The group control number lower bound. - * @member {number} + * @property {number} * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.groupControlNumberUpperBound] * The group control number upper bound. - * @member {boolean} + * @property {boolean} * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.rolloverGroupControlNumber] * The value indicating whether to rollover group control number. - * @member {string} + * @property {string} * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.groupHeaderAgencyCode] * The group header agency code. - * @member {string} + * @property {string} * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.groupHeaderVersion] * The group header version. - * @member {number} + * @property {number} * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberLowerBound] * The transaction set control number lower bound. - * @member {number} + * @property {number} * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberUpperBound] * The transaction set control number upper bound. - * @member {boolean} + * @property {boolean} * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.rolloverTransactionSetControlNumber] * The value indicating whether to rollover transaction set control number. - * @member {string} + * @property {string} * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberPrefix] * The transaction set control number prefix. - * @member {string} + * @property {string} * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberSuffix] * The transaction set control number suffix. - * @member {boolean} + * @property {boolean} * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.overwriteExistingTransactionSetControlNumber] * The value indicating whether to overwrite existing transaction set control * number. - * @member {string} + * @property {string} * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.groupHeaderDateFormat] * The group header date format. Possible values include: 'NotSpecified', * 'CCYYMMDD', 'YYMMDD' - * @member {string} + * @property {string} * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.groupHeaderTimeFormat] * The group header time format. Possible values include: 'NotSpecified', * 'HHMM', 'HHMMSS', 'HHMMSSdd', 'HHMMSSd' - * @member {string} + * @property {string} * [content.x12.receiveAgreement.protocolSettings.envelopeSettings.usageIndicator] * The usage indicator. Possible values include: 'NotSpecified', 'Test', * 'Information', 'Production' - * @member {object} + * @property {object} * [content.x12.receiveAgreement.protocolSettings.acknowledgementSettings] * The X12 acknowledgment settings. - * @member {boolean} + * @property {boolean} * [content.x12.receiveAgreement.protocolSettings.acknowledgementSettings.needTechnicalAcknowledgement] * The value indicating whether technical acknowledgement is needed. - * @member {boolean} + * @property {boolean} * [content.x12.receiveAgreement.protocolSettings.acknowledgementSettings.batchTechnicalAcknowledgements] * The value indicating whether to batch the technical acknowledgements. - * @member {boolean} + * @property {boolean} * [content.x12.receiveAgreement.protocolSettings.acknowledgementSettings.needFunctionalAcknowledgement] * The value indicating whether functional acknowledgement is needed. - * @member {string} + * @property {string} * [content.x12.receiveAgreement.protocolSettings.acknowledgementSettings.functionalAcknowledgementVersion] * The functional acknowledgement version. - * @member {boolean} + * @property {boolean} * [content.x12.receiveAgreement.protocolSettings.acknowledgementSettings.batchFunctionalAcknowledgements] * The value indicating whether to batch functional acknowledgements. - * @member {boolean} + * @property {boolean} * [content.x12.receiveAgreement.protocolSettings.acknowledgementSettings.needImplementationAcknowledgement] * The value indicating whether implementation acknowledgement is needed. - * @member {string} + * @property {string} * [content.x12.receiveAgreement.protocolSettings.acknowledgementSettings.implementationAcknowledgementVersion] * The implementation acknowledgement version. - * @member {boolean} + * @property {boolean} * [content.x12.receiveAgreement.protocolSettings.acknowledgementSettings.batchImplementationAcknowledgements] * The value indicating whether to batch implementation acknowledgements. - * @member {boolean} + * @property {boolean} * [content.x12.receiveAgreement.protocolSettings.acknowledgementSettings.needLoopForValidMessages] * The value indicating whether a loop is needed for valid messages. - * @member {boolean} + * @property {boolean} * [content.x12.receiveAgreement.protocolSettings.acknowledgementSettings.sendSynchronousAcknowledgement] * The value indicating whether to send synchronous acknowledgement. - * @member {string} + * @property {string} * [content.x12.receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberPrefix] * The acknowledgement control number prefix. - * @member {string} + * @property {string} * [content.x12.receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberSuffix] * The acknowledgement control number suffix. - * @member {number} + * @property {number} * [content.x12.receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberLowerBound] * The acknowledgement control number lower bound. - * @member {number} + * @property {number} * [content.x12.receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberUpperBound] * The acknowledgement control number upper bound. - * @member {boolean} + * @property {boolean} * [content.x12.receiveAgreement.protocolSettings.acknowledgementSettings.rolloverAcknowledgementControlNumber] * The value indicating whether to rollover acknowledgement control number. - * @member {object} + * @property {object} * [content.x12.receiveAgreement.protocolSettings.messageFilter] The X12 * message filter. - * @member {string} + * @property {string} * [content.x12.receiveAgreement.protocolSettings.messageFilter.messageFilterType] * The message filter type. Possible values include: 'NotSpecified', * 'Include', 'Exclude' - * @member {object} + * @property {object} * [content.x12.receiveAgreement.protocolSettings.securitySettings] The X12 * security settings. - * @member {string} + * @property {string} * [content.x12.receiveAgreement.protocolSettings.securitySettings.authorizationQualifier] * The authorization qualifier. - * @member {string} + * @property {string} * [content.x12.receiveAgreement.protocolSettings.securitySettings.authorizationValue] * The authorization value. - * @member {string} + * @property {string} * [content.x12.receiveAgreement.protocolSettings.securitySettings.securityQualifier] * The security qualifier. - * @member {string} + * @property {string} * [content.x12.receiveAgreement.protocolSettings.securitySettings.passwordValue] * The password value. - * @member {object} + * @property {object} * [content.x12.receiveAgreement.protocolSettings.processingSettings] The X12 * processing settings. - * @member {boolean} + * @property {boolean} * [content.x12.receiveAgreement.protocolSettings.processingSettings.maskSecurityInfo] * The value indicating whether to mask security information. - * @member {boolean} + * @property {boolean} * [content.x12.receiveAgreement.protocolSettings.processingSettings.convertImpliedDecimal] * The value indicating whether to convert numerical type to implied decimal. - * @member {boolean} + * @property {boolean} * [content.x12.receiveAgreement.protocolSettings.processingSettings.preserveInterchange] * The value indicating whether to preserve interchange. - * @member {boolean} + * @property {boolean} * [content.x12.receiveAgreement.protocolSettings.processingSettings.suspendInterchangeOnError] * The value indicating whether to suspend interchange on error. - * @member {boolean} + * @property {boolean} * [content.x12.receiveAgreement.protocolSettings.processingSettings.createEmptyXmlTagsForTrailingSeparators] * The value indicating whether to create empty xml tags for trailing * separators. - * @member {boolean} + * @property {boolean} * [content.x12.receiveAgreement.protocolSettings.processingSettings.useDotAsDecimalSeparator] * The value indicating whether to use dot as decimal separator. - * @member {array} + * @property {array} * [content.x12.receiveAgreement.protocolSettings.envelopeOverrides] The X12 * envelope override settings. - * @member {array} + * @property {array} * [content.x12.receiveAgreement.protocolSettings.validationOverrides] The * X12 validation override settings. - * @member {array} + * @property {array} * [content.x12.receiveAgreement.protocolSettings.messageFilterList] The X12 * message filter list. - * @member {array} + * @property {array} * [content.x12.receiveAgreement.protocolSettings.schemaReferences] The X12 * schema references. - * @member {array} + * @property {array} * [content.x12.receiveAgreement.protocolSettings.x12DelimiterOverrides] The * X12 delimiter override settings. - * @member {object} [content.x12.sendAgreement] The X12 one-way send + * @property {object} [content.x12.sendAgreement] The X12 one-way send * agreement. - * @member {object} [content.x12.sendAgreement.senderBusinessIdentity] The + * @property {object} [content.x12.sendAgreement.senderBusinessIdentity] The * sender business identity - * @member {string} + * @property {string} * [content.x12.sendAgreement.senderBusinessIdentity.qualifier] The business * identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [content.x12.sendAgreement.senderBusinessIdentity.value] - * The user defined business identity value. - * @member {object} [content.x12.sendAgreement.receiverBusinessIdentity] The - * receiver business identity - * @member {string} + * @property {string} + * [content.x12.sendAgreement.senderBusinessIdentity.value] The user defined + * business identity value. + * @property {object} [content.x12.sendAgreement.receiverBusinessIdentity] + * The receiver business identity + * @property {string} * [content.x12.sendAgreement.receiverBusinessIdentity.qualifier] The * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} + * @property {string} * [content.x12.sendAgreement.receiverBusinessIdentity.value] The user * defined business identity value. - * @member {object} [content.x12.sendAgreement.protocolSettings] The X12 + * @property {object} [content.x12.sendAgreement.protocolSettings] The X12 * protocol settings. - * @member {object} + * @property {object} * [content.x12.sendAgreement.protocolSettings.validationSettings] The X12 * validation settings. - * @member {boolean} + * @property {boolean} * [content.x12.sendAgreement.protocolSettings.validationSettings.validateCharacterSet] * The value indicating whether to validate character set in the message. - * @member {boolean} + * @property {boolean} * [content.x12.sendAgreement.protocolSettings.validationSettings.checkDuplicateInterchangeControlNumber] * The value indicating whether to check for duplicate interchange control * number. - * @member {number} + * @property {number} * [content.x12.sendAgreement.protocolSettings.validationSettings.interchangeControlNumberValidityDays] * The validity period of interchange control number. - * @member {boolean} + * @property {boolean} * [content.x12.sendAgreement.protocolSettings.validationSettings.checkDuplicateGroupControlNumber] * The value indicating whether to check for duplicate group control number. - * @member {boolean} + * @property {boolean} * [content.x12.sendAgreement.protocolSettings.validationSettings.checkDuplicateTransactionSetControlNumber] * The value indicating whether to check for duplicate transaction set * control number. - * @member {boolean} + * @property {boolean} * [content.x12.sendAgreement.protocolSettings.validationSettings.validateEdiTypes] * The value indicating whether to Whether to validate EDI types. - * @member {boolean} + * @property {boolean} * [content.x12.sendAgreement.protocolSettings.validationSettings.validateXsdTypes] * The value indicating whether to Whether to validate XSD types. - * @member {boolean} + * @property {boolean} * [content.x12.sendAgreement.protocolSettings.validationSettings.allowLeadingAndTrailingSpacesAndZeroes] * The value indicating whether to allow leading and trailing spaces and * zeroes. - * @member {boolean} + * @property {boolean} * [content.x12.sendAgreement.protocolSettings.validationSettings.trimLeadingAndTrailingSpacesAndZeroes] * The value indicating whether to trim leading and trailing spaces and * zeroes. - * @member {string} + * @property {string} * [content.x12.sendAgreement.protocolSettings.validationSettings.trailingSeparatorPolicy] * The trailing separator policy. Possible values include: 'NotSpecified', * 'NotAllowed', 'Optional', 'Mandatory' - * @member {object} + * @property {object} * [content.x12.sendAgreement.protocolSettings.framingSettings] The X12 * framing settings. - * @member {number} + * @property {number} * [content.x12.sendAgreement.protocolSettings.framingSettings.dataElementSeparator] * The data element separator. - * @member {number} + * @property {number} * [content.x12.sendAgreement.protocolSettings.framingSettings.componentSeparator] * The component separator. - * @member {boolean} + * @property {boolean} * [content.x12.sendAgreement.protocolSettings.framingSettings.replaceSeparatorsInPayload] * The value indicating whether to replace separators in payload. - * @member {number} + * @property {number} * [content.x12.sendAgreement.protocolSettings.framingSettings.replaceCharacter] * The replacement character. - * @member {number} + * @property {number} * [content.x12.sendAgreement.protocolSettings.framingSettings.segmentTerminator] * The segment terminator. - * @member {string} + * @property {string} * [content.x12.sendAgreement.protocolSettings.framingSettings.characterSet] * The X12 character set. Possible values include: 'NotSpecified', 'Basic', * 'Extended', 'UTF8' - * @member {string} + * @property {string} * [content.x12.sendAgreement.protocolSettings.framingSettings.segmentTerminatorSuffix] * The segment terminator suffix. Possible values include: 'NotSpecified', * 'None', 'CR', 'LF', 'CRLF' - * @member {object} + * @property {object} * [content.x12.sendAgreement.protocolSettings.envelopeSettings] The X12 * envelope settings. - * @member {number} + * @property {number} * [content.x12.sendAgreement.protocolSettings.envelopeSettings.controlStandardsId] * The controls standards id. - * @member {boolean} + * @property {boolean} * [content.x12.sendAgreement.protocolSettings.envelopeSettings.useControlStandardsIdAsRepetitionCharacter] * The value indicating whether to use control standards id as repetition * character. - * @member {string} + * @property {string} * [content.x12.sendAgreement.protocolSettings.envelopeSettings.senderApplicationId] * The sender application id. - * @member {string} + * @property {string} * [content.x12.sendAgreement.protocolSettings.envelopeSettings.receiverApplicationId] * The receiver application id. - * @member {string} + * @property {string} * [content.x12.sendAgreement.protocolSettings.envelopeSettings.controlVersionNumber] * The control version number. - * @member {number} + * @property {number} * [content.x12.sendAgreement.protocolSettings.envelopeSettings.interchangeControlNumberLowerBound] * The interchange control number lower bound. - * @member {number} + * @property {number} * [content.x12.sendAgreement.protocolSettings.envelopeSettings.interchangeControlNumberUpperBound] * The interchange control number upper bound. - * @member {boolean} + * @property {boolean} * [content.x12.sendAgreement.protocolSettings.envelopeSettings.rolloverInterchangeControlNumber] * The value indicating whether to rollover interchange control number. - * @member {boolean} + * @property {boolean} * [content.x12.sendAgreement.protocolSettings.envelopeSettings.enableDefaultGroupHeaders] * The value indicating whether to enable default group headers. - * @member {string} + * @property {string} * [content.x12.sendAgreement.protocolSettings.envelopeSettings.functionalGroupId] * The functional group id. - * @member {number} + * @property {number} * [content.x12.sendAgreement.protocolSettings.envelopeSettings.groupControlNumberLowerBound] * The group control number lower bound. - * @member {number} + * @property {number} * [content.x12.sendAgreement.protocolSettings.envelopeSettings.groupControlNumberUpperBound] * The group control number upper bound. - * @member {boolean} + * @property {boolean} * [content.x12.sendAgreement.protocolSettings.envelopeSettings.rolloverGroupControlNumber] * The value indicating whether to rollover group control number. - * @member {string} + * @property {string} * [content.x12.sendAgreement.protocolSettings.envelopeSettings.groupHeaderAgencyCode] * The group header agency code. - * @member {string} + * @property {string} * [content.x12.sendAgreement.protocolSettings.envelopeSettings.groupHeaderVersion] * The group header version. - * @member {number} + * @property {number} * [content.x12.sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberLowerBound] * The transaction set control number lower bound. - * @member {number} + * @property {number} * [content.x12.sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberUpperBound] * The transaction set control number upper bound. - * @member {boolean} + * @property {boolean} * [content.x12.sendAgreement.protocolSettings.envelopeSettings.rolloverTransactionSetControlNumber] * The value indicating whether to rollover transaction set control number. - * @member {string} + * @property {string} * [content.x12.sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberPrefix] * The transaction set control number prefix. - * @member {string} + * @property {string} * [content.x12.sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberSuffix] * The transaction set control number suffix. - * @member {boolean} + * @property {boolean} * [content.x12.sendAgreement.protocolSettings.envelopeSettings.overwriteExistingTransactionSetControlNumber] * The value indicating whether to overwrite existing transaction set control * number. - * @member {string} + * @property {string} * [content.x12.sendAgreement.protocolSettings.envelopeSettings.groupHeaderDateFormat] * The group header date format. Possible values include: 'NotSpecified', * 'CCYYMMDD', 'YYMMDD' - * @member {string} + * @property {string} * [content.x12.sendAgreement.protocolSettings.envelopeSettings.groupHeaderTimeFormat] * The group header time format. Possible values include: 'NotSpecified', * 'HHMM', 'HHMMSS', 'HHMMSSdd', 'HHMMSSd' - * @member {string} + * @property {string} * [content.x12.sendAgreement.protocolSettings.envelopeSettings.usageIndicator] * The usage indicator. Possible values include: 'NotSpecified', 'Test', * 'Information', 'Production' - * @member {object} + * @property {object} * [content.x12.sendAgreement.protocolSettings.acknowledgementSettings] The * X12 acknowledgment settings. - * @member {boolean} + * @property {boolean} * [content.x12.sendAgreement.protocolSettings.acknowledgementSettings.needTechnicalAcknowledgement] * The value indicating whether technical acknowledgement is needed. - * @member {boolean} + * @property {boolean} * [content.x12.sendAgreement.protocolSettings.acknowledgementSettings.batchTechnicalAcknowledgements] * The value indicating whether to batch the technical acknowledgements. - * @member {boolean} + * @property {boolean} * [content.x12.sendAgreement.protocolSettings.acknowledgementSettings.needFunctionalAcknowledgement] * The value indicating whether functional acknowledgement is needed. - * @member {string} + * @property {string} * [content.x12.sendAgreement.protocolSettings.acknowledgementSettings.functionalAcknowledgementVersion] * The functional acknowledgement version. - * @member {boolean} + * @property {boolean} * [content.x12.sendAgreement.protocolSettings.acknowledgementSettings.batchFunctionalAcknowledgements] * The value indicating whether to batch functional acknowledgements. - * @member {boolean} + * @property {boolean} * [content.x12.sendAgreement.protocolSettings.acknowledgementSettings.needImplementationAcknowledgement] * The value indicating whether implementation acknowledgement is needed. - * @member {string} + * @property {string} * [content.x12.sendAgreement.protocolSettings.acknowledgementSettings.implementationAcknowledgementVersion] * The implementation acknowledgement version. - * @member {boolean} + * @property {boolean} * [content.x12.sendAgreement.protocolSettings.acknowledgementSettings.batchImplementationAcknowledgements] * The value indicating whether to batch implementation acknowledgements. - * @member {boolean} + * @property {boolean} * [content.x12.sendAgreement.protocolSettings.acknowledgementSettings.needLoopForValidMessages] * The value indicating whether a loop is needed for valid messages. - * @member {boolean} + * @property {boolean} * [content.x12.sendAgreement.protocolSettings.acknowledgementSettings.sendSynchronousAcknowledgement] * The value indicating whether to send synchronous acknowledgement. - * @member {string} + * @property {string} * [content.x12.sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberPrefix] * The acknowledgement control number prefix. - * @member {string} + * @property {string} * [content.x12.sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberSuffix] * The acknowledgement control number suffix. - * @member {number} + * @property {number} * [content.x12.sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberLowerBound] * The acknowledgement control number lower bound. - * @member {number} + * @property {number} * [content.x12.sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberUpperBound] * The acknowledgement control number upper bound. - * @member {boolean} + * @property {boolean} * [content.x12.sendAgreement.protocolSettings.acknowledgementSettings.rolloverAcknowledgementControlNumber] * The value indicating whether to rollover acknowledgement control number. - * @member {object} + * @property {object} * [content.x12.sendAgreement.protocolSettings.messageFilter] The X12 message * filter. - * @member {string} + * @property {string} * [content.x12.sendAgreement.protocolSettings.messageFilter.messageFilterType] * The message filter type. Possible values include: 'NotSpecified', * 'Include', 'Exclude' - * @member {object} + * @property {object} * [content.x12.sendAgreement.protocolSettings.securitySettings] The X12 * security settings. - * @member {string} + * @property {string} * [content.x12.sendAgreement.protocolSettings.securitySettings.authorizationQualifier] * The authorization qualifier. - * @member {string} + * @property {string} * [content.x12.sendAgreement.protocolSettings.securitySettings.authorizationValue] * The authorization value. - * @member {string} + * @property {string} * [content.x12.sendAgreement.protocolSettings.securitySettings.securityQualifier] * The security qualifier. - * @member {string} + * @property {string} * [content.x12.sendAgreement.protocolSettings.securitySettings.passwordValue] * The password value. - * @member {object} + * @property {object} * [content.x12.sendAgreement.protocolSettings.processingSettings] The X12 * processing settings. - * @member {boolean} + * @property {boolean} * [content.x12.sendAgreement.protocolSettings.processingSettings.maskSecurityInfo] * The value indicating whether to mask security information. - * @member {boolean} + * @property {boolean} * [content.x12.sendAgreement.protocolSettings.processingSettings.convertImpliedDecimal] * The value indicating whether to convert numerical type to implied decimal. - * @member {boolean} + * @property {boolean} * [content.x12.sendAgreement.protocolSettings.processingSettings.preserveInterchange] * The value indicating whether to preserve interchange. - * @member {boolean} + * @property {boolean} * [content.x12.sendAgreement.protocolSettings.processingSettings.suspendInterchangeOnError] * The value indicating whether to suspend interchange on error. - * @member {boolean} + * @property {boolean} * [content.x12.sendAgreement.protocolSettings.processingSettings.createEmptyXmlTagsForTrailingSeparators] * The value indicating whether to create empty xml tags for trailing * separators. - * @member {boolean} + * @property {boolean} * [content.x12.sendAgreement.protocolSettings.processingSettings.useDotAsDecimalSeparator] * The value indicating whether to use dot as decimal separator. - * @member {array} + * @property {array} * [content.x12.sendAgreement.protocolSettings.envelopeOverrides] The X12 * envelope override settings. - * @member {array} + * @property {array} * [content.x12.sendAgreement.protocolSettings.validationOverrides] The X12 * validation override settings. - * @member {array} + * @property {array} * [content.x12.sendAgreement.protocolSettings.messageFilterList] The X12 * message filter list. - * @member {array} + * @property {array} * [content.x12.sendAgreement.protocolSettings.schemaReferences] The X12 * schema references. - * @member {array} + * @property {array} * [content.x12.sendAgreement.protocolSettings.x12DelimiterOverrides] The X12 * delimiter override settings. - * @member {object} [content.edifact] The EDIFACT agreement content. - * @member {object} [content.edifact.receiveAgreement] The EDIFACT one-way + * @property {object} [content.edifact] The EDIFACT agreement content. + * @property {object} [content.edifact.receiveAgreement] The EDIFACT one-way * receive agreement. - * @member {object} [content.edifact.receiveAgreement.senderBusinessIdentity] - * The sender business identity - * @member {string} + * @property {object} + * [content.edifact.receiveAgreement.senderBusinessIdentity] The sender + * business identity + * @property {string} * [content.edifact.receiveAgreement.senderBusinessIdentity.qualifier] The * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} + * @property {string} * [content.edifact.receiveAgreement.senderBusinessIdentity.value] The user * defined business identity value. - * @member {object} + * @property {object} * [content.edifact.receiveAgreement.receiverBusinessIdentity] The receiver * business identity - * @member {string} + * @property {string} * [content.edifact.receiveAgreement.receiverBusinessIdentity.qualifier] The * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} + * @property {string} * [content.edifact.receiveAgreement.receiverBusinessIdentity.value] The user * defined business identity value. - * @member {object} [content.edifact.receiveAgreement.protocolSettings] The + * @property {object} [content.edifact.receiveAgreement.protocolSettings] The * EDIFACT protocol settings. - * @member {object} + * @property {object} * [content.edifact.receiveAgreement.protocolSettings.validationSettings] The * EDIFACT validation settings. - * @member {boolean} + * @property {boolean} * [content.edifact.receiveAgreement.protocolSettings.validationSettings.validateCharacterSet] * The value indicating whether to validate character set in the message. - * @member {boolean} + * @property {boolean} * [content.edifact.receiveAgreement.protocolSettings.validationSettings.checkDuplicateInterchangeControlNumber] * The value indicating whether to check for duplicate interchange control * number. - * @member {number} + * @property {number} * [content.edifact.receiveAgreement.protocolSettings.validationSettings.interchangeControlNumberValidityDays] * The validity period of interchange control number. - * @member {boolean} + * @property {boolean} * [content.edifact.receiveAgreement.protocolSettings.validationSettings.checkDuplicateGroupControlNumber] * The value indicating whether to check for duplicate group control number. - * @member {boolean} + * @property {boolean} * [content.edifact.receiveAgreement.protocolSettings.validationSettings.checkDuplicateTransactionSetControlNumber] * The value indicating whether to check for duplicate transaction set * control number. - * @member {boolean} + * @property {boolean} * [content.edifact.receiveAgreement.protocolSettings.validationSettings.validateEdiTypes] * The value indicating whether to Whether to validate EDI types. - * @member {boolean} + * @property {boolean} * [content.edifact.receiveAgreement.protocolSettings.validationSettings.validateXsdTypes] * The value indicating whether to Whether to validate XSD types. - * @member {boolean} + * @property {boolean} * [content.edifact.receiveAgreement.protocolSettings.validationSettings.allowLeadingAndTrailingSpacesAndZeroes] * The value indicating whether to allow leading and trailing spaces and * zeroes. - * @member {boolean} + * @property {boolean} * [content.edifact.receiveAgreement.protocolSettings.validationSettings.trimLeadingAndTrailingSpacesAndZeroes] * The value indicating whether to trim leading and trailing spaces and * zeroes. - * @member {string} + * @property {string} * [content.edifact.receiveAgreement.protocolSettings.validationSettings.trailingSeparatorPolicy] * The trailing separator policy. Possible values include: 'NotSpecified', * 'NotAllowed', 'Optional', 'Mandatory' - * @member {object} + * @property {object} * [content.edifact.receiveAgreement.protocolSettings.framingSettings] The * EDIFACT framing settings. - * @member {string} + * @property {string} * [content.edifact.receiveAgreement.protocolSettings.framingSettings.serviceCodeListDirectoryVersion] * The service code list directory version. - * @member {string} + * @property {string} * [content.edifact.receiveAgreement.protocolSettings.framingSettings.characterEncoding] * The character encoding. - * @member {number} + * @property {number} * [content.edifact.receiveAgreement.protocolSettings.framingSettings.protocolVersion] * The protocol version. - * @member {number} + * @property {number} * [content.edifact.receiveAgreement.protocolSettings.framingSettings.dataElementSeparator] * The data element separator. - * @member {number} + * @property {number} * [content.edifact.receiveAgreement.protocolSettings.framingSettings.componentSeparator] * The component separator. - * @member {number} + * @property {number} * [content.edifact.receiveAgreement.protocolSettings.framingSettings.segmentTerminator] * The segment terminator. - * @member {number} + * @property {number} * [content.edifact.receiveAgreement.protocolSettings.framingSettings.releaseIndicator] * The release indicator. - * @member {number} + * @property {number} * [content.edifact.receiveAgreement.protocolSettings.framingSettings.repetitionSeparator] * The repetition separator. - * @member {string} + * @property {string} * [content.edifact.receiveAgreement.protocolSettings.framingSettings.characterSet] * The EDIFACT frame setting characterSet. Possible values include: * 'NotSpecified', 'UNOB', 'UNOA', 'UNOC', 'UNOD', 'UNOE', 'UNOF', 'UNOG', * 'UNOH', 'UNOI', 'UNOJ', 'UNOK', 'UNOX', 'UNOY', 'KECA' - * @member {string} + * @property {string} * [content.edifact.receiveAgreement.protocolSettings.framingSettings.decimalPointIndicator] * The EDIFACT frame setting decimal indicator. Possible values include: * 'NotSpecified', 'Comma', 'Decimal' - * @member {string} + * @property {string} * [content.edifact.receiveAgreement.protocolSettings.framingSettings.segmentTerminatorSuffix] * The EDIFACT frame setting segment terminator suffix. Possible values * include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' - * @member {object} + * @property {object} * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings] The * EDIFACT envelope settings. - * @member {string} + * @property {string} * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.groupAssociationAssignedCode] * The group association assigned code. - * @member {string} + * @property {string} * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.communicationAgreementId] * The communication agreement id. - * @member {boolean} + * @property {boolean} * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.applyDelimiterStringAdvice] * The value indicating whether to apply delimiter string advice. - * @member {boolean} + * @property {boolean} * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.createGroupingSegments] * The value indicating whether to create grouping segments. - * @member {boolean} + * @property {boolean} * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.enableDefaultGroupHeaders] * The value indicating whether to enable default group headers. - * @member {string} + * @property {string} * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.recipientReferencePasswordValue] * The recipient reference password value. - * @member {string} + * @property {string} * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.recipientReferencePasswordQualifier] * The recipient reference password qualifier. - * @member {string} + * @property {string} * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.applicationReferenceId] * The application reference id. - * @member {string} + * @property {string} * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.processingPriorityCode] * The processing priority code. - * @member {number} + * @property {number} * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.interchangeControlNumberLowerBound] * The interchange control number lower bound. - * @member {number} + * @property {number} * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.interchangeControlNumberUpperBound] * The interchange control number upper bound. - * @member {boolean} + * @property {boolean} * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.rolloverInterchangeControlNumber] * The value indicating whether to rollover interchange control number. - * @member {string} + * @property {string} * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.interchangeControlNumberPrefix] * The interchange control number prefix. - * @member {string} + * @property {string} * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.interchangeControlNumberSuffix] * The interchange control number suffix. - * @member {string} + * @property {string} * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.senderReverseRoutingAddress] * The sender reverse routing address. - * @member {string} + * @property {string} * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.receiverReverseRoutingAddress] * The receiver reverse routing address. - * @member {string} + * @property {string} * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.functionalGroupId] * The functional group id. - * @member {string} + * @property {string} * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.groupControllingAgencyCode] * The group controlling agency code. - * @member {string} + * @property {string} * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.groupMessageVersion] * The group message version. - * @member {string} + * @property {string} * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.groupMessageRelease] * The group message release. - * @member {number} + * @property {number} * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.groupControlNumberLowerBound] * The group control number lower bound. - * @member {number} + * @property {number} * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.groupControlNumberUpperBound] * The group control number upper bound. - * @member {boolean} + * @property {boolean} * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.rolloverGroupControlNumber] * The value indicating whether to rollover group control number. - * @member {string} + * @property {string} * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.groupControlNumberPrefix] * The group control number prefix. - * @member {string} + * @property {string} * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.groupControlNumberSuffix] * The group control number suffix. - * @member {string} + * @property {string} * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.groupApplicationReceiverQualifier] * The group application receiver qualifier. - * @member {string} + * @property {string} * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.groupApplicationReceiverId] * The group application receiver id. - * @member {string} + * @property {string} * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.groupApplicationSenderQualifier] * The group application sender qualifier. - * @member {string} + * @property {string} * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.groupApplicationSenderId] * The group application sender id. - * @member {string} + * @property {string} * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.groupApplicationPassword] * The group application password. - * @member {boolean} + * @property {boolean} * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.overwriteExistingTransactionSetControlNumber] * The value indicating whether to overwrite existing transaction set control * number. - * @member {string} + * @property {string} * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberPrefix] * The transaction set control number prefix. - * @member {string} + * @property {string} * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberSuffix] * The transaction set control number suffix. - * @member {number} + * @property {number} * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberLowerBound] * The transaction set control number lower bound. - * @member {number} + * @property {number} * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberUpperBound] * The transaction set control number upper bound. - * @member {boolean} + * @property {boolean} * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.rolloverTransactionSetControlNumber] * The value indicating whether to rollover transaction set control number. - * @member {boolean} + * @property {boolean} * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.isTestInterchange] * The value indicating whether the message is a test interchange. - * @member {string} + * @property {string} * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.senderInternalIdentification] * The sender internal identification. - * @member {string} + * @property {string} * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.senderInternalSubIdentification] * The sender internal sub identification. - * @member {string} + * @property {string} * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.receiverInternalIdentification] * The receiver internal identification. - * @member {string} + * @property {string} * [content.edifact.receiveAgreement.protocolSettings.envelopeSettings.receiverInternalSubIdentification] * The receiver internal sub identification. - * @member {object} + * @property {object} * [content.edifact.receiveAgreement.protocolSettings.acknowledgementSettings] * The EDIFACT acknowledgement settings. - * @member {boolean} + * @property {boolean} * [content.edifact.receiveAgreement.protocolSettings.acknowledgementSettings.needTechnicalAcknowledgement] * The value indicating whether technical acknowledgement is needed. - * @member {boolean} + * @property {boolean} * [content.edifact.receiveAgreement.protocolSettings.acknowledgementSettings.batchTechnicalAcknowledgements] * The value indicating whether to batch the technical acknowledgements. - * @member {boolean} + * @property {boolean} * [content.edifact.receiveAgreement.protocolSettings.acknowledgementSettings.needFunctionalAcknowledgement] * The value indicating whether functional acknowledgement is needed. - * @member {boolean} + * @property {boolean} * [content.edifact.receiveAgreement.protocolSettings.acknowledgementSettings.batchFunctionalAcknowledgements] * The value indicating whether to batch functional acknowledgements. - * @member {boolean} + * @property {boolean} * [content.edifact.receiveAgreement.protocolSettings.acknowledgementSettings.needLoopForValidMessages] * The value indicating whether a loop is needed for valid messages. - * @member {boolean} + * @property {boolean} * [content.edifact.receiveAgreement.protocolSettings.acknowledgementSettings.sendSynchronousAcknowledgement] * The value indicating whether to send synchronous acknowledgement. - * @member {string} + * @property {string} * [content.edifact.receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberPrefix] * The acknowledgement control number prefix. - * @member {string} + * @property {string} * [content.edifact.receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberSuffix] * The acknowledgement control number suffix. - * @member {number} + * @property {number} * [content.edifact.receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberLowerBound] * The acknowledgement control number lower bound. - * @member {number} + * @property {number} * [content.edifact.receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberUpperBound] * The acknowledgement control number upper bound. - * @member {boolean} + * @property {boolean} * [content.edifact.receiveAgreement.protocolSettings.acknowledgementSettings.rolloverAcknowledgementControlNumber] * The value indicating whether to rollover acknowledgement control number. - * @member {object} + * @property {object} * [content.edifact.receiveAgreement.protocolSettings.messageFilter] The * EDIFACT message filter. - * @member {string} + * @property {string} * [content.edifact.receiveAgreement.protocolSettings.messageFilter.messageFilterType] * The message filter type. Possible values include: 'NotSpecified', * 'Include', 'Exclude' - * @member {object} + * @property {object} * [content.edifact.receiveAgreement.protocolSettings.processingSettings] The * EDIFACT processing Settings. - * @member {boolean} + * @property {boolean} * [content.edifact.receiveAgreement.protocolSettings.processingSettings.maskSecurityInfo] * The value indicating whether to mask security information. - * @member {boolean} + * @property {boolean} * [content.edifact.receiveAgreement.protocolSettings.processingSettings.preserveInterchange] * The value indicating whether to preserve interchange. - * @member {boolean} + * @property {boolean} * [content.edifact.receiveAgreement.protocolSettings.processingSettings.suspendInterchangeOnError] * The value indicating whether to suspend interchange on error. - * @member {boolean} + * @property {boolean} * [content.edifact.receiveAgreement.protocolSettings.processingSettings.createEmptyXmlTagsForTrailingSeparators] * The value indicating whether to create empty xml tags for trailing * separators. - * @member {boolean} + * @property {boolean} * [content.edifact.receiveAgreement.protocolSettings.processingSettings.useDotAsDecimalSeparator] * The value indicating whether to use dot as decimal separator. - * @member {array} + * @property {array} * [content.edifact.receiveAgreement.protocolSettings.envelopeOverrides] The * EDIFACT envelope override settings. - * @member {array} + * @property {array} * [content.edifact.receiveAgreement.protocolSettings.messageFilterList] The * EDIFACT message filter list. - * @member {array} + * @property {array} * [content.edifact.receiveAgreement.protocolSettings.schemaReferences] The * EDIFACT schema references. - * @member {array} + * @property {array} * [content.edifact.receiveAgreement.protocolSettings.validationOverrides] * The EDIFACT validation override settings. - * @member {array} + * @property {array} * [content.edifact.receiveAgreement.protocolSettings.edifactDelimiterOverrides] * The EDIFACT delimiter override settings. - * @member {object} [content.edifact.sendAgreement] The EDIFACT one-way send - * agreement. - * @member {object} [content.edifact.sendAgreement.senderBusinessIdentity] + * @property {object} [content.edifact.sendAgreement] The EDIFACT one-way + * send agreement. + * @property {object} [content.edifact.sendAgreement.senderBusinessIdentity] * The sender business identity - * @member {string} + * @property {string} * [content.edifact.sendAgreement.senderBusinessIdentity.qualifier] The * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} + * @property {string} * [content.edifact.sendAgreement.senderBusinessIdentity.value] The user * defined business identity value. - * @member {object} [content.edifact.sendAgreement.receiverBusinessIdentity] - * The receiver business identity - * @member {string} + * @property {object} + * [content.edifact.sendAgreement.receiverBusinessIdentity] The receiver + * business identity + * @property {string} * [content.edifact.sendAgreement.receiverBusinessIdentity.qualifier] The * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} + * @property {string} * [content.edifact.sendAgreement.receiverBusinessIdentity.value] The user * defined business identity value. - * @member {object} [content.edifact.sendAgreement.protocolSettings] The + * @property {object} [content.edifact.sendAgreement.protocolSettings] The * EDIFACT protocol settings. - * @member {object} + * @property {object} * [content.edifact.sendAgreement.protocolSettings.validationSettings] The * EDIFACT validation settings. - * @member {boolean} + * @property {boolean} * [content.edifact.sendAgreement.protocolSettings.validationSettings.validateCharacterSet] * The value indicating whether to validate character set in the message. - * @member {boolean} + * @property {boolean} * [content.edifact.sendAgreement.protocolSettings.validationSettings.checkDuplicateInterchangeControlNumber] * The value indicating whether to check for duplicate interchange control * number. - * @member {number} + * @property {number} * [content.edifact.sendAgreement.protocolSettings.validationSettings.interchangeControlNumberValidityDays] * The validity period of interchange control number. - * @member {boolean} + * @property {boolean} * [content.edifact.sendAgreement.protocolSettings.validationSettings.checkDuplicateGroupControlNumber] * The value indicating whether to check for duplicate group control number. - * @member {boolean} + * @property {boolean} * [content.edifact.sendAgreement.protocolSettings.validationSettings.checkDuplicateTransactionSetControlNumber] * The value indicating whether to check for duplicate transaction set * control number. - * @member {boolean} + * @property {boolean} * [content.edifact.sendAgreement.protocolSettings.validationSettings.validateEdiTypes] * The value indicating whether to Whether to validate EDI types. - * @member {boolean} + * @property {boolean} * [content.edifact.sendAgreement.protocolSettings.validationSettings.validateXsdTypes] * The value indicating whether to Whether to validate XSD types. - * @member {boolean} + * @property {boolean} * [content.edifact.sendAgreement.protocolSettings.validationSettings.allowLeadingAndTrailingSpacesAndZeroes] * The value indicating whether to allow leading and trailing spaces and * zeroes. - * @member {boolean} + * @property {boolean} * [content.edifact.sendAgreement.protocolSettings.validationSettings.trimLeadingAndTrailingSpacesAndZeroes] * The value indicating whether to trim leading and trailing spaces and * zeroes. - * @member {string} + * @property {string} * [content.edifact.sendAgreement.protocolSettings.validationSettings.trailingSeparatorPolicy] * The trailing separator policy. Possible values include: 'NotSpecified', * 'NotAllowed', 'Optional', 'Mandatory' - * @member {object} + * @property {object} * [content.edifact.sendAgreement.protocolSettings.framingSettings] The * EDIFACT framing settings. - * @member {string} + * @property {string} * [content.edifact.sendAgreement.protocolSettings.framingSettings.serviceCodeListDirectoryVersion] * The service code list directory version. - * @member {string} + * @property {string} * [content.edifact.sendAgreement.protocolSettings.framingSettings.characterEncoding] * The character encoding. - * @member {number} + * @property {number} * [content.edifact.sendAgreement.protocolSettings.framingSettings.protocolVersion] * The protocol version. - * @member {number} + * @property {number} * [content.edifact.sendAgreement.protocolSettings.framingSettings.dataElementSeparator] * The data element separator. - * @member {number} + * @property {number} * [content.edifact.sendAgreement.protocolSettings.framingSettings.componentSeparator] * The component separator. - * @member {number} + * @property {number} * [content.edifact.sendAgreement.protocolSettings.framingSettings.segmentTerminator] * The segment terminator. - * @member {number} + * @property {number} * [content.edifact.sendAgreement.protocolSettings.framingSettings.releaseIndicator] * The release indicator. - * @member {number} + * @property {number} * [content.edifact.sendAgreement.protocolSettings.framingSettings.repetitionSeparator] * The repetition separator. - * @member {string} + * @property {string} * [content.edifact.sendAgreement.protocolSettings.framingSettings.characterSet] * The EDIFACT frame setting characterSet. Possible values include: * 'NotSpecified', 'UNOB', 'UNOA', 'UNOC', 'UNOD', 'UNOE', 'UNOF', 'UNOG', * 'UNOH', 'UNOI', 'UNOJ', 'UNOK', 'UNOX', 'UNOY', 'KECA' - * @member {string} + * @property {string} * [content.edifact.sendAgreement.protocolSettings.framingSettings.decimalPointIndicator] * The EDIFACT frame setting decimal indicator. Possible values include: * 'NotSpecified', 'Comma', 'Decimal' - * @member {string} + * @property {string} * [content.edifact.sendAgreement.protocolSettings.framingSettings.segmentTerminatorSuffix] * The EDIFACT frame setting segment terminator suffix. Possible values * include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' - * @member {object} + * @property {object} * [content.edifact.sendAgreement.protocolSettings.envelopeSettings] The * EDIFACT envelope settings. - * @member {string} + * @property {string} * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.groupAssociationAssignedCode] * The group association assigned code. - * @member {string} + * @property {string} * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.communicationAgreementId] * The communication agreement id. - * @member {boolean} + * @property {boolean} * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.applyDelimiterStringAdvice] * The value indicating whether to apply delimiter string advice. - * @member {boolean} + * @property {boolean} * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.createGroupingSegments] * The value indicating whether to create grouping segments. - * @member {boolean} + * @property {boolean} * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.enableDefaultGroupHeaders] * The value indicating whether to enable default group headers. - * @member {string} + * @property {string} * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.recipientReferencePasswordValue] * The recipient reference password value. - * @member {string} + * @property {string} * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.recipientReferencePasswordQualifier] * The recipient reference password qualifier. - * @member {string} + * @property {string} * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.applicationReferenceId] * The application reference id. - * @member {string} + * @property {string} * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.processingPriorityCode] * The processing priority code. - * @member {number} + * @property {number} * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.interchangeControlNumberLowerBound] * The interchange control number lower bound. - * @member {number} + * @property {number} * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.interchangeControlNumberUpperBound] * The interchange control number upper bound. - * @member {boolean} + * @property {boolean} * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.rolloverInterchangeControlNumber] * The value indicating whether to rollover interchange control number. - * @member {string} + * @property {string} * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.interchangeControlNumberPrefix] * The interchange control number prefix. - * @member {string} + * @property {string} * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.interchangeControlNumberSuffix] * The interchange control number suffix. - * @member {string} + * @property {string} * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.senderReverseRoutingAddress] * The sender reverse routing address. - * @member {string} + * @property {string} * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.receiverReverseRoutingAddress] * The receiver reverse routing address. - * @member {string} + * @property {string} * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.functionalGroupId] * The functional group id. - * @member {string} + * @property {string} * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.groupControllingAgencyCode] * The group controlling agency code. - * @member {string} + * @property {string} * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.groupMessageVersion] * The group message version. - * @member {string} + * @property {string} * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.groupMessageRelease] * The group message release. - * @member {number} + * @property {number} * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.groupControlNumberLowerBound] * The group control number lower bound. - * @member {number} + * @property {number} * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.groupControlNumberUpperBound] * The group control number upper bound. - * @member {boolean} + * @property {boolean} * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.rolloverGroupControlNumber] * The value indicating whether to rollover group control number. - * @member {string} + * @property {string} * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.groupControlNumberPrefix] * The group control number prefix. - * @member {string} + * @property {string} * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.groupControlNumberSuffix] * The group control number suffix. - * @member {string} + * @property {string} * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.groupApplicationReceiverQualifier] * The group application receiver qualifier. - * @member {string} + * @property {string} * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.groupApplicationReceiverId] * The group application receiver id. - * @member {string} + * @property {string} * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.groupApplicationSenderQualifier] * The group application sender qualifier. - * @member {string} + * @property {string} * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.groupApplicationSenderId] * The group application sender id. - * @member {string} + * @property {string} * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.groupApplicationPassword] * The group application password. - * @member {boolean} + * @property {boolean} * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.overwriteExistingTransactionSetControlNumber] * The value indicating whether to overwrite existing transaction set control * number. - * @member {string} + * @property {string} * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberPrefix] * The transaction set control number prefix. - * @member {string} + * @property {string} * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberSuffix] * The transaction set control number suffix. - * @member {number} + * @property {number} * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberLowerBound] * The transaction set control number lower bound. - * @member {number} + * @property {number} * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberUpperBound] * The transaction set control number upper bound. - * @member {boolean} + * @property {boolean} * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.rolloverTransactionSetControlNumber] * The value indicating whether to rollover transaction set control number. - * @member {boolean} + * @property {boolean} * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.isTestInterchange] * The value indicating whether the message is a test interchange. - * @member {string} + * @property {string} * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.senderInternalIdentification] * The sender internal identification. - * @member {string} + * @property {string} * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.senderInternalSubIdentification] * The sender internal sub identification. - * @member {string} + * @property {string} * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.receiverInternalIdentification] * The receiver internal identification. - * @member {string} + * @property {string} * [content.edifact.sendAgreement.protocolSettings.envelopeSettings.receiverInternalSubIdentification] * The receiver internal sub identification. - * @member {object} + * @property {object} * [content.edifact.sendAgreement.protocolSettings.acknowledgementSettings] * The EDIFACT acknowledgement settings. - * @member {boolean} + * @property {boolean} * [content.edifact.sendAgreement.protocolSettings.acknowledgementSettings.needTechnicalAcknowledgement] * The value indicating whether technical acknowledgement is needed. - * @member {boolean} + * @property {boolean} * [content.edifact.sendAgreement.protocolSettings.acknowledgementSettings.batchTechnicalAcknowledgements] * The value indicating whether to batch the technical acknowledgements. - * @member {boolean} + * @property {boolean} * [content.edifact.sendAgreement.protocolSettings.acknowledgementSettings.needFunctionalAcknowledgement] * The value indicating whether functional acknowledgement is needed. - * @member {boolean} + * @property {boolean} * [content.edifact.sendAgreement.protocolSettings.acknowledgementSettings.batchFunctionalAcknowledgements] * The value indicating whether to batch functional acknowledgements. - * @member {boolean} + * @property {boolean} * [content.edifact.sendAgreement.protocolSettings.acknowledgementSettings.needLoopForValidMessages] * The value indicating whether a loop is needed for valid messages. - * @member {boolean} + * @property {boolean} * [content.edifact.sendAgreement.protocolSettings.acknowledgementSettings.sendSynchronousAcknowledgement] * The value indicating whether to send synchronous acknowledgement. - * @member {string} + * @property {string} * [content.edifact.sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberPrefix] * The acknowledgement control number prefix. - * @member {string} + * @property {string} * [content.edifact.sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberSuffix] * The acknowledgement control number suffix. - * @member {number} + * @property {number} * [content.edifact.sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberLowerBound] * The acknowledgement control number lower bound. - * @member {number} + * @property {number} * [content.edifact.sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberUpperBound] * The acknowledgement control number upper bound. - * @member {boolean} + * @property {boolean} * [content.edifact.sendAgreement.protocolSettings.acknowledgementSettings.rolloverAcknowledgementControlNumber] * The value indicating whether to rollover acknowledgement control number. - * @member {object} + * @property {object} * [content.edifact.sendAgreement.protocolSettings.messageFilter] The EDIFACT * message filter. - * @member {string} + * @property {string} * [content.edifact.sendAgreement.protocolSettings.messageFilter.messageFilterType] * The message filter type. Possible values include: 'NotSpecified', * 'Include', 'Exclude' - * @member {object} + * @property {object} * [content.edifact.sendAgreement.protocolSettings.processingSettings] The * EDIFACT processing Settings. - * @member {boolean} + * @property {boolean} * [content.edifact.sendAgreement.protocolSettings.processingSettings.maskSecurityInfo] * The value indicating whether to mask security information. - * @member {boolean} + * @property {boolean} * [content.edifact.sendAgreement.protocolSettings.processingSettings.preserveInterchange] * The value indicating whether to preserve interchange. - * @member {boolean} + * @property {boolean} * [content.edifact.sendAgreement.protocolSettings.processingSettings.suspendInterchangeOnError] * The value indicating whether to suspend interchange on error. - * @member {boolean} + * @property {boolean} * [content.edifact.sendAgreement.protocolSettings.processingSettings.createEmptyXmlTagsForTrailingSeparators] * The value indicating whether to create empty xml tags for trailing * separators. - * @member {boolean} + * @property {boolean} * [content.edifact.sendAgreement.protocolSettings.processingSettings.useDotAsDecimalSeparator] * The value indicating whether to use dot as decimal separator. - * @member {array} + * @property {array} * [content.edifact.sendAgreement.protocolSettings.envelopeOverrides] The * EDIFACT envelope override settings. - * @member {array} + * @property {array} * [content.edifact.sendAgreement.protocolSettings.messageFilterList] The * EDIFACT message filter list. - * @member {array} + * @property {array} * [content.edifact.sendAgreement.protocolSettings.schemaReferences] The * EDIFACT schema references. - * @member {array} + * @property {array} * [content.edifact.sendAgreement.protocolSettings.validationOverrides] The * EDIFACT validation override settings. - * @member {array} + * @property {array} * [content.edifact.sendAgreement.protocolSettings.edifactDelimiterOverrides] * The EDIFACT delimiter override settings. */ diff --git a/lib/services/logicManagement/lib/models/integrationAccountAgreementFilter.js b/lib/services/logicManagement/lib/models/integrationAccountAgreementFilter.js index b1cebe500f..ec5dd9ace9 100644 --- a/lib/services/logicManagement/lib/models/integrationAccountAgreementFilter.js +++ b/lib/services/logicManagement/lib/models/integrationAccountAgreementFilter.js @@ -17,7 +17,7 @@ class IntegrationAccountAgreementFilter { /** * Create a IntegrationAccountAgreementFilter. - * @member {string} agreementType The agreement type of integration account + * @property {string} agreementType The agreement type of integration account * agreement. Possible values include: 'NotSpecified', 'AS2', 'X12', * 'Edifact' */ diff --git a/lib/services/logicManagement/lib/models/integrationAccountAgreementListResult.js b/lib/services/logicManagement/lib/models/integrationAccountAgreementListResult.js index 0322711ccb..c2ac638b9e 100644 --- a/lib/services/logicManagement/lib/models/integrationAccountAgreementListResult.js +++ b/lib/services/logicManagement/lib/models/integrationAccountAgreementListResult.js @@ -16,7 +16,7 @@ class IntegrationAccountAgreementListResult extends Array { /** * Create a IntegrationAccountAgreementListResult. - * @member {string} [nextLink] The URL to get the next set of results. + * @property {string} [nextLink] The URL to get the next set of results. */ constructor() { super(); diff --git a/lib/services/logicManagement/lib/models/integrationAccountCertificate.js b/lib/services/logicManagement/lib/models/integrationAccountCertificate.js index 147a02db4a..c681b99da8 100644 --- a/lib/services/logicManagement/lib/models/integrationAccountCertificate.js +++ b/lib/services/logicManagement/lib/models/integrationAccountCertificate.js @@ -20,17 +20,17 @@ const models = require('./index'); class IntegrationAccountCertificate extends models['Resource'] { /** * Create a IntegrationAccountCertificate. - * @member {date} [createdTime] The created time. - * @member {date} [changedTime] The changed time. - * @member {object} [metadata] The metadata. - * @member {object} [key] The key details in the key vault. - * @member {object} [key.keyVault] The key vault reference. - * @member {string} [key.keyVault.id] The resource id. - * @member {string} [key.keyVault.name] The resource name. - * @member {string} [key.keyVault.type] The resource type. - * @member {string} [key.keyName] The private key name in key vault. - * @member {string} [key.keyVersion] The private key version in key vault. - * @member {string} [publicCertificate] The public certificate. + * @property {date} [createdTime] The created time. + * @property {date} [changedTime] The changed time. + * @property {object} [metadata] The metadata. + * @property {object} [key] The key details in the key vault. + * @property {object} [key.keyVault] The key vault reference. + * @property {string} [key.keyVault.id] The resource id. + * @property {string} [key.keyVault.name] The resource name. + * @property {string} [key.keyVault.type] The resource type. + * @property {string} [key.keyName] The private key name in key vault. + * @property {string} [key.keyVersion] The private key version in key vault. + * @property {string} [publicCertificate] The public certificate. */ constructor() { super(); diff --git a/lib/services/logicManagement/lib/models/integrationAccountCertificateListResult.js b/lib/services/logicManagement/lib/models/integrationAccountCertificateListResult.js index f3e079d5cf..06a1eb8095 100644 --- a/lib/services/logicManagement/lib/models/integrationAccountCertificateListResult.js +++ b/lib/services/logicManagement/lib/models/integrationAccountCertificateListResult.js @@ -16,7 +16,7 @@ class IntegrationAccountCertificateListResult extends Array { /** * Create a IntegrationAccountCertificateListResult. - * @member {string} [nextLink] The URL to get the next set of results. + * @property {string} [nextLink] The URL to get the next set of results. */ constructor() { super(); diff --git a/lib/services/logicManagement/lib/models/integrationAccountListResult.js b/lib/services/logicManagement/lib/models/integrationAccountListResult.js index c1360033e7..d37251f824 100644 --- a/lib/services/logicManagement/lib/models/integrationAccountListResult.js +++ b/lib/services/logicManagement/lib/models/integrationAccountListResult.js @@ -16,7 +16,7 @@ class IntegrationAccountListResult extends Array { /** * Create a IntegrationAccountListResult. - * @member {string} [nextLink] The URL to get the next set of results. + * @property {string} [nextLink] The URL to get the next set of results. */ constructor() { super(); diff --git a/lib/services/logicManagement/lib/models/integrationAccountMap.js b/lib/services/logicManagement/lib/models/integrationAccountMap.js index 29aece5a98..72c7c00b38 100644 --- a/lib/services/logicManagement/lib/models/integrationAccountMap.js +++ b/lib/services/logicManagement/lib/models/integrationAccountMap.js @@ -20,26 +20,26 @@ const models = require('./index'); class IntegrationAccountMap extends models['Resource'] { /** * Create a IntegrationAccountMap. - * @member {string} mapType The map type. Possible values include: + * @property {string} mapType The map type. Possible values include: * 'NotSpecified', 'Xslt', 'Xslt20', 'Xslt30', 'Liquid' - * @member {object} [parametersSchema] The parameters schema of integration + * @property {object} [parametersSchema] The parameters schema of integration * account map. - * @member {string} [parametersSchema.ref] The reference name. - * @member {date} [createdTime] The created time. - * @member {date} [changedTime] The changed time. - * @member {string} [content] The content. - * @member {string} [contentType] The content type. - * @member {object} [contentLink] The content link. - * @member {string} [contentLink.uri] The content link URI. - * @member {string} [contentLink.contentVersion] The content version. - * @member {number} [contentLink.contentSize] The content size. - * @member {object} [contentLink.contentHash] The content hash. - * @member {string} [contentLink.contentHash.algorithm] The algorithm of the + * @property {string} [parametersSchema.ref] The reference name. + * @property {date} [createdTime] The created time. + * @property {date} [changedTime] The changed time. + * @property {string} [content] The content. + * @property {string} [contentType] The content type. + * @property {object} [contentLink] The content link. + * @property {string} [contentLink.uri] The content link URI. + * @property {string} [contentLink.contentVersion] The content version. + * @property {number} [contentLink.contentSize] The content size. + * @property {object} [contentLink.contentHash] The content hash. + * @property {string} [contentLink.contentHash.algorithm] The algorithm of + * the content hash. + * @property {string} [contentLink.contentHash.value] The value of the * content hash. - * @member {string} [contentLink.contentHash.value] The value of the content - * hash. - * @member {object} [contentLink.metadata] The metadata. - * @member {object} [metadata] The metadata. + * @property {object} [contentLink.metadata] The metadata. + * @property {object} [metadata] The metadata. */ constructor() { super(); diff --git a/lib/services/logicManagement/lib/models/integrationAccountMapFilter.js b/lib/services/logicManagement/lib/models/integrationAccountMapFilter.js index 14b381aab3..8f60833ea2 100644 --- a/lib/services/logicManagement/lib/models/integrationAccountMapFilter.js +++ b/lib/services/logicManagement/lib/models/integrationAccountMapFilter.js @@ -17,8 +17,9 @@ class IntegrationAccountMapFilter { /** * Create a IntegrationAccountMapFilter. - * @member {string} mapType The map type of integration account map. Possible - * values include: 'NotSpecified', 'Xslt', 'Xslt20', 'Xslt30', 'Liquid' + * @property {string} mapType The map type of integration account map. + * Possible values include: 'NotSpecified', 'Xslt', 'Xslt20', 'Xslt30', + * 'Liquid' */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/integrationAccountMapListResult.js b/lib/services/logicManagement/lib/models/integrationAccountMapListResult.js index 3b5540235c..94d1ab7391 100644 --- a/lib/services/logicManagement/lib/models/integrationAccountMapListResult.js +++ b/lib/services/logicManagement/lib/models/integrationAccountMapListResult.js @@ -16,7 +16,7 @@ class IntegrationAccountMapListResult extends Array { /** * Create a IntegrationAccountMapListResult. - * @member {string} [nextLink] The URL to get the next set of results. + * @property {string} [nextLink] The URL to get the next set of results. */ constructor() { super(); diff --git a/lib/services/logicManagement/lib/models/integrationAccountMapPropertiesParametersSchema.js b/lib/services/logicManagement/lib/models/integrationAccountMapPropertiesParametersSchema.js index 2f52cd188f..2c70918930 100644 --- a/lib/services/logicManagement/lib/models/integrationAccountMapPropertiesParametersSchema.js +++ b/lib/services/logicManagement/lib/models/integrationAccountMapPropertiesParametersSchema.js @@ -17,7 +17,7 @@ class IntegrationAccountMapPropertiesParametersSchema { /** * Create a IntegrationAccountMapPropertiesParametersSchema. - * @member {string} [ref] The reference name. + * @property {string} [ref] The reference name. */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/integrationAccountPartner.js b/lib/services/logicManagement/lib/models/integrationAccountPartner.js index f252522131..b934696e42 100644 --- a/lib/services/logicManagement/lib/models/integrationAccountPartner.js +++ b/lib/services/logicManagement/lib/models/integrationAccountPartner.js @@ -20,14 +20,14 @@ const models = require('./index'); class IntegrationAccountPartner extends models['Resource'] { /** * Create a IntegrationAccountPartner. - * @member {string} partnerType The partner type. Possible values include: + * @property {string} partnerType The partner type. Possible values include: * 'NotSpecified', 'B2B' - * @member {date} [createdTime] The created time. - * @member {date} [changedTime] The changed time. - * @member {object} [metadata] The metadata. - * @member {object} content The partner content. - * @member {object} [content.b2b] The B2B partner content. - * @member {array} [content.b2b.businessIdentities] The list of partner + * @property {date} [createdTime] The created time. + * @property {date} [changedTime] The changed time. + * @property {object} [metadata] The metadata. + * @property {object} content The partner content. + * @property {object} [content.b2b] The B2B partner content. + * @property {array} [content.b2b.businessIdentities] The list of partner * business identities. */ constructor() { diff --git a/lib/services/logicManagement/lib/models/integrationAccountPartnerFilter.js b/lib/services/logicManagement/lib/models/integrationAccountPartnerFilter.js index 7c686a59f6..4303f4d112 100644 --- a/lib/services/logicManagement/lib/models/integrationAccountPartnerFilter.js +++ b/lib/services/logicManagement/lib/models/integrationAccountPartnerFilter.js @@ -17,7 +17,7 @@ class IntegrationAccountPartnerFilter { /** * Create a IntegrationAccountPartnerFilter. - * @member {string} partnerType The partner type of integration account + * @property {string} partnerType The partner type of integration account * partner. Possible values include: 'NotSpecified', 'B2B' */ constructor() { diff --git a/lib/services/logicManagement/lib/models/integrationAccountPartnerListResult.js b/lib/services/logicManagement/lib/models/integrationAccountPartnerListResult.js index 3e2e582d6a..58084f64d5 100644 --- a/lib/services/logicManagement/lib/models/integrationAccountPartnerListResult.js +++ b/lib/services/logicManagement/lib/models/integrationAccountPartnerListResult.js @@ -16,7 +16,7 @@ class IntegrationAccountPartnerListResult extends Array { /** * Create a IntegrationAccountPartnerListResult. - * @member {string} [nextLink] The URL to get the next set of results. + * @property {string} [nextLink] The URL to get the next set of results. */ constructor() { super(); diff --git a/lib/services/logicManagement/lib/models/integrationAccountSchema.js b/lib/services/logicManagement/lib/models/integrationAccountSchema.js index 9a93a98f35..a868565a19 100644 --- a/lib/services/logicManagement/lib/models/integrationAccountSchema.js +++ b/lib/services/logicManagement/lib/models/integrationAccountSchema.js @@ -20,26 +20,26 @@ const models = require('./index'); class IntegrationAccountSchema extends models['Resource'] { /** * Create a IntegrationAccountSchema. - * @member {string} schemaType The schema type. Possible values include: + * @property {string} schemaType The schema type. Possible values include: * 'NotSpecified', 'Xml' - * @member {string} [targetNamespace] The target namespace of the schema. - * @member {string} [documentName] The document name. - * @member {string} [fileName] The file name. - * @member {date} [createdTime] The created time. - * @member {date} [changedTime] The changed time. - * @member {object} [metadata] The metadata. - * @member {string} [content] The content. - * @member {string} [contentType] The content type. - * @member {object} [contentLink] The content link. - * @member {string} [contentLink.uri] The content link URI. - * @member {string} [contentLink.contentVersion] The content version. - * @member {number} [contentLink.contentSize] The content size. - * @member {object} [contentLink.contentHash] The content hash. - * @member {string} [contentLink.contentHash.algorithm] The algorithm of the + * @property {string} [targetNamespace] The target namespace of the schema. + * @property {string} [documentName] The document name. + * @property {string} [fileName] The file name. + * @property {date} [createdTime] The created time. + * @property {date} [changedTime] The changed time. + * @property {object} [metadata] The metadata. + * @property {string} [content] The content. + * @property {string} [contentType] The content type. + * @property {object} [contentLink] The content link. + * @property {string} [contentLink.uri] The content link URI. + * @property {string} [contentLink.contentVersion] The content version. + * @property {number} [contentLink.contentSize] The content size. + * @property {object} [contentLink.contentHash] The content hash. + * @property {string} [contentLink.contentHash.algorithm] The algorithm of + * the content hash. + * @property {string} [contentLink.contentHash.value] The value of the * content hash. - * @member {string} [contentLink.contentHash.value] The value of the content - * hash. - * @member {object} [contentLink.metadata] The metadata. + * @property {object} [contentLink.metadata] The metadata. */ constructor() { super(); diff --git a/lib/services/logicManagement/lib/models/integrationAccountSchemaFilter.js b/lib/services/logicManagement/lib/models/integrationAccountSchemaFilter.js index d0a454efc0..ad109790ed 100644 --- a/lib/services/logicManagement/lib/models/integrationAccountSchemaFilter.js +++ b/lib/services/logicManagement/lib/models/integrationAccountSchemaFilter.js @@ -17,8 +17,8 @@ class IntegrationAccountSchemaFilter { /** * Create a IntegrationAccountSchemaFilter. - * @member {string} schemaType The schema type of integration account schema. - * Possible values include: 'NotSpecified', 'Xml' + * @property {string} schemaType The schema type of integration account + * schema. Possible values include: 'NotSpecified', 'Xml' */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/integrationAccountSchemaListResult.js b/lib/services/logicManagement/lib/models/integrationAccountSchemaListResult.js index ac045d7fb3..38c15c270e 100644 --- a/lib/services/logicManagement/lib/models/integrationAccountSchemaListResult.js +++ b/lib/services/logicManagement/lib/models/integrationAccountSchemaListResult.js @@ -16,7 +16,7 @@ class IntegrationAccountSchemaListResult extends Array { /** * Create a IntegrationAccountSchemaListResult. - * @member {string} [nextLink] The URL to get the next set of results. + * @property {string} [nextLink] The URL to get the next set of results. */ constructor() { super(); diff --git a/lib/services/logicManagement/lib/models/integrationAccountSession.js b/lib/services/logicManagement/lib/models/integrationAccountSession.js index a035f84298..a5a9953dae 100644 --- a/lib/services/logicManagement/lib/models/integrationAccountSession.js +++ b/lib/services/logicManagement/lib/models/integrationAccountSession.js @@ -20,9 +20,9 @@ const models = require('./index'); class IntegrationAccountSession extends models['Resource'] { /** * Create a IntegrationAccountSession. - * @member {date} [createdTime] The created time. - * @member {date} [changedTime] The changed time. - * @member {object} [content] The session content. + * @property {date} [createdTime] The created time. + * @property {date} [changedTime] The changed time. + * @property {object} [content] The session content. */ constructor() { super(); diff --git a/lib/services/logicManagement/lib/models/integrationAccountSessionFilter.js b/lib/services/logicManagement/lib/models/integrationAccountSessionFilter.js index 5a5e8a5e54..57d8c9c71c 100644 --- a/lib/services/logicManagement/lib/models/integrationAccountSessionFilter.js +++ b/lib/services/logicManagement/lib/models/integrationAccountSessionFilter.js @@ -17,7 +17,7 @@ class IntegrationAccountSessionFilter { /** * Create a IntegrationAccountSessionFilter. - * @member {date} changedTime The changed time of integration account + * @property {date} changedTime The changed time of integration account * sessions. */ constructor() { diff --git a/lib/services/logicManagement/lib/models/integrationAccountSessionListResult.js b/lib/services/logicManagement/lib/models/integrationAccountSessionListResult.js index 37493ea4ba..72a6e7083f 100644 --- a/lib/services/logicManagement/lib/models/integrationAccountSessionListResult.js +++ b/lib/services/logicManagement/lib/models/integrationAccountSessionListResult.js @@ -16,7 +16,7 @@ class IntegrationAccountSessionListResult extends Array { /** * Create a IntegrationAccountSessionListResult. - * @member {string} [nextLink] The URL to get the next set of results. + * @property {string} [nextLink] The URL to get the next set of results. */ constructor() { super(); diff --git a/lib/services/logicManagement/lib/models/integrationAccountSku.js b/lib/services/logicManagement/lib/models/integrationAccountSku.js index cd6a1aee76..4a1fe02209 100644 --- a/lib/services/logicManagement/lib/models/integrationAccountSku.js +++ b/lib/services/logicManagement/lib/models/integrationAccountSku.js @@ -17,7 +17,7 @@ class IntegrationAccountSku { /** * Create a IntegrationAccountSku. - * @member {string} name The sku name. Possible values include: + * @property {string} name The sku name. Possible values include: * 'NotSpecified', 'Free', 'Basic', 'Standard' */ constructor() { diff --git a/lib/services/logicManagement/lib/models/jsonSchema.js b/lib/services/logicManagement/lib/models/jsonSchema.js index e74da1917c..ae7a965eb5 100644 --- a/lib/services/logicManagement/lib/models/jsonSchema.js +++ b/lib/services/logicManagement/lib/models/jsonSchema.js @@ -17,8 +17,8 @@ class JsonSchema { /** * Create a JsonSchema. - * @member {string} [title] The JSON title. - * @member {string} [content] The JSON content. + * @property {string} [title] The JSON title. + * @property {string} [content] The JSON content. */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/keyVaultKey.js b/lib/services/logicManagement/lib/models/keyVaultKey.js index 5fd09e1d50..8d94dab380 100644 --- a/lib/services/logicManagement/lib/models/keyVaultKey.js +++ b/lib/services/logicManagement/lib/models/keyVaultKey.js @@ -17,11 +17,12 @@ class KeyVaultKey { /** * Create a KeyVaultKey. - * @member {string} [kid] The key id. - * @member {object} [attributes] The key attributes. - * @member {boolean} [attributes.enabled] Whether the key is enabled or not. - * @member {number} [attributes.created] When the key was created. - * @member {number} [attributes.updated] When the key was updated. + * @property {string} [kid] The key id. + * @property {object} [attributes] The key attributes. + * @property {boolean} [attributes.enabled] Whether the key is enabled or + * not. + * @property {number} [attributes.created] When the key was created. + * @property {number} [attributes.updated] When the key was updated. */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/keyVaultKeyAttributes.js b/lib/services/logicManagement/lib/models/keyVaultKeyAttributes.js index 275e76a65d..171ea443b0 100644 --- a/lib/services/logicManagement/lib/models/keyVaultKeyAttributes.js +++ b/lib/services/logicManagement/lib/models/keyVaultKeyAttributes.js @@ -17,9 +17,9 @@ class KeyVaultKeyAttributes { /** * Create a KeyVaultKeyAttributes. - * @member {boolean} [enabled] Whether the key is enabled or not. - * @member {number} [created] When the key was created. - * @member {number} [updated] When the key was updated. + * @property {boolean} [enabled] Whether the key is enabled or not. + * @property {number} [created] When the key was created. + * @property {number} [updated] When the key was updated. */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/keyVaultKeyCollection.js b/lib/services/logicManagement/lib/models/keyVaultKeyCollection.js index 25897f7d35..b120fcb23f 100644 --- a/lib/services/logicManagement/lib/models/keyVaultKeyCollection.js +++ b/lib/services/logicManagement/lib/models/keyVaultKeyCollection.js @@ -16,7 +16,7 @@ class KeyVaultKeyCollection extends Array { /** * Create a KeyVaultKeyCollection. - * @member {string} [skipToken] The skip token. + * @property {string} [skipToken] The skip token. */ constructor() { super(); diff --git a/lib/services/logicManagement/lib/models/keyVaultKeyReference.js b/lib/services/logicManagement/lib/models/keyVaultKeyReference.js index c17885d879..7d6b2183a3 100644 --- a/lib/services/logicManagement/lib/models/keyVaultKeyReference.js +++ b/lib/services/logicManagement/lib/models/keyVaultKeyReference.js @@ -17,12 +17,12 @@ class KeyVaultKeyReference { /** * Create a KeyVaultKeyReference. - * @member {object} keyVault The key vault reference. - * @member {string} [keyVault.id] The resource id. - * @member {string} [keyVault.name] The resource name. - * @member {string} [keyVault.type] The resource type. - * @member {string} keyName The private key name in key vault. - * @member {string} [keyVersion] The private key version in key vault. + * @property {object} keyVault The key vault reference. + * @property {string} [keyVault.id] The resource id. + * @property {string} [keyVault.name] The resource name. + * @property {string} [keyVault.type] The resource type. + * @property {string} keyName The private key name in key vault. + * @property {string} [keyVersion] The private key version in key vault. */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/keyVaultKeyReferenceKeyVault.js b/lib/services/logicManagement/lib/models/keyVaultKeyReferenceKeyVault.js index 390e94183c..d3ee2c43b9 100644 --- a/lib/services/logicManagement/lib/models/keyVaultKeyReferenceKeyVault.js +++ b/lib/services/logicManagement/lib/models/keyVaultKeyReferenceKeyVault.js @@ -17,9 +17,9 @@ class KeyVaultKeyReferenceKeyVault { /** * Create a KeyVaultKeyReferenceKeyVault. - * @member {string} [id] The resource id. - * @member {string} [name] The resource name. - * @member {string} [type] The resource type. + * @property {string} [id] The resource id. + * @property {string} [name] The resource name. + * @property {string} [type] The resource type. */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/keyVaultReference.js b/lib/services/logicManagement/lib/models/keyVaultReference.js index cbcef6218c..ebe251af7d 100644 --- a/lib/services/logicManagement/lib/models/keyVaultReference.js +++ b/lib/services/logicManagement/lib/models/keyVaultReference.js @@ -41,7 +41,6 @@ class KeyVaultReference extends models['ResourceReference'] { modelProperties: { id: { required: false, - readOnly: true, serializedName: 'id', type: { name: 'String' diff --git a/lib/services/logicManagement/lib/models/listKeyVaultKeysDefinition.js b/lib/services/logicManagement/lib/models/listKeyVaultKeysDefinition.js index 51b2b633a2..45f317d7c3 100644 --- a/lib/services/logicManagement/lib/models/listKeyVaultKeysDefinition.js +++ b/lib/services/logicManagement/lib/models/listKeyVaultKeysDefinition.js @@ -17,8 +17,8 @@ class ListKeyVaultKeysDefinition { /** * Create a ListKeyVaultKeysDefinition. - * @member {object} keyVault The key vault reference. - * @member {string} [skipToken] The skip token. + * @property {object} keyVault The key vault reference. + * @property {string} [skipToken] The skip token. */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/operation.js b/lib/services/logicManagement/lib/models/operation.js index 8f34d11df4..1ae01dd636 100644 --- a/lib/services/logicManagement/lib/models/operation.js +++ b/lib/services/logicManagement/lib/models/operation.js @@ -17,13 +17,14 @@ class Operation { /** * Create a Operation. - * @member {string} [name] Operation name: {provider}/{resource}/{operation} - * @member {object} [display] The object that represents the operation. - * @member {string} [display.provider] Service provider: Microsoft.Logic - * @member {string} [display.resource] Resource on which the operation is + * @property {string} [name] Operation name: + * {provider}/{resource}/{operation} + * @property {object} [display] The object that represents the operation. + * @property {string} [display.provider] Service provider: Microsoft.Logic + * @property {string} [display.resource] Resource on which the operation is * performed: Profile, endpoint, etc. - * @member {string} [display.operation] Operation type: Read, write, delete, - * etc. + * @property {string} [display.operation] Operation type: Read, write, + * delete, etc. */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/operationDisplay.js b/lib/services/logicManagement/lib/models/operationDisplay.js index 8eba14eb9b..e2d238dca9 100644 --- a/lib/services/logicManagement/lib/models/operationDisplay.js +++ b/lib/services/logicManagement/lib/models/operationDisplay.js @@ -17,10 +17,10 @@ class OperationDisplay { /** * Create a OperationDisplay. - * @member {string} [provider] Service provider: Microsoft.Logic - * @member {string} [resource] Resource on which the operation is performed: - * Profile, endpoint, etc. - * @member {string} [operation] Operation type: Read, write, delete, etc. + * @property {string} [provider] Service provider: Microsoft.Logic + * @property {string} [resource] Resource on which the operation is + * performed: Profile, endpoint, etc. + * @property {string} [operation] Operation type: Read, write, delete, etc. */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/operationListResult.js b/lib/services/logicManagement/lib/models/operationListResult.js index b63722f0cd..1daefb69c7 100644 --- a/lib/services/logicManagement/lib/models/operationListResult.js +++ b/lib/services/logicManagement/lib/models/operationListResult.js @@ -17,7 +17,7 @@ class OperationListResult extends Array { /** * Create a OperationListResult. - * @member {string} [nextLink] URL to get the next set of operation list + * @property {string} [nextLink] URL to get the next set of operation list * results if there are any. */ constructor() { diff --git a/lib/services/logicManagement/lib/models/operationResult.js b/lib/services/logicManagement/lib/models/operationResult.js index 027284d537..640fd2e347 100644 --- a/lib/services/logicManagement/lib/models/operationResult.js +++ b/lib/services/logicManagement/lib/models/operationResult.js @@ -20,32 +20,32 @@ const models = require('./index'); class OperationResult extends models['OperationResultProperties'] { /** * Create a OperationResult. - * @member {string} [trackingId] Gets the tracking id. - * @member {object} [inputs] Gets the inputs. - * @member {object} [inputsLink] Gets the link to inputs. - * @member {string} [inputsLink.uri] The content link URI. - * @member {string} [inputsLink.contentVersion] The content version. - * @member {number} [inputsLink.contentSize] The content size. - * @member {object} [inputsLink.contentHash] The content hash. - * @member {string} [inputsLink.contentHash.algorithm] The algorithm of the + * @property {string} [trackingId] Gets the tracking id. + * @property {object} [inputs] Gets the inputs. + * @property {object} [inputsLink] Gets the link to inputs. + * @property {string} [inputsLink.uri] The content link URI. + * @property {string} [inputsLink.contentVersion] The content version. + * @property {number} [inputsLink.contentSize] The content size. + * @property {object} [inputsLink.contentHash] The content hash. + * @property {string} [inputsLink.contentHash.algorithm] The algorithm of the * content hash. - * @member {string} [inputsLink.contentHash.value] The value of the content + * @property {string} [inputsLink.contentHash.value] The value of the content * hash. - * @member {object} [inputsLink.metadata] The metadata. - * @member {object} [outputs] Gets the outputs. - * @member {object} [outputsLink] Gets the link to outputs. - * @member {string} [outputsLink.uri] The content link URI. - * @member {string} [outputsLink.contentVersion] The content version. - * @member {number} [outputsLink.contentSize] The content size. - * @member {object} [outputsLink.contentHash] The content hash. - * @member {string} [outputsLink.contentHash.algorithm] The algorithm of the + * @property {object} [inputsLink.metadata] The metadata. + * @property {object} [outputs] Gets the outputs. + * @property {object} [outputsLink] Gets the link to outputs. + * @property {string} [outputsLink.uri] The content link URI. + * @property {string} [outputsLink.contentVersion] The content version. + * @property {number} [outputsLink.contentSize] The content size. + * @property {object} [outputsLink.contentHash] The content hash. + * @property {string} [outputsLink.contentHash.algorithm] The algorithm of + * the content hash. + * @property {string} [outputsLink.contentHash.value] The value of the * content hash. - * @member {string} [outputsLink.contentHash.value] The value of the content - * hash. - * @member {object} [outputsLink.metadata] The metadata. - * @member {object} [trackedProperties] Gets the tracked properties. - * @member {array} [retryHistory] Gets the retry histories. - * @member {number} [iterationCount] + * @property {object} [outputsLink.metadata] The metadata. + * @property {object} [trackedProperties] Gets the tracked properties. + * @property {array} [retryHistory] Gets the retry histories. + * @property {number} [iterationCount] */ constructor() { super(); diff --git a/lib/services/logicManagement/lib/models/operationResultProperties.js b/lib/services/logicManagement/lib/models/operationResultProperties.js index 89d493ca7d..1e9a987e7b 100644 --- a/lib/services/logicManagement/lib/models/operationResultProperties.js +++ b/lib/services/logicManagement/lib/models/operationResultProperties.js @@ -17,18 +17,18 @@ class OperationResultProperties { /** * Create a OperationResultProperties. - * @member {date} [startTime] The start time of the workflow scope + * @property {date} [startTime] The start time of the workflow scope * repetition. - * @member {date} [endTime] The end time of the workflow scope repetition. - * @member {object} [correlation] The correlation properties. - * @member {string} [correlation.actionTrackingId] The action tracking + * @property {date} [endTime] The end time of the workflow scope repetition. + * @property {object} [correlation] The correlation properties. + * @property {string} [correlation.actionTrackingId] The action tracking * identifier. - * @member {string} [status] The status of the workflow scope repetition. + * @property {string} [status] The status of the workflow scope repetition. * Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', * 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', * 'TimedOut', 'Aborted', 'Ignored' - * @member {string} [code] The workflow scope repetition code. - * @member {object} [error] + * @property {string} [code] The workflow scope repetition code. + * @property {object} [error] */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/partnerContent.js b/lib/services/logicManagement/lib/models/partnerContent.js index 592eea7020..f3a7655360 100644 --- a/lib/services/logicManagement/lib/models/partnerContent.js +++ b/lib/services/logicManagement/lib/models/partnerContent.js @@ -17,8 +17,8 @@ class PartnerContent { /** * Create a PartnerContent. - * @member {object} [b2b] The B2B partner content. - * @member {array} [b2b.businessIdentities] The list of partner business + * @property {object} [b2b] The B2B partner content. + * @property {array} [b2b.businessIdentities] The list of partner business * identities. */ constructor() { diff --git a/lib/services/logicManagement/lib/models/recurrenceSchedule.js b/lib/services/logicManagement/lib/models/recurrenceSchedule.js index 230c1d64e5..f1c34e9a16 100644 --- a/lib/services/logicManagement/lib/models/recurrenceSchedule.js +++ b/lib/services/logicManagement/lib/models/recurrenceSchedule.js @@ -17,11 +17,11 @@ class RecurrenceSchedule { /** * Create a RecurrenceSchedule. - * @member {array} [minutes] The minutes. - * @member {array} [hours] The hours. - * @member {array} [weekDays] The days of the week. - * @member {array} [monthDays] The month days. - * @member {array} [monthlyOccurrences] The monthly occurrences. + * @property {array} [minutes] The minutes. + * @property {array} [hours] The hours. + * @property {array} [weekDays] The days of the week. + * @property {array} [monthDays] The month days. + * @property {array} [monthlyOccurrences] The monthly occurrences. */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/recurrenceScheduleOccurrence.js b/lib/services/logicManagement/lib/models/recurrenceScheduleOccurrence.js index 7f5c6c4d67..71492f77b5 100644 --- a/lib/services/logicManagement/lib/models/recurrenceScheduleOccurrence.js +++ b/lib/services/logicManagement/lib/models/recurrenceScheduleOccurrence.js @@ -17,10 +17,10 @@ class RecurrenceScheduleOccurrence { /** * Create a RecurrenceScheduleOccurrence. - * @member {string} [day] The day of the week. Possible values include: + * @property {string} [day] The day of the week. Possible values include: * 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', * 'Saturday' - * @member {number} [occurrence] The occurrence. + * @property {number} [occurrence] The occurrence. */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/regenerateActionParameter.js b/lib/services/logicManagement/lib/models/regenerateActionParameter.js index f1129f5797..93642c85dd 100644 --- a/lib/services/logicManagement/lib/models/regenerateActionParameter.js +++ b/lib/services/logicManagement/lib/models/regenerateActionParameter.js @@ -17,7 +17,7 @@ class RegenerateActionParameter { /** * Create a RegenerateActionParameter. - * @member {string} [keyType] The key type. Possible values include: + * @property {string} [keyType] The key type. Possible values include: * 'NotSpecified', 'Primary', 'Secondary' */ constructor() { diff --git a/lib/services/logicManagement/lib/models/repetitionIndex.js b/lib/services/logicManagement/lib/models/repetitionIndex.js index 0d48977b20..06cc80f0c3 100644 --- a/lib/services/logicManagement/lib/models/repetitionIndex.js +++ b/lib/services/logicManagement/lib/models/repetitionIndex.js @@ -17,8 +17,8 @@ class RepetitionIndex { /** * Create a RepetitionIndex. - * @member {string} [scopeName] The scope. - * @member {number} itemIndex The index. + * @property {string} [scopeName] The scope. + * @property {number} itemIndex The index. */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/request.js b/lib/services/logicManagement/lib/models/request.js new file mode 100644 index 0000000000..a12117fcf5 --- /dev/null +++ b/lib/services/logicManagement/lib/models/request.js @@ -0,0 +1,69 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * A request. + * + */ +class Request { + /** + * Create a Request. + * @property {object} [headers] A list of all the headers attached to the + * request. + * @property {string} [uri] The destination for the request. + * @property {string} [method] The HTTP method used for the request. + */ + constructor() { + } + + /** + * Defines the metadata of Request + * + * @returns {object} metadata of Request + * + */ + mapper() { + return { + required: false, + serializedName: 'Request', + type: { + name: 'Composite', + className: 'Request', + modelProperties: { + headers: { + required: false, + serializedName: 'headers', + type: { + name: 'Object' + } + }, + uri: { + required: false, + serializedName: 'uri', + type: { + name: 'String' + } + }, + method: { + required: false, + serializedName: 'method', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = Request; diff --git a/lib/services/logicManagement/lib/models/requestHistory.js b/lib/services/logicManagement/lib/models/requestHistory.js new file mode 100644 index 0000000000..01c64dfec3 --- /dev/null +++ b/lib/services/logicManagement/lib/models/requestHistory.js @@ -0,0 +1,131 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * The request history. + * + * @extends models['Resource'] + */ +class RequestHistory extends models['Resource'] { + /** + * Create a RequestHistory. + * @property {object} [properties] The request history properties. + * @property {date} [properties.startTime] The time the request started. + * @property {date} [properties.endTime] The time the request ended. + * @property {object} [properties.request] The request. + * @property {object} [properties.request.headers] A list of all the headers + * attached to the request. + * @property {string} [properties.request.uri] The destination for the + * request. + * @property {string} [properties.request.method] The HTTP method used for + * the request. + * @property {object} [properties.response] The response. + * @property {object} [properties.response.headers] A list of all the headers + * attached to the response. + * @property {number} [properties.response.statusCode] The status code of the + * response. + * @property {object} [properties.response.bodyLink] Details on the location + * of the body content. + * @property {string} [properties.response.bodyLink.uri] The content link + * URI. + * @property {string} [properties.response.bodyLink.contentVersion] The + * content version. + * @property {number} [properties.response.bodyLink.contentSize] The content + * size. + * @property {object} [properties.response.bodyLink.contentHash] The content + * hash. + * @property {string} [properties.response.bodyLink.contentHash.algorithm] + * The algorithm of the content hash. + * @property {string} [properties.response.bodyLink.contentHash.value] The + * value of the content hash. + * @property {object} [properties.response.bodyLink.metadata] The metadata. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of RequestHistory + * + * @returns {object} metadata of RequestHistory + * + */ + mapper() { + return { + required: false, + serializedName: 'RequestHistory', + type: { + name: 'Composite', + className: 'RequestHistory', + modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + serializedName: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + properties: { + required: false, + serializedName: 'properties', + type: { + name: 'Composite', + className: 'RequestHistoryProperties' + } + } + } + } + }; + } +} + +module.exports = RequestHistory; diff --git a/lib/services/logicManagement/lib/models/requestHistoryListResult.js b/lib/services/logicManagement/lib/models/requestHistoryListResult.js new file mode 100644 index 0000000000..ca133adeca --- /dev/null +++ b/lib/services/logicManagement/lib/models/requestHistoryListResult.js @@ -0,0 +1,67 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * The list of workflow request histories. + */ +class RequestHistoryListResult extends Array { + /** + * Create a RequestHistoryListResult. + * @property {string} [nextLink] The URL to get the next set of results. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of RequestHistoryListResult + * + * @returns {object} metadata of RequestHistoryListResult + * + */ + mapper() { + return { + required: false, + serializedName: 'RequestHistoryListResult', + type: { + name: 'Composite', + className: 'RequestHistoryListResult', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'RequestHistoryElementType', + type: { + name: 'Composite', + className: 'RequestHistory' + } + } + } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = RequestHistoryListResult; diff --git a/lib/services/logicManagement/lib/models/requestHistoryProperties.js b/lib/services/logicManagement/lib/models/requestHistoryProperties.js new file mode 100644 index 0000000000..dfa20429ec --- /dev/null +++ b/lib/services/logicManagement/lib/models/requestHistoryProperties.js @@ -0,0 +1,96 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * The request history. + * + */ +class RequestHistoryProperties { + /** + * Create a RequestHistoryProperties. + * @property {date} [startTime] The time the request started. + * @property {date} [endTime] The time the request ended. + * @property {object} [request] The request. + * @property {object} [request.headers] A list of all the headers attached to + * the request. + * @property {string} [request.uri] The destination for the request. + * @property {string} [request.method] The HTTP method used for the request. + * @property {object} [response] The response. + * @property {object} [response.headers] A list of all the headers attached + * to the response. + * @property {number} [response.statusCode] The status code of the response. + * @property {object} [response.bodyLink] Details on the location of the body + * content. + * @property {string} [response.bodyLink.uri] The content link URI. + * @property {string} [response.bodyLink.contentVersion] The content version. + * @property {number} [response.bodyLink.contentSize] The content size. + * @property {object} [response.bodyLink.contentHash] The content hash. + * @property {string} [response.bodyLink.contentHash.algorithm] The algorithm + * of the content hash. + * @property {string} [response.bodyLink.contentHash.value] The value of the + * content hash. + * @property {object} [response.bodyLink.metadata] The metadata. + */ + constructor() { + } + + /** + * Defines the metadata of RequestHistoryProperties + * + * @returns {object} metadata of RequestHistoryProperties + * + */ + mapper() { + return { + required: false, + serializedName: 'RequestHistoryProperties', + type: { + name: 'Composite', + className: 'RequestHistoryProperties', + modelProperties: { + startTime: { + required: false, + serializedName: 'startTime', + type: { + name: 'DateTime' + } + }, + endTime: { + required: false, + serializedName: 'endTime', + type: { + name: 'DateTime' + } + }, + request: { + required: false, + serializedName: 'request', + type: { + name: 'Composite', + className: 'Request' + } + }, + response: { + required: false, + serializedName: 'response', + type: { + name: 'Composite', + className: 'Response' + } + } + } + } + }; + } +} + +module.exports = RequestHistoryProperties; diff --git a/lib/services/logicManagement/lib/models/resource.js b/lib/services/logicManagement/lib/models/resource.js index b786ae89f7..5970922939 100644 --- a/lib/services/logicManagement/lib/models/resource.js +++ b/lib/services/logicManagement/lib/models/resource.js @@ -20,11 +20,11 @@ const models = require('./index'); class Resource extends models['BaseResource'] { /** * Create a Resource. - * @member {string} [id] The resource id. - * @member {string} [name] Gets the resource name. - * @member {string} [type] Gets the resource type. - * @member {string} [location] The resource location. - * @member {object} [tags] The resource tags. + * @property {string} [id] The resource id. + * @property {string} [name] Gets the resource name. + * @property {string} [type] Gets the resource type. + * @property {string} [location] The resource location. + * @property {object} [tags] The resource tags. */ constructor() { super(); diff --git a/lib/services/logicManagement/lib/models/resourceReference.js b/lib/services/logicManagement/lib/models/resourceReference.js index 4f542ef415..ae11525fe9 100644 --- a/lib/services/logicManagement/lib/models/resourceReference.js +++ b/lib/services/logicManagement/lib/models/resourceReference.js @@ -17,9 +17,9 @@ class ResourceReference { /** * Create a ResourceReference. - * @member {string} [id] The resource id. - * @member {string} [name] Gets the resource name. - * @member {string} [type] Gets the resource type. + * @property {string} [id] The resource id. + * @property {string} [name] Gets the resource name. + * @property {string} [type] Gets the resource type. */ constructor() { } @@ -40,7 +40,6 @@ class ResourceReference { modelProperties: { id: { required: false, - readOnly: true, serializedName: 'id', type: { name: 'String' diff --git a/lib/services/logicManagement/lib/models/response.js b/lib/services/logicManagement/lib/models/response.js new file mode 100644 index 0000000000..cb80cf5b33 --- /dev/null +++ b/lib/services/logicManagement/lib/models/response.js @@ -0,0 +1,79 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * A response. + * + */ +class Response { + /** + * Create a Response. + * @property {object} [headers] A list of all the headers attached to the + * response. + * @property {number} [statusCode] The status code of the response. + * @property {object} [bodyLink] Details on the location of the body content. + * @property {string} [bodyLink.uri] The content link URI. + * @property {string} [bodyLink.contentVersion] The content version. + * @property {number} [bodyLink.contentSize] The content size. + * @property {object} [bodyLink.contentHash] The content hash. + * @property {string} [bodyLink.contentHash.algorithm] The algorithm of the + * content hash. + * @property {string} [bodyLink.contentHash.value] The value of the content + * hash. + * @property {object} [bodyLink.metadata] The metadata. + */ + constructor() { + } + + /** + * Defines the metadata of Response + * + * @returns {object} metadata of Response + * + */ + mapper() { + return { + required: false, + serializedName: 'Response', + type: { + name: 'Composite', + className: 'Response', + modelProperties: { + headers: { + required: false, + serializedName: 'headers', + type: { + name: 'Object' + } + }, + statusCode: { + required: false, + serializedName: 'statusCode', + type: { + name: 'Number' + } + }, + bodyLink: { + required: false, + serializedName: 'bodyLink', + type: { + name: 'Composite', + className: 'ContentLink' + } + } + } + } + }; + } +} + +module.exports = Response; diff --git a/lib/services/logicManagement/lib/models/retryHistory.js b/lib/services/logicManagement/lib/models/retryHistory.js index 28350a2810..1f643e68a3 100644 --- a/lib/services/logicManagement/lib/models/retryHistory.js +++ b/lib/services/logicManagement/lib/models/retryHistory.js @@ -17,15 +17,15 @@ class RetryHistory { /** * Create a RetryHistory. - * @member {date} [startTime] Gets the start time. - * @member {date} [endTime] Gets the end time. - * @member {string} [code] Gets the status code. - * @member {string} [clientRequestId] Gets the client request Id. - * @member {string} [serviceRequestId] Gets the service request Id. - * @member {object} [error] Gets the error response. - * @member {object} [error.error] The error properties. - * @member {string} [error.error.code] Error code. - * @member {string} [error.error.message] Error message indicating why the + * @property {date} [startTime] Gets the start time. + * @property {date} [endTime] Gets the end time. + * @property {string} [code] Gets the status code. + * @property {string} [clientRequestId] Gets the client request Id. + * @property {string} [serviceRequestId] Gets the service request Id. + * @property {object} [error] Gets the error response. + * @property {object} [error.error] The error properties. + * @property {string} [error.error.code] Error code. + * @property {string} [error.error.message] Error message indicating why the * operation failed. */ constructor() { diff --git a/lib/services/logicManagement/lib/models/runActionCorrelation.js b/lib/services/logicManagement/lib/models/runActionCorrelation.js index b69c875cf2..9103619bb3 100644 --- a/lib/services/logicManagement/lib/models/runActionCorrelation.js +++ b/lib/services/logicManagement/lib/models/runActionCorrelation.js @@ -20,7 +20,7 @@ const models = require('./index'); class RunActionCorrelation extends models['RunCorrelation'] { /** * Create a RunActionCorrelation. - * @member {string} [actionTrackingId] The action tracking identifier. + * @property {string} [actionTrackingId] The action tracking identifier. */ constructor() { super(); diff --git a/lib/services/logicManagement/lib/models/runCorrelation.js b/lib/services/logicManagement/lib/models/runCorrelation.js index f951a36ffc..7684bb1f0a 100644 --- a/lib/services/logicManagement/lib/models/runCorrelation.js +++ b/lib/services/logicManagement/lib/models/runCorrelation.js @@ -17,8 +17,8 @@ class RunCorrelation { /** * Create a RunCorrelation. - * @member {string} [clientTrackingId] The client tracking identifier. - * @member {array} [clientKeywords] The client keywords. + * @property {string} [clientTrackingId] The client tracking identifier. + * @property {array} [clientKeywords] The client keywords. */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/setTriggerStateActionDefinition.js b/lib/services/logicManagement/lib/models/setTriggerStateActionDefinition.js index 11767cb1c0..62e9951231 100644 --- a/lib/services/logicManagement/lib/models/setTriggerStateActionDefinition.js +++ b/lib/services/logicManagement/lib/models/setTriggerStateActionDefinition.js @@ -16,44 +16,45 @@ class SetTriggerStateActionDefinition { /** * Create a SetTriggerStateActionDefinition. - * @member {object} source - * @member {string} [source.provisioningState] Gets the provisioning state. + * @property {object} source + * @property {string} [source.provisioningState] Gets the provisioning state. * Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', * 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', * 'Succeeded', 'Moving', 'Updating', 'Registering', 'Registered', * 'Unregistering', 'Unregistered', 'Completed' - * @member {date} [source.createdTime] Gets the created time. - * @member {date} [source.changedTime] Gets the changed time. - * @member {string} [source.state] Gets the state. Possible values include: + * @property {date} [source.createdTime] Gets the created time. + * @property {date} [source.changedTime] Gets the changed time. + * @property {string} [source.state] Gets the state. Possible values include: * 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' - * @member {string} [source.status] Gets the status. Possible values include: - * 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', - * 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', - * 'Ignored' - * @member {date} [source.lastExecutionTime] Gets the last execution time. - * @member {date} [source.nextExecutionTime] Gets the next execution time. - * @member {object} [source.recurrence] Gets the workflow trigger recurrence. - * @member {string} [source.recurrence.frequency] The frequency. Possible + * @property {string} [source.status] Gets the status. Possible values + * include: 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', + * 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', + * 'Aborted', 'Ignored' + * @property {date} [source.lastExecutionTime] Gets the last execution time. + * @property {date} [source.nextExecutionTime] Gets the next execution time. + * @property {object} [source.recurrence] Gets the workflow trigger + * recurrence. + * @property {string} [source.recurrence.frequency] The frequency. Possible * values include: 'NotSpecified', 'Second', 'Minute', 'Hour', 'Day', 'Week', * 'Month', 'Year' - * @member {number} [source.recurrence.interval] The interval. - * @member {string} [source.recurrence.startTime] The start time. - * @member {string} [source.recurrence.endTime] The end time. - * @member {string} [source.recurrence.timeZone] The time zone. - * @member {object} [source.recurrence.schedule] The recurrence schedule. - * @member {array} [source.recurrence.schedule.minutes] The minutes. - * @member {array} [source.recurrence.schedule.hours] The hours. - * @member {array} [source.recurrence.schedule.weekDays] The days of the + * @property {number} [source.recurrence.interval] The interval. + * @property {string} [source.recurrence.startTime] The start time. + * @property {string} [source.recurrence.endTime] The end time. + * @property {string} [source.recurrence.timeZone] The time zone. + * @property {object} [source.recurrence.schedule] The recurrence schedule. + * @property {array} [source.recurrence.schedule.minutes] The minutes. + * @property {array} [source.recurrence.schedule.hours] The hours. + * @property {array} [source.recurrence.schedule.weekDays] The days of the * week. - * @member {array} [source.recurrence.schedule.monthDays] The month days. - * @member {array} [source.recurrence.schedule.monthlyOccurrences] The + * @property {array} [source.recurrence.schedule.monthDays] The month days. + * @property {array} [source.recurrence.schedule.monthlyOccurrences] The * monthly occurrences. - * @member {object} [source.workflow] Gets the reference to workflow. - * @member {string} [source.workflow.id] The resource id. - * @member {string} [source.workflow.name] Gets the resource name. - * @member {string} [source.workflow.type] Gets the resource type. - * @member {string} [source.name] Gets the workflow trigger name. - * @member {string} [source.type] Gets the workflow trigger type. + * @property {object} [source.workflow] Gets the reference to workflow. + * @property {string} [source.workflow.id] The resource id. + * @property {string} [source.workflow.name] Gets the resource name. + * @property {string} [source.workflow.type] Gets the resource type. + * @property {string} [source.name] Gets the workflow trigger name. + * @property {string} [source.type] Gets the workflow trigger type. */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/sku.js b/lib/services/logicManagement/lib/models/sku.js index e5f4aece11..84eb804847 100644 --- a/lib/services/logicManagement/lib/models/sku.js +++ b/lib/services/logicManagement/lib/models/sku.js @@ -17,12 +17,12 @@ class Sku { /** * Create a Sku. - * @member {string} name The name. Possible values include: 'NotSpecified', + * @property {string} name The name. Possible values include: 'NotSpecified', * 'Free', 'Shared', 'Basic', 'Standard', 'Premium' - * @member {object} [plan] The reference to plan. - * @member {string} [plan.id] The resource id. - * @member {string} [plan.name] Gets the resource name. - * @member {string} [plan.type] Gets the resource type. + * @property {object} [plan] The reference to plan. + * @property {string} [plan.id] The resource id. + * @property {string} [plan.name] Gets the resource name. + * @property {string} [plan.type] Gets the resource type. */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/subResource.js b/lib/services/logicManagement/lib/models/subResource.js index 842664e53f..60a0820acb 100644 --- a/lib/services/logicManagement/lib/models/subResource.js +++ b/lib/services/logicManagement/lib/models/subResource.js @@ -20,7 +20,7 @@ const models = require('./index'); class SubResource extends models['BaseResource'] { /** * Create a SubResource. - * @member {string} [id] The resource id. + * @property {string} [id] The resource id. */ constructor() { super(); diff --git a/lib/services/logicManagement/lib/models/trackingEvent.js b/lib/services/logicManagement/lib/models/trackingEvent.js index 3fd248e362..3878f96235 100644 --- a/lib/services/logicManagement/lib/models/trackingEvent.js +++ b/lib/services/logicManagement/lib/models/trackingEvent.js @@ -16,10 +16,10 @@ class TrackingEvent { /** * Create a TrackingEvent. - * @member {string} eventLevel Possible values include: 'LogAlways', + * @property {string} eventLevel Possible values include: 'LogAlways', * 'Critical', 'Error', 'Warning', 'Informational', 'Verbose' - * @member {date} eventTime - * @member {string} recordType Possible values include: 'NotSpecified', + * @property {date} eventTime + * @property {string} recordType Possible values include: 'NotSpecified', * 'Custom', 'AS2Message', 'AS2MDN', 'X12Interchange', 'X12FunctionalGroup', * 'X12TransactionSet', 'X12InterchangeAcknowledgment', * 'X12FunctionalGroupAcknowledgment', 'X12TransactionSetAcknowledgment', @@ -27,9 +27,9 @@ class TrackingEvent { * 'EdifactInterchangeAcknowledgment', * 'EdifactFunctionalGroupAcknowledgment', * 'EdifactTransactionSetAcknowledgment' - * @member {object} [error] - * @member {string} [error.message] - * @member {string} [error.code] + * @property {object} [error] + * @property {string} [error.message] + * @property {string} [error.code] */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/trackingEventErrorInfo.js b/lib/services/logicManagement/lib/models/trackingEventErrorInfo.js index b98578f781..22144f85df 100644 --- a/lib/services/logicManagement/lib/models/trackingEventErrorInfo.js +++ b/lib/services/logicManagement/lib/models/trackingEventErrorInfo.js @@ -16,8 +16,8 @@ class TrackingEventErrorInfo { /** * Create a TrackingEventErrorInfo. - * @member {string} [message] - * @member {string} [code] + * @property {string} [message] + * @property {string} [code] */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/trackingEventsDefinition.js b/lib/services/logicManagement/lib/models/trackingEventsDefinition.js index 3b745601fb..c8a7459cee 100644 --- a/lib/services/logicManagement/lib/models/trackingEventsDefinition.js +++ b/lib/services/logicManagement/lib/models/trackingEventsDefinition.js @@ -16,10 +16,10 @@ class TrackingEventsDefinition { /** * Create a TrackingEventsDefinition. - * @member {string} sourceType - * @member {string} [trackEventsOptions] Possible values include: 'None', + * @property {string} sourceType + * @property {string} [trackEventsOptions] Possible values include: 'None', * 'DisableSourceInfoEnrich' - * @member {array} events + * @property {array} events */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/workflow.js b/lib/services/logicManagement/lib/models/workflow.js index 6c9efb8a78..34f78bfbdf 100644 --- a/lib/services/logicManagement/lib/models/workflow.js +++ b/lib/services/logicManagement/lib/models/workflow.js @@ -20,30 +20,30 @@ const models = require('./index'); class Workflow extends models['Resource'] { /** * Create a Workflow. - * @member {string} [provisioningState] Gets the provisioning state. Possible - * values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', + * @property {string} [provisioningState] Gets the provisioning state. + * Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', * 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', * 'Succeeded', 'Moving', 'Updating', 'Registering', 'Registered', * 'Unregistering', 'Unregistered', 'Completed' - * @member {date} [createdTime] Gets the created time. - * @member {date} [changedTime] Gets the changed time. - * @member {string} [state] The state. Possible values include: + * @property {date} [createdTime] Gets the created time. + * @property {date} [changedTime] Gets the changed time. + * @property {string} [state] The state. Possible values include: * 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' - * @member {string} [version] Gets the version. - * @member {string} [accessEndpoint] Gets the access endpoint. - * @member {object} [sku] The sku. - * @member {string} [sku.name] The name. Possible values include: + * @property {string} [version] Gets the version. + * @property {string} [accessEndpoint] Gets the access endpoint. + * @property {object} [sku] The sku. + * @property {string} [sku.name] The name. Possible values include: * 'NotSpecified', 'Free', 'Shared', 'Basic', 'Standard', 'Premium' - * @member {object} [sku.plan] The reference to plan. - * @member {string} [sku.plan.id] The resource id. - * @member {string} [sku.plan.name] Gets the resource name. - * @member {string} [sku.plan.type] Gets the resource type. - * @member {object} [integrationAccount] The integration account. - * @member {string} [integrationAccount.id] The resource id. - * @member {string} [integrationAccount.name] Gets the resource name. - * @member {string} [integrationAccount.type] Gets the resource type. - * @member {object} [definition] The definition. - * @member {object} [parameters] The parameters. + * @property {object} [sku.plan] The reference to plan. + * @property {string} [sku.plan.id] The resource id. + * @property {string} [sku.plan.name] Gets the resource name. + * @property {string} [sku.plan.type] Gets the resource type. + * @property {object} [integrationAccount] The integration account. + * @property {string} [integrationAccount.id] The resource id. + * @property {string} [integrationAccount.name] Gets the resource name. + * @property {string} [integrationAccount.type] Gets the resource type. + * @property {object} [definition] The definition. + * @property {object} [parameters] The parameters. */ constructor() { super(); diff --git a/lib/services/logicManagement/lib/models/workflowFilter.js b/lib/services/logicManagement/lib/models/workflowFilter.js index 021d23de22..93ec52de73 100644 --- a/lib/services/logicManagement/lib/models/workflowFilter.js +++ b/lib/services/logicManagement/lib/models/workflowFilter.js @@ -17,8 +17,9 @@ class WorkflowFilter { /** * Create a WorkflowFilter. - * @member {string} [state] The state of workflows. Possible values include: - * 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + * @property {string} [state] The state of workflows. Possible values + * include: 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', + * 'Suspended' */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/workflowListResult.js b/lib/services/logicManagement/lib/models/workflowListResult.js index 7034f80094..4154a5b665 100644 --- a/lib/services/logicManagement/lib/models/workflowListResult.js +++ b/lib/services/logicManagement/lib/models/workflowListResult.js @@ -16,7 +16,7 @@ class WorkflowListResult extends Array { /** * Create a WorkflowListResult. - * @member {string} [nextLink] The URL to get the next set of results. + * @property {string} [nextLink] The URL to get the next set of results. */ constructor() { super(); diff --git a/lib/services/logicManagement/lib/models/workflowOutputParameter.js b/lib/services/logicManagement/lib/models/workflowOutputParameter.js index 83aa917ad7..24d7dfddde 100644 --- a/lib/services/logicManagement/lib/models/workflowOutputParameter.js +++ b/lib/services/logicManagement/lib/models/workflowOutputParameter.js @@ -20,7 +20,7 @@ const models = require('./index'); class WorkflowOutputParameter extends models['WorkflowParameter'] { /** * Create a WorkflowOutputParameter. - * @member {object} [error] Gets the error. + * @property {object} [error] Gets the error. */ constructor() { super(); diff --git a/lib/services/logicManagement/lib/models/workflowParameter.js b/lib/services/logicManagement/lib/models/workflowParameter.js index 8971c209bb..6a72231655 100644 --- a/lib/services/logicManagement/lib/models/workflowParameter.js +++ b/lib/services/logicManagement/lib/models/workflowParameter.js @@ -17,12 +17,12 @@ class WorkflowParameter { /** * Create a WorkflowParameter. - * @member {string} [type] The type. Possible values include: 'NotSpecified', - * 'String', 'SecureString', 'Int', 'Float', 'Bool', 'Array', 'Object', - * 'SecureObject' - * @member {object} [value] The value. - * @member {object} [metadata] The metadata. - * @member {string} [description] The description. + * @property {string} [type] The type. Possible values include: + * 'NotSpecified', 'String', 'SecureString', 'Int', 'Float', 'Bool', 'Array', + * 'Object', 'SecureObject' + * @property {object} [value] The value. + * @property {object} [metadata] The metadata. + * @property {string} [description] The description. */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/workflowRun.js b/lib/services/logicManagement/lib/models/workflowRun.js index 7e92d6fe4a..28ef3c58a3 100644 --- a/lib/services/logicManagement/lib/models/workflowRun.js +++ b/lib/services/logicManagement/lib/models/workflowRun.js @@ -20,102 +20,107 @@ const models = require('./index'); class WorkflowRun extends models['SubResource'] { /** * Create a WorkflowRun. - * @member {date} [waitEndTime] Gets the wait end time. - * @member {date} [startTime] Gets the start time. - * @member {date} [endTime] Gets the end time. - * @member {string} [status] Gets the status. Possible values include: + * @property {date} [waitEndTime] Gets the wait end time. + * @property {date} [startTime] Gets the start time. + * @property {date} [endTime] Gets the end time. + * @property {string} [status] Gets the status. Possible values include: * 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', * 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', * 'Ignored' - * @member {string} [code] Gets the code. - * @member {object} [error] Gets the error. - * @member {string} [correlationId] Gets the correlation id. - * @member {object} [correlation] The run correlation. - * @member {string} [correlation.clientTrackingId] The client tracking id. - * @member {object} [workflow] Gets the reference to workflow version. - * @member {string} [workflow.id] The resource id. - * @member {string} [workflow.name] Gets the resource name. - * @member {string} [workflow.type] Gets the resource type. - * @member {object} [trigger] Gets the fired trigger. - * @member {string} [trigger.name] Gets the name. - * @member {object} [trigger.inputs] Gets the inputs. - * @member {object} [trigger.inputsLink] Gets the link to inputs. - * @member {string} [trigger.inputsLink.uri] The content link URI. - * @member {string} [trigger.inputsLink.contentVersion] The content version. - * @member {number} [trigger.inputsLink.contentSize] The content size. - * @member {object} [trigger.inputsLink.contentHash] The content hash. - * @member {string} [trigger.inputsLink.contentHash.algorithm] The algorithm - * of the content hash. - * @member {string} [trigger.inputsLink.contentHash.value] The value of the - * content hash. - * @member {object} [trigger.inputsLink.metadata] The metadata. - * @member {object} [trigger.outputs] Gets the outputs. - * @member {object} [trigger.outputsLink] Gets the link to outputs. - * @member {string} [trigger.outputsLink.uri] The content link URI. - * @member {string} [trigger.outputsLink.contentVersion] The content version. - * @member {number} [trigger.outputsLink.contentSize] The content size. - * @member {object} [trigger.outputsLink.contentHash] The content hash. - * @member {string} [trigger.outputsLink.contentHash.algorithm] The algorithm - * of the content hash. - * @member {string} [trigger.outputsLink.contentHash.value] The value of the + * @property {string} [code] Gets the code. + * @property {object} [error] Gets the error. + * @property {string} [correlationId] Gets the correlation id. + * @property {object} [correlation] The run correlation. + * @property {string} [correlation.clientTrackingId] The client tracking id. + * @property {object} [workflow] Gets the reference to workflow version. + * @property {string} [workflow.id] The resource id. + * @property {string} [workflow.name] Gets the resource name. + * @property {string} [workflow.type] Gets the resource type. + * @property {object} [trigger] Gets the fired trigger. + * @property {string} [trigger.name] Gets the name. + * @property {object} [trigger.inputs] Gets the inputs. + * @property {object} [trigger.inputsLink] Gets the link to inputs. + * @property {string} [trigger.inputsLink.uri] The content link URI. + * @property {string} [trigger.inputsLink.contentVersion] The content + * version. + * @property {number} [trigger.inputsLink.contentSize] The content size. + * @property {object} [trigger.inputsLink.contentHash] The content hash. + * @property {string} [trigger.inputsLink.contentHash.algorithm] The + * algorithm of the content hash. + * @property {string} [trigger.inputsLink.contentHash.value] The value of the * content hash. - * @member {object} [trigger.outputsLink.metadata] The metadata. - * @member {date} [trigger.scheduledTime] Gets the scheduled time. - * @member {date} [trigger.startTime] Gets the start time. - * @member {date} [trigger.endTime] Gets the end time. - * @member {string} [trigger.trackingId] Gets the tracking id. - * @member {object} [trigger.correlation] The run correlation. - * @member {string} [trigger.correlation.clientTrackingId] The client + * @property {object} [trigger.inputsLink.metadata] The metadata. + * @property {object} [trigger.outputs] Gets the outputs. + * @property {object} [trigger.outputsLink] Gets the link to outputs. + * @property {string} [trigger.outputsLink.uri] The content link URI. + * @property {string} [trigger.outputsLink.contentVersion] The content + * version. + * @property {number} [trigger.outputsLink.contentSize] The content size. + * @property {object} [trigger.outputsLink.contentHash] The content hash. + * @property {string} [trigger.outputsLink.contentHash.algorithm] The + * algorithm of the content hash. + * @property {string} [trigger.outputsLink.contentHash.value] The value of + * the content hash. + * @property {object} [trigger.outputsLink.metadata] The metadata. + * @property {date} [trigger.scheduledTime] Gets the scheduled time. + * @property {date} [trigger.startTime] Gets the start time. + * @property {date} [trigger.endTime] Gets the end time. + * @property {string} [trigger.trackingId] Gets the tracking id. + * @property {object} [trigger.correlation] The run correlation. + * @property {string} [trigger.correlation.clientTrackingId] The client * tracking id. - * @member {string} [trigger.code] Gets the code. - * @member {string} [trigger.status] Gets the status. Possible values + * @property {string} [trigger.code] Gets the code. + * @property {string} [trigger.status] Gets the status. Possible values * include: 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', * 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', * 'Aborted', 'Ignored' - * @member {object} [trigger.error] Gets the error. - * @member {object} [trigger.trackedProperties] Gets the tracked properties. - * @member {object} [outputs] Gets the outputs. - * @member {object} [response] Gets the response of the flow run. - * @member {string} [response.name] Gets the name. - * @member {object} [response.inputs] Gets the inputs. - * @member {object} [response.inputsLink] Gets the link to inputs. - * @member {string} [response.inputsLink.uri] The content link URI. - * @member {string} [response.inputsLink.contentVersion] The content version. - * @member {number} [response.inputsLink.contentSize] The content size. - * @member {object} [response.inputsLink.contentHash] The content hash. - * @member {string} [response.inputsLink.contentHash.algorithm] The algorithm - * of the content hash. - * @member {string} [response.inputsLink.contentHash.value] The value of the - * content hash. - * @member {object} [response.inputsLink.metadata] The metadata. - * @member {object} [response.outputs] Gets the outputs. - * @member {object} [response.outputsLink] Gets the link to outputs. - * @member {string} [response.outputsLink.uri] The content link URI. - * @member {string} [response.outputsLink.contentVersion] The content + * @property {object} [trigger.error] Gets the error. + * @property {object} [trigger.trackedProperties] Gets the tracked + * properties. + * @property {object} [outputs] Gets the outputs. + * @property {object} [response] Gets the response of the flow run. + * @property {string} [response.name] Gets the name. + * @property {object} [response.inputs] Gets the inputs. + * @property {object} [response.inputsLink] Gets the link to inputs. + * @property {string} [response.inputsLink.uri] The content link URI. + * @property {string} [response.inputsLink.contentVersion] The content * version. - * @member {number} [response.outputsLink.contentSize] The content size. - * @member {object} [response.outputsLink.contentHash] The content hash. - * @member {string} [response.outputsLink.contentHash.algorithm] The + * @property {number} [response.inputsLink.contentSize] The content size. + * @property {object} [response.inputsLink.contentHash] The content hash. + * @property {string} [response.inputsLink.contentHash.algorithm] The * algorithm of the content hash. - * @member {string} [response.outputsLink.contentHash.value] The value of the - * content hash. - * @member {object} [response.outputsLink.metadata] The metadata. - * @member {date} [response.scheduledTime] Gets the scheduled time. - * @member {date} [response.startTime] Gets the start time. - * @member {date} [response.endTime] Gets the end time. - * @member {string} [response.trackingId] Gets the tracking id. - * @member {object} [response.correlation] The run correlation. - * @member {string} [response.correlation.clientTrackingId] The client + * @property {string} [response.inputsLink.contentHash.value] The value of + * the content hash. + * @property {object} [response.inputsLink.metadata] The metadata. + * @property {object} [response.outputs] Gets the outputs. + * @property {object} [response.outputsLink] Gets the link to outputs. + * @property {string} [response.outputsLink.uri] The content link URI. + * @property {string} [response.outputsLink.contentVersion] The content + * version. + * @property {number} [response.outputsLink.contentSize] The content size. + * @property {object} [response.outputsLink.contentHash] The content hash. + * @property {string} [response.outputsLink.contentHash.algorithm] The + * algorithm of the content hash. + * @property {string} [response.outputsLink.contentHash.value] The value of + * the content hash. + * @property {object} [response.outputsLink.metadata] The metadata. + * @property {date} [response.scheduledTime] Gets the scheduled time. + * @property {date} [response.startTime] Gets the start time. + * @property {date} [response.endTime] Gets the end time. + * @property {string} [response.trackingId] Gets the tracking id. + * @property {object} [response.correlation] The run correlation. + * @property {string} [response.correlation.clientTrackingId] The client * tracking id. - * @member {string} [response.code] Gets the code. - * @member {string} [response.status] Gets the status. Possible values + * @property {string} [response.code] Gets the code. + * @property {string} [response.status] Gets the status. Possible values * include: 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', * 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', * 'Aborted', 'Ignored' - * @member {object} [response.error] Gets the error. - * @member {object} [response.trackedProperties] Gets the tracked properties. - * @member {string} [name] Gets the workflow run name. - * @member {string} [type] Gets the workflow run type. + * @property {object} [response.error] Gets the error. + * @property {object} [response.trackedProperties] Gets the tracked + * properties. + * @property {string} [name] Gets the workflow run name. + * @property {string} [type] Gets the workflow run type. */ constructor() { super(); diff --git a/lib/services/logicManagement/lib/models/workflowRunAction.js b/lib/services/logicManagement/lib/models/workflowRunAction.js index 483d3429ac..aff7845bab 100644 --- a/lib/services/logicManagement/lib/models/workflowRunAction.js +++ b/lib/services/logicManagement/lib/models/workflowRunAction.js @@ -20,41 +20,41 @@ const models = require('./index'); class WorkflowRunAction extends models['SubResource'] { /** * Create a WorkflowRunAction. - * @member {date} [startTime] Gets the start time. - * @member {date} [endTime] Gets the end time. - * @member {string} [status] Gets the status. Possible values include: + * @property {date} [startTime] Gets the start time. + * @property {date} [endTime] Gets the end time. + * @property {string} [status] Gets the status. Possible values include: * 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', * 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', * 'Ignored' - * @member {string} [code] Gets the code. - * @member {object} [error] Gets the error. - * @member {string} [trackingId] Gets the tracking id. - * @member {object} [correlation] The correlation properties. - * @member {string} [correlation.clientTrackingId] The client tracking id. - * @member {object} [inputsLink] Gets the link to inputs. - * @member {string} [inputsLink.uri] The content link URI. - * @member {string} [inputsLink.contentVersion] The content version. - * @member {number} [inputsLink.contentSize] The content size. - * @member {object} [inputsLink.contentHash] The content hash. - * @member {string} [inputsLink.contentHash.algorithm] The algorithm of the + * @property {string} [code] Gets the code. + * @property {object} [error] Gets the error. + * @property {string} [trackingId] Gets the tracking id. + * @property {object} [correlation] The correlation properties. + * @property {string} [correlation.clientTrackingId] The client tracking id. + * @property {object} [inputsLink] Gets the link to inputs. + * @property {string} [inputsLink.uri] The content link URI. + * @property {string} [inputsLink.contentVersion] The content version. + * @property {number} [inputsLink.contentSize] The content size. + * @property {object} [inputsLink.contentHash] The content hash. + * @property {string} [inputsLink.contentHash.algorithm] The algorithm of the * content hash. - * @member {string} [inputsLink.contentHash.value] The value of the content + * @property {string} [inputsLink.contentHash.value] The value of the content * hash. - * @member {object} [inputsLink.metadata] The metadata. - * @member {object} [outputsLink] Gets the link to outputs. - * @member {string} [outputsLink.uri] The content link URI. - * @member {string} [outputsLink.contentVersion] The content version. - * @member {number} [outputsLink.contentSize] The content size. - * @member {object} [outputsLink.contentHash] The content hash. - * @member {string} [outputsLink.contentHash.algorithm] The algorithm of the + * @property {object} [inputsLink.metadata] The metadata. + * @property {object} [outputsLink] Gets the link to outputs. + * @property {string} [outputsLink.uri] The content link URI. + * @property {string} [outputsLink.contentVersion] The content version. + * @property {number} [outputsLink.contentSize] The content size. + * @property {object} [outputsLink.contentHash] The content hash. + * @property {string} [outputsLink.contentHash.algorithm] The algorithm of + * the content hash. + * @property {string} [outputsLink.contentHash.value] The value of the * content hash. - * @member {string} [outputsLink.contentHash.value] The value of the content - * hash. - * @member {object} [outputsLink.metadata] The metadata. - * @member {object} [trackedProperties] Gets the tracked properties. - * @member {array} [retryHistory] Gets the retry histories. - * @member {string} [name] Gets the workflow run action name. - * @member {string} [type] Gets the workflow run action type. + * @property {object} [outputsLink.metadata] The metadata. + * @property {object} [trackedProperties] Gets the tracked properties. + * @property {array} [retryHistory] Gets the retry histories. + * @property {string} [name] Gets the workflow run action name. + * @property {string} [type] Gets the workflow run action type. */ constructor() { super(); diff --git a/lib/services/logicManagement/lib/models/workflowRunActionFilter.js b/lib/services/logicManagement/lib/models/workflowRunActionFilter.js index a0721a3c1f..fac7c399bd 100644 --- a/lib/services/logicManagement/lib/models/workflowRunActionFilter.js +++ b/lib/services/logicManagement/lib/models/workflowRunActionFilter.js @@ -17,7 +17,7 @@ class WorkflowRunActionFilter { /** * Create a WorkflowRunActionFilter. - * @member {string} [status] The status of workflow run action. Possible + * @property {string} [status] The status of workflow run action. Possible * values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', * 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', * 'TimedOut', 'Aborted', 'Ignored' diff --git a/lib/services/logicManagement/lib/models/workflowRunActionListResult.js b/lib/services/logicManagement/lib/models/workflowRunActionListResult.js index 17b81c3125..55463d61f3 100644 --- a/lib/services/logicManagement/lib/models/workflowRunActionListResult.js +++ b/lib/services/logicManagement/lib/models/workflowRunActionListResult.js @@ -16,7 +16,7 @@ class WorkflowRunActionListResult extends Array { /** * Create a WorkflowRunActionListResult. - * @member {string} [nextLink] The URL to get the next set of results. + * @property {string} [nextLink] The URL to get the next set of results. */ constructor() { super(); diff --git a/lib/services/logicManagement/lib/models/workflowRunActionRepetitionDefinition.js b/lib/services/logicManagement/lib/models/workflowRunActionRepetitionDefinition.js index 0eace5d6de..174c3a4fbc 100644 --- a/lib/services/logicManagement/lib/models/workflowRunActionRepetitionDefinition.js +++ b/lib/services/logicManagement/lib/models/workflowRunActionRepetitionDefinition.js @@ -20,45 +20,45 @@ const models = require('./index'); class WorkflowRunActionRepetitionDefinition extends models['Resource'] { /** * Create a WorkflowRunActionRepetitionDefinition. - * @member {date} [startTime] The start time of the workflow scope + * @property {date} [startTime] The start time of the workflow scope * repetition. - * @member {date} [endTime] The end time of the workflow scope repetition. - * @member {object} [correlation] The correlation properties. - * @member {string} [correlation.actionTrackingId] The action tracking + * @property {date} [endTime] The end time of the workflow scope repetition. + * @property {object} [correlation] The correlation properties. + * @property {string} [correlation.actionTrackingId] The action tracking * identifier. - * @member {string} [status] The status of the workflow scope repetition. + * @property {string} [status] The status of the workflow scope repetition. * Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', * 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', * 'TimedOut', 'Aborted', 'Ignored' - * @member {string} [code] The workflow scope repetition code. - * @member {object} [error] - * @member {string} [trackingId] Gets the tracking id. - * @member {object} [inputs] Gets the inputs. - * @member {object} [inputsLink] Gets the link to inputs. - * @member {string} [inputsLink.uri] The content link URI. - * @member {string} [inputsLink.contentVersion] The content version. - * @member {number} [inputsLink.contentSize] The content size. - * @member {object} [inputsLink.contentHash] The content hash. - * @member {string} [inputsLink.contentHash.algorithm] The algorithm of the + * @property {string} [code] The workflow scope repetition code. + * @property {object} [error] + * @property {string} [trackingId] Gets the tracking id. + * @property {object} [inputs] Gets the inputs. + * @property {object} [inputsLink] Gets the link to inputs. + * @property {string} [inputsLink.uri] The content link URI. + * @property {string} [inputsLink.contentVersion] The content version. + * @property {number} [inputsLink.contentSize] The content size. + * @property {object} [inputsLink.contentHash] The content hash. + * @property {string} [inputsLink.contentHash.algorithm] The algorithm of the * content hash. - * @member {string} [inputsLink.contentHash.value] The value of the content + * @property {string} [inputsLink.contentHash.value] The value of the content * hash. - * @member {object} [inputsLink.metadata] The metadata. - * @member {object} [outputs] Gets the outputs. - * @member {object} [outputsLink] Gets the link to outputs. - * @member {string} [outputsLink.uri] The content link URI. - * @member {string} [outputsLink.contentVersion] The content version. - * @member {number} [outputsLink.contentSize] The content size. - * @member {object} [outputsLink.contentHash] The content hash. - * @member {string} [outputsLink.contentHash.algorithm] The algorithm of the + * @property {object} [inputsLink.metadata] The metadata. + * @property {object} [outputs] Gets the outputs. + * @property {object} [outputsLink] Gets the link to outputs. + * @property {string} [outputsLink.uri] The content link URI. + * @property {string} [outputsLink.contentVersion] The content version. + * @property {number} [outputsLink.contentSize] The content size. + * @property {object} [outputsLink.contentHash] The content hash. + * @property {string} [outputsLink.contentHash.algorithm] The algorithm of + * the content hash. + * @property {string} [outputsLink.contentHash.value] The value of the * content hash. - * @member {string} [outputsLink.contentHash.value] The value of the content - * hash. - * @member {object} [outputsLink.metadata] The metadata. - * @member {object} [trackedProperties] Gets the tracked properties. - * @member {array} [retryHistory] Gets the retry histories. - * @member {number} [iterationCount] - * @member {array} [repetitionIndexes] The repetition indexes. + * @property {object} [outputsLink.metadata] The metadata. + * @property {object} [trackedProperties] Gets the tracked properties. + * @property {array} [retryHistory] Gets the retry histories. + * @property {number} [iterationCount] + * @property {array} [repetitionIndexes] The repetition indexes. */ constructor() { super(); diff --git a/lib/services/logicManagement/lib/models/workflowRunFilter.js b/lib/services/logicManagement/lib/models/workflowRunFilter.js index 30cd61554d..50febc112e 100644 --- a/lib/services/logicManagement/lib/models/workflowRunFilter.js +++ b/lib/services/logicManagement/lib/models/workflowRunFilter.js @@ -17,7 +17,7 @@ class WorkflowRunFilter { /** * Create a WorkflowRunFilter. - * @member {string} [status] The status of workflow run. Possible values + * @property {string} [status] The status of workflow run. Possible values * include: 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', * 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', * 'Aborted', 'Ignored' diff --git a/lib/services/logicManagement/lib/models/workflowRunListResult.js b/lib/services/logicManagement/lib/models/workflowRunListResult.js index 5a1952db9b..966155b9aa 100644 --- a/lib/services/logicManagement/lib/models/workflowRunListResult.js +++ b/lib/services/logicManagement/lib/models/workflowRunListResult.js @@ -16,7 +16,7 @@ class WorkflowRunListResult extends Array { /** * Create a WorkflowRunListResult. - * @member {string} [nextLink] The URL to get the next set of results. + * @property {string} [nextLink] The URL to get the next set of results. */ constructor() { super(); diff --git a/lib/services/logicManagement/lib/models/workflowRunTrigger.js b/lib/services/logicManagement/lib/models/workflowRunTrigger.js index d503a396f9..6be73d6598 100644 --- a/lib/services/logicManagement/lib/models/workflowRunTrigger.js +++ b/lib/services/logicManagement/lib/models/workflowRunTrigger.js @@ -17,42 +17,42 @@ class WorkflowRunTrigger { /** * Create a WorkflowRunTrigger. - * @member {string} [name] Gets the name. - * @member {object} [inputs] Gets the inputs. - * @member {object} [inputsLink] Gets the link to inputs. - * @member {string} [inputsLink.uri] The content link URI. - * @member {string} [inputsLink.contentVersion] The content version. - * @member {number} [inputsLink.contentSize] The content size. - * @member {object} [inputsLink.contentHash] The content hash. - * @member {string} [inputsLink.contentHash.algorithm] The algorithm of the + * @property {string} [name] Gets the name. + * @property {object} [inputs] Gets the inputs. + * @property {object} [inputsLink] Gets the link to inputs. + * @property {string} [inputsLink.uri] The content link URI. + * @property {string} [inputsLink.contentVersion] The content version. + * @property {number} [inputsLink.contentSize] The content size. + * @property {object} [inputsLink.contentHash] The content hash. + * @property {string} [inputsLink.contentHash.algorithm] The algorithm of the * content hash. - * @member {string} [inputsLink.contentHash.value] The value of the content + * @property {string} [inputsLink.contentHash.value] The value of the content * hash. - * @member {object} [inputsLink.metadata] The metadata. - * @member {object} [outputs] Gets the outputs. - * @member {object} [outputsLink] Gets the link to outputs. - * @member {string} [outputsLink.uri] The content link URI. - * @member {string} [outputsLink.contentVersion] The content version. - * @member {number} [outputsLink.contentSize] The content size. - * @member {object} [outputsLink.contentHash] The content hash. - * @member {string} [outputsLink.contentHash.algorithm] The algorithm of the + * @property {object} [inputsLink.metadata] The metadata. + * @property {object} [outputs] Gets the outputs. + * @property {object} [outputsLink] Gets the link to outputs. + * @property {string} [outputsLink.uri] The content link URI. + * @property {string} [outputsLink.contentVersion] The content version. + * @property {number} [outputsLink.contentSize] The content size. + * @property {object} [outputsLink.contentHash] The content hash. + * @property {string} [outputsLink.contentHash.algorithm] The algorithm of + * the content hash. + * @property {string} [outputsLink.contentHash.value] The value of the * content hash. - * @member {string} [outputsLink.contentHash.value] The value of the content - * hash. - * @member {object} [outputsLink.metadata] The metadata. - * @member {date} [scheduledTime] Gets the scheduled time. - * @member {date} [startTime] Gets the start time. - * @member {date} [endTime] Gets the end time. - * @member {string} [trackingId] Gets the tracking id. - * @member {object} [correlation] The run correlation. - * @member {string} [correlation.clientTrackingId] The client tracking id. - * @member {string} [code] Gets the code. - * @member {string} [status] Gets the status. Possible values include: + * @property {object} [outputsLink.metadata] The metadata. + * @property {date} [scheduledTime] Gets the scheduled time. + * @property {date} [startTime] Gets the start time. + * @property {date} [endTime] Gets the end time. + * @property {string} [trackingId] Gets the tracking id. + * @property {object} [correlation] The run correlation. + * @property {string} [correlation.clientTrackingId] The client tracking id. + * @property {string} [code] Gets the code. + * @property {string} [status] Gets the status. Possible values include: * 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', * 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', * 'Ignored' - * @member {object} [error] Gets the error. - * @member {object} [trackedProperties] Gets the tracked properties. + * @property {object} [error] Gets the error. + * @property {object} [trackedProperties] Gets the tracked properties. */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/workflowTrigger.js b/lib/services/logicManagement/lib/models/workflowTrigger.js index 6b0c50e13a..5bc10d6f91 100644 --- a/lib/services/logicManagement/lib/models/workflowTrigger.js +++ b/lib/services/logicManagement/lib/models/workflowTrigger.js @@ -20,42 +20,42 @@ const models = require('./index'); class WorkflowTrigger extends models['SubResource'] { /** * Create a WorkflowTrigger. - * @member {string} [provisioningState] Gets the provisioning state. Possible - * values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', + * @property {string} [provisioningState] Gets the provisioning state. + * Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', * 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', * 'Succeeded', 'Moving', 'Updating', 'Registering', 'Registered', * 'Unregistering', 'Unregistered', 'Completed' - * @member {date} [createdTime] Gets the created time. - * @member {date} [changedTime] Gets the changed time. - * @member {string} [state] Gets the state. Possible values include: + * @property {date} [createdTime] Gets the created time. + * @property {date} [changedTime] Gets the changed time. + * @property {string} [state] Gets the state. Possible values include: * 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' - * @member {string} [status] Gets the status. Possible values include: + * @property {string} [status] Gets the status. Possible values include: * 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', * 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', * 'Ignored' - * @member {date} [lastExecutionTime] Gets the last execution time. - * @member {date} [nextExecutionTime] Gets the next execution time. - * @member {object} [recurrence] Gets the workflow trigger recurrence. - * @member {string} [recurrence.frequency] The frequency. Possible values + * @property {date} [lastExecutionTime] Gets the last execution time. + * @property {date} [nextExecutionTime] Gets the next execution time. + * @property {object} [recurrence] Gets the workflow trigger recurrence. + * @property {string} [recurrence.frequency] The frequency. Possible values * include: 'NotSpecified', 'Second', 'Minute', 'Hour', 'Day', 'Week', * 'Month', 'Year' - * @member {number} [recurrence.interval] The interval. - * @member {string} [recurrence.startTime] The start time. - * @member {string} [recurrence.endTime] The end time. - * @member {string} [recurrence.timeZone] The time zone. - * @member {object} [recurrence.schedule] The recurrence schedule. - * @member {array} [recurrence.schedule.minutes] The minutes. - * @member {array} [recurrence.schedule.hours] The hours. - * @member {array} [recurrence.schedule.weekDays] The days of the week. - * @member {array} [recurrence.schedule.monthDays] The month days. - * @member {array} [recurrence.schedule.monthlyOccurrences] The monthly + * @property {number} [recurrence.interval] The interval. + * @property {string} [recurrence.startTime] The start time. + * @property {string} [recurrence.endTime] The end time. + * @property {string} [recurrence.timeZone] The time zone. + * @property {object} [recurrence.schedule] The recurrence schedule. + * @property {array} [recurrence.schedule.minutes] The minutes. + * @property {array} [recurrence.schedule.hours] The hours. + * @property {array} [recurrence.schedule.weekDays] The days of the week. + * @property {array} [recurrence.schedule.monthDays] The month days. + * @property {array} [recurrence.schedule.monthlyOccurrences] The monthly * occurrences. - * @member {object} [workflow] Gets the reference to workflow. - * @member {string} [workflow.id] The resource id. - * @member {string} [workflow.name] Gets the resource name. - * @member {string} [workflow.type] Gets the resource type. - * @member {string} [name] Gets the workflow trigger name. - * @member {string} [type] Gets the workflow trigger type. + * @property {object} [workflow] Gets the reference to workflow. + * @property {string} [workflow.id] The resource id. + * @property {string} [workflow.name] Gets the resource name. + * @property {string} [workflow.type] Gets the resource type. + * @property {string} [name] Gets the workflow trigger name. + * @property {string} [type] Gets the workflow trigger type. */ constructor() { super(); diff --git a/lib/services/logicManagement/lib/models/workflowTriggerCallbackUrl.js b/lib/services/logicManagement/lib/models/workflowTriggerCallbackUrl.js index c9f2caf618..92fa523902 100644 --- a/lib/services/logicManagement/lib/models/workflowTriggerCallbackUrl.js +++ b/lib/services/logicManagement/lib/models/workflowTriggerCallbackUrl.js @@ -17,22 +17,22 @@ class WorkflowTriggerCallbackUrl { /** * Create a WorkflowTriggerCallbackUrl. - * @member {string} [value] Gets the workflow trigger callback URL. - * @member {string} [method] Gets the workflow trigger callback URL HTTP + * @property {string} [value] Gets the workflow trigger callback URL. + * @property {string} [method] Gets the workflow trigger callback URL HTTP * method. - * @member {string} [basePath] Gets the workflow trigger callback URL base + * @property {string} [basePath] Gets the workflow trigger callback URL base * path. - * @member {string} [relativePath] Gets the workflow trigger callback URL + * @property {string} [relativePath] Gets the workflow trigger callback URL * relative path. - * @member {array} [relativePathParameters] Gets the workflow trigger + * @property {array} [relativePathParameters] Gets the workflow trigger * callback URL relative path parameters. - * @member {object} [queries] Gets the workflow trigger callback URL query + * @property {object} [queries] Gets the workflow trigger callback URL query * parameters. - * @member {string} [queries.apiVersion] The api version. - * @member {string} [queries.sp] The SAS permissions. - * @member {string} [queries.sv] The SAS version. - * @member {string} [queries.sig] The SAS signature. - * @member {string} [queries.se] The SAS timestamp. + * @property {string} [queries.apiVersion] The api version. + * @property {string} [queries.sp] The SAS permissions. + * @property {string} [queries.sv] The SAS version. + * @property {string} [queries.sig] The SAS signature. + * @property {string} [queries.se] The SAS timestamp. */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/workflowTriggerFilter.js b/lib/services/logicManagement/lib/models/workflowTriggerFilter.js index 3ae76eaf4a..fc1fcc8b2e 100644 --- a/lib/services/logicManagement/lib/models/workflowTriggerFilter.js +++ b/lib/services/logicManagement/lib/models/workflowTriggerFilter.js @@ -17,7 +17,7 @@ class WorkflowTriggerFilter { /** * Create a WorkflowTriggerFilter. - * @member {string} [state] The state of workflow trigger. Possible values + * @property {string} [state] The state of workflow trigger. Possible values * include: 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', * 'Suspended' */ diff --git a/lib/services/logicManagement/lib/models/workflowTriggerHistory.js b/lib/services/logicManagement/lib/models/workflowTriggerHistory.js index 6beff6f94a..a5895b277d 100644 --- a/lib/services/logicManagement/lib/models/workflowTriggerHistory.js +++ b/lib/services/logicManagement/lib/models/workflowTriggerHistory.js @@ -20,45 +20,45 @@ const models = require('./index'); class WorkflowTriggerHistory extends models['SubResource'] { /** * Create a WorkflowTriggerHistory. - * @member {date} [startTime] Gets the start time. - * @member {date} [endTime] Gets the end time. - * @member {string} [status] Gets the status. Possible values include: + * @property {date} [startTime] Gets the start time. + * @property {date} [endTime] Gets the end time. + * @property {string} [status] Gets the status. Possible values include: * 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', * 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', * 'Ignored' - * @member {string} [code] Gets the code. - * @member {object} [error] Gets the error. - * @member {string} [trackingId] Gets the tracking id. - * @member {object} [correlation] The run correlation. - * @member {string} [correlation.clientTrackingId] The client tracking id. - * @member {object} [inputsLink] Gets the link to input parameters. - * @member {string} [inputsLink.uri] The content link URI. - * @member {string} [inputsLink.contentVersion] The content version. - * @member {number} [inputsLink.contentSize] The content size. - * @member {object} [inputsLink.contentHash] The content hash. - * @member {string} [inputsLink.contentHash.algorithm] The algorithm of the + * @property {string} [code] Gets the code. + * @property {object} [error] Gets the error. + * @property {string} [trackingId] Gets the tracking id. + * @property {object} [correlation] The run correlation. + * @property {string} [correlation.clientTrackingId] The client tracking id. + * @property {object} [inputsLink] Gets the link to input parameters. + * @property {string} [inputsLink.uri] The content link URI. + * @property {string} [inputsLink.contentVersion] The content version. + * @property {number} [inputsLink.contentSize] The content size. + * @property {object} [inputsLink.contentHash] The content hash. + * @property {string} [inputsLink.contentHash.algorithm] The algorithm of the * content hash. - * @member {string} [inputsLink.contentHash.value] The value of the content + * @property {string} [inputsLink.contentHash.value] The value of the content * hash. - * @member {object} [inputsLink.metadata] The metadata. - * @member {object} [outputsLink] Gets the link to output parameters. - * @member {string} [outputsLink.uri] The content link URI. - * @member {string} [outputsLink.contentVersion] The content version. - * @member {number} [outputsLink.contentSize] The content size. - * @member {object} [outputsLink.contentHash] The content hash. - * @member {string} [outputsLink.contentHash.algorithm] The algorithm of the + * @property {object} [inputsLink.metadata] The metadata. + * @property {object} [outputsLink] Gets the link to output parameters. + * @property {string} [outputsLink.uri] The content link URI. + * @property {string} [outputsLink.contentVersion] The content version. + * @property {number} [outputsLink.contentSize] The content size. + * @property {object} [outputsLink.contentHash] The content hash. + * @property {string} [outputsLink.contentHash.algorithm] The algorithm of + * the content hash. + * @property {string} [outputsLink.contentHash.value] The value of the * content hash. - * @member {string} [outputsLink.contentHash.value] The value of the content - * hash. - * @member {object} [outputsLink.metadata] The metadata. - * @member {boolean} [fired] Gets a value indicating whether trigger was + * @property {object} [outputsLink.metadata] The metadata. + * @property {boolean} [fired] Gets a value indicating whether trigger was * fired. - * @member {object} [run] Gets the reference to workflow run. - * @member {string} [run.id] The resource id. - * @member {string} [run.name] Gets the resource name. - * @member {string} [run.type] Gets the resource type. - * @member {string} [name] Gets the workflow trigger history name. - * @member {string} [type] Gets the workflow trigger history type. + * @property {object} [run] Gets the reference to workflow run. + * @property {string} [run.id] The resource id. + * @property {string} [run.name] Gets the resource name. + * @property {string} [run.type] Gets the resource type. + * @property {string} [name] Gets the workflow trigger history name. + * @property {string} [type] Gets the workflow trigger history type. */ constructor() { super(); diff --git a/lib/services/logicManagement/lib/models/workflowTriggerHistoryFilter.js b/lib/services/logicManagement/lib/models/workflowTriggerHistoryFilter.js index cac03cf70d..ff8854d649 100644 --- a/lib/services/logicManagement/lib/models/workflowTriggerHistoryFilter.js +++ b/lib/services/logicManagement/lib/models/workflowTriggerHistoryFilter.js @@ -17,8 +17,8 @@ class WorkflowTriggerHistoryFilter { /** * Create a WorkflowTriggerHistoryFilter. - * @member {string} [status] The status of workflow trigger history. Possible - * values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', + * @property {string} [status] The status of workflow trigger history. + * Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', * 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', * 'TimedOut', 'Aborted', 'Ignored' */ diff --git a/lib/services/logicManagement/lib/models/workflowTriggerHistoryListResult.js b/lib/services/logicManagement/lib/models/workflowTriggerHistoryListResult.js index ecef7a5e89..61fce6bc9d 100644 --- a/lib/services/logicManagement/lib/models/workflowTriggerHistoryListResult.js +++ b/lib/services/logicManagement/lib/models/workflowTriggerHistoryListResult.js @@ -16,7 +16,7 @@ class WorkflowTriggerHistoryListResult extends Array { /** * Create a WorkflowTriggerHistoryListResult. - * @member {string} [nextLink] The URL to get the next set of results. + * @property {string} [nextLink] The URL to get the next set of results. */ constructor() { super(); diff --git a/lib/services/logicManagement/lib/models/workflowTriggerListCallbackUrlQueries.js b/lib/services/logicManagement/lib/models/workflowTriggerListCallbackUrlQueries.js index 2be51f4d69..0e73bbbcca 100644 --- a/lib/services/logicManagement/lib/models/workflowTriggerListCallbackUrlQueries.js +++ b/lib/services/logicManagement/lib/models/workflowTriggerListCallbackUrlQueries.js @@ -17,11 +17,11 @@ class WorkflowTriggerListCallbackUrlQueries { /** * Create a WorkflowTriggerListCallbackUrlQueries. - * @member {string} [apiVersion] The api version. - * @member {string} [sp] The SAS permissions. - * @member {string} [sv] The SAS version. - * @member {string} [sig] The SAS signature. - * @member {string} [se] The SAS timestamp. + * @property {string} [apiVersion] The api version. + * @property {string} [sp] The SAS permissions. + * @property {string} [sv] The SAS version. + * @property {string} [sig] The SAS signature. + * @property {string} [se] The SAS timestamp. */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/workflowTriggerListResult.js b/lib/services/logicManagement/lib/models/workflowTriggerListResult.js index 8589def20d..060ff705a2 100644 --- a/lib/services/logicManagement/lib/models/workflowTriggerListResult.js +++ b/lib/services/logicManagement/lib/models/workflowTriggerListResult.js @@ -16,7 +16,7 @@ class WorkflowTriggerListResult extends Array { /** * Create a WorkflowTriggerListResult. - * @member {string} [nextLink] The URL to get the next set of results. + * @property {string} [nextLink] The URL to get the next set of results. */ constructor() { super(); diff --git a/lib/services/logicManagement/lib/models/workflowTriggerRecurrence.js b/lib/services/logicManagement/lib/models/workflowTriggerRecurrence.js index 449a8f8f71..ef892aafe2 100644 --- a/lib/services/logicManagement/lib/models/workflowTriggerRecurrence.js +++ b/lib/services/logicManagement/lib/models/workflowTriggerRecurrence.js @@ -17,18 +17,18 @@ class WorkflowTriggerRecurrence { /** * Create a WorkflowTriggerRecurrence. - * @member {string} [frequency] The frequency. Possible values include: + * @property {string} [frequency] The frequency. Possible values include: * 'NotSpecified', 'Second', 'Minute', 'Hour', 'Day', 'Week', 'Month', 'Year' - * @member {number} [interval] The interval. - * @member {string} [startTime] The start time. - * @member {string} [endTime] The end time. - * @member {string} [timeZone] The time zone. - * @member {object} [schedule] The recurrence schedule. - * @member {array} [schedule.minutes] The minutes. - * @member {array} [schedule.hours] The hours. - * @member {array} [schedule.weekDays] The days of the week. - * @member {array} [schedule.monthDays] The month days. - * @member {array} [schedule.monthlyOccurrences] The monthly occurrences. + * @property {number} [interval] The interval. + * @property {string} [startTime] The start time. + * @property {string} [endTime] The end time. + * @property {string} [timeZone] The time zone. + * @property {object} [schedule] The recurrence schedule. + * @property {array} [schedule.minutes] The minutes. + * @property {array} [schedule.hours] The hours. + * @property {array} [schedule.weekDays] The days of the week. + * @property {array} [schedule.monthDays] The month days. + * @property {array} [schedule.monthlyOccurrences] The monthly occurrences. */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/workflowVersion.js b/lib/services/logicManagement/lib/models/workflowVersion.js index 5b120deb11..ee67e9c893 100644 --- a/lib/services/logicManagement/lib/models/workflowVersion.js +++ b/lib/services/logicManagement/lib/models/workflowVersion.js @@ -20,25 +20,25 @@ const models = require('./index'); class WorkflowVersion extends models['Resource'] { /** * Create a WorkflowVersion. - * @member {date} [createdTime] Gets the created time. - * @member {date} [changedTime] Gets the changed time. - * @member {string} [state] The state. Possible values include: + * @property {date} [createdTime] Gets the created time. + * @property {date} [changedTime] Gets the changed time. + * @property {string} [state] The state. Possible values include: * 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' - * @member {string} [version] Gets the version. - * @member {string} [accessEndpoint] Gets the access endpoint. - * @member {object} [sku] The sku. - * @member {string} [sku.name] The name. Possible values include: + * @property {string} [version] Gets the version. + * @property {string} [accessEndpoint] Gets the access endpoint. + * @property {object} [sku] The sku. + * @property {string} [sku.name] The name. Possible values include: * 'NotSpecified', 'Free', 'Shared', 'Basic', 'Standard', 'Premium' - * @member {object} [sku.plan] The reference to plan. - * @member {string} [sku.plan.id] The resource id. - * @member {string} [sku.plan.name] Gets the resource name. - * @member {string} [sku.plan.type] Gets the resource type. - * @member {object} [integrationAccount] The integration account. - * @member {string} [integrationAccount.id] The resource id. - * @member {string} [integrationAccount.name] Gets the resource name. - * @member {string} [integrationAccount.type] Gets the resource type. - * @member {object} [definition] The definition. - * @member {object} [parameters] The parameters. + * @property {object} [sku.plan] The reference to plan. + * @property {string} [sku.plan.id] The resource id. + * @property {string} [sku.plan.name] Gets the resource name. + * @property {string} [sku.plan.type] Gets the resource type. + * @property {object} [integrationAccount] The integration account. + * @property {string} [integrationAccount.id] The resource id. + * @property {string} [integrationAccount.name] Gets the resource name. + * @property {string} [integrationAccount.type] Gets the resource type. + * @property {object} [definition] The definition. + * @property {object} [parameters] The parameters. */ constructor() { super(); diff --git a/lib/services/logicManagement/lib/models/workflowVersionListResult.js b/lib/services/logicManagement/lib/models/workflowVersionListResult.js index 18915cb91f..c548b0efbd 100644 --- a/lib/services/logicManagement/lib/models/workflowVersionListResult.js +++ b/lib/services/logicManagement/lib/models/workflowVersionListResult.js @@ -16,7 +16,7 @@ class WorkflowVersionListResult extends Array { /** * Create a WorkflowVersionListResult. - * @member {string} [nextLink] The URL to get the next set of results. + * @property {string} [nextLink] The URL to get the next set of results. */ constructor() { super(); diff --git a/lib/services/logicManagement/lib/models/x12AcknowledgementSettings.js b/lib/services/logicManagement/lib/models/x12AcknowledgementSettings.js index 10b4cb5a73..227014be16 100644 --- a/lib/services/logicManagement/lib/models/x12AcknowledgementSettings.js +++ b/lib/services/logicManagement/lib/models/x12AcknowledgementSettings.js @@ -17,35 +17,35 @@ class X12AcknowledgementSettings { /** * Create a X12AcknowledgementSettings. - * @member {boolean} needTechnicalAcknowledgement The value indicating + * @property {boolean} needTechnicalAcknowledgement The value indicating * whether technical acknowledgement is needed. - * @member {boolean} batchTechnicalAcknowledgements The value indicating + * @property {boolean} batchTechnicalAcknowledgements The value indicating * whether to batch the technical acknowledgements. - * @member {boolean} needFunctionalAcknowledgement The value indicating + * @property {boolean} needFunctionalAcknowledgement The value indicating * whether functional acknowledgement is needed. - * @member {string} [functionalAcknowledgementVersion] The functional + * @property {string} [functionalAcknowledgementVersion] The functional * acknowledgement version. - * @member {boolean} batchFunctionalAcknowledgements The value indicating + * @property {boolean} batchFunctionalAcknowledgements The value indicating * whether to batch functional acknowledgements. - * @member {boolean} needImplementationAcknowledgement The value indicating + * @property {boolean} needImplementationAcknowledgement The value indicating * whether implementation acknowledgement is needed. - * @member {string} [implementationAcknowledgementVersion] The implementation - * acknowledgement version. - * @member {boolean} batchImplementationAcknowledgements The value indicating - * whether to batch implementation acknowledgements. - * @member {boolean} needLoopForValidMessages The value indicating whether a - * loop is needed for valid messages. - * @member {boolean} sendSynchronousAcknowledgement The value indicating + * @property {string} [implementationAcknowledgementVersion] The + * implementation acknowledgement version. + * @property {boolean} batchImplementationAcknowledgements The value + * indicating whether to batch implementation acknowledgements. + * @property {boolean} needLoopForValidMessages The value indicating whether + * a loop is needed for valid messages. + * @property {boolean} sendSynchronousAcknowledgement The value indicating * whether to send synchronous acknowledgement. - * @member {string} [acknowledgementControlNumberPrefix] The acknowledgement - * control number prefix. - * @member {string} [acknowledgementControlNumberSuffix] The acknowledgement - * control number suffix. - * @member {number} acknowledgementControlNumberLowerBound The + * @property {string} [acknowledgementControlNumberPrefix] The + * acknowledgement control number prefix. + * @property {string} [acknowledgementControlNumberSuffix] The + * acknowledgement control number suffix. + * @property {number} acknowledgementControlNumberLowerBound The * acknowledgement control number lower bound. - * @member {number} acknowledgementControlNumberUpperBound The + * @property {number} acknowledgementControlNumberUpperBound The * acknowledgement control number upper bound. - * @member {boolean} rolloverAcknowledgementControlNumber The value + * @property {boolean} rolloverAcknowledgementControlNumber The value * indicating whether to rollover acknowledgement control number. */ constructor() { diff --git a/lib/services/logicManagement/lib/models/x12AgreementContent.js b/lib/services/logicManagement/lib/models/x12AgreementContent.js index 68ed4bb879..e85be6d7a9 100644 --- a/lib/services/logicManagement/lib/models/x12AgreementContent.js +++ b/lib/services/logicManagement/lib/models/x12AgreementContent.js @@ -17,515 +17,517 @@ class X12AgreementContent { /** * Create a X12AgreementContent. - * @member {object} receiveAgreement The X12 one-way receive agreement. - * @member {object} [receiveAgreement.senderBusinessIdentity] The sender + * @property {object} receiveAgreement The X12 one-way receive agreement. + * @property {object} [receiveAgreement.senderBusinessIdentity] The sender * business identity - * @member {string} [receiveAgreement.senderBusinessIdentity.qualifier] The + * @property {string} [receiveAgreement.senderBusinessIdentity.qualifier] The * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [receiveAgreement.senderBusinessIdentity.value] The user - * defined business identity value. - * @member {object} [receiveAgreement.receiverBusinessIdentity] The receiver - * business identity - * @member {string} [receiveAgreement.receiverBusinessIdentity.qualifier] The - * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [receiveAgreement.receiverBusinessIdentity.value] The + * @property {string} [receiveAgreement.senderBusinessIdentity.value] The * user defined business identity value. - * @member {object} [receiveAgreement.protocolSettings] The X12 protocol + * @property {object} [receiveAgreement.receiverBusinessIdentity] The + * receiver business identity + * @property {string} [receiveAgreement.receiverBusinessIdentity.qualifier] + * The business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 + * @property {string} [receiveAgreement.receiverBusinessIdentity.value] The + * user defined business identity value. + * @property {object} [receiveAgreement.protocolSettings] The X12 protocol * settings. - * @member {object} [receiveAgreement.protocolSettings.validationSettings] + * @property {object} [receiveAgreement.protocolSettings.validationSettings] * The X12 validation settings. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.validationSettings.validateCharacterSet] * The value indicating whether to validate character set in the message. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.validationSettings.checkDuplicateInterchangeControlNumber] * The value indicating whether to check for duplicate interchange control * number. - * @member {number} + * @property {number} * [receiveAgreement.protocolSettings.validationSettings.interchangeControlNumberValidityDays] * The validity period of interchange control number. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.validationSettings.checkDuplicateGroupControlNumber] * The value indicating whether to check for duplicate group control number. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.validationSettings.checkDuplicateTransactionSetControlNumber] * The value indicating whether to check for duplicate transaction set * control number. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.validationSettings.validateEdiTypes] * The value indicating whether to Whether to validate EDI types. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.validationSettings.validateXsdTypes] * The value indicating whether to Whether to validate XSD types. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.validationSettings.allowLeadingAndTrailingSpacesAndZeroes] * The value indicating whether to allow leading and trailing spaces and * zeroes. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.validationSettings.trimLeadingAndTrailingSpacesAndZeroes] * The value indicating whether to trim leading and trailing spaces and * zeroes. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.validationSettings.trailingSeparatorPolicy] * The trailing separator policy. Possible values include: 'NotSpecified', * 'NotAllowed', 'Optional', 'Mandatory' - * @member {object} [receiveAgreement.protocolSettings.framingSettings] The + * @property {object} [receiveAgreement.protocolSettings.framingSettings] The * X12 framing settings. - * @member {number} + * @property {number} * [receiveAgreement.protocolSettings.framingSettings.dataElementSeparator] * The data element separator. - * @member {number} + * @property {number} * [receiveAgreement.protocolSettings.framingSettings.componentSeparator] The * component separator. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.framingSettings.replaceSeparatorsInPayload] * The value indicating whether to replace separators in payload. - * @member {number} + * @property {number} * [receiveAgreement.protocolSettings.framingSettings.replaceCharacter] The * replacement character. - * @member {number} + * @property {number} * [receiveAgreement.protocolSettings.framingSettings.segmentTerminator] The * segment terminator. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.framingSettings.characterSet] The X12 * character set. Possible values include: 'NotSpecified', 'Basic', * 'Extended', 'UTF8' - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.framingSettings.segmentTerminatorSuffix] * The segment terminator suffix. Possible values include: 'NotSpecified', * 'None', 'CR', 'LF', 'CRLF' - * @member {object} [receiveAgreement.protocolSettings.envelopeSettings] The - * X12 envelope settings. - * @member {number} + * @property {object} [receiveAgreement.protocolSettings.envelopeSettings] + * The X12 envelope settings. + * @property {number} * [receiveAgreement.protocolSettings.envelopeSettings.controlStandardsId] * The controls standards id. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.envelopeSettings.useControlStandardsIdAsRepetitionCharacter] * The value indicating whether to use control standards id as repetition * character. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.envelopeSettings.senderApplicationId] * The sender application id. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.envelopeSettings.receiverApplicationId] * The receiver application id. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.envelopeSettings.controlVersionNumber] * The control version number. - * @member {number} + * @property {number} * [receiveAgreement.protocolSettings.envelopeSettings.interchangeControlNumberLowerBound] * The interchange control number lower bound. - * @member {number} + * @property {number} * [receiveAgreement.protocolSettings.envelopeSettings.interchangeControlNumberUpperBound] * The interchange control number upper bound. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.envelopeSettings.rolloverInterchangeControlNumber] * The value indicating whether to rollover interchange control number. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.envelopeSettings.enableDefaultGroupHeaders] * The value indicating whether to enable default group headers. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.envelopeSettings.functionalGroupId] The * functional group id. - * @member {number} + * @property {number} * [receiveAgreement.protocolSettings.envelopeSettings.groupControlNumberLowerBound] * The group control number lower bound. - * @member {number} + * @property {number} * [receiveAgreement.protocolSettings.envelopeSettings.groupControlNumberUpperBound] * The group control number upper bound. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.envelopeSettings.rolloverGroupControlNumber] * The value indicating whether to rollover group control number. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.envelopeSettings.groupHeaderAgencyCode] * The group header agency code. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.envelopeSettings.groupHeaderVersion] * The group header version. - * @member {number} + * @property {number} * [receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberLowerBound] * The transaction set control number lower bound. - * @member {number} + * @property {number} * [receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberUpperBound] * The transaction set control number upper bound. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.envelopeSettings.rolloverTransactionSetControlNumber] * The value indicating whether to rollover transaction set control number. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberPrefix] * The transaction set control number prefix. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberSuffix] * The transaction set control number suffix. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.envelopeSettings.overwriteExistingTransactionSetControlNumber] * The value indicating whether to overwrite existing transaction set control * number. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.envelopeSettings.groupHeaderDateFormat] * The group header date format. Possible values include: 'NotSpecified', * 'CCYYMMDD', 'YYMMDD' - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.envelopeSettings.groupHeaderTimeFormat] * The group header time format. Possible values include: 'NotSpecified', * 'HHMM', 'HHMMSS', 'HHMMSSdd', 'HHMMSSd' - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.envelopeSettings.usageIndicator] The * usage indicator. Possible values include: 'NotSpecified', 'Test', * 'Information', 'Production' - * @member {object} + * @property {object} * [receiveAgreement.protocolSettings.acknowledgementSettings] The X12 * acknowledgment settings. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.acknowledgementSettings.needTechnicalAcknowledgement] * The value indicating whether technical acknowledgement is needed. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.acknowledgementSettings.batchTechnicalAcknowledgements] * The value indicating whether to batch the technical acknowledgements. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.acknowledgementSettings.needFunctionalAcknowledgement] * The value indicating whether functional acknowledgement is needed. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.acknowledgementSettings.functionalAcknowledgementVersion] * The functional acknowledgement version. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.acknowledgementSettings.batchFunctionalAcknowledgements] * The value indicating whether to batch functional acknowledgements. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.acknowledgementSettings.needImplementationAcknowledgement] * The value indicating whether implementation acknowledgement is needed. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.acknowledgementSettings.implementationAcknowledgementVersion] * The implementation acknowledgement version. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.acknowledgementSettings.batchImplementationAcknowledgements] * The value indicating whether to batch implementation acknowledgements. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.acknowledgementSettings.needLoopForValidMessages] * The value indicating whether a loop is needed for valid messages. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.acknowledgementSettings.sendSynchronousAcknowledgement] * The value indicating whether to send synchronous acknowledgement. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberPrefix] * The acknowledgement control number prefix. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberSuffix] * The acknowledgement control number suffix. - * @member {number} + * @property {number} * [receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberLowerBound] * The acknowledgement control number lower bound. - * @member {number} + * @property {number} * [receiveAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberUpperBound] * The acknowledgement control number upper bound. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.acknowledgementSettings.rolloverAcknowledgementControlNumber] * The value indicating whether to rollover acknowledgement control number. - * @member {object} [receiveAgreement.protocolSettings.messageFilter] The X12 - * message filter. - * @member {string} + * @property {object} [receiveAgreement.protocolSettings.messageFilter] The + * X12 message filter. + * @property {string} * [receiveAgreement.protocolSettings.messageFilter.messageFilterType] The * message filter type. Possible values include: 'NotSpecified', 'Include', * 'Exclude' - * @member {object} [receiveAgreement.protocolSettings.securitySettings] The - * X12 security settings. - * @member {string} + * @property {object} [receiveAgreement.protocolSettings.securitySettings] + * The X12 security settings. + * @property {string} * [receiveAgreement.protocolSettings.securitySettings.authorizationQualifier] * The authorization qualifier. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.securitySettings.authorizationValue] * The authorization value. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.securitySettings.securityQualifier] The * security qualifier. - * @member {string} + * @property {string} * [receiveAgreement.protocolSettings.securitySettings.passwordValue] The * password value. - * @member {object} [receiveAgreement.protocolSettings.processingSettings] + * @property {object} [receiveAgreement.protocolSettings.processingSettings] * The X12 processing settings. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.processingSettings.maskSecurityInfo] * The value indicating whether to mask security information. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.processingSettings.convertImpliedDecimal] * The value indicating whether to convert numerical type to implied decimal. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.processingSettings.preserveInterchange] * The value indicating whether to preserve interchange. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.processingSettings.suspendInterchangeOnError] * The value indicating whether to suspend interchange on error. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.processingSettings.createEmptyXmlTagsForTrailingSeparators] * The value indicating whether to create empty xml tags for trailing * separators. - * @member {boolean} + * @property {boolean} * [receiveAgreement.protocolSettings.processingSettings.useDotAsDecimalSeparator] * The value indicating whether to use dot as decimal separator. - * @member {array} [receiveAgreement.protocolSettings.envelopeOverrides] The - * X12 envelope override settings. - * @member {array} [receiveAgreement.protocolSettings.validationOverrides] + * @property {array} [receiveAgreement.protocolSettings.envelopeOverrides] + * The X12 envelope override settings. + * @property {array} [receiveAgreement.protocolSettings.validationOverrides] * The X12 validation override settings. - * @member {array} [receiveAgreement.protocolSettings.messageFilterList] The - * X12 message filter list. - * @member {array} [receiveAgreement.protocolSettings.schemaReferences] The + * @property {array} [receiveAgreement.protocolSettings.messageFilterList] + * The X12 message filter list. + * @property {array} [receiveAgreement.protocolSettings.schemaReferences] The * X12 schema references. - * @member {array} [receiveAgreement.protocolSettings.x12DelimiterOverrides] - * The X12 delimiter override settings. - * @member {object} sendAgreement The X12 one-way send agreement. - * @member {object} [sendAgreement.senderBusinessIdentity] The sender + * @property {array} + * [receiveAgreement.protocolSettings.x12DelimiterOverrides] The X12 + * delimiter override settings. + * @property {object} sendAgreement The X12 one-way send agreement. + * @property {object} [sendAgreement.senderBusinessIdentity] The sender * business identity - * @member {string} [sendAgreement.senderBusinessIdentity.qualifier] The + * @property {string} [sendAgreement.senderBusinessIdentity.qualifier] The * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [sendAgreement.senderBusinessIdentity.value] The user + * @property {string} [sendAgreement.senderBusinessIdentity.value] The user * defined business identity value. - * @member {object} [sendAgreement.receiverBusinessIdentity] The receiver + * @property {object} [sendAgreement.receiverBusinessIdentity] The receiver * business identity - * @member {string} [sendAgreement.receiverBusinessIdentity.qualifier] The + * @property {string} [sendAgreement.receiverBusinessIdentity.qualifier] The * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [sendAgreement.receiverBusinessIdentity.value] The user + * @property {string} [sendAgreement.receiverBusinessIdentity.value] The user * defined business identity value. - * @member {object} [sendAgreement.protocolSettings] The X12 protocol + * @property {object} [sendAgreement.protocolSettings] The X12 protocol * settings. - * @member {object} [sendAgreement.protocolSettings.validationSettings] The + * @property {object} [sendAgreement.protocolSettings.validationSettings] The * X12 validation settings. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.validationSettings.validateCharacterSet] * The value indicating whether to validate character set in the message. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.validationSettings.checkDuplicateInterchangeControlNumber] * The value indicating whether to check for duplicate interchange control * number. - * @member {number} + * @property {number} * [sendAgreement.protocolSettings.validationSettings.interchangeControlNumberValidityDays] * The validity period of interchange control number. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.validationSettings.checkDuplicateGroupControlNumber] * The value indicating whether to check for duplicate group control number. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.validationSettings.checkDuplicateTransactionSetControlNumber] * The value indicating whether to check for duplicate transaction set * control number. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.validationSettings.validateEdiTypes] The * value indicating whether to Whether to validate EDI types. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.validationSettings.validateXsdTypes] The * value indicating whether to Whether to validate XSD types. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.validationSettings.allowLeadingAndTrailingSpacesAndZeroes] * The value indicating whether to allow leading and trailing spaces and * zeroes. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.validationSettings.trimLeadingAndTrailingSpacesAndZeroes] * The value indicating whether to trim leading and trailing spaces and * zeroes. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.validationSettings.trailingSeparatorPolicy] * The trailing separator policy. Possible values include: 'NotSpecified', * 'NotAllowed', 'Optional', 'Mandatory' - * @member {object} [sendAgreement.protocolSettings.framingSettings] The X12 - * framing settings. - * @member {number} + * @property {object} [sendAgreement.protocolSettings.framingSettings] The + * X12 framing settings. + * @property {number} * [sendAgreement.protocolSettings.framingSettings.dataElementSeparator] The * data element separator. - * @member {number} + * @property {number} * [sendAgreement.protocolSettings.framingSettings.componentSeparator] The * component separator. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.framingSettings.replaceSeparatorsInPayload] * The value indicating whether to replace separators in payload. - * @member {number} + * @property {number} * [sendAgreement.protocolSettings.framingSettings.replaceCharacter] The * replacement character. - * @member {number} + * @property {number} * [sendAgreement.protocolSettings.framingSettings.segmentTerminator] The * segment terminator. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.framingSettings.characterSet] The X12 * character set. Possible values include: 'NotSpecified', 'Basic', * 'Extended', 'UTF8' - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.framingSettings.segmentTerminatorSuffix] * The segment terminator suffix. Possible values include: 'NotSpecified', * 'None', 'CR', 'LF', 'CRLF' - * @member {object} [sendAgreement.protocolSettings.envelopeSettings] The X12 - * envelope settings. - * @member {number} + * @property {object} [sendAgreement.protocolSettings.envelopeSettings] The + * X12 envelope settings. + * @property {number} * [sendAgreement.protocolSettings.envelopeSettings.controlStandardsId] The * controls standards id. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.envelopeSettings.useControlStandardsIdAsRepetitionCharacter] * The value indicating whether to use control standards id as repetition * character. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.envelopeSettings.senderApplicationId] The * sender application id. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.envelopeSettings.receiverApplicationId] * The receiver application id. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.envelopeSettings.controlVersionNumber] The * control version number. - * @member {number} + * @property {number} * [sendAgreement.protocolSettings.envelopeSettings.interchangeControlNumberLowerBound] * The interchange control number lower bound. - * @member {number} + * @property {number} * [sendAgreement.protocolSettings.envelopeSettings.interchangeControlNumberUpperBound] * The interchange control number upper bound. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.envelopeSettings.rolloverInterchangeControlNumber] * The value indicating whether to rollover interchange control number. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.envelopeSettings.enableDefaultGroupHeaders] * The value indicating whether to enable default group headers. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.envelopeSettings.functionalGroupId] The * functional group id. - * @member {number} + * @property {number} * [sendAgreement.protocolSettings.envelopeSettings.groupControlNumberLowerBound] * The group control number lower bound. - * @member {number} + * @property {number} * [sendAgreement.protocolSettings.envelopeSettings.groupControlNumberUpperBound] * The group control number upper bound. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.envelopeSettings.rolloverGroupControlNumber] * The value indicating whether to rollover group control number. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.envelopeSettings.groupHeaderAgencyCode] * The group header agency code. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.envelopeSettings.groupHeaderVersion] The * group header version. - * @member {number} + * @property {number} * [sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberLowerBound] * The transaction set control number lower bound. - * @member {number} + * @property {number} * [sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberUpperBound] * The transaction set control number upper bound. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.envelopeSettings.rolloverTransactionSetControlNumber] * The value indicating whether to rollover transaction set control number. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberPrefix] * The transaction set control number prefix. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.envelopeSettings.transactionSetControlNumberSuffix] * The transaction set control number suffix. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.envelopeSettings.overwriteExistingTransactionSetControlNumber] * The value indicating whether to overwrite existing transaction set control * number. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.envelopeSettings.groupHeaderDateFormat] * The group header date format. Possible values include: 'NotSpecified', * 'CCYYMMDD', 'YYMMDD' - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.envelopeSettings.groupHeaderTimeFormat] * The group header time format. Possible values include: 'NotSpecified', * 'HHMM', 'HHMMSS', 'HHMMSSdd', 'HHMMSSd' - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.envelopeSettings.usageIndicator] The usage * indicator. Possible values include: 'NotSpecified', 'Test', 'Information', * 'Production' - * @member {object} [sendAgreement.protocolSettings.acknowledgementSettings] - * The X12 acknowledgment settings. - * @member {boolean} + * @property {object} + * [sendAgreement.protocolSettings.acknowledgementSettings] The X12 + * acknowledgment settings. + * @property {boolean} * [sendAgreement.protocolSettings.acknowledgementSettings.needTechnicalAcknowledgement] * The value indicating whether technical acknowledgement is needed. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.acknowledgementSettings.batchTechnicalAcknowledgements] * The value indicating whether to batch the technical acknowledgements. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.acknowledgementSettings.needFunctionalAcknowledgement] * The value indicating whether functional acknowledgement is needed. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.acknowledgementSettings.functionalAcknowledgementVersion] * The functional acknowledgement version. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.acknowledgementSettings.batchFunctionalAcknowledgements] * The value indicating whether to batch functional acknowledgements. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.acknowledgementSettings.needImplementationAcknowledgement] * The value indicating whether implementation acknowledgement is needed. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.acknowledgementSettings.implementationAcknowledgementVersion] * The implementation acknowledgement version. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.acknowledgementSettings.batchImplementationAcknowledgements] * The value indicating whether to batch implementation acknowledgements. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.acknowledgementSettings.needLoopForValidMessages] * The value indicating whether a loop is needed for valid messages. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.acknowledgementSettings.sendSynchronousAcknowledgement] * The value indicating whether to send synchronous acknowledgement. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberPrefix] * The acknowledgement control number prefix. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberSuffix] * The acknowledgement control number suffix. - * @member {number} + * @property {number} * [sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberLowerBound] * The acknowledgement control number lower bound. - * @member {number} + * @property {number} * [sendAgreement.protocolSettings.acknowledgementSettings.acknowledgementControlNumberUpperBound] * The acknowledgement control number upper bound. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.acknowledgementSettings.rolloverAcknowledgementControlNumber] * The value indicating whether to rollover acknowledgement control number. - * @member {object} [sendAgreement.protocolSettings.messageFilter] The X12 + * @property {object} [sendAgreement.protocolSettings.messageFilter] The X12 * message filter. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.messageFilter.messageFilterType] The * message filter type. Possible values include: 'NotSpecified', 'Include', * 'Exclude' - * @member {object} [sendAgreement.protocolSettings.securitySettings] The X12 - * security settings. - * @member {string} + * @property {object} [sendAgreement.protocolSettings.securitySettings] The + * X12 security settings. + * @property {string} * [sendAgreement.protocolSettings.securitySettings.authorizationQualifier] * The authorization qualifier. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.securitySettings.authorizationValue] The * authorization value. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.securitySettings.securityQualifier] The * security qualifier. - * @member {string} + * @property {string} * [sendAgreement.protocolSettings.securitySettings.passwordValue] The * password value. - * @member {object} [sendAgreement.protocolSettings.processingSettings] The + * @property {object} [sendAgreement.protocolSettings.processingSettings] The * X12 processing settings. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.processingSettings.maskSecurityInfo] The * value indicating whether to mask security information. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.processingSettings.convertImpliedDecimal] * The value indicating whether to convert numerical type to implied decimal. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.processingSettings.preserveInterchange] * The value indicating whether to preserve interchange. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.processingSettings.suspendInterchangeOnError] * The value indicating whether to suspend interchange on error. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.processingSettings.createEmptyXmlTagsForTrailingSeparators] * The value indicating whether to create empty xml tags for trailing * separators. - * @member {boolean} + * @property {boolean} * [sendAgreement.protocolSettings.processingSettings.useDotAsDecimalSeparator] * The value indicating whether to use dot as decimal separator. - * @member {array} [sendAgreement.protocolSettings.envelopeOverrides] The X12 - * envelope override settings. - * @member {array} [sendAgreement.protocolSettings.validationOverrides] The + * @property {array} [sendAgreement.protocolSettings.envelopeOverrides] The + * X12 envelope override settings. + * @property {array} [sendAgreement.protocolSettings.validationOverrides] The * X12 validation override settings. - * @member {array} [sendAgreement.protocolSettings.messageFilterList] The X12 - * message filter list. - * @member {array} [sendAgreement.protocolSettings.schemaReferences] The X12 - * schema references. - * @member {array} [sendAgreement.protocolSettings.x12DelimiterOverrides] The - * X12 delimiter override settings. + * @property {array} [sendAgreement.protocolSettings.messageFilterList] The + * X12 message filter list. + * @property {array} [sendAgreement.protocolSettings.schemaReferences] The + * X12 schema references. + * @property {array} [sendAgreement.protocolSettings.x12DelimiterOverrides] + * The X12 delimiter override settings. */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/x12DelimiterOverrides.js b/lib/services/logicManagement/lib/models/x12DelimiterOverrides.js index 4543ec7a7d..3929b8fb54 100644 --- a/lib/services/logicManagement/lib/models/x12DelimiterOverrides.js +++ b/lib/services/logicManagement/lib/models/x12DelimiterOverrides.js @@ -17,17 +17,17 @@ class X12DelimiterOverrides { /** * Create a X12DelimiterOverrides. - * @member {string} [protocolVersion] The protocol version. - * @member {string} [messageId] The message id. - * @member {number} dataElementSeparator The data element separator. - * @member {number} componentSeparator The component separator. - * @member {number} segmentTerminator The segment terminator. - * @member {string} segmentTerminatorSuffix The segment terminator suffix. + * @property {string} [protocolVersion] The protocol version. + * @property {string} [messageId] The message id. + * @property {number} dataElementSeparator The data element separator. + * @property {number} componentSeparator The component separator. + * @property {number} segmentTerminator The segment terminator. + * @property {string} segmentTerminatorSuffix The segment terminator suffix. * Possible values include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' - * @member {number} replaceCharacter The replacement character. - * @member {boolean} replaceSeparatorsInPayload The value indicating whether - * to replace separators in payload. - * @member {string} [targetNamespace] The target namespace on which this + * @property {number} replaceCharacter The replacement character. + * @property {boolean} replaceSeparatorsInPayload The value indicating + * whether to replace separators in payload. + * @property {string} [targetNamespace] The target namespace on which this * delimiter settings has to be applied. */ constructor() { diff --git a/lib/services/logicManagement/lib/models/x12EnvelopeOverride.js b/lib/services/logicManagement/lib/models/x12EnvelopeOverride.js index 09b8cbd432..1866af4467 100644 --- a/lib/services/logicManagement/lib/models/x12EnvelopeOverride.js +++ b/lib/services/logicManagement/lib/models/x12EnvelopeOverride.js @@ -17,21 +17,21 @@ class X12EnvelopeOverride { /** * Create a X12EnvelopeOverride. - * @member {string} targetNamespace The target namespace on which this + * @property {string} targetNamespace The target namespace on which this * envelope settings has to be applied. - * @member {string} protocolVersion The protocol version on which this + * @property {string} protocolVersion The protocol version on which this * envelope settings has to be applied. - * @member {string} messageId The message id on which this envelope settings - * has to be applied. - * @member {string} responsibleAgencyCode The responsible agency code. - * @member {string} headerVersion The header version. - * @member {string} senderApplicationId The sender application id. - * @member {string} receiverApplicationId The receiver application id. - * @member {string} [functionalIdentifierCode] The functional identifier + * @property {string} messageId The message id on which this envelope + * settings has to be applied. + * @property {string} responsibleAgencyCode The responsible agency code. + * @property {string} headerVersion The header version. + * @property {string} senderApplicationId The sender application id. + * @property {string} receiverApplicationId The receiver application id. + * @property {string} [functionalIdentifierCode] The functional identifier * code. - * @member {string} dateFormat The date format. Possible values include: + * @property {string} dateFormat The date format. Possible values include: * 'NotSpecified', 'CCYYMMDD', 'YYMMDD' - * @member {string} timeFormat The time format. Possible values include: + * @property {string} timeFormat The time format. Possible values include: * 'NotSpecified', 'HHMM', 'HHMMSS', 'HHMMSSdd', 'HHMMSSd' */ constructor() { diff --git a/lib/services/logicManagement/lib/models/x12EnvelopeSettings.js b/lib/services/logicManagement/lib/models/x12EnvelopeSettings.js index 595daa586b..b43db46098 100644 --- a/lib/services/logicManagement/lib/models/x12EnvelopeSettings.js +++ b/lib/services/logicManagement/lib/models/x12EnvelopeSettings.js @@ -17,47 +17,47 @@ class X12EnvelopeSettings { /** * Create a X12EnvelopeSettings. - * @member {number} controlStandardsId The controls standards id. - * @member {boolean} useControlStandardsIdAsRepetitionCharacter The value + * @property {number} controlStandardsId The controls standards id. + * @property {boolean} useControlStandardsIdAsRepetitionCharacter The value * indicating whether to use control standards id as repetition character. - * @member {string} senderApplicationId The sender application id. - * @member {string} receiverApplicationId The receiver application id. - * @member {string} controlVersionNumber The control version number. - * @member {number} interchangeControlNumberLowerBound The interchange + * @property {string} senderApplicationId The sender application id. + * @property {string} receiverApplicationId The receiver application id. + * @property {string} controlVersionNumber The control version number. + * @property {number} interchangeControlNumberLowerBound The interchange * control number lower bound. - * @member {number} interchangeControlNumberUpperBound The interchange + * @property {number} interchangeControlNumberUpperBound The interchange * control number upper bound. - * @member {boolean} rolloverInterchangeControlNumber The value indicating + * @property {boolean} rolloverInterchangeControlNumber The value indicating * whether to rollover interchange control number. - * @member {boolean} enableDefaultGroupHeaders The value indicating whether + * @property {boolean} enableDefaultGroupHeaders The value indicating whether * to enable default group headers. - * @member {string} [functionalGroupId] The functional group id. - * @member {number} groupControlNumberLowerBound The group control number + * @property {string} [functionalGroupId] The functional group id. + * @property {number} groupControlNumberLowerBound The group control number * lower bound. - * @member {number} groupControlNumberUpperBound The group control number + * @property {number} groupControlNumberUpperBound The group control number * upper bound. - * @member {boolean} rolloverGroupControlNumber The value indicating whether - * to rollover group control number. - * @member {string} groupHeaderAgencyCode The group header agency code. - * @member {string} groupHeaderVersion The group header version. - * @member {number} transactionSetControlNumberLowerBound The transaction set - * control number lower bound. - * @member {number} transactionSetControlNumberUpperBound The transaction set - * control number upper bound. - * @member {boolean} rolloverTransactionSetControlNumber The value indicating - * whether to rollover transaction set control number. - * @member {string} [transactionSetControlNumberPrefix] The transaction set + * @property {boolean} rolloverGroupControlNumber The value indicating + * whether to rollover group control number. + * @property {string} groupHeaderAgencyCode The group header agency code. + * @property {string} groupHeaderVersion The group header version. + * @property {number} transactionSetControlNumberLowerBound The transaction + * set control number lower bound. + * @property {number} transactionSetControlNumberUpperBound The transaction + * set control number upper bound. + * @property {boolean} rolloverTransactionSetControlNumber The value + * indicating whether to rollover transaction set control number. + * @property {string} [transactionSetControlNumberPrefix] The transaction set * control number prefix. - * @member {string} [transactionSetControlNumberSuffix] The transaction set + * @property {string} [transactionSetControlNumberSuffix] The transaction set * control number suffix. - * @member {boolean} overwriteExistingTransactionSetControlNumber The value + * @property {boolean} overwriteExistingTransactionSetControlNumber The value * indicating whether to overwrite existing transaction set control number. - * @member {string} groupHeaderDateFormat The group header date format. + * @property {string} groupHeaderDateFormat The group header date format. * Possible values include: 'NotSpecified', 'CCYYMMDD', 'YYMMDD' - * @member {string} groupHeaderTimeFormat The group header time format. + * @property {string} groupHeaderTimeFormat The group header time format. * Possible values include: 'NotSpecified', 'HHMM', 'HHMMSS', 'HHMMSSdd', * 'HHMMSSd' - * @member {string} usageIndicator The usage indicator. Possible values + * @property {string} usageIndicator The usage indicator. Possible values * include: 'NotSpecified', 'Test', 'Information', 'Production' */ constructor() { diff --git a/lib/services/logicManagement/lib/models/x12FramingSettings.js b/lib/services/logicManagement/lib/models/x12FramingSettings.js index ad1e7689ae..1022ac7e08 100644 --- a/lib/services/logicManagement/lib/models/x12FramingSettings.js +++ b/lib/services/logicManagement/lib/models/x12FramingSettings.js @@ -17,15 +17,15 @@ class X12FramingSettings { /** * Create a X12FramingSettings. - * @member {number} dataElementSeparator The data element separator. - * @member {number} componentSeparator The component separator. - * @member {boolean} replaceSeparatorsInPayload The value indicating whether - * to replace separators in payload. - * @member {number} replaceCharacter The replacement character. - * @member {number} segmentTerminator The segment terminator. - * @member {string} characterSet The X12 character set. Possible values + * @property {number} dataElementSeparator The data element separator. + * @property {number} componentSeparator The component separator. + * @property {boolean} replaceSeparatorsInPayload The value indicating + * whether to replace separators in payload. + * @property {number} replaceCharacter The replacement character. + * @property {number} segmentTerminator The segment terminator. + * @property {string} characterSet The X12 character set. Possible values * include: 'NotSpecified', 'Basic', 'Extended', 'UTF8' - * @member {string} segmentTerminatorSuffix The segment terminator suffix. + * @property {string} segmentTerminatorSuffix The segment terminator suffix. * Possible values include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' */ constructor() { diff --git a/lib/services/logicManagement/lib/models/x12MessageFilter.js b/lib/services/logicManagement/lib/models/x12MessageFilter.js index 5c9ab0df48..231813bf4f 100644 --- a/lib/services/logicManagement/lib/models/x12MessageFilter.js +++ b/lib/services/logicManagement/lib/models/x12MessageFilter.js @@ -17,7 +17,7 @@ class X12MessageFilter { /** * Create a X12MessageFilter. - * @member {string} messageFilterType The message filter type. Possible + * @property {string} messageFilterType The message filter type. Possible * values include: 'NotSpecified', 'Include', 'Exclude' */ constructor() { diff --git a/lib/services/logicManagement/lib/models/x12MessageIdentifier.js b/lib/services/logicManagement/lib/models/x12MessageIdentifier.js index b61240daf6..5dacf779b0 100644 --- a/lib/services/logicManagement/lib/models/x12MessageIdentifier.js +++ b/lib/services/logicManagement/lib/models/x12MessageIdentifier.js @@ -17,7 +17,7 @@ class X12MessageIdentifier { /** * Create a X12MessageIdentifier. - * @member {string} messageId The message id. + * @property {string} messageId The message id. */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/x12OneWayAgreement.js b/lib/services/logicManagement/lib/models/x12OneWayAgreement.js index a0be05cfb8..068573c6f2 100644 --- a/lib/services/logicManagement/lib/models/x12OneWayAgreement.js +++ b/lib/services/logicManagement/lib/models/x12OneWayAgreement.js @@ -17,233 +17,238 @@ class X12OneWayAgreement { /** * Create a X12OneWayAgreement. - * @member {object} senderBusinessIdentity The sender business identity - * @member {string} [senderBusinessIdentity.qualifier] The business identity - * qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [senderBusinessIdentity.value] The user defined business - * identity value. - * @member {object} receiverBusinessIdentity The receiver business identity - * @member {string} [receiverBusinessIdentity.qualifier] The business + * @property {object} senderBusinessIdentity The sender business identity + * @property {string} [senderBusinessIdentity.qualifier] The business * identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - * @member {string} [receiverBusinessIdentity.value] The user defined + * @property {string} [senderBusinessIdentity.value] The user defined * business identity value. - * @member {object} protocolSettings The X12 protocol settings. - * @member {object} [protocolSettings.validationSettings] The X12 validation - * settings. - * @member {boolean} + * @property {object} receiverBusinessIdentity The receiver business identity + * @property {string} [receiverBusinessIdentity.qualifier] The business + * identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 + * @property {string} [receiverBusinessIdentity.value] The user defined + * business identity value. + * @property {object} protocolSettings The X12 protocol settings. + * @property {object} [protocolSettings.validationSettings] The X12 + * validation settings. + * @property {boolean} * [protocolSettings.validationSettings.validateCharacterSet] The value * indicating whether to validate character set in the message. - * @member {boolean} + * @property {boolean} * [protocolSettings.validationSettings.checkDuplicateInterchangeControlNumber] * The value indicating whether to check for duplicate interchange control * number. - * @member {number} + * @property {number} * [protocolSettings.validationSettings.interchangeControlNumberValidityDays] * The validity period of interchange control number. - * @member {boolean} + * @property {boolean} * [protocolSettings.validationSettings.checkDuplicateGroupControlNumber] The * value indicating whether to check for duplicate group control number. - * @member {boolean} + * @property {boolean} * [protocolSettings.validationSettings.checkDuplicateTransactionSetControlNumber] * The value indicating whether to check for duplicate transaction set * control number. - * @member {boolean} [protocolSettings.validationSettings.validateEdiTypes] + * @property {boolean} [protocolSettings.validationSettings.validateEdiTypes] * The value indicating whether to Whether to validate EDI types. - * @member {boolean} [protocolSettings.validationSettings.validateXsdTypes] + * @property {boolean} [protocolSettings.validationSettings.validateXsdTypes] * The value indicating whether to Whether to validate XSD types. - * @member {boolean} + * @property {boolean} * [protocolSettings.validationSettings.allowLeadingAndTrailingSpacesAndZeroes] * The value indicating whether to allow leading and trailing spaces and * zeroes. - * @member {boolean} + * @property {boolean} * [protocolSettings.validationSettings.trimLeadingAndTrailingSpacesAndZeroes] * The value indicating whether to trim leading and trailing spaces and * zeroes. - * @member {string} + * @property {string} * [protocolSettings.validationSettings.trailingSeparatorPolicy] The trailing * separator policy. Possible values include: 'NotSpecified', 'NotAllowed', * 'Optional', 'Mandatory' - * @member {object} [protocolSettings.framingSettings] The X12 framing + * @property {object} [protocolSettings.framingSettings] The X12 framing * settings. - * @member {number} [protocolSettings.framingSettings.dataElementSeparator] + * @property {number} [protocolSettings.framingSettings.dataElementSeparator] * The data element separator. - * @member {number} [protocolSettings.framingSettings.componentSeparator] The - * component separator. - * @member {boolean} + * @property {number} [protocolSettings.framingSettings.componentSeparator] + * The component separator. + * @property {boolean} * [protocolSettings.framingSettings.replaceSeparatorsInPayload] The value * indicating whether to replace separators in payload. - * @member {number} [protocolSettings.framingSettings.replaceCharacter] The + * @property {number} [protocolSettings.framingSettings.replaceCharacter] The * replacement character. - * @member {number} [protocolSettings.framingSettings.segmentTerminator] The - * segment terminator. - * @member {string} [protocolSettings.framingSettings.characterSet] The X12 + * @property {number} [protocolSettings.framingSettings.segmentTerminator] + * The segment terminator. + * @property {string} [protocolSettings.framingSettings.characterSet] The X12 * character set. Possible values include: 'NotSpecified', 'Basic', * 'Extended', 'UTF8' - * @member {string} + * @property {string} * [protocolSettings.framingSettings.segmentTerminatorSuffix] The segment * terminator suffix. Possible values include: 'NotSpecified', 'None', 'CR', * 'LF', 'CRLF' - * @member {object} [protocolSettings.envelopeSettings] The X12 envelope + * @property {object} [protocolSettings.envelopeSettings] The X12 envelope * settings. - * @member {number} [protocolSettings.envelopeSettings.controlStandardsId] + * @property {number} [protocolSettings.envelopeSettings.controlStandardsId] * The controls standards id. - * @member {boolean} + * @property {boolean} * [protocolSettings.envelopeSettings.useControlStandardsIdAsRepetitionCharacter] * The value indicating whether to use control standards id as repetition * character. - * @member {string} [protocolSettings.envelopeSettings.senderApplicationId] + * @property {string} [protocolSettings.envelopeSettings.senderApplicationId] * The sender application id. - * @member {string} [protocolSettings.envelopeSettings.receiverApplicationId] - * The receiver application id. - * @member {string} [protocolSettings.envelopeSettings.controlVersionNumber] - * The control version number. - * @member {number} + * @property {string} + * [protocolSettings.envelopeSettings.receiverApplicationId] The receiver + * application id. + * @property {string} + * [protocolSettings.envelopeSettings.controlVersionNumber] The control + * version number. + * @property {number} * [protocolSettings.envelopeSettings.interchangeControlNumberLowerBound] The * interchange control number lower bound. - * @member {number} + * @property {number} * [protocolSettings.envelopeSettings.interchangeControlNumberUpperBound] The * interchange control number upper bound. - * @member {boolean} + * @property {boolean} * [protocolSettings.envelopeSettings.rolloverInterchangeControlNumber] The * value indicating whether to rollover interchange control number. - * @member {boolean} + * @property {boolean} * [protocolSettings.envelopeSettings.enableDefaultGroupHeaders] The value * indicating whether to enable default group headers. - * @member {string} [protocolSettings.envelopeSettings.functionalGroupId] The - * functional group id. - * @member {number} + * @property {string} [protocolSettings.envelopeSettings.functionalGroupId] + * The functional group id. + * @property {number} * [protocolSettings.envelopeSettings.groupControlNumberLowerBound] The group * control number lower bound. - * @member {number} + * @property {number} * [protocolSettings.envelopeSettings.groupControlNumberUpperBound] The group * control number upper bound. - * @member {boolean} + * @property {boolean} * [protocolSettings.envelopeSettings.rolloverGroupControlNumber] The value * indicating whether to rollover group control number. - * @member {string} [protocolSettings.envelopeSettings.groupHeaderAgencyCode] - * The group header agency code. - * @member {string} [protocolSettings.envelopeSettings.groupHeaderVersion] + * @property {string} + * [protocolSettings.envelopeSettings.groupHeaderAgencyCode] The group header + * agency code. + * @property {string} [protocolSettings.envelopeSettings.groupHeaderVersion] * The group header version. - * @member {number} + * @property {number} * [protocolSettings.envelopeSettings.transactionSetControlNumberLowerBound] * The transaction set control number lower bound. - * @member {number} + * @property {number} * [protocolSettings.envelopeSettings.transactionSetControlNumberUpperBound] * The transaction set control number upper bound. - * @member {boolean} + * @property {boolean} * [protocolSettings.envelopeSettings.rolloverTransactionSetControlNumber] * The value indicating whether to rollover transaction set control number. - * @member {string} + * @property {string} * [protocolSettings.envelopeSettings.transactionSetControlNumberPrefix] The * transaction set control number prefix. - * @member {string} + * @property {string} * [protocolSettings.envelopeSettings.transactionSetControlNumberSuffix] The * transaction set control number suffix. - * @member {boolean} + * @property {boolean} * [protocolSettings.envelopeSettings.overwriteExistingTransactionSetControlNumber] * The value indicating whether to overwrite existing transaction set control * number. - * @member {string} [protocolSettings.envelopeSettings.groupHeaderDateFormat] - * The group header date format. Possible values include: 'NotSpecified', - * 'CCYYMMDD', 'YYMMDD' - * @member {string} [protocolSettings.envelopeSettings.groupHeaderTimeFormat] - * The group header time format. Possible values include: 'NotSpecified', - * 'HHMM', 'HHMMSS', 'HHMMSSdd', 'HHMMSSd' - * @member {string} [protocolSettings.envelopeSettings.usageIndicator] The + * @property {string} + * [protocolSettings.envelopeSettings.groupHeaderDateFormat] The group header + * date format. Possible values include: 'NotSpecified', 'CCYYMMDD', 'YYMMDD' + * @property {string} + * [protocolSettings.envelopeSettings.groupHeaderTimeFormat] The group header + * time format. Possible values include: 'NotSpecified', 'HHMM', 'HHMMSS', + * 'HHMMSSdd', 'HHMMSSd' + * @property {string} [protocolSettings.envelopeSettings.usageIndicator] The * usage indicator. Possible values include: 'NotSpecified', 'Test', * 'Information', 'Production' - * @member {object} [protocolSettings.acknowledgementSettings] The X12 + * @property {object} [protocolSettings.acknowledgementSettings] The X12 * acknowledgment settings. - * @member {boolean} + * @property {boolean} * [protocolSettings.acknowledgementSettings.needTechnicalAcknowledgement] * The value indicating whether technical acknowledgement is needed. - * @member {boolean} + * @property {boolean} * [protocolSettings.acknowledgementSettings.batchTechnicalAcknowledgements] * The value indicating whether to batch the technical acknowledgements. - * @member {boolean} + * @property {boolean} * [protocolSettings.acknowledgementSettings.needFunctionalAcknowledgement] * The value indicating whether functional acknowledgement is needed. - * @member {string} + * @property {string} * [protocolSettings.acknowledgementSettings.functionalAcknowledgementVersion] * The functional acknowledgement version. - * @member {boolean} + * @property {boolean} * [protocolSettings.acknowledgementSettings.batchFunctionalAcknowledgements] * The value indicating whether to batch functional acknowledgements. - * @member {boolean} + * @property {boolean} * [protocolSettings.acknowledgementSettings.needImplementationAcknowledgement] * The value indicating whether implementation acknowledgement is needed. - * @member {string} + * @property {string} * [protocolSettings.acknowledgementSettings.implementationAcknowledgementVersion] * The implementation acknowledgement version. - * @member {boolean} + * @property {boolean} * [protocolSettings.acknowledgementSettings.batchImplementationAcknowledgements] * The value indicating whether to batch implementation acknowledgements. - * @member {boolean} + * @property {boolean} * [protocolSettings.acknowledgementSettings.needLoopForValidMessages] The * value indicating whether a loop is needed for valid messages. - * @member {boolean} + * @property {boolean} * [protocolSettings.acknowledgementSettings.sendSynchronousAcknowledgement] * The value indicating whether to send synchronous acknowledgement. - * @member {string} + * @property {string} * [protocolSettings.acknowledgementSettings.acknowledgementControlNumberPrefix] * The acknowledgement control number prefix. - * @member {string} + * @property {string} * [protocolSettings.acknowledgementSettings.acknowledgementControlNumberSuffix] * The acknowledgement control number suffix. - * @member {number} + * @property {number} * [protocolSettings.acknowledgementSettings.acknowledgementControlNumberLowerBound] * The acknowledgement control number lower bound. - * @member {number} + * @property {number} * [protocolSettings.acknowledgementSettings.acknowledgementControlNumberUpperBound] * The acknowledgement control number upper bound. - * @member {boolean} + * @property {boolean} * [protocolSettings.acknowledgementSettings.rolloverAcknowledgementControlNumber] * The value indicating whether to rollover acknowledgement control number. - * @member {object} [protocolSettings.messageFilter] The X12 message filter. - * @member {string} [protocolSettings.messageFilter.messageFilterType] The + * @property {object} [protocolSettings.messageFilter] The X12 message + * filter. + * @property {string} [protocolSettings.messageFilter.messageFilterType] The * message filter type. Possible values include: 'NotSpecified', 'Include', * 'Exclude' - * @member {object} [protocolSettings.securitySettings] The X12 security + * @property {object} [protocolSettings.securitySettings] The X12 security * settings. - * @member {string} + * @property {string} * [protocolSettings.securitySettings.authorizationQualifier] The * authorization qualifier. - * @member {string} [protocolSettings.securitySettings.authorizationValue] + * @property {string} [protocolSettings.securitySettings.authorizationValue] * The authorization value. - * @member {string} [protocolSettings.securitySettings.securityQualifier] The - * security qualifier. - * @member {string} [protocolSettings.securitySettings.passwordValue] The + * @property {string} [protocolSettings.securitySettings.securityQualifier] + * The security qualifier. + * @property {string} [protocolSettings.securitySettings.passwordValue] The * password value. - * @member {object} [protocolSettings.processingSettings] The X12 processing - * settings. - * @member {boolean} [protocolSettings.processingSettings.maskSecurityInfo] + * @property {object} [protocolSettings.processingSettings] The X12 + * processing settings. + * @property {boolean} [protocolSettings.processingSettings.maskSecurityInfo] * The value indicating whether to mask security information. - * @member {boolean} + * @property {boolean} * [protocolSettings.processingSettings.convertImpliedDecimal] The value * indicating whether to convert numerical type to implied decimal. - * @member {boolean} + * @property {boolean} * [protocolSettings.processingSettings.preserveInterchange] The value * indicating whether to preserve interchange. - * @member {boolean} + * @property {boolean} * [protocolSettings.processingSettings.suspendInterchangeOnError] The value * indicating whether to suspend interchange on error. - * @member {boolean} + * @property {boolean} * [protocolSettings.processingSettings.createEmptyXmlTagsForTrailingSeparators] * The value indicating whether to create empty xml tags for trailing * separators. - * @member {boolean} + * @property {boolean} * [protocolSettings.processingSettings.useDotAsDecimalSeparator] The value * indicating whether to use dot as decimal separator. - * @member {array} [protocolSettings.envelopeOverrides] The X12 envelope - * override settings. - * @member {array} [protocolSettings.validationOverrides] The X12 validation + * @property {array} [protocolSettings.envelopeOverrides] The X12 envelope * override settings. - * @member {array} [protocolSettings.messageFilterList] The X12 message + * @property {array} [protocolSettings.validationOverrides] The X12 + * validation override settings. + * @property {array} [protocolSettings.messageFilterList] The X12 message * filter list. - * @member {array} [protocolSettings.schemaReferences] The X12 schema + * @property {array} [protocolSettings.schemaReferences] The X12 schema * references. - * @member {array} [protocolSettings.x12DelimiterOverrides] The X12 delimiter - * override settings. + * @property {array} [protocolSettings.x12DelimiterOverrides] The X12 + * delimiter override settings. */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/x12ProcessingSettings.js b/lib/services/logicManagement/lib/models/x12ProcessingSettings.js index 8c4b56d413..a39f2618fc 100644 --- a/lib/services/logicManagement/lib/models/x12ProcessingSettings.js +++ b/lib/services/logicManagement/lib/models/x12ProcessingSettings.js @@ -17,18 +17,18 @@ class X12ProcessingSettings { /** * Create a X12ProcessingSettings. - * @member {boolean} maskSecurityInfo The value indicating whether to mask + * @property {boolean} maskSecurityInfo The value indicating whether to mask * security information. - * @member {boolean} convertImpliedDecimal The value indicating whether to + * @property {boolean} convertImpliedDecimal The value indicating whether to * convert numerical type to implied decimal. - * @member {boolean} preserveInterchange The value indicating whether to + * @property {boolean} preserveInterchange The value indicating whether to * preserve interchange. - * @member {boolean} suspendInterchangeOnError The value indicating whether + * @property {boolean} suspendInterchangeOnError The value indicating whether * to suspend interchange on error. - * @member {boolean} createEmptyXmlTagsForTrailingSeparators The value + * @property {boolean} createEmptyXmlTagsForTrailingSeparators The value * indicating whether to create empty xml tags for trailing separators. - * @member {boolean} useDotAsDecimalSeparator The value indicating whether to - * use dot as decimal separator. + * @property {boolean} useDotAsDecimalSeparator The value indicating whether + * to use dot as decimal separator. */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/x12ProtocolSettings.js b/lib/services/logicManagement/lib/models/x12ProtocolSettings.js index 3c4ea4e43e..2c180f5c2b 100644 --- a/lib/services/logicManagement/lib/models/x12ProtocolSettings.js +++ b/lib/services/logicManagement/lib/models/x12ProtocolSettings.js @@ -17,173 +17,181 @@ class X12ProtocolSettings { /** * Create a X12ProtocolSettings. - * @member {object} validationSettings The X12 validation settings. - * @member {boolean} [validationSettings.validateCharacterSet] The value + * @property {object} validationSettings The X12 validation settings. + * @property {boolean} [validationSettings.validateCharacterSet] The value * indicating whether to validate character set in the message. - * @member {boolean} + * @property {boolean} * [validationSettings.checkDuplicateInterchangeControlNumber] The value * indicating whether to check for duplicate interchange control number. - * @member {number} [validationSettings.interchangeControlNumberValidityDays] - * The validity period of interchange control number. - * @member {boolean} [validationSettings.checkDuplicateGroupControlNumber] + * @property {number} + * [validationSettings.interchangeControlNumberValidityDays] The validity + * period of interchange control number. + * @property {boolean} [validationSettings.checkDuplicateGroupControlNumber] * The value indicating whether to check for duplicate group control number. - * @member {boolean} + * @property {boolean} * [validationSettings.checkDuplicateTransactionSetControlNumber] The value * indicating whether to check for duplicate transaction set control number. - * @member {boolean} [validationSettings.validateEdiTypes] The value + * @property {boolean} [validationSettings.validateEdiTypes] The value * indicating whether to Whether to validate EDI types. - * @member {boolean} [validationSettings.validateXsdTypes] The value + * @property {boolean} [validationSettings.validateXsdTypes] The value * indicating whether to Whether to validate XSD types. - * @member {boolean} + * @property {boolean} * [validationSettings.allowLeadingAndTrailingSpacesAndZeroes] The value * indicating whether to allow leading and trailing spaces and zeroes. - * @member {boolean} + * @property {boolean} * [validationSettings.trimLeadingAndTrailingSpacesAndZeroes] The value * indicating whether to trim leading and trailing spaces and zeroes. - * @member {string} [validationSettings.trailingSeparatorPolicy] The trailing - * separator policy. Possible values include: 'NotSpecified', 'NotAllowed', - * 'Optional', 'Mandatory' - * @member {object} framingSettings The X12 framing settings. - * @member {number} [framingSettings.dataElementSeparator] The data element + * @property {string} [validationSettings.trailingSeparatorPolicy] The + * trailing separator policy. Possible values include: 'NotSpecified', + * 'NotAllowed', 'Optional', 'Mandatory' + * @property {object} framingSettings The X12 framing settings. + * @property {number} [framingSettings.dataElementSeparator] The data element * separator. - * @member {number} [framingSettings.componentSeparator] The component + * @property {number} [framingSettings.componentSeparator] The component * separator. - * @member {boolean} [framingSettings.replaceSeparatorsInPayload] The value + * @property {boolean} [framingSettings.replaceSeparatorsInPayload] The value * indicating whether to replace separators in payload. - * @member {number} [framingSettings.replaceCharacter] The replacement + * @property {number} [framingSettings.replaceCharacter] The replacement * character. - * @member {number} [framingSettings.segmentTerminator] The segment + * @property {number} [framingSettings.segmentTerminator] The segment * terminator. - * @member {string} [framingSettings.characterSet] The X12 character set. + * @property {string} [framingSettings.characterSet] The X12 character set. * Possible values include: 'NotSpecified', 'Basic', 'Extended', 'UTF8' - * @member {string} [framingSettings.segmentTerminatorSuffix] The segment + * @property {string} [framingSettings.segmentTerminatorSuffix] The segment * terminator suffix. Possible values include: 'NotSpecified', 'None', 'CR', * 'LF', 'CRLF' - * @member {object} envelopeSettings The X12 envelope settings. - * @member {number} [envelopeSettings.controlStandardsId] The controls + * @property {object} envelopeSettings The X12 envelope settings. + * @property {number} [envelopeSettings.controlStandardsId] The controls * standards id. - * @member {boolean} + * @property {boolean} * [envelopeSettings.useControlStandardsIdAsRepetitionCharacter] The value * indicating whether to use control standards id as repetition character. - * @member {string} [envelopeSettings.senderApplicationId] The sender + * @property {string} [envelopeSettings.senderApplicationId] The sender * application id. - * @member {string} [envelopeSettings.receiverApplicationId] The receiver + * @property {string} [envelopeSettings.receiverApplicationId] The receiver * application id. - * @member {string} [envelopeSettings.controlVersionNumber] The control + * @property {string} [envelopeSettings.controlVersionNumber] The control * version number. - * @member {number} [envelopeSettings.interchangeControlNumberLowerBound] The - * interchange control number lower bound. - * @member {number} [envelopeSettings.interchangeControlNumberUpperBound] The - * interchange control number upper bound. - * @member {boolean} [envelopeSettings.rolloverInterchangeControlNumber] The - * value indicating whether to rollover interchange control number. - * @member {boolean} [envelopeSettings.enableDefaultGroupHeaders] The value + * @property {number} [envelopeSettings.interchangeControlNumberLowerBound] + * The interchange control number lower bound. + * @property {number} [envelopeSettings.interchangeControlNumberUpperBound] + * The interchange control number upper bound. + * @property {boolean} [envelopeSettings.rolloverInterchangeControlNumber] + * The value indicating whether to rollover interchange control number. + * @property {boolean} [envelopeSettings.enableDefaultGroupHeaders] The value * indicating whether to enable default group headers. - * @member {string} [envelopeSettings.functionalGroupId] The functional group - * id. - * @member {number} [envelopeSettings.groupControlNumberLowerBound] The group - * control number lower bound. - * @member {number} [envelopeSettings.groupControlNumberUpperBound] The group - * control number upper bound. - * @member {boolean} [envelopeSettings.rolloverGroupControlNumber] The value - * indicating whether to rollover group control number. - * @member {string} [envelopeSettings.groupHeaderAgencyCode] The group header - * agency code. - * @member {string} [envelopeSettings.groupHeaderVersion] The group header + * @property {string} [envelopeSettings.functionalGroupId] The functional + * group id. + * @property {number} [envelopeSettings.groupControlNumberLowerBound] The + * group control number lower bound. + * @property {number} [envelopeSettings.groupControlNumberUpperBound] The + * group control number upper bound. + * @property {boolean} [envelopeSettings.rolloverGroupControlNumber] The + * value indicating whether to rollover group control number. + * @property {string} [envelopeSettings.groupHeaderAgencyCode] The group + * header agency code. + * @property {string} [envelopeSettings.groupHeaderVersion] The group header * version. - * @member {number} [envelopeSettings.transactionSetControlNumberLowerBound] - * The transaction set control number lower bound. - * @member {number} [envelopeSettings.transactionSetControlNumberUpperBound] - * The transaction set control number upper bound. - * @member {boolean} [envelopeSettings.rolloverTransactionSetControlNumber] + * @property {number} + * [envelopeSettings.transactionSetControlNumberLowerBound] The transaction + * set control number lower bound. + * @property {number} + * [envelopeSettings.transactionSetControlNumberUpperBound] The transaction + * set control number upper bound. + * @property {boolean} [envelopeSettings.rolloverTransactionSetControlNumber] * The value indicating whether to rollover transaction set control number. - * @member {string} [envelopeSettings.transactionSetControlNumberPrefix] The - * transaction set control number prefix. - * @member {string} [envelopeSettings.transactionSetControlNumberSuffix] The - * transaction set control number suffix. - * @member {boolean} + * @property {string} [envelopeSettings.transactionSetControlNumberPrefix] + * The transaction set control number prefix. + * @property {string} [envelopeSettings.transactionSetControlNumberSuffix] + * The transaction set control number suffix. + * @property {boolean} * [envelopeSettings.overwriteExistingTransactionSetControlNumber] The value * indicating whether to overwrite existing transaction set control number. - * @member {string} [envelopeSettings.groupHeaderDateFormat] The group header - * date format. Possible values include: 'NotSpecified', 'CCYYMMDD', 'YYMMDD' - * @member {string} [envelopeSettings.groupHeaderTimeFormat] The group header - * time format. Possible values include: 'NotSpecified', 'HHMM', 'HHMMSS', - * 'HHMMSSdd', 'HHMMSSd' - * @member {string} [envelopeSettings.usageIndicator] The usage indicator. + * @property {string} [envelopeSettings.groupHeaderDateFormat] The group + * header date format. Possible values include: 'NotSpecified', 'CCYYMMDD', + * 'YYMMDD' + * @property {string} [envelopeSettings.groupHeaderTimeFormat] The group + * header time format. Possible values include: 'NotSpecified', 'HHMM', + * 'HHMMSS', 'HHMMSSdd', 'HHMMSSd' + * @property {string} [envelopeSettings.usageIndicator] The usage indicator. * Possible values include: 'NotSpecified', 'Test', 'Information', * 'Production' - * @member {object} acknowledgementSettings The X12 acknowledgment settings. - * @member {boolean} [acknowledgementSettings.needTechnicalAcknowledgement] + * @property {object} acknowledgementSettings The X12 acknowledgment + * settings. + * @property {boolean} [acknowledgementSettings.needTechnicalAcknowledgement] * The value indicating whether technical acknowledgement is needed. - * @member {boolean} [acknowledgementSettings.batchTechnicalAcknowledgements] - * The value indicating whether to batch the technical acknowledgements. - * @member {boolean} [acknowledgementSettings.needFunctionalAcknowledgement] - * The value indicating whether functional acknowledgement is needed. - * @member {string} + * @property {boolean} + * [acknowledgementSettings.batchTechnicalAcknowledgements] The value + * indicating whether to batch the technical acknowledgements. + * @property {boolean} + * [acknowledgementSettings.needFunctionalAcknowledgement] The value + * indicating whether functional acknowledgement is needed. + * @property {string} * [acknowledgementSettings.functionalAcknowledgementVersion] The functional * acknowledgement version. - * @member {boolean} + * @property {boolean} * [acknowledgementSettings.batchFunctionalAcknowledgements] The value * indicating whether to batch functional acknowledgements. - * @member {boolean} + * @property {boolean} * [acknowledgementSettings.needImplementationAcknowledgement] The value * indicating whether implementation acknowledgement is needed. - * @member {string} + * @property {string} * [acknowledgementSettings.implementationAcknowledgementVersion] The * implementation acknowledgement version. - * @member {boolean} + * @property {boolean} * [acknowledgementSettings.batchImplementationAcknowledgements] The value * indicating whether to batch implementation acknowledgements. - * @member {boolean} [acknowledgementSettings.needLoopForValidMessages] The + * @property {boolean} [acknowledgementSettings.needLoopForValidMessages] The * value indicating whether a loop is needed for valid messages. - * @member {boolean} [acknowledgementSettings.sendSynchronousAcknowledgement] - * The value indicating whether to send synchronous acknowledgement. - * @member {string} + * @property {boolean} + * [acknowledgementSettings.sendSynchronousAcknowledgement] The value + * indicating whether to send synchronous acknowledgement. + * @property {string} * [acknowledgementSettings.acknowledgementControlNumberPrefix] The * acknowledgement control number prefix. - * @member {string} + * @property {string} * [acknowledgementSettings.acknowledgementControlNumberSuffix] The * acknowledgement control number suffix. - * @member {number} + * @property {number} * [acknowledgementSettings.acknowledgementControlNumberLowerBound] The * acknowledgement control number lower bound. - * @member {number} + * @property {number} * [acknowledgementSettings.acknowledgementControlNumberUpperBound] The * acknowledgement control number upper bound. - * @member {boolean} + * @property {boolean} * [acknowledgementSettings.rolloverAcknowledgementControlNumber] The value * indicating whether to rollover acknowledgement control number. - * @member {object} messageFilter The X12 message filter. - * @member {string} [messageFilter.messageFilterType] The message filter + * @property {object} messageFilter The X12 message filter. + * @property {string} [messageFilter.messageFilterType] The message filter * type. Possible values include: 'NotSpecified', 'Include', 'Exclude' - * @member {object} securitySettings The X12 security settings. - * @member {string} [securitySettings.authorizationQualifier] The + * @property {object} securitySettings The X12 security settings. + * @property {string} [securitySettings.authorizationQualifier] The * authorization qualifier. - * @member {string} [securitySettings.authorizationValue] The authorization + * @property {string} [securitySettings.authorizationValue] The authorization * value. - * @member {string} [securitySettings.securityQualifier] The security + * @property {string} [securitySettings.securityQualifier] The security * qualifier. - * @member {string} [securitySettings.passwordValue] The password value. - * @member {object} processingSettings The X12 processing settings. - * @member {boolean} [processingSettings.maskSecurityInfo] The value + * @property {string} [securitySettings.passwordValue] The password value. + * @property {object} processingSettings The X12 processing settings. + * @property {boolean} [processingSettings.maskSecurityInfo] The value * indicating whether to mask security information. - * @member {boolean} [processingSettings.convertImpliedDecimal] The value + * @property {boolean} [processingSettings.convertImpliedDecimal] The value * indicating whether to convert numerical type to implied decimal. - * @member {boolean} [processingSettings.preserveInterchange] The value + * @property {boolean} [processingSettings.preserveInterchange] The value * indicating whether to preserve interchange. - * @member {boolean} [processingSettings.suspendInterchangeOnError] The value - * indicating whether to suspend interchange on error. - * @member {boolean} + * @property {boolean} [processingSettings.suspendInterchangeOnError] The + * value indicating whether to suspend interchange on error. + * @property {boolean} * [processingSettings.createEmptyXmlTagsForTrailingSeparators] The value * indicating whether to create empty xml tags for trailing separators. - * @member {boolean} [processingSettings.useDotAsDecimalSeparator] The value - * indicating whether to use dot as decimal separator. - * @member {array} [envelopeOverrides] The X12 envelope override settings. - * @member {array} [validationOverrides] The X12 validation override + * @property {boolean} [processingSettings.useDotAsDecimalSeparator] The + * value indicating whether to use dot as decimal separator. + * @property {array} [envelopeOverrides] The X12 envelope override settings. + * @property {array} [validationOverrides] The X12 validation override * settings. - * @member {array} [messageFilterList] The X12 message filter list. - * @member {array} schemaReferences The X12 schema references. - * @member {array} [x12DelimiterOverrides] The X12 delimiter override + * @property {array} [messageFilterList] The X12 message filter list. + * @property {array} schemaReferences The X12 schema references. + * @property {array} [x12DelimiterOverrides] The X12 delimiter override * settings. */ constructor() { diff --git a/lib/services/logicManagement/lib/models/x12SchemaReference.js b/lib/services/logicManagement/lib/models/x12SchemaReference.js index a7cf23ad5c..051b9d12bf 100644 --- a/lib/services/logicManagement/lib/models/x12SchemaReference.js +++ b/lib/services/logicManagement/lib/models/x12SchemaReference.js @@ -17,10 +17,10 @@ class X12SchemaReference { /** * Create a X12SchemaReference. - * @member {string} messageId The message id. - * @member {string} [senderApplicationId] The sender application id. - * @member {string} schemaVersion The schema version. - * @member {string} schemaName The schema name. + * @property {string} messageId The message id. + * @property {string} [senderApplicationId] The sender application id. + * @property {string} schemaVersion The schema version. + * @property {string} schemaName The schema name. */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/x12SecuritySettings.js b/lib/services/logicManagement/lib/models/x12SecuritySettings.js index d6e624ce71..0f6212f5e1 100644 --- a/lib/services/logicManagement/lib/models/x12SecuritySettings.js +++ b/lib/services/logicManagement/lib/models/x12SecuritySettings.js @@ -17,10 +17,10 @@ class X12SecuritySettings { /** * Create a X12SecuritySettings. - * @member {string} authorizationQualifier The authorization qualifier. - * @member {string} [authorizationValue] The authorization value. - * @member {string} securityQualifier The security qualifier. - * @member {string} [passwordValue] The password value. + * @property {string} authorizationQualifier The authorization qualifier. + * @property {string} [authorizationValue] The authorization value. + * @property {string} securityQualifier The security qualifier. + * @property {string} [passwordValue] The password value. */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/x12ValidationOverride.js b/lib/services/logicManagement/lib/models/x12ValidationOverride.js index 4c83ade39e..c656b76d1a 100644 --- a/lib/services/logicManagement/lib/models/x12ValidationOverride.js +++ b/lib/services/logicManagement/lib/models/x12ValidationOverride.js @@ -17,19 +17,19 @@ class X12ValidationOverride { /** * Create a X12ValidationOverride. - * @member {string} messageId The message id on which the validation settings - * has to be applied. - * @member {boolean} validateEdiTypes The value indicating whether to + * @property {string} messageId The message id on which the validation + * settings has to be applied. + * @property {boolean} validateEdiTypes The value indicating whether to * validate EDI types. - * @member {boolean} validateXsdTypes The value indicating whether to + * @property {boolean} validateXsdTypes The value indicating whether to * validate XSD types. - * @member {boolean} allowLeadingAndTrailingSpacesAndZeroes The value + * @property {boolean} allowLeadingAndTrailingSpacesAndZeroes The value * indicating whether to allow leading and trailing spaces and zeroes. - * @member {boolean} validateCharacterSet The value indicating whether to + * @property {boolean} validateCharacterSet The value indicating whether to * validate character Set. - * @member {boolean} trimLeadingAndTrailingSpacesAndZeroes The value + * @property {boolean} trimLeadingAndTrailingSpacesAndZeroes The value * indicating whether to trim leading and trailing spaces and zeroes. - * @member {string} trailingSeparatorPolicy The trailing separator policy. + * @property {string} trailingSeparatorPolicy The trailing separator policy. * Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', * 'Mandatory' */ diff --git a/lib/services/logicManagement/lib/models/x12ValidationSettings.js b/lib/services/logicManagement/lib/models/x12ValidationSettings.js index 5d09e3a095..45259770a6 100644 --- a/lib/services/logicManagement/lib/models/x12ValidationSettings.js +++ b/lib/services/logicManagement/lib/models/x12ValidationSettings.js @@ -17,25 +17,25 @@ class X12ValidationSettings { /** * Create a X12ValidationSettings. - * @member {boolean} validateCharacterSet The value indicating whether to + * @property {boolean} validateCharacterSet The value indicating whether to * validate character set in the message. - * @member {boolean} checkDuplicateInterchangeControlNumber The value + * @property {boolean} checkDuplicateInterchangeControlNumber The value * indicating whether to check for duplicate interchange control number. - * @member {number} interchangeControlNumberValidityDays The validity period - * of interchange control number. - * @member {boolean} checkDuplicateGroupControlNumber The value indicating + * @property {number} interchangeControlNumberValidityDays The validity + * period of interchange control number. + * @property {boolean} checkDuplicateGroupControlNumber The value indicating * whether to check for duplicate group control number. - * @member {boolean} checkDuplicateTransactionSetControlNumber The value + * @property {boolean} checkDuplicateTransactionSetControlNumber The value * indicating whether to check for duplicate transaction set control number. - * @member {boolean} validateEdiTypes The value indicating whether to Whether - * to validate EDI types. - * @member {boolean} validateXsdTypes The value indicating whether to Whether - * to validate XSD types. - * @member {boolean} allowLeadingAndTrailingSpacesAndZeroes The value + * @property {boolean} validateEdiTypes The value indicating whether to + * Whether to validate EDI types. + * @property {boolean} validateXsdTypes The value indicating whether to + * Whether to validate XSD types. + * @property {boolean} allowLeadingAndTrailingSpacesAndZeroes The value * indicating whether to allow leading and trailing spaces and zeroes. - * @member {boolean} trimLeadingAndTrailingSpacesAndZeroes The value + * @property {boolean} trimLeadingAndTrailingSpacesAndZeroes The value * indicating whether to trim leading and trailing spaces and zeroes. - * @member {string} trailingSeparatorPolicy The trailing separator policy. + * @property {string} trailingSeparatorPolicy The trailing separator policy. * Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', * 'Mandatory' */ diff --git a/lib/services/logicManagement/lib/operations/index.d.ts b/lib/services/logicManagement/lib/operations/index.d.ts index 6536615d1d..51a61d5d54 100644 --- a/lib/services/logicManagement/lib/operations/index.d.ts +++ b/lib/services/logicManagement/lib/operations/index.d.ts @@ -231,6 +231,8 @@ export interface Workflows { * * @param {object} [workflow.integrationAccount] The integration account. * + * @param {string} [workflow.integrationAccount.id] The resource id. + * * @param {object} [workflow.definition] The definition. * * @param {object} [workflow.parameters] The parameters. @@ -273,6 +275,8 @@ export interface Workflows { * * @param {object} [workflow.integrationAccount] The integration account. * + * @param {string} [workflow.integrationAccount.id] The resource id. + * * @param {object} [workflow.definition] The definition. * * @param {object} [workflow.parameters] The parameters. @@ -334,6 +338,8 @@ export interface Workflows { * * @param {object} [workflow.integrationAccount] The integration account. * + * @param {string} [workflow.integrationAccount.id] The resource id. + * * @param {object} [workflow.definition] The definition. * * @param {object} [workflow.parameters] The parameters. @@ -376,6 +382,8 @@ export interface Workflows { * * @param {object} [workflow.integrationAccount] The integration account. * + * @param {string} [workflow.integrationAccount.id] The resource id. + * * @param {object} [workflow.definition] The definition. * * @param {object} [workflow.parameters] The parameters. @@ -809,6 +817,8 @@ export interface Workflows { * * @param {object} [moveParameter.integrationAccount] The integration account. * + * @param {string} [moveParameter.integrationAccount.id] The resource id. + * * @param {object} [moveParameter.definition] The definition. * * @param {object} [moveParameter.parameters] The parameters. @@ -851,6 +861,8 @@ export interface Workflows { * * @param {object} [moveParameter.integrationAccount] The integration account. * + * @param {string} [moveParameter.integrationAccount.id] The resource id. + * * @param {object} [moveParameter.definition] The definition. * * @param {object} [moveParameter.parameters] The parameters. @@ -979,6 +991,8 @@ export interface Workflows { * * @param {object} [validate.integrationAccount] The integration account. * + * @param {string} [validate.integrationAccount.id] The resource id. + * * @param {object} [validate.definition] The definition. * * @param {object} [validate.parameters] The parameters. @@ -1021,6 +1035,8 @@ export interface Workflows { * * @param {object} [validate.integrationAccount] The integration account. * + * @param {string} [validate.integrationAccount.id] The resource id. + * * @param {object} [validate.definition] The definition. * * @param {object} [validate.parameters] The parameters. @@ -1083,6 +1099,8 @@ export interface Workflows { * * @param {object} [workflow.integrationAccount] The integration account. * + * @param {string} [workflow.integrationAccount.id] The resource id. + * * @param {object} [workflow.definition] The definition. * * @param {object} [workflow.parameters] The parameters. @@ -1127,6 +1145,8 @@ export interface Workflows { * * @param {object} [workflow.integrationAccount] The integration account. * + * @param {string} [workflow.integrationAccount.id] The resource id. + * * @param {object} [workflow.definition] The definition. * * @param {object} [workflow.parameters] The parameters. @@ -3129,6 +3149,426 @@ export interface WorkflowRunActionRepetitions { listExpressionTraces(resourceGroupName: string, workflowName: string, runName: string, actionName: string, repetitionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } +/** + * @class + * WorkflowRunActionRepetitionsRequestHistories + * __NOTE__: An instance of this class is automatically created for an + * instance of the LogicManagementClient. + */ +export interface WorkflowRunActionRepetitionsRequestHistories { + + + /** + * List a workflow run repetition request history. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action name. + * + * @param {string} repetitionName The workflow repetition. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listWithHttpOperationResponse(resourceGroupName: string, workflowName: string, runName: string, actionName: string, repetitionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * List a workflow run repetition request history. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action name. + * + * @param {string} repetitionName The workflow repetition. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {RequestHistoryListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {RequestHistoryListResult} [result] - The deserialized result object if an error did not occur. + * See {@link RequestHistoryListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + list(resourceGroupName: string, workflowName: string, runName: string, actionName: string, repetitionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, workflowName: string, runName: string, actionName: string, repetitionName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, workflowName: string, runName: string, actionName: string, repetitionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets a workflow run repetition request history. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action name. + * + * @param {string} repetitionName The workflow repetition. + * + * @param {string} requestHistoryName The request history name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName: string, workflowName: string, runName: string, actionName: string, repetitionName: string, requestHistoryName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets a workflow run repetition request history. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action name. + * + * @param {string} repetitionName The workflow repetition. + * + * @param {string} requestHistoryName The request history name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {RequestHistory} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {RequestHistory} [result] - The deserialized result object if an error did not occur. + * See {@link RequestHistory} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName: string, workflowName: string, runName: string, actionName: string, repetitionName: string, requestHistoryName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, workflowName: string, runName: string, actionName: string, repetitionName: string, requestHistoryName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, workflowName: string, runName: string, actionName: string, repetitionName: string, requestHistoryName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * List a workflow run repetition request history. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * List a workflow run repetition request history. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {RequestHistoryListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {RequestHistoryListResult} [result] - The deserialized result object if an error did not occur. + * See {@link RequestHistoryListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * WorkflowRunActionRequestHistories + * __NOTE__: An instance of this class is automatically created for an + * instance of the LogicManagementClient. + */ +export interface WorkflowRunActionRequestHistories { + + + /** + * List a workflow run request history. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listWithHttpOperationResponse(resourceGroupName: string, workflowName: string, runName: string, actionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * List a workflow run request history. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {RequestHistoryListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {RequestHistoryListResult} [result] - The deserialized result object if an error did not occur. + * See {@link RequestHistoryListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + list(resourceGroupName: string, workflowName: string, runName: string, actionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, workflowName: string, runName: string, actionName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, workflowName: string, runName: string, actionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets a workflow run request history. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action name. + * + * @param {string} requestHistoryName The request history name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName: string, workflowName: string, runName: string, actionName: string, requestHistoryName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets a workflow run request history. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action name. + * + * @param {string} requestHistoryName The request history name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {RequestHistory} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {RequestHistory} [result] - The deserialized result object if an error did not occur. + * See {@link RequestHistory} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName: string, workflowName: string, runName: string, actionName: string, requestHistoryName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, workflowName: string, runName: string, actionName: string, requestHistoryName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, workflowName: string, runName: string, actionName: string, requestHistoryName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * List a workflow run request history. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * List a workflow run request history. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {RequestHistoryListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {RequestHistoryListResult} [result] - The deserialized result object if an error did not occur. + * See {@link RequestHistoryListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + /** * @class * WorkflowRunActionScopeRepetitions @@ -3859,6 +4299,8 @@ export interface IntegrationAccounts { * * @param {object} listKeyVaultKeysParameter.keyVault The key vault reference. * + * @param {string} [listKeyVaultKeysParameter.keyVault.id] The resource id. + * * @param {string} [listKeyVaultKeysParameter.skipToken] The skip token. * * @param {object} [options] Optional Parameters. @@ -3885,6 +4327,8 @@ export interface IntegrationAccounts { * * @param {object} listKeyVaultKeysParameter.keyVault The key vault reference. * + * @param {string} [listKeyVaultKeysParameter.keyVault.id] The resource id. + * * @param {string} [listKeyVaultKeysParameter.skipToken] The skip token. * * @param {object} [options] Optional Parameters. diff --git a/lib/services/logicManagement/lib/operations/index.js b/lib/services/logicManagement/lib/operations/index.js index dc0ce17904..564ca4be58 100644 --- a/lib/services/logicManagement/lib/operations/index.js +++ b/lib/services/logicManagement/lib/operations/index.js @@ -22,6 +22,8 @@ exports.WorkflowTriggerHistories = require('./workflowTriggerHistories'); exports.WorkflowRuns = require('./workflowRuns'); exports.WorkflowRunActions = require('./workflowRunActions'); exports.WorkflowRunActionRepetitions = require('./workflowRunActionRepetitions'); +exports.WorkflowRunActionRepetitionsRequestHistories = require('./workflowRunActionRepetitionsRequestHistories'); +exports.WorkflowRunActionRequestHistories = require('./workflowRunActionRequestHistories'); exports.WorkflowRunActionScopeRepetitions = require('./workflowRunActionScopeRepetitions'); exports.WorkflowRunOperations = require('./workflowRunOperations'); exports.IntegrationAccounts = require('./integrationAccounts'); diff --git a/lib/services/logicManagement/lib/operations/integrationAccounts.js b/lib/services/logicManagement/lib/operations/integrationAccounts.js index ac4c98a719..63c09be381 100644 --- a/lib/services/logicManagement/lib/operations/integrationAccounts.js +++ b/lib/services/logicManagement/lib/operations/integrationAccounts.js @@ -1129,6 +1129,8 @@ function _listCallbackUrl(resourceGroupName, integrationAccountName, parameters, * * @param {object} listKeyVaultKeysParameter.keyVault The key vault reference. * + * @param {string} [listKeyVaultKeysParameter.keyVault.id] The resource id. + * * @param {string} [listKeyVaultKeysParameter.skipToken] The skip token. * * @param {object} [options] Optional Parameters. @@ -2568,6 +2570,8 @@ class IntegrationAccounts { * * @param {object} listKeyVaultKeysParameter.keyVault The key vault reference. * + * @param {string} [listKeyVaultKeysParameter.keyVault.id] The resource id. + * * @param {string} [listKeyVaultKeysParameter.skipToken] The skip token. * * @param {object} [options] Optional Parameters. @@ -2606,6 +2610,8 @@ class IntegrationAccounts { * * @param {object} listKeyVaultKeysParameter.keyVault The key vault reference. * + * @param {string} [listKeyVaultKeysParameter.keyVault.id] The resource id. + * * @param {string} [listKeyVaultKeysParameter.skipToken] The skip token. * * @param {object} [options] Optional Parameters. diff --git a/lib/services/logicManagement/lib/operations/workflowRunActionRepetitionsRequestHistories.js b/lib/services/logicManagement/lib/operations/workflowRunActionRepetitionsRequestHistories.js new file mode 100644 index 0000000000..e68f8a8caa --- /dev/null +++ b/lib/services/logicManagement/lib/operations/workflowRunActionRepetitionsRequestHistories.js @@ -0,0 +1,782 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const WebResource = msRest.WebResource; + +/** + * List a workflow run repetition request history. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action name. + * + * @param {string} repetitionName The workflow repetition. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link RequestHistoryListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _list(resourceGroupName, workflowName, runName, actionName, repetitionName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (workflowName === null || workflowName === undefined || typeof workflowName.valueOf() !== 'string') { + throw new Error('workflowName cannot be null or undefined and it must be of type string.'); + } + if (runName === null || runName === undefined || typeof runName.valueOf() !== 'string') { + throw new Error('runName cannot be null or undefined and it must be of type string.'); + } + if (actionName === null || actionName === undefined || typeof actionName.valueOf() !== 'string') { + throw new Error('actionName cannot be null or undefined and it must be of type string.'); + } + if (repetitionName === null || repetitionName === undefined || typeof repetitionName.valueOf() !== 'string') { + throw new Error('repetitionName cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{workflowName}', encodeURIComponent(workflowName)); + requestUrl = requestUrl.replace('{runName}', encodeURIComponent(runName)); + requestUrl = requestUrl.replace('{actionName}', encodeURIComponent(actionName)); + requestUrl = requestUrl.replace('{repetitionName}', encodeURIComponent(repetitionName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorResponse']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['RequestHistoryListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Gets a workflow run repetition request history. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action name. + * + * @param {string} repetitionName The workflow repetition. + * + * @param {string} requestHistoryName The request history name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link RequestHistory} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _get(resourceGroupName, workflowName, runName, actionName, repetitionName, requestHistoryName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (workflowName === null || workflowName === undefined || typeof workflowName.valueOf() !== 'string') { + throw new Error('workflowName cannot be null or undefined and it must be of type string.'); + } + if (runName === null || runName === undefined || typeof runName.valueOf() !== 'string') { + throw new Error('runName cannot be null or undefined and it must be of type string.'); + } + if (actionName === null || actionName === undefined || typeof actionName.valueOf() !== 'string') { + throw new Error('actionName cannot be null or undefined and it must be of type string.'); + } + if (repetitionName === null || repetitionName === undefined || typeof repetitionName.valueOf() !== 'string') { + throw new Error('repetitionName cannot be null or undefined and it must be of type string.'); + } + if (requestHistoryName === null || requestHistoryName === undefined || typeof requestHistoryName.valueOf() !== 'string') { + throw new Error('requestHistoryName cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{workflowName}', encodeURIComponent(workflowName)); + requestUrl = requestUrl.replace('{runName}', encodeURIComponent(runName)); + requestUrl = requestUrl.replace('{actionName}', encodeURIComponent(actionName)); + requestUrl = requestUrl.replace('{repetitionName}', encodeURIComponent(repetitionName)); + requestUrl = requestUrl.replace('{requestHistoryName}', encodeURIComponent(requestHistoryName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorResponse']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['RequestHistory']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * List a workflow run repetition request history. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link RequestHistoryListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorResponse']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['RequestHistoryListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a WorkflowRunActionRepetitionsRequestHistories. */ +class WorkflowRunActionRepetitionsRequestHistories { + /** + * Create a WorkflowRunActionRepetitionsRequestHistories. + * @param {LogicManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._list = _list; + this._get = _get; + this._listNext = _listNext; + } + + /** + * List a workflow run repetition request history. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action name. + * + * @param {string} repetitionName The workflow repetition. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listWithHttpOperationResponse(resourceGroupName, workflowName, runName, actionName, repetitionName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._list(resourceGroupName, workflowName, runName, actionName, repetitionName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * List a workflow run repetition request history. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action name. + * + * @param {string} repetitionName The workflow repetition. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {RequestHistoryListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link RequestHistoryListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + list(resourceGroupName, workflowName, runName, actionName, repetitionName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._list(resourceGroupName, workflowName, runName, actionName, repetitionName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._list(resourceGroupName, workflowName, runName, actionName, repetitionName, options, optionalCallback); + } + } + + /** + * Gets a workflow run repetition request history. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action name. + * + * @param {string} repetitionName The workflow repetition. + * + * @param {string} requestHistoryName The request history name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName, workflowName, runName, actionName, repetitionName, requestHistoryName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, workflowName, runName, actionName, repetitionName, requestHistoryName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets a workflow run repetition request history. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action name. + * + * @param {string} repetitionName The workflow repetition. + * + * @param {string} requestHistoryName The request history name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {RequestHistory} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link RequestHistory} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName, workflowName, runName, actionName, repetitionName, requestHistoryName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._get(resourceGroupName, workflowName, runName, actionName, repetitionName, requestHistoryName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, workflowName, runName, actionName, repetitionName, requestHistoryName, options, optionalCallback); + } + } + + /** + * List a workflow run repetition request history. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * List a workflow run repetition request history. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {RequestHistoryListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link RequestHistoryListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listNext(nextPageLink, options, optionalCallback); + } + } + +} + +module.exports = WorkflowRunActionRepetitionsRequestHistories; diff --git a/lib/services/logicManagement/lib/operations/workflowRunActionRequestHistories.js b/lib/services/logicManagement/lib/operations/workflowRunActionRequestHistories.js new file mode 100644 index 0000000000..42a1208a5f --- /dev/null +++ b/lib/services/logicManagement/lib/operations/workflowRunActionRequestHistories.js @@ -0,0 +1,762 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const WebResource = msRest.WebResource; + +/** + * List a workflow run request history. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link RequestHistoryListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _list(resourceGroupName, workflowName, runName, actionName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (workflowName === null || workflowName === undefined || typeof workflowName.valueOf() !== 'string') { + throw new Error('workflowName cannot be null or undefined and it must be of type string.'); + } + if (runName === null || runName === undefined || typeof runName.valueOf() !== 'string') { + throw new Error('runName cannot be null or undefined and it must be of type string.'); + } + if (actionName === null || actionName === undefined || typeof actionName.valueOf() !== 'string') { + throw new Error('actionName cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{workflowName}', encodeURIComponent(workflowName)); + requestUrl = requestUrl.replace('{runName}', encodeURIComponent(runName)); + requestUrl = requestUrl.replace('{actionName}', encodeURIComponent(actionName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorResponse']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['RequestHistoryListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Gets a workflow run request history. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action name. + * + * @param {string} requestHistoryName The request history name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link RequestHistory} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _get(resourceGroupName, workflowName, runName, actionName, requestHistoryName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (workflowName === null || workflowName === undefined || typeof workflowName.valueOf() !== 'string') { + throw new Error('workflowName cannot be null or undefined and it must be of type string.'); + } + if (runName === null || runName === undefined || typeof runName.valueOf() !== 'string') { + throw new Error('runName cannot be null or undefined and it must be of type string.'); + } + if (actionName === null || actionName === undefined || typeof actionName.valueOf() !== 'string') { + throw new Error('actionName cannot be null or undefined and it must be of type string.'); + } + if (requestHistoryName === null || requestHistoryName === undefined || typeof requestHistoryName.valueOf() !== 'string') { + throw new Error('requestHistoryName cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories/{requestHistoryName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{workflowName}', encodeURIComponent(workflowName)); + requestUrl = requestUrl.replace('{runName}', encodeURIComponent(runName)); + requestUrl = requestUrl.replace('{actionName}', encodeURIComponent(actionName)); + requestUrl = requestUrl.replace('{requestHistoryName}', encodeURIComponent(requestHistoryName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorResponse']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['RequestHistory']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * List a workflow run request history. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link RequestHistoryListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorResponse']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['RequestHistoryListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a WorkflowRunActionRequestHistories. */ +class WorkflowRunActionRequestHistories { + /** + * Create a WorkflowRunActionRequestHistories. + * @param {LogicManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._list = _list; + this._get = _get; + this._listNext = _listNext; + } + + /** + * List a workflow run request history. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listWithHttpOperationResponse(resourceGroupName, workflowName, runName, actionName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._list(resourceGroupName, workflowName, runName, actionName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * List a workflow run request history. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {RequestHistoryListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link RequestHistoryListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + list(resourceGroupName, workflowName, runName, actionName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._list(resourceGroupName, workflowName, runName, actionName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._list(resourceGroupName, workflowName, runName, actionName, options, optionalCallback); + } + } + + /** + * Gets a workflow run request history. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action name. + * + * @param {string} requestHistoryName The request history name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName, workflowName, runName, actionName, requestHistoryName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, workflowName, runName, actionName, requestHistoryName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets a workflow run request history. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action name. + * + * @param {string} requestHistoryName The request history name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {RequestHistory} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link RequestHistory} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName, workflowName, runName, actionName, requestHistoryName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._get(resourceGroupName, workflowName, runName, actionName, requestHistoryName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, workflowName, runName, actionName, requestHistoryName, options, optionalCallback); + } + } + + /** + * List a workflow run request history. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * List a workflow run request history. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {RequestHistoryListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link RequestHistoryListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listNext(nextPageLink, options, optionalCallback); + } + } + +} + +module.exports = WorkflowRunActionRequestHistories; diff --git a/lib/services/logicManagement/lib/operations/workflows.js b/lib/services/logicManagement/lib/operations/workflows.js index eb1cccc46a..dc3e0a9d1a 100644 --- a/lib/services/logicManagement/lib/operations/workflows.js +++ b/lib/services/logicManagement/lib/operations/workflows.js @@ -492,6 +492,8 @@ function _get(resourceGroupName, workflowName, options, callback) { * * @param {object} [workflow.integrationAccount] The integration account. * + * @param {string} [workflow.integrationAccount.id] The resource id. + * * @param {object} [workflow.definition] The definition. * * @param {object} [workflow.parameters] The parameters. @@ -693,6 +695,8 @@ function _createOrUpdate(resourceGroupName, workflowName, workflow, options, cal * * @param {object} [workflow.integrationAccount] The integration account. * + * @param {string} [workflow.integrationAccount.id] The resource id. + * * @param {object} [workflow.definition] The definition. * * @param {object} [workflow.parameters] The parameters. @@ -1749,6 +1753,8 @@ function _listSwagger(resourceGroupName, workflowName, options, callback) { * * @param {object} [moveParameter.integrationAccount] The integration account. * + * @param {string} [moveParameter.integrationAccount.id] The resource id. + * * @param {object} [moveParameter.definition] The definition. * * @param {object} [moveParameter.parameters] The parameters. @@ -2064,6 +2070,8 @@ function _regenerateAccessKey(resourceGroupName, workflowName, keyType, options, * * @param {object} [validate.integrationAccount] The integration account. * + * @param {string} [validate.integrationAccount.id] The resource id. + * * @param {object} [validate.definition] The definition. * * @param {object} [validate.parameters] The parameters. @@ -2232,6 +2240,8 @@ function _validateByResourceGroup(resourceGroupName, workflowName, validate, opt * * @param {object} [workflow.integrationAccount] The integration account. * + * @param {string} [workflow.integrationAccount.id] The resource id. + * * @param {object} [workflow.definition] The definition. * * @param {object} [workflow.parameters] The parameters. @@ -2953,6 +2963,8 @@ class Workflows { * * @param {object} [workflow.integrationAccount] The integration account. * + * @param {string} [workflow.integrationAccount.id] The resource id. + * * @param {object} [workflow.definition] The definition. * * @param {object} [workflow.parameters] The parameters. @@ -3007,6 +3019,8 @@ class Workflows { * * @param {object} [workflow.integrationAccount] The integration account. * + * @param {string} [workflow.integrationAccount.id] The resource id. + * * @param {object} [workflow.definition] The definition. * * @param {object} [workflow.parameters] The parameters. @@ -3083,6 +3097,8 @@ class Workflows { * * @param {object} [workflow.integrationAccount] The integration account. * + * @param {string} [workflow.integrationAccount.id] The resource id. + * * @param {object} [workflow.definition] The definition. * * @param {object} [workflow.parameters] The parameters. @@ -3137,6 +3153,8 @@ class Workflows { * * @param {object} [workflow.integrationAccount] The integration account. * + * @param {string} [workflow.integrationAccount.id] The resource id. + * * @param {object} [workflow.definition] The definition. * * @param {object} [workflow.parameters] The parameters. @@ -3747,6 +3765,8 @@ class Workflows { * * @param {object} [moveParameter.integrationAccount] The integration account. * + * @param {string} [moveParameter.integrationAccount.id] The resource id. + * * @param {object} [moveParameter.definition] The definition. * * @param {object} [moveParameter.parameters] The parameters. @@ -3801,6 +3821,8 @@ class Workflows { * * @param {object} [moveParameter.integrationAccount] The integration account. * + * @param {string} [moveParameter.integrationAccount.id] The resource id. + * * @param {object} [moveParameter.definition] The definition. * * @param {object} [moveParameter.parameters] The parameters. @@ -3971,6 +3993,8 @@ class Workflows { * * @param {object} [validate.integrationAccount] The integration account. * + * @param {string} [validate.integrationAccount.id] The resource id. + * * @param {object} [validate.definition] The definition. * * @param {object} [validate.parameters] The parameters. @@ -4025,6 +4049,8 @@ class Workflows { * * @param {object} [validate.integrationAccount] The integration account. * + * @param {string} [validate.integrationAccount.id] The resource id. + * * @param {object} [validate.definition] The definition. * * @param {object} [validate.parameters] The parameters. @@ -4102,6 +4128,8 @@ class Workflows { * * @param {object} [workflow.integrationAccount] The integration account. * + * @param {string} [workflow.integrationAccount.id] The resource id. + * * @param {object} [workflow.definition] The definition. * * @param {object} [workflow.parameters] The parameters. @@ -4158,6 +4186,8 @@ class Workflows { * * @param {object} [workflow.integrationAccount] The integration account. * + * @param {string} [workflow.integrationAccount.id] The resource id. + * * @param {object} [workflow.definition] The definition. * * @param {object} [workflow.parameters] The parameters. diff --git a/lib/services/logicManagement/package.json b/lib/services/logicManagement/package.json index e5c976578d..59877270cf 100644 --- a/lib/services/logicManagement/package.json +++ b/lib/services/logicManagement/package.json @@ -2,7 +2,7 @@ "name": "azure-arm-logic", "author": "Microsoft Corporation", "description": "LogicManagementClient Library with typescript type definitions for node", - "version": "4.1.0", + "version": "4.2.0", "dependencies": { "ms-rest": "^2.3.3", "ms-rest-azure": "^2.5.5" @@ -22,4 +22,4 @@ "bugs": { "url": "https://github.com/azure/azure-sdk-for-node/issues" } -} \ No newline at end of file +} diff --git a/lib/services/luis/authoring/README.md b/lib/services/luis/authoring/README.md index 9f6daa4e1a..94432e30af 100644 --- a/lib/services/luis/authoring/README.md +++ b/lib/services/luis/authoring/README.md @@ -3,22 +3,24 @@ uid: azure-cognitiveservices-luis-authoring summary: *content --- -# Microsoft Azure SDK for Node.js - LUISAuthoringClient +**This SDK will be deprecated next year and will be replaced by a new TypeScript-based isomorphic SDK (found at https://github.com/Azure/azure-sdk-for-js) which works on Node.js and browsers.** +## Microsoft Azure SDK for Node.js - LUISAuthoringClient + This project provides a Node.js package for accessing Azure. Right now it supports: - **Node.js version 6.x.x or higher** -## Features +### Features -## How to Install +### How to Install ```bash npm install azure-cognitiveservices-luis-authoring ``` -## How to use +### How to use -### Authentication, client creation and listPhraseLists features as an example. +#### Authentication, client creation, and listPhraseLists features as an example. ```javascript const msRest = require("ms-rest"); @@ -31,6 +33,7 @@ const appId = ec7b1657-199d-4d8a-bbb2-89a11a42e02a; const versionId = "testversionId"; const skip = 1; const take = 1; + client.features.listPhraseLists(appId, versionId, skip, take).then((result) => { console.log("The result is:"); console.log(result); @@ -38,7 +41,8 @@ client.features.listPhraseLists(appId, versionId, skip, take).then((result) => { console.log('An error occurred:'); console.dir(err, {depth: null, colors: true}); }); +``` -## Related projects +### Related projects - [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node) diff --git a/lib/services/luis/authoring/lib/lUISAuthoringClient.d.ts b/lib/services/luis/authoring/lib/lUISAuthoringClient.d.ts index 08ffd0ea4f..016adef630 100644 --- a/lib/services/luis/authoring/lib/lUISAuthoringClient.d.ts +++ b/lib/services/luis/authoring/lib/lUISAuthoringClient.d.ts @@ -47,6 +47,7 @@ export default class LUISAuthoringClient extends ServiceClient { train: operations.Train; permissions: operations.Permissions; pattern: operations.Pattern; + settings: operations.Settings; } export { LUISAuthoringClient, models as LUISAuthoringModels }; diff --git a/lib/services/luis/authoring/lib/lUISAuthoringClient.js b/lib/services/luis/authoring/lib/lUISAuthoringClient.js index b5fa344490..ada27b1c25 100644 --- a/lib/services/luis/authoring/lib/lUISAuthoringClient.js +++ b/lib/services/luis/authoring/lib/lUISAuthoringClient.js @@ -59,6 +59,7 @@ class LUISAuthoringClient extends ServiceClient { this.train = new operations.Train(this); this.permissions = new operations.Permissions(this); this.pattern = new operations.Pattern(this); + this.settings = new operations.Settings(this); this.models = models; msRest.addSerializationMixin(this); } diff --git a/lib/services/luis/authoring/lib/models/appVersionSettingObject.js b/lib/services/luis/authoring/lib/models/appVersionSettingObject.js new file mode 100644 index 0000000000..1f0134e2ac --- /dev/null +++ b/lib/services/luis/authoring/lib/models/appVersionSettingObject.js @@ -0,0 +1,60 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Object model of an application version setting. + * + */ +class AppVersionSettingObject { + /** + * Create a AppVersionSettingObject. + * @property {string} [name] The application version setting name. + * @property {string} [value] The application version setting value. + */ + constructor() { + } + + /** + * Defines the metadata of AppVersionSettingObject + * + * @returns {object} metadata of AppVersionSettingObject + * + */ + mapper() { + return { + required: false, + serializedName: 'AppVersionSettingObject', + type: { + name: 'Composite', + className: 'AppVersionSettingObject', + modelProperties: { + name: { + required: false, + serializedName: 'name', + type: { + name: 'String' + } + }, + value: { + required: false, + serializedName: 'value', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = AppVersionSettingObject; diff --git a/lib/services/luis/authoring/lib/models/applicationCreateObject.js b/lib/services/luis/authoring/lib/models/applicationCreateObject.js index 444d2e3ca9..8ae4a89e42 100644 --- a/lib/services/luis/authoring/lib/models/applicationCreateObject.js +++ b/lib/services/luis/authoring/lib/models/applicationCreateObject.js @@ -17,18 +17,18 @@ class ApplicationCreateObject { /** * Create a ApplicationCreateObject. - * @member {string} culture The culture for the new application. It is the + * @property {string} culture The culture for the new application. It is the * language that your app understands and speaks. E.g.: "en-us". Note: the * culture cannot be changed after the app is created. - * @member {string} [domain] The domain for the new application. Optional. + * @property {string} [domain] The domain for the new application. Optional. * E.g.: Comics. - * @member {string} [description] Description of the new application. + * @property {string} [description] Description of the new application. * Optional. - * @member {string} [initialVersionId] The initial version ID. Optional. + * @property {string} [initialVersionId] The initial version ID. Optional. * Default value is: "0.1" - * @member {string} [usageScenario] Defines the scenario for the new + * @property {string} [usageScenario] Defines the scenario for the new * application. Optional. E.g.: IoT. - * @member {string} name The name for the new application. + * @property {string} name The name for the new application. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/applicationInfoResponse.js b/lib/services/luis/authoring/lib/models/applicationInfoResponse.js index 832957f3a4..45d56bf5ca 100644 --- a/lib/services/luis/authoring/lib/models/applicationInfoResponse.js +++ b/lib/services/luis/authoring/lib/models/applicationInfoResponse.js @@ -17,22 +17,22 @@ class ApplicationInfoResponse { /** * Create a ApplicationInfoResponse. - * @member {uuid} [id] The ID (GUID) of the application. - * @member {string} [name] The name of the application. - * @member {string} [description] The description of the application. - * @member {string} [culture] The culture of the application. E.g.: en-us. - * @member {string} [usageScenario] Defines the scenario for the new + * @property {uuid} [id] The ID (GUID) of the application. + * @property {string} [name] The name of the application. + * @property {string} [description] The description of the application. + * @property {string} [culture] The culture of the application. E.g.: en-us. + * @property {string} [usageScenario] Defines the scenario for the new * application. Optional. E.g.: IoT. - * @member {string} [domain] The domain for the new application. Optional. + * @property {string} [domain] The domain for the new application. Optional. * E.g.: Comics. - * @member {number} [versionsCount] Amount of model versions within the + * @property {number} [versionsCount] Amount of model versions within the * application. - * @member {string} [createdDateTime] The version's creation timestamp. - * @member {object} [endpoints] The Runtime endpoint URL for this model + * @property {string} [createdDateTime] The version's creation timestamp. + * @property {object} [endpoints] The Runtime endpoint URL for this model * version. - * @member {number} [endpointHitsCount] Number of calls made to this + * @property {number} [endpointHitsCount] Number of calls made to this * endpoint. - * @member {string} [activeVersion] The version ID currently marked as + * @property {string} [activeVersion] The version ID currently marked as * active. */ constructor() { diff --git a/lib/services/luis/authoring/lib/models/applicationPublishObject.js b/lib/services/luis/authoring/lib/models/applicationPublishObject.js index 3bc2e06e17..deb05fda9a 100644 --- a/lib/services/luis/authoring/lib/models/applicationPublishObject.js +++ b/lib/services/luis/authoring/lib/models/applicationPublishObject.js @@ -17,11 +17,9 @@ class ApplicationPublishObject { /** * Create a ApplicationPublishObject. - * @member {string} [versionId] The version ID to publish. - * @member {boolean} [isStaging] Indicates if the staging slot should be + * @property {string} [versionId] The version ID to publish. + * @property {boolean} [isStaging] Indicates if the staging slot should be * used, instead of the Production one. Default value: false . - * @member {string} [region] The target region that the application is - * published to. */ constructor() { } @@ -54,13 +52,6 @@ class ApplicationPublishObject { type: { name: 'Boolean' } - }, - region: { - required: false, - serializedName: 'region', - type: { - name: 'String' - } } } } diff --git a/lib/services/luis/authoring/lib/models/applicationSettingUpdateObject.js b/lib/services/luis/authoring/lib/models/applicationSettingUpdateObject.js index 4db46ee96e..e6006d7a07 100644 --- a/lib/services/luis/authoring/lib/models/applicationSettingUpdateObject.js +++ b/lib/services/luis/authoring/lib/models/applicationSettingUpdateObject.js @@ -17,7 +17,7 @@ class ApplicationSettingUpdateObject { /** * Create a ApplicationSettingUpdateObject. - * @member {boolean} [publicProperty] Setting your application as public + * @property {boolean} [publicProperty] Setting your application as public * allows other people to use your application's endpoint using their own * keys. */ diff --git a/lib/services/luis/authoring/lib/models/applicationSettings.js b/lib/services/luis/authoring/lib/models/applicationSettings.js index 1e03958229..8aff2a2769 100644 --- a/lib/services/luis/authoring/lib/models/applicationSettings.js +++ b/lib/services/luis/authoring/lib/models/applicationSettings.js @@ -17,9 +17,9 @@ class ApplicationSettings { /** * Create a ApplicationSettings. - * @member {uuid} id The application ID. - * @member {boolean} isPublic Setting your application as public allows other - * people to use your application's endpoint using their own keys. + * @property {uuid} id The application ID. + * @property {boolean} isPublic Setting your application as public allows + * other people to use your application's endpoint using their own keys. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/applicationUpdateObject.js b/lib/services/luis/authoring/lib/models/applicationUpdateObject.js index 71962b8ab1..eaad61f3b7 100644 --- a/lib/services/luis/authoring/lib/models/applicationUpdateObject.js +++ b/lib/services/luis/authoring/lib/models/applicationUpdateObject.js @@ -17,8 +17,8 @@ class ApplicationUpdateObject { /** * Create a ApplicationUpdateObject. - * @member {string} [name] The application's new name. - * @member {string} [description] The application's new description. + * @property {string} [name] The application's new name. + * @property {string} [description] The application's new description. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/availableCulture.js b/lib/services/luis/authoring/lib/models/availableCulture.js index c0ffcfe6cb..7373b8faa2 100644 --- a/lib/services/luis/authoring/lib/models/availableCulture.js +++ b/lib/services/luis/authoring/lib/models/availableCulture.js @@ -17,8 +17,8 @@ class AvailableCulture { /** * Create a AvailableCulture. - * @member {string} [name] The language name. - * @member {string} [code] The ISO value for the language. + * @property {string} [name] The language name. + * @property {string} [code] The ISO value for the language. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/availablePrebuiltEntityModel.js b/lib/services/luis/authoring/lib/models/availablePrebuiltEntityModel.js index 397336bdb6..b236eea6cc 100644 --- a/lib/services/luis/authoring/lib/models/availablePrebuiltEntityModel.js +++ b/lib/services/luis/authoring/lib/models/availablePrebuiltEntityModel.js @@ -17,10 +17,10 @@ class AvailablePrebuiltEntityModel { /** * Create a AvailablePrebuiltEntityModel. - * @member {string} [name] The entity name. - * @member {string} [description] The entity description and usage + * @property {string} [name] The entity name. + * @property {string} [description] The entity description and usage * information. - * @member {string} [examples] Usage examples. + * @property {string} [examples] Usage examples. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/batchLabelExample.js b/lib/services/luis/authoring/lib/models/batchLabelExample.js index d347c3b7d8..654fb30930 100644 --- a/lib/services/luis/authoring/lib/models/batchLabelExample.js +++ b/lib/services/luis/authoring/lib/models/batchLabelExample.js @@ -17,14 +17,14 @@ class BatchLabelExample { /** * Create a BatchLabelExample. - * @member {object} [value] - * @member {string} [value.utteranceText] The sample's utterance. - * @member {number} [value.exampleId] The newly created sample ID. - * @member {boolean} [hasError] - * @member {object} [error] - * @member {string} [error.code] Status Code. Possible values include: + * @property {object} [value] + * @property {string} [value.utteranceText] The sample's utterance. + * @property {number} [value.exampleId] The newly created sample ID. + * @property {boolean} [hasError] + * @property {object} [error] + * @property {string} [error.code] Status Code. Possible values include: * 'Failed', 'FAILED', 'Success' - * @member {string} [error.message] Status details. + * @property {string} [error.message] Status details. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/childEntity.js b/lib/services/luis/authoring/lib/models/childEntity.js index 2e9b7ff54f..60af9a6266 100644 --- a/lib/services/luis/authoring/lib/models/childEntity.js +++ b/lib/services/luis/authoring/lib/models/childEntity.js @@ -17,8 +17,8 @@ class ChildEntity { /** * Create a ChildEntity. - * @member {uuid} id The ID (GUID) belonging to a child entity. - * @member {string} [name] The name of a child entity. + * @property {uuid} id The ID (GUID) belonging to a child entity. + * @property {string} [name] The name of a child entity. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/closedList.js b/lib/services/luis/authoring/lib/models/closedList.js index 59966c5977..7e0395c97f 100644 --- a/lib/services/luis/authoring/lib/models/closedList.js +++ b/lib/services/luis/authoring/lib/models/closedList.js @@ -17,9 +17,9 @@ class ClosedList { /** * Create a ClosedList. - * @member {string} [name] Name of the closed list feature. - * @member {array} [subLists] Sublists for the feature. - * @member {array} [roles] + * @property {string} [name] Name of the closed list feature. + * @property {array} [subLists] Sublists for the feature. + * @property {array} [roles] */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/closedListEntityExtractor.js b/lib/services/luis/authoring/lib/models/closedListEntityExtractor.js index 7783f8784c..985dd66555 100644 --- a/lib/services/luis/authoring/lib/models/closedListEntityExtractor.js +++ b/lib/services/luis/authoring/lib/models/closedListEntityExtractor.js @@ -17,16 +17,16 @@ class ClosedListEntityExtractor { /** * Create a ClosedListEntityExtractor. - * @member {uuid} id The ID of the Entity Model. - * @member {string} [name] Name of the Entity Model. - * @member {number} [typeId] The type ID of the Entity Model. - * @member {string} readableType Possible values include: 'Entity Extractor', - * 'Hierarchical Entity Extractor', 'Hierarchical Child Entity Extractor', - * 'Composite Entity Extractor', 'Closed List Entity Extractor', 'Prebuilt - * Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', - * 'Regex Entity Extractor' - * @member {array} [roles] - * @member {array} [subLists] List of sub-lists. + * @property {uuid} id The ID of the Entity Model. + * @property {string} [name] Name of the Entity Model. + * @property {number} [typeId] The type ID of the Entity Model. + * @property {string} readableType Possible values include: 'Entity + * Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity + * Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', + * 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity + * Extractor', 'Regex Entity Extractor' + * @property {array} [roles] + * @property {array} [subLists] List of sub-lists. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/closedListModelCreateObject.js b/lib/services/luis/authoring/lib/models/closedListModelCreateObject.js index 1eedda138e..73ef737d1b 100644 --- a/lib/services/luis/authoring/lib/models/closedListModelCreateObject.js +++ b/lib/services/luis/authoring/lib/models/closedListModelCreateObject.js @@ -17,8 +17,8 @@ class ClosedListModelCreateObject { /** * Create a ClosedListModelCreateObject. - * @member {array} [subLists] Sublists for the feature. - * @member {string} [name] Name of the closed list feature. + * @property {array} [subLists] Sublists for the feature. + * @property {string} [name] Name of the closed list feature. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/closedListModelPatchObject.js b/lib/services/luis/authoring/lib/models/closedListModelPatchObject.js index 8a71d88297..89eac27233 100644 --- a/lib/services/luis/authoring/lib/models/closedListModelPatchObject.js +++ b/lib/services/luis/authoring/lib/models/closedListModelPatchObject.js @@ -17,7 +17,7 @@ class ClosedListModelPatchObject { /** * Create a ClosedListModelPatchObject. - * @member {array} [subLists] Sublists to add. + * @property {array} [subLists] Sublists to add. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/closedListModelUpdateObject.js b/lib/services/luis/authoring/lib/models/closedListModelUpdateObject.js index dcacfa7f6d..c55d7cbf6a 100644 --- a/lib/services/luis/authoring/lib/models/closedListModelUpdateObject.js +++ b/lib/services/luis/authoring/lib/models/closedListModelUpdateObject.js @@ -17,8 +17,8 @@ class ClosedListModelUpdateObject { /** * Create a ClosedListModelUpdateObject. - * @member {array} [subLists] The new sublists for the feature. - * @member {string} [name] The new name of the closed list feature. + * @property {array} [subLists] The new sublists for the feature. + * @property {string} [name] The new name of the closed list feature. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/collaboratorsArray.js b/lib/services/luis/authoring/lib/models/collaboratorsArray.js index 6e911824cb..b5b1b0887b 100644 --- a/lib/services/luis/authoring/lib/models/collaboratorsArray.js +++ b/lib/services/luis/authoring/lib/models/collaboratorsArray.js @@ -16,7 +16,7 @@ class CollaboratorsArray { /** * Create a CollaboratorsArray. - * @member {array} [emails] The email address of the users. + * @property {array} [emails] The email address of the users. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/compositeChildModelCreateObject.js b/lib/services/luis/authoring/lib/models/compositeChildModelCreateObject.js index 4c7065b175..005ca930f1 100644 --- a/lib/services/luis/authoring/lib/models/compositeChildModelCreateObject.js +++ b/lib/services/luis/authoring/lib/models/compositeChildModelCreateObject.js @@ -16,7 +16,7 @@ class CompositeChildModelCreateObject { /** * Create a CompositeChildModelCreateObject. - * @member {string} [name] + * @property {string} [name] */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/compositeEntityExtractor.js b/lib/services/luis/authoring/lib/models/compositeEntityExtractor.js index b0a4ab6e4d..8e892684c4 100644 --- a/lib/services/luis/authoring/lib/models/compositeEntityExtractor.js +++ b/lib/services/luis/authoring/lib/models/compositeEntityExtractor.js @@ -17,16 +17,16 @@ class CompositeEntityExtractor { /** * Create a CompositeEntityExtractor. - * @member {uuid} id The ID of the Entity Model. - * @member {string} [name] Name of the Entity Model. - * @member {number} [typeId] The type ID of the Entity Model. - * @member {string} readableType Possible values include: 'Entity Extractor', - * 'Hierarchical Entity Extractor', 'Hierarchical Child Entity Extractor', - * 'Composite Entity Extractor', 'Closed List Entity Extractor', 'Prebuilt - * Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', - * 'Regex Entity Extractor' - * @member {array} [roles] - * @member {array} [children] List of child entities. + * @property {uuid} id The ID of the Entity Model. + * @property {string} [name] Name of the Entity Model. + * @property {number} [typeId] The type ID of the Entity Model. + * @property {string} readableType Possible values include: 'Entity + * Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity + * Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', + * 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity + * Extractor', 'Regex Entity Extractor' + * @property {array} [roles] + * @property {array} [children] List of child entities. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/compositeEntityModel.js b/lib/services/luis/authoring/lib/models/compositeEntityModel.js index c3da990f6e..cbc7d24c25 100644 --- a/lib/services/luis/authoring/lib/models/compositeEntityModel.js +++ b/lib/services/luis/authoring/lib/models/compositeEntityModel.js @@ -17,8 +17,8 @@ class CompositeEntityModel { /** * Create a CompositeEntityModel. - * @member {array} [children] Child entities. - * @member {string} [name] Entity name. + * @property {array} [children] Child entities. + * @property {string} [name] Entity name. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/customPrebuiltModel.js b/lib/services/luis/authoring/lib/models/customPrebuiltModel.js index 92624bcac5..8feba66eab 100644 --- a/lib/services/luis/authoring/lib/models/customPrebuiltModel.js +++ b/lib/services/luis/authoring/lib/models/customPrebuiltModel.js @@ -17,17 +17,18 @@ class CustomPrebuiltModel { /** * Create a CustomPrebuiltModel. - * @member {uuid} id The ID of the Entity Model. - * @member {string} [name] Name of the Entity Model. - * @member {number} [typeId] The type ID of the Entity Model. - * @member {string} readableType Possible values include: 'Entity Extractor', - * 'Hierarchical Entity Extractor', 'Hierarchical Child Entity Extractor', - * 'Composite Entity Extractor', 'Closed List Entity Extractor', 'Prebuilt - * Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', - * 'Regex Entity Extractor' - * @member {string} [customPrebuiltDomainName] The domain name. - * @member {string} [customPrebuiltModelName] The intent name or entity name. - * @member {array} [roles] + * @property {uuid} id The ID of the Entity Model. + * @property {string} [name] Name of the Entity Model. + * @property {number} [typeId] The type ID of the Entity Model. + * @property {string} readableType Possible values include: 'Entity + * Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity + * Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', + * 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity + * Extractor', 'Regex Entity Extractor' + * @property {string} [customPrebuiltDomainName] The domain name. + * @property {string} [customPrebuiltModelName] The intent name or entity + * name. + * @property {array} [roles] */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/endpointInfo.js b/lib/services/luis/authoring/lib/models/endpointInfo.js index dece173db1..1adc49815f 100644 --- a/lib/services/luis/authoring/lib/models/endpointInfo.js +++ b/lib/services/luis/authoring/lib/models/endpointInfo.js @@ -17,16 +17,16 @@ class EndpointInfo { /** * Create a EndpointInfo. - * @member {string} [versionId] The version ID to publish. - * @member {boolean} [isStaging] Indicates if the staging slot should be + * @property {string} [versionId] The version ID to publish. + * @property {boolean} [isStaging] Indicates if the staging slot should be * used, instead of the Production one. - * @member {string} [endpointUrl] The Runtime endpoint URL for this model + * @property {string} [endpointUrl] The Runtime endpoint URL for this model * version. - * @member {string} [region] The target region that the application is + * @property {string} [region] The target region that the application is * published to. - * @member {string} [assignedEndpointKey] The endpoint key. - * @member {string} [endpointRegion] The endpoint's region. - * @member {string} [publishedDateTime] Timestamp when was last published. + * @property {string} [assignedEndpointKey] The endpoint key. + * @property {string} [endpointRegion] The endpoint's region. + * @property {string} [publishedDateTime] Timestamp when was last published. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/enqueueTrainingResponse.js b/lib/services/luis/authoring/lib/models/enqueueTrainingResponse.js index cfa70c0390..d94949ddc9 100644 --- a/lib/services/luis/authoring/lib/models/enqueueTrainingResponse.js +++ b/lib/services/luis/authoring/lib/models/enqueueTrainingResponse.js @@ -17,9 +17,9 @@ class EnqueueTrainingResponse { /** * Create a EnqueueTrainingResponse. - * @member {number} [statusId] The train request status ID. - * @member {string} [status] Possible values include: 'Queued', 'InProgress', - * 'UpToDate', 'Fail', 'Success' + * @property {number} [statusId] The train request status ID. + * @property {string} [status] Possible values include: 'Queued', + * 'InProgress', 'UpToDate', 'Fail', 'Success' */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/entitiesSuggestionExample.js b/lib/services/luis/authoring/lib/models/entitiesSuggestionExample.js index de84bf8d12..2cb443d930 100644 --- a/lib/services/luis/authoring/lib/models/entitiesSuggestionExample.js +++ b/lib/services/luis/authoring/lib/models/entitiesSuggestionExample.js @@ -17,11 +17,11 @@ class EntitiesSuggestionExample { /** * Create a EntitiesSuggestionExample. - * @member {string} [text] The utterance. E.g.: what's the weather like in + * @property {string} [text] The utterance. E.g.: what's the weather like in * seattle? - * @member {array} [tokenizedText] The utterance tokenized. - * @member {array} [intentPredictions] Predicted/suggested intents. - * @member {array} [entityPredictions] Predicted/suggested entities. + * @property {array} [tokenizedText] The utterance tokenized. + * @property {array} [intentPredictions] Predicted/suggested intents. + * @property {array} [entityPredictions] Predicted/suggested entities. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/entityExtractor.js b/lib/services/luis/authoring/lib/models/entityExtractor.js index 1c4c8ae6ca..9125f6c4f0 100644 --- a/lib/services/luis/authoring/lib/models/entityExtractor.js +++ b/lib/services/luis/authoring/lib/models/entityExtractor.js @@ -17,17 +17,18 @@ class EntityExtractor { /** * Create a EntityExtractor. - * @member {uuid} id The ID of the Entity Model. - * @member {string} [name] Name of the Entity Model. - * @member {number} [typeId] The type ID of the Entity Model. - * @member {string} readableType Possible values include: 'Entity Extractor', - * 'Hierarchical Entity Extractor', 'Hierarchical Child Entity Extractor', - * 'Composite Entity Extractor', 'Closed List Entity Extractor', 'Prebuilt - * Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', - * 'Regex Entity Extractor' - * @member {array} [roles] - * @member {string} [customPrebuiltDomainName] The domain name. - * @member {string} [customPrebuiltModelName] The intent name or entity name. + * @property {uuid} id The ID of the Entity Model. + * @property {string} [name] Name of the Entity Model. + * @property {number} [typeId] The type ID of the Entity Model. + * @property {string} readableType Possible values include: 'Entity + * Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity + * Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', + * 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity + * Extractor', 'Regex Entity Extractor' + * @property {array} [roles] + * @property {string} [customPrebuiltDomainName] The domain name. + * @property {string} [customPrebuiltModelName] The intent name or entity + * name. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/entityLabel.js b/lib/services/luis/authoring/lib/models/entityLabel.js index 6b8c11d0de..a425e091ec 100644 --- a/lib/services/luis/authoring/lib/models/entityLabel.js +++ b/lib/services/luis/authoring/lib/models/entityLabel.js @@ -18,10 +18,10 @@ class EntityLabel { /** * Create a EntityLabel. - * @member {string} entityName The entity type. - * @member {number} startTokenIndex The index within the utterance where the - * extracted entity starts. - * @member {number} endTokenIndex The index within the utterance where the + * @property {string} entityName The entity type. + * @property {number} startTokenIndex The index within the utterance where + * the extracted entity starts. + * @property {number} endTokenIndex The index within the utterance where the * extracted entity ends. */ constructor() { diff --git a/lib/services/luis/authoring/lib/models/entityLabelObject.js b/lib/services/luis/authoring/lib/models/entityLabelObject.js index 93da4a0ff1..583f05800b 100644 --- a/lib/services/luis/authoring/lib/models/entityLabelObject.js +++ b/lib/services/luis/authoring/lib/models/entityLabelObject.js @@ -18,10 +18,10 @@ class EntityLabelObject { /** * Create a EntityLabelObject. - * @member {string} entityName The entity type. - * @member {number} startCharIndex The index within the utterance where the + * @property {string} entityName The entity type. + * @property {number} startCharIndex The index within the utterance where the * extracted entity starts. - * @member {number} endCharIndex The index within the utterance where the + * @property {number} endCharIndex The index within the utterance where the * extracted entity ends. */ constructor() { diff --git a/lib/services/luis/authoring/lib/models/entityModelInfo.js b/lib/services/luis/authoring/lib/models/entityModelInfo.js index 5b93724751..002ec8e453 100644 --- a/lib/services/luis/authoring/lib/models/entityModelInfo.js +++ b/lib/services/luis/authoring/lib/models/entityModelInfo.js @@ -20,7 +20,7 @@ const models = require('./index'); class EntityModelInfo extends models['ModelInfo'] { /** * Create a EntityModelInfo. - * @member {array} [roles] + * @property {array} [roles] */ constructor() { super(); diff --git a/lib/services/luis/authoring/lib/models/entityPrediction.js b/lib/services/luis/authoring/lib/models/entityPrediction.js index e6fc4f16a3..6eb9941f08 100644 --- a/lib/services/luis/authoring/lib/models/entityPrediction.js +++ b/lib/services/luis/authoring/lib/models/entityPrediction.js @@ -17,12 +17,12 @@ class EntityPrediction { /** * Create a EntityPrediction. - * @member {string} entityName The entity's name - * @member {number} startTokenIndex The index within the utterance where the - * extracted entity starts. - * @member {number} endTokenIndex The index within the utterance where the + * @property {string} entityName The entity's name + * @property {number} startTokenIndex The index within the utterance where + * the extracted entity starts. + * @property {number} endTokenIndex The index within the utterance where the * extracted entity ends. - * @member {string} phrase The actual token(s) that comprise the entity. + * @property {string} phrase The actual token(s) that comprise the entity. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/entityRole.js b/lib/services/luis/authoring/lib/models/entityRole.js index 77c4015981..49efef4ff7 100644 --- a/lib/services/luis/authoring/lib/models/entityRole.js +++ b/lib/services/luis/authoring/lib/models/entityRole.js @@ -17,8 +17,8 @@ class EntityRole { /** * Create a EntityRole. - * @member {uuid} [id] The entity role ID. - * @member {string} [name] The entity role name. + * @property {uuid} [id] The entity role ID. + * @property {string} [name] The entity role name. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/entityRoleCreateObject.js b/lib/services/luis/authoring/lib/models/entityRoleCreateObject.js index f5db3294bc..46033050e3 100644 --- a/lib/services/luis/authoring/lib/models/entityRoleCreateObject.js +++ b/lib/services/luis/authoring/lib/models/entityRoleCreateObject.js @@ -17,7 +17,7 @@ class EntityRoleCreateObject { /** * Create a EntityRoleCreateObject. - * @member {string} [name] The entity role name. + * @property {string} [name] The entity role name. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/entityRoleUpdateObject.js b/lib/services/luis/authoring/lib/models/entityRoleUpdateObject.js index 03ab723a98..9f791249a3 100644 --- a/lib/services/luis/authoring/lib/models/entityRoleUpdateObject.js +++ b/lib/services/luis/authoring/lib/models/entityRoleUpdateObject.js @@ -17,7 +17,7 @@ class EntityRoleUpdateObject { /** * Create a EntityRoleUpdateObject. - * @member {string} [name] The entity role name. + * @property {string} [name] The entity role name. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/errorResponse.js b/lib/services/luis/authoring/lib/models/errorResponse.js index c6acbb4f29..1ea302ab17 100644 --- a/lib/services/luis/authoring/lib/models/errorResponse.js +++ b/lib/services/luis/authoring/lib/models/errorResponse.js @@ -17,7 +17,7 @@ class ErrorResponse { /** * Create a ErrorResponse. - * @member {string} [errorType] + * @property {string} [errorType] */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/exampleLabelObject.js b/lib/services/luis/authoring/lib/models/exampleLabelObject.js index 07804bc808..f7027e948c 100644 --- a/lib/services/luis/authoring/lib/models/exampleLabelObject.js +++ b/lib/services/luis/authoring/lib/models/exampleLabelObject.js @@ -17,9 +17,10 @@ class ExampleLabelObject { /** * Create a ExampleLabelObject. - * @member {string} [text] The sample's utterance. - * @member {array} [entityLabels] The idenfied entities within the utterance. - * @member {string} [intentName] The idenfitied intent representing the + * @property {string} [text] The sample's utterance. + * @property {array} [entityLabels] The idenfied entities within the + * utterance. + * @property {string} [intentName] The idenfitied intent representing the * utterance. */ constructor() { diff --git a/lib/services/luis/authoring/lib/models/explicitListItem.js b/lib/services/luis/authoring/lib/models/explicitListItem.js index 421f0e13c5..0cdc192aed 100644 --- a/lib/services/luis/authoring/lib/models/explicitListItem.js +++ b/lib/services/luis/authoring/lib/models/explicitListItem.js @@ -17,8 +17,8 @@ class ExplicitListItem { /** * Create a ExplicitListItem. - * @member {number} [id] The explicit list item ID. - * @member {string} [explicitListItem] The explicit list item value. + * @property {number} [id] The explicit list item ID. + * @property {string} [explicitListItem] The explicit list item value. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/explicitListItemCreateObject.js b/lib/services/luis/authoring/lib/models/explicitListItemCreateObject.js index 0f32eb6ed8..f7fe09c0f8 100644 --- a/lib/services/luis/authoring/lib/models/explicitListItemCreateObject.js +++ b/lib/services/luis/authoring/lib/models/explicitListItemCreateObject.js @@ -17,7 +17,7 @@ class ExplicitListItemCreateObject { /** * Create a ExplicitListItemCreateObject. - * @member {string} [explicitListItem] The explicit list item. + * @property {string} [explicitListItem] The explicit list item. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/explicitListItemUpdateObject.js b/lib/services/luis/authoring/lib/models/explicitListItemUpdateObject.js index b987eb25df..5c9ff0a0e3 100644 --- a/lib/services/luis/authoring/lib/models/explicitListItemUpdateObject.js +++ b/lib/services/luis/authoring/lib/models/explicitListItemUpdateObject.js @@ -17,7 +17,7 @@ class ExplicitListItemUpdateObject { /** * Create a ExplicitListItemUpdateObject. - * @member {string} [explicitListItem] The explicit list item. + * @property {string} [explicitListItem] The explicit list item. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/featureInfoObject.js b/lib/services/luis/authoring/lib/models/featureInfoObject.js index f4ac3479f9..255569f8eb 100644 --- a/lib/services/luis/authoring/lib/models/featureInfoObject.js +++ b/lib/services/luis/authoring/lib/models/featureInfoObject.js @@ -17,9 +17,9 @@ class FeatureInfoObject { /** * Create a FeatureInfoObject. - * @member {number} [id] A six-digit ID used for Features. - * @member {string} [name] The name of the Feature. - * @member {boolean} [isActive] Indicates if the feature is enabled. + * @property {number} [id] A six-digit ID used for Features. + * @property {string} [name] The name of the Feature. + * @property {boolean} [isActive] Indicates if the feature is enabled. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/featuresResponseObject.js b/lib/services/luis/authoring/lib/models/featuresResponseObject.js index 1eb800bbf5..d4e8ca9401 100644 --- a/lib/services/luis/authoring/lib/models/featuresResponseObject.js +++ b/lib/services/luis/authoring/lib/models/featuresResponseObject.js @@ -17,8 +17,8 @@ class FeaturesResponseObject { /** * Create a FeaturesResponseObject. - * @member {array} [phraselistFeatures] - * @member {array} [patternFeatures] + * @property {array} [phraselistFeatures] + * @property {array} [patternFeatures] */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/hierarchicalChildEntity.js b/lib/services/luis/authoring/lib/models/hierarchicalChildEntity.js index c0097cf6ea..e8ad504b8f 100644 --- a/lib/services/luis/authoring/lib/models/hierarchicalChildEntity.js +++ b/lib/services/luis/authoring/lib/models/hierarchicalChildEntity.js @@ -20,8 +20,8 @@ const models = require('./index'); class HierarchicalChildEntity extends models['ChildEntity'] { /** * Create a HierarchicalChildEntity. - * @member {number} [typeId] The type ID of the Entity Model. - * @member {string} [readableType] Possible values include: 'Entity + * @property {number} [typeId] The type ID of the Entity Model. + * @property {string} [readableType] Possible values include: 'Entity * Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity * Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', * 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity diff --git a/lib/services/luis/authoring/lib/models/hierarchicalChildModelCreateObject.js b/lib/services/luis/authoring/lib/models/hierarchicalChildModelCreateObject.js index 506c78688d..8974784383 100644 --- a/lib/services/luis/authoring/lib/models/hierarchicalChildModelCreateObject.js +++ b/lib/services/luis/authoring/lib/models/hierarchicalChildModelCreateObject.js @@ -16,7 +16,7 @@ class HierarchicalChildModelCreateObject { /** * Create a HierarchicalChildModelCreateObject. - * @member {string} [name] + * @property {string} [name] */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/hierarchicalChildModelUpdateObject.js b/lib/services/luis/authoring/lib/models/hierarchicalChildModelUpdateObject.js index 4483afd4e0..f60bc0ef6b 100644 --- a/lib/services/luis/authoring/lib/models/hierarchicalChildModelUpdateObject.js +++ b/lib/services/luis/authoring/lib/models/hierarchicalChildModelUpdateObject.js @@ -16,7 +16,7 @@ class HierarchicalChildModelUpdateObject { /** * Create a HierarchicalChildModelUpdateObject. - * @member {string} [name] + * @property {string} [name] */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/hierarchicalEntityExtractor.js b/lib/services/luis/authoring/lib/models/hierarchicalEntityExtractor.js index 4daf9b0a66..066a0a3044 100644 --- a/lib/services/luis/authoring/lib/models/hierarchicalEntityExtractor.js +++ b/lib/services/luis/authoring/lib/models/hierarchicalEntityExtractor.js @@ -17,16 +17,16 @@ class HierarchicalEntityExtractor { /** * Create a HierarchicalEntityExtractor. - * @member {uuid} id The ID of the Entity Model. - * @member {string} [name] Name of the Entity Model. - * @member {number} [typeId] The type ID of the Entity Model. - * @member {string} readableType Possible values include: 'Entity Extractor', - * 'Hierarchical Entity Extractor', 'Hierarchical Child Entity Extractor', - * 'Composite Entity Extractor', 'Closed List Entity Extractor', 'Prebuilt - * Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', - * 'Regex Entity Extractor' - * @member {array} [roles] - * @member {array} [children] List of child entities. + * @property {uuid} id The ID of the Entity Model. + * @property {string} [name] Name of the Entity Model. + * @property {number} [typeId] The type ID of the Entity Model. + * @property {string} readableType Possible values include: 'Entity + * Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity + * Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', + * 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity + * Extractor', 'Regex Entity Extractor' + * @property {array} [roles] + * @property {array} [children] List of child entities. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/hierarchicalEntityModel.js b/lib/services/luis/authoring/lib/models/hierarchicalEntityModel.js index d16fc5c417..219d5e24e6 100644 --- a/lib/services/luis/authoring/lib/models/hierarchicalEntityModel.js +++ b/lib/services/luis/authoring/lib/models/hierarchicalEntityModel.js @@ -17,8 +17,8 @@ class HierarchicalEntityModel { /** * Create a HierarchicalEntityModel. - * @member {array} [children] Child entities. - * @member {string} [name] Entity name. + * @property {array} [children] Child entities. + * @property {string} [name] Entity name. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/hierarchicalModel.js b/lib/services/luis/authoring/lib/models/hierarchicalModel.js index 4fc2e6e65b..60d689345f 100644 --- a/lib/services/luis/authoring/lib/models/hierarchicalModel.js +++ b/lib/services/luis/authoring/lib/models/hierarchicalModel.js @@ -16,12 +16,12 @@ class HierarchicalModel { /** * Create a HierarchicalModel. - * @member {string} [name] - * @member {array} [children] - * @member {object} [inherits] - * @member {string} [inherits.domainName] - * @member {string} [inherits.modelName] - * @member {array} [roles] + * @property {string} [name] + * @property {array} [children] + * @property {object} [inherits] + * @property {string} [inherits.domainName] + * @property {string} [inherits.modelName] + * @property {array} [roles] */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/index.d.ts b/lib/services/luis/authoring/lib/models/index.d.ts index 2613285b07..6e54d47206 100644 --- a/lib/services/luis/authoring/lib/models/index.d.ts +++ b/lib/services/luis/authoring/lib/models/index.d.ts @@ -1,569 +1,558 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import * as moment from "moment"; - /** - * @class - * Initializes a new instance of the EntityLabelObject class. - * @constructor - * Defines the entity type and position of the extracted entity within the - * example. - * - * @member {string} entityName The entity type. - * @member {number} startCharIndex The index within the utterance where the - * extracted entity starts. - * @member {number} endCharIndex The index within the utterance where the - * extracted entity ends. + * Defines the entity type and position of the extracted entity within the example. */ export interface EntityLabelObject { + /** + * The entity type. + */ entityName: string; + /** + * The index within the utterance where the extracted entity starts. + */ startCharIndex: number; + /** + * The index within the utterance where the extracted entity ends. + */ endCharIndex: number; } /** - * @class - * Initializes a new instance of the ApplicationCreateObject class. - * @constructor * Properties for creating a new LUIS Application - * - * @member {string} culture The culture for the new application. It is the - * language that your app understands and speaks. E.g.: "en-us". Note: the - * culture cannot be changed after the app is created. - * @member {string} [domain] The domain for the new application. Optional. - * E.g.: Comics. - * @member {string} [description] Description of the new application. Optional. - * @member {string} [initialVersionId] The initial version ID. Optional. - * Default value is: "0.1" - * @member {string} [usageScenario] Defines the scenario for the new - * application. Optional. E.g.: IoT. - * @member {string} name The name for the new application. */ export interface ApplicationCreateObject { + /** + * The culture for the new application. It is the language that your app understands and speaks. + * E.g.: "en-us". Note: the culture cannot be changed after the app is created. + */ culture: string; + /** + * The domain for the new application. Optional. E.g.: Comics. + */ domain?: string; + /** + * Description of the new application. Optional. + */ description?: string; + /** + * The initial version ID. Optional. Default value is: "0.1" + */ initialVersionId?: string; + /** + * Defines the scenario for the new application. Optional. E.g.: IoT. + */ usageScenario?: string; + /** + * The name for the new application. + */ name: string; } /** - * @class - * Initializes a new instance of the PrebuiltDomainCreateBaseObject class. - * @constructor - * A model object containing the name of the custom prebuilt entity and the - * name of the domain to which this model belongs. - * - * @member {string} [domainName] The domain name. + * A model object containing the name of the custom prebuilt entity and the name of the domain to + * which this model belongs. */ export interface PrebuiltDomainCreateBaseObject { + /** + * The domain name. + */ domainName?: string; } /** - * @class - * Initializes a new instance of the PrebuiltDomainCreateObject class. - * @constructor - * A prebuilt domain create object containing the name and culture of the - * domain. - * - * @member {string} [domainName] The domain name. - * @member {string} [culture] The culture of the new domain. + * A prebuilt domain create object containing the name and culture of the domain. */ export interface PrebuiltDomainCreateObject { + /** + * The domain name. + */ domainName?: string; + /** + * The culture of the new domain. + */ culture?: string; } /** - * @class - * Initializes a new instance of the PrebuiltDomainModelCreateObject class. - * @constructor - * A model object containing the name of the custom prebuilt intent or entity - * and the name of the domain to which this model belongs. - * - * @member {string} [domainName] The domain name. - * @member {string} [modelName] The intent name or entity name. + * A model object containing the name of the custom prebuilt intent or entity and the name of the + * domain to which this model belongs. */ export interface PrebuiltDomainModelCreateObject { + /** + * The domain name. + */ domainName?: string; + /** + * The intent name or entity name. + */ modelName?: string; } /** - * @class - * Initializes a new instance of the HierarchicalEntityModel class. - * @constructor * A Hierarchical Entity Extractor. - * - * @member {array} [children] Child entities. - * @member {string} [name] Entity name. */ export interface HierarchicalEntityModel { + /** + * Child entities. + */ children?: string[]; + /** + * Entity name. + */ name?: string; } /** - * @class - * Initializes a new instance of the CompositeEntityModel class. - * @constructor * A composite entity. - * - * @member {array} [children] Child entities. - * @member {string} [name] Entity name. */ export interface CompositeEntityModel { + /** + * Child entities. + */ children?: string[]; + /** + * Entity name. + */ name?: string; } /** - * @class - * Initializes a new instance of the JSONEntity class. - * @constructor * Exported Model - Extracted Entity from utterance. - * - * @member {number} startPos The index within the utterance where the extracted - * entity starts. - * @member {number} endPos The index within the utterance where the extracted - * entity ends. - * @member {string} entity The entity name. */ export interface JSONEntity { + /** + * The index within the utterance where the extracted entity starts. + */ startPos: number; + /** + * The index within the utterance where the extracted entity ends. + */ endPos: number; + /** + * The entity name. + */ entity: string; } /** - * @class - * Initializes a new instance of the ApplicationSettingUpdateObject class. - * @constructor * Object model for updating an application's settings. - * - * @member {boolean} [publicProperty] Setting your application as public allows - * other people to use your application's endpoint using their own keys. */ export interface ApplicationSettingUpdateObject { + /** + * Setting your application as public allows other people to use your application's endpoint + * using their own keys. + */ publicProperty?: boolean; } /** - * @class - * Initializes a new instance of the PublishSettingUpdateObject class. - * @constructor * Object model for updating an application's publish settings. - * - * @member {boolean} [sentimentAnalysis] Setting sentiment analysis as true - * returns the Sentiment of the input utterance along with the resopnse - * @member {boolean} [speech] Setting speech as public enables speech priming - * in your app - * @member {boolean} [spellChecker] Setting spell checker as public enables - * spell checking the input utterance. */ export interface PublishSettingUpdateObject { + /** + * Setting sentiment analysis as true returns the Sentiment of the input utterance along with the + * resopnse + */ sentimentAnalysis?: boolean; + /** + * Setting speech as public enables speech priming in your app + */ speech?: boolean; + /** + * Setting spell checker as public enables spell checking the input utterance. + */ spellChecker?: boolean; } /** - * @class - * Initializes a new instance of the ExampleLabelObject class. - * @constructor * A labeled example. - * - * @member {string} [text] The sample's utterance. - * @member {array} [entityLabels] The idenfied entities within the utterance. - * @member {string} [intentName] The idenfitied intent representing the - * utterance. */ export interface ExampleLabelObject { + /** + * The sample's utterance. + */ text?: string; + /** + * The idenfied entities within the utterance. + */ entityLabels?: EntityLabelObject[]; + /** + * The idenfitied intent representing the utterance. + */ intentName?: string; } /** - * @class - * Initializes a new instance of the PhraselistCreateObject class. - * @constructor * Object model for creating a phraselist model. - * - * @member {string} [phrases] List of comma-separated phrases that represent - * the Phraselist. - * @member {string} [name] The Phraselist name. - * @member {boolean} [isExchangeable] An exchangeable phrase list feature are - * serves as single feature to the LUIS underlying training algorithm. It is - * used as a lexicon lookup feature where its value is 1 if the lexicon - * contains a given word or 0 if it doesn’t. Think of an exchangeable as a - * synonyms list. A non-exchangeable phrase list feature has all the phrases in - * the list serve as separate features to the underlying training algorithm. - * So, if you your phrase list feature contains 5 phrases, they will be mapped - * to 5 separate features. You can think of the non-exchangeable phrase list - * feature as an additional bag of words that you are willing to add to LUIS - * existing vocabulary features. Think of a non-exchangeable as set of - * different words. Default value is true. Default value: true . */ export interface PhraselistCreateObject { + /** + * List of comma-separated phrases that represent the Phraselist. + */ phrases?: string; + /** + * The Phraselist name. + */ name?: string; + /** + * An exchangeable phrase list feature are serves as single feature to the LUIS underlying + * training algorithm. It is used as a lexicon lookup feature where its value is 1 if the lexicon + * contains a given word or 0 if it doesn’t. Think of an exchangeable as a synonyms list. A + * non-exchangeable phrase list feature has all the phrases in the list serve as separate + * features to the underlying training algorithm. So, if you your phrase list feature contains 5 + * phrases, they will be mapped to 5 separate features. You can think of the non-exchangeable + * phrase list feature as an additional bag of words that you are willing to add to LUIS existing + * vocabulary features. Think of a non-exchangeable as set of different words. Default value is + * true. + */ isExchangeable?: boolean; } /** - * @class - * Initializes a new instance of the SubClosedList class. - * @constructor * Sublist of items for a Closed list. - * - * @member {string} [canonicalForm] The standard form that the list represents. - * @member {array} [list] List of synonym words. */ export interface SubClosedList { + /** + * The standard form that the list represents. + */ canonicalForm?: string; + /** + * List of synonym words. + */ list?: string[]; } /** - * @class - * Initializes a new instance of the SubClosedListResponse class. - * @constructor * Sublist of items for a Closed list. - * - * @member {number} [id] The sublist ID */ export interface SubClosedListResponse extends SubClosedList { + /** + * The sublist ID + */ id?: number; } /** - * @class - * Initializes a new instance of the ApplicationUpdateObject class. - * @constructor * Object model for updating the name or description of an application. - * - * @member {string} [name] The application's new name. - * @member {string} [description] The application's new description. */ export interface ApplicationUpdateObject { + /** + * The application's new name. + */ name?: string; + /** + * The application's new description. + */ description?: string; } /** - * @class - * Initializes a new instance of the JSONRegexFeature class. - * @constructor * Exported Model - A Pattern feature. - * - * @member {string} [pattern] The Regular Expression to match. - * @member {boolean} [activated] Indicates if the Pattern feature is enabled. - * @member {string} [name] Name of the feature. */ export interface JSONRegexFeature { + /** + * The Regular Expression to match. + */ pattern?: string; + /** + * Indicates if the Pattern feature is enabled. + */ activated?: boolean; + /** + * Name of the feature. + */ name?: string; } /** - * @class - * Initializes a new instance of the PatternUpdateObject class. - * @constructor * Object model for updating an existing Pattern feature. - * - * @member {string} [pattern] The Regular Expression to match. - * @member {string} [name] Name of the feature. - * @member {boolean} [isActive] Indicates if the Pattern feature is enabled. - * Default value: true . */ export interface PatternUpdateObject { + /** + * The Regular Expression to match. + */ pattern?: string; + /** + * Name of the feature. + */ name?: string; + /** + * Indicates if the Pattern feature is enabled. + */ isActive?: boolean; } /** - * @class - * Initializes a new instance of the ClosedList class. - * @constructor * Exported Model - A Closed List. - * - * @member {string} [name] Name of the closed list feature. - * @member {array} [subLists] Sublists for the feature. - * @member {array} [roles] */ export interface ClosedList { + /** + * Name of the closed list feature. + */ name?: string; + /** + * Sublists for the feature. + */ subLists?: SubClosedList[]; roles?: string[]; } /** - * @class - * Initializes a new instance of the WordListObject class. - * @constructor * Sublist of items for a Closed list. - * - * @member {string} [canonicalForm] The standard form that the list represents. - * @member {array} [list] List of synonym words. - */ +*/ export interface WordListObject { + /** + * The standard form that the list represents. + */ canonicalForm?: string; + /** + * List of synonym words. + */ list?: string[]; } /** - * @class - * Initializes a new instance of the ClosedListModelPatchObject class. - * @constructor * Object model for adding a batch of sublists to an existing closedlist. - * - * @member {array} [subLists] Sublists to add. - */ +*/ export interface ClosedListModelPatchObject { + /** + * Sublists to add. + */ subLists?: WordListObject[]; } /** - * @class - * Initializes a new instance of the JSONModelFeature class. - * @constructor * Exported Model - Phraselist Model Feature. - * - * @member {boolean} [activated] Indicates if the feature is enabled. - * @member {string} [name] The Phraselist name. - * @member {string} [words] List of comma-separated phrases that represent the - * Phraselist. - * @member {boolean} [mode] An exchangeable phrase list feature are serves as - * single feature to the LUIS underlying training algorithm. It is used as a - * lexicon lookup feature where its value is 1 if the lexicon contains a given - * word or 0 if it doesn’t. Think of an exchangeable as a synonyms list. A - * non-exchangeable phrase list feature has all the phrases in the list serve - * as separate features to the underlying training algorithm. So, if you your - * phrase list feature contains 5 phrases, they will be mapped to 5 separate - * features. You can think of the non-exchangeable phrase list feature as an - * additional bag of words that you are willing to add to LUIS existing - * vocabulary features. Think of a non-exchangeable as set of different words. - * Default value is true. - */ +*/ export interface JSONModelFeature { + /** + * Indicates if the feature is enabled. + */ activated?: boolean; + /** + * The Phraselist name. + */ name?: string; + /** + * List of comma-separated phrases that represent the Phraselist. + */ words?: string; + /** + * An exchangeable phrase list feature are serves as single feature to the LUIS underlying + * training algorithm. It is used as a lexicon lookup feature where its value is 1 if the lexicon + * contains a given word or 0 if it doesn’t. Think of an exchangeable as a synonyms list. A + * non-exchangeable phrase list feature has all the phrases in the list serve as separate + * features to the underlying training algorithm. So, if you your phrase list feature contains 5 + * phrases, they will be mapped to 5 separate features. You can think of the non-exchangeable + * phrase list feature as an additional bag of words that you are willing to add to LUIS existing + * vocabulary features. Think of a non-exchangeable as set of different words. Default value is + * true. + */ mode?: boolean; } /** - * @class - * Initializes a new instance of the ModelCreateObject class. - * @constructor * Object model for creating a new entity extractor. - * - * @member {string} [name] Name of the new entity extractor. - */ +*/ export interface ModelCreateObject { + /** + * Name of the new entity extractor. + */ name?: string; } /** - * @class - * Initializes a new instance of the PatternCreateObject class. - * @constructor * Object model for creating a Pattern feature. - * - * @member {string} [pattern] The Regular Expression to match. - * @member {string} [name] Name of the feature. - */ +*/ export interface PatternCreateObject { + /** + * The Regular Expression to match. + */ pattern?: string; + /** + * Name of the feature. + */ name?: string; } /** - * @class - * Initializes a new instance of the WordListBaseUpdateObject class. - * @constructor * Object model for updating one of the closed list's sublists. - * - * @member {string} [canonicalForm] The standard form that the list represents. - * @member {array} [list] List of synonym words. - */ +*/ export interface WordListBaseUpdateObject { + /** + * The standard form that the list represents. + */ canonicalForm?: string; + /** + * List of synonym words. + */ list?: string[]; } /** - * @class - * Initializes a new instance of the JSONUtterance class. - * @constructor * Exported Model - Utterance that was used to train the model. - * - * @member {string} [text] The utterance. - * @member {string} [intent] The matched intent. - * @member {array} [entities] The matched entities. - */ +*/ export interface JSONUtterance { + /** + * The utterance. + */ text?: string; + /** + * The matched intent. + */ intent?: string; + /** + * The matched entities. + */ entities?: JSONEntity[]; } /** - * @class - * Initializes a new instance of the ModelUpdateObject class. - * @constructor * Object model for updating an intent classifier. - * - * @member {string} [name] The entity's new name. - */ +*/ export interface ModelUpdateObject { + /** + * The entity's new name. + */ name?: string; } /** - * @class - * Initializes a new instance of the ClosedListModelUpdateObject class. - * @constructor * Object model for updating a closed list. - * - * @member {array} [subLists] The new sublists for the feature. - * @member {string} [name] The new name of the closed list feature. - */ +*/ export interface ClosedListModelUpdateObject { + /** + * The new sublists for the feature. + */ subLists?: WordListObject[]; + /** + * The new name of the closed list feature. + */ name?: string; } /** - * @class - * Initializes a new instance of the ClosedListModelCreateObject class. - * @constructor * Object model for creating a closed list. - * - * @member {array} [subLists] Sublists for the feature. - * @member {string} [name] Name of the closed list feature. - */ +*/ export interface ClosedListModelCreateObject { + /** + * Sublists for the feature. + */ subLists?: WordListObject[]; + /** + * Name of the closed list feature. + */ name?: string; } /** - * @class - * Initializes a new instance of the VersionInfo class. - * @constructor * Object model of an application version. - * - * @member {string} version The version ID. E.g.: "0.1" - * @member {date} [createdDateTime] The version's creation timestamp. - * @member {date} [lastModifiedDateTime] Timestamp of the last update. - * @member {date} [lastTrainedDateTime] Timestamp of the last time the model - * was trained. - * @member {date} [lastPublishedDateTime] Timestamp when was last published. - * @member {string} [endpointUrl] The Runtime endpoint URL for this model - * version. - * @member {object} [assignedEndpointKey] The endpoint key. - * @member {object} [externalApiKeys] External keys. - * @member {number} [intentsCount] Number of intents in this model. - * @member {number} [entitiesCount] Number of entities in this model. - * @member {number} [endpointHitsCount] Number of calls made to this endpoint. - * @member {string} trainingStatus The current training status. Possible values - * include: 'NeedsTraining', 'InProgress', 'Trained' - */ +*/ export interface VersionInfo { + /** + * The version ID. E.g.: "0.1" + */ version: string; + /** + * The version's creation timestamp. + */ createdDateTime?: Date; + /** + * Timestamp of the last update. + */ lastModifiedDateTime?: Date; + /** + * Timestamp of the last time the model was trained. + */ lastTrainedDateTime?: Date; + /** + * Timestamp when was last published. + */ lastPublishedDateTime?: Date; + /** + * The Runtime endpoint URL for this model version. + */ endpointUrl?: string; + /** + * The endpoint key. + */ assignedEndpointKey?: { [propertyName: string]: string }; + /** + * External keys. + */ externalApiKeys?: any; + /** + * Number of intents in this model. + */ intentsCount?: number; + /** + * Number of entities in this model. + */ entitiesCount?: number; + /** + * Number of calls made to this endpoint. + */ endpointHitsCount?: number; + /** + * The current training status. Possible values include: 'NeedsTraining', 'InProgress', 'Trained' + */ trainingStatus: string; } /** - * @class - * Initializes a new instance of the TaskUpdateObject class. - * @constructor * Object model for cloning an application's version. - * - * @member {string} [version] The new version for the cloned model. - */ +*/ export interface TaskUpdateObject { + /** + * The new version for the cloned model. + */ version?: string; } /** - * @class - * Initializes a new instance of the PhraselistUpdateObject class. - * @constructor * Object model for updating a Phraselist. - * - * @member {string} [phrases] List of comma-separated phrases that represent - * the Phraselist. - * @member {string} [name] The Phraselist name. - * @member {boolean} [isActive] Indicates if the Phraselist is enabled. Default - * value: true . - * @member {boolean} [isExchangeable] An exchangeable phrase list feature are - * serves as single feature to the LUIS underlying training algorithm. It is - * used as a lexicon lookup feature where its value is 1 if the lexicon - * contains a given word or 0 if it doesn’t. Think of an exchangeable as a - * synonyms list. A non-exchangeable phrase list feature has all the phrases in - * the list serve as separate features to the underlying training algorithm. - * So, if you your phrase list feature contains 5 phrases, they will be mapped - * to 5 separate features. You can think of the non-exchangeable phrase list - * feature as an additional bag of words that you are willing to add to LUIS - * existing vocabulary features. Think of a non-exchangeable as set of - * different words. Default value is true. Default value: true . - */ +*/ export interface PhraselistUpdateObject { + /** + * List of comma-separated phrases that represent the Phraselist. + */ phrases?: string; + /** + * The Phraselist name. + */ name?: string; + /** + * Indicates if the Phraselist is enabled. + */ isActive?: boolean; + /** + * An exchangeable phrase list feature are serves as single feature to the LUIS underlying + * training algorithm. It is used as a lexicon lookup feature where its value is 1 if the lexicon + * contains a given word or 0 if it doesn’t. Think of an exchangeable as a synonyms list. A + * non-exchangeable phrase list feature has all the phrases in the list serve as separate + * features to the underlying training algorithm. So, if you your phrase list feature contains 5 + * phrases, they will be mapped to 5 separate features. You can think of the non-exchangeable + * phrase list feature as an additional bag of words that you are willing to add to LUIS existing + * vocabulary features. Think of a non-exchangeable as set of different words. Default value is + * true. + */ isExchangeable?: boolean; } -/** - * @class - * Initializes a new instance of the PrebuiltDomainObject class. - * @constructor - * @member {string} [domainName] - * @member {string} [modelName] - */ export interface PrebuiltDomainObject { domainName?: string; modelName?: string; } -/** - * @class - * Initializes a new instance of the HierarchicalModel class. - * @constructor - * @member {string} [name] - * @member {array} [children] - * @member {object} [inherits] - * @member {string} [inherits.domainName] - * @member {string} [inherits.modelName] - * @member {array} [roles] - */ export interface HierarchicalModel { name?: string; children?: string[]; @@ -572,33 +561,22 @@ export interface HierarchicalModel { } /** - * @class - * Initializes a new instance of the ApplicationPublishObject class. - * @constructor * Object model for publishing a specific application version. - * - * @member {string} [versionId] The version ID to publish. - * @member {boolean} [isStaging] Indicates if the staging slot should be used, - * instead of the Production one. Default value: false . - * @member {string} [region] The target region that the application is - * published to. - */ +*/ export interface ApplicationPublishObject { + /** + * The version ID to publish. + */ versionId?: string; + /** + * Indicates if the staging slot should be used, instead of the Production one. + */ isStaging?: boolean; - region?: string; } /** - * @class - * Initializes a new instance of the PatternAny class. - * @constructor * Pattern.Any Entity Extractor. - * - * @member {string} [name] - * @member {array} [explicitList] - * @member {array} [roles] - */ +*/ export interface PatternAny { name?: string; explicitList?: string[]; @@ -606,15 +584,8 @@ export interface PatternAny { } /** - * @class - * Initializes a new instance of the RegexEntity class. - * @constructor * Regular Expression Entity Extractor. - * - * @member {string} [name] - * @member {string} [regexPattern] - * @member {array} [roles] - */ +*/ export interface RegexEntity { name?: string; regexPattern?: string; @@ -622,622 +593,663 @@ export interface RegexEntity { } /** - * @class - * Initializes a new instance of the PrebuiltEntity class. - * @constructor * Prebuilt Entity Extractor. - * - * @member {string} [name] - * @member {array} [roles] - */ +*/ export interface PrebuiltEntity { name?: string; roles?: string[]; } /** - * @class - * Initializes a new instance of the PatternRule class. - * @constructor * Pattern - * - * @member {string} [pattern] The pattern text. - * @member {string} [intent] The intent's name where the pattern belongs to. - */ +*/ export interface PatternRule { + /** + * The pattern text. + */ pattern?: string; + /** + * The intent's name where the pattern belongs to. + */ intent?: string; } /** - * @class - * Initializes a new instance of the LuisApp class. - * @constructor * Exported Model - An exported LUIS Application. - * - * @member {string} [name] The name of the application. - * @member {string} [versionId] The version ID of the application that was - * exported. - * @member {string} [desc] The description of the application. - * @member {string} [culture] The culture of the application. E.g.: en-us. - * @member {array} [intents] List of intents. - * @member {array} [entities] List of entities. - * @member {array} [closedLists] List of closed lists. - * @member {array} [composites] List of composite entities. - * @member {array} [patternAnyEntities] List of Pattern.Any entities. - * @member {array} [regexEntities] List of regular expression entities. - * @member {array} [prebuiltEntities] List of prebuilt entities. - * @member {array} [regexFeatures] List of pattern features. - * @member {array} [modelFeatures] List of model features. - * @member {array} [patterns] List of patterns. - * @member {array} [utterances] List of sample utterances. - */ +*/ export interface LuisApp { + /** + * The name of the application. + */ name?: string; + /** + * The version ID of the application that was exported. + */ versionId?: string; + /** + * The description of the application. + */ desc?: string; + /** + * The culture of the application. E.g.: en-us. + */ culture?: string; + /** + * List of intents. + */ intents?: HierarchicalModel[]; + /** + * List of entities. + */ entities?: HierarchicalModel[]; + /** + * List of closed lists. + */ closedLists?: ClosedList[]; + /** + * List of composite entities. + */ composites?: HierarchicalModel[]; + /** + * List of Pattern.Any entities. + */ patternAnyEntities?: PatternAny[]; + /** + * List of regular expression entities. + */ regexEntities?: RegexEntity[]; + /** + * List of prebuilt entities. + */ prebuiltEntities?: PrebuiltEntity[]; + /** + * List of pattern features. + */ regexFeatures?: JSONRegexFeature[]; + /** + * List of model features. + */ modelFeatures?: JSONModelFeature[]; + /** + * List of patterns. + */ patterns?: PatternRule[]; + /** + * List of sample utterances. + */ utterances?: JSONUtterance[]; /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. - */ - [property: string]: any; + * Describes unknown properties. The value of an unknown property can be of "any" type. + */ + [additionalPropertyName: string]: any; } /** - * @class - * Initializes a new instance of the EntityLabel class. - * @constructor - * Defines the entity type and position of the extracted entity within the - * example. - * - * @member {string} entityName The entity type. - * @member {number} startTokenIndex The index within the utterance where the - * extracted entity starts. - * @member {number} endTokenIndex The index within the utterance where the - * extracted entity ends. - */ + * Defines the entity type and position of the extracted entity within the example. +*/ export interface EntityLabel { + /** + * The entity type. + */ entityName: string; + /** + * The index within the utterance where the extracted entity starts. + */ startTokenIndex: number; + /** + * The index within the utterance where the extracted entity ends. + */ endTokenIndex: number; } /** - * @class - * Initializes a new instance of the IntentPrediction class. - * @constructor * A suggested intent. - * - * @member {string} [name] The intent's name - * @member {number} [score] The intent's score, based on the prediction model. - */ +*/ export interface IntentPrediction { + /** + * The intent's name + */ name?: string; + /** + * The intent's score, based on the prediction model. + */ score?: number; } /** - * @class - * Initializes a new instance of the EntityPrediction class. - * @constructor * A suggested entity. - * - * @member {string} entityName The entity's name - * @member {number} startTokenIndex The index within the utterance where the - * extracted entity starts. - * @member {number} endTokenIndex The index within the utterance where the - * extracted entity ends. - * @member {string} phrase The actual token(s) that comprise the entity. - */ +*/ export interface EntityPrediction { + /** + * The entity's name + */ entityName: string; + /** + * The index within the utterance where the extracted entity starts. + */ startTokenIndex: number; + /** + * The index within the utterance where the extracted entity ends. + */ endTokenIndex: number; + /** + * The actual token(s) that comprise the entity. + */ phrase: string; } /** - * @class - * Initializes a new instance of the LabeledUtterance class. - * @constructor * A prediction and label pair of an example. - * - * @member {number} [id] ID of Labeled Utterance. - * @member {string} [text] The utterance. E.g.: what's the weather like in - * seattle? - * @member {array} [tokenizedText] The utterance tokenized. - * @member {string} [intentLabel] The intent matching the example. - * @member {array} [entityLabels] The entities matching the example. - * @member {array} [intentPredictions] List of suggested intents. - * @member {array} [entityPredictions] List of suggested entities. - */ +*/ export interface LabeledUtterance { + /** + * ID of Labeled Utterance. + */ id?: number; + /** + * The utterance. E.g.: what's the weather like in seattle? + */ text?: string; + /** + * The utterance tokenized. + */ tokenizedText?: string[]; + /** + * The intent matching the example. + */ intentLabel?: string; + /** + * The entities matching the example. + */ entityLabels?: EntityLabel[]; + /** + * List of suggested intents. + */ intentPredictions?: IntentPrediction[]; + /** + * List of suggested entities. + */ entityPredictions?: EntityPrediction[]; } /** - * @class - * Initializes a new instance of the IntentsSuggestionExample class. - * @constructor * Predicted/suggested intent. - * - * @member {string} [text] The utterance. E.g.: what's the weather like in - * seattle? - * @member {array} [tokenizedText] The utterance tokenized. - * @member {array} [intentPredictions] Predicted/suggested intents. - * @member {array} [entityPredictions] Predicted/suggested entities. - */ +*/ export interface IntentsSuggestionExample { + /** + * The utterance. E.g.: what's the weather like in seattle? + */ text?: string; + /** + * The utterance tokenized. + */ tokenizedText?: string[]; + /** + * Predicted/suggested intents. + */ intentPredictions?: IntentPrediction[]; + /** + * Predicted/suggested entities. + */ entityPredictions?: EntityPrediction[]; } /** - * @class - * Initializes a new instance of the EntitiesSuggestionExample class. - * @constructor * Predicted/suggested entity. - * - * @member {string} [text] The utterance. E.g.: what's the weather like in - * seattle? - * @member {array} [tokenizedText] The utterance tokenized. - * @member {array} [intentPredictions] Predicted/suggested intents. - * @member {array} [entityPredictions] Predicted/suggested entities. - */ +*/ export interface EntitiesSuggestionExample { + /** + * The utterance. E.g.: what's the weather like in seattle? + */ text?: string; + /** + * The utterance tokenized. + */ tokenizedText?: string[]; + /** + * Predicted/suggested intents. + */ intentPredictions?: IntentPrediction[]; + /** + * Predicted/suggested entities. + */ entityPredictions?: EntityPrediction[]; } /** - * @class - * Initializes a new instance of the PersonalAssistantsResponse class. - * @constructor - * Response containing user's endpoint keys and the endpoint URLs of the - * prebuilt Cortana applications. - * - * @member {array} [endpointKeys] - * @member {object} [endpointUrls] - */ + * Response containing user's endpoint keys and the endpoint URLs of the prebuilt Cortana + * applications. +*/ export interface PersonalAssistantsResponse { endpointKeys?: string[]; endpointUrls?: { [propertyName: string]: string }; } /** - * @class - * Initializes a new instance of the ModelInfo class. - * @constructor * Base type used in entity types. - * - * @member {uuid} id The ID of the Entity Model. - * @member {string} [name] Name of the Entity Model. - * @member {number} [typeId] The type ID of the Entity Model. - * @member {string} readableType Possible values include: 'Entity Extractor', - * 'Hierarchical Entity Extractor', 'Hierarchical Child Entity Extractor', - * 'Composite Entity Extractor', 'Closed List Entity Extractor', 'Prebuilt - * Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', - * 'Regex Entity Extractor' - */ +*/ export interface ModelInfo { + /** + * The ID of the Entity Model. + */ id: string; + /** + * Name of the Entity Model. + */ name?: string; + /** + * The type ID of the Entity Model. + */ typeId?: number; + /** + * Possible values include: 'Entity Extractor', 'Hierarchical Entity Extractor', 'Hierarchical + * Child Entity Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', + * 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', 'Regex + * Entity Extractor' + */ readableType: string; } /** - * @class - * Initializes a new instance of the EntityRole class. - * @constructor * Entity extractor role - * - * @member {uuid} [id] The entity role ID. - * @member {string} [name] The entity role name. - */ +*/ export interface EntityRole { + /** + * The entity role ID. + */ id?: string; + /** + * The entity role name. + */ name?: string; } /** - * @class - * Initializes a new instance of the ChildEntity class. - * @constructor * The base child entity type. - * - * @member {uuid} id The ID (GUID) belonging to a child entity. - * @member {string} [name] The name of a child entity. - */ +*/ export interface ChildEntity { + /** + * The ID (GUID) belonging to a child entity. + */ id: string; + /** + * The name of a child entity. + */ name?: string; } /** - * @class - * Initializes a new instance of the ExplicitListItem class. - * @constructor * Explicit list item - * - * @member {number} [id] The explicit list item ID. - * @member {string} [explicitListItem] The explicit list item value. - */ +*/ export interface ExplicitListItem { + /** + * The explicit list item ID. + */ id?: number; + /** + * The explicit list item value. + */ explicitListItem?: string; } /** - * @class - * Initializes a new instance of the ModelInfoResponse class. - * @constructor * An application model info. - * - * @member {uuid} id The ID of the Entity Model. - * @member {string} [name] Name of the Entity Model. - * @member {number} [typeId] The type ID of the Entity Model. - * @member {string} readableType Possible values include: 'Entity Extractor', - * 'Hierarchical Entity Extractor', 'Hierarchical Child Entity Extractor', - * 'Composite Entity Extractor', 'Closed List Entity Extractor', 'Prebuilt - * Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', - * 'Regex Entity Extractor' - * @member {array} [roles] - * @member {array} [children] List of child entities. - * @member {array} [subLists] List of sub-lists. - * @member {string} [customPrebuiltDomainName] The domain name. - * @member {string} [customPrebuiltModelName] The intent name or entity name. - * @member {string} [regexPattern] The Regex entity pattern. - * @member {array} [explicitList] - */ +*/ export interface ModelInfoResponse { + /** + * The ID of the Entity Model. + */ id: string; + /** + * Name of the Entity Model. + */ name?: string; + /** + * The type ID of the Entity Model. + */ typeId?: number; + /** + * Possible values include: 'Entity Extractor', 'Hierarchical Entity Extractor', 'Hierarchical + * Child Entity Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', + * 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', 'Regex + * Entity Extractor' + */ readableType: string; roles?: EntityRole[]; + /** + * List of child entities. + */ children?: ChildEntity[]; + /** + * List of sub-lists. + */ subLists?: SubClosedListResponse[]; + /** + * The domain name. + */ customPrebuiltDomainName?: string; + /** + * The intent name or entity name. + */ customPrebuiltModelName?: string; + /** + * The Regex entity pattern. + */ regexPattern?: string; explicitList?: ExplicitListItem[]; } /** - * @class - * Initializes a new instance of the EntityModelInfo class. - * @constructor * An Entity Extractor model info. - * - * @member {array} [roles] - */ +*/ export interface EntityModelInfo extends ModelInfo { roles?: EntityRole[]; } /** - * @class - * Initializes a new instance of the HierarchicalEntityExtractor class. - * @constructor * Hierarchical Entity Extractor. - * - * @member {uuid} id The ID of the Entity Model. - * @member {string} [name] Name of the Entity Model. - * @member {number} [typeId] The type ID of the Entity Model. - * @member {string} readableType Possible values include: 'Entity Extractor', - * 'Hierarchical Entity Extractor', 'Hierarchical Child Entity Extractor', - * 'Composite Entity Extractor', 'Closed List Entity Extractor', 'Prebuilt - * Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', - * 'Regex Entity Extractor' - * @member {array} [roles] - * @member {array} [children] List of child entities. - */ +*/ export interface HierarchicalEntityExtractor { + /** + * The ID of the Entity Model. + */ id: string; + /** + * Name of the Entity Model. + */ name?: string; + /** + * The type ID of the Entity Model. + */ typeId?: number; + /** + * Possible values include: 'Entity Extractor', 'Hierarchical Entity Extractor', 'Hierarchical + * Child Entity Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', + * 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', 'Regex + * Entity Extractor' + */ readableType: string; roles?: EntityRole[]; + /** + * List of child entities. + */ children?: ChildEntity[]; } /** - * @class - * Initializes a new instance of the CompositeEntityExtractor class. - * @constructor * A Composite Entity Extractor. - * - * @member {uuid} id The ID of the Entity Model. - * @member {string} [name] Name of the Entity Model. - * @member {number} [typeId] The type ID of the Entity Model. - * @member {string} readableType Possible values include: 'Entity Extractor', - * 'Hierarchical Entity Extractor', 'Hierarchical Child Entity Extractor', - * 'Composite Entity Extractor', 'Closed List Entity Extractor', 'Prebuilt - * Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', - * 'Regex Entity Extractor' - * @member {array} [roles] - * @member {array} [children] List of child entities. - */ +*/ export interface CompositeEntityExtractor { + /** + * The ID of the Entity Model. + */ id: string; + /** + * Name of the Entity Model. + */ name?: string; + /** + * The type ID of the Entity Model. + */ typeId?: number; + /** + * Possible values include: 'Entity Extractor', 'Hierarchical Entity Extractor', 'Hierarchical + * Child Entity Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', + * 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', 'Regex + * Entity Extractor' + */ readableType: string; roles?: EntityRole[]; + /** + * List of child entities. + */ children?: ChildEntity[]; } /** - * @class - * Initializes a new instance of the ClosedListEntityExtractor class. - * @constructor * Closed List Entity Extractor. - * - * @member {uuid} id The ID of the Entity Model. - * @member {string} [name] Name of the Entity Model. - * @member {number} [typeId] The type ID of the Entity Model. - * @member {string} readableType Possible values include: 'Entity Extractor', - * 'Hierarchical Entity Extractor', 'Hierarchical Child Entity Extractor', - * 'Composite Entity Extractor', 'Closed List Entity Extractor', 'Prebuilt - * Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', - * 'Regex Entity Extractor' - * @member {array} [roles] - * @member {array} [subLists] List of sub-lists. - */ +*/ export interface ClosedListEntityExtractor { + /** + * The ID of the Entity Model. + */ id: string; + /** + * Name of the Entity Model. + */ name?: string; + /** + * The type ID of the Entity Model. + */ typeId?: number; + /** + * Possible values include: 'Entity Extractor', 'Hierarchical Entity Extractor', 'Hierarchical + * Child Entity Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', + * 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', 'Regex + * Entity Extractor' + */ readableType: string; roles?: EntityRole[]; + /** + * List of sub-lists. + */ subLists?: SubClosedListResponse[]; } /** - * @class - * Initializes a new instance of the PrebuiltEntityExtractor class. - * @constructor * Prebuilt Entity Extractor. - * - * @member {uuid} id The ID of the Entity Model. - * @member {string} [name] Name of the Entity Model. - * @member {number} [typeId] The type ID of the Entity Model. - * @member {string} readableType Possible values include: 'Entity Extractor', - * 'Hierarchical Entity Extractor', 'Hierarchical Child Entity Extractor', - * 'Composite Entity Extractor', 'Closed List Entity Extractor', 'Prebuilt - * Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', - * 'Regex Entity Extractor' - * @member {array} [roles] - */ +*/ export interface PrebuiltEntityExtractor { + /** + * The ID of the Entity Model. + */ id: string; + /** + * Name of the Entity Model. + */ name?: string; + /** + * The type ID of the Entity Model. + */ typeId?: number; + /** + * Possible values include: 'Entity Extractor', 'Hierarchical Entity Extractor', 'Hierarchical + * Child Entity Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', + * 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', 'Regex + * Entity Extractor' + */ readableType: string; roles?: EntityRole[]; } /** - * @class - * Initializes a new instance of the HierarchicalChildEntity class. - * @constructor * A Hierarchical Child Entity. - * - * @member {number} [typeId] The type ID of the Entity Model. - * @member {string} [readableType] Possible values include: 'Entity Extractor', - * 'Hierarchical Entity Extractor', 'Hierarchical Child Entity Extractor', - * 'Composite Entity Extractor', 'Closed List Entity Extractor', 'Prebuilt - * Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', - * 'Regex Entity Extractor' - */ +*/ export interface HierarchicalChildEntity extends ChildEntity { + /** + * The type ID of the Entity Model. + */ typeId?: number; + /** + * Possible values include: 'Entity Extractor', 'Hierarchical Entity Extractor', 'Hierarchical + * Child Entity Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', + * 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', 'Regex + * Entity Extractor' + */ readableType?: string; } /** - * @class - * Initializes a new instance of the CustomPrebuiltModel class. - * @constructor * A Custom Prebuilt model. - * - * @member {uuid} id The ID of the Entity Model. - * @member {string} [name] Name of the Entity Model. - * @member {number} [typeId] The type ID of the Entity Model. - * @member {string} readableType Possible values include: 'Entity Extractor', - * 'Hierarchical Entity Extractor', 'Hierarchical Child Entity Extractor', - * 'Composite Entity Extractor', 'Closed List Entity Extractor', 'Prebuilt - * Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', - * 'Regex Entity Extractor' - * @member {string} [customPrebuiltDomainName] The domain name. - * @member {string} [customPrebuiltModelName] The intent name or entity name. - * @member {array} [roles] - */ +*/ export interface CustomPrebuiltModel { + /** + * The ID of the Entity Model. + */ id: string; + /** + * Name of the Entity Model. + */ name?: string; + /** + * The type ID of the Entity Model. + */ typeId?: number; + /** + * Possible values include: 'Entity Extractor', 'Hierarchical Entity Extractor', 'Hierarchical + * Child Entity Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', + * 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', 'Regex + * Entity Extractor' + */ readableType: string; + /** + * The domain name. + */ customPrebuiltDomainName?: string; + /** + * The intent name or entity name. + */ customPrebuiltModelName?: string; roles?: EntityRole[]; } /** - * @class - * Initializes a new instance of the IntentClassifier class. - * @constructor * Intent Classifier. - * - * @member {string} [customPrebuiltDomainName] The domain name. - * @member {string} [customPrebuiltModelName] The intent name or entity name. - */ +*/ export interface IntentClassifier extends ModelInfo { + /** + * The domain name. + */ customPrebuiltDomainName?: string; + /** + * The intent name or entity name. + */ customPrebuiltModelName?: string; } /** - * @class - * Initializes a new instance of the EntityExtractor class. - * @constructor * Entity Extractor. - * - * @member {uuid} id The ID of the Entity Model. - * @member {string} [name] Name of the Entity Model. - * @member {number} [typeId] The type ID of the Entity Model. - * @member {string} readableType Possible values include: 'Entity Extractor', - * 'Hierarchical Entity Extractor', 'Hierarchical Child Entity Extractor', - * 'Composite Entity Extractor', 'Closed List Entity Extractor', 'Prebuilt - * Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', - * 'Regex Entity Extractor' - * @member {array} [roles] - * @member {string} [customPrebuiltDomainName] The domain name. - * @member {string} [customPrebuiltModelName] The intent name or entity name. - */ +*/ export interface EntityExtractor { + /** + * The ID of the Entity Model. + */ id: string; + /** + * Name of the Entity Model. + */ name?: string; + /** + * The type ID of the Entity Model. + */ typeId?: number; + /** + * Possible values include: 'Entity Extractor', 'Hierarchical Entity Extractor', 'Hierarchical + * Child Entity Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', + * 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', 'Regex + * Entity Extractor' + */ readableType: string; roles?: EntityRole[]; + /** + * The domain name. + */ customPrebuiltDomainName?: string; + /** + * The intent name or entity name. + */ customPrebuiltModelName?: string; } /** - * @class - * Initializes a new instance of the FeatureInfoObject class. - * @constructor * The base class Features-related response objects inherit from. - * - * @member {number} [id] A six-digit ID used for Features. - * @member {string} [name] The name of the Feature. - * @member {boolean} [isActive] Indicates if the feature is enabled. - */ +*/ export interface FeatureInfoObject { + /** + * A six-digit ID used for Features. + */ id?: number; + /** + * The name of the Feature. + */ name?: string; + /** + * Indicates if the feature is enabled. + */ isActive?: boolean; } /** - * @class - * Initializes a new instance of the PhraseListFeatureInfo class. - * @constructor * Phraselist Feature. - * - * @member {string} [phrases] A list of comma-separated values. - * @member {boolean} [isExchangeable] An exchangeable phrase list feature are - * serves as single feature to the LUIS underlying training algorithm. It is - * used as a lexicon lookup feature where its value is 1 if the lexicon - * contains a given word or 0 if it doesn’t. Think of an exchangeable as a - * synonyms list. A non-exchangeable phrase list feature has all the phrases in - * the list serve as separate features to the underlying training algorithm. - * So, if you your phrase list feature contains 5 phrases, they will be mapped - * to 5 separate features. You can think of the non-exchangeable phrase list - * feature as an additional bag of words that you are willing to add to LUIS - * existing vocabulary features. Think of a non-exchangeable as set of - * different words. Default value is true. - */ +*/ export interface PhraseListFeatureInfo extends FeatureInfoObject { + /** + * A list of comma-separated values. + */ phrases?: string; + /** + * An exchangeable phrase list feature are serves as single feature to the LUIS underlying + * training algorithm. It is used as a lexicon lookup feature where its value is 1 if the lexicon + * contains a given word or 0 if it doesn’t. Think of an exchangeable as a synonyms list. A + * non-exchangeable phrase list feature has all the phrases in the list serve as separate + * features to the underlying training algorithm. So, if you your phrase list feature contains 5 + * phrases, they will be mapped to 5 separate features. You can think of the non-exchangeable + * phrase list feature as an additional bag of words that you are willing to add to LUIS existing + * vocabulary features. Think of a non-exchangeable as set of different words. Default value is + * true. + */ isExchangeable?: boolean; } /** - * @class - * Initializes a new instance of the PatternFeatureInfo class. - * @constructor * Pattern feature. - * - * @member {string} [pattern] The Regular Expression to match. - */ +*/ export interface PatternFeatureInfo extends FeatureInfoObject { + /** + * The Regular Expression to match. + */ pattern?: string; } /** - * @class - * Initializes a new instance of the FeaturesResponseObject class. - * @constructor * Model Features, including Patterns and Phraselists. - * - * @member {array} [phraselistFeatures] - * @member {array} [patternFeatures] - */ +*/ export interface FeaturesResponseObject { phraselistFeatures?: PhraseListFeatureInfo[]; patternFeatures?: PatternFeatureInfo[]; } /** - * @class - * Initializes a new instance of the LabelExampleResponse class. - * @constructor * Response when adding a labeled example. - * - * @member {string} [utteranceText] The sample's utterance. - * @member {number} [exampleId] The newly created sample ID. - */ +*/ export interface LabelExampleResponse { + /** + * The sample's utterance. + */ utteranceText?: string; + /** + * The newly created sample ID. + */ exampleId?: number; } /** - * @class - * Initializes a new instance of the OperationStatus class. - * @constructor * Response of an Operation status. - * - * @member {string} [code] Status Code. Possible values include: 'Failed', - * 'FAILED', 'Success' - * @member {string} [message] Status details. - */ +*/ export interface OperationStatus { + /** + * Status Code. Possible values include: 'Failed', 'FAILED', 'Success' + */ code?: string; + /** + * Status details. + */ message?: string; } /** - * @class - * Initializes a new instance of the BatchLabelExample class. - * @constructor * Response when adding a batch of labeled examples. - * - * @member {object} [value] - * @member {string} [value.utteranceText] The sample's utterance. - * @member {number} [value.exampleId] The newly created sample ID. - * @member {boolean} [hasError] - * @member {object} [error] - * @member {string} [error.code] Status Code. Possible values include: - * 'Failed', 'FAILED', 'Success' - * @member {string} [error.message] Status details. - */ +*/ export interface BatchLabelExample { value?: LabelExampleResponse; hasError?: boolean; @@ -1245,273 +1257,257 @@ export interface BatchLabelExample { } /** - * @class - * Initializes a new instance of the ApplicationInfoResponse class. - * @constructor * Response containing the Application Info. - * - * @member {uuid} [id] The ID (GUID) of the application. - * @member {string} [name] The name of the application. - * @member {string} [description] The description of the application. - * @member {string} [culture] The culture of the application. E.g.: en-us. - * @member {string} [usageScenario] Defines the scenario for the new - * application. Optional. E.g.: IoT. - * @member {string} [domain] The domain for the new application. Optional. - * E.g.: Comics. - * @member {number} [versionsCount] Amount of model versions within the - * application. - * @member {string} [createdDateTime] The version's creation timestamp. - * @member {object} [endpoints] The Runtime endpoint URL for this model - * version. - * @member {number} [endpointHitsCount] Number of calls made to this endpoint. - * @member {string} [activeVersion] The version ID currently marked as active. - */ +*/ export interface ApplicationInfoResponse { + /** + * The ID (GUID) of the application. + */ id?: string; + /** + * The name of the application. + */ name?: string; + /** + * The description of the application. + */ description?: string; + /** + * The culture of the application. E.g.: en-us. + */ culture?: string; + /** + * Defines the scenario for the new application. Optional. E.g.: IoT. + */ usageScenario?: string; + /** + * The domain for the new application. Optional. E.g.: Comics. + */ domain?: string; + /** + * Amount of model versions within the application. + */ versionsCount?: number; + /** + * The version's creation timestamp. + */ createdDateTime?: string; + /** + * The Runtime endpoint URL for this model version. + */ endpoints?: any; + /** + * Number of calls made to this endpoint. + */ endpointHitsCount?: number; + /** + * The version ID currently marked as active. + */ activeVersion?: string; } /** - * @class - * Initializes a new instance of the EndpointInfo class. - * @constructor * The base class "ProductionOrStagingEndpointInfo" inherits from. - * - * @member {string} [versionId] The version ID to publish. - * @member {boolean} [isStaging] Indicates if the staging slot should be used, - * instead of the Production one. - * @member {string} [endpointUrl] The Runtime endpoint URL for this model - * version. - * @member {string} [region] The target region that the application is - * published to. - * @member {string} [assignedEndpointKey] The endpoint key. - * @member {string} [endpointRegion] The endpoint's region. - * @member {string} [publishedDateTime] Timestamp when was last published. - */ +*/ export interface EndpointInfo { + /** + * The version ID to publish. + */ versionId?: string; + /** + * Indicates if the staging slot should be used, instead of the Production one. + */ isStaging?: boolean; + /** + * The Runtime endpoint URL for this model version. + */ endpointUrl?: string; + /** + * The target region that the application is published to. + */ region?: string; + /** + * The endpoint key. + */ assignedEndpointKey?: string; + /** + * The endpoint's region. + */ endpointRegion?: string; + /** + * Timestamp when was last published. + */ publishedDateTime?: string; } -/** - * @class - * Initializes a new instance of the ProductionOrStagingEndpointInfo class. - * @constructor - */ export interface ProductionOrStagingEndpointInfo extends EndpointInfo { } /** - * @class - * Initializes a new instance of the AvailableCulture class. - * @constructor * Available culture for using in a new application. - * - * @member {string} [name] The language name. - * @member {string} [code] The ISO value for the language. - */ +*/ export interface AvailableCulture { + /** + * The language name. + */ name?: string; + /** + * The ISO value for the language. + */ code?: string; } /** - * @class - * Initializes a new instance of the ApplicationSettings class. - * @constructor * The application settings. - * - * @member {uuid} id The application ID. - * @member {boolean} isPublic Setting your application as public allows other - * people to use your application's endpoint using their own keys. - */ +*/ export interface ApplicationSettings { + /** + * The application ID. + */ id: string; + /** + * Setting your application as public allows other people to use your application's endpoint + * using their own keys. + */ isPublic: boolean; } /** - * @class - * Initializes a new instance of the PublishSettings class. - * @constructor * The application publish settings. - * - * @member {uuid} id The application ID. - * @member {boolean} isSentimentAnalysisEnabled Setting sentiment analysis as - * true returns the Sentiment of the input utterance along with the resopnse - * @member {boolean} isSpeechEnabled Setting speech as public enables speech - * priming in your app - * @member {boolean} isSpellCheckerEnabled Setting spell checker as public - * enables spell checking the input utterance. - */ +*/ export interface PublishSettings { + /** + * The application ID. + */ id: string; + /** + * Setting sentiment analysis as true returns the Sentiment of the input utterance along with the + * resopnse + */ isSentimentAnalysisEnabled: boolean; + /** + * Setting speech as public enables speech priming in your app + */ isSpeechEnabled: boolean; + /** + * Setting spell checker as public enables spell checking the input utterance. + */ isSpellCheckerEnabled: boolean; } /** - * @class - * Initializes a new instance of the AvailablePrebuiltEntityModel class. - * @constructor * Available Prebuilt entity model for using in an application. - * - * @member {string} [name] The entity name. - * @member {string} [description] The entity description and usage information. - * @member {string} [examples] Usage examples. - */ +*/ export interface AvailablePrebuiltEntityModel { + /** + * The entity name. + */ name?: string; + /** + * The entity description and usage information. + */ description?: string; + /** + * Usage examples. + */ examples?: string; } /** - * @class - * Initializes a new instance of the EnqueueTrainingResponse class. - * @constructor * Response model when requesting to train the model. - * - * @member {number} [statusId] The train request status ID. - * @member {string} [status] Possible values include: 'Queued', 'InProgress', - * 'UpToDate', 'Fail', 'Success' - */ +*/ export interface EnqueueTrainingResponse { + /** + * The train request status ID. + */ statusId?: number; + /** + * Possible values include: 'Queued', 'InProgress', 'UpToDate', 'Fail', 'Success' + */ status?: string; } /** - * @class - * Initializes a new instance of the ModelTrainingDetails class. - * @constructor * Model Training Details. - * - * @member {number} [statusId] The train request status ID. - * @member {string} [status] Possible values include: 'Queued', 'InProgress', - * 'UpToDate', 'Fail', 'Success' - * @member {number} [exampleCount] The count of examples used to train the - * model. - * @member {date} [trainingDateTime] When the model was trained. - * @member {string} [failureReason] Reason for the training failure. - */ +*/ export interface ModelTrainingDetails { + /** + * The train request status ID. + */ statusId?: number; + /** + * Possible values include: 'Queued', 'InProgress', 'UpToDate', 'Fail', 'Success' + */ status?: string; + /** + * The count of examples used to train the model. + */ exampleCount?: number; + /** + * When the model was trained. + */ trainingDateTime?: Date; + /** + * Reason for the training failure. + */ failureReason?: string; } /** - * @class - * Initializes a new instance of the ModelTrainingInfo class. - * @constructor * Model Training Info. - * - * @member {uuid} [modelId] The ID (GUID) of the model. - * @member {object} [details] - * @member {number} [details.statusId] The train request status ID. - * @member {string} [details.status] Possible values include: 'Queued', - * 'InProgress', 'UpToDate', 'Fail', 'Success' - * @member {number} [details.exampleCount] The count of examples used to train - * the model. - * @member {date} [details.trainingDateTime] When the model was trained. - * @member {string} [details.failureReason] Reason for the training failure. - */ +*/ export interface ModelTrainingInfo { + /** + * The ID (GUID) of the model. + */ modelId?: string; details?: ModelTrainingDetails; } /** - * @class - * Initializes a new instance of the UserAccessList class. - * @constructor * List of user permissions. - * - * @member {string} [owner] The email address of owner of the application. - * @member {array} [emails] - */ +*/ export interface UserAccessList { + /** + * The email address of owner of the application. + */ owner?: string; emails?: string[]; } -/** - * @class - * Initializes a new instance of the UserCollaborator class. - * @constructor - * @member {string} [email] The email address of the user. - */ export interface UserCollaborator { + /** + * The email address of the user. + */ email?: string; } -/** - * @class - * Initializes a new instance of the CollaboratorsArray class. - * @constructor - * @member {array} [emails] The email address of the users. - */ export interface CollaboratorsArray { + /** + * The email address of the users. + */ emails?: string[]; } /** - * @class - * Initializes a new instance of the ErrorResponse class. - * @constructor * Error response when invoking an operation on the API. - * - * @member {string} [errorType] - */ +*/ export interface ErrorResponse { errorType?: string; /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. - */ - [property: string]: any; + * Describes unknown properties. The value of an unknown property can be of "any" type. + */ + [additionalPropertyName: string]: any; } /** - * @class - * Initializes a new instance of the OperationError class. - * @constructor * Operation error details when invoking an operation on the API. - * - * @member {string} [code] - * @member {string} [message] - */ +*/ export interface OperationError { code?: string; message?: string; } -/** - * @class - * Initializes a new instance of the PrebuiltDomainItem class. - * @constructor - * @member {string} [name] - * @member {string} [description] - * @member {string} [examples] - */ export interface PrebuiltDomainItem { name?: string; description?: string; @@ -1519,18 +1515,8 @@ export interface PrebuiltDomainItem { } /** - * @class - * Initializes a new instance of the PrebuiltDomain class. - * @constructor * Prebuilt Domain. - * - * @member {string} [name] - * @member {string} [culture] - * @member {string} [description] - * @member {string} [examples] - * @member {array} [intents] - * @member {array} [entities] - */ +*/ export interface PrebuiltDomain { name?: string; culture?: string; @@ -1541,247 +1527,244 @@ export interface PrebuiltDomain { } /** - * @class - * Initializes a new instance of the EntityRoleCreateObject class. - * @constructor * Object model for creating an entity role. - * - * @member {string} [name] The entity role name. - */ +*/ export interface EntityRoleCreateObject { + /** + * The entity role name. + */ name?: string; } /** - * @class - * Initializes a new instance of the RegexModelCreateObject class. - * @constructor * Model object for creating a regex entity model. - * - * @member {string} [regexPattern] The regex entity pattern. - * @member {string} [name] The model name. - */ +*/ export interface RegexModelCreateObject { + /** + * The regex entity pattern. + */ regexPattern?: string; + /** + * The model name. + */ name?: string; } /** - * @class - * Initializes a new instance of the PatternAnyModelCreateObject class. - * @constructor * Model object for creating a Pattern.Any entity model. - * - * @member {string} [name] The model name. - * @member {array} [explicitList] The Pattern.Any explicit list. - */ +*/ export interface PatternAnyModelCreateObject { + /** + * The model name. + */ name?: string; + /** + * The Pattern.Any explicit list. + */ explicitList?: string[]; } /** - * @class - * Initializes a new instance of the ExplicitListItemCreateObject class. - * @constructor * Object model for creating an explicit list item. - * - * @member {string} [explicitListItem] The explicit list item. - */ +*/ export interface ExplicitListItemCreateObject { + /** + * The explicit list item. + */ explicitListItem?: string; } /** - * @class - * Initializes a new instance of the RegexModelUpdateObject class. - * @constructor * Model object for updating a regex entity model. - * - * @member {string} [regexPattern] The regex entity pattern. - * @member {string} [name] The model name. - */ +*/ export interface RegexModelUpdateObject { + /** + * The regex entity pattern. + */ regexPattern?: string; + /** + * The model name. + */ name?: string; } /** - * @class - * Initializes a new instance of the PatternAnyModelUpdateObject class. - * @constructor * Model object for updating a Pattern.Any entity model. - * - * @member {string} [name] The model name. - * @member {array} [explicitList] The Pattern.Any explicit list. - */ +*/ export interface PatternAnyModelUpdateObject { + /** + * The model name. + */ name?: string; + /** + * The Pattern.Any explicit list. + */ explicitList?: string[]; } /** - * @class - * Initializes a new instance of the EntityRoleUpdateObject class. - * @constructor * Object model for updating an entity role. - * - * @member {string} [name] The entity role name. - */ +*/ export interface EntityRoleUpdateObject { + /** + * The entity role name. + */ name?: string; } /** - * @class - * Initializes a new instance of the ExplicitListItemUpdateObject class. - * @constructor * Model object for updating an explicit list item. - * - * @member {string} [explicitListItem] The explicit list item. - */ +*/ export interface ExplicitListItemUpdateObject { + /** + * The explicit list item. + */ explicitListItem?: string; } /** - * @class - * Initializes a new instance of the PatternRuleCreateObject class. - * @constructor * Object model for creating a pattern - * - * @member {string} [pattern] The pattern text. - * @member {string} [intent] The intent's name which the pattern belongs to. - */ +*/ export interface PatternRuleCreateObject { + /** + * The pattern text. + */ pattern?: string; + /** + * The intent's name which the pattern belongs to. + */ intent?: string; } /** - * @class - * Initializes a new instance of the PatternRuleUpdateObject class. - * @constructor * Object model for updating a pattern. - * - * @member {uuid} [id] The pattern ID. - * @member {string} [pattern] The pattern text. - * @member {string} [intent] The intent's name which the pattern belongs to. - */ +*/ export interface PatternRuleUpdateObject { + /** + * The pattern ID. + */ id?: string; + /** + * The pattern text. + */ pattern?: string; + /** + * The intent's name which the pattern belongs to. + */ intent?: string; } /** - * @class - * Initializes a new instance of the RegexEntityExtractor class. - * @constructor * Regex Entity Extractor. - * - * @member {uuid} id The ID of the Entity Model. - * @member {string} [name] Name of the Entity Model. - * @member {number} [typeId] The type ID of the Entity Model. - * @member {string} readableType Possible values include: 'Entity Extractor', - * 'Hierarchical Entity Extractor', 'Hierarchical Child Entity Extractor', - * 'Composite Entity Extractor', 'Closed List Entity Extractor', 'Prebuilt - * Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', - * 'Regex Entity Extractor' - * @member {array} [roles] - * @member {string} [regexPattern] The Regex entity pattern. - */ +*/ export interface RegexEntityExtractor { + /** + * The ID of the Entity Model. + */ id: string; + /** + * Name of the Entity Model. + */ name?: string; + /** + * The type ID of the Entity Model. + */ typeId?: number; + /** + * Possible values include: 'Entity Extractor', 'Hierarchical Entity Extractor', 'Hierarchical + * Child Entity Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', + * 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', 'Regex + * Entity Extractor' + */ readableType: string; roles?: EntityRole[]; + /** + * The Regex entity pattern. + */ regexPattern?: string; } /** - * @class - * Initializes a new instance of the PatternAnyEntityExtractor class. - * @constructor * Pattern.Any Entity Extractor. - * - * @member {uuid} id The ID of the Entity Model. - * @member {string} [name] Name of the Entity Model. - * @member {number} [typeId] The type ID of the Entity Model. - * @member {string} readableType Possible values include: 'Entity Extractor', - * 'Hierarchical Entity Extractor', 'Hierarchical Child Entity Extractor', - * 'Composite Entity Extractor', 'Closed List Entity Extractor', 'Prebuilt - * Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', - * 'Regex Entity Extractor' - * @member {array} [roles] - * @member {array} [explicitList] - */ +*/ export interface PatternAnyEntityExtractor { + /** + * The ID of the Entity Model. + */ id: string; + /** + * Name of the Entity Model. + */ name?: string; + /** + * The type ID of the Entity Model. + */ typeId?: number; + /** + * Possible values include: 'Entity Extractor', 'Hierarchical Entity Extractor', 'Hierarchical + * Child Entity Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', + * 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', 'Regex + * Entity Extractor' + */ readableType: string; roles?: EntityRole[]; explicitList?: ExplicitListItem[]; } /** - * @class - * Initializes a new instance of the PatternRuleInfo class. - * @constructor * Pattern rule - * - * @member {uuid} [id] The pattern ID. - * @member {string} [pattern] The pattern text. - * @member {string} [intent] The intent's name where the pattern belongs to. - */ +*/ export interface PatternRuleInfo { + /** + * The pattern ID. + */ id?: string; + /** + * The pattern text. + */ pattern?: string; + /** + * The intent's name where the pattern belongs to. + */ intent?: string; } /** - * @class - * Initializes a new instance of the LabelTextObject class. - * @constructor * An object containing the example's text. - * - * @member {number} [id] The ID of the Label. - * @member {string} [text] The text of the label. - */ +*/ export interface LabelTextObject { + /** + * The ID of the Label. + */ id?: number; + /** + * The text of the label. + */ text?: string; } /** - * @class - * Initializes a new instance of the HierarchicalChildModelUpdateObject class. - * @constructor - * @member {string} [name] - */ + * Object model of an application version setting. +*/ +export interface AppVersionSettingObject { + /** + * The application version setting name. + */ + name?: string; + /** + * The application version setting value. + */ + value?: string; +} + export interface HierarchicalChildModelUpdateObject { name?: string; } -/** - * @class - * Initializes a new instance of the HierarchicalChildModelCreateObject class. - * @constructor - * @member {string} [name] - */ export interface HierarchicalChildModelCreateObject { name?: string; } -/** - * @class - * Initializes a new instance of the CompositeChildModelCreateObject class. - * @constructor - * @member {string} [name] - */ export interface CompositeChildModelCreateObject { name?: string; } diff --git a/lib/services/luis/authoring/lib/models/index.js b/lib/services/luis/authoring/lib/models/index.js index ea15399868..2063beae51 100644 --- a/lib/services/luis/authoring/lib/models/index.js +++ b/lib/services/luis/authoring/lib/models/index.js @@ -112,6 +112,7 @@ exports.RegexEntityExtractor = require('./regexEntityExtractor'); exports.PatternAnyEntityExtractor = require('./patternAnyEntityExtractor'); exports.PatternRuleInfo = require('./patternRuleInfo'); exports.LabelTextObject = require('./labelTextObject'); +exports.AppVersionSettingObject = require('./appVersionSettingObject'); exports.HierarchicalChildModelUpdateObject = require('./hierarchicalChildModelUpdateObject'); exports.HierarchicalChildModelCreateObject = require('./hierarchicalChildModelCreateObject'); exports.CompositeChildModelCreateObject = require('./compositeChildModelCreateObject'); diff --git a/lib/services/luis/authoring/lib/models/intentClassifier.js b/lib/services/luis/authoring/lib/models/intentClassifier.js index 2e80d54c27..6c7b2363ed 100644 --- a/lib/services/luis/authoring/lib/models/intentClassifier.js +++ b/lib/services/luis/authoring/lib/models/intentClassifier.js @@ -20,8 +20,9 @@ const models = require('./index'); class IntentClassifier extends models['ModelInfo'] { /** * Create a IntentClassifier. - * @member {string} [customPrebuiltDomainName] The domain name. - * @member {string} [customPrebuiltModelName] The intent name or entity name. + * @property {string} [customPrebuiltDomainName] The domain name. + * @property {string} [customPrebuiltModelName] The intent name or entity + * name. */ constructor() { super(); diff --git a/lib/services/luis/authoring/lib/models/intentPrediction.js b/lib/services/luis/authoring/lib/models/intentPrediction.js index f78c55b92c..b61e2ea0b9 100644 --- a/lib/services/luis/authoring/lib/models/intentPrediction.js +++ b/lib/services/luis/authoring/lib/models/intentPrediction.js @@ -17,8 +17,8 @@ class IntentPrediction { /** * Create a IntentPrediction. - * @member {string} [name] The intent's name - * @member {number} [score] The intent's score, based on the prediction + * @property {string} [name] The intent's name + * @property {number} [score] The intent's score, based on the prediction * model. */ constructor() { diff --git a/lib/services/luis/authoring/lib/models/intentsSuggestionExample.js b/lib/services/luis/authoring/lib/models/intentsSuggestionExample.js index f3e9680d86..f656540e27 100644 --- a/lib/services/luis/authoring/lib/models/intentsSuggestionExample.js +++ b/lib/services/luis/authoring/lib/models/intentsSuggestionExample.js @@ -17,11 +17,11 @@ class IntentsSuggestionExample { /** * Create a IntentsSuggestionExample. - * @member {string} [text] The utterance. E.g.: what's the weather like in + * @property {string} [text] The utterance. E.g.: what's the weather like in * seattle? - * @member {array} [tokenizedText] The utterance tokenized. - * @member {array} [intentPredictions] Predicted/suggested intents. - * @member {array} [entityPredictions] Predicted/suggested entities. + * @property {array} [tokenizedText] The utterance tokenized. + * @property {array} [intentPredictions] Predicted/suggested intents. + * @property {array} [entityPredictions] Predicted/suggested entities. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/jSONEntity.js b/lib/services/luis/authoring/lib/models/jSONEntity.js index 58685602f1..5ddede4377 100644 --- a/lib/services/luis/authoring/lib/models/jSONEntity.js +++ b/lib/services/luis/authoring/lib/models/jSONEntity.js @@ -17,11 +17,11 @@ class JSONEntity { /** * Create a JSONEntity. - * @member {number} startPos The index within the utterance where the + * @property {number} startPos The index within the utterance where the * extracted entity starts. - * @member {number} endPos The index within the utterance where the extracted - * entity ends. - * @member {string} entity The entity name. + * @property {number} endPos The index within the utterance where the + * extracted entity ends. + * @property {string} entity The entity name. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/jSONModelFeature.js b/lib/services/luis/authoring/lib/models/jSONModelFeature.js index 6d239a7977..c31e65aecd 100644 --- a/lib/services/luis/authoring/lib/models/jSONModelFeature.js +++ b/lib/services/luis/authoring/lib/models/jSONModelFeature.js @@ -17,13 +17,13 @@ class JSONModelFeature { /** * Create a JSONModelFeature. - * @member {boolean} [activated] Indicates if the feature is enabled. - * @member {string} [name] The Phraselist name. - * @member {string} [words] List of comma-separated phrases that represent + * @property {boolean} [activated] Indicates if the feature is enabled. + * @property {string} [name] The Phraselist name. + * @property {string} [words] List of comma-separated phrases that represent * the Phraselist. - * @member {boolean} [mode] An exchangeable phrase list feature are serves as - * single feature to the LUIS underlying training algorithm. It is used as a - * lexicon lookup feature where its value is 1 if the lexicon contains a + * @property {boolean} [mode] An exchangeable phrase list feature are serves + * as single feature to the LUIS underlying training algorithm. It is used as + * a lexicon lookup feature where its value is 1 if the lexicon contains a * given word or 0 if it doesn’t. Think of an exchangeable as a synonyms * list. A non-exchangeable phrase list feature has all the phrases in the * list serve as separate features to the underlying training algorithm. So, diff --git a/lib/services/luis/authoring/lib/models/jSONRegexFeature.js b/lib/services/luis/authoring/lib/models/jSONRegexFeature.js index abe470edbd..f067aa2a8f 100644 --- a/lib/services/luis/authoring/lib/models/jSONRegexFeature.js +++ b/lib/services/luis/authoring/lib/models/jSONRegexFeature.js @@ -17,9 +17,10 @@ class JSONRegexFeature { /** * Create a JSONRegexFeature. - * @member {string} [pattern] The Regular Expression to match. - * @member {boolean} [activated] Indicates if the Pattern feature is enabled. - * @member {string} [name] Name of the feature. + * @property {string} [pattern] The Regular Expression to match. + * @property {boolean} [activated] Indicates if the Pattern feature is + * enabled. + * @property {string} [name] Name of the feature. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/jSONUtterance.js b/lib/services/luis/authoring/lib/models/jSONUtterance.js index e9cbc3c64f..bad61af840 100644 --- a/lib/services/luis/authoring/lib/models/jSONUtterance.js +++ b/lib/services/luis/authoring/lib/models/jSONUtterance.js @@ -17,9 +17,9 @@ class JSONUtterance { /** * Create a JSONUtterance. - * @member {string} [text] The utterance. - * @member {string} [intent] The matched intent. - * @member {array} [entities] The matched entities. + * @property {string} [text] The utterance. + * @property {string} [intent] The matched intent. + * @property {array} [entities] The matched entities. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/labelExampleResponse.js b/lib/services/luis/authoring/lib/models/labelExampleResponse.js index bdb0ef81ef..794ba14459 100644 --- a/lib/services/luis/authoring/lib/models/labelExampleResponse.js +++ b/lib/services/luis/authoring/lib/models/labelExampleResponse.js @@ -17,8 +17,8 @@ class LabelExampleResponse { /** * Create a LabelExampleResponse. - * @member {string} [utteranceText] The sample's utterance. - * @member {number} [exampleId] The newly created sample ID. + * @property {string} [utteranceText] The sample's utterance. + * @property {number} [exampleId] The newly created sample ID. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/labelTextObject.js b/lib/services/luis/authoring/lib/models/labelTextObject.js index 2aa5876cf5..ae26343945 100644 --- a/lib/services/luis/authoring/lib/models/labelTextObject.js +++ b/lib/services/luis/authoring/lib/models/labelTextObject.js @@ -17,8 +17,8 @@ class LabelTextObject { /** * Create a LabelTextObject. - * @member {number} [id] The ID of the Label. - * @member {string} [text] The text of the label. + * @property {number} [id] The ID of the Label. + * @property {string} [text] The text of the label. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/labeledUtterance.js b/lib/services/luis/authoring/lib/models/labeledUtterance.js index ecee78611a..e1c2b8ef7c 100644 --- a/lib/services/luis/authoring/lib/models/labeledUtterance.js +++ b/lib/services/luis/authoring/lib/models/labeledUtterance.js @@ -17,14 +17,14 @@ class LabeledUtterance { /** * Create a LabeledUtterance. - * @member {number} [id] ID of Labeled Utterance. - * @member {string} [text] The utterance. E.g.: what's the weather like in + * @property {number} [id] ID of Labeled Utterance. + * @property {string} [text] The utterance. E.g.: what's the weather like in * seattle? - * @member {array} [tokenizedText] The utterance tokenized. - * @member {string} [intentLabel] The intent matching the example. - * @member {array} [entityLabels] The entities matching the example. - * @member {array} [intentPredictions] List of suggested intents. - * @member {array} [entityPredictions] List of suggested entities. + * @property {array} [tokenizedText] The utterance tokenized. + * @property {string} [intentLabel] The intent matching the example. + * @property {array} [entityLabels] The entities matching the example. + * @property {array} [intentPredictions] List of suggested intents. + * @property {array} [entityPredictions] List of suggested entities. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/luisApp.js b/lib/services/luis/authoring/lib/models/luisApp.js index 1491b7a1cd..516a7e6823 100644 --- a/lib/services/luis/authoring/lib/models/luisApp.js +++ b/lib/services/luis/authoring/lib/models/luisApp.js @@ -17,22 +17,22 @@ class LuisApp { /** * Create a LuisApp. - * @member {string} [name] The name of the application. - * @member {string} [versionId] The version ID of the application that was + * @property {string} [name] The name of the application. + * @property {string} [versionId] The version ID of the application that was * exported. - * @member {string} [desc] The description of the application. - * @member {string} [culture] The culture of the application. E.g.: en-us. - * @member {array} [intents] List of intents. - * @member {array} [entities] List of entities. - * @member {array} [closedLists] List of closed lists. - * @member {array} [composites] List of composite entities. - * @member {array} [patternAnyEntities] List of Pattern.Any entities. - * @member {array} [regexEntities] List of regular expression entities. - * @member {array} [prebuiltEntities] List of prebuilt entities. - * @member {array} [regexFeatures] List of pattern features. - * @member {array} [modelFeatures] List of model features. - * @member {array} [patterns] List of patterns. - * @member {array} [utterances] List of sample utterances. + * @property {string} [desc] The description of the application. + * @property {string} [culture] The culture of the application. E.g.: en-us. + * @property {array} [intents] List of intents. + * @property {array} [entities] List of entities. + * @property {array} [closedLists] List of closed lists. + * @property {array} [composites] List of composite entities. + * @property {array} [patternAnyEntities] List of Pattern.Any entities. + * @property {array} [regexEntities] List of regular expression entities. + * @property {array} [prebuiltEntities] List of prebuilt entities. + * @property {array} [regexFeatures] List of pattern features. + * @property {array} [modelFeatures] List of model features. + * @property {array} [patterns] List of patterns. + * @property {array} [utterances] List of sample utterances. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/modelCreateObject.js b/lib/services/luis/authoring/lib/models/modelCreateObject.js index 8e22df1cbb..bf7240e091 100644 --- a/lib/services/luis/authoring/lib/models/modelCreateObject.js +++ b/lib/services/luis/authoring/lib/models/modelCreateObject.js @@ -17,7 +17,7 @@ class ModelCreateObject { /** * Create a ModelCreateObject. - * @member {string} [name] Name of the new entity extractor. + * @property {string} [name] Name of the new entity extractor. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/modelInfo.js b/lib/services/luis/authoring/lib/models/modelInfo.js index 205acabacd..f6795bf7de 100644 --- a/lib/services/luis/authoring/lib/models/modelInfo.js +++ b/lib/services/luis/authoring/lib/models/modelInfo.js @@ -17,14 +17,14 @@ class ModelInfo { /** * Create a ModelInfo. - * @member {uuid} id The ID of the Entity Model. - * @member {string} [name] Name of the Entity Model. - * @member {number} [typeId] The type ID of the Entity Model. - * @member {string} readableType Possible values include: 'Entity Extractor', - * 'Hierarchical Entity Extractor', 'Hierarchical Child Entity Extractor', - * 'Composite Entity Extractor', 'Closed List Entity Extractor', 'Prebuilt - * Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', - * 'Regex Entity Extractor' + * @property {uuid} id The ID of the Entity Model. + * @property {string} [name] Name of the Entity Model. + * @property {number} [typeId] The type ID of the Entity Model. + * @property {string} readableType Possible values include: 'Entity + * Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity + * Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', + * 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity + * Extractor', 'Regex Entity Extractor' */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/modelInfoResponse.js b/lib/services/luis/authoring/lib/models/modelInfoResponse.js index 24d22adbf7..b7ef2b50ed 100644 --- a/lib/services/luis/authoring/lib/models/modelInfoResponse.js +++ b/lib/services/luis/authoring/lib/models/modelInfoResponse.js @@ -17,21 +17,22 @@ class ModelInfoResponse { /** * Create a ModelInfoResponse. - * @member {uuid} id The ID of the Entity Model. - * @member {string} [name] Name of the Entity Model. - * @member {number} [typeId] The type ID of the Entity Model. - * @member {string} readableType Possible values include: 'Entity Extractor', - * 'Hierarchical Entity Extractor', 'Hierarchical Child Entity Extractor', - * 'Composite Entity Extractor', 'Closed List Entity Extractor', 'Prebuilt - * Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', - * 'Regex Entity Extractor' - * @member {array} [roles] - * @member {array} [children] List of child entities. - * @member {array} [subLists] List of sub-lists. - * @member {string} [customPrebuiltDomainName] The domain name. - * @member {string} [customPrebuiltModelName] The intent name or entity name. - * @member {string} [regexPattern] The Regex entity pattern. - * @member {array} [explicitList] + * @property {uuid} id The ID of the Entity Model. + * @property {string} [name] Name of the Entity Model. + * @property {number} [typeId] The type ID of the Entity Model. + * @property {string} readableType Possible values include: 'Entity + * Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity + * Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', + * 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity + * Extractor', 'Regex Entity Extractor' + * @property {array} [roles] + * @property {array} [children] List of child entities. + * @property {array} [subLists] List of sub-lists. + * @property {string} [customPrebuiltDomainName] The domain name. + * @property {string} [customPrebuiltModelName] The intent name or entity + * name. + * @property {string} [regexPattern] The Regex entity pattern. + * @property {array} [explicitList] */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/modelTrainingDetails.js b/lib/services/luis/authoring/lib/models/modelTrainingDetails.js index b27180ecc7..41df61379f 100644 --- a/lib/services/luis/authoring/lib/models/modelTrainingDetails.js +++ b/lib/services/luis/authoring/lib/models/modelTrainingDetails.js @@ -17,13 +17,13 @@ class ModelTrainingDetails { /** * Create a ModelTrainingDetails. - * @member {number} [statusId] The train request status ID. - * @member {string} [status] Possible values include: 'Queued', 'InProgress', - * 'UpToDate', 'Fail', 'Success' - * @member {number} [exampleCount] The count of examples used to train the + * @property {number} [statusId] The train request status ID. + * @property {string} [status] Possible values include: 'Queued', + * 'InProgress', 'UpToDate', 'Fail', 'Success' + * @property {number} [exampleCount] The count of examples used to train the * model. - * @member {date} [trainingDateTime] When the model was trained. - * @member {string} [failureReason] Reason for the training failure. + * @property {date} [trainingDateTime] When the model was trained. + * @property {string} [failureReason] Reason for the training failure. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/modelTrainingInfo.js b/lib/services/luis/authoring/lib/models/modelTrainingInfo.js index d79eff19c9..7acd10bd42 100644 --- a/lib/services/luis/authoring/lib/models/modelTrainingInfo.js +++ b/lib/services/luis/authoring/lib/models/modelTrainingInfo.js @@ -17,15 +17,16 @@ class ModelTrainingInfo { /** * Create a ModelTrainingInfo. - * @member {uuid} [modelId] The ID (GUID) of the model. - * @member {object} [details] - * @member {number} [details.statusId] The train request status ID. - * @member {string} [details.status] Possible values include: 'Queued', + * @property {uuid} [modelId] The ID (GUID) of the model. + * @property {object} [details] + * @property {number} [details.statusId] The train request status ID. + * @property {string} [details.status] Possible values include: 'Queued', * 'InProgress', 'UpToDate', 'Fail', 'Success' - * @member {number} [details.exampleCount] The count of examples used to + * @property {number} [details.exampleCount] The count of examples used to * train the model. - * @member {date} [details.trainingDateTime] When the model was trained. - * @member {string} [details.failureReason] Reason for the training failure. + * @property {date} [details.trainingDateTime] When the model was trained. + * @property {string} [details.failureReason] Reason for the training + * failure. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/modelUpdateObject.js b/lib/services/luis/authoring/lib/models/modelUpdateObject.js index b896f8aa60..793eebb71a 100644 --- a/lib/services/luis/authoring/lib/models/modelUpdateObject.js +++ b/lib/services/luis/authoring/lib/models/modelUpdateObject.js @@ -17,7 +17,7 @@ class ModelUpdateObject { /** * Create a ModelUpdateObject. - * @member {string} [name] The entity's new name. + * @property {string} [name] The entity's new name. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/operationError.js b/lib/services/luis/authoring/lib/models/operationError.js index c82ed4ba84..1a4fc1c7b4 100644 --- a/lib/services/luis/authoring/lib/models/operationError.js +++ b/lib/services/luis/authoring/lib/models/operationError.js @@ -17,8 +17,8 @@ class OperationError { /** * Create a OperationError. - * @member {string} [code] - * @member {string} [message] + * @property {string} [code] + * @property {string} [message] */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/operationStatus.js b/lib/services/luis/authoring/lib/models/operationStatus.js index 19cab05248..1675f0cac8 100644 --- a/lib/services/luis/authoring/lib/models/operationStatus.js +++ b/lib/services/luis/authoring/lib/models/operationStatus.js @@ -17,9 +17,9 @@ class OperationStatus { /** * Create a OperationStatus. - * @member {string} [code] Status Code. Possible values include: 'Failed', + * @property {string} [code] Status Code. Possible values include: 'Failed', * 'FAILED', 'Success' - * @member {string} [message] Status details. + * @property {string} [message] Status details. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/patternAny.js b/lib/services/luis/authoring/lib/models/patternAny.js index 06e7cb92f8..ba85c23c71 100644 --- a/lib/services/luis/authoring/lib/models/patternAny.js +++ b/lib/services/luis/authoring/lib/models/patternAny.js @@ -17,9 +17,9 @@ class PatternAny { /** * Create a PatternAny. - * @member {string} [name] - * @member {array} [explicitList] - * @member {array} [roles] + * @property {string} [name] + * @property {array} [explicitList] + * @property {array} [roles] */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/patternAnyEntityExtractor.js b/lib/services/luis/authoring/lib/models/patternAnyEntityExtractor.js index f75003e387..b68fb922e6 100644 --- a/lib/services/luis/authoring/lib/models/patternAnyEntityExtractor.js +++ b/lib/services/luis/authoring/lib/models/patternAnyEntityExtractor.js @@ -17,16 +17,16 @@ class PatternAnyEntityExtractor { /** * Create a PatternAnyEntityExtractor. - * @member {uuid} id The ID of the Entity Model. - * @member {string} [name] Name of the Entity Model. - * @member {number} [typeId] The type ID of the Entity Model. - * @member {string} readableType Possible values include: 'Entity Extractor', - * 'Hierarchical Entity Extractor', 'Hierarchical Child Entity Extractor', - * 'Composite Entity Extractor', 'Closed List Entity Extractor', 'Prebuilt - * Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', - * 'Regex Entity Extractor' - * @member {array} [roles] - * @member {array} [explicitList] + * @property {uuid} id The ID of the Entity Model. + * @property {string} [name] Name of the Entity Model. + * @property {number} [typeId] The type ID of the Entity Model. + * @property {string} readableType Possible values include: 'Entity + * Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity + * Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', + * 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity + * Extractor', 'Regex Entity Extractor' + * @property {array} [roles] + * @property {array} [explicitList] */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/patternAnyModelCreateObject.js b/lib/services/luis/authoring/lib/models/patternAnyModelCreateObject.js index d2259bf7f4..f612b8098f 100644 --- a/lib/services/luis/authoring/lib/models/patternAnyModelCreateObject.js +++ b/lib/services/luis/authoring/lib/models/patternAnyModelCreateObject.js @@ -17,8 +17,8 @@ class PatternAnyModelCreateObject { /** * Create a PatternAnyModelCreateObject. - * @member {string} [name] The model name. - * @member {array} [explicitList] The Pattern.Any explicit list. + * @property {string} [name] The model name. + * @property {array} [explicitList] The Pattern.Any explicit list. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/patternAnyModelUpdateObject.js b/lib/services/luis/authoring/lib/models/patternAnyModelUpdateObject.js index d23605cf9c..ef7df01c33 100644 --- a/lib/services/luis/authoring/lib/models/patternAnyModelUpdateObject.js +++ b/lib/services/luis/authoring/lib/models/patternAnyModelUpdateObject.js @@ -17,8 +17,8 @@ class PatternAnyModelUpdateObject { /** * Create a PatternAnyModelUpdateObject. - * @member {string} [name] The model name. - * @member {array} [explicitList] The Pattern.Any explicit list. + * @property {string} [name] The model name. + * @property {array} [explicitList] The Pattern.Any explicit list. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/patternCreateObject.js b/lib/services/luis/authoring/lib/models/patternCreateObject.js index 468c0f8dea..3342e39714 100644 --- a/lib/services/luis/authoring/lib/models/patternCreateObject.js +++ b/lib/services/luis/authoring/lib/models/patternCreateObject.js @@ -17,8 +17,8 @@ class PatternCreateObject { /** * Create a PatternCreateObject. - * @member {string} [pattern] The Regular Expression to match. - * @member {string} [name] Name of the feature. + * @property {string} [pattern] The Regular Expression to match. + * @property {string} [name] Name of the feature. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/patternFeatureInfo.js b/lib/services/luis/authoring/lib/models/patternFeatureInfo.js index 44f1be43db..aa6c16ce2e 100644 --- a/lib/services/luis/authoring/lib/models/patternFeatureInfo.js +++ b/lib/services/luis/authoring/lib/models/patternFeatureInfo.js @@ -20,7 +20,7 @@ const models = require('./index'); class PatternFeatureInfo extends models['FeatureInfoObject'] { /** * Create a PatternFeatureInfo. - * @member {string} [pattern] The Regular Expression to match. + * @property {string} [pattern] The Regular Expression to match. */ constructor() { super(); diff --git a/lib/services/luis/authoring/lib/models/patternRule.js b/lib/services/luis/authoring/lib/models/patternRule.js index 946d688701..dda634d619 100644 --- a/lib/services/luis/authoring/lib/models/patternRule.js +++ b/lib/services/luis/authoring/lib/models/patternRule.js @@ -17,8 +17,9 @@ class PatternRule { /** * Create a PatternRule. - * @member {string} [pattern] The pattern text. - * @member {string} [intent] The intent's name where the pattern belongs to. + * @property {string} [pattern] The pattern text. + * @property {string} [intent] The intent's name where the pattern belongs + * to. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/patternRuleCreateObject.js b/lib/services/luis/authoring/lib/models/patternRuleCreateObject.js index 072e06eafc..9ca966eba0 100644 --- a/lib/services/luis/authoring/lib/models/patternRuleCreateObject.js +++ b/lib/services/luis/authoring/lib/models/patternRuleCreateObject.js @@ -17,8 +17,9 @@ class PatternRuleCreateObject { /** * Create a PatternRuleCreateObject. - * @member {string} [pattern] The pattern text. - * @member {string} [intent] The intent's name which the pattern belongs to. + * @property {string} [pattern] The pattern text. + * @property {string} [intent] The intent's name which the pattern belongs + * to. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/patternRuleInfo.js b/lib/services/luis/authoring/lib/models/patternRuleInfo.js index 0d6b89b77e..7dab87f157 100644 --- a/lib/services/luis/authoring/lib/models/patternRuleInfo.js +++ b/lib/services/luis/authoring/lib/models/patternRuleInfo.js @@ -17,9 +17,10 @@ class PatternRuleInfo { /** * Create a PatternRuleInfo. - * @member {uuid} [id] The pattern ID. - * @member {string} [pattern] The pattern text. - * @member {string} [intent] The intent's name where the pattern belongs to. + * @property {uuid} [id] The pattern ID. + * @property {string} [pattern] The pattern text. + * @property {string} [intent] The intent's name where the pattern belongs + * to. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/patternRuleUpdateObject.js b/lib/services/luis/authoring/lib/models/patternRuleUpdateObject.js index 74d7dad67c..95dfe31fbb 100644 --- a/lib/services/luis/authoring/lib/models/patternRuleUpdateObject.js +++ b/lib/services/luis/authoring/lib/models/patternRuleUpdateObject.js @@ -17,9 +17,10 @@ class PatternRuleUpdateObject { /** * Create a PatternRuleUpdateObject. - * @member {uuid} [id] The pattern ID. - * @member {string} [pattern] The pattern text. - * @member {string} [intent] The intent's name which the pattern belongs to. + * @property {uuid} [id] The pattern ID. + * @property {string} [pattern] The pattern text. + * @property {string} [intent] The intent's name which the pattern belongs + * to. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/patternUpdateObject.js b/lib/services/luis/authoring/lib/models/patternUpdateObject.js index 2eff910ceb..a4f9977e8e 100644 --- a/lib/services/luis/authoring/lib/models/patternUpdateObject.js +++ b/lib/services/luis/authoring/lib/models/patternUpdateObject.js @@ -17,10 +17,10 @@ class PatternUpdateObject { /** * Create a PatternUpdateObject. - * @member {string} [pattern] The Regular Expression to match. - * @member {string} [name] Name of the feature. - * @member {boolean} [isActive] Indicates if the Pattern feature is enabled. - * Default value: true . + * @property {string} [pattern] The Regular Expression to match. + * @property {string} [name] Name of the feature. + * @property {boolean} [isActive] Indicates if the Pattern feature is + * enabled. Default value: true . */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/personalAssistantsResponse.js b/lib/services/luis/authoring/lib/models/personalAssistantsResponse.js index 2cf83e45c6..6b43a07c2c 100644 --- a/lib/services/luis/authoring/lib/models/personalAssistantsResponse.js +++ b/lib/services/luis/authoring/lib/models/personalAssistantsResponse.js @@ -18,8 +18,8 @@ class PersonalAssistantsResponse { /** * Create a PersonalAssistantsResponse. - * @member {array} [endpointKeys] - * @member {object} [endpointUrls] + * @property {array} [endpointKeys] + * @property {object} [endpointUrls] */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/phraseListFeatureInfo.js b/lib/services/luis/authoring/lib/models/phraseListFeatureInfo.js index 1307a3d38f..2639d955d4 100644 --- a/lib/services/luis/authoring/lib/models/phraseListFeatureInfo.js +++ b/lib/services/luis/authoring/lib/models/phraseListFeatureInfo.js @@ -20,10 +20,10 @@ const models = require('./index'); class PhraseListFeatureInfo extends models['FeatureInfoObject'] { /** * Create a PhraseListFeatureInfo. - * @member {string} [phrases] A list of comma-separated values. - * @member {boolean} [isExchangeable] An exchangeable phrase list feature are - * serves as single feature to the LUIS underlying training algorithm. It is - * used as a lexicon lookup feature where its value is 1 if the lexicon + * @property {string} [phrases] A list of comma-separated values. + * @property {boolean} [isExchangeable] An exchangeable phrase list feature + * are serves as single feature to the LUIS underlying training algorithm. It + * is used as a lexicon lookup feature where its value is 1 if the lexicon * contains a given word or 0 if it doesn’t. Think of an exchangeable as a * synonyms list. A non-exchangeable phrase list feature has all the phrases * in the list serve as separate features to the underlying training diff --git a/lib/services/luis/authoring/lib/models/phraselistCreateObject.js b/lib/services/luis/authoring/lib/models/phraselistCreateObject.js index becafb82fb..a23dc25223 100644 --- a/lib/services/luis/authoring/lib/models/phraselistCreateObject.js +++ b/lib/services/luis/authoring/lib/models/phraselistCreateObject.js @@ -17,12 +17,12 @@ class PhraselistCreateObject { /** * Create a PhraselistCreateObject. - * @member {string} [phrases] List of comma-separated phrases that represent - * the Phraselist. - * @member {string} [name] The Phraselist name. - * @member {boolean} [isExchangeable] An exchangeable phrase list feature are - * serves as single feature to the LUIS underlying training algorithm. It is - * used as a lexicon lookup feature where its value is 1 if the lexicon + * @property {string} [phrases] List of comma-separated phrases that + * represent the Phraselist. + * @property {string} [name] The Phraselist name. + * @property {boolean} [isExchangeable] An exchangeable phrase list feature + * are serves as single feature to the LUIS underlying training algorithm. It + * is used as a lexicon lookup feature where its value is 1 if the lexicon * contains a given word or 0 if it doesn’t. Think of an exchangeable as a * synonyms list. A non-exchangeable phrase list feature has all the phrases * in the list serve as separate features to the underlying training diff --git a/lib/services/luis/authoring/lib/models/phraselistUpdateObject.js b/lib/services/luis/authoring/lib/models/phraselistUpdateObject.js index 17f63efdc4..4bdc22f73d 100644 --- a/lib/services/luis/authoring/lib/models/phraselistUpdateObject.js +++ b/lib/services/luis/authoring/lib/models/phraselistUpdateObject.js @@ -17,14 +17,14 @@ class PhraselistUpdateObject { /** * Create a PhraselistUpdateObject. - * @member {string} [phrases] List of comma-separated phrases that represent - * the Phraselist. - * @member {string} [name] The Phraselist name. - * @member {boolean} [isActive] Indicates if the Phraselist is enabled. + * @property {string} [phrases] List of comma-separated phrases that + * represent the Phraselist. + * @property {string} [name] The Phraselist name. + * @property {boolean} [isActive] Indicates if the Phraselist is enabled. * Default value: true . - * @member {boolean} [isExchangeable] An exchangeable phrase list feature are - * serves as single feature to the LUIS underlying training algorithm. It is - * used as a lexicon lookup feature where its value is 1 if the lexicon + * @property {boolean} [isExchangeable] An exchangeable phrase list feature + * are serves as single feature to the LUIS underlying training algorithm. It + * is used as a lexicon lookup feature where its value is 1 if the lexicon * contains a given word or 0 if it doesn’t. Think of an exchangeable as a * synonyms list. A non-exchangeable phrase list feature has all the phrases * in the list serve as separate features to the underlying training diff --git a/lib/services/luis/authoring/lib/models/prebuiltDomain.js b/lib/services/luis/authoring/lib/models/prebuiltDomain.js index b4d15c6f4d..a7db96b20d 100644 --- a/lib/services/luis/authoring/lib/models/prebuiltDomain.js +++ b/lib/services/luis/authoring/lib/models/prebuiltDomain.js @@ -17,12 +17,12 @@ class PrebuiltDomain { /** * Create a PrebuiltDomain. - * @member {string} [name] - * @member {string} [culture] - * @member {string} [description] - * @member {string} [examples] - * @member {array} [intents] - * @member {array} [entities] + * @property {string} [name] + * @property {string} [culture] + * @property {string} [description] + * @property {string} [examples] + * @property {array} [intents] + * @property {array} [entities] */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/prebuiltDomainCreateBaseObject.js b/lib/services/luis/authoring/lib/models/prebuiltDomainCreateBaseObject.js index d235f429c3..9f222d60bd 100644 --- a/lib/services/luis/authoring/lib/models/prebuiltDomainCreateBaseObject.js +++ b/lib/services/luis/authoring/lib/models/prebuiltDomainCreateBaseObject.js @@ -18,7 +18,7 @@ class PrebuiltDomainCreateBaseObject { /** * Create a PrebuiltDomainCreateBaseObject. - * @member {string} [domainName] The domain name. + * @property {string} [domainName] The domain name. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/prebuiltDomainCreateObject.js b/lib/services/luis/authoring/lib/models/prebuiltDomainCreateObject.js index b9c44ec35f..24546862b5 100644 --- a/lib/services/luis/authoring/lib/models/prebuiltDomainCreateObject.js +++ b/lib/services/luis/authoring/lib/models/prebuiltDomainCreateObject.js @@ -18,8 +18,8 @@ class PrebuiltDomainCreateObject { /** * Create a PrebuiltDomainCreateObject. - * @member {string} [domainName] The domain name. - * @member {string} [culture] The culture of the new domain. + * @property {string} [domainName] The domain name. + * @property {string} [culture] The culture of the new domain. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/prebuiltDomainItem.js b/lib/services/luis/authoring/lib/models/prebuiltDomainItem.js index 315dfb9d12..2da420193a 100644 --- a/lib/services/luis/authoring/lib/models/prebuiltDomainItem.js +++ b/lib/services/luis/authoring/lib/models/prebuiltDomainItem.js @@ -16,9 +16,9 @@ class PrebuiltDomainItem { /** * Create a PrebuiltDomainItem. - * @member {string} [name] - * @member {string} [description] - * @member {string} [examples] + * @property {string} [name] + * @property {string} [description] + * @property {string} [examples] */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/prebuiltDomainModelCreateObject.js b/lib/services/luis/authoring/lib/models/prebuiltDomainModelCreateObject.js index 0ed6597e5e..4b6cdaa35f 100644 --- a/lib/services/luis/authoring/lib/models/prebuiltDomainModelCreateObject.js +++ b/lib/services/luis/authoring/lib/models/prebuiltDomainModelCreateObject.js @@ -18,8 +18,8 @@ class PrebuiltDomainModelCreateObject { /** * Create a PrebuiltDomainModelCreateObject. - * @member {string} [domainName] The domain name. - * @member {string} [modelName] The intent name or entity name. + * @property {string} [domainName] The domain name. + * @property {string} [modelName] The intent name or entity name. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/prebuiltDomainObject.js b/lib/services/luis/authoring/lib/models/prebuiltDomainObject.js index d6ee273af3..2d3da7f055 100644 --- a/lib/services/luis/authoring/lib/models/prebuiltDomainObject.js +++ b/lib/services/luis/authoring/lib/models/prebuiltDomainObject.js @@ -16,8 +16,8 @@ class PrebuiltDomainObject { /** * Create a PrebuiltDomainObject. - * @member {string} [domainName] - * @member {string} [modelName] + * @property {string} [domainName] + * @property {string} [modelName] */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/prebuiltEntity.js b/lib/services/luis/authoring/lib/models/prebuiltEntity.js index f9d8b6e636..c18cb90b8b 100644 --- a/lib/services/luis/authoring/lib/models/prebuiltEntity.js +++ b/lib/services/luis/authoring/lib/models/prebuiltEntity.js @@ -17,8 +17,8 @@ class PrebuiltEntity { /** * Create a PrebuiltEntity. - * @member {string} [name] - * @member {array} [roles] + * @property {string} [name] + * @property {array} [roles] */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/prebuiltEntityExtractor.js b/lib/services/luis/authoring/lib/models/prebuiltEntityExtractor.js index e5173d0ce9..0f70acd213 100644 --- a/lib/services/luis/authoring/lib/models/prebuiltEntityExtractor.js +++ b/lib/services/luis/authoring/lib/models/prebuiltEntityExtractor.js @@ -17,15 +17,15 @@ class PrebuiltEntityExtractor { /** * Create a PrebuiltEntityExtractor. - * @member {uuid} id The ID of the Entity Model. - * @member {string} [name] Name of the Entity Model. - * @member {number} [typeId] The type ID of the Entity Model. - * @member {string} readableType Possible values include: 'Entity Extractor', - * 'Hierarchical Entity Extractor', 'Hierarchical Child Entity Extractor', - * 'Composite Entity Extractor', 'Closed List Entity Extractor', 'Prebuilt - * Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', - * 'Regex Entity Extractor' - * @member {array} [roles] + * @property {uuid} id The ID of the Entity Model. + * @property {string} [name] Name of the Entity Model. + * @property {number} [typeId] The type ID of the Entity Model. + * @property {string} readableType Possible values include: 'Entity + * Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity + * Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', + * 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity + * Extractor', 'Regex Entity Extractor' + * @property {array} [roles] */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/publishSettingUpdateObject.js b/lib/services/luis/authoring/lib/models/publishSettingUpdateObject.js index 07c7309dee..6deca9104c 100644 --- a/lib/services/luis/authoring/lib/models/publishSettingUpdateObject.js +++ b/lib/services/luis/authoring/lib/models/publishSettingUpdateObject.js @@ -17,11 +17,11 @@ class PublishSettingUpdateObject { /** * Create a PublishSettingUpdateObject. - * @member {boolean} [sentimentAnalysis] Setting sentiment analysis as true + * @property {boolean} [sentimentAnalysis] Setting sentiment analysis as true * returns the Sentiment of the input utterance along with the resopnse - * @member {boolean} [speech] Setting speech as public enables speech priming - * in your app - * @member {boolean} [spellChecker] Setting spell checker as public enables + * @property {boolean} [speech] Setting speech as public enables speech + * priming in your app + * @property {boolean} [spellChecker] Setting spell checker as public enables * spell checking the input utterance. */ constructor() { diff --git a/lib/services/luis/authoring/lib/models/publishSettings.js b/lib/services/luis/authoring/lib/models/publishSettings.js index cb88c51f23..45f0fa30e0 100644 --- a/lib/services/luis/authoring/lib/models/publishSettings.js +++ b/lib/services/luis/authoring/lib/models/publishSettings.js @@ -17,12 +17,13 @@ class PublishSettings { /** * Create a PublishSettings. - * @member {uuid} id The application ID. - * @member {boolean} isSentimentAnalysisEnabled Setting sentiment analysis as - * true returns the Sentiment of the input utterance along with the resopnse - * @member {boolean} isSpeechEnabled Setting speech as public enables speech - * priming in your app - * @member {boolean} isSpellCheckerEnabled Setting spell checker as public + * @property {uuid} id The application ID. + * @property {boolean} isSentimentAnalysisEnabled Setting sentiment analysis + * as true returns the Sentiment of the input utterance along with the + * resopnse + * @property {boolean} isSpeechEnabled Setting speech as public enables + * speech priming in your app + * @property {boolean} isSpellCheckerEnabled Setting spell checker as public * enables spell checking the input utterance. */ constructor() { diff --git a/lib/services/luis/authoring/lib/models/regexEntity.js b/lib/services/luis/authoring/lib/models/regexEntity.js index ba69c78ed4..172f55c60a 100644 --- a/lib/services/luis/authoring/lib/models/regexEntity.js +++ b/lib/services/luis/authoring/lib/models/regexEntity.js @@ -17,9 +17,9 @@ class RegexEntity { /** * Create a RegexEntity. - * @member {string} [name] - * @member {string} [regexPattern] - * @member {array} [roles] + * @property {string} [name] + * @property {string} [regexPattern] + * @property {array} [roles] */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/regexEntityExtractor.js b/lib/services/luis/authoring/lib/models/regexEntityExtractor.js index 2947fc44d6..37ce6084f6 100644 --- a/lib/services/luis/authoring/lib/models/regexEntityExtractor.js +++ b/lib/services/luis/authoring/lib/models/regexEntityExtractor.js @@ -17,16 +17,16 @@ class RegexEntityExtractor { /** * Create a RegexEntityExtractor. - * @member {uuid} id The ID of the Entity Model. - * @member {string} [name] Name of the Entity Model. - * @member {number} [typeId] The type ID of the Entity Model. - * @member {string} readableType Possible values include: 'Entity Extractor', - * 'Hierarchical Entity Extractor', 'Hierarchical Child Entity Extractor', - * 'Composite Entity Extractor', 'Closed List Entity Extractor', 'Prebuilt - * Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', - * 'Regex Entity Extractor' - * @member {array} [roles] - * @member {string} [regexPattern] The Regex entity pattern. + * @property {uuid} id The ID of the Entity Model. + * @property {string} [name] Name of the Entity Model. + * @property {number} [typeId] The type ID of the Entity Model. + * @property {string} readableType Possible values include: 'Entity + * Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity + * Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', + * 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity + * Extractor', 'Regex Entity Extractor' + * @property {array} [roles] + * @property {string} [regexPattern] The Regex entity pattern. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/regexModelCreateObject.js b/lib/services/luis/authoring/lib/models/regexModelCreateObject.js index e544993b0e..25e8f7372e 100644 --- a/lib/services/luis/authoring/lib/models/regexModelCreateObject.js +++ b/lib/services/luis/authoring/lib/models/regexModelCreateObject.js @@ -17,8 +17,8 @@ class RegexModelCreateObject { /** * Create a RegexModelCreateObject. - * @member {string} [regexPattern] The regex entity pattern. - * @member {string} [name] The model name. + * @property {string} [regexPattern] The regex entity pattern. + * @property {string} [name] The model name. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/regexModelUpdateObject.js b/lib/services/luis/authoring/lib/models/regexModelUpdateObject.js index 4845710a65..3629fc2270 100644 --- a/lib/services/luis/authoring/lib/models/regexModelUpdateObject.js +++ b/lib/services/luis/authoring/lib/models/regexModelUpdateObject.js @@ -17,8 +17,8 @@ class RegexModelUpdateObject { /** * Create a RegexModelUpdateObject. - * @member {string} [regexPattern] The regex entity pattern. - * @member {string} [name] The model name. + * @property {string} [regexPattern] The regex entity pattern. + * @property {string} [name] The model name. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/subClosedList.js b/lib/services/luis/authoring/lib/models/subClosedList.js index 6d67aece9c..b669eb6c16 100644 --- a/lib/services/luis/authoring/lib/models/subClosedList.js +++ b/lib/services/luis/authoring/lib/models/subClosedList.js @@ -17,9 +17,9 @@ class SubClosedList { /** * Create a SubClosedList. - * @member {string} [canonicalForm] The standard form that the list + * @property {string} [canonicalForm] The standard form that the list * represents. - * @member {array} [list] List of synonym words. + * @property {array} [list] List of synonym words. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/subClosedListResponse.js b/lib/services/luis/authoring/lib/models/subClosedListResponse.js index 1fc10510e4..2aa18cd7af 100644 --- a/lib/services/luis/authoring/lib/models/subClosedListResponse.js +++ b/lib/services/luis/authoring/lib/models/subClosedListResponse.js @@ -20,7 +20,7 @@ const models = require('./index'); class SubClosedListResponse extends models['SubClosedList'] { /** * Create a SubClosedListResponse. - * @member {number} [id] The sublist ID + * @property {number} [id] The sublist ID */ constructor() { super(); diff --git a/lib/services/luis/authoring/lib/models/taskUpdateObject.js b/lib/services/luis/authoring/lib/models/taskUpdateObject.js index 34df7787bb..0e027e8218 100644 --- a/lib/services/luis/authoring/lib/models/taskUpdateObject.js +++ b/lib/services/luis/authoring/lib/models/taskUpdateObject.js @@ -17,7 +17,7 @@ class TaskUpdateObject { /** * Create a TaskUpdateObject. - * @member {string} [version] The new version for the cloned model. + * @property {string} [version] The new version for the cloned model. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/userAccessList.js b/lib/services/luis/authoring/lib/models/userAccessList.js index 28ff0f506b..3b0aef9ba7 100644 --- a/lib/services/luis/authoring/lib/models/userAccessList.js +++ b/lib/services/luis/authoring/lib/models/userAccessList.js @@ -17,8 +17,8 @@ class UserAccessList { /** * Create a UserAccessList. - * @member {string} [owner] The email address of owner of the application. - * @member {array} [emails] + * @property {string} [owner] The email address of owner of the application. + * @property {array} [emails] */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/userCollaborator.js b/lib/services/luis/authoring/lib/models/userCollaborator.js index c544e99113..65896d695e 100644 --- a/lib/services/luis/authoring/lib/models/userCollaborator.js +++ b/lib/services/luis/authoring/lib/models/userCollaborator.js @@ -16,7 +16,7 @@ class UserCollaborator { /** * Create a UserCollaborator. - * @member {string} [email] The email address of the user. + * @property {string} [email] The email address of the user. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/versionInfo.js b/lib/services/luis/authoring/lib/models/versionInfo.js index 09770a3354..5214a4a4e8 100644 --- a/lib/services/luis/authoring/lib/models/versionInfo.js +++ b/lib/services/luis/authoring/lib/models/versionInfo.js @@ -17,21 +17,22 @@ class VersionInfo { /** * Create a VersionInfo. - * @member {string} version The version ID. E.g.: "0.1" - * @member {date} [createdDateTime] The version's creation timestamp. - * @member {date} [lastModifiedDateTime] Timestamp of the last update. - * @member {date} [lastTrainedDateTime] Timestamp of the last time the model - * was trained. - * @member {date} [lastPublishedDateTime] Timestamp when was last published. - * @member {string} [endpointUrl] The Runtime endpoint URL for this model + * @property {string} version The version ID. E.g.: "0.1" + * @property {date} [createdDateTime] The version's creation timestamp. + * @property {date} [lastModifiedDateTime] Timestamp of the last update. + * @property {date} [lastTrainedDateTime] Timestamp of the last time the + * model was trained. + * @property {date} [lastPublishedDateTime] Timestamp when was last + * published. + * @property {string} [endpointUrl] The Runtime endpoint URL for this model * version. - * @member {object} [assignedEndpointKey] The endpoint key. - * @member {object} [externalApiKeys] External keys. - * @member {number} [intentsCount] Number of intents in this model. - * @member {number} [entitiesCount] Number of entities in this model. - * @member {number} [endpointHitsCount] Number of calls made to this + * @property {object} [assignedEndpointKey] The endpoint key. + * @property {object} [externalApiKeys] External keys. + * @property {number} [intentsCount] Number of intents in this model. + * @property {number} [entitiesCount] Number of entities in this model. + * @property {number} [endpointHitsCount] Number of calls made to this * endpoint. - * @member {string} trainingStatus The current training status. Possible + * @property {string} trainingStatus The current training status. Possible * values include: 'NeedsTraining', 'InProgress', 'Trained' */ constructor() { diff --git a/lib/services/luis/authoring/lib/models/wordListBaseUpdateObject.js b/lib/services/luis/authoring/lib/models/wordListBaseUpdateObject.js index 5aa1519417..bf938ec266 100644 --- a/lib/services/luis/authoring/lib/models/wordListBaseUpdateObject.js +++ b/lib/services/luis/authoring/lib/models/wordListBaseUpdateObject.js @@ -17,9 +17,9 @@ class WordListBaseUpdateObject { /** * Create a WordListBaseUpdateObject. - * @member {string} [canonicalForm] The standard form that the list + * @property {string} [canonicalForm] The standard form that the list * represents. - * @member {array} [list] List of synonym words. + * @property {array} [list] List of synonym words. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/models/wordListObject.js b/lib/services/luis/authoring/lib/models/wordListObject.js index 7526d090e6..48e20b233b 100644 --- a/lib/services/luis/authoring/lib/models/wordListObject.js +++ b/lib/services/luis/authoring/lib/models/wordListObject.js @@ -17,9 +17,9 @@ class WordListObject { /** * Create a WordListObject. - * @member {string} [canonicalForm] The standard form that the list + * @property {string} [canonicalForm] The standard form that the list * represents. - * @member {array} [list] List of synonym words. + * @property {array} [list] List of synonym words. */ constructor() { } diff --git a/lib/services/luis/authoring/lib/operations/apps.js b/lib/services/luis/authoring/lib/operations/apps.js index dd2ab9e476..4c43862aeb 100644 --- a/lib/services/luis/authoring/lib/operations/apps.js +++ b/lib/services/luis/authoring/lib/operations/apps.js @@ -1552,9 +1552,6 @@ function _deleteMethod(appId, options, callback) { * @param {boolean} [applicationPublishObject.isStaging] Indicates if the * staging slot should be used, instead of the Production one. * - * @param {string} [applicationPublishObject.region] The target region that the - * application is published to. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -3852,9 +3849,6 @@ class Apps { * @param {boolean} [applicationPublishObject.isStaging] Indicates if the * staging slot should be used, instead of the Production one. * - * @param {string} [applicationPublishObject.region] The target region that the - * application is published to. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -3894,9 +3888,6 @@ class Apps { * @param {boolean} [applicationPublishObject.isStaging] Indicates if the * staging slot should be used, instead of the Production one. * - * @param {string} [applicationPublishObject.region] The target region that the - * application is published to. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the diff --git a/lib/services/luis/authoring/lib/operations/index.d.ts b/lib/services/luis/authoring/lib/operations/index.d.ts index 41061b4451..5318661967 100644 --- a/lib/services/luis/authoring/lib/operations/index.d.ts +++ b/lib/services/luis/authoring/lib/operations/index.d.ts @@ -8840,9 +8840,6 @@ export interface Apps { * @param {boolean} [applicationPublishObject.isStaging] Indicates if the * staging slot should be used, instead of the Production one. * - * @param {string} [applicationPublishObject.region] The target region that the - * application is published to. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -8870,9 +8867,6 @@ export interface Apps { * @param {boolean} [applicationPublishObject.isStaging] Indicates if the * staging slot should be used, instead of the Production one. * - * @param {string} [applicationPublishObject.region] The target region that the - * application is published to. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -10942,3 +10936,147 @@ export interface Pattern { getIntentPatterns(appId: string, versionId: string, intentId: string, callback: ServiceCallback): void; getIntentPatterns(appId: string, versionId: string, intentId: string, options: { skip? : number, take? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } + +/** + * @class + * Settings + * __NOTE__: An instance of this class is automatically created for an + * instance of the LUISAuthoringClient. + */ +export interface Settings { + + + /** + * Gets the application version settings. + * + * @param {uuid} appId The application ID. + * + * @param {string} versionId The version ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listWithHttpOperationResponse(appId: string, versionId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets the application version settings. + * + * @param {uuid} appId The application ID. + * + * @param {string} versionId The version ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {Array} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {Array} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + list(appId: string, versionId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(appId: string, versionId: string, callback: ServiceCallback): void; + list(appId: string, versionId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Updates the application version settings. + * + * @param {uuid} appId The application ID. + * + * @param {string} versionId The version ID. + * + * @param {object} listOfAppVersionSettingObject A list of the updated + * application version settings. + * + * @param {string} [listOfAppVersionSettingObject.name] The application version + * setting name. + * + * @param {string} [listOfAppVersionSettingObject.value] The application + * version setting value. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + updateWithHttpOperationResponse(appId: string, versionId: string, listOfAppVersionSettingObject: models.AppVersionSettingObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Updates the application version settings. + * + * @param {uuid} appId The application ID. + * + * @param {string} versionId The version ID. + * + * @param {object} listOfAppVersionSettingObject A list of the updated + * application version settings. + * + * @param {string} [listOfAppVersionSettingObject.name] The application version + * setting name. + * + * @param {string} [listOfAppVersionSettingObject.value] The application + * version setting value. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {OperationStatus} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {OperationStatus} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatus} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + update(appId: string, versionId: string, listOfAppVersionSettingObject: models.AppVersionSettingObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(appId: string, versionId: string, listOfAppVersionSettingObject: models.AppVersionSettingObject, callback: ServiceCallback): void; + update(appId: string, versionId: string, listOfAppVersionSettingObject: models.AppVersionSettingObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} diff --git a/lib/services/luis/authoring/lib/operations/index.js b/lib/services/luis/authoring/lib/operations/index.js index ef0073f054..3cefaa62cb 100644 --- a/lib/services/luis/authoring/lib/operations/index.js +++ b/lib/services/luis/authoring/lib/operations/index.js @@ -22,3 +22,4 @@ exports.Versions = require('./versions'); exports.Train = require('./train'); exports.Permissions = require('./permissions'); exports.Pattern = require('./pattern'); +exports.Settings = require('./settings'); diff --git a/lib/services/luis/authoring/lib/operations/settings.js b/lib/services/luis/authoring/lib/operations/settings.js new file mode 100644 index 0000000000..2eef1a6c4a --- /dev/null +++ b/lib/services/luis/authoring/lib/operations/settings.js @@ -0,0 +1,516 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const WebResource = msRest.WebResource; + +/** + * Gets the application version settings. + * + * @param {uuid} appId The application ID. + * + * @param {string} versionId The version ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {array} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _list(appId, versionId, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.endpoint === null || this.client.endpoint === undefined || typeof this.client.endpoint.valueOf() !== 'string') { + throw new Error('this.client.endpoint cannot be null or undefined and it must be of type string.'); + } + if (appId === null || appId === undefined || typeof appId.valueOf() !== 'string' || !msRest.isValidUuid(appId)) { + throw new Error('appId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + } + if (versionId === null || versionId === undefined || typeof versionId.valueOf() !== 'string') { + throw new Error('versionId cannot be null or undefined and it must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'apps/{appId}/versions/{versionId}/settings'; + requestUrl = requestUrl.replace('{Endpoint}', this.client.endpoint); + requestUrl = requestUrl.replace('{appId}', encodeURIComponent(appId.toString())); + requestUrl = requestUrl.replace('{versionId}', encodeURIComponent(versionId)); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorResponse']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'AppVersionSettingObjectElementType', + type: { + name: 'Composite', + className: 'AppVersionSettingObject' + } + } + } + }; + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Updates the application version settings. + * + * @param {uuid} appId The application ID. + * + * @param {string} versionId The version ID. + * + * @param {object} listOfAppVersionSettingObject A list of the updated + * application version settings. + * + * @param {string} [listOfAppVersionSettingObject.name] The application version + * setting name. + * + * @param {string} [listOfAppVersionSettingObject.value] The application + * version setting value. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatus} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _update(appId, versionId, listOfAppVersionSettingObject, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.endpoint === null || this.client.endpoint === undefined || typeof this.client.endpoint.valueOf() !== 'string') { + throw new Error('this.client.endpoint cannot be null or undefined and it must be of type string.'); + } + if (appId === null || appId === undefined || typeof appId.valueOf() !== 'string' || !msRest.isValidUuid(appId)) { + throw new Error('appId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + } + if (versionId === null || versionId === undefined || typeof versionId.valueOf() !== 'string') { + throw new Error('versionId cannot be null or undefined and it must be of type string.'); + } + if (listOfAppVersionSettingObject === null || listOfAppVersionSettingObject === undefined) { + throw new Error('listOfAppVersionSettingObject cannot be null or undefined.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'apps/{appId}/versions/{versionId}/settings'; + requestUrl = requestUrl.replace('{Endpoint}', this.client.endpoint); + requestUrl = requestUrl.replace('{appId}', encodeURIComponent(appId.toString())); + requestUrl = requestUrl.replace('{versionId}', encodeURIComponent(versionId)); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PUT'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (listOfAppVersionSettingObject !== null && listOfAppVersionSettingObject !== undefined) { + let requestModelMapper = new client.models['AppVersionSettingObject']().mapper(); + requestModel = client.serialize(requestModelMapper, listOfAppVersionSettingObject, 'listOfAppVersionSettingObject'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(listOfAppVersionSettingObject, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorResponse']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['OperationStatus']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a Settings. */ +class Settings { + /** + * Create a Settings. + * @param {LUISAuthoringClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._list = _list; + this._update = _update; + } + + /** + * Gets the application version settings. + * + * @param {uuid} appId The application ID. + * + * @param {string} versionId The version ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listWithHttpOperationResponse(appId, versionId, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._list(appId, versionId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets the application version settings. + * + * @param {uuid} appId The application ID. + * + * @param {string} versionId The version ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {Array} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {array} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + list(appId, versionId, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._list(appId, versionId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._list(appId, versionId, options, optionalCallback); + } + } + + /** + * Updates the application version settings. + * + * @param {uuid} appId The application ID. + * + * @param {string} versionId The version ID. + * + * @param {object} listOfAppVersionSettingObject A list of the updated + * application version settings. + * + * @param {string} [listOfAppVersionSettingObject.name] The application version + * setting name. + * + * @param {string} [listOfAppVersionSettingObject.value] The application + * version setting value. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + updateWithHttpOperationResponse(appId, versionId, listOfAppVersionSettingObject, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._update(appId, versionId, listOfAppVersionSettingObject, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Updates the application version settings. + * + * @param {uuid} appId The application ID. + * + * @param {string} versionId The version ID. + * + * @param {object} listOfAppVersionSettingObject A list of the updated + * application version settings. + * + * @param {string} [listOfAppVersionSettingObject.name] The application version + * setting name. + * + * @param {string} [listOfAppVersionSettingObject.value] The application + * version setting value. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {OperationStatus} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatus} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + update(appId, versionId, listOfAppVersionSettingObject, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._update(appId, versionId, listOfAppVersionSettingObject, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._update(appId, versionId, listOfAppVersionSettingObject, options, optionalCallback); + } + } + +} + +module.exports = Settings; diff --git a/lib/services/luis/authoring/package.json b/lib/services/luis/authoring/package.json index ab44dad38d..42f2b42fbc 100644 --- a/lib/services/luis/authoring/package.json +++ b/lib/services/luis/authoring/package.json @@ -2,7 +2,7 @@ "name": "azure-cognitiveservices-luis-authoring", "author": "Microsoft Corporation", "description": "LUISAuthoringClient Library with typescript type definitions for node", - "version": "1.1.0", + "version": "2.0.0", "dependencies": { "ms-rest": "^2.3.3" }, @@ -21,4 +21,4 @@ "bugs": { "url": "https://github.com/azure/azure-sdk-for-node/issues" } -} \ No newline at end of file +} diff --git a/lib/services/luis/runtime/README.md b/lib/services/luis/runtime/README.md index 018f96df17..2473836229 100644 --- a/lib/services/luis/runtime/README.md +++ b/lib/services/luis/runtime/README.md @@ -3,22 +3,24 @@ uid: azure-cognitiveservices-luis-runtime summary: *content --- -# Microsoft Azure SDK for Node.js - LUISRuntimeClient +**This SDK will be deprecated next year and will be replaced by a new TypeScript-based isomorphic SDK (found at https://github.com/Azure/azure-sdk-for-js) which works on Node.js and browsers.** +## Microsoft Azure SDK for Node.js - LUISRuntimeClient + This project provides a Node.js package for accessing Azure. Right now it supports: - **Node.js version 6.x.x or higher** -## Features +### Features -## How to Install +### How to Install ```bash npm install azure-cognitiveservices-luis-runtime ``` -## How to use +### How to use -### Authentication, client creation and resolve prediction as an example. +#### Authentication, client creation, and resolve prediction as an example. ```javascript const msRest = require("ms-rest"); @@ -35,6 +37,7 @@ const staging = true; const spellCheck = true; const bingSpellCheckSubscriptionKey = "testbingSpellCheckSubscriptionKey"; const log = true; + client.prediction.resolve(appId, query, timezoneOffset, verbose, staging, spellCheck, bingSpellCheckSubscriptionKey, log).then((result) => { console.log("The result is:"); console.log(result); @@ -42,7 +45,8 @@ client.prediction.resolve(appId, query, timezoneOffset, verbose, staging, spellC console.log('An error occurred:'); console.dir(err, {depth: null, colors: true}); }); +``` -## Related projects +### Related projects - [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node) diff --git a/lib/services/luis/runtime/lib/models/aPIError.js b/lib/services/luis/runtime/lib/models/aPIError.js index 22b9f31f77..ca5dd628e6 100644 --- a/lib/services/luis/runtime/lib/models/aPIError.js +++ b/lib/services/luis/runtime/lib/models/aPIError.js @@ -17,8 +17,8 @@ class APIError { /** * Create a APIError. - * @member {string} [statusCode] HTTP Status code - * @member {string} [message] Cause of the error. + * @property {string} [statusCode] HTTP Status code + * @property {string} [message] Cause of the error. */ constructor() { } diff --git a/lib/services/luis/runtime/lib/models/compositeChildModel.js b/lib/services/luis/runtime/lib/models/compositeChildModel.js index 833ba5c269..385fcac5fc 100644 --- a/lib/services/luis/runtime/lib/models/compositeChildModel.js +++ b/lib/services/luis/runtime/lib/models/compositeChildModel.js @@ -17,8 +17,8 @@ class CompositeChildModel { /** * Create a CompositeChildModel. - * @member {string} type Type of child entity. - * @member {string} value Value extracted by LUIS. + * @property {string} type Type of child entity. + * @property {string} value Value extracted by LUIS. */ constructor() { } diff --git a/lib/services/luis/runtime/lib/models/compositeEntityModel.js b/lib/services/luis/runtime/lib/models/compositeEntityModel.js index 1e808906e8..e766e31bd2 100644 --- a/lib/services/luis/runtime/lib/models/compositeEntityModel.js +++ b/lib/services/luis/runtime/lib/models/compositeEntityModel.js @@ -17,9 +17,9 @@ class CompositeEntityModel { /** * Create a CompositeEntityModel. - * @member {string} parentType Type/name of parent entity. - * @member {string} value Value for composite entity extracted by LUIS. - * @member {array} children Child entities. + * @property {string} parentType Type/name of parent entity. + * @property {string} value Value for composite entity extracted by LUIS. + * @property {array} children Child entities. */ constructor() { } diff --git a/lib/services/luis/runtime/lib/models/entityModel.js b/lib/services/luis/runtime/lib/models/entityModel.js index 0ba788c5f3..48e8e3b8e5 100644 --- a/lib/services/luis/runtime/lib/models/entityModel.js +++ b/lib/services/luis/runtime/lib/models/entityModel.js @@ -17,11 +17,11 @@ class EntityModel { /** * Create a EntityModel. - * @member {string} entity Name of the entity, as defined in LUIS. - * @member {string} type Type of the entity, as defined in LUIS. - * @member {number} startIndex The position of the first character of the + * @property {string} entity Name of the entity, as defined in LUIS. + * @property {string} type Type of the entity, as defined in LUIS. + * @property {number} startIndex The position of the first character of the * matched entity within the utterance. - * @member {number} endIndex The position of the last character of the + * @property {number} endIndex The position of the last character of the * matched entity within the utterance. */ constructor() { diff --git a/lib/services/luis/runtime/lib/models/entityWithResolution.js b/lib/services/luis/runtime/lib/models/entityWithResolution.js index 3d1d7c0ba7..130f4b292a 100644 --- a/lib/services/luis/runtime/lib/models/entityWithResolution.js +++ b/lib/services/luis/runtime/lib/models/entityWithResolution.js @@ -19,7 +19,8 @@ const models = require('./index'); class EntityWithResolution extends models['EntityModel'] { /** * Create a EntityWithResolution. - * @member {object} resolution Resolution values for pre-built LUIS entities. + * @property {object} resolution Resolution values for pre-built LUIS + * entities. */ constructor() { super(); diff --git a/lib/services/luis/runtime/lib/models/entityWithScore.js b/lib/services/luis/runtime/lib/models/entityWithScore.js index 07c0e6af04..d43f9b3823 100644 --- a/lib/services/luis/runtime/lib/models/entityWithScore.js +++ b/lib/services/luis/runtime/lib/models/entityWithScore.js @@ -19,7 +19,8 @@ const models = require('./index'); class EntityWithScore extends models['EntityModel'] { /** * Create a EntityWithScore. - * @member {number} score Associated prediction score for the intent (float). + * @property {number} score Associated prediction score for the intent + * (float). */ constructor() { super(); diff --git a/lib/services/luis/runtime/lib/models/index.d.ts b/lib/services/luis/runtime/lib/models/index.d.ts index 2f3ac5bb5e..a306378c2a 100644 --- a/lib/services/luis/runtime/lib/models/index.d.ts +++ b/lib/services/luis/runtime/lib/models/index.d.ts @@ -1,166 +1,151 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import * as moment from "moment"; - /** - * @class - * Initializes a new instance of the IntentModel class. - * @constructor * An intent detected from the utterance. - * - * @member {string} [intent] Name of the intent, as defined in LUIS. - * @member {number} [score] Associated prediction score for the intent (float). */ export interface IntentModel { + /** + * Name of the intent, as defined in LUIS. + */ intent?: string; + /** + * Associated prediction score for the intent (float). + */ score?: number; } /** - * @class - * Initializes a new instance of the EntityModel class. - * @constructor * An entity extracted from the utterance. - * - * @member {string} entity Name of the entity, as defined in LUIS. - * @member {string} type Type of the entity, as defined in LUIS. - * @member {number} startIndex The position of the first character of the - * matched entity within the utterance. - * @member {number} endIndex The position of the last character of the matched - * entity within the utterance. */ export interface EntityModel { + /** + * Name of the entity, as defined in LUIS. + */ entity: string; + /** + * Type of the entity, as defined in LUIS. + */ type: string; + /** + * The position of the first character of the matched entity within the utterance. + */ startIndex: number; + /** + * The position of the last character of the matched entity within the utterance. + */ endIndex: number; /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. + * Describes unknown properties. The value of an unknown property can be of "any" type. */ - [property: string]: any; + [additionalPropertyName: string]: any; } /** - * @class - * Initializes a new instance of the CompositeChildModel class. - * @constructor * Child entity in a LUIS Composite Entity. - * - * @member {string} type Type of child entity. - * @member {string} value Value extracted by LUIS. */ export interface CompositeChildModel { + /** + * Type of child entity. + */ type: string; + /** + * Value extracted by LUIS. + */ value: string; } /** - * @class - * Initializes a new instance of the CompositeEntityModel class. - * @constructor * LUIS Composite Entity. - * - * @member {string} parentType Type/name of parent entity. - * @member {string} value Value for composite entity extracted by LUIS. - * @member {array} children Child entities. */ export interface CompositeEntityModel { + /** + * Type/name of parent entity. + */ parentType: string; + /** + * Value for composite entity extracted by LUIS. + */ value: string; + /** + * Child entities. + */ children: CompositeChildModel[]; } /** - * @class - * Initializes a new instance of the Sentiment class. - * @constructor * Sentiment of the input utterance. - * - * @member {string} [label] The polarity of the sentiment, can be positive, - * neutral or negative. - * @member {number} [score] Score of the sentiment, ranges from 0 (most - * negative) to 1 (most positive). */ export interface Sentiment { + /** + * The polarity of the sentiment, can be positive, neutral or negative. + */ label?: string; + /** + * Score of the sentiment, ranges from 0 (most negative) to 1 (most positive). + */ score?: number; } /** - * @class - * Initializes a new instance of the LuisResult class. - * @constructor * Prediction, based on the input query, containing intent(s) and entities. - * - * @member {string} [query] The input utterance that was analized. - * @member {string} [alteredQuery] The corrected utterance (when spell checking - * was enabled). - * @member {object} [topScoringIntent] - * @member {string} [topScoringIntent.intent] Name of the intent, as defined in - * LUIS. - * @member {number} [topScoringIntent.score] Associated prediction score for - * the intent (float). - * @member {array} [intents] All the intents (and their score) that were - * detected from utterance. - * @member {array} [entities] The entities extracted from the utterance. - * @member {array} [compositeEntities] The composite entities extracted from - * the utterance. - * @member {object} [sentimentAnalysis] - * @member {string} [sentimentAnalysis.label] The polarity of the sentiment, - * can be positive, neutral or negative. - * @member {number} [sentimentAnalysis.score] Score of the sentiment, ranges - * from 0 (most negative) to 1 (most positive). */ export interface LuisResult { + /** + * The input utterance that was analized. + */ query?: string; + /** + * The corrected utterance (when spell checking was enabled). + */ alteredQuery?: string; topScoringIntent?: IntentModel; + /** + * All the intents (and their score) that were detected from utterance. + */ intents?: IntentModel[]; + /** + * The entities extracted from the utterance. + */ entities?: EntityModel[]; + /** + * The composite entities extracted from the utterance. + */ compositeEntities?: CompositeEntityModel[]; sentimentAnalysis?: Sentiment; } -/** - * @class - * Initializes a new instance of the EntityWithScore class. - * @constructor - * @member {number} score Associated prediction score for the intent (float). - */ export interface EntityWithScore extends EntityModel { + /** + * Associated prediction score for the intent (float). + */ score: number; } -/** - * @class - * Initializes a new instance of the EntityWithResolution class. - * @constructor - * @member {object} resolution Resolution values for pre-built LUIS entities. - */ export interface EntityWithResolution extends EntityModel { + /** + * Resolution values for pre-built LUIS entities. + */ resolution: any; } /** - * @class - * Initializes a new instance of the APIError class. - * @constructor * Error information returned by the API - * - * @member {string} [statusCode] HTTP Status code - * @member {string} [message] Cause of the error. - */ +*/ export interface APIError { + /** + * HTTP Status code + */ statusCode?: string; + /** + * Cause of the error. + */ message?: string; } diff --git a/lib/services/luis/runtime/lib/models/intentModel.js b/lib/services/luis/runtime/lib/models/intentModel.js index 980851d895..d45e47e33e 100644 --- a/lib/services/luis/runtime/lib/models/intentModel.js +++ b/lib/services/luis/runtime/lib/models/intentModel.js @@ -17,8 +17,8 @@ class IntentModel { /** * Create a IntentModel. - * @member {string} [intent] Name of the intent, as defined in LUIS. - * @member {number} [score] Associated prediction score for the intent + * @property {string} [intent] Name of the intent, as defined in LUIS. + * @property {number} [score] Associated prediction score for the intent * (float). */ constructor() { diff --git a/lib/services/luis/runtime/lib/models/luisResult.js b/lib/services/luis/runtime/lib/models/luisResult.js index f80aa9af5f..0b0e9ae011 100644 --- a/lib/services/luis/runtime/lib/models/luisResult.js +++ b/lib/services/luis/runtime/lib/models/luisResult.js @@ -17,24 +17,24 @@ class LuisResult { /** * Create a LuisResult. - * @member {string} [query] The input utterance that was analized. - * @member {string} [alteredQuery] The corrected utterance (when spell + * @property {string} [query] The input utterance that was analized. + * @property {string} [alteredQuery] The corrected utterance (when spell * checking was enabled). - * @member {object} [topScoringIntent] - * @member {string} [topScoringIntent.intent] Name of the intent, as defined - * in LUIS. - * @member {number} [topScoringIntent.score] Associated prediction score for - * the intent (float). - * @member {array} [intents] All the intents (and their score) that were + * @property {object} [topScoringIntent] + * @property {string} [topScoringIntent.intent] Name of the intent, as + * defined in LUIS. + * @property {number} [topScoringIntent.score] Associated prediction score + * for the intent (float). + * @property {array} [intents] All the intents (and their score) that were * detected from utterance. - * @member {array} [entities] The entities extracted from the utterance. - * @member {array} [compositeEntities] The composite entities extracted from - * the utterance. - * @member {object} [sentimentAnalysis] - * @member {string} [sentimentAnalysis.label] The polarity of the sentiment, - * can be positive, neutral or negative. - * @member {number} [sentimentAnalysis.score] Score of the sentiment, ranges - * from 0 (most negative) to 1 (most positive). + * @property {array} [entities] The entities extracted from the utterance. + * @property {array} [compositeEntities] The composite entities extracted + * from the utterance. + * @property {object} [sentimentAnalysis] + * @property {string} [sentimentAnalysis.label] The polarity of the + * sentiment, can be positive, neutral or negative. + * @property {number} [sentimentAnalysis.score] Score of the sentiment, + * ranges from 0 (most negative) to 1 (most positive). */ constructor() { } diff --git a/lib/services/luis/runtime/lib/models/sentiment.js b/lib/services/luis/runtime/lib/models/sentiment.js index 2ff5b1621e..a01ac2b804 100644 --- a/lib/services/luis/runtime/lib/models/sentiment.js +++ b/lib/services/luis/runtime/lib/models/sentiment.js @@ -17,9 +17,9 @@ class Sentiment { /** * Create a Sentiment. - * @member {string} [label] The polarity of the sentiment, can be positive, + * @property {string} [label] The polarity of the sentiment, can be positive, * neutral or negative. - * @member {number} [score] Score of the sentiment, ranges from 0 (most + * @property {number} [score] Score of the sentiment, ranges from 0 (most * negative) to 1 (most positive). */ constructor() { diff --git a/lib/services/luis/runtime/package.json b/lib/services/luis/runtime/package.json index 99ac5b50f9..6a28f33a0e 100644 --- a/lib/services/luis/runtime/package.json +++ b/lib/services/luis/runtime/package.json @@ -2,7 +2,7 @@ "name": "azure-cognitiveservices-luis-runtime", "author": "Microsoft Corporation", "description": "LUISRuntimeClient Library with typescript type definitions for node", - "version": "1.1.0", + "version": "1.1.1", "dependencies": { "ms-rest": "^2.3.3" }, @@ -21,4 +21,4 @@ "bugs": { "url": "https://github.com/azure/azure-sdk-for-node/issues" } -} \ No newline at end of file +} diff --git a/lib/services/mediaServicesManagement/README.md b/lib/services/mediaServicesManagement/README.md index a341ba1297..f931bb9128 100644 --- a/lib/services/mediaServicesManagement/README.md +++ b/lib/services/mediaServicesManagement/README.md @@ -3,40 +3,43 @@ uid: azure-arm-mediaservices summary: *content --- -# Microsoft Azure SDK for Node.js - AzureMediaServices +**This SDK will be deprecated next year and will be replaced by a new TypeScript-based isomorphic SDK (found at https://github.com/Azure/azure-sdk-for-js) which works on Node.js and browsers.** +## Microsoft Azure SDK for Node.js - AzureMediaServices + This project provides a Node.js package for accessing Azure. Right now it supports: - **Node.js version 6.x.x or higher** -## Features +### Features -## How to Install +### How to Install ```bash npm install azure-arm-mediaservices ``` -## How to use +### How to use -### Authentication, client creation and list accountFilters as an example. +#### Authentication, client creation, and list accountFilters as an example. ```javascript const msRestAzure = require("ms-rest-azure"); const AzureMediaServices = require("azure-arm-mediaservices"); msRestAzure.interactiveLogin().then((creds) => { - const subscriptionId = ""; - const client = new AzureMediaServices(creds, subscriptionId); - const resourceGroupName = "testresourceGroupName"; - const accountName = "testaccountName"; - return client.accountFilters.list(resourceGroupName, accountName).then((result) => { - console.log("The result is:"); - console.log(result); - }); + const subscriptionId = ""; + const client = new AzureMediaServices(creds, subscriptionId); + const resourceGroupName = "testresourceGroupName"; + const accountName = "testaccountName"; + + return client.accountFilters.list(resourceGroupName, accountName).then((result) => { + console.log("The result is:"); + console.log(result); + }); }).catch((err) => { console.log('An error occurred:'); console.dir(err, {depth: null, colors: true}); }); - -## Related projects +``` +### Related projects - [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node) diff --git a/lib/services/mediaServicesManagement/lib/models/aacAudio.js b/lib/services/mediaServicesManagement/lib/models/aacAudio.js index e57aa9748d..7b9711b8ad 100644 --- a/lib/services/mediaServicesManagement/lib/models/aacAudio.js +++ b/lib/services/mediaServicesManagement/lib/models/aacAudio.js @@ -20,7 +20,7 @@ const models = require('./index'); class AacAudio extends models['Audio'] { /** * Create a AacAudio. - * @member {string} [profile] The encoding profile to be used when encoding + * @property {string} [profile] The encoding profile to be used when encoding * audio with AAC. Possible values include: 'AacLc', 'HeAacV1', 'HeAacV2' */ constructor() { @@ -86,8 +86,7 @@ class AacAudio extends models['Audio'] { required: false, serializedName: 'profile', type: { - name: 'Enum', - allowedValues: [ 'AacLc', 'HeAacV1', 'HeAacV2' ] + name: 'String' } } } diff --git a/lib/services/mediaServicesManagement/lib/models/accountFilter.js b/lib/services/mediaServicesManagement/lib/models/accountFilter.js index 282b206653..978b747e81 100644 --- a/lib/services/mediaServicesManagement/lib/models/accountFilter.js +++ b/lib/services/mediaServicesManagement/lib/models/accountFilter.js @@ -20,22 +20,22 @@ const models = require('./index'); class AccountFilter extends models['ProxyResource'] { /** * Create a AccountFilter. - * @member {object} [presentationTimeRange] The presentation time range. - * @member {number} [presentationTimeRange.startTimestamp] The absolute start + * @property {object} [presentationTimeRange] The presentation time range. + * @property {number} [presentationTimeRange.startTimestamp] The absolute + * start time boundary. + * @property {number} [presentationTimeRange.endTimestamp] The absolute end * time boundary. - * @member {number} [presentationTimeRange.endTimestamp] The absolute end - * time boundary. - * @member {number} [presentationTimeRange.presentationWindowDuration] The + * @property {number} [presentationTimeRange.presentationWindowDuration] The * relative to end sliding window. - * @member {number} [presentationTimeRange.liveBackoffDuration] The relative - * to end right edge. - * @member {number} [presentationTimeRange.timescale] The time scale of time - * stamps. - * @member {boolean} [presentationTimeRange.forceEndTimestamp] The indicator - * of forcing exsiting of end time stamp. - * @member {object} [firstQuality] The first quality. - * @member {number} [firstQuality.bitrate] The first quality bitrate. - * @member {array} [tracks] The tracks selection conditions. + * @property {number} [presentationTimeRange.liveBackoffDuration] The + * relative to end right edge. + * @property {number} [presentationTimeRange.timescale] The time scale of + * time stamps. + * @property {boolean} [presentationTimeRange.forceEndTimestamp] The + * indicator of forcing exsiting of end time stamp. + * @property {object} [firstQuality] The first quality. + * @property {number} [firstQuality.bitrate] The first quality bitrate. + * @property {array} [tracks] The tracks selection conditions. */ constructor() { super(); diff --git a/lib/services/mediaServicesManagement/lib/models/accountFilterCollection.js b/lib/services/mediaServicesManagement/lib/models/accountFilterCollection.js index 210b556327..15fca0febf 100644 --- a/lib/services/mediaServicesManagement/lib/models/accountFilterCollection.js +++ b/lib/services/mediaServicesManagement/lib/models/accountFilterCollection.js @@ -16,8 +16,9 @@ class AccountFilterCollection extends Array { /** * Create a AccountFilterCollection. - * @member {string} [odatanextLink] A link to the next page of the collection - * (when the collection contains too many results to return in one response). + * @property {string} [odatanextLink] A link to the next page of the + * collection (when the collection contains too many results to return in one + * response). */ constructor() { super(); diff --git a/lib/services/mediaServicesManagement/lib/models/akamaiAccessControl.js b/lib/services/mediaServicesManagement/lib/models/akamaiAccessControl.js index db629466fb..d0627f0587 100644 --- a/lib/services/mediaServicesManagement/lib/models/akamaiAccessControl.js +++ b/lib/services/mediaServicesManagement/lib/models/akamaiAccessControl.js @@ -17,7 +17,7 @@ class AkamaiAccessControl { /** * Create a AkamaiAccessControl. - * @member {array} [akamaiSignatureHeaderAuthenticationKeyList] + * @property {array} [akamaiSignatureHeaderAuthenticationKeyList] * authentication key list */ constructor() { diff --git a/lib/services/mediaServicesManagement/lib/models/akamaiSignatureHeaderAuthenticationKey.js b/lib/services/mediaServicesManagement/lib/models/akamaiSignatureHeaderAuthenticationKey.js index 2bd9ed32f6..612d09514d 100644 --- a/lib/services/mediaServicesManagement/lib/models/akamaiSignatureHeaderAuthenticationKey.js +++ b/lib/services/mediaServicesManagement/lib/models/akamaiSignatureHeaderAuthenticationKey.js @@ -17,9 +17,10 @@ class AkamaiSignatureHeaderAuthenticationKey { /** * Create a AkamaiSignatureHeaderAuthenticationKey. - * @member {string} [identifier] identifier of the key - * @member {string} [base64Key] authentication key - * @member {date} [expiration] The expiration time of the authentication key. + * @property {string} [identifier] identifier of the key + * @property {string} [base64Key] authentication key + * @property {date} [expiration] The expiration time of the authentication + * key. */ constructor() { } diff --git a/lib/services/mediaServicesManagement/lib/models/apiError.js b/lib/services/mediaServicesManagement/lib/models/apiError.js index c46090683e..bdeae0df60 100644 --- a/lib/services/mediaServicesManagement/lib/models/apiError.js +++ b/lib/services/mediaServicesManagement/lib/models/apiError.js @@ -17,12 +17,12 @@ class ApiError { /** * Create a ApiError. - * @member {object} [error] ApiError. The error properties. - * @member {string} [error.code] A language-independent error name. - * @member {string} [error.message] The error message. - * @member {string} [error.target] The target of the error (for example, the - * name of the property in error). - * @member {array} [error.details] The error details. + * @property {object} [error] ApiError. The error properties. + * @property {string} [error.code] A language-independent error name. + * @property {string} [error.message] The error message. + * @property {string} [error.target] The target of the error (for example, + * the name of the property in error). + * @property {array} [error.details] The error details. */ constructor() { } diff --git a/lib/services/mediaServicesManagement/lib/models/asset.js b/lib/services/mediaServicesManagement/lib/models/asset.js index 63876ee283..29d8560c42 100644 --- a/lib/services/mediaServicesManagement/lib/models/asset.js +++ b/lib/services/mediaServicesManagement/lib/models/asset.js @@ -20,14 +20,14 @@ const models = require('./index'); class Asset extends models['ProxyResource'] { /** * Create a Asset. - * @member {uuid} [assetId] The Asset ID. - * @member {date} [created] The creation date of the Asset. - * @member {date} [lastModified] The last modified date of the Asset. - * @member {string} [alternateId] The alternate ID of the Asset. - * @member {string} [description] The Asset description. - * @member {string} [container] The name of the asset blob container. - * @member {string} [storageAccountName] The name of the storage account. - * @member {string} [storageEncryptionFormat] The Asset encryption format. + * @property {uuid} [assetId] The Asset ID. + * @property {date} [created] The creation date of the Asset. + * @property {date} [lastModified] The last modified date of the Asset. + * @property {string} [alternateId] The alternate ID of the Asset. + * @property {string} [description] The Asset description. + * @property {string} [container] The name of the asset blob container. + * @property {string} [storageAccountName] The name of the storage account. + * @property {string} [storageEncryptionFormat] The Asset encryption format. * One of None or MediaStorageEncryption. Possible values include: 'None', * 'MediaStorageClientEncryption' */ @@ -134,8 +134,7 @@ class Asset extends models['ProxyResource'] { readOnly: true, serializedName: 'properties.storageEncryptionFormat', type: { - name: 'Enum', - allowedValues: [ 'None', 'MediaStorageClientEncryption' ] + name: 'String' } } } diff --git a/lib/services/mediaServicesManagement/lib/models/assetCollection.js b/lib/services/mediaServicesManagement/lib/models/assetCollection.js index 56bd4090df..8269570a53 100644 --- a/lib/services/mediaServicesManagement/lib/models/assetCollection.js +++ b/lib/services/mediaServicesManagement/lib/models/assetCollection.js @@ -16,8 +16,9 @@ class AssetCollection extends Array { /** * Create a AssetCollection. - * @member {string} [odatanextLink] A link to the next page of the collection - * (when the collection contains too many results to return in one response). + * @property {string} [odatanextLink] A link to the next page of the + * collection (when the collection contains too many results to return in one + * response). */ constructor() { super(); diff --git a/lib/services/mediaServicesManagement/lib/models/assetContainerSas.js b/lib/services/mediaServicesManagement/lib/models/assetContainerSas.js index db96730aa1..39cb7bec76 100644 --- a/lib/services/mediaServicesManagement/lib/models/assetContainerSas.js +++ b/lib/services/mediaServicesManagement/lib/models/assetContainerSas.js @@ -17,7 +17,7 @@ class AssetContainerSas { /** * Create a AssetContainerSas. - * @member {array} [assetContainerSasUrls] The list of Asset container SAS + * @property {array} [assetContainerSasUrls] The list of Asset container SAS * URLs. */ constructor() { diff --git a/lib/services/mediaServicesManagement/lib/models/assetFileEncryptionMetadata.js b/lib/services/mediaServicesManagement/lib/models/assetFileEncryptionMetadata.js index 127d6e784c..7bfda41866 100644 --- a/lib/services/mediaServicesManagement/lib/models/assetFileEncryptionMetadata.js +++ b/lib/services/mediaServicesManagement/lib/models/assetFileEncryptionMetadata.js @@ -17,10 +17,10 @@ class AssetFileEncryptionMetadata { /** * Create a AssetFileEncryptionMetadata. - * @member {string} [initializationVector] The Asset File initialization + * @property {string} [initializationVector] The Asset File initialization * vector. - * @member {string} [assetFileName] The Asset File name. - * @member {uuid} assetFileId The Asset File Id. + * @property {string} [assetFileName] The Asset File name. + * @property {uuid} assetFileId The Asset File Id. */ constructor() { } diff --git a/lib/services/mediaServicesManagement/lib/models/assetFilter.js b/lib/services/mediaServicesManagement/lib/models/assetFilter.js index 456a6c18f8..a7d6484fe0 100644 --- a/lib/services/mediaServicesManagement/lib/models/assetFilter.js +++ b/lib/services/mediaServicesManagement/lib/models/assetFilter.js @@ -20,22 +20,22 @@ const models = require('./index'); class AssetFilter extends models['ProxyResource'] { /** * Create a AssetFilter. - * @member {object} [presentationTimeRange] The presentation time range. - * @member {number} [presentationTimeRange.startTimestamp] The absolute start + * @property {object} [presentationTimeRange] The presentation time range. + * @property {number} [presentationTimeRange.startTimestamp] The absolute + * start time boundary. + * @property {number} [presentationTimeRange.endTimestamp] The absolute end * time boundary. - * @member {number} [presentationTimeRange.endTimestamp] The absolute end - * time boundary. - * @member {number} [presentationTimeRange.presentationWindowDuration] The + * @property {number} [presentationTimeRange.presentationWindowDuration] The * relative to end sliding window. - * @member {number} [presentationTimeRange.liveBackoffDuration] The relative - * to end right edge. - * @member {number} [presentationTimeRange.timescale] The time scale of time - * stamps. - * @member {boolean} [presentationTimeRange.forceEndTimestamp] The indicator - * of forcing exsiting of end time stamp. - * @member {object} [firstQuality] The first quality. - * @member {number} [firstQuality.bitrate] The first quality bitrate. - * @member {array} [tracks] The tracks selection conditions. + * @property {number} [presentationTimeRange.liveBackoffDuration] The + * relative to end right edge. + * @property {number} [presentationTimeRange.timescale] The time scale of + * time stamps. + * @property {boolean} [presentationTimeRange.forceEndTimestamp] The + * indicator of forcing exsiting of end time stamp. + * @property {object} [firstQuality] The first quality. + * @property {number} [firstQuality.bitrate] The first quality bitrate. + * @property {array} [tracks] The tracks selection conditions. */ constructor() { super(); diff --git a/lib/services/mediaServicesManagement/lib/models/assetFilterCollection.js b/lib/services/mediaServicesManagement/lib/models/assetFilterCollection.js index 3f3f0ec041..91f106c8fd 100644 --- a/lib/services/mediaServicesManagement/lib/models/assetFilterCollection.js +++ b/lib/services/mediaServicesManagement/lib/models/assetFilterCollection.js @@ -16,8 +16,9 @@ class AssetFilterCollection extends Array { /** * Create a AssetFilterCollection. - * @member {string} [odatanextLink] A link to the next page of the collection - * (when the collection contains too many results to return in one response). + * @property {string} [odatanextLink] A link to the next page of the + * collection (when the collection contains too many results to return in one + * response). */ constructor() { super(); diff --git a/lib/services/mediaServicesManagement/lib/models/assetStreamingLocator.js b/lib/services/mediaServicesManagement/lib/models/assetStreamingLocator.js index df4bd4ee21..01625fea94 100644 --- a/lib/services/mediaServicesManagement/lib/models/assetStreamingLocator.js +++ b/lib/services/mediaServicesManagement/lib/models/assetStreamingLocator.js @@ -17,16 +17,16 @@ class AssetStreamingLocator { /** * Create a AssetStreamingLocator. - * @member {string} [name] Streaming Locator name. - * @member {string} [assetName] Asset Name. - * @member {date} [created] The creation time of the Streaming Locator. - * @member {date} [startTime] The start time of the Streaming Locator. - * @member {date} [endTime] The end time of the Streaming Locator. - * @member {uuid} [streamingLocatorId] StreamingLocatorId of the Streaming + * @property {string} [name] Streaming Locator name. + * @property {string} [assetName] Asset Name. + * @property {date} [created] The creation time of the Streaming Locator. + * @property {date} [startTime] The start time of the Streaming Locator. + * @property {date} [endTime] The end time of the Streaming Locator. + * @property {uuid} [streamingLocatorId] StreamingLocatorId of the Streaming * Locator. - * @member {string} [streamingPolicyName] Name of the Streaming Policy used + * @property {string} [streamingPolicyName] Name of the Streaming Policy used * by this Streaming Locator. - * @member {string} [defaultContentKeyPolicyName] Name of the default + * @property {string} [defaultContentKeyPolicyName] Name of the default * ContentKeyPolicy used by this Streaming Locator. */ constructor() { diff --git a/lib/services/mediaServicesManagement/lib/models/audio.js b/lib/services/mediaServicesManagement/lib/models/audio.js index 78d73fa2dc..e192850efd 100644 --- a/lib/services/mediaServicesManagement/lib/models/audio.js +++ b/lib/services/mediaServicesManagement/lib/models/audio.js @@ -20,11 +20,11 @@ const models = require('./index'); class Audio extends models['Codec'] { /** * Create a Audio. - * @member {number} [channels] The number of channels in the audio. - * @member {number} [samplingRate] The sampling rate to use for encoding in + * @property {number} [channels] The number of channels in the audio. + * @property {number} [samplingRate] The sampling rate to use for encoding in * hertz. - * @member {number} [bitrate] The bitrate, in bits per second, of the output - * encoded audio. + * @property {number} [bitrate] The bitrate, in bits per second, of the + * output encoded audio. */ constructor() { super(); diff --git a/lib/services/mediaServicesManagement/lib/models/audioAnalyzerPreset.js b/lib/services/mediaServicesManagement/lib/models/audioAnalyzerPreset.js index af9c404eb7..e7f3b1f80f 100644 --- a/lib/services/mediaServicesManagement/lib/models/audioAnalyzerPreset.js +++ b/lib/services/mediaServicesManagement/lib/models/audioAnalyzerPreset.js @@ -22,9 +22,9 @@ const models = require('./index'); class AudioAnalyzerPreset extends models['Preset'] { /** * Create a AudioAnalyzerPreset. - * @member {string} [audioLanguage] The language for the audio payload in the - * input using the BCP-47 format of 'language tag-region' (e.g: 'en-US'). The - * list of supported languages are, 'en-US', 'en-GB', 'es-ES', 'es-MX', + * @property {string} [audioLanguage] The language for the audio payload in + * the input using the BCP-47 format of 'language tag-region' (e.g: 'en-US'). + * The list of supported languages are, 'en-US', 'en-GB', 'es-ES', 'es-MX', * 'fr-FR', 'it-IT', 'ja-JP', 'pt-BR', 'zh-CN', 'de-DE', 'ar-EG', 'ru-RU', * 'hi-IN'. If not specified, automatic language detection would be employed. * This feature currently supports English, Chinese, French, German, Italian, diff --git a/lib/services/mediaServicesManagement/lib/models/builtInStandardEncoderPreset.js b/lib/services/mediaServicesManagement/lib/models/builtInStandardEncoderPreset.js index 3b0aee1b41..668e4ad105 100644 --- a/lib/services/mediaServicesManagement/lib/models/builtInStandardEncoderPreset.js +++ b/lib/services/mediaServicesManagement/lib/models/builtInStandardEncoderPreset.js @@ -21,7 +21,7 @@ const models = require('./index'); class BuiltInStandardEncoderPreset extends models['Preset'] { /** * Create a BuiltInStandardEncoderPreset. - * @member {string} presetName The built-in preset to be used for encoding + * @property {string} presetName The built-in preset to be used for encoding * videos. Possible values include: 'H264SingleBitrateSD', * 'H264SingleBitrate720p', 'H264SingleBitrate1080p', 'AdaptiveStreaming', * 'AACGoodQualityAudio', 'H264MultipleBitrate1080p', @@ -62,8 +62,7 @@ class BuiltInStandardEncoderPreset extends models['Preset'] { required: true, serializedName: 'presetName', type: { - name: 'Enum', - allowedValues: [ 'H264SingleBitrateSD', 'H264SingleBitrate720p', 'H264SingleBitrate1080p', 'AdaptiveStreaming', 'AACGoodQualityAudio', 'H264MultipleBitrate1080p', 'H264MultipleBitrate720p', 'H264MultipleBitrateSD' ] + name: 'String' } } } diff --git a/lib/services/mediaServicesManagement/lib/models/cbcsDrmConfiguration.js b/lib/services/mediaServicesManagement/lib/models/cbcsDrmConfiguration.js index fd53711b80..32817c69d0 100644 --- a/lib/services/mediaServicesManagement/lib/models/cbcsDrmConfiguration.js +++ b/lib/services/mediaServicesManagement/lib/models/cbcsDrmConfiguration.js @@ -18,20 +18,20 @@ class CbcsDrmConfiguration { /** * Create a CbcsDrmConfiguration. - * @member {object} [fairPlay] FairPlay configurations - * @member {string} [fairPlay.customLicenseAcquisitionUrlTemplate] The + * @property {object} [fairPlay] FairPlay configurations + * @property {string} [fairPlay.customLicenseAcquisitionUrlTemplate] The * template for a customer service to deliver keys to end users. Not needed * when using Azure Media Services for issuing keys. - * @member {boolean} [fairPlay.allowPersistentLicense] All license to be + * @property {boolean} [fairPlay.allowPersistentLicense] All license to be * persistent or not - * @member {object} [playReady] PlayReady configurations - * @member {string} [playReady.customLicenseAcquisitionUrlTemplate] The + * @property {object} [playReady] PlayReady configurations + * @property {string} [playReady.customLicenseAcquisitionUrlTemplate] The * template for a customer service to deliver keys to end users. Not needed * when using Azure Media Services for issuing keys. - * @member {string} [playReady.playReadyCustomAttributes] Custom attributes + * @property {string} [playReady.playReadyCustomAttributes] Custom attributes * for PlayReady - * @member {object} [widevine] Widevine configurations - * @member {string} [widevine.customLicenseAcquisitionUrlTemplate] The + * @property {object} [widevine] Widevine configurations + * @property {string} [widevine.customLicenseAcquisitionUrlTemplate] The * template for a customer service to deliver keys to end users. Not needed * when using Azure Media Services for issuing keys. */ diff --git a/lib/services/mediaServicesManagement/lib/models/cencDrmConfiguration.js b/lib/services/mediaServicesManagement/lib/models/cencDrmConfiguration.js index 71e8e992a5..16adddcf21 100644 --- a/lib/services/mediaServicesManagement/lib/models/cencDrmConfiguration.js +++ b/lib/services/mediaServicesManagement/lib/models/cencDrmConfiguration.js @@ -18,14 +18,14 @@ class CencDrmConfiguration { /** * Create a CencDrmConfiguration. - * @member {object} [playReady] PlayReady configurations - * @member {string} [playReady.customLicenseAcquisitionUrlTemplate] The + * @property {object} [playReady] PlayReady configurations + * @property {string} [playReady.customLicenseAcquisitionUrlTemplate] The * template for a customer service to deliver keys to end users. Not needed * when using Azure Media Services for issuing keys. - * @member {string} [playReady.playReadyCustomAttributes] Custom attributes + * @property {string} [playReady.playReadyCustomAttributes] Custom attributes * for PlayReady - * @member {object} [widevine] Widevine configurations - * @member {string} [widevine.customLicenseAcquisitionUrlTemplate] The + * @property {object} [widevine] Widevine configurations + * @property {string} [widevine.customLicenseAcquisitionUrlTemplate] The * template for a customer service to deliver keys to end users. Not needed * when using Azure Media Services for issuing keys. */ diff --git a/lib/services/mediaServicesManagement/lib/models/checkNameAvailabilityInput.js b/lib/services/mediaServicesManagement/lib/models/checkNameAvailabilityInput.js index 9db8c9a74b..7bc675ca1e 100644 --- a/lib/services/mediaServicesManagement/lib/models/checkNameAvailabilityInput.js +++ b/lib/services/mediaServicesManagement/lib/models/checkNameAvailabilityInput.js @@ -17,8 +17,8 @@ class CheckNameAvailabilityInput { /** * Create a CheckNameAvailabilityInput. - * @member {string} [name] The account name. - * @member {string} [type] The account type. For a Media Services account, + * @property {string} [name] The account name. + * @property {string} [type] The account type. For a Media Services account, * this should be 'MediaServices'. */ constructor() { diff --git a/lib/services/mediaServicesManagement/lib/models/codec.js b/lib/services/mediaServicesManagement/lib/models/codec.js index eb34d76eb7..9e29bf8ab7 100644 --- a/lib/services/mediaServicesManagement/lib/models/codec.js +++ b/lib/services/mediaServicesManagement/lib/models/codec.js @@ -17,9 +17,9 @@ class Codec { /** * Create a Codec. - * @member {string} [label] An optional label for the codec. The label can be - * used to control muxing behavior. - * @member {string} odatatype Polymorphic Discriminator + * @property {string} [label] An optional label for the codec. The label can + * be used to control muxing behavior. + * @property {string} odatatype Polymorphic Discriminator */ constructor() { } diff --git a/lib/services/mediaServicesManagement/lib/models/commonEncryptionCbcs.js b/lib/services/mediaServicesManagement/lib/models/commonEncryptionCbcs.js index 5699c74024..9a79c3f8e7 100644 --- a/lib/services/mediaServicesManagement/lib/models/commonEncryptionCbcs.js +++ b/lib/services/mediaServicesManagement/lib/models/commonEncryptionCbcs.js @@ -17,40 +17,41 @@ class CommonEncryptionCbcs { /** * Create a CommonEncryptionCbcs. - * @member {object} [enabledProtocols] Representing supported protocols - * @member {boolean} [enabledProtocols.download] Enable Download protocol or - * not - * @member {boolean} [enabledProtocols.dash] Enable DASH protocol or not - * @member {boolean} [enabledProtocols.hls] Enable HLS protocol or not - * @member {boolean} [enabledProtocols.smoothStreaming] Enable + * @property {object} [enabledProtocols] Representing supported protocols + * @property {boolean} [enabledProtocols.download] Enable Download protocol + * or not + * @property {boolean} [enabledProtocols.dash] Enable DASH protocol or not + * @property {boolean} [enabledProtocols.hls] Enable HLS protocol or not + * @property {boolean} [enabledProtocols.smoothStreaming] Enable * SmoothStreaming protocol or not - * @member {array} [clearTracks] Representing which tracks should not be + * @property {array} [clearTracks] Representing which tracks should not be * encrypted - * @member {object} [contentKeys] Representing default content key for each + * @property {object} [contentKeys] Representing default content key for each * encryption scheme and separate content keys for specific tracks - * @member {object} [contentKeys.defaultKey] Default content key for an + * @property {object} [contentKeys.defaultKey] Default content key for an * encryption scheme - * @member {string} [contentKeys.defaultKey.label] Label can be used to + * @property {string} [contentKeys.defaultKey.label] Label can be used to * specify Content Key when creating a Streaming Locator - * @member {string} [contentKeys.defaultKey.policyName] Policy used by + * @property {string} [contentKeys.defaultKey.policyName] Policy used by * Default Key - * @member {array} [contentKeys.keyToTrackMappings] Representing tracks needs - * separate content key - * @member {object} [drm] Configuration of DRMs for current encryption scheme - * @member {object} [drm.fairPlay] FairPlay configurations - * @member {string} [drm.fairPlay.customLicenseAcquisitionUrlTemplate] The + * @property {array} [contentKeys.keyToTrackMappings] Representing tracks + * needs separate content key + * @property {object} [drm] Configuration of DRMs for current encryption + * scheme + * @property {object} [drm.fairPlay] FairPlay configurations + * @property {string} [drm.fairPlay.customLicenseAcquisitionUrlTemplate] The * template for a customer service to deliver keys to end users. Not needed * when using Azure Media Services for issuing keys. - * @member {boolean} [drm.fairPlay.allowPersistentLicense] All license to be - * persistent or not - * @member {object} [drm.playReady] PlayReady configurations - * @member {string} [drm.playReady.customLicenseAcquisitionUrlTemplate] The + * @property {boolean} [drm.fairPlay.allowPersistentLicense] All license to + * be persistent or not + * @property {object} [drm.playReady] PlayReady configurations + * @property {string} [drm.playReady.customLicenseAcquisitionUrlTemplate] The * template for a customer service to deliver keys to end users. Not needed * when using Azure Media Services for issuing keys. - * @member {string} [drm.playReady.playReadyCustomAttributes] Custom + * @property {string} [drm.playReady.playReadyCustomAttributes] Custom * attributes for PlayReady - * @member {object} [drm.widevine] Widevine configurations - * @member {string} [drm.widevine.customLicenseAcquisitionUrlTemplate] The + * @property {object} [drm.widevine] Widevine configurations + * @property {string} [drm.widevine.customLicenseAcquisitionUrlTemplate] The * template for a customer service to deliver keys to end users. Not needed * when using Azure Media Services for issuing keys. */ diff --git a/lib/services/mediaServicesManagement/lib/models/commonEncryptionCenc.js b/lib/services/mediaServicesManagement/lib/models/commonEncryptionCenc.js index 8b95457158..e97dd61a95 100644 --- a/lib/services/mediaServicesManagement/lib/models/commonEncryptionCenc.js +++ b/lib/services/mediaServicesManagement/lib/models/commonEncryptionCenc.js @@ -17,35 +17,35 @@ class CommonEncryptionCenc { /** * Create a CommonEncryptionCenc. - * @member {object} [enabledProtocols] Representing supported protocols - * @member {boolean} [enabledProtocols.download] Enable Download protocol or - * not - * @member {boolean} [enabledProtocols.dash] Enable DASH protocol or not - * @member {boolean} [enabledProtocols.hls] Enable HLS protocol or not - * @member {boolean} [enabledProtocols.smoothStreaming] Enable + * @property {object} [enabledProtocols] Representing supported protocols + * @property {boolean} [enabledProtocols.download] Enable Download protocol + * or not + * @property {boolean} [enabledProtocols.dash] Enable DASH protocol or not + * @property {boolean} [enabledProtocols.hls] Enable HLS protocol or not + * @property {boolean} [enabledProtocols.smoothStreaming] Enable * SmoothStreaming protocol or not - * @member {array} [clearTracks] Representing which tracks should not be + * @property {array} [clearTracks] Representing which tracks should not be * encrypted - * @member {object} [contentKeys] Representing default content key for each + * @property {object} [contentKeys] Representing default content key for each * encryption scheme and separate content keys for specific tracks - * @member {object} [contentKeys.defaultKey] Default content key for an + * @property {object} [contentKeys.defaultKey] Default content key for an * encryption scheme - * @member {string} [contentKeys.defaultKey.label] Label can be used to + * @property {string} [contentKeys.defaultKey.label] Label can be used to * specify Content Key when creating a Streaming Locator - * @member {string} [contentKeys.defaultKey.policyName] Policy used by + * @property {string} [contentKeys.defaultKey.policyName] Policy used by * Default Key - * @member {array} [contentKeys.keyToTrackMappings] Representing tracks needs - * separate content key - * @member {object} [drm] Configuration of DRMs for CommonEncryptionCenc + * @property {array} [contentKeys.keyToTrackMappings] Representing tracks + * needs separate content key + * @property {object} [drm] Configuration of DRMs for CommonEncryptionCenc * encryption scheme - * @member {object} [drm.playReady] PlayReady configurations - * @member {string} [drm.playReady.customLicenseAcquisitionUrlTemplate] The + * @property {object} [drm.playReady] PlayReady configurations + * @property {string} [drm.playReady.customLicenseAcquisitionUrlTemplate] The * template for a customer service to deliver keys to end users. Not needed * when using Azure Media Services for issuing keys. - * @member {string} [drm.playReady.playReadyCustomAttributes] Custom + * @property {string} [drm.playReady.playReadyCustomAttributes] Custom * attributes for PlayReady - * @member {object} [drm.widevine] Widevine configurations - * @member {string} [drm.widevine.customLicenseAcquisitionUrlTemplate] The + * @property {object} [drm.widevine] Widevine configurations + * @property {string} [drm.widevine.customLicenseAcquisitionUrlTemplate] The * template for a customer service to deliver keys to end users. Not needed * when using Azure Media Services for issuing keys. */ diff --git a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicy.js b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicy.js index 96cbab4094..bd52756efb 100644 --- a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicy.js +++ b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicy.js @@ -20,11 +20,11 @@ const models = require('./index'); class ContentKeyPolicy extends models['ProxyResource'] { /** * Create a ContentKeyPolicy. - * @member {uuid} [policyId] The legacy Policy ID. - * @member {date} [created] The creation date of the Policy - * @member {date} [lastModified] The last modified date of the Policy - * @member {string} [description] A description for the Policy. - * @member {array} options The Key Policy options. + * @property {uuid} [policyId] The legacy Policy ID. + * @property {date} [created] The creation date of the Policy + * @property {date} [lastModified] The last modified date of the Policy + * @property {string} [description] A description for the Policy. + * @property {array} options The Key Policy options. */ constructor() { super(); diff --git a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyCollection.js b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyCollection.js index 7c1462a17a..9c3a17c1f8 100644 --- a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyCollection.js +++ b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyCollection.js @@ -16,8 +16,9 @@ class ContentKeyPolicyCollection extends Array { /** * Create a ContentKeyPolicyCollection. - * @member {string} [odatanextLink] A link to the next page of the collection - * (when the collection contains too many results to return in one response). + * @property {string} [odatanextLink] A link to the next page of the + * collection (when the collection contains too many results to return in one + * response). */ constructor() { super(); diff --git a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyConfiguration.js b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyConfiguration.js index a6795547fc..cbe2a7c624 100644 --- a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyConfiguration.js +++ b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyConfiguration.js @@ -18,7 +18,7 @@ class ContentKeyPolicyConfiguration { /** * Create a ContentKeyPolicyConfiguration. - * @member {string} odatatype Polymorphic Discriminator + * @property {string} odatatype Polymorphic Discriminator */ constructor() { } diff --git a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyFairPlayConfiguration.js b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyFairPlayConfiguration.js index 6b38bb138f..96a667e94f 100644 --- a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyFairPlayConfiguration.js +++ b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyFairPlayConfiguration.js @@ -20,17 +20,17 @@ const models = require('./index'); class ContentKeyPolicyFairPlayConfiguration extends models['ContentKeyPolicyConfiguration'] { /** * Create a ContentKeyPolicyFairPlayConfiguration. - * @member {buffer} ask The key that must be used as FairPlay Application + * @property {buffer} ask The key that must be used as FairPlay Application * Secret key. - * @member {string} fairPlayPfxPassword The password encrypting FairPlay + * @property {string} fairPlayPfxPassword The password encrypting FairPlay * certificate in PKCS 12 (pfx) format. - * @member {string} fairPlayPfx The Base64 representation of FairPlay + * @property {string} fairPlayPfx The Base64 representation of FairPlay * certificate in PKCS 12 (pfx) format (including private key). - * @member {string} rentalAndLeaseKeyType The rental and lease key type. + * @property {string} rentalAndLeaseKeyType The rental and lease key type. * Possible values include: 'Unknown', 'Undefined', 'PersistentUnlimited', * 'PersistentLimited' - * @member {number} rentalDuration The rental duration. Must be greater than - * or equal to 0. + * @property {number} rentalDuration The rental duration. Must be greater + * than or equal to 0. */ constructor() { super(); @@ -88,8 +88,7 @@ class ContentKeyPolicyFairPlayConfiguration extends models['ContentKeyPolicyConf required: true, serializedName: 'rentalAndLeaseKeyType', type: { - name: 'Enum', - allowedValues: [ 'Unknown', 'Undefined', 'PersistentUnlimited', 'PersistentLimited' ] + name: 'String' } }, rentalDuration: { diff --git a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyOption.js b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyOption.js index 87f967d262..d5c0ae83aa 100644 --- a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyOption.js +++ b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyOption.js @@ -17,13 +17,13 @@ class ContentKeyPolicyOption { /** * Create a ContentKeyPolicyOption. - * @member {uuid} [policyOptionId] The legacy Policy Option ID. - * @member {string} [name] The Policy Option description. - * @member {object} configuration The key delivery configuration. - * @member {string} [configuration.odatatype] Polymorphic Discriminator - * @member {object} restriction The requirements that must be met to deliver - * keys with this configuration - * @member {string} [restriction.odatatype] Polymorphic Discriminator + * @property {uuid} [policyOptionId] The legacy Policy Option ID. + * @property {string} [name] The Policy Option description. + * @property {object} configuration The key delivery configuration. + * @property {string} [configuration.odatatype] Polymorphic Discriminator + * @property {object} restriction The requirements that must be met to + * deliver keys with this configuration + * @property {string} [restriction.odatatype] Polymorphic Discriminator */ constructor() { } diff --git a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyPlayReadyConfiguration.js b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyPlayReadyConfiguration.js index 541e7330c3..e5a7db01a7 100644 --- a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyPlayReadyConfiguration.js +++ b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyPlayReadyConfiguration.js @@ -20,8 +20,8 @@ const models = require('./index'); class ContentKeyPolicyPlayReadyConfiguration extends models['ContentKeyPolicyConfiguration'] { /** * Create a ContentKeyPolicyPlayReadyConfiguration. - * @member {array} licenses The PlayReady licenses. - * @member {string} [responseCustomData] The custom response data. + * @property {array} licenses The PlayReady licenses. + * @property {string} [responseCustomData] The custom response data. */ constructor() { super(); diff --git a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier.js b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier.js index e97980c219..8d590e49a7 100644 --- a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier.js +++ b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier.js @@ -21,7 +21,7 @@ const models = require('./index'); class ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier extends models['ContentKeyPolicyPlayReadyContentKeyLocation'] { /** * Create a ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier. - * @member {uuid} keyId The content key ID. + * @property {uuid} keyId The content key ID. */ constructor() { super(); diff --git a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyPlayReadyContentKeyLocation.js b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyPlayReadyContentKeyLocation.js index b26fd3bdff..205c5edcdc 100644 --- a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyPlayReadyContentKeyLocation.js +++ b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyPlayReadyContentKeyLocation.js @@ -18,7 +18,7 @@ class ContentKeyPolicyPlayReadyContentKeyLocation { /** * Create a ContentKeyPolicyPlayReadyContentKeyLocation. - * @member {string} odatatype Polymorphic Discriminator + * @property {string} odatatype Polymorphic Discriminator */ constructor() { } diff --git a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction.js b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction.js index c8d09bc139..40526c45a7 100644 --- a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction.js +++ b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction.js @@ -18,9 +18,9 @@ class ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction { /** * Create a ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction. - * @member {boolean} bestEffort Indicates whether this restriction is + * @property {boolean} bestEffort Indicates whether this restriction is * enforced on a Best Effort basis. - * @member {number} configurationData Configures the restriction control + * @property {number} configurationData Configures the restriction control * bits. Must be between 0 and 3 inclusive. */ constructor() { diff --git a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyPlayReadyLicense.js b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyPlayReadyLicense.js index 52d3eb2f8c..e94c21d035 100644 --- a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyPlayReadyLicense.js +++ b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyPlayReadyLicense.js @@ -17,63 +17,64 @@ class ContentKeyPolicyPlayReadyLicense { /** * Create a ContentKeyPolicyPlayReadyLicense. - * @member {boolean} allowTestDevices A flag indicating whether test devices - * can use the license. - * @member {date} [beginDate] The begin date of license - * @member {date} [expirationDate] The expiration date of license. - * @member {moment.duration} [relativeBeginDate] The relative begin date of + * @property {boolean} allowTestDevices A flag indicating whether test + * devices can use the license. + * @property {date} [beginDate] The begin date of license + * @property {date} [expirationDate] The expiration date of license. + * @property {moment.duration} [relativeBeginDate] The relative begin date of * license. - * @member {moment.duration} [relativeExpirationDate] The relative expiration - * date of license. - * @member {moment.duration} [gracePeriod] The grace period of license. - * @member {object} [playRight] The license PlayRight - * @member {moment.duration} [playRight.firstPlayExpiration] The amount of + * @property {moment.duration} [relativeExpirationDate] The relative + * expiration date of license. + * @property {moment.duration} [gracePeriod] The grace period of license. + * @property {object} [playRight] The license PlayRight + * @property {moment.duration} [playRight.firstPlayExpiration] The amount of * time that the license is valid after the license is first used to play * content. - * @member {number} [playRight.scmsRestriction] Configures the Serial Copy + * @property {number} [playRight.scmsRestriction] Configures the Serial Copy * Management System (SCMS) in the license. Must be between 0 and 3 * inclusive. - * @member {number} [playRight.agcAndColorStripeRestriction] Configures + * @property {number} [playRight.agcAndColorStripeRestriction] Configures * Automatic Gain Control (AGC) and Color Stripe in the license. Must be * between 0 and 3 inclusive. - * @member {object} [playRight.explicitAnalogTelevisionOutputRestriction] + * @property {object} [playRight.explicitAnalogTelevisionOutputRestriction] * Configures the Explicit Analog Television Output Restriction in the * license. Configuration data must be between 0 and 3 inclusive. - * @member {boolean} + * @property {boolean} * [playRight.explicitAnalogTelevisionOutputRestriction.bestEffort] Indicates * whether this restriction is enforced on a Best Effort basis. - * @member {number} + * @property {number} * [playRight.explicitAnalogTelevisionOutputRestriction.configurationData] * Configures the restriction control bits. Must be between 0 and 3 * inclusive. - * @member {boolean} [playRight.digitalVideoOnlyContentRestriction] Enables + * @property {boolean} [playRight.digitalVideoOnlyContentRestriction] Enables * the Image Constraint For Analog Component Video Restriction in the * license. - * @member {boolean} + * @property {boolean} * [playRight.imageConstraintForAnalogComponentVideoRestriction] Enables the * Image Constraint For Analog Component Video Restriction in the license. - * @member {boolean} + * @property {boolean} * [playRight.imageConstraintForAnalogComputerMonitorRestriction] Enables the * Image Constraint For Analog Component Video Restriction in the license. - * @member {string} [playRight.allowPassingVideoContentToUnknownOutput] + * @property {string} [playRight.allowPassingVideoContentToUnknownOutput] * Configures Unknown output handling settings of the license. Possible * values include: 'Unknown', 'NotAllowed', 'Allowed', * 'AllowedWithVideoConstriction' - * @member {number} [playRight.uncompressedDigitalVideoOpl] Specifies the + * @property {number} [playRight.uncompressedDigitalVideoOpl] Specifies the * output protection level for uncompressed digital video. - * @member {number} [playRight.compressedDigitalVideoOpl] Specifies the + * @property {number} [playRight.compressedDigitalVideoOpl] Specifies the * output protection level for compressed digital video. - * @member {number} [playRight.analogVideoOpl] Specifies the output + * @property {number} [playRight.analogVideoOpl] Specifies the output * protection level for compressed digital audio. - * @member {number} [playRight.compressedDigitalAudioOpl] Specifies the + * @property {number} [playRight.compressedDigitalAudioOpl] Specifies the * output protection level for compressed digital audio. - * @member {number} [playRight.uncompressedDigitalAudioOpl] Specifies the + * @property {number} [playRight.uncompressedDigitalAudioOpl] Specifies the * output protection level for uncompressed digital audio. - * @member {string} licenseType The license type. Possible values include: + * @property {string} licenseType The license type. Possible values include: * 'Unknown', 'NonPersistent', 'Persistent' - * @member {object} contentKeyLocation The content key location. - * @member {string} [contentKeyLocation.odatatype] Polymorphic Discriminator - * @member {string} contentType The PlayReady content type. Possible values + * @property {object} contentKeyLocation The content key location. + * @property {string} [contentKeyLocation.odatatype] Polymorphic + * Discriminator + * @property {string} contentType The PlayReady content type. Possible values * include: 'Unknown', 'Unspecified', 'UltraVioletDownload', * 'UltraVioletStreaming' */ @@ -148,8 +149,7 @@ class ContentKeyPolicyPlayReadyLicense { required: true, serializedName: 'licenseType', type: { - name: 'Enum', - allowedValues: [ 'Unknown', 'NonPersistent', 'Persistent' ] + name: 'String' } }, contentKeyLocation: { @@ -169,8 +169,7 @@ class ContentKeyPolicyPlayReadyLicense { required: true, serializedName: 'contentType', type: { - name: 'Enum', - allowedValues: [ 'Unknown', 'Unspecified', 'UltraVioletDownload', 'UltraVioletStreaming' ] + name: 'String' } } } diff --git a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyPlayReadyPlayRight.js b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyPlayReadyPlayRight.js index 218ccc99c8..0fc6e7c4a7 100644 --- a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyPlayReadyPlayRight.js +++ b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyPlayReadyPlayRight.js @@ -17,41 +17,41 @@ class ContentKeyPolicyPlayReadyPlayRight { /** * Create a ContentKeyPolicyPlayReadyPlayRight. - * @member {moment.duration} [firstPlayExpiration] The amount of time that + * @property {moment.duration} [firstPlayExpiration] The amount of time that * the license is valid after the license is first used to play content. - * @member {number} [scmsRestriction] Configures the Serial Copy Management + * @property {number} [scmsRestriction] Configures the Serial Copy Management * System (SCMS) in the license. Must be between 0 and 3 inclusive. - * @member {number} [agcAndColorStripeRestriction] Configures Automatic Gain - * Control (AGC) and Color Stripe in the license. Must be between 0 and 3 - * inclusive. - * @member {object} [explicitAnalogTelevisionOutputRestriction] Configures + * @property {number} [agcAndColorStripeRestriction] Configures Automatic + * Gain Control (AGC) and Color Stripe in the license. Must be between 0 and + * 3 inclusive. + * @property {object} [explicitAnalogTelevisionOutputRestriction] Configures * the Explicit Analog Television Output Restriction in the license. * Configuration data must be between 0 and 3 inclusive. - * @member {boolean} [explicitAnalogTelevisionOutputRestriction.bestEffort] + * @property {boolean} [explicitAnalogTelevisionOutputRestriction.bestEffort] * Indicates whether this restriction is enforced on a Best Effort basis. - * @member {number} + * @property {number} * [explicitAnalogTelevisionOutputRestriction.configurationData] Configures * the restriction control bits. Must be between 0 and 3 inclusive. - * @member {boolean} digitalVideoOnlyContentRestriction Enables the Image + * @property {boolean} digitalVideoOnlyContentRestriction Enables the Image * Constraint For Analog Component Video Restriction in the license. - * @member {boolean} imageConstraintForAnalogComponentVideoRestriction + * @property {boolean} imageConstraintForAnalogComponentVideoRestriction * Enables the Image Constraint For Analog Component Video Restriction in the * license. - * @member {boolean} imageConstraintForAnalogComputerMonitorRestriction + * @property {boolean} imageConstraintForAnalogComputerMonitorRestriction * Enables the Image Constraint For Analog Component Video Restriction in the * license. - * @member {string} allowPassingVideoContentToUnknownOutput Configures + * @property {string} allowPassingVideoContentToUnknownOutput Configures * Unknown output handling settings of the license. Possible values include: * 'Unknown', 'NotAllowed', 'Allowed', 'AllowedWithVideoConstriction' - * @member {number} [uncompressedDigitalVideoOpl] Specifies the output + * @property {number} [uncompressedDigitalVideoOpl] Specifies the output * protection level for uncompressed digital video. - * @member {number} [compressedDigitalVideoOpl] Specifies the output + * @property {number} [compressedDigitalVideoOpl] Specifies the output * protection level for compressed digital video. - * @member {number} [analogVideoOpl] Specifies the output protection level + * @property {number} [analogVideoOpl] Specifies the output protection level * for compressed digital audio. - * @member {number} [compressedDigitalAudioOpl] Specifies the output + * @property {number} [compressedDigitalAudioOpl] Specifies the output * protection level for compressed digital audio. - * @member {number} [uncompressedDigitalAudioOpl] Specifies the output + * @property {number} [uncompressedDigitalAudioOpl] Specifies the output * protection level for uncompressed digital audio. */ constructor() { @@ -125,8 +125,7 @@ class ContentKeyPolicyPlayReadyPlayRight { required: true, serializedName: 'allowPassingVideoContentToUnknownOutput', type: { - name: 'Enum', - allowedValues: [ 'Unknown', 'NotAllowed', 'Allowed', 'AllowedWithVideoConstriction' ] + name: 'String' } }, uncompressedDigitalVideoOpl: { diff --git a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyProperties.js b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyProperties.js index e02821c4a1..9f2c1b47bf 100644 --- a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyProperties.js +++ b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyProperties.js @@ -17,11 +17,11 @@ class ContentKeyPolicyProperties { /** * Create a ContentKeyPolicyProperties. - * @member {uuid} [policyId] The legacy Policy ID. - * @member {date} [created] The creation date of the Policy - * @member {date} [lastModified] The last modified date of the Policy - * @member {string} [description] A description for the Policy. - * @member {array} options The Key Policy options. + * @property {uuid} [policyId] The legacy Policy ID. + * @property {date} [created] The creation date of the Policy + * @property {date} [lastModified] The last modified date of the Policy + * @property {string} [description] A description for the Policy. + * @property {array} options The Key Policy options. */ constructor() { } diff --git a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyRestriction.js b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyRestriction.js index 0a7a89409e..e924a935af 100644 --- a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyRestriction.js +++ b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyRestriction.js @@ -18,7 +18,7 @@ class ContentKeyPolicyRestriction { /** * Create a ContentKeyPolicyRestriction. - * @member {string} odatatype Polymorphic Discriminator + * @property {string} odatatype Polymorphic Discriminator */ constructor() { } diff --git a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyRestrictionTokenKey.js b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyRestrictionTokenKey.js index ae6c1f97a5..c00d4ac97c 100644 --- a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyRestrictionTokenKey.js +++ b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyRestrictionTokenKey.js @@ -18,7 +18,7 @@ class ContentKeyPolicyRestrictionTokenKey { /** * Create a ContentKeyPolicyRestrictionTokenKey. - * @member {string} odatatype Polymorphic Discriminator + * @property {string} odatatype Polymorphic Discriminator */ constructor() { } diff --git a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyRsaTokenKey.js b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyRsaTokenKey.js index 66041bc0ce..6ae76bc77d 100644 --- a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyRsaTokenKey.js +++ b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyRsaTokenKey.js @@ -20,8 +20,8 @@ const models = require('./index'); class ContentKeyPolicyRsaTokenKey extends models['ContentKeyPolicyRestrictionTokenKey'] { /** * Create a ContentKeyPolicyRsaTokenKey. - * @member {buffer} exponent The RSA Parameter exponent - * @member {buffer} modulus The RSA Parameter modulus + * @property {buffer} exponent The RSA Parameter exponent + * @property {buffer} modulus The RSA Parameter modulus */ constructor() { super(); diff --git a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicySymmetricTokenKey.js b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicySymmetricTokenKey.js index f560c151c9..9d99997c1f 100644 --- a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicySymmetricTokenKey.js +++ b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicySymmetricTokenKey.js @@ -20,7 +20,7 @@ const models = require('./index'); class ContentKeyPolicySymmetricTokenKey extends models['ContentKeyPolicyRestrictionTokenKey'] { /** * Create a ContentKeyPolicySymmetricTokenKey. - * @member {buffer} keyValue The key value of the key + * @property {buffer} keyValue The key value of the key */ constructor() { super(); diff --git a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyTokenClaim.js b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyTokenClaim.js index 06dc7b8bb7..7b9a88b08d 100644 --- a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyTokenClaim.js +++ b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyTokenClaim.js @@ -17,8 +17,8 @@ class ContentKeyPolicyTokenClaim { /** * Create a ContentKeyPolicyTokenClaim. - * @member {string} [claimType] Token claim type. - * @member {string} [claimValue] Token claim value. + * @property {string} [claimType] Token claim type. + * @property {string} [claimValue] Token claim value. */ constructor() { } diff --git a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyTokenRestriction.js b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyTokenRestriction.js index df42bbf034..21ef33282b 100644 --- a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyTokenRestriction.js +++ b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyTokenRestriction.js @@ -21,17 +21,17 @@ const models = require('./index'); class ContentKeyPolicyTokenRestriction extends models['ContentKeyPolicyRestriction'] { /** * Create a ContentKeyPolicyTokenRestriction. - * @member {string} issuer The token issuer. - * @member {string} audience The audience for the token. - * @member {object} primaryVerificationKey The primary verification key. - * @member {string} [primaryVerificationKey.odatatype] Polymorphic + * @property {string} issuer The token issuer. + * @property {string} audience The audience for the token. + * @property {object} primaryVerificationKey The primary verification key. + * @property {string} [primaryVerificationKey.odatatype] Polymorphic * Discriminator - * @member {array} [alternateVerificationKeys] A list of alternative + * @property {array} [alternateVerificationKeys] A list of alternative * verification keys. - * @member {array} [requiredClaims] A list of required token claims. - * @member {string} restrictionTokenType The type of token. Possible values + * @property {array} [requiredClaims] A list of required token claims. + * @property {string} restrictionTokenType The type of token. Possible values * include: 'Unknown', 'Swt', 'Jwt' - * @member {string} [openIdConnectDiscoveryDocument] The OpenID connect + * @property {string} [openIdConnectDiscoveryDocument] The OpenID connect * discovery document. */ constructor() { @@ -131,8 +131,7 @@ class ContentKeyPolicyTokenRestriction extends models['ContentKeyPolicyRestricti required: true, serializedName: 'restrictionTokenType', type: { - name: 'Enum', - allowedValues: [ 'Unknown', 'Swt', 'Jwt' ] + name: 'String' } }, openIdConnectDiscoveryDocument: { diff --git a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyWidevineConfiguration.js b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyWidevineConfiguration.js index b6fba54d50..7b779d114a 100644 --- a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyWidevineConfiguration.js +++ b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyWidevineConfiguration.js @@ -20,7 +20,7 @@ const models = require('./index'); class ContentKeyPolicyWidevineConfiguration extends models['ContentKeyPolicyConfiguration'] { /** * Create a ContentKeyPolicyWidevineConfiguration. - * @member {string} widevineTemplate The Widevine template. + * @property {string} widevineTemplate The Widevine template. */ constructor() { super(); diff --git a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyX509CertificateTokenKey.js b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyX509CertificateTokenKey.js index 925123c1c7..2723f3e379 100644 --- a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyX509CertificateTokenKey.js +++ b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyX509CertificateTokenKey.js @@ -20,7 +20,7 @@ const models = require('./index'); class ContentKeyPolicyX509CertificateTokenKey extends models['ContentKeyPolicyRestrictionTokenKey'] { /** * Create a ContentKeyPolicyX509CertificateTokenKey. - * @member {buffer} rawBody The raw data field of a certificate in PKCS 12 + * @property {buffer} rawBody The raw data field of a certificate in PKCS 12 * format (X509Certificate2 in .NET) */ constructor() { diff --git a/lib/services/mediaServicesManagement/lib/models/crossSiteAccessPolicies.js b/lib/services/mediaServicesManagement/lib/models/crossSiteAccessPolicies.js index 3d65f6c570..b6f479a2a1 100644 --- a/lib/services/mediaServicesManagement/lib/models/crossSiteAccessPolicies.js +++ b/lib/services/mediaServicesManagement/lib/models/crossSiteAccessPolicies.js @@ -17,9 +17,9 @@ class CrossSiteAccessPolicies { /** * Create a CrossSiteAccessPolicies. - * @member {string} [clientAccessPolicy] The content of + * @property {string} [clientAccessPolicy] The content of * clientaccesspolicy.xml used by Silverlight. - * @member {string} [crossDomainPolicy] The content of crossdomain.xml used + * @property {string} [crossDomainPolicy] The content of crossdomain.xml used * by Silverlight. */ constructor() { diff --git a/lib/services/mediaServicesManagement/lib/models/defaultKey.js b/lib/services/mediaServicesManagement/lib/models/defaultKey.js index 49d0e8072f..23f1771865 100644 --- a/lib/services/mediaServicesManagement/lib/models/defaultKey.js +++ b/lib/services/mediaServicesManagement/lib/models/defaultKey.js @@ -18,9 +18,9 @@ class DefaultKey { /** * Create a DefaultKey. - * @member {string} [label] Label can be used to specify Content Key when + * @property {string} [label] Label can be used to specify Content Key when * creating a Streaming Locator - * @member {string} [policyName] Policy used by Default Key + * @property {string} [policyName] Policy used by Default Key */ constructor() { } diff --git a/lib/services/mediaServicesManagement/lib/models/deinterlace.js b/lib/services/mediaServicesManagement/lib/models/deinterlace.js index 2aaf2112e3..f9224e964d 100644 --- a/lib/services/mediaServicesManagement/lib/models/deinterlace.js +++ b/lib/services/mediaServicesManagement/lib/models/deinterlace.js @@ -17,9 +17,10 @@ class Deinterlace { /** * Create a Deinterlace. - * @member {string} [parity] The field parity for de-interlacing, defaults to - * Auto. Possible values include: 'Auto', 'TopFieldFirst', 'BottomFieldFirst' - * @member {string} [mode] The deinterlacing mode. Defaults to + * @property {string} [parity] The field parity for de-interlacing, defaults + * to Auto. Possible values include: 'Auto', 'TopFieldFirst', + * 'BottomFieldFirst' + * @property {string} [mode] The deinterlacing mode. Defaults to * AutoPixelAdaptive. Possible values include: 'Off', 'AutoPixelAdaptive' */ constructor() { @@ -43,16 +44,14 @@ class Deinterlace { required: false, serializedName: 'parity', type: { - name: 'Enum', - allowedValues: [ 'Auto', 'TopFieldFirst', 'BottomFieldFirst' ] + name: 'String' } }, mode: { required: false, serializedName: 'mode', type: { - name: 'Enum', - allowedValues: [ 'Off', 'AutoPixelAdaptive' ] + name: 'String' } } } diff --git a/lib/services/mediaServicesManagement/lib/models/enabledProtocols.js b/lib/services/mediaServicesManagement/lib/models/enabledProtocols.js index 0b90fdd76d..c944662907 100644 --- a/lib/services/mediaServicesManagement/lib/models/enabledProtocols.js +++ b/lib/services/mediaServicesManagement/lib/models/enabledProtocols.js @@ -17,10 +17,10 @@ class EnabledProtocols { /** * Create a EnabledProtocols. - * @member {boolean} download Enable Download protocol or not - * @member {boolean} dash Enable DASH protocol or not - * @member {boolean} hls Enable HLS protocol or not - * @member {boolean} smoothStreaming Enable SmoothStreaming protocol or not + * @property {boolean} download Enable Download protocol or not + * @property {boolean} dash Enable DASH protocol or not + * @property {boolean} hls Enable HLS protocol or not + * @property {boolean} smoothStreaming Enable SmoothStreaming protocol or not */ constructor() { } diff --git a/lib/services/mediaServicesManagement/lib/models/entityNameAvailabilityCheckOutput.js b/lib/services/mediaServicesManagement/lib/models/entityNameAvailabilityCheckOutput.js index d8c8e769fa..e2b97e6fb4 100644 --- a/lib/services/mediaServicesManagement/lib/models/entityNameAvailabilityCheckOutput.js +++ b/lib/services/mediaServicesManagement/lib/models/entityNameAvailabilityCheckOutput.js @@ -17,10 +17,10 @@ class EntityNameAvailabilityCheckOutput { /** * Create a EntityNameAvailabilityCheckOutput. - * @member {boolean} nameAvailable Specifies if the name is available. - * @member {string} [reason] Specifies the reason if the name is not + * @property {boolean} nameAvailable Specifies if the name is available. + * @property {string} [reason] Specifies the reason if the name is not * available. - * @member {string} [message] Specifies the detailed reason if the name is + * @property {string} [message] Specifies the detailed reason if the name is * not available. */ constructor() { diff --git a/lib/services/mediaServicesManagement/lib/models/envelopeEncryption.js b/lib/services/mediaServicesManagement/lib/models/envelopeEncryption.js index 2e32c524b2..9cac6799a0 100644 --- a/lib/services/mediaServicesManagement/lib/models/envelopeEncryption.js +++ b/lib/services/mediaServicesManagement/lib/models/envelopeEncryption.js @@ -17,27 +17,27 @@ class EnvelopeEncryption { /** * Create a EnvelopeEncryption. - * @member {object} [enabledProtocols] Representing supported protocols - * @member {boolean} [enabledProtocols.download] Enable Download protocol or - * not - * @member {boolean} [enabledProtocols.dash] Enable DASH protocol or not - * @member {boolean} [enabledProtocols.hls] Enable HLS protocol or not - * @member {boolean} [enabledProtocols.smoothStreaming] Enable + * @property {object} [enabledProtocols] Representing supported protocols + * @property {boolean} [enabledProtocols.download] Enable Download protocol + * or not + * @property {boolean} [enabledProtocols.dash] Enable DASH protocol or not + * @property {boolean} [enabledProtocols.hls] Enable HLS protocol or not + * @property {boolean} [enabledProtocols.smoothStreaming] Enable * SmoothStreaming protocol or not - * @member {array} [clearTracks] Representing which tracks should not be + * @property {array} [clearTracks] Representing which tracks should not be * encrypted - * @member {object} [contentKeys] Representing default content key for each + * @property {object} [contentKeys] Representing default content key for each * encryption scheme and separate content keys for specific tracks - * @member {object} [contentKeys.defaultKey] Default content key for an + * @property {object} [contentKeys.defaultKey] Default content key for an * encryption scheme - * @member {string} [contentKeys.defaultKey.label] Label can be used to + * @property {string} [contentKeys.defaultKey.label] Label can be used to * specify Content Key when creating a Streaming Locator - * @member {string} [contentKeys.defaultKey.policyName] Policy used by + * @property {string} [contentKeys.defaultKey.policyName] Policy used by * Default Key - * @member {array} [contentKeys.keyToTrackMappings] Representing tracks needs - * separate content key - * @member {string} [customKeyAcquisitionUrlTemplate] - * KeyAcquistionUrlTemplate is used to point to user specified service to + * @property {array} [contentKeys.keyToTrackMappings] Representing tracks + * needs separate content key + * @property {string} [customKeyAcquisitionUrlTemplate] + * KeyAcquisitionUrlTemplate is used to point to user specified service to * delivery content keys */ constructor() { diff --git a/lib/services/mediaServicesManagement/lib/models/filterTrackPropertyCondition.js b/lib/services/mediaServicesManagement/lib/models/filterTrackPropertyCondition.js index a4292b858f..c6b557cc39 100644 --- a/lib/services/mediaServicesManagement/lib/models/filterTrackPropertyCondition.js +++ b/lib/services/mediaServicesManagement/lib/models/filterTrackPropertyCondition.js @@ -17,10 +17,10 @@ class FilterTrackPropertyCondition { /** * Create a FilterTrackPropertyCondition. - * @member {string} property The track property type. Possible values + * @property {string} property The track property type. Possible values * include: 'Unknown', 'Type', 'Name', 'Language', 'FourCC', 'Bitrate' - * @member {string} value The track proprty value. - * @member {string} operation The track property condition operation. + * @property {string} value The track proprty value. + * @property {string} operation The track property condition operation. * Possible values include: 'Equal', 'NotEqual' */ constructor() { @@ -44,8 +44,7 @@ class FilterTrackPropertyCondition { required: true, serializedName: 'property', type: { - name: 'Enum', - allowedValues: [ 'Unknown', 'Type', 'Name', 'Language', 'FourCC', 'Bitrate' ] + name: 'String' } }, value: { @@ -59,8 +58,7 @@ class FilterTrackPropertyCondition { required: true, serializedName: 'operation', type: { - name: 'Enum', - allowedValues: [ 'Equal', 'NotEqual' ] + name: 'String' } } } diff --git a/lib/services/mediaServicesManagement/lib/models/filterTrackSelection.js b/lib/services/mediaServicesManagement/lib/models/filterTrackSelection.js index dbf25b4c31..f26e2aa481 100644 --- a/lib/services/mediaServicesManagement/lib/models/filterTrackSelection.js +++ b/lib/services/mediaServicesManagement/lib/models/filterTrackSelection.js @@ -18,7 +18,7 @@ class FilterTrackSelection { /** * Create a FilterTrackSelection. - * @member {array} trackSelections The track selections. + * @property {array} trackSelections The track selections. */ constructor() { } diff --git a/lib/services/mediaServicesManagement/lib/models/filters.js b/lib/services/mediaServicesManagement/lib/models/filters.js index 3851a50e6b..93695adab8 100644 --- a/lib/services/mediaServicesManagement/lib/models/filters.js +++ b/lib/services/mediaServicesManagement/lib/models/filters.js @@ -18,31 +18,31 @@ class Filters { /** * Create a Filters. - * @member {object} [deinterlace] The de-interlacing settings. - * @member {string} [deinterlace.parity] The field parity for de-interlacing, - * defaults to Auto. Possible values include: 'Auto', 'TopFieldFirst', - * 'BottomFieldFirst' - * @member {string} [deinterlace.mode] The deinterlacing mode. Defaults to + * @property {object} [deinterlace] The de-interlacing settings. + * @property {string} [deinterlace.parity] The field parity for + * de-interlacing, defaults to Auto. Possible values include: 'Auto', + * 'TopFieldFirst', 'BottomFieldFirst' + * @property {string} [deinterlace.mode] The deinterlacing mode. Defaults to * AutoPixelAdaptive. Possible values include: 'Off', 'AutoPixelAdaptive' - * @member {string} [rotation] The rotation, if any, to be applied to the + * @property {string} [rotation] The rotation, if any, to be applied to the * input video, before it is encoded. Default is Auto. Possible values * include: 'Auto', 'None', 'Rotate0', 'Rotate90', 'Rotate180', 'Rotate270' - * @member {object} [crop] The parameters for the rectangular window with + * @property {object} [crop] The parameters for the rectangular window with * which to crop the input video. - * @member {string} [crop.left] The number of pixels from the left-margin. + * @property {string} [crop.left] The number of pixels from the left-margin. * This can be absolute pixel value (e.g 100), or relative to the size of the * video (For example, 50%). - * @member {string} [crop.top] The number of pixels from the top-margin. This - * can be absolute pixel value (e.g 100), or relative to the size of the + * @property {string} [crop.top] The number of pixels from the top-margin. + * This can be absolute pixel value (e.g 100), or relative to the size of the * video (For example, 50%). - * @member {string} [crop.width] The width of the rectangular region in + * @property {string} [crop.width] The width of the rectangular region in * pixels. This can be absolute pixel value (e.g 100), or relative to the * size of the video (For example, 50%). - * @member {string} [crop.height] The height of the rectangular region in + * @property {string} [crop.height] The height of the rectangular region in * pixels. This can be absolute pixel value (e.g 100), or relative to the * size of the video (For example, 50%). - * @member {array} [overlays] The properties of overlays to be applied to the - * input video. These could be audio, image or video overlays. + * @property {array} [overlays] The properties of overlays to be applied to + * the input video. These could be audio, image or video overlays. */ constructor() { } @@ -73,8 +73,7 @@ class Filters { required: false, serializedName: 'rotation', type: { - name: 'Enum', - allowedValues: [ 'Auto', 'None', 'Rotate0', 'Rotate90', 'Rotate180', 'Rotate270' ] + name: 'String' } }, crop: { diff --git a/lib/services/mediaServicesManagement/lib/models/firstQuality.js b/lib/services/mediaServicesManagement/lib/models/firstQuality.js index e70ed2d75d..6ac3345f74 100644 --- a/lib/services/mediaServicesManagement/lib/models/firstQuality.js +++ b/lib/services/mediaServicesManagement/lib/models/firstQuality.js @@ -17,7 +17,7 @@ class FirstQuality { /** * Create a FirstQuality. - * @member {number} bitrate The first quality bitrate. + * @property {number} bitrate The first quality bitrate. */ constructor() { } diff --git a/lib/services/mediaServicesManagement/lib/models/format.js b/lib/services/mediaServicesManagement/lib/models/format.js index 89eba64669..9b056cdd95 100644 --- a/lib/services/mediaServicesManagement/lib/models/format.js +++ b/lib/services/mediaServicesManagement/lib/models/format.js @@ -17,7 +17,7 @@ class Format { /** * Create a Format. - * @member {string} [filenamePattern] The pattern of the file names for the + * @property {string} [filenamePattern] The pattern of the file names for the * generated output files. The following macros are supported in the file * name: {Basename} - The base name of the input video {Extension} - The * appropriate extension for this format. {Label} - The label assigned to the @@ -25,7 +25,7 @@ class Format { * thumbnails. {Bitrate} - The audio/video bitrate. Not applicable to * thumbnails. {Codec} - The type of the audio/video codec. Any unsubstituted * macros will be collapsed and removed from the filename. - * @member {string} odatatype Polymorphic Discriminator + * @property {string} odatatype Polymorphic Discriminator */ constructor() { } diff --git a/lib/services/mediaServicesManagement/lib/models/h264Layer.js b/lib/services/mediaServicesManagement/lib/models/h264Layer.js index 55e52f30b2..5fceec40a0 100644 --- a/lib/services/mediaServicesManagement/lib/models/h264Layer.js +++ b/lib/services/mediaServicesManagement/lib/models/h264Layer.js @@ -21,22 +21,22 @@ const models = require('./index'); class H264Layer extends models['VideoLayer'] { /** * Create a H264Layer. - * @member {string} [profile] Which profile of the H.264 standard should be + * @property {string} [profile] Which profile of the H.264 standard should be * used when encoding this layer. Default is Auto. Possible values include: * 'Auto', 'Baseline', 'Main', 'High', 'High422', 'High444' - * @member {string} [level] Which level of the H.264 standard should be used - * when encoding this layer. The value can be Auto, or a number that matches - * the H.264 profile. If not specified, the default is Auto, which lets the - * encoder choose the Level that is appropriate for this layer. - * @member {moment.duration} [bufferWindow] The VBV buffer window length. The - * value should be in ISO 8601 format. The value should be in the range + * @property {string} [level] Which level of the H.264 standard should be + * used when encoding this layer. The value can be Auto, or a number that + * matches the H.264 profile. If not specified, the default is Auto, which + * lets the encoder choose the Level that is appropriate for this layer. + * @property {moment.duration} [bufferWindow] The VBV buffer window length. + * The value should be in ISO 8601 format. The value should be in the range * [0.1-100] seconds. The default is 5 seconds (for example, PT5S). - * @member {number} [referenceFrames] The number of reference frames to be + * @property {number} [referenceFrames] The number of reference frames to be * used when encoding this layer. If not specified, the encoder determines an * appropriate number based on the encoder complexity setting. - * @member {string} [entropyMode] The entropy mode to be used for this layer. - * If not specified, the encoder chooses the mode that is appropriate for the - * profile and level. Possible values include: 'Cabac', 'Cavlc' + * @property {string} [entropyMode] The entropy mode to be used for this + * layer. If not specified, the encoder chooses the mode that is appropriate + * for the profile and level. Possible values include: 'Cabac', 'Cavlc' */ constructor() { super(); @@ -136,8 +136,7 @@ class H264Layer extends models['VideoLayer'] { required: false, serializedName: 'profile', type: { - name: 'Enum', - allowedValues: [ 'Auto', 'Baseline', 'Main', 'High', 'High422', 'High444' ] + name: 'String' } }, level: { @@ -165,8 +164,7 @@ class H264Layer extends models['VideoLayer'] { required: false, serializedName: 'entropyMode', type: { - name: 'Enum', - allowedValues: [ 'Cabac', 'Cavlc' ] + name: 'String' } } } diff --git a/lib/services/mediaServicesManagement/lib/models/h264Video.js b/lib/services/mediaServicesManagement/lib/models/h264Video.js index 0dd96c8e97..c7e5935b41 100644 --- a/lib/services/mediaServicesManagement/lib/models/h264Video.js +++ b/lib/services/mediaServicesManagement/lib/models/h264Video.js @@ -20,14 +20,14 @@ const models = require('./index'); class H264Video extends models['Video'] { /** * Create a H264Video. - * @member {boolean} [sceneChangeDetection] Whether or not the encoder should - * insert key frames at scene changes. If not specified, the default is - * false. This flag should be set to true only when the encoder is being + * @property {boolean} [sceneChangeDetection] Whether or not the encoder + * should insert key frames at scene changes. If not specified, the default + * is false. This flag should be set to true only when the encoder is being * configured to produce a single output video. - * @member {string} [complexity] Tells the encoder how to choose its encoding - * settings. The default value is Balanced. Possible values include: 'Speed', - * 'Balanced', 'Quality' - * @member {array} [layers] The collection of output H.264 layers to be + * @property {string} [complexity] Tells the encoder how to choose its + * encoding settings. The default value is Balanced. Possible values include: + * 'Speed', 'Balanced', 'Quality' + * @property {array} [layers] The collection of output H.264 layers to be * produced by the encoder. */ constructor() { @@ -79,8 +79,7 @@ class H264Video extends models['Video'] { required: false, serializedName: 'stretchMode', type: { - name: 'Enum', - allowedValues: [ 'None', 'AutoSize', 'AutoFit' ] + name: 'String' } }, sceneChangeDetection: { @@ -94,8 +93,7 @@ class H264Video extends models['Video'] { required: false, serializedName: 'complexity', type: { - name: 'Enum', - allowedValues: [ 'Speed', 'Balanced', 'Quality' ] + name: 'String' } }, layers: { diff --git a/lib/services/mediaServicesManagement/lib/models/hls.js b/lib/services/mediaServicesManagement/lib/models/hls.js index 8db190b274..9866f7fac7 100644 --- a/lib/services/mediaServicesManagement/lib/models/hls.js +++ b/lib/services/mediaServicesManagement/lib/models/hls.js @@ -17,8 +17,8 @@ class Hls { /** * Create a Hls. - * @member {number} [fragmentsPerTsSegment] The amount of fragments per HTTP - * Live Streaming (HLS) segment. + * @property {number} [fragmentsPerTsSegment] The amount of fragments per + * HTTP Live Streaming (HLS) segment. */ constructor() { } diff --git a/lib/services/mediaServicesManagement/lib/models/iPAccessControl.js b/lib/services/mediaServicesManagement/lib/models/iPAccessControl.js index f727f4ab2d..60a8ea534e 100644 --- a/lib/services/mediaServicesManagement/lib/models/iPAccessControl.js +++ b/lib/services/mediaServicesManagement/lib/models/iPAccessControl.js @@ -17,7 +17,7 @@ class IPAccessControl { /** * Create a IPAccessControl. - * @member {array} [allow] The IP allow list. + * @property {array} [allow] The IP allow list. */ constructor() { } diff --git a/lib/services/mediaServicesManagement/lib/models/iPRange.js b/lib/services/mediaServicesManagement/lib/models/iPRange.js index 1d04c7242a..ab94f0d7cb 100644 --- a/lib/services/mediaServicesManagement/lib/models/iPRange.js +++ b/lib/services/mediaServicesManagement/lib/models/iPRange.js @@ -17,9 +17,9 @@ class IPRange { /** * Create a IPRange. - * @member {string} [name] The friendly name for the IP address range. - * @member {string} [address] The IP address. - * @member {number} [subnetPrefixLength] The subnet mask prefix length (see + * @property {string} [name] The friendly name for the IP address range. + * @property {string} [address] The IP address. + * @property {number} [subnetPrefixLength] The subnet mask prefix length (see * CIDR notation). */ constructor() { diff --git a/lib/services/mediaServicesManagement/lib/models/image.js b/lib/services/mediaServicesManagement/lib/models/image.js index c1bd9dbbb1..b8af5fbf09 100644 --- a/lib/services/mediaServicesManagement/lib/models/image.js +++ b/lib/services/mediaServicesManagement/lib/models/image.js @@ -21,20 +21,20 @@ const models = require('./index'); class Image extends models['Video'] { /** * Create a Image. - * @member {string} [start] The position in the input video from where to + * @property {string} [start] The position in the input video from where to * start generating thumbnails. The value can be in absolute timestamp (ISO * 8601, e.g: PT05S), or a frame count (For example, 10 for the 10th frame), * or a relative value (For example, 1%). Also supports a macro {Best}, which * tells the encoder to select the best thumbnail from the first few seconds * of the video. - * @member {string} [step] The intervals at which thumbnails are generated. + * @property {string} [step] The intervals at which thumbnails are generated. * The value can be in absolute timestamp (ISO 8601, e.g: PT05S for one image * every 5 seconds), or a frame count (For example, 30 for every 30 frames), * or a relative value (For example, 1%). - * @member {string} [range] The position in the input video at which to stop - * generating thumbnails. The value can be in absolute timestamp (ISO 8601, - * e.g: PT5M30S to stop at 5 minutes and 30 seconds), or a frame count (For - * example, 300 to stop at the 300th frame), or a relative value (For + * @property {string} [range] The position in the input video at which to + * stop generating thumbnails. The value can be in absolute timestamp (ISO + * 8601, e.g: PT5M30S to stop at 5 minutes and 30 seconds), or a frame count + * (For example, 300 to stop at the 300th frame), or a relative value (For * example, 100%). */ constructor() { @@ -86,8 +86,7 @@ class Image extends models['Video'] { required: false, serializedName: 'stretchMode', type: { - name: 'Enum', - allowedValues: [ 'None', 'AutoSize', 'AutoFit' ] + name: 'String' } }, start: { diff --git a/lib/services/mediaServicesManagement/lib/models/index.d.ts b/lib/services/mediaServicesManagement/lib/models/index.d.ts index eeb96c7098..1b5ae7daa7 100644 --- a/lib/services/mediaServicesManagement/lib/models/index.d.ts +++ b/lib/services/mediaServicesManagement/lib/models/index.d.ts @@ -1,3208 +1,2713 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { BaseResource } from 'ms-rest-azure'; -import { CloudError } from 'ms-rest-azure'; -import * as moment from 'moment'; +import { BaseResource, CloudError } from "ms-rest-azure"; +import * as moment from "moment"; -export { BaseResource } from 'ms-rest-azure'; -export { CloudError } from 'ms-rest-azure'; +export { + BaseResource, + CloudError +}; /** - * @class - * Initializes a new instance of the PresentationTimeRange class. - * @constructor - * The presentation time range, this is asset related and not recommended for - * Account Filter. - * - * @member {number} startTimestamp The absolute start time boundary. - * @member {number} endTimestamp The absolute end time boundary. - * @member {number} presentationWindowDuration The relative to end sliding - * window. - * @member {number} liveBackoffDuration The relative to end right edge. - * @member {number} timescale The time scale of time stamps. - * @member {boolean} forceEndTimestamp The indicator of forcing exsiting of end - * time stamp. + * The presentation time range, this is asset related and not recommended for Account Filter. */ export interface PresentationTimeRange { - startTimestamp: number; - endTimestamp: number; - presentationWindowDuration: number; - liveBackoffDuration: number; - timescale: number; - forceEndTimestamp: boolean; + /** + * The absolute start time boundary. + */ + startTimestamp?: number; + /** + * The absolute end time boundary. + */ + endTimestamp?: number; + /** + * The relative to end sliding window. + */ + presentationWindowDuration?: number; + /** + * The relative to end right edge. + */ + liveBackoffDuration?: number; + /** + * The time scale of time stamps. + */ + timescale?: number; + /** + * The indicator of forcing exsiting of end time stamp. + */ + forceEndTimestamp?: boolean; } /** - * @class - * Initializes a new instance of the FilterTrackPropertyCondition class. - * @constructor * The class to specify one track property condition. - * - * @member {string} property The track property type. Possible values include: - * 'Unknown', 'Type', 'Name', 'Language', 'FourCC', 'Bitrate' - * @member {string} value The track proprty value. - * @member {string} operation The track property condition operation. Possible - * values include: 'Equal', 'NotEqual' */ export interface FilterTrackPropertyCondition { + /** + * The track property type. Possible values include: 'Unknown', 'Type', 'Name', 'Language', + * 'FourCC', 'Bitrate' + */ property: string; + /** + * The track proprty value. + */ value: string; + /** + * The track property condition operation. Possible values include: 'Equal', 'NotEqual' + */ operation: string; } /** - * @class - * Initializes a new instance of the FirstQuality class. - * @constructor * Filter First Quality - * - * @member {number} bitrate The first quality bitrate. */ export interface FirstQuality { + /** + * The first quality bitrate. + */ bitrate: number; } /** - * @class - * Initializes a new instance of the FilterTrackSelection class. - * @constructor - * Representing a list of FilterTrackPropertyConditions to select a track. The - * filters are combined using a logical AND operation. - * - * @member {array} trackSelections The track selections. + * Representing a list of FilterTrackPropertyConditions to select a track. The filters are + * combined using a logical AND operation. */ export interface FilterTrackSelection { + /** + * The track selections. + */ trackSelections: FilterTrackPropertyCondition[]; } /** - * @class - * Initializes a new instance of the Resource class. - * @constructor * The core properties of ARM resources. - * - * @member {string} [id] Fully qualified resource ID for the resource. - * @member {string} [name] The name of the resource. - * @member {string} [type] The type of the resource. */ export interface Resource extends BaseResource { + /** + * Fully qualified resource ID for the resource. + */ readonly id?: string; + /** + * The name of the resource. + */ readonly name?: string; + /** + * The type of the resource. + */ readonly type?: string; } /** - * @class - * Initializes a new instance of the ProxyResource class. - * @constructor * The resource model definition for a ARM proxy resource. - * */ export interface ProxyResource extends Resource { } /** - * @class - * Initializes a new instance of the AccountFilter class. - * @constructor * An Account Filter. - * - * @member {object} [presentationTimeRange] The presentation time range. - * @member {number} [presentationTimeRange.startTimestamp] The absolute start - * time boundary. - * @member {number} [presentationTimeRange.endTimestamp] The absolute end time - * boundary. - * @member {number} [presentationTimeRange.presentationWindowDuration] The - * relative to end sliding window. - * @member {number} [presentationTimeRange.liveBackoffDuration] The relative to - * end right edge. - * @member {number} [presentationTimeRange.timescale] The time scale of time - * stamps. - * @member {boolean} [presentationTimeRange.forceEndTimestamp] The indicator of - * forcing exsiting of end time stamp. - * @member {object} [firstQuality] The first quality. - * @member {number} [firstQuality.bitrate] The first quality bitrate. - * @member {array} [tracks] The tracks selection conditions. */ export interface AccountFilter extends ProxyResource { + /** + * The presentation time range. + */ presentationTimeRange?: PresentationTimeRange; + /** + * The first quality. + */ firstQuality?: FirstQuality; + /** + * The tracks selection conditions. + */ tracks?: FilterTrackSelection[]; } /** - * @class - * Initializes a new instance of the ODataError class. - * @constructor * Information about an error. - * - * @member {string} [code] A language-independent error name. - * @member {string} [message] The error message. - * @member {string} [target] The target of the error (for example, the name of - * the property in error). - * @member {array} [details] The error details. */ export interface ODataError { + /** + * A language-independent error name. + */ code?: string; + /** + * The error message. + */ message?: string; + /** + * The target of the error (for example, the name of the property in error). + */ target?: string; + /** + * The error details. + */ details?: ODataError[]; } /** - * @class - * Initializes a new instance of the ApiError class. - * @constructor * The API error. - * - * @member {object} [error] ApiError. The error properties. - * @member {string} [error.code] A language-independent error name. - * @member {string} [error.message] The error message. - * @member {string} [error.target] The target of the error (for example, the - * name of the property in error). - * @member {array} [error.details] The error details. */ export interface ApiError { + /** + * @summary ApiError + * @description The error properties. + */ error?: ODataError; } /** - * @class - * Initializes a new instance of the TrackedResource class. - * @constructor * The resource model definition for a ARM tracked resource. - * - * @member {object} [tags] Resource tags. - * @member {string} [location] The Azure Region of the resource. */ export interface TrackedResource extends Resource { + /** + * Resource tags. + */ tags?: { [propertyName: string]: string }; + /** + * The Azure Region of the resource. + */ location?: string; } /** - * @class - * Initializes a new instance of the Provider class. - * @constructor * A resource provider. - * - * @member {string} providerName The provider name. */ export interface Provider { + /** + * The provider name. + */ providerName: string; } /** - * @class - * Initializes a new instance of the OperationDisplay class. - * @constructor * Operation details. - * - * @member {string} [provider] The service provider. - * @member {string} [resource] Resource on which the operation is performed. - * @member {string} [operation] The operation type. - * @member {string} [description] The operation description. */ export interface OperationDisplay { + /** + * The service provider. + */ provider?: string; + /** + * Resource on which the operation is performed. + */ resource?: string; + /** + * The operation type. + */ operation?: string; + /** + * The operation description. + */ description?: string; } /** - * @class - * Initializes a new instance of the MetricDimension class. - * @constructor * A metric dimension. - * - * @member {string} [name] The metric dimension name. - * @member {string} [displayName] The display name for the dimension. - * @member {boolean} [toBeExportedForShoebox] Whether to export metric to - * shoebox. */ export interface MetricDimension { + /** + * The metric dimension name. + */ readonly name?: string; + /** + * The display name for the dimension. + */ readonly displayName?: string; + /** + * Whether to export metric to shoebox. + */ readonly toBeExportedForShoebox?: boolean; } /** - * @class - * Initializes a new instance of the Metric class. - * @constructor * A metric emitted by service. - * - * @member {string} [name] The metric name. - * @member {string} [displayName] The metric display name. - * @member {string} [displayDescription] The metric display description. - * @member {string} [unit] The metric unit. Possible values include: 'Bytes', - * 'Count', 'Milliseconds' - * @member {string} [aggregationType] The metric aggregation type. Possible - * values include: 'Average', 'Count', 'Total' - * @member {array} [dimensions] The metric dimensions. */ export interface Metric { + /** + * The metric name. + */ readonly name?: string; + /** + * The metric display name. + */ readonly displayName?: string; + /** + * The metric display description. + */ readonly displayDescription?: string; + /** + * The metric unit. Possible values include: 'Bytes', 'Count', 'Milliseconds' + */ readonly unit?: string; + /** + * The metric aggregation type. Possible values include: 'Average', 'Count', 'Total' + */ readonly aggregationType?: string; + /** + * The metric dimensions. + */ readonly dimensions?: MetricDimension[]; } /** - * @class - * Initializes a new instance of the ServiceSpecification class. - * @constructor * The service metric specifications. - * - * @member {array} [metricSpecifications] List of metric specifications. */ export interface ServiceSpecification { + /** + * List of metric specifications. + */ readonly metricSpecifications?: Metric[]; } /** - * @class - * Initializes a new instance of the MetricProperties class. - * @constructor * Metric properties. - * - * @member {object} [serviceSpecification] The service specifications. - * @member {array} [serviceSpecification.metricSpecifications] List of metric - * specifications. */ export interface MetricProperties { + /** + * The service specifications. + */ readonly serviceSpecification?: ServiceSpecification; } /** - * @class - * Initializes a new instance of the Operation class. - * @constructor * An operation. - * - * @member {string} name The operation name. - * @member {object} [display] The operation display name. - * @member {string} [display.provider] The service provider. - * @member {string} [display.resource] Resource on which the operation is - * performed. - * @member {string} [display.operation] The operation type. - * @member {string} [display.description] The operation description. - * @member {string} [origin] Origin of the operation. - * @member {object} [properties] Operation properties format. - * @member {object} [properties.serviceSpecification] The service - * specifications. - * @member {array} [properties.serviceSpecification.metricSpecifications] List - * of metric specifications. */ export interface Operation { + /** + * The operation name. + */ name: string; + /** + * The operation display name. + */ display?: OperationDisplay; + /** + * Origin of the operation. + */ origin?: string; + /** + * Operation properties format. + */ properties?: MetricProperties; } -/** - * @class - * Initializes a new instance of the Location class. - * @constructor - * @member {string} name - */ export interface Location { name: string; } /** - * @class - * Initializes a new instance of the EntityNameAvailabilityCheckOutput class. - * @constructor * The response from the check name availability request. - * - * @member {boolean} nameAvailable Specifies if the name is available. - * @member {string} [reason] Specifies the reason if the name is not available. - * @member {string} [message] Specifies the detailed reason if the name is not - * available. - */ +*/ export interface EntityNameAvailabilityCheckOutput { + /** + * Specifies if the name is available. + */ nameAvailable: boolean; + /** + * Specifies the reason if the name is not available. + */ reason?: string; + /** + * Specifies the detailed reason if the name is not available. + */ message?: string; } /** - * @class - * Initializes a new instance of the StorageAccount class. - * @constructor * The storage account details. - * - * @member {string} [id] The ID of the storage account resource. Media Services - * relies on tables and queues as well as blobs, so the primary storage account - * must be a Standard Storage account (either Microsoft.ClassicStorage or - * Microsoft.Storage). Blob only storage accounts can be added as secondary - * storage accounts. - * @member {string} type The type of the storage account. Possible values - * include: 'Primary', 'Secondary' - */ +*/ export interface StorageAccount { + /** + * The ID of the storage account resource. Media Services relies on tables and queues as well as + * blobs, so the primary storage account must be a Standard Storage account (either + * Microsoft.ClassicStorage or Microsoft.Storage). Blob only storage accounts can be added as + * secondary storage accounts. + */ id?: string; + /** + * The type of the storage account. Possible values include: 'Primary', 'Secondary' + */ type: string; } /** - * @class - * Initializes a new instance of the SyncStorageKeysInput class. - * @constructor * The input to the sync storage keys request. - * - * @member {string} [id] The ID of the storage account resource. - */ +*/ export interface SyncStorageKeysInput { + /** + * The ID of the storage account resource. + */ id?: string; } /** - * @class - * Initializes a new instance of the MediaService class. - * @constructor * A Media Services account. - * - * @member {uuid} [mediaServiceId] The Media Services account ID. - * @member {array} [storageAccounts] The storage accounts for this resource. - */ +*/ export interface MediaService extends TrackedResource { + /** + * The Media Services account ID. + */ readonly mediaServiceId?: string; + /** + * The storage accounts for this resource. + */ storageAccounts?: StorageAccount[]; } /** - * @class - * Initializes a new instance of the SubscriptionMediaService class. - * @constructor * A Media Services account. - * - * @member {uuid} [mediaServiceId] The Media Services account ID. - * @member {array} [storageAccounts] The storage accounts for this resource. - */ +*/ export interface SubscriptionMediaService extends TrackedResource { + /** + * The Media Services account ID. + */ readonly mediaServiceId?: string; + /** + * The storage accounts for this resource. + */ storageAccounts?: StorageAccount[]; } /** - * @class - * Initializes a new instance of the CheckNameAvailabilityInput class. - * @constructor * The input to the check name availability request. - * - * @member {string} [name] The account name. - * @member {string} [type] The account type. For a Media Services account, this - * should be 'MediaServices'. - */ +*/ export interface CheckNameAvailabilityInput { + /** + * The account name. + */ name?: string; + /** + * The account type. For a Media Services account, this should be 'MediaServices'. + */ type?: string; } /** - * @class - * Initializes a new instance of the AssetContainerSas class. - * @constructor * The Asset Storage container SAS URLs. - * - * @member {array} [assetContainerSasUrls] The list of Asset container SAS - * URLs. - */ +*/ export interface AssetContainerSas { + /** + * The list of Asset container SAS URLs. + */ assetContainerSasUrls?: string[]; } /** - * @class - * Initializes a new instance of the AssetFileEncryptionMetadata class. - * @constructor * The Asset File Storage encryption metadata. - * - * @member {string} [initializationVector] The Asset File initialization - * vector. - * @member {string} [assetFileName] The Asset File name. - * @member {uuid} assetFileId The Asset File Id. - */ +*/ export interface AssetFileEncryptionMetadata { + /** + * The Asset File initialization vector. + */ initializationVector?: string; + /** + * The Asset File name. + */ assetFileName?: string; + /** + * The Asset File Id. + */ assetFileId: string; } /** - * @class - * Initializes a new instance of the StorageEncryptedAssetDecryptionData class. - * @constructor * Data needed to decrypt asset files encrypted with legacy storage encryption. - * - * @member {buffer} [key] The Asset File storage encryption key. - * @member {array} [assetFileEncryptionMetadata] Asset File encryption - * metadata. - */ +*/ export interface StorageEncryptedAssetDecryptionData { + /** + * The Asset File storage encryption key. + */ key?: Buffer; + /** + * Asset File encryption metadata. + */ assetFileEncryptionMetadata?: AssetFileEncryptionMetadata[]; } /** - * @class - * Initializes a new instance of the AssetStreamingLocator class. - * @constructor * Properties of the Streaming Locator. - * - * @member {string} [name] Streaming Locator name. - * @member {string} [assetName] Asset Name. - * @member {date} [created] The creation time of the Streaming Locator. - * @member {date} [startTime] The start time of the Streaming Locator. - * @member {date} [endTime] The end time of the Streaming Locator. - * @member {uuid} [streamingLocatorId] StreamingLocatorId of the Streaming - * Locator. - * @member {string} [streamingPolicyName] Name of the Streaming Policy used by - * this Streaming Locator. - * @member {string} [defaultContentKeyPolicyName] Name of the default - * ContentKeyPolicy used by this Streaming Locator. - */ +*/ export interface AssetStreamingLocator { + /** + * Streaming Locator name. + */ readonly name?: string; + /** + * Asset Name. + */ readonly assetName?: string; + /** + * The creation time of the Streaming Locator. + */ readonly created?: Date; + /** + * The start time of the Streaming Locator. + */ readonly startTime?: Date; + /** + * The end time of the Streaming Locator. + */ readonly endTime?: Date; + /** + * StreamingLocatorId of the Streaming Locator. + */ readonly streamingLocatorId?: string; + /** + * Name of the Streaming Policy used by this Streaming Locator. + */ readonly streamingPolicyName?: string; + /** + * Name of the default ContentKeyPolicy used by this Streaming Locator. + */ readonly defaultContentKeyPolicyName?: string; } /** - * @class - * Initializes a new instance of the ListStreamingLocatorsResponse class. - * @constructor * The Streaming Locators associated with this Asset. - * - * @member {array} [streamingLocators] The list of Streaming Locators. - */ +*/ export interface ListStreamingLocatorsResponse { + /** + * The list of Streaming Locators. + */ readonly streamingLocators?: AssetStreamingLocator[]; } /** - * @class - * Initializes a new instance of the Asset class. - * @constructor * An Asset. - * - * @member {uuid} [assetId] The Asset ID. - * @member {date} [created] The creation date of the Asset. - * @member {date} [lastModified] The last modified date of the Asset. - * @member {string} [alternateId] The alternate ID of the Asset. - * @member {string} [description] The Asset description. - * @member {string} [container] The name of the asset blob container. - * @member {string} [storageAccountName] The name of the storage account. - * @member {string} [storageEncryptionFormat] The Asset encryption format. One - * of None or MediaStorageEncryption. Possible values include: 'None', - * 'MediaStorageClientEncryption' - */ +*/ export interface Asset extends ProxyResource { + /** + * The Asset ID. + */ readonly assetId?: string; + /** + * The creation date of the Asset. + */ readonly created?: Date; + /** + * The last modified date of the Asset. + */ readonly lastModified?: Date; + /** + * The alternate ID of the Asset. + */ alternateId?: string; + /** + * The Asset description. + */ description?: string; + /** + * The name of the asset blob container. + */ container?: string; + /** + * The name of the storage account. + */ storageAccountName?: string; + /** + * The Asset encryption format. One of None or MediaStorageEncryption. Possible values include: + * 'None', 'MediaStorageClientEncryption' + */ readonly storageEncryptionFormat?: string; } /** - * @class - * Initializes a new instance of the AssetFilter class. - * @constructor * An Asset Filter. - * - * @member {object} [presentationTimeRange] The presentation time range. - * @member {number} [presentationTimeRange.startTimestamp] The absolute start - * time boundary. - * @member {number} [presentationTimeRange.endTimestamp] The absolute end time - * boundary. - * @member {number} [presentationTimeRange.presentationWindowDuration] The - * relative to end sliding window. - * @member {number} [presentationTimeRange.liveBackoffDuration] The relative to - * end right edge. - * @member {number} [presentationTimeRange.timescale] The time scale of time - * stamps. - * @member {boolean} [presentationTimeRange.forceEndTimestamp] The indicator of - * forcing exsiting of end time stamp. - * @member {object} [firstQuality] The first quality. - * @member {number} [firstQuality.bitrate] The first quality bitrate. - * @member {array} [tracks] The tracks selection conditions. - */ +*/ export interface AssetFilter extends ProxyResource { + /** + * The presentation time range. + */ presentationTimeRange?: PresentationTimeRange; + /** + * The first quality. + */ firstQuality?: FirstQuality; + /** + * The tracks selection conditions. + */ tracks?: FilterTrackSelection[]; } /** - * @class - * Initializes a new instance of the ListContainerSasInput class. - * @constructor * The parameters to the list SAS request. - * - * @member {string} [permissions] The permissions to set on the SAS URL. - * Possible values include: 'Read', 'ReadWrite', 'ReadWriteDelete' - * @member {date} [expiryTime] The SAS URL expiration time. This must be less - * than 24 hours from the current time. - */ +*/ export interface ListContainerSasInput { + /** + * The permissions to set on the SAS URL. Possible values include: 'Read', 'ReadWrite', + * 'ReadWriteDelete' + */ permissions?: string; + /** + * The SAS URL expiration time. This must be less than 24 hours from the current time. + */ expiryTime?: Date; } /** - * @class - * Initializes a new instance of the ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction class. - * @constructor - * Configures the Explicit Analog Television Output Restriction control bits. - * For further details see the PlayReady Compliance Rules. - * - * @member {boolean} bestEffort Indicates whether this restriction is enforced - * on a Best Effort basis. - * @member {number} configurationData Configures the restriction control bits. - * Must be between 0 and 3 inclusive. - */ + * Configures the Explicit Analog Television Output Restriction control bits. For further details + * see the PlayReady Compliance Rules. +*/ export interface ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction { + /** + * Indicates whether this restriction is enforced on a Best Effort basis. + */ bestEffort: boolean; + /** + * Configures the restriction control bits. Must be between 0 and 3 inclusive. + */ configurationData: number; } /** - * @class - * Initializes a new instance of the ContentKeyPolicyPlayReadyContentKeyLocation class. - * @constructor - * Base class for content key ID location. A derived class must be used to - * represent the location. - * - * @member {string} odatatype Polymorphic Discriminator - */ + * Base class for content key ID location. A derived class must be used to represent the location. +*/ export interface ContentKeyPolicyPlayReadyContentKeyLocation { + /** + * Polymorphic Discriminator + */ odatatype: string; } /** - * @class - * Initializes a new instance of the ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader class. - * @constructor * Specifies that the content key ID is in the PlayReady header. - * - */ -export interface ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader extends ContentKeyPolicyPlayReadyContentKeyLocation { +*/ +export interface ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader extends +ContentKeyPolicyPlayReadyContentKeyLocation { } /** - * @class - * Initializes a new instance of the ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier class. - * @constructor - * Specifies that the content key ID is specified in the PlayReady - * configuration. - * - * @member {uuid} keyId The content key ID. - */ -export interface ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier extends ContentKeyPolicyPlayReadyContentKeyLocation { + * Specifies that the content key ID is specified in the PlayReady configuration. +*/ +export interface ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier extends +ContentKeyPolicyPlayReadyContentKeyLocation { + /** + * The content key ID. + */ keyId: string; } /** - * @class - * Initializes a new instance of the ContentKeyPolicyPlayReadyPlayRight class. - * @constructor * Configures the Play Right in the PlayReady license. - * - * @member {moment.duration} [firstPlayExpiration] The amount of time that the - * license is valid after the license is first used to play content. - * @member {number} [scmsRestriction] Configures the Serial Copy Management - * System (SCMS) in the license. Must be between 0 and 3 inclusive. - * @member {number} [agcAndColorStripeRestriction] Configures Automatic Gain - * Control (AGC) and Color Stripe in the license. Must be between 0 and 3 - * inclusive. - * @member {object} [explicitAnalogTelevisionOutputRestriction] Configures the - * Explicit Analog Television Output Restriction in the license. Configuration - * data must be between 0 and 3 inclusive. - * @member {boolean} [explicitAnalogTelevisionOutputRestriction.bestEffort] - * Indicates whether this restriction is enforced on a Best Effort basis. - * @member {number} - * [explicitAnalogTelevisionOutputRestriction.configurationData] Configures the - * restriction control bits. Must be between 0 and 3 inclusive. - * @member {boolean} digitalVideoOnlyContentRestriction Enables the Image - * Constraint For Analog Component Video Restriction in the license. - * @member {boolean} imageConstraintForAnalogComponentVideoRestriction Enables - * the Image Constraint For Analog Component Video Restriction in the license. - * @member {boolean} imageConstraintForAnalogComputerMonitorRestriction Enables - * the Image Constraint For Analog Component Video Restriction in the license. - * @member {string} allowPassingVideoContentToUnknownOutput Configures Unknown - * output handling settings of the license. Possible values include: 'Unknown', - * 'NotAllowed', 'Allowed', 'AllowedWithVideoConstriction' - * @member {number} [uncompressedDigitalVideoOpl] Specifies the output - * protection level for uncompressed digital video. - * @member {number} [compressedDigitalVideoOpl] Specifies the output protection - * level for compressed digital video. - * @member {number} [analogVideoOpl] Specifies the output protection level for - * compressed digital audio. - * @member {number} [compressedDigitalAudioOpl] Specifies the output protection - * level for compressed digital audio. - * @member {number} [uncompressedDigitalAudioOpl] Specifies the output - * protection level for uncompressed digital audio. - */ +*/ export interface ContentKeyPolicyPlayReadyPlayRight { + /** + * The amount of time that the license is valid after the license is first used to play content. + */ firstPlayExpiration?: moment.Duration; + /** + * Configures the Serial Copy Management System (SCMS) in the license. Must be between 0 and 3 + * inclusive. + */ scmsRestriction?: number; + /** + * Configures Automatic Gain Control (AGC) and Color Stripe in the license. Must be between 0 and + * 3 inclusive. + */ agcAndColorStripeRestriction?: number; - explicitAnalogTelevisionOutputRestriction?: ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction; + /** + * Configures the Explicit Analog Television Output Restriction in the license. Configuration + * data must be between 0 and 3 inclusive. + */ + explicitAnalogTelevisionOutputRestriction?: + ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction; + /** + * Enables the Image Constraint For Analog Component Video Restriction in the license. + */ digitalVideoOnlyContentRestriction: boolean; + /** + * Enables the Image Constraint For Analog Component Video Restriction in the license. + */ imageConstraintForAnalogComponentVideoRestriction: boolean; + /** + * Enables the Image Constraint For Analog Component Video Restriction in the license. + */ imageConstraintForAnalogComputerMonitorRestriction: boolean; + /** + * Configures Unknown output handling settings of the license. Possible values include: + * 'Unknown', 'NotAllowed', 'Allowed', 'AllowedWithVideoConstriction' + */ allowPassingVideoContentToUnknownOutput: string; + /** + * Specifies the output protection level for uncompressed digital video. + */ uncompressedDigitalVideoOpl?: number; + /** + * Specifies the output protection level for compressed digital video. + */ compressedDigitalVideoOpl?: number; + /** + * Specifies the output protection level for compressed digital audio. + */ analogVideoOpl?: number; + /** + * Specifies the output protection level for compressed digital audio. + */ compressedDigitalAudioOpl?: number; + /** + * Specifies the output protection level for uncompressed digital audio. + */ uncompressedDigitalAudioOpl?: number; } /** - * @class - * Initializes a new instance of the ContentKeyPolicyTokenClaim class. - * @constructor * Represents a token claim. - * - * @member {string} [claimType] Token claim type. - * @member {string} [claimValue] Token claim value. - */ +*/ export interface ContentKeyPolicyTokenClaim { + /** + * Token claim type. + */ claimType?: string; + /** + * Token claim value. + */ claimValue?: string; } /** - * @class - * Initializes a new instance of the ContentKeyPolicyPlayReadyLicense class. - * @constructor * The PlayReady license - * - * @member {boolean} allowTestDevices A flag indicating whether test devices - * can use the license. - * @member {date} [beginDate] The begin date of license - * @member {date} [expirationDate] The expiration date of license. - * @member {moment.duration} [relativeBeginDate] The relative begin date of - * license. - * @member {moment.duration} [relativeExpirationDate] The relative expiration - * date of license. - * @member {moment.duration} [gracePeriod] The grace period of license. - * @member {object} [playRight] The license PlayRight - * @member {moment.duration} [playRight.firstPlayExpiration] The amount of time - * that the license is valid after the license is first used to play content. - * @member {number} [playRight.scmsRestriction] Configures the Serial Copy - * Management System (SCMS) in the license. Must be between 0 and 3 inclusive. - * @member {number} [playRight.agcAndColorStripeRestriction] Configures - * Automatic Gain Control (AGC) and Color Stripe in the license. Must be - * between 0 and 3 inclusive. - * @member {object} [playRight.explicitAnalogTelevisionOutputRestriction] - * Configures the Explicit Analog Television Output Restriction in the license. - * Configuration data must be between 0 and 3 inclusive. - * @member {boolean} - * [playRight.explicitAnalogTelevisionOutputRestriction.bestEffort] Indicates - * whether this restriction is enforced on a Best Effort basis. - * @member {number} - * [playRight.explicitAnalogTelevisionOutputRestriction.configurationData] - * Configures the restriction control bits. Must be between 0 and 3 inclusive. - * @member {boolean} [playRight.digitalVideoOnlyContentRestriction] Enables the - * Image Constraint For Analog Component Video Restriction in the license. - * @member {boolean} - * [playRight.imageConstraintForAnalogComponentVideoRestriction] Enables the - * Image Constraint For Analog Component Video Restriction in the license. - * @member {boolean} - * [playRight.imageConstraintForAnalogComputerMonitorRestriction] Enables the - * Image Constraint For Analog Component Video Restriction in the license. - * @member {string} [playRight.allowPassingVideoContentToUnknownOutput] - * Configures Unknown output handling settings of the license. Possible values - * include: 'Unknown', 'NotAllowed', 'Allowed', 'AllowedWithVideoConstriction' - * @member {number} [playRight.uncompressedDigitalVideoOpl] Specifies the - * output protection level for uncompressed digital video. - * @member {number} [playRight.compressedDigitalVideoOpl] Specifies the output - * protection level for compressed digital video. - * @member {number} [playRight.analogVideoOpl] Specifies the output protection - * level for compressed digital audio. - * @member {number} [playRight.compressedDigitalAudioOpl] Specifies the output - * protection level for compressed digital audio. - * @member {number} [playRight.uncompressedDigitalAudioOpl] Specifies the - * output protection level for uncompressed digital audio. - * @member {string} licenseType The license type. Possible values include: - * 'Unknown', 'NonPersistent', 'Persistent' - * @member {object} contentKeyLocation The content key location. - * @member {string} [contentKeyLocation.odatatype] Polymorphic Discriminator - * @member {string} contentType The PlayReady content type. Possible values - * include: 'Unknown', 'Unspecified', 'UltraVioletDownload', - * 'UltraVioletStreaming' - */ +*/ export interface ContentKeyPolicyPlayReadyLicense { + /** + * A flag indicating whether test devices can use the license. + */ allowTestDevices: boolean; + /** + * The begin date of license + */ beginDate?: Date; + /** + * The expiration date of license. + */ expirationDate?: Date; + /** + * The relative begin date of license. + */ relativeBeginDate?: moment.Duration; + /** + * The relative expiration date of license. + */ relativeExpirationDate?: moment.Duration; + /** + * The grace period of license. + */ gracePeriod?: moment.Duration; + /** + * The license PlayRight + */ playRight?: ContentKeyPolicyPlayReadyPlayRight; + /** + * The license type. Possible values include: 'Unknown', 'NonPersistent', 'Persistent' + */ licenseType: string; + /** + * The content key location. + */ contentKeyLocation: ContentKeyPolicyPlayReadyContentKeyLocation; + /** + * The PlayReady content type. Possible values include: 'Unknown', 'Unspecified', + * 'UltraVioletDownload', 'UltraVioletStreaming' + */ contentType: string; } /** - * @class - * Initializes a new instance of the ContentKeyPolicyRestriction class. - * @constructor - * Base class for Content Key Policy restrictions. A derived class must be used - * to create a restriction. - * - * @member {string} odatatype Polymorphic Discriminator - */ + * Base class for Content Key Policy restrictions. A derived class must be used to create a + * restriction. +*/ export interface ContentKeyPolicyRestriction { + /** + * Polymorphic Discriminator + */ odatatype: string; } /** - * @class - * Initializes a new instance of the ContentKeyPolicyOpenRestriction class. - * @constructor - * Represents an open restriction. License or key will be delivered on every - * request. - * - */ + * Represents an open restriction. License or key will be delivered on every request. +*/ export interface ContentKeyPolicyOpenRestriction extends ContentKeyPolicyRestriction { } /** - * @class - * Initializes a new instance of the ContentKeyPolicyUnknownRestriction class. - * @constructor - * Represents a ContentKeyPolicyRestriction that is unavailable in the current - * API version. - * - */ + * Represents a ContentKeyPolicyRestriction that is unavailable in the current API version. +*/ export interface ContentKeyPolicyUnknownRestriction extends ContentKeyPolicyRestriction { } /** - * @class - * Initializes a new instance of the ContentKeyPolicyConfiguration class. - * @constructor - * Base class for Content Key Policy configuration. A derived class must be - * used to create a configuration. - * - * @member {string} odatatype Polymorphic Discriminator - */ + * Base class for Content Key Policy configuration. A derived class must be used to create a + * configuration. +*/ export interface ContentKeyPolicyConfiguration { + /** + * Polymorphic Discriminator + */ odatatype: string; } /** - * @class - * Initializes a new instance of the ContentKeyPolicyRestrictionTokenKey class. - * @constructor - * Base class for Content Key Policy key for token validation. A derived class - * must be used to create a token key. - * - * @member {string} odatatype Polymorphic Discriminator - */ + * Base class for Content Key Policy key for token validation. A derived class must be used to + * create a token key. +*/ export interface ContentKeyPolicyRestrictionTokenKey { + /** + * Polymorphic Discriminator + */ odatatype: string; } /** - * @class - * Initializes a new instance of the ContentKeyPolicySymmetricTokenKey class. - * @constructor * Specifies a symmetric key for token validation. - * - * @member {buffer} keyValue The key value of the key - */ +*/ export interface ContentKeyPolicySymmetricTokenKey extends ContentKeyPolicyRestrictionTokenKey { + /** + * The key value of the key + */ keyValue: Buffer; } /** - * @class - * Initializes a new instance of the ContentKeyPolicyRsaTokenKey class. - * @constructor * Specifies a RSA key for token validation - * - * @member {buffer} exponent The RSA Parameter exponent - * @member {buffer} modulus The RSA Parameter modulus - */ +*/ export interface ContentKeyPolicyRsaTokenKey extends ContentKeyPolicyRestrictionTokenKey { + /** + * The RSA Parameter exponent + */ exponent: Buffer; + /** + * The RSA Parameter modulus + */ modulus: Buffer; } /** - * @class - * Initializes a new instance of the ContentKeyPolicyX509CertificateTokenKey class. - * @constructor * Specifies a certificate for token validation. - * - * @member {buffer} rawBody The raw data field of a certificate in PKCS 12 - * format (X509Certificate2 in .NET) - */ -export interface ContentKeyPolicyX509CertificateTokenKey extends ContentKeyPolicyRestrictionTokenKey { +*/ +export interface ContentKeyPolicyX509CertificateTokenKey extends +ContentKeyPolicyRestrictionTokenKey { + /** + * The raw data field of a certificate in PKCS 12 format (X509Certificate2 in .NET) + */ rawBody: Buffer; } /** - * @class - * Initializes a new instance of the ContentKeyPolicyTokenRestriction class. - * @constructor - * Represents a token restriction. Provided token must match these requirements - * for successful license or key delivery. - * - * @member {string} issuer The token issuer. - * @member {string} audience The audience for the token. - * @member {object} primaryVerificationKey The primary verification key. - * @member {string} [primaryVerificationKey.odatatype] Polymorphic - * Discriminator - * @member {array} [alternateVerificationKeys] A list of alternative - * verification keys. - * @member {array} [requiredClaims] A list of required token claims. - * @member {string} restrictionTokenType The type of token. Possible values - * include: 'Unknown', 'Swt', 'Jwt' - * @member {string} [openIdConnectDiscoveryDocument] The OpenID connect - * discovery document. - */ + * Represents a token restriction. Provided token must match these requirements for successful + * license or key delivery. +*/ export interface ContentKeyPolicyTokenRestriction extends ContentKeyPolicyRestriction { + /** + * The token issuer. + */ issuer: string; + /** + * The audience for the token. + */ audience: string; + /** + * The primary verification key. + */ primaryVerificationKey: ContentKeyPolicyRestrictionTokenKey; + /** + * A list of alternative verification keys. + */ alternateVerificationKeys?: ContentKeyPolicyRestrictionTokenKey[]; + /** + * A list of required token claims. + */ requiredClaims?: ContentKeyPolicyTokenClaim[]; + /** + * The type of token. Possible values include: 'Unknown', 'Swt', 'Jwt' + */ restrictionTokenType: string; + /** + * The OpenID connect discovery document. + */ openIdConnectDiscoveryDocument?: string; } /** - * @class - * Initializes a new instance of the ContentKeyPolicyClearKeyConfiguration class. - * @constructor * Represents a configuration for non-DRM keys. - * - */ +*/ export interface ContentKeyPolicyClearKeyConfiguration extends ContentKeyPolicyConfiguration { } /** - * @class - * Initializes a new instance of the ContentKeyPolicyUnknownConfiguration class. - * @constructor - * Represents a ContentKeyPolicyConfiguration that is unavailable in the - * current API version. - * - */ + * Represents a ContentKeyPolicyConfiguration that is unavailable in the current API version. +*/ export interface ContentKeyPolicyUnknownConfiguration extends ContentKeyPolicyConfiguration { } /** - * @class - * Initializes a new instance of the ContentKeyPolicyWidevineConfiguration class. - * @constructor * Specifies a configuration for Widevine licenses. - * - * @member {string} widevineTemplate The Widevine template. - */ +*/ export interface ContentKeyPolicyWidevineConfiguration extends ContentKeyPolicyConfiguration { + /** + * The Widevine template. + */ widevineTemplate: string; } /** - * @class - * Initializes a new instance of the ContentKeyPolicyPlayReadyConfiguration class. - * @constructor * Specifies a configuration for PlayReady licenses. - * - * @member {array} licenses The PlayReady licenses. - * @member {string} [responseCustomData] The custom response data. - */ +*/ export interface ContentKeyPolicyPlayReadyConfiguration extends ContentKeyPolicyConfiguration { + /** + * The PlayReady licenses. + */ licenses: ContentKeyPolicyPlayReadyLicense[]; + /** + * The custom response data. + */ responseCustomData?: string; } /** - * @class - * Initializes a new instance of the ContentKeyPolicyFairPlayConfiguration class. - * @constructor * Specifies a configuration for FairPlay licenses. - * - * @member {buffer} ask The key that must be used as FairPlay Application - * Secret key. - * @member {string} fairPlayPfxPassword The password encrypting FairPlay - * certificate in PKCS 12 (pfx) format. - * @member {string} fairPlayPfx The Base64 representation of FairPlay - * certificate in PKCS 12 (pfx) format (including private key). - * @member {string} rentalAndLeaseKeyType The rental and lease key type. - * Possible values include: 'Unknown', 'Undefined', 'PersistentUnlimited', - * 'PersistentLimited' - * @member {number} rentalDuration The rental duration. Must be greater than or - * equal to 0. - */ +*/ export interface ContentKeyPolicyFairPlayConfiguration extends ContentKeyPolicyConfiguration { + /** + * The key that must be used as FairPlay Application Secret key. + */ ask: Buffer; + /** + * The password encrypting FairPlay certificate in PKCS 12 (pfx) format. + */ fairPlayPfxPassword: string; + /** + * The Base64 representation of FairPlay certificate in PKCS 12 (pfx) format (including private + * key). + */ fairPlayPfx: string; + /** + * The rental and lease key type. Possible values include: 'Unknown', 'Undefined', + * 'PersistentUnlimited', 'PersistentLimited' + */ rentalAndLeaseKeyType: string; + /** + * The rental duration. Must be greater than or equal to 0. + */ rentalDuration: number; } /** - * @class - * Initializes a new instance of the ContentKeyPolicyOption class. - * @constructor * Represents a policy option. - * - * @member {uuid} [policyOptionId] The legacy Policy Option ID. - * @member {string} [name] The Policy Option description. - * @member {object} configuration The key delivery configuration. - * @member {string} [configuration.odatatype] Polymorphic Discriminator - * @member {object} restriction The requirements that must be met to deliver - * keys with this configuration - * @member {string} [restriction.odatatype] Polymorphic Discriminator - */ +*/ export interface ContentKeyPolicyOption { + /** + * The legacy Policy Option ID. + */ readonly policyOptionId?: string; + /** + * The Policy Option description. + */ name?: string; + /** + * The key delivery configuration. + */ configuration: ContentKeyPolicyConfiguration; + /** + * The requirements that must be met to deliver keys with this configuration + */ restriction: ContentKeyPolicyRestriction; } /** - * @class - * Initializes a new instance of the ContentKeyPolicyProperties class. - * @constructor * The properties of the Content Key Policy. - * - * @member {uuid} [policyId] The legacy Policy ID. - * @member {date} [created] The creation date of the Policy - * @member {date} [lastModified] The last modified date of the Policy - * @member {string} [description] A description for the Policy. - * @member {array} options The Key Policy options. - */ +*/ export interface ContentKeyPolicyProperties { + /** + * The legacy Policy ID. + */ readonly policyId?: string; + /** + * The creation date of the Policy + */ readonly created?: Date; + /** + * The last modified date of the Policy + */ readonly lastModified?: Date; + /** + * A description for the Policy. + */ description?: string; + /** + * The Key Policy options. + */ options: ContentKeyPolicyOption[]; } /** - * @class - * Initializes a new instance of the ContentKeyPolicy class. - * @constructor * A Content Key Policy resource. - * - * @member {uuid} [policyId] The legacy Policy ID. - * @member {date} [created] The creation date of the Policy - * @member {date} [lastModified] The last modified date of the Policy - * @member {string} [description] A description for the Policy. - * @member {array} options The Key Policy options. - */ +*/ export interface ContentKeyPolicy extends ProxyResource { + /** + * The legacy Policy ID. + */ readonly policyId?: string; + /** + * The creation date of the Policy + */ readonly created?: Date; + /** + * The last modified date of the Policy + */ readonly lastModified?: Date; + /** + * A description for the Policy. + */ description?: string; + /** + * The Key Policy options. + */ options: ContentKeyPolicyOption[]; } /** - * @class - * Initializes a new instance of the Preset class. - * @constructor - * Base type for all Presets, which define the recipe or instructions on how - * the input media files should be processed. - * - * @member {string} odatatype Polymorphic Discriminator - */ + * Base type for all Presets, which define the recipe or instructions on how the input media files + * should be processed. +*/ export interface Preset { + /** + * Polymorphic Discriminator + */ odatatype: string; } /** - * @class - * Initializes a new instance of the Codec class. - * @constructor * Describes the basic properties of all codecs. - * - * @member {string} [label] An optional label for the codec. The label can be - * used to control muxing behavior. - * @member {string} odatatype Polymorphic Discriminator - */ +*/ export interface Codec { + /** + * An optional label for the codec. The label can be used to control muxing behavior. + */ label?: string; + /** + * Polymorphic Discriminator + */ odatatype: string; } /** - * @class - * Initializes a new instance of the Audio class. - * @constructor * Defines the common properties for all audio codecs. - * - * @member {number} [channels] The number of channels in the audio. - * @member {number} [samplingRate] The sampling rate to use for encoding in - * hertz. - * @member {number} [bitrate] The bitrate, in bits per second, of the output - * encoded audio. - */ +*/ export interface Audio extends Codec { + /** + * The number of channels in the audio. + */ channels?: number; + /** + * The sampling rate to use for encoding in hertz. + */ samplingRate?: number; + /** + * The bitrate, in bits per second, of the output encoded audio. + */ bitrate?: number; } /** - * @class - * Initializes a new instance of the AacAudio class. - * @constructor * Describes Advanced Audio Codec (AAC) audio encoding settings. - * - * @member {string} [profile] The encoding profile to be used when encoding - * audio with AAC. Possible values include: 'AacLc', 'HeAacV1', 'HeAacV2' - */ +*/ export interface AacAudio extends Audio { + /** + * The encoding profile to be used when encoding audio with AAC. Possible values include: + * 'AacLc', 'HeAacV1', 'HeAacV2' + */ profile?: string; } /** - * @class - * Initializes a new instance of the AudioAnalyzerPreset class. - * @constructor - * The Audio Analyzer preset applies a pre-defined set of AI-based analysis - * operations, including speech transcription. Currently, the preset supports - * processing of content with a single audio track. - * - * @member {string} [audioLanguage] The language for the audio payload in the - * input using the BCP-47 format of 'language tag-region' (e.g: 'en-US'). The - * list of supported languages are, 'en-US', 'en-GB', 'es-ES', 'es-MX', - * 'fr-FR', 'it-IT', 'ja-JP', 'pt-BR', 'zh-CN', 'de-DE', 'ar-EG', 'ru-RU', - * 'hi-IN'. If not specified, automatic language detection would be employed. - * This feature currently supports English, Chinese, French, German, Italian, - * Japanese, Spanish, Russian, and Portuguese. The automatic detection works - * best with audio recordings with clearly discernable speech. If automatic - * detection fails to find the language, transcription would fallback to - * English. - */ + * The Audio Analyzer preset applies a pre-defined set of AI-based analysis operations, including + * speech transcription. Currently, the preset supports processing of content with a single audio + * track. +*/ export interface AudioAnalyzerPreset extends Preset { + /** + * The language for the audio payload in the input using the BCP-47 format of 'language + * tag-region' (e.g: 'en-US'). The list of supported languages are, 'en-US', 'en-GB', 'es-ES', + * 'es-MX', 'fr-FR', 'it-IT', 'ja-JP', 'pt-BR', 'zh-CN', 'de-DE', 'ar-EG', 'ru-RU', 'hi-IN'. If + * not specified, automatic language detection would be employed. This feature currently supports + * English, Chinese, French, German, Italian, Japanese, Spanish, Russian, and Portuguese. The + * automatic detection works best with audio recordings with clearly discernable speech. If + * automatic detection fails to find the language, transcription would fallback to English. + */ audioLanguage?: string; } /** - * @class - * Initializes a new instance of the Overlay class. - * @constructor * Base type for all overlays - image, audio or video. - * - * @member {string} [inputLabel] The label of the job input which is to be used - * as an overlay. The Input must specify exactly one file. You can specify an - * image file in JPG or PNG formats, or an audio file (such as a WAV, MP3, WMA - * or M4A file), or a video file. See https://aka.ms/mesformats for the - * complete list of supported audio and video file formats. - * @member {moment.duration} [start] The start position, with reference to the - * input video, at which the overlay starts. The value should be in ISO 8601 - * format. For example, PT05S to start the overlay at 5 seconds in to the input - * video. If not specified the overlay starts from the beginning of the input - * video. - * @member {moment.duration} [end] The position in the input video at which the - * overlay ends. The value should be in ISO 8601 duration format. For example, - * PT30S to end the overlay at 30 seconds in to the input video. If not - * specified the overlay will be applied until the end of the input video if - * inputLoop is true. Else, if inputLoop is false, then overlay will last as - * long as the duration of the overlay media. - * @member {moment.duration} [fadeInDuration] The duration over which the - * overlay fades in onto the input video. The value should be in ISO 8601 - * duration format. If not specified the default behavior is to have no fade in - * (same as PT0S). - * @member {moment.duration} [fadeOutDuration] The duration over which the - * overlay fades out of the input video. The value should be in ISO 8601 - * duration format. If not specified the default behavior is to have no fade - * out (same as PT0S). - * @member {number} [audioGainLevel] The gain level of audio in the overlay. - * The value should be in the range [0, 1.0]. The default is 1.0. - * @member {string} odatatype Polymorphic Discriminator - */ +*/ export interface Overlay { + /** + * The label of the job input which is to be used as an overlay. The Input must specify exactly + * one file. You can specify an image file in JPG or PNG formats, or an audio file (such as a + * WAV, MP3, WMA or M4A file), or a video file. See https://aka.ms/mesformats for the complete + * list of supported audio and video file formats. + */ inputLabel?: string; + /** + * The start position, with reference to the input video, at which the overlay starts. The value + * should be in ISO 8601 format. For example, PT05S to start the overlay at 5 seconds in to the + * input video. If not specified the overlay starts from the beginning of the input video. + */ start?: moment.Duration; + /** + * The position in the input video at which the overlay ends. The value should be in ISO 8601 + * duration format. For example, PT30S to end the overlay at 30 seconds in to the input video. If + * not specified the overlay will be applied until the end of the input video if inputLoop is + * true. Else, if inputLoop is false, then overlay will last as long as the duration of the + * overlay media. + */ end?: moment.Duration; + /** + * The duration over which the overlay fades in onto the input video. The value should be in ISO + * 8601 duration format. If not specified the default behavior is to have no fade in (same as + * PT0S). + */ fadeInDuration?: moment.Duration; + /** + * The duration over which the overlay fades out of the input video. The value should be in ISO + * 8601 duration format. If not specified the default behavior is to have no fade out (same as + * PT0S). + */ fadeOutDuration?: moment.Duration; + /** + * The gain level of audio in the overlay. The value should be in the range [0, 1.0]. The default + * is 1.0. + */ audioGainLevel?: number; + /** + * Polymorphic Discriminator + */ odatatype: string; } /** - * @class - * Initializes a new instance of the AudioOverlay class. - * @constructor * Describes the properties of an audio overlay. - * - */ +*/ export interface AudioOverlay extends Overlay { } /** - * @class - * Initializes a new instance of the CopyVideo class. - * @constructor - * A codec flag, which tells the encoder to copy the input video bitstream - * without re-encoding. - * - */ + * A codec flag, which tells the encoder to copy the input video bitstream without re-encoding. +*/ export interface CopyVideo extends Codec { } /** - * @class - * Initializes a new instance of the Video class. - * @constructor * Describes the basic properties for encoding the input video. - * - * @member {moment.duration} [keyFrameInterval] The distance between two key - * frames, thereby defining a group of pictures (GOP). The value should be a - * non-zero integer in the range [1, 30] seconds, specified in ISO 8601 format. - * The default is 2 seconds (PT2S). - * @member {string} [stretchMode] The resizing mode - how the input video will - * be resized to fit the desired output resolution(s). Default is AutoSize. - * Possible values include: 'None', 'AutoSize', 'AutoFit' - */ +*/ export interface Video extends Codec { + /** + * The distance between two key frames, thereby defining a group of pictures (GOP). The value + * should be a non-zero integer in the range [1, 30] seconds, specified in ISO 8601 format. The + * default is 2 seconds (PT2S). + */ keyFrameInterval?: moment.Duration; + /** + * The resizing mode - how the input video will be resized to fit the desired output + * resolution(s). Default is AutoSize. Possible values include: 'None', 'AutoSize', 'AutoFit' + */ stretchMode?: string; } /** - * @class - * Initializes a new instance of the Image class. - * @constructor - * Describes the basic properties for generating thumbnails from the input - * video - * - * @member {string} [start] The position in the input video from where to start - * generating thumbnails. The value can be in absolute timestamp (ISO 8601, - * e.g: PT05S), or a frame count (For example, 10 for the 10th frame), or a - * relative value (For example, 1%). Also supports a macro {Best}, which tells - * the encoder to select the best thumbnail from the first few seconds of the - * video. - * @member {string} [step] The intervals at which thumbnails are generated. The - * value can be in absolute timestamp (ISO 8601, e.g: PT05S for one image every - * 5 seconds), or a frame count (For example, 30 for every 30 frames), or a - * relative value (For example, 1%). - * @member {string} [range] The position in the input video at which to stop - * generating thumbnails. The value can be in absolute timestamp (ISO 8601, - * e.g: PT5M30S to stop at 5 minutes and 30 seconds), or a frame count (For - * example, 300 to stop at the 300th frame), or a relative value (For example, - * 100%). - */ + * Describes the basic properties for generating thumbnails from the input video +*/ export interface Image extends Video { + /** + * The position in the input video from where to start generating thumbnails. The value can be in + * absolute timestamp (ISO 8601, e.g: PT05S), or a frame count (For example, 10 for the 10th + * frame), or a relative value (For example, 1%). Also supports a macro {Best}, which tells the + * encoder to select the best thumbnail from the first few seconds of the video. + */ start?: string; + /** + * The intervals at which thumbnails are generated. The value can be in absolute timestamp (ISO + * 8601, e.g: PT05S for one image every 5 seconds), or a frame count (For example, 30 for every + * 30 frames), or a relative value (For example, 1%). + */ step?: string; + /** + * The position in the input video at which to stop generating thumbnails. The value can be in + * absolute timestamp (ISO 8601, e.g: PT5M30S to stop at 5 minutes and 30 seconds), or a frame + * count (For example, 300 to stop at the 300th frame), or a relative value (For example, 100%). + */ range?: string; } /** - * @class - * Initializes a new instance of the Format class. - * @constructor * Base class for output. - * - * @member {string} [filenamePattern] The pattern of the file names for the - * generated output files. The following macros are supported in the file name: - * {Basename} - The base name of the input video {Extension} - The appropriate - * extension for this format. {Label} - The label assigned to the codec/layer. - * {Index} - A unique index for thumbnails. Only applicable to thumbnails. - * {Bitrate} - The audio/video bitrate. Not applicable to thumbnails. {Codec} - - * The type of the audio/video codec. Any unsubstituted macros will be - * collapsed and removed from the filename. - * @member {string} odatatype Polymorphic Discriminator - */ +*/ export interface Format { + /** + * The pattern of the file names for the generated output files. The following macros are + * supported in the file name: {Basename} - The base name of the input video {Extension} - The + * appropriate extension for this format. {Label} - The label assigned to the codec/layer. + * {Index} - A unique index for thumbnails. Only applicable to thumbnails. {Bitrate} - The + * audio/video bitrate. Not applicable to thumbnails. {Codec} - The type of the audio/video + * codec. Any unsubstituted macros will be collapsed and removed from the filename. + */ filenamePattern?: string; + /** + * Polymorphic Discriminator + */ odatatype: string; } /** - * @class - * Initializes a new instance of the ImageFormat class. - * @constructor * Describes the properties for an output image file. - * - */ +*/ export interface ImageFormat extends Format { } /** - * @class - * Initializes a new instance of the JpgFormat class. - * @constructor * Describes the settings for producing JPEG thumbnails. - * - */ +*/ export interface JpgFormat extends ImageFormat { } /** - * @class - * Initializes a new instance of the PngFormat class. - * @constructor * Describes the settings for producing PNG thumbnails. - * - */ +*/ export interface PngFormat extends ImageFormat { } /** - * @class - * Initializes a new instance of the CopyAudio class. - * @constructor * A codec flag, which tells the encoder to copy the input audio bitstream. - * - */ +*/ export interface CopyAudio extends Codec { } /** - * @class - * Initializes a new instance of the Deinterlace class. - * @constructor * Describes the de-interlacing settings. - * - * @member {string} [parity] The field parity for de-interlacing, defaults to - * Auto. Possible values include: 'Auto', 'TopFieldFirst', 'BottomFieldFirst' - * @member {string} [mode] The deinterlacing mode. Defaults to - * AutoPixelAdaptive. Possible values include: 'Off', 'AutoPixelAdaptive' - */ +*/ export interface Deinterlace { + /** + * The field parity for de-interlacing, defaults to Auto. Possible values include: 'Auto', + * 'TopFieldFirst', 'BottomFieldFirst' + */ parity?: string; + /** + * The deinterlacing mode. Defaults to AutoPixelAdaptive. Possible values include: 'Off', + * 'AutoPixelAdaptive' + */ mode?: string; } /** - * @class - * Initializes a new instance of the Rectangle class. - * @constructor - * Describes the properties of a rectangular window applied to the input media - * before processing it. - * - * @member {string} [left] The number of pixels from the left-margin. This can - * be absolute pixel value (e.g 100), or relative to the size of the video (For - * example, 50%). - * @member {string} [top] The number of pixels from the top-margin. This can be - * absolute pixel value (e.g 100), or relative to the size of the video (For - * example, 50%). - * @member {string} [width] The width of the rectangular region in pixels. This - * can be absolute pixel value (e.g 100), or relative to the size of the video - * (For example, 50%). - * @member {string} [height] The height of the rectangular region in pixels. - * This can be absolute pixel value (e.g 100), or relative to the size of the - * video (For example, 50%). - */ + * Describes the properties of a rectangular window applied to the input media before processing + * it. +*/ export interface Rectangle { + /** + * The number of pixels from the left-margin. This can be absolute pixel value (e.g 100), or + * relative to the size of the video (For example, 50%). + */ left?: string; + /** + * The number of pixels from the top-margin. This can be absolute pixel value (e.g 100), or + * relative to the size of the video (For example, 50%). + */ top?: string; + /** + * The width of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or + * relative to the size of the video (For example, 50%). + */ width?: string; + /** + * The height of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or + * relative to the size of the video (For example, 50%). + */ height?: string; } /** - * @class - * Initializes a new instance of the Filters class. - * @constructor - * Describes all the filtering operations, such as de-interlacing, rotation - * etc. that are to be applied to the input media before encoding. - * - * @member {object} [deinterlace] The de-interlacing settings. - * @member {string} [deinterlace.parity] The field parity for de-interlacing, - * defaults to Auto. Possible values include: 'Auto', 'TopFieldFirst', - * 'BottomFieldFirst' - * @member {string} [deinterlace.mode] The deinterlacing mode. Defaults to - * AutoPixelAdaptive. Possible values include: 'Off', 'AutoPixelAdaptive' - * @member {string} [rotation] The rotation, if any, to be applied to the input - * video, before it is encoded. Default is Auto. Possible values include: - * 'Auto', 'None', 'Rotate0', 'Rotate90', 'Rotate180', 'Rotate270' - * @member {object} [crop] The parameters for the rectangular window with which - * to crop the input video. - * @member {string} [crop.left] The number of pixels from the left-margin. This - * can be absolute pixel value (e.g 100), or relative to the size of the video - * (For example, 50%). - * @member {string} [crop.top] The number of pixels from the top-margin. This - * can be absolute pixel value (e.g 100), or relative to the size of the video - * (For example, 50%). - * @member {string} [crop.width] The width of the rectangular region in pixels. - * This can be absolute pixel value (e.g 100), or relative to the size of the - * video (For example, 50%). - * @member {string} [crop.height] The height of the rectangular region in - * pixels. This can be absolute pixel value (e.g 100), or relative to the size - * of the video (For example, 50%). - * @member {array} [overlays] The properties of overlays to be applied to the - * input video. These could be audio, image or video overlays. - */ + * Describes all the filtering operations, such as de-interlacing, rotation etc. that are to be + * applied to the input media before encoding. +*/ export interface Filters { + /** + * The de-interlacing settings. + */ deinterlace?: Deinterlace; + /** + * The rotation, if any, to be applied to the input video, before it is encoded. Default is Auto. + * Possible values include: 'Auto', 'None', 'Rotate0', 'Rotate90', 'Rotate180', 'Rotate270' + */ rotation?: string; + /** + * The parameters for the rectangular window with which to crop the input video. + */ crop?: Rectangle; + /** + * The properties of overlays to be applied to the input video. These could be audio, image or + * video overlays. + */ overlays?: Overlay[]; } /** - * @class - * Initializes a new instance of the Layer class. - * @constructor - * The encoder can be configured to produce video and/or images (thumbnails) at - * different resolutions, by specifying a layer for each desired resolution. A - * layer represents the properties for the video or image at a resolution. - * - * @member {string} [width] The width of the output video for this layer. The - * value can be absolute (in pixels) or relative (in percentage). For example - * 50% means the output video has half as many pixels in width as the input. - * @member {string} [height] The height of the output video for this layer. The - * value can be absolute (in pixels) or relative (in percentage). For example - * 50% means the output video has half as many pixels in height as the input. - * @member {string} [label] The alphanumeric label for this layer, which can be - * used in multiplexing different video and audio layers, or in naming the - * output file. - * @member {string} odatatype Polymorphic Discriminator - */ + * The encoder can be configured to produce video and/or images (thumbnails) at different + * resolutions, by specifying a layer for each desired resolution. A layer represents the + * properties for the video or image at a resolution. +*/ export interface Layer { + /** + * The width of the output video for this layer. The value can be absolute (in pixels) or + * relative (in percentage). For example 50% means the output video has half as many pixels in + * width as the input. + */ width?: string; + /** + * The height of the output video for this layer. The value can be absolute (in pixels) or + * relative (in percentage). For example 50% means the output video has half as many pixels in + * height as the input. + */ height?: string; + /** + * The alphanumeric label for this layer, which can be used in multiplexing different video and + * audio layers, or in naming the output file. + */ label?: string; + /** + * Polymorphic Discriminator + */ odatatype: string; } /** - * @class - * Initializes a new instance of the VideoLayer class. - * @constructor - * Describes the settings to be used when encoding the input video into a - * desired output bitrate layer. - * - * @member {number} [bitrate] The average bitrate in bits per second at which - * to encode the input video when generating this layer. This is a required - * field. - * @member {number} [maxBitrate] The maximum bitrate (in bits per second), at - * which the VBV buffer should be assumed to refill. If not specified, defaults - * to the same value as bitrate. - * @member {number} [bFrames] The number of B-frames to be used when encoding - * this layer. If not specified, the encoder chooses an appropriate number - * based on the video profile and level. - * @member {string} [frameRate] The frame rate (in frames per second) at which - * to encode this layer. The value can be in the form of M/N where M and N are - * integers (For example, 30000/1001), or in the form of a number (For example, - * 30, or 29.97). The encoder enforces constraints on allowed frame rates based - * on the profile and level. If it is not specified, the encoder will use the - * same frame rate as the input video. - * @member {number} [slices] The number of slices to be used when encoding this - * layer. If not specified, default is zero, which means that encoder will use - * a single slice for each frame. - * @member {boolean} [adaptiveBFrame] Whether or not adaptive B-frames are to - * be used when encoding this layer. If not specified, the encoder will turn it - * on whenever the video profile permits its use. - */ + * Describes the settings to be used when encoding the input video into a desired output bitrate + * layer. +*/ export interface VideoLayer extends Layer { + /** + * The average bitrate in bits per second at which to encode the input video when generating this + * layer. This is a required field. + */ bitrate?: number; + /** + * The maximum bitrate (in bits per second), at which the VBV buffer should be assumed to refill. + * If not specified, defaults to the same value as bitrate. + */ maxBitrate?: number; + /** + * The number of B-frames to be used when encoding this layer. If not specified, the encoder + * chooses an appropriate number based on the video profile and level. + */ bFrames?: number; + /** + * The frame rate (in frames per second) at which to encode this layer. The value can be in the + * form of M/N where M and N are integers (For example, 30000/1001), or in the form of a number + * (For example, 30, or 29.97). The encoder enforces constraints on allowed frame rates based on + * the profile and level. If it is not specified, the encoder will use the same frame rate as the + * input video. + */ frameRate?: string; + /** + * The number of slices to be used when encoding this layer. If not specified, default is zero, + * which means that encoder will use a single slice for each frame. + */ slices?: number; + /** + * Whether or not adaptive B-frames are to be used when encoding this layer. If not specified, + * the encoder will turn it on whenever the video profile permits its use. + */ adaptiveBFrame?: boolean; } /** - * @class - * Initializes a new instance of the H264Layer class. - * @constructor - * Describes the settings to be used when encoding the input video into a - * desired output bitrate layer with the H.264 video codec. - * - * @member {string} [profile] Which profile of the H.264 standard should be - * used when encoding this layer. Default is Auto. Possible values include: - * 'Auto', 'Baseline', 'Main', 'High', 'High422', 'High444' - * @member {string} [level] Which level of the H.264 standard should be used - * when encoding this layer. The value can be Auto, or a number that matches - * the H.264 profile. If not specified, the default is Auto, which lets the - * encoder choose the Level that is appropriate for this layer. - * @member {moment.duration} [bufferWindow] The VBV buffer window length. The - * value should be in ISO 8601 format. The value should be in the range - * [0.1-100] seconds. The default is 5 seconds (for example, PT5S). - * @member {number} [referenceFrames] The number of reference frames to be used - * when encoding this layer. If not specified, the encoder determines an - * appropriate number based on the encoder complexity setting. - * @member {string} [entropyMode] The entropy mode to be used for this layer. - * If not specified, the encoder chooses the mode that is appropriate for the - * profile and level. Possible values include: 'Cabac', 'Cavlc' - */ + * Describes the settings to be used when encoding the input video into a desired output bitrate + * layer with the H.264 video codec. +*/ export interface H264Layer extends VideoLayer { + /** + * Which profile of the H.264 standard should be used when encoding this layer. Default is Auto. + * Possible values include: 'Auto', 'Baseline', 'Main', 'High', 'High422', 'High444' + */ profile?: string; + /** + * Which level of the H.264 standard should be used when encoding this layer. The value can be + * Auto, or a number that matches the H.264 profile. If not specified, the default is Auto, which + * lets the encoder choose the Level that is appropriate for this layer. + */ level?: string; + /** + * The VBV buffer window length. The value should be in ISO 8601 format. The value should be in + * the range [0.1-100] seconds. The default is 5 seconds (for example, PT5S). + */ bufferWindow?: moment.Duration; + /** + * The number of reference frames to be used when encoding this layer. If not specified, the + * encoder determines an appropriate number based on the encoder complexity setting. + */ referenceFrames?: number; + /** + * The entropy mode to be used for this layer. If not specified, the encoder chooses the mode + * that is appropriate for the profile and level. Possible values include: 'Cabac', 'Cavlc' + */ entropyMode?: string; } /** - * @class - * Initializes a new instance of the H264Video class. - * @constructor * Describes all the properties for encoding a video with the H.264 codec. - * - * @member {boolean} [sceneChangeDetection] Whether or not the encoder should - * insert key frames at scene changes. If not specified, the default is false. - * This flag should be set to true only when the encoder is being configured to - * produce a single output video. - * @member {string} [complexity] Tells the encoder how to choose its encoding - * settings. The default value is Balanced. Possible values include: 'Speed', - * 'Balanced', 'Quality' - * @member {array} [layers] The collection of output H.264 layers to be - * produced by the encoder. - */ +*/ export interface H264Video extends Video { + /** + * Whether or not the encoder should insert key frames at scene changes. If not specified, the + * default is false. This flag should be set to true only when the encoder is being configured to + * produce a single output video. + */ sceneChangeDetection?: boolean; + /** + * Tells the encoder how to choose its encoding settings. The default value is Balanced. Possible + * values include: 'Speed', 'Balanced', 'Quality' + */ complexity?: string; + /** + * The collection of output H.264 layers to be produced by the encoder. + */ layers?: H264Layer[]; } /** - * @class - * Initializes a new instance of the JpgLayer class. - * @constructor * Describes the settings to produce a JPEG image from the input video. - * - * @member {number} [quality] The compression quality of the JPEG output. Range - * is from 0-100 and the default is 70. - */ +*/ export interface JpgLayer extends Layer { + /** + * The compression quality of the JPEG output. Range is from 0-100 and the default is 70. + */ quality?: number; } /** - * @class - * Initializes a new instance of the JpgImage class. - * @constructor - * Describes the properties for producing a series of JPEG images from the - * input video. - * - * @member {array} [layers] A collection of output JPEG image layers to be - * produced by the encoder. - */ + * Describes the properties for producing a series of JPEG images from the input video. +*/ export interface JpgImage extends Image { + /** + * A collection of output JPEG image layers to be produced by the encoder. + */ layers?: JpgLayer[]; } /** - * @class - * Initializes a new instance of the OutputFile class. - * @constructor * Represents an output file produced. - * - * @member {array} [labels] The list of labels that describe how the encoder - * should multiplex video and audio into an output file. For example, if the - * encoder is producing two video layers with labels v1 and v2, and one audio - * layer with label a1, then an array like '[v1, a1]' tells the encoder to - * produce an output file with the video track represented by v1 and the audio - * track represented by a1. - */ +*/ export interface OutputFile { + /** + * The list of labels that describe how the encoder should multiplex video and audio into an + * output file. For example, if the encoder is producing two video layers with labels v1 and v2, + * and one audio layer with label a1, then an array like '[v1, a1]' tells the encoder to produce + * an output file with the video track represented by v1 and the audio track represented by a1. + */ labels?: string[]; } /** - * @class - * Initializes a new instance of the MultiBitrateFormat class. - * @constructor - * Describes the properties for producing a collection of GOP aligned - * multi-bitrate files. The default behavior is to produce one output file for - * each video layer which is muxed together with all the audios. The exact - * output files produced can be controlled by specifying the outputFiles + * Describes the properties for producing a collection of GOP aligned multi-bitrate files. The + * default behavior is to produce one output file for each video layer which is muxed together with + * all the audios. The exact output files produced can be controlled by specifying the outputFiles * collection. - * - * @member {array} [outputFiles] The list of output files to produce. Each - * entry in the list is a set of audio and video layer labels to be muxed - * together . - */ +*/ export interface MultiBitrateFormat extends Format { + /** + * The list of output files to produce. Each entry in the list is a set of audio and video layer + * labels to be muxed together . + */ outputFiles?: OutputFile[]; } /** - * @class - * Initializes a new instance of the Mp4Format class. - * @constructor * Describes the properties for an output ISO MP4 file. - * - */ +*/ export interface Mp4Format extends MultiBitrateFormat { } /** - * @class - * Initializes a new instance of the PngLayer class. - * @constructor * Describes the settings to produce a PNG image from the input video. - * - */ +*/ export interface PngLayer extends Layer { } /** - * @class - * Initializes a new instance of the PngImage class. - * @constructor - * Describes the properties for producing a series of PNG images from the input - * video. - * - * @member {array} [layers] A collection of output PNG image layers to be - * produced by the encoder. - */ + * Describes the properties for producing a series of PNG images from the input video. +*/ export interface PngImage extends Image { + /** + * A collection of output PNG image layers to be produced by the encoder. + */ layers?: PngLayer[]; } /** - * @class - * Initializes a new instance of the BuiltInStandardEncoderPreset class. - * @constructor - * Describes a built-in preset for encoding the input video with the Standard - * Encoder. - * - * @member {string} presetName The built-in preset to be used for encoding - * videos. Possible values include: 'H264SingleBitrateSD', - * 'H264SingleBitrate720p', 'H264SingleBitrate1080p', 'AdaptiveStreaming', - * 'AACGoodQualityAudio', 'H264MultipleBitrate1080p', - * 'H264MultipleBitrate720p', 'H264MultipleBitrateSD' - */ + * Describes a built-in preset for encoding the input video with the Standard Encoder. +*/ export interface BuiltInStandardEncoderPreset extends Preset { + /** + * The built-in preset to be used for encoding videos. Possible values include: + * 'H264SingleBitrateSD', 'H264SingleBitrate720p', 'H264SingleBitrate1080p', 'AdaptiveStreaming', + * 'AACGoodQualityAudio', 'H264MultipleBitrate1080p', 'H264MultipleBitrate720p', + * 'H264MultipleBitrateSD' + */ presetName: string; } /** - * @class - * Initializes a new instance of the StandardEncoderPreset class. - * @constructor - * Describes all the settings to be used when encoding the input video with the - * Standard Encoder. - * - * @member {object} [filters] One or more filtering operations that are applied - * to the input media before encoding. - * @member {object} [filters.deinterlace] The de-interlacing settings. - * @member {string} [filters.deinterlace.parity] The field parity for - * de-interlacing, defaults to Auto. Possible values include: 'Auto', - * 'TopFieldFirst', 'BottomFieldFirst' - * @member {string} [filters.deinterlace.mode] The deinterlacing mode. Defaults - * to AutoPixelAdaptive. Possible values include: 'Off', 'AutoPixelAdaptive' - * @member {string} [filters.rotation] The rotation, if any, to be applied to - * the input video, before it is encoded. Default is Auto. Possible values - * include: 'Auto', 'None', 'Rotate0', 'Rotate90', 'Rotate180', 'Rotate270' - * @member {object} [filters.crop] The parameters for the rectangular window - * with which to crop the input video. - * @member {string} [filters.crop.left] The number of pixels from the - * left-margin. This can be absolute pixel value (e.g 100), or relative to the - * size of the video (For example, 50%). - * @member {string} [filters.crop.top] The number of pixels from the - * top-margin. This can be absolute pixel value (e.g 100), or relative to the - * size of the video (For example, 50%). - * @member {string} [filters.crop.width] The width of the rectangular region in - * pixels. This can be absolute pixel value (e.g 100), or relative to the size - * of the video (For example, 50%). - * @member {string} [filters.crop.height] The height of the rectangular region - * in pixels. This can be absolute pixel value (e.g 100), or relative to the - * size of the video (For example, 50%). - * @member {array} [filters.overlays] The properties of overlays to be applied - * to the input video. These could be audio, image or video overlays. - * @member {array} [codecs] The list of codecs to be used when encoding the - * input video. - * @member {array} [formats] The list of outputs to be produced by the encoder. - */ + * Describes all the settings to be used when encoding the input video with the Standard Encoder. +*/ export interface StandardEncoderPreset extends Preset { + /** + * One or more filtering operations that are applied to the input media before encoding. + */ filters?: Filters; + /** + * The list of codecs to be used when encoding the input video. + */ codecs?: Codec[]; + /** + * The list of outputs to be produced by the encoder. + */ formats?: Format[]; } /** - * @class - * Initializes a new instance of the VideoAnalyzerPreset class. - * @constructor - * A video analyzer preset that extracts insights (rich metadata) from both - * audio and video, and outputs a JSON format file. - * - * @member {string} [insightsToExtract] The type of insights to be extracted. - * If not set then based on the content the type will selected. If the content - * is audi only then only audio insights are extraced and if it is video only. - * Possible values include: 'AudioInsightsOnly', 'VideoInsightsOnly', - * 'AllInsights' - */ + * A video analyzer preset that extracts insights (rich metadata) from both audio and video, and + * outputs a JSON format file. +*/ export interface VideoAnalyzerPreset extends AudioAnalyzerPreset { + /** + * The type of insights to be extracted. If not set then based on the content the type will + * selected. If the content is audio only then only audio insights are extracted and if it is + * video only. Possible values include: 'AudioInsightsOnly', 'VideoInsightsOnly', 'AllInsights' + */ insightsToExtract?: string; } /** - * @class - * Initializes a new instance of the TransportStreamFormat class. - * @constructor - * Describes the properties for generating an MPEG-2 Transport Stream (ISO/IEC - * 13818-1) output video file(s). - * - */ + * Describes the properties for generating an MPEG-2 Transport Stream (ISO/IEC 13818-1) output + * video file(s). +*/ export interface TransportStreamFormat extends MultiBitrateFormat { } /** - * @class - * Initializes a new instance of the VideoOverlay class. - * @constructor * Describes the properties of a video overlay. - * - * @member {object} [position] The location in the input video where the - * overlay is applied. - * @member {string} [position.left] The number of pixels from the left-margin. - * This can be absolute pixel value (e.g 100), or relative to the size of the - * video (For example, 50%). - * @member {string} [position.top] The number of pixels from the top-margin. - * This can be absolute pixel value (e.g 100), or relative to the size of the - * video (For example, 50%). - * @member {string} [position.width] The width of the rectangular region in - * pixels. This can be absolute pixel value (e.g 100), or relative to the size - * of the video (For example, 50%). - * @member {string} [position.height] The height of the rectangular region in - * pixels. This can be absolute pixel value (e.g 100), or relative to the size - * of the video (For example, 50%). - * @member {number} [opacity] The opacity of the overlay. This is a value in - * the range [0 - 1.0]. Default is 1.0 which mean the overlay is opaque. - * @member {object} [cropRectangle] An optional rectangular window used to crop - * the overlay image or video. - * @member {string} [cropRectangle.left] The number of pixels from the - * left-margin. This can be absolute pixel value (e.g 100), or relative to the - * size of the video (For example, 50%). - * @member {string} [cropRectangle.top] The number of pixels from the - * top-margin. This can be absolute pixel value (e.g 100), or relative to the - * size of the video (For example, 50%). - * @member {string} [cropRectangle.width] The width of the rectangular region - * in pixels. This can be absolute pixel value (e.g 100), or relative to the - * size of the video (For example, 50%). - * @member {string} [cropRectangle.height] The height of the rectangular region - * in pixels. This can be absolute pixel value (e.g 100), or relative to the - * size of the video (For example, 50%). - */ +*/ export interface VideoOverlay extends Overlay { + /** + * The location in the input video where the overlay is applied. + */ position?: Rectangle; + /** + * The opacity of the overlay. This is a value in the range [0 - 1.0]. Default is 1.0 which mean + * the overlay is opaque. + */ opacity?: number; + /** + * An optional rectangular window used to crop the overlay image or video. + */ cropRectangle?: Rectangle; } /** - * @class - * Initializes a new instance of the TransformOutput class. - * @constructor - * Describes the properties of a TransformOutput, which are the rules to be - * applied while generating the desired output. - * - * @member {string} [onError] A Transform can define more than one outputs. - * This property defines what the service should do when one output fails - - * either continue to produce other outputs, or, stop the other outputs. The - * overall Job state will not reflect failures of outputs that are specified - * with 'ContinueJob'. The default is 'StopProcessingJob'. Possible values - * include: 'StopProcessingJob', 'ContinueJob' - * @member {string} [relativePriority] Sets the relative priority of the - * TransformOutputs within a Transform. This sets the priority that the service - * uses for processing TransformOutputs. The default priority is Normal. - * Possible values include: 'Low', 'Normal', 'High' - * @member {object} preset Preset that describes the operations that will be - * used to modify, transcode, or extract insights from the source file to - * generate the output. - * @member {string} [preset.odatatype] Polymorphic Discriminator - */ + * Describes the properties of a TransformOutput, which are the rules to be applied while + * generating the desired output. +*/ export interface TransformOutput { + /** + * A Transform can define more than one outputs. This property defines what the service should do + * when one output fails - either continue to produce other outputs, or, stop the other outputs. + * The overall Job state will not reflect failures of outputs that are specified with + * 'ContinueJob'. The default is 'StopProcessingJob'. Possible values include: + * 'StopProcessingJob', 'ContinueJob' + */ onError?: string; + /** + * Sets the relative priority of the TransformOutputs within a Transform. This sets the priority + * that the service uses for processing TransformOutputs. The default priority is Normal. + * Possible values include: 'Low', 'Normal', 'High' + */ relativePriority?: string; + /** + * Preset that describes the operations that will be used to modify, transcode, or extract + * insights from the source file to generate the output. + */ preset: Preset; } /** - * @class - * Initializes a new instance of the Transform class. - * @constructor - * A Transform encapsulates the rules or instructions for generating desired - * outputs from input media, such as by transcoding or by extracting insights. - * After the Transform is created, it can be applied to input media by creating - * Jobs. - * - * @member {date} [created] The UTC date and time when the Transform was - * created, in 'YYYY-MM-DDThh:mm:ssZ' format. - * @member {string} [description] An optional verbose description of the - * Transform. - * @member {date} [lastModified] The UTC date and time when the Transform was - * last updated, in 'YYYY-MM-DDThh:mm:ssZ' format. - * @member {array} outputs An array of one or more TransformOutputs that the - * Transform should generate. - */ + * A Transform encapsulates the rules or instructions for generating desired outputs from input + * media, such as by transcoding or by extracting insights. After the Transform is created, it can + * be applied to input media by creating Jobs. +*/ export interface Transform extends ProxyResource { + /** + * The UTC date and time when the Transform was created, in 'YYYY-MM-DDThh:mm:ssZ' format. + */ readonly created?: Date; + /** + * An optional verbose description of the Transform. + */ description?: string; + /** + * The UTC date and time when the Transform was last updated, in 'YYYY-MM-DDThh:mm:ssZ' format. + */ readonly lastModified?: Date; + /** + * An array of one or more TransformOutputs that the Transform should generate. + */ outputs: TransformOutput[]; } /** - * @class - * Initializes a new instance of the JobInput class. - * @constructor * Base class for inputs to a Job. - * - * @member {string} odatatype Polymorphic Discriminator - */ +*/ export interface JobInput { + /** + * Polymorphic Discriminator + */ odatatype: string; } /** - * @class - * Initializes a new instance of the JobInputClip class. - * @constructor * Represents input files for a Job. - * - * @member {array} [files] List of files. Required for JobInputHttp. - * @member {string} [label] A label that is assigned to a JobInputClip, that is - * used to satisfy a reference used in the Transform. For example, a Transform - * can be authored so as to take an image file with the label 'xyz' and apply - * it as an overlay onto the input video before it is encoded. When submitting - * a Job, exactly one of the JobInputs should be the image file, and it should - * have the label 'xyz'. - */ +*/ export interface JobInputClip extends JobInput { + /** + * List of files. Required for JobInputHttp. + */ files?: string[]; + /** + * A label that is assigned to a JobInputClip, that is used to satisfy a reference used in the + * Transform. For example, a Transform can be authored so as to take an image file with the label + * 'xyz' and apply it as an overlay onto the input video before it is encoded. When submitting a + * Job, exactly one of the JobInputs should be the image file, and it should have the label + * 'xyz'. + */ label?: string; } /** - * @class - * Initializes a new instance of the JobInputs class. - * @constructor - * Describes a list of of inputs to a Job. - * - * @member {array} [inputs] List of inputs to a Job. - */ + * Describes a list of inputs to a Job. +*/ export interface JobInputs extends JobInput { + /** + * List of inputs to a Job. + */ inputs?: JobInput[]; } /** - * @class - * Initializes a new instance of the JobInputAsset class. - * @constructor * Represents an Asset for input into a Job. - * - * @member {string} assetName The name of the input Asset. - */ +*/ export interface JobInputAsset extends JobInputClip { + /** + * The name of the input Asset. + */ assetName: string; } /** - * @class - * Initializes a new instance of the JobInputHttp class. - * @constructor * Represents HTTPS job input. - * - * @member {string} [baseUri] Base URI for HTTPS job input. It will be - * concatenated with provided file names. If no base uri is given, then the - * provided file list is assumed to be fully qualified uris. - */ +*/ export interface JobInputHttp extends JobInputClip { + /** + * Base URI for HTTPS job input. It will be concatenated with provided file names. If no base + * uri is given, then the provided file list is assumed to be fully qualified uris. + */ baseUri?: string; } /** - * @class - * Initializes a new instance of the JobErrorDetail class. - * @constructor * Details of JobOutput errors. - * - * @member {string} [code] Code describing the error detail. - * @member {string} [message] A human-readable representation of the error. - */ +*/ export interface JobErrorDetail { + /** + * Code describing the error detail. + */ readonly code?: string; + /** + * A human-readable representation of the error. + */ readonly message?: string; } /** - * @class - * Initializes a new instance of the JobError class. - * @constructor * Details of JobOutput errors. - * - * @member {string} [code] Error code describing the error. Possible values - * include: 'ServiceError', 'ServiceTransientError', 'DownloadNotAccessible', - * 'DownloadTransientError', 'UploadNotAccessible', 'UploadTransientError', - * 'ConfigurationUnsupported', 'ContentMalformed', 'ContentUnsupported' - * @member {string} [message] A human-readable language-dependent - * representation of the error. - * @member {string} [category] Helps with categorization of errors. Possible - * values include: 'Service', 'Download', 'Upload', 'Configuration', 'Content' - * @member {string} [retry] Indicates that it may be possible to retry the Job. - * If retry is unsuccessful, please contact Azure support via Azure Portal. - * Possible values include: 'DoNotRetry', 'MayRetry' - * @member {array} [details] An array of details about specific errors that led - * to this reported error. - */ +*/ export interface JobError { + /** + * Error code describing the error. Possible values include: 'ServiceError', + * 'ServiceTransientError', 'DownloadNotAccessible', 'DownloadTransientError', + * 'UploadNotAccessible', 'UploadTransientError', 'ConfigurationUnsupported', 'ContentMalformed', + * 'ContentUnsupported' + */ readonly code?: string; + /** + * A human-readable language-dependent representation of the error. + */ readonly message?: string; + /** + * Helps with categorization of errors. Possible values include: 'Service', 'Download', 'Upload', + * 'Configuration', 'Content' + */ readonly category?: string; + /** + * Indicates that it may be possible to retry the Job. If retry is unsuccessful, please contact + * Azure support via Azure Portal. Possible values include: 'DoNotRetry', 'MayRetry' + */ readonly retry?: string; + /** + * An array of details about specific errors that led to this reported error. + */ readonly details?: JobErrorDetail[]; } /** - * @class - * Initializes a new instance of the JobOutput class. - * @constructor * Describes all the properties of a JobOutput. - * - * @member {object} [error] If the JobOutput is in the Error state, it contains - * the details of the error. - * @member {string} [error.code] Error code describing the error. Possible - * values include: 'ServiceError', 'ServiceTransientError', - * 'DownloadNotAccessible', 'DownloadTransientError', 'UploadNotAccessible', - * 'UploadTransientError', 'ConfigurationUnsupported', 'ContentMalformed', - * 'ContentUnsupported' - * @member {string} [error.message] A human-readable language-dependent - * representation of the error. - * @member {string} [error.category] Helps with categorization of errors. - * Possible values include: 'Service', 'Download', 'Upload', 'Configuration', - * 'Content' - * @member {string} [error.retry] Indicates that it may be possible to retry - * the Job. If retry is unsuccessful, please contact Azure support via Azure - * Portal. Possible values include: 'DoNotRetry', 'MayRetry' - * @member {array} [error.details] An array of details about specific errors - * that led to this reported error. - * @member {string} [state] Describes the state of the JobOutput. Possible - * values include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - * 'Queued', 'Scheduled' - * @member {number} [progress] If the JobOutput is in a Processing state, this - * contains the Job completion percentage. The value is an estimate and not - * intended to be used to predict Job completion times. To determine if the - * JobOutput is complete, use the State property. - * @member {string} [label] A label that is assigned to a JobOutput in order to - * help uniquely identify it. This is useful when your Transform has more than - * one TransformOutput, whereby your Job has more than one JobOutput. In such - * cases, when you submit the Job, you will add two or more JobOutputs, in the - * same order as TransformOutputs in the Transform. Subsequently, when you - * retrieve the Job, either through events or on a GET request, you can use the - * label to easily identify the JobOutput. If a label is not provided, a - * default value of '{presetName}_{outputIndex}' will be used, where the preset - * name is the name of the preset in the corresponding TransformOutput and the - * output index is the relative index of the this JobOutput within the Job. - * Note that this index is the same as the relative index of the corresponding - * TransformOutput within its Transform. - * @member {string} odatatype Polymorphic Discriminator - */ +*/ export interface JobOutput { + /** + * If the JobOutput is in the Error state, it contains the details of the error. + */ readonly error?: JobError; + /** + * Describes the state of the JobOutput. Possible values include: 'Canceled', 'Canceling', + * 'Error', 'Finished', 'Processing', 'Queued', 'Scheduled' + */ readonly state?: string; + /** + * If the JobOutput is in a Processing state, this contains the Job completion percentage. The + * value is an estimate and not intended to be used to predict Job completion times. To determine + * if the JobOutput is complete, use the State property. + */ readonly progress?: number; + /** + * A label that is assigned to a JobOutput in order to help uniquely identify it. This is useful + * when your Transform has more than one TransformOutput, whereby your Job has more than one + * JobOutput. In such cases, when you submit the Job, you will add two or more JobOutputs, in the + * same order as TransformOutputs in the Transform. Subsequently, when you retrieve the Job, + * either through events or on a GET request, you can use the label to easily identify the + * JobOutput. If a label is not provided, a default value of '{presetName}_{outputIndex}' will be + * used, where the preset name is the name of the preset in the corresponding TransformOutput and + * the output index is the relative index of the this JobOutput within the Job. Note that this + * index is the same as the relative index of the corresponding TransformOutput within its + * Transform. + */ label?: string; + /** + * Polymorphic Discriminator + */ odatatype: string; } /** - * @class - * Initializes a new instance of the JobOutputAsset class. - * @constructor * Represents an Asset used as a JobOutput. - * - * @member {string} assetName The name of the output Asset. - */ +*/ export interface JobOutputAsset extends JobOutput { + /** + * The name of the output Asset. + */ assetName: string; } /** - * @class - * Initializes a new instance of the Job class. - * @constructor - * A Job resource type. The progress and state can be obtained by polling a Job - * or subscribing to events using EventGrid. - * - * @member {date} [created] The UTC date and time when the Job was created, in - * 'YYYY-MM-DDThh:mm:ssZ' format. - * @member {string} [state] The current state of the job. Possible values - * include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - * 'Queued', 'Scheduled' - * @member {string} [description] Optional customer supplied description of the - * Job. - * @member {object} input The inputs for the Job. - * @member {string} [input.odatatype] Polymorphic Discriminator - * @member {date} [lastModified] The UTC date and time when the Job was last - * updated, in 'YYYY-MM-DDThh:mm:ssZ' format. - * @member {array} outputs The outputs for the Job. - * @member {string} [priority] Priority with which the job should be processed. - * Higher priority jobs are processed before lower priority jobs. If not set, - * the default is normal. Possible values include: 'Low', 'Normal', 'High' - * @member {object} [correlationData] Customer provided correlation data that - * will be returned in Job and JobOutput state events. - */ + * A Job resource type. The progress and state can be obtained by polling a Job or subscribing to + * events using EventGrid. +*/ export interface Job extends ProxyResource { + /** + * The UTC date and time when the Job was created, in 'YYYY-MM-DDThh:mm:ssZ' format. + */ readonly created?: Date; + /** + * The current state of the job. Possible values include: 'Canceled', 'Canceling', 'Error', + * 'Finished', 'Processing', 'Queued', 'Scheduled' + */ readonly state?: string; + /** + * Optional customer supplied description of the Job. + */ description?: string; + /** + * The inputs for the Job. + */ input: JobInput; + /** + * The UTC date and time when the Job was last updated, in 'YYYY-MM-DDThh:mm:ssZ' format. + */ readonly lastModified?: Date; + /** + * The outputs for the Job. + */ outputs: JobOutput[]; + /** + * Priority with which the job should be processed. Higher priority jobs are processed before + * lower priority jobs. If not set, the default is normal. Possible values include: 'Low', + * 'Normal', 'High' + */ priority?: string; + /** + * Customer provided correlation data that will be returned in Job and JobOutput state events. + */ correlationData?: { [propertyName: string]: string }; } /** - * @class - * Initializes a new instance of the TrackPropertyCondition class. - * @constructor * Class to specify one track property condition - * - * @member {string} property Track property type. Possible values include: - * 'Unknown', 'FourCC' - * @member {string} operation Track property condition operation. Possible - * values include: 'Unknown', 'Equal' - * @member {string} [value] Track property value - */ +*/ export interface TrackPropertyCondition { + /** + * Track property type. Possible values include: 'Unknown', 'FourCC' + */ property: string; + /** + * Track property condition operation. Possible values include: 'Unknown', 'Equal' + */ operation: string; + /** + * Track property value + */ value?: string; } /** - * @class - * Initializes a new instance of the TrackSelection class. - * @constructor * Class to select a track - * - * @member {array} [trackSelections] TrackSelections is a track property - * condition list which can specify track(s) - */ +*/ export interface TrackSelection { + /** + * TrackSelections is a track property condition list which can specify track(s) + */ trackSelections?: TrackPropertyCondition[]; } /** - * @class - * Initializes a new instance of the DefaultKey class. - * @constructor - * Class to specify properties of default content key for each encryption - * scheme - * - * @member {string} [label] Label can be used to specify Content Key when - * creating a Streaming Locator - * @member {string} [policyName] Policy used by Default Key - */ + * Class to specify properties of default content key for each encryption scheme +*/ export interface DefaultKey { + /** + * Label can be used to specify Content Key when creating a Streaming Locator + */ label?: string; + /** + * Policy used by Default Key + */ policyName?: string; } /** - * @class - * Initializes a new instance of the StreamingPolicyContentKey class. - * @constructor * Class to specify properties of content key - * - * @member {string} [label] Label can be used to specify Content Key when - * creating a Streaming Locator - * @member {string} [policyName] Policy used by Content Key - * @member {array} [tracks] Tracks which use this content key - */ +*/ export interface StreamingPolicyContentKey { + /** + * Label can be used to specify Content Key when creating a Streaming Locator + */ label?: string; + /** + * Policy used by Content Key + */ policyName?: string; + /** + * Tracks which use this content key + */ tracks?: TrackSelection[]; } /** - * @class - * Initializes a new instance of the StreamingPolicyContentKeys class. - * @constructor * Class to specify properties of all content keys in Streaming Policy - * - * @member {object} [defaultKey] Default content key for an encryption scheme - * @member {string} [defaultKey.label] Label can be used to specify Content Key - * when creating a Streaming Locator - * @member {string} [defaultKey.policyName] Policy used by Default Key - * @member {array} [keyToTrackMappings] Representing tracks needs separate - * content key - */ +*/ export interface StreamingPolicyContentKeys { + /** + * Default content key for an encryption scheme + */ defaultKey?: DefaultKey; + /** + * Representing tracks needs separate content key + */ keyToTrackMappings?: StreamingPolicyContentKey[]; } /** - * @class - * Initializes a new instance of the StreamingPolicyPlayReadyConfiguration class. - * @constructor * Class to specify configurations of PlayReady in Streaming Policy - * - * @member {string} [customLicenseAcquisitionUrlTemplate] The template for a - * customer service to deliver keys to end users. Not needed when using Azure - * Media Services for issuing keys. - * @member {string} [playReadyCustomAttributes] Custom attributes for PlayReady - */ +*/ export interface StreamingPolicyPlayReadyConfiguration { + /** + * The template for a customer service to deliver keys to end users. Not needed when using Azure + * Media Services for issuing keys. + */ customLicenseAcquisitionUrlTemplate?: string; + /** + * Custom attributes for PlayReady + */ playReadyCustomAttributes?: string; } /** - * @class - * Initializes a new instance of the StreamingPolicyWidevineConfiguration class. - * @constructor * Class to specify configurations of Widevine in Streaming Policy - * - * @member {string} [customLicenseAcquisitionUrlTemplate] The template for a - * customer service to deliver keys to end users. Not needed when using Azure - * Media Services for issuing keys. - */ +*/ export interface StreamingPolicyWidevineConfiguration { + /** + * The template for a customer service to deliver keys to end users. Not needed when using Azure + * Media Services for issuing keys. + */ customLicenseAcquisitionUrlTemplate?: string; } /** - * @class - * Initializes a new instance of the StreamingPolicyFairPlayConfiguration class. - * @constructor * Class to specify configurations of FairPlay in Streaming Policy - * - * @member {string} [customLicenseAcquisitionUrlTemplate] The template for a - * customer service to deliver keys to end users. Not needed when using Azure - * Media Services for issuing keys. - * @member {boolean} allowPersistentLicense All license to be persistent or not - */ +*/ export interface StreamingPolicyFairPlayConfiguration { + /** + * The template for a customer service to deliver keys to end users. Not needed when using Azure + * Media Services for issuing keys. + */ customLicenseAcquisitionUrlTemplate?: string; + /** + * All license to be persistent or not + */ allowPersistentLicense: boolean; } /** - * @class - * Initializes a new instance of the CbcsDrmConfiguration class. - * @constructor - * Class to specify DRM configurations of CommonEncryptionCbcs scheme in - * Streaming Policy - * - * @member {object} [fairPlay] FairPlay configurations - * @member {string} [fairPlay.customLicenseAcquisitionUrlTemplate] The template - * for a customer service to deliver keys to end users. Not needed when using - * Azure Media Services for issuing keys. - * @member {boolean} [fairPlay.allowPersistentLicense] All license to be - * persistent or not - * @member {object} [playReady] PlayReady configurations - * @member {string} [playReady.customLicenseAcquisitionUrlTemplate] The - * template for a customer service to deliver keys to end users. Not needed - * when using Azure Media Services for issuing keys. - * @member {string} [playReady.playReadyCustomAttributes] Custom attributes for - * PlayReady - * @member {object} [widevine] Widevine configurations - * @member {string} [widevine.customLicenseAcquisitionUrlTemplate] The template - * for a customer service to deliver keys to end users. Not needed when using - * Azure Media Services for issuing keys. - */ + * Class to specify DRM configurations of CommonEncryptionCbcs scheme in Streaming Policy +*/ export interface CbcsDrmConfiguration { + /** + * FairPlay configurations + */ fairPlay?: StreamingPolicyFairPlayConfiguration; + /** + * PlayReady configurations + */ playReady?: StreamingPolicyPlayReadyConfiguration; + /** + * Widevine configurations + */ widevine?: StreamingPolicyWidevineConfiguration; } /** - * @class - * Initializes a new instance of the CencDrmConfiguration class. - * @constructor - * Class to specify DRM configurations of CommonEncryptionCenc scheme in - * Streaming Policy - * - * @member {object} [playReady] PlayReady configurations - * @member {string} [playReady.customLicenseAcquisitionUrlTemplate] The - * template for a customer service to deliver keys to end users. Not needed - * when using Azure Media Services for issuing keys. - * @member {string} [playReady.playReadyCustomAttributes] Custom attributes for - * PlayReady - * @member {object} [widevine] Widevine configurations - * @member {string} [widevine.customLicenseAcquisitionUrlTemplate] The template - * for a customer service to deliver keys to end users. Not needed when using - * Azure Media Services for issuing keys. - */ + * Class to specify DRM configurations of CommonEncryptionCenc scheme in Streaming Policy +*/ export interface CencDrmConfiguration { + /** + * PlayReady configurations + */ playReady?: StreamingPolicyPlayReadyConfiguration; + /** + * Widevine configurations + */ widevine?: StreamingPolicyWidevineConfiguration; } /** - * @class - * Initializes a new instance of the EnabledProtocols class. - * @constructor * Class to specify which protocols are enabled - * - * @member {boolean} download Enable Download protocol or not - * @member {boolean} dash Enable DASH protocol or not - * @member {boolean} hls Enable HLS protocol or not - * @member {boolean} smoothStreaming Enable SmoothStreaming protocol or not - */ +*/ export interface EnabledProtocols { + /** + * Enable Download protocol or not + */ download: boolean; + /** + * Enable DASH protocol or not + */ dash: boolean; + /** + * Enable HLS protocol or not + */ hls: boolean; + /** + * Enable SmoothStreaming protocol or not + */ smoothStreaming: boolean; } /** - * @class - * Initializes a new instance of the NoEncryption class. - * @constructor * Class for NoEncryption scheme - * - * @member {object} [enabledProtocols] Representing supported protocols - * @member {boolean} [enabledProtocols.download] Enable Download protocol or - * not - * @member {boolean} [enabledProtocols.dash] Enable DASH protocol or not - * @member {boolean} [enabledProtocols.hls] Enable HLS protocol or not - * @member {boolean} [enabledProtocols.smoothStreaming] Enable SmoothStreaming - * protocol or not - */ +*/ export interface NoEncryption { + /** + * Representing supported protocols + */ enabledProtocols?: EnabledProtocols; } /** - * @class - * Initializes a new instance of the EnvelopeEncryption class. - * @constructor * Class for EnvelopeEncryption encryption scheme - * - * @member {object} [enabledProtocols] Representing supported protocols - * @member {boolean} [enabledProtocols.download] Enable Download protocol or - * not - * @member {boolean} [enabledProtocols.dash] Enable DASH protocol or not - * @member {boolean} [enabledProtocols.hls] Enable HLS protocol or not - * @member {boolean} [enabledProtocols.smoothStreaming] Enable SmoothStreaming - * protocol or not - * @member {array} [clearTracks] Representing which tracks should not be - * encrypted - * @member {object} [contentKeys] Representing default content key for each - * encryption scheme and separate content keys for specific tracks - * @member {object} [contentKeys.defaultKey] Default content key for an - * encryption scheme - * @member {string} [contentKeys.defaultKey.label] Label can be used to specify - * Content Key when creating a Streaming Locator - * @member {string} [contentKeys.defaultKey.policyName] Policy used by Default - * Key - * @member {array} [contentKeys.keyToTrackMappings] Representing tracks needs - * separate content key - * @member {string} [customKeyAcquisitionUrlTemplate] KeyAcquistionUrlTemplate - * is used to point to user specified service to delivery content keys - */ +*/ export interface EnvelopeEncryption { + /** + * Representing supported protocols + */ enabledProtocols?: EnabledProtocols; + /** + * Representing which tracks should not be encrypted + */ clearTracks?: TrackSelection[]; + /** + * Representing default content key for each encryption scheme and separate content keys for + * specific tracks + */ contentKeys?: StreamingPolicyContentKeys; + /** + * KeyAcquisitionUrlTemplate is used to point to user specified service to delivery content keys + */ customKeyAcquisitionUrlTemplate?: string; } /** - * @class - * Initializes a new instance of the CommonEncryptionCenc class. - * @constructor * Class for envelope encryption scheme - * - * @member {object} [enabledProtocols] Representing supported protocols - * @member {boolean} [enabledProtocols.download] Enable Download protocol or - * not - * @member {boolean} [enabledProtocols.dash] Enable DASH protocol or not - * @member {boolean} [enabledProtocols.hls] Enable HLS protocol or not - * @member {boolean} [enabledProtocols.smoothStreaming] Enable SmoothStreaming - * protocol or not - * @member {array} [clearTracks] Representing which tracks should not be - * encrypted - * @member {object} [contentKeys] Representing default content key for each - * encryption scheme and separate content keys for specific tracks - * @member {object} [contentKeys.defaultKey] Default content key for an - * encryption scheme - * @member {string} [contentKeys.defaultKey.label] Label can be used to specify - * Content Key when creating a Streaming Locator - * @member {string} [contentKeys.defaultKey.policyName] Policy used by Default - * Key - * @member {array} [contentKeys.keyToTrackMappings] Representing tracks needs - * separate content key - * @member {object} [drm] Configuration of DRMs for CommonEncryptionCenc - * encryption scheme - * @member {object} [drm.playReady] PlayReady configurations - * @member {string} [drm.playReady.customLicenseAcquisitionUrlTemplate] The - * template for a customer service to deliver keys to end users. Not needed - * when using Azure Media Services for issuing keys. - * @member {string} [drm.playReady.playReadyCustomAttributes] Custom attributes - * for PlayReady - * @member {object} [drm.widevine] Widevine configurations - * @member {string} [drm.widevine.customLicenseAcquisitionUrlTemplate] The - * template for a customer service to deliver keys to end users. Not needed - * when using Azure Media Services for issuing keys. - */ +*/ export interface CommonEncryptionCenc { + /** + * Representing supported protocols + */ enabledProtocols?: EnabledProtocols; + /** + * Representing which tracks should not be encrypted + */ clearTracks?: TrackSelection[]; + /** + * Representing default content key for each encryption scheme and separate content keys for + * specific tracks + */ contentKeys?: StreamingPolicyContentKeys; + /** + * Configuration of DRMs for CommonEncryptionCenc encryption scheme + */ drm?: CencDrmConfiguration; } /** - * @class - * Initializes a new instance of the CommonEncryptionCbcs class. - * @constructor * Class for CommonEncryptionCbcs encryption scheme - * - * @member {object} [enabledProtocols] Representing supported protocols - * @member {boolean} [enabledProtocols.download] Enable Download protocol or - * not - * @member {boolean} [enabledProtocols.dash] Enable DASH protocol or not - * @member {boolean} [enabledProtocols.hls] Enable HLS protocol or not - * @member {boolean} [enabledProtocols.smoothStreaming] Enable SmoothStreaming - * protocol or not - * @member {array} [clearTracks] Representing which tracks should not be - * encrypted - * @member {object} [contentKeys] Representing default content key for each - * encryption scheme and separate content keys for specific tracks - * @member {object} [contentKeys.defaultKey] Default content key for an - * encryption scheme - * @member {string} [contentKeys.defaultKey.label] Label can be used to specify - * Content Key when creating a Streaming Locator - * @member {string} [contentKeys.defaultKey.policyName] Policy used by Default - * Key - * @member {array} [contentKeys.keyToTrackMappings] Representing tracks needs - * separate content key - * @member {object} [drm] Configuration of DRMs for current encryption scheme - * @member {object} [drm.fairPlay] FairPlay configurations - * @member {string} [drm.fairPlay.customLicenseAcquisitionUrlTemplate] The - * template for a customer service to deliver keys to end users. Not needed - * when using Azure Media Services for issuing keys. - * @member {boolean} [drm.fairPlay.allowPersistentLicense] All license to be - * persistent or not - * @member {object} [drm.playReady] PlayReady configurations - * @member {string} [drm.playReady.customLicenseAcquisitionUrlTemplate] The - * template for a customer service to deliver keys to end users. Not needed - * when using Azure Media Services for issuing keys. - * @member {string} [drm.playReady.playReadyCustomAttributes] Custom attributes - * for PlayReady - * @member {object} [drm.widevine] Widevine configurations - * @member {string} [drm.widevine.customLicenseAcquisitionUrlTemplate] The - * template for a customer service to deliver keys to end users. Not needed - * when using Azure Media Services for issuing keys. - */ +*/ export interface CommonEncryptionCbcs { + /** + * Representing supported protocols + */ enabledProtocols?: EnabledProtocols; + /** + * Representing which tracks should not be encrypted + */ clearTracks?: TrackSelection[]; + /** + * Representing default content key for each encryption scheme and separate content keys for + * specific tracks + */ contentKeys?: StreamingPolicyContentKeys; + /** + * Configuration of DRMs for current encryption scheme + */ drm?: CbcsDrmConfiguration; } /** - * @class - * Initializes a new instance of the StreamingPolicy class. - * @constructor * A Streaming Policy resource - * - * @member {date} [created] Creation time of Streaming Policy - * @member {string} [defaultContentKeyPolicyName] Default ContentKey used by - * current Streaming Policy - * @member {object} [envelopeEncryption] Configuration of EnvelopeEncryption - * @member {object} [envelopeEncryption.enabledProtocols] Representing - * supported protocols - * @member {boolean} [envelopeEncryption.enabledProtocols.download] Enable - * Download protocol or not - * @member {boolean} [envelopeEncryption.enabledProtocols.dash] Enable DASH - * protocol or not - * @member {boolean} [envelopeEncryption.enabledProtocols.hls] Enable HLS - * protocol or not - * @member {boolean} [envelopeEncryption.enabledProtocols.smoothStreaming] - * Enable SmoothStreaming protocol or not - * @member {array} [envelopeEncryption.clearTracks] Representing which tracks - * should not be encrypted - * @member {object} [envelopeEncryption.contentKeys] Representing default - * content key for each encryption scheme and separate content keys for - * specific tracks - * @member {object} [envelopeEncryption.contentKeys.defaultKey] Default content - * key for an encryption scheme - * @member {string} [envelopeEncryption.contentKeys.defaultKey.label] Label can - * be used to specify Content Key when creating a Streaming Locator - * @member {string} [envelopeEncryption.contentKeys.defaultKey.policyName] - * Policy used by Default Key - * @member {array} [envelopeEncryption.contentKeys.keyToTrackMappings] - * Representing tracks needs separate content key - * @member {string} [envelopeEncryption.customKeyAcquisitionUrlTemplate] - * KeyAcquistionUrlTemplate is used to point to user specified service to - * delivery content keys - * @member {object} [commonEncryptionCenc] Configuration of - * CommonEncryptionCenc - * @member {object} [commonEncryptionCenc.enabledProtocols] Representing - * supported protocols - * @member {boolean} [commonEncryptionCenc.enabledProtocols.download] Enable - * Download protocol or not - * @member {boolean} [commonEncryptionCenc.enabledProtocols.dash] Enable DASH - * protocol or not - * @member {boolean} [commonEncryptionCenc.enabledProtocols.hls] Enable HLS - * protocol or not - * @member {boolean} [commonEncryptionCenc.enabledProtocols.smoothStreaming] - * Enable SmoothStreaming protocol or not - * @member {array} [commonEncryptionCenc.clearTracks] Representing which tracks - * should not be encrypted - * @member {object} [commonEncryptionCenc.contentKeys] Representing default - * content key for each encryption scheme and separate content keys for - * specific tracks - * @member {object} [commonEncryptionCenc.contentKeys.defaultKey] Default - * content key for an encryption scheme - * @member {string} [commonEncryptionCenc.contentKeys.defaultKey.label] Label - * can be used to specify Content Key when creating a Streaming Locator - * @member {string} [commonEncryptionCenc.contentKeys.defaultKey.policyName] - * Policy used by Default Key - * @member {array} [commonEncryptionCenc.contentKeys.keyToTrackMappings] - * Representing tracks needs separate content key - * @member {object} [commonEncryptionCenc.drm] Configuration of DRMs for - * CommonEncryptionCenc encryption scheme - * @member {object} [commonEncryptionCenc.drm.playReady] PlayReady - * configurations - * @member {string} - * [commonEncryptionCenc.drm.playReady.customLicenseAcquisitionUrlTemplate] The - * template for a customer service to deliver keys to end users. Not needed - * when using Azure Media Services for issuing keys. - * @member {string} - * [commonEncryptionCenc.drm.playReady.playReadyCustomAttributes] Custom - * attributes for PlayReady - * @member {object} [commonEncryptionCenc.drm.widevine] Widevine configurations - * @member {string} - * [commonEncryptionCenc.drm.widevine.customLicenseAcquisitionUrlTemplate] The - * template for a customer service to deliver keys to end users. Not needed - * when using Azure Media Services for issuing keys. - * @member {object} [commonEncryptionCbcs] Configuration of - * CommonEncryptionCbcs - * @member {object} [commonEncryptionCbcs.enabledProtocols] Representing - * supported protocols - * @member {boolean} [commonEncryptionCbcs.enabledProtocols.download] Enable - * Download protocol or not - * @member {boolean} [commonEncryptionCbcs.enabledProtocols.dash] Enable DASH - * protocol or not - * @member {boolean} [commonEncryptionCbcs.enabledProtocols.hls] Enable HLS - * protocol or not - * @member {boolean} [commonEncryptionCbcs.enabledProtocols.smoothStreaming] - * Enable SmoothStreaming protocol or not - * @member {array} [commonEncryptionCbcs.clearTracks] Representing which tracks - * should not be encrypted - * @member {object} [commonEncryptionCbcs.contentKeys] Representing default - * content key for each encryption scheme and separate content keys for - * specific tracks - * @member {object} [commonEncryptionCbcs.contentKeys.defaultKey] Default - * content key for an encryption scheme - * @member {string} [commonEncryptionCbcs.contentKeys.defaultKey.label] Label - * can be used to specify Content Key when creating a Streaming Locator - * @member {string} [commonEncryptionCbcs.contentKeys.defaultKey.policyName] - * Policy used by Default Key - * @member {array} [commonEncryptionCbcs.contentKeys.keyToTrackMappings] - * Representing tracks needs separate content key - * @member {object} [commonEncryptionCbcs.drm] Configuration of DRMs for - * current encryption scheme - * @member {object} [commonEncryptionCbcs.drm.fairPlay] FairPlay configurations - * @member {string} - * [commonEncryptionCbcs.drm.fairPlay.customLicenseAcquisitionUrlTemplate] The - * template for a customer service to deliver keys to end users. Not needed - * when using Azure Media Services for issuing keys. - * @member {boolean} [commonEncryptionCbcs.drm.fairPlay.allowPersistentLicense] - * All license to be persistent or not - * @member {object} [commonEncryptionCbcs.drm.playReady] PlayReady - * configurations - * @member {string} - * [commonEncryptionCbcs.drm.playReady.customLicenseAcquisitionUrlTemplate] The - * template for a customer service to deliver keys to end users. Not needed - * when using Azure Media Services for issuing keys. - * @member {string} - * [commonEncryptionCbcs.drm.playReady.playReadyCustomAttributes] Custom - * attributes for PlayReady - * @member {object} [commonEncryptionCbcs.drm.widevine] Widevine configurations - * @member {string} - * [commonEncryptionCbcs.drm.widevine.customLicenseAcquisitionUrlTemplate] The - * template for a customer service to deliver keys to end users. Not needed - * when using Azure Media Services for issuing keys. - * @member {object} [noEncryption] Configurations of NoEncryption - * @member {object} [noEncryption.enabledProtocols] Representing supported - * protocols - * @member {boolean} [noEncryption.enabledProtocols.download] Enable Download - * protocol or not - * @member {boolean} [noEncryption.enabledProtocols.dash] Enable DASH protocol - * or not - * @member {boolean} [noEncryption.enabledProtocols.hls] Enable HLS protocol or - * not - * @member {boolean} [noEncryption.enabledProtocols.smoothStreaming] Enable - * SmoothStreaming protocol or not - */ +*/ export interface StreamingPolicy extends ProxyResource { + /** + * Creation time of Streaming Policy + */ readonly created?: Date; + /** + * Default ContentKey used by current Streaming Policy + */ defaultContentKeyPolicyName?: string; + /** + * Configuration of EnvelopeEncryption + */ envelopeEncryption?: EnvelopeEncryption; + /** + * Configuration of CommonEncryptionCenc + */ commonEncryptionCenc?: CommonEncryptionCenc; + /** + * Configuration of CommonEncryptionCbcs + */ commonEncryptionCbcs?: CommonEncryptionCbcs; + /** + * Configurations of NoEncryption + */ noEncryption?: NoEncryption; } /** - * @class - * Initializes a new instance of the StreamingLocatorContentKey class. - * @constructor * Class for content key in Streaming Locator - * - * @member {uuid} id ID of Content Key - * @member {string} [type] Encryption type of Content Key. Possible values - * include: 'CommonEncryptionCenc', 'CommonEncryptionCbcs', - * 'EnvelopeEncryption' - * @member {string} [labelReferenceInStreamingPolicy] Label of Content Key as - * specified in the Streaming Policy - * @member {string} [value] Value of of Content Key - * @member {string} [policyName] ContentKeyPolicy used by Content Key - * @member {array} [tracks] Tracks which use this Content Key - */ +*/ export interface StreamingLocatorContentKey { + /** + * ID of Content Key + */ id: string; + /** + * Encryption type of Content Key. Possible values include: 'CommonEncryptionCenc', + * 'CommonEncryptionCbcs', 'EnvelopeEncryption' + */ readonly type?: string; + /** + * Label of Content Key as specified in the Streaming Policy + */ labelReferenceInStreamingPolicy?: string; + /** + * Value of Content Key + */ value?: string; + /** + * ContentKeyPolicy used by Content Key + */ readonly policyName?: string; + /** + * Tracks which use this Content Key + */ readonly tracks?: TrackSelection[]; } /** - * @class - * Initializes a new instance of the StreamingPath class. - * @constructor * Class of paths for streaming - * - * @member {string} streamingProtocol Streaming protocol. Possible values - * include: 'Hls', 'Dash', 'SmoothStreaming', 'Download' - * @member {string} encryptionScheme Encryption scheme. Possible values - * include: 'NoEncryption', 'EnvelopeEncryption', 'CommonEncryptionCenc', - * 'CommonEncryptionCbcs' - * @member {array} [paths] Streaming paths for each protocol and - * encryptionScheme pair - */ +*/ export interface StreamingPath { + /** + * Streaming protocol. Possible values include: 'Hls', 'Dash', 'SmoothStreaming', 'Download' + */ streamingProtocol: string; + /** + * Encryption scheme. Possible values include: 'NoEncryption', 'EnvelopeEncryption', + * 'CommonEncryptionCenc', 'CommonEncryptionCbcs' + */ encryptionScheme: string; + /** + * Streaming paths for each protocol and encryptionScheme pair + */ paths?: string[]; } /** - * @class - * Initializes a new instance of the ListContentKeysResponse class. - * @constructor * Class of response for listContentKeys action - * - * @member {array} [contentKeys] ContentKeys used by current Streaming Locator - */ +*/ export interface ListContentKeysResponse { + /** + * ContentKeys used by current Streaming Locator + */ contentKeys?: StreamingLocatorContentKey[]; } /** - * @class - * Initializes a new instance of the ListPathsResponse class. - * @constructor * Class of response for listPaths action - * - * @member {array} [streamingPaths] Streaming Paths supported by current - * Streaming Locator - * @member {array} [downloadPaths] Download Paths supported by current - * Streaming Locator - */ +*/ export interface ListPathsResponse { + /** + * Streaming Paths supported by current Streaming Locator + */ streamingPaths?: StreamingPath[]; + /** + * Download Paths supported by current Streaming Locator + */ downloadPaths?: string[]; } /** - * @class - * Initializes a new instance of the StreamingLocator class. - * @constructor * A Streaming Locator resource - * - * @member {string} assetName Asset Name - * @member {date} [created] The creation time of the Streaming Locator. - * @member {date} [startTime] The start time of the Streaming Locator. - * @member {date} [endTime] The end time of the Streaming Locator. - * @member {uuid} [streamingLocatorId] The StreamingLocatorId of the Streaming - * Locator. - * @member {string} streamingPolicyName Name of the Streaming Policy used by - * this Streaming Locator. Either specify the name of Streaming Policy you - * created or use one of the predefined Streaming Policies. The predefined - * Streaming Policies available are: 'Predefined_DownloadOnly', - * 'Predefined_ClearStreamingOnly', 'Predefined_DownloadAndClearStreaming', - * 'Predefined_ClearKey', 'Predefined_MultiDrmCencStreaming' and - * 'Predefined_MultiDrmStreaming' - * @member {string} [defaultContentKeyPolicyName] Name of the default - * ContentKeyPolicy used by this Streaming Locator. - * @member {array} [contentKeys] The ContentKeys used by this Streaming - * Locator. - * @member {string} [alternativeMediaId] Alternative Media ID of this Streaming - * Locator - */ +*/ export interface StreamingLocator extends ProxyResource { + /** + * Asset Name + */ assetName: string; + /** + * The creation time of the Streaming Locator. + */ readonly created?: Date; + /** + * The start time of the Streaming Locator. + */ startTime?: Date; + /** + * The end time of the Streaming Locator. + */ endTime?: Date; + /** + * The StreamingLocatorId of the Streaming Locator. + */ streamingLocatorId?: string; + /** + * Name of the Streaming Policy used by this Streaming Locator. Either specify the name of + * Streaming Policy you created or use one of the predefined Streaming Policies. The predefined + * Streaming Policies available are: 'Predefined_DownloadOnly', 'Predefined_ClearStreamingOnly', + * 'Predefined_DownloadAndClearStreaming', 'Predefined_ClearKey', + * 'Predefined_MultiDrmCencStreaming' and 'Predefined_MultiDrmStreaming' + */ streamingPolicyName: string; + /** + * Name of the default ContentKeyPolicy used by this Streaming Locator. + */ defaultContentKeyPolicyName?: string; + /** + * The ContentKeys used by this Streaming Locator. + */ contentKeys?: StreamingLocatorContentKey[]; + /** + * Alternative Media ID of this Streaming Locator + */ alternativeMediaId?: string; } /** - * @class - * Initializes a new instance of the Hls class. - * @constructor * The HLS configuration. - * - * @member {number} [fragmentsPerTsSegment] The amount of fragments per HTTP - * Live Streaming (HLS) segment. - */ +*/ export interface Hls { + /** + * The amount of fragments per HTTP Live Streaming (HLS) segment. + */ fragmentsPerTsSegment?: number; } /** - * @class - * Initializes a new instance of the LiveOutput class. - * @constructor * The Live Output. - * - * @member {string} [description] The description of the Live Output. - * @member {string} assetName The asset name. - * @member {moment.duration} archiveWindowLength ISO 8601 timespan duration of - * the archive window length. This is duration that customer want to retain the - * recorded content. - * @member {string} [manifestName] The manifest file name. If not provided, - * the service will generate one automatically. - * @member {object} [hls] The HLS configuration. - * @member {number} [hls.fragmentsPerTsSegment] The amount of fragments per - * HTTP Live Streaming (HLS) segment. - * @member {number} [outputSnapTime] The output snapshot time. - * @member {date} [created] The exact time the Live Output was created. - * @member {date} [lastModified] The exact time the Live Output was last - * modified. - * @member {string} [provisioningState] The provisioning state of the Live - * Output. - * @member {string} [resourceState] The resource state of the Live Output. - * Possible values include: 'Creating', 'Running', 'Deleting' - */ +*/ export interface LiveOutput extends ProxyResource { + /** + * The description of the Live Output. + */ description?: string; + /** + * The asset name. + */ assetName: string; + /** + * ISO 8601 timespan duration of the archive window length. This is duration that customer want + * to retain the recorded content. + */ archiveWindowLength: moment.Duration; + /** + * The manifest file name. If not provided, the service will generate one automatically. + */ manifestName?: string; + /** + * The HLS configuration. + */ hls?: Hls; + /** + * The output snapshot time. + */ outputSnapTime?: number; + /** + * The exact time the Live Output was created. + */ readonly created?: Date; + /** + * The exact time the Live Output was last modified. + */ readonly lastModified?: Date; + /** + * The provisioning state of the Live Output. + */ readonly provisioningState?: string; + /** + * The resource state of the Live Output. Possible values include: 'Creating', 'Running', + * 'Deleting' + */ readonly resourceState?: string; } /** - * @class - * Initializes a new instance of the LiveEventEndpoint class. - * @constructor * The Live Event endpoint. - * - * @member {string} [protocol] The endpoint protocol. - * @member {string} [url] The endpoint URL. - */ +*/ export interface LiveEventEndpoint { + /** + * The endpoint protocol. + */ protocol?: string; + /** + * The endpoint URL. + */ url?: string; } /** - * @class - * Initializes a new instance of the IPRange class. - * @constructor * The IP address range in the CIDR scheme. - * - * @member {string} [name] The friendly name for the IP address range. - * @member {string} [address] The IP address. - * @member {number} [subnetPrefixLength] The subnet mask prefix length (see - * CIDR notation). - */ +*/ export interface IPRange { + /** + * The friendly name for the IP address range. + */ name?: string; + /** + * The IP address. + */ address?: string; + /** + * The subnet mask prefix length (see CIDR notation). + */ subnetPrefixLength?: number; } /** - * @class - * Initializes a new instance of the IPAccessControl class. - * @constructor * The IP access control. - * - * @member {array} [allow] The IP allow list. - */ +*/ export interface IPAccessControl { + /** + * The IP allow list. + */ allow?: IPRange[]; } /** - * @class - * Initializes a new instance of the LiveEventInputAccessControl class. - * @constructor * The IP access control for Live Event Input. - * - * @member {object} [ip] The IP access control properties. - * @member {array} [ip.allow] The IP allow list. - */ +*/ export interface LiveEventInputAccessControl { + /** + * The IP access control properties. + */ ip?: IPAccessControl; } /** - * @class - * Initializes a new instance of the LiveEventInput class. - * @constructor * The Live Event input. - * - * @member {string} streamingProtocol The streaming protocol for the Live - * Event. This is specified at creation time and cannot be updated. Possible - * values include: 'FragmentedMP4', 'RTMP' - * @member {object} [accessControl] The access control for LiveEvent Input. - * @member {object} [accessControl.ip] The IP access control properties. - * @member {array} [accessControl.ip.allow] The IP allow list. - * @member {string} [keyFrameIntervalDuration] ISO 8601 timespan duration of - * the key frame interval duration. - * @member {string} [accessToken] A unique identifier for a stream. This can - * be specified at creation time but cannot be updated. If omitted, the - * service will generate a unique value. - * @member {array} [endpoints] The input endpoints for the Live Event. - */ +*/ export interface LiveEventInput { + /** + * The streaming protocol for the Live Event. This is specified at creation time and cannot be + * updated. Possible values include: 'FragmentedMP4', 'RTMP' + */ streamingProtocol: string; + /** + * The access control for LiveEvent Input. + */ accessControl?: LiveEventInputAccessControl; + /** + * ISO 8601 timespan duration of the key frame interval duration. + */ keyFrameIntervalDuration?: string; + /** + * A unique identifier for a stream. This can be specified at creation time but cannot be + * updated. If omitted, the service will generate a unique value. + */ accessToken?: string; + /** + * The input endpoints for the Live Event. + */ endpoints?: LiveEventEndpoint[]; } /** - * @class - * Initializes a new instance of the LiveEventPreviewAccessControl class. - * @constructor * The IP access control for Live Event preview. - * - * @member {object} [ip] The IP access control properties. - * @member {array} [ip.allow] The IP allow list. - */ +*/ export interface LiveEventPreviewAccessControl { + /** + * The IP access control properties. + */ ip?: IPAccessControl; } /** - * @class - * Initializes a new instance of the LiveEventPreview class. - * @constructor * The Live Event preview. - * - * @member {array} [endpoints] The endpoints for preview. - * @member {object} [accessControl] The access control for LiveEvent preview. - * @member {object} [accessControl.ip] The IP access control properties. - * @member {array} [accessControl.ip.allow] The IP allow list. - * @member {string} [previewLocator] The identifier of the preview locator in - * Guid format. Specifying this at creation time allows the caller to know the - * preview locator url before the event is created. If omitted, the service - * will generate a random identifier. This value cannot be updated once the - * live event is created. - * @member {string} [streamingPolicyName] The name of streaming policy used for - * the LiveEvent preview. This value is specified at creation time and cannot - * be updated. - * @member {string} [alternativeMediaId] An Alternative Media Identifier - * associated with the StreamingLocator created for the preview. This value is - * specified at creation time and cannot be updated. The identifier can be - * used in the CustomLicenseAcquisitionUrlTemplate or the - * CustomKeyAcquisitionUrlTemplate of the StreamingPolicy specified in the - * StreamingPolicyName field. - */ +*/ export interface LiveEventPreview { + /** + * The endpoints for preview. + */ endpoints?: LiveEventEndpoint[]; + /** + * The access control for LiveEvent preview. + */ accessControl?: LiveEventPreviewAccessControl; + /** + * The identifier of the preview locator in Guid format. Specifying this at creation time allows + * the caller to know the preview locator url before the event is created. If omitted, the + * service will generate a random identifier. This value cannot be updated once the live event + * is created. + */ previewLocator?: string; + /** + * The name of streaming policy used for the LiveEvent preview. This value is specified at + * creation time and cannot be updated. + */ streamingPolicyName?: string; + /** + * An Alternative Media Identifier associated with the StreamingLocator created for the preview. + * This value is specified at creation time and cannot be updated. The identifier can be used in + * the CustomLicenseAcquisitionUrlTemplate or the CustomKeyAcquisitionUrlTemplate of the + * StreamingPolicy specified in the StreamingPolicyName field. + */ alternativeMediaId?: string; } /** - * @class - * Initializes a new instance of the LiveEventEncoding class. - * @constructor * The Live Event encoding. - * - * @member {string} [encodingType] The encoding type for Live Event. This - * value is specified at creation time and cannot be updated. Possible values - * include: 'None', 'Basic' - * @member {string} [presetName] The encoding preset name. This value is - * specified at creation time and cannot be updated. - */ +*/ export interface LiveEventEncoding { + /** + * The encoding type for Live Event. This value is specified at creation time and cannot be + * updated. Possible values include: 'None', 'Basic', 'Standard' + */ encodingType?: string; + /** + * The encoding preset name. This value is specified at creation time and cannot be updated. + */ presetName?: string; } /** - * @class - * Initializes a new instance of the CrossSiteAccessPolicies class. - * @constructor * The client access policy. - * - * @member {string} [clientAccessPolicy] The content of clientaccesspolicy.xml - * used by Silverlight. - * @member {string} [crossDomainPolicy] The content of crossdomain.xml used by - * Silverlight. - */ +*/ export interface CrossSiteAccessPolicies { + /** + * The content of clientaccesspolicy.xml used by Silverlight. + */ clientAccessPolicy?: string; + /** + * The content of crossdomain.xml used by Silverlight. + */ crossDomainPolicy?: string; } /** - * @class - * Initializes a new instance of the LiveEventActionInput class. - * @constructor * The LiveEvent action input parameter definition. - * - * @member {boolean} [removeOutputsOnStop] The flag indicates if remove - * LiveOutputs on Stop. - */ +*/ export interface LiveEventActionInput { + /** + * The flag indicates if remove LiveOutputs on Stop. + */ removeOutputsOnStop?: boolean; } /** - * @class - * Initializes a new instance of the LiveEvent class. - * @constructor * The Live Event. - * - * @member {string} [description] The Live Event description. - * @member {object} input The Live Event input. - * @member {string} [input.streamingProtocol] The streaming protocol for the - * Live Event. This is specified at creation time and cannot be updated. - * Possible values include: 'FragmentedMP4', 'RTMP' - * @member {object} [input.accessControl] The access control for LiveEvent - * Input. - * @member {object} [input.accessControl.ip] The IP access control properties. - * @member {array} [input.accessControl.ip.allow] The IP allow list. - * @member {string} [input.keyFrameIntervalDuration] ISO 8601 timespan duration - * of the key frame interval duration. - * @member {string} [input.accessToken] A unique identifier for a stream. This - * can be specified at creation time but cannot be updated. If omitted, the - * service will generate a unique value. - * @member {array} [input.endpoints] The input endpoints for the Live Event. - * @member {object} [preview] The Live Event preview. - * @member {array} [preview.endpoints] The endpoints for preview. - * @member {object} [preview.accessControl] The access control for LiveEvent - * preview. - * @member {object} [preview.accessControl.ip] The IP access control - * properties. - * @member {array} [preview.accessControl.ip.allow] The IP allow list. - * @member {string} [preview.previewLocator] The identifier of the preview - * locator in Guid format. Specifying this at creation time allows the caller - * to know the preview locator url before the event is created. If omitted, - * the service will generate a random identifier. This value cannot be updated - * once the live event is created. - * @member {string} [preview.streamingPolicyName] The name of streaming policy - * used for the LiveEvent preview. This value is specified at creation time - * and cannot be updated. - * @member {string} [preview.alternativeMediaId] An Alternative Media - * Identifier associated with the StreamingLocator created for the preview. - * This value is specified at creation time and cannot be updated. The - * identifier can be used in the CustomLicenseAcquisitionUrlTemplate or the - * CustomKeyAcquisitionUrlTemplate of the StreamingPolicy specified in the - * StreamingPolicyName field. - * @member {object} [encoding] The Live Event encoding. - * @member {string} [encoding.encodingType] The encoding type for Live Event. - * This value is specified at creation time and cannot be updated. Possible - * values include: 'None', 'Basic' - * @member {string} [encoding.presetName] The encoding preset name. This value - * is specified at creation time and cannot be updated. - * @member {string} [provisioningState] The provisioning state of the Live - * Event. - * @member {string} [resourceState] The resource state of the Live Event. - * Possible values include: 'Stopped', 'Starting', 'Running', 'Stopping', - * 'Deleting' - * @member {object} [crossSiteAccessPolicies] The Live Event access policies. - * @member {string} [crossSiteAccessPolicies.clientAccessPolicy] The content of - * clientaccesspolicy.xml used by Silverlight. - * @member {string} [crossSiteAccessPolicies.crossDomainPolicy] The content of - * crossdomain.xml used by Silverlight. - * @member {boolean} [vanityUrl] Specifies whether to use a vanity url with the - * Live Event. This value is specified at creation time and cannot be updated. - * @member {array} [streamOptions] The options to use for the LiveEvent. This - * value is specified at creation time and cannot be updated. - * @member {date} [created] The exact time the Live Event was created. - * @member {date} [lastModified] The exact time the Live Event was last - * modified. - */ +*/ export interface LiveEvent extends TrackedResource { + /** + * The Live Event description. + */ description?: string; + /** + * The Live Event input. + */ input: LiveEventInput; + /** + * The Live Event preview. + */ preview?: LiveEventPreview; + /** + * The Live Event encoding. + */ encoding?: LiveEventEncoding; + /** + * The provisioning state of the Live Event. + */ readonly provisioningState?: string; + /** + * The resource state of the Live Event. Possible values include: 'Stopped', 'Starting', + * 'Running', 'Stopping', 'Deleting' + */ readonly resourceState?: string; + /** + * The Live Event access policies. + */ crossSiteAccessPolicies?: CrossSiteAccessPolicies; + /** + * Specifies whether to use a vanity url with the Live Event. This value is specified at + * creation time and cannot be updated. + */ vanityUrl?: boolean; + /** + * The options to use for the LiveEvent. This value is specified at creation time and cannot be + * updated. + */ streamOptions?: string[]; + /** + * The exact time the Live Event was created. + */ readonly created?: Date; + /** + * The exact time the Live Event was last modified. + */ readonly lastModified?: Date; } /** - * @class - * Initializes a new instance of the AkamaiSignatureHeaderAuthenticationKey class. - * @constructor * Akamai Signature Header authentication key. - * - * @member {string} [identifier] identifier of the key - * @member {string} [base64Key] authentication key - * @member {date} [expiration] The expiration time of the authentication key. - */ +*/ export interface AkamaiSignatureHeaderAuthenticationKey { + /** + * identifier of the key + */ identifier?: string; + /** + * authentication key + */ base64Key?: string; + /** + * The expiration time of the authentication key. + */ expiration?: Date; } /** - * @class - * Initializes a new instance of the AkamaiAccessControl class. - * @constructor * Akamai access control - * - * @member {array} [akamaiSignatureHeaderAuthenticationKeyList] authentication - * key list - */ +*/ export interface AkamaiAccessControl { + /** + * authentication key list + */ akamaiSignatureHeaderAuthenticationKeyList?: AkamaiSignatureHeaderAuthenticationKey[]; } /** - * @class - * Initializes a new instance of the StreamingEndpointAccessControl class. - * @constructor * StreamingEndpoint access control definition. - * - * @member {object} [akamai] The access control of Akamai - * @member {array} [akamai.akamaiSignatureHeaderAuthenticationKeyList] - * authentication key list - * @member {object} [ip] The IP access control of the StreamingEndpoint. - * @member {array} [ip.allow] The IP allow list. - */ +*/ export interface StreamingEndpointAccessControl { + /** + * The access control of Akamai + */ akamai?: AkamaiAccessControl; + /** + * The IP access control of the StreamingEndpoint. + */ ip?: IPAccessControl; } /** - * @class - * Initializes a new instance of the StreamingEntityScaleUnit class. - * @constructor * scale units definition - * - * @member {number} [scaleUnit] The scale unit number of the StreamingEndpoint. - */ +*/ export interface StreamingEntityScaleUnit { + /** + * The scale unit number of the StreamingEndpoint. + */ scaleUnit?: number; } /** - * @class - * Initializes a new instance of the StreamingEndpoint class. - * @constructor * The StreamingEndpoint. - * - * @member {string} [description] The StreamingEndpoint description. - * @member {number} scaleUnits The number of scale units. Use the Scale - * operation to adjust this value. - * @member {string} [availabilitySetName] The name of the AvailabilitySet used - * with this StreamingEndpoint for high availability streaming. This value can - * only be set at creation time. - * @member {object} [accessControl] The access control definition of the - * StreamingEndpoint. - * @member {object} [accessControl.akamai] The access control of Akamai - * @member {array} - * [accessControl.akamai.akamaiSignatureHeaderAuthenticationKeyList] - * authentication key list - * @member {object} [accessControl.ip] The IP access control of the - * StreamingEndpoint. - * @member {array} [accessControl.ip.allow] The IP allow list. - * @member {number} [maxCacheAge] Max cache age - * @member {array} [customHostNames] The custom host names of the - * StreamingEndpoint - * @member {string} [hostName] The StreamingEndpoint host name. - * @member {boolean} [cdnEnabled] The CDN enabled flag. - * @member {string} [cdnProvider] The CDN provider name. - * @member {string} [cdnProfile] The CDN profile name. - * @member {string} [provisioningState] The provisioning state of the - * StreamingEndpoint. - * @member {string} [resourceState] The resource state of the - * StreamingEndpoint. Possible values include: 'Stopped', 'Starting', - * 'Running', 'Stopping', 'Deleting', 'Scaling' - * @member {object} [crossSiteAccessPolicies] The StreamingEndpoint access - * policies. - * @member {string} [crossSiteAccessPolicies.clientAccessPolicy] The content of - * clientaccesspolicy.xml used by Silverlight. - * @member {string} [crossSiteAccessPolicies.crossDomainPolicy] The content of - * crossdomain.xml used by Silverlight. - * @member {date} [freeTrialEndTime] The free trial expiration time. - * @member {date} [created] The exact time the StreamingEndpoint was created. - * @member {date} [lastModified] The exact time the StreamingEndpoint was last - * modified. - */ +*/ export interface StreamingEndpoint extends TrackedResource { + /** + * The StreamingEndpoint description. + */ description?: string; + /** + * The number of scale units. Use the Scale operation to adjust this value. + */ scaleUnits: number; + /** + * The name of the AvailabilitySet used with this StreamingEndpoint for high availability + * streaming. This value can only be set at creation time. + */ availabilitySetName?: string; + /** + * The access control definition of the StreamingEndpoint. + */ accessControl?: StreamingEndpointAccessControl; + /** + * Max cache age + */ maxCacheAge?: number; + /** + * The custom host names of the StreamingEndpoint + */ customHostNames?: string[]; + /** + * The StreamingEndpoint host name. + */ readonly hostName?: string; + /** + * The CDN enabled flag. + */ cdnEnabled?: boolean; + /** + * The CDN provider name. + */ cdnProvider?: string; + /** + * The CDN profile name. + */ cdnProfile?: string; + /** + * The provisioning state of the StreamingEndpoint. + */ readonly provisioningState?: string; + /** + * The resource state of the StreamingEndpoint. Possible values include: 'Stopped', 'Starting', + * 'Running', 'Stopping', 'Deleting', 'Scaling' + */ readonly resourceState?: string; + /** + * The StreamingEndpoint access policies. + */ crossSiteAccessPolicies?: CrossSiteAccessPolicies; + /** + * The free trial expiration time. + */ readonly freeTrialEndTime?: Date; + /** + * The exact time the StreamingEndpoint was created. + */ readonly created?: Date; + /** + * The exact time the StreamingEndpoint was last modified. + */ readonly lastModified?: Date; } - /** - * @class - * Initializes a new instance of the AccountFilterCollection class. - * @constructor * A collection of AccountFilter items. - * - * @member {string} [odatanextLink] A link to the next page of the collection - * (when the collection contains too many results to return in one response). - */ +*/ export interface AccountFilterCollection extends Array { + /** + * A link to the next page of the collection (when the collection contains too many results to + * return in one response). + */ odatanextLink?: string; } /** - * @class - * Initializes a new instance of the OperationCollection class. - * @constructor * A collection of Operation items. - * - * @member {string} [odatanextLink] A link to the next page of the collection - * (when the collection contains too many results to return in one response). - */ +*/ export interface OperationCollection extends Array { + /** + * A link to the next page of the collection (when the collection contains too many results to + * return in one response). + */ odatanextLink?: string; } /** - * @class - * Initializes a new instance of the MediaServiceCollection class. - * @constructor * A collection of MediaService items. - * - * @member {string} [odatanextLink] A link to the next page of the collection - * (when the collection contains too many results to return in one response). - */ +*/ export interface MediaServiceCollection extends Array { + /** + * A link to the next page of the collection (when the collection contains too many results to + * return in one response). + */ odatanextLink?: string; } /** - * @class - * Initializes a new instance of the SubscriptionMediaServiceCollection class. - * @constructor * A collection of SubscriptionMediaService items. - * - * @member {string} [odatanextLink] A link to the next page of the collection - * (when the collection contains too many results to return in one response). - */ +*/ export interface SubscriptionMediaServiceCollection extends Array { + /** + * A link to the next page of the collection (when the collection contains too many results to + * return in one response). + */ odatanextLink?: string; } /** - * @class - * Initializes a new instance of the AssetCollection class. - * @constructor * A collection of Asset items. - * - * @member {string} [odatanextLink] A link to the next page of the collection - * (when the collection contains too many results to return in one response). - */ +*/ export interface AssetCollection extends Array { + /** + * A link to the next page of the collection (when the collection contains too many results to + * return in one response). + */ odatanextLink?: string; } /** - * @class - * Initializes a new instance of the AssetFilterCollection class. - * @constructor * A collection of AssetFilter items. - * - * @member {string} [odatanextLink] A link to the next page of the collection - * (when the collection contains too many results to return in one response). - */ +*/ export interface AssetFilterCollection extends Array { + /** + * A link to the next page of the collection (when the collection contains too many results to + * return in one response). + */ odatanextLink?: string; } /** - * @class - * Initializes a new instance of the ContentKeyPolicyCollection class. - * @constructor * A collection of ContentKeyPolicy items. - * - * @member {string} [odatanextLink] A link to the next page of the collection - * (when the collection contains too many results to return in one response). - */ +*/ export interface ContentKeyPolicyCollection extends Array { + /** + * A link to the next page of the collection (when the collection contains too many results to + * return in one response). + */ odatanextLink?: string; } /** - * @class - * Initializes a new instance of the TransformCollection class. - * @constructor * A collection of Transform items. - * - * @member {string} [odatanextLink] A link to the next page of the collection - * (when the collection contains too many results to return in one response). - */ +*/ export interface TransformCollection extends Array { + /** + * A link to the next page of the collection (when the collection contains too many results to + * return in one response). + */ odatanextLink?: string; } /** - * @class - * Initializes a new instance of the JobCollection class. - * @constructor * A collection of Job items. - * - * @member {string} [odatanextLink] A link to the next page of the collection - * (when the collection contains too many results to return in one response). - */ +*/ export interface JobCollection extends Array { + /** + * A link to the next page of the collection (when the collection contains too many results to + * return in one response). + */ odatanextLink?: string; } /** - * @class - * Initializes a new instance of the StreamingPolicyCollection class. - * @constructor * A collection of StreamingPolicy items. - * - * @member {string} [odatanextLink] A link to the next page of the collection - * (when the collection contains too many results to return in one response). - */ +*/ export interface StreamingPolicyCollection extends Array { + /** + * A link to the next page of the collection (when the collection contains too many results to + * return in one response). + */ odatanextLink?: string; } /** - * @class - * Initializes a new instance of the StreamingLocatorCollection class. - * @constructor * A collection of StreamingLocator items. - * - * @member {string} [odatanextLink] A link to the next page of the collection - * (when the collection contains too many results to return in one response). - */ +*/ export interface StreamingLocatorCollection extends Array { + /** + * A link to the next page of the collection (when the collection contains too many results to + * return in one response). + */ odatanextLink?: string; } /** - * @class - * Initializes a new instance of the LiveEventListResult class. - * @constructor * @summary LiveEventListResult - * - * The LiveEvent list result. - * - * @member {number} [odatacount] The number of result. - * @member {string} [odatanextLink] Th link to the next set of results. Not - * empty if value contains incomplete list of Live Outputs. - */ + * @description The LiveEvent list result. +*/ export interface LiveEventListResult extends Array { + /** + * Th link to the next set of results. Not empty if value contains incomplete list of Live + * Outputs. + */ odatanextLink?: string; } /** - * @class - * Initializes a new instance of the LiveOutputListResult class. - * @constructor * @summary LiveOutputListResult - * - * The LiveOutput list result. - * - * @member {number} [odatacount] The number of result. - * @member {string} [odatanextLink] Th link to the next set of results. Not - * empty if value contains incomplete list of Live Outputs. - */ + * @description The LiveOutput list result. +*/ export interface LiveOutputListResult extends Array { + /** + * Th link to the next set of results. Not empty if value contains incomplete list of Live + * Outputs. + */ odatanextLink?: string; } /** - * @class - * Initializes a new instance of the StreamingEndpointListResult class. - * @constructor * @summary StreamingEndpointListResult - * - * The StreamingEndpoint list result. - * - * @member {number} [odatacount] The number of result. - * @member {string} [odatanextLink] Th link to the next set of results. Not - * empty if value contains incomplete list of StreamingEndpoints. - */ + * @description The StreamingEndpoint list result. +*/ export interface StreamingEndpointListResult extends Array { + /** + * Th link to the next set of results. Not empty if value contains incomplete list of + * StreamingEndpoints. + */ odatanextLink?: string; } diff --git a/lib/services/mediaServicesManagement/lib/models/job.js b/lib/services/mediaServicesManagement/lib/models/job.js index ac3677dc6e..39afe3914a 100644 --- a/lib/services/mediaServicesManagement/lib/models/job.js +++ b/lib/services/mediaServicesManagement/lib/models/job.js @@ -21,24 +21,24 @@ const models = require('./index'); class Job extends models['ProxyResource'] { /** * Create a Job. - * @member {date} [created] The UTC date and time when the Job was created, + * @property {date} [created] The UTC date and time when the Job was created, * in 'YYYY-MM-DDThh:mm:ssZ' format. - * @member {string} [state] The current state of the job. Possible values + * @property {string} [state] The current state of the job. Possible values * include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', * 'Queued', 'Scheduled' - * @member {string} [description] Optional customer supplied description of + * @property {string} [description] Optional customer supplied description of * the Job. - * @member {object} input The inputs for the Job. - * @member {string} [input.odatatype] Polymorphic Discriminator - * @member {date} [lastModified] The UTC date and time when the Job was last - * updated, in 'YYYY-MM-DDThh:mm:ssZ' format. - * @member {array} outputs The outputs for the Job. - * @member {string} [priority] Priority with which the job should be + * @property {object} input The inputs for the Job. + * @property {string} [input.odatatype] Polymorphic Discriminator + * @property {date} [lastModified] The UTC date and time when the Job was + * last updated, in 'YYYY-MM-DDThh:mm:ssZ' format. + * @property {array} outputs The outputs for the Job. + * @property {string} [priority] Priority with which the job should be * processed. Higher priority jobs are processed before lower priority jobs. * If not set, the default is normal. Possible values include: 'Low', * 'Normal', 'High' - * @member {object} [correlationData] Customer provided correlation data that - * will be returned in Job and JobOutput state events. + * @property {object} [correlationData] Customer provided correlation data + * that will be returned in Job and JobOutput state events. */ constructor() { super(); @@ -97,8 +97,7 @@ class Job extends models['ProxyResource'] { readOnly: true, serializedName: 'properties.state', type: { - name: 'Enum', - allowedValues: [ 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', 'Scheduled' ] + name: 'String' } }, description: { @@ -154,8 +153,7 @@ class Job extends models['ProxyResource'] { required: false, serializedName: 'properties.priority', type: { - name: 'Enum', - allowedValues: [ 'Low', 'Normal', 'High' ] + name: 'String' } }, correlationData: { diff --git a/lib/services/mediaServicesManagement/lib/models/jobCollection.js b/lib/services/mediaServicesManagement/lib/models/jobCollection.js index ae490c686f..d214490ade 100644 --- a/lib/services/mediaServicesManagement/lib/models/jobCollection.js +++ b/lib/services/mediaServicesManagement/lib/models/jobCollection.js @@ -16,8 +16,9 @@ class JobCollection extends Array { /** * Create a JobCollection. - * @member {string} [odatanextLink] A link to the next page of the collection - * (when the collection contains too many results to return in one response). + * @property {string} [odatanextLink] A link to the next page of the + * collection (when the collection contains too many results to return in one + * response). */ constructor() { super(); diff --git a/lib/services/mediaServicesManagement/lib/models/jobError.js b/lib/services/mediaServicesManagement/lib/models/jobError.js index 57c7703a42..840e8e82fa 100644 --- a/lib/services/mediaServicesManagement/lib/models/jobError.js +++ b/lib/services/mediaServicesManagement/lib/models/jobError.js @@ -17,19 +17,19 @@ class JobError { /** * Create a JobError. - * @member {string} [code] Error code describing the error. Possible values + * @property {string} [code] Error code describing the error. Possible values * include: 'ServiceError', 'ServiceTransientError', 'DownloadNotAccessible', * 'DownloadTransientError', 'UploadNotAccessible', 'UploadTransientError', * 'ConfigurationUnsupported', 'ContentMalformed', 'ContentUnsupported' - * @member {string} [message] A human-readable language-dependent + * @property {string} [message] A human-readable language-dependent * representation of the error. - * @member {string} [category] Helps with categorization of errors. Possible - * values include: 'Service', 'Download', 'Upload', 'Configuration', + * @property {string} [category] Helps with categorization of errors. + * Possible values include: 'Service', 'Download', 'Upload', 'Configuration', * 'Content' - * @member {string} [retry] Indicates that it may be possible to retry the + * @property {string} [retry] Indicates that it may be possible to retry the * Job. If retry is unsuccessful, please contact Azure support via Azure * Portal. Possible values include: 'DoNotRetry', 'MayRetry' - * @member {array} [details] An array of details about specific errors that + * @property {array} [details] An array of details about specific errors that * led to this reported error. */ constructor() { @@ -55,8 +55,7 @@ class JobError { readOnly: true, serializedName: 'code', type: { - name: 'Enum', - allowedValues: [ 'ServiceError', 'ServiceTransientError', 'DownloadNotAccessible', 'DownloadTransientError', 'UploadNotAccessible', 'UploadTransientError', 'ConfigurationUnsupported', 'ContentMalformed', 'ContentUnsupported' ] + name: 'String' } }, message: { @@ -73,8 +72,7 @@ class JobError { readOnly: true, serializedName: 'category', type: { - name: 'Enum', - allowedValues: [ 'Service', 'Download', 'Upload', 'Configuration', 'Content' ] + name: 'String' } }, retry: { @@ -83,8 +81,7 @@ class JobError { readOnly: true, serializedName: 'retry', type: { - name: 'Enum', - allowedValues: [ 'DoNotRetry', 'MayRetry' ] + name: 'String' } }, details: { diff --git a/lib/services/mediaServicesManagement/lib/models/jobErrorDetail.js b/lib/services/mediaServicesManagement/lib/models/jobErrorDetail.js index 95b16c6d6f..a62518d781 100644 --- a/lib/services/mediaServicesManagement/lib/models/jobErrorDetail.js +++ b/lib/services/mediaServicesManagement/lib/models/jobErrorDetail.js @@ -17,8 +17,8 @@ class JobErrorDetail { /** * Create a JobErrorDetail. - * @member {string} [code] Code describing the error detail. - * @member {string} [message] A human-readable representation of the error. + * @property {string} [code] Code describing the error detail. + * @property {string} [message] A human-readable representation of the error. */ constructor() { } diff --git a/lib/services/mediaServicesManagement/lib/models/jobInput.js b/lib/services/mediaServicesManagement/lib/models/jobInput.js index 97d4988679..c508e644bf 100644 --- a/lib/services/mediaServicesManagement/lib/models/jobInput.js +++ b/lib/services/mediaServicesManagement/lib/models/jobInput.js @@ -17,7 +17,7 @@ class JobInput { /** * Create a JobInput. - * @member {string} odatatype Polymorphic Discriminator + * @property {string} odatatype Polymorphic Discriminator */ constructor() { } diff --git a/lib/services/mediaServicesManagement/lib/models/jobInputAsset.js b/lib/services/mediaServicesManagement/lib/models/jobInputAsset.js index d86b44a912..90ae0d1a8c 100644 --- a/lib/services/mediaServicesManagement/lib/models/jobInputAsset.js +++ b/lib/services/mediaServicesManagement/lib/models/jobInputAsset.js @@ -20,7 +20,7 @@ const models = require('./index'); class JobInputAsset extends models['JobInputClip'] { /** * Create a JobInputAsset. - * @member {string} assetName The name of the input Asset. + * @property {string} assetName The name of the input Asset. */ constructor() { super(); diff --git a/lib/services/mediaServicesManagement/lib/models/jobInputClip.js b/lib/services/mediaServicesManagement/lib/models/jobInputClip.js index d97e599b9e..467f497cef 100644 --- a/lib/services/mediaServicesManagement/lib/models/jobInputClip.js +++ b/lib/services/mediaServicesManagement/lib/models/jobInputClip.js @@ -20,9 +20,9 @@ const models = require('./index'); class JobInputClip extends models['JobInput'] { /** * Create a JobInputClip. - * @member {array} [files] List of files. Required for JobInputHttp. - * @member {string} [label] A label that is assigned to a JobInputClip, that - * is used to satisfy a reference used in the Transform. For example, a + * @property {array} [files] List of files. Required for JobInputHttp. + * @property {string} [label] A label that is assigned to a JobInputClip, + * that is used to satisfy a reference used in the Transform. For example, a * Transform can be authored so as to take an image file with the label 'xyz' * and apply it as an overlay onto the input video before it is encoded. When * submitting a Job, exactly one of the JobInputs should be the image file, diff --git a/lib/services/mediaServicesManagement/lib/models/jobInputHttp.js b/lib/services/mediaServicesManagement/lib/models/jobInputHttp.js index 55958106d0..d07b2b85ac 100644 --- a/lib/services/mediaServicesManagement/lib/models/jobInputHttp.js +++ b/lib/services/mediaServicesManagement/lib/models/jobInputHttp.js @@ -20,7 +20,7 @@ const models = require('./index'); class JobInputHttp extends models['JobInputClip'] { /** * Create a JobInputHttp. - * @member {string} [baseUri] Base URI for HTTPS job input. It will be + * @property {string} [baseUri] Base URI for HTTPS job input. It will be * concatenated with provided file names. If no base uri is given, then the * provided file list is assumed to be fully qualified uris. */ diff --git a/lib/services/mediaServicesManagement/lib/models/jobInputs.js b/lib/services/mediaServicesManagement/lib/models/jobInputs.js index 2ae98fa5de..11be9cf277 100644 --- a/lib/services/mediaServicesManagement/lib/models/jobInputs.js +++ b/lib/services/mediaServicesManagement/lib/models/jobInputs.js @@ -13,14 +13,14 @@ const models = require('./index'); /** - * Describes a list of of inputs to a Job. + * Describes a list of inputs to a Job. * * @extends models['JobInput'] */ class JobInputs extends models['JobInput'] { /** * Create a JobInputs. - * @member {array} [inputs] List of inputs to a Job. + * @property {array} [inputs] List of inputs to a Job. */ constructor() { super(); diff --git a/lib/services/mediaServicesManagement/lib/models/jobOutput.js b/lib/services/mediaServicesManagement/lib/models/jobOutput.js index 6b5699f157..a68c4e8b79 100644 --- a/lib/services/mediaServicesManagement/lib/models/jobOutput.js +++ b/lib/services/mediaServicesManagement/lib/models/jobOutput.js @@ -17,43 +17,44 @@ class JobOutput { /** * Create a JobOutput. - * @member {object} [error] If the JobOutput is in the Error state, it + * @property {object} [error] If the JobOutput is in the Error state, it * contains the details of the error. - * @member {string} [error.code] Error code describing the error. Possible + * @property {string} [error.code] Error code describing the error. Possible * values include: 'ServiceError', 'ServiceTransientError', * 'DownloadNotAccessible', 'DownloadTransientError', 'UploadNotAccessible', * 'UploadTransientError', 'ConfigurationUnsupported', 'ContentMalformed', * 'ContentUnsupported' - * @member {string} [error.message] A human-readable language-dependent + * @property {string} [error.message] A human-readable language-dependent * representation of the error. - * @member {string} [error.category] Helps with categorization of errors. + * @property {string} [error.category] Helps with categorization of errors. * Possible values include: 'Service', 'Download', 'Upload', 'Configuration', * 'Content' - * @member {string} [error.retry] Indicates that it may be possible to retry - * the Job. If retry is unsuccessful, please contact Azure support via Azure - * Portal. Possible values include: 'DoNotRetry', 'MayRetry' - * @member {array} [error.details] An array of details about specific errors - * that led to this reported error. - * @member {string} [state] Describes the state of the JobOutput. Possible + * @property {string} [error.retry] Indicates that it may be possible to + * retry the Job. If retry is unsuccessful, please contact Azure support via + * Azure Portal. Possible values include: 'DoNotRetry', 'MayRetry' + * @property {array} [error.details] An array of details about specific + * errors that led to this reported error. + * @property {string} [state] Describes the state of the JobOutput. Possible * values include: 'Canceled', 'Canceling', 'Error', 'Finished', * 'Processing', 'Queued', 'Scheduled' - * @member {number} [progress] If the JobOutput is in a Processing state, + * @property {number} [progress] If the JobOutput is in a Processing state, * this contains the Job completion percentage. The value is an estimate and * not intended to be used to predict Job completion times. To determine if * the JobOutput is complete, use the State property. - * @member {string} [label] A label that is assigned to a JobOutput in order - * to help uniquely identify it. This is useful when your Transform has more - * than one TransformOutput, whereby your Job has more than one JobOutput. In - * such cases, when you submit the Job, you will add two or more JobOutputs, - * in the same order as TransformOutputs in the Transform. Subsequently, when - * you retrieve the Job, either through events or on a GET request, you can - * use the label to easily identify the JobOutput. If a label is not - * provided, a default value of '{presetName}_{outputIndex}' will be used, - * where the preset name is the name of the preset in the corresponding - * TransformOutput and the output index is the relative index of the this - * JobOutput within the Job. Note that this index is the same as the relative - * index of the corresponding TransformOutput within its Transform. - * @member {string} odatatype Polymorphic Discriminator + * @property {string} [label] A label that is assigned to a JobOutput in + * order to help uniquely identify it. This is useful when your Transform has + * more than one TransformOutput, whereby your Job has more than one + * JobOutput. In such cases, when you submit the Job, you will add two or + * more JobOutputs, in the same order as TransformOutputs in the Transform. + * Subsequently, when you retrieve the Job, either through events or on a GET + * request, you can use the label to easily identify the JobOutput. If a + * label is not provided, a default value of '{presetName}_{outputIndex}' + * will be used, where the preset name is the name of the preset in the + * corresponding TransformOutput and the output index is the relative index + * of the this JobOutput within the Job. Note that this index is the same as + * the relative index of the corresponding TransformOutput within its + * Transform. + * @property {string} odatatype Polymorphic Discriminator */ constructor() { } @@ -92,8 +93,7 @@ class JobOutput { readOnly: true, serializedName: 'state', type: { - name: 'Enum', - allowedValues: [ 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', 'Scheduled' ] + name: 'String' } }, progress: { diff --git a/lib/services/mediaServicesManagement/lib/models/jobOutputAsset.js b/lib/services/mediaServicesManagement/lib/models/jobOutputAsset.js index 98b2b3ee0c..a9554b3a21 100644 --- a/lib/services/mediaServicesManagement/lib/models/jobOutputAsset.js +++ b/lib/services/mediaServicesManagement/lib/models/jobOutputAsset.js @@ -20,7 +20,7 @@ const models = require('./index'); class JobOutputAsset extends models['JobOutput'] { /** * Create a JobOutputAsset. - * @member {string} assetName The name of the output Asset. + * @property {string} assetName The name of the output Asset. */ constructor() { super(); @@ -60,8 +60,7 @@ class JobOutputAsset extends models['JobOutput'] { readOnly: true, serializedName: 'state', type: { - name: 'Enum', - allowedValues: [ 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', 'Scheduled' ] + name: 'String' } }, progress: { diff --git a/lib/services/mediaServicesManagement/lib/models/jpgImage.js b/lib/services/mediaServicesManagement/lib/models/jpgImage.js index d10e8ff30e..5b8ae5f283 100644 --- a/lib/services/mediaServicesManagement/lib/models/jpgImage.js +++ b/lib/services/mediaServicesManagement/lib/models/jpgImage.js @@ -21,7 +21,7 @@ const models = require('./index'); class JpgImage extends models['Image'] { /** * Create a JpgImage. - * @member {array} [layers] A collection of output JPEG image layers to be + * @property {array} [layers] A collection of output JPEG image layers to be * produced by the encoder. */ constructor() { @@ -73,8 +73,7 @@ class JpgImage extends models['Image'] { required: false, serializedName: 'stretchMode', type: { - name: 'Enum', - allowedValues: [ 'None', 'AutoSize', 'AutoFit' ] + name: 'String' } }, start: { diff --git a/lib/services/mediaServicesManagement/lib/models/jpgLayer.js b/lib/services/mediaServicesManagement/lib/models/jpgLayer.js index 82c328bfc4..91fdcbd1ae 100644 --- a/lib/services/mediaServicesManagement/lib/models/jpgLayer.js +++ b/lib/services/mediaServicesManagement/lib/models/jpgLayer.js @@ -20,7 +20,7 @@ const models = require('./index'); class JpgLayer extends models['Layer'] { /** * Create a JpgLayer. - * @member {number} [quality] The compression quality of the JPEG output. + * @property {number} [quality] The compression quality of the JPEG output. * Range is from 0-100 and the default is 70. */ constructor() { diff --git a/lib/services/mediaServicesManagement/lib/models/layer.js b/lib/services/mediaServicesManagement/lib/models/layer.js index 4d0920bf6a..be7fd48c1a 100644 --- a/lib/services/mediaServicesManagement/lib/models/layer.js +++ b/lib/services/mediaServicesManagement/lib/models/layer.js @@ -19,17 +19,18 @@ class Layer { /** * Create a Layer. - * @member {string} [width] The width of the output video for this layer. The - * value can be absolute (in pixels) or relative (in percentage). For example - * 50% means the output video has half as many pixels in width as the input. - * @member {string} [height] The height of the output video for this layer. + * @property {string} [width] The width of the output video for this layer. + * The value can be absolute (in pixels) or relative (in percentage). For + * example 50% means the output video has half as many pixels in width as the + * input. + * @property {string} [height] The height of the output video for this layer. * The value can be absolute (in pixels) or relative (in percentage). For * example 50% means the output video has half as many pixels in height as * the input. - * @member {string} [label] The alphanumeric label for this layer, which can - * be used in multiplexing different video and audio layers, or in naming the - * output file. - * @member {string} odatatype Polymorphic Discriminator + * @property {string} [label] The alphanumeric label for this layer, which + * can be used in multiplexing different video and audio layers, or in naming + * the output file. + * @property {string} odatatype Polymorphic Discriminator */ constructor() { } diff --git a/lib/services/mediaServicesManagement/lib/models/listContainerSasInput.js b/lib/services/mediaServicesManagement/lib/models/listContainerSasInput.js index b57953d33a..9f512704fb 100644 --- a/lib/services/mediaServicesManagement/lib/models/listContainerSasInput.js +++ b/lib/services/mediaServicesManagement/lib/models/listContainerSasInput.js @@ -17,9 +17,9 @@ class ListContainerSasInput { /** * Create a ListContainerSasInput. - * @member {string} [permissions] The permissions to set on the SAS URL. + * @property {string} [permissions] The permissions to set on the SAS URL. * Possible values include: 'Read', 'ReadWrite', 'ReadWriteDelete' - * @member {date} [expiryTime] The SAS URL expiration time. This must be + * @property {date} [expiryTime] The SAS URL expiration time. This must be * less than 24 hours from the current time. */ constructor() { @@ -43,8 +43,7 @@ class ListContainerSasInput { required: false, serializedName: 'permissions', type: { - name: 'Enum', - allowedValues: [ 'Read', 'ReadWrite', 'ReadWriteDelete' ] + name: 'String' } }, expiryTime: { diff --git a/lib/services/mediaServicesManagement/lib/models/listContentKeysResponse.js b/lib/services/mediaServicesManagement/lib/models/listContentKeysResponse.js index de0d1fdb0f..1aac7a08e9 100644 --- a/lib/services/mediaServicesManagement/lib/models/listContentKeysResponse.js +++ b/lib/services/mediaServicesManagement/lib/models/listContentKeysResponse.js @@ -17,7 +17,7 @@ class ListContentKeysResponse { /** * Create a ListContentKeysResponse. - * @member {array} [contentKeys] ContentKeys used by current Streaming + * @property {array} [contentKeys] ContentKeys used by current Streaming * Locator */ constructor() { diff --git a/lib/services/mediaServicesManagement/lib/models/listPathsResponse.js b/lib/services/mediaServicesManagement/lib/models/listPathsResponse.js index 15c813856e..7dfc2db21d 100644 --- a/lib/services/mediaServicesManagement/lib/models/listPathsResponse.js +++ b/lib/services/mediaServicesManagement/lib/models/listPathsResponse.js @@ -17,9 +17,9 @@ class ListPathsResponse { /** * Create a ListPathsResponse. - * @member {array} [streamingPaths] Streaming Paths supported by current + * @property {array} [streamingPaths] Streaming Paths supported by current * Streaming Locator - * @member {array} [downloadPaths] Download Paths supported by current + * @property {array} [downloadPaths] Download Paths supported by current * Streaming Locator */ constructor() { diff --git a/lib/services/mediaServicesManagement/lib/models/listStreamingLocatorsResponse.js b/lib/services/mediaServicesManagement/lib/models/listStreamingLocatorsResponse.js index 9533ab636c..061e3d43a2 100644 --- a/lib/services/mediaServicesManagement/lib/models/listStreamingLocatorsResponse.js +++ b/lib/services/mediaServicesManagement/lib/models/listStreamingLocatorsResponse.js @@ -17,7 +17,7 @@ class ListStreamingLocatorsResponse { /** * Create a ListStreamingLocatorsResponse. - * @member {array} [streamingLocators] The list of Streaming Locators. + * @property {array} [streamingLocators] The list of Streaming Locators. */ constructor() { } diff --git a/lib/services/mediaServicesManagement/lib/models/liveEvent.js b/lib/services/mediaServicesManagement/lib/models/liveEvent.js index c5a0e1b180..bda88fceff 100644 --- a/lib/services/mediaServicesManagement/lib/models/liveEvent.js +++ b/lib/services/mediaServicesManagement/lib/models/liveEvent.js @@ -20,66 +20,68 @@ const models = require('./index'); class LiveEvent extends models['TrackedResource'] { /** * Create a LiveEvent. - * @member {string} [description] The Live Event description. - * @member {object} input The Live Event input. - * @member {string} [input.streamingProtocol] The streaming protocol for the - * Live Event. This is specified at creation time and cannot be updated. + * @property {string} [description] The Live Event description. + * @property {object} input The Live Event input. + * @property {string} [input.streamingProtocol] The streaming protocol for + * the Live Event. This is specified at creation time and cannot be updated. * Possible values include: 'FragmentedMP4', 'RTMP' - * @member {object} [input.accessControl] The access control for LiveEvent + * @property {object} [input.accessControl] The access control for LiveEvent * Input. - * @member {object} [input.accessControl.ip] The IP access control + * @property {object} [input.accessControl.ip] The IP access control * properties. - * @member {array} [input.accessControl.ip.allow] The IP allow list. - * @member {string} [input.keyFrameIntervalDuration] ISO 8601 timespan + * @property {array} [input.accessControl.ip.allow] The IP allow list. + * @property {string} [input.keyFrameIntervalDuration] ISO 8601 timespan * duration of the key frame interval duration. - * @member {string} [input.accessToken] A unique identifier for a stream. + * @property {string} [input.accessToken] A unique identifier for a stream. * This can be specified at creation time but cannot be updated. If omitted, * the service will generate a unique value. - * @member {array} [input.endpoints] The input endpoints for the Live Event. - * @member {object} [preview] The Live Event preview. - * @member {array} [preview.endpoints] The endpoints for preview. - * @member {object} [preview.accessControl] The access control for LiveEvent - * preview. - * @member {object} [preview.accessControl.ip] The IP access control + * @property {array} [input.endpoints] The input endpoints for the Live + * Event. + * @property {object} [preview] The Live Event preview. + * @property {array} [preview.endpoints] The endpoints for preview. + * @property {object} [preview.accessControl] The access control for + * LiveEvent preview. + * @property {object} [preview.accessControl.ip] The IP access control * properties. - * @member {array} [preview.accessControl.ip.allow] The IP allow list. - * @member {string} [preview.previewLocator] The identifier of the preview + * @property {array} [preview.accessControl.ip.allow] The IP allow list. + * @property {string} [preview.previewLocator] The identifier of the preview * locator in Guid format. Specifying this at creation time allows the * caller to know the preview locator url before the event is created. If * omitted, the service will generate a random identifier. This value cannot * be updated once the live event is created. - * @member {string} [preview.streamingPolicyName] The name of streaming + * @property {string} [preview.streamingPolicyName] The name of streaming * policy used for the LiveEvent preview. This value is specified at * creation time and cannot be updated. - * @member {string} [preview.alternativeMediaId] An Alternative Media + * @property {string} [preview.alternativeMediaId] An Alternative Media * Identifier associated with the StreamingLocator created for the preview. * This value is specified at creation time and cannot be updated. The * identifier can be used in the CustomLicenseAcquisitionUrlTemplate or the * CustomKeyAcquisitionUrlTemplate of the StreamingPolicy specified in the * StreamingPolicyName field. - * @member {object} [encoding] The Live Event encoding. - * @member {string} [encoding.encodingType] The encoding type for Live Event. - * This value is specified at creation time and cannot be updated. Possible - * values include: 'None', 'Basic' - * @member {string} [encoding.presetName] The encoding preset name. This + * @property {object} [encoding] The Live Event encoding. + * @property {string} [encoding.encodingType] The encoding type for Live + * Event. This value is specified at creation time and cannot be updated. + * Possible values include: 'None', 'Basic', 'Standard' + * @property {string} [encoding.presetName] The encoding preset name. This * value is specified at creation time and cannot be updated. - * @member {string} [provisioningState] The provisioning state of the Live + * @property {string} [provisioningState] The provisioning state of the Live * Event. - * @member {string} [resourceState] The resource state of the Live Event. + * @property {string} [resourceState] The resource state of the Live Event. * Possible values include: 'Stopped', 'Starting', 'Running', 'Stopping', * 'Deleting' - * @member {object} [crossSiteAccessPolicies] The Live Event access policies. - * @member {string} [crossSiteAccessPolicies.clientAccessPolicy] The content - * of clientaccesspolicy.xml used by Silverlight. - * @member {string} [crossSiteAccessPolicies.crossDomainPolicy] The content + * @property {object} [crossSiteAccessPolicies] The Live Event access + * policies. + * @property {string} [crossSiteAccessPolicies.clientAccessPolicy] The + * content of clientaccesspolicy.xml used by Silverlight. + * @property {string} [crossSiteAccessPolicies.crossDomainPolicy] The content * of crossdomain.xml used by Silverlight. - * @member {boolean} [vanityUrl] Specifies whether to use a vanity url with + * @property {boolean} [vanityUrl] Specifies whether to use a vanity url with * the Live Event. This value is specified at creation time and cannot be * updated. - * @member {array} [streamOptions] The options to use for the LiveEvent. + * @property {array} [streamOptions] The options to use for the LiveEvent. * This value is specified at creation time and cannot be updated. - * @member {date} [created] The exact time the Live Event was created. - * @member {date} [lastModified] The exact time the Live Event was last + * @property {date} [created] The exact time the Live Event was created. + * @property {date} [lastModified] The exact time the Live Event was last * modified. */ constructor() { diff --git a/lib/services/mediaServicesManagement/lib/models/liveEventActionInput.js b/lib/services/mediaServicesManagement/lib/models/liveEventActionInput.js index c72c3c97ca..83b200df6f 100644 --- a/lib/services/mediaServicesManagement/lib/models/liveEventActionInput.js +++ b/lib/services/mediaServicesManagement/lib/models/liveEventActionInput.js @@ -17,7 +17,7 @@ class LiveEventActionInput { /** * Create a LiveEventActionInput. - * @member {boolean} [removeOutputsOnStop] The flag indicates if remove + * @property {boolean} [removeOutputsOnStop] The flag indicates if remove * LiveOutputs on Stop. */ constructor() { diff --git a/lib/services/mediaServicesManagement/lib/models/liveEventEncoding.js b/lib/services/mediaServicesManagement/lib/models/liveEventEncoding.js index 56714adbf0..70aec0a114 100644 --- a/lib/services/mediaServicesManagement/lib/models/liveEventEncoding.js +++ b/lib/services/mediaServicesManagement/lib/models/liveEventEncoding.js @@ -17,10 +17,10 @@ class LiveEventEncoding { /** * Create a LiveEventEncoding. - * @member {string} [encodingType] The encoding type for Live Event. This + * @property {string} [encodingType] The encoding type for Live Event. This * value is specified at creation time and cannot be updated. Possible values - * include: 'None', 'Basic' - * @member {string} [presetName] The encoding preset name. This value is + * include: 'None', 'Basic', 'Standard' + * @property {string} [presetName] The encoding preset name. This value is * specified at creation time and cannot be updated. */ constructor() { @@ -45,7 +45,7 @@ class LiveEventEncoding { serializedName: 'encodingType', type: { name: 'Enum', - allowedValues: [ 'None', 'Basic' ] + allowedValues: [ 'None', 'Basic', 'Standard' ] } }, presetName: { diff --git a/lib/services/mediaServicesManagement/lib/models/liveEventEndpoint.js b/lib/services/mediaServicesManagement/lib/models/liveEventEndpoint.js index 76d16e45f3..ad7d82bfc6 100644 --- a/lib/services/mediaServicesManagement/lib/models/liveEventEndpoint.js +++ b/lib/services/mediaServicesManagement/lib/models/liveEventEndpoint.js @@ -17,8 +17,8 @@ class LiveEventEndpoint { /** * Create a LiveEventEndpoint. - * @member {string} [protocol] The endpoint protocol. - * @member {string} [url] The endpoint URL. + * @property {string} [protocol] The endpoint protocol. + * @property {string} [url] The endpoint URL. */ constructor() { } diff --git a/lib/services/mediaServicesManagement/lib/models/liveEventInput.js b/lib/services/mediaServicesManagement/lib/models/liveEventInput.js index 94c2bb4209..41e4e35f4e 100644 --- a/lib/services/mediaServicesManagement/lib/models/liveEventInput.js +++ b/lib/services/mediaServicesManagement/lib/models/liveEventInput.js @@ -17,18 +17,18 @@ class LiveEventInput { /** * Create a LiveEventInput. - * @member {string} streamingProtocol The streaming protocol for the Live + * @property {string} streamingProtocol The streaming protocol for the Live * Event. This is specified at creation time and cannot be updated. Possible * values include: 'FragmentedMP4', 'RTMP' - * @member {object} [accessControl] The access control for LiveEvent Input. - * @member {object} [accessControl.ip] The IP access control properties. - * @member {array} [accessControl.ip.allow] The IP allow list. - * @member {string} [keyFrameIntervalDuration] ISO 8601 timespan duration of - * the key frame interval duration. - * @member {string} [accessToken] A unique identifier for a stream. This can - * be specified at creation time but cannot be updated. If omitted, the + * @property {object} [accessControl] The access control for LiveEvent Input. + * @property {object} [accessControl.ip] The IP access control properties. + * @property {array} [accessControl.ip.allow] The IP allow list. + * @property {string} [keyFrameIntervalDuration] ISO 8601 timespan duration + * of the key frame interval duration. + * @property {string} [accessToken] A unique identifier for a stream. This + * can be specified at creation time but cannot be updated. If omitted, the * service will generate a unique value. - * @member {array} [endpoints] The input endpoints for the Live Event. + * @property {array} [endpoints] The input endpoints for the Live Event. */ constructor() { } diff --git a/lib/services/mediaServicesManagement/lib/models/liveEventInputAccessControl.js b/lib/services/mediaServicesManagement/lib/models/liveEventInputAccessControl.js index a3d4514244..16c7747756 100644 --- a/lib/services/mediaServicesManagement/lib/models/liveEventInputAccessControl.js +++ b/lib/services/mediaServicesManagement/lib/models/liveEventInputAccessControl.js @@ -17,8 +17,8 @@ class LiveEventInputAccessControl { /** * Create a LiveEventInputAccessControl. - * @member {object} [ip] The IP access control properties. - * @member {array} [ip.allow] The IP allow list. + * @property {object} [ip] The IP access control properties. + * @property {array} [ip.allow] The IP allow list. */ constructor() { } diff --git a/lib/services/mediaServicesManagement/lib/models/liveEventListResult.js b/lib/services/mediaServicesManagement/lib/models/liveEventListResult.js index 655285ed9d..bdfe2ef699 100644 --- a/lib/services/mediaServicesManagement/lib/models/liveEventListResult.js +++ b/lib/services/mediaServicesManagement/lib/models/liveEventListResult.js @@ -17,8 +17,8 @@ class LiveEventListResult extends Array { /** * Create a LiveEventListResult. - * @member {number} [odatacount] The number of result. - * @member {string} [odatanextLink] Th link to the next set of results. Not + * @property {number} [odatacount] The number of result. + * @property {string} [odatanextLink] Th link to the next set of results. Not * empty if value contains incomplete list of Live Outputs. */ constructor() { diff --git a/lib/services/mediaServicesManagement/lib/models/liveEventPreview.js b/lib/services/mediaServicesManagement/lib/models/liveEventPreview.js index f58b58966e..8a9d4c18e6 100644 --- a/lib/services/mediaServicesManagement/lib/models/liveEventPreview.js +++ b/lib/services/mediaServicesManagement/lib/models/liveEventPreview.js @@ -17,19 +17,20 @@ class LiveEventPreview { /** * Create a LiveEventPreview. - * @member {array} [endpoints] The endpoints for preview. - * @member {object} [accessControl] The access control for LiveEvent preview. - * @member {object} [accessControl.ip] The IP access control properties. - * @member {array} [accessControl.ip.allow] The IP allow list. - * @member {string} [previewLocator] The identifier of the preview locator in - * Guid format. Specifying this at creation time allows the caller to know - * the preview locator url before the event is created. If omitted, the + * @property {array} [endpoints] The endpoints for preview. + * @property {object} [accessControl] The access control for LiveEvent + * preview. + * @property {object} [accessControl.ip] The IP access control properties. + * @property {array} [accessControl.ip.allow] The IP allow list. + * @property {string} [previewLocator] The identifier of the preview locator + * in Guid format. Specifying this at creation time allows the caller to + * know the preview locator url before the event is created. If omitted, the * service will generate a random identifier. This value cannot be updated * once the live event is created. - * @member {string} [streamingPolicyName] The name of streaming policy used + * @property {string} [streamingPolicyName] The name of streaming policy used * for the LiveEvent preview. This value is specified at creation time and * cannot be updated. - * @member {string} [alternativeMediaId] An Alternative Media Identifier + * @property {string} [alternativeMediaId] An Alternative Media Identifier * associated with the StreamingLocator created for the preview. This value * is specified at creation time and cannot be updated. The identifier can * be used in the CustomLicenseAcquisitionUrlTemplate or the diff --git a/lib/services/mediaServicesManagement/lib/models/liveEventPreviewAccessControl.js b/lib/services/mediaServicesManagement/lib/models/liveEventPreviewAccessControl.js index 8a8ff759da..eba4650c06 100644 --- a/lib/services/mediaServicesManagement/lib/models/liveEventPreviewAccessControl.js +++ b/lib/services/mediaServicesManagement/lib/models/liveEventPreviewAccessControl.js @@ -17,8 +17,8 @@ class LiveEventPreviewAccessControl { /** * Create a LiveEventPreviewAccessControl. - * @member {object} [ip] The IP access control properties. - * @member {array} [ip.allow] The IP allow list. + * @property {object} [ip] The IP access control properties. + * @property {array} [ip.allow] The IP allow list. */ constructor() { } diff --git a/lib/services/mediaServicesManagement/lib/models/liveOutput.js b/lib/services/mediaServicesManagement/lib/models/liveOutput.js index f030de889a..a5170a88d1 100644 --- a/lib/services/mediaServicesManagement/lib/models/liveOutput.js +++ b/lib/services/mediaServicesManagement/lib/models/liveOutput.js @@ -20,23 +20,23 @@ const models = require('./index'); class LiveOutput extends models['ProxyResource'] { /** * Create a LiveOutput. - * @member {string} [description] The description of the Live Output. - * @member {string} assetName The asset name. - * @member {moment.duration} archiveWindowLength ISO 8601 timespan duration + * @property {string} [description] The description of the Live Output. + * @property {string} assetName The asset name. + * @property {moment.duration} archiveWindowLength ISO 8601 timespan duration * of the archive window length. This is duration that customer want to * retain the recorded content. - * @member {string} [manifestName] The manifest file name. If not provided, - * the service will generate one automatically. - * @member {object} [hls] The HLS configuration. - * @member {number} [hls.fragmentsPerTsSegment] The amount of fragments per + * @property {string} [manifestName] The manifest file name. If not + * provided, the service will generate one automatically. + * @property {object} [hls] The HLS configuration. + * @property {number} [hls.fragmentsPerTsSegment] The amount of fragments per * HTTP Live Streaming (HLS) segment. - * @member {number} [outputSnapTime] The output snapshot time. - * @member {date} [created] The exact time the Live Output was created. - * @member {date} [lastModified] The exact time the Live Output was last + * @property {number} [outputSnapTime] The output snapshot time. + * @property {date} [created] The exact time the Live Output was created. + * @property {date} [lastModified] The exact time the Live Output was last * modified. - * @member {string} [provisioningState] The provisioning state of the Live + * @property {string} [provisioningState] The provisioning state of the Live * Output. - * @member {string} [resourceState] The resource state of the Live Output. + * @property {string} [resourceState] The resource state of the Live Output. * Possible values include: 'Creating', 'Running', 'Deleting' */ constructor() { diff --git a/lib/services/mediaServicesManagement/lib/models/liveOutputListResult.js b/lib/services/mediaServicesManagement/lib/models/liveOutputListResult.js index bf522cc767..a0bb00ead7 100644 --- a/lib/services/mediaServicesManagement/lib/models/liveOutputListResult.js +++ b/lib/services/mediaServicesManagement/lib/models/liveOutputListResult.js @@ -17,8 +17,8 @@ class LiveOutputListResult extends Array { /** * Create a LiveOutputListResult. - * @member {number} [odatacount] The number of result. - * @member {string} [odatanextLink] Th link to the next set of results. Not + * @property {number} [odatacount] The number of result. + * @property {string} [odatanextLink] Th link to the next set of results. Not * empty if value contains incomplete list of Live Outputs. */ constructor() { diff --git a/lib/services/mediaServicesManagement/lib/models/location.js b/lib/services/mediaServicesManagement/lib/models/location.js index 467b6f0fc5..a83149f5cd 100644 --- a/lib/services/mediaServicesManagement/lib/models/location.js +++ b/lib/services/mediaServicesManagement/lib/models/location.js @@ -16,7 +16,7 @@ class Location { /** * Create a Location. - * @member {string} name + * @property {string} name */ constructor() { } diff --git a/lib/services/mediaServicesManagement/lib/models/mediaService.js b/lib/services/mediaServicesManagement/lib/models/mediaService.js index c8988d3532..a91faf0a56 100644 --- a/lib/services/mediaServicesManagement/lib/models/mediaService.js +++ b/lib/services/mediaServicesManagement/lib/models/mediaService.js @@ -20,8 +20,9 @@ const models = require('./index'); class MediaService extends models['TrackedResource'] { /** * Create a MediaService. - * @member {uuid} [mediaServiceId] The Media Services account ID. - * @member {array} [storageAccounts] The storage accounts for this resource. + * @property {uuid} [mediaServiceId] The Media Services account ID. + * @property {array} [storageAccounts] The storage accounts for this + * resource. */ constructor() { super(); diff --git a/lib/services/mediaServicesManagement/lib/models/mediaServiceCollection.js b/lib/services/mediaServicesManagement/lib/models/mediaServiceCollection.js index 33c785580d..a73bf2c889 100644 --- a/lib/services/mediaServicesManagement/lib/models/mediaServiceCollection.js +++ b/lib/services/mediaServicesManagement/lib/models/mediaServiceCollection.js @@ -16,8 +16,9 @@ class MediaServiceCollection extends Array { /** * Create a MediaServiceCollection. - * @member {string} [odatanextLink] A link to the next page of the collection - * (when the collection contains too many results to return in one response). + * @property {string} [odatanextLink] A link to the next page of the + * collection (when the collection contains too many results to return in one + * response). */ constructor() { super(); diff --git a/lib/services/mediaServicesManagement/lib/models/metric.js b/lib/services/mediaServicesManagement/lib/models/metric.js index 386eca2813..11b37e70e4 100644 --- a/lib/services/mediaServicesManagement/lib/models/metric.js +++ b/lib/services/mediaServicesManagement/lib/models/metric.js @@ -17,14 +17,14 @@ class Metric { /** * Create a Metric. - * @member {string} [name] The metric name. - * @member {string} [displayName] The metric display name. - * @member {string} [displayDescription] The metric display description. - * @member {string} [unit] The metric unit. Possible values include: 'Bytes', - * 'Count', 'Milliseconds' - * @member {string} [aggregationType] The metric aggregation type. Possible + * @property {string} [name] The metric name. + * @property {string} [displayName] The metric display name. + * @property {string} [displayDescription] The metric display description. + * @property {string} [unit] The metric unit. Possible values include: + * 'Bytes', 'Count', 'Milliseconds' + * @property {string} [aggregationType] The metric aggregation type. Possible * values include: 'Average', 'Count', 'Total' - * @member {array} [dimensions] The metric dimensions. + * @property {array} [dimensions] The metric dimensions. */ constructor() { } @@ -73,8 +73,7 @@ class Metric { readOnly: true, serializedName: 'unit', type: { - name: 'Enum', - allowedValues: [ 'Bytes', 'Count', 'Milliseconds' ] + name: 'String' } }, aggregationType: { @@ -83,8 +82,7 @@ class Metric { readOnly: true, serializedName: 'aggregationType', type: { - name: 'Enum', - allowedValues: [ 'Average', 'Count', 'Total' ] + name: 'String' } }, dimensions: { diff --git a/lib/services/mediaServicesManagement/lib/models/metricDimension.js b/lib/services/mediaServicesManagement/lib/models/metricDimension.js index 1071cd15d3..3b3ed27b20 100644 --- a/lib/services/mediaServicesManagement/lib/models/metricDimension.js +++ b/lib/services/mediaServicesManagement/lib/models/metricDimension.js @@ -17,9 +17,9 @@ class MetricDimension { /** * Create a MetricDimension. - * @member {string} [name] The metric dimension name. - * @member {string} [displayName] The display name for the dimension. - * @member {boolean} [toBeExportedForShoebox] Whether to export metric to + * @property {string} [name] The metric dimension name. + * @property {string} [displayName] The display name for the dimension. + * @property {boolean} [toBeExportedForShoebox] Whether to export metric to * shoebox. */ constructor() { diff --git a/lib/services/mediaServicesManagement/lib/models/metricProperties.js b/lib/services/mediaServicesManagement/lib/models/metricProperties.js index 27dc241252..60938f7f5a 100644 --- a/lib/services/mediaServicesManagement/lib/models/metricProperties.js +++ b/lib/services/mediaServicesManagement/lib/models/metricProperties.js @@ -17,9 +17,9 @@ class MetricProperties { /** * Create a MetricProperties. - * @member {object} [serviceSpecification] The service specifications. - * @member {array} [serviceSpecification.metricSpecifications] List of metric - * specifications. + * @property {object} [serviceSpecification] The service specifications. + * @property {array} [serviceSpecification.metricSpecifications] List of + * metric specifications. */ constructor() { } diff --git a/lib/services/mediaServicesManagement/lib/models/multiBitrateFormat.js b/lib/services/mediaServicesManagement/lib/models/multiBitrateFormat.js index 7b6d40009d..c5b9d99366 100644 --- a/lib/services/mediaServicesManagement/lib/models/multiBitrateFormat.js +++ b/lib/services/mediaServicesManagement/lib/models/multiBitrateFormat.js @@ -24,7 +24,7 @@ const models = require('./index'); class MultiBitrateFormat extends models['Format'] { /** * Create a MultiBitrateFormat. - * @member {array} [outputFiles] The list of output files to produce. Each + * @property {array} [outputFiles] The list of output files to produce. Each * entry in the list is a set of audio and video layer labels to be muxed * together . */ diff --git a/lib/services/mediaServicesManagement/lib/models/noEncryption.js b/lib/services/mediaServicesManagement/lib/models/noEncryption.js index caccbec6d1..4715a3dd8c 100644 --- a/lib/services/mediaServicesManagement/lib/models/noEncryption.js +++ b/lib/services/mediaServicesManagement/lib/models/noEncryption.js @@ -17,12 +17,12 @@ class NoEncryption { /** * Create a NoEncryption. - * @member {object} [enabledProtocols] Representing supported protocols - * @member {boolean} [enabledProtocols.download] Enable Download protocol or - * not - * @member {boolean} [enabledProtocols.dash] Enable DASH protocol or not - * @member {boolean} [enabledProtocols.hls] Enable HLS protocol or not - * @member {boolean} [enabledProtocols.smoothStreaming] Enable + * @property {object} [enabledProtocols] Representing supported protocols + * @property {boolean} [enabledProtocols.download] Enable Download protocol + * or not + * @property {boolean} [enabledProtocols.dash] Enable DASH protocol or not + * @property {boolean} [enabledProtocols.hls] Enable HLS protocol or not + * @property {boolean} [enabledProtocols.smoothStreaming] Enable * SmoothStreaming protocol or not */ constructor() { diff --git a/lib/services/mediaServicesManagement/lib/models/oDataError.js b/lib/services/mediaServicesManagement/lib/models/oDataError.js index 0eff90e910..a447fc23f7 100644 --- a/lib/services/mediaServicesManagement/lib/models/oDataError.js +++ b/lib/services/mediaServicesManagement/lib/models/oDataError.js @@ -17,11 +17,11 @@ class ODataError { /** * Create a ODataError. - * @member {string} [code] A language-independent error name. - * @member {string} [message] The error message. - * @member {string} [target] The target of the error (for example, the name + * @property {string} [code] A language-independent error name. + * @property {string} [message] The error message. + * @property {string} [target] The target of the error (for example, the name * of the property in error). - * @member {array} [details] The error details. + * @property {array} [details] The error details. */ constructor() { } diff --git a/lib/services/mediaServicesManagement/lib/models/operation.js b/lib/services/mediaServicesManagement/lib/models/operation.js index b407d331ee..6f7cc20ead 100644 --- a/lib/services/mediaServicesManagement/lib/models/operation.js +++ b/lib/services/mediaServicesManagement/lib/models/operation.js @@ -17,18 +17,18 @@ class Operation { /** * Create a Operation. - * @member {string} name The operation name. - * @member {object} [display] The operation display name. - * @member {string} [display.provider] The service provider. - * @member {string} [display.resource] Resource on which the operation is + * @property {string} name The operation name. + * @property {object} [display] The operation display name. + * @property {string} [display.provider] The service provider. + * @property {string} [display.resource] Resource on which the operation is * performed. - * @member {string} [display.operation] The operation type. - * @member {string} [display.description] The operation description. - * @member {string} [origin] Origin of the operation. - * @member {object} [properties] Operation properties format. - * @member {object} [properties.serviceSpecification] The service + * @property {string} [display.operation] The operation type. + * @property {string} [display.description] The operation description. + * @property {string} [origin] Origin of the operation. + * @property {object} [properties] Operation properties format. + * @property {object} [properties.serviceSpecification] The service * specifications. - * @member {array} [properties.serviceSpecification.metricSpecifications] + * @property {array} [properties.serviceSpecification.metricSpecifications] * List of metric specifications. */ constructor() { diff --git a/lib/services/mediaServicesManagement/lib/models/operationCollection.js b/lib/services/mediaServicesManagement/lib/models/operationCollection.js index 5bf734ed6b..b93d3496c2 100644 --- a/lib/services/mediaServicesManagement/lib/models/operationCollection.js +++ b/lib/services/mediaServicesManagement/lib/models/operationCollection.js @@ -16,8 +16,9 @@ class OperationCollection extends Array { /** * Create a OperationCollection. - * @member {string} [odatanextLink] A link to the next page of the collection - * (when the collection contains too many results to return in one response). + * @property {string} [odatanextLink] A link to the next page of the + * collection (when the collection contains too many results to return in one + * response). */ constructor() { super(); diff --git a/lib/services/mediaServicesManagement/lib/models/operationDisplay.js b/lib/services/mediaServicesManagement/lib/models/operationDisplay.js index 4862daa045..3e055e5324 100644 --- a/lib/services/mediaServicesManagement/lib/models/operationDisplay.js +++ b/lib/services/mediaServicesManagement/lib/models/operationDisplay.js @@ -17,10 +17,11 @@ class OperationDisplay { /** * Create a OperationDisplay. - * @member {string} [provider] The service provider. - * @member {string} [resource] Resource on which the operation is performed. - * @member {string} [operation] The operation type. - * @member {string} [description] The operation description. + * @property {string} [provider] The service provider. + * @property {string} [resource] Resource on which the operation is + * performed. + * @property {string} [operation] The operation type. + * @property {string} [description] The operation description. */ constructor() { } diff --git a/lib/services/mediaServicesManagement/lib/models/outputFile.js b/lib/services/mediaServicesManagement/lib/models/outputFile.js index e103899eed..065a108cc2 100644 --- a/lib/services/mediaServicesManagement/lib/models/outputFile.js +++ b/lib/services/mediaServicesManagement/lib/models/outputFile.js @@ -17,12 +17,12 @@ class OutputFile { /** * Create a OutputFile. - * @member {array} [labels] The list of labels that describe how the encoder - * should multiplex video and audio into an output file. For example, if the - * encoder is producing two video layers with labels v1 and v2, and one audio - * layer with label a1, then an array like '[v1, a1]' tells the encoder to - * produce an output file with the video track represented by v1 and the - * audio track represented by a1. + * @property {array} [labels] The list of labels that describe how the + * encoder should multiplex video and audio into an output file. For example, + * if the encoder is producing two video layers with labels v1 and v2, and + * one audio layer with label a1, then an array like '[v1, a1]' tells the + * encoder to produce an output file with the video track represented by v1 + * and the audio track represented by a1. */ constructor() { } diff --git a/lib/services/mediaServicesManagement/lib/models/overlay.js b/lib/services/mediaServicesManagement/lib/models/overlay.js index 85dc541953..b3ed2d9565 100644 --- a/lib/services/mediaServicesManagement/lib/models/overlay.js +++ b/lib/services/mediaServicesManagement/lib/models/overlay.js @@ -17,33 +17,33 @@ class Overlay { /** * Create a Overlay. - * @member {string} [inputLabel] The label of the job input which is to be + * @property {string} [inputLabel] The label of the job input which is to be * used as an overlay. The Input must specify exactly one file. You can * specify an image file in JPG or PNG formats, or an audio file (such as a * WAV, MP3, WMA or M4A file), or a video file. See https://aka.ms/mesformats * for the complete list of supported audio and video file formats. - * @member {moment.duration} [start] The start position, with reference to + * @property {moment.duration} [start] The start position, with reference to * the input video, at which the overlay starts. The value should be in ISO * 8601 format. For example, PT05S to start the overlay at 5 seconds in to * the input video. If not specified the overlay starts from the beginning of * the input video. - * @member {moment.duration} [end] The position in the input video at which + * @property {moment.duration} [end] The position in the input video at which * the overlay ends. The value should be in ISO 8601 duration format. For * example, PT30S to end the overlay at 30 seconds in to the input video. If * not specified the overlay will be applied until the end of the input video * if inputLoop is true. Else, if inputLoop is false, then overlay will last * as long as the duration of the overlay media. - * @member {moment.duration} [fadeInDuration] The duration over which the + * @property {moment.duration} [fadeInDuration] The duration over which the * overlay fades in onto the input video. The value should be in ISO 8601 * duration format. If not specified the default behavior is to have no fade * in (same as PT0S). - * @member {moment.duration} [fadeOutDuration] The duration over which the + * @property {moment.duration} [fadeOutDuration] The duration over which the * overlay fades out of the input video. The value should be in ISO 8601 * duration format. If not specified the default behavior is to have no fade * out (same as PT0S). - * @member {number} [audioGainLevel] The gain level of audio in the overlay. - * The value should be in the range [0, 1.0]. The default is 1.0. - * @member {string} odatatype Polymorphic Discriminator + * @property {number} [audioGainLevel] The gain level of audio in the + * overlay. The value should be in the range [0, 1.0]. The default is 1.0. + * @property {string} odatatype Polymorphic Discriminator */ constructor() { } diff --git a/lib/services/mediaServicesManagement/lib/models/pngImage.js b/lib/services/mediaServicesManagement/lib/models/pngImage.js index 77dea14f6d..eec4ee91e2 100644 --- a/lib/services/mediaServicesManagement/lib/models/pngImage.js +++ b/lib/services/mediaServicesManagement/lib/models/pngImage.js @@ -21,7 +21,7 @@ const models = require('./index'); class PngImage extends models['Image'] { /** * Create a PngImage. - * @member {array} [layers] A collection of output PNG image layers to be + * @property {array} [layers] A collection of output PNG image layers to be * produced by the encoder. */ constructor() { @@ -73,8 +73,7 @@ class PngImage extends models['Image'] { required: false, serializedName: 'stretchMode', type: { - name: 'Enum', - allowedValues: [ 'None', 'AutoSize', 'AutoFit' ] + name: 'String' } }, start: { diff --git a/lib/services/mediaServicesManagement/lib/models/presentationTimeRange.js b/lib/services/mediaServicesManagement/lib/models/presentationTimeRange.js index cd1039bf4f..121906e5b5 100644 --- a/lib/services/mediaServicesManagement/lib/models/presentationTimeRange.js +++ b/lib/services/mediaServicesManagement/lib/models/presentationTimeRange.js @@ -18,14 +18,14 @@ class PresentationTimeRange { /** * Create a PresentationTimeRange. - * @member {number} startTimestamp The absolute start time boundary. - * @member {number} endTimestamp The absolute end time boundary. - * @member {number} presentationWindowDuration The relative to end sliding - * window. - * @member {number} liveBackoffDuration The relative to end right edge. - * @member {number} timescale The time scale of time stamps. - * @member {boolean} forceEndTimestamp The indicator of forcing exsiting of - * end time stamp. + * @property {number} [startTimestamp] The absolute start time boundary. + * @property {number} [endTimestamp] The absolute end time boundary. + * @property {number} [presentationWindowDuration] The relative to end + * sliding window. + * @property {number} [liveBackoffDuration] The relative to end right edge. + * @property {number} [timescale] The time scale of time stamps. + * @property {boolean} [forceEndTimestamp] The indicator of forcing exsiting + * of end time stamp. */ constructor() { } @@ -45,42 +45,42 @@ class PresentationTimeRange { className: 'PresentationTimeRange', modelProperties: { startTimestamp: { - required: true, + required: false, serializedName: 'startTimestamp', type: { name: 'Number' } }, endTimestamp: { - required: true, + required: false, serializedName: 'endTimestamp', type: { name: 'Number' } }, presentationWindowDuration: { - required: true, + required: false, serializedName: 'presentationWindowDuration', type: { name: 'Number' } }, liveBackoffDuration: { - required: true, + required: false, serializedName: 'liveBackoffDuration', type: { name: 'Number' } }, timescale: { - required: true, + required: false, serializedName: 'timescale', type: { name: 'Number' } }, forceEndTimestamp: { - required: true, + required: false, serializedName: 'forceEndTimestamp', type: { name: 'Boolean' diff --git a/lib/services/mediaServicesManagement/lib/models/preset.js b/lib/services/mediaServicesManagement/lib/models/preset.js index 26d0963f1d..590f19814c 100644 --- a/lib/services/mediaServicesManagement/lib/models/preset.js +++ b/lib/services/mediaServicesManagement/lib/models/preset.js @@ -18,7 +18,7 @@ class Preset { /** * Create a Preset. - * @member {string} odatatype Polymorphic Discriminator + * @property {string} odatatype Polymorphic Discriminator */ constructor() { } diff --git a/lib/services/mediaServicesManagement/lib/models/provider.js b/lib/services/mediaServicesManagement/lib/models/provider.js index a0ee0b3967..0d7a1d4a14 100644 --- a/lib/services/mediaServicesManagement/lib/models/provider.js +++ b/lib/services/mediaServicesManagement/lib/models/provider.js @@ -17,7 +17,7 @@ class Provider { /** * Create a Provider. - * @member {string} providerName The provider name. + * @property {string} providerName The provider name. */ constructor() { } diff --git a/lib/services/mediaServicesManagement/lib/models/rectangle.js b/lib/services/mediaServicesManagement/lib/models/rectangle.js index b7be8b9704..d236149db4 100644 --- a/lib/services/mediaServicesManagement/lib/models/rectangle.js +++ b/lib/services/mediaServicesManagement/lib/models/rectangle.js @@ -18,18 +18,18 @@ class Rectangle { /** * Create a Rectangle. - * @member {string} [left] The number of pixels from the left-margin. This + * @property {string} [left] The number of pixels from the left-margin. This * can be absolute pixel value (e.g 100), or relative to the size of the * video (For example, 50%). - * @member {string} [top] The number of pixels from the top-margin. This can - * be absolute pixel value (e.g 100), or relative to the size of the video - * (For example, 50%). - * @member {string} [width] The width of the rectangular region in pixels. - * This can be absolute pixel value (e.g 100), or relative to the size of the + * @property {string} [top] The number of pixels from the top-margin. This + * can be absolute pixel value (e.g 100), or relative to the size of the * video (For example, 50%). - * @member {string} [height] The height of the rectangular region in pixels. + * @property {string} [width] The width of the rectangular region in pixels. * This can be absolute pixel value (e.g 100), or relative to the size of the * video (For example, 50%). + * @property {string} [height] The height of the rectangular region in + * pixels. This can be absolute pixel value (e.g 100), or relative to the + * size of the video (For example, 50%). */ constructor() { } diff --git a/lib/services/mediaServicesManagement/lib/models/resource.js b/lib/services/mediaServicesManagement/lib/models/resource.js index e286b61d7b..64faca3c8a 100644 --- a/lib/services/mediaServicesManagement/lib/models/resource.js +++ b/lib/services/mediaServicesManagement/lib/models/resource.js @@ -20,9 +20,9 @@ const models = require('./index'); class Resource extends models['BaseResource'] { /** * Create a Resource. - * @member {string} [id] Fully qualified resource ID for the resource. - * @member {string} [name] The name of the resource. - * @member {string} [type] The type of the resource. + * @property {string} [id] Fully qualified resource ID for the resource. + * @property {string} [name] The name of the resource. + * @property {string} [type] The type of the resource. */ constructor() { super(); diff --git a/lib/services/mediaServicesManagement/lib/models/serviceSpecification.js b/lib/services/mediaServicesManagement/lib/models/serviceSpecification.js index 1c23d8c6b3..542cfe9d52 100644 --- a/lib/services/mediaServicesManagement/lib/models/serviceSpecification.js +++ b/lib/services/mediaServicesManagement/lib/models/serviceSpecification.js @@ -17,7 +17,7 @@ class ServiceSpecification { /** * Create a ServiceSpecification. - * @member {array} [metricSpecifications] List of metric specifications. + * @property {array} [metricSpecifications] List of metric specifications. */ constructor() { } diff --git a/lib/services/mediaServicesManagement/lib/models/standardEncoderPreset.js b/lib/services/mediaServicesManagement/lib/models/standardEncoderPreset.js index 88060556e6..d2e2fcfb30 100644 --- a/lib/services/mediaServicesManagement/lib/models/standardEncoderPreset.js +++ b/lib/services/mediaServicesManagement/lib/models/standardEncoderPreset.js @@ -21,37 +21,37 @@ const models = require('./index'); class StandardEncoderPreset extends models['Preset'] { /** * Create a StandardEncoderPreset. - * @member {object} [filters] One or more filtering operations that are + * @property {object} [filters] One or more filtering operations that are * applied to the input media before encoding. - * @member {object} [filters.deinterlace] The de-interlacing settings. - * @member {string} [filters.deinterlace.parity] The field parity for + * @property {object} [filters.deinterlace] The de-interlacing settings. + * @property {string} [filters.deinterlace.parity] The field parity for * de-interlacing, defaults to Auto. Possible values include: 'Auto', * 'TopFieldFirst', 'BottomFieldFirst' - * @member {string} [filters.deinterlace.mode] The deinterlacing mode. + * @property {string} [filters.deinterlace.mode] The deinterlacing mode. * Defaults to AutoPixelAdaptive. Possible values include: 'Off', * 'AutoPixelAdaptive' - * @member {string} [filters.rotation] The rotation, if any, to be applied to - * the input video, before it is encoded. Default is Auto. Possible values + * @property {string} [filters.rotation] The rotation, if any, to be applied + * to the input video, before it is encoded. Default is Auto. Possible values * include: 'Auto', 'None', 'Rotate0', 'Rotate90', 'Rotate180', 'Rotate270' - * @member {object} [filters.crop] The parameters for the rectangular window - * with which to crop the input video. - * @member {string} [filters.crop.left] The number of pixels from the + * @property {object} [filters.crop] The parameters for the rectangular + * window with which to crop the input video. + * @property {string} [filters.crop.left] The number of pixels from the * left-margin. This can be absolute pixel value (e.g 100), or relative to * the size of the video (For example, 50%). - * @member {string} [filters.crop.top] The number of pixels from the + * @property {string} [filters.crop.top] The number of pixels from the * top-margin. This can be absolute pixel value (e.g 100), or relative to the * size of the video (For example, 50%). - * @member {string} [filters.crop.width] The width of the rectangular region - * in pixels. This can be absolute pixel value (e.g 100), or relative to the - * size of the video (For example, 50%). - * @member {string} [filters.crop.height] The height of the rectangular + * @property {string} [filters.crop.width] The width of the rectangular + * region in pixels. This can be absolute pixel value (e.g 100), or relative + * to the size of the video (For example, 50%). + * @property {string} [filters.crop.height] The height of the rectangular * region in pixels. This can be absolute pixel value (e.g 100), or relative * to the size of the video (For example, 50%). - * @member {array} [filters.overlays] The properties of overlays to be + * @property {array} [filters.overlays] The properties of overlays to be * applied to the input video. These could be audio, image or video overlays. - * @member {array} [codecs] The list of codecs to be used when encoding the + * @property {array} [codecs] The list of codecs to be used when encoding the * input video. - * @member {array} [formats] The list of outputs to be produced by the + * @property {array} [formats] The list of outputs to be produced by the * encoder. */ constructor() { diff --git a/lib/services/mediaServicesManagement/lib/models/storageAccount.js b/lib/services/mediaServicesManagement/lib/models/storageAccount.js index 3e97d302ea..27efd8fc80 100644 --- a/lib/services/mediaServicesManagement/lib/models/storageAccount.js +++ b/lib/services/mediaServicesManagement/lib/models/storageAccount.js @@ -17,12 +17,12 @@ class StorageAccount { /** * Create a StorageAccount. - * @member {string} [id] The ID of the storage account resource. Media + * @property {string} [id] The ID of the storage account resource. Media * Services relies on tables and queues as well as blobs, so the primary * storage account must be a Standard Storage account (either * Microsoft.ClassicStorage or Microsoft.Storage). Blob only storage accounts * can be added as secondary storage accounts. - * @member {string} type The type of the storage account. Possible values + * @property {string} type The type of the storage account. Possible values * include: 'Primary', 'Secondary' */ constructor() { @@ -53,8 +53,7 @@ class StorageAccount { required: true, serializedName: 'type', type: { - name: 'Enum', - allowedValues: [ 'Primary', 'Secondary' ] + name: 'String' } } } diff --git a/lib/services/mediaServicesManagement/lib/models/storageEncryptedAssetDecryptionData.js b/lib/services/mediaServicesManagement/lib/models/storageEncryptedAssetDecryptionData.js index 83ef8bfe00..ce3ca60f79 100644 --- a/lib/services/mediaServicesManagement/lib/models/storageEncryptedAssetDecryptionData.js +++ b/lib/services/mediaServicesManagement/lib/models/storageEncryptedAssetDecryptionData.js @@ -17,8 +17,8 @@ class StorageEncryptedAssetDecryptionData { /** * Create a StorageEncryptedAssetDecryptionData. - * @member {buffer} [key] The Asset File storage encryption key. - * @member {array} [assetFileEncryptionMetadata] Asset File encryption + * @property {buffer} [key] The Asset File storage encryption key. + * @property {array} [assetFileEncryptionMetadata] Asset File encryption * metadata. */ constructor() { diff --git a/lib/services/mediaServicesManagement/lib/models/streamingEndpoint.js b/lib/services/mediaServicesManagement/lib/models/streamingEndpoint.js index 1ae859ff2a..6a8a58e3c0 100644 --- a/lib/services/mediaServicesManagement/lib/models/streamingEndpoint.js +++ b/lib/services/mediaServicesManagement/lib/models/streamingEndpoint.js @@ -20,42 +20,43 @@ const models = require('./index'); class StreamingEndpoint extends models['TrackedResource'] { /** * Create a StreamingEndpoint. - * @member {string} [description] The StreamingEndpoint description. - * @member {number} scaleUnits The number of scale units. Use the Scale + * @property {string} [description] The StreamingEndpoint description. + * @property {number} scaleUnits The number of scale units. Use the Scale * operation to adjust this value. - * @member {string} [availabilitySetName] The name of the AvailabilitySet + * @property {string} [availabilitySetName] The name of the AvailabilitySet * used with this StreamingEndpoint for high availability streaming. This * value can only be set at creation time. - * @member {object} [accessControl] The access control definition of the + * @property {object} [accessControl] The access control definition of the * StreamingEndpoint. - * @member {object} [accessControl.akamai] The access control of Akamai - * @member {array} + * @property {object} [accessControl.akamai] The access control of Akamai + * @property {array} * [accessControl.akamai.akamaiSignatureHeaderAuthenticationKeyList] * authentication key list - * @member {object} [accessControl.ip] The IP access control of the + * @property {object} [accessControl.ip] The IP access control of the * StreamingEndpoint. - * @member {array} [accessControl.ip.allow] The IP allow list. - * @member {number} [maxCacheAge] Max cache age - * @member {array} [customHostNames] The custom host names of the + * @property {array} [accessControl.ip.allow] The IP allow list. + * @property {number} [maxCacheAge] Max cache age + * @property {array} [customHostNames] The custom host names of the * StreamingEndpoint - * @member {string} [hostName] The StreamingEndpoint host name. - * @member {boolean} [cdnEnabled] The CDN enabled flag. - * @member {string} [cdnProvider] The CDN provider name. - * @member {string} [cdnProfile] The CDN profile name. - * @member {string} [provisioningState] The provisioning state of the + * @property {string} [hostName] The StreamingEndpoint host name. + * @property {boolean} [cdnEnabled] The CDN enabled flag. + * @property {string} [cdnProvider] The CDN provider name. + * @property {string} [cdnProfile] The CDN profile name. + * @property {string} [provisioningState] The provisioning state of the * StreamingEndpoint. - * @member {string} [resourceState] The resource state of the + * @property {string} [resourceState] The resource state of the * StreamingEndpoint. Possible values include: 'Stopped', 'Starting', * 'Running', 'Stopping', 'Deleting', 'Scaling' - * @member {object} [crossSiteAccessPolicies] The StreamingEndpoint access + * @property {object} [crossSiteAccessPolicies] The StreamingEndpoint access * policies. - * @member {string} [crossSiteAccessPolicies.clientAccessPolicy] The content - * of clientaccesspolicy.xml used by Silverlight. - * @member {string} [crossSiteAccessPolicies.crossDomainPolicy] The content + * @property {string} [crossSiteAccessPolicies.clientAccessPolicy] The + * content of clientaccesspolicy.xml used by Silverlight. + * @property {string} [crossSiteAccessPolicies.crossDomainPolicy] The content * of crossdomain.xml used by Silverlight. - * @member {date} [freeTrialEndTime] The free trial expiration time. - * @member {date} [created] The exact time the StreamingEndpoint was created. - * @member {date} [lastModified] The exact time the StreamingEndpoint was + * @property {date} [freeTrialEndTime] The free trial expiration time. + * @property {date} [created] The exact time the StreamingEndpoint was + * created. + * @property {date} [lastModified] The exact time the StreamingEndpoint was * last modified. */ constructor() { diff --git a/lib/services/mediaServicesManagement/lib/models/streamingEndpointAccessControl.js b/lib/services/mediaServicesManagement/lib/models/streamingEndpointAccessControl.js index a9bbe59b50..dbfc786669 100644 --- a/lib/services/mediaServicesManagement/lib/models/streamingEndpointAccessControl.js +++ b/lib/services/mediaServicesManagement/lib/models/streamingEndpointAccessControl.js @@ -17,11 +17,11 @@ class StreamingEndpointAccessControl { /** * Create a StreamingEndpointAccessControl. - * @member {object} [akamai] The access control of Akamai - * @member {array} [akamai.akamaiSignatureHeaderAuthenticationKeyList] + * @property {object} [akamai] The access control of Akamai + * @property {array} [akamai.akamaiSignatureHeaderAuthenticationKeyList] * authentication key list - * @member {object} [ip] The IP access control of the StreamingEndpoint. - * @member {array} [ip.allow] The IP allow list. + * @property {object} [ip] The IP access control of the StreamingEndpoint. + * @property {array} [ip.allow] The IP allow list. */ constructor() { } diff --git a/lib/services/mediaServicesManagement/lib/models/streamingEndpointListResult.js b/lib/services/mediaServicesManagement/lib/models/streamingEndpointListResult.js index eaa9bfb83e..9bcfcc8897 100644 --- a/lib/services/mediaServicesManagement/lib/models/streamingEndpointListResult.js +++ b/lib/services/mediaServicesManagement/lib/models/streamingEndpointListResult.js @@ -17,8 +17,8 @@ class StreamingEndpointListResult extends Array { /** * Create a StreamingEndpointListResult. - * @member {number} [odatacount] The number of result. - * @member {string} [odatanextLink] Th link to the next set of results. Not + * @property {number} [odatacount] The number of result. + * @property {string} [odatanextLink] Th link to the next set of results. Not * empty if value contains incomplete list of StreamingEndpoints. */ constructor() { diff --git a/lib/services/mediaServicesManagement/lib/models/streamingEntityScaleUnit.js b/lib/services/mediaServicesManagement/lib/models/streamingEntityScaleUnit.js index 55ae36f932..60006f8b5f 100644 --- a/lib/services/mediaServicesManagement/lib/models/streamingEntityScaleUnit.js +++ b/lib/services/mediaServicesManagement/lib/models/streamingEntityScaleUnit.js @@ -17,7 +17,7 @@ class StreamingEntityScaleUnit { /** * Create a StreamingEntityScaleUnit. - * @member {number} [scaleUnit] The scale unit number of the + * @property {number} [scaleUnit] The scale unit number of the * StreamingEndpoint. */ constructor() { diff --git a/lib/services/mediaServicesManagement/lib/models/streamingLocator.js b/lib/services/mediaServicesManagement/lib/models/streamingLocator.js index d569d320f0..2b3ceefa50 100644 --- a/lib/services/mediaServicesManagement/lib/models/streamingLocator.js +++ b/lib/services/mediaServicesManagement/lib/models/streamingLocator.js @@ -20,24 +20,24 @@ const models = require('./index'); class StreamingLocator extends models['ProxyResource'] { /** * Create a StreamingLocator. - * @member {string} assetName Asset Name - * @member {date} [created] The creation time of the Streaming Locator. - * @member {date} [startTime] The start time of the Streaming Locator. - * @member {date} [endTime] The end time of the Streaming Locator. - * @member {uuid} [streamingLocatorId] The StreamingLocatorId of the + * @property {string} assetName Asset Name + * @property {date} [created] The creation time of the Streaming Locator. + * @property {date} [startTime] The start time of the Streaming Locator. + * @property {date} [endTime] The end time of the Streaming Locator. + * @property {uuid} [streamingLocatorId] The StreamingLocatorId of the * Streaming Locator. - * @member {string} streamingPolicyName Name of the Streaming Policy used by - * this Streaming Locator. Either specify the name of Streaming Policy you + * @property {string} streamingPolicyName Name of the Streaming Policy used + * by this Streaming Locator. Either specify the name of Streaming Policy you * created or use one of the predefined Streaming Policies. The predefined * Streaming Policies available are: 'Predefined_DownloadOnly', * 'Predefined_ClearStreamingOnly', 'Predefined_DownloadAndClearStreaming', * 'Predefined_ClearKey', 'Predefined_MultiDrmCencStreaming' and * 'Predefined_MultiDrmStreaming' - * @member {string} [defaultContentKeyPolicyName] Name of the default + * @property {string} [defaultContentKeyPolicyName] Name of the default * ContentKeyPolicy used by this Streaming Locator. - * @member {array} [contentKeys] The ContentKeys used by this Streaming + * @property {array} [contentKeys] The ContentKeys used by this Streaming * Locator. - * @member {string} [alternativeMediaId] Alternative Media ID of this + * @property {string} [alternativeMediaId] Alternative Media ID of this * Streaming Locator */ constructor() { diff --git a/lib/services/mediaServicesManagement/lib/models/streamingLocatorCollection.js b/lib/services/mediaServicesManagement/lib/models/streamingLocatorCollection.js index 0214398c2f..11425c4e63 100644 --- a/lib/services/mediaServicesManagement/lib/models/streamingLocatorCollection.js +++ b/lib/services/mediaServicesManagement/lib/models/streamingLocatorCollection.js @@ -16,8 +16,9 @@ class StreamingLocatorCollection extends Array { /** * Create a StreamingLocatorCollection. - * @member {string} [odatanextLink] A link to the next page of the collection - * (when the collection contains too many results to return in one response). + * @property {string} [odatanextLink] A link to the next page of the + * collection (when the collection contains too many results to return in one + * response). */ constructor() { super(); diff --git a/lib/services/mediaServicesManagement/lib/models/streamingLocatorContentKey.js b/lib/services/mediaServicesManagement/lib/models/streamingLocatorContentKey.js index 7efbc44059..8754058aa1 100644 --- a/lib/services/mediaServicesManagement/lib/models/streamingLocatorContentKey.js +++ b/lib/services/mediaServicesManagement/lib/models/streamingLocatorContentKey.js @@ -17,15 +17,15 @@ class StreamingLocatorContentKey { /** * Create a StreamingLocatorContentKey. - * @member {uuid} id ID of Content Key - * @member {string} [type] Encryption type of Content Key. Possible values + * @property {uuid} id ID of Content Key + * @property {string} [type] Encryption type of Content Key. Possible values * include: 'CommonEncryptionCenc', 'CommonEncryptionCbcs', * 'EnvelopeEncryption' - * @member {string} [labelReferenceInStreamingPolicy] Label of Content Key as - * specified in the Streaming Policy - * @member {string} [value] Value of of Content Key - * @member {string} [policyName] ContentKeyPolicy used by Content Key - * @member {array} [tracks] Tracks which use this Content Key + * @property {string} [labelReferenceInStreamingPolicy] Label of Content Key + * as specified in the Streaming Policy + * @property {string} [value] Value of Content Key + * @property {string} [policyName] ContentKeyPolicy used by Content Key + * @property {array} [tracks] Tracks which use this Content Key */ constructor() { } @@ -57,8 +57,7 @@ class StreamingLocatorContentKey { readOnly: true, serializedName: 'type', type: { - name: 'Enum', - allowedValues: [ 'CommonEncryptionCenc', 'CommonEncryptionCbcs', 'EnvelopeEncryption' ] + name: 'String' } }, labelReferenceInStreamingPolicy: { diff --git a/lib/services/mediaServicesManagement/lib/models/streamingPath.js b/lib/services/mediaServicesManagement/lib/models/streamingPath.js index 2736addbe7..8d4802455f 100644 --- a/lib/services/mediaServicesManagement/lib/models/streamingPath.js +++ b/lib/services/mediaServicesManagement/lib/models/streamingPath.js @@ -17,12 +17,12 @@ class StreamingPath { /** * Create a StreamingPath. - * @member {string} streamingProtocol Streaming protocol. Possible values + * @property {string} streamingProtocol Streaming protocol. Possible values * include: 'Hls', 'Dash', 'SmoothStreaming', 'Download' - * @member {string} encryptionScheme Encryption scheme. Possible values + * @property {string} encryptionScheme Encryption scheme. Possible values * include: 'NoEncryption', 'EnvelopeEncryption', 'CommonEncryptionCenc', * 'CommonEncryptionCbcs' - * @member {array} [paths] Streaming paths for each protocol and + * @property {array} [paths] Streaming paths for each protocol and * encryptionScheme pair */ constructor() { @@ -46,16 +46,14 @@ class StreamingPath { required: true, serializedName: 'streamingProtocol', type: { - name: 'Enum', - allowedValues: [ 'Hls', 'Dash', 'SmoothStreaming', 'Download' ] + name: 'String' } }, encryptionScheme: { required: true, serializedName: 'encryptionScheme', type: { - name: 'Enum', - allowedValues: [ 'NoEncryption', 'EnvelopeEncryption', 'CommonEncryptionCenc', 'CommonEncryptionCbcs' ] + name: 'String' } }, paths: { diff --git a/lib/services/mediaServicesManagement/lib/models/streamingPolicy.js b/lib/services/mediaServicesManagement/lib/models/streamingPolicy.js index 61e49465a7..d71de06596 100644 --- a/lib/services/mediaServicesManagement/lib/models/streamingPolicy.js +++ b/lib/services/mediaServicesManagement/lib/models/streamingPolicy.js @@ -20,139 +20,144 @@ const models = require('./index'); class StreamingPolicy extends models['ProxyResource'] { /** * Create a StreamingPolicy. - * @member {date} [created] Creation time of Streaming Policy - * @member {string} [defaultContentKeyPolicyName] Default ContentKey used by - * current Streaming Policy - * @member {object} [envelopeEncryption] Configuration of EnvelopeEncryption - * @member {object} [envelopeEncryption.enabledProtocols] Representing + * @property {date} [created] Creation time of Streaming Policy + * @property {string} [defaultContentKeyPolicyName] Default ContentKey used + * by current Streaming Policy + * @property {object} [envelopeEncryption] Configuration of + * EnvelopeEncryption + * @property {object} [envelopeEncryption.enabledProtocols] Representing * supported protocols - * @member {boolean} [envelopeEncryption.enabledProtocols.download] Enable + * @property {boolean} [envelopeEncryption.enabledProtocols.download] Enable * Download protocol or not - * @member {boolean} [envelopeEncryption.enabledProtocols.dash] Enable DASH + * @property {boolean} [envelopeEncryption.enabledProtocols.dash] Enable DASH * protocol or not - * @member {boolean} [envelopeEncryption.enabledProtocols.hls] Enable HLS + * @property {boolean} [envelopeEncryption.enabledProtocols.hls] Enable HLS * protocol or not - * @member {boolean} [envelopeEncryption.enabledProtocols.smoothStreaming] + * @property {boolean} [envelopeEncryption.enabledProtocols.smoothStreaming] * Enable SmoothStreaming protocol or not - * @member {array} [envelopeEncryption.clearTracks] Representing which tracks - * should not be encrypted - * @member {object} [envelopeEncryption.contentKeys] Representing default + * @property {array} [envelopeEncryption.clearTracks] Representing which + * tracks should not be encrypted + * @property {object} [envelopeEncryption.contentKeys] Representing default * content key for each encryption scheme and separate content keys for * specific tracks - * @member {object} [envelopeEncryption.contentKeys.defaultKey] Default + * @property {object} [envelopeEncryption.contentKeys.defaultKey] Default * content key for an encryption scheme - * @member {string} [envelopeEncryption.contentKeys.defaultKey.label] Label + * @property {string} [envelopeEncryption.contentKeys.defaultKey.label] Label * can be used to specify Content Key when creating a Streaming Locator - * @member {string} [envelopeEncryption.contentKeys.defaultKey.policyName] + * @property {string} [envelopeEncryption.contentKeys.defaultKey.policyName] * Policy used by Default Key - * @member {array} [envelopeEncryption.contentKeys.keyToTrackMappings] + * @property {array} [envelopeEncryption.contentKeys.keyToTrackMappings] * Representing tracks needs separate content key - * @member {string} [envelopeEncryption.customKeyAcquisitionUrlTemplate] - * KeyAcquistionUrlTemplate is used to point to user specified service to + * @property {string} [envelopeEncryption.customKeyAcquisitionUrlTemplate] + * KeyAcquisitionUrlTemplate is used to point to user specified service to * delivery content keys - * @member {object} [commonEncryptionCenc] Configuration of + * @property {object} [commonEncryptionCenc] Configuration of * CommonEncryptionCenc - * @member {object} [commonEncryptionCenc.enabledProtocols] Representing + * @property {object} [commonEncryptionCenc.enabledProtocols] Representing * supported protocols - * @member {boolean} [commonEncryptionCenc.enabledProtocols.download] Enable - * Download protocol or not - * @member {boolean} [commonEncryptionCenc.enabledProtocols.dash] Enable DASH + * @property {boolean} [commonEncryptionCenc.enabledProtocols.download] + * Enable Download protocol or not + * @property {boolean} [commonEncryptionCenc.enabledProtocols.dash] Enable + * DASH protocol or not + * @property {boolean} [commonEncryptionCenc.enabledProtocols.hls] Enable HLS * protocol or not - * @member {boolean} [commonEncryptionCenc.enabledProtocols.hls] Enable HLS - * protocol or not - * @member {boolean} [commonEncryptionCenc.enabledProtocols.smoothStreaming] - * Enable SmoothStreaming protocol or not - * @member {array} [commonEncryptionCenc.clearTracks] Representing which + * @property {boolean} + * [commonEncryptionCenc.enabledProtocols.smoothStreaming] Enable + * SmoothStreaming protocol or not + * @property {array} [commonEncryptionCenc.clearTracks] Representing which * tracks should not be encrypted - * @member {object} [commonEncryptionCenc.contentKeys] Representing default + * @property {object} [commonEncryptionCenc.contentKeys] Representing default * content key for each encryption scheme and separate content keys for * specific tracks - * @member {object} [commonEncryptionCenc.contentKeys.defaultKey] Default + * @property {object} [commonEncryptionCenc.contentKeys.defaultKey] Default * content key for an encryption scheme - * @member {string} [commonEncryptionCenc.contentKeys.defaultKey.label] Label - * can be used to specify Content Key when creating a Streaming Locator - * @member {string} [commonEncryptionCenc.contentKeys.defaultKey.policyName] - * Policy used by Default Key - * @member {array} [commonEncryptionCenc.contentKeys.keyToTrackMappings] + * @property {string} [commonEncryptionCenc.contentKeys.defaultKey.label] + * Label can be used to specify Content Key when creating a Streaming Locator + * @property {string} + * [commonEncryptionCenc.contentKeys.defaultKey.policyName] Policy used by + * Default Key + * @property {array} [commonEncryptionCenc.contentKeys.keyToTrackMappings] * Representing tracks needs separate content key - * @member {object} [commonEncryptionCenc.drm] Configuration of DRMs for + * @property {object} [commonEncryptionCenc.drm] Configuration of DRMs for * CommonEncryptionCenc encryption scheme - * @member {object} [commonEncryptionCenc.drm.playReady] PlayReady + * @property {object} [commonEncryptionCenc.drm.playReady] PlayReady * configurations - * @member {string} + * @property {string} * [commonEncryptionCenc.drm.playReady.customLicenseAcquisitionUrlTemplate] * The template for a customer service to deliver keys to end users. Not * needed when using Azure Media Services for issuing keys. - * @member {string} + * @property {string} * [commonEncryptionCenc.drm.playReady.playReadyCustomAttributes] Custom * attributes for PlayReady - * @member {object} [commonEncryptionCenc.drm.widevine] Widevine + * @property {object} [commonEncryptionCenc.drm.widevine] Widevine * configurations - * @member {string} + * @property {string} * [commonEncryptionCenc.drm.widevine.customLicenseAcquisitionUrlTemplate] * The template for a customer service to deliver keys to end users. Not * needed when using Azure Media Services for issuing keys. - * @member {object} [commonEncryptionCbcs] Configuration of + * @property {object} [commonEncryptionCbcs] Configuration of * CommonEncryptionCbcs - * @member {object} [commonEncryptionCbcs.enabledProtocols] Representing + * @property {object} [commonEncryptionCbcs.enabledProtocols] Representing * supported protocols - * @member {boolean} [commonEncryptionCbcs.enabledProtocols.download] Enable - * Download protocol or not - * @member {boolean} [commonEncryptionCbcs.enabledProtocols.dash] Enable DASH - * protocol or not - * @member {boolean} [commonEncryptionCbcs.enabledProtocols.hls] Enable HLS + * @property {boolean} [commonEncryptionCbcs.enabledProtocols.download] + * Enable Download protocol or not + * @property {boolean} [commonEncryptionCbcs.enabledProtocols.dash] Enable + * DASH protocol or not + * @property {boolean} [commonEncryptionCbcs.enabledProtocols.hls] Enable HLS * protocol or not - * @member {boolean} [commonEncryptionCbcs.enabledProtocols.smoothStreaming] - * Enable SmoothStreaming protocol or not - * @member {array} [commonEncryptionCbcs.clearTracks] Representing which + * @property {boolean} + * [commonEncryptionCbcs.enabledProtocols.smoothStreaming] Enable + * SmoothStreaming protocol or not + * @property {array} [commonEncryptionCbcs.clearTracks] Representing which * tracks should not be encrypted - * @member {object} [commonEncryptionCbcs.contentKeys] Representing default + * @property {object} [commonEncryptionCbcs.contentKeys] Representing default * content key for each encryption scheme and separate content keys for * specific tracks - * @member {object} [commonEncryptionCbcs.contentKeys.defaultKey] Default + * @property {object} [commonEncryptionCbcs.contentKeys.defaultKey] Default * content key for an encryption scheme - * @member {string} [commonEncryptionCbcs.contentKeys.defaultKey.label] Label - * can be used to specify Content Key when creating a Streaming Locator - * @member {string} [commonEncryptionCbcs.contentKeys.defaultKey.policyName] - * Policy used by Default Key - * @member {array} [commonEncryptionCbcs.contentKeys.keyToTrackMappings] + * @property {string} [commonEncryptionCbcs.contentKeys.defaultKey.label] + * Label can be used to specify Content Key when creating a Streaming Locator + * @property {string} + * [commonEncryptionCbcs.contentKeys.defaultKey.policyName] Policy used by + * Default Key + * @property {array} [commonEncryptionCbcs.contentKeys.keyToTrackMappings] * Representing tracks needs separate content key - * @member {object} [commonEncryptionCbcs.drm] Configuration of DRMs for + * @property {object} [commonEncryptionCbcs.drm] Configuration of DRMs for * current encryption scheme - * @member {object} [commonEncryptionCbcs.drm.fairPlay] FairPlay + * @property {object} [commonEncryptionCbcs.drm.fairPlay] FairPlay * configurations - * @member {string} + * @property {string} * [commonEncryptionCbcs.drm.fairPlay.customLicenseAcquisitionUrlTemplate] * The template for a customer service to deliver keys to end users. Not * needed when using Azure Media Services for issuing keys. - * @member {boolean} + * @property {boolean} * [commonEncryptionCbcs.drm.fairPlay.allowPersistentLicense] All license to * be persistent or not - * @member {object} [commonEncryptionCbcs.drm.playReady] PlayReady + * @property {object} [commonEncryptionCbcs.drm.playReady] PlayReady * configurations - * @member {string} + * @property {string} * [commonEncryptionCbcs.drm.playReady.customLicenseAcquisitionUrlTemplate] * The template for a customer service to deliver keys to end users. Not * needed when using Azure Media Services for issuing keys. - * @member {string} + * @property {string} * [commonEncryptionCbcs.drm.playReady.playReadyCustomAttributes] Custom * attributes for PlayReady - * @member {object} [commonEncryptionCbcs.drm.widevine] Widevine + * @property {object} [commonEncryptionCbcs.drm.widevine] Widevine * configurations - * @member {string} + * @property {string} * [commonEncryptionCbcs.drm.widevine.customLicenseAcquisitionUrlTemplate] * The template for a customer service to deliver keys to end users. Not * needed when using Azure Media Services for issuing keys. - * @member {object} [noEncryption] Configurations of NoEncryption - * @member {object} [noEncryption.enabledProtocols] Representing supported + * @property {object} [noEncryption] Configurations of NoEncryption + * @property {object} [noEncryption.enabledProtocols] Representing supported * protocols - * @member {boolean} [noEncryption.enabledProtocols.download] Enable Download + * @property {boolean} [noEncryption.enabledProtocols.download] Enable + * Download protocol or not + * @property {boolean} [noEncryption.enabledProtocols.dash] Enable DASH * protocol or not - * @member {boolean} [noEncryption.enabledProtocols.dash] Enable DASH + * @property {boolean} [noEncryption.enabledProtocols.hls] Enable HLS * protocol or not - * @member {boolean} [noEncryption.enabledProtocols.hls] Enable HLS protocol - * or not - * @member {boolean} [noEncryption.enabledProtocols.smoothStreaming] Enable + * @property {boolean} [noEncryption.enabledProtocols.smoothStreaming] Enable * SmoothStreaming protocol or not */ constructor() { diff --git a/lib/services/mediaServicesManagement/lib/models/streamingPolicyCollection.js b/lib/services/mediaServicesManagement/lib/models/streamingPolicyCollection.js index a2e8dc0eaf..c674d52980 100644 --- a/lib/services/mediaServicesManagement/lib/models/streamingPolicyCollection.js +++ b/lib/services/mediaServicesManagement/lib/models/streamingPolicyCollection.js @@ -16,8 +16,9 @@ class StreamingPolicyCollection extends Array { /** * Create a StreamingPolicyCollection. - * @member {string} [odatanextLink] A link to the next page of the collection - * (when the collection contains too many results to return in one response). + * @property {string} [odatanextLink] A link to the next page of the + * collection (when the collection contains too many results to return in one + * response). */ constructor() { super(); diff --git a/lib/services/mediaServicesManagement/lib/models/streamingPolicyContentKey.js b/lib/services/mediaServicesManagement/lib/models/streamingPolicyContentKey.js index d8b421f105..cdd4a4f333 100644 --- a/lib/services/mediaServicesManagement/lib/models/streamingPolicyContentKey.js +++ b/lib/services/mediaServicesManagement/lib/models/streamingPolicyContentKey.js @@ -17,10 +17,10 @@ class StreamingPolicyContentKey { /** * Create a StreamingPolicyContentKey. - * @member {string} [label] Label can be used to specify Content Key when + * @property {string} [label] Label can be used to specify Content Key when * creating a Streaming Locator - * @member {string} [policyName] Policy used by Content Key - * @member {array} [tracks] Tracks which use this content key + * @property {string} [policyName] Policy used by Content Key + * @property {array} [tracks] Tracks which use this content key */ constructor() { } diff --git a/lib/services/mediaServicesManagement/lib/models/streamingPolicyContentKeys.js b/lib/services/mediaServicesManagement/lib/models/streamingPolicyContentKeys.js index abe6613eeb..27abda1235 100644 --- a/lib/services/mediaServicesManagement/lib/models/streamingPolicyContentKeys.js +++ b/lib/services/mediaServicesManagement/lib/models/streamingPolicyContentKeys.js @@ -17,11 +17,12 @@ class StreamingPolicyContentKeys { /** * Create a StreamingPolicyContentKeys. - * @member {object} [defaultKey] Default content key for an encryption scheme - * @member {string} [defaultKey.label] Label can be used to specify Content + * @property {object} [defaultKey] Default content key for an encryption + * scheme + * @property {string} [defaultKey.label] Label can be used to specify Content * Key when creating a Streaming Locator - * @member {string} [defaultKey.policyName] Policy used by Default Key - * @member {array} [keyToTrackMappings] Representing tracks needs separate + * @property {string} [defaultKey.policyName] Policy used by Default Key + * @property {array} [keyToTrackMappings] Representing tracks needs separate * content key */ constructor() { diff --git a/lib/services/mediaServicesManagement/lib/models/streamingPolicyFairPlayConfiguration.js b/lib/services/mediaServicesManagement/lib/models/streamingPolicyFairPlayConfiguration.js index 41f494cf0b..58af3d1f15 100644 --- a/lib/services/mediaServicesManagement/lib/models/streamingPolicyFairPlayConfiguration.js +++ b/lib/services/mediaServicesManagement/lib/models/streamingPolicyFairPlayConfiguration.js @@ -17,10 +17,10 @@ class StreamingPolicyFairPlayConfiguration { /** * Create a StreamingPolicyFairPlayConfiguration. - * @member {string} [customLicenseAcquisitionUrlTemplate] The template for a - * customer service to deliver keys to end users. Not needed when using + * @property {string} [customLicenseAcquisitionUrlTemplate] The template for + * a customer service to deliver keys to end users. Not needed when using * Azure Media Services for issuing keys. - * @member {boolean} allowPersistentLicense All license to be persistent or + * @property {boolean} allowPersistentLicense All license to be persistent or * not */ constructor() { diff --git a/lib/services/mediaServicesManagement/lib/models/streamingPolicyPlayReadyConfiguration.js b/lib/services/mediaServicesManagement/lib/models/streamingPolicyPlayReadyConfiguration.js index e380cebb4f..a498af5636 100644 --- a/lib/services/mediaServicesManagement/lib/models/streamingPolicyPlayReadyConfiguration.js +++ b/lib/services/mediaServicesManagement/lib/models/streamingPolicyPlayReadyConfiguration.js @@ -17,10 +17,10 @@ class StreamingPolicyPlayReadyConfiguration { /** * Create a StreamingPolicyPlayReadyConfiguration. - * @member {string} [customLicenseAcquisitionUrlTemplate] The template for a - * customer service to deliver keys to end users. Not needed when using + * @property {string} [customLicenseAcquisitionUrlTemplate] The template for + * a customer service to deliver keys to end users. Not needed when using * Azure Media Services for issuing keys. - * @member {string} [playReadyCustomAttributes] Custom attributes for + * @property {string} [playReadyCustomAttributes] Custom attributes for * PlayReady */ constructor() { diff --git a/lib/services/mediaServicesManagement/lib/models/streamingPolicyWidevineConfiguration.js b/lib/services/mediaServicesManagement/lib/models/streamingPolicyWidevineConfiguration.js index a9f039ab78..efda190227 100644 --- a/lib/services/mediaServicesManagement/lib/models/streamingPolicyWidevineConfiguration.js +++ b/lib/services/mediaServicesManagement/lib/models/streamingPolicyWidevineConfiguration.js @@ -17,8 +17,8 @@ class StreamingPolicyWidevineConfiguration { /** * Create a StreamingPolicyWidevineConfiguration. - * @member {string} [customLicenseAcquisitionUrlTemplate] The template for a - * customer service to deliver keys to end users. Not needed when using + * @property {string} [customLicenseAcquisitionUrlTemplate] The template for + * a customer service to deliver keys to end users. Not needed when using * Azure Media Services for issuing keys. */ constructor() { diff --git a/lib/services/mediaServicesManagement/lib/models/subscriptionMediaService.js b/lib/services/mediaServicesManagement/lib/models/subscriptionMediaService.js index f2da82226f..5b1ba7ee55 100644 --- a/lib/services/mediaServicesManagement/lib/models/subscriptionMediaService.js +++ b/lib/services/mediaServicesManagement/lib/models/subscriptionMediaService.js @@ -20,8 +20,9 @@ const models = require('./index'); class SubscriptionMediaService extends models['TrackedResource'] { /** * Create a SubscriptionMediaService. - * @member {uuid} [mediaServiceId] The Media Services account ID. - * @member {array} [storageAccounts] The storage accounts for this resource. + * @property {uuid} [mediaServiceId] The Media Services account ID. + * @property {array} [storageAccounts] The storage accounts for this + * resource. */ constructor() { super(); diff --git a/lib/services/mediaServicesManagement/lib/models/subscriptionMediaServiceCollection.js b/lib/services/mediaServicesManagement/lib/models/subscriptionMediaServiceCollection.js index 18481ae09f..acda5c8d4e 100644 --- a/lib/services/mediaServicesManagement/lib/models/subscriptionMediaServiceCollection.js +++ b/lib/services/mediaServicesManagement/lib/models/subscriptionMediaServiceCollection.js @@ -16,8 +16,9 @@ class SubscriptionMediaServiceCollection extends Array { /** * Create a SubscriptionMediaServiceCollection. - * @member {string} [odatanextLink] A link to the next page of the collection - * (when the collection contains too many results to return in one response). + * @property {string} [odatanextLink] A link to the next page of the + * collection (when the collection contains too many results to return in one + * response). */ constructor() { super(); diff --git a/lib/services/mediaServicesManagement/lib/models/syncStorageKeysInput.js b/lib/services/mediaServicesManagement/lib/models/syncStorageKeysInput.js index 41d85897f9..00dcfc4ad6 100644 --- a/lib/services/mediaServicesManagement/lib/models/syncStorageKeysInput.js +++ b/lib/services/mediaServicesManagement/lib/models/syncStorageKeysInput.js @@ -17,7 +17,7 @@ class SyncStorageKeysInput { /** * Create a SyncStorageKeysInput. - * @member {string} [id] The ID of the storage account resource. + * @property {string} [id] The ID of the storage account resource. */ constructor() { } diff --git a/lib/services/mediaServicesManagement/lib/models/trackPropertyCondition.js b/lib/services/mediaServicesManagement/lib/models/trackPropertyCondition.js index 8e235c44fb..0cdfc019a1 100644 --- a/lib/services/mediaServicesManagement/lib/models/trackPropertyCondition.js +++ b/lib/services/mediaServicesManagement/lib/models/trackPropertyCondition.js @@ -17,11 +17,11 @@ class TrackPropertyCondition { /** * Create a TrackPropertyCondition. - * @member {string} property Track property type. Possible values include: + * @property {string} property Track property type. Possible values include: * 'Unknown', 'FourCC' - * @member {string} operation Track property condition operation. Possible + * @property {string} operation Track property condition operation. Possible * values include: 'Unknown', 'Equal' - * @member {string} [value] Track property value + * @property {string} [value] Track property value */ constructor() { } @@ -44,16 +44,14 @@ class TrackPropertyCondition { required: true, serializedName: 'property', type: { - name: 'Enum', - allowedValues: [ 'Unknown', 'FourCC' ] + name: 'String' } }, operation: { required: true, serializedName: 'operation', type: { - name: 'Enum', - allowedValues: [ 'Unknown', 'Equal' ] + name: 'String' } }, value: { diff --git a/lib/services/mediaServicesManagement/lib/models/trackSelection.js b/lib/services/mediaServicesManagement/lib/models/trackSelection.js index 4b2642651f..004c216108 100644 --- a/lib/services/mediaServicesManagement/lib/models/trackSelection.js +++ b/lib/services/mediaServicesManagement/lib/models/trackSelection.js @@ -17,7 +17,7 @@ class TrackSelection { /** * Create a TrackSelection. - * @member {array} [trackSelections] TrackSelections is a track property + * @property {array} [trackSelections] TrackSelections is a track property * condition list which can specify track(s) */ constructor() { diff --git a/lib/services/mediaServicesManagement/lib/models/trackedResource.js b/lib/services/mediaServicesManagement/lib/models/trackedResource.js index ae22120642..73bdc6e949 100644 --- a/lib/services/mediaServicesManagement/lib/models/trackedResource.js +++ b/lib/services/mediaServicesManagement/lib/models/trackedResource.js @@ -20,8 +20,8 @@ const models = require('./index'); class TrackedResource extends models['Resource'] { /** * Create a TrackedResource. - * @member {object} [tags] Resource tags. - * @member {string} [location] The Azure Region of the resource. + * @property {object} [tags] Resource tags. + * @property {string} [location] The Azure Region of the resource. */ constructor() { super(); diff --git a/lib/services/mediaServicesManagement/lib/models/transform.js b/lib/services/mediaServicesManagement/lib/models/transform.js index 2f88fc5ea6..9f97e71c03 100644 --- a/lib/services/mediaServicesManagement/lib/models/transform.js +++ b/lib/services/mediaServicesManagement/lib/models/transform.js @@ -23,14 +23,14 @@ const models = require('./index'); class Transform extends models['ProxyResource'] { /** * Create a Transform. - * @member {date} [created] The UTC date and time when the Transform was + * @property {date} [created] The UTC date and time when the Transform was * created, in 'YYYY-MM-DDThh:mm:ssZ' format. - * @member {string} [description] An optional verbose description of the + * @property {string} [description] An optional verbose description of the * Transform. - * @member {date} [lastModified] The UTC date and time when the Transform was - * last updated, in 'YYYY-MM-DDThh:mm:ssZ' format. - * @member {array} outputs An array of one or more TransformOutputs that the - * Transform should generate. + * @property {date} [lastModified] The UTC date and time when the Transform + * was last updated, in 'YYYY-MM-DDThh:mm:ssZ' format. + * @property {array} outputs An array of one or more TransformOutputs that + * the Transform should generate. */ constructor() { super(); diff --git a/lib/services/mediaServicesManagement/lib/models/transformCollection.js b/lib/services/mediaServicesManagement/lib/models/transformCollection.js index 2fadeaafc2..c9fd777c36 100644 --- a/lib/services/mediaServicesManagement/lib/models/transformCollection.js +++ b/lib/services/mediaServicesManagement/lib/models/transformCollection.js @@ -16,8 +16,9 @@ class TransformCollection extends Array { /** * Create a TransformCollection. - * @member {string} [odatanextLink] A link to the next page of the collection - * (when the collection contains too many results to return in one response). + * @property {string} [odatanextLink] A link to the next page of the + * collection (when the collection contains too many results to return in one + * response). */ constructor() { super(); diff --git a/lib/services/mediaServicesManagement/lib/models/transformOutput.js b/lib/services/mediaServicesManagement/lib/models/transformOutput.js index 98293e6395..41c8aeb61e 100644 --- a/lib/services/mediaServicesManagement/lib/models/transformOutput.js +++ b/lib/services/mediaServicesManagement/lib/models/transformOutput.js @@ -18,20 +18,20 @@ class TransformOutput { /** * Create a TransformOutput. - * @member {string} [onError] A Transform can define more than one outputs. + * @property {string} [onError] A Transform can define more than one outputs. * This property defines what the service should do when one output fails - * either continue to produce other outputs, or, stop the other outputs. The * overall Job state will not reflect failures of outputs that are specified * with 'ContinueJob'. The default is 'StopProcessingJob'. Possible values * include: 'StopProcessingJob', 'ContinueJob' - * @member {string} [relativePriority] Sets the relative priority of the + * @property {string} [relativePriority] Sets the relative priority of the * TransformOutputs within a Transform. This sets the priority that the * service uses for processing TransformOutputs. The default priority is * Normal. Possible values include: 'Low', 'Normal', 'High' - * @member {object} preset Preset that describes the operations that will be - * used to modify, transcode, or extract insights from the source file to + * @property {object} preset Preset that describes the operations that will + * be used to modify, transcode, or extract insights from the source file to * generate the output. - * @member {string} [preset.odatatype] Polymorphic Discriminator + * @property {string} [preset.odatatype] Polymorphic Discriminator */ constructor() { } @@ -54,16 +54,14 @@ class TransformOutput { required: false, serializedName: 'onError', type: { - name: 'Enum', - allowedValues: [ 'StopProcessingJob', 'ContinueJob' ] + name: 'String' } }, relativePriority: { required: false, serializedName: 'relativePriority', type: { - name: 'Enum', - allowedValues: [ 'Low', 'Normal', 'High' ] + name: 'String' } }, preset: { diff --git a/lib/services/mediaServicesManagement/lib/models/video.js b/lib/services/mediaServicesManagement/lib/models/video.js index 27a5dc04e3..0778b24c4b 100644 --- a/lib/services/mediaServicesManagement/lib/models/video.js +++ b/lib/services/mediaServicesManagement/lib/models/video.js @@ -20,11 +20,11 @@ const models = require('./index'); class Video extends models['Codec'] { /** * Create a Video. - * @member {moment.duration} [keyFrameInterval] The distance between two key - * frames, thereby defining a group of pictures (GOP). The value should be a - * non-zero integer in the range [1, 30] seconds, specified in ISO 8601 + * @property {moment.duration} [keyFrameInterval] The distance between two + * key frames, thereby defining a group of pictures (GOP). The value should + * be a non-zero integer in the range [1, 30] seconds, specified in ISO 8601 * format. The default is 2 seconds (PT2S). - * @member {string} [stretchMode] The resizing mode - how the input video + * @property {string} [stretchMode] The resizing mode - how the input video * will be resized to fit the desired output resolution(s). Default is * AutoSize. Possible values include: 'None', 'AutoSize', 'AutoFit' */ @@ -77,8 +77,7 @@ class Video extends models['Codec'] { required: false, serializedName: 'stretchMode', type: { - name: 'Enum', - allowedValues: [ 'None', 'AutoSize', 'AutoFit' ] + name: 'String' } } } diff --git a/lib/services/mediaServicesManagement/lib/models/videoAnalyzerPreset.js b/lib/services/mediaServicesManagement/lib/models/videoAnalyzerPreset.js index 1b23021e94..dd576f990f 100644 --- a/lib/services/mediaServicesManagement/lib/models/videoAnalyzerPreset.js +++ b/lib/services/mediaServicesManagement/lib/models/videoAnalyzerPreset.js @@ -21,10 +21,10 @@ const models = require('./index'); class VideoAnalyzerPreset extends models['AudioAnalyzerPreset'] { /** * Create a VideoAnalyzerPreset. - * @member {string} [insightsToExtract] The type of insights to be extracted. - * If not set then based on the content the type will selected. If the - * content is audi only then only audio insights are extraced and if it is - * video only. Possible values include: 'AudioInsightsOnly', + * @property {string} [insightsToExtract] The type of insights to be + * extracted. If not set then based on the content the type will selected. + * If the content is audio only then only audio insights are extracted and if + * it is video only. Possible values include: 'AudioInsightsOnly', * 'VideoInsightsOnly', 'AllInsights' */ constructor() { @@ -69,8 +69,7 @@ class VideoAnalyzerPreset extends models['AudioAnalyzerPreset'] { required: false, serializedName: 'insightsToExtract', type: { - name: 'Enum', - allowedValues: [ 'AudioInsightsOnly', 'VideoInsightsOnly', 'AllInsights' ] + name: 'String' } } } diff --git a/lib/services/mediaServicesManagement/lib/models/videoLayer.js b/lib/services/mediaServicesManagement/lib/models/videoLayer.js index cc0e88751e..ff87247fbd 100644 --- a/lib/services/mediaServicesManagement/lib/models/videoLayer.js +++ b/lib/services/mediaServicesManagement/lib/models/videoLayer.js @@ -21,27 +21,27 @@ const models = require('./index'); class VideoLayer extends models['Layer'] { /** * Create a VideoLayer. - * @member {number} [bitrate] The average bitrate in bits per second at which - * to encode the input video when generating this layer. This is a required - * field. - * @member {number} [maxBitrate] The maximum bitrate (in bits per second), at - * which the VBV buffer should be assumed to refill. If not specified, + * @property {number} [bitrate] The average bitrate in bits per second at + * which to encode the input video when generating this layer. This is a + * required field. + * @property {number} [maxBitrate] The maximum bitrate (in bits per second), + * at which the VBV buffer should be assumed to refill. If not specified, * defaults to the same value as bitrate. - * @member {number} [bFrames] The number of B-frames to be used when encoding - * this layer. If not specified, the encoder chooses an appropriate number - * based on the video profile and level. - * @member {string} [frameRate] The frame rate (in frames per second) at + * @property {number} [bFrames] The number of B-frames to be used when + * encoding this layer. If not specified, the encoder chooses an appropriate + * number based on the video profile and level. + * @property {string} [frameRate] The frame rate (in frames per second) at * which to encode this layer. The value can be in the form of M/N where M * and N are integers (For example, 30000/1001), or in the form of a number * (For example, 30, or 29.97). The encoder enforces constraints on allowed * frame rates based on the profile and level. If it is not specified, the * encoder will use the same frame rate as the input video. - * @member {number} [slices] The number of slices to be used when encoding + * @property {number} [slices] The number of slices to be used when encoding * this layer. If not specified, default is zero, which means that encoder * will use a single slice for each frame. - * @member {boolean} [adaptiveBFrame] Whether or not adaptive B-frames are to - * be used when encoding this layer. If not specified, the encoder will turn - * it on whenever the video profile permits its use. + * @property {boolean} [adaptiveBFrame] Whether or not adaptive B-frames are + * to be used when encoding this layer. If not specified, the encoder will + * turn it on whenever the video profile permits its use. */ constructor() { super(); diff --git a/lib/services/mediaServicesManagement/lib/models/videoOverlay.js b/lib/services/mediaServicesManagement/lib/models/videoOverlay.js index 5c856ff78d..cf9903cbc3 100644 --- a/lib/services/mediaServicesManagement/lib/models/videoOverlay.js +++ b/lib/services/mediaServicesManagement/lib/models/videoOverlay.js @@ -20,34 +20,34 @@ const models = require('./index'); class VideoOverlay extends models['Overlay'] { /** * Create a VideoOverlay. - * @member {object} [position] The location in the input video where the + * @property {object} [position] The location in the input video where the * overlay is applied. - * @member {string} [position.left] The number of pixels from the + * @property {string} [position.left] The number of pixels from the * left-margin. This can be absolute pixel value (e.g 100), or relative to * the size of the video (For example, 50%). - * @member {string} [position.top] The number of pixels from the top-margin. - * This can be absolute pixel value (e.g 100), or relative to the size of the - * video (For example, 50%). - * @member {string} [position.width] The width of the rectangular region in - * pixels. This can be absolute pixel value (e.g 100), or relative to the + * @property {string} [position.top] The number of pixels from the + * top-margin. This can be absolute pixel value (e.g 100), or relative to the * size of the video (For example, 50%). - * @member {string} [position.height] The height of the rectangular region in + * @property {string} [position.width] The width of the rectangular region in * pixels. This can be absolute pixel value (e.g 100), or relative to the * size of the video (For example, 50%). - * @member {number} [opacity] The opacity of the overlay. This is a value in - * the range [0 - 1.0]. Default is 1.0 which mean the overlay is opaque. - * @member {object} [cropRectangle] An optional rectangular window used to + * @property {string} [position.height] The height of the rectangular region + * in pixels. This can be absolute pixel value (e.g 100), or relative to the + * size of the video (For example, 50%). + * @property {number} [opacity] The opacity of the overlay. This is a value + * in the range [0 - 1.0]. Default is 1.0 which mean the overlay is opaque. + * @property {object} [cropRectangle] An optional rectangular window used to * crop the overlay image or video. - * @member {string} [cropRectangle.left] The number of pixels from the + * @property {string} [cropRectangle.left] The number of pixels from the * left-margin. This can be absolute pixel value (e.g 100), or relative to * the size of the video (For example, 50%). - * @member {string} [cropRectangle.top] The number of pixels from the + * @property {string} [cropRectangle.top] The number of pixels from the * top-margin. This can be absolute pixel value (e.g 100), or relative to the * size of the video (For example, 50%). - * @member {string} [cropRectangle.width] The width of the rectangular region - * in pixels. This can be absolute pixel value (e.g 100), or relative to the - * size of the video (For example, 50%). - * @member {string} [cropRectangle.height] The height of the rectangular + * @property {string} [cropRectangle.width] The width of the rectangular + * region in pixels. This can be absolute pixel value (e.g 100), or relative + * to the size of the video (For example, 50%). + * @property {string} [cropRectangle.height] The height of the rectangular * region in pixels. This can be absolute pixel value (e.g 100), or relative * to the size of the video (For example, 50%). */ diff --git a/lib/services/mediaServicesManagement/lib/operations/accountFilters.js b/lib/services/mediaServicesManagement/lib/operations/accountFilters.js index 7a27fd98a8..1b7d407af8 100644 --- a/lib/services/mediaServicesManagement/lib/operations/accountFilters.js +++ b/lib/services/mediaServicesManagement/lib/operations/accountFilters.js @@ -336,22 +336,23 @@ function _get(resourceGroupName, accountName, filterName, options, callback) { * @param {object} [parameters.presentationTimeRange] The presentation time * range. * - * @param {number} parameters.presentationTimeRange.startTimestamp The absolute - * start time boundary. + * @param {number} [parameters.presentationTimeRange.startTimestamp] The + * absolute start time boundary. * - * @param {number} parameters.presentationTimeRange.endTimestamp The absolute + * @param {number} [parameters.presentationTimeRange.endTimestamp] The absolute * end time boundary. * - * @param {number} parameters.presentationTimeRange.presentationWindowDuration - * The relative to end sliding window. + * @param {number} + * [parameters.presentationTimeRange.presentationWindowDuration] The relative + * to end sliding window. * - * @param {number} parameters.presentationTimeRange.liveBackoffDuration The + * @param {number} [parameters.presentationTimeRange.liveBackoffDuration] The * relative to end right edge. * - * @param {number} parameters.presentationTimeRange.timescale The time scale of - * time stamps. + * @param {number} [parameters.presentationTimeRange.timescale] The time scale + * of time stamps. * - * @param {boolean} parameters.presentationTimeRange.forceEndTimestamp The + * @param {boolean} [parameters.presentationTimeRange.forceEndTimestamp] The * indicator of forcing exsiting of end time stamp. * * @param {object} [parameters.firstQuality] The first quality. @@ -691,22 +692,23 @@ function _deleteMethod(resourceGroupName, accountName, filterName, options, call * @param {object} [parameters.presentationTimeRange] The presentation time * range. * - * @param {number} parameters.presentationTimeRange.startTimestamp The absolute - * start time boundary. + * @param {number} [parameters.presentationTimeRange.startTimestamp] The + * absolute start time boundary. * - * @param {number} parameters.presentationTimeRange.endTimestamp The absolute + * @param {number} [parameters.presentationTimeRange.endTimestamp] The absolute * end time boundary. * - * @param {number} parameters.presentationTimeRange.presentationWindowDuration - * The relative to end sliding window. + * @param {number} + * [parameters.presentationTimeRange.presentationWindowDuration] The relative + * to end sliding window. * - * @param {number} parameters.presentationTimeRange.liveBackoffDuration The + * @param {number} [parameters.presentationTimeRange.liveBackoffDuration] The * relative to end right edge. * - * @param {number} parameters.presentationTimeRange.timescale The time scale of - * time stamps. + * @param {number} [parameters.presentationTimeRange.timescale] The time scale + * of time stamps. * - * @param {boolean} parameters.presentationTimeRange.forceEndTimestamp The + * @param {boolean} [parameters.presentationTimeRange.forceEndTimestamp] The * indicator of forcing exsiting of end time stamp. * * @param {object} [parameters.firstQuality] The first quality. @@ -1228,22 +1230,23 @@ class AccountFilters { * @param {object} [parameters.presentationTimeRange] The presentation time * range. * - * @param {number} parameters.presentationTimeRange.startTimestamp The absolute - * start time boundary. + * @param {number} [parameters.presentationTimeRange.startTimestamp] The + * absolute start time boundary. * - * @param {number} parameters.presentationTimeRange.endTimestamp The absolute + * @param {number} [parameters.presentationTimeRange.endTimestamp] The absolute * end time boundary. * - * @param {number} parameters.presentationTimeRange.presentationWindowDuration - * The relative to end sliding window. + * @param {number} + * [parameters.presentationTimeRange.presentationWindowDuration] The relative + * to end sliding window. * - * @param {number} parameters.presentationTimeRange.liveBackoffDuration The + * @param {number} [parameters.presentationTimeRange.liveBackoffDuration] The * relative to end right edge. * - * @param {number} parameters.presentationTimeRange.timescale The time scale of - * time stamps. + * @param {number} [parameters.presentationTimeRange.timescale] The time scale + * of time stamps. * - * @param {boolean} parameters.presentationTimeRange.forceEndTimestamp The + * @param {boolean} [parameters.presentationTimeRange.forceEndTimestamp] The * indicator of forcing exsiting of end time stamp. * * @param {object} [parameters.firstQuality] The first quality. @@ -1294,22 +1297,23 @@ class AccountFilters { * @param {object} [parameters.presentationTimeRange] The presentation time * range. * - * @param {number} parameters.presentationTimeRange.startTimestamp The absolute - * start time boundary. + * @param {number} [parameters.presentationTimeRange.startTimestamp] The + * absolute start time boundary. * - * @param {number} parameters.presentationTimeRange.endTimestamp The absolute + * @param {number} [parameters.presentationTimeRange.endTimestamp] The absolute * end time boundary. * - * @param {number} parameters.presentationTimeRange.presentationWindowDuration - * The relative to end sliding window. + * @param {number} + * [parameters.presentationTimeRange.presentationWindowDuration] The relative + * to end sliding window. * - * @param {number} parameters.presentationTimeRange.liveBackoffDuration The + * @param {number} [parameters.presentationTimeRange.liveBackoffDuration] The * relative to end right edge. * - * @param {number} parameters.presentationTimeRange.timescale The time scale of - * time stamps. + * @param {number} [parameters.presentationTimeRange.timescale] The time scale + * of time stamps. * - * @param {boolean} parameters.presentationTimeRange.forceEndTimestamp The + * @param {boolean} [parameters.presentationTimeRange.forceEndTimestamp] The * indicator of forcing exsiting of end time stamp. * * @param {object} [parameters.firstQuality] The first quality. @@ -1477,22 +1481,23 @@ class AccountFilters { * @param {object} [parameters.presentationTimeRange] The presentation time * range. * - * @param {number} parameters.presentationTimeRange.startTimestamp The absolute - * start time boundary. + * @param {number} [parameters.presentationTimeRange.startTimestamp] The + * absolute start time boundary. * - * @param {number} parameters.presentationTimeRange.endTimestamp The absolute + * @param {number} [parameters.presentationTimeRange.endTimestamp] The absolute * end time boundary. * - * @param {number} parameters.presentationTimeRange.presentationWindowDuration - * The relative to end sliding window. + * @param {number} + * [parameters.presentationTimeRange.presentationWindowDuration] The relative + * to end sliding window. * - * @param {number} parameters.presentationTimeRange.liveBackoffDuration The + * @param {number} [parameters.presentationTimeRange.liveBackoffDuration] The * relative to end right edge. * - * @param {number} parameters.presentationTimeRange.timescale The time scale of - * time stamps. + * @param {number} [parameters.presentationTimeRange.timescale] The time scale + * of time stamps. * - * @param {boolean} parameters.presentationTimeRange.forceEndTimestamp The + * @param {boolean} [parameters.presentationTimeRange.forceEndTimestamp] The * indicator of forcing exsiting of end time stamp. * * @param {object} [parameters.firstQuality] The first quality. @@ -1543,22 +1548,23 @@ class AccountFilters { * @param {object} [parameters.presentationTimeRange] The presentation time * range. * - * @param {number} parameters.presentationTimeRange.startTimestamp The absolute - * start time boundary. + * @param {number} [parameters.presentationTimeRange.startTimestamp] The + * absolute start time boundary. * - * @param {number} parameters.presentationTimeRange.endTimestamp The absolute + * @param {number} [parameters.presentationTimeRange.endTimestamp] The absolute * end time boundary. * - * @param {number} parameters.presentationTimeRange.presentationWindowDuration - * The relative to end sliding window. + * @param {number} + * [parameters.presentationTimeRange.presentationWindowDuration] The relative + * to end sliding window. * - * @param {number} parameters.presentationTimeRange.liveBackoffDuration The + * @param {number} [parameters.presentationTimeRange.liveBackoffDuration] The * relative to end right edge. * - * @param {number} parameters.presentationTimeRange.timescale The time scale of - * time stamps. + * @param {number} [parameters.presentationTimeRange.timescale] The time scale + * of time stamps. * - * @param {boolean} parameters.presentationTimeRange.forceEndTimestamp The + * @param {boolean} [parameters.presentationTimeRange.forceEndTimestamp] The * indicator of forcing exsiting of end time stamp. * * @param {object} [parameters.firstQuality] The first quality. diff --git a/lib/services/mediaServicesManagement/lib/operations/assetFilters.js b/lib/services/mediaServicesManagement/lib/operations/assetFilters.js index bda8f91c9d..3af678e6ad 100644 --- a/lib/services/mediaServicesManagement/lib/operations/assetFilters.js +++ b/lib/services/mediaServicesManagement/lib/operations/assetFilters.js @@ -349,22 +349,23 @@ function _get(resourceGroupName, accountName, assetName, filterName, options, ca * @param {object} [parameters.presentationTimeRange] The presentation time * range. * - * @param {number} parameters.presentationTimeRange.startTimestamp The absolute - * start time boundary. + * @param {number} [parameters.presentationTimeRange.startTimestamp] The + * absolute start time boundary. * - * @param {number} parameters.presentationTimeRange.endTimestamp The absolute + * @param {number} [parameters.presentationTimeRange.endTimestamp] The absolute * end time boundary. * - * @param {number} parameters.presentationTimeRange.presentationWindowDuration - * The relative to end sliding window. + * @param {number} + * [parameters.presentationTimeRange.presentationWindowDuration] The relative + * to end sliding window. * - * @param {number} parameters.presentationTimeRange.liveBackoffDuration The + * @param {number} [parameters.presentationTimeRange.liveBackoffDuration] The * relative to end right edge. * - * @param {number} parameters.presentationTimeRange.timescale The time scale of - * time stamps. + * @param {number} [parameters.presentationTimeRange.timescale] The time scale + * of time stamps. * - * @param {boolean} parameters.presentationTimeRange.forceEndTimestamp The + * @param {boolean} [parameters.presentationTimeRange.forceEndTimestamp] The * indicator of forcing exsiting of end time stamp. * * @param {object} [parameters.firstQuality] The first quality. @@ -716,22 +717,23 @@ function _deleteMethod(resourceGroupName, accountName, assetName, filterName, op * @param {object} [parameters.presentationTimeRange] The presentation time * range. * - * @param {number} parameters.presentationTimeRange.startTimestamp The absolute - * start time boundary. + * @param {number} [parameters.presentationTimeRange.startTimestamp] The + * absolute start time boundary. * - * @param {number} parameters.presentationTimeRange.endTimestamp The absolute + * @param {number} [parameters.presentationTimeRange.endTimestamp] The absolute * end time boundary. * - * @param {number} parameters.presentationTimeRange.presentationWindowDuration - * The relative to end sliding window. + * @param {number} + * [parameters.presentationTimeRange.presentationWindowDuration] The relative + * to end sliding window. * - * @param {number} parameters.presentationTimeRange.liveBackoffDuration The + * @param {number} [parameters.presentationTimeRange.liveBackoffDuration] The * relative to end right edge. * - * @param {number} parameters.presentationTimeRange.timescale The time scale of - * time stamps. + * @param {number} [parameters.presentationTimeRange.timescale] The time scale + * of time stamps. * - * @param {boolean} parameters.presentationTimeRange.forceEndTimestamp The + * @param {boolean} [parameters.presentationTimeRange.forceEndTimestamp] The * indicator of forcing exsiting of end time stamp. * * @param {object} [parameters.firstQuality] The first quality. @@ -1265,22 +1267,23 @@ class AssetFilters { * @param {object} [parameters.presentationTimeRange] The presentation time * range. * - * @param {number} parameters.presentationTimeRange.startTimestamp The absolute - * start time boundary. + * @param {number} [parameters.presentationTimeRange.startTimestamp] The + * absolute start time boundary. * - * @param {number} parameters.presentationTimeRange.endTimestamp The absolute + * @param {number} [parameters.presentationTimeRange.endTimestamp] The absolute * end time boundary. * - * @param {number} parameters.presentationTimeRange.presentationWindowDuration - * The relative to end sliding window. + * @param {number} + * [parameters.presentationTimeRange.presentationWindowDuration] The relative + * to end sliding window. * - * @param {number} parameters.presentationTimeRange.liveBackoffDuration The + * @param {number} [parameters.presentationTimeRange.liveBackoffDuration] The * relative to end right edge. * - * @param {number} parameters.presentationTimeRange.timescale The time scale of - * time stamps. + * @param {number} [parameters.presentationTimeRange.timescale] The time scale + * of time stamps. * - * @param {boolean} parameters.presentationTimeRange.forceEndTimestamp The + * @param {boolean} [parameters.presentationTimeRange.forceEndTimestamp] The * indicator of forcing exsiting of end time stamp. * * @param {object} [parameters.firstQuality] The first quality. @@ -1333,22 +1336,23 @@ class AssetFilters { * @param {object} [parameters.presentationTimeRange] The presentation time * range. * - * @param {number} parameters.presentationTimeRange.startTimestamp The absolute - * start time boundary. + * @param {number} [parameters.presentationTimeRange.startTimestamp] The + * absolute start time boundary. * - * @param {number} parameters.presentationTimeRange.endTimestamp The absolute + * @param {number} [parameters.presentationTimeRange.endTimestamp] The absolute * end time boundary. * - * @param {number} parameters.presentationTimeRange.presentationWindowDuration - * The relative to end sliding window. + * @param {number} + * [parameters.presentationTimeRange.presentationWindowDuration] The relative + * to end sliding window. * - * @param {number} parameters.presentationTimeRange.liveBackoffDuration The + * @param {number} [parameters.presentationTimeRange.liveBackoffDuration] The * relative to end right edge. * - * @param {number} parameters.presentationTimeRange.timescale The time scale of - * time stamps. + * @param {number} [parameters.presentationTimeRange.timescale] The time scale + * of time stamps. * - * @param {boolean} parameters.presentationTimeRange.forceEndTimestamp The + * @param {boolean} [parameters.presentationTimeRange.forceEndTimestamp] The * indicator of forcing exsiting of end time stamp. * * @param {object} [parameters.firstQuality] The first quality. @@ -1522,22 +1526,23 @@ class AssetFilters { * @param {object} [parameters.presentationTimeRange] The presentation time * range. * - * @param {number} parameters.presentationTimeRange.startTimestamp The absolute - * start time boundary. + * @param {number} [parameters.presentationTimeRange.startTimestamp] The + * absolute start time boundary. * - * @param {number} parameters.presentationTimeRange.endTimestamp The absolute + * @param {number} [parameters.presentationTimeRange.endTimestamp] The absolute * end time boundary. * - * @param {number} parameters.presentationTimeRange.presentationWindowDuration - * The relative to end sliding window. + * @param {number} + * [parameters.presentationTimeRange.presentationWindowDuration] The relative + * to end sliding window. * - * @param {number} parameters.presentationTimeRange.liveBackoffDuration The + * @param {number} [parameters.presentationTimeRange.liveBackoffDuration] The * relative to end right edge. * - * @param {number} parameters.presentationTimeRange.timescale The time scale of - * time stamps. + * @param {number} [parameters.presentationTimeRange.timescale] The time scale + * of time stamps. * - * @param {boolean} parameters.presentationTimeRange.forceEndTimestamp The + * @param {boolean} [parameters.presentationTimeRange.forceEndTimestamp] The * indicator of forcing exsiting of end time stamp. * * @param {object} [parameters.firstQuality] The first quality. @@ -1590,22 +1595,23 @@ class AssetFilters { * @param {object} [parameters.presentationTimeRange] The presentation time * range. * - * @param {number} parameters.presentationTimeRange.startTimestamp The absolute - * start time boundary. + * @param {number} [parameters.presentationTimeRange.startTimestamp] The + * absolute start time boundary. * - * @param {number} parameters.presentationTimeRange.endTimestamp The absolute + * @param {number} [parameters.presentationTimeRange.endTimestamp] The absolute * end time boundary. * - * @param {number} parameters.presentationTimeRange.presentationWindowDuration - * The relative to end sliding window. + * @param {number} + * [parameters.presentationTimeRange.presentationWindowDuration] The relative + * to end sliding window. * - * @param {number} parameters.presentationTimeRange.liveBackoffDuration The + * @param {number} [parameters.presentationTimeRange.liveBackoffDuration] The * relative to end right edge. * - * @param {number} parameters.presentationTimeRange.timescale The time scale of - * time stamps. + * @param {number} [parameters.presentationTimeRange.timescale] The time scale + * of time stamps. * - * @param {boolean} parameters.presentationTimeRange.forceEndTimestamp The + * @param {boolean} [parameters.presentationTimeRange.forceEndTimestamp] The * indicator of forcing exsiting of end time stamp. * * @param {object} [parameters.firstQuality] The first quality. diff --git a/lib/services/mediaServicesManagement/lib/operations/index.d.ts b/lib/services/mediaServicesManagement/lib/operations/index.d.ts index 4ea57795a0..c5bc65fec4 100644 --- a/lib/services/mediaServicesManagement/lib/operations/index.d.ts +++ b/lib/services/mediaServicesManagement/lib/operations/index.d.ts @@ -174,22 +174,23 @@ export interface AccountFilters { * @param {object} [parameters.presentationTimeRange] The presentation time * range. * - * @param {number} parameters.presentationTimeRange.startTimestamp The absolute - * start time boundary. + * @param {number} [parameters.presentationTimeRange.startTimestamp] The + * absolute start time boundary. * - * @param {number} parameters.presentationTimeRange.endTimestamp The absolute + * @param {number} [parameters.presentationTimeRange.endTimestamp] The absolute * end time boundary. * - * @param {number} parameters.presentationTimeRange.presentationWindowDuration - * The relative to end sliding window. + * @param {number} + * [parameters.presentationTimeRange.presentationWindowDuration] The relative + * to end sliding window. * - * @param {number} parameters.presentationTimeRange.liveBackoffDuration The + * @param {number} [parameters.presentationTimeRange.liveBackoffDuration] The * relative to end right edge. * - * @param {number} parameters.presentationTimeRange.timescale The time scale of - * time stamps. + * @param {number} [parameters.presentationTimeRange.timescale] The time scale + * of time stamps. * - * @param {boolean} parameters.presentationTimeRange.forceEndTimestamp The + * @param {boolean} [parameters.presentationTimeRange.forceEndTimestamp] The * indicator of forcing exsiting of end time stamp. * * @param {object} [parameters.firstQuality] The first quality. @@ -228,22 +229,23 @@ export interface AccountFilters { * @param {object} [parameters.presentationTimeRange] The presentation time * range. * - * @param {number} parameters.presentationTimeRange.startTimestamp The absolute - * start time boundary. + * @param {number} [parameters.presentationTimeRange.startTimestamp] The + * absolute start time boundary. * - * @param {number} parameters.presentationTimeRange.endTimestamp The absolute + * @param {number} [parameters.presentationTimeRange.endTimestamp] The absolute * end time boundary. * - * @param {number} parameters.presentationTimeRange.presentationWindowDuration - * The relative to end sliding window. + * @param {number} + * [parameters.presentationTimeRange.presentationWindowDuration] The relative + * to end sliding window. * - * @param {number} parameters.presentationTimeRange.liveBackoffDuration The + * @param {number} [parameters.presentationTimeRange.liveBackoffDuration] The * relative to end right edge. * - * @param {number} parameters.presentationTimeRange.timescale The time scale of - * time stamps. + * @param {number} [parameters.presentationTimeRange.timescale] The time scale + * of time stamps. * - * @param {boolean} parameters.presentationTimeRange.forceEndTimestamp The + * @param {boolean} [parameters.presentationTimeRange.forceEndTimestamp] The * indicator of forcing exsiting of end time stamp. * * @param {object} [parameters.firstQuality] The first quality. @@ -369,22 +371,23 @@ export interface AccountFilters { * @param {object} [parameters.presentationTimeRange] The presentation time * range. * - * @param {number} parameters.presentationTimeRange.startTimestamp The absolute - * start time boundary. + * @param {number} [parameters.presentationTimeRange.startTimestamp] The + * absolute start time boundary. * - * @param {number} parameters.presentationTimeRange.endTimestamp The absolute + * @param {number} [parameters.presentationTimeRange.endTimestamp] The absolute * end time boundary. * - * @param {number} parameters.presentationTimeRange.presentationWindowDuration - * The relative to end sliding window. + * @param {number} + * [parameters.presentationTimeRange.presentationWindowDuration] The relative + * to end sliding window. * - * @param {number} parameters.presentationTimeRange.liveBackoffDuration The + * @param {number} [parameters.presentationTimeRange.liveBackoffDuration] The * relative to end right edge. * - * @param {number} parameters.presentationTimeRange.timescale The time scale of - * time stamps. + * @param {number} [parameters.presentationTimeRange.timescale] The time scale + * of time stamps. * - * @param {boolean} parameters.presentationTimeRange.forceEndTimestamp The + * @param {boolean} [parameters.presentationTimeRange.forceEndTimestamp] The * indicator of forcing exsiting of end time stamp. * * @param {object} [parameters.firstQuality] The first quality. @@ -423,22 +426,23 @@ export interface AccountFilters { * @param {object} [parameters.presentationTimeRange] The presentation time * range. * - * @param {number} parameters.presentationTimeRange.startTimestamp The absolute - * start time boundary. + * @param {number} [parameters.presentationTimeRange.startTimestamp] The + * absolute start time boundary. * - * @param {number} parameters.presentationTimeRange.endTimestamp The absolute + * @param {number} [parameters.presentationTimeRange.endTimestamp] The absolute * end time boundary. * - * @param {number} parameters.presentationTimeRange.presentationWindowDuration - * The relative to end sliding window. + * @param {number} + * [parameters.presentationTimeRange.presentationWindowDuration] The relative + * to end sliding window. * - * @param {number} parameters.presentationTimeRange.liveBackoffDuration The + * @param {number} [parameters.presentationTimeRange.liveBackoffDuration] The * relative to end right edge. * - * @param {number} parameters.presentationTimeRange.timescale The time scale of - * time stamps. + * @param {number} [parameters.presentationTimeRange.timescale] The time scale + * of time stamps. * - * @param {boolean} parameters.presentationTimeRange.forceEndTimestamp The + * @param {boolean} [parameters.presentationTimeRange.forceEndTimestamp] The * indicator of forcing exsiting of end time stamp. * * @param {object} [parameters.firstQuality] The first quality. @@ -2306,22 +2310,23 @@ export interface AssetFilters { * @param {object} [parameters.presentationTimeRange] The presentation time * range. * - * @param {number} parameters.presentationTimeRange.startTimestamp The absolute - * start time boundary. + * @param {number} [parameters.presentationTimeRange.startTimestamp] The + * absolute start time boundary. * - * @param {number} parameters.presentationTimeRange.endTimestamp The absolute + * @param {number} [parameters.presentationTimeRange.endTimestamp] The absolute * end time boundary. * - * @param {number} parameters.presentationTimeRange.presentationWindowDuration - * The relative to end sliding window. + * @param {number} + * [parameters.presentationTimeRange.presentationWindowDuration] The relative + * to end sliding window. * - * @param {number} parameters.presentationTimeRange.liveBackoffDuration The + * @param {number} [parameters.presentationTimeRange.liveBackoffDuration] The * relative to end right edge. * - * @param {number} parameters.presentationTimeRange.timescale The time scale of - * time stamps. + * @param {number} [parameters.presentationTimeRange.timescale] The time scale + * of time stamps. * - * @param {boolean} parameters.presentationTimeRange.forceEndTimestamp The + * @param {boolean} [parameters.presentationTimeRange.forceEndTimestamp] The * indicator of forcing exsiting of end time stamp. * * @param {object} [parameters.firstQuality] The first quality. @@ -2362,22 +2367,23 @@ export interface AssetFilters { * @param {object} [parameters.presentationTimeRange] The presentation time * range. * - * @param {number} parameters.presentationTimeRange.startTimestamp The absolute - * start time boundary. + * @param {number} [parameters.presentationTimeRange.startTimestamp] The + * absolute start time boundary. * - * @param {number} parameters.presentationTimeRange.endTimestamp The absolute + * @param {number} [parameters.presentationTimeRange.endTimestamp] The absolute * end time boundary. * - * @param {number} parameters.presentationTimeRange.presentationWindowDuration - * The relative to end sliding window. + * @param {number} + * [parameters.presentationTimeRange.presentationWindowDuration] The relative + * to end sliding window. * - * @param {number} parameters.presentationTimeRange.liveBackoffDuration The + * @param {number} [parameters.presentationTimeRange.liveBackoffDuration] The * relative to end right edge. * - * @param {number} parameters.presentationTimeRange.timescale The time scale of - * time stamps. + * @param {number} [parameters.presentationTimeRange.timescale] The time scale + * of time stamps. * - * @param {boolean} parameters.presentationTimeRange.forceEndTimestamp The + * @param {boolean} [parameters.presentationTimeRange.forceEndTimestamp] The * indicator of forcing exsiting of end time stamp. * * @param {object} [parameters.firstQuality] The first quality. @@ -2509,22 +2515,23 @@ export interface AssetFilters { * @param {object} [parameters.presentationTimeRange] The presentation time * range. * - * @param {number} parameters.presentationTimeRange.startTimestamp The absolute - * start time boundary. + * @param {number} [parameters.presentationTimeRange.startTimestamp] The + * absolute start time boundary. * - * @param {number} parameters.presentationTimeRange.endTimestamp The absolute + * @param {number} [parameters.presentationTimeRange.endTimestamp] The absolute * end time boundary. * - * @param {number} parameters.presentationTimeRange.presentationWindowDuration - * The relative to end sliding window. + * @param {number} + * [parameters.presentationTimeRange.presentationWindowDuration] The relative + * to end sliding window. * - * @param {number} parameters.presentationTimeRange.liveBackoffDuration The + * @param {number} [parameters.presentationTimeRange.liveBackoffDuration] The * relative to end right edge. * - * @param {number} parameters.presentationTimeRange.timescale The time scale of - * time stamps. + * @param {number} [parameters.presentationTimeRange.timescale] The time scale + * of time stamps. * - * @param {boolean} parameters.presentationTimeRange.forceEndTimestamp The + * @param {boolean} [parameters.presentationTimeRange.forceEndTimestamp] The * indicator of forcing exsiting of end time stamp. * * @param {object} [parameters.firstQuality] The first quality. @@ -2565,22 +2572,23 @@ export interface AssetFilters { * @param {object} [parameters.presentationTimeRange] The presentation time * range. * - * @param {number} parameters.presentationTimeRange.startTimestamp The absolute - * start time boundary. + * @param {number} [parameters.presentationTimeRange.startTimestamp] The + * absolute start time boundary. * - * @param {number} parameters.presentationTimeRange.endTimestamp The absolute + * @param {number} [parameters.presentationTimeRange.endTimestamp] The absolute * end time boundary. * - * @param {number} parameters.presentationTimeRange.presentationWindowDuration - * The relative to end sliding window. + * @param {number} + * [parameters.presentationTimeRange.presentationWindowDuration] The relative + * to end sliding window. * - * @param {number} parameters.presentationTimeRange.liveBackoffDuration The + * @param {number} [parameters.presentationTimeRange.liveBackoffDuration] The * relative to end right edge. * - * @param {number} parameters.presentationTimeRange.timescale The time scale of - * time stamps. + * @param {number} [parameters.presentationTimeRange.timescale] The time scale + * of time stamps. * - * @param {boolean} parameters.presentationTimeRange.forceEndTimestamp The + * @param {boolean} [parameters.presentationTimeRange.forceEndTimestamp] The * indicator of forcing exsiting of end time stamp. * * @param {object} [parameters.firstQuality] The first quality. @@ -3229,13 +3237,8 @@ export interface Transforms { * * @param {string} [options.filter] Restricts the set of items returned. * - * @param {number} [options.top] Specifies a non-negative integer n that limits - * the number of items returned from a collection. The service returns the - * number of available items up to but not greater than the specified value n. - * - * @param {number} [options.skip] Specifies a non-negative integer n that - * excludes the first n items of the queried collection from the result. The - * service returns items starting at position n+1. + * @param {string} [options.orderby] Specifies the the key by which the result + * collection should be ordered. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -3246,7 +3249,7 @@ export interface Transforms { * * @reject {Error|ServiceError} - The error object. */ - listWithHttpOperationResponse(resourceGroupName: string, accountName: string, options?: { filter? : string, top? : number, skip? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, accountName: string, options?: { filter? : string, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * @summary List Transforms @@ -3262,13 +3265,8 @@ export interface Transforms { * * @param {string} [options.filter] Restricts the set of items returned. * - * @param {number} [options.top] Specifies a non-negative integer n that limits - * the number of items returned from a collection. The service returns the - * number of available items up to but not greater than the specified value n. - * - * @param {number} [options.skip] Specifies a non-negative integer n that - * excludes the first n items of the queried collection from the result. The - * service returns items starting at position n+1. + * @param {string} [options.orderby] Specifies the the key by which the result + * collection should be ordered. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -3295,9 +3293,9 @@ export interface Transforms { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - list(resourceGroupName: string, accountName: string, options?: { filter? : string, top? : number, skip? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, accountName: string, options?: { filter? : string, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; list(resourceGroupName: string, accountName: string, callback: ServiceCallback): void; - list(resourceGroupName: string, accountName: string, options: { filter? : string, top? : number, skip? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, accountName: string, options: { filter? : string, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -3693,13 +3691,8 @@ export interface Jobs { * * @param {string} [options.filter] Restricts the set of items returned. * - * @param {number} [options.top] Specifies a non-negative integer n that limits - * the number of items returned from a collection. The service returns the - * number of available items up to but not greater than the specified value n. - * - * @param {number} [options.skip] Specifies a non-negative integer n that - * excludes the first n items of the queried collection from the result. The - * service returns items starting at position n+1. + * @param {string} [options.orderby] Specifies the the key by which the result + * collection should be ordered. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -3710,7 +3703,7 @@ export interface Jobs { * * @reject {Error|ServiceError} - The error object. */ - listWithHttpOperationResponse(resourceGroupName: string, accountName: string, transformName: string, options?: { filter? : string, top? : number, skip? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, accountName: string, transformName: string, options?: { filter? : string, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * @summary List Jobs @@ -3728,13 +3721,8 @@ export interface Jobs { * * @param {string} [options.filter] Restricts the set of items returned. * - * @param {number} [options.top] Specifies a non-negative integer n that limits - * the number of items returned from a collection. The service returns the - * number of available items up to but not greater than the specified value n. - * - * @param {number} [options.skip] Specifies a non-negative integer n that - * excludes the first n items of the queried collection from the result. The - * service returns items starting at position n+1. + * @param {string} [options.orderby] Specifies the the key by which the result + * collection should be ordered. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -3761,9 +3749,9 @@ export interface Jobs { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - list(resourceGroupName: string, accountName: string, transformName: string, options?: { filter? : string, top? : number, skip? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, accountName: string, transformName: string, options?: { filter? : string, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; list(resourceGroupName: string, accountName: string, transformName: string, callback: ServiceCallback): void; - list(resourceGroupName: string, accountName: string, transformName: string, options: { filter? : string, top? : number, skip? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, accountName: string, transformName: string, options: { filter? : string, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -4025,7 +4013,9 @@ export interface Jobs { /** * @summary Update Job * - * Updates a Job. + * Update is only supported for description and priority. Updating Priority + * will take effect when the Job state is Queued or Scheduled and depending on + * the timing the priority update may be ignored. * * @param {string} resourceGroupName The name of the resource group within the * Azure subscription. @@ -4071,7 +4061,9 @@ export interface Jobs { /** * @summary Update Job * - * Updates a Job. + * Update is only supported for description and priority. Updating Priority + * will take effect when the Job state is Queued or Scheduled and depending on + * the timing the priority update may be ignored. * * @param {string} resourceGroupName The name of the resource group within the * Azure subscription. @@ -4293,7 +4285,7 @@ export interface StreamingPolicies { * the number of items returned from a collection. The service returns the * number of available items up to but not greater than the specified value n. * - * @param {string} [options.orderby] Specifies the the key by which the result + * @param {string} [options.orderby] Specifies the key by which the result * collection should be ordered. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -4325,7 +4317,7 @@ export interface StreamingPolicies { * the number of items returned from a collection. The service returns the * number of available items up to but not greater than the specified value n. * - * @param {string} [options.orderby] Specifies the the key by which the result + * @param {string} [options.orderby] Specifies the key by which the result * collection should be ordered. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -4460,7 +4452,7 @@ export interface StreamingPolicies { * * @param {string} * [parameters.envelopeEncryption.customKeyAcquisitionUrlTemplate] - * KeyAcquistionUrlTemplate is used to point to user specified service to + * KeyAcquisitionUrlTemplate is used to point to user specified service to * delivery content keys * * @param {object} [parameters.commonEncryptionCenc] Configuration of @@ -4610,7 +4602,7 @@ export interface StreamingPolicies { * * @param {string} * [parameters.envelopeEncryption.customKeyAcquisitionUrlTemplate] - * KeyAcquistionUrlTemplate is used to point to user specified service to + * KeyAcquisitionUrlTemplate is used to point to user specified service to * delivery content keys * * @param {object} [parameters.commonEncryptionCenc] Configuration of @@ -4904,7 +4896,7 @@ export interface StreamingLocators { * the number of items returned from a collection. The service returns the * number of available items up to but not greater than the specified value n. * - * @param {string} [options.orderby] Specifies the the key by which the result + * @param {string} [options.orderby] Specifies the key by which the result * collection should be ordered. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -4936,7 +4928,7 @@ export interface StreamingLocators { * the number of items returned from a collection. The service returns the * number of available items up to but not greater than the specified value n. * - * @param {string} [options.orderby] Specifies the the key by which the result + * @param {string} [options.orderby] Specifies the key by which the result * collection should be ordered. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5650,7 +5642,7 @@ export interface LiveEvents { * * @param {string} [parameters.encoding.encodingType] The encoding type for * Live Event. This value is specified at creation time and cannot be updated. - * Possible values include: 'None', 'Basic' + * Possible values include: 'None', 'Basic', 'Standard' * * @param {string} [parameters.encoding.presetName] The encoding preset name. * This value is specified at creation time and cannot be updated. @@ -5763,7 +5755,7 @@ export interface LiveEvents { * * @param {string} [parameters.encoding.encodingType] The encoding type for * Live Event. This value is specified at creation time and cannot be updated. - * Possible values include: 'None', 'Basic' + * Possible values include: 'None', 'Basic', 'Standard' * * @param {string} [parameters.encoding.presetName] The encoding preset name. * This value is specified at creation time and cannot be updated. @@ -5893,7 +5885,7 @@ export interface LiveEvents { * * @param {string} [parameters.encoding.encodingType] The encoding type for * Live Event. This value is specified at creation time and cannot be updated. - * Possible values include: 'None', 'Basic' + * Possible values include: 'None', 'Basic', 'Standard' * * @param {string} [parameters.encoding.presetName] The encoding preset name. * This value is specified at creation time and cannot be updated. @@ -6001,7 +5993,7 @@ export interface LiveEvents { * * @param {string} [parameters.encoding.encodingType] The encoding type for * Live Event. This value is specified at creation time and cannot be updated. - * Possible values include: 'None', 'Basic' + * Possible values include: 'None', 'Basic', 'Standard' * * @param {string} [parameters.encoding.presetName] The encoding preset name. * This value is specified at creation time and cannot be updated. @@ -6412,7 +6404,7 @@ export interface LiveEvents { * * @param {string} [parameters.encoding.encodingType] The encoding type for * Live Event. This value is specified at creation time and cannot be updated. - * Possible values include: 'None', 'Basic' + * Possible values include: 'None', 'Basic', 'Standard' * * @param {string} [parameters.encoding.presetName] The encoding preset name. * This value is specified at creation time and cannot be updated. @@ -6525,7 +6517,7 @@ export interface LiveEvents { * * @param {string} [parameters.encoding.encodingType] The encoding type for * Live Event. This value is specified at creation time and cannot be updated. - * Possible values include: 'None', 'Basic' + * Possible values include: 'None', 'Basic', 'Standard' * * @param {string} [parameters.encoding.presetName] The encoding preset name. * This value is specified at creation time and cannot be updated. @@ -6655,7 +6647,7 @@ export interface LiveEvents { * * @param {string} [parameters.encoding.encodingType] The encoding type for * Live Event. This value is specified at creation time and cannot be updated. - * Possible values include: 'None', 'Basic' + * Possible values include: 'None', 'Basic', 'Standard' * * @param {string} [parameters.encoding.presetName] The encoding preset name. * This value is specified at creation time and cannot be updated. @@ -6763,7 +6755,7 @@ export interface LiveEvents { * * @param {string} [parameters.encoding.encodingType] The encoding type for * Live Event. This value is specified at creation time and cannot be updated. - * Possible values include: 'None', 'Basic' + * Possible values include: 'None', 'Basic', 'Standard' * * @param {string} [parameters.encoding.presetName] The encoding preset name. * This value is specified at creation time and cannot be updated. diff --git a/lib/services/mediaServicesManagement/lib/operations/jobs.js b/lib/services/mediaServicesManagement/lib/operations/jobs.js index c1da33dcfe..4e55beda62 100644 --- a/lib/services/mediaServicesManagement/lib/operations/jobs.js +++ b/lib/services/mediaServicesManagement/lib/operations/jobs.js @@ -30,13 +30,8 @@ const WebResource = msRest.WebResource; * * @param {string} [options.filter] Restricts the set of items returned. * - * @param {number} [options.top] Specifies a non-negative integer n that limits - * the number of items returned from a collection. The service returns the - * number of available items up to but not greater than the specified value n. - * - * @param {number} [options.skip] Specifies a non-negative integer n that - * excludes the first n items of the queried collection from the result. The - * service returns items starting at position n+1. + * @param {string} [options.orderby] Specifies the the key by which the result + * collection should be ordered. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -65,8 +60,7 @@ function _list(resourceGroupName, accountName, transformName, options, callback) throw new Error('callback cannot be null.'); } let filter = (options && options.filter !== undefined) ? options.filter : undefined; - let top = (options && options.top !== undefined) ? options.top : undefined; - let skip = (options && options.skip !== undefined) ? options.skip : undefined; + let orderby = (options && options.orderby !== undefined) ? options.orderby : undefined; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -87,11 +81,8 @@ function _list(resourceGroupName, accountName, transformName, options, callback) if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { throw new Error('filter must be of type string.'); } - if (top !== null && top !== undefined && typeof top !== 'number') { - throw new Error('top must be of type number.'); - } - if (skip !== null && skip !== undefined && typeof skip !== 'number') { - throw new Error('skip must be of type number.'); + if (orderby !== null && orderby !== undefined && typeof orderby.valueOf() !== 'string') { + throw new Error('orderby must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -112,11 +103,8 @@ function _list(resourceGroupName, accountName, transformName, options, callback) if (filter !== null && filter !== undefined) { queryParameters.push('$filter=' + encodeURIComponent(filter)); } - if (top !== null && top !== undefined) { - queryParameters.push('$top=' + encodeURIComponent(top.toString())); - } - if (skip !== null && skip !== undefined) { - queryParameters.push('$skip=' + encodeURIComponent(skip.toString())); + if (orderby !== null && orderby !== undefined) { + queryParameters.push('$orderby=' + encodeURIComponent(orderby)); } if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); @@ -704,7 +692,9 @@ function _deleteMethod(resourceGroupName, accountName, transformName, jobName, o /** * @summary Update Job * - * Updates a Job. + * Update is only supported for description and priority. Updating Priority + * will take effect when the Job state is Queued or Scheduled and depending on + * the timing the priority update may be ignored. * * @param {string} resourceGroupName The name of the resource group within the * Azure subscription. @@ -1204,13 +1194,8 @@ class Jobs { * * @param {string} [options.filter] Restricts the set of items returned. * - * @param {number} [options.top] Specifies a non-negative integer n that limits - * the number of items returned from a collection. The service returns the - * number of available items up to but not greater than the specified value n. - * - * @param {number} [options.skip] Specifies a non-negative integer n that - * excludes the first n items of the queried collection from the result. The - * service returns items starting at position n+1. + * @param {string} [options.orderby] Specifies the the key by which the result + * collection should be ordered. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1251,13 +1236,8 @@ class Jobs { * * @param {string} [options.filter] Restricts the set of items returned. * - * @param {number} [options.top] Specifies a non-negative integer n that limits - * the number of items returned from a collection. The service returns the - * number of available items up to but not greater than the specified value n. - * - * @param {number} [options.skip] Specifies a non-negative integer n that - * excludes the first n items of the queried collection from the result. The - * service returns items starting at position n+1. + * @param {string} [options.orderby] Specifies the the key by which the result + * collection should be ordered. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1644,7 +1624,9 @@ class Jobs { /** * @summary Update Job * - * Updates a Job. + * Update is only supported for description and priority. Updating Priority + * will take effect when the Job state is Queued or Scheduled and depending on + * the timing the priority update may be ignored. * * @param {string} resourceGroupName The name of the resource group within the * Azure subscription. @@ -1702,7 +1684,9 @@ class Jobs { /** * @summary Update Job * - * Updates a Job. + * Update is only supported for description and priority. Updating Priority + * will take effect when the Job state is Queued or Scheduled and depending on + * the timing the priority update may be ignored. * * @param {string} resourceGroupName The name of the resource group within the * Azure subscription. diff --git a/lib/services/mediaServicesManagement/lib/operations/liveEvents.js b/lib/services/mediaServicesManagement/lib/operations/liveEvents.js index 8d14f649a2..a63b76c829 100644 --- a/lib/services/mediaServicesManagement/lib/operations/liveEvents.js +++ b/lib/services/mediaServicesManagement/lib/operations/liveEvents.js @@ -405,7 +405,7 @@ function _get(resourceGroupName, accountName, liveEventName, options, callback) * * @param {string} [parameters.encoding.encodingType] The encoding type for * Live Event. This value is specified at creation time and cannot be updated. - * Possible values include: 'None', 'Basic' + * Possible values include: 'None', 'Basic', 'Standard' * * @param {string} [parameters.encoding.presetName] The encoding preset name. * This value is specified at creation time and cannot be updated. @@ -574,7 +574,7 @@ function _create(resourceGroupName, accountName, liveEventName, parameters, opti * * @param {string} [parameters.encoding.encodingType] The encoding type for * Live Event. This value is specified at creation time and cannot be updated. - * Possible values include: 'None', 'Basic' + * Possible values include: 'None', 'Basic', 'Standard' * * @param {string} [parameters.encoding.presetName] The encoding preset name. * This value is specified at creation time and cannot be updated. @@ -1018,7 +1018,7 @@ function _reset(resourceGroupName, accountName, liveEventName, options, callback * * @param {string} [parameters.encoding.encodingType] The encoding type for * Live Event. This value is specified at creation time and cannot be updated. - * Possible values include: 'None', 'Basic' + * Possible values include: 'None', 'Basic', 'Standard' * * @param {string} [parameters.encoding.presetName] The encoding preset name. * This value is specified at creation time and cannot be updated. @@ -1314,7 +1314,7 @@ function _beginCreate(resourceGroupName, accountName, liveEventName, parameters, * * @param {string} [parameters.encoding.encodingType] The encoding type for * Live Event. This value is specified at creation time and cannot be updated. - * Possible values include: 'None', 'Basic' + * Possible values include: 'None', 'Basic', 'Standard' * * @param {string} [parameters.encoding.presetName] The encoding preset name. * This value is specified at creation time and cannot be updated. @@ -2571,7 +2571,7 @@ class LiveEvents { * * @param {string} [parameters.encoding.encodingType] The encoding type for * Live Event. This value is specified at creation time and cannot be updated. - * Possible values include: 'None', 'Basic' + * Possible values include: 'None', 'Basic', 'Standard' * * @param {string} [parameters.encoding.presetName] The encoding preset name. * This value is specified at creation time and cannot be updated. @@ -2696,7 +2696,7 @@ class LiveEvents { * * @param {string} [parameters.encoding.encodingType] The encoding type for * Live Event. This value is specified at creation time and cannot be updated. - * Possible values include: 'None', 'Basic' + * Possible values include: 'None', 'Basic', 'Standard' * * @param {string} [parameters.encoding.presetName] The encoding preset name. * This value is specified at creation time and cannot be updated. @@ -2841,7 +2841,7 @@ class LiveEvents { * * @param {string} [parameters.encoding.encodingType] The encoding type for * Live Event. This value is specified at creation time and cannot be updated. - * Possible values include: 'None', 'Basic' + * Possible values include: 'None', 'Basic', 'Standard' * * @param {string} [parameters.encoding.presetName] The encoding preset name. * This value is specified at creation time and cannot be updated. @@ -2961,7 +2961,7 @@ class LiveEvents { * * @param {string} [parameters.encoding.encodingType] The encoding type for * Live Event. This value is specified at creation time and cannot be updated. - * Possible values include: 'None', 'Basic' + * Possible values include: 'None', 'Basic', 'Standard' * * @param {string} [parameters.encoding.presetName] The encoding preset name. * This value is specified at creation time and cannot be updated. @@ -3495,7 +3495,7 @@ class LiveEvents { * * @param {string} [parameters.encoding.encodingType] The encoding type for * Live Event. This value is specified at creation time and cannot be updated. - * Possible values include: 'None', 'Basic' + * Possible values include: 'None', 'Basic', 'Standard' * * @param {string} [parameters.encoding.presetName] The encoding preset name. * This value is specified at creation time and cannot be updated. @@ -3620,7 +3620,7 @@ class LiveEvents { * * @param {string} [parameters.encoding.encodingType] The encoding type for * Live Event. This value is specified at creation time and cannot be updated. - * Possible values include: 'None', 'Basic' + * Possible values include: 'None', 'Basic', 'Standard' * * @param {string} [parameters.encoding.presetName] The encoding preset name. * This value is specified at creation time and cannot be updated. @@ -3765,7 +3765,7 @@ class LiveEvents { * * @param {string} [parameters.encoding.encodingType] The encoding type for * Live Event. This value is specified at creation time and cannot be updated. - * Possible values include: 'None', 'Basic' + * Possible values include: 'None', 'Basic', 'Standard' * * @param {string} [parameters.encoding.presetName] The encoding preset name. * This value is specified at creation time and cannot be updated. @@ -3885,7 +3885,7 @@ class LiveEvents { * * @param {string} [parameters.encoding.encodingType] The encoding type for * Live Event. This value is specified at creation time and cannot be updated. - * Possible values include: 'None', 'Basic' + * Possible values include: 'None', 'Basic', 'Standard' * * @param {string} [parameters.encoding.presetName] The encoding preset name. * This value is specified at creation time and cannot be updated. diff --git a/lib/services/mediaServicesManagement/lib/operations/streamingLocators.js b/lib/services/mediaServicesManagement/lib/operations/streamingLocators.js index 59ff071a5f..2845589205 100644 --- a/lib/services/mediaServicesManagement/lib/operations/streamingLocators.js +++ b/lib/services/mediaServicesManagement/lib/operations/streamingLocators.js @@ -32,7 +32,7 @@ const WebResource = msRest.WebResource; * the number of items returned from a collection. The service returns the * number of available items up to but not greater than the specified value n. * - * @param {string} [options.orderby] Specifies the the key by which the result + * @param {string} [options.orderby] Specifies the key by which the result * collection should be ordered. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1164,7 +1164,7 @@ class StreamingLocators { * the number of items returned from a collection. The service returns the * number of available items up to but not greater than the specified value n. * - * @param {string} [options.orderby] Specifies the the key by which the result + * @param {string} [options.orderby] Specifies the key by which the result * collection should be ordered. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1208,7 +1208,7 @@ class StreamingLocators { * the number of items returned from a collection. The service returns the * number of available items up to but not greater than the specified value n. * - * @param {string} [options.orderby] Specifies the the key by which the result + * @param {string} [options.orderby] Specifies the key by which the result * collection should be ordered. * * @param {object} [options.customHeaders] Headers that will be added to the diff --git a/lib/services/mediaServicesManagement/lib/operations/streamingPolicies.js b/lib/services/mediaServicesManagement/lib/operations/streamingPolicies.js index 8c1ecd78db..e8d0d6c868 100644 --- a/lib/services/mediaServicesManagement/lib/operations/streamingPolicies.js +++ b/lib/services/mediaServicesManagement/lib/operations/streamingPolicies.js @@ -32,7 +32,7 @@ const WebResource = msRest.WebResource; * the number of items returned from a collection. The service returns the * number of available items up to but not greater than the specified value n. * - * @param {string} [options.orderby] Specifies the the key by which the result + * @param {string} [options.orderby] Specifies the key by which the result * collection should be ordered. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -381,7 +381,7 @@ function _get(resourceGroupName, accountName, streamingPolicyName, options, call * * @param {string} * [parameters.envelopeEncryption.customKeyAcquisitionUrlTemplate] - * KeyAcquistionUrlTemplate is used to point to user specified service to + * KeyAcquisitionUrlTemplate is used to point to user specified service to * delivery content keys * * @param {object} [parameters.commonEncryptionCenc] Configuration of @@ -947,7 +947,7 @@ class StreamingPolicies { * the number of items returned from a collection. The service returns the * number of available items up to but not greater than the specified value n. * - * @param {string} [options.orderby] Specifies the the key by which the result + * @param {string} [options.orderby] Specifies the key by which the result * collection should be ordered. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -991,7 +991,7 @@ class StreamingPolicies { * the number of items returned from a collection. The service returns the * number of available items up to but not greater than the specified value n. * - * @param {string} [options.orderby] Specifies the the key by which the result + * @param {string} [options.orderby] Specifies the key by which the result * collection should be ordered. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1168,7 +1168,7 @@ class StreamingPolicies { * * @param {string} * [parameters.envelopeEncryption.customKeyAcquisitionUrlTemplate] - * KeyAcquistionUrlTemplate is used to point to user specified service to + * KeyAcquisitionUrlTemplate is used to point to user specified service to * delivery content keys * * @param {object} [parameters.commonEncryptionCenc] Configuration of @@ -1330,7 +1330,7 @@ class StreamingPolicies { * * @param {string} * [parameters.envelopeEncryption.customKeyAcquisitionUrlTemplate] - * KeyAcquistionUrlTemplate is used to point to user specified service to + * KeyAcquisitionUrlTemplate is used to point to user specified service to * delivery content keys * * @param {object} [parameters.commonEncryptionCenc] Configuration of diff --git a/lib/services/mediaServicesManagement/lib/operations/transforms.js b/lib/services/mediaServicesManagement/lib/operations/transforms.js index e1e33ca5aa..a4f5c15692 100644 --- a/lib/services/mediaServicesManagement/lib/operations/transforms.js +++ b/lib/services/mediaServicesManagement/lib/operations/transforms.js @@ -28,13 +28,8 @@ const WebResource = msRest.WebResource; * * @param {string} [options.filter] Restricts the set of items returned. * - * @param {number} [options.top] Specifies a non-negative integer n that limits - * the number of items returned from a collection. The service returns the - * number of available items up to but not greater than the specified value n. - * - * @param {number} [options.skip] Specifies a non-negative integer n that - * excludes the first n items of the queried collection from the result. The - * service returns items starting at position n+1. + * @param {string} [options.orderby] Specifies the the key by which the result + * collection should be ordered. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -63,8 +58,7 @@ function _list(resourceGroupName, accountName, options, callback) { throw new Error('callback cannot be null.'); } let filter = (options && options.filter !== undefined) ? options.filter : undefined; - let top = (options && options.top !== undefined) ? options.top : undefined; - let skip = (options && options.skip !== undefined) ? options.skip : undefined; + let orderby = (options && options.orderby !== undefined) ? options.orderby : undefined; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -82,11 +76,8 @@ function _list(resourceGroupName, accountName, options, callback) { if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { throw new Error('filter must be of type string.'); } - if (top !== null && top !== undefined && typeof top !== 'number') { - throw new Error('top must be of type number.'); - } - if (skip !== null && skip !== undefined && typeof skip !== 'number') { - throw new Error('skip must be of type number.'); + if (orderby !== null && orderby !== undefined && typeof orderby.valueOf() !== 'string') { + throw new Error('orderby must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -106,11 +97,8 @@ function _list(resourceGroupName, accountName, options, callback) { if (filter !== null && filter !== undefined) { queryParameters.push('$filter=' + encodeURIComponent(filter)); } - if (top !== null && top !== undefined) { - queryParameters.push('$top=' + encodeURIComponent(top.toString())); - } - if (skip !== null && skip !== undefined) { - queryParameters.push('$skip=' + encodeURIComponent(skip.toString())); + if (orderby !== null && orderby !== undefined) { + queryParameters.push('$orderby=' + encodeURIComponent(orderby)); } if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); @@ -1023,13 +1011,8 @@ class Transforms { * * @param {string} [options.filter] Restricts the set of items returned. * - * @param {number} [options.top] Specifies a non-negative integer n that limits - * the number of items returned from a collection. The service returns the - * number of available items up to but not greater than the specified value n. - * - * @param {number} [options.skip] Specifies a non-negative integer n that - * excludes the first n items of the queried collection from the result. The - * service returns items starting at position n+1. + * @param {string} [options.orderby] Specifies the the key by which the result + * collection should be ordered. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1068,13 +1051,8 @@ class Transforms { * * @param {string} [options.filter] Restricts the set of items returned. * - * @param {number} [options.top] Specifies a non-negative integer n that limits - * the number of items returned from a collection. The service returns the - * number of available items up to but not greater than the specified value n. - * - * @param {number} [options.skip] Specifies a non-negative integer n that - * excludes the first n items of the queried collection from the result. The - * service returns items starting at position n+1. + * @param {string} [options.orderby] Specifies the the key by which the result + * collection should be ordered. * * @param {object} [options.customHeaders] Headers that will be added to the * request diff --git a/lib/services/mediaServicesManagement/package.json b/lib/services/mediaServicesManagement/package.json index 0b68e10463..9b201afa59 100644 --- a/lib/services/mediaServicesManagement/package.json +++ b/lib/services/mediaServicesManagement/package.json @@ -2,7 +2,7 @@ "name": "azure-arm-mediaservices", "author": "Microsoft Corporation", "description": "AzureMediaServices Library with typescript type definitions for node", - "version": "4.1.0", + "version": "5.0.0", "dependencies": { "ms-rest": "^2.3.3", "ms-rest-azure": "^2.5.5" @@ -22,4 +22,4 @@ "bugs": { "url": "https://github.com/azure/azure-sdk-for-node/issues" } -} \ No newline at end of file +} diff --git a/lib/services/newsSearch/lib/models/answer.js b/lib/services/newsSearch/lib/models/answer.js index 59d67c43f0..a0162303dd 100644 --- a/lib/services/newsSearch/lib/models/answer.js +++ b/lib/services/newsSearch/lib/models/answer.js @@ -20,7 +20,7 @@ const models = require('./index'); class Answer extends models['Response'] { /** * Create a Answer. - * @member {array} [followUpQueries] + * @property {array} [followUpQueries] */ constructor() { super(); diff --git a/lib/services/newsSearch/lib/models/article.js b/lib/services/newsSearch/lib/models/article.js index 37753f3dbf..36e45085ef 100644 --- a/lib/services/newsSearch/lib/models/article.js +++ b/lib/services/newsSearch/lib/models/article.js @@ -19,7 +19,7 @@ const models = require('./index'); class Article extends models['CreativeWork'] { /** * Create a Article. - * @member {number} [wordCount] The number of words in the text of the + * @property {number} [wordCount] The number of words in the text of the * Article. */ constructor() { diff --git a/lib/services/newsSearch/lib/models/creativeWork.js b/lib/services/newsSearch/lib/models/creativeWork.js index 9ea91e0c04..ec231a231f 100644 --- a/lib/services/newsSearch/lib/models/creativeWork.js +++ b/lib/services/newsSearch/lib/models/creativeWork.js @@ -21,22 +21,22 @@ const models = require('./index'); class CreativeWork extends models['Thing'] { /** * Create a CreativeWork. - * @member {string} [thumbnailUrl] The URL to a thumbnail of the item. - * @member {array} [provider] The source of the creative work. - * @member {string} [datePublished] The date on which the CreativeWork was + * @property {string} [thumbnailUrl] The URL to a thumbnail of the item. + * @property {array} [provider] The source of the creative work. + * @property {string} [datePublished] The date on which the CreativeWork was * published. - * @member {object} [video] A video of the item. - * @member {string} [video.motionThumbnailUrl] - * @member {string} [video.motionThumbnailId] - * @member {string} [video.embedHtml] - * @member {boolean} [video.allowHttpsEmbed] - * @member {number} [video.viewCount] - * @member {object} [video.thumbnail] - * @member {object} [video.thumbnail.thumbnail] The URL to a thumbnail of the - * image - * @member {string} [video.videoId] - * @member {boolean} [video.allowMobileEmbed] - * @member {boolean} [video.isSuperfresh] + * @property {object} [video] A video of the item. + * @property {string} [video.motionThumbnailUrl] + * @property {string} [video.motionThumbnailId] + * @property {string} [video.embedHtml] + * @property {boolean} [video.allowHttpsEmbed] + * @property {number} [video.viewCount] + * @property {object} [video.thumbnail] + * @property {object} [video.thumbnail.thumbnail] The URL to a thumbnail of + * the image + * @property {string} [video.videoId] + * @property {boolean} [video.allowMobileEmbed] + * @property {boolean} [video.isSuperfresh] */ constructor() { super(); diff --git a/lib/services/newsSearch/lib/models/errorModel.js b/lib/services/newsSearch/lib/models/errorModel.js index 29a10321dd..d827e4885e 100644 --- a/lib/services/newsSearch/lib/models/errorModel.js +++ b/lib/services/newsSearch/lib/models/errorModel.js @@ -17,22 +17,22 @@ class ErrorModel { /** * Create a ErrorModel. - * @member {string} code The error code that identifies the category of + * @property {string} code The error code that identifies the category of * error. Possible values include: 'None', 'ServerError', 'InvalidRequest', * 'RateLimitExceeded', 'InvalidAuthorization', 'InsufficientAuthorization'. * Default value: 'None' . - * @member {string} [subCode] The error code that further helps to identify + * @property {string} [subCode] The error code that further helps to identify * the error. Possible values include: 'UnexpectedError', 'ResourceError', * 'NotImplemented', 'ParameterMissing', 'ParameterInvalidValue', * 'HttpNotAllowed', 'Blocked', 'AuthorizationMissing', * 'AuthorizationRedundancy', 'AuthorizationDisabled', 'AuthorizationExpired' - * @member {string} message A description of the error. - * @member {string} [moreDetails] A description that provides additional + * @property {string} message A description of the error. + * @property {string} [moreDetails] A description that provides additional * information about the error. - * @member {string} [parameter] The parameter in the request that caused the - * error. - * @member {string} [value] The parameter's value in the request that was not - * valid. + * @property {string} [parameter] The parameter in the request that caused + * the error. + * @property {string} [value] The parameter's value in the request that was + * not valid. */ constructor() { } diff --git a/lib/services/newsSearch/lib/models/errorResponse.js b/lib/services/newsSearch/lib/models/errorResponse.js index 3b2a7eb37f..753ea85cac 100644 --- a/lib/services/newsSearch/lib/models/errorResponse.js +++ b/lib/services/newsSearch/lib/models/errorResponse.js @@ -20,8 +20,8 @@ const models = require('./index'); class ErrorResponse extends models['Response'] { /** * Create a ErrorResponse. - * @member {array} errors A list of errors that describe the reasons why the - * request failed. + * @property {array} errors A list of errors that describe the reasons why + * the request failed. */ constructor() { super(); diff --git a/lib/services/newsSearch/lib/models/identifiable.js b/lib/services/newsSearch/lib/models/identifiable.js index 6cc9e3d679..51ceb85de4 100644 --- a/lib/services/newsSearch/lib/models/identifiable.js +++ b/lib/services/newsSearch/lib/models/identifiable.js @@ -20,7 +20,7 @@ const models = require('./index'); class Identifiable extends models['ResponseBase'] { /** * Create a Identifiable. - * @member {string} [id] A String identifier. + * @property {string} [id] A String identifier. */ constructor() { super(); diff --git a/lib/services/newsSearch/lib/models/imageObject.js b/lib/services/newsSearch/lib/models/imageObject.js index dea3a12f64..1924c3ebf0 100644 --- a/lib/services/newsSearch/lib/models/imageObject.js +++ b/lib/services/newsSearch/lib/models/imageObject.js @@ -20,7 +20,7 @@ const models = require('./index'); class ImageObject extends models['MediaObject'] { /** * Create a ImageObject. - * @member {object} [thumbnail] The URL to a thumbnail of the image + * @property {object} [thumbnail] The URL to a thumbnail of the image */ constructor() { super(); diff --git a/lib/services/newsSearch/lib/models/index.d.ts b/lib/services/newsSearch/lib/models/index.d.ts index d1042b151d..9e9a396175 100644 --- a/lib/services/newsSearch/lib/models/index.d.ts +++ b/lib/services/newsSearch/lib/models/index.d.ts @@ -1,305 +1,245 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import * as moment from "moment"; - /** - * @class - * Initializes a new instance of the ResponseBase class. - * @constructor * Response base - * - * @member {string} _type Polymorphic Discriminator */ export interface ResponseBase { + /** + * Polymorphic Discriminator + */ _type: string; } /** - * @class - * Initializes a new instance of the Identifiable class. - * @constructor * Defines the identity of a resource. - * - * @member {string} [id] A String identifier. */ export interface Identifiable extends ResponseBase { + /** + * A String identifier. + */ readonly id?: string; } /** - * @class - * Initializes a new instance of the Response class. - * @constructor - * Defines a response. All schemas that could be returned at the root of a - * response should inherit from this - * - * @member {string} [webSearchUrl] The URL To Bing's search result for this - * item. + * Defines a response. All schemas that could be returned at the root of a response should inherit + * from this */ export interface Response extends Identifiable { + /** + * The URL To Bing's search result for this item. + */ readonly webSearchUrl?: string; } /** - * @class - * Initializes a new instance of the Thing class. - * @constructor * Defines a thing. - * - * @member {string} [name] The name of the thing represented by this object. - * @member {string} [url] The URL to get more information about the thing - * represented by this object. - * @member {object} [image] An image of the item. - * @member {object} [image.thumbnail] The URL to a thumbnail of the image - * @member {string} [description] A short description of the item. - * @member {string} [alternateName] An alias for the item - * @member {string} [bingId] An ID that uniquely identifies this item. */ export interface Thing extends Response { + /** + * The name of the thing represented by this object. + */ readonly name?: string; + /** + * The URL to get more information about the thing represented by this object. + */ readonly url?: string; + /** + * An image of the item. + */ readonly image?: ImageObject; + /** + * A short description of the item. + */ readonly description?: string; + /** + * An alias for the item + */ readonly alternateName?: string; + /** + * An ID that uniquely identifies this item. + */ readonly bingId?: string; } /** - * @class - * Initializes a new instance of the CreativeWork class. - * @constructor - * The most generic kind of creative work, including books, movies, - * photographs, software programs, etc. - * - * @member {string} [thumbnailUrl] The URL to a thumbnail of the item. - * @member {array} [provider] The source of the creative work. - * @member {string} [datePublished] The date on which the CreativeWork was - * published. - * @member {object} [video] A video of the item. - * @member {string} [video.motionThumbnailUrl] - * @member {string} [video.motionThumbnailId] - * @member {string} [video.embedHtml] - * @member {boolean} [video.allowHttpsEmbed] - * @member {number} [video.viewCount] - * @member {object} [video.thumbnail] - * @member {object} [video.thumbnail.thumbnail] The URL to a thumbnail of the - * image - * @member {string} [video.videoId] - * @member {boolean} [video.allowMobileEmbed] - * @member {boolean} [video.isSuperfresh] + * The most generic kind of creative work, including books, movies, photographs, software programs, + * etc. */ export interface CreativeWork extends Thing { + /** + * The URL to a thumbnail of the item. + */ readonly thumbnailUrl?: string; + /** + * The source of the creative work. + */ readonly provider?: Thing[]; + /** + * The date on which the CreativeWork was published. + */ readonly datePublished?: string; + /** + * A video of the item. + */ readonly video?: VideoObject; } -/** - * @class - * Initializes a new instance of the Article class. - * @constructor - * @member {number} [wordCount] The number of words in the text of the Article. - */ export interface Article extends CreativeWork { + /** + * The number of words in the text of the Article. + */ readonly wordCount?: number; } /** - * @class - * Initializes a new instance of the NewsArticle class. - * @constructor * Defines a news article. - * - * @member {string} [category] The news category that the article belongs to. - * For example, Sports. If the news category cannot be determined, the article - * does not include this field. - * @member {boolean} [headline] A Boolean value that indicates whether the news - * article is a headline. If true, the article is a headline. The article - * includes this field only for news categories requests that do not specify - * the category query parameter. - * @member {array} [clusteredArticles] A list of related news articles. - */ +*/ export interface NewsArticle extends Article { + /** + * The news category that the article belongs to. For example, Sports. If the news category + * cannot be determined, the article does not include this field. + */ readonly category?: string; + /** + * A Boolean value that indicates whether the news article is a headline. If true, the article is + * a headline. The article includes this field only for news categories requests that do not + * specify the category query parameter. + */ readonly headline?: boolean; + /** + * A list of related news articles. + */ readonly clusteredArticles?: NewsArticle[]; } /** - * @class - * Initializes a new instance of the Answer class. - * @constructor * Defines an answer. - * - * @member {array} [followUpQueries] - */ +*/ export interface Answer extends Response { readonly followUpQueries?: Query[]; } /** - * @class - * Initializes a new instance of the SearchResultsAnswer class. - * @constructor * Defines a search result answer. - * - * @member {number} [totalEstimatedMatches] The estimated number of webpages - * that are relevant to the query. Use this number along with the count and - * offset query parameters to page the results. - */ +*/ export interface SearchResultsAnswer extends Answer { + /** + * The estimated number of webpages that are relevant to the query. Use this number along with + * the count and offset query parameters to page the results. + */ readonly totalEstimatedMatches?: number; } /** - * @class - * Initializes a new instance of the News class. - * @constructor * Defines a news answer. - * - * @member {array} value An array of NewsArticle objects that contain - * information about news articles that are relevant to the query. If there are - * no results to return for the request, the array is empty. - * @member {string} [location] Location of local news - */ +*/ export interface News extends SearchResultsAnswer { + /** + * An array of NewsArticle objects that contain information about news articles that are relevant + * to the query. If there are no results to return for the request, the array is empty. + */ value: NewsArticle[]; + /** + * Location of local news + */ readonly location?: string; } /** - * @class - * Initializes a new instance of the MediaObject class. - * @constructor * Defines a media object. - * - * @member {string} [contentUrl] Original URL to retrieve the source (file) for - * the media object (e.g the source URL for the image). - * @member {number} [width] The width of the source media object, in pixels. - * @member {number} [height] The height of the source media object, in pixels. - */ +*/ export interface MediaObject extends CreativeWork { + /** + * Original URL to retrieve the source (file) for the media object (e.g the source URL for the + * image). + */ readonly contentUrl?: string; + /** + * The width of the source media object, in pixels. + */ readonly width?: number; + /** + * The height of the source media object, in pixels. + */ readonly height?: number; } /** - * @class - * Initializes a new instance of the ImageObject class. - * @constructor * Defines an image - * - * @member {object} [thumbnail] The URL to a thumbnail of the image - */ +*/ export interface ImageObject extends MediaObject { + /** + * The URL to a thumbnail of the image + */ readonly thumbnail?: ImageObject; } /** - * @class - * Initializes a new instance of the Query class. - * @constructor * Defines a search query. - * - * @member {string} text The query string. Use this string as the query term in - * a new search request. - * @member {string} [displayText] The display version of the query term. This - * version of the query term may contain special characters that highlight the - * search term found in the query string. The string contains the highlighting - * characters only if the query enabled hit highlighting - * @member {string} [webSearchUrl] The URL that takes the user to the Bing - * search results page for the query.Only related search results include this - * field. - * @member {string} [searchLink] The URL that you use to get the results of the - * related search. Before using the URL, you must append query parameters as - * appropriate and include the Ocp-Apim-Subscription-Key header. Use this URL - * if you're displaying the results in your own user interface. Otherwise, use - * the webSearchUrl URL. - * @member {object} [thumbnail] The URL to a thumbnail of a related image. - * @member {object} [thumbnail.thumbnail] The URL to a thumbnail of the image - */ +*/ export interface Query { + /** + * The query string. Use this string as the query term in a new search request. + */ text: string; + /** + * The display version of the query term. This version of the query term may contain special + * characters that highlight the search term found in the query string. The string contains the + * highlighting characters only if the query enabled hit highlighting + */ readonly displayText?: string; + /** + * The URL that takes the user to the Bing search results page for the query.Only related search + * results include this field. + */ readonly webSearchUrl?: string; + /** + * The URL that you use to get the results of the related search. Before using the URL, you must + * append query parameters as appropriate and include the Ocp-Apim-Subscription-Key header. Use + * this URL if you're displaying the results in your own user interface. Otherwise, use the + * webSearchUrl URL. + */ readonly searchLink?: string; + /** + * The URL to a thumbnail of a related image. + */ readonly thumbnail?: ImageObject; } -/** - * @class - * Initializes a new instance of the NewsTopic class. - * @constructor - * @member {boolean} [isBreakingNews] A Boolean value that indicates whether - * the topic is considered breaking news. If the topic is considered breaking - * news, the value is true. - * @member {object} [query] A search query term that returns this trending - * topic. - * @member {string} [query.text] The query string. Use this string as the query - * term in a new search request. - * @member {string} [query.displayText] The display version of the query term. - * This version of the query term may contain special characters that highlight - * the search term found in the query string. The string contains the - * highlighting characters only if the query enabled hit highlighting - * @member {string} [query.webSearchUrl] The URL that takes the user to the - * Bing search results page for the query.Only related search results include - * this field. - * @member {string} [query.searchLink] The URL that you use to get the results - * of the related search. Before using the URL, you must append query - * parameters as appropriate and include the Ocp-Apim-Subscription-Key header. - * Use this URL if you're displaying the results in your own user interface. - * Otherwise, use the webSearchUrl URL. - * @member {object} [query.thumbnail] The URL to a thumbnail of a related - * image. - * @member {object} [query.thumbnail.thumbnail] The URL to a thumbnail of the - * image - * @member {string} [newsSearchUrl] The URL to the Bing News search results for - * the search query term - */ export interface NewsTopic extends Thing { + /** + * A Boolean value that indicates whether the topic is considered breaking news. If the topic is + * considered breaking news, the value is true. + */ readonly isBreakingNews?: boolean; + /** + * A search query term that returns this trending topic. + */ readonly query?: Query; + /** + * The URL to the Bing News search results for the search query term + */ readonly newsSearchUrl?: string; } -/** - * @class - * Initializes a new instance of the TrendingTopics class. - * @constructor - * @member {array} value A list of trending news topics on Bing - */ export interface TrendingTopics extends Answer { + /** + * A list of trending news topics on Bing + */ value: NewsTopic[]; } /** - * @class - * Initializes a new instance of the VideoObject class. - * @constructor * Defines a video object that is relevant to the query. - * - * @member {string} [motionThumbnailUrl] - * @member {string} [motionThumbnailId] - * @member {string} [embedHtml] - * @member {boolean} [allowHttpsEmbed] - * @member {number} [viewCount] - * @member {object} [thumbnail] - * @member {object} [thumbnail.thumbnail] The URL to a thumbnail of the image - * @member {string} [videoId] - * @member {boolean} [allowMobileEmbed] - * @member {boolean} [isSuperfresh] - */ +*/ export interface VideoObject extends MediaObject { readonly motionThumbnailUrl?: string; readonly motionThumbnailId?: string; @@ -313,56 +253,52 @@ export interface VideoObject extends MediaObject { } /** - * @class - * Initializes a new instance of the Organization class. - * @constructor * Defines an organization. - * - */ +*/ export interface Organization extends Thing { } /** - * @class - * Initializes a new instance of the ErrorModel class. - * @constructor * Defines the error that occurred. - * - * @member {string} code The error code that identifies the category of error. - * Possible values include: 'None', 'ServerError', 'InvalidRequest', - * 'RateLimitExceeded', 'InvalidAuthorization', 'InsufficientAuthorization'. - * Default value: 'None' . - * @member {string} [subCode] The error code that further helps to identify the - * error. Possible values include: 'UnexpectedError', 'ResourceError', - * 'NotImplemented', 'ParameterMissing', 'ParameterInvalidValue', - * 'HttpNotAllowed', 'Blocked', 'AuthorizationMissing', - * 'AuthorizationRedundancy', 'AuthorizationDisabled', 'AuthorizationExpired' - * @member {string} message A description of the error. - * @member {string} [moreDetails] A description that provides additional - * information about the error. - * @member {string} [parameter] The parameter in the request that caused the - * error. - * @member {string} [value] The parameter's value in the request that was not - * valid. - */ +*/ export interface ErrorModel { + /** + * The error code that identifies the category of error. Possible values include: 'None', + * 'ServerError', 'InvalidRequest', 'RateLimitExceeded', 'InvalidAuthorization', + * 'InsufficientAuthorization' + */ code: string; + /** + * The error code that further helps to identify the error. Possible values include: + * 'UnexpectedError', 'ResourceError', 'NotImplemented', 'ParameterMissing', + * 'ParameterInvalidValue', 'HttpNotAllowed', 'Blocked', 'AuthorizationMissing', + * 'AuthorizationRedundancy', 'AuthorizationDisabled', 'AuthorizationExpired' + */ readonly subCode?: string; + /** + * A description of the error. + */ message: string; + /** + * A description that provides additional information about the error. + */ readonly moreDetails?: string; + /** + * The parameter in the request that caused the error. + */ readonly parameter?: string; + /** + * The parameter's value in the request that was not valid. + */ readonly value?: string; } /** - * @class - * Initializes a new instance of the ErrorResponse class. - * @constructor * The top-level response that represents a failed request. - * - * @member {array} errors A list of errors that describe the reasons why the - * request failed. - */ +*/ export interface ErrorResponse extends Response { + /** + * A list of errors that describe the reasons why the request failed. + */ errors: ErrorModel[]; } diff --git a/lib/services/newsSearch/lib/models/mediaObject.js b/lib/services/newsSearch/lib/models/mediaObject.js index 5a19e4e20a..ff5c6061ee 100644 --- a/lib/services/newsSearch/lib/models/mediaObject.js +++ b/lib/services/newsSearch/lib/models/mediaObject.js @@ -20,10 +20,11 @@ const models = require('./index'); class MediaObject extends models['CreativeWork'] { /** * Create a MediaObject. - * @member {string} [contentUrl] Original URL to retrieve the source (file) + * @property {string} [contentUrl] Original URL to retrieve the source (file) * for the media object (e.g the source URL for the image). - * @member {number} [width] The width of the source media object, in pixels. - * @member {number} [height] The height of the source media object, in + * @property {number} [width] The width of the source media object, in + * pixels. + * @property {number} [height] The height of the source media object, in * pixels. */ constructor() { diff --git a/lib/services/newsSearch/lib/models/news.js b/lib/services/newsSearch/lib/models/news.js index bfa21f8467..22c3d2785c 100644 --- a/lib/services/newsSearch/lib/models/news.js +++ b/lib/services/newsSearch/lib/models/news.js @@ -20,10 +20,10 @@ const models = require('./index'); class News extends models['SearchResultsAnswer'] { /** * Create a News. - * @member {array} value An array of NewsArticle objects that contain + * @property {array} value An array of NewsArticle objects that contain * information about news articles that are relevant to the query. If there * are no results to return for the request, the array is empty. - * @member {string} [location] Location of local news + * @property {string} [location] Location of local news */ constructor() { super(); diff --git a/lib/services/newsSearch/lib/models/newsArticle.js b/lib/services/newsSearch/lib/models/newsArticle.js index 5d5075b32d..6e6e0de628 100644 --- a/lib/services/newsSearch/lib/models/newsArticle.js +++ b/lib/services/newsSearch/lib/models/newsArticle.js @@ -20,14 +20,14 @@ const models = require('./index'); class NewsArticle extends models['Article'] { /** * Create a NewsArticle. - * @member {string} [category] The news category that the article belongs to. - * For example, Sports. If the news category cannot be determined, the + * @property {string} [category] The news category that the article belongs + * to. For example, Sports. If the news category cannot be determined, the * article does not include this field. - * @member {boolean} [headline] A Boolean value that indicates whether the + * @property {boolean} [headline] A Boolean value that indicates whether the * news article is a headline. If true, the article is a headline. The * article includes this field only for news categories requests that do not * specify the category query parameter. - * @member {array} [clusteredArticles] A list of related news articles. + * @property {array} [clusteredArticles] A list of related news articles. */ constructor() { super(); diff --git a/lib/services/newsSearch/lib/models/newsTopic.js b/lib/services/newsSearch/lib/models/newsTopic.js index 87622efce9..b9e3a023bc 100644 --- a/lib/services/newsSearch/lib/models/newsTopic.js +++ b/lib/services/newsSearch/lib/models/newsTopic.js @@ -19,30 +19,30 @@ const models = require('./index'); class NewsTopic extends models['Thing'] { /** * Create a NewsTopic. - * @member {boolean} [isBreakingNews] A Boolean value that indicates whether - * the topic is considered breaking news. If the topic is considered breaking - * news, the value is true. - * @member {object} [query] A search query term that returns this trending + * @property {boolean} [isBreakingNews] A Boolean value that indicates + * whether the topic is considered breaking news. If the topic is considered + * breaking news, the value is true. + * @property {object} [query] A search query term that returns this trending * topic. - * @member {string} [query.text] The query string. Use this string as the + * @property {string} [query.text] The query string. Use this string as the * query term in a new search request. - * @member {string} [query.displayText] The display version of the query + * @property {string} [query.displayText] The display version of the query * term. This version of the query term may contain special characters that * highlight the search term found in the query string. The string contains * the highlighting characters only if the query enabled hit highlighting - * @member {string} [query.webSearchUrl] The URL that takes the user to the + * @property {string} [query.webSearchUrl] The URL that takes the user to the * Bing search results page for the query.Only related search results include * this field. - * @member {string} [query.searchLink] The URL that you use to get the + * @property {string} [query.searchLink] The URL that you use to get the * results of the related search. Before using the URL, you must append query * parameters as appropriate and include the Ocp-Apim-Subscription-Key * header. Use this URL if you're displaying the results in your own user * interface. Otherwise, use the webSearchUrl URL. - * @member {object} [query.thumbnail] The URL to a thumbnail of a related + * @property {object} [query.thumbnail] The URL to a thumbnail of a related * image. - * @member {object} [query.thumbnail.thumbnail] The URL to a thumbnail of the - * image - * @member {string} [newsSearchUrl] The URL to the Bing News search results + * @property {object} [query.thumbnail.thumbnail] The URL to a thumbnail of + * the image + * @property {string} [newsSearchUrl] The URL to the Bing News search results * for the search query term */ constructor() { diff --git a/lib/services/newsSearch/lib/models/query.js b/lib/services/newsSearch/lib/models/query.js index 7d46394860..0004b65370 100644 --- a/lib/services/newsSearch/lib/models/query.js +++ b/lib/services/newsSearch/lib/models/query.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Defines a search query. * @@ -19,22 +17,23 @@ const models = require('./index'); class Query { /** * Create a Query. - * @member {string} text The query string. Use this string as the query term - * in a new search request. - * @member {string} [displayText] The display version of the query term. This - * version of the query term may contain special characters that highlight - * the search term found in the query string. The string contains the - * highlighting characters only if the query enabled hit highlighting - * @member {string} [webSearchUrl] The URL that takes the user to the Bing + * @property {string} text The query string. Use this string as the query + * term in a new search request. + * @property {string} [displayText] The display version of the query term. + * This version of the query term may contain special characters that + * highlight the search term found in the query string. The string contains + * the highlighting characters only if the query enabled hit highlighting + * @property {string} [webSearchUrl] The URL that takes the user to the Bing * search results page for the query.Only related search results include this * field. - * @member {string} [searchLink] The URL that you use to get the results of + * @property {string} [searchLink] The URL that you use to get the results of * the related search. Before using the URL, you must append query parameters * as appropriate and include the Ocp-Apim-Subscription-Key header. Use this * URL if you're displaying the results in your own user interface. * Otherwise, use the webSearchUrl URL. - * @member {object} [thumbnail] The URL to a thumbnail of a related image. - * @member {object} [thumbnail.thumbnail] The URL to a thumbnail of the image + * @property {object} [thumbnail] The URL to a thumbnail of a related image. + * @property {object} [thumbnail.thumbnail] The URL to a thumbnail of the + * image */ constructor() { } diff --git a/lib/services/newsSearch/lib/models/response.js b/lib/services/newsSearch/lib/models/response.js index cc3b85c266..0bb2aacfa3 100644 --- a/lib/services/newsSearch/lib/models/response.js +++ b/lib/services/newsSearch/lib/models/response.js @@ -21,7 +21,7 @@ const models = require('./index'); class Response extends models['Identifiable'] { /** * Create a Response. - * @member {string} [webSearchUrl] The URL To Bing's search result for this + * @property {string} [webSearchUrl] The URL To Bing's search result for this * item. */ constructor() { diff --git a/lib/services/newsSearch/lib/models/responseBase.js b/lib/services/newsSearch/lib/models/responseBase.js index 28a5d0d020..902b737a95 100644 --- a/lib/services/newsSearch/lib/models/responseBase.js +++ b/lib/services/newsSearch/lib/models/responseBase.js @@ -17,7 +17,7 @@ class ResponseBase { /** * Create a ResponseBase. - * @member {string} _type Polymorphic Discriminator + * @property {string} _type Polymorphic Discriminator */ constructor() { } diff --git a/lib/services/newsSearch/lib/models/searchResultsAnswer.js b/lib/services/newsSearch/lib/models/searchResultsAnswer.js index 07d3693864..0229e7820c 100644 --- a/lib/services/newsSearch/lib/models/searchResultsAnswer.js +++ b/lib/services/newsSearch/lib/models/searchResultsAnswer.js @@ -20,9 +20,9 @@ const models = require('./index'); class SearchResultsAnswer extends models['Answer'] { /** * Create a SearchResultsAnswer. - * @member {number} [totalEstimatedMatches] The estimated number of webpages - * that are relevant to the query. Use this number along with the count and - * offset query parameters to page the results. + * @property {number} [totalEstimatedMatches] The estimated number of + * webpages that are relevant to the query. Use this number along with the + * count and offset query parameters to page the results. */ constructor() { super(); diff --git a/lib/services/newsSearch/lib/models/thing.js b/lib/services/newsSearch/lib/models/thing.js index 0dbb87b07d..b340fe3835 100644 --- a/lib/services/newsSearch/lib/models/thing.js +++ b/lib/services/newsSearch/lib/models/thing.js @@ -20,14 +20,15 @@ const models = require('./index'); class Thing extends models['Response'] { /** * Create a Thing. - * @member {string} [name] The name of the thing represented by this object. - * @member {string} [url] The URL to get more information about the thing + * @property {string} [name] The name of the thing represented by this + * object. + * @property {string} [url] The URL to get more information about the thing * represented by this object. - * @member {object} [image] An image of the item. - * @member {object} [image.thumbnail] The URL to a thumbnail of the image - * @member {string} [description] A short description of the item. - * @member {string} [alternateName] An alias for the item - * @member {string} [bingId] An ID that uniquely identifies this item. + * @property {object} [image] An image of the item. + * @property {object} [image.thumbnail] The URL to a thumbnail of the image + * @property {string} [description] A short description of the item. + * @property {string} [alternateName] An alias for the item + * @property {string} [bingId] An ID that uniquely identifies this item. */ constructor() { super(); diff --git a/lib/services/newsSearch/lib/models/trendingTopics.js b/lib/services/newsSearch/lib/models/trendingTopics.js index 9dac623d46..9ff7e129c0 100644 --- a/lib/services/newsSearch/lib/models/trendingTopics.js +++ b/lib/services/newsSearch/lib/models/trendingTopics.js @@ -19,7 +19,7 @@ const models = require('./index'); class TrendingTopics extends models['Answer'] { /** * Create a TrendingTopics. - * @member {array} value A list of trending news topics on Bing + * @property {array} value A list of trending news topics on Bing */ constructor() { super(); diff --git a/lib/services/newsSearch/lib/models/videoObject.js b/lib/services/newsSearch/lib/models/videoObject.js index 624b4367c8..a44eaaed3f 100644 --- a/lib/services/newsSearch/lib/models/videoObject.js +++ b/lib/services/newsSearch/lib/models/videoObject.js @@ -20,16 +20,17 @@ const models = require('./index'); class VideoObject extends models['MediaObject'] { /** * Create a VideoObject. - * @member {string} [motionThumbnailUrl] - * @member {string} [motionThumbnailId] - * @member {string} [embedHtml] - * @member {boolean} [allowHttpsEmbed] - * @member {number} [viewCount] - * @member {object} [thumbnail] - * @member {object} [thumbnail.thumbnail] The URL to a thumbnail of the image - * @member {string} [videoId] - * @member {boolean} [allowMobileEmbed] - * @member {boolean} [isSuperfresh] + * @property {string} [motionThumbnailUrl] + * @property {string} [motionThumbnailId] + * @property {string} [embedHtml] + * @property {boolean} [allowHttpsEmbed] + * @property {number} [viewCount] + * @property {object} [thumbnail] + * @property {object} [thumbnail.thumbnail] The URL to a thumbnail of the + * image + * @property {string} [videoId] + * @property {boolean} [allowMobileEmbed] + * @property {boolean} [isSuperfresh] */ constructor() { super(); diff --git a/lib/services/newsSearch/lib/newsSearchAPIClient.d.ts b/lib/services/newsSearch/lib/newsSearchClient.d.ts similarity index 58% rename from lib/services/newsSearch/lib/newsSearchAPIClient.d.ts rename to lib/services/newsSearch/lib/newsSearchClient.d.ts index 740be7ef7b..395092f10a 100644 --- a/lib/services/newsSearch/lib/newsSearchAPIClient.d.ts +++ b/lib/services/newsSearch/lib/newsSearchClient.d.ts @@ -12,16 +12,24 @@ import { ServiceClient, ServiceClientOptions, ServiceClientCredentials } from 'm import * as models from "./models"; import * as operations from "./operations"; -export default class NewsSearchAPIClient extends ServiceClient { +/** + * NewsSearchClientOptions for NewsSearchClient. + */ +declare interface NewsSearchClientOptions extends ServiceClientOptions { + /** + * @property {string} [endpoint] - Supported Cognitive Services endpoints (protocol and hostname, for example: "https://westus.api.cognitive.microsoft.com", "https://api.cognitive.microsoft.com"). + */ + endpoint?: string; +} + +export default class NewsSearchClient extends ServiceClient { /** * @class - * Initializes a new instance of the NewsSearchAPIClient class. + * Initializes a new instance of the NewsSearchClient class. * @constructor * * @param {credentials} credentials - Subscription credentials which uniquely identify client subscription. * - * @param {string} [baseUri] - The base URI of the service. - * * @param {object} [options] - The parameter options * * @param {Array} [options.filters] - Filters to be added to the request pipeline @@ -31,13 +39,17 @@ export default class NewsSearchAPIClient extends ServiceClient { * * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy * + * @param {string} [options.endpoint] - Supported Cognitive Services endpoints (protocol and hostname, for example: "https://westus.api.cognitive.microsoft.com", "https://api.cognitive.microsoft.com"). + * */ - constructor(credentials: ServiceClientCredentials, baseUri?: string, options?: ServiceClientOptions); + constructor(credentials: ServiceClientCredentials, options?: NewsSearchClientOptions); credentials: ServiceClientCredentials; + endpoint: string; + // Operation groups newsOperations: operations.NewsOperations; } -export { NewsSearchAPIClient, models as NewsSearchAPIModels }; +export { NewsSearchClient, models as NewsSearchModels }; diff --git a/lib/services/newsSearch/lib/newsSearchAPIClient.js b/lib/services/newsSearch/lib/newsSearchClient.js similarity index 68% rename from lib/services/newsSearch/lib/newsSearchAPIClient.js rename to lib/services/newsSearch/lib/newsSearchClient.js index f4ebee5cc1..789b1822cc 100644 --- a/lib/services/newsSearch/lib/newsSearchAPIClient.js +++ b/lib/services/newsSearch/lib/newsSearchClient.js @@ -21,19 +21,19 @@ const models = require('./models'); const operations = require('./operations'); -/** Class representing a NewsSearchAPIClient. */ -class NewsSearchAPIClient extends ServiceClient { +/** Class representing a NewsSearchClient. */ +class NewsSearchClient extends ServiceClient { /** - * Create a NewsSearchAPIClient. + * Create a NewsSearchClient. * @param {credentials} credentials - Subscription credentials which uniquely identify client subscription. - * @param {string} [baseUri] - The base URI of the service. * @param {object} [options] - The parameter options * @param {Array} [options.filters] - Filters to be added to the request pipeline * @param {object} [options.requestOptions] - Options for the underlying request object * {@link https://github.com/request/request#requestoptions-callback Options doc} * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy + * @param {string} [options.endpoint] - Supported Cognitive Services endpoints (protocol and hostname, for example: "https://westus.api.cognitive.microsoft.com", "https://api.cognitive.microsoft.com"). */ - constructor(credentials, baseUri, options) { + constructor(credentials, options) { if (credentials === null || credentials === undefined) { throw new Error('\'credentials\' cannot be null.'); } @@ -42,14 +42,15 @@ class NewsSearchAPIClient extends ServiceClient { super(credentials, options); - this.baseUri = baseUri; - if (!this.baseUri) { - this.baseUri = 'https://api.cognitive.microsoft.com/bing/v7.0'; - } + this.endpoint = 'https://api.cognitive.microsoft.com'; + this.baseUri = '{Endpoint}/bing/v7.0'; this.credentials = credentials; let packageInfo = this.getPackageJsonInfo(__dirname); this.addUserAgentInfo(`${packageInfo.name}/${packageInfo.version}`); + if(options.endpoint !== null && options.endpoint !== undefined) { + this.endpoint = options.endpoint; + } this.newsOperations = new operations.NewsOperations(this); this.models = models; msRest.addSerializationMixin(this); @@ -57,7 +58,7 @@ class NewsSearchAPIClient extends ServiceClient { } -module.exports = NewsSearchAPIClient; -module.exports['default'] = NewsSearchAPIClient; -module.exports.NewsSearchAPIClient = NewsSearchAPIClient; -module.exports.NewsSearchAPIModels = models; +module.exports = NewsSearchClient; +module.exports['default'] = NewsSearchClient; +module.exports.NewsSearchClient = NewsSearchClient; +module.exports.NewsSearchModels = models; diff --git a/lib/services/newsSearch/lib/operations/index.d.ts b/lib/services/newsSearch/lib/operations/index.d.ts index 06f2e253df..9a2f75ced4 100644 --- a/lib/services/newsSearch/lib/operations/index.d.ts +++ b/lib/services/newsSearch/lib/operations/index.d.ts @@ -16,7 +16,7 @@ import * as models from '../models'; * @class * NewsOperations * __NOTE__: An instance of this class is automatically created for an - * instance of the NewsSearchAPIClient. + * instance of the NewsSearchClient. */ export interface NewsOperations { @@ -575,11 +575,11 @@ export interface NewsOperations { /** - * @summary The News Category API lets lets you search on Bing and get back a - * list of top news articles by category. This section provides technical - * details about the query parameters and headers that you use to request news - * and the JSON response objects that contain them. For examples that show how - * to make requests, see [Searching the web for + * @summary The News Category API lets you search on Bing and get back a list + * of top news articles by category. This section provides technical details + * about the query parameters and headers that you use to request news and the + * JSON response objects that contain them. For examples that show how to make + * requests, see [Searching the web for * news](https://docs.microsoft.com/en-us/azure/cognitive-services/bing-news-search/search-the-web). * * @param {object} [options] Optional Parameters. @@ -843,11 +843,11 @@ export interface NewsOperations { categoryWithHttpOperationResponse(options?: { acceptLanguage? : string, userAgent? : string, clientId? : string, clientIp? : string, location? : string, countryCode? : string, category? : string, count? : number, headlineCount? : number, market? : string, offset? : number, originalImage? : boolean, safeSearch? : string, setLang? : string, textDecorations? : boolean, textFormat? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary The News Category API lets lets you search on Bing and get back a - * list of top news articles by category. This section provides technical - * details about the query parameters and headers that you use to request news - * and the JSON response objects that contain them. For examples that show how - * to make requests, see [Searching the web for + * @summary The News Category API lets you search on Bing and get back a list + * of top news articles by category. This section provides technical details + * about the query parameters and headers that you use to request news and the + * JSON response objects that contain them. For examples that show how to make + * requests, see [Searching the web for * news](https://docs.microsoft.com/en-us/azure/cognitive-services/bing-news-search/search-the-web). * * @param {object} [options] Optional Parameters. @@ -1130,12 +1130,12 @@ export interface NewsOperations { /** - * @summary The News Trending Topics API lets lets you search on Bing and get - * back a list of trending news topics that are currently trending on Bing. - * This section provides technical details about the query parameters and - * headers that you use to request news and the JSON response objects that - * contain them. For examples that show how to make requests, see [Searching - * the web for + * @summary The News Trending Topics API lets you search on Bing and get back a + * list of trending news topics that are currently trending on Bing. This + * section provides technical details about the query parameters and headers + * that you use to request news and the JSON response objects that contain + * them. For examples that show how to make requests, see [Searching the web + * for * news](https://docs.microsoft.com/en-us/azure/cognitive-services/bing-news-search/search-the-web). * * @param {object} [options] Optional Parameters. @@ -1380,12 +1380,12 @@ export interface NewsOperations { trendingWithHttpOperationResponse(options?: { acceptLanguage? : string, userAgent? : string, clientId? : string, clientIp? : string, location? : string, countryCode? : string, count? : number, market? : string, offset? : number, safeSearch? : string, setLang? : string, since? : number, sortBy? : string, textDecorations? : boolean, textFormat? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary The News Trending Topics API lets lets you search on Bing and get - * back a list of trending news topics that are currently trending on Bing. - * This section provides technical details about the query parameters and - * headers that you use to request news and the JSON response objects that - * contain them. For examples that show how to make requests, see [Searching - * the web for + * @summary The News Trending Topics API lets you search on Bing and get back a + * list of trending news topics that are currently trending on Bing. This + * section provides technical details about the query parameters and headers + * that you use to request news and the JSON response objects that contain + * them. For examples that show how to make requests, see [Searching the web + * for * news](https://docs.microsoft.com/en-us/azure/cognitive-services/bing-news-search/search-the-web). * * @param {object} [options] Optional Parameters. diff --git a/lib/services/newsSearch/lib/operations/newsOperations.js b/lib/services/newsSearch/lib/operations/newsOperations.js index d96d6d3ff6..42101079b2 100644 --- a/lib/services/newsSearch/lib/operations/newsOperations.js +++ b/lib/services/newsSearch/lib/operations/newsOperations.js @@ -314,6 +314,9 @@ function _search(query, options, callback) { let xBingApisSDK = 'true'; // Validate try { + if (this.client.endpoint === null || this.client.endpoint === undefined || typeof this.client.endpoint.valueOf() !== 'string') { + throw new Error('this.client.endpoint cannot be null or undefined and it must be of type string.'); + } if (acceptLanguage !== null && acceptLanguage !== undefined && typeof acceptLanguage.valueOf() !== 'string') { throw new Error('acceptLanguage must be of type string.'); } @@ -372,6 +375,7 @@ function _search(query, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'news/search'; + requestUrl = requestUrl.replace('{Endpoint}', this.client.endpoint); let queryParameters = []; if (countryCode !== null && countryCode !== undefined) { queryParameters.push('cc=' + encodeURIComponent(countryCode)); @@ -502,11 +506,11 @@ function _search(query, options, callback) { } /** - * @summary The News Category API lets lets you search on Bing and get back a - * list of top news articles by category. This section provides technical - * details about the query parameters and headers that you use to request news - * and the JSON response objects that contain them. For examples that show how - * to make requests, see [Searching the web for + * @summary The News Category API lets you search on Bing and get back a list + * of top news articles by category. This section provides technical details + * about the query parameters and headers that you use to request news and the + * JSON response objects that contain them. For examples that show how to make + * requests, see [Searching the web for * news](https://docs.microsoft.com/en-us/azure/cognitive-services/bing-news-search/search-the-web). * * @param {object} [options] Optional Parameters. @@ -803,6 +807,9 @@ function _category(options, callback) { let xBingApisSDK = 'true'; // Validate try { + if (this.client.endpoint === null || this.client.endpoint === undefined || typeof this.client.endpoint.valueOf() !== 'string') { + throw new Error('this.client.endpoint cannot be null or undefined and it must be of type string.'); + } if (acceptLanguage !== null && acceptLanguage !== undefined && typeof acceptLanguage.valueOf() !== 'string') { throw new Error('acceptLanguage must be of type string.'); } @@ -858,6 +865,7 @@ function _category(options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'news'; + requestUrl = requestUrl.replace('{Endpoint}', this.client.endpoint); let queryParameters = []; if (countryCode !== null && countryCode !== undefined) { queryParameters.push('cc=' + encodeURIComponent(countryCode)); @@ -987,12 +995,12 @@ function _category(options, callback) { } /** - * @summary The News Trending Topics API lets lets you search on Bing and get - * back a list of trending news topics that are currently trending on Bing. - * This section provides technical details about the query parameters and - * headers that you use to request news and the JSON response objects that - * contain them. For examples that show how to make requests, see [Searching - * the web for + * @summary The News Trending Topics API lets you search on Bing and get back a + * list of trending news topics that are currently trending on Bing. This + * section provides technical details about the query parameters and headers + * that you use to request news and the JSON response objects that contain + * them. For examples that show how to make requests, see [Searching the web + * for * news](https://docs.microsoft.com/en-us/azure/cognitive-services/bing-news-search/search-the-web). * * @param {object} [options] Optional Parameters. @@ -1269,6 +1277,9 @@ function _trending(options, callback) { let xBingApisSDK = 'true'; // Validate try { + if (this.client.endpoint === null || this.client.endpoint === undefined || typeof this.client.endpoint.valueOf() !== 'string') { + throw new Error('this.client.endpoint cannot be null or undefined and it must be of type string.'); + } if (acceptLanguage !== null && acceptLanguage !== undefined && typeof acceptLanguage.valueOf() !== 'string') { throw new Error('acceptLanguage must be of type string.'); } @@ -1321,6 +1332,7 @@ function _trending(options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'news/trendingtopics'; + requestUrl = requestUrl.replace('{Endpoint}', this.client.endpoint); let queryParameters = []; if (countryCode !== null && countryCode !== undefined) { queryParameters.push('cc=' + encodeURIComponent(countryCode)); @@ -1450,7 +1462,7 @@ function _trending(options, callback) { class NewsOperations { /** * Create a NewsOperations. - * @param {NewsSearchAPIClient} client Reference to the service client. + * @param {NewsSearchClient} client Reference to the service client. */ constructor(client) { this.client = client; @@ -2040,11 +2052,11 @@ class NewsOperations { } /** - * @summary The News Category API lets lets you search on Bing and get back a - * list of top news articles by category. This section provides technical - * details about the query parameters and headers that you use to request news - * and the JSON response objects that contain them. For examples that show how - * to make requests, see [Searching the web for + * @summary The News Category API lets you search on Bing and get back a list + * of top news articles by category. This section provides technical details + * about the query parameters and headers that you use to request news and the + * JSON response objects that contain them. For examples that show how to make + * requests, see [Searching the web for * news](https://docs.microsoft.com/en-us/azure/cognitive-services/bing-news-search/search-the-web). * * @param {object} [options] Optional Parameters. @@ -2320,11 +2332,11 @@ class NewsOperations { } /** - * @summary The News Category API lets lets you search on Bing and get back a - * list of top news articles by category. This section provides technical - * details about the query parameters and headers that you use to request news - * and the JSON response objects that contain them. For examples that show how - * to make requests, see [Searching the web for + * @summary The News Category API lets you search on Bing and get back a list + * of top news articles by category. This section provides technical details + * about the query parameters and headers that you use to request news and the + * JSON response objects that contain them. For examples that show how to make + * requests, see [Searching the web for * news](https://docs.microsoft.com/en-us/azure/cognitive-services/bing-news-search/search-the-web). * * @param {object} [options] Optional Parameters. @@ -2622,12 +2634,12 @@ class NewsOperations { } /** - * @summary The News Trending Topics API lets lets you search on Bing and get - * back a list of trending news topics that are currently trending on Bing. - * This section provides technical details about the query parameters and - * headers that you use to request news and the JSON response objects that - * contain them. For examples that show how to make requests, see [Searching - * the web for + * @summary The News Trending Topics API lets you search on Bing and get back a + * list of trending news topics that are currently trending on Bing. This + * section provides technical details about the query parameters and headers + * that you use to request news and the JSON response objects that contain + * them. For examples that show how to make requests, see [Searching the web + * for * news](https://docs.microsoft.com/en-us/azure/cognitive-services/bing-news-search/search-the-web). * * @param {object} [options] Optional Parameters. @@ -2884,12 +2896,12 @@ class NewsOperations { } /** - * @summary The News Trending Topics API lets lets you search on Bing and get - * back a list of trending news topics that are currently trending on Bing. - * This section provides technical details about the query parameters and - * headers that you use to request news and the JSON response objects that - * contain them. For examples that show how to make requests, see [Searching - * the web for + * @summary The News Trending Topics API lets you search on Bing and get back a + * list of trending news topics that are currently trending on Bing. This + * section provides technical details about the query parameters and headers + * that you use to request news and the JSON response objects that contain + * them. For examples that show how to make requests, see [Searching the web + * for * news](https://docs.microsoft.com/en-us/azure/cognitive-services/bing-news-search/search-the-web). * * @param {object} [options] Optional Parameters. diff --git a/lib/services/newsSearch/package.json b/lib/services/newsSearch/package.json index a7a597c1a9..7dabc1ae01 100644 --- a/lib/services/newsSearch/package.json +++ b/lib/services/newsSearch/package.json @@ -1,8 +1,8 @@ { "name": "azure-cognitiveservices-newssearch", "author": "Microsoft Corporation", - "description": "NewsSearchAPIClient Library with typescript type definitions for node", - "version": "1.1.0", + "description": "NewsSearchClient Library with typescript type definitions for node", + "version": "2.0.0", "dependencies": { "ms-rest": "^2.3.3" }, @@ -11,14 +11,14 @@ "azure" ], "license": "MIT", - "main": "./lib/newsSearchAPIClient.js", - "types": "./lib/newsSearchAPIClient.d.ts", - "homepage": "http://github.com/azure/azure-sdk-for-node", + "main": "./lib/newsSearchClient.js", + "types": "./lib/newsSearchClient.d.ts", + "homepage": "https://github.com/azure/azure-sdk-for-node/tree/master/lib/services/newsSearch", "repository": { "type": "git", "url": "https://github.com/azure/azure-sdk-for-node.git" }, "bugs": { - "url": "http://github.com/Azure/azure-sdk-for-node/issues" + "url": "https://github.com/azure/azure-sdk-for-node/issues" } -} \ No newline at end of file +} diff --git a/lib/services/serviceFabric/README.md b/lib/services/serviceFabric/README.md index a567905bdb..74f31bc4e5 100644 --- a/lib/services/serviceFabric/README.md +++ b/lib/services/serviceFabric/README.md @@ -5,6 +5,7 @@ summary: *content --- **This SDK will be deprecated next year and will be replaced by a new TypeScript-based isomorphic SDK (found at https://github.com/Azure/azure-sdk-for-js) which works on Node.js and browsers.** ## Microsoft Azure SDK for Node.js - ServiceFabricClient + This project provides a Node.js package for accessing Azure. Right now it supports: - **Node.js version 6.x.x or higher** @@ -19,7 +20,7 @@ npm install azure-servicefabric ### How to use -#### Authentication, client creation and getClusterManifest as an example. +#### Authentication, client creation, and getClusterManifest as an example. ```javascript const msRest = require("ms-rest"); @@ -29,6 +30,7 @@ const creds = new msRest.TokenCredentials(token); const subscriptionId = ""; const client = new ServiceFabricClient(creds, subscriptionId); const timeout = 1; + client.getClusterManifest(timeout).then((result) => { console.log("The result is:"); console.log(result); @@ -36,6 +38,7 @@ client.getClusterManifest(timeout).then((result) => { console.log('An error occurred:'); console.dir(err, {depth: null, colors: true}); }); +``` ### Related projects diff --git a/lib/services/serviceFabric/lib/models/addRemoveReplicaScalingMechanism.js b/lib/services/serviceFabric/lib/models/addRemoveReplicaScalingMechanism.js new file mode 100644 index 0000000000..9ef59011bf --- /dev/null +++ b/lib/services/serviceFabric/lib/models/addRemoveReplicaScalingMechanism.js @@ -0,0 +1,89 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Describes the horizontal auto scaling mechanism that adds or removes + * replicas (containers or container groups). + * + * @extends models['AutoScalingMechanism'] + */ +class AddRemoveReplicaScalingMechanism extends models['AutoScalingMechanism'] { + /** + * Create a AddRemoveReplicaScalingMechanism. + * @property {number} minCount Minimum number of containers (scale down won't + * be performed below this number). + * @property {number} maxCount Maximum number of containers (scale up won't + * be performed above this number). + * @property {number} scaleIncrement Each time auto scaling is performed, + * this number of containers will be added or removed. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of AddRemoveReplicaScalingMechanism + * + * @returns {object} metadata of AddRemoveReplicaScalingMechanism + * + */ + mapper() { + return { + required: false, + serializedName: 'AddRemoveReplica', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'kind', + clientName: 'kind' + }, + uberParent: 'AutoScalingMechanism', + className: 'AddRemoveReplicaScalingMechanism', + modelProperties: { + kind: { + required: true, + serializedName: 'kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + minCount: { + required: true, + serializedName: 'minCount', + type: { + name: 'Number' + } + }, + maxCount: { + required: true, + serializedName: 'maxCount', + type: { + name: 'Number' + } + }, + scaleIncrement: { + required: true, + serializedName: 'scaleIncrement', + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = AddRemoveReplicaScalingMechanism; diff --git a/lib/services/serviceFabric/lib/models/applicationContainerInstanceExitedEvent.js b/lib/services/serviceFabric/lib/models/applicationContainerInstanceExitedEvent.js new file mode 100644 index 0000000000..8ab59ac8dc --- /dev/null +++ b/lib/services/serviceFabric/lib/models/applicationContainerInstanceExitedEvent.js @@ -0,0 +1,194 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Container Exited event. + * + * @extends models['ApplicationEvent'] + */ +class ApplicationContainerInstanceExitedEvent extends models['ApplicationEvent'] { + /** + * Create a ApplicationContainerInstanceExitedEvent. + * @property {string} serviceName Name of Service. + * @property {string} servicePackageName Name of Service package. + * @property {string} servicePackageActivationId Activation Id of Service + * package. + * @property {boolean} isExclusive Indicates IsExclusive flag. + * @property {string} codePackageName Name of Code package. + * @property {string} entryPointType Type of EntryPoint. + * @property {string} imageName Name of Container image. + * @property {string} containerName Name of Container. + * @property {string} hostId Host Id. + * @property {number} exitCode Exit code of process. + * @property {boolean} unexpectedTermination Indicates if termination is + * unexpected. + * @property {date} startTime Start time of process. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ApplicationContainerInstanceExitedEvent + * + * @returns {object} metadata of ApplicationContainerInstanceExitedEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ApplicationContainerInstanceExited', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ApplicationContainerInstanceExitedEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + applicationId: { + required: true, + serializedName: 'ApplicationId', + type: { + name: 'String' + } + }, + serviceName: { + required: true, + serializedName: 'ServiceName', + type: { + name: 'String' + } + }, + servicePackageName: { + required: true, + serializedName: 'ServicePackageName', + type: { + name: 'String' + } + }, + servicePackageActivationId: { + required: true, + serializedName: 'ServicePackageActivationId', + type: { + name: 'String' + } + }, + isExclusive: { + required: true, + serializedName: 'IsExclusive', + type: { + name: 'Boolean' + } + }, + codePackageName: { + required: true, + serializedName: 'CodePackageName', + type: { + name: 'String' + } + }, + entryPointType: { + required: true, + serializedName: 'EntryPointType', + type: { + name: 'String' + } + }, + imageName: { + required: true, + serializedName: 'ImageName', + type: { + name: 'String' + } + }, + containerName: { + required: true, + serializedName: 'ContainerName', + type: { + name: 'String' + } + }, + hostId: { + required: true, + serializedName: 'HostId', + type: { + name: 'String' + } + }, + exitCode: { + required: true, + serializedName: 'ExitCode', + type: { + name: 'Number' + } + }, + unexpectedTermination: { + required: true, + serializedName: 'UnexpectedTermination', + type: { + name: 'Boolean' + } + }, + startTime: { + required: true, + serializedName: 'StartTime', + type: { + name: 'DateTime' + } + } + } + } + }; + } +} + +module.exports = ApplicationContainerInstanceExitedEvent; diff --git a/lib/services/serviceFabric/lib/models/applicationCreatedEvent.js b/lib/services/serviceFabric/lib/models/applicationCreatedEvent.js index f610eb214a..38268fae6f 100644 --- a/lib/services/serviceFabric/lib/models/applicationCreatedEvent.js +++ b/lib/services/serviceFabric/lib/models/applicationCreatedEvent.js @@ -54,6 +54,13 @@ class ApplicationCreatedEvent extends models['ApplicationEvent'] { name: 'String' } }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, timeStamp: { required: true, serializedName: 'TimeStamp', diff --git a/lib/services/serviceFabric/lib/models/applicationDeletedEvent.js b/lib/services/serviceFabric/lib/models/applicationDeletedEvent.js index 9ac0f00cc2..8bb45e5994 100644 --- a/lib/services/serviceFabric/lib/models/applicationDeletedEvent.js +++ b/lib/services/serviceFabric/lib/models/applicationDeletedEvent.js @@ -53,6 +53,13 @@ class ApplicationDeletedEvent extends models['ApplicationEvent'] { name: 'String' } }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, timeStamp: { required: true, serializedName: 'TimeStamp', diff --git a/lib/services/serviceFabric/lib/models/applicationEvent.js b/lib/services/serviceFabric/lib/models/applicationEvent.js index 862b90296e..f0602f6ea3 100644 --- a/lib/services/serviceFabric/lib/models/applicationEvent.js +++ b/lib/services/serviceFabric/lib/models/applicationEvent.js @@ -58,6 +58,13 @@ class ApplicationEvent extends models['FabricEvent'] { name: 'String' } }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, timeStamp: { required: true, serializedName: 'TimeStamp', diff --git a/lib/services/serviceFabric/lib/models/applicationHealthPolicy.js b/lib/services/serviceFabric/lib/models/applicationHealthPolicy.js index 21211d1dbc..6f80ca578a 100644 --- a/lib/services/serviceFabric/lib/models/applicationHealthPolicy.js +++ b/lib/services/serviceFabric/lib/models/applicationHealthPolicy.js @@ -61,8 +61,8 @@ class ApplicationHealthPolicy { * replicas. Default percentage is zero. * @property {number} * [defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] The maximum - * maximum allowed percentage of unhealthy services. Allowed values are Byte - * values from zero to 100. + * allowed percentage of unhealthy services. Allowed values are Byte values + * from zero to 100. * * The percentage represents the maximum tolerated percentage of services * that can be unhealthy before the application is considered in error. diff --git a/lib/services/serviceFabric/lib/models/applicationHealthPolicyMapItem.js b/lib/services/serviceFabric/lib/models/applicationHealthPolicyMapItem.js index ed9bac1ca8..181053ed04 100644 --- a/lib/services/serviceFabric/lib/models/applicationHealthPolicyMapItem.js +++ b/lib/services/serviceFabric/lib/models/applicationHealthPolicyMapItem.js @@ -64,8 +64,8 @@ class ApplicationHealthPolicyMapItem { * replicas. Default percentage is zero. * @property {number} * [value.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] The - * maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * maximum allowed percentage of unhealthy services. Allowed values are Byte + * values from zero to 100. * * The percentage represents the maximum tolerated percentage of services * that can be unhealthy before the application is considered in error. diff --git a/lib/services/serviceFabric/lib/models/applicationHealthReportExpiredEvent.js b/lib/services/serviceFabric/lib/models/applicationHealthReportExpiredEvent.js index 1cc14102e0..3b0b51fb7c 100644 --- a/lib/services/serviceFabric/lib/models/applicationHealthReportExpiredEvent.js +++ b/lib/services/serviceFabric/lib/models/applicationHealthReportExpiredEvent.js @@ -61,6 +61,13 @@ class ApplicationHealthReportExpiredEvent extends models['ApplicationEvent'] { name: 'String' } }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, timeStamp: { required: true, serializedName: 'TimeStamp', diff --git a/lib/services/serviceFabric/lib/models/applicationNewHealthReportEvent.js b/lib/services/serviceFabric/lib/models/applicationNewHealthReportEvent.js new file mode 100644 index 0000000000..967ac176cc --- /dev/null +++ b/lib/services/serviceFabric/lib/models/applicationNewHealthReportEvent.js @@ -0,0 +1,169 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Application Health Report Created event. + * + * @extends models['ApplicationEvent'] + */ +class ApplicationNewHealthReportEvent extends models['ApplicationEvent'] { + /** + * Create a ApplicationNewHealthReportEvent. + * @property {number} applicationInstanceId Id of Application instance. + * @property {string} sourceId Id of report source. + * @property {string} property Describes the property. + * @property {string} healthState Describes the property health state. + * @property {number} timeToLiveMs Time to live in milli-seconds. + * @property {number} sequenceNumber Sequence number of report. + * @property {string} description Description of report. + * @property {boolean} removeWhenExpired Indicates the removal when it + * expires. + * @property {date} sourceUtcTimestamp Source time. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ApplicationNewHealthReportEvent + * + * @returns {object} metadata of ApplicationNewHealthReportEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ApplicationNewHealthReport', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ApplicationNewHealthReportEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + applicationId: { + required: true, + serializedName: 'ApplicationId', + type: { + name: 'String' + } + }, + applicationInstanceId: { + required: true, + serializedName: 'ApplicationInstanceId', + type: { + name: 'Number' + } + }, + sourceId: { + required: true, + serializedName: 'SourceId', + type: { + name: 'String' + } + }, + property: { + required: true, + serializedName: 'Property', + type: { + name: 'String' + } + }, + healthState: { + required: true, + serializedName: 'HealthState', + type: { + name: 'String' + } + }, + timeToLiveMs: { + required: true, + serializedName: 'TimeToLiveMs', + type: { + name: 'Number' + } + }, + sequenceNumber: { + required: true, + serializedName: 'SequenceNumber', + type: { + name: 'Number' + } + }, + description: { + required: true, + serializedName: 'Description', + type: { + name: 'String' + } + }, + removeWhenExpired: { + required: true, + serializedName: 'RemoveWhenExpired', + type: { + name: 'Boolean' + } + }, + sourceUtcTimestamp: { + required: true, + serializedName: 'SourceUtcTimestamp', + type: { + name: 'DateTime' + } + } + } + } + }; + } +} + +module.exports = ApplicationNewHealthReportEvent; diff --git a/lib/services/serviceFabric/lib/models/applicationProcessExitedEvent.js b/lib/services/serviceFabric/lib/models/applicationProcessExitedEvent.js new file mode 100644 index 0000000000..3c6be7c8ec --- /dev/null +++ b/lib/services/serviceFabric/lib/models/applicationProcessExitedEvent.js @@ -0,0 +1,194 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Process Exited event. + * + * @extends models['ApplicationEvent'] + */ +class ApplicationProcessExitedEvent extends models['ApplicationEvent'] { + /** + * Create a ApplicationProcessExitedEvent. + * @property {string} serviceName Name of Service. + * @property {string} servicePackageName Name of Service package. + * @property {string} servicePackageActivationId Activation Id of Service + * package. + * @property {boolean} isExclusive Indicates IsExclusive flag. + * @property {string} codePackageName Name of Code package. + * @property {string} entryPointType Type of EntryPoint. + * @property {string} exeName Name of executable. + * @property {number} processId Process Id. + * @property {string} hostId Host Id. + * @property {number} exitCode Exit code of process. + * @property {boolean} unexpectedTermination Indicates if termination is + * unexpected. + * @property {date} startTime Start time of process. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ApplicationProcessExitedEvent + * + * @returns {object} metadata of ApplicationProcessExitedEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ApplicationProcessExited', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ApplicationProcessExitedEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + applicationId: { + required: true, + serializedName: 'ApplicationId', + type: { + name: 'String' + } + }, + serviceName: { + required: true, + serializedName: 'ServiceName', + type: { + name: 'String' + } + }, + servicePackageName: { + required: true, + serializedName: 'ServicePackageName', + type: { + name: 'String' + } + }, + servicePackageActivationId: { + required: true, + serializedName: 'ServicePackageActivationId', + type: { + name: 'String' + } + }, + isExclusive: { + required: true, + serializedName: 'IsExclusive', + type: { + name: 'Boolean' + } + }, + codePackageName: { + required: true, + serializedName: 'CodePackageName', + type: { + name: 'String' + } + }, + entryPointType: { + required: true, + serializedName: 'EntryPointType', + type: { + name: 'String' + } + }, + exeName: { + required: true, + serializedName: 'ExeName', + type: { + name: 'String' + } + }, + processId: { + required: true, + serializedName: 'ProcessId', + type: { + name: 'Number' + } + }, + hostId: { + required: true, + serializedName: 'HostId', + type: { + name: 'String' + } + }, + exitCode: { + required: true, + serializedName: 'ExitCode', + type: { + name: 'Number' + } + }, + unexpectedTermination: { + required: true, + serializedName: 'UnexpectedTermination', + type: { + name: 'Boolean' + } + }, + startTime: { + required: true, + serializedName: 'StartTime', + type: { + name: 'DateTime' + } + } + } + } + }; + } +} + +module.exports = ApplicationProcessExitedEvent; diff --git a/lib/services/serviceFabric/lib/models/applicationResourceDescription.js b/lib/services/serviceFabric/lib/models/applicationResourceDescription.js index 7242f0da3b..d6a051b49b 100644 --- a/lib/services/serviceFabric/lib/models/applicationResourceDescription.js +++ b/lib/services/serviceFabric/lib/models/applicationResourceDescription.js @@ -11,28 +11,19 @@ 'use strict'; /** - * Describes a service fabric application resource. + * This type describes a application resource. * */ class ApplicationResourceDescription { /** * Create a ApplicationResourceDescription. + * @property {string} name Name of the Application resource. * @property {string} [description] User readable description of the * application. - * @property {string} [debugParams] Internal use. - * @property {array} [services] describes the services in the application. - * @property {string} [healthState] Describes the health state of an - * application resource. Possible values include: 'Invalid', 'Ok', 'Warning', - * 'Error', 'Unknown' - * @property {string} [unhealthyEvaluation] When the application's health - * state is not 'Ok', this additional details from service fabric Health - * Manager for the user to know why the application is marked unhealthy. - * @property {string} [status] Status of the application resource. Possible - * values include: 'Invalid', 'Ready', 'Upgrading', 'Creating', 'Deleting', - * 'Failed' - * @property {string} [statusDetails] Gives additional information about the - * current status of the application deployment. - * @property {array} [serviceNames] Names of the services in the application. + * @property {array} [services] Describes the services in the application. + * This property is used to create or modify services of the application. On + * get only the name of the service is returned. The service description can + * be obtained by querying for the service resource. * @property {object} [diagnostics] Describes the diagnostics definition and * usage for an application resource. * @property {array} [diagnostics.sinks] List of supported sinks that can be @@ -42,7 +33,19 @@ class ApplicationResourceDescription { * @property {array} [diagnostics.defaultSinkRefs] The sinks to be used if * diagnostics is enabled. Sink choices can be overridden at the service and * code package level. - * @property {string} name Application resource name. + * @property {string} [debugParams] Internal - used by Visual Studio to setup + * the debugging session on the local development environment. + * @property {array} [serviceNames] Names of the services in the application. + * @property {string} [status] Status of the application. Possible values + * include: 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + * @property {string} [statusDetails] Gives additional information about the + * current status of the application. + * @property {string} [healthState] Describes the health state of an + * application resource. Possible values include: 'Invalid', 'Ok', 'Warning', + * 'Error', 'Unknown' + * @property {string} [unhealthyEvaluation] When the application's health + * state is not 'Ok', this additional details from service fabric Health + * Manager for the user to know why the application is marked unhealthy. */ constructor() { } @@ -61,16 +64,16 @@ class ApplicationResourceDescription { name: 'Composite', className: 'ApplicationResourceDescription', modelProperties: { - description: { - required: false, - serializedName: 'properties.description', + name: { + required: true, + serializedName: 'name', type: { name: 'String' } }, - debugParams: { + description: { required: false, - serializedName: 'properties.debugParams', + serializedName: 'properties.description', type: { name: 'String' } @@ -90,20 +93,34 @@ class ApplicationResourceDescription { } } }, - healthState: { + diagnostics: { required: false, - readOnly: true, - serializedName: 'properties.healthState', + serializedName: 'properties.diagnostics', + type: { + name: 'Composite', + className: 'DiagnosticsDescription' + } + }, + debugParams: { + required: false, + serializedName: 'properties.debugParams', type: { name: 'String' } }, - unhealthyEvaluation: { + serviceNames: { required: false, readOnly: true, - serializedName: 'properties.unhealthyEvaluation', + serializedName: 'properties.serviceNames', type: { - name: 'String' + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } } }, status: { @@ -122,32 +139,18 @@ class ApplicationResourceDescription { name: 'String' } }, - serviceNames: { + healthState: { required: false, readOnly: true, - serializedName: 'properties.serviceNames', + serializedName: 'properties.healthState', type: { - name: 'Sequence', - element: { - required: false, - serializedName: 'StringElementType', - type: { - name: 'String' - } - } + name: 'String' } }, - diagnostics: { + unhealthyEvaluation: { required: false, - serializedName: 'properties.diagnostics', - type: { - name: 'Composite', - className: 'DiagnosticsDescription' - } - }, - name: { - required: true, - serializedName: 'name', + readOnly: true, + serializedName: 'properties.unhealthyEvaluation', type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/applicationScopedVolume.js b/lib/services/serviceFabric/lib/models/applicationScopedVolume.js new file mode 100644 index 0000000000..ff0231ce85 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/applicationScopedVolume.js @@ -0,0 +1,87 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Describes a volume whose lifetime is scoped to the application's lifetime. + * + * @extends models['VolumeReference'] + */ +class ApplicationScopedVolume extends models['VolumeReference'] { + /** + * Create a ApplicationScopedVolume. + * @property {object} creationParameters Describes parameters for creating + * application-scoped volumes. + * @property {string} [creationParameters.description] User readable + * description of the volume. + * @property {string} [creationParameters.kind] Polymorphic Discriminator + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ApplicationScopedVolume + * + * @returns {object} metadata of ApplicationScopedVolume + * + */ + mapper() { + return { + required: false, + serializedName: 'ApplicationScopedVolume', + type: { + name: 'Composite', + className: 'ApplicationScopedVolume', + modelProperties: { + name: { + required: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + readOnly: { + required: false, + serializedName: 'readOnly', + type: { + name: 'Boolean' + } + }, + destinationPath: { + required: true, + serializedName: 'destinationPath', + type: { + name: 'String' + } + }, + creationParameters: { + required: true, + serializedName: 'creationParameters', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'kind', + clientName: 'kind' + }, + uberParent: 'ApplicationScopedVolumeCreationParameters', + className: 'ApplicationScopedVolumeCreationParameters' + } + } + } + } + }; + } +} + +module.exports = ApplicationScopedVolume; diff --git a/lib/services/serviceFabric/lib/models/applicationScopedVolumeCreationParameters.js b/lib/services/serviceFabric/lib/models/applicationScopedVolumeCreationParameters.js new file mode 100644 index 0000000000..1836ec459a --- /dev/null +++ b/lib/services/serviceFabric/lib/models/applicationScopedVolumeCreationParameters.js @@ -0,0 +1,66 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Describes parameters for creating application-scoped volumes. + * + */ +class ApplicationScopedVolumeCreationParameters { + /** + * Create a ApplicationScopedVolumeCreationParameters. + * @property {string} [description] User readable description of the volume. + * @property {string} kind Polymorphic Discriminator + */ + constructor() { + } + + /** + * Defines the metadata of ApplicationScopedVolumeCreationParameters + * + * @returns {object} metadata of ApplicationScopedVolumeCreationParameters + * + */ + mapper() { + return { + required: false, + serializedName: 'ApplicationScopedVolumeCreationParameters', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'kind', + clientName: 'kind' + }, + uberParent: 'ApplicationScopedVolumeCreationParameters', + className: 'ApplicationScopedVolumeCreationParameters', + modelProperties: { + description: { + required: false, + serializedName: 'description', + type: { + name: 'String' + } + }, + kind: { + required: true, + serializedName: 'kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ApplicationScopedVolumeCreationParameters; diff --git a/lib/services/serviceFabric/lib/models/applicationScopedVolumeCreationParametersServiceFabricVolumeDisk.js b/lib/services/serviceFabric/lib/models/applicationScopedVolumeCreationParametersServiceFabricVolumeDisk.js new file mode 100644 index 0000000000..bd4a6e35f8 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/applicationScopedVolumeCreationParametersServiceFabricVolumeDisk.js @@ -0,0 +1,78 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Describes parameters for creating application-scoped volumes provided by + * Service Fabric Volume Disks + * + * @extends models['ApplicationScopedVolumeCreationParameters'] + */ +class ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk extends models['ApplicationScopedVolumeCreationParameters'] { + /** + * Create a ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk. + * @property {string} sizeDisk Volume size. Possible values include: 'Small', + * 'Medium', 'Large' + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk + * + * @returns {object} metadata of ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk + * + */ + mapper() { + return { + required: false, + serializedName: 'ServiceFabricVolumeDisk', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'kind', + clientName: 'kind' + }, + uberParent: 'ApplicationScopedVolumeCreationParameters', + className: 'ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk', + modelProperties: { + description: { + required: false, + serializedName: 'description', + type: { + name: 'String' + } + }, + kind: { + required: true, + serializedName: 'kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + sizeDisk: { + required: true, + serializedName: 'sizeDisk', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk; diff --git a/lib/services/serviceFabric/lib/models/applicationUpgradeCompletedEvent.js b/lib/services/serviceFabric/lib/models/applicationUpgradeCompletedEvent.js new file mode 100644 index 0000000000..ff5b978aa9 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/applicationUpgradeCompletedEvent.js @@ -0,0 +1,121 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Application Upgrade Completed event. + * + * @extends models['ApplicationEvent'] + */ +class ApplicationUpgradeCompletedEvent extends models['ApplicationEvent'] { + /** + * Create a ApplicationUpgradeCompletedEvent. + * @property {string} applicationTypeName Application type name. + * @property {string} applicationTypeVersion Application type version. + * @property {number} overallUpgradeElapsedTimeInMs Overall upgrade time in + * milli-seconds. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ApplicationUpgradeCompletedEvent + * + * @returns {object} metadata of ApplicationUpgradeCompletedEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ApplicationUpgradeCompleted', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ApplicationUpgradeCompletedEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + applicationId: { + required: true, + serializedName: 'ApplicationId', + type: { + name: 'String' + } + }, + applicationTypeName: { + required: true, + serializedName: 'ApplicationTypeName', + type: { + name: 'String' + } + }, + applicationTypeVersion: { + required: true, + serializedName: 'ApplicationTypeVersion', + type: { + name: 'String' + } + }, + overallUpgradeElapsedTimeInMs: { + required: true, + serializedName: 'OverallUpgradeElapsedTimeInMs', + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = ApplicationUpgradeCompletedEvent; diff --git a/lib/services/serviceFabric/lib/models/applicationUpgradeDescription.js b/lib/services/serviceFabric/lib/models/applicationUpgradeDescription.js index 671ec2cee3..562bc6066e 100644 --- a/lib/services/serviceFabric/lib/models/applicationUpgradeDescription.js +++ b/lib/services/serviceFabric/lib/models/applicationUpgradeDescription.js @@ -135,8 +135,8 @@ class ApplicationUpgradeDescription { * replicas. Default percentage is zero. * @property {number} * [applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed - * values are Byte values from zero to 100. + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. * * The percentage represents the maximum tolerated percentage of services * that can be unhealthy before the application is considered in error. diff --git a/lib/services/serviceFabric/lib/models/applicationUpgradeDomainCompletedEvent.js b/lib/services/serviceFabric/lib/models/applicationUpgradeDomainCompletedEvent.js new file mode 100644 index 0000000000..1317f3ed93 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/applicationUpgradeDomainCompletedEvent.js @@ -0,0 +1,146 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Application Upgrade Domain Completed event. + * + * @extends models['ApplicationEvent'] + */ +class ApplicationUpgradeDomainCompletedEvent extends models['ApplicationEvent'] { + /** + * Create a ApplicationUpgradeDomainCompletedEvent. + * @property {string} applicationTypeName Application type name. + * @property {string} currentApplicationTypeVersion Current Application type + * version. + * @property {string} applicationTypeVersion Target Application type version. + * @property {string} upgradeState State of upgrade. + * @property {string} upgradeDomains Upgrade domains. + * @property {number} upgradeDomainElapsedTimeInMs Upgrade time of domain in + * milli-seconds. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ApplicationUpgradeDomainCompletedEvent + * + * @returns {object} metadata of ApplicationUpgradeDomainCompletedEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ApplicationUpgradeDomainCompleted', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ApplicationUpgradeDomainCompletedEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + applicationId: { + required: true, + serializedName: 'ApplicationId', + type: { + name: 'String' + } + }, + applicationTypeName: { + required: true, + serializedName: 'ApplicationTypeName', + type: { + name: 'String' + } + }, + currentApplicationTypeVersion: { + required: true, + serializedName: 'CurrentApplicationTypeVersion', + type: { + name: 'String' + } + }, + applicationTypeVersion: { + required: true, + serializedName: 'ApplicationTypeVersion', + type: { + name: 'String' + } + }, + upgradeState: { + required: true, + serializedName: 'UpgradeState', + type: { + name: 'String' + } + }, + upgradeDomains: { + required: true, + serializedName: 'UpgradeDomains', + type: { + name: 'String' + } + }, + upgradeDomainElapsedTimeInMs: { + required: true, + serializedName: 'UpgradeDomainElapsedTimeInMs', + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = ApplicationUpgradeDomainCompletedEvent; diff --git a/lib/services/serviceFabric/lib/models/applicationUpgradeProgressInfo.js b/lib/services/serviceFabric/lib/models/applicationUpgradeProgressInfo.js index 57d7ed8af0..62d1c95d3b 100644 --- a/lib/services/serviceFabric/lib/models/applicationUpgradeProgressInfo.js +++ b/lib/services/serviceFabric/lib/models/applicationUpgradeProgressInfo.js @@ -163,8 +163,8 @@ class ApplicationUpgradeProgressInfo { * replicas. Default percentage is zero. * @property {number} * [upgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed - * values are Byte values from zero to 100. + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. * * The percentage represents the maximum tolerated percentage of services * that can be unhealthy before the application is considered in error. diff --git a/lib/services/serviceFabric/lib/models/applicationUpgradeRollbackCompletedEvent.js b/lib/services/serviceFabric/lib/models/applicationUpgradeRollbackCompletedEvent.js new file mode 100644 index 0000000000..e9ba58c577 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/applicationUpgradeRollbackCompletedEvent.js @@ -0,0 +1,129 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Application Upgrade Rollback Completed event. + * + * @extends models['ApplicationEvent'] + */ +class ApplicationUpgradeRollbackCompletedEvent extends models['ApplicationEvent'] { + /** + * Create a ApplicationUpgradeRollbackCompletedEvent. + * @property {string} applicationTypeName Application type name. + * @property {string} applicationTypeVersion Application type version. + * @property {string} failureReason Describes reason of failure. + * @property {number} overallUpgradeElapsedTimeInMs Overall upgrade time in + * milli-seconds. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ApplicationUpgradeRollbackCompletedEvent + * + * @returns {object} metadata of ApplicationUpgradeRollbackCompletedEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ApplicationUpgradeRollbackCompleted', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ApplicationUpgradeRollbackCompletedEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + applicationId: { + required: true, + serializedName: 'ApplicationId', + type: { + name: 'String' + } + }, + applicationTypeName: { + required: true, + serializedName: 'ApplicationTypeName', + type: { + name: 'String' + } + }, + applicationTypeVersion: { + required: true, + serializedName: 'ApplicationTypeVersion', + type: { + name: 'String' + } + }, + failureReason: { + required: true, + serializedName: 'FailureReason', + type: { + name: 'String' + } + }, + overallUpgradeElapsedTimeInMs: { + required: true, + serializedName: 'OverallUpgradeElapsedTimeInMs', + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = ApplicationUpgradeRollbackCompletedEvent; diff --git a/lib/services/serviceFabric/lib/models/applicationUpgradeRollbackStartedEvent.js b/lib/services/serviceFabric/lib/models/applicationUpgradeRollbackStartedEvent.js new file mode 100644 index 0000000000..a69f5a09cf --- /dev/null +++ b/lib/services/serviceFabric/lib/models/applicationUpgradeRollbackStartedEvent.js @@ -0,0 +1,138 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Application Upgrade Rollback Started event. + * + * @extends models['ApplicationEvent'] + */ +class ApplicationUpgradeRollbackStartedEvent extends models['ApplicationEvent'] { + /** + * Create a ApplicationUpgradeRollbackStartedEvent. + * @property {string} applicationTypeName Application type name. + * @property {string} currentApplicationTypeVersion Current Application type + * version. + * @property {string} applicationTypeVersion Target Application type version. + * @property {string} failureReason Describes reason of failure. + * @property {number} overallUpgradeElapsedTimeInMs Overall upgrade time in + * milli-seconds. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ApplicationUpgradeRollbackStartedEvent + * + * @returns {object} metadata of ApplicationUpgradeRollbackStartedEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ApplicationUpgradeRollbackStarted', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ApplicationUpgradeRollbackStartedEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + applicationId: { + required: true, + serializedName: 'ApplicationId', + type: { + name: 'String' + } + }, + applicationTypeName: { + required: true, + serializedName: 'ApplicationTypeName', + type: { + name: 'String' + } + }, + currentApplicationTypeVersion: { + required: true, + serializedName: 'CurrentApplicationTypeVersion', + type: { + name: 'String' + } + }, + applicationTypeVersion: { + required: true, + serializedName: 'ApplicationTypeVersion', + type: { + name: 'String' + } + }, + failureReason: { + required: true, + serializedName: 'FailureReason', + type: { + name: 'String' + } + }, + overallUpgradeElapsedTimeInMs: { + required: true, + serializedName: 'OverallUpgradeElapsedTimeInMs', + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = ApplicationUpgradeRollbackStartedEvent; diff --git a/lib/services/serviceFabric/lib/models/applicationUpgradeStartedEvent.js b/lib/services/serviceFabric/lib/models/applicationUpgradeStartedEvent.js new file mode 100644 index 0000000000..e5e71f5fe1 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/applicationUpgradeStartedEvent.js @@ -0,0 +1,145 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Application Upgrade Started event. + * + * @extends models['ApplicationEvent'] + */ +class ApplicationUpgradeStartedEvent extends models['ApplicationEvent'] { + /** + * Create a ApplicationUpgradeStartedEvent. + * @property {string} applicationTypeName Application type name. + * @property {string} currentApplicationTypeVersion Current Application type + * version. + * @property {string} applicationTypeVersion Target Application type version. + * @property {string} upgradeType Type of upgrade. + * @property {string} rollingUpgradeMode Mode of upgrade. + * @property {string} failureAction Action if failed. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ApplicationUpgradeStartedEvent + * + * @returns {object} metadata of ApplicationUpgradeStartedEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ApplicationUpgradeStarted', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ApplicationUpgradeStartedEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + applicationId: { + required: true, + serializedName: 'ApplicationId', + type: { + name: 'String' + } + }, + applicationTypeName: { + required: true, + serializedName: 'ApplicationTypeName', + type: { + name: 'String' + } + }, + currentApplicationTypeVersion: { + required: true, + serializedName: 'CurrentApplicationTypeVersion', + type: { + name: 'String' + } + }, + applicationTypeVersion: { + required: true, + serializedName: 'ApplicationTypeVersion', + type: { + name: 'String' + } + }, + upgradeType: { + required: true, + serializedName: 'UpgradeType', + type: { + name: 'String' + } + }, + rollingUpgradeMode: { + required: true, + serializedName: 'RollingUpgradeMode', + type: { + name: 'String' + } + }, + failureAction: { + required: true, + serializedName: 'FailureAction', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ApplicationUpgradeStartedEvent; diff --git a/lib/services/serviceFabric/lib/models/applicationUpgradeUpdateDescription.js b/lib/services/serviceFabric/lib/models/applicationUpgradeUpdateDescription.js index 7471f1d628..4679812d98 100644 --- a/lib/services/serviceFabric/lib/models/applicationUpgradeUpdateDescription.js +++ b/lib/services/serviceFabric/lib/models/applicationUpgradeUpdateDescription.js @@ -69,8 +69,8 @@ class ApplicationUpgradeUpdateDescription { * replicas. Default percentage is zero. * @property {number} * [applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed - * values are Byte values from zero to 100. + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. * * The percentage represents the maximum tolerated percentage of services * that can be unhealthy before the application is considered in error. diff --git a/lib/services/serviceFabric/lib/models/autoScalingMechanism.js b/lib/services/serviceFabric/lib/models/autoScalingMechanism.js new file mode 100644 index 0000000000..34c83270aa --- /dev/null +++ b/lib/services/serviceFabric/lib/models/autoScalingMechanism.js @@ -0,0 +1,59 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Describes the mechanism for performing auto scaling operation. Derived + * classes will describe the actual mechanism. + * + */ +class AutoScalingMechanism { + /** + * Create a AutoScalingMechanism. + * @property {string} kind Polymorphic Discriminator + */ + constructor() { + } + + /** + * Defines the metadata of AutoScalingMechanism + * + * @returns {object} metadata of AutoScalingMechanism + * + */ + mapper() { + return { + required: false, + serializedName: 'AutoScalingMechanism', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'kind', + clientName: 'kind' + }, + uberParent: 'AutoScalingMechanism', + className: 'AutoScalingMechanism', + modelProperties: { + kind: { + required: true, + serializedName: 'kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = AutoScalingMechanism; diff --git a/lib/services/serviceFabric/lib/models/autoScalingMetric.js b/lib/services/serviceFabric/lib/models/autoScalingMetric.js new file mode 100644 index 0000000000..97e747dc47 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/autoScalingMetric.js @@ -0,0 +1,59 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Describes the metric that is used for triggering auto scaling operation. + * Derived classes will describe resources or metrics. + * + */ +class AutoScalingMetric { + /** + * Create a AutoScalingMetric. + * @property {string} kind Polymorphic Discriminator + */ + constructor() { + } + + /** + * Defines the metadata of AutoScalingMetric + * + * @returns {object} metadata of AutoScalingMetric + * + */ + mapper() { + return { + required: false, + serializedName: 'AutoScalingMetric', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'kind', + clientName: 'kind' + }, + uberParent: 'AutoScalingMetric', + className: 'AutoScalingMetric', + modelProperties: { + kind: { + required: true, + serializedName: 'kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = AutoScalingMetric; diff --git a/lib/services/serviceFabric/lib/models/autoScalingPolicy.js b/lib/services/serviceFabric/lib/models/autoScalingPolicy.js new file mode 100644 index 0000000000..d4b75e50df --- /dev/null +++ b/lib/services/serviceFabric/lib/models/autoScalingPolicy.js @@ -0,0 +1,84 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Describes the auto scaling policy + * + */ +class AutoScalingPolicy { + /** + * Create a AutoScalingPolicy. + * @property {string} name The name of the auto scaling policy. + * @property {object} trigger Determines when auto scaling operation will be + * invoked. + * @property {string} [trigger.kind] Polymorphic Discriminator + * @property {object} mechanism The mechanism that is used to scale when auto + * scaling operation is invoked. + * @property {string} [mechanism.kind] Polymorphic Discriminator + */ + constructor() { + } + + /** + * Defines the metadata of AutoScalingPolicy + * + * @returns {object} metadata of AutoScalingPolicy + * + */ + mapper() { + return { + required: false, + serializedName: 'AutoScalingPolicy', + type: { + name: 'Composite', + className: 'AutoScalingPolicy', + modelProperties: { + name: { + required: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + trigger: { + required: true, + serializedName: 'trigger', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'kind', + clientName: 'kind' + }, + uberParent: 'AutoScalingTrigger', + className: 'AutoScalingTrigger' + } + }, + mechanism: { + required: true, + serializedName: 'mechanism', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'kind', + clientName: 'kind' + }, + uberParent: 'AutoScalingMechanism', + className: 'AutoScalingMechanism' + } + } + } + } + }; + } +} + +module.exports = AutoScalingPolicy; diff --git a/lib/services/serviceFabric/lib/models/autoScalingResourceMetric.js b/lib/services/serviceFabric/lib/models/autoScalingResourceMetric.js new file mode 100644 index 0000000000..9b7ad235e3 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/autoScalingResourceMetric.js @@ -0,0 +1,70 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Describes the resource that is used for triggering auto scaling. + * + * @extends models['AutoScalingMetric'] + */ +class AutoScalingResourceMetric extends models['AutoScalingMetric'] { + /** + * Create a AutoScalingResourceMetric. + * @property {string} name Name of the resource. Possible values include: + * 'cpu', 'memoryInGB' + */ + constructor() { + super(); + } + + /** + * Defines the metadata of AutoScalingResourceMetric + * + * @returns {object} metadata of AutoScalingResourceMetric + * + */ + mapper() { + return { + required: false, + serializedName: 'Resource', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'kind', + clientName: 'kind' + }, + uberParent: 'AutoScalingMetric', + className: 'AutoScalingResourceMetric', + modelProperties: { + kind: { + required: true, + serializedName: 'kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + name: { + required: true, + serializedName: 'name', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = AutoScalingResourceMetric; diff --git a/lib/services/serviceFabric/lib/models/autoScalingTrigger.js b/lib/services/serviceFabric/lib/models/autoScalingTrigger.js new file mode 100644 index 0000000000..dc9723af96 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/autoScalingTrigger.js @@ -0,0 +1,58 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Describes the trigger for performing auto scaling operation. + * + */ +class AutoScalingTrigger { + /** + * Create a AutoScalingTrigger. + * @property {string} kind Polymorphic Discriminator + */ + constructor() { + } + + /** + * Defines the metadata of AutoScalingTrigger + * + * @returns {object} metadata of AutoScalingTrigger + * + */ + mapper() { + return { + required: false, + serializedName: 'AutoScalingTrigger', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'kind', + clientName: 'kind' + }, + uberParent: 'AutoScalingTrigger', + className: 'AutoScalingTrigger', + modelProperties: { + kind: { + required: true, + serializedName: 'kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = AutoScalingTrigger; diff --git a/lib/services/serviceFabric/lib/models/averageLoadScalingTrigger.js b/lib/services/serviceFabric/lib/models/averageLoadScalingTrigger.js new file mode 100644 index 0000000000..b6f58284aa --- /dev/null +++ b/lib/services/serviceFabric/lib/models/averageLoadScalingTrigger.js @@ -0,0 +1,107 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Describes the average load trigger used for auto scaling. + * + * @extends models['AutoScalingTrigger'] + */ +class AverageLoadScalingTrigger extends models['AutoScalingTrigger'] { + /** + * Create a AverageLoadScalingTrigger. + * @property {object} metric Description of the metric that is used for + * scaling. + * @property {string} [metric.kind] Polymorphic Discriminator + * @property {number} lowerLoadThreshold Lower load threshold (if average + * load is below this threshold, service will scale down). + * @property {number} upperLoadThreshold Upper load threshold (if average + * load is above this threshold, service will scale up). + * @property {number} scaleIntervalInSeconds Scale interval that indicates + * how often will this trigger be checked. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of AverageLoadScalingTrigger + * + * @returns {object} metadata of AverageLoadScalingTrigger + * + */ + mapper() { + return { + required: false, + serializedName: 'AverageLoad', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'kind', + clientName: 'kind' + }, + uberParent: 'AutoScalingTrigger', + className: 'AverageLoadScalingTrigger', + modelProperties: { + kind: { + required: true, + serializedName: 'kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + metric: { + required: true, + serializedName: 'metric', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'kind', + clientName: 'kind' + }, + uberParent: 'AutoScalingMetric', + className: 'AutoScalingMetric' + } + }, + lowerLoadThreshold: { + required: true, + serializedName: 'lowerLoadThreshold', + type: { + name: 'Number' + } + }, + upperLoadThreshold: { + required: true, + serializedName: 'upperLoadThreshold', + type: { + name: 'Number' + } + }, + scaleIntervalInSeconds: { + required: true, + serializedName: 'scaleIntervalInSeconds', + constraints: { + InclusiveMinimum: 60 + }, + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = AverageLoadScalingTrigger; diff --git a/lib/services/serviceFabric/lib/models/azureInternalMonitoringPipelineSinkDescription.js b/lib/services/serviceFabric/lib/models/azureInternalMonitoringPipelineSinkDescription.js new file mode 100644 index 0000000000..19e465a2c6 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/azureInternalMonitoringPipelineSinkDescription.js @@ -0,0 +1,120 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Diagnostics settings for Geneva. + * + * @extends models['DiagnosticsSinkProperties'] + */ +class AzureInternalMonitoringPipelineSinkDescription extends models['DiagnosticsSinkProperties'] { + /** + * Create a AzureInternalMonitoringPipelineSinkDescription. + * @property {string} [accountName] Azure Internal monitoring pipeline + * account. + * @property {string} [namespace] Azure Internal monitoring pipeline account + * namespace. + * @property {string} [maConfigUrl] Azure Internal monitoring agent + * configuration. + * @property {object} [fluentdConfigUrl] Azure Internal monitoring agent + * fluentd configuration. + * @property {string} [autoKeyConfigUrl] Azure Internal monitoring pipeline + * autokey associated with the certificate. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of AzureInternalMonitoringPipelineSinkDescription + * + * @returns {object} metadata of AzureInternalMonitoringPipelineSinkDescription + * + */ + mapper() { + return { + required: false, + serializedName: 'AzureInternalMonitoringPipeline', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'kind', + clientName: 'kind' + }, + uberParent: 'DiagnosticsSinkProperties', + className: 'AzureInternalMonitoringPipelineSinkDescription', + modelProperties: { + name: { + required: false, + serializedName: 'name', + type: { + name: 'String' + } + }, + description: { + required: false, + serializedName: 'description', + type: { + name: 'String' + } + }, + kind: { + required: true, + serializedName: 'kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + accountName: { + required: false, + serializedName: 'accountName', + type: { + name: 'String' + } + }, + namespace: { + required: false, + serializedName: 'namespace', + type: { + name: 'String' + } + }, + maConfigUrl: { + required: false, + serializedName: 'maConfigUrl', + type: { + name: 'String' + } + }, + fluentdConfigUrl: { + required: false, + serializedName: 'fluentdConfigUrl', + type: { + name: 'Object' + } + }, + autoKeyConfigUrl: { + required: false, + serializedName: 'autoKeyConfigUrl', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = AzureInternalMonitoringPipelineSinkDescription; diff --git a/lib/services/serviceFabric/lib/models/backupInfo.js b/lib/services/serviceFabric/lib/models/backupInfo.js index 03e0e89396..c1004b9eca 100644 --- a/lib/services/serviceFabric/lib/models/backupInfo.js +++ b/lib/services/serviceFabric/lib/models/backupInfo.js @@ -41,11 +41,11 @@ class BackupInfo { * 'Incremental' * @property {object} [epochOfLastBackupRecord] Epoch of the last record in * this backup. - * @property {string} [epochOfLastBackupRecord.configurationNumber] The + * @property {string} [epochOfLastBackupRecord.configurationVersion] The * current configuration number of this Epoch. The configuration number is an * increasing value that is updated whenever the configuration of this * replica set changes. - * @property {string} [epochOfLastBackupRecord.dataLossNumber] The current + * @property {string} [epochOfLastBackupRecord.dataLossVersion] The current * dataloss number of this Epoch. The data loss number property is an * increasing value which is updated whenever data loss is suspected, as when * loss of a quorum of replicas in the replica set that includes the Primary @@ -54,6 +54,8 @@ class BackupInfo { * backup. * @property {date} [creationTimeUtc] The date time when this backup was * taken. + * @property {string} [serviceManifestVersion] Manifest Version of the + * service this partition backup belongs to. * @property {object} [failureError] Denotes the failure encountered in * getting backup point information. * @property {string} [failureError.code] Defines the fabric error codes that @@ -106,6 +108,7 @@ class BackupInfo { * - "FABRIC_E_BACKUP_NOT_ENABLED" * - "FABRIC_E_BACKUP_POLICY_NOT_EXISTING" * - "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING" + * - "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR" * * - Possible values of the error code for HTTP status code 409 (Conflict) * - "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS" @@ -217,7 +220,7 @@ class BackupInfo { * 'FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS', * 'FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND', * 'FABRIC_E_VOLUME_ALREADY_EXISTS', 'FABRIC_E_VOLUME_NOT_FOUND', - * 'SerializationError' + * 'SerializationError', 'FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR' * @property {string} [failureError.message] Error message. */ constructor() { @@ -297,7 +300,7 @@ class BackupInfo { serializedName: 'EpochOfLastBackupRecord', type: { name: 'Composite', - className: 'BackupEpoch' + className: 'Epoch' } }, lsnOfLastBackupRecord: { @@ -314,6 +317,13 @@ class BackupInfo { name: 'DateTime' } }, + serviceManifestVersion: { + required: false, + serializedName: 'ServiceManifestVersion', + type: { + name: 'String' + } + }, failureError: { required: false, serializedName: 'FailureError', diff --git a/lib/services/serviceFabric/lib/models/backupPolicyDescription.js b/lib/services/serviceFabric/lib/models/backupPolicyDescription.js index aab419c565..735ecce5d6 100644 --- a/lib/services/serviceFabric/lib/models/backupPolicyDescription.js +++ b/lib/services/serviceFabric/lib/models/backupPolicyDescription.js @@ -35,6 +35,10 @@ class BackupPolicyDescription { * @property {string} [storage.friendlyName] Friendly name for this backup * storage. * @property {string} [storage.storageKind] Polymorphic Discriminator + * @property {object} [retentionPolicy] Describes the policy to retain + * backups in storage. + * @property {string} [retentionPolicy.retentionPolicyType] Polymorphic + * Discriminator */ constructor() { } @@ -103,6 +107,19 @@ class BackupPolicyDescription { uberParent: 'BackupStorageDescription', className: 'BackupStorageDescription' } + }, + retentionPolicy: { + required: false, + serializedName: 'RetentionPolicy', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'RetentionPolicyType', + clientName: 'retentionPolicyType' + }, + uberParent: 'RetentionPolicyDescription', + className: 'RetentionPolicyDescription' + } } } } diff --git a/lib/services/serviceFabric/lib/models/backupProgressInfo.js b/lib/services/serviceFabric/lib/models/backupProgressInfo.js index 15863ef5bd..8a0f133255 100644 --- a/lib/services/serviceFabric/lib/models/backupProgressInfo.js +++ b/lib/services/serviceFabric/lib/models/backupProgressInfo.js @@ -27,11 +27,11 @@ class BackupProgressInfo { * store, of the newly created backup. * @property {object} [epochOfLastBackupRecord] Specifies the epoch of the * last record included in backup. - * @property {string} [epochOfLastBackupRecord.configurationNumber] The + * @property {string} [epochOfLastBackupRecord.configurationVersion] The * current configuration number of this Epoch. The configuration number is an * increasing value that is updated whenever the configuration of this * replica set changes. - * @property {string} [epochOfLastBackupRecord.dataLossNumber] The current + * @property {string} [epochOfLastBackupRecord.dataLossVersion] The current * dataloss number of this Epoch. The data loss number property is an * increasing value which is updated whenever data loss is suspected, as when * loss of a quorum of replicas in the replica set that includes the Primary @@ -90,6 +90,7 @@ class BackupProgressInfo { * - "FABRIC_E_BACKUP_NOT_ENABLED" * - "FABRIC_E_BACKUP_POLICY_NOT_EXISTING" * - "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING" + * - "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR" * * - Possible values of the error code for HTTP status code 409 (Conflict) * - "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS" @@ -201,7 +202,7 @@ class BackupProgressInfo { * 'FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS', * 'FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND', * 'FABRIC_E_VOLUME_ALREADY_EXISTS', 'FABRIC_E_VOLUME_NOT_FOUND', - * 'SerializationError' + * 'SerializationError', 'FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR' * @property {string} [failureError.message] Error message. */ constructor() { @@ -254,7 +255,7 @@ class BackupProgressInfo { serializedName: 'EpochOfLastBackupRecord', type: { name: 'Composite', - className: 'BackupEpoch' + className: 'Epoch' } }, lsnOfLastBackupRecord: { diff --git a/lib/services/serviceFabric/lib/models/basicRetentionPolicyDescription.js b/lib/services/serviceFabric/lib/models/basicRetentionPolicyDescription.js new file mode 100644 index 0000000000..41da19c556 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/basicRetentionPolicyDescription.js @@ -0,0 +1,86 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Describes basic retention policy. + * + * @extends models['RetentionPolicyDescription'] + */ +class BasicRetentionPolicyDescription extends models['RetentionPolicyDescription'] { + /** + * Create a BasicRetentionPolicyDescription. + * @property {moment.duration} retentionDuration It is the minimum duration + * for which a backup created, will remain stored in the storage and might + * get deleted after that span of time. It should be specified in ISO8601 + * format. + * @property {number} [minimumNumberOfBackups] It is the minimum number of + * backups to be retained at any point of time. If specified with a non zero + * value, backups will not be deleted even if the backups have gone past + * retention duration and have number of backups less than or equal to it. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of BasicRetentionPolicyDescription + * + * @returns {object} metadata of BasicRetentionPolicyDescription + * + */ + mapper() { + return { + required: false, + serializedName: 'Basic', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'RetentionPolicyType', + clientName: 'retentionPolicyType' + }, + uberParent: 'RetentionPolicyDescription', + className: 'BasicRetentionPolicyDescription', + modelProperties: { + retentionPolicyType: { + required: true, + serializedName: 'RetentionPolicyType', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + retentionDuration: { + required: true, + serializedName: 'RetentionDuration', + type: { + name: 'TimeSpan' + } + }, + minimumNumberOfBackups: { + required: false, + serializedName: 'MinimumNumberOfBackups', + constraints: { + InclusiveMinimum: 0 + }, + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = BasicRetentionPolicyDescription; diff --git a/lib/services/serviceFabric/lib/models/chaosCodePackageRestartScheduledEvent.js b/lib/services/serviceFabric/lib/models/chaosCodePackageRestartScheduledEvent.js new file mode 100644 index 0000000000..820c562b0e --- /dev/null +++ b/lib/services/serviceFabric/lib/models/chaosCodePackageRestartScheduledEvent.js @@ -0,0 +1,145 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Chaos Restart Code Package Fault Scheduled event. + * + * @extends models['ApplicationEvent'] + */ +class ChaosCodePackageRestartScheduledEvent extends models['ApplicationEvent'] { + /** + * Create a ChaosCodePackageRestartScheduledEvent. + * @property {uuid} faultGroupId Id of fault group. + * @property {uuid} faultId Id of fault. + * @property {string} nodeName The name of a Service Fabric node. + * @property {string} serviceManifestName Service manifest name. + * @property {string} codePackageName Code package name. + * @property {string} servicePackageActivationId Id of Service package + * activation. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ChaosCodePackageRestartScheduledEvent + * + * @returns {object} metadata of ChaosCodePackageRestartScheduledEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ChaosCodePackageRestartScheduled', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ChaosCodePackageRestartScheduledEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + applicationId: { + required: true, + serializedName: 'ApplicationId', + type: { + name: 'String' + } + }, + faultGroupId: { + required: true, + serializedName: 'FaultGroupId', + type: { + name: 'String' + } + }, + faultId: { + required: true, + serializedName: 'FaultId', + type: { + name: 'String' + } + }, + nodeName: { + required: true, + serializedName: 'NodeName', + type: { + name: 'String' + } + }, + serviceManifestName: { + required: true, + serializedName: 'ServiceManifestName', + type: { + name: 'String' + } + }, + codePackageName: { + required: true, + serializedName: 'CodePackageName', + type: { + name: 'String' + } + }, + servicePackageActivationId: { + required: true, + serializedName: 'ServicePackageActivationId', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ChaosCodePackageRestartScheduledEvent; diff --git a/lib/services/serviceFabric/lib/models/chaosNodeRestartScheduledEvent.js b/lib/services/serviceFabric/lib/models/chaosNodeRestartScheduledEvent.js new file mode 100644 index 0000000000..182ac3eadc --- /dev/null +++ b/lib/services/serviceFabric/lib/models/chaosNodeRestartScheduledEvent.js @@ -0,0 +1,120 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Chaos Restart Node Fault Scheduled event. + * + * @extends models['NodeEvent'] + */ +class ChaosNodeRestartScheduledEvent extends models['NodeEvent'] { + /** + * Create a ChaosNodeRestartScheduledEvent. + * @property {number} nodeInstanceId Id of Node instance. + * @property {uuid} faultGroupId Id of fault group. + * @property {uuid} faultId Id of fault. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ChaosNodeRestartScheduledEvent + * + * @returns {object} metadata of ChaosNodeRestartScheduledEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ChaosNodeRestartScheduled', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ChaosNodeRestartScheduledEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + nodeName: { + required: true, + serializedName: 'NodeName', + type: { + name: 'String' + } + }, + nodeInstanceId: { + required: true, + serializedName: 'NodeInstanceId', + type: { + name: 'Number' + } + }, + faultGroupId: { + required: true, + serializedName: 'FaultGroupId', + type: { + name: 'String' + } + }, + faultId: { + required: true, + serializedName: 'FaultId', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ChaosNodeRestartScheduledEvent; diff --git a/lib/services/serviceFabric/lib/models/chaosPartitionPrimaryMoveScheduledEvent.js b/lib/services/serviceFabric/lib/models/chaosPartitionPrimaryMoveScheduledEvent.js new file mode 100644 index 0000000000..a8d0e7c940 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/chaosPartitionPrimaryMoveScheduledEvent.js @@ -0,0 +1,136 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Chaos Move Primary Fault Scheduled event. + * + * @extends models['PartitionEvent'] + */ +class ChaosPartitionPrimaryMoveScheduledEvent extends models['PartitionEvent'] { + /** + * Create a ChaosPartitionPrimaryMoveScheduledEvent. + * @property {uuid} faultGroupId Id of fault group. + * @property {uuid} faultId Id of fault. + * @property {string} serviceName Service name. + * @property {string} nodeTo The name of a Service Fabric node. + * @property {boolean} forcedMove Indicates a forced move. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ChaosPartitionPrimaryMoveScheduledEvent + * + * @returns {object} metadata of ChaosPartitionPrimaryMoveScheduledEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ChaosPartitionPrimaryMoveScheduled', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ChaosPartitionPrimaryMoveScheduledEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + partitionId: { + required: true, + serializedName: 'PartitionId', + type: { + name: 'String' + } + }, + faultGroupId: { + required: true, + serializedName: 'FaultGroupId', + type: { + name: 'String' + } + }, + faultId: { + required: true, + serializedName: 'FaultId', + type: { + name: 'String' + } + }, + serviceName: { + required: true, + serializedName: 'ServiceName', + type: { + name: 'String' + } + }, + nodeTo: { + required: true, + serializedName: 'NodeTo', + type: { + name: 'String' + } + }, + forcedMove: { + required: true, + serializedName: 'ForcedMove', + type: { + name: 'Boolean' + } + } + } + } + }; + } +} + +module.exports = ChaosPartitionPrimaryMoveScheduledEvent; diff --git a/lib/services/serviceFabric/lib/models/chaosPartitionSecondaryMoveScheduledEvent.js b/lib/services/serviceFabric/lib/models/chaosPartitionSecondaryMoveScheduledEvent.js new file mode 100644 index 0000000000..079264f0e2 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/chaosPartitionSecondaryMoveScheduledEvent.js @@ -0,0 +1,144 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Chaos Move Secondary Fault Scheduled event. + * + * @extends models['PartitionEvent'] + */ +class ChaosPartitionSecondaryMoveScheduledEvent extends models['PartitionEvent'] { + /** + * Create a ChaosPartitionSecondaryMoveScheduledEvent. + * @property {uuid} faultGroupId Id of fault group. + * @property {uuid} faultId Id of fault. + * @property {string} serviceName Service name. + * @property {string} sourceNode The name of a Service Fabric node. + * @property {string} destinationNode The name of a Service Fabric node. + * @property {boolean} forcedMove Indicates a forced move. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ChaosPartitionSecondaryMoveScheduledEvent + * + * @returns {object} metadata of ChaosPartitionSecondaryMoveScheduledEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ChaosPartitionSecondaryMoveScheduled', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ChaosPartitionSecondaryMoveScheduledEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + partitionId: { + required: true, + serializedName: 'PartitionId', + type: { + name: 'String' + } + }, + faultGroupId: { + required: true, + serializedName: 'FaultGroupId', + type: { + name: 'String' + } + }, + faultId: { + required: true, + serializedName: 'FaultId', + type: { + name: 'String' + } + }, + serviceName: { + required: true, + serializedName: 'ServiceName', + type: { + name: 'String' + } + }, + sourceNode: { + required: true, + serializedName: 'SourceNode', + type: { + name: 'String' + } + }, + destinationNode: { + required: true, + serializedName: 'DestinationNode', + type: { + name: 'String' + } + }, + forcedMove: { + required: true, + serializedName: 'ForcedMove', + type: { + name: 'Boolean' + } + } + } + } + }; + } +} + +module.exports = ChaosPartitionSecondaryMoveScheduledEvent; diff --git a/lib/services/serviceFabric/lib/models/chaosReplicaRemovalScheduledEvent.js b/lib/services/serviceFabric/lib/models/chaosReplicaRemovalScheduledEvent.js new file mode 100644 index 0000000000..135dd5d394 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/chaosReplicaRemovalScheduledEvent.js @@ -0,0 +1,127 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Chaos Remove Replica Fault Scheduled event. + * + * @extends models['ReplicaEvent'] + */ +class ChaosReplicaRemovalScheduledEvent extends models['ReplicaEvent'] { + /** + * Create a ChaosReplicaRemovalScheduledEvent. + * @property {uuid} faultGroupId Id of fault group. + * @property {uuid} faultId Id of fault. + * @property {string} serviceUri Service name. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ChaosReplicaRemovalScheduledEvent + * + * @returns {object} metadata of ChaosReplicaRemovalScheduledEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ChaosReplicaRemovalScheduled', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ChaosReplicaRemovalScheduledEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + partitionId: { + required: true, + serializedName: 'PartitionId', + type: { + name: 'String' + } + }, + replicaId: { + required: true, + serializedName: 'ReplicaId', + type: { + name: 'Number' + } + }, + faultGroupId: { + required: true, + serializedName: 'FaultGroupId', + type: { + name: 'String' + } + }, + faultId: { + required: true, + serializedName: 'FaultId', + type: { + name: 'String' + } + }, + serviceUri: { + required: true, + serializedName: 'ServiceUri', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ChaosReplicaRemovalScheduledEvent; diff --git a/lib/services/serviceFabric/lib/models/chaosReplicaRestartScheduledEvent.js b/lib/services/serviceFabric/lib/models/chaosReplicaRestartScheduledEvent.js new file mode 100644 index 0000000000..9f03905253 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/chaosReplicaRestartScheduledEvent.js @@ -0,0 +1,127 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Chaos Restart Replica Fault Scheduled event. + * + * @extends models['ReplicaEvent'] + */ +class ChaosReplicaRestartScheduledEvent extends models['ReplicaEvent'] { + /** + * Create a ChaosReplicaRestartScheduledEvent. + * @property {uuid} faultGroupId Id of fault group. + * @property {uuid} faultId Id of fault. + * @property {string} serviceUri Service name. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ChaosReplicaRestartScheduledEvent + * + * @returns {object} metadata of ChaosReplicaRestartScheduledEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ChaosReplicaRestartScheduled', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ChaosReplicaRestartScheduledEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + partitionId: { + required: true, + serializedName: 'PartitionId', + type: { + name: 'String' + } + }, + replicaId: { + required: true, + serializedName: 'ReplicaId', + type: { + name: 'Number' + } + }, + faultGroupId: { + required: true, + serializedName: 'FaultGroupId', + type: { + name: 'String' + } + }, + faultId: { + required: true, + serializedName: 'FaultId', + type: { + name: 'String' + } + }, + serviceUri: { + required: true, + serializedName: 'ServiceUri', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ChaosReplicaRestartScheduledEvent; diff --git a/lib/services/serviceFabric/lib/models/chaosStartedEvent.js b/lib/services/serviceFabric/lib/models/chaosStartedEvent.js index f07b4c2d2a..ac27ef4fda 100644 --- a/lib/services/serviceFabric/lib/models/chaosStartedEvent.js +++ b/lib/services/serviceFabric/lib/models/chaosStartedEvent.js @@ -66,6 +66,13 @@ class ChaosStartedEvent extends models['ClusterEvent'] { name: 'String' } }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, timeStamp: { required: true, serializedName: 'TimeStamp', diff --git a/lib/services/serviceFabric/lib/models/chaosStoppedEvent.js b/lib/services/serviceFabric/lib/models/chaosStoppedEvent.js index eeaa6ca807..35ad8eb522 100644 --- a/lib/services/serviceFabric/lib/models/chaosStoppedEvent.js +++ b/lib/services/serviceFabric/lib/models/chaosStoppedEvent.js @@ -52,6 +52,13 @@ class ChaosStoppedEvent extends models['ClusterEvent'] { name: 'String' } }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, timeStamp: { required: true, serializedName: 'TimeStamp', diff --git a/lib/services/serviceFabric/lib/models/clusterConfigurationUpgradeDescription.js b/lib/services/serviceFabric/lib/models/clusterConfigurationUpgradeDescription.js index 9e2a192e3b..e781cf0a37 100644 --- a/lib/services/serviceFabric/lib/models/clusterConfigurationUpgradeDescription.js +++ b/lib/services/serviceFabric/lib/models/clusterConfigurationUpgradeDescription.js @@ -19,16 +19,21 @@ const moment = require('moment'); class ClusterConfigurationUpgradeDescription { /** * Create a ClusterConfigurationUpgradeDescription. - * @property {string} clusterConfig The cluster configuration. + * @property {string} clusterConfig The cluster configuration as a JSON + * string. For example, [this + * file](https://github.com/Azure-Samples/service-fabric-dotnet-standalone-cluster-configuration/blob/master/Samples/ClusterConfig.Unsecure.DevCluster.json) + * contains JSON describing the [nodes and other properties of the + * cluster](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-manifest). * @property {moment.duration} [healthCheckRetryTimeout] The length of time - * between attempts to perform a health checks if the application or cluster - * is not healthy. Default value: moment.duration('PT0H0M0S') . + * between attempts to perform health checks if the application or cluster is + * not healthy. Default value: moment.duration('PT0H0M0S') . * @property {moment.duration} [healthCheckWaitDurationInSeconds] The length * of time to wait after completing an upgrade domain before starting the * health checks process. Default value: moment.duration('PT0H0M0S') . * @property {moment.duration} [healthCheckStableDurationInSeconds] The - * length of time that the application or cluster must remain healthy. - * Default value: moment.duration('PT0H0M0S') . + * length of time that the application or cluster must remain healthy before + * the upgrade proceeds to the next upgrade domain. Default value: + * moment.duration('PT0H0M0S') . * @property {moment.duration} [upgradeDomainTimeoutInSeconds] The timeout * for the upgrade domain. Default value: moment.duration('PT0H0M0S') . * @property {moment.duration} [upgradeTimeoutInSeconds] The upgrade timeout. diff --git a/lib/services/serviceFabric/lib/models/clusterEvent.js b/lib/services/serviceFabric/lib/models/clusterEvent.js index e5d5f1deb2..c626492ada 100644 --- a/lib/services/serviceFabric/lib/models/clusterEvent.js +++ b/lib/services/serviceFabric/lib/models/clusterEvent.js @@ -51,6 +51,13 @@ class ClusterEvent extends models['FabricEvent'] { name: 'String' } }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, timeStamp: { required: true, serializedName: 'TimeStamp', diff --git a/lib/services/serviceFabric/lib/models/clusterHealthReportExpiredEvent.js b/lib/services/serviceFabric/lib/models/clusterHealthReportExpiredEvent.js index ef8ea54c4a..fa904f0412 100644 --- a/lib/services/serviceFabric/lib/models/clusterHealthReportExpiredEvent.js +++ b/lib/services/serviceFabric/lib/models/clusterHealthReportExpiredEvent.js @@ -60,6 +60,13 @@ class ClusterHealthReportExpiredEvent extends models['ClusterEvent'] { name: 'String' } }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, timeStamp: { required: true, serializedName: 'TimeStamp', diff --git a/lib/services/serviceFabric/lib/models/clusterNewHealthReportEvent.js b/lib/services/serviceFabric/lib/models/clusterNewHealthReportEvent.js new file mode 100644 index 0000000000..6913b1ace8 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/clusterNewHealthReportEvent.js @@ -0,0 +1,154 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Cluster Health Report Created event. + * + * @extends models['ClusterEvent'] + */ +class ClusterNewHealthReportEvent extends models['ClusterEvent'] { + /** + * Create a ClusterNewHealthReportEvent. + * @property {string} sourceId Id of report source. + * @property {string} property Describes the property. + * @property {string} healthState Describes the property health state. + * @property {number} timeToLiveMs Time to live in milli-seconds. + * @property {number} sequenceNumber Sequence number of report. + * @property {string} description Description of report. + * @property {boolean} removeWhenExpired Indicates the removal when it + * expires. + * @property {date} sourceUtcTimestamp Source time. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ClusterNewHealthReportEvent + * + * @returns {object} metadata of ClusterNewHealthReportEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ClusterNewHealthReport', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ClusterNewHealthReportEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + sourceId: { + required: true, + serializedName: 'SourceId', + type: { + name: 'String' + } + }, + property: { + required: true, + serializedName: 'Property', + type: { + name: 'String' + } + }, + healthState: { + required: true, + serializedName: 'HealthState', + type: { + name: 'String' + } + }, + timeToLiveMs: { + required: true, + serializedName: 'TimeToLiveMs', + type: { + name: 'Number' + } + }, + sequenceNumber: { + required: true, + serializedName: 'SequenceNumber', + type: { + name: 'Number' + } + }, + description: { + required: true, + serializedName: 'Description', + type: { + name: 'String' + } + }, + removeWhenExpired: { + required: true, + serializedName: 'RemoveWhenExpired', + type: { + name: 'Boolean' + } + }, + sourceUtcTimestamp: { + required: true, + serializedName: 'SourceUtcTimestamp', + type: { + name: 'DateTime' + } + } + } + } + }; + } +} + +module.exports = ClusterNewHealthReportEvent; diff --git a/lib/services/serviceFabric/lib/models/clusterUpgradeCompletedEvent.js b/lib/services/serviceFabric/lib/models/clusterUpgradeCompletedEvent.js new file mode 100644 index 0000000000..840d8e2d9d --- /dev/null +++ b/lib/services/serviceFabric/lib/models/clusterUpgradeCompletedEvent.js @@ -0,0 +1,106 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Cluster Upgrade Completed event. + * + * @extends models['ClusterEvent'] + */ +class ClusterUpgradeCompletedEvent extends models['ClusterEvent'] { + /** + * Create a ClusterUpgradeCompletedEvent. + * @property {string} targetClusterVersion Target Cluster version. + * @property {number} overallUpgradeElapsedTimeInMs Overall duration of + * upgrade in milli-seconds. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ClusterUpgradeCompletedEvent + * + * @returns {object} metadata of ClusterUpgradeCompletedEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ClusterUpgradeCompleted', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ClusterUpgradeCompletedEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + targetClusterVersion: { + required: true, + serializedName: 'TargetClusterVersion', + type: { + name: 'String' + } + }, + overallUpgradeElapsedTimeInMs: { + required: true, + serializedName: 'OverallUpgradeElapsedTimeInMs', + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = ClusterUpgradeCompletedEvent; diff --git a/lib/services/serviceFabric/lib/models/clusterUpgradeDomainCompletedEvent.js b/lib/services/serviceFabric/lib/models/clusterUpgradeDomainCompletedEvent.js new file mode 100644 index 0000000000..b8e9130672 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/clusterUpgradeDomainCompletedEvent.js @@ -0,0 +1,122 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Cluster Upgrade Domain Completed event. + * + * @extends models['ClusterEvent'] + */ +class ClusterUpgradeDomainCompletedEvent extends models['ClusterEvent'] { + /** + * Create a ClusterUpgradeDomainCompletedEvent. + * @property {string} targetClusterVersion Target Cluster version. + * @property {string} upgradeState State of upgrade. + * @property {string} upgradeDomains Upgrade domains. + * @property {number} upgradeDomainElapsedTimeInMs Duration of domain upgrade + * in milli-seconds. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ClusterUpgradeDomainCompletedEvent + * + * @returns {object} metadata of ClusterUpgradeDomainCompletedEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ClusterUpgradeDomainCompleted', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ClusterUpgradeDomainCompletedEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + targetClusterVersion: { + required: true, + serializedName: 'TargetClusterVersion', + type: { + name: 'String' + } + }, + upgradeState: { + required: true, + serializedName: 'UpgradeState', + type: { + name: 'String' + } + }, + upgradeDomains: { + required: true, + serializedName: 'UpgradeDomains', + type: { + name: 'String' + } + }, + upgradeDomainElapsedTimeInMs: { + required: true, + serializedName: 'UpgradeDomainElapsedTimeInMs', + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = ClusterUpgradeDomainCompletedEvent; diff --git a/lib/services/serviceFabric/lib/models/clusterUpgradeRollbackCompletedEvent.js b/lib/services/serviceFabric/lib/models/clusterUpgradeRollbackCompletedEvent.js new file mode 100644 index 0000000000..633c34dc96 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/clusterUpgradeRollbackCompletedEvent.js @@ -0,0 +1,114 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Cluster Upgrade Rollback Completed event. + * + * @extends models['ClusterEvent'] + */ +class ClusterUpgradeRollbackCompletedEvent extends models['ClusterEvent'] { + /** + * Create a ClusterUpgradeRollbackCompletedEvent. + * @property {string} targetClusterVersion Target Cluster version. + * @property {string} failureReason Describes failure. + * @property {number} overallUpgradeElapsedTimeInMs Overall duration of + * upgrade in milli-seconds. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ClusterUpgradeRollbackCompletedEvent + * + * @returns {object} metadata of ClusterUpgradeRollbackCompletedEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ClusterUpgradeRollbackCompleted', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ClusterUpgradeRollbackCompletedEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + targetClusterVersion: { + required: true, + serializedName: 'TargetClusterVersion', + type: { + name: 'String' + } + }, + failureReason: { + required: true, + serializedName: 'FailureReason', + type: { + name: 'String' + } + }, + overallUpgradeElapsedTimeInMs: { + required: true, + serializedName: 'OverallUpgradeElapsedTimeInMs', + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = ClusterUpgradeRollbackCompletedEvent; diff --git a/lib/services/serviceFabric/lib/models/clusterUpgradeRollbackStartedEvent.js b/lib/services/serviceFabric/lib/models/clusterUpgradeRollbackStartedEvent.js new file mode 100644 index 0000000000..ec7039c960 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/clusterUpgradeRollbackStartedEvent.js @@ -0,0 +1,114 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Cluster Upgrade Rollback Started event. + * + * @extends models['ClusterEvent'] + */ +class ClusterUpgradeRollbackStartedEvent extends models['ClusterEvent'] { + /** + * Create a ClusterUpgradeRollbackStartedEvent. + * @property {string} targetClusterVersion Target Cluster version. + * @property {string} failureReason Describes failure. + * @property {number} overallUpgradeElapsedTimeInMs Overall duration of + * upgrade in milli-seconds. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ClusterUpgradeRollbackStartedEvent + * + * @returns {object} metadata of ClusterUpgradeRollbackStartedEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ClusterUpgradeRollbackStarted', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ClusterUpgradeRollbackStartedEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + targetClusterVersion: { + required: true, + serializedName: 'TargetClusterVersion', + type: { + name: 'String' + } + }, + failureReason: { + required: true, + serializedName: 'FailureReason', + type: { + name: 'String' + } + }, + overallUpgradeElapsedTimeInMs: { + required: true, + serializedName: 'OverallUpgradeElapsedTimeInMs', + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = ClusterUpgradeRollbackStartedEvent; diff --git a/lib/services/serviceFabric/lib/models/clusterUpgradeStartedEvent.js b/lib/services/serviceFabric/lib/models/clusterUpgradeStartedEvent.js new file mode 100644 index 0000000000..52818cd567 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/clusterUpgradeStartedEvent.js @@ -0,0 +1,129 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Cluster Upgrade Started event. + * + * @extends models['ClusterEvent'] + */ +class ClusterUpgradeStartedEvent extends models['ClusterEvent'] { + /** + * Create a ClusterUpgradeStartedEvent. + * @property {string} currentClusterVersion Current Cluster version. + * @property {string} targetClusterVersion Target Cluster version. + * @property {string} upgradeType Type of upgrade. + * @property {string} rollingUpgradeMode Mode of upgrade. + * @property {string} failureAction Action if failed. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ClusterUpgradeStartedEvent + * + * @returns {object} metadata of ClusterUpgradeStartedEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ClusterUpgradeStarted', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ClusterUpgradeStartedEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + currentClusterVersion: { + required: true, + serializedName: 'CurrentClusterVersion', + type: { + name: 'String' + } + }, + targetClusterVersion: { + required: true, + serializedName: 'TargetClusterVersion', + type: { + name: 'String' + } + }, + upgradeType: { + required: true, + serializedName: 'UpgradeType', + type: { + name: 'String' + } + }, + rollingUpgradeMode: { + required: true, + serializedName: 'RollingUpgradeMode', + type: { + name: 'String' + } + }, + failureAction: { + required: true, + serializedName: 'FailureAction', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ClusterUpgradeStartedEvent; diff --git a/lib/services/serviceFabric/lib/models/clusterVersion.js b/lib/services/serviceFabric/lib/models/clusterVersion.js new file mode 100644 index 0000000000..4778350bd2 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/clusterVersion.js @@ -0,0 +1,52 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * The cluster version. + * + */ +class ClusterVersion { + /** + * Create a ClusterVersion. + * @property {string} [version] The Service Fabric cluster runtime version. + */ + constructor() { + } + + /** + * Defines the metadata of ClusterVersion + * + * @returns {object} metadata of ClusterVersion + * + */ + mapper() { + return { + required: false, + serializedName: 'ClusterVersion', + type: { + name: 'Composite', + className: 'ClusterVersion', + modelProperties: { + version: { + required: false, + serializedName: 'Version', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ClusterVersion; diff --git a/lib/services/serviceFabric/lib/models/composeDeploymentUpgradeDescription.js b/lib/services/serviceFabric/lib/models/composeDeploymentUpgradeDescription.js index 20175c2cc4..76e60bdb44 100644 --- a/lib/services/serviceFabric/lib/models/composeDeploymentUpgradeDescription.js +++ b/lib/services/serviceFabric/lib/models/composeDeploymentUpgradeDescription.js @@ -130,8 +130,8 @@ class ComposeDeploymentUpgradeDescription { * replicas. Default percentage is zero. * @property {number} * [applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed - * values are Byte values from zero to 100. + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. * * The percentage represents the maximum tolerated percentage of services * that can be unhealthy before the application is considered in error. diff --git a/lib/services/serviceFabric/lib/models/composeDeploymentUpgradeProgressInfo.js b/lib/services/serviceFabric/lib/models/composeDeploymentUpgradeProgressInfo.js index 7004516e34..d419a7575b 100644 --- a/lib/services/serviceFabric/lib/models/composeDeploymentUpgradeProgressInfo.js +++ b/lib/services/serviceFabric/lib/models/composeDeploymentUpgradeProgressInfo.js @@ -130,8 +130,8 @@ class ComposeDeploymentUpgradeProgressInfo { * replicas. Default percentage is zero. * @property {number} * [applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed - * values are Byte values from zero to 100. + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. * * The percentage represents the maximum tolerated percentage of services * that can be unhealthy before the application is considered in error. diff --git a/lib/services/serviceFabric/lib/models/containerCodePackageProperties.js b/lib/services/serviceFabric/lib/models/containerCodePackageProperties.js index 15997a1401..82f9be314d 100644 --- a/lib/services/serviceFabric/lib/models/containerCodePackageProperties.js +++ b/lib/services/serviceFabric/lib/models/containerCodePackageProperties.js @@ -25,7 +25,8 @@ class ContainerCodePackageProperties { * @property {string} [imageRegistryCredential.username] The username for the * private registry. * @property {string} [imageRegistryCredential.password] The password for the - * private registry. + * private registry. The password is required for create or update + * operations, however it is not returned in the get or list operations. * @property {string} [entrypoint] Override for the default entry point in * the container. * @property {array} [commands] Command array to execute within the container @@ -38,8 +39,7 @@ class ContainerCodePackageProperties { * path for Linux container is "/var/secrets". * @property {array} [labels] The labels to set in this container. * @property {array} [endpoints] The endpoints exposed by this container. - * @property {object} resources This type describes the resource requirements - * for a container or a service. + * @property {object} resources The resources required by this container. * @property {object} [resources.requests] Describes the requested resources * for a given container. * @property {number} [resources.requests.memoryInGB] The memory request in @@ -51,8 +51,20 @@ class ContainerCodePackageProperties { * @property {number} [resources.limits.memoryInGB] The memory limit in GB. * @property {number} [resources.limits.cpu] CPU limits in cores. At present, * only full cores are supported. - * @property {array} [volumeRefs] The volumes to be attached to the - * container. + * @property {array} [volumeRefs] Volumes to be attached to the container. + * The lifetime of these volumes is independent of the application's + * lifetime. + * @property {array} [volumes] Volumes to be attached to the container. The + * lifetime of these volumes is scoped to the application's lifetime. + * @property {object} [diagnostics] Reference to sinks in + * DiagnosticsDescription. + * @property {boolean} [diagnostics.enabled] Status of whether or not sinks + * are enabled. + * @property {array} [diagnostics.sinkRefs] List of sinks to be used if + * enabled. References the list of sinks in DiagnosticsDescription. + * @property {array} [reliableCollectionsRefs] A list of ReliableCollection + * resources used by this particular code package. Please refer to + * ReliablecollectionsRef for more details. * @property {object} [instanceView] Runtime information of a container * instance. * @property {number} [instanceView.restartCount] The number of times the @@ -83,12 +95,6 @@ class ContainerCodePackageProperties { * Human-readable status of this state. * @property {array} [instanceView.events] The events of this container * instance. - * @property {object} [diagnostics] Reference to sinks in - * DiagnosticsDescription. - * @property {boolean} [diagnostics.enabled] Status of whether or not sinks - * are enabled. - * @property {array} [diagnostics.sinkRefs] List of sinks to be used if - * enabled. References the list of sinks in DiagnosticsDescription. */ constructor() { } @@ -225,21 +231,27 @@ class ContainerCodePackageProperties { name: 'Sequence', element: { required: false, - serializedName: 'ContainerVolumeElementType', + serializedName: 'VolumeReferenceElementType', type: { name: 'Composite', - className: 'ContainerVolume' + className: 'VolumeReference' } } } }, - instanceView: { + volumes: { required: false, - readOnly: true, - serializedName: 'instanceView', + serializedName: 'volumes', type: { - name: 'Composite', - className: 'ContainerInstanceView' + name: 'Sequence', + element: { + required: false, + serializedName: 'ApplicationScopedVolumeElementType', + type: { + name: 'Composite', + className: 'ApplicationScopedVolume' + } + } } }, diagnostics: { @@ -249,6 +261,30 @@ class ContainerCodePackageProperties { name: 'Composite', className: 'DiagnosticsRef' } + }, + reliableCollectionsRefs: { + required: false, + serializedName: 'reliableCollectionsRefs', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ReliableCollectionsRefElementType', + type: { + name: 'Composite', + className: 'ReliableCollectionsRef' + } + } + } + }, + instanceView: { + required: false, + readOnly: true, + serializedName: 'instanceView', + type: { + name: 'Composite', + className: 'ContainerInstanceView' + } } } } diff --git a/lib/services/serviceFabric/lib/models/containerInstanceEvent.js b/lib/services/serviceFabric/lib/models/containerInstanceEvent.js index 9cf71318ce..9aed4e4897 100644 --- a/lib/services/serviceFabric/lib/models/containerInstanceEvent.js +++ b/lib/services/serviceFabric/lib/models/containerInstanceEvent.js @@ -51,6 +51,13 @@ class ContainerInstanceEvent extends models['FabricEvent'] { name: 'String' } }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, timeStamp: { required: true, serializedName: 'TimeStamp', diff --git a/lib/services/serviceFabric/lib/models/deployedApplicationHealthReportExpiredEvent.js b/lib/services/serviceFabric/lib/models/deployedApplicationHealthReportExpiredEvent.js index 07b0697e4b..4bc381eb28 100644 --- a/lib/services/serviceFabric/lib/models/deployedApplicationHealthReportExpiredEvent.js +++ b/lib/services/serviceFabric/lib/models/deployedApplicationHealthReportExpiredEvent.js @@ -62,6 +62,13 @@ class DeployedApplicationHealthReportExpiredEvent extends models['ApplicationEve name: 'String' } }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, timeStamp: { required: true, serializedName: 'TimeStamp', diff --git a/lib/services/serviceFabric/lib/models/deployedApplicationNewHealthReportEvent.js b/lib/services/serviceFabric/lib/models/deployedApplicationNewHealthReportEvent.js new file mode 100644 index 0000000000..b7aefbe659 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/deployedApplicationNewHealthReportEvent.js @@ -0,0 +1,177 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Deployed Application Health Report Created event. + * + * @extends models['ApplicationEvent'] + */ +class DeployedApplicationNewHealthReportEvent extends models['ApplicationEvent'] { + /** + * Create a DeployedApplicationNewHealthReportEvent. + * @property {number} applicationInstanceId Id of Application instance. + * @property {string} nodeName The name of a Service Fabric node. + * @property {string} sourceId Id of report source. + * @property {string} property Describes the property. + * @property {string} healthState Describes the property health state. + * @property {number} timeToLiveMs Time to live in milli-seconds. + * @property {number} sequenceNumber Sequence number of report. + * @property {string} description Description of report. + * @property {boolean} removeWhenExpired Indicates the removal when it + * expires. + * @property {date} sourceUtcTimestamp Source time. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of DeployedApplicationNewHealthReportEvent + * + * @returns {object} metadata of DeployedApplicationNewHealthReportEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'DeployedApplicationNewHealthReport', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'DeployedApplicationNewHealthReportEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + applicationId: { + required: true, + serializedName: 'ApplicationId', + type: { + name: 'String' + } + }, + applicationInstanceId: { + required: true, + serializedName: 'ApplicationInstanceId', + type: { + name: 'Number' + } + }, + nodeName: { + required: true, + serializedName: 'NodeName', + type: { + name: 'String' + } + }, + sourceId: { + required: true, + serializedName: 'SourceId', + type: { + name: 'String' + } + }, + property: { + required: true, + serializedName: 'Property', + type: { + name: 'String' + } + }, + healthState: { + required: true, + serializedName: 'HealthState', + type: { + name: 'String' + } + }, + timeToLiveMs: { + required: true, + serializedName: 'TimeToLiveMs', + type: { + name: 'Number' + } + }, + sequenceNumber: { + required: true, + serializedName: 'SequenceNumber', + type: { + name: 'Number' + } + }, + description: { + required: true, + serializedName: 'Description', + type: { + name: 'String' + } + }, + removeWhenExpired: { + required: true, + serializedName: 'RemoveWhenExpired', + type: { + name: 'Boolean' + } + }, + sourceUtcTimestamp: { + required: true, + serializedName: 'SourceUtcTimestamp', + type: { + name: 'DateTime' + } + } + } + } + }; + } +} + +module.exports = DeployedApplicationNewHealthReportEvent; diff --git a/lib/services/serviceFabric/lib/models/deployedServicePackageHealthReportExpiredEvent.js b/lib/services/serviceFabric/lib/models/deployedServicePackageHealthReportExpiredEvent.js new file mode 100644 index 0000000000..eb7e835267 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/deployedServicePackageHealthReportExpiredEvent.js @@ -0,0 +1,195 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Deployed Service Health Report Expired event. + * + * @extends models['ApplicationEvent'] + */ +class DeployedServicePackageHealthReportExpiredEvent extends models['ApplicationEvent'] { + /** + * Create a DeployedServicePackageHealthReportExpiredEvent. + * @property {string} serviceManifest Service manifest name. + * @property {number} servicePackageInstanceId Id of Service package + * instance. + * @property {string} servicePackageActivationId Id of Service package + * activation. + * @property {string} nodeName The name of a Service Fabric node. + * @property {string} sourceId Id of report source. + * @property {string} property Describes the property. + * @property {string} healthState Describes the property health state. + * @property {number} timeToLiveMs Time to live in milli-seconds. + * @property {number} sequenceNumber Sequence number of report. + * @property {string} description Description of report. + * @property {boolean} removeWhenExpired Indicates the removal when it + * expires. + * @property {date} sourceUtcTimestamp Source time. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of DeployedServicePackageHealthReportExpiredEvent + * + * @returns {object} metadata of DeployedServicePackageHealthReportExpiredEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'DeployedServicePackageHealthReportExpired', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'DeployedServicePackageHealthReportExpiredEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + applicationId: { + required: true, + serializedName: 'ApplicationId', + type: { + name: 'String' + } + }, + serviceManifest: { + required: true, + serializedName: 'ServiceManifest', + type: { + name: 'String' + } + }, + servicePackageInstanceId: { + required: true, + serializedName: 'ServicePackageInstanceId', + type: { + name: 'Number' + } + }, + servicePackageActivationId: { + required: true, + serializedName: 'ServicePackageActivationId', + type: { + name: 'String' + } + }, + nodeName: { + required: true, + serializedName: 'NodeName', + type: { + name: 'String' + } + }, + sourceId: { + required: true, + serializedName: 'SourceId', + type: { + name: 'String' + } + }, + property: { + required: true, + serializedName: 'Property', + type: { + name: 'String' + } + }, + healthState: { + required: true, + serializedName: 'HealthState', + type: { + name: 'String' + } + }, + timeToLiveMs: { + required: true, + serializedName: 'TimeToLiveMs', + type: { + name: 'Number' + } + }, + sequenceNumber: { + required: true, + serializedName: 'SequenceNumber', + type: { + name: 'Number' + } + }, + description: { + required: true, + serializedName: 'Description', + type: { + name: 'String' + } + }, + removeWhenExpired: { + required: true, + serializedName: 'RemoveWhenExpired', + type: { + name: 'Boolean' + } + }, + sourceUtcTimestamp: { + required: true, + serializedName: 'SourceUtcTimestamp', + type: { + name: 'DateTime' + } + } + } + } + }; + } +} + +module.exports = DeployedServicePackageHealthReportExpiredEvent; diff --git a/lib/services/serviceFabric/lib/models/deployedServicePackageNewHealthReportEvent.js b/lib/services/serviceFabric/lib/models/deployedServicePackageNewHealthReportEvent.js new file mode 100644 index 0000000000..9f2f383dc7 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/deployedServicePackageNewHealthReportEvent.js @@ -0,0 +1,195 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Deployed Service Health Report Created event. + * + * @extends models['ApplicationEvent'] + */ +class DeployedServicePackageNewHealthReportEvent extends models['ApplicationEvent'] { + /** + * Create a DeployedServicePackageNewHealthReportEvent. + * @property {string} serviceManifestName Service manifest name. + * @property {number} servicePackageInstanceId Id of Service package + * instance. + * @property {string} servicePackageActivationId Id of Service package + * activation. + * @property {string} nodeName The name of a Service Fabric node. + * @property {string} sourceId Id of report source. + * @property {string} property Describes the property. + * @property {string} healthState Describes the property health state. + * @property {number} timeToLiveMs Time to live in milli-seconds. + * @property {number} sequenceNumber Sequence number of report. + * @property {string} description Description of report. + * @property {boolean} removeWhenExpired Indicates the removal when it + * expires. + * @property {date} sourceUtcTimestamp Source time. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of DeployedServicePackageNewHealthReportEvent + * + * @returns {object} metadata of DeployedServicePackageNewHealthReportEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'DeployedServicePackageNewHealthReport', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'DeployedServicePackageNewHealthReportEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + applicationId: { + required: true, + serializedName: 'ApplicationId', + type: { + name: 'String' + } + }, + serviceManifestName: { + required: true, + serializedName: 'ServiceManifestName', + type: { + name: 'String' + } + }, + servicePackageInstanceId: { + required: true, + serializedName: 'ServicePackageInstanceId', + type: { + name: 'Number' + } + }, + servicePackageActivationId: { + required: true, + serializedName: 'ServicePackageActivationId', + type: { + name: 'String' + } + }, + nodeName: { + required: true, + serializedName: 'NodeName', + type: { + name: 'String' + } + }, + sourceId: { + required: true, + serializedName: 'SourceId', + type: { + name: 'String' + } + }, + property: { + required: true, + serializedName: 'Property', + type: { + name: 'String' + } + }, + healthState: { + required: true, + serializedName: 'HealthState', + type: { + name: 'String' + } + }, + timeToLiveMs: { + required: true, + serializedName: 'TimeToLiveMs', + type: { + name: 'Number' + } + }, + sequenceNumber: { + required: true, + serializedName: 'SequenceNumber', + type: { + name: 'Number' + } + }, + description: { + required: true, + serializedName: 'Description', + type: { + name: 'String' + } + }, + removeWhenExpired: { + required: true, + serializedName: 'RemoveWhenExpired', + type: { + name: 'Boolean' + } + }, + sourceUtcTimestamp: { + required: true, + serializedName: 'SourceUtcTimestamp', + type: { + name: 'DateTime' + } + } + } + } + }; + } +} + +module.exports = DeployedServicePackageNewHealthReportEvent; diff --git a/lib/services/serviceFabric/lib/models/disableBackupDescription.js b/lib/services/serviceFabric/lib/models/disableBackupDescription.js new file mode 100644 index 0000000000..c4f1509c53 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/disableBackupDescription.js @@ -0,0 +1,55 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * It describes the body parameters while disabling backup of a backup + * entity(Application/Service/Partition). + * + */ +class DisableBackupDescription { + /** + * Create a DisableBackupDescription. + * @property {boolean} cleanBackup Boolean flag to delete backups. It can be + * set to true for deleting all the backups which were created for the backup + * entity that is getting disabled for backup. + */ + constructor() { + } + + /** + * Defines the metadata of DisableBackupDescription + * + * @returns {object} metadata of DisableBackupDescription + * + */ + mapper() { + return { + required: false, + serializedName: 'DisableBackupDescription', + type: { + name: 'Composite', + className: 'DisableBackupDescription', + modelProperties: { + cleanBackup: { + required: true, + serializedName: 'CleanBackup', + type: { + name: 'Boolean' + } + } + } + } + }; + } +} + +module.exports = DisableBackupDescription; diff --git a/lib/services/serviceFabric/lib/models/endpointRef.js b/lib/services/serviceFabric/lib/models/endpointRef.js new file mode 100644 index 0000000000..ae0a700b14 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/endpointRef.js @@ -0,0 +1,52 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Describes a reference to a service endpoint. + * + */ +class EndpointRef { + /** + * Create a EndpointRef. + * @property {string} [name] Name of the endpoint. + */ + constructor() { + } + + /** + * Defines the metadata of EndpointRef + * + * @returns {object} metadata of EndpointRef + * + */ + mapper() { + return { + required: false, + serializedName: 'EndpointRef', + type: { + name: 'Composite', + className: 'EndpointRef', + modelProperties: { + name: { + required: false, + serializedName: 'name', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = EndpointRef; diff --git a/lib/services/serviceFabric/lib/models/fabricError.js b/lib/services/serviceFabric/lib/models/fabricError.js index 893a85ef91..6d9c36f38a 100644 --- a/lib/services/serviceFabric/lib/models/fabricError.js +++ b/lib/services/serviceFabric/lib/models/fabricError.js @@ -71,6 +71,7 @@ class FabricError { * - "FABRIC_E_BACKUP_NOT_ENABLED" * - "FABRIC_E_BACKUP_POLICY_NOT_EXISTING" * - "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING" + * - "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR" * * - Possible values of the error code for HTTP status code 409 (Conflict) * - "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS" @@ -182,7 +183,7 @@ class FabricError { * 'FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS', * 'FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND', * 'FABRIC_E_VOLUME_ALREADY_EXISTS', 'FABRIC_E_VOLUME_NOT_FOUND', - * 'SerializationError' + * 'SerializationError', 'FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR' * @property {string} [error.message] Error message. */ constructor() { diff --git a/lib/services/serviceFabric/lib/models/fabricErrorError.js b/lib/services/serviceFabric/lib/models/fabricErrorError.js index 0454deed47..142ad3eb4e 100644 --- a/lib/services/serviceFabric/lib/models/fabricErrorError.js +++ b/lib/services/serviceFabric/lib/models/fabricErrorError.js @@ -67,6 +67,7 @@ class FabricErrorError { * - "FABRIC_E_BACKUP_NOT_ENABLED" * - "FABRIC_E_BACKUP_POLICY_NOT_EXISTING" * - "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING" + * - "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR" * * - Possible values of the error code for HTTP status code 409 (Conflict) * - "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS" @@ -178,7 +179,7 @@ class FabricErrorError { * 'FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS', * 'FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND', * 'FABRIC_E_VOLUME_ALREADY_EXISTS', 'FABRIC_E_VOLUME_NOT_FOUND', - * 'SerializationError' + * 'SerializationError', 'FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR' * @property {string} [message] Error message. */ constructor() { diff --git a/lib/services/serviceFabric/lib/models/fabricEvent.js b/lib/services/serviceFabric/lib/models/fabricEvent.js index 407d82b014..b399f5001e 100644 --- a/lib/services/serviceFabric/lib/models/fabricEvent.js +++ b/lib/services/serviceFabric/lib/models/fabricEvent.js @@ -19,6 +19,7 @@ class FabricEvent { * Create a FabricEvent. * @property {uuid} eventInstanceId The identifier for the FabricEvent * instance. + * @property {string} [category] The category of event. * @property {date} timeStamp The time event was logged. * @property {boolean} [hasCorrelatedEvents] Shows there is existing related * events available. @@ -53,6 +54,13 @@ class FabricEvent { name: 'String' } }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, timeStamp: { required: true, serializedName: 'TimeStamp', diff --git a/lib/services/serviceFabric/lib/models/gatewayDestination.js b/lib/services/serviceFabric/lib/models/gatewayDestination.js new file mode 100644 index 0000000000..68e3321c3c --- /dev/null +++ b/lib/services/serviceFabric/lib/models/gatewayDestination.js @@ -0,0 +1,69 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Describes destination endpoint for routing traffic. + * + */ +class GatewayDestination { + /** + * Create a GatewayDestination. + * @property {string} applicationName Name of the service fabric Mesh + * application. + * @property {string} serviceName service that contains the endpoint. + * @property {string} endpointName name of the endpoint in the service. + */ + constructor() { + } + + /** + * Defines the metadata of GatewayDestination + * + * @returns {object} metadata of GatewayDestination + * + */ + mapper() { + return { + required: false, + serializedName: 'GatewayDestination', + type: { + name: 'Composite', + className: 'GatewayDestination', + modelProperties: { + applicationName: { + required: true, + serializedName: 'applicationName', + type: { + name: 'String' + } + }, + serviceName: { + required: true, + serializedName: 'serviceName', + type: { + name: 'String' + } + }, + endpointName: { + required: true, + serializedName: 'endpointName', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = GatewayDestination; diff --git a/lib/services/serviceFabric/lib/models/gatewayResourceDescription.js b/lib/services/serviceFabric/lib/models/gatewayResourceDescription.js new file mode 100644 index 0000000000..d65c3b571c --- /dev/null +++ b/lib/services/serviceFabric/lib/models/gatewayResourceDescription.js @@ -0,0 +1,150 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * This type describes a gateway resource. + * + */ +class GatewayResourceDescription { + /** + * Create a GatewayResourceDescription. + * @property {string} name Name of the Gateway resource. + * @property {string} [description] User readable description of the gateway. + * @property {object} sourceNetwork Network the gateway should listen on for + * requests. + * @property {string} [sourceNetwork.name] Name of the network + * @property {array} [sourceNetwork.endpointRefs] A list of endpoints that + * are exposed on this network. + * @property {object} destinationNetwork Network that the Application is + * using. + * @property {string} [destinationNetwork.name] Name of the network + * @property {array} [destinationNetwork.endpointRefs] A list of endpoints + * that are exposed on this network. + * @property {array} [tcp] Configuration for tcp connectivity for this + * gateway. + * @property {array} [http] Configuration for http connectivity for this + * gateway. + * @property {string} [status] Status of the resource. Possible values + * include: 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + * @property {string} [statusDetails] Gives additional information about the + * current status of the gateway. + * @property {string} [ipAddress] IP address of the gateway. This is + * populated in the response and is ignored for incoming requests. + */ + constructor() { + } + + /** + * Defines the metadata of GatewayResourceDescription + * + * @returns {object} metadata of GatewayResourceDescription + * + */ + mapper() { + return { + required: false, + serializedName: 'GatewayResourceDescription', + type: { + name: 'Composite', + className: 'GatewayResourceDescription', + modelProperties: { + name: { + required: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + description: { + required: false, + serializedName: 'properties.description', + type: { + name: 'String' + } + }, + sourceNetwork: { + required: true, + serializedName: 'properties.sourceNetwork', + type: { + name: 'Composite', + className: 'NetworkRef' + } + }, + destinationNetwork: { + required: true, + serializedName: 'properties.destinationNetwork', + type: { + name: 'Composite', + className: 'NetworkRef' + } + }, + tcp: { + required: false, + serializedName: 'properties.tcp', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'TcpConfigElementType', + type: { + name: 'Composite', + className: 'TcpConfig' + } + } + } + }, + http: { + required: false, + serializedName: 'properties.http', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'HttpConfigElementType', + type: { + name: 'Composite', + className: 'HttpConfig' + } + } + } + }, + status: { + required: false, + readOnly: true, + serializedName: 'properties.status', + type: { + name: 'String' + } + }, + statusDetails: { + required: false, + readOnly: true, + serializedName: 'properties.statusDetails', + type: { + name: 'String' + } + }, + ipAddress: { + required: false, + readOnly: true, + serializedName: 'properties.ipAddress', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = GatewayResourceDescription; diff --git a/lib/services/serviceFabric/lib/models/healthInformation.js b/lib/services/serviceFabric/lib/models/healthInformation.js index caffecd248..972432052b 100644 --- a/lib/services/serviceFabric/lib/models/healthInformation.js +++ b/lib/services/serviceFabric/lib/models/healthInformation.js @@ -75,7 +75,7 @@ class HealthInformation { * of this property is false by default. * When clients report periodically, they should set RemoveWhenExpired false * (default). - * This way, is the reporter has issues (eg. deadlock) and can't report, the + * This way, if the reporter has issues (e.g. deadlock) and can't report, the * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. */ diff --git a/lib/services/serviceFabric/lib/models/httpConfig.js b/lib/services/serviceFabric/lib/models/httpConfig.js new file mode 100644 index 0000000000..1509dd589e --- /dev/null +++ b/lib/services/serviceFabric/lib/models/httpConfig.js @@ -0,0 +1,77 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Describes the http configuration for external connectivity for this network. + * + */ +class HttpConfig { + /** + * Create a HttpConfig. + * @property {string} name http gateway config name. + * @property {number} port Specifies the port at which the service endpoint + * below needs to be exposed. + * @property {array} hosts description for routing. + */ + constructor() { + } + + /** + * Defines the metadata of HttpConfig + * + * @returns {object} metadata of HttpConfig + * + */ + mapper() { + return { + required: false, + serializedName: 'HttpConfig', + type: { + name: 'Composite', + className: 'HttpConfig', + modelProperties: { + name: { + required: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + port: { + required: true, + serializedName: 'port', + type: { + name: 'Number' + } + }, + hosts: { + required: true, + serializedName: 'hosts', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'HttpHostConfigElementType', + type: { + name: 'Composite', + className: 'HttpHostConfig' + } + } + } + } + } + } + }; + } +} + +module.exports = HttpConfig; diff --git a/lib/services/serviceFabric/lib/models/httpHostConfig.js b/lib/services/serviceFabric/lib/models/httpHostConfig.js new file mode 100644 index 0000000000..1b9650e20c --- /dev/null +++ b/lib/services/serviceFabric/lib/models/httpHostConfig.js @@ -0,0 +1,70 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Describes the hostname properties for http routing. + * + */ +class HttpHostConfig { + /** + * Create a HttpHostConfig. + * @property {string} name http hostname config name. + * @property {array} routes Route information to use for routing. Routes are + * processed in the order they are specified. Specify routes that are more + * specific before routes that can hamdle general cases. + */ + constructor() { + } + + /** + * Defines the metadata of HttpHostConfig + * + * @returns {object} metadata of HttpHostConfig + * + */ + mapper() { + return { + required: false, + serializedName: 'HttpHostConfig', + type: { + name: 'Composite', + className: 'HttpHostConfig', + modelProperties: { + name: { + required: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + routes: { + required: true, + serializedName: 'routes', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'HttpRouteConfigElementType', + type: { + name: 'Composite', + className: 'HttpRouteConfig' + } + } + } + } + } + } + }; + } +} + +module.exports = HttpHostConfig; diff --git a/lib/services/serviceFabric/lib/models/httpRouteConfig.js b/lib/services/serviceFabric/lib/models/httpRouteConfig.js new file mode 100644 index 0000000000..6ac41581e8 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/httpRouteConfig.js @@ -0,0 +1,84 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Describes the hostname properties for http routing. + * + */ +class HttpRouteConfig { + /** + * Create a HttpRouteConfig. + * @property {string} name http route name. + * @property {object} match Describes a rule for http route matching. + * @property {object} [match.path] Path to match for routing. + * @property {string} [match.path.value] Uri path to match for request. + * @property {string} [match.path.rewrite] replacement string for matched + * part of the Uri. + * @property {array} [match.headers] headers and their values to match in + * request. + * @property {object} destination Describes destination endpoint for routing + * traffic. + * @property {string} [destination.applicationName] Name of the service + * fabric Mesh application. + * @property {string} [destination.serviceName] service that contains the + * endpoint. + * @property {string} [destination.endpointName] name of the endpoint in the + * service. + */ + constructor() { + } + + /** + * Defines the metadata of HttpRouteConfig + * + * @returns {object} metadata of HttpRouteConfig + * + */ + mapper() { + return { + required: false, + serializedName: 'HttpRouteConfig', + type: { + name: 'Composite', + className: 'HttpRouteConfig', + modelProperties: { + name: { + required: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + match: { + required: true, + serializedName: 'match', + defaultValue: {}, + type: { + name: 'Composite', + className: 'HttpRouteMatchRule' + } + }, + destination: { + required: true, + serializedName: 'destination', + type: { + name: 'Composite', + className: 'GatewayDestination' + } + } + } + } + }; + } +} + +module.exports = HttpRouteConfig; diff --git a/lib/services/serviceFabric/lib/models/httpRouteMatchHeader.js b/lib/services/serviceFabric/lib/models/httpRouteMatchHeader.js new file mode 100644 index 0000000000..a011690544 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/httpRouteMatchHeader.js @@ -0,0 +1,69 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Describes header information for http route matching. + * + */ +class HttpRouteMatchHeader { + /** + * Create a HttpRouteMatchHeader. + * @property {string} name Name of header to match in request. + * @property {string} [value] Value of header to match in request. + * @property {string} [type] how to match header value. Possible values + * include: 'exact' + */ + constructor() { + } + + /** + * Defines the metadata of HttpRouteMatchHeader + * + * @returns {object} metadata of HttpRouteMatchHeader + * + */ + mapper() { + return { + required: false, + serializedName: 'HttpRouteMatchHeader', + type: { + name: 'Composite', + className: 'HttpRouteMatchHeader', + modelProperties: { + name: { + required: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + value: { + required: false, + serializedName: 'value', + type: { + name: 'String' + } + }, + type: { + required: false, + serializedName: 'type', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = HttpRouteMatchHeader; diff --git a/lib/services/serviceFabric/lib/models/httpRouteMatchPath.js b/lib/services/serviceFabric/lib/models/httpRouteMatchPath.js new file mode 100644 index 0000000000..addfe2fba4 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/httpRouteMatchPath.js @@ -0,0 +1,70 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Path to match for routing. + * + */ +class HttpRouteMatchPath { + /** + * Create a HttpRouteMatchPath. + * @property {string} value Uri path to match for request. + * @property {string} [rewrite] replacement string for matched part of the + * Uri. + */ + constructor() { + } + + /** + * Defines the metadata of HttpRouteMatchPath + * + * @returns {object} metadata of HttpRouteMatchPath + * + */ + mapper() { + return { + required: false, + serializedName: 'HttpRouteMatchPath', + type: { + name: 'Composite', + className: 'HttpRouteMatchPath', + modelProperties: { + value: { + required: true, + serializedName: 'value', + type: { + name: 'String' + } + }, + rewrite: { + required: false, + serializedName: 'rewrite', + type: { + name: 'String' + } + }, + type: { + required: true, + isConstant: true, + serializedName: 'type', + defaultValue: 'prefix', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = HttpRouteMatchPath; diff --git a/lib/services/serviceFabric/lib/models/httpRouteMatchRule.js b/lib/services/serviceFabric/lib/models/httpRouteMatchRule.js new file mode 100644 index 0000000000..fdede0889a --- /dev/null +++ b/lib/services/serviceFabric/lib/models/httpRouteMatchRule.js @@ -0,0 +1,73 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Describes a rule for http route matching. + * + */ +class HttpRouteMatchRule { + /** + * Create a HttpRouteMatchRule. + * @property {object} path Path to match for routing. + * @property {string} [path.value] Uri path to match for request. + * @property {string} [path.rewrite] replacement string for matched part of + * the Uri. + * @property {array} [headers] headers and their values to match in request. + */ + constructor() { + } + + /** + * Defines the metadata of HttpRouteMatchRule + * + * @returns {object} metadata of HttpRouteMatchRule + * + */ + mapper() { + return { + required: false, + serializedName: 'HttpRouteMatchRule', + type: { + name: 'Composite', + className: 'HttpRouteMatchRule', + modelProperties: { + path: { + required: true, + serializedName: 'path', + defaultValue: {}, + type: { + name: 'Composite', + className: 'HttpRouteMatchPath' + } + }, + headers: { + required: false, + serializedName: 'headers', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'HttpRouteMatchHeaderElementType', + type: { + name: 'Composite', + className: 'HttpRouteMatchHeader' + } + } + } + } + } + } + }; + } +} + +module.exports = HttpRouteMatchRule; diff --git a/lib/services/serviceFabric/lib/models/imageRegistryCredential.js b/lib/services/serviceFabric/lib/models/imageRegistryCredential.js index ff3cf83c3e..5c49278240 100644 --- a/lib/services/serviceFabric/lib/models/imageRegistryCredential.js +++ b/lib/services/serviceFabric/lib/models/imageRegistryCredential.js @@ -20,7 +20,9 @@ class ImageRegistryCredential { * @property {string} server Docker image registry server, without protocol * such as `http` and `https`. * @property {string} username The username for the private registry. - * @property {string} [password] The password for the private registry. + * @property {string} [password] The password for the private registry. The + * password is required for create or update operations, however it is not + * returned in the get or list operations. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/index.d.ts b/lib/services/serviceFabric/lib/models/index.d.ts index fc66f3cf05..d9742b1bbe 100644 --- a/lib/services/serviceFabric/lib/models/index.d.ts +++ b/lib/services/serviceFabric/lib/models/index.d.ts @@ -8,6 +8,182 @@ import * as moment from "moment"; +/** + * Error object containing error code and error message. + */ +export interface FabricErrorError { + /** + * Defines the fabric error codes that be returned as part of the error object in response to + * Service Fabric API operations that are not successful. Following are the error code values + * that can be returned for a specific HTTP status code. + * + * - Possible values of the error code for HTTP status code 400 (Bad Request) + * - "FABRIC_E_INVALID_PARTITION_KEY" + * - "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR" + * - "FABRIC_E_INVALID_ADDRESS" + * - "FABRIC_E_APPLICATION_NOT_UPGRADING" + * - "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR" + * - "FABRIC_E_FABRIC_NOT_UPGRADING" + * - "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR" + * - "FABRIC_E_INVALID_CONFIGURATION" + * - "FABRIC_E_INVALID_NAME_URI" + * - "FABRIC_E_PATH_TOO_LONG" + * - "FABRIC_E_KEY_TOO_LARGE" + * - "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED" + * - "FABRIC_E_INVALID_ATOMIC_GROUP" + * - "FABRIC_E_VALUE_EMPTY" + * - "FABRIC_E_BACKUP_IS_ENABLED" + * - "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH" + * - "FABRIC_E_INVALID_FOR_STATELESS_SERVICES" + * - "FABRIC_E_INVALID_SERVICE_SCALING_POLICY" + * - "E_INVALIDARG" + * + * - Possible values of the error code for HTTP status code 404 (Not Found) + * - "FABRIC_E_NODE_NOT_FOUND" + * - "FABRIC_E_APPLICATION_TYPE_NOT_FOUND" + * - "FABRIC_E_APPLICATION_NOT_FOUND" + * - "FABRIC_E_SERVICE_TYPE_NOT_FOUND" + * - "FABRIC_E_SERVICE_DOES_NOT_EXIST" + * - "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND" + * - "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND" + * - "FABRIC_E_PARTITION_NOT_FOUND" + * - "FABRIC_E_REPLICA_DOES_NOT_EXIST" + * - "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST" + * - "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND" + * - "FABRIC_E_DIRECTORY_NOT_FOUND" + * - "FABRIC_E_FABRIC_VERSION_NOT_FOUND" + * - "FABRIC_E_FILE_NOT_FOUND" + * - "FABRIC_E_NAME_DOES_NOT_EXIST" + * - "FABRIC_E_PROPERTY_DOES_NOT_EXIST" + * - "FABRIC_E_ENUMERATION_COMPLETED" + * - "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND" + * - "FABRIC_E_KEY_NOT_FOUND" + * - "FABRIC_E_HEALTH_ENTITY_NOT_FOUND" + * - "FABRIC_E_BACKUP_NOT_ENABLED" + * - "FABRIC_E_BACKUP_POLICY_NOT_EXISTING" + * - "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING" + * - "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR" + * + * - Possible values of the error code for HTTP status code 409 (Conflict) + * - "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS" + * - "FABRIC_E_APPLICATION_ALREADY_EXISTS" + * - "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION" + * - "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS" + * - "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS" + * - "FABRIC_E_SERVICE_ALREADY_EXISTS" + * - "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS" + * - "FABRIC_E_APPLICATION_TYPE_IN_USE" + * - "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION" + * - "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS" + * - "FABRIC_E_FABRIC_VERSION_IN_USE" + * - "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS" + * - "FABRIC_E_NAME_ALREADY_EXISTS" + * - "FABRIC_E_NAME_NOT_EMPTY" + * - "FABRIC_E_PROPERTY_CHECK_FAILED" + * - "FABRIC_E_SERVICE_METADATA_MISMATCH" + * - "FABRIC_E_SERVICE_TYPE_MISMATCH" + * - "FABRIC_E_HEALTH_STALE_REPORT" + * - "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED" + * - "FABRIC_E_NODE_HAS_NOT_STOPPED_YET" + * - "FABRIC_E_INSTANCE_ID_MISMATCH" + * - "FABRIC_E_BACKUP_IN_PROGRESS" + * - "FABRIC_E_RESTORE_IN_PROGRESS" + * - "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING" + * + * - Possible values of the error code for HTTP status code 413 (Request Entity Too Large) + * - "FABRIC_E_VALUE_TOO_LARGE" + * + * - Possible values of the error code for HTTP status code 500 (Internal Server Error) + * - "FABRIC_E_NODE_IS_UP" + * - "E_FAIL" + * - "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS" + * - "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND" + * - "FABRIC_E_VOLUME_ALREADY_EXISTS" + * - "ABRIC_E_VOLUME_NOT_FOUND" + * - "SerializationError" + * + * - Possible values of the error code for HTTP status code 503 (Service Unavailable) + * - "FABRIC_E_NO_WRITE_QUORUM" + * - "FABRIC_E_NOT_PRIMARY" + * - "FABRIC_E_NOT_READY" + * - "FABRIC_E_RECONFIGURATION_PENDING" + * - "FABRIC_E_SERVICE_OFFLINE" + * - "E_ABORT" + * - "FABRIC_E_VALUE_TOO_LARGE" + * + * - Possible values of the error code for HTTP status code 504 (Gateway Timeout) + * - "FABRIC_E_COMMUNICATION_ERROR" + * - "FABRIC_E_OPERATION_NOT_COMPLETE" + * - "FABRIC_E_TIMEOUT". Possible values include: 'FABRIC_E_INVALID_PARTITION_KEY', + * 'FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR', 'FABRIC_E_INVALID_ADDRESS', + * 'FABRIC_E_APPLICATION_NOT_UPGRADING', 'FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR', + * 'FABRIC_E_FABRIC_NOT_UPGRADING', 'FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR', + * 'FABRIC_E_INVALID_CONFIGURATION', 'FABRIC_E_INVALID_NAME_URI', 'FABRIC_E_PATH_TOO_LONG', + * 'FABRIC_E_KEY_TOO_LARGE', 'FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED', + * 'FABRIC_E_INVALID_ATOMIC_GROUP', 'FABRIC_E_VALUE_EMPTY', 'FABRIC_E_NODE_NOT_FOUND', + * 'FABRIC_E_APPLICATION_TYPE_NOT_FOUND', 'FABRIC_E_APPLICATION_NOT_FOUND', + * 'FABRIC_E_SERVICE_TYPE_NOT_FOUND', 'FABRIC_E_SERVICE_DOES_NOT_EXIST', + * 'FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND', 'FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND', + * 'FABRIC_E_PARTITION_NOT_FOUND', 'FABRIC_E_REPLICA_DOES_NOT_EXIST', + * 'FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST', 'FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND', + * 'FABRIC_E_DIRECTORY_NOT_FOUND', 'FABRIC_E_FABRIC_VERSION_NOT_FOUND', + * 'FABRIC_E_FILE_NOT_FOUND', 'FABRIC_E_NAME_DOES_NOT_EXIST', 'FABRIC_E_PROPERTY_DOES_NOT_EXIST', + * 'FABRIC_E_ENUMERATION_COMPLETED', 'FABRIC_E_SERVICE_MANIFEST_NOT_FOUND', + * 'FABRIC_E_KEY_NOT_FOUND', 'FABRIC_E_HEALTH_ENTITY_NOT_FOUND', + * 'FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS', 'FABRIC_E_APPLICATION_ALREADY_EXISTS', + * 'FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION', + * 'FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS', 'FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS', + * 'FABRIC_E_SERVICE_ALREADY_EXISTS', 'FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS', + * 'FABRIC_E_APPLICATION_TYPE_IN_USE', 'FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION', + * 'FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS', 'FABRIC_E_FABRIC_VERSION_IN_USE', + * 'FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS', 'FABRIC_E_NAME_ALREADY_EXISTS', + * 'FABRIC_E_NAME_NOT_EMPTY', 'FABRIC_E_PROPERTY_CHECK_FAILED', + * 'FABRIC_E_SERVICE_METADATA_MISMATCH', 'FABRIC_E_SERVICE_TYPE_MISMATCH', + * 'FABRIC_E_HEALTH_STALE_REPORT', 'FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED', + * 'FABRIC_E_NODE_HAS_NOT_STOPPED_YET', 'FABRIC_E_INSTANCE_ID_MISMATCH', + * 'FABRIC_E_VALUE_TOO_LARGE', 'FABRIC_E_NO_WRITE_QUORUM', 'FABRIC_E_NOT_PRIMARY', + * 'FABRIC_E_NOT_READY', 'FABRIC_E_RECONFIGURATION_PENDING', 'FABRIC_E_SERVICE_OFFLINE', + * 'E_ABORT', 'FABRIC_E_COMMUNICATION_ERROR', 'FABRIC_E_OPERATION_NOT_COMPLETE', + * 'FABRIC_E_TIMEOUT', 'FABRIC_E_NODE_IS_UP', 'E_FAIL', 'FABRIC_E_BACKUP_IS_ENABLED', + * 'FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH', + * 'FABRIC_E_INVALID_FOR_STATELESS_SERVICES', 'FABRIC_E_BACKUP_NOT_ENABLED', + * 'FABRIC_E_BACKUP_POLICY_NOT_EXISTING', 'FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING', + * 'FABRIC_E_BACKUP_IN_PROGRESS', 'FABRIC_E_RESTORE_IN_PROGRESS', + * 'FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING', 'FABRIC_E_INVALID_SERVICE_SCALING_POLICY', + * 'E_INVALIDARG', 'FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS', + * 'FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND', 'FABRIC_E_VOLUME_ALREADY_EXISTS', + * 'FABRIC_E_VOLUME_NOT_FOUND', 'SerializationError', + * 'FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR' + */ + code: string; + /** + * Error message. + */ + message?: string; +} + +/** + * The REST API operations for Service Fabric return standard HTTP status codes. This type defines + * the additional information returned from the Service Fabric API operations that are not + * successful. + */ +export interface FabricError { + /** + * Error object containing error code and error message. + */ + error: FabricErrorError; +} + +/** + * Container logs. + */ +export interface ContainerLogs { + /** + * Container logs. + */ + content?: string; +} + /** * Azure Active Directory metadata used for secured connection to cluster. */ @@ -74,6 +250,10 @@ export interface FabricEvent { * The identifier for the FabricEvent instance. */ eventInstanceId: string; + /** + * The category of event. + */ + category?: string; /** * The time event was logged. */ @@ -272,8 +452,8 @@ export interface ServiceTypeHealthPolicy { */ maxPercentUnhealthyReplicasPerPartition?: number; /** - * The maximum maximum allowed percentage of unhealthy services. Allowed values are Byte values - * from zero to 100. + * The maximum allowed percentage of unhealthy services. Allowed values are Byte values from zero + * to 100. * * The percentage represents the maximum tolerated percentage of services that can be unhealthy * before the application is considered in error. @@ -1766,6 +1946,16 @@ export interface ClusterManifest { manifest?: string; } +/** + * The cluster version. + */ +export interface ClusterVersion { + /** + * The Service Fabric cluster runtime version. + */ + version?: string; +} + /** * parameters for making container API call. */ @@ -2261,7 +2451,7 @@ export interface HealthInformation { * If set to false, the report is treated as an error when expired. The value of this property is * false by default. * When clients report periodically, they should set RemoveWhenExpired false (default). - * This way, is the reporter has issues (eg. deadlock) and can't report, the entity is evaluated + * This way, if the reporter has issues (e.g. deadlock) and can't report, the entity is evaluated * at error when the health report expires. * This flags the entity as being in Error health state. */ @@ -2394,26 +2584,6 @@ export interface Epoch { dataLossVersion?: string; } -/** - * An Epoch is a configuration number for the partition as a whole. When the configuration of the - * replica set changes, for example when the Primary replica changes, the operations that are - * replicated from the new Primary replica are said to be a new Epoch from the ones which were sent - * by the old Primary replica. - */ -export interface BackupEpoch { - /** - * The current configuration number of this Epoch. The configuration number is an increasing - * value that is updated whenever the configuration of this replica set changes. - */ - configurationNumber?: string; - /** - * The current dataloss number of this Epoch. The data loss number property is an increasing - * value which is updated whenever data loss is suspected, as when loss of a quorum of replicas - * in the replica set that includes the Primary replica. - */ - dataLossNumber?: string; -} - /** * Represents health evaluation of a HealthEvent that was reported on the entity. * The health evaluation is returned when evaluating health of an entity results in Error or @@ -2453,173 +2623,9 @@ export interface FabricConfigVersionInfo { } /** - * Error object containing error code and error message. + * Information about a standalone cluster configuration upgrade status. */ -export interface FabricErrorError { - /** - * Defines the fabric error codes that be returned as part of the error object in response to - * Service Fabric API operations that are not successful. Following are the error code values - * that can be returned for a specific HTTP status code. - * - * - Possible values of the error code for HTTP status code 400 (Bad Request) - * - "FABRIC_E_INVALID_PARTITION_KEY" - * - "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR" - * - "FABRIC_E_INVALID_ADDRESS" - * - "FABRIC_E_APPLICATION_NOT_UPGRADING" - * - "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR" - * - "FABRIC_E_FABRIC_NOT_UPGRADING" - * - "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR" - * - "FABRIC_E_INVALID_CONFIGURATION" - * - "FABRIC_E_INVALID_NAME_URI" - * - "FABRIC_E_PATH_TOO_LONG" - * - "FABRIC_E_KEY_TOO_LARGE" - * - "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED" - * - "FABRIC_E_INVALID_ATOMIC_GROUP" - * - "FABRIC_E_VALUE_EMPTY" - * - "FABRIC_E_BACKUP_IS_ENABLED" - * - "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH" - * - "FABRIC_E_INVALID_FOR_STATELESS_SERVICES" - * - "FABRIC_E_INVALID_SERVICE_SCALING_POLICY" - * - "E_INVALIDARG" - * - * - Possible values of the error code for HTTP status code 404 (Not Found) - * - "FABRIC_E_NODE_NOT_FOUND" - * - "FABRIC_E_APPLICATION_TYPE_NOT_FOUND" - * - "FABRIC_E_APPLICATION_NOT_FOUND" - * - "FABRIC_E_SERVICE_TYPE_NOT_FOUND" - * - "FABRIC_E_SERVICE_DOES_NOT_EXIST" - * - "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND" - * - "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND" - * - "FABRIC_E_PARTITION_NOT_FOUND" - * - "FABRIC_E_REPLICA_DOES_NOT_EXIST" - * - "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST" - * - "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND" - * - "FABRIC_E_DIRECTORY_NOT_FOUND" - * - "FABRIC_E_FABRIC_VERSION_NOT_FOUND" - * - "FABRIC_E_FILE_NOT_FOUND" - * - "FABRIC_E_NAME_DOES_NOT_EXIST" - * - "FABRIC_E_PROPERTY_DOES_NOT_EXIST" - * - "FABRIC_E_ENUMERATION_COMPLETED" - * - "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND" - * - "FABRIC_E_KEY_NOT_FOUND" - * - "FABRIC_E_HEALTH_ENTITY_NOT_FOUND" - * - "FABRIC_E_BACKUP_NOT_ENABLED" - * - "FABRIC_E_BACKUP_POLICY_NOT_EXISTING" - * - "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING" - * - * - Possible values of the error code for HTTP status code 409 (Conflict) - * - "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS" - * - "FABRIC_E_APPLICATION_ALREADY_EXISTS" - * - "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION" - * - "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS" - * - "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS" - * - "FABRIC_E_SERVICE_ALREADY_EXISTS" - * - "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS" - * - "FABRIC_E_APPLICATION_TYPE_IN_USE" - * - "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION" - * - "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS" - * - "FABRIC_E_FABRIC_VERSION_IN_USE" - * - "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS" - * - "FABRIC_E_NAME_ALREADY_EXISTS" - * - "FABRIC_E_NAME_NOT_EMPTY" - * - "FABRIC_E_PROPERTY_CHECK_FAILED" - * - "FABRIC_E_SERVICE_METADATA_MISMATCH" - * - "FABRIC_E_SERVICE_TYPE_MISMATCH" - * - "FABRIC_E_HEALTH_STALE_REPORT" - * - "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED" - * - "FABRIC_E_NODE_HAS_NOT_STOPPED_YET" - * - "FABRIC_E_INSTANCE_ID_MISMATCH" - * - "FABRIC_E_BACKUP_IN_PROGRESS" - * - "FABRIC_E_RESTORE_IN_PROGRESS" - * - "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING" - * - * - Possible values of the error code for HTTP status code 413 (Request Entity Too Large) - * - "FABRIC_E_VALUE_TOO_LARGE" - * - * - Possible values of the error code for HTTP status code 500 (Internal Server Error) - * - "FABRIC_E_NODE_IS_UP" - * - "E_FAIL" - * - "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS" - * - "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND" - * - "FABRIC_E_VOLUME_ALREADY_EXISTS" - * - "ABRIC_E_VOLUME_NOT_FOUND" - * - "SerializationError" - * - * - Possible values of the error code for HTTP status code 503 (Service Unavailable) - * - "FABRIC_E_NO_WRITE_QUORUM" - * - "FABRIC_E_NOT_PRIMARY" - * - "FABRIC_E_NOT_READY" - * - "FABRIC_E_RECONFIGURATION_PENDING" - * - "FABRIC_E_SERVICE_OFFLINE" - * - "E_ABORT" - * - "FABRIC_E_VALUE_TOO_LARGE" - * - * - Possible values of the error code for HTTP status code 504 (Gateway Timeout) - * - "FABRIC_E_COMMUNICATION_ERROR" - * - "FABRIC_E_OPERATION_NOT_COMPLETE" - * - "FABRIC_E_TIMEOUT". Possible values include: 'FABRIC_E_INVALID_PARTITION_KEY', - * 'FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR', 'FABRIC_E_INVALID_ADDRESS', - * 'FABRIC_E_APPLICATION_NOT_UPGRADING', 'FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR', - * 'FABRIC_E_FABRIC_NOT_UPGRADING', 'FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR', - * 'FABRIC_E_INVALID_CONFIGURATION', 'FABRIC_E_INVALID_NAME_URI', 'FABRIC_E_PATH_TOO_LONG', - * 'FABRIC_E_KEY_TOO_LARGE', 'FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED', - * 'FABRIC_E_INVALID_ATOMIC_GROUP', 'FABRIC_E_VALUE_EMPTY', 'FABRIC_E_NODE_NOT_FOUND', - * 'FABRIC_E_APPLICATION_TYPE_NOT_FOUND', 'FABRIC_E_APPLICATION_NOT_FOUND', - * 'FABRIC_E_SERVICE_TYPE_NOT_FOUND', 'FABRIC_E_SERVICE_DOES_NOT_EXIST', - * 'FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND', 'FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND', - * 'FABRIC_E_PARTITION_NOT_FOUND', 'FABRIC_E_REPLICA_DOES_NOT_EXIST', - * 'FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST', 'FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND', - * 'FABRIC_E_DIRECTORY_NOT_FOUND', 'FABRIC_E_FABRIC_VERSION_NOT_FOUND', - * 'FABRIC_E_FILE_NOT_FOUND', 'FABRIC_E_NAME_DOES_NOT_EXIST', 'FABRIC_E_PROPERTY_DOES_NOT_EXIST', - * 'FABRIC_E_ENUMERATION_COMPLETED', 'FABRIC_E_SERVICE_MANIFEST_NOT_FOUND', - * 'FABRIC_E_KEY_NOT_FOUND', 'FABRIC_E_HEALTH_ENTITY_NOT_FOUND', - * 'FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS', 'FABRIC_E_APPLICATION_ALREADY_EXISTS', - * 'FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION', - * 'FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS', 'FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS', - * 'FABRIC_E_SERVICE_ALREADY_EXISTS', 'FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS', - * 'FABRIC_E_APPLICATION_TYPE_IN_USE', 'FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION', - * 'FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS', 'FABRIC_E_FABRIC_VERSION_IN_USE', - * 'FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS', 'FABRIC_E_NAME_ALREADY_EXISTS', - * 'FABRIC_E_NAME_NOT_EMPTY', 'FABRIC_E_PROPERTY_CHECK_FAILED', - * 'FABRIC_E_SERVICE_METADATA_MISMATCH', 'FABRIC_E_SERVICE_TYPE_MISMATCH', - * 'FABRIC_E_HEALTH_STALE_REPORT', 'FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED', - * 'FABRIC_E_NODE_HAS_NOT_STOPPED_YET', 'FABRIC_E_INSTANCE_ID_MISMATCH', - * 'FABRIC_E_VALUE_TOO_LARGE', 'FABRIC_E_NO_WRITE_QUORUM', 'FABRIC_E_NOT_PRIMARY', - * 'FABRIC_E_NOT_READY', 'FABRIC_E_RECONFIGURATION_PENDING', 'FABRIC_E_SERVICE_OFFLINE', - * 'E_ABORT', 'FABRIC_E_COMMUNICATION_ERROR', 'FABRIC_E_OPERATION_NOT_COMPLETE', - * 'FABRIC_E_TIMEOUT', 'FABRIC_E_NODE_IS_UP', 'E_FAIL', 'FABRIC_E_BACKUP_IS_ENABLED', - * 'FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH', - * 'FABRIC_E_INVALID_FOR_STATELESS_SERVICES', 'FABRIC_E_BACKUP_NOT_ENABLED', - * 'FABRIC_E_BACKUP_POLICY_NOT_EXISTING', 'FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING', - * 'FABRIC_E_BACKUP_IN_PROGRESS', 'FABRIC_E_RESTORE_IN_PROGRESS', - * 'FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING', 'FABRIC_E_INVALID_SERVICE_SCALING_POLICY', - * 'E_INVALIDARG', 'FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS', - * 'FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND', 'FABRIC_E_VOLUME_ALREADY_EXISTS', - * 'FABRIC_E_VOLUME_NOT_FOUND', 'SerializationError' - */ - code: string; - /** - * Error message. - */ - message?: string; -} - -/** - * The REST API operations for Service Fabric return standard HTTP status codes. This type defines - * the additional information returned from the Service Fabric API operations that are not - * successful. - */ -export interface FabricError { - /** - * Error object containing error code and error message. - */ - error: FabricErrorError; -} - -/** - * Information about a standalone cluster configuration upgrade status. - */ -export interface ClusterConfigurationUpgradeStatusInfo { +export interface ClusterConfigurationUpgradeStatusInfo { /** * The state of the upgrade domain. Possible values include: 'Invalid', 'RollingBackInProgress', * 'RollingBackCompleted', 'RollingForwardPending', 'RollingForwardInProgress', @@ -4033,7 +4039,7 @@ export interface StatefulServicePartitionInfo extends ServicePartitionInfo { * replicated from the new Primary replica are said to be a new Epoch from the ones which were * sent by the old Primary replica. */ - currentConfigurationEpoch?: Epoch; + primaryEpoch?: Epoch; } /** @@ -4252,9 +4258,14 @@ export interface LoadMetricReport { */ name?: string; /** - * The value of the load metric. + * The value of the load metric. In future releases of Service Fabric this parameter will be + * deprecated in favor of CurrentValue. */ value?: string; + /** + * The value of the load metric. + */ + currentValue?: string; } /** @@ -4469,12 +4480,15 @@ export interface ClusterUpgradeProgressObject { */ export interface ClusterConfigurationUpgradeDescription { /** - * The cluster configuration. + * The cluster configuration as a JSON string. For example, [this + * file](https://github.com/Azure-Samples/service-fabric-dotnet-standalone-cluster-configuration/blob/master/Samples/ClusterConfig.Unsecure.DevCluster.json) + * contains JSON describing the [nodes and other properties of the + * cluster](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-manifest). */ clusterConfig: string; /** - * The length of time between attempts to perform a health checks if the application or cluster - * is not healthy. + * The length of time between attempts to perform health checks if the application or cluster is + * not healthy. */ healthCheckRetryTimeout?: moment.Duration; /** @@ -4483,7 +4497,8 @@ export interface ClusterConfigurationUpgradeDescription { */ healthCheckWaitDurationInSeconds?: moment.Duration; /** - * The length of time that the application or cluster must remain healthy. + * The length of time that the application or cluster must remain healthy before the upgrade + * proceeds to the next upgrade domain. */ healthCheckStableDurationInSeconds?: moment.Duration; /** @@ -5891,9 +5906,14 @@ export interface LoadMetricReportInfo { */ name?: string; /** - * The value of the load for the metric.. + * The value of the load for the metric. In future releases of Service Fabric this parameter will + * be deprecated in favor of CurrentValue. */ value?: number; + /** + * The double value of the load for the metric. + */ + currentValue?: string; /** * The UTC time when the load is reported. */ @@ -6960,6 +6980,16 @@ export interface BackupStorageDescription { storageKind: string; } +/** + * Describes the retention policy configured. + */ +export interface RetentionPolicyDescription { + /** + * Polymorphic Discriminator + */ + retentionPolicyType: string; +} + /** * Describes a backup policy for configuring periodic backup. */ @@ -6990,6 +7020,10 @@ export interface BackupPolicyDescription { * Describes the details of backup storage where to store the periodic backups. */ storage: BackupStorageDescription; + /** + * Describes the policy to retain backups in storage. + */ + retentionPolicy?: RetentionPolicyDescription; } /** @@ -7011,6 +7045,35 @@ export interface PagedBackupPolicyDescriptionList { items?: BackupPolicyDescription[]; } +/** + * Describes basic retention policy. + */ +export interface BasicRetentionPolicyDescription extends RetentionPolicyDescription { + /** + * It is the minimum duration for which a backup created, will remain stored in the storage and + * might get deleted after that span of time. It should be specified in ISO8601 format. + */ + retentionDuration: moment.Duration; + /** + * It is the minimum number of backups to be retained at any point of time. If specified with a + * non zero value, backups will not be deleted even if the backups have gone past retention + * duration and have number of backups less than or equal to it. + */ + minimumNumberOfBackups?: number; +} + +/** + * It describes the body parameters while disabling backup of a backup + * entity(Application/Service/Partition). + */ +export interface DisableBackupDescription { + /** + * Boolean flag to delete backups. It can be set to true for deleting all the backups which were + * created for the backup entity that is getting disabled for backup. + */ + cleanBackup: boolean; +} + /** * Describes the backup configuration information. */ @@ -7125,7 +7188,7 @@ export interface RestoreProgressInfo { /** * Describes the epoch at which the partition is restored. */ - restoredEpoch?: BackupEpoch; + restoredEpoch?: Epoch; /** * Restored LSN. */ @@ -7183,7 +7246,7 @@ export interface BackupInfo { /** * Epoch of the last record in this backup. */ - epochOfLastBackupRecord?: BackupEpoch; + epochOfLastBackupRecord?: Epoch; /** * LSN of the last record in this backup. */ @@ -7192,6 +7255,10 @@ export interface BackupInfo { * The date time when this backup was taken. */ creationTimeUtc?: Date; + /** + * Manifest Version of the service this partition backup belongs to. + */ + serviceManifestVersion?: string; /** * Denotes the failure encountered in getting backup point information. */ @@ -7314,7 +7381,7 @@ export interface BackupProgressInfo { /** * Specifies the epoch of the last record included in backup. */ - epochOfLastBackupRecord?: BackupEpoch; + epochOfLastBackupRecord?: Epoch; /** * The LSN of last record included in backup. */ @@ -7335,10 +7402,7 @@ export interface PartitionBackupConfigurationInfo extends BackupConfigurationInf */ serviceName?: string; /** - * An internal ID used by Service Fabric to uniquely identify a partition. This is a randomly - * generated GUID when the service was created. The partition ID is unique and does not change - * for the lifetime of the service. If the same service was deleted and recreated the IDs of its - * partitions would be different. + * The partition ID indentifying the partition. */ partitionId?: string; } @@ -7382,10 +7446,7 @@ export interface PartitionBackupEntity extends BackupEntity { */ serviceName?: string; /** - * An internal ID used by Service Fabric to uniquely identify a partition. This is a randomly - * generated GUID when the service was created. The partition ID is unique and does not change - * for the lifetime of the service. If the same service was deleted and recreated the IDs of its - * partitions would be different. + * The partition ID indentifying the partition. */ partitionId?: string; } @@ -7846,16 +7907,6 @@ export interface UploadSession { uploadSessions?: UploadSessionInfo[]; } -/** - * Container logs. - */ -export interface ContainerLogs { - /** - * Container logs. - */ - content?: string; -} - /** * Represents a scaling trigger related to an average load of a metric/resource of a partition. */ @@ -7972,7 +8023,7 @@ export interface ApplicationDeletedEvent extends ApplicationEvent { /** * Application Health Report Created event. */ -export interface ApplicationHealthReportCreatedEvent extends ApplicationEvent { +export interface ApplicationNewHealthReportEvent extends ApplicationEvent { /** * Id of Application instance. */ @@ -8054,9 +8105,9 @@ export interface ApplicationHealthReportExpiredEvent extends ApplicationEvent { } /** - * Application Upgrade Complete event. + * Application Upgrade Completed event. */ -export interface ApplicationUpgradeCompleteEvent extends ApplicationEvent { +export interface ApplicationUpgradeCompletedEvent extends ApplicationEvent { /** * Application type name. */ @@ -8072,9 +8123,9 @@ export interface ApplicationUpgradeCompleteEvent extends ApplicationEvent { } /** - * Application Upgrade Domain Complete event. + * Application Upgrade Domain Completed event. */ -export interface ApplicationUpgradeDomainCompleteEvent extends ApplicationEvent { +export interface ApplicationUpgradeDomainCompletedEvent extends ApplicationEvent { /** * Application type name. */ @@ -8102,9 +8153,9 @@ export interface ApplicationUpgradeDomainCompleteEvent extends ApplicationEvent } /** - * Application Upgrade Rollback Complete event. + * Application Upgrade Rollback Completed event. */ -export interface ApplicationUpgradeRollbackCompleteEvent extends ApplicationEvent { +export interface ApplicationUpgradeRollbackCompletedEvent extends ApplicationEvent { /** * Application type name. */ @@ -8124,9 +8175,9 @@ export interface ApplicationUpgradeRollbackCompleteEvent extends ApplicationEven } /** - * Application Upgrade Rollback Start event. + * Application Upgrade Rollback Started event. */ -export interface ApplicationUpgradeRollbackStartEvent extends ApplicationEvent { +export interface ApplicationUpgradeRollbackStartedEvent extends ApplicationEvent { /** * Application type name. */ @@ -8150,9 +8201,9 @@ export interface ApplicationUpgradeRollbackStartEvent extends ApplicationEvent { } /** - * Application Upgrade Start event. + * Application Upgrade Started event. */ -export interface ApplicationUpgradeStartEvent extends ApplicationEvent { +export interface ApplicationUpgradeStartedEvent extends ApplicationEvent { /** * Application type name. */ @@ -8182,7 +8233,7 @@ export interface ApplicationUpgradeStartEvent extends ApplicationEvent { /** * Deployed Application Health Report Created event. */ -export interface DeployedApplicationHealthReportCreatedEvent extends ApplicationEvent { +export interface DeployedApplicationNewHealthReportEvent extends ApplicationEvent { /** * Id of Application instance. */ @@ -8272,9 +8323,9 @@ export interface DeployedApplicationHealthReportExpiredEvent extends Application } /** - * Process Deactivated event. + * Process Exited event. */ -export interface ProcessDeactivatedEvent extends ApplicationEvent { +export interface ApplicationProcessExitedEvent extends ApplicationEvent { /** * Name of Service. */ @@ -8326,9 +8377,9 @@ export interface ProcessDeactivatedEvent extends ApplicationEvent { } /** - * Container Deactivated event. + * Container Exited event. */ -export interface ContainerDeactivatedEvent extends ApplicationEvent { +export interface ApplicationContainerInstanceExitedEvent extends ApplicationEvent { /** * Name of Service. */ @@ -8417,48 +8468,10 @@ export interface NodeAbortedEvent extends NodeEvent { nodeVersion: string; } -/** - * Node Aborting event. - */ -export interface NodeAbortingEvent extends NodeEvent { - /** - * Id of Node instance. - */ - nodeInstance: number; - /** - * Id of Node. - */ - nodeId: string; - /** - * Upgrade domain of Node. - */ - upgradeDomain: string; - /** - * Fault domain of Node. - */ - faultDomain: string; - /** - * IP address or FQDN. - */ - ipAddressOrFQDN: string; - /** - * Name of Host. - */ - hostname: string; - /** - * Indicates if it is seed node. - */ - isSeedNode: boolean; - /** - * Version of Node. - */ - nodeVersion: string; -} - /** * Node Added event. */ -export interface NodeAddedEvent extends NodeEvent { +export interface NodeAddedToClusterEvent extends NodeEvent { /** * Id of Node. */ @@ -8486,9 +8499,9 @@ export interface NodeAddedEvent extends NodeEvent { } /** - * Node Close event. + * Node Closed event. */ -export interface NodeCloseEvent extends NodeEvent { +export interface NodeClosedEvent extends NodeEvent { /** * Id of Node. */ @@ -8496,7 +8509,7 @@ export interface NodeCloseEvent extends NodeEvent { /** * Id of Node instance. */ - nodeInstance: string; + nodeInstance: number; /** * Describes error. */ @@ -8504,47 +8517,9 @@ export interface NodeCloseEvent extends NodeEvent { } /** - * Node Closing event. - */ -export interface NodeClosingEvent extends NodeEvent { - /** - * Id of Node instance. - */ - nodeInstance: number; - /** - * Id of Node. - */ - nodeId: string; - /** - * Upgrade domain of Node. - */ - upgradeDomain: string; - /** - * Fault domain of Node. - */ - faultDomain: string; - /** - * IP address or FQDN. - */ - ipAddressOrFQDN: string; - /** - * Name of Host. - */ - hostname: string; - /** - * Indicates if it is seed node. - */ - isSeedNode: boolean; - /** - * Version of Node. - */ - nodeVersion: string; -} - -/** - * Node Deactivate Complete event. + * Node Deactivate Completed event. */ -export interface NodeDeactivateCompleteEvent extends NodeEvent { +export interface NodeDeactivateCompletedEvent extends NodeEvent { /** * Id of Node instance. */ @@ -8564,9 +8539,9 @@ export interface NodeDeactivateCompleteEvent extends NodeEvent { } /** - * Node Deactivate Start event. + * Node Deactivate Started event. */ -export interface NodeDeactivateStartEvent extends NodeEvent { +export interface NodeDeactivateStartedEvent extends NodeEvent { /** * Id of Node instance. */ @@ -8598,7 +8573,7 @@ export interface NodeDownEvent extends NodeEvent { /** * Node Health Report Created event. */ -export interface NodeHealthReportCreatedEvent extends NodeEvent { +export interface NodeNewHealthReportEvent extends NodeEvent { /** * Id of Node instance. */ @@ -8680,9 +8655,9 @@ export interface NodeHealthReportExpiredEvent extends NodeEvent { } /** - * Node Opened Success event. + * Node Opened Succeeded event. */ -export interface NodeOpenedSuccessEvent extends NodeEvent { +export interface NodeOpenSucceededEvent extends NodeEvent { /** * Id of Node instance. */ @@ -8760,69 +8735,31 @@ export interface NodeOpenFailedEvent extends NodeEvent { } /** - * Node Opening event. + * Node Removed event. */ -export interface NodeOpeningEvent extends NodeEvent { - /** - * Id of Node instance. - */ - nodeInstance: number; +export interface NodeRemovedFromClusterEvent extends NodeEvent { /** * Id of Node. */ nodeId: string; /** - * Upgrade domain of Node. + * Id of Node instance. */ - upgradeDomain: string; + nodeInstance: number; /** - * Fault domain of Node. + * Type of Node. */ - faultDomain: string; + nodeType: string; /** - * IP address or FQDN. + * Fabric version. */ - ipAddressOrFQDN: string; + fabricVersion: string; /** - * Name of Host. + * IP address or FQDN. */ - hostname: string; + ipAddressOrFQDN: string; /** - * Indicates if it is seed node. - */ - isSeedNode: boolean; - /** - * Version of Node. - */ - nodeVersion: string; -} - -/** - * Node Removed event. - */ -export interface NodeRemovedEvent extends NodeEvent { - /** - * Id of Node. - */ - nodeId: string; - /** - * Id of Node instance. - */ - nodeInstance: number; - /** - * Type of Node. - */ - nodeType: string; - /** - * Fabric version. - */ - fabricVersion: string; - /** - * IP address or FQDN. - */ - ipAddressOrFQDN: string; - /** - * Capacities. + * Capacities. */ nodeCapacities: string; } @@ -8844,7 +8781,7 @@ export interface NodeUpEvent extends NodeEvent { /** * Partition Health Report Created event. */ -export interface PartitionHealthReportCreatedEvent extends PartitionEvent { +export interface PartitionNewHealthReportEvent extends PartitionEvent { /** * Id of report source. */ @@ -8918,9 +8855,9 @@ export interface PartitionHealthReportExpiredEvent extends PartitionEvent { } /** - * Partition Reconfiguration Completed event. + * Partition Reconfiguration event. */ -export interface PartitionReconfigurationCompletedEvent extends PartitionEvent { +export interface PartitionReconfiguredEvent extends PartitionEvent { /** * The name of a Service Fabric node. */ @@ -9095,7 +9032,7 @@ export interface ServiceDeletedEvent extends ServiceEvent { /** * Service Health Report Created event. */ -export interface ServiceHealthReportCreatedEvent extends ServiceEvent { +export interface ServiceNewHealthReportEvent extends ServiceEvent { /** * Id of Service instance. */ @@ -9179,7 +9116,7 @@ export interface ServiceHealthReportExpiredEvent extends ServiceEvent { /** * Deployed Service Health Report Created event. */ -export interface DeployedServiceHealthReportCreatedEvent extends ApplicationEvent { +export interface DeployedServicePackageNewHealthReportEvent extends ApplicationEvent { /** * Service manifest name. */ @@ -9211,7 +9148,7 @@ export interface DeployedServiceHealthReportCreatedEvent extends ApplicationEven /** * Time to live in milli-seconds. */ - tTLTimespan: number; + timeToLiveMs: number; /** * Sequence number of report. */ @@ -9233,7 +9170,7 @@ export interface DeployedServiceHealthReportCreatedEvent extends ApplicationEven /** * Deployed Service Health Report Expired event. */ -export interface DeployedServiceHealthReportExpiredEvent extends ApplicationEvent { +export interface DeployedServicePackageHealthReportExpiredEvent extends ApplicationEvent { /** * Service manifest name. */ @@ -9265,7 +9202,7 @@ export interface DeployedServiceHealthReportExpiredEvent extends ApplicationEven /** * Time to live in milli-seconds. */ - tTLTimespan: number; + timeToLiveMs: number; /** * Sequence number of report. */ @@ -9287,7 +9224,7 @@ export interface DeployedServiceHealthReportExpiredEvent extends ApplicationEven /** * Stateful Replica Health Report Created event. */ -export interface StatefulReplicaHealthReportCreatedEvent extends ReplicaEvent { +export interface StatefulReplicaNewHealthReportEvent extends ReplicaEvent { /** * Id of Replica instance. */ @@ -9371,7 +9308,7 @@ export interface StatefulReplicaHealthReportExpiredEvent extends ReplicaEvent { /** * Stateless Replica Health Report Created event. */ -export interface StatelessReplicaHealthReportCreatedEvent extends ReplicaEvent { +export interface StatelessReplicaNewHealthReportEvent extends ReplicaEvent { /** * Id of report source. */ @@ -9447,7 +9384,7 @@ export interface StatelessReplicaHealthReportExpiredEvent extends ReplicaEvent { /** * Cluster Health Report Created event. */ -export interface ClusterHealthReportCreatedEvent extends ClusterEvent { +export interface ClusterNewHealthReportEvent extends ClusterEvent { /** * Id of report source. */ @@ -9521,9 +9458,9 @@ export interface ClusterHealthReportExpiredEvent extends ClusterEvent { } /** - * Cluster Upgrade Complete event. + * Cluster Upgrade Completed event. */ -export interface ClusterUpgradeCompleteEvent extends ClusterEvent { +export interface ClusterUpgradeCompletedEvent extends ClusterEvent { /** * Target Cluster version. */ @@ -9535,9 +9472,9 @@ export interface ClusterUpgradeCompleteEvent extends ClusterEvent { } /** - * Cluster Upgrade Domain Complete event. + * Cluster Upgrade Domain Completed event. */ -export interface ClusterUpgradeDomainCompleteEvent extends ClusterEvent { +export interface ClusterUpgradeDomainCompletedEvent extends ClusterEvent { /** * Target Cluster version. */ @@ -9557,9 +9494,9 @@ export interface ClusterUpgradeDomainCompleteEvent extends ClusterEvent { } /** - * Cluster Upgrade Rollback Complete event. + * Cluster Upgrade Rollback Completed event. */ -export interface ClusterUpgradeRollbackCompleteEvent extends ClusterEvent { +export interface ClusterUpgradeRollbackCompletedEvent extends ClusterEvent { /** * Target Cluster version. */ @@ -9575,9 +9512,9 @@ export interface ClusterUpgradeRollbackCompleteEvent extends ClusterEvent { } /** - * Cluster Upgrade Rollback Start event. + * Cluster Upgrade Rollback Started event. */ -export interface ClusterUpgradeRollbackStartEvent extends ClusterEvent { +export interface ClusterUpgradeRollbackStartedEvent extends ClusterEvent { /** * Target Cluster version. */ @@ -9593,9 +9530,9 @@ export interface ClusterUpgradeRollbackStartEvent extends ClusterEvent { } /** - * Cluster Upgrade Start event. + * Cluster Upgrade Started event. */ -export interface ClusterUpgradeStartEvent extends ClusterEvent { +export interface ClusterUpgradeStartedEvent extends ClusterEvent { /** * Current Cluster version. */ @@ -9674,58 +9611,10 @@ export interface ChaosStartedEvent extends ClusterEvent { chaosContext: string; } -/** - * Chaos Restart Node Fault Completed event. - */ -export interface ChaosRestartNodeFaultCompletedEvent extends NodeEvent { - /** - * Id of Node instance. - */ - nodeInstanceId: number; - /** - * Id of fault group. - */ - faultGroupId: string; - /** - * Id of fault. - */ - faultId: string; -} - /** * Chaos Restart Code Package Fault Scheduled event. */ -export interface ChaosRestartCodePackageFaultScheduledEvent extends ApplicationEvent { - /** - * Id of fault group. - */ - faultGroupId: string; - /** - * Id of fault. - */ - faultId: string; - /** - * The name of a Service Fabric node. - */ - nodeName: string; - /** - * Service manifest name. - */ - serviceManifestName: string; - /** - * Code package name. - */ - codePackageName: string; - /** - * Id of Service package activation. - */ - servicePackageActivationId: string; -} - -/** - * Chaos Restart Code Package Fault Completed event. - */ -export interface ChaosRestartCodePackageFaultCompletedEvent extends ApplicationEvent { +export interface ChaosCodePackageRestartScheduledEvent extends ApplicationEvent { /** * Id of fault group. */ @@ -9755,25 +9644,7 @@ export interface ChaosRestartCodePackageFaultCompletedEvent extends ApplicationE /** * Chaos Remove Replica Fault Scheduled event. */ -export interface ChaosRemoveReplicaFaultScheduledEvent extends ReplicaEvent { - /** - * Id of fault group. - */ - faultGroupId: string; - /** - * Id of fault. - */ - faultId: string; - /** - * Service name. - */ - serviceUri: string; -} - -/** - * Chaos Remove Replica Fault Completed event. - */ -export interface ChaosRemoveReplicaFaultCompletedEvent extends ReplicaEvent { +export interface ChaosReplicaRemovalScheduledEvent extends ReplicaEvent { /** * Id of fault group. */ @@ -9791,7 +9662,7 @@ export interface ChaosRemoveReplicaFaultCompletedEvent extends ReplicaEvent { /** * Chaos Move Secondary Fault Scheduled event. */ -export interface ChaosMoveSecondaryFaultScheduledEvent extends PartitionEvent { +export interface ChaosPartitionSecondaryMoveScheduledEvent extends PartitionEvent { /** * Id of fault group. */ @@ -9821,7 +9692,7 @@ export interface ChaosMoveSecondaryFaultScheduledEvent extends PartitionEvent { /** * Chaos Move Primary Fault Scheduled event. */ -export interface ChaosMovePrimaryFaultScheduledEvent extends PartitionEvent { +export interface ChaosPartitionPrimaryMoveScheduledEvent extends PartitionEvent { /** * Id of fault group. */ @@ -9847,7 +9718,7 @@ export interface ChaosMovePrimaryFaultScheduledEvent extends PartitionEvent { /** * Chaos Restart Replica Fault Scheduled event. */ -export interface ChaosRestartReplicaFaultScheduledEvent extends ReplicaEvent { +export interface ChaosReplicaRestartScheduledEvent extends ReplicaEvent { /** * Id of fault group. */ @@ -9865,7 +9736,7 @@ export interface ChaosRestartReplicaFaultScheduledEvent extends ReplicaEvent { /** * Chaos Restart Node Fault Scheduled event. */ -export interface ChaosRestartNodeFaultScheduledEvent extends NodeEvent { +export interface ChaosNodeRestartScheduledEvent extends NodeEvent { /** * Id of Node instance. */ @@ -9881,145 +9752,68 @@ export interface ChaosRestartNodeFaultScheduledEvent extends NodeEvent { } /** - * Describes a service fabric service resource. + * This type describes the properties of a secret resource, including its kind. */ -export interface ServiceResourceDescription { - /** - * The Operating system type required by the code in service. Possible values include: 'Linux', - * 'Windows' - */ - osType: string; - /** - * Describes the set of code packages that forms the service. A code package describes the - * container and the properties for running it. All the code packages are started together on the - * same host and share the same context (network, process etc.). - */ - codePackages: ContainerCodePackageProperties[]; - /** - * The names of the private networks that this service needs to be part of. - */ - networkRefs?: NetworkRef[]; - /** - * Reference to sinks in DiagnosticsDescription. - */ - diagnostics?: DiagnosticsRef; - /** - * User readable description of the service. - */ - description?: string; - /** - * The number of replicas of the service to create. Defaults to 1 if not specified. - */ - replicaCount?: number; - /** - * The health state of a Service Fabric entity such as Cluster, Node, Application, Service, - * Partition, Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - * 'Unknown' - */ - healthState?: string; +export interface SecretResourcePropertiesBase { /** - * Represents the status of the service. Possible values include: 'Unknown', 'Active', - * 'Upgrading', 'Deleting', 'Creating', 'Failed' - */ - readonly status?: string; - /** - * Service resource name. + * Polymorphic Discriminator */ - name: string; + kind: string; } /** - * Properties of a DiagnosticsSink. + * Describes the properties of a secret resource. */ -export interface DiagnosticsSinkProperties { +export interface SecretResourceProperties extends SecretResourcePropertiesBase { /** - * Name of the sink. This value is referenced by DiagnosticsReferenceDescription + * User readable description of the secret. */ - name?: string; + description?: string; /** - * A description of the sink. + * Status of the resource. Possible values include: 'Unknown', 'Ready', 'Upgrading', 'Creating', + * 'Deleting', 'Failed' */ - description?: string; + readonly status?: string; /** - * Polymorphic Discriminator + * Gives additional information about the current status of the secret. */ - kind: string; + readonly statusDetails?: string; + /** + * The type of the content stored in the secret value. The value of this property is opaque to + * Service Fabric. Once set, the value of this property cannot be changed. + */ + contentType?: string; } /** - * Describes the diagnostics options available + * Describes the properties of a secret resource whose value is provided explicitly as plaintext. + * The secret resource may have multiple values, each being uniquely versioned. The secret value of + * each version is stored encrypted, and delivered as plaintext into the context of applications + * referencing it. */ -export interface DiagnosticsDescription { - /** - * List of supported sinks that can be referenced. - */ - sinks?: DiagnosticsSinkProperties[]; - /** - * Status of whether or not sinks are enabled. - */ - enabled?: boolean; - /** - * The sinks to be used if diagnostics is enabled. Sink choices can be overridden at the service - * and code package level. - */ - defaultSinkRefs?: string[]; +export interface InlinedValueSecretResourceProperties extends SecretResourceProperties { } /** - * Describes a service fabric application resource. + * This type describes a secret resource. */ -export interface ApplicationResourceDescription { - /** - * User readable description of the application. - */ - description?: string; - /** - * Internal use. - */ - debugParams?: string; - /** - * describes the services in the application. - */ - services?: ServiceResourceDescription[]; - /** - * Describes the health state of an application resource. Possible values include: 'Invalid', - * 'Ok', 'Warning', 'Error', 'Unknown' - */ - readonly healthState?: string; - /** - * When the application's health state is not 'Ok', this additional details from service fabric - * Health Manager for the user to know why the application is marked unhealthy. - */ - readonly unhealthyEvaluation?: string; - /** - * Status of the application resource. Possible values include: 'Invalid', 'Ready', 'Upgrading', - * 'Creating', 'Deleting', 'Failed' - */ - readonly status?: string; - /** - * Gives additional information about the current status of the application deployment. - */ - readonly statusDetails?: string; - /** - * Names of the services in the application. - */ - readonly serviceNames?: string[]; +export interface SecretResourceDescription { /** - * Describes the diagnostics definition and usage for an application resource. + * Describes the properties of a secret resource. */ - diagnostics?: DiagnosticsDescription; + properties: SecretResourceProperties; /** - * Application resource name. + * Name of the Secret resource. */ name: string; } /** - * The list of service resources in the cluster. The list is paged when all of the results cannot - * fit in a single message. The next set of results can be obtained by executing the same query - * with the continuation token provided in this list. + * The list of secret resources. The list is paged when all of the results cannot fit in a single + * message. The next set of results can be obtained by executing the same query with the + * continuation token provided in this list. */ -export interface PagedServiceResourceDescriptionList { +export interface PagedSecretResourceDescriptionList { /** * The continuation token parameter is used to obtain next set of results. The continuation token * is included in the response of the API when the results from the system do not fit in a single @@ -10028,52 +9822,52 @@ export interface PagedServiceResourceDescriptionList { */ continuationToken?: string; /** - * List of service resource description. + * One page of the list. */ - items?: ServiceResourceDescription[]; + items?: SecretResourceDescription[]; } /** - * Describes the properties of a service replica. + * This type represents the unencrypted value of the secret. */ -export interface ServiceReplicaProperties { - /** - * The Operating system type required by the code in service. Possible values include: 'Linux', - * 'Windows' - */ - osType: string; +export interface SecretValue { /** - * Describes the set of code packages that forms the service. A code package describes the - * container and the properties for running it. All the code packages are started together on the - * same host and share the same context (network, process etc.). - */ - codePackages: ContainerCodePackageProperties[]; - /** - * The names of the private networks that this service needs to be part of. + * The actual value of the secret. */ - networkRefs?: NetworkRef[]; + value?: string; +} + +/** + * This type describes properties of secret value resource. + */ +export interface SecretValueProperties { /** - * Reference to sinks in DiagnosticsDescription. + * The actual value of the secret. */ - diagnostics?: DiagnosticsRef; + value?: string; } /** - * Describes a replica of a service resource. + * This type describes a value of a secret resource. The name of this resource is the version + * identifier corresponding to this secret value. */ -export interface ServiceResourceReplicaDescription extends ServiceReplicaProperties { +export interface SecretValueResourceDescription { /** - * Name of the replica. + * Version identifier of the secret value. */ - replicaName: string; + name: string; + /** + * The actual value of the secret. + */ + value?: string; } /** - * The list of service resources in the cluster. The list is paged when all of the results cannot - * fit in a single message. The next set of results can be obtained by executing the same query - * with the continuation token provided in this list. + * The list of values of a secret resource, paged if the number of results exceeds the limits of a + * single message. The next set of results can be obtained by executing the same query with the + * continuation token provided in the previous page. */ -export interface PagedServiceResourceReplicaDescriptionList { +export interface PagedSecretValueResourceDescriptionList { /** * The continuation token parameter is used to obtain next set of results. The continuation token * is included in the response of the API when the results from the system do not fit in a single @@ -10082,9 +9876,9 @@ export interface PagedServiceResourceReplicaDescriptionList { */ continuationToken?: string; /** - * List of service resource description. + * One page of the list. */ - items?: ServiceResourceReplicaDescription[]; + items?: SecretValueResourceDescription[]; } /** @@ -10106,320 +9900,1100 @@ export interface VolumeProviderParametersAzureFile { } /** - * Describes a service fabric volume resource. + * Describes a reference to a volume resource. */ -export interface VolumeResourceDescription { +export interface VolumeReference { /** - * User readable description of the volume. + * Name of the volume being referenced. */ - description?: string; + name: string; /** - * This type describes a volume provided by an Azure Files file share. + * The flag indicating whether the volume is read only. Default is 'false'. */ - azureFileParameters?: VolumeProviderParametersAzureFile; + readOnly?: boolean; /** - * Volume resource name. + * The path within the container at which the volume should be mounted. Only valid path + * characters are allowed. */ - name: string; + destinationPath: string; } /** - * Image registry credential. + * Describes parameters for creating application-scoped volumes. */ -export interface ImageRegistryCredential { +export interface ApplicationScopedVolumeCreationParameters { /** - * Docker image registry server, without protocol such as `http` and `https`. + * User readable description of the volume. */ - server: string; + description?: string; /** - * The username for the private registry. + * Polymorphic Discriminator */ - username: string; - /** - * The password for the private registry. - */ - password?: string; + kind: string; } /** - * Describes an environment variable for the container. + * Describes a volume whose lifetime is scoped to the application's lifetime. */ -export interface EnvironmentVariable { +export interface ApplicationScopedVolume extends VolumeReference { /** - * The name of the environment variable. + * Describes parameters for creating application-scoped volumes. */ - name?: string; + creationParameters: ApplicationScopedVolumeCreationParameters; +} + +/** + * Describes parameters for creating application-scoped volumes provided by Service Fabric Volume + * Disks + */ +export interface ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk extends ApplicationScopedVolumeCreationParameters { /** - * The value of the environment variable. + * Volume size. Possible values include: 'Small', 'Medium', 'Large' */ - value?: string; + sizeDisk: string; } /** - * Describes a setting for the container. + * This type describes a volume resource. */ -export interface Setting { +export interface VolumeResourceDescription { /** - * The name of the setting. + * Name of the Volume resource. */ - name?: string; + name: string; /** - * The value of the setting. + * User readable description of the volume. */ - value?: string; + description?: string; + /** + * Status of the volume. Possible values include: 'Unknown', 'Ready', 'Upgrading', 'Creating', + * 'Deleting', 'Failed' + */ + readonly status?: string; + /** + * Gives additional information about the current status of the volume. + */ + readonly statusDetails?: string; + /** + * This type describes a volume provided by an Azure Files file share. + */ + azureFileParameters?: VolumeProviderParametersAzureFile; } /** - * Describes a container label. + * The list of volume resources. The list is paged when all of the results cannot fit in a single + * message. The next set of results can be obtained by executing the same query with the + * continuation token provided in this list. */ -export interface ContainerLabel { +export interface PagedVolumeResourceDescriptionList { /** - * The name of the container label. + * The continuation token parameter is used to obtain next set of results. The continuation token + * is included in the response of the API when the results from the system do not fit in a single + * response. When this value is passed to the next API call, the API returns next set of results. + * If there are no further results, then the continuation token is not included in the response. */ - name: string; + continuationToken?: string; /** - * The value of the container label. + * One page of the list. */ - value: string; + items?: VolumeResourceDescription[]; } /** - * Describes a container endpoint. + * This type describes the properties of a network resource, including its kind. */ -export interface EndpointProperties { - /** - * The name of the endpoint. - */ - name: string; +export interface NetworkResourcePropertiesBase { /** - * Port used by the container. + * Polymorphic Discriminator */ - port?: number; + kind: string; } /** - * This type describes the requested resources for a given container. It describes the least amount - * of resources required for the container. A container can consume more than requested resources - * up to the specified limits before being restarted. Currently, the requested resources are - * treated as limits. + * Describes properties of a network resource. */ -export interface ResourceRequests { +export interface NetworkResourceProperties extends NetworkResourcePropertiesBase { /** - * The memory request in GB for this container. + * User readable description of the network. */ - memoryInGB: number; + description?: string; /** - * Requested number of CPU cores. At present, only full cores are supported. + * Status of the network. Possible values include: 'Unknown', 'Ready', 'Upgrading', 'Creating', + * 'Deleting', 'Failed' */ - cpu: number; + readonly status?: string; + /** + * Gives additional information about the current status of the network. + */ + readonly statusDetails?: string; } /** - * This type describes the resource limits for a given container. It describes the most amount of - * resources a container is allowed to use before being restarted. + * Information about a Service Fabric container network local to a single Service Fabric cluster. */ -export interface ResourceLimits { +export interface LocalNetworkResourceProperties extends NetworkResourceProperties { /** - * The memory limit in GB. + * Address space for the local container network. */ - memoryInGB?: number; + networkAddressPrefix?: string; +} + +/** + * Describes a reference to a service endpoint. + */ +export interface EndpointRef { /** - * CPU limits in cores. At present, only full cores are supported. + * Name of the endpoint. */ - cpu?: number; + name?: string; } /** - * This type describes the resource requirements for a container or a service. + * Describes a network reference in a service. */ -export interface ResourceRequirements { +export interface NetworkRef { /** - * Describes the requested resources for a given container. + * Name of the network */ - requests: ResourceRequests; + name?: string; /** - * Describes the maximum limits on the resources for a given container. + * A list of endpoints that are exposed on this network. */ - limits?: ResourceLimits; + endpointRefs?: EndpointRef[]; } /** - * Describes how a volume is attached to a container. + * This type describes a network resource. */ -export interface ContainerVolume { +export interface NetworkResourceDescription { /** - * Name of the volume. + * Name of the Network resource. */ name: string; /** - * The flag indicating whether the volume is read only. Default is 'false'. + * Describes properties of a network resource. */ - readOnly?: boolean; + properties: NetworkResourceProperties; +} + +/** + * The list of network resources. The list is paged when all of the results cannot fit in a single + * message. The next set of results can be obtained by executing the same query with the + * continuation token provided in this list. + */ +export interface PagedNetworkResourceDescriptionList { /** - * The path within the container at which the volume should be mounted. Only valid path - * characters are allowed. + * The continuation token parameter is used to obtain next set of results. The continuation token + * is included in the response of the API when the results from the system do not fit in a single + * response. When this value is passed to the next API call, the API returns next set of results. + * If there are no further results, then the continuation token is not included in the response. */ - destinationPath: string; + continuationToken?: string; + /** + * One page of the list. + */ + items?: NetworkResourceDescription[]; } /** - * The container state. + * Describes destination endpoint for routing traffic. */ -export interface ContainerState { +export interface GatewayDestination { /** - * The state of this container + * Name of the service fabric Mesh application. */ - state?: string; + applicationName: string; /** - * Date/time when the container state started. + * service that contains the endpoint. */ - startTime?: Date; + serviceName: string; /** - * The container exit code. + * name of the endpoint in the service. */ - exitCode?: string; + endpointName: string; +} + +/** + * Describes the tcp configuration for external connectivity for this network. + */ +export interface TcpConfig { /** - * Date/time when the container state finished. + * tcp gateway config name. */ - finishTime?: Date; + name: string; /** - * Human-readable status of this state. + * Specifies the port at which the service endpoint below needs to be exposed. */ - detailStatus?: string; + port: number; + /** + * Describes destination endpoint for routing traffic. + */ + destination: GatewayDestination; } /** - * A container event. + * Path to match for routing. */ -export interface ContainerEvent { +export interface HttpRouteMatchPath { /** - * The name of the container event. + * Uri path to match for request. */ - name?: string; + value: string; /** - * The count of the event. + * replacement string for matched part of the Uri. */ - count?: number; + rewrite?: string; +} + +/** + * Describes header information for http route matching. + */ +export interface HttpRouteMatchHeader { /** - * Date/time of the first event. + * Name of header to match in request. */ - firstTimestamp?: string; + name: string; /** - * Date/time of the last event. + * Value of header to match in request. */ - lastTimestamp?: string; + value?: string; /** - * The event message + * how to match header value. Possible values include: 'exact' */ - message?: string; + type?: string; +} + +/** + * Describes a rule for http route matching. + */ +export interface HttpRouteMatchRule { /** - * The event type. + * Path to match for routing. */ - type?: string; + path: HttpRouteMatchPath; + /** + * headers and their values to match in request. + */ + headers?: HttpRouteMatchHeader[]; } /** - * Runtime information of a container instance. + * Describes the hostname properties for http routing. */ -export interface ContainerInstanceView { +export interface HttpRouteConfig { /** - * The number of times the container has been restarted. + * http route name. */ - restartCount?: number; + name: string; /** - * Current container instance state. + * Describes a rule for http route matching. */ - currentState?: ContainerState; + match: HttpRouteMatchRule; /** - * Previous container instance state. + * Describes destination endpoint for routing traffic. */ - previousState?: ContainerState; + destination: GatewayDestination; +} + +/** + * Describes the hostname properties for http routing. + */ +export interface HttpHostConfig { /** - * The events of this container instance. + * http hostname config name. */ - events?: ContainerEvent[]; + name: string; + /** + * Route information to use for routing. Routes are processed in the order they are specified. + * Specify routes that are more specific before routes that can hamdle general cases. + */ + routes: HttpRouteConfig[]; } /** - * Reference to sinks in DiagnosticsDescription. + * Describes the http configuration for external connectivity for this network. */ -export interface DiagnosticsRef { +export interface HttpConfig { /** - * Status of whether or not sinks are enabled. + * http gateway config name. */ - enabled?: boolean; + name: string; /** - * List of sinks to be used if enabled. References the list of sinks in DiagnosticsDescription. + * Specifies the port at which the service endpoint below needs to be exposed. */ - sinkRefs?: string[]; + port: number; + /** + * description for routing. + */ + hosts: HttpHostConfig[]; } /** - * Describes a container and its runtime properties. + * This type describes a gateway resource. */ -export interface ContainerCodePackageProperties { +export interface GatewayResourceDescription { /** - * The name of the code package. + * Name of the Gateway resource. */ name: string; /** - * The Container image to use. + * User readable description of the gateway. */ - image: string; + description?: string; /** - * Image registry credential. + * Network the gateway should listen on for requests. */ - imageRegistryCredential?: ImageRegistryCredential; + sourceNetwork: NetworkRef; /** - * Override for the default entry point in the container. + * Network that the Application is using. */ - entrypoint?: string; + destinationNetwork: NetworkRef; /** - * Command array to execute within the container in exec form. + * Configuration for tcp connectivity for this gateway. */ - commands?: string[]; + tcp?: TcpConfig[]; /** - * The environment variables to set in this container + * Configuration for http connectivity for this gateway. */ - environmentVariables?: EnvironmentVariable[]; + http?: HttpConfig[]; /** - * The settings to set in this container. The setting file path can be fetched from environment - * variable "Fabric_SettingPath". The path for Windows container is "C:\\secrets". The path for - * Linux container is "/var/secrets". + * Status of the resource. Possible values include: 'Unknown', 'Ready', 'Upgrading', 'Creating', + * 'Deleting', 'Failed' */ - settings?: Setting[]; + readonly status?: string; /** - * The labels to set in this container. + * Gives additional information about the current status of the gateway. */ - labels?: ContainerLabel[]; + readonly statusDetails?: string; /** - * The endpoints exposed by this container. + * IP address of the gateway. This is populated in the response and is ignored for incoming + * requests. */ - endpoints?: EndpointProperties[]; + readonly ipAddress?: string; +} + +/** + * The list of gateway resources. The list is paged when all of the results cannot fit in a single + * message. The next set of results can be obtained by executing the same query with the + * continuation token provided in this list. + */ +export interface PagedGatewayResourceDescriptionList { /** - * This type describes the resource requirements for a container or a service. + * The continuation token parameter is used to obtain next set of results. The continuation token + * is included in the response of the API when the results from the system do not fit in a single + * response. When this value is passed to the next API call, the API returns next set of results. + * If there are no further results, then the continuation token is not included in the response. */ - resources: ResourceRequirements; + continuationToken?: string; /** - * The volumes to be attached to the container. + * One page of the list. */ - volumeRefs?: ContainerVolume[]; + items?: GatewayResourceDescription[]; +} + +/** + * Image registry credential. + */ +export interface ImageRegistryCredential { /** - * Runtime information of a container instance. + * Docker image registry server, without protocol such as `http` and `https`. */ - readonly instanceView?: ContainerInstanceView; + server: string; /** - * Reference to sinks in DiagnosticsDescription. + * The username for the private registry. */ - diagnostics?: DiagnosticsRef; + username: string; + /** + * The password for the private registry. The password is required for create or update + * operations, however it is not returned in the get or list operations. + */ + password?: string; } /** - * Describes a network reference in a service. + * Describes an environment variable for the container. */ -export interface NetworkRef { +export interface EnvironmentVariable { + /** + * The name of the environment variable. + */ + name?: string; + /** + * The value of the environment variable. + */ + value?: string; +} + +/** + * Describes a setting for the container. The setting file path can be fetched from environment + * variable "Fabric_SettingPath". The path for Windows container is "C:\\secrets". The path for + * Linux container is "/var/secrets". + */ +export interface Setting { /** - * Name of the network. + * The name of the setting. */ name?: string; + /** + * The value of the setting. + */ + value?: string; +} + +/** + * Describes a container label. + */ +export interface ContainerLabel { + /** + * The name of the container label. + */ + name: string; + /** + * The value of the container label. + */ + value: string; +} + +/** + * Describes a container endpoint. + */ +export interface EndpointProperties { + /** + * The name of the endpoint. + */ + name: string; + /** + * Port used by the container. + */ + port?: number; +} + +/** + * This type describes the requested resources for a given container. It describes the least amount + * of resources required for the container. A container can consume more than requested resources + * up to the specified limits before being restarted. Currently, the requested resources are + * treated as limits. + */ +export interface ResourceRequests { + /** + * The memory request in GB for this container. + */ + memoryInGB: number; + /** + * Requested number of CPU cores. At present, only full cores are supported. + */ + cpu: number; +} + +/** + * This type describes the resource limits for a given container. It describes the most amount of + * resources a container is allowed to use before being restarted. + */ +export interface ResourceLimits { + /** + * The memory limit in GB. + */ + memoryInGB?: number; + /** + * CPU limits in cores. At present, only full cores are supported. + */ + cpu?: number; +} + +/** + * This type describes the resource requirements for a container or a service. + */ +export interface ResourceRequirements { + /** + * Describes the requested resources for a given container. + */ + requests: ResourceRequests; + /** + * Describes the maximum limits on the resources for a given container. + */ + limits?: ResourceLimits; +} + +/** + * Reference to sinks in DiagnosticsDescription. + */ +export interface DiagnosticsRef { + /** + * Status of whether or not sinks are enabled. + */ + enabled?: boolean; + /** + * List of sinks to be used if enabled. References the list of sinks in DiagnosticsDescription. + */ + sinkRefs?: string[]; +} + +/** + * Specifying this parameter adds support for reliable collections + */ +export interface ReliableCollectionsRef { + /** + * Name of ReliableCollection resource. Right now it's not used and you can use any string. + */ + name: string; + /** + * False (the default) if ReliableCollections state is persisted to disk as usual. True if you do + * not want to persist state, in which case replication is still enabled and you can use + * ReliableCollections as distributed cache. + */ + doNotPersistState?: boolean; +} + +/** + * The container state. + */ +export interface ContainerState { + /** + * The state of this container + */ + state?: string; + /** + * Date/time when the container state started. + */ + startTime?: Date; + /** + * The container exit code. + */ + exitCode?: string; + /** + * Date/time when the container state finished. + */ + finishTime?: Date; + /** + * Human-readable status of this state. + */ + detailStatus?: string; +} + +/** + * A container event. + */ +export interface ContainerEvent { + /** + * The name of the container event. + */ + name?: string; + /** + * The count of the event. + */ + count?: number; + /** + * Date/time of the first event. + */ + firstTimestamp?: string; + /** + * Date/time of the last event. + */ + lastTimestamp?: string; + /** + * The event message + */ + message?: string; + /** + * The event type. + */ + type?: string; +} + +/** + * Runtime information of a container instance. + */ +export interface ContainerInstanceView { + /** + * The number of times the container has been restarted. + */ + restartCount?: number; + /** + * Current container instance state. + */ + currentState?: ContainerState; + /** + * Previous container instance state. + */ + previousState?: ContainerState; + /** + * The events of this container instance. + */ + events?: ContainerEvent[]; +} + +/** + * Describes a container and its runtime properties. + */ +export interface ContainerCodePackageProperties { + /** + * The name of the code package. + */ + name: string; + /** + * The Container image to use. + */ + image: string; + /** + * Image registry credential. + */ + imageRegistryCredential?: ImageRegistryCredential; + /** + * Override for the default entry point in the container. + */ + entrypoint?: string; + /** + * Command array to execute within the container in exec form. + */ + commands?: string[]; + /** + * The environment variables to set in this container + */ + environmentVariables?: EnvironmentVariable[]; + /** + * The settings to set in this container. The setting file path can be fetched from environment + * variable "Fabric_SettingPath". The path for Windows container is "C:\\secrets". The path for + * Linux container is "/var/secrets". + */ + settings?: Setting[]; + /** + * The labels to set in this container. + */ + labels?: ContainerLabel[]; + /** + * The endpoints exposed by this container. + */ + endpoints?: EndpointProperties[]; + /** + * The resources required by this container. + */ + resources: ResourceRequirements; + /** + * Volumes to be attached to the container. The lifetime of these volumes is independent of the + * application's lifetime. + */ + volumeRefs?: VolumeReference[]; + /** + * Volumes to be attached to the container. The lifetime of these volumes is scoped to the + * application's lifetime. + */ + volumes?: ApplicationScopedVolume[]; + /** + * Reference to sinks in DiagnosticsDescription. + */ + diagnostics?: DiagnosticsRef; + /** + * A list of ReliableCollection resources used by this particular code package. Please refer to + * ReliablecollectionsRef for more details. + */ + reliableCollectionsRefs?: ReliableCollectionsRef[]; + /** + * Runtime information of a container instance. + */ + readonly instanceView?: ContainerInstanceView; +} + +/** + * Describes the trigger for performing auto scaling operation. + */ +export interface AutoScalingTrigger { + /** + * Polymorphic Discriminator + */ + kind: string; +} + +/** + * Describes the mechanism for performing auto scaling operation. Derived classes will describe the + * actual mechanism. + */ +export interface AutoScalingMechanism { + /** + * Polymorphic Discriminator + */ + kind: string; +} + +/** + * Describes the auto scaling policy + */ +export interface AutoScalingPolicy { + /** + * The name of the auto scaling policy. + */ + name: string; + /** + * Determines when auto scaling operation will be invoked. + */ + trigger: AutoScalingTrigger; + /** + * The mechanism that is used to scale when auto scaling operation is invoked. + */ + mechanism: AutoScalingMechanism; +} + +/** + * This type describes a service resource. + */ +export interface ServiceResourceDescription { + /** + * Name of the Service resource. + */ + name: string; + /** + * The operation system required by the code in service. Possible values include: 'Linux', + * 'Windows' + */ + osType: string; + /** + * Describes the set of code packages that forms the service. A code package describes the + * container and the properties for running it. All the code packages are started together on the + * same host and share the same context (network, process etc.). + */ + codePackages: ContainerCodePackageProperties[]; + /** + * The names of the private networks that this service needs to be part of. + */ + networkRefs?: NetworkRef[]; + /** + * Reference to sinks in DiagnosticsDescription. + */ + diagnostics?: DiagnosticsRef; + /** + * User readable description of the service. + */ + description?: string; + /** + * The number of replicas of the service to create. Defaults to 1 if not specified. + */ + replicaCount?: number; + /** + * Auto scaling policies + */ + autoScalingPolicies?: AutoScalingPolicy[]; + /** + * Status of the service. Possible values include: 'Unknown', 'Ready', 'Upgrading', 'Creating', + * 'Deleting', 'Failed' + */ + readonly status?: string; + /** + * Gives additional information about the current status of the service. + */ + readonly statusDetails?: string; + /** + * Describes the health state of an application resource. Possible values include: 'Invalid', + * 'Ok', 'Warning', 'Error', 'Unknown' + */ + readonly healthState?: string; + /** + * When the service's health state is not 'Ok', this additional details from service fabric + * Health Manager for the user to know why the service is marked unhealthy. + */ + readonly unhealthyEvaluation?: string; +} + +/** + * Properties of a DiagnosticsSink. + */ +export interface DiagnosticsSinkProperties { + /** + * Name of the sink. This value is referenced by DiagnosticsReferenceDescription + */ + name?: string; + /** + * A description of the sink. + */ + description?: string; + /** + * Polymorphic Discriminator + */ + kind: string; +} + +/** + * Describes the diagnostics options available + */ +export interface DiagnosticsDescription { + /** + * List of supported sinks that can be referenced. + */ + sinks?: DiagnosticsSinkProperties[]; + /** + * Status of whether or not sinks are enabled. + */ + enabled?: boolean; + /** + * The sinks to be used if diagnostics is enabled. Sink choices can be overridden at the service + * and code package level. + */ + defaultSinkRefs?: string[]; +} + +/** + * Diagnostics settings for Geneva. + */ +export interface AzureInternalMonitoringPipelineSinkDescription extends DiagnosticsSinkProperties { + /** + * Azure Internal monitoring pipeline account. + */ + accountName?: string; + /** + * Azure Internal monitoring pipeline account namespace. + */ + namespace?: string; + /** + * Azure Internal monitoring agent configuration. + */ + maConfigUrl?: string; + /** + * Azure Internal monitoring agent fluentd configuration. + */ + fluentdConfigUrl?: any; + /** + * Azure Internal monitoring pipeline autokey associated with the certificate. + */ + autoKeyConfigUrl?: string; +} + +/** + * Describes the horizontal auto scaling mechanism that adds or removes replicas (containers or + * container groups). + */ +export interface AddRemoveReplicaScalingMechanism extends AutoScalingMechanism { + /** + * Minimum number of containers (scale down won't be performed below this number). + */ + minCount: number; + /** + * Maximum number of containers (scale up won't be performed above this number). + */ + maxCount: number; + /** + * Each time auto scaling is performed, this number of containers will be added or removed. + */ + scaleIncrement: number; +} + +/** + * Describes the metric that is used for triggering auto scaling operation. Derived classes will + * describe resources or metrics. + */ +export interface AutoScalingMetric { + /** + * Polymorphic Discriminator + */ + kind: string; +} + +/** + * Describes the resource that is used for triggering auto scaling. + */ +export interface AutoScalingResourceMetric extends AutoScalingMetric { + /** + * Name of the resource. Possible values include: 'cpu', 'memoryInGB' + */ + name: string; +} + +/** + * Describes properties of a service resource. + */ +export interface ServiceProperties { + /** + * User readable description of the service. + */ + description?: string; + /** + * The number of replicas of the service to create. Defaults to 1 if not specified. + */ + replicaCount?: number; + /** + * Auto scaling policies + */ + autoScalingPolicies?: AutoScalingPolicy[]; + /** + * Status of the service. Possible values include: 'Unknown', 'Ready', 'Upgrading', 'Creating', + * 'Deleting', 'Failed' + */ + readonly status?: string; + /** + * Gives additional information about the current status of the service. + */ + readonly statusDetails?: string; + /** + * Describes the health state of an application resource. Possible values include: 'Invalid', + * 'Ok', 'Warning', 'Error', 'Unknown' + */ + readonly healthState?: string; + /** + * When the service's health state is not 'Ok', this additional details from service fabric + * Health Manager for the user to know why the service is marked unhealthy. + */ + readonly unhealthyEvaluation?: string; +} + +/** + * Describes the properties of a service replica. + */ +export interface ServiceReplicaProperties { + /** + * The operation system required by the code in service. Possible values include: 'Linux', + * 'Windows' + */ + osType: string; + /** + * Describes the set of code packages that forms the service. A code package describes the + * container and the properties for running it. All the code packages are started together on the + * same host and share the same context (network, process etc.). + */ + codePackages: ContainerCodePackageProperties[]; + /** + * The names of the private networks that this service needs to be part of. + */ + networkRefs?: NetworkRef[]; + /** + * Reference to sinks in DiagnosticsDescription. + */ + diagnostics?: DiagnosticsRef; +} + +/** + * Describes a replica of a service resource. + */ +export interface ServiceReplicaDescription extends ServiceReplicaProperties { + /** + * Name of the replica. + */ + replicaName: string; +} + +/** + * Describes the average load trigger used for auto scaling. + */ +export interface AverageLoadScalingTrigger extends AutoScalingTrigger { + /** + * Description of the metric that is used for scaling. + */ + metric: AutoScalingMetric; + /** + * Lower load threshold (if average load is below this threshold, service will scale down). + */ + lowerLoadThreshold: number; + /** + * Upper load threshold (if average load is above this threshold, service will scale up). + */ + upperLoadThreshold: number; + /** + * Scale interval that indicates how often will this trigger be checked. + */ + scaleIntervalInSeconds: number; +} + +/** + * The list of service resources. The list is paged when all of the results cannot fit in a single + * message. The next set of results can be obtained by executing the same query with the + * continuation token provided in this list. + */ +export interface PagedServiceResourceDescriptionList { + /** + * The continuation token parameter is used to obtain next set of results. The continuation token + * is included in the response of the API when the results from the system do not fit in a single + * response. When this value is passed to the next API call, the API returns next set of results. + * If there are no further results, then the continuation token is not included in the response. + */ + continuationToken?: string; + /** + * One page of the list. + */ + items?: ServiceResourceDescription[]; +} + +/** + * The list of service resource replicas in the cluster. The list is paged when all of the results + * cannot fit in a single message. The next set of results can be obtained by executing the same + * query with the continuation token provided in this list. + */ +export interface PagedServiceReplicaDescriptionList { + /** + * The continuation token parameter is used to obtain next set of results. The continuation token + * is included in the response of the API when the results from the system do not fit in a single + * response. When this value is passed to the next API call, the API returns next set of results. + * If there are no further results, then the continuation token is not included in the response. + */ + continuationToken?: string; + /** + * List of service resource replica description. + */ + items?: ServiceReplicaDescription[]; +} + +/** + * This type describes a application resource. + */ +export interface ApplicationResourceDescription { + /** + * Name of the Application resource. + */ + name: string; + /** + * User readable description of the application. + */ + description?: string; + /** + * Describes the services in the application. This property is used to create or modify services + * of the application. On get only the name of the service is returned. The service description + * can be obtained by querying for the service resource. + */ + services?: ServiceResourceDescription[]; + /** + * Describes the diagnostics definition and usage for an application resource. + */ + diagnostics?: DiagnosticsDescription; + /** + * Internal - used by Visual Studio to setup the debugging session on the local development + * environment. + */ + debugParams?: string; + /** + * Names of the services in the application. + */ + readonly serviceNames?: string[]; + /** + * Status of the application. Possible values include: 'Unknown', 'Ready', 'Upgrading', + * 'Creating', 'Deleting', 'Failed' + */ + readonly status?: string; + /** + * Gives additional information about the current status of the application. + */ + readonly statusDetails?: string; + /** + * Describes the health state of an application resource. Possible values include: 'Invalid', + * 'Ok', 'Warning', 'Error', 'Unknown' + */ + readonly healthState?: string; + /** + * When the application's health state is not 'Ok', this additional details from service fabric + * Health Manager for the user to know why the application is marked unhealthy. + */ + readonly unhealthyEvaluation?: string; +} + +/** + * The list of application resources. The list is paged when all of the results cannot fit in a + * single message. The next set of results can be obtained by executing the same query with the + * continuation token provided in this list. + */ +export interface PagedApplicationResourceDescriptionList { + /** + * The continuation token parameter is used to obtain next set of results. The continuation token + * is included in the response of the API when the results from the system do not fit in a single + * response. When this value is passed to the next API call, the API returns next set of results. + * If there are no further results, then the continuation token is not included in the response. + */ + continuationToken?: string; + /** + * One page of the list. + */ + items?: ApplicationResourceDescription[]; } diff --git a/lib/services/serviceFabric/lib/models/index.js b/lib/services/serviceFabric/lib/models/index.js index ca17e2f246..98eba0c762 100644 --- a/lib/services/serviceFabric/lib/models/index.js +++ b/lib/services/serviceFabric/lib/models/index.js @@ -14,6 +14,9 @@ 'use strict'; +exports.FabricErrorError = require('./fabricErrorError'); +exports.FabricError = require('./fabricError'); +exports.ContainerLogs = require('./containerLogs'); exports.AadMetadata = require('./aadMetadata'); exports.AadMetadataObject = require('./aadMetadataObject'); exports.AnalysisEventMetadata = require('./analysisEventMetadata'); @@ -86,6 +89,7 @@ exports.ClusterHealthPolicy = require('./clusterHealthPolicy'); exports.ClusterHealthChunkQueryDescription = require('./clusterHealthChunkQueryDescription'); exports.ClusterHealthPolicies = require('./clusterHealthPolicies'); exports.ClusterManifest = require('./clusterManifest'); +exports.ClusterVersion = require('./clusterVersion'); exports.ContainerApiRequestBody = require('./containerApiRequestBody'); exports.ContainerApiResult = require('./containerApiResult'); exports.ContainerApiResponse = require('./containerApiResponse'); @@ -110,12 +114,9 @@ exports.HealthStateCount = require('./healthStateCount'); exports.EntityKindHealthStateCount = require('./entityKindHealthStateCount'); exports.HealthStatistics = require('./healthStatistics'); exports.Epoch = require('./epoch'); -exports.BackupEpoch = require('./backupEpoch'); exports.EventHealthEvaluation = require('./eventHealthEvaluation'); exports.FabricCodeVersionInfo = require('./fabricCodeVersionInfo'); exports.FabricConfigVersionInfo = require('./fabricConfigVersionInfo'); -exports.FabricErrorError = require('./fabricErrorError'); -exports.FabricError = require('./fabricError'); exports.ClusterConfigurationUpgradeStatusInfo = require('./clusterConfigurationUpgradeStatusInfo'); exports.PartitionInformation = require('./partitionInformation'); exports.Int64RangePartitionInformation = require('./int64RangePartitionInformation'); @@ -322,8 +323,11 @@ exports.SuccessfulPropertyBatchInfo = require('./successfulPropertyBatchInfo'); exports.FailedPropertyBatchInfo = require('./failedPropertyBatchInfo'); exports.BackupScheduleDescription = require('./backupScheduleDescription'); exports.BackupStorageDescription = require('./backupStorageDescription'); +exports.RetentionPolicyDescription = require('./retentionPolicyDescription'); exports.BackupPolicyDescription = require('./backupPolicyDescription'); exports.PagedBackupPolicyDescriptionList = require('./pagedBackupPolicyDescriptionList'); +exports.BasicRetentionPolicyDescription = require('./basicRetentionPolicyDescription'); +exports.DisableBackupDescription = require('./disableBackupDescription'); exports.BackupConfigurationInfo = require('./backupConfigurationInfo'); exports.ApplicationBackupConfigurationInfo = require('./applicationBackupConfigurationInfo'); exports.ServiceBackupConfigurationInfo = require('./serviceBackupConfigurationInfo'); @@ -362,81 +366,97 @@ exports.RepairTaskUpdateInfo = require('./repairTaskUpdateInfo'); exports.UploadChunkRange = require('./uploadChunkRange'); exports.UploadSessionInfo = require('./uploadSessionInfo'); exports.UploadSession = require('./uploadSession'); -exports.ContainerLogs = require('./containerLogs'); exports.AveragePartitionLoadScalingTrigger = require('./averagePartitionLoadScalingTrigger'); exports.AverageServiceLoadScalingTrigger = require('./averageServiceLoadScalingTrigger'); exports.PartitionInstanceCountScaleMechanism = require('./partitionInstanceCountScaleMechanism'); exports.AddRemoveIncrementalNamedPartitionScalingMechanism = require('./addRemoveIncrementalNamedPartitionScalingMechanism'); exports.ApplicationCreatedEvent = require('./applicationCreatedEvent'); exports.ApplicationDeletedEvent = require('./applicationDeletedEvent'); -exports.ApplicationHealthReportCreatedEvent = require('./applicationHealthReportCreatedEvent'); +exports.ApplicationNewHealthReportEvent = require('./applicationNewHealthReportEvent'); exports.ApplicationHealthReportExpiredEvent = require('./applicationHealthReportExpiredEvent'); -exports.ApplicationUpgradeCompleteEvent = require('./applicationUpgradeCompleteEvent'); -exports.ApplicationUpgradeDomainCompleteEvent = require('./applicationUpgradeDomainCompleteEvent'); -exports.ApplicationUpgradeRollbackCompleteEvent = require('./applicationUpgradeRollbackCompleteEvent'); -exports.ApplicationUpgradeRollbackStartEvent = require('./applicationUpgradeRollbackStartEvent'); -exports.ApplicationUpgradeStartEvent = require('./applicationUpgradeStartEvent'); -exports.DeployedApplicationHealthReportCreatedEvent = require('./deployedApplicationHealthReportCreatedEvent'); +exports.ApplicationUpgradeCompletedEvent = require('./applicationUpgradeCompletedEvent'); +exports.ApplicationUpgradeDomainCompletedEvent = require('./applicationUpgradeDomainCompletedEvent'); +exports.ApplicationUpgradeRollbackCompletedEvent = require('./applicationUpgradeRollbackCompletedEvent'); +exports.ApplicationUpgradeRollbackStartedEvent = require('./applicationUpgradeRollbackStartedEvent'); +exports.ApplicationUpgradeStartedEvent = require('./applicationUpgradeStartedEvent'); +exports.DeployedApplicationNewHealthReportEvent = require('./deployedApplicationNewHealthReportEvent'); exports.DeployedApplicationHealthReportExpiredEvent = require('./deployedApplicationHealthReportExpiredEvent'); -exports.ProcessDeactivatedEvent = require('./processDeactivatedEvent'); -exports.ContainerDeactivatedEvent = require('./containerDeactivatedEvent'); +exports.ApplicationProcessExitedEvent = require('./applicationProcessExitedEvent'); +exports.ApplicationContainerInstanceExitedEvent = require('./applicationContainerInstanceExitedEvent'); exports.NodeAbortedEvent = require('./nodeAbortedEvent'); -exports.NodeAbortingEvent = require('./nodeAbortingEvent'); -exports.NodeAddedEvent = require('./nodeAddedEvent'); -exports.NodeCloseEvent = require('./nodeCloseEvent'); -exports.NodeClosingEvent = require('./nodeClosingEvent'); -exports.NodeDeactivateCompleteEvent = require('./nodeDeactivateCompleteEvent'); -exports.NodeDeactivateStartEvent = require('./nodeDeactivateStartEvent'); +exports.NodeAddedToClusterEvent = require('./nodeAddedToClusterEvent'); +exports.NodeClosedEvent = require('./nodeClosedEvent'); +exports.NodeDeactivateCompletedEvent = require('./nodeDeactivateCompletedEvent'); +exports.NodeDeactivateStartedEvent = require('./nodeDeactivateStartedEvent'); exports.NodeDownEvent = require('./nodeDownEvent'); -exports.NodeHealthReportCreatedEvent = require('./nodeHealthReportCreatedEvent'); +exports.NodeNewHealthReportEvent = require('./nodeNewHealthReportEvent'); exports.NodeHealthReportExpiredEvent = require('./nodeHealthReportExpiredEvent'); -exports.NodeOpenedSuccessEvent = require('./nodeOpenedSuccessEvent'); +exports.NodeOpenSucceededEvent = require('./nodeOpenSucceededEvent'); exports.NodeOpenFailedEvent = require('./nodeOpenFailedEvent'); -exports.NodeOpeningEvent = require('./nodeOpeningEvent'); -exports.NodeRemovedEvent = require('./nodeRemovedEvent'); +exports.NodeRemovedFromClusterEvent = require('./nodeRemovedFromClusterEvent'); exports.NodeUpEvent = require('./nodeUpEvent'); -exports.PartitionHealthReportCreatedEvent = require('./partitionHealthReportCreatedEvent'); +exports.PartitionNewHealthReportEvent = require('./partitionNewHealthReportEvent'); exports.PartitionHealthReportExpiredEvent = require('./partitionHealthReportExpiredEvent'); -exports.PartitionReconfigurationCompletedEvent = require('./partitionReconfigurationCompletedEvent'); +exports.PartitionReconfiguredEvent = require('./partitionReconfiguredEvent'); exports.PartitionPrimaryMoveAnalysisEvent = require('./partitionPrimaryMoveAnalysisEvent'); exports.ServiceCreatedEvent = require('./serviceCreatedEvent'); exports.ServiceDeletedEvent = require('./serviceDeletedEvent'); -exports.ServiceHealthReportCreatedEvent = require('./serviceHealthReportCreatedEvent'); +exports.ServiceNewHealthReportEvent = require('./serviceNewHealthReportEvent'); exports.ServiceHealthReportExpiredEvent = require('./serviceHealthReportExpiredEvent'); -exports.DeployedServiceHealthReportCreatedEvent = require('./deployedServiceHealthReportCreatedEvent'); -exports.DeployedServiceHealthReportExpiredEvent = require('./deployedServiceHealthReportExpiredEvent'); -exports.StatefulReplicaHealthReportCreatedEvent = require('./statefulReplicaHealthReportCreatedEvent'); +exports.DeployedServicePackageNewHealthReportEvent = require('./deployedServicePackageNewHealthReportEvent'); +exports.DeployedServicePackageHealthReportExpiredEvent = require('./deployedServicePackageHealthReportExpiredEvent'); +exports.StatefulReplicaNewHealthReportEvent = require('./statefulReplicaNewHealthReportEvent'); exports.StatefulReplicaHealthReportExpiredEvent = require('./statefulReplicaHealthReportExpiredEvent'); -exports.StatelessReplicaHealthReportCreatedEvent = require('./statelessReplicaHealthReportCreatedEvent'); +exports.StatelessReplicaNewHealthReportEvent = require('./statelessReplicaNewHealthReportEvent'); exports.StatelessReplicaHealthReportExpiredEvent = require('./statelessReplicaHealthReportExpiredEvent'); -exports.ClusterHealthReportCreatedEvent = require('./clusterHealthReportCreatedEvent'); +exports.ClusterNewHealthReportEvent = require('./clusterNewHealthReportEvent'); exports.ClusterHealthReportExpiredEvent = require('./clusterHealthReportExpiredEvent'); -exports.ClusterUpgradeCompleteEvent = require('./clusterUpgradeCompleteEvent'); -exports.ClusterUpgradeDomainCompleteEvent = require('./clusterUpgradeDomainCompleteEvent'); -exports.ClusterUpgradeRollbackCompleteEvent = require('./clusterUpgradeRollbackCompleteEvent'); -exports.ClusterUpgradeRollbackStartEvent = require('./clusterUpgradeRollbackStartEvent'); -exports.ClusterUpgradeStartEvent = require('./clusterUpgradeStartEvent'); +exports.ClusterUpgradeCompletedEvent = require('./clusterUpgradeCompletedEvent'); +exports.ClusterUpgradeDomainCompletedEvent = require('./clusterUpgradeDomainCompletedEvent'); +exports.ClusterUpgradeRollbackCompletedEvent = require('./clusterUpgradeRollbackCompletedEvent'); +exports.ClusterUpgradeRollbackStartedEvent = require('./clusterUpgradeRollbackStartedEvent'); +exports.ClusterUpgradeStartedEvent = require('./clusterUpgradeStartedEvent'); exports.ChaosStoppedEvent = require('./chaosStoppedEvent'); exports.ChaosStartedEvent = require('./chaosStartedEvent'); -exports.ChaosRestartNodeFaultCompletedEvent = require('./chaosRestartNodeFaultCompletedEvent'); -exports.ChaosRestartCodePackageFaultScheduledEvent = require('./chaosRestartCodePackageFaultScheduledEvent'); -exports.ChaosRestartCodePackageFaultCompletedEvent = require('./chaosRestartCodePackageFaultCompletedEvent'); -exports.ChaosRemoveReplicaFaultScheduledEvent = require('./chaosRemoveReplicaFaultScheduledEvent'); -exports.ChaosRemoveReplicaFaultCompletedEvent = require('./chaosRemoveReplicaFaultCompletedEvent'); -exports.ChaosMoveSecondaryFaultScheduledEvent = require('./chaosMoveSecondaryFaultScheduledEvent'); -exports.ChaosMovePrimaryFaultScheduledEvent = require('./chaosMovePrimaryFaultScheduledEvent'); -exports.ChaosRestartReplicaFaultScheduledEvent = require('./chaosRestartReplicaFaultScheduledEvent'); -exports.ChaosRestartNodeFaultScheduledEvent = require('./chaosRestartNodeFaultScheduledEvent'); -exports.ServiceResourceDescription = require('./serviceResourceDescription'); -exports.DiagnosticsSinkProperties = require('./diagnosticsSinkProperties'); -exports.DiagnosticsDescription = require('./diagnosticsDescription'); -exports.ApplicationResourceDescription = require('./applicationResourceDescription'); -exports.PagedServiceResourceDescriptionList = require('./pagedServiceResourceDescriptionList'); -exports.ServiceReplicaProperties = require('./serviceReplicaProperties'); -exports.ServiceResourceReplicaDescription = require('./serviceResourceReplicaDescription'); -exports.PagedServiceResourceReplicaDescriptionList = require('./pagedServiceResourceReplicaDescriptionList'); +exports.ChaosCodePackageRestartScheduledEvent = require('./chaosCodePackageRestartScheduledEvent'); +exports.ChaosReplicaRemovalScheduledEvent = require('./chaosReplicaRemovalScheduledEvent'); +exports.ChaosPartitionSecondaryMoveScheduledEvent = require('./chaosPartitionSecondaryMoveScheduledEvent'); +exports.ChaosPartitionPrimaryMoveScheduledEvent = require('./chaosPartitionPrimaryMoveScheduledEvent'); +exports.ChaosReplicaRestartScheduledEvent = require('./chaosReplicaRestartScheduledEvent'); +exports.ChaosNodeRestartScheduledEvent = require('./chaosNodeRestartScheduledEvent'); +exports.SecretResourcePropertiesBase = require('./secretResourcePropertiesBase'); +exports.SecretResourceProperties = require('./secretResourceProperties'); +exports.InlinedValueSecretResourceProperties = require('./inlinedValueSecretResourceProperties'); +exports.SecretResourceDescription = require('./secretResourceDescription'); +exports.PagedSecretResourceDescriptionList = require('./pagedSecretResourceDescriptionList'); +exports.SecretValue = require('./secretValue'); +exports.SecretValueProperties = require('./secretValueProperties'); +exports.SecretValueResourceDescription = require('./secretValueResourceDescription'); +exports.PagedSecretValueResourceDescriptionList = require('./pagedSecretValueResourceDescriptionList'); exports.VolumeProviderParametersAzureFile = require('./volumeProviderParametersAzureFile'); +exports.VolumeReference = require('./volumeReference'); +exports.ApplicationScopedVolumeCreationParameters = require('./applicationScopedVolumeCreationParameters'); +exports.ApplicationScopedVolume = require('./applicationScopedVolume'); +exports.ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk = require('./applicationScopedVolumeCreationParametersServiceFabricVolumeDisk'); exports.VolumeResourceDescription = require('./volumeResourceDescription'); +exports.PagedVolumeResourceDescriptionList = require('./pagedVolumeResourceDescriptionList'); +exports.NetworkResourcePropertiesBase = require('./networkResourcePropertiesBase'); +exports.NetworkResourceProperties = require('./networkResourceProperties'); +exports.LocalNetworkResourceProperties = require('./localNetworkResourceProperties'); +exports.EndpointRef = require('./endpointRef'); +exports.NetworkRef = require('./networkRef'); +exports.NetworkResourceDescription = require('./networkResourceDescription'); +exports.PagedNetworkResourceDescriptionList = require('./pagedNetworkResourceDescriptionList'); +exports.GatewayDestination = require('./gatewayDestination'); +exports.TcpConfig = require('./tcpConfig'); +exports.HttpRouteMatchPath = require('./httpRouteMatchPath'); +exports.HttpRouteMatchHeader = require('./httpRouteMatchHeader'); +exports.HttpRouteMatchRule = require('./httpRouteMatchRule'); +exports.HttpRouteConfig = require('./httpRouteConfig'); +exports.HttpHostConfig = require('./httpHostConfig'); +exports.HttpConfig = require('./httpConfig'); +exports.GatewayResourceDescription = require('./gatewayResourceDescription'); +exports.PagedGatewayResourceDescriptionList = require('./pagedGatewayResourceDescriptionList'); exports.ImageRegistryCredential = require('./imageRegistryCredential'); exports.EnvironmentVariable = require('./environmentVariable'); exports.Setting = require('./setting'); @@ -445,13 +465,30 @@ exports.EndpointProperties = require('./endpointProperties'); exports.ResourceRequests = require('./resourceRequests'); exports.ResourceLimits = require('./resourceLimits'); exports.ResourceRequirements = require('./resourceRequirements'); -exports.ContainerVolume = require('./containerVolume'); +exports.DiagnosticsRef = require('./diagnosticsRef'); +exports.ReliableCollectionsRef = require('./reliableCollectionsRef'); exports.ContainerState = require('./containerState'); exports.ContainerEvent = require('./containerEvent'); exports.ContainerInstanceView = require('./containerInstanceView'); -exports.DiagnosticsRef = require('./diagnosticsRef'); exports.ContainerCodePackageProperties = require('./containerCodePackageProperties'); -exports.NetworkRef = require('./networkRef'); +exports.AutoScalingTrigger = require('./autoScalingTrigger'); +exports.AutoScalingMechanism = require('./autoScalingMechanism'); +exports.AutoScalingPolicy = require('./autoScalingPolicy'); +exports.ServiceResourceDescription = require('./serviceResourceDescription'); +exports.DiagnosticsSinkProperties = require('./diagnosticsSinkProperties'); +exports.DiagnosticsDescription = require('./diagnosticsDescription'); +exports.AzureInternalMonitoringPipelineSinkDescription = require('./azureInternalMonitoringPipelineSinkDescription'); +exports.AddRemoveReplicaScalingMechanism = require('./addRemoveReplicaScalingMechanism'); +exports.AutoScalingMetric = require('./autoScalingMetric'); +exports.AutoScalingResourceMetric = require('./autoScalingResourceMetric'); +exports.ServiceProperties = require('./serviceProperties'); +exports.ServiceReplicaProperties = require('./serviceReplicaProperties'); +exports.ServiceReplicaDescription = require('./serviceReplicaDescription'); +exports.AverageLoadScalingTrigger = require('./averageLoadScalingTrigger'); +exports.PagedServiceResourceDescriptionList = require('./pagedServiceResourceDescriptionList'); +exports.PagedServiceReplicaDescriptionList = require('./pagedServiceReplicaDescriptionList'); +exports.ApplicationResourceDescription = require('./applicationResourceDescription'); +exports.PagedApplicationResourceDescriptionList = require('./pagedApplicationResourceDescriptionList'); exports.discriminators = { 'FabricEvent.ApplicationEvent' : exports.ApplicationEvent, 'HealthEvaluation' : exports.HealthEvaluation, @@ -573,6 +610,8 @@ exports.discriminators = { 'PropertyBatchInfo.Failed' : exports.FailedPropertyBatchInfo, 'BackupScheduleDescription' : exports.BackupScheduleDescription, 'BackupStorageDescription' : exports.BackupStorageDescription, + 'RetentionPolicyDescription' : exports.RetentionPolicyDescription, + 'RetentionPolicyDescription.Basic' : exports.BasicRetentionPolicyDescription, 'BackupConfigurationInfo.Application' : exports.ApplicationBackupConfigurationInfo, 'BackupConfigurationInfo.Service' : exports.ServiceBackupConfigurationInfo, 'BackupConfigurationInfo' : exports.BackupConfigurationInfo, @@ -595,63 +634,72 @@ exports.discriminators = { 'ScalingMechanismDescription.AddRemoveIncrementalNamedPartition' : exports.AddRemoveIncrementalNamedPartitionScalingMechanism, 'FabricEvent.ApplicationCreated' : exports.ApplicationCreatedEvent, 'FabricEvent.ApplicationDeleted' : exports.ApplicationDeletedEvent, - 'FabricEvent.ApplicationHealthReportCreated' : exports.ApplicationHealthReportCreatedEvent, + 'FabricEvent.ApplicationNewHealthReport' : exports.ApplicationNewHealthReportEvent, 'FabricEvent.ApplicationHealthReportExpired' : exports.ApplicationHealthReportExpiredEvent, - 'FabricEvent.ApplicationUpgradeComplete' : exports.ApplicationUpgradeCompleteEvent, - 'FabricEvent.ApplicationUpgradeDomainComplete' : exports.ApplicationUpgradeDomainCompleteEvent, - 'FabricEvent.ApplicationUpgradeRollbackComplete' : exports.ApplicationUpgradeRollbackCompleteEvent, - 'FabricEvent.ApplicationUpgradeRollbackStart' : exports.ApplicationUpgradeRollbackStartEvent, - 'FabricEvent.ApplicationUpgradeStart' : exports.ApplicationUpgradeStartEvent, - 'FabricEvent.DeployedApplicationHealthReportCreated' : exports.DeployedApplicationHealthReportCreatedEvent, + 'FabricEvent.ApplicationUpgradeCompleted' : exports.ApplicationUpgradeCompletedEvent, + 'FabricEvent.ApplicationUpgradeDomainCompleted' : exports.ApplicationUpgradeDomainCompletedEvent, + 'FabricEvent.ApplicationUpgradeRollbackCompleted' : exports.ApplicationUpgradeRollbackCompletedEvent, + 'FabricEvent.ApplicationUpgradeRollbackStarted' : exports.ApplicationUpgradeRollbackStartedEvent, + 'FabricEvent.ApplicationUpgradeStarted' : exports.ApplicationUpgradeStartedEvent, + 'FabricEvent.DeployedApplicationNewHealthReport' : exports.DeployedApplicationNewHealthReportEvent, 'FabricEvent.DeployedApplicationHealthReportExpired' : exports.DeployedApplicationHealthReportExpiredEvent, - 'FabricEvent.ProcessDeactivated' : exports.ProcessDeactivatedEvent, - 'FabricEvent.ContainerDeactivated' : exports.ContainerDeactivatedEvent, + 'FabricEvent.ApplicationProcessExited' : exports.ApplicationProcessExitedEvent, + 'FabricEvent.ApplicationContainerInstanceExited' : exports.ApplicationContainerInstanceExitedEvent, 'FabricEvent.NodeAborted' : exports.NodeAbortedEvent, - 'FabricEvent.NodeAborting' : exports.NodeAbortingEvent, - 'FabricEvent.NodeAdded' : exports.NodeAddedEvent, - 'FabricEvent.NodeClose' : exports.NodeCloseEvent, - 'FabricEvent.NodeClosing' : exports.NodeClosingEvent, - 'FabricEvent.NodeDeactivateComplete' : exports.NodeDeactivateCompleteEvent, - 'FabricEvent.NodeDeactivateStart' : exports.NodeDeactivateStartEvent, + 'FabricEvent.NodeAddedToCluster' : exports.NodeAddedToClusterEvent, + 'FabricEvent.NodeClosed' : exports.NodeClosedEvent, + 'FabricEvent.NodeDeactivateCompleted' : exports.NodeDeactivateCompletedEvent, + 'FabricEvent.NodeDeactivateStarted' : exports.NodeDeactivateStartedEvent, 'FabricEvent.NodeDown' : exports.NodeDownEvent, - 'FabricEvent.NodeHealthReportCreated' : exports.NodeHealthReportCreatedEvent, + 'FabricEvent.NodeNewHealthReport' : exports.NodeNewHealthReportEvent, 'FabricEvent.NodeHealthReportExpired' : exports.NodeHealthReportExpiredEvent, - 'FabricEvent.NodeOpenedSuccess' : exports.NodeOpenedSuccessEvent, + 'FabricEvent.NodeOpenSucceeded' : exports.NodeOpenSucceededEvent, 'FabricEvent.NodeOpenFailed' : exports.NodeOpenFailedEvent, - 'FabricEvent.NodeOpening' : exports.NodeOpeningEvent, - 'FabricEvent.NodeRemoved' : exports.NodeRemovedEvent, + 'FabricEvent.NodeRemovedFromCluster' : exports.NodeRemovedFromClusterEvent, 'FabricEvent.NodeUp' : exports.NodeUpEvent, - 'FabricEvent.PartitionHealthReportCreated' : exports.PartitionHealthReportCreatedEvent, + 'FabricEvent.PartitionNewHealthReport' : exports.PartitionNewHealthReportEvent, 'FabricEvent.PartitionHealthReportExpired' : exports.PartitionHealthReportExpiredEvent, - 'FabricEvent.PartitionReconfigurationCompleted' : exports.PartitionReconfigurationCompletedEvent, + 'FabricEvent.PartitionReconfigured' : exports.PartitionReconfiguredEvent, 'FabricEvent.PartitionPrimaryMoveAnalysis' : exports.PartitionPrimaryMoveAnalysisEvent, 'FabricEvent.ServiceCreated' : exports.ServiceCreatedEvent, 'FabricEvent.ServiceDeleted' : exports.ServiceDeletedEvent, - 'FabricEvent.ServiceHealthReportCreated' : exports.ServiceHealthReportCreatedEvent, + 'FabricEvent.ServiceNewHealthReport' : exports.ServiceNewHealthReportEvent, 'FabricEvent.ServiceHealthReportExpired' : exports.ServiceHealthReportExpiredEvent, - 'FabricEvent.DeployedServiceHealthReportCreated' : exports.DeployedServiceHealthReportCreatedEvent, - 'FabricEvent.DeployedServiceHealthReportExpired' : exports.DeployedServiceHealthReportExpiredEvent, - 'FabricEvent.StatefulReplicaHealthReportCreated' : exports.StatefulReplicaHealthReportCreatedEvent, + 'FabricEvent.DeployedServicePackageNewHealthReport' : exports.DeployedServicePackageNewHealthReportEvent, + 'FabricEvent.DeployedServicePackageHealthReportExpired' : exports.DeployedServicePackageHealthReportExpiredEvent, + 'FabricEvent.StatefulReplicaNewHealthReport' : exports.StatefulReplicaNewHealthReportEvent, 'FabricEvent.StatefulReplicaHealthReportExpired' : exports.StatefulReplicaHealthReportExpiredEvent, - 'FabricEvent.StatelessReplicaHealthReportCreated' : exports.StatelessReplicaHealthReportCreatedEvent, + 'FabricEvent.StatelessReplicaNewHealthReport' : exports.StatelessReplicaNewHealthReportEvent, 'FabricEvent.StatelessReplicaHealthReportExpired' : exports.StatelessReplicaHealthReportExpiredEvent, - 'FabricEvent.ClusterHealthReportCreated' : exports.ClusterHealthReportCreatedEvent, + 'FabricEvent.ClusterNewHealthReport' : exports.ClusterNewHealthReportEvent, 'FabricEvent.ClusterHealthReportExpired' : exports.ClusterHealthReportExpiredEvent, - 'FabricEvent.ClusterUpgradeComplete' : exports.ClusterUpgradeCompleteEvent, - 'FabricEvent.ClusterUpgradeDomainComplete' : exports.ClusterUpgradeDomainCompleteEvent, - 'FabricEvent.ClusterUpgradeRollbackComplete' : exports.ClusterUpgradeRollbackCompleteEvent, - 'FabricEvent.ClusterUpgradeRollbackStart' : exports.ClusterUpgradeRollbackStartEvent, - 'FabricEvent.ClusterUpgradeStart' : exports.ClusterUpgradeStartEvent, + 'FabricEvent.ClusterUpgradeCompleted' : exports.ClusterUpgradeCompletedEvent, + 'FabricEvent.ClusterUpgradeDomainCompleted' : exports.ClusterUpgradeDomainCompletedEvent, + 'FabricEvent.ClusterUpgradeRollbackCompleted' : exports.ClusterUpgradeRollbackCompletedEvent, + 'FabricEvent.ClusterUpgradeRollbackStarted' : exports.ClusterUpgradeRollbackStartedEvent, + 'FabricEvent.ClusterUpgradeStarted' : exports.ClusterUpgradeStartedEvent, 'FabricEvent.ChaosStopped' : exports.ChaosStoppedEvent, 'FabricEvent.ChaosStarted' : exports.ChaosStartedEvent, - 'FabricEvent.ChaosRestartNodeFaultCompleted' : exports.ChaosRestartNodeFaultCompletedEvent, - 'FabricEvent.ChaosRestartCodePackageFaultScheduled' : exports.ChaosRestartCodePackageFaultScheduledEvent, - 'FabricEvent.ChaosRestartCodePackageFaultCompleted' : exports.ChaosRestartCodePackageFaultCompletedEvent, - 'FabricEvent.ChaosRemoveReplicaFaultScheduled' : exports.ChaosRemoveReplicaFaultScheduledEvent, - 'FabricEvent.ChaosRemoveReplicaFaultCompleted' : exports.ChaosRemoveReplicaFaultCompletedEvent, - 'FabricEvent.ChaosMoveSecondaryFaultScheduled' : exports.ChaosMoveSecondaryFaultScheduledEvent, - 'FabricEvent.ChaosMovePrimaryFaultScheduled' : exports.ChaosMovePrimaryFaultScheduledEvent, - 'FabricEvent.ChaosRestartReplicaFaultScheduled' : exports.ChaosRestartReplicaFaultScheduledEvent, - 'FabricEvent.ChaosRestartNodeFaultScheduled' : exports.ChaosRestartNodeFaultScheduledEvent, - 'DiagnosticsSinkProperties' : exports.DiagnosticsSinkProperties + 'FabricEvent.ChaosCodePackageRestartScheduled' : exports.ChaosCodePackageRestartScheduledEvent, + 'FabricEvent.ChaosReplicaRemovalScheduled' : exports.ChaosReplicaRemovalScheduledEvent, + 'FabricEvent.ChaosPartitionSecondaryMoveScheduled' : exports.ChaosPartitionSecondaryMoveScheduledEvent, + 'FabricEvent.ChaosPartitionPrimaryMoveScheduled' : exports.ChaosPartitionPrimaryMoveScheduledEvent, + 'FabricEvent.ChaosReplicaRestartScheduled' : exports.ChaosReplicaRestartScheduledEvent, + 'FabricEvent.ChaosNodeRestartScheduled' : exports.ChaosNodeRestartScheduledEvent, + 'SecretResourcePropertiesBase.SecretResourceProperties' : exports.SecretResourceProperties, + 'SecretResourcePropertiesBase.inlinedValue' : exports.InlinedValueSecretResourceProperties, + 'SecretResourcePropertiesBase' : exports.SecretResourcePropertiesBase, + 'ApplicationScopedVolumeCreationParameters' : exports.ApplicationScopedVolumeCreationParameters, + 'ApplicationScopedVolumeCreationParameters.ServiceFabricVolumeDisk' : exports.ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk, + 'NetworkResourcePropertiesBase.NetworkResourceProperties' : exports.NetworkResourceProperties, + 'NetworkResourcePropertiesBase.Local' : exports.LocalNetworkResourceProperties, + 'NetworkResourcePropertiesBase' : exports.NetworkResourcePropertiesBase, + 'AutoScalingTrigger' : exports.AutoScalingTrigger, + 'AutoScalingMechanism' : exports.AutoScalingMechanism, + 'DiagnosticsSinkProperties' : exports.DiagnosticsSinkProperties, + 'DiagnosticsSinkProperties.AzureInternalMonitoringPipeline' : exports.AzureInternalMonitoringPipelineSinkDescription, + 'AutoScalingMechanism.AddRemoveReplica' : exports.AddRemoveReplicaScalingMechanism, + 'AutoScalingMetric' : exports.AutoScalingMetric, + 'AutoScalingMetric.Resource' : exports.AutoScalingResourceMetric, + 'AutoScalingTrigger.AverageLoad' : exports.AverageLoadScalingTrigger }; diff --git a/lib/services/serviceFabric/lib/models/inlinedValueSecretResourceProperties.js b/lib/services/serviceFabric/lib/models/inlinedValueSecretResourceProperties.js new file mode 100644 index 0000000000..544fe27057 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/inlinedValueSecretResourceProperties.js @@ -0,0 +1,95 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Describes the properties of a secret resource whose value is provided + * explicitly as plaintext. The secret resource may have multiple values, each + * being uniquely versioned. The secret value of each version is stored + * encrypted, and delivered as plaintext into the context of applications + * referencing it. + * + * @extends models['SecretResourceProperties'] + */ +class InlinedValueSecretResourceProperties extends models['SecretResourceProperties'] { + /** + * Create a InlinedValueSecretResourceProperties. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of InlinedValueSecretResourceProperties + * + * @returns {object} metadata of InlinedValueSecretResourceProperties + * + */ + mapper() { + return { + required: false, + serializedName: 'inlinedValue', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'kind', + clientName: 'kind' + }, + uberParent: 'SecretResourcePropertiesBase', + className: 'InlinedValueSecretResourceProperties', + modelProperties: { + kind: { + required: true, + serializedName: 'kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + description: { + required: false, + serializedName: 'description', + type: { + name: 'String' + } + }, + status: { + required: false, + readOnly: true, + serializedName: 'status', + type: { + name: 'String' + } + }, + statusDetails: { + required: false, + readOnly: true, + serializedName: 'statusDetails', + type: { + name: 'String' + } + }, + contentType: { + required: false, + serializedName: 'contentType', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = InlinedValueSecretResourceProperties; diff --git a/lib/services/serviceFabric/lib/models/loadMetricReport.js b/lib/services/serviceFabric/lib/models/loadMetricReport.js index 4180066d7f..0418051007 100644 --- a/lib/services/serviceFabric/lib/models/loadMetricReport.js +++ b/lib/services/serviceFabric/lib/models/loadMetricReport.js @@ -21,7 +21,10 @@ class LoadMetricReport { * @property {date} [lastReportedUtc] Gets the UTC time when the load was * reported. * @property {string} [name] The name of the load metric. - * @property {string} [value] The value of the load metric. + * @property {string} [value] The value of the load metric. In future + * releases of Service Fabric this parameter will be deprecated in favor of + * CurrentValue. + * @property {string} [currentValue] The value of the load metric. */ constructor() { } @@ -60,6 +63,13 @@ class LoadMetricReport { type: { name: 'String' } + }, + currentValue: { + required: false, + serializedName: 'CurrentValue', + type: { + name: 'String' + } } } } diff --git a/lib/services/serviceFabric/lib/models/loadMetricReportInfo.js b/lib/services/serviceFabric/lib/models/loadMetricReportInfo.js index 2c5ac93d2b..11c7bd4c50 100644 --- a/lib/services/serviceFabric/lib/models/loadMetricReportInfo.js +++ b/lib/services/serviceFabric/lib/models/loadMetricReportInfo.js @@ -18,7 +18,11 @@ class LoadMetricReportInfo { /** * Create a LoadMetricReportInfo. * @property {string} [name] The name of the metric. - * @property {number} [value] The value of the load for the metric.. + * @property {number} [value] The value of the load for the metric. In future + * releases of Service Fabric this parameter will be deprecated in favor of + * CurrentValue. + * @property {string} [currentValue] The double value of the load for the + * metric. * @property {date} [lastReportedUtc] The UTC time when the load is reported. */ constructor() { @@ -52,6 +56,13 @@ class LoadMetricReportInfo { name: 'Number' } }, + currentValue: { + required: false, + serializedName: 'CurrentValue', + type: { + name: 'String' + } + }, lastReportedUtc: { required: false, serializedName: 'LastReportedUtc', diff --git a/lib/services/serviceFabric/lib/models/localNetworkResourceProperties.js b/lib/services/serviceFabric/lib/models/localNetworkResourceProperties.js new file mode 100644 index 0000000000..94b780a9f5 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/localNetworkResourceProperties.js @@ -0,0 +1,94 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Information about a Service Fabric container network local to a single + * Service Fabric cluster. + * + * @extends models['NetworkResourceProperties'] + */ +class LocalNetworkResourceProperties extends models['NetworkResourceProperties'] { + /** + * Create a LocalNetworkResourceProperties. + * @property {string} [networkAddressPrefix] Address space for the local + * container network. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of LocalNetworkResourceProperties + * + * @returns {object} metadata of LocalNetworkResourceProperties + * + */ + mapper() { + return { + required: false, + serializedName: 'Local', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'kind', + clientName: 'kind' + }, + uberParent: 'NetworkResourcePropertiesBase', + className: 'LocalNetworkResourceProperties', + modelProperties: { + kind: { + required: true, + serializedName: 'kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + description: { + required: false, + serializedName: 'description', + type: { + name: 'String' + } + }, + status: { + required: false, + readOnly: true, + serializedName: 'status', + type: { + name: 'String' + } + }, + statusDetails: { + required: false, + readOnly: true, + serializedName: 'statusDetails', + type: { + name: 'String' + } + }, + networkAddressPrefix: { + required: false, + serializedName: 'networkAddressPrefix', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = LocalNetworkResourceProperties; diff --git a/lib/services/serviceFabric/lib/models/networkRef.js b/lib/services/serviceFabric/lib/models/networkRef.js index b72f53ca0f..2f46222dda 100644 --- a/lib/services/serviceFabric/lib/models/networkRef.js +++ b/lib/services/serviceFabric/lib/models/networkRef.js @@ -17,7 +17,9 @@ class NetworkRef { /** * Create a NetworkRef. - * @property {string} [name] Name of the network. + * @property {string} [name] Name of the network + * @property {array} [endpointRefs] A list of endpoints that are exposed on + * this network. */ constructor() { } @@ -42,6 +44,21 @@ class NetworkRef { type: { name: 'String' } + }, + endpointRefs: { + required: false, + serializedName: 'endpointRefs', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'EndpointRefElementType', + type: { + name: 'Composite', + className: 'EndpointRef' + } + } + } } } } diff --git a/lib/services/serviceFabric/lib/models/networkResourceDescription.js b/lib/services/serviceFabric/lib/models/networkResourceDescription.js new file mode 100644 index 0000000000..c010b5f53d --- /dev/null +++ b/lib/services/serviceFabric/lib/models/networkResourceDescription.js @@ -0,0 +1,73 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * This type describes a network resource. + * + */ +class NetworkResourceDescription { + /** + * Create a NetworkResourceDescription. + * @property {string} name Name of the Network resource. + * @property {object} properties Describes properties of a network resource. + * @property {string} [properties.description] User readable description of + * the network. + * @property {string} [properties.status] Status of the network. Possible + * values include: 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', + * 'Failed' + * @property {string} [properties.statusDetails] Gives additional information + * about the current status of the network. + */ + constructor() { + } + + /** + * Defines the metadata of NetworkResourceDescription + * + * @returns {object} metadata of NetworkResourceDescription + * + */ + mapper() { + return { + required: false, + serializedName: 'NetworkResourceDescription', + type: { + name: 'Composite', + className: 'NetworkResourceDescription', + modelProperties: { + name: { + required: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + properties: { + required: true, + serializedName: 'properties', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'kind', + clientName: 'kind' + }, + uberParent: 'NetworkResourcePropertiesBase', + className: 'NetworkResourceProperties' + } + } + } + } + }; + } +} + +module.exports = NetworkResourceDescription; diff --git a/lib/services/serviceFabric/lib/models/networkResourceProperties.js b/lib/services/serviceFabric/lib/models/networkResourceProperties.js new file mode 100644 index 0000000000..de6bd80711 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/networkResourceProperties.js @@ -0,0 +1,89 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Describes properties of a network resource. + * + * @extends models['NetworkResourcePropertiesBase'] + */ +class NetworkResourceProperties extends models['NetworkResourcePropertiesBase'] { + /** + * Create a NetworkResourceProperties. + * @property {string} [description] User readable description of the network. + * @property {string} [status] Status of the network. Possible values + * include: 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + * @property {string} [statusDetails] Gives additional information about the + * current status of the network. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of NetworkResourceProperties + * + * @returns {object} metadata of NetworkResourceProperties + * + */ + mapper() { + return { + required: false, + serializedName: 'NetworkResourceProperties', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'kind', + clientName: 'kind' + }, + uberParent: 'NetworkResourcePropertiesBase', + className: 'NetworkResourceProperties', + modelProperties: { + kind: { + required: true, + serializedName: 'kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + description: { + required: false, + serializedName: 'description', + type: { + name: 'String' + } + }, + status: { + required: false, + readOnly: true, + serializedName: 'status', + type: { + name: 'String' + } + }, + statusDetails: { + required: false, + readOnly: true, + serializedName: 'statusDetails', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = NetworkResourceProperties; diff --git a/lib/services/serviceFabric/lib/models/networkResourcePropertiesBase.js b/lib/services/serviceFabric/lib/models/networkResourcePropertiesBase.js new file mode 100644 index 0000000000..aa6c07d763 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/networkResourcePropertiesBase.js @@ -0,0 +1,59 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * This type describes the properties of a network resource, including its + * kind. + * + */ +class NetworkResourcePropertiesBase { + /** + * Create a NetworkResourcePropertiesBase. + * @property {string} kind Polymorphic Discriminator + */ + constructor() { + } + + /** + * Defines the metadata of NetworkResourcePropertiesBase + * + * @returns {object} metadata of NetworkResourcePropertiesBase + * + */ + mapper() { + return { + required: false, + serializedName: 'NetworkResourcePropertiesBase', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'kind', + clientName: 'kind' + }, + uberParent: 'NetworkResourcePropertiesBase', + className: 'NetworkResourcePropertiesBase', + modelProperties: { + kind: { + required: true, + serializedName: 'kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = NetworkResourcePropertiesBase; diff --git a/lib/services/serviceFabric/lib/models/nodeAbortedEvent.js b/lib/services/serviceFabric/lib/models/nodeAbortedEvent.js index b707169947..184a3d34ae 100644 --- a/lib/services/serviceFabric/lib/models/nodeAbortedEvent.js +++ b/lib/services/serviceFabric/lib/models/nodeAbortedEvent.js @@ -59,6 +59,13 @@ class NodeAbortedEvent extends models['NodeEvent'] { name: 'String' } }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, timeStamp: { required: true, serializedName: 'TimeStamp', diff --git a/lib/services/serviceFabric/lib/models/nodeAddedToClusterEvent.js b/lib/services/serviceFabric/lib/models/nodeAddedToClusterEvent.js new file mode 100644 index 0000000000..5cc038f21f --- /dev/null +++ b/lib/services/serviceFabric/lib/models/nodeAddedToClusterEvent.js @@ -0,0 +1,144 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Node Added event. + * + * @extends models['NodeEvent'] + */ +class NodeAddedToClusterEvent extends models['NodeEvent'] { + /** + * Create a NodeAddedToClusterEvent. + * @property {string} nodeId Id of Node. + * @property {number} nodeInstance Id of Node instance. + * @property {string} nodeType Type of Node. + * @property {string} fabricVersion Fabric version. + * @property {string} ipAddressOrFQDN IP address or FQDN. + * @property {string} nodeCapacities Capacities. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of NodeAddedToClusterEvent + * + * @returns {object} metadata of NodeAddedToClusterEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'NodeAddedToCluster', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'NodeAddedToClusterEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + nodeName: { + required: true, + serializedName: 'NodeName', + type: { + name: 'String' + } + }, + nodeId: { + required: true, + serializedName: 'NodeId', + type: { + name: 'String' + } + }, + nodeInstance: { + required: true, + serializedName: 'NodeInstance', + type: { + name: 'Number' + } + }, + nodeType: { + required: true, + serializedName: 'NodeType', + type: { + name: 'String' + } + }, + fabricVersion: { + required: true, + serializedName: 'FabricVersion', + type: { + name: 'String' + } + }, + ipAddressOrFQDN: { + required: true, + serializedName: 'IpAddressOrFQDN', + type: { + name: 'String' + } + }, + nodeCapacities: { + required: true, + serializedName: 'NodeCapacities', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = NodeAddedToClusterEvent; diff --git a/lib/services/serviceFabric/lib/models/nodeClosedEvent.js b/lib/services/serviceFabric/lib/models/nodeClosedEvent.js new file mode 100644 index 0000000000..032983cb5d --- /dev/null +++ b/lib/services/serviceFabric/lib/models/nodeClosedEvent.js @@ -0,0 +1,120 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Node Closed event. + * + * @extends models['NodeEvent'] + */ +class NodeClosedEvent extends models['NodeEvent'] { + /** + * Create a NodeClosedEvent. + * @property {string} nodeId Id of Node. + * @property {number} nodeInstance Id of Node instance. + * @property {string} error Describes error. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of NodeClosedEvent + * + * @returns {object} metadata of NodeClosedEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'NodeClosed', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'NodeClosedEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + nodeName: { + required: true, + serializedName: 'NodeName', + type: { + name: 'String' + } + }, + nodeId: { + required: true, + serializedName: 'NodeId', + type: { + name: 'String' + } + }, + nodeInstance: { + required: true, + serializedName: 'NodeInstance', + type: { + name: 'Number' + } + }, + error: { + required: true, + serializedName: 'Error', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = NodeClosedEvent; diff --git a/lib/services/serviceFabric/lib/models/nodeDeactivateCompletedEvent.js b/lib/services/serviceFabric/lib/models/nodeDeactivateCompletedEvent.js new file mode 100644 index 0000000000..74534a3f43 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/nodeDeactivateCompletedEvent.js @@ -0,0 +1,128 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Node Deactivate Completed event. + * + * @extends models['NodeEvent'] + */ +class NodeDeactivateCompletedEvent extends models['NodeEvent'] { + /** + * Create a NodeDeactivateCompletedEvent. + * @property {number} nodeInstance Id of Node instance. + * @property {string} effectiveDeactivateIntent Describes deactivate intent. + * @property {string} batchIdsWithDeactivateIntent Batch Ids. + * @property {date} startTime Start time. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of NodeDeactivateCompletedEvent + * + * @returns {object} metadata of NodeDeactivateCompletedEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'NodeDeactivateCompleted', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'NodeDeactivateCompletedEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + nodeName: { + required: true, + serializedName: 'NodeName', + type: { + name: 'String' + } + }, + nodeInstance: { + required: true, + serializedName: 'NodeInstance', + type: { + name: 'Number' + } + }, + effectiveDeactivateIntent: { + required: true, + serializedName: 'EffectiveDeactivateIntent', + type: { + name: 'String' + } + }, + batchIdsWithDeactivateIntent: { + required: true, + serializedName: 'BatchIdsWithDeactivateIntent', + type: { + name: 'String' + } + }, + startTime: { + required: true, + serializedName: 'StartTime', + type: { + name: 'DateTime' + } + } + } + } + }; + } +} + +module.exports = NodeDeactivateCompletedEvent; diff --git a/lib/services/serviceFabric/lib/models/nodeDeactivateStartedEvent.js b/lib/services/serviceFabric/lib/models/nodeDeactivateStartedEvent.js new file mode 100644 index 0000000000..bb20ff3cdb --- /dev/null +++ b/lib/services/serviceFabric/lib/models/nodeDeactivateStartedEvent.js @@ -0,0 +1,120 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Node Deactivate Started event. + * + * @extends models['NodeEvent'] + */ +class NodeDeactivateStartedEvent extends models['NodeEvent'] { + /** + * Create a NodeDeactivateStartedEvent. + * @property {number} nodeInstance Id of Node instance. + * @property {string} batchId Batch Id. + * @property {string} deactivateIntent Describes deactivate intent. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of NodeDeactivateStartedEvent + * + * @returns {object} metadata of NodeDeactivateStartedEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'NodeDeactivateStarted', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'NodeDeactivateStartedEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + nodeName: { + required: true, + serializedName: 'NodeName', + type: { + name: 'String' + } + }, + nodeInstance: { + required: true, + serializedName: 'NodeInstance', + type: { + name: 'Number' + } + }, + batchId: { + required: true, + serializedName: 'BatchId', + type: { + name: 'String' + } + }, + deactivateIntent: { + required: true, + serializedName: 'DeactivateIntent', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = NodeDeactivateStartedEvent; diff --git a/lib/services/serviceFabric/lib/models/nodeDownEvent.js b/lib/services/serviceFabric/lib/models/nodeDownEvent.js index 0a96b853a8..4834308304 100644 --- a/lib/services/serviceFabric/lib/models/nodeDownEvent.js +++ b/lib/services/serviceFabric/lib/models/nodeDownEvent.js @@ -53,6 +53,13 @@ class NodeDownEvent extends models['NodeEvent'] { name: 'String' } }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, timeStamp: { required: true, serializedName: 'TimeStamp', diff --git a/lib/services/serviceFabric/lib/models/nodeEvent.js b/lib/services/serviceFabric/lib/models/nodeEvent.js index f469d85c15..98aa52ea38 100644 --- a/lib/services/serviceFabric/lib/models/nodeEvent.js +++ b/lib/services/serviceFabric/lib/models/nodeEvent.js @@ -52,6 +52,13 @@ class NodeEvent extends models['FabricEvent'] { name: 'String' } }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, timeStamp: { required: true, serializedName: 'TimeStamp', diff --git a/lib/services/serviceFabric/lib/models/nodeHealthReportExpiredEvent.js b/lib/services/serviceFabric/lib/models/nodeHealthReportExpiredEvent.js index ef640a0f28..b930606722 100644 --- a/lib/services/serviceFabric/lib/models/nodeHealthReportExpiredEvent.js +++ b/lib/services/serviceFabric/lib/models/nodeHealthReportExpiredEvent.js @@ -61,6 +61,13 @@ class NodeHealthReportExpiredEvent extends models['NodeEvent'] { name: 'String' } }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, timeStamp: { required: true, serializedName: 'TimeStamp', diff --git a/lib/services/serviceFabric/lib/models/nodeNewHealthReportEvent.js b/lib/services/serviceFabric/lib/models/nodeNewHealthReportEvent.js new file mode 100644 index 0000000000..efdf5008c8 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/nodeNewHealthReportEvent.js @@ -0,0 +1,169 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Node Health Report Created event. + * + * @extends models['NodeEvent'] + */ +class NodeNewHealthReportEvent extends models['NodeEvent'] { + /** + * Create a NodeNewHealthReportEvent. + * @property {number} nodeInstanceId Id of Node instance. + * @property {string} sourceId Id of report source. + * @property {string} property Describes the property. + * @property {string} healthState Describes the property health state. + * @property {number} timeToLiveMs Time to live in milli-seconds. + * @property {number} sequenceNumber Sequence number of report. + * @property {string} description Description of report. + * @property {boolean} removeWhenExpired Indicates the removal when it + * expires. + * @property {date} sourceUtcTimestamp Source time. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of NodeNewHealthReportEvent + * + * @returns {object} metadata of NodeNewHealthReportEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'NodeNewHealthReport', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'NodeNewHealthReportEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + nodeName: { + required: true, + serializedName: 'NodeName', + type: { + name: 'String' + } + }, + nodeInstanceId: { + required: true, + serializedName: 'NodeInstanceId', + type: { + name: 'Number' + } + }, + sourceId: { + required: true, + serializedName: 'SourceId', + type: { + name: 'String' + } + }, + property: { + required: true, + serializedName: 'Property', + type: { + name: 'String' + } + }, + healthState: { + required: true, + serializedName: 'HealthState', + type: { + name: 'String' + } + }, + timeToLiveMs: { + required: true, + serializedName: 'TimeToLiveMs', + type: { + name: 'Number' + } + }, + sequenceNumber: { + required: true, + serializedName: 'SequenceNumber', + type: { + name: 'Number' + } + }, + description: { + required: true, + serializedName: 'Description', + type: { + name: 'String' + } + }, + removeWhenExpired: { + required: true, + serializedName: 'RemoveWhenExpired', + type: { + name: 'Boolean' + } + }, + sourceUtcTimestamp: { + required: true, + serializedName: 'SourceUtcTimestamp', + type: { + name: 'DateTime' + } + } + } + } + }; + } +} + +module.exports = NodeNewHealthReportEvent; diff --git a/lib/services/serviceFabric/lib/models/nodeOpenFailedEvent.js b/lib/services/serviceFabric/lib/models/nodeOpenFailedEvent.js index c3d23e97da..c689ac3205 100644 --- a/lib/services/serviceFabric/lib/models/nodeOpenFailedEvent.js +++ b/lib/services/serviceFabric/lib/models/nodeOpenFailedEvent.js @@ -60,6 +60,13 @@ class NodeOpenFailedEvent extends models['NodeEvent'] { name: 'String' } }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, timeStamp: { required: true, serializedName: 'TimeStamp', diff --git a/lib/services/serviceFabric/lib/models/nodeOpenSucceededEvent.js b/lib/services/serviceFabric/lib/models/nodeOpenSucceededEvent.js new file mode 100644 index 0000000000..477853e8e3 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/nodeOpenSucceededEvent.js @@ -0,0 +1,160 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Node Opened Succeeded event. + * + * @extends models['NodeEvent'] + */ +class NodeOpenSucceededEvent extends models['NodeEvent'] { + /** + * Create a NodeOpenSucceededEvent. + * @property {number} nodeInstance Id of Node instance. + * @property {string} nodeId Id of Node. + * @property {string} upgradeDomain Upgrade domain of Node. + * @property {string} faultDomain Fault domain of Node. + * @property {string} ipAddressOrFQDN IP address or FQDN. + * @property {string} hostname Name of Host. + * @property {boolean} isSeedNode Indicates if it is seed node. + * @property {string} nodeVersion Version of Node. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of NodeOpenSucceededEvent + * + * @returns {object} metadata of NodeOpenSucceededEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'NodeOpenSucceeded', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'NodeOpenSucceededEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + nodeName: { + required: true, + serializedName: 'NodeName', + type: { + name: 'String' + } + }, + nodeInstance: { + required: true, + serializedName: 'NodeInstance', + type: { + name: 'Number' + } + }, + nodeId: { + required: true, + serializedName: 'NodeId', + type: { + name: 'String' + } + }, + upgradeDomain: { + required: true, + serializedName: 'UpgradeDomain', + type: { + name: 'String' + } + }, + faultDomain: { + required: true, + serializedName: 'FaultDomain', + type: { + name: 'String' + } + }, + ipAddressOrFQDN: { + required: true, + serializedName: 'IpAddressOrFQDN', + type: { + name: 'String' + } + }, + hostname: { + required: true, + serializedName: 'Hostname', + type: { + name: 'String' + } + }, + isSeedNode: { + required: true, + serializedName: 'IsSeedNode', + type: { + name: 'Boolean' + } + }, + nodeVersion: { + required: true, + serializedName: 'NodeVersion', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = NodeOpenSucceededEvent; diff --git a/lib/services/serviceFabric/lib/models/nodeRemovedFromClusterEvent.js b/lib/services/serviceFabric/lib/models/nodeRemovedFromClusterEvent.js new file mode 100644 index 0000000000..5bd4e7f3c0 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/nodeRemovedFromClusterEvent.js @@ -0,0 +1,144 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Node Removed event. + * + * @extends models['NodeEvent'] + */ +class NodeRemovedFromClusterEvent extends models['NodeEvent'] { + /** + * Create a NodeRemovedFromClusterEvent. + * @property {string} nodeId Id of Node. + * @property {number} nodeInstance Id of Node instance. + * @property {string} nodeType Type of Node. + * @property {string} fabricVersion Fabric version. + * @property {string} ipAddressOrFQDN IP address or FQDN. + * @property {string} nodeCapacities Capacities. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of NodeRemovedFromClusterEvent + * + * @returns {object} metadata of NodeRemovedFromClusterEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'NodeRemovedFromCluster', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'NodeRemovedFromClusterEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + nodeName: { + required: true, + serializedName: 'NodeName', + type: { + name: 'String' + } + }, + nodeId: { + required: true, + serializedName: 'NodeId', + type: { + name: 'String' + } + }, + nodeInstance: { + required: true, + serializedName: 'NodeInstance', + type: { + name: 'Number' + } + }, + nodeType: { + required: true, + serializedName: 'NodeType', + type: { + name: 'String' + } + }, + fabricVersion: { + required: true, + serializedName: 'FabricVersion', + type: { + name: 'String' + } + }, + ipAddressOrFQDN: { + required: true, + serializedName: 'IpAddressOrFQDN', + type: { + name: 'String' + } + }, + nodeCapacities: { + required: true, + serializedName: 'NodeCapacities', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = NodeRemovedFromClusterEvent; diff --git a/lib/services/serviceFabric/lib/models/nodeUpEvent.js b/lib/services/serviceFabric/lib/models/nodeUpEvent.js index 90cae06537..cdac12b511 100644 --- a/lib/services/serviceFabric/lib/models/nodeUpEvent.js +++ b/lib/services/serviceFabric/lib/models/nodeUpEvent.js @@ -53,6 +53,13 @@ class NodeUpEvent extends models['NodeEvent'] { name: 'String' } }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, timeStamp: { required: true, serializedName: 'TimeStamp', diff --git a/lib/services/serviceFabric/lib/models/pagedApplicationResourceDescriptionList.js b/lib/services/serviceFabric/lib/models/pagedApplicationResourceDescriptionList.js new file mode 100644 index 0000000000..f1536c309b --- /dev/null +++ b/lib/services/serviceFabric/lib/models/pagedApplicationResourceDescriptionList.js @@ -0,0 +1,75 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * The list of application resources. The list is paged when all of the results + * cannot fit in a single message. The next set of results can be obtained by + * executing the same query with the continuation token provided in this list. + * + */ +class PagedApplicationResourceDescriptionList { + /** + * Create a PagedApplicationResourceDescriptionList. + * @property {string} [continuationToken] The continuation token parameter is + * used to obtain next set of results. The continuation token is included in + * the response of the API when the results from the system do not fit in a + * single response. When this value is passed to the next API call, the API + * returns next set of results. If there are no further results, then the + * continuation token is not included in the response. + * @property {array} [items] One page of the list. + */ + constructor() { + } + + /** + * Defines the metadata of PagedApplicationResourceDescriptionList + * + * @returns {object} metadata of PagedApplicationResourceDescriptionList + * + */ + mapper() { + return { + required: false, + serializedName: 'PagedApplicationResourceDescriptionList', + type: { + name: 'Composite', + className: 'PagedApplicationResourceDescriptionList', + modelProperties: { + continuationToken: { + required: false, + serializedName: 'ContinuationToken', + type: { + name: 'String' + } + }, + items: { + required: false, + serializedName: 'Items', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ApplicationResourceDescriptionElementType', + type: { + name: 'Composite', + className: 'ApplicationResourceDescription' + } + } + } + } + } + } + }; + } +} + +module.exports = PagedApplicationResourceDescriptionList; diff --git a/lib/services/serviceFabric/lib/models/pagedGatewayResourceDescriptionList.js b/lib/services/serviceFabric/lib/models/pagedGatewayResourceDescriptionList.js new file mode 100644 index 0000000000..68bfb45e02 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/pagedGatewayResourceDescriptionList.js @@ -0,0 +1,75 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * The list of gateway resources. The list is paged when all of the results + * cannot fit in a single message. The next set of results can be obtained by + * executing the same query with the continuation token provided in this list. + * + */ +class PagedGatewayResourceDescriptionList { + /** + * Create a PagedGatewayResourceDescriptionList. + * @property {string} [continuationToken] The continuation token parameter is + * used to obtain next set of results. The continuation token is included in + * the response of the API when the results from the system do not fit in a + * single response. When this value is passed to the next API call, the API + * returns next set of results. If there are no further results, then the + * continuation token is not included in the response. + * @property {array} [items] One page of the list. + */ + constructor() { + } + + /** + * Defines the metadata of PagedGatewayResourceDescriptionList + * + * @returns {object} metadata of PagedGatewayResourceDescriptionList + * + */ + mapper() { + return { + required: false, + serializedName: 'PagedGatewayResourceDescriptionList', + type: { + name: 'Composite', + className: 'PagedGatewayResourceDescriptionList', + modelProperties: { + continuationToken: { + required: false, + serializedName: 'ContinuationToken', + type: { + name: 'String' + } + }, + items: { + required: false, + serializedName: 'Items', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'GatewayResourceDescriptionElementType', + type: { + name: 'Composite', + className: 'GatewayResourceDescription' + } + } + } + } + } + } + }; + } +} + +module.exports = PagedGatewayResourceDescriptionList; diff --git a/lib/services/serviceFabric/lib/models/pagedNetworkResourceDescriptionList.js b/lib/services/serviceFabric/lib/models/pagedNetworkResourceDescriptionList.js new file mode 100644 index 0000000000..7f56a2ab10 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/pagedNetworkResourceDescriptionList.js @@ -0,0 +1,75 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * The list of network resources. The list is paged when all of the results + * cannot fit in a single message. The next set of results can be obtained by + * executing the same query with the continuation token provided in this list. + * + */ +class PagedNetworkResourceDescriptionList { + /** + * Create a PagedNetworkResourceDescriptionList. + * @property {string} [continuationToken] The continuation token parameter is + * used to obtain next set of results. The continuation token is included in + * the response of the API when the results from the system do not fit in a + * single response. When this value is passed to the next API call, the API + * returns next set of results. If there are no further results, then the + * continuation token is not included in the response. + * @property {array} [items] One page of the list. + */ + constructor() { + } + + /** + * Defines the metadata of PagedNetworkResourceDescriptionList + * + * @returns {object} metadata of PagedNetworkResourceDescriptionList + * + */ + mapper() { + return { + required: false, + serializedName: 'PagedNetworkResourceDescriptionList', + type: { + name: 'Composite', + className: 'PagedNetworkResourceDescriptionList', + modelProperties: { + continuationToken: { + required: false, + serializedName: 'ContinuationToken', + type: { + name: 'String' + } + }, + items: { + required: false, + serializedName: 'Items', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'NetworkResourceDescriptionElementType', + type: { + name: 'Composite', + className: 'NetworkResourceDescription' + } + } + } + } + } + } + }; + } +} + +module.exports = PagedNetworkResourceDescriptionList; diff --git a/lib/services/serviceFabric/lib/models/pagedSecretResourceDescriptionList.js b/lib/services/serviceFabric/lib/models/pagedSecretResourceDescriptionList.js new file mode 100644 index 0000000000..c6f99f1d2c --- /dev/null +++ b/lib/services/serviceFabric/lib/models/pagedSecretResourceDescriptionList.js @@ -0,0 +1,75 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * The list of secret resources. The list is paged when all of the results + * cannot fit in a single message. The next set of results can be obtained by + * executing the same query with the continuation token provided in this list. + * + */ +class PagedSecretResourceDescriptionList { + /** + * Create a PagedSecretResourceDescriptionList. + * @property {string} [continuationToken] The continuation token parameter is + * used to obtain next set of results. The continuation token is included in + * the response of the API when the results from the system do not fit in a + * single response. When this value is passed to the next API call, the API + * returns next set of results. If there are no further results, then the + * continuation token is not included in the response. + * @property {array} [items] One page of the list. + */ + constructor() { + } + + /** + * Defines the metadata of PagedSecretResourceDescriptionList + * + * @returns {object} metadata of PagedSecretResourceDescriptionList + * + */ + mapper() { + return { + required: false, + serializedName: 'PagedSecretResourceDescriptionList', + type: { + name: 'Composite', + className: 'PagedSecretResourceDescriptionList', + modelProperties: { + continuationToken: { + required: false, + serializedName: 'ContinuationToken', + type: { + name: 'String' + } + }, + items: { + required: false, + serializedName: 'Items', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'SecretResourceDescriptionElementType', + type: { + name: 'Composite', + className: 'SecretResourceDescription' + } + } + } + } + } + } + }; + } +} + +module.exports = PagedSecretResourceDescriptionList; diff --git a/lib/services/serviceFabric/lib/models/pagedSecretValueResourceDescriptionList.js b/lib/services/serviceFabric/lib/models/pagedSecretValueResourceDescriptionList.js new file mode 100644 index 0000000000..ddb028ed61 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/pagedSecretValueResourceDescriptionList.js @@ -0,0 +1,76 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * The list of values of a secret resource, paged if the number of results + * exceeds the limits of a single message. The next set of results can be + * obtained by executing the same query with the continuation token provided in + * the previous page. + * + */ +class PagedSecretValueResourceDescriptionList { + /** + * Create a PagedSecretValueResourceDescriptionList. + * @property {string} [continuationToken] The continuation token parameter is + * used to obtain next set of results. The continuation token is included in + * the response of the API when the results from the system do not fit in a + * single response. When this value is passed to the next API call, the API + * returns next set of results. If there are no further results, then the + * continuation token is not included in the response. + * @property {array} [items] One page of the list. + */ + constructor() { + } + + /** + * Defines the metadata of PagedSecretValueResourceDescriptionList + * + * @returns {object} metadata of PagedSecretValueResourceDescriptionList + * + */ + mapper() { + return { + required: false, + serializedName: 'PagedSecretValueResourceDescriptionList', + type: { + name: 'Composite', + className: 'PagedSecretValueResourceDescriptionList', + modelProperties: { + continuationToken: { + required: false, + serializedName: 'ContinuationToken', + type: { + name: 'String' + } + }, + items: { + required: false, + serializedName: 'Items', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'SecretValueResourceDescriptionElementType', + type: { + name: 'Composite', + className: 'SecretValueResourceDescription' + } + } + } + } + } + } + }; + } +} + +module.exports = PagedSecretValueResourceDescriptionList; diff --git a/lib/services/serviceFabric/lib/models/pagedServiceReplicaDescriptionList.js b/lib/services/serviceFabric/lib/models/pagedServiceReplicaDescriptionList.js new file mode 100644 index 0000000000..ce7c1ecdd2 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/pagedServiceReplicaDescriptionList.js @@ -0,0 +1,76 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * The list of service resource replicas in the cluster. The list is paged when + * all of the results cannot fit in a single message. The next set of results + * can be obtained by executing the same query with the continuation token + * provided in this list. + * + */ +class PagedServiceReplicaDescriptionList { + /** + * Create a PagedServiceReplicaDescriptionList. + * @property {string} [continuationToken] The continuation token parameter is + * used to obtain next set of results. The continuation token is included in + * the response of the API when the results from the system do not fit in a + * single response. When this value is passed to the next API call, the API + * returns next set of results. If there are no further results, then the + * continuation token is not included in the response. + * @property {array} [items] List of service resource replica description. + */ + constructor() { + } + + /** + * Defines the metadata of PagedServiceReplicaDescriptionList + * + * @returns {object} metadata of PagedServiceReplicaDescriptionList + * + */ + mapper() { + return { + required: false, + serializedName: 'PagedServiceReplicaDescriptionList', + type: { + name: 'Composite', + className: 'PagedServiceReplicaDescriptionList', + modelProperties: { + continuationToken: { + required: false, + serializedName: 'ContinuationToken', + type: { + name: 'String' + } + }, + items: { + required: false, + serializedName: 'Items', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ServiceReplicaDescriptionElementType', + type: { + name: 'Composite', + className: 'ServiceReplicaDescription' + } + } + } + } + } + } + }; + } +} + +module.exports = PagedServiceReplicaDescriptionList; diff --git a/lib/services/serviceFabric/lib/models/pagedServiceResourceDescriptionList.js b/lib/services/serviceFabric/lib/models/pagedServiceResourceDescriptionList.js index 9b2c25d001..8022a04dac 100644 --- a/lib/services/serviceFabric/lib/models/pagedServiceResourceDescriptionList.js +++ b/lib/services/serviceFabric/lib/models/pagedServiceResourceDescriptionList.js @@ -11,10 +11,9 @@ 'use strict'; /** - * The list of service resources in the cluster. The list is paged when all of - * the results cannot fit in a single message. The next set of results can be - * obtained by executing the same query with the continuation token provided in - * this list. + * The list of service resources. The list is paged when all of the results + * cannot fit in a single message. The next set of results can be obtained by + * executing the same query with the continuation token provided in this list. * */ class PagedServiceResourceDescriptionList { @@ -26,7 +25,7 @@ class PagedServiceResourceDescriptionList { * single response. When this value is passed to the next API call, the API * returns next set of results. If there are no further results, then the * continuation token is not included in the response. - * @property {array} [items] List of service resource description. + * @property {array} [items] One page of the list. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/pagedVolumeResourceDescriptionList.js b/lib/services/serviceFabric/lib/models/pagedVolumeResourceDescriptionList.js new file mode 100644 index 0000000000..86e40556a0 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/pagedVolumeResourceDescriptionList.js @@ -0,0 +1,75 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * The list of volume resources. The list is paged when all of the results + * cannot fit in a single message. The next set of results can be obtained by + * executing the same query with the continuation token provided in this list. + * + */ +class PagedVolumeResourceDescriptionList { + /** + * Create a PagedVolumeResourceDescriptionList. + * @property {string} [continuationToken] The continuation token parameter is + * used to obtain next set of results. The continuation token is included in + * the response of the API when the results from the system do not fit in a + * single response. When this value is passed to the next API call, the API + * returns next set of results. If there are no further results, then the + * continuation token is not included in the response. + * @property {array} [items] One page of the list. + */ + constructor() { + } + + /** + * Defines the metadata of PagedVolumeResourceDescriptionList + * + * @returns {object} metadata of PagedVolumeResourceDescriptionList + * + */ + mapper() { + return { + required: false, + serializedName: 'PagedVolumeResourceDescriptionList', + type: { + name: 'Composite', + className: 'PagedVolumeResourceDescriptionList', + modelProperties: { + continuationToken: { + required: false, + serializedName: 'ContinuationToken', + type: { + name: 'String' + } + }, + items: { + required: false, + serializedName: 'Items', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'VolumeResourceDescriptionElementType', + type: { + name: 'Composite', + className: 'VolumeResourceDescription' + } + } + } + } + } + } + }; + } +} + +module.exports = PagedVolumeResourceDescriptionList; diff --git a/lib/services/serviceFabric/lib/models/partitionAnalysisEvent.js b/lib/services/serviceFabric/lib/models/partitionAnalysisEvent.js index 9f7a2a97cd..f80fee242d 100644 --- a/lib/services/serviceFabric/lib/models/partitionAnalysisEvent.js +++ b/lib/services/serviceFabric/lib/models/partitionAnalysisEvent.js @@ -54,6 +54,13 @@ class PartitionAnalysisEvent extends models['PartitionEvent'] { name: 'String' } }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, timeStamp: { required: true, serializedName: 'TimeStamp', diff --git a/lib/services/serviceFabric/lib/models/partitionBackupConfigurationInfo.js b/lib/services/serviceFabric/lib/models/partitionBackupConfigurationInfo.js index 44c4ae6bc9..3ed836ee95 100644 --- a/lib/services/serviceFabric/lib/models/partitionBackupConfigurationInfo.js +++ b/lib/services/serviceFabric/lib/models/partitionBackupConfigurationInfo.js @@ -23,11 +23,8 @@ class PartitionBackupConfigurationInfo extends models['BackupConfigurationInfo'] * Create a PartitionBackupConfigurationInfo. * @property {string} [serviceName] The full name of the service with * 'fabric:' URI scheme. - * @property {uuid} [partitionId] An internal ID used by Service Fabric to - * uniquely identify a partition. This is a randomly generated GUID when the - * service was created. The partition ID is unique and does not change for - * the lifetime of the service. If the same service was deleted and recreated - * the IDs of its partitions would be different. + * @property {uuid} [partitionId] The partition ID indentifying the + * partition. */ constructor() { super(); diff --git a/lib/services/serviceFabric/lib/models/partitionBackupEntity.js b/lib/services/serviceFabric/lib/models/partitionBackupEntity.js index 561c85795d..2337b97bfe 100644 --- a/lib/services/serviceFabric/lib/models/partitionBackupEntity.js +++ b/lib/services/serviceFabric/lib/models/partitionBackupEntity.js @@ -22,11 +22,8 @@ class PartitionBackupEntity extends models['BackupEntity'] { * Create a PartitionBackupEntity. * @property {string} [serviceName] The full name of the service with * 'fabric:' URI scheme. - * @property {uuid} [partitionId] An internal ID used by Service Fabric to - * uniquely identify a partition. This is a randomly generated GUID when the - * service was created. The partition ID is unique and does not change for - * the lifetime of the service. If the same service was deleted and recreated - * the IDs of its partitions would be different. + * @property {uuid} [partitionId] The partition ID indentifying the + * partition. */ constructor() { super(); diff --git a/lib/services/serviceFabric/lib/models/partitionEvent.js b/lib/services/serviceFabric/lib/models/partitionEvent.js index c283dabd03..ecf1405ddd 100644 --- a/lib/services/serviceFabric/lib/models/partitionEvent.js +++ b/lib/services/serviceFabric/lib/models/partitionEvent.js @@ -56,6 +56,13 @@ class PartitionEvent extends models['FabricEvent'] { name: 'String' } }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, timeStamp: { required: true, serializedName: 'TimeStamp', diff --git a/lib/services/serviceFabric/lib/models/partitionHealthReportExpiredEvent.js b/lib/services/serviceFabric/lib/models/partitionHealthReportExpiredEvent.js index 9ff45da636..9f1a2da691 100644 --- a/lib/services/serviceFabric/lib/models/partitionHealthReportExpiredEvent.js +++ b/lib/services/serviceFabric/lib/models/partitionHealthReportExpiredEvent.js @@ -60,6 +60,13 @@ class PartitionHealthReportExpiredEvent extends models['PartitionEvent'] { name: 'String' } }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, timeStamp: { required: true, serializedName: 'TimeStamp', diff --git a/lib/services/serviceFabric/lib/models/partitionNewHealthReportEvent.js b/lib/services/serviceFabric/lib/models/partitionNewHealthReportEvent.js new file mode 100644 index 0000000000..4dd7f972b8 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/partitionNewHealthReportEvent.js @@ -0,0 +1,161 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Partition Health Report Created event. + * + * @extends models['PartitionEvent'] + */ +class PartitionNewHealthReportEvent extends models['PartitionEvent'] { + /** + * Create a PartitionNewHealthReportEvent. + * @property {string} sourceId Id of report source. + * @property {string} property Describes the property. + * @property {string} healthState Describes the property health state. + * @property {number} timeToLiveMs Time to live in milli-seconds. + * @property {number} sequenceNumber Sequence number of report. + * @property {string} description Description of report. + * @property {boolean} removeWhenExpired Indicates the removal when it + * expires. + * @property {date} sourceUtcTimestamp Source time. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of PartitionNewHealthReportEvent + * + * @returns {object} metadata of PartitionNewHealthReportEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'PartitionNewHealthReport', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'PartitionNewHealthReportEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + partitionId: { + required: true, + serializedName: 'PartitionId', + type: { + name: 'String' + } + }, + sourceId: { + required: true, + serializedName: 'SourceId', + type: { + name: 'String' + } + }, + property: { + required: true, + serializedName: 'Property', + type: { + name: 'String' + } + }, + healthState: { + required: true, + serializedName: 'HealthState', + type: { + name: 'String' + } + }, + timeToLiveMs: { + required: true, + serializedName: 'TimeToLiveMs', + type: { + name: 'Number' + } + }, + sequenceNumber: { + required: true, + serializedName: 'SequenceNumber', + type: { + name: 'Number' + } + }, + description: { + required: true, + serializedName: 'Description', + type: { + name: 'String' + } + }, + removeWhenExpired: { + required: true, + serializedName: 'RemoveWhenExpired', + type: { + name: 'Boolean' + } + }, + sourceUtcTimestamp: { + required: true, + serializedName: 'SourceUtcTimestamp', + type: { + name: 'DateTime' + } + } + } + } + }; + } +} + +module.exports = PartitionNewHealthReportEvent; diff --git a/lib/services/serviceFabric/lib/models/partitionPrimaryMoveAnalysisEvent.js b/lib/services/serviceFabric/lib/models/partitionPrimaryMoveAnalysisEvent.js index 33eba04456..082e98481f 100644 --- a/lib/services/serviceFabric/lib/models/partitionPrimaryMoveAnalysisEvent.js +++ b/lib/services/serviceFabric/lib/models/partitionPrimaryMoveAnalysisEvent.js @@ -56,6 +56,13 @@ class PartitionPrimaryMoveAnalysisEvent extends models['PartitionAnalysisEvent'] name: 'String' } }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, timeStamp: { required: true, serializedName: 'TimeStamp', diff --git a/lib/services/serviceFabric/lib/models/partitionReconfiguredEvent.js b/lib/services/serviceFabric/lib/models/partitionReconfiguredEvent.js new file mode 100644 index 0000000000..0033345b73 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/partitionReconfiguredEvent.js @@ -0,0 +1,200 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Partition Reconfiguration event. + * + * @extends models['PartitionEvent'] + */ +class PartitionReconfiguredEvent extends models['PartitionEvent'] { + /** + * Create a PartitionReconfiguredEvent. + * @property {string} nodeName The name of a Service Fabric node. + * @property {string} nodeInstanceId Id of Node instance. + * @property {string} serviceType Type of Service. + * @property {number} ccEpochDataLossVersion CcEpochDataLoss version. + * @property {number} ccEpochConfigVersion CcEpochConfig version. + * @property {string} reconfigType Type of reconfiguration. + * @property {string} result Describes reconfiguration result. + * @property {number} phase0DurationMs Duration of Phase0 in milli-seconds. + * @property {number} phase1DurationMs Duration of Phase1 in milli-seconds. + * @property {number} phase2DurationMs Duration of Phase2 in milli-seconds. + * @property {number} phase3DurationMs Duration of Phase3 in milli-seconds. + * @property {number} phase4DurationMs Duration of Phase4 in milli-seconds. + * @property {number} totalDurationMs Total duration in milli-seconds. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of PartitionReconfiguredEvent + * + * @returns {object} metadata of PartitionReconfiguredEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'PartitionReconfigured', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'PartitionReconfiguredEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + partitionId: { + required: true, + serializedName: 'PartitionId', + type: { + name: 'String' + } + }, + nodeName: { + required: true, + serializedName: 'NodeName', + type: { + name: 'String' + } + }, + nodeInstanceId: { + required: true, + serializedName: 'NodeInstanceId', + type: { + name: 'String' + } + }, + serviceType: { + required: true, + serializedName: 'ServiceType', + type: { + name: 'String' + } + }, + ccEpochDataLossVersion: { + required: true, + serializedName: 'CcEpochDataLossVersion', + type: { + name: 'Number' + } + }, + ccEpochConfigVersion: { + required: true, + serializedName: 'CcEpochConfigVersion', + type: { + name: 'Number' + } + }, + reconfigType: { + required: true, + serializedName: 'ReconfigType', + type: { + name: 'String' + } + }, + result: { + required: true, + serializedName: 'Result', + type: { + name: 'String' + } + }, + phase0DurationMs: { + required: true, + serializedName: 'Phase0DurationMs', + type: { + name: 'Number' + } + }, + phase1DurationMs: { + required: true, + serializedName: 'Phase1DurationMs', + type: { + name: 'Number' + } + }, + phase2DurationMs: { + required: true, + serializedName: 'Phase2DurationMs', + type: { + name: 'Number' + } + }, + phase3DurationMs: { + required: true, + serializedName: 'Phase3DurationMs', + type: { + name: 'Number' + } + }, + phase4DurationMs: { + required: true, + serializedName: 'Phase4DurationMs', + type: { + name: 'Number' + } + }, + totalDurationMs: { + required: true, + serializedName: 'TotalDurationMs', + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = PartitionReconfiguredEvent; diff --git a/lib/services/serviceFabric/lib/models/reliableCollectionsRef.js b/lib/services/serviceFabric/lib/models/reliableCollectionsRef.js new file mode 100644 index 0000000000..97e02a46b6 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/reliableCollectionsRef.js @@ -0,0 +1,64 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Specifying this parameter adds support for reliable collections + * + */ +class ReliableCollectionsRef { + /** + * Create a ReliableCollectionsRef. + * @property {string} name Name of ReliableCollection resource. Right now + * it's not used and you can use any string. + * @property {boolean} [doNotPersistState] False (the default) if + * ReliableCollections state is persisted to disk as usual. True if you do + * not want to persist state, in which case replication is still enabled and + * you can use ReliableCollections as distributed cache. + */ + constructor() { + } + + /** + * Defines the metadata of ReliableCollectionsRef + * + * @returns {object} metadata of ReliableCollectionsRef + * + */ + mapper() { + return { + required: false, + serializedName: 'ReliableCollectionsRef', + type: { + name: 'Composite', + className: 'ReliableCollectionsRef', + modelProperties: { + name: { + required: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + doNotPersistState: { + required: false, + serializedName: 'doNotPersistState', + type: { + name: 'Boolean' + } + } + } + } + }; + } +} + +module.exports = ReliableCollectionsRef; diff --git a/lib/services/serviceFabric/lib/models/replicaEvent.js b/lib/services/serviceFabric/lib/models/replicaEvent.js index cd8ac6b5b3..26f6e042b9 100644 --- a/lib/services/serviceFabric/lib/models/replicaEvent.js +++ b/lib/services/serviceFabric/lib/models/replicaEvent.js @@ -63,6 +63,13 @@ class ReplicaEvent extends models['FabricEvent'] { name: 'String' } }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, timeStamp: { required: true, serializedName: 'TimeStamp', diff --git a/lib/services/serviceFabric/lib/models/restoreProgressInfo.js b/lib/services/serviceFabric/lib/models/restoreProgressInfo.js index 450d617ce7..f8e82cbda3 100644 --- a/lib/services/serviceFabric/lib/models/restoreProgressInfo.js +++ b/lib/services/serviceFabric/lib/models/restoreProgressInfo.js @@ -24,11 +24,11 @@ class RestoreProgressInfo { * failed. * @property {object} [restoredEpoch] Describes the epoch at which the * partition is restored. - * @property {string} [restoredEpoch.configurationNumber] The current + * @property {string} [restoredEpoch.configurationVersion] The current * configuration number of this Epoch. The configuration number is an * increasing value that is updated whenever the configuration of this * replica set changes. - * @property {string} [restoredEpoch.dataLossNumber] The current dataloss + * @property {string} [restoredEpoch.dataLossVersion] The current dataloss * number of this Epoch. The data loss number property is an increasing value * which is updated whenever data loss is suspected, as when loss of a quorum * of replicas in the replica set that includes the Primary replica. @@ -85,6 +85,7 @@ class RestoreProgressInfo { * - "FABRIC_E_BACKUP_NOT_ENABLED" * - "FABRIC_E_BACKUP_POLICY_NOT_EXISTING" * - "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING" + * - "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR" * * - Possible values of the error code for HTTP status code 409 (Conflict) * - "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS" @@ -196,7 +197,7 @@ class RestoreProgressInfo { * 'FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS', * 'FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND', * 'FABRIC_E_VOLUME_ALREADY_EXISTS', 'FABRIC_E_VOLUME_NOT_FOUND', - * 'SerializationError' + * 'SerializationError', 'FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR' * @property {string} [failureError.message] Error message. */ constructor() { @@ -235,7 +236,7 @@ class RestoreProgressInfo { serializedName: 'RestoredEpoch', type: { name: 'Composite', - className: 'BackupEpoch' + className: 'Epoch' } }, restoredLsn: { diff --git a/lib/services/serviceFabric/lib/models/retentionPolicyDescription.js b/lib/services/serviceFabric/lib/models/retentionPolicyDescription.js new file mode 100644 index 0000000000..48a0ba82ee --- /dev/null +++ b/lib/services/serviceFabric/lib/models/retentionPolicyDescription.js @@ -0,0 +1,58 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Describes the retention policy configured. + * + */ +class RetentionPolicyDescription { + /** + * Create a RetentionPolicyDescription. + * @property {string} retentionPolicyType Polymorphic Discriminator + */ + constructor() { + } + + /** + * Defines the metadata of RetentionPolicyDescription + * + * @returns {object} metadata of RetentionPolicyDescription + * + */ + mapper() { + return { + required: false, + serializedName: 'RetentionPolicyDescription', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'RetentionPolicyType', + clientName: 'retentionPolicyType' + }, + uberParent: 'RetentionPolicyDescription', + className: 'RetentionPolicyDescription', + modelProperties: { + retentionPolicyType: { + required: true, + serializedName: 'RetentionPolicyType', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = RetentionPolicyDescription; diff --git a/lib/services/serviceFabric/lib/models/secretResourceDescription.js b/lib/services/serviceFabric/lib/models/secretResourceDescription.js new file mode 100644 index 0000000000..03af521a32 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/secretResourceDescription.js @@ -0,0 +1,77 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * This type describes a secret resource. + * + */ +class SecretResourceDescription { + /** + * Create a SecretResourceDescription. + * @property {object} properties Describes the properties of a secret + * resource. + * @property {string} [properties.description] User readable description of + * the secret. + * @property {string} [properties.status] Status of the resource. Possible + * values include: 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', + * 'Failed' + * @property {string} [properties.statusDetails] Gives additional information + * about the current status of the secret. + * @property {string} [properties.contentType] The type of the content stored + * in the secret value. The value of this property is opaque to Service + * Fabric. Once set, the value of this property cannot be changed. + * @property {string} name Name of the Secret resource. + */ + constructor() { + } + + /** + * Defines the metadata of SecretResourceDescription + * + * @returns {object} metadata of SecretResourceDescription + * + */ + mapper() { + return { + required: false, + serializedName: 'SecretResourceDescription', + type: { + name: 'Composite', + className: 'SecretResourceDescription', + modelProperties: { + properties: { + required: true, + serializedName: 'properties', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'kind', + clientName: 'kind' + }, + uberParent: 'SecretResourcePropertiesBase', + className: 'SecretResourceProperties' + } + }, + name: { + required: true, + serializedName: 'name', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = SecretResourceDescription; diff --git a/lib/services/serviceFabric/lib/models/secretResourceProperties.js b/lib/services/serviceFabric/lib/models/secretResourceProperties.js new file mode 100644 index 0000000000..89b278df6c --- /dev/null +++ b/lib/services/serviceFabric/lib/models/secretResourceProperties.js @@ -0,0 +1,99 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Describes the properties of a secret resource. + * + * @extends models['SecretResourcePropertiesBase'] + */ +class SecretResourceProperties extends models['SecretResourcePropertiesBase'] { + /** + * Create a SecretResourceProperties. + * @property {string} [description] User readable description of the secret. + * @property {string} [status] Status of the resource. Possible values + * include: 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + * @property {string} [statusDetails] Gives additional information about the + * current status of the secret. + * @property {string} [contentType] The type of the content stored in the + * secret value. The value of this property is opaque to Service Fabric. Once + * set, the value of this property cannot be changed. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of SecretResourceProperties + * + * @returns {object} metadata of SecretResourceProperties + * + */ + mapper() { + return { + required: false, + serializedName: 'SecretResourceProperties', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'kind', + clientName: 'kind' + }, + uberParent: 'SecretResourcePropertiesBase', + className: 'SecretResourceProperties', + modelProperties: { + kind: { + required: true, + serializedName: 'kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + description: { + required: false, + serializedName: 'description', + type: { + name: 'String' + } + }, + status: { + required: false, + readOnly: true, + serializedName: 'status', + type: { + name: 'String' + } + }, + statusDetails: { + required: false, + readOnly: true, + serializedName: 'statusDetails', + type: { + name: 'String' + } + }, + contentType: { + required: false, + serializedName: 'contentType', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = SecretResourceProperties; diff --git a/lib/services/serviceFabric/lib/models/secretResourcePropertiesBase.js b/lib/services/serviceFabric/lib/models/secretResourcePropertiesBase.js new file mode 100644 index 0000000000..e43c96d2e3 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/secretResourcePropertiesBase.js @@ -0,0 +1,58 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * This type describes the properties of a secret resource, including its kind. + * + */ +class SecretResourcePropertiesBase { + /** + * Create a SecretResourcePropertiesBase. + * @property {string} kind Polymorphic Discriminator + */ + constructor() { + } + + /** + * Defines the metadata of SecretResourcePropertiesBase + * + * @returns {object} metadata of SecretResourcePropertiesBase + * + */ + mapper() { + return { + required: false, + serializedName: 'SecretResourcePropertiesBase', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'kind', + clientName: 'kind' + }, + uberParent: 'SecretResourcePropertiesBase', + className: 'SecretResourcePropertiesBase', + modelProperties: { + kind: { + required: true, + serializedName: 'kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = SecretResourcePropertiesBase; diff --git a/lib/services/serviceFabric/lib/models/secretValue.js b/lib/services/serviceFabric/lib/models/secretValue.js new file mode 100644 index 0000000000..138f8d666a --- /dev/null +++ b/lib/services/serviceFabric/lib/models/secretValue.js @@ -0,0 +1,52 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * This type represents the unencrypted value of the secret. + * + */ +class SecretValue { + /** + * Create a SecretValue. + * @property {string} [value] The actual value of the secret. + */ + constructor() { + } + + /** + * Defines the metadata of SecretValue + * + * @returns {object} metadata of SecretValue + * + */ + mapper() { + return { + required: false, + serializedName: 'SecretValue', + type: { + name: 'Composite', + className: 'SecretValue', + modelProperties: { + value: { + required: false, + serializedName: 'value', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = SecretValue; diff --git a/lib/services/serviceFabric/lib/models/secretValueProperties.js b/lib/services/serviceFabric/lib/models/secretValueProperties.js new file mode 100644 index 0000000000..f08b656c4c --- /dev/null +++ b/lib/services/serviceFabric/lib/models/secretValueProperties.js @@ -0,0 +1,52 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * This type describes properties of secret value resource. + * + */ +class SecretValueProperties { + /** + * Create a SecretValueProperties. + * @property {string} [value] The actual value of the secret. + */ + constructor() { + } + + /** + * Defines the metadata of SecretValueProperties + * + * @returns {object} metadata of SecretValueProperties + * + */ + mapper() { + return { + required: false, + serializedName: 'SecretValueProperties', + type: { + name: 'Composite', + className: 'SecretValueProperties', + modelProperties: { + value: { + required: false, + serializedName: 'value', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = SecretValueProperties; diff --git a/lib/services/serviceFabric/lib/models/secretValueResourceDescription.js b/lib/services/serviceFabric/lib/models/secretValueResourceDescription.js new file mode 100644 index 0000000000..f817d2dc81 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/secretValueResourceDescription.js @@ -0,0 +1,61 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * This type describes a value of a secret resource. The name of this resource + * is the version identifier corresponding to this secret value. + * + */ +class SecretValueResourceDescription { + /** + * Create a SecretValueResourceDescription. + * @property {string} name Version identifier of the secret value. + * @property {string} [value] The actual value of the secret. + */ + constructor() { + } + + /** + * Defines the metadata of SecretValueResourceDescription + * + * @returns {object} metadata of SecretValueResourceDescription + * + */ + mapper() { + return { + required: false, + serializedName: 'SecretValueResourceDescription', + type: { + name: 'Composite', + className: 'SecretValueResourceDescription', + modelProperties: { + name: { + required: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + value: { + required: false, + serializedName: 'properties.value', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = SecretValueResourceDescription; diff --git a/lib/services/serviceFabric/lib/models/serviceCreatedEvent.js b/lib/services/serviceFabric/lib/models/serviceCreatedEvent.js index 10f265a1f7..2c3fc48211 100644 --- a/lib/services/serviceFabric/lib/models/serviceCreatedEvent.js +++ b/lib/services/serviceFabric/lib/models/serviceCreatedEvent.js @@ -65,6 +65,13 @@ class ServiceCreatedEvent extends models['ServiceEvent'] { name: 'String' } }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, timeStamp: { required: true, serializedName: 'TimeStamp', diff --git a/lib/services/serviceFabric/lib/models/serviceDeletedEvent.js b/lib/services/serviceFabric/lib/models/serviceDeletedEvent.js index 80d8e5994a..a9915a5110 100644 --- a/lib/services/serviceFabric/lib/models/serviceDeletedEvent.js +++ b/lib/services/serviceFabric/lib/models/serviceDeletedEvent.js @@ -60,6 +60,13 @@ class ServiceDeletedEvent extends models['ServiceEvent'] { name: 'String' } }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, timeStamp: { required: true, serializedName: 'TimeStamp', diff --git a/lib/services/serviceFabric/lib/models/serviceEvent.js b/lib/services/serviceFabric/lib/models/serviceEvent.js index 9bfeca0fc0..e86ab0b436 100644 --- a/lib/services/serviceFabric/lib/models/serviceEvent.js +++ b/lib/services/serviceFabric/lib/models/serviceEvent.js @@ -58,6 +58,13 @@ class ServiceEvent extends models['FabricEvent'] { name: 'String' } }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, timeStamp: { required: true, serializedName: 'TimeStamp', diff --git a/lib/services/serviceFabric/lib/models/serviceHealthReportExpiredEvent.js b/lib/services/serviceFabric/lib/models/serviceHealthReportExpiredEvent.js index 06708dc26d..2d0378b94e 100644 --- a/lib/services/serviceFabric/lib/models/serviceHealthReportExpiredEvent.js +++ b/lib/services/serviceFabric/lib/models/serviceHealthReportExpiredEvent.js @@ -61,6 +61,13 @@ class ServiceHealthReportExpiredEvent extends models['ServiceEvent'] { name: 'String' } }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, timeStamp: { required: true, serializedName: 'TimeStamp', diff --git a/lib/services/serviceFabric/lib/models/serviceNewHealthReportEvent.js b/lib/services/serviceFabric/lib/models/serviceNewHealthReportEvent.js new file mode 100644 index 0000000000..606637fc1e --- /dev/null +++ b/lib/services/serviceFabric/lib/models/serviceNewHealthReportEvent.js @@ -0,0 +1,169 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Service Health Report Created event. + * + * @extends models['ServiceEvent'] + */ +class ServiceNewHealthReportEvent extends models['ServiceEvent'] { + /** + * Create a ServiceNewHealthReportEvent. + * @property {number} instanceId Id of Service instance. + * @property {string} sourceId Id of report source. + * @property {string} property Describes the property. + * @property {string} healthState Describes the property health state. + * @property {number} timeToLiveMs Time to live in milli-seconds. + * @property {number} sequenceNumber Sequence number of report. + * @property {string} description Description of report. + * @property {boolean} removeWhenExpired Indicates the removal when it + * expires. + * @property {date} sourceUtcTimestamp Source time. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ServiceNewHealthReportEvent + * + * @returns {object} metadata of ServiceNewHealthReportEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ServiceNewHealthReport', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ServiceNewHealthReportEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + serviceId: { + required: true, + serializedName: 'ServiceId', + type: { + name: 'String' + } + }, + instanceId: { + required: true, + serializedName: 'InstanceId', + type: { + name: 'Number' + } + }, + sourceId: { + required: true, + serializedName: 'SourceId', + type: { + name: 'String' + } + }, + property: { + required: true, + serializedName: 'Property', + type: { + name: 'String' + } + }, + healthState: { + required: true, + serializedName: 'HealthState', + type: { + name: 'String' + } + }, + timeToLiveMs: { + required: true, + serializedName: 'TimeToLiveMs', + type: { + name: 'Number' + } + }, + sequenceNumber: { + required: true, + serializedName: 'SequenceNumber', + type: { + name: 'Number' + } + }, + description: { + required: true, + serializedName: 'Description', + type: { + name: 'String' + } + }, + removeWhenExpired: { + required: true, + serializedName: 'RemoveWhenExpired', + type: { + name: 'Boolean' + } + }, + sourceUtcTimestamp: { + required: true, + serializedName: 'SourceUtcTimestamp', + type: { + name: 'DateTime' + } + } + } + } + }; + } +} + +module.exports = ServiceNewHealthReportEvent; diff --git a/lib/services/serviceFabric/lib/models/serviceProperties.js b/lib/services/serviceFabric/lib/models/serviceProperties.js new file mode 100644 index 0000000000..59391264b7 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/serviceProperties.js @@ -0,0 +1,119 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Describes properties of a service resource. + * + */ +class ServiceProperties { + /** + * Create a ServiceProperties. + * @property {string} [description] User readable description of the service. + * @property {number} [replicaCount] The number of replicas of the service to + * create. Defaults to 1 if not specified. + * @property {array} [autoScalingPolicies] Auto scaling policies + * @property {string} [status] Status of the service. Possible values + * include: 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + * @property {string} [statusDetails] Gives additional information about the + * current status of the service. + * @property {string} [healthState] Describes the health state of an + * application resource. Possible values include: 'Invalid', 'Ok', 'Warning', + * 'Error', 'Unknown' + * @property {string} [unhealthyEvaluation] When the service's health state + * is not 'Ok', this additional details from service fabric Health Manager + * for the user to know why the service is marked unhealthy. + */ + constructor() { + } + + /** + * Defines the metadata of ServiceProperties + * + * @returns {object} metadata of ServiceProperties + * + */ + mapper() { + return { + required: false, + serializedName: 'ServiceProperties', + type: { + name: 'Composite', + className: 'ServiceProperties', + modelProperties: { + description: { + required: false, + serializedName: 'description', + type: { + name: 'String' + } + }, + replicaCount: { + required: false, + serializedName: 'replicaCount', + type: { + name: 'Number' + } + }, + autoScalingPolicies: { + required: false, + serializedName: 'autoScalingPolicies', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'AutoScalingPolicyElementType', + type: { + name: 'Composite', + className: 'AutoScalingPolicy' + } + } + } + }, + status: { + required: false, + readOnly: true, + serializedName: 'status', + type: { + name: 'String' + } + }, + statusDetails: { + required: false, + readOnly: true, + serializedName: 'statusDetails', + type: { + name: 'String' + } + }, + healthState: { + required: false, + readOnly: true, + serializedName: 'healthState', + type: { + name: 'String' + } + }, + unhealthyEvaluation: { + required: false, + readOnly: true, + serializedName: 'unhealthyEvaluation', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ServiceProperties; diff --git a/lib/services/serviceFabric/lib/models/serviceReplicaDescription.js b/lib/services/serviceFabric/lib/models/serviceReplicaDescription.js new file mode 100644 index 0000000000..1e290d3133 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/serviceReplicaDescription.js @@ -0,0 +1,101 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Describes a replica of a service resource. + * + * @extends models['ServiceReplicaProperties'] + */ +class ServiceReplicaDescription extends models['ServiceReplicaProperties'] { + /** + * Create a ServiceReplicaDescription. + * @property {string} replicaName Name of the replica. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ServiceReplicaDescription + * + * @returns {object} metadata of ServiceReplicaDescription + * + */ + mapper() { + return { + required: false, + serializedName: 'ServiceReplicaDescription', + type: { + name: 'Composite', + className: 'ServiceReplicaDescription', + modelProperties: { + osType: { + required: true, + serializedName: 'osType', + type: { + name: 'String' + } + }, + codePackages: { + required: true, + serializedName: 'codePackages', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ContainerCodePackagePropertiesElementType', + type: { + name: 'Composite', + className: 'ContainerCodePackageProperties' + } + } + } + }, + networkRefs: { + required: false, + serializedName: 'networkRefs', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'NetworkRefElementType', + type: { + name: 'Composite', + className: 'NetworkRef' + } + } + } + }, + diagnostics: { + required: false, + serializedName: 'diagnostics', + type: { + name: 'Composite', + className: 'DiagnosticsRef' + } + }, + replicaName: { + required: true, + serializedName: 'replicaName', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ServiceReplicaDescription; diff --git a/lib/services/serviceFabric/lib/models/serviceReplicaProperties.js b/lib/services/serviceFabric/lib/models/serviceReplicaProperties.js index 579ac5aed5..42ca2e3ec5 100644 --- a/lib/services/serviceFabric/lib/models/serviceReplicaProperties.js +++ b/lib/services/serviceFabric/lib/models/serviceReplicaProperties.js @@ -17,8 +17,8 @@ class ServiceReplicaProperties { /** * Create a ServiceReplicaProperties. - * @property {string} osType The Operating system type required by the code - * in service. Possible values include: 'Linux', 'Windows' + * @property {string} osType The operation system required by the code in + * service. Possible values include: 'Linux', 'Windows' * @property {array} codePackages Describes the set of code packages that * forms the service. A code package describes the container and the * properties for running it. All the code packages are started together on diff --git a/lib/services/serviceFabric/lib/models/serviceResourceDescription.js b/lib/services/serviceFabric/lib/models/serviceResourceDescription.js index 663779956c..907578d280 100644 --- a/lib/services/serviceFabric/lib/models/serviceResourceDescription.js +++ b/lib/services/serviceFabric/lib/models/serviceResourceDescription.js @@ -11,14 +11,15 @@ 'use strict'; /** - * Describes a service fabric service resource. + * This type describes a service resource. * */ class ServiceResourceDescription { /** * Create a ServiceResourceDescription. - * @property {string} osType The Operating system type required by the code - * in service. Possible values include: 'Linux', 'Windows' + * @property {string} name Name of the Service resource. + * @property {string} osType The operation system required by the code in + * service. Possible values include: 'Linux', 'Windows' * @property {array} codePackages Describes the set of code packages that * forms the service. A code package describes the container and the * properties for running it. All the code packages are started together on @@ -34,14 +35,17 @@ class ServiceResourceDescription { * @property {string} [description] User readable description of the service. * @property {number} [replicaCount] The number of replicas of the service to * create. Defaults to 1 if not specified. - * @property {string} [healthState] The health state of a Service Fabric - * entity such as Cluster, Node, Application, Service, Partition, Replica - * etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - * 'Unknown' - * @property {string} [status] Represents the status of the service. Possible - * values include: 'Unknown', 'Active', 'Upgrading', 'Deleting', 'Creating', - * 'Failed' - * @property {string} name Service resource name. + * @property {array} [autoScalingPolicies] Auto scaling policies + * @property {string} [status] Status of the service. Possible values + * include: 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + * @property {string} [statusDetails] Gives additional information about the + * current status of the service. + * @property {string} [healthState] Describes the health state of an + * application resource. Possible values include: 'Invalid', 'Ok', 'Warning', + * 'Error', 'Unknown' + * @property {string} [unhealthyEvaluation] When the service's health state + * is not 'Ok', this additional details from service fabric Health Manager + * for the user to know why the service is marked unhealthy. */ constructor() { } @@ -60,6 +64,13 @@ class ServiceResourceDescription { name: 'Composite', className: 'ServiceResourceDescription', modelProperties: { + name: { + required: true, + serializedName: 'name', + type: { + name: 'String' + } + }, osType: { required: true, serializedName: 'properties.osType', @@ -119,11 +130,19 @@ class ServiceResourceDescription { name: 'Number' } }, - healthState: { + autoScalingPolicies: { required: false, - serializedName: 'properties.healthState', + serializedName: 'properties.autoScalingPolicies', type: { - name: 'String' + name: 'Sequence', + element: { + required: false, + serializedName: 'AutoScalingPolicyElementType', + type: { + name: 'Composite', + className: 'AutoScalingPolicy' + } + } } }, status: { @@ -134,9 +153,26 @@ class ServiceResourceDescription { name: 'String' } }, - name: { - required: true, - serializedName: 'name', + statusDetails: { + required: false, + readOnly: true, + serializedName: 'properties.statusDetails', + type: { + name: 'String' + } + }, + healthState: { + required: false, + readOnly: true, + serializedName: 'properties.healthState', + type: { + name: 'String' + } + }, + unhealthyEvaluation: { + required: false, + readOnly: true, + serializedName: 'properties.unhealthyEvaluation', type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/serviceTypeHealthPolicy.js b/lib/services/serviceFabric/lib/models/serviceTypeHealthPolicy.js index 848f1efd06..454740ecd4 100644 --- a/lib/services/serviceFabric/lib/models/serviceTypeHealthPolicy.js +++ b/lib/services/serviceFabric/lib/models/serviceTypeHealthPolicy.js @@ -42,9 +42,9 @@ class ServiceTypeHealthPolicy { * over the total number of replicas in the partition. * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. Default value: 0 . - * @property {number} [maxPercentUnhealthyServices] The maximum maximum - * allowed percentage of unhealthy services. Allowed values are Byte values - * from zero to 100. + * @property {number} [maxPercentUnhealthyServices] The maximum allowed + * percentage of unhealthy services. Allowed values are Byte values from zero + * to 100. * * The percentage represents the maximum tolerated percentage of services * that can be unhealthy before the application is considered in error. diff --git a/lib/services/serviceFabric/lib/models/serviceTypeHealthPolicyMapItem.js b/lib/services/serviceFabric/lib/models/serviceTypeHealthPolicyMapItem.js index ac3e36e428..bea9baa454 100644 --- a/lib/services/serviceFabric/lib/models/serviceTypeHealthPolicyMapItem.js +++ b/lib/services/serviceFabric/lib/models/serviceTypeHealthPolicyMapItem.js @@ -45,9 +45,9 @@ class ServiceTypeHealthPolicyMapItem { * over the total number of replicas in the partition. * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. - * @property {number} [value.maxPercentUnhealthyServices] The maximum maximum - * allowed percentage of unhealthy services. Allowed values are Byte values - * from zero to 100. + * @property {number} [value.maxPercentUnhealthyServices] The maximum allowed + * percentage of unhealthy services. Allowed values are Byte values from zero + * to 100. * * The percentage represents the maximum tolerated percentage of services * that can be unhealthy before the application is considered in error. diff --git a/lib/services/serviceFabric/lib/models/setting.js b/lib/services/serviceFabric/lib/models/setting.js index 604ea64b4a..d03f64be5f 100644 --- a/lib/services/serviceFabric/lib/models/setting.js +++ b/lib/services/serviceFabric/lib/models/setting.js @@ -11,7 +11,9 @@ 'use strict'; /** - * Describes a setting for the container. + * Describes a setting for the container. The setting file path can be fetched + * from environment variable "Fabric_SettingPath". The path for Windows + * container is "C:\\secrets". The path for Linux container is "/var/secrets". * */ class Setting { diff --git a/lib/services/serviceFabric/lib/models/statefulReplicaHealthReportExpiredEvent.js b/lib/services/serviceFabric/lib/models/statefulReplicaHealthReportExpiredEvent.js index 086668a26c..70746a1bc5 100644 --- a/lib/services/serviceFabric/lib/models/statefulReplicaHealthReportExpiredEvent.js +++ b/lib/services/serviceFabric/lib/models/statefulReplicaHealthReportExpiredEvent.js @@ -61,6 +61,13 @@ class StatefulReplicaHealthReportExpiredEvent extends models['ReplicaEvent'] { name: 'String' } }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, timeStamp: { required: true, serializedName: 'TimeStamp', diff --git a/lib/services/serviceFabric/lib/models/statefulReplicaNewHealthReportEvent.js b/lib/services/serviceFabric/lib/models/statefulReplicaNewHealthReportEvent.js new file mode 100644 index 0000000000..4f8ea3f9fd --- /dev/null +++ b/lib/services/serviceFabric/lib/models/statefulReplicaNewHealthReportEvent.js @@ -0,0 +1,176 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Stateful Replica Health Report Created event. + * + * @extends models['ReplicaEvent'] + */ +class StatefulReplicaNewHealthReportEvent extends models['ReplicaEvent'] { + /** + * Create a StatefulReplicaNewHealthReportEvent. + * @property {number} replicaInstanceId Id of Replica instance. + * @property {string} sourceId Id of report source. + * @property {string} property Describes the property. + * @property {string} healthState Describes the property health state. + * @property {number} timeToLiveMs Time to live in milli-seconds. + * @property {number} sequenceNumber Sequence number of report. + * @property {string} description Description of report. + * @property {boolean} removeWhenExpired Indicates the removal when it + * expires. + * @property {date} sourceUtcTimestamp Source time. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of StatefulReplicaNewHealthReportEvent + * + * @returns {object} metadata of StatefulReplicaNewHealthReportEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'StatefulReplicaNewHealthReport', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'StatefulReplicaNewHealthReportEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + partitionId: { + required: true, + serializedName: 'PartitionId', + type: { + name: 'String' + } + }, + replicaId: { + required: true, + serializedName: 'ReplicaId', + type: { + name: 'Number' + } + }, + replicaInstanceId: { + required: true, + serializedName: 'ReplicaInstanceId', + type: { + name: 'Number' + } + }, + sourceId: { + required: true, + serializedName: 'SourceId', + type: { + name: 'String' + } + }, + property: { + required: true, + serializedName: 'Property', + type: { + name: 'String' + } + }, + healthState: { + required: true, + serializedName: 'HealthState', + type: { + name: 'String' + } + }, + timeToLiveMs: { + required: true, + serializedName: 'TimeToLiveMs', + type: { + name: 'Number' + } + }, + sequenceNumber: { + required: true, + serializedName: 'SequenceNumber', + type: { + name: 'Number' + } + }, + description: { + required: true, + serializedName: 'Description', + type: { + name: 'String' + } + }, + removeWhenExpired: { + required: true, + serializedName: 'RemoveWhenExpired', + type: { + name: 'Boolean' + } + }, + sourceUtcTimestamp: { + required: true, + serializedName: 'SourceUtcTimestamp', + type: { + name: 'DateTime' + } + } + } + } + }; + } +} + +module.exports = StatefulReplicaNewHealthReportEvent; diff --git a/lib/services/serviceFabric/lib/models/statefulServicePartitionInfo.js b/lib/services/serviceFabric/lib/models/statefulServicePartitionInfo.js index 05fff408fe..1a14847950 100644 --- a/lib/services/serviceFabric/lib/models/statefulServicePartitionInfo.js +++ b/lib/services/serviceFabric/lib/models/statefulServicePartitionInfo.js @@ -28,20 +28,19 @@ class StatefulServicePartitionInfo extends models['ServicePartitionInfo'] { * which this partition was in quorum loss. If the partition is currently in * quorum loss, it returns the duration since it has been in that state. This * field is using ISO8601 format for specifying the duration. - * @property {object} [currentConfigurationEpoch] An Epoch is a configuration - * number for the partition as a whole. When the configuration of the replica - * set changes, for example when the Primary replica changes, the operations - * that are replicated from the new Primary replica are said to be a new - * Epoch from the ones which were sent by the old Primary replica. - * @property {string} [currentConfigurationEpoch.configurationVersion] The - * current configuration number of this Epoch. The configuration number is an + * @property {object} [primaryEpoch] An Epoch is a configuration number for + * the partition as a whole. When the configuration of the replica set + * changes, for example when the Primary replica changes, the operations that + * are replicated from the new Primary replica are said to be a new Epoch + * from the ones which were sent by the old Primary replica. + * @property {string} [primaryEpoch.configurationVersion] The current + * configuration number of this Epoch. The configuration number is an * increasing value that is updated whenever the configuration of this * replica set changes. - * @property {string} [currentConfigurationEpoch.dataLossVersion] The current - * dataloss number of this Epoch. The data loss number property is an - * increasing value which is updated whenever data loss is suspected, as when - * loss of a quorum of replicas in the replica set that includes the Primary - * replica. + * @property {string} [primaryEpoch.dataLossVersion] The current dataloss + * number of this Epoch. The data loss number property is an increasing value + * which is updated whenever data loss is suspected, as when loss of a quorum + * of replicas in the replica set that includes the Primary replica. */ constructor() { super(); @@ -122,9 +121,9 @@ class StatefulServicePartitionInfo extends models['ServicePartitionInfo'] { name: 'TimeSpan' } }, - currentConfigurationEpoch: { + primaryEpoch: { required: false, - serializedName: 'CurrentConfigurationEpoch', + serializedName: 'PrimaryEpoch', type: { name: 'Composite', className: 'Epoch' diff --git a/lib/services/serviceFabric/lib/models/statelessReplicaHealthReportExpiredEvent.js b/lib/services/serviceFabric/lib/models/statelessReplicaHealthReportExpiredEvent.js index 1f194c27e3..911a9153e3 100644 --- a/lib/services/serviceFabric/lib/models/statelessReplicaHealthReportExpiredEvent.js +++ b/lib/services/serviceFabric/lib/models/statelessReplicaHealthReportExpiredEvent.js @@ -60,6 +60,13 @@ class StatelessReplicaHealthReportExpiredEvent extends models['ReplicaEvent'] { name: 'String' } }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, timeStamp: { required: true, serializedName: 'TimeStamp', diff --git a/lib/services/serviceFabric/lib/models/statelessReplicaNewHealthReportEvent.js b/lib/services/serviceFabric/lib/models/statelessReplicaNewHealthReportEvent.js new file mode 100644 index 0000000000..9ac1d56581 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/statelessReplicaNewHealthReportEvent.js @@ -0,0 +1,168 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Stateless Replica Health Report Created event. + * + * @extends models['ReplicaEvent'] + */ +class StatelessReplicaNewHealthReportEvent extends models['ReplicaEvent'] { + /** + * Create a StatelessReplicaNewHealthReportEvent. + * @property {string} sourceId Id of report source. + * @property {string} property Describes the property. + * @property {string} healthState Describes the property health state. + * @property {number} timeToLiveMs Time to live in milli-seconds. + * @property {number} sequenceNumber Sequence number of report. + * @property {string} description Description of report. + * @property {boolean} removeWhenExpired Indicates the removal when it + * expires. + * @property {date} sourceUtcTimestamp Source time. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of StatelessReplicaNewHealthReportEvent + * + * @returns {object} metadata of StatelessReplicaNewHealthReportEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'StatelessReplicaNewHealthReport', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'StatelessReplicaNewHealthReportEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + category: { + required: false, + serializedName: 'Category', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + partitionId: { + required: true, + serializedName: 'PartitionId', + type: { + name: 'String' + } + }, + replicaId: { + required: true, + serializedName: 'ReplicaId', + type: { + name: 'Number' + } + }, + sourceId: { + required: true, + serializedName: 'SourceId', + type: { + name: 'String' + } + }, + property: { + required: true, + serializedName: 'Property', + type: { + name: 'String' + } + }, + healthState: { + required: true, + serializedName: 'HealthState', + type: { + name: 'String' + } + }, + timeToLiveMs: { + required: true, + serializedName: 'TimeToLiveMs', + type: { + name: 'Number' + } + }, + sequenceNumber: { + required: true, + serializedName: 'SequenceNumber', + type: { + name: 'Number' + } + }, + description: { + required: true, + serializedName: 'Description', + type: { + name: 'String' + } + }, + removeWhenExpired: { + required: true, + serializedName: 'RemoveWhenExpired', + type: { + name: 'Boolean' + } + }, + sourceUtcTimestamp: { + required: true, + serializedName: 'SourceUtcTimestamp', + type: { + name: 'DateTime' + } + } + } + } + }; + } +} + +module.exports = StatelessReplicaNewHealthReportEvent; diff --git a/lib/services/serviceFabric/lib/models/tcpConfig.js b/lib/services/serviceFabric/lib/models/tcpConfig.js new file mode 100644 index 0000000000..8c475cdd17 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/tcpConfig.js @@ -0,0 +1,77 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Describes the tcp configuration for external connectivity for this network. + * + */ +class TcpConfig { + /** + * Create a TcpConfig. + * @property {string} name tcp gateway config name. + * @property {number} port Specifies the port at which the service endpoint + * below needs to be exposed. + * @property {object} destination Describes destination endpoint for routing + * traffic. + * @property {string} [destination.applicationName] Name of the service + * fabric Mesh application. + * @property {string} [destination.serviceName] service that contains the + * endpoint. + * @property {string} [destination.endpointName] name of the endpoint in the + * service. + */ + constructor() { + } + + /** + * Defines the metadata of TcpConfig + * + * @returns {object} metadata of TcpConfig + * + */ + mapper() { + return { + required: false, + serializedName: 'TcpConfig', + type: { + name: 'Composite', + className: 'TcpConfig', + modelProperties: { + name: { + required: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + port: { + required: true, + serializedName: 'port', + type: { + name: 'Number' + } + }, + destination: { + required: true, + serializedName: 'destination', + type: { + name: 'Composite', + className: 'GatewayDestination' + } + } + } + } + }; + } +} + +module.exports = TcpConfig; diff --git a/lib/services/serviceFabric/lib/models/volumeReference.js b/lib/services/serviceFabric/lib/models/volumeReference.js new file mode 100644 index 0000000000..9f54c374d5 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/volumeReference.js @@ -0,0 +1,70 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Describes a reference to a volume resource. + * + */ +class VolumeReference { + /** + * Create a VolumeReference. + * @property {string} name Name of the volume being referenced. + * @property {boolean} [readOnly] The flag indicating whether the volume is + * read only. Default is 'false'. + * @property {string} destinationPath The path within the container at which + * the volume should be mounted. Only valid path characters are allowed. + */ + constructor() { + } + + /** + * Defines the metadata of VolumeReference + * + * @returns {object} metadata of VolumeReference + * + */ + mapper() { + return { + required: false, + serializedName: 'VolumeReference', + type: { + name: 'Composite', + className: 'VolumeReference', + modelProperties: { + name: { + required: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + readOnly: { + required: false, + serializedName: 'readOnly', + type: { + name: 'Boolean' + } + }, + destinationPath: { + required: true, + serializedName: 'destinationPath', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = VolumeReference; diff --git a/lib/services/serviceFabric/lib/models/volumeResourceDescription.js b/lib/services/serviceFabric/lib/models/volumeResourceDescription.js index 45aab055bf..5c30627df3 100644 --- a/lib/services/serviceFabric/lib/models/volumeResourceDescription.js +++ b/lib/services/serviceFabric/lib/models/volumeResourceDescription.js @@ -11,13 +11,18 @@ 'use strict'; /** - * Describes a service fabric volume resource. + * This type describes a volume resource. * */ class VolumeResourceDescription { /** * Create a VolumeResourceDescription. + * @property {string} name Name of the Volume resource. * @property {string} [description] User readable description of the volume. + * @property {string} [status] Status of the volume. Possible values include: + * 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + * @property {string} [statusDetails] Gives additional information about the + * current status of the volume. * @property {object} [azureFileParameters] This type describes a volume * provided by an Azure Files file share. * @property {string} [azureFileParameters.accountName] Name of the Azure @@ -26,7 +31,6 @@ class VolumeResourceDescription { * Azure storage account for the File Share. * @property {string} [azureFileParameters.shareName] Name of the Azure Files * file share that provides storage for the volume. - * @property {string} name Volume resource name. */ constructor() { } @@ -45,6 +49,13 @@ class VolumeResourceDescription { name: 'Composite', className: 'VolumeResourceDescription', modelProperties: { + name: { + required: true, + serializedName: 'name', + type: { + name: 'String' + } + }, description: { required: false, serializedName: 'properties.description', @@ -52,6 +63,22 @@ class VolumeResourceDescription { name: 'String' } }, + status: { + required: false, + readOnly: true, + serializedName: 'properties.status', + type: { + name: 'String' + } + }, + statusDetails: { + required: false, + readOnly: true, + serializedName: 'properties.statusDetails', + type: { + name: 'String' + } + }, provider: { required: true, isConstant: true, @@ -68,13 +95,6 @@ class VolumeResourceDescription { name: 'Composite', className: 'VolumeProviderParametersAzureFile' } - }, - name: { - required: true, - serializedName: 'name', - type: { - name: 'String' - } } } } diff --git a/lib/services/serviceFabric/lib/operations/index.d.ts b/lib/services/serviceFabric/lib/operations/index.d.ts new file mode 100644 index 0000000000..34b0527310 --- /dev/null +++ b/lib/services/serviceFabric/lib/operations/index.d.ts @@ -0,0 +1,2240 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. +*/ + +import { ServiceClientOptions, RequestOptions, ServiceCallback, HttpOperationResponse } from 'ms-rest'; +import * as models from '../models'; + + +/** + * @class + * MeshSecret + * __NOTE__: An instance of this class is automatically created for an + * instance of the ServiceFabricClient. + */ +export interface MeshSecret { + + + /** + * @summary Creates or updates a Secret resource. + * + * Creates a Secret resource with the specified name, description and + * properties. If Secret resource with the same name exists, then it is updated + * with the specified description and properties. Once created, the kind and + * contentType of a secret resource cannot be updated. + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {object} secretResourceDescription Description for creating a secret + * resource. + * + * @param {object} secretResourceDescription.properties Describes the + * properties of a secret resource. + * + * @param {string} [secretResourceDescription.properties.description] User + * readable description of the secret. + * + * @param {string} [secretResourceDescription.properties.contentType] The type + * of the content stored in the secret value. The value of this property is + * opaque to Service Fabric. Once set, the value of this property cannot be + * changed. + * + * @param {string} secretResourceDescription.properties.kind Polymorphic + * Discriminator + * + * @param {string} secretResourceDescription.name Name of the Secret resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + createOrUpdateWithHttpOperationResponse(secretResourceName: string, secretResourceDescription: models.SecretResourceDescription, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Creates or updates a Secret resource. + * + * Creates a Secret resource with the specified name, description and + * properties. If Secret resource with the same name exists, then it is updated + * with the specified description and properties. Once created, the kind and + * contentType of a secret resource cannot be updated. + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {object} secretResourceDescription Description for creating a secret + * resource. + * + * @param {object} secretResourceDescription.properties Describes the + * properties of a secret resource. + * + * @param {string} [secretResourceDescription.properties.description] User + * readable description of the secret. + * + * @param {string} [secretResourceDescription.properties.contentType] The type + * of the content stored in the secret value. The value of this property is + * opaque to Service Fabric. Once set, the value of this property cannot be + * changed. + * + * @param {string} secretResourceDescription.properties.kind Polymorphic + * Discriminator + * + * @param {string} secretResourceDescription.name Name of the Secret resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {SecretResourceDescription} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {SecretResourceDescription} [result] - The deserialized result object if an error did not occur. + * See {@link SecretResourceDescription} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(secretResourceName: string, secretResourceDescription: models.SecretResourceDescription, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(secretResourceName: string, secretResourceDescription: models.SecretResourceDescription, callback: ServiceCallback): void; + createOrUpdate(secretResourceName: string, secretResourceDescription: models.SecretResourceDescription, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Gets the Secret resource with the given name. + * + * Gets the information about the Secret resource with the given name. The + * information include the description and other properties of the Secret. + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getWithHttpOperationResponse(secretResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets the Secret resource with the given name. + * + * Gets the information about the Secret resource with the given name. The + * information include the description and other properties of the Secret. + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {SecretResourceDescription} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {SecretResourceDescription} [result] - The deserialized result object if an error did not occur. + * See {@link SecretResourceDescription} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + get(secretResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(secretResourceName: string, callback: ServiceCallback): void; + get(secretResourceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Deletes the Secret resource. + * + * Deletes the specified Secret resource and all of its named values. + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + deleteMethodWithHttpOperationResponse(secretResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Deletes the Secret resource. + * + * Deletes the specified Secret resource and all of its named values. + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(secretResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(secretResourceName: string, callback: ServiceCallback): void; + deleteMethod(secretResourceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Lists all the secret resources. + * + * Gets the information about all secret resources in a given resource group. + * The information include the description and other properties of the Secret. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Lists all the secret resources. + * + * Gets the information about all secret resources in a given resource group. + * The information include the description and other properties of the Secret. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {PagedSecretResourceDescriptionList} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {PagedSecretResourceDescriptionList} [result] - The deserialized result object if an error did not occur. + * See {@link PagedSecretResourceDescriptionList} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + list(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(callback: ServiceCallback): void; + list(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * MeshSecretValue + * __NOTE__: An instance of this class is automatically created for an + * instance of the ServiceFabricClient. + */ +export interface MeshSecretValue { + + + /** + * @summary Adds the specified value as a new version of the specified secret + * resource. + * + * Creates a new value of the specified secret resource. The name of the value + * is typically the version identifier. Once created the value cannot be + * changed. + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {string} secretValueResourceName The name of the secret resource + * value which is typically the version identifier for the value. + * + * @param {object} secretValueResourceDescription Description for creating a + * value of a secret resource. + * + * @param {string} secretValueResourceDescription.name Version identifier of + * the secret value. + * + * @param {string} [secretValueResourceDescription.value] The actual value of + * the secret. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + addValueWithHttpOperationResponse(secretResourceName: string, secretValueResourceName: string, secretValueResourceDescription: models.SecretValueResourceDescription, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Adds the specified value as a new version of the specified secret + * resource. + * + * Creates a new value of the specified secret resource. The name of the value + * is typically the version identifier. Once created the value cannot be + * changed. + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {string} secretValueResourceName The name of the secret resource + * value which is typically the version identifier for the value. + * + * @param {object} secretValueResourceDescription Description for creating a + * value of a secret resource. + * + * @param {string} secretValueResourceDescription.name Version identifier of + * the secret value. + * + * @param {string} [secretValueResourceDescription.value] The actual value of + * the secret. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {SecretValueResourceDescription} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {SecretValueResourceDescription} [result] - The deserialized result object if an error did not occur. + * See {@link SecretValueResourceDescription} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + addValue(secretResourceName: string, secretValueResourceName: string, secretValueResourceDescription: models.SecretValueResourceDescription, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + addValue(secretResourceName: string, secretValueResourceName: string, secretValueResourceDescription: models.SecretValueResourceDescription, callback: ServiceCallback): void; + addValue(secretResourceName: string, secretValueResourceName: string, secretValueResourceDescription: models.SecretValueResourceDescription, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Gets the specified secret value resource. + * + * Get the information about the specified named secret value resources. The + * information does not include the actual value of the secret. + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {string} secretValueResourceName The name of the secret resource + * value which is typically the version identifier for the value. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getWithHttpOperationResponse(secretResourceName: string, secretValueResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets the specified secret value resource. + * + * Get the information about the specified named secret value resources. The + * information does not include the actual value of the secret. + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {string} secretValueResourceName The name of the secret resource + * value which is typically the version identifier for the value. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {SecretValueResourceDescription} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {SecretValueResourceDescription} [result] - The deserialized result object if an error did not occur. + * See {@link SecretValueResourceDescription} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + get(secretResourceName: string, secretValueResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(secretResourceName: string, secretValueResourceName: string, callback: ServiceCallback): void; + get(secretResourceName: string, secretValueResourceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Deletes the specified value of the named secret resource. + * + * Deletes the secret value resource identified by the name. The name of the + * resource is typically the version associated with that value. Deletion will + * fail if the specified value is in use. + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {string} secretValueResourceName The name of the secret resource + * value which is typically the version identifier for the value. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + deleteMethodWithHttpOperationResponse(secretResourceName: string, secretValueResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Deletes the specified value of the named secret resource. + * + * Deletes the secret value resource identified by the name. The name of the + * resource is typically the version associated with that value. Deletion will + * fail if the specified value is in use. + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {string} secretValueResourceName The name of the secret resource + * value which is typically the version identifier for the value. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(secretResourceName: string, secretValueResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(secretResourceName: string, secretValueResourceName: string, callback: ServiceCallback): void; + deleteMethod(secretResourceName: string, secretValueResourceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary List names of all values of the the specified secret resource. + * + * Gets information about all secret value resources of the specified secret + * resource. The information includes the names of the secret value resources, + * but not the actual values. + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listWithHttpOperationResponse(secretResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary List names of all values of the the specified secret resource. + * + * Gets information about all secret value resources of the specified secret + * resource. The information includes the names of the secret value resources, + * but not the actual values. + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {PagedSecretValueResourceDescriptionList} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {PagedSecretValueResourceDescriptionList} [result] - The deserialized result object if an error did not occur. + * See {@link PagedSecretValueResourceDescriptionList} for + * more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + list(secretResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(secretResourceName: string, callback: ServiceCallback): void; + list(secretResourceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Lists the specified value of the secret resource. + * + * Lists the decrypted value of the specified named value of the secret + * resource. This is a privileged operation. + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {string} secretValueResourceName The name of the secret resource + * value which is typically the version identifier for the value. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + showWithHttpOperationResponse(secretResourceName: string, secretValueResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Lists the specified value of the secret resource. + * + * Lists the decrypted value of the specified named value of the secret + * resource. This is a privileged operation. + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {string} secretValueResourceName The name of the secret resource + * value which is typically the version identifier for the value. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {SecretValue} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {SecretValue} [result] - The deserialized result object if an error did not occur. + * See {@link SecretValue} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + show(secretResourceName: string, secretValueResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + show(secretResourceName: string, secretValueResourceName: string, callback: ServiceCallback): void; + show(secretResourceName: string, secretValueResourceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * MeshVolume + * __NOTE__: An instance of this class is automatically created for an + * instance of the ServiceFabricClient. + */ +export interface MeshVolume { + + + /** + * @summary Creates or updates a Volume resource. + * + * Creates a Volume resource with the specified name, description and + * properties. If Volume resource with the same name exists, then it is updated + * with the specified description and properties. + * + * @param {string} volumeResourceName The identity of the volume. + * + * @param {object} volumeResourceDescription Description for creating a Volume + * resource. + * + * @param {string} volumeResourceDescription.name Name of the Volume resource. + * + * @param {string} [volumeResourceDescription.description] User readable + * description of the volume. + * + * @param {object} [volumeResourceDescription.azureFileParameters] This type + * describes a volume provided by an Azure Files file share. + * + * @param {string} volumeResourceDescription.azureFileParameters.accountName + * Name of the Azure storage account for the File Share. + * + * @param {string} [volumeResourceDescription.azureFileParameters.accountKey] + * Access key of the Azure storage account for the File Share. + * + * @param {string} volumeResourceDescription.azureFileParameters.shareName Name + * of the Azure Files file share that provides storage for the volume. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + createOrUpdateWithHttpOperationResponse(volumeResourceName: string, volumeResourceDescription: models.VolumeResourceDescription, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Creates or updates a Volume resource. + * + * Creates a Volume resource with the specified name, description and + * properties. If Volume resource with the same name exists, then it is updated + * with the specified description and properties. + * + * @param {string} volumeResourceName The identity of the volume. + * + * @param {object} volumeResourceDescription Description for creating a Volume + * resource. + * + * @param {string} volumeResourceDescription.name Name of the Volume resource. + * + * @param {string} [volumeResourceDescription.description] User readable + * description of the volume. + * + * @param {object} [volumeResourceDescription.azureFileParameters] This type + * describes a volume provided by an Azure Files file share. + * + * @param {string} volumeResourceDescription.azureFileParameters.accountName + * Name of the Azure storage account for the File Share. + * + * @param {string} [volumeResourceDescription.azureFileParameters.accountKey] + * Access key of the Azure storage account for the File Share. + * + * @param {string} volumeResourceDescription.azureFileParameters.shareName Name + * of the Azure Files file share that provides storage for the volume. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {VolumeResourceDescription} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {VolumeResourceDescription} [result] - The deserialized result object if an error did not occur. + * See {@link VolumeResourceDescription} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(volumeResourceName: string, volumeResourceDescription: models.VolumeResourceDescription, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(volumeResourceName: string, volumeResourceDescription: models.VolumeResourceDescription, callback: ServiceCallback): void; + createOrUpdate(volumeResourceName: string, volumeResourceDescription: models.VolumeResourceDescription, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Gets the Volume resource with the given name. + * + * Gets the information about the Volume resource with the given name. The + * information include the description and other properties of the Volume. + * + * @param {string} volumeResourceName The identity of the volume. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getWithHttpOperationResponse(volumeResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets the Volume resource with the given name. + * + * Gets the information about the Volume resource with the given name. The + * information include the description and other properties of the Volume. + * + * @param {string} volumeResourceName The identity of the volume. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {VolumeResourceDescription} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {VolumeResourceDescription} [result] - The deserialized result object if an error did not occur. + * See {@link VolumeResourceDescription} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + get(volumeResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(volumeResourceName: string, callback: ServiceCallback): void; + get(volumeResourceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Deletes the Volume resource. + * + * Deletes the Volume resource identified by the name. + * + * @param {string} volumeResourceName The identity of the volume. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + deleteMethodWithHttpOperationResponse(volumeResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Deletes the Volume resource. + * + * Deletes the Volume resource identified by the name. + * + * @param {string} volumeResourceName The identity of the volume. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(volumeResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(volumeResourceName: string, callback: ServiceCallback): void; + deleteMethod(volumeResourceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Lists all the volume resources. + * + * Gets the information about all volume resources in a given resource group. + * The information include the description and other properties of the Volume. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Lists all the volume resources. + * + * Gets the information about all volume resources in a given resource group. + * The information include the description and other properties of the Volume. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {PagedVolumeResourceDescriptionList} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {PagedVolumeResourceDescriptionList} [result] - The deserialized result object if an error did not occur. + * See {@link PagedVolumeResourceDescriptionList} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + list(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(callback: ServiceCallback): void; + list(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * MeshNetwork + * __NOTE__: An instance of this class is automatically created for an + * instance of the ServiceFabricClient. + */ +export interface MeshNetwork { + + + /** + * @summary Creates or updates a Network resource. + * + * Creates a Network resource with the specified name, description and + * properties. If Network resource with the same name exists, then it is + * updated with the specified description and properties. Network resource + * provides connectivity between application services. + * + * @param {string} networkResourceName The identity of the network. + * + * @param {object} networkResourceDescription Description for creating a + * Network resource. + * + * @param {string} networkResourceDescription.name Name of the Network + * resource. + * + * @param {object} networkResourceDescription.properties Describes properties + * of a network resource. + * + * @param {string} [networkResourceDescription.properties.description] User + * readable description of the network. + * + * @param {string} networkResourceDescription.properties.kind Polymorphic + * Discriminator + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + createOrUpdateWithHttpOperationResponse(networkResourceName: string, networkResourceDescription: models.NetworkResourceDescription, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Creates or updates a Network resource. + * + * Creates a Network resource with the specified name, description and + * properties. If Network resource with the same name exists, then it is + * updated with the specified description and properties. Network resource + * provides connectivity between application services. + * + * @param {string} networkResourceName The identity of the network. + * + * @param {object} networkResourceDescription Description for creating a + * Network resource. + * + * @param {string} networkResourceDescription.name Name of the Network + * resource. + * + * @param {object} networkResourceDescription.properties Describes properties + * of a network resource. + * + * @param {string} [networkResourceDescription.properties.description] User + * readable description of the network. + * + * @param {string} networkResourceDescription.properties.kind Polymorphic + * Discriminator + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {NetworkResourceDescription} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {NetworkResourceDescription} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkResourceDescription} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(networkResourceName: string, networkResourceDescription: models.NetworkResourceDescription, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(networkResourceName: string, networkResourceDescription: models.NetworkResourceDescription, callback: ServiceCallback): void; + createOrUpdate(networkResourceName: string, networkResourceDescription: models.NetworkResourceDescription, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Gets the Network resource with the given name. + * + * Gets the information about the Network resource with the given name. The + * information include the description and other properties of the Network. + * + * @param {string} networkResourceName The identity of the network. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getWithHttpOperationResponse(networkResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets the Network resource with the given name. + * + * Gets the information about the Network resource with the given name. The + * information include the description and other properties of the Network. + * + * @param {string} networkResourceName The identity of the network. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {NetworkResourceDescription} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {NetworkResourceDescription} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkResourceDescription} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + get(networkResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(networkResourceName: string, callback: ServiceCallback): void; + get(networkResourceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Deletes the Network resource. + * + * Deletes the Network resource identified by the name. + * + * @param {string} networkResourceName The identity of the network. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + deleteMethodWithHttpOperationResponse(networkResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Deletes the Network resource. + * + * Deletes the Network resource identified by the name. + * + * @param {string} networkResourceName The identity of the network. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(networkResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(networkResourceName: string, callback: ServiceCallback): void; + deleteMethod(networkResourceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Lists all the network resources. + * + * Gets the information about all network resources in a given resource group. + * The information include the description and other properties of the Network. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Lists all the network resources. + * + * Gets the information about all network resources in a given resource group. + * The information include the description and other properties of the Network. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {PagedNetworkResourceDescriptionList} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {PagedNetworkResourceDescriptionList} [result] - The deserialized result object if an error did not occur. + * See {@link PagedNetworkResourceDescriptionList} for + * more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + list(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(callback: ServiceCallback): void; + list(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * MeshApplication + * __NOTE__: An instance of this class is automatically created for an + * instance of the ServiceFabricClient. + */ +export interface MeshApplication { + + + /** + * @summary Creates or updates a Application resource. + * + * Creates a Application resource with the specified name, description and + * properties. If Application resource with the same name exists, then it is + * updated with the specified description and properties. + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {object} applicationResourceDescription Description for creating a + * Application resource. + * + * @param {string} applicationResourceDescription.name Name of the Application + * resource. + * + * @param {string} [applicationResourceDescription.description] User readable + * description of the application. + * + * @param {array} [applicationResourceDescription.services] Describes the + * services in the application. This property is used to create or modify + * services of the application. On get only the name of the service is + * returned. The service description can be obtained by querying for the + * service resource. + * + * @param {object} [applicationResourceDescription.diagnostics] Describes the + * diagnostics definition and usage for an application resource. + * + * @param {array} [applicationResourceDescription.diagnostics.sinks] List of + * supported sinks that can be referenced. + * + * @param {boolean} [applicationResourceDescription.diagnostics.enabled] Status + * of whether or not sinks are enabled. + * + * @param {array} [applicationResourceDescription.diagnostics.defaultSinkRefs] + * The sinks to be used if diagnostics is enabled. Sink choices can be + * overridden at the service and code package level. + * + * @param {string} [applicationResourceDescription.debugParams] Internal - used + * by Visual Studio to setup the debugging session on the local development + * environment. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + createOrUpdateWithHttpOperationResponse(applicationResourceName: string, applicationResourceDescription: models.ApplicationResourceDescription, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Creates or updates a Application resource. + * + * Creates a Application resource with the specified name, description and + * properties. If Application resource with the same name exists, then it is + * updated with the specified description and properties. + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {object} applicationResourceDescription Description for creating a + * Application resource. + * + * @param {string} applicationResourceDescription.name Name of the Application + * resource. + * + * @param {string} [applicationResourceDescription.description] User readable + * description of the application. + * + * @param {array} [applicationResourceDescription.services] Describes the + * services in the application. This property is used to create or modify + * services of the application. On get only the name of the service is + * returned. The service description can be obtained by querying for the + * service resource. + * + * @param {object} [applicationResourceDescription.diagnostics] Describes the + * diagnostics definition and usage for an application resource. + * + * @param {array} [applicationResourceDescription.diagnostics.sinks] List of + * supported sinks that can be referenced. + * + * @param {boolean} [applicationResourceDescription.diagnostics.enabled] Status + * of whether or not sinks are enabled. + * + * @param {array} [applicationResourceDescription.diagnostics.defaultSinkRefs] + * The sinks to be used if diagnostics is enabled. Sink choices can be + * overridden at the service and code package level. + * + * @param {string} [applicationResourceDescription.debugParams] Internal - used + * by Visual Studio to setup the debugging session on the local development + * environment. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ApplicationResourceDescription} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ApplicationResourceDescription} [result] - The deserialized result object if an error did not occur. + * See {@link ApplicationResourceDescription} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(applicationResourceName: string, applicationResourceDescription: models.ApplicationResourceDescription, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(applicationResourceName: string, applicationResourceDescription: models.ApplicationResourceDescription, callback: ServiceCallback): void; + createOrUpdate(applicationResourceName: string, applicationResourceDescription: models.ApplicationResourceDescription, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Gets the Application resource with the given name. + * + * Gets the information about the Application resource with the given name. The + * information include the description and other properties of the Application. + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getWithHttpOperationResponse(applicationResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets the Application resource with the given name. + * + * Gets the information about the Application resource with the given name. The + * information include the description and other properties of the Application. + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ApplicationResourceDescription} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ApplicationResourceDescription} [result] - The deserialized result object if an error did not occur. + * See {@link ApplicationResourceDescription} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + get(applicationResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(applicationResourceName: string, callback: ServiceCallback): void; + get(applicationResourceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Deletes the Application resource. + * + * Deletes the Application resource identified by the name. + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + deleteMethodWithHttpOperationResponse(applicationResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Deletes the Application resource. + * + * Deletes the Application resource identified by the name. + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(applicationResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(applicationResourceName: string, callback: ServiceCallback): void; + deleteMethod(applicationResourceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Lists all the application resources. + * + * Gets the information about all application resources in a given resource + * group. The information include the description and other properties of the + * Application. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Lists all the application resources. + * + * Gets the information about all application resources in a given resource + * group. The information include the description and other properties of the + * Application. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {PagedApplicationResourceDescriptionList} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {PagedApplicationResourceDescriptionList} [result] - The deserialized result object if an error did not occur. + * See {@link PagedApplicationResourceDescriptionList} for + * more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + list(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(callback: ServiceCallback): void; + list(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * MeshService + * __NOTE__: An instance of this class is automatically created for an + * instance of the ServiceFabricClient. + */ +export interface MeshService { + + + /** + * @summary Gets the Service resource with the given name. + * + * Gets the information about the Service resource with the given name. The + * information include the description and other properties of the Service. + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {string} serviceResourceName The identity of the service. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getWithHttpOperationResponse(applicationResourceName: string, serviceResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets the Service resource with the given name. + * + * Gets the information about the Service resource with the given name. The + * information include the description and other properties of the Service. + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {string} serviceResourceName The identity of the service. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ServiceResourceDescription} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ServiceResourceDescription} [result] - The deserialized result object if an error did not occur. + * See {@link ServiceResourceDescription} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + get(applicationResourceName: string, serviceResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(applicationResourceName: string, serviceResourceName: string, callback: ServiceCallback): void; + get(applicationResourceName: string, serviceResourceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Lists all the service resources. + * + * Gets the information about all services of an application resource. The + * information include the description and other properties of the Service. + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listWithHttpOperationResponse(applicationResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Lists all the service resources. + * + * Gets the information about all services of an application resource. The + * information include the description and other properties of the Service. + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {PagedServiceResourceDescriptionList} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {PagedServiceResourceDescriptionList} [result] - The deserialized result object if an error did not occur. + * See {@link PagedServiceResourceDescriptionList} for + * more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + list(applicationResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(applicationResourceName: string, callback: ServiceCallback): void; + list(applicationResourceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * MeshCodePackage + * __NOTE__: An instance of this class is automatically created for an + * instance of the ServiceFabricClient. + */ +export interface MeshCodePackage { + + + /** + * @summary Gets the logs from the container. + * + * Gets the logs for the container of the specified code package of the service + * replica. + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {string} serviceResourceName The identity of the service. + * + * @param {string} replicaName Service Fabric replica name. + * + * @param {string} codePackageName The name of code package of the service. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.tail] Number of lines to show from the end of the + * logs. Default is 100. 'all' to show the complete logs. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getContainerLogsWithHttpOperationResponse(applicationResourceName: string, serviceResourceName: string, replicaName: string, codePackageName: string, options?: { tail? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets the logs from the container. + * + * Gets the logs for the container of the specified code package of the service + * replica. + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {string} serviceResourceName The identity of the service. + * + * @param {string} replicaName Service Fabric replica name. + * + * @param {string} codePackageName The name of code package of the service. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.tail] Number of lines to show from the end of the + * logs. Default is 100. 'all' to show the complete logs. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ContainerLogs} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ContainerLogs} [result] - The deserialized result object if an error did not occur. + * See {@link ContainerLogs} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getContainerLogs(applicationResourceName: string, serviceResourceName: string, replicaName: string, codePackageName: string, options?: { tail? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + getContainerLogs(applicationResourceName: string, serviceResourceName: string, replicaName: string, codePackageName: string, callback: ServiceCallback): void; + getContainerLogs(applicationResourceName: string, serviceResourceName: string, replicaName: string, codePackageName: string, options: { tail? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * MeshServiceReplica + * __NOTE__: An instance of this class is automatically created for an + * instance of the ServiceFabricClient. + */ +export interface MeshServiceReplica { + + + /** + * @summary Gets the given replica of the service of an application. + * + * Gets the information about the service replica with the given name. The + * information include the description and other properties of the service + * replica. + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {string} serviceResourceName The identity of the service. + * + * @param {string} replicaName Service Fabric replica name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getWithHttpOperationResponse(applicationResourceName: string, serviceResourceName: string, replicaName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets the given replica of the service of an application. + * + * Gets the information about the service replica with the given name. The + * information include the description and other properties of the service + * replica. + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {string} serviceResourceName The identity of the service. + * + * @param {string} replicaName Service Fabric replica name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ServiceReplicaDescription} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ServiceReplicaDescription} [result] - The deserialized result object if an error did not occur. + * See {@link ServiceReplicaDescription} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + get(applicationResourceName: string, serviceResourceName: string, replicaName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(applicationResourceName: string, serviceResourceName: string, replicaName: string, callback: ServiceCallback): void; + get(applicationResourceName: string, serviceResourceName: string, replicaName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Lists all the replicas of a service. + * + * Gets the information about all replicas of a service. The information + * include the description and other properties of the service replica. + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {string} serviceResourceName The identity of the service. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listWithHttpOperationResponse(applicationResourceName: string, serviceResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Lists all the replicas of a service. + * + * Gets the information about all replicas of a service. The information + * include the description and other properties of the service replica. + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {string} serviceResourceName The identity of the service. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {PagedServiceReplicaDescriptionList} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {PagedServiceReplicaDescriptionList} [result] - The deserialized result object if an error did not occur. + * See {@link PagedServiceReplicaDescriptionList} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + list(applicationResourceName: string, serviceResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(applicationResourceName: string, serviceResourceName: string, callback: ServiceCallback): void; + list(applicationResourceName: string, serviceResourceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * MeshGateway + * __NOTE__: An instance of this class is automatically created for an + * instance of the ServiceFabricClient. + */ +export interface MeshGateway { + + + /** + * @summary Creates or updates a Gateway resource. + * + * Creates a Gateway resource with the specified name, description and + * properties. If Gateway resource with the same name exists, then it is + * updated with the specified description and properties. Use Gateway resource + * to provide public connectivity to application services. + * + * @param {string} gatewayResourceName The identity of the gateway. + * + * @param {object} gatewayResourceDescription Description for creating a + * Gateway resource. + * + * @param {string} gatewayResourceDescription.name Name of the Gateway + * resource. + * + * @param {string} [gatewayResourceDescription.description] User readable + * description of the gateway. + * + * @param {object} gatewayResourceDescription.sourceNetwork Network the gateway + * should listen on for requests. + * + * @param {object} gatewayResourceDescription.destinationNetwork Network that + * the Application is using. + * + * @param {string} [gatewayResourceDescription.destinationNetwork.name] Name of + * the network + * + * @param {array} [gatewayResourceDescription.destinationNetwork.endpointRefs] + * A list of endpoints that are exposed on this network. + * + * @param {array} [gatewayResourceDescription.tcp] Configuration for tcp + * connectivity for this gateway. + * + * @param {array} [gatewayResourceDescription.http] Configuration for http + * connectivity for this gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + createOrUpdateWithHttpOperationResponse(gatewayResourceName: string, gatewayResourceDescription: models.GatewayResourceDescription, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Creates or updates a Gateway resource. + * + * Creates a Gateway resource with the specified name, description and + * properties. If Gateway resource with the same name exists, then it is + * updated with the specified description and properties. Use Gateway resource + * to provide public connectivity to application services. + * + * @param {string} gatewayResourceName The identity of the gateway. + * + * @param {object} gatewayResourceDescription Description for creating a + * Gateway resource. + * + * @param {string} gatewayResourceDescription.name Name of the Gateway + * resource. + * + * @param {string} [gatewayResourceDescription.description] User readable + * description of the gateway. + * + * @param {object} gatewayResourceDescription.sourceNetwork Network the gateway + * should listen on for requests. + * + * @param {object} gatewayResourceDescription.destinationNetwork Network that + * the Application is using. + * + * @param {string} [gatewayResourceDescription.destinationNetwork.name] Name of + * the network + * + * @param {array} [gatewayResourceDescription.destinationNetwork.endpointRefs] + * A list of endpoints that are exposed on this network. + * + * @param {array} [gatewayResourceDescription.tcp] Configuration for tcp + * connectivity for this gateway. + * + * @param {array} [gatewayResourceDescription.http] Configuration for http + * connectivity for this gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {GatewayResourceDescription} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {GatewayResourceDescription} [result] - The deserialized result object if an error did not occur. + * See {@link GatewayResourceDescription} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(gatewayResourceName: string, gatewayResourceDescription: models.GatewayResourceDescription, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(gatewayResourceName: string, gatewayResourceDescription: models.GatewayResourceDescription, callback: ServiceCallback): void; + createOrUpdate(gatewayResourceName: string, gatewayResourceDescription: models.GatewayResourceDescription, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Gets the Gateway resource with the given name. + * + * Gets the information about the Gateway resource with the given name. The + * information include the description and other properties of the Gateway. + * + * @param {string} gatewayResourceName The identity of the gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getWithHttpOperationResponse(gatewayResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets the Gateway resource with the given name. + * + * Gets the information about the Gateway resource with the given name. The + * information include the description and other properties of the Gateway. + * + * @param {string} gatewayResourceName The identity of the gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {GatewayResourceDescription} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {GatewayResourceDescription} [result] - The deserialized result object if an error did not occur. + * See {@link GatewayResourceDescription} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + get(gatewayResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(gatewayResourceName: string, callback: ServiceCallback): void; + get(gatewayResourceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Deletes the Gateway resource. + * + * Deletes the Gateway resource identified by the name. + * + * @param {string} gatewayResourceName The identity of the gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + deleteMethodWithHttpOperationResponse(gatewayResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Deletes the Gateway resource. + * + * Deletes the Gateway resource identified by the name. + * + * @param {string} gatewayResourceName The identity of the gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(gatewayResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(gatewayResourceName: string, callback: ServiceCallback): void; + deleteMethod(gatewayResourceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Lists all the gateway resources. + * + * Gets the information about all gateway resources in a given resource group. + * The information include the description and other properties of the Gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Lists all the gateway resources. + * + * Gets the information about all gateway resources in a given resource group. + * The information include the description and other properties of the Gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {PagedGatewayResourceDescriptionList} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {PagedGatewayResourceDescriptionList} [result] - The deserialized result object if an error did not occur. + * See {@link PagedGatewayResourceDescriptionList} for + * more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + list(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(callback: ServiceCallback): void; + list(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} diff --git a/lib/services/serviceFabric/lib/operations/index.js b/lib/services/serviceFabric/lib/operations/index.js new file mode 100644 index 0000000000..e4cae9ab49 --- /dev/null +++ b/lib/services/serviceFabric/lib/operations/index.js @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +/* jshint latedef:false */ +/* jshint forin:false */ +/* jshint noempty:false */ + +'use strict'; + +exports.MeshSecret = require('./meshSecret'); +exports.MeshSecretValue = require('./meshSecretValue'); +exports.MeshVolume = require('./meshVolume'); +exports.MeshNetwork = require('./meshNetwork'); +exports.MeshApplication = require('./meshApplication'); +exports.MeshService = require('./meshService'); +exports.MeshCodePackage = require('./meshCodePackage'); +exports.MeshServiceReplica = require('./meshServiceReplica'); +exports.MeshGateway = require('./meshGateway'); diff --git a/lib/services/serviceFabric/lib/operations/meshApplication.js b/lib/services/serviceFabric/lib/operations/meshApplication.js new file mode 100644 index 0000000000..e43372e531 --- /dev/null +++ b/lib/services/serviceFabric/lib/operations/meshApplication.js @@ -0,0 +1,1001 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const WebResource = msRest.WebResource; + +/** + * @summary Creates or updates a Application resource. + * + * Creates a Application resource with the specified name, description and + * properties. If Application resource with the same name exists, then it is + * updated with the specified description and properties. + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {object} applicationResourceDescription Description for creating a + * Application resource. + * + * @param {string} applicationResourceDescription.name Name of the Application + * resource. + * + * @param {string} [applicationResourceDescription.description] User readable + * description of the application. + * + * @param {array} [applicationResourceDescription.services] Describes the + * services in the application. This property is used to create or modify + * services of the application. On get only the name of the service is + * returned. The service description can be obtained by querying for the + * service resource. + * + * @param {object} [applicationResourceDescription.diagnostics] Describes the + * diagnostics definition and usage for an application resource. + * + * @param {array} [applicationResourceDescription.diagnostics.sinks] List of + * supported sinks that can be referenced. + * + * @param {boolean} [applicationResourceDescription.diagnostics.enabled] Status + * of whether or not sinks are enabled. + * + * @param {array} [applicationResourceDescription.diagnostics.defaultSinkRefs] + * The sinks to be used if diagnostics is enabled. Sink choices can be + * overridden at the service and code package level. + * + * @param {string} [applicationResourceDescription.debugParams] Internal - used + * by Visual Studio to setup the debugging session on the local development + * environment. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ApplicationResourceDescription} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _createOrUpdate(applicationResourceName, applicationResourceDescription, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '6.4-preview'; + // Validate + try { + if (applicationResourceName === null || applicationResourceName === undefined || typeof applicationResourceName.valueOf() !== 'string') { + throw new Error('applicationResourceName cannot be null or undefined and it must be of type string.'); + } + if (applicationResourceDescription === null || applicationResourceDescription === undefined) { + throw new Error('applicationResourceDescription cannot be null or undefined.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Resources/Applications/{applicationResourceName}'; + requestUrl = requestUrl.replace('{applicationResourceName}', applicationResourceName); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PUT'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (applicationResourceDescription !== null && applicationResourceDescription !== undefined) { + let requestModelMapper = new client.models['ApplicationResourceDescription']().mapper(); + requestModel = client.serialize(requestModelMapper, applicationResourceDescription, 'applicationResourceDescription'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(applicationResourceDescription, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 201 && statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ApplicationResourceDescription']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ApplicationResourceDescription']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets the Application resource with the given name. + * + * Gets the information about the Application resource with the given name. The + * information include the description and other properties of the Application. + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ApplicationResourceDescription} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _get(applicationResourceName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '6.4-preview'; + // Validate + try { + if (applicationResourceName === null || applicationResourceName === undefined || typeof applicationResourceName.valueOf() !== 'string') { + throw new Error('applicationResourceName cannot be null or undefined and it must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Resources/Applications/{applicationResourceName}'; + requestUrl = requestUrl.replace('{applicationResourceName}', applicationResourceName); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ApplicationResourceDescription']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Deletes the Application resource. + * + * Deletes the Application resource identified by the name. + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _deleteMethod(applicationResourceName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '6.4-preview'; + // Validate + try { + if (applicationResourceName === null || applicationResourceName === undefined || typeof applicationResourceName.valueOf() !== 'string') { + throw new Error('applicationResourceName cannot be null or undefined and it must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Resources/Applications/{applicationResourceName}'; + requestUrl = requestUrl.replace('{applicationResourceName}', applicationResourceName); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'DELETE'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Lists all the application resources. + * + * Gets the information about all application resources in a given resource + * group. The information include the description and other properties of the + * Application. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedApplicationResourceDescriptionList} for + * more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _list(options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '6.4-preview'; + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Resources/Applications'; + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['PagedApplicationResourceDescriptionList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a MeshApplication. */ +class MeshApplication { + /** + * Create a MeshApplication. + * @param {ServiceFabricClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._createOrUpdate = _createOrUpdate; + this._get = _get; + this._deleteMethod = _deleteMethod; + this._list = _list; + } + + /** + * @summary Creates or updates a Application resource. + * + * Creates a Application resource with the specified name, description and + * properties. If Application resource with the same name exists, then it is + * updated with the specified description and properties. + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {object} applicationResourceDescription Description for creating a + * Application resource. + * + * @param {string} applicationResourceDescription.name Name of the Application + * resource. + * + * @param {string} [applicationResourceDescription.description] User readable + * description of the application. + * + * @param {array} [applicationResourceDescription.services] Describes the + * services in the application. This property is used to create or modify + * services of the application. On get only the name of the service is + * returned. The service description can be obtained by querying for the + * service resource. + * + * @param {object} [applicationResourceDescription.diagnostics] Describes the + * diagnostics definition and usage for an application resource. + * + * @param {array} [applicationResourceDescription.diagnostics.sinks] List of + * supported sinks that can be referenced. + * + * @param {boolean} [applicationResourceDescription.diagnostics.enabled] Status + * of whether or not sinks are enabled. + * + * @param {array} [applicationResourceDescription.diagnostics.defaultSinkRefs] + * The sinks to be used if diagnostics is enabled. Sink choices can be + * overridden at the service and code package level. + * + * @param {string} [applicationResourceDescription.debugParams] Internal - used + * by Visual Studio to setup the debugging session on the local development + * environment. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + createOrUpdateWithHttpOperationResponse(applicationResourceName, applicationResourceDescription, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(applicationResourceName, applicationResourceDescription, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Creates or updates a Application resource. + * + * Creates a Application resource with the specified name, description and + * properties. If Application resource with the same name exists, then it is + * updated with the specified description and properties. + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {object} applicationResourceDescription Description for creating a + * Application resource. + * + * @param {string} applicationResourceDescription.name Name of the Application + * resource. + * + * @param {string} [applicationResourceDescription.description] User readable + * description of the application. + * + * @param {array} [applicationResourceDescription.services] Describes the + * services in the application. This property is used to create or modify + * services of the application. On get only the name of the service is + * returned. The service description can be obtained by querying for the + * service resource. + * + * @param {object} [applicationResourceDescription.diagnostics] Describes the + * diagnostics definition and usage for an application resource. + * + * @param {array} [applicationResourceDescription.diagnostics.sinks] List of + * supported sinks that can be referenced. + * + * @param {boolean} [applicationResourceDescription.diagnostics.enabled] Status + * of whether or not sinks are enabled. + * + * @param {array} [applicationResourceDescription.diagnostics.defaultSinkRefs] + * The sinks to be used if diagnostics is enabled. Sink choices can be + * overridden at the service and code package level. + * + * @param {string} [applicationResourceDescription.debugParams] Internal - used + * by Visual Studio to setup the debugging session on the local development + * environment. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ApplicationResourceDescription} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ApplicationResourceDescription} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(applicationResourceName, applicationResourceDescription, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._createOrUpdate(applicationResourceName, applicationResourceDescription, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createOrUpdate(applicationResourceName, applicationResourceDescription, options, optionalCallback); + } + } + + /** + * @summary Gets the Application resource with the given name. + * + * Gets the information about the Application resource with the given name. The + * information include the description and other properties of the Application. + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getWithHttpOperationResponse(applicationResourceName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(applicationResourceName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets the Application resource with the given name. + * + * Gets the information about the Application resource with the given name. The + * information include the description and other properties of the Application. + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ApplicationResourceDescription} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ApplicationResourceDescription} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + get(applicationResourceName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._get(applicationResourceName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(applicationResourceName, options, optionalCallback); + } + } + + /** + * @summary Deletes the Application resource. + * + * Deletes the Application resource identified by the name. + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + deleteMethodWithHttpOperationResponse(applicationResourceName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(applicationResourceName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Deletes the Application resource. + * + * Deletes the Application resource identified by the name. + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(applicationResourceName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteMethod(applicationResourceName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(applicationResourceName, options, optionalCallback); + } + } + + /** + * @summary Lists all the application resources. + * + * Gets the information about all application resources in a given resource + * group. The information include the description and other properties of the + * Application. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listWithHttpOperationResponse(options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._list(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Lists all the application resources. + * + * Gets the information about all application resources in a given resource + * group. The information include the description and other properties of the + * Application. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {PagedApplicationResourceDescriptionList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedApplicationResourceDescriptionList} for + * more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + list(options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._list(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._list(options, optionalCallback); + } + } + +} + +module.exports = MeshApplication; diff --git a/lib/services/serviceFabric/lib/operations/meshCodePackage.js b/lib/services/serviceFabric/lib/operations/meshCodePackage.js new file mode 100644 index 0000000000..9e6fa7a6c5 --- /dev/null +++ b/lib/services/serviceFabric/lib/operations/meshCodePackage.js @@ -0,0 +1,291 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const WebResource = msRest.WebResource; + +/** + * @summary Gets the logs from the container. + * + * Gets the logs for the container of the specified code package of the service + * replica. + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {string} serviceResourceName The identity of the service. + * + * @param {string} replicaName Service Fabric replica name. + * + * @param {string} codePackageName The name of code package of the service. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.tail] Number of lines to show from the end of the + * logs. Default is 100. 'all' to show the complete logs. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ContainerLogs} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getContainerLogs(applicationResourceName, serviceResourceName, replicaName, codePackageName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let tail = (options && options.tail !== undefined) ? options.tail : undefined; + let apiVersion = '6.4-preview'; + // Validate + try { + if (applicationResourceName === null || applicationResourceName === undefined || typeof applicationResourceName.valueOf() !== 'string') { + throw new Error('applicationResourceName cannot be null or undefined and it must be of type string.'); + } + if (serviceResourceName === null || serviceResourceName === undefined || typeof serviceResourceName.valueOf() !== 'string') { + throw new Error('serviceResourceName cannot be null or undefined and it must be of type string.'); + } + if (replicaName === null || replicaName === undefined || typeof replicaName.valueOf() !== 'string') { + throw new Error('replicaName cannot be null or undefined and it must be of type string.'); + } + if (codePackageName === null || codePackageName === undefined || typeof codePackageName.valueOf() !== 'string') { + throw new Error('codePackageName cannot be null or undefined and it must be of type string.'); + } + if (tail !== null && tail !== undefined && typeof tail.valueOf() !== 'string') { + throw new Error('tail must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas/{replicaName}/CodePackages/{codePackageName}/Logs'; + requestUrl = requestUrl.replace('{applicationResourceName}', applicationResourceName); + requestUrl = requestUrl.replace('{serviceResourceName}', serviceResourceName); + requestUrl = requestUrl.replace('{replicaName}', replicaName); + requestUrl = requestUrl.replace('{codePackageName}', encodeURIComponent(codePackageName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (tail !== null && tail !== undefined) { + queryParameters.push('Tail=' + encodeURIComponent(tail)); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ContainerLogs']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a MeshCodePackage. */ +class MeshCodePackage { + /** + * Create a MeshCodePackage. + * @param {ServiceFabricClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._getContainerLogs = _getContainerLogs; + } + + /** + * @summary Gets the logs from the container. + * + * Gets the logs for the container of the specified code package of the service + * replica. + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {string} serviceResourceName The identity of the service. + * + * @param {string} replicaName Service Fabric replica name. + * + * @param {string} codePackageName The name of code package of the service. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.tail] Number of lines to show from the end of the + * logs. Default is 100. 'all' to show the complete logs. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getContainerLogsWithHttpOperationResponse(applicationResourceName, serviceResourceName, replicaName, codePackageName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._getContainerLogs(applicationResourceName, serviceResourceName, replicaName, codePackageName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets the logs from the container. + * + * Gets the logs for the container of the specified code package of the service + * replica. + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {string} serviceResourceName The identity of the service. + * + * @param {string} replicaName Service Fabric replica name. + * + * @param {string} codePackageName The name of code package of the service. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.tail] Number of lines to show from the end of the + * logs. Default is 100. 'all' to show the complete logs. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ContainerLogs} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ContainerLogs} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getContainerLogs(applicationResourceName, serviceResourceName, replicaName, codePackageName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getContainerLogs(applicationResourceName, serviceResourceName, replicaName, codePackageName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getContainerLogs(applicationResourceName, serviceResourceName, replicaName, codePackageName, options, optionalCallback); + } + } + +} + +module.exports = MeshCodePackage; diff --git a/lib/services/serviceFabric/lib/operations/meshGateway.js b/lib/services/serviceFabric/lib/operations/meshGateway.js new file mode 100644 index 0000000000..25d7979e32 --- /dev/null +++ b/lib/services/serviceFabric/lib/operations/meshGateway.js @@ -0,0 +1,986 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const WebResource = msRest.WebResource; + +/** + * @summary Creates or updates a Gateway resource. + * + * Creates a Gateway resource with the specified name, description and + * properties. If Gateway resource with the same name exists, then it is + * updated with the specified description and properties. Use Gateway resource + * to provide public connectivity to application services. + * + * @param {string} gatewayResourceName The identity of the gateway. + * + * @param {object} gatewayResourceDescription Description for creating a + * Gateway resource. + * + * @param {string} gatewayResourceDescription.name Name of the Gateway + * resource. + * + * @param {string} [gatewayResourceDescription.description] User readable + * description of the gateway. + * + * @param {object} gatewayResourceDescription.sourceNetwork Network the gateway + * should listen on for requests. + * + * @param {object} gatewayResourceDescription.destinationNetwork Network that + * the Application is using. + * + * @param {string} [gatewayResourceDescription.destinationNetwork.name] Name of + * the network + * + * @param {array} [gatewayResourceDescription.destinationNetwork.endpointRefs] + * A list of endpoints that are exposed on this network. + * + * @param {array} [gatewayResourceDescription.tcp] Configuration for tcp + * connectivity for this gateway. + * + * @param {array} [gatewayResourceDescription.http] Configuration for http + * connectivity for this gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GatewayResourceDescription} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _createOrUpdate(gatewayResourceName, gatewayResourceDescription, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '6.4-preview'; + // Validate + try { + if (gatewayResourceName === null || gatewayResourceName === undefined || typeof gatewayResourceName.valueOf() !== 'string') { + throw new Error('gatewayResourceName cannot be null or undefined and it must be of type string.'); + } + if (gatewayResourceDescription === null || gatewayResourceDescription === undefined) { + throw new Error('gatewayResourceDescription cannot be null or undefined.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Resources/Gateways/{gatewayResourceName}'; + requestUrl = requestUrl.replace('{gatewayResourceName}', gatewayResourceName); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PUT'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (gatewayResourceDescription !== null && gatewayResourceDescription !== undefined) { + let requestModelMapper = new client.models['GatewayResourceDescription']().mapper(); + requestModel = client.serialize(requestModelMapper, gatewayResourceDescription, 'gatewayResourceDescription'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(gatewayResourceDescription, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 201 && statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GatewayResourceDescription']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GatewayResourceDescription']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets the Gateway resource with the given name. + * + * Gets the information about the Gateway resource with the given name. The + * information include the description and other properties of the Gateway. + * + * @param {string} gatewayResourceName The identity of the gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GatewayResourceDescription} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _get(gatewayResourceName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '6.4-preview'; + // Validate + try { + if (gatewayResourceName === null || gatewayResourceName === undefined || typeof gatewayResourceName.valueOf() !== 'string') { + throw new Error('gatewayResourceName cannot be null or undefined and it must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Resources/Gateways/{gatewayResourceName}'; + requestUrl = requestUrl.replace('{gatewayResourceName}', gatewayResourceName); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GatewayResourceDescription']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Deletes the Gateway resource. + * + * Deletes the Gateway resource identified by the name. + * + * @param {string} gatewayResourceName The identity of the gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _deleteMethod(gatewayResourceName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '6.4-preview'; + // Validate + try { + if (gatewayResourceName === null || gatewayResourceName === undefined || typeof gatewayResourceName.valueOf() !== 'string') { + throw new Error('gatewayResourceName cannot be null or undefined and it must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Resources/Gateways/{gatewayResourceName}'; + requestUrl = requestUrl.replace('{gatewayResourceName}', gatewayResourceName); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'DELETE'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Lists all the gateway resources. + * + * Gets the information about all gateway resources in a given resource group. + * The information include the description and other properties of the Gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedGatewayResourceDescriptionList} for + * more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _list(options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '6.4-preview'; + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Resources/Gateways'; + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['PagedGatewayResourceDescriptionList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a MeshGateway. */ +class MeshGateway { + /** + * Create a MeshGateway. + * @param {ServiceFabricClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._createOrUpdate = _createOrUpdate; + this._get = _get; + this._deleteMethod = _deleteMethod; + this._list = _list; + } + + /** + * @summary Creates or updates a Gateway resource. + * + * Creates a Gateway resource with the specified name, description and + * properties. If Gateway resource with the same name exists, then it is + * updated with the specified description and properties. Use Gateway resource + * to provide public connectivity to application services. + * + * @param {string} gatewayResourceName The identity of the gateway. + * + * @param {object} gatewayResourceDescription Description for creating a + * Gateway resource. + * + * @param {string} gatewayResourceDescription.name Name of the Gateway + * resource. + * + * @param {string} [gatewayResourceDescription.description] User readable + * description of the gateway. + * + * @param {object} gatewayResourceDescription.sourceNetwork Network the gateway + * should listen on for requests. + * + * @param {object} gatewayResourceDescription.destinationNetwork Network that + * the Application is using. + * + * @param {string} [gatewayResourceDescription.destinationNetwork.name] Name of + * the network + * + * @param {array} [gatewayResourceDescription.destinationNetwork.endpointRefs] + * A list of endpoints that are exposed on this network. + * + * @param {array} [gatewayResourceDescription.tcp] Configuration for tcp + * connectivity for this gateway. + * + * @param {array} [gatewayResourceDescription.http] Configuration for http + * connectivity for this gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + createOrUpdateWithHttpOperationResponse(gatewayResourceName, gatewayResourceDescription, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(gatewayResourceName, gatewayResourceDescription, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Creates or updates a Gateway resource. + * + * Creates a Gateway resource with the specified name, description and + * properties. If Gateway resource with the same name exists, then it is + * updated with the specified description and properties. Use Gateway resource + * to provide public connectivity to application services. + * + * @param {string} gatewayResourceName The identity of the gateway. + * + * @param {object} gatewayResourceDescription Description for creating a + * Gateway resource. + * + * @param {string} gatewayResourceDescription.name Name of the Gateway + * resource. + * + * @param {string} [gatewayResourceDescription.description] User readable + * description of the gateway. + * + * @param {object} gatewayResourceDescription.sourceNetwork Network the gateway + * should listen on for requests. + * + * @param {object} gatewayResourceDescription.destinationNetwork Network that + * the Application is using. + * + * @param {string} [gatewayResourceDescription.destinationNetwork.name] Name of + * the network + * + * @param {array} [gatewayResourceDescription.destinationNetwork.endpointRefs] + * A list of endpoints that are exposed on this network. + * + * @param {array} [gatewayResourceDescription.tcp] Configuration for tcp + * connectivity for this gateway. + * + * @param {array} [gatewayResourceDescription.http] Configuration for http + * connectivity for this gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GatewayResourceDescription} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GatewayResourceDescription} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(gatewayResourceName, gatewayResourceDescription, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._createOrUpdate(gatewayResourceName, gatewayResourceDescription, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createOrUpdate(gatewayResourceName, gatewayResourceDescription, options, optionalCallback); + } + } + + /** + * @summary Gets the Gateway resource with the given name. + * + * Gets the information about the Gateway resource with the given name. The + * information include the description and other properties of the Gateway. + * + * @param {string} gatewayResourceName The identity of the gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getWithHttpOperationResponse(gatewayResourceName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(gatewayResourceName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets the Gateway resource with the given name. + * + * Gets the information about the Gateway resource with the given name. The + * information include the description and other properties of the Gateway. + * + * @param {string} gatewayResourceName The identity of the gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GatewayResourceDescription} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GatewayResourceDescription} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + get(gatewayResourceName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._get(gatewayResourceName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(gatewayResourceName, options, optionalCallback); + } + } + + /** + * @summary Deletes the Gateway resource. + * + * Deletes the Gateway resource identified by the name. + * + * @param {string} gatewayResourceName The identity of the gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + deleteMethodWithHttpOperationResponse(gatewayResourceName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(gatewayResourceName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Deletes the Gateway resource. + * + * Deletes the Gateway resource identified by the name. + * + * @param {string} gatewayResourceName The identity of the gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(gatewayResourceName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteMethod(gatewayResourceName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(gatewayResourceName, options, optionalCallback); + } + } + + /** + * @summary Lists all the gateway resources. + * + * Gets the information about all gateway resources in a given resource group. + * The information include the description and other properties of the Gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listWithHttpOperationResponse(options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._list(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Lists all the gateway resources. + * + * Gets the information about all gateway resources in a given resource group. + * The information include the description and other properties of the Gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {PagedGatewayResourceDescriptionList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedGatewayResourceDescriptionList} for + * more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + list(options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._list(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._list(options, optionalCallback); + } + } + +} + +module.exports = MeshGateway; diff --git a/lib/services/serviceFabric/lib/operations/meshNetwork.js b/lib/services/serviceFabric/lib/operations/meshNetwork.js new file mode 100644 index 0000000000..ec0e366bf3 --- /dev/null +++ b/lib/services/serviceFabric/lib/operations/meshNetwork.js @@ -0,0 +1,950 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const WebResource = msRest.WebResource; + +/** + * @summary Creates or updates a Network resource. + * + * Creates a Network resource with the specified name, description and + * properties. If Network resource with the same name exists, then it is + * updated with the specified description and properties. Network resource + * provides connectivity between application services. + * + * @param {string} networkResourceName The identity of the network. + * + * @param {object} networkResourceDescription Description for creating a + * Network resource. + * + * @param {string} networkResourceDescription.name Name of the Network + * resource. + * + * @param {object} networkResourceDescription.properties Describes properties + * of a network resource. + * + * @param {string} [networkResourceDescription.properties.description] User + * readable description of the network. + * + * @param {string} networkResourceDescription.properties.kind Polymorphic + * Discriminator + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkResourceDescription} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _createOrUpdate(networkResourceName, networkResourceDescription, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '6.4-preview'; + // Validate + try { + if (networkResourceName === null || networkResourceName === undefined || typeof networkResourceName.valueOf() !== 'string') { + throw new Error('networkResourceName cannot be null or undefined and it must be of type string.'); + } + if (networkResourceDescription === null || networkResourceDescription === undefined) { + throw new Error('networkResourceDescription cannot be null or undefined.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Resources/Networks/{networkResourceName}'; + requestUrl = requestUrl.replace('{networkResourceName}', networkResourceName); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PUT'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (networkResourceDescription !== null && networkResourceDescription !== undefined) { + let requestModelMapper = new client.models['NetworkResourceDescription']().mapper(); + requestModel = client.serialize(requestModelMapper, networkResourceDescription, 'networkResourceDescription'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(networkResourceDescription, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 201 && statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['NetworkResourceDescription']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['NetworkResourceDescription']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets the Network resource with the given name. + * + * Gets the information about the Network resource with the given name. The + * information include the description and other properties of the Network. + * + * @param {string} networkResourceName The identity of the network. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkResourceDescription} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _get(networkResourceName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '6.4-preview'; + // Validate + try { + if (networkResourceName === null || networkResourceName === undefined || typeof networkResourceName.valueOf() !== 'string') { + throw new Error('networkResourceName cannot be null or undefined and it must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Resources/Networks/{networkResourceName}'; + requestUrl = requestUrl.replace('{networkResourceName}', networkResourceName); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['NetworkResourceDescription']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Deletes the Network resource. + * + * Deletes the Network resource identified by the name. + * + * @param {string} networkResourceName The identity of the network. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _deleteMethod(networkResourceName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '6.4-preview'; + // Validate + try { + if (networkResourceName === null || networkResourceName === undefined || typeof networkResourceName.valueOf() !== 'string') { + throw new Error('networkResourceName cannot be null or undefined and it must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Resources/Networks/{networkResourceName}'; + requestUrl = requestUrl.replace('{networkResourceName}', networkResourceName); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'DELETE'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Lists all the network resources. + * + * Gets the information about all network resources in a given resource group. + * The information include the description and other properties of the Network. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedNetworkResourceDescriptionList} for + * more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _list(options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '6.4-preview'; + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Resources/Networks'; + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['PagedNetworkResourceDescriptionList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a MeshNetwork. */ +class MeshNetwork { + /** + * Create a MeshNetwork. + * @param {ServiceFabricClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._createOrUpdate = _createOrUpdate; + this._get = _get; + this._deleteMethod = _deleteMethod; + this._list = _list; + } + + /** + * @summary Creates or updates a Network resource. + * + * Creates a Network resource with the specified name, description and + * properties. If Network resource with the same name exists, then it is + * updated with the specified description and properties. Network resource + * provides connectivity between application services. + * + * @param {string} networkResourceName The identity of the network. + * + * @param {object} networkResourceDescription Description for creating a + * Network resource. + * + * @param {string} networkResourceDescription.name Name of the Network + * resource. + * + * @param {object} networkResourceDescription.properties Describes properties + * of a network resource. + * + * @param {string} [networkResourceDescription.properties.description] User + * readable description of the network. + * + * @param {string} networkResourceDescription.properties.kind Polymorphic + * Discriminator + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + createOrUpdateWithHttpOperationResponse(networkResourceName, networkResourceDescription, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(networkResourceName, networkResourceDescription, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Creates or updates a Network resource. + * + * Creates a Network resource with the specified name, description and + * properties. If Network resource with the same name exists, then it is + * updated with the specified description and properties. Network resource + * provides connectivity between application services. + * + * @param {string} networkResourceName The identity of the network. + * + * @param {object} networkResourceDescription Description for creating a + * Network resource. + * + * @param {string} networkResourceDescription.name Name of the Network + * resource. + * + * @param {object} networkResourceDescription.properties Describes properties + * of a network resource. + * + * @param {string} [networkResourceDescription.properties.description] User + * readable description of the network. + * + * @param {string} networkResourceDescription.properties.kind Polymorphic + * Discriminator + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {NetworkResourceDescription} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkResourceDescription} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(networkResourceName, networkResourceDescription, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._createOrUpdate(networkResourceName, networkResourceDescription, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createOrUpdate(networkResourceName, networkResourceDescription, options, optionalCallback); + } + } + + /** + * @summary Gets the Network resource with the given name. + * + * Gets the information about the Network resource with the given name. The + * information include the description and other properties of the Network. + * + * @param {string} networkResourceName The identity of the network. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getWithHttpOperationResponse(networkResourceName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(networkResourceName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets the Network resource with the given name. + * + * Gets the information about the Network resource with the given name. The + * information include the description and other properties of the Network. + * + * @param {string} networkResourceName The identity of the network. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {NetworkResourceDescription} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkResourceDescription} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + get(networkResourceName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._get(networkResourceName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(networkResourceName, options, optionalCallback); + } + } + + /** + * @summary Deletes the Network resource. + * + * Deletes the Network resource identified by the name. + * + * @param {string} networkResourceName The identity of the network. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + deleteMethodWithHttpOperationResponse(networkResourceName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(networkResourceName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Deletes the Network resource. + * + * Deletes the Network resource identified by the name. + * + * @param {string} networkResourceName The identity of the network. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(networkResourceName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteMethod(networkResourceName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(networkResourceName, options, optionalCallback); + } + } + + /** + * @summary Lists all the network resources. + * + * Gets the information about all network resources in a given resource group. + * The information include the description and other properties of the Network. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listWithHttpOperationResponse(options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._list(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Lists all the network resources. + * + * Gets the information about all network resources in a given resource group. + * The information include the description and other properties of the Network. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {PagedNetworkResourceDescriptionList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedNetworkResourceDescriptionList} for + * more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + list(options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._list(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._list(options, optionalCallback); + } + } + +} + +module.exports = MeshNetwork; diff --git a/lib/services/serviceFabric/lib/operations/meshSecret.js b/lib/services/serviceFabric/lib/operations/meshSecret.js new file mode 100644 index 0000000000..454df57215 --- /dev/null +++ b/lib/services/serviceFabric/lib/operations/meshSecret.js @@ -0,0 +1,962 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const WebResource = msRest.WebResource; + +/** + * @summary Creates or updates a Secret resource. + * + * Creates a Secret resource with the specified name, description and + * properties. If Secret resource with the same name exists, then it is updated + * with the specified description and properties. Once created, the kind and + * contentType of a secret resource cannot be updated. + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {object} secretResourceDescription Description for creating a secret + * resource. + * + * @param {object} secretResourceDescription.properties Describes the + * properties of a secret resource. + * + * @param {string} [secretResourceDescription.properties.description] User + * readable description of the secret. + * + * @param {string} [secretResourceDescription.properties.contentType] The type + * of the content stored in the secret value. The value of this property is + * opaque to Service Fabric. Once set, the value of this property cannot be + * changed. + * + * @param {string} secretResourceDescription.properties.kind Polymorphic + * Discriminator + * + * @param {string} secretResourceDescription.name Name of the Secret resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SecretResourceDescription} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _createOrUpdate(secretResourceName, secretResourceDescription, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '6.4-preview'; + // Validate + try { + if (secretResourceName === null || secretResourceName === undefined || typeof secretResourceName.valueOf() !== 'string') { + throw new Error('secretResourceName cannot be null or undefined and it must be of type string.'); + } + if (secretResourceDescription === null || secretResourceDescription === undefined) { + throw new Error('secretResourceDescription cannot be null or undefined.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Resources/Secrets/{secretResourceName}'; + requestUrl = requestUrl.replace('{secretResourceName}', secretResourceName); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PUT'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (secretResourceDescription !== null && secretResourceDescription !== undefined) { + let requestModelMapper = new client.models['SecretResourceDescription']().mapper(); + requestModel = client.serialize(requestModelMapper, secretResourceDescription, 'secretResourceDescription'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(secretResourceDescription, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 201 && statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SecretResourceDescription']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SecretResourceDescription']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets the Secret resource with the given name. + * + * Gets the information about the Secret resource with the given name. The + * information include the description and other properties of the Secret. + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SecretResourceDescription} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _get(secretResourceName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '6.4-preview'; + // Validate + try { + if (secretResourceName === null || secretResourceName === undefined || typeof secretResourceName.valueOf() !== 'string') { + throw new Error('secretResourceName cannot be null or undefined and it must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Resources/Secrets/{secretResourceName}'; + requestUrl = requestUrl.replace('{secretResourceName}', secretResourceName); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SecretResourceDescription']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Deletes the Secret resource. + * + * Deletes the specified Secret resource and all of its named values. + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _deleteMethod(secretResourceName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '6.4-preview'; + // Validate + try { + if (secretResourceName === null || secretResourceName === undefined || typeof secretResourceName.valueOf() !== 'string') { + throw new Error('secretResourceName cannot be null or undefined and it must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Resources/Secrets/{secretResourceName}'; + requestUrl = requestUrl.replace('{secretResourceName}', secretResourceName); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'DELETE'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Lists all the secret resources. + * + * Gets the information about all secret resources in a given resource group. + * The information include the description and other properties of the Secret. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedSecretResourceDescriptionList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _list(options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '6.4-preview'; + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Resources/Secrets'; + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['PagedSecretResourceDescriptionList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a MeshSecret. */ +class MeshSecret { + /** + * Create a MeshSecret. + * @param {ServiceFabricClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._createOrUpdate = _createOrUpdate; + this._get = _get; + this._deleteMethod = _deleteMethod; + this._list = _list; + } + + /** + * @summary Creates or updates a Secret resource. + * + * Creates a Secret resource with the specified name, description and + * properties. If Secret resource with the same name exists, then it is updated + * with the specified description and properties. Once created, the kind and + * contentType of a secret resource cannot be updated. + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {object} secretResourceDescription Description for creating a secret + * resource. + * + * @param {object} secretResourceDescription.properties Describes the + * properties of a secret resource. + * + * @param {string} [secretResourceDescription.properties.description] User + * readable description of the secret. + * + * @param {string} [secretResourceDescription.properties.contentType] The type + * of the content stored in the secret value. The value of this property is + * opaque to Service Fabric. Once set, the value of this property cannot be + * changed. + * + * @param {string} secretResourceDescription.properties.kind Polymorphic + * Discriminator + * + * @param {string} secretResourceDescription.name Name of the Secret resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + createOrUpdateWithHttpOperationResponse(secretResourceName, secretResourceDescription, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(secretResourceName, secretResourceDescription, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Creates or updates a Secret resource. + * + * Creates a Secret resource with the specified name, description and + * properties. If Secret resource with the same name exists, then it is updated + * with the specified description and properties. Once created, the kind and + * contentType of a secret resource cannot be updated. + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {object} secretResourceDescription Description for creating a secret + * resource. + * + * @param {object} secretResourceDescription.properties Describes the + * properties of a secret resource. + * + * @param {string} [secretResourceDescription.properties.description] User + * readable description of the secret. + * + * @param {string} [secretResourceDescription.properties.contentType] The type + * of the content stored in the secret value. The value of this property is + * opaque to Service Fabric. Once set, the value of this property cannot be + * changed. + * + * @param {string} secretResourceDescription.properties.kind Polymorphic + * Discriminator + * + * @param {string} secretResourceDescription.name Name of the Secret resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {SecretResourceDescription} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SecretResourceDescription} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(secretResourceName, secretResourceDescription, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._createOrUpdate(secretResourceName, secretResourceDescription, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createOrUpdate(secretResourceName, secretResourceDescription, options, optionalCallback); + } + } + + /** + * @summary Gets the Secret resource with the given name. + * + * Gets the information about the Secret resource with the given name. The + * information include the description and other properties of the Secret. + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getWithHttpOperationResponse(secretResourceName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(secretResourceName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets the Secret resource with the given name. + * + * Gets the information about the Secret resource with the given name. The + * information include the description and other properties of the Secret. + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {SecretResourceDescription} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SecretResourceDescription} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + get(secretResourceName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._get(secretResourceName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(secretResourceName, options, optionalCallback); + } + } + + /** + * @summary Deletes the Secret resource. + * + * Deletes the specified Secret resource and all of its named values. + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + deleteMethodWithHttpOperationResponse(secretResourceName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(secretResourceName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Deletes the Secret resource. + * + * Deletes the specified Secret resource and all of its named values. + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(secretResourceName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteMethod(secretResourceName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(secretResourceName, options, optionalCallback); + } + } + + /** + * @summary Lists all the secret resources. + * + * Gets the information about all secret resources in a given resource group. + * The information include the description and other properties of the Secret. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listWithHttpOperationResponse(options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._list(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Lists all the secret resources. + * + * Gets the information about all secret resources in a given resource group. + * The information include the description and other properties of the Secret. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {PagedSecretResourceDescriptionList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedSecretResourceDescriptionList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + list(options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._list(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._list(options, optionalCallback); + } + } + +} + +module.exports = MeshSecret; diff --git a/lib/services/serviceFabric/lib/operations/meshSecretValue.js b/lib/services/serviceFabric/lib/operations/meshSecretValue.js new file mode 100644 index 0000000000..6ed54cd8e6 --- /dev/null +++ b/lib/services/serviceFabric/lib/operations/meshSecretValue.js @@ -0,0 +1,1225 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const WebResource = msRest.WebResource; + +/** + * @summary Adds the specified value as a new version of the specified secret + * resource. + * + * Creates a new value of the specified secret resource. The name of the value + * is typically the version identifier. Once created the value cannot be + * changed. + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {string} secretValueResourceName The name of the secret resource + * value which is typically the version identifier for the value. + * + * @param {object} secretValueResourceDescription Description for creating a + * value of a secret resource. + * + * @param {string} secretValueResourceDescription.name Version identifier of + * the secret value. + * + * @param {string} [secretValueResourceDescription.value] The actual value of + * the secret. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SecretValueResourceDescription} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _addValue(secretResourceName, secretValueResourceName, secretValueResourceDescription, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '6.4-preview'; + // Validate + try { + if (secretResourceName === null || secretResourceName === undefined || typeof secretResourceName.valueOf() !== 'string') { + throw new Error('secretResourceName cannot be null or undefined and it must be of type string.'); + } + if (secretValueResourceName === null || secretValueResourceName === undefined || typeof secretValueResourceName.valueOf() !== 'string') { + throw new Error('secretValueResourceName cannot be null or undefined and it must be of type string.'); + } + if (secretValueResourceDescription === null || secretValueResourceDescription === undefined) { + throw new Error('secretValueResourceDescription cannot be null or undefined.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}'; + requestUrl = requestUrl.replace('{secretResourceName}', secretResourceName); + requestUrl = requestUrl.replace('{secretValueResourceName}', secretValueResourceName); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PUT'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (secretValueResourceDescription !== null && secretValueResourceDescription !== undefined) { + let requestModelMapper = new client.models['SecretValueResourceDescription']().mapper(); + requestModel = client.serialize(requestModelMapper, secretValueResourceDescription, 'secretValueResourceDescription'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(secretValueResourceDescription, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 201 && statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SecretValueResourceDescription']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SecretValueResourceDescription']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets the specified secret value resource. + * + * Get the information about the specified named secret value resources. The + * information does not include the actual value of the secret. + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {string} secretValueResourceName The name of the secret resource + * value which is typically the version identifier for the value. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SecretValueResourceDescription} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _get(secretResourceName, secretValueResourceName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '6.4-preview'; + // Validate + try { + if (secretResourceName === null || secretResourceName === undefined || typeof secretResourceName.valueOf() !== 'string') { + throw new Error('secretResourceName cannot be null or undefined and it must be of type string.'); + } + if (secretValueResourceName === null || secretValueResourceName === undefined || typeof secretValueResourceName.valueOf() !== 'string') { + throw new Error('secretValueResourceName cannot be null or undefined and it must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}'; + requestUrl = requestUrl.replace('{secretResourceName}', secretResourceName); + requestUrl = requestUrl.replace('{secretValueResourceName}', secretValueResourceName); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SecretValueResourceDescription']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Deletes the specified value of the named secret resource. + * + * Deletes the secret value resource identified by the name. The name of the + * resource is typically the version associated with that value. Deletion will + * fail if the specified value is in use. + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {string} secretValueResourceName The name of the secret resource + * value which is typically the version identifier for the value. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _deleteMethod(secretResourceName, secretValueResourceName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '6.4-preview'; + // Validate + try { + if (secretResourceName === null || secretResourceName === undefined || typeof secretResourceName.valueOf() !== 'string') { + throw new Error('secretResourceName cannot be null or undefined and it must be of type string.'); + } + if (secretValueResourceName === null || secretValueResourceName === undefined || typeof secretValueResourceName.valueOf() !== 'string') { + throw new Error('secretValueResourceName cannot be null or undefined and it must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}'; + requestUrl = requestUrl.replace('{secretResourceName}', secretResourceName); + requestUrl = requestUrl.replace('{secretValueResourceName}', secretValueResourceName); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'DELETE'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary List names of all values of the the specified secret resource. + * + * Gets information about all secret value resources of the specified secret + * resource. The information includes the names of the secret value resources, + * but not the actual values. + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedSecretValueResourceDescriptionList} for + * more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _list(secretResourceName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '6.4-preview'; + // Validate + try { + if (secretResourceName === null || secretResourceName === undefined || typeof secretResourceName.valueOf() !== 'string') { + throw new Error('secretResourceName cannot be null or undefined and it must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Resources/Secrets/{secretResourceName}/values'; + requestUrl = requestUrl.replace('{secretResourceName}', secretResourceName); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['PagedSecretValueResourceDescriptionList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Lists the specified value of the secret resource. + * + * Lists the decrypted value of the specified named value of the secret + * resource. This is a privileged operation. + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {string} secretValueResourceName The name of the secret resource + * value which is typically the version identifier for the value. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SecretValue} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _show(secretResourceName, secretValueResourceName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '6.4-preview'; + // Validate + try { + if (secretResourceName === null || secretResourceName === undefined || typeof secretResourceName.valueOf() !== 'string') { + throw new Error('secretResourceName cannot be null or undefined and it must be of type string.'); + } + if (secretValueResourceName === null || secretValueResourceName === undefined || typeof secretValueResourceName.valueOf() !== 'string') { + throw new Error('secretValueResourceName cannot be null or undefined and it must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}/list_value'; + requestUrl = requestUrl.replace('{secretResourceName}', secretResourceName); + requestUrl = requestUrl.replace('{secretValueResourceName}', secretValueResourceName); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SecretValue']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a MeshSecretValue. */ +class MeshSecretValue { + /** + * Create a MeshSecretValue. + * @param {ServiceFabricClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._addValue = _addValue; + this._get = _get; + this._deleteMethod = _deleteMethod; + this._list = _list; + this._show = _show; + } + + /** + * @summary Adds the specified value as a new version of the specified secret + * resource. + * + * Creates a new value of the specified secret resource. The name of the value + * is typically the version identifier. Once created the value cannot be + * changed. + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {string} secretValueResourceName The name of the secret resource + * value which is typically the version identifier for the value. + * + * @param {object} secretValueResourceDescription Description for creating a + * value of a secret resource. + * + * @param {string} secretValueResourceDescription.name Version identifier of + * the secret value. + * + * @param {string} [secretValueResourceDescription.value] The actual value of + * the secret. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + addValueWithHttpOperationResponse(secretResourceName, secretValueResourceName, secretValueResourceDescription, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._addValue(secretResourceName, secretValueResourceName, secretValueResourceDescription, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Adds the specified value as a new version of the specified secret + * resource. + * + * Creates a new value of the specified secret resource. The name of the value + * is typically the version identifier. Once created the value cannot be + * changed. + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {string} secretValueResourceName The name of the secret resource + * value which is typically the version identifier for the value. + * + * @param {object} secretValueResourceDescription Description for creating a + * value of a secret resource. + * + * @param {string} secretValueResourceDescription.name Version identifier of + * the secret value. + * + * @param {string} [secretValueResourceDescription.value] The actual value of + * the secret. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {SecretValueResourceDescription} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SecretValueResourceDescription} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + addValue(secretResourceName, secretValueResourceName, secretValueResourceDescription, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._addValue(secretResourceName, secretValueResourceName, secretValueResourceDescription, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._addValue(secretResourceName, secretValueResourceName, secretValueResourceDescription, options, optionalCallback); + } + } + + /** + * @summary Gets the specified secret value resource. + * + * Get the information about the specified named secret value resources. The + * information does not include the actual value of the secret. + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {string} secretValueResourceName The name of the secret resource + * value which is typically the version identifier for the value. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getWithHttpOperationResponse(secretResourceName, secretValueResourceName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(secretResourceName, secretValueResourceName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets the specified secret value resource. + * + * Get the information about the specified named secret value resources. The + * information does not include the actual value of the secret. + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {string} secretValueResourceName The name of the secret resource + * value which is typically the version identifier for the value. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {SecretValueResourceDescription} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SecretValueResourceDescription} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + get(secretResourceName, secretValueResourceName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._get(secretResourceName, secretValueResourceName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(secretResourceName, secretValueResourceName, options, optionalCallback); + } + } + + /** + * @summary Deletes the specified value of the named secret resource. + * + * Deletes the secret value resource identified by the name. The name of the + * resource is typically the version associated with that value. Deletion will + * fail if the specified value is in use. + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {string} secretValueResourceName The name of the secret resource + * value which is typically the version identifier for the value. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + deleteMethodWithHttpOperationResponse(secretResourceName, secretValueResourceName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(secretResourceName, secretValueResourceName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Deletes the specified value of the named secret resource. + * + * Deletes the secret value resource identified by the name. The name of the + * resource is typically the version associated with that value. Deletion will + * fail if the specified value is in use. + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {string} secretValueResourceName The name of the secret resource + * value which is typically the version identifier for the value. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(secretResourceName, secretValueResourceName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteMethod(secretResourceName, secretValueResourceName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(secretResourceName, secretValueResourceName, options, optionalCallback); + } + } + + /** + * @summary List names of all values of the the specified secret resource. + * + * Gets information about all secret value resources of the specified secret + * resource. The information includes the names of the secret value resources, + * but not the actual values. + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listWithHttpOperationResponse(secretResourceName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._list(secretResourceName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary List names of all values of the the specified secret resource. + * + * Gets information about all secret value resources of the specified secret + * resource. The information includes the names of the secret value resources, + * but not the actual values. + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {PagedSecretValueResourceDescriptionList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedSecretValueResourceDescriptionList} for + * more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + list(secretResourceName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._list(secretResourceName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._list(secretResourceName, options, optionalCallback); + } + } + + /** + * @summary Lists the specified value of the secret resource. + * + * Lists the decrypted value of the specified named value of the secret + * resource. This is a privileged operation. + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {string} secretValueResourceName The name of the secret resource + * value which is typically the version identifier for the value. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + showWithHttpOperationResponse(secretResourceName, secretValueResourceName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._show(secretResourceName, secretValueResourceName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Lists the specified value of the secret resource. + * + * Lists the decrypted value of the specified named value of the secret + * resource. This is a privileged operation. + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {string} secretValueResourceName The name of the secret resource + * value which is typically the version identifier for the value. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {SecretValue} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SecretValue} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + show(secretResourceName, secretValueResourceName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._show(secretResourceName, secretValueResourceName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._show(secretResourceName, secretValueResourceName, options, optionalCallback); + } + } + +} + +module.exports = MeshSecretValue; diff --git a/lib/services/serviceFabric/lib/operations/meshService.js b/lib/services/serviceFabric/lib/operations/meshService.js new file mode 100644 index 0000000000..53e26058b7 --- /dev/null +++ b/lib/services/serviceFabric/lib/operations/meshService.js @@ -0,0 +1,476 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const WebResource = msRest.WebResource; + +/** + * @summary Gets the Service resource with the given name. + * + * Gets the information about the Service resource with the given name. The + * information include the description and other properties of the Service. + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {string} serviceResourceName The identity of the service. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ServiceResourceDescription} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _get(applicationResourceName, serviceResourceName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '6.4-preview'; + // Validate + try { + if (applicationResourceName === null || applicationResourceName === undefined || typeof applicationResourceName.valueOf() !== 'string') { + throw new Error('applicationResourceName cannot be null or undefined and it must be of type string.'); + } + if (serviceResourceName === null || serviceResourceName === undefined || typeof serviceResourceName.valueOf() !== 'string') { + throw new Error('serviceResourceName cannot be null or undefined and it must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}'; + requestUrl = requestUrl.replace('{applicationResourceName}', applicationResourceName); + requestUrl = requestUrl.replace('{serviceResourceName}', serviceResourceName); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ServiceResourceDescription']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Lists all the service resources. + * + * Gets the information about all services of an application resource. The + * information include the description and other properties of the Service. + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedServiceResourceDescriptionList} for + * more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _list(applicationResourceName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '6.4-preview'; + // Validate + try { + if (applicationResourceName === null || applicationResourceName === undefined || typeof applicationResourceName.valueOf() !== 'string') { + throw new Error('applicationResourceName cannot be null or undefined and it must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Resources/Applications/{applicationResourceName}/Services'; + requestUrl = requestUrl.replace('{applicationResourceName}', applicationResourceName); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['PagedServiceResourceDescriptionList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a MeshService. */ +class MeshService { + /** + * Create a MeshService. + * @param {ServiceFabricClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._get = _get; + this._list = _list; + } + + /** + * @summary Gets the Service resource with the given name. + * + * Gets the information about the Service resource with the given name. The + * information include the description and other properties of the Service. + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {string} serviceResourceName The identity of the service. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getWithHttpOperationResponse(applicationResourceName, serviceResourceName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(applicationResourceName, serviceResourceName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets the Service resource with the given name. + * + * Gets the information about the Service resource with the given name. The + * information include the description and other properties of the Service. + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {string} serviceResourceName The identity of the service. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ServiceResourceDescription} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ServiceResourceDescription} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + get(applicationResourceName, serviceResourceName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._get(applicationResourceName, serviceResourceName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(applicationResourceName, serviceResourceName, options, optionalCallback); + } + } + + /** + * @summary Lists all the service resources. + * + * Gets the information about all services of an application resource. The + * information include the description and other properties of the Service. + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listWithHttpOperationResponse(applicationResourceName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._list(applicationResourceName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Lists all the service resources. + * + * Gets the information about all services of an application resource. The + * information include the description and other properties of the Service. + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {PagedServiceResourceDescriptionList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedServiceResourceDescriptionList} for + * more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + list(applicationResourceName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._list(applicationResourceName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._list(applicationResourceName, options, optionalCallback); + } + } + +} + +module.exports = MeshService; diff --git a/lib/services/serviceFabric/lib/operations/meshServiceReplica.js b/lib/services/serviceFabric/lib/operations/meshServiceReplica.js new file mode 100644 index 0000000000..b0b646efc8 --- /dev/null +++ b/lib/services/serviceFabric/lib/operations/meshServiceReplica.js @@ -0,0 +1,499 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const WebResource = msRest.WebResource; + +/** + * @summary Gets the given replica of the service of an application. + * + * Gets the information about the service replica with the given name. The + * information include the description and other properties of the service + * replica. + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {string} serviceResourceName The identity of the service. + * + * @param {string} replicaName Service Fabric replica name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ServiceReplicaDescription} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _get(applicationResourceName, serviceResourceName, replicaName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '6.4-preview'; + // Validate + try { + if (applicationResourceName === null || applicationResourceName === undefined || typeof applicationResourceName.valueOf() !== 'string') { + throw new Error('applicationResourceName cannot be null or undefined and it must be of type string.'); + } + if (serviceResourceName === null || serviceResourceName === undefined || typeof serviceResourceName.valueOf() !== 'string') { + throw new Error('serviceResourceName cannot be null or undefined and it must be of type string.'); + } + if (replicaName === null || replicaName === undefined || typeof replicaName.valueOf() !== 'string') { + throw new Error('replicaName cannot be null or undefined and it must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas/{replicaName}'; + requestUrl = requestUrl.replace('{applicationResourceName}', applicationResourceName); + requestUrl = requestUrl.replace('{serviceResourceName}', serviceResourceName); + requestUrl = requestUrl.replace('{replicaName}', replicaName); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ServiceReplicaDescription']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Lists all the replicas of a service. + * + * Gets the information about all replicas of a service. The information + * include the description and other properties of the service replica. + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {string} serviceResourceName The identity of the service. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedServiceReplicaDescriptionList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _list(applicationResourceName, serviceResourceName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '6.4-preview'; + // Validate + try { + if (applicationResourceName === null || applicationResourceName === undefined || typeof applicationResourceName.valueOf() !== 'string') { + throw new Error('applicationResourceName cannot be null or undefined and it must be of type string.'); + } + if (serviceResourceName === null || serviceResourceName === undefined || typeof serviceResourceName.valueOf() !== 'string') { + throw new Error('serviceResourceName cannot be null or undefined and it must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas'; + requestUrl = requestUrl.replace('{applicationResourceName}', applicationResourceName); + requestUrl = requestUrl.replace('{serviceResourceName}', serviceResourceName); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['PagedServiceReplicaDescriptionList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a MeshServiceReplica. */ +class MeshServiceReplica { + /** + * Create a MeshServiceReplica. + * @param {ServiceFabricClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._get = _get; + this._list = _list; + } + + /** + * @summary Gets the given replica of the service of an application. + * + * Gets the information about the service replica with the given name. The + * information include the description and other properties of the service + * replica. + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {string} serviceResourceName The identity of the service. + * + * @param {string} replicaName Service Fabric replica name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getWithHttpOperationResponse(applicationResourceName, serviceResourceName, replicaName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(applicationResourceName, serviceResourceName, replicaName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets the given replica of the service of an application. + * + * Gets the information about the service replica with the given name. The + * information include the description and other properties of the service + * replica. + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {string} serviceResourceName The identity of the service. + * + * @param {string} replicaName Service Fabric replica name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ServiceReplicaDescription} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ServiceReplicaDescription} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + get(applicationResourceName, serviceResourceName, replicaName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._get(applicationResourceName, serviceResourceName, replicaName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(applicationResourceName, serviceResourceName, replicaName, options, optionalCallback); + } + } + + /** + * @summary Lists all the replicas of a service. + * + * Gets the information about all replicas of a service. The information + * include the description and other properties of the service replica. + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {string} serviceResourceName The identity of the service. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listWithHttpOperationResponse(applicationResourceName, serviceResourceName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._list(applicationResourceName, serviceResourceName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Lists all the replicas of a service. + * + * Gets the information about all replicas of a service. The information + * include the description and other properties of the service replica. + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {string} serviceResourceName The identity of the service. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {PagedServiceReplicaDescriptionList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedServiceReplicaDescriptionList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + list(applicationResourceName, serviceResourceName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._list(applicationResourceName, serviceResourceName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._list(applicationResourceName, serviceResourceName, options, optionalCallback); + } + } + +} + +module.exports = MeshServiceReplica; diff --git a/lib/services/serviceFabric/lib/operations/meshVolume.js b/lib/services/serviceFabric/lib/operations/meshVolume.js new file mode 100644 index 0000000000..f3b544bc9c --- /dev/null +++ b/lib/services/serviceFabric/lib/operations/meshVolume.js @@ -0,0 +1,966 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const WebResource = msRest.WebResource; + +/** + * @summary Creates or updates a Volume resource. + * + * Creates a Volume resource with the specified name, description and + * properties. If Volume resource with the same name exists, then it is updated + * with the specified description and properties. + * + * @param {string} volumeResourceName The identity of the volume. + * + * @param {object} volumeResourceDescription Description for creating a Volume + * resource. + * + * @param {string} volumeResourceDescription.name Name of the Volume resource. + * + * @param {string} [volumeResourceDescription.description] User readable + * description of the volume. + * + * @param {object} [volumeResourceDescription.azureFileParameters] This type + * describes a volume provided by an Azure Files file share. + * + * @param {string} volumeResourceDescription.azureFileParameters.accountName + * Name of the Azure storage account for the File Share. + * + * @param {string} [volumeResourceDescription.azureFileParameters.accountKey] + * Access key of the Azure storage account for the File Share. + * + * @param {string} volumeResourceDescription.azureFileParameters.shareName Name + * of the Azure Files file share that provides storage for the volume. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link VolumeResourceDescription} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _createOrUpdate(volumeResourceName, volumeResourceDescription, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '6.4-preview'; + if (volumeResourceDescription === null || volumeResourceDescription === undefined) + { + volumeResourceDescription = {}; + } + // Validate + try { + if (volumeResourceName === null || volumeResourceName === undefined || typeof volumeResourceName.valueOf() !== 'string') { + throw new Error('volumeResourceName cannot be null or undefined and it must be of type string.'); + } + if (volumeResourceDescription === null || volumeResourceDescription === undefined) { + throw new Error('volumeResourceDescription cannot be null or undefined.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Resources/Volumes/{volumeResourceName}'; + requestUrl = requestUrl.replace('{volumeResourceName}', volumeResourceName); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PUT'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (volumeResourceDescription !== null && volumeResourceDescription !== undefined) { + let requestModelMapper = new client.models['VolumeResourceDescription']().mapper(); + requestModel = client.serialize(requestModelMapper, volumeResourceDescription, 'volumeResourceDescription'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(volumeResourceDescription, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 201 && statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['VolumeResourceDescription']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['VolumeResourceDescription']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets the Volume resource with the given name. + * + * Gets the information about the Volume resource with the given name. The + * information include the description and other properties of the Volume. + * + * @param {string} volumeResourceName The identity of the volume. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link VolumeResourceDescription} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _get(volumeResourceName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '6.4-preview'; + // Validate + try { + if (volumeResourceName === null || volumeResourceName === undefined || typeof volumeResourceName.valueOf() !== 'string') { + throw new Error('volumeResourceName cannot be null or undefined and it must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Resources/Volumes/{volumeResourceName}'; + requestUrl = requestUrl.replace('{volumeResourceName}', volumeResourceName); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['VolumeResourceDescription']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Deletes the Volume resource. + * + * Deletes the Volume resource identified by the name. + * + * @param {string} volumeResourceName The identity of the volume. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _deleteMethod(volumeResourceName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '6.4-preview'; + // Validate + try { + if (volumeResourceName === null || volumeResourceName === undefined || typeof volumeResourceName.valueOf() !== 'string') { + throw new Error('volumeResourceName cannot be null or undefined and it must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Resources/Volumes/{volumeResourceName}'; + requestUrl = requestUrl.replace('{volumeResourceName}', volumeResourceName); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'DELETE'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Lists all the volume resources. + * + * Gets the information about all volume resources in a given resource group. + * The information include the description and other properties of the Volume. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedVolumeResourceDescriptionList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _list(options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '6.4-preview'; + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Resources/Volumes'; + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['PagedVolumeResourceDescriptionList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a MeshVolume. */ +class MeshVolume { + /** + * Create a MeshVolume. + * @param {ServiceFabricClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._createOrUpdate = _createOrUpdate; + this._get = _get; + this._deleteMethod = _deleteMethod; + this._list = _list; + } + + /** + * @summary Creates or updates a Volume resource. + * + * Creates a Volume resource with the specified name, description and + * properties. If Volume resource with the same name exists, then it is updated + * with the specified description and properties. + * + * @param {string} volumeResourceName The identity of the volume. + * + * @param {object} volumeResourceDescription Description for creating a Volume + * resource. + * + * @param {string} volumeResourceDescription.name Name of the Volume resource. + * + * @param {string} [volumeResourceDescription.description] User readable + * description of the volume. + * + * @param {object} [volumeResourceDescription.azureFileParameters] This type + * describes a volume provided by an Azure Files file share. + * + * @param {string} volumeResourceDescription.azureFileParameters.accountName + * Name of the Azure storage account for the File Share. + * + * @param {string} [volumeResourceDescription.azureFileParameters.accountKey] + * Access key of the Azure storage account for the File Share. + * + * @param {string} volumeResourceDescription.azureFileParameters.shareName Name + * of the Azure Files file share that provides storage for the volume. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + createOrUpdateWithHttpOperationResponse(volumeResourceName, volumeResourceDescription, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(volumeResourceName, volumeResourceDescription, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Creates or updates a Volume resource. + * + * Creates a Volume resource with the specified name, description and + * properties. If Volume resource with the same name exists, then it is updated + * with the specified description and properties. + * + * @param {string} volumeResourceName The identity of the volume. + * + * @param {object} volumeResourceDescription Description for creating a Volume + * resource. + * + * @param {string} volumeResourceDescription.name Name of the Volume resource. + * + * @param {string} [volumeResourceDescription.description] User readable + * description of the volume. + * + * @param {object} [volumeResourceDescription.azureFileParameters] This type + * describes a volume provided by an Azure Files file share. + * + * @param {string} volumeResourceDescription.azureFileParameters.accountName + * Name of the Azure storage account for the File Share. + * + * @param {string} [volumeResourceDescription.azureFileParameters.accountKey] + * Access key of the Azure storage account for the File Share. + * + * @param {string} volumeResourceDescription.azureFileParameters.shareName Name + * of the Azure Files file share that provides storage for the volume. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {VolumeResourceDescription} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link VolumeResourceDescription} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(volumeResourceName, volumeResourceDescription, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._createOrUpdate(volumeResourceName, volumeResourceDescription, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createOrUpdate(volumeResourceName, volumeResourceDescription, options, optionalCallback); + } + } + + /** + * @summary Gets the Volume resource with the given name. + * + * Gets the information about the Volume resource with the given name. The + * information include the description and other properties of the Volume. + * + * @param {string} volumeResourceName The identity of the volume. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getWithHttpOperationResponse(volumeResourceName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(volumeResourceName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets the Volume resource with the given name. + * + * Gets the information about the Volume resource with the given name. The + * information include the description and other properties of the Volume. + * + * @param {string} volumeResourceName The identity of the volume. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {VolumeResourceDescription} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link VolumeResourceDescription} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + get(volumeResourceName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._get(volumeResourceName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(volumeResourceName, options, optionalCallback); + } + } + + /** + * @summary Deletes the Volume resource. + * + * Deletes the Volume resource identified by the name. + * + * @param {string} volumeResourceName The identity of the volume. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + deleteMethodWithHttpOperationResponse(volumeResourceName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(volumeResourceName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Deletes the Volume resource. + * + * Deletes the Volume resource identified by the name. + * + * @param {string} volumeResourceName The identity of the volume. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(volumeResourceName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteMethod(volumeResourceName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(volumeResourceName, options, optionalCallback); + } + } + + /** + * @summary Lists all the volume resources. + * + * Gets the information about all volume resources in a given resource group. + * The information include the description and other properties of the Volume. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listWithHttpOperationResponse(options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._list(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Lists all the volume resources. + * + * Gets the information about all volume resources in a given resource group. + * The information include the description and other properties of the Volume. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {PagedVolumeResourceDescriptionList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedVolumeResourceDescriptionList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + list(options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._list(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._list(options, optionalCallback); + } + } + +} + +module.exports = MeshVolume; diff --git a/lib/services/serviceFabric/lib/serviceFabricClient.d.ts b/lib/services/serviceFabric/lib/serviceFabricClient.d.ts index fcef1840e3..e8cab3c2f3 100644 --- a/lib/services/serviceFabric/lib/serviceFabricClient.d.ts +++ b/lib/services/serviceFabric/lib/serviceFabricClient.d.ts @@ -10,6 +10,7 @@ import { ServiceClient, ServiceClientOptions, ServiceCallback, HttpOperationResponse } from 'ms-rest'; import * as models from "./models"; +import * as operations from "./operations"; export default class ServiceFabricClient extends ServiceClient { /** @@ -31,6 +32,17 @@ export default class ServiceFabricClient extends ServiceClient { */ constructor(baseUri?: string, options?: ServiceClientOptions); + // Operation groups + meshSecret: operations.MeshSecret; + meshSecretValue: operations.MeshSecretValue; + meshVolume: operations.MeshVolume; + meshNetwork: operations.MeshNetwork; + meshApplication: operations.MeshApplication; + meshService: operations.MeshService; + meshCodePackage: operations.MeshCodePackage; + meshServiceReplica: operations.MeshServiceReplica; + meshGateway: operations.MeshGateway; + /** * @summary Get the Service Fabric cluster manifest. @@ -1299,7 +1311,7 @@ export default class ServiceFabricClient extends ServiceClient { * of this property is false by default. * When clients report periodically, they should set RemoveWhenExpired false * (default). - * This way, is the reporter has issues (eg. deadlock) and can't report, the + * This way, if the reporter has issues (e.g. deadlock) and can't report, the * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * @@ -1422,7 +1434,7 @@ export default class ServiceFabricClient extends ServiceClient { * of this property is false by default. * When clients report periodically, they should set RemoveWhenExpired false * (default). - * This way, is the reporter has issues (eg. deadlock) and can't report, the + * This way, if the reporter has issues (e.g. deadlock) and can't report, the * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * @@ -2167,9 +2179,9 @@ export default class ServiceFabricClient extends ServiceClient { /** - * @summary Rollback the upgrade of a Service Fabric cluster. + * @summary Roll back the upgrade of a Service Fabric cluster. * - * Rollback the code or configuration upgrade of a Service Fabric cluster. + * Roll back the code or configuration upgrade of a Service Fabric cluster. * * @param {object} [options] Optional Parameters. * @@ -2190,9 +2202,9 @@ export default class ServiceFabricClient extends ServiceClient { rollbackClusterUpgradeWithHttpOperationResponse(options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Rollback the upgrade of a Service Fabric cluster. + * @summary Roll back the upgrade of a Service Fabric cluster. * - * Rollback the code or configuration upgrade of a Service Fabric cluster. + * Roll back the code or configuration upgrade of a Service Fabric cluster. * * @param {object} [options] Optional Parameters. * @@ -2757,11 +2769,14 @@ export default class ServiceFabricClient extends ServiceClient { * standalone cluster configuration upgrade. * * @param {string} clusterConfigurationUpgradeDescription.clusterConfig The - * cluster configuration. + * cluster configuration as a JSON string. For example, [this + * file](https://github.com/Azure-Samples/service-fabric-dotnet-standalone-cluster-configuration/blob/master/Samples/ClusterConfig.Unsecure.DevCluster.json) + * contains JSON describing the [nodes and other properties of the + * cluster](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-manifest). * * @param {moment.duration} * [clusterConfigurationUpgradeDescription.healthCheckRetryTimeout] The length - * of time between attempts to perform a health checks if the application or + * of time between attempts to perform health checks if the application or * cluster is not healthy. * * @param {moment.duration} @@ -2771,7 +2786,8 @@ export default class ServiceFabricClient extends ServiceClient { * * @param {moment.duration} * [clusterConfigurationUpgradeDescription.healthCheckStableDurationInSeconds] - * The length of time that the application or cluster must remain healthy. + * The length of time that the application or cluster must remain healthy + * before the upgrade proceeds to the next upgrade domain. * * @param {moment.duration} * [clusterConfigurationUpgradeDescription.upgradeDomainTimeoutInSeconds] The @@ -2840,11 +2856,14 @@ export default class ServiceFabricClient extends ServiceClient { * standalone cluster configuration upgrade. * * @param {string} clusterConfigurationUpgradeDescription.clusterConfig The - * cluster configuration. + * cluster configuration as a JSON string. For example, [this + * file](https://github.com/Azure-Samples/service-fabric-dotnet-standalone-cluster-configuration/blob/master/Samples/ClusterConfig.Unsecure.DevCluster.json) + * contains JSON describing the [nodes and other properties of the + * cluster](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-manifest). * * @param {moment.duration} * [clusterConfigurationUpgradeDescription.healthCheckRetryTimeout] The length - * of time between attempts to perform a health checks if the application or + * of time between attempts to perform health checks if the application or * cluster is not healthy. * * @param {moment.duration} @@ -2854,7 +2873,8 @@ export default class ServiceFabricClient extends ServiceClient { * * @param {moment.duration} * [clusterConfigurationUpgradeDescription.healthCheckStableDurationInSeconds] - * The length of time that the application or cluster must remain healthy. + * The length of time that the application or cluster must remain healthy + * before the upgrade proceeds to the next upgrade domain. * * @param {moment.duration} * [clusterConfigurationUpgradeDescription.upgradeDomainTimeoutInSeconds] The @@ -3431,6 +3451,73 @@ export default class ServiceFabricClient extends ServiceClient { getAadMetadata(options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** + * @summary Get the current Service Fabric cluster version. + * + * If a cluster upgrade is happening, then this API will return the lowest + * (older) version of the current and target cluster runtime versions. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getClusterVersionWithHttpOperationResponse(options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Get the current Service Fabric cluster version. + * + * If a cluster upgrade is happening, then this API will return the lowest + * (older) version of the current and target cluster runtime versions. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ClusterVersion} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ClusterVersion} [result] - The deserialized result object if an error did not occur. + * See {@link ClusterVersion} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getClusterVersion(options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getClusterVersion(callback: ServiceCallback): void; + getClusterVersion(options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + /** * @summary Gets the list of nodes in the Service Fabric cluster. * @@ -4074,7 +4161,7 @@ export default class ServiceFabricClient extends ServiceClient { * of this property is false by default. * When clients report periodically, they should set RemoveWhenExpired false * (default). - * This way, is the reporter has issues (eg. deadlock) and can't report, the + * This way, if the reporter has issues (e.g. deadlock) and can't report, the * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * @@ -4198,7 +4285,7 @@ export default class ServiceFabricClient extends ServiceClient { * of this property is false by default. * When clients report periodically, they should set RemoveWhenExpired false * (default). - * This way, is the reporter has issues (eg. deadlock) and can't report, the + * This way, if the reporter has issues (e.g. deadlock) and can't report, the * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * @@ -5275,7 +5362,7 @@ export default class ServiceFabricClient extends ServiceClient { * Gets the information about a specific service type that is supported by a * provisioned application type in a Service Fabric cluster. The provided * application type must exist. Otherwise, a 404 status is returned. A 204 - * response is returned if the specificed service type is not found in the + * response is returned if the specified service type is not found in the * cluster. * * @param {string} applicationTypeName The name of the application type. @@ -5310,7 +5397,7 @@ export default class ServiceFabricClient extends ServiceClient { * Gets the information about a specific service type that is supported by a * provisioned application type in a Service Fabric cluster. The provided * application type must exist. Otherwise, a 404 status is returned. A 204 - * response is returned if the specificed service type is not found in the + * response is returned if the specified service type is not found in the * cluster. * * @param {string} applicationTypeName The name of the application type. @@ -6633,8 +6720,8 @@ export default class ServiceFabricClient extends ServiceClient { * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. * * The percentage represents the maximum tolerated percentage of services that * can be unhealthy before the application is considered in error. @@ -6818,8 +6905,8 @@ export default class ServiceFabricClient extends ServiceClient { * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. * * The percentage represents the maximum tolerated percentage of services that * can be unhealthy before the application is considered in error. @@ -6959,7 +7046,7 @@ export default class ServiceFabricClient extends ServiceClient { * of this property is false by default. * When clients report periodically, they should set RemoveWhenExpired false * (default). - * This way, is the reporter has issues (eg. deadlock) and can't report, the + * This way, if the reporter has issues (e.g. deadlock) and can't report, the * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * @@ -7089,7 +7176,7 @@ export default class ServiceFabricClient extends ServiceClient { * of this property is false by default. * When clients report periodically, they should set RemoveWhenExpired false * (default). - * This way, is the reporter has issues (eg. deadlock) and can't report, the + * This way, if the reporter has issues (e.g. deadlock) and can't report, the * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * @@ -7302,8 +7389,8 @@ export default class ServiceFabricClient extends ServiceClient { * * @param {number} * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. * * The percentage represents the maximum tolerated percentage of services that * can be unhealthy before the application is considered in error. @@ -7492,8 +7579,8 @@ export default class ServiceFabricClient extends ServiceClient { * * @param {number} * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. * * The percentage represents the maximum tolerated percentage of services that * can be unhealthy before the application is considered in error. @@ -7713,8 +7800,8 @@ export default class ServiceFabricClient extends ServiceClient { * * @param {number} * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. * * The percentage represents the maximum tolerated percentage of services that * can be unhealthy before the application is considered in error. @@ -7903,8 +7990,8 @@ export default class ServiceFabricClient extends ServiceClient { * * @param {number} * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. * * The percentage represents the maximum tolerated percentage of services that * can be unhealthy before the application is considered in error. @@ -8795,8 +8882,8 @@ export default class ServiceFabricClient extends ServiceClient { * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. * * The percentage represents the maximum tolerated percentage of services that * can be unhealthy before the application is considered in error. @@ -8965,8 +9052,8 @@ export default class ServiceFabricClient extends ServiceClient { * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. * * The percentage represents the maximum tolerated percentage of services that * can be unhealthy before the application is considered in error. @@ -9117,7 +9204,7 @@ export default class ServiceFabricClient extends ServiceClient { * of this property is false by default. * When clients report periodically, they should set RemoveWhenExpired false * (default). - * This way, is the reporter has issues (eg. deadlock) and can't report, the + * This way, if the reporter has issues (e.g. deadlock) and can't report, the * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * @@ -9251,7 +9338,7 @@ export default class ServiceFabricClient extends ServiceClient { * of this property is false by default. * When clients report periodically, they should set RemoveWhenExpired false * (default). - * This way, is the reporter has issues (eg. deadlock) and can't report, the + * This way, if the reporter has issues (e.g. deadlock) and can't report, the * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * @@ -10749,8 +10836,8 @@ export default class ServiceFabricClient extends ServiceClient { * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. * * The percentage represents the maximum tolerated percentage of services that * can be unhealthy before the application is considered in error. @@ -10918,8 +11005,8 @@ export default class ServiceFabricClient extends ServiceClient { * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. * * The percentage represents the maximum tolerated percentage of services that * can be unhealthy before the application is considered in error. @@ -11066,7 +11153,7 @@ export default class ServiceFabricClient extends ServiceClient { * of this property is false by default. * When clients report periodically, they should set RemoveWhenExpired false * (default). - * This way, is the reporter has issues (eg. deadlock) and can't report, the + * This way, if the reporter has issues (e.g. deadlock) and can't report, the * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * @@ -11197,7 +11284,7 @@ export default class ServiceFabricClient extends ServiceClient { * of this property is false by default. * When clients report periodically, they should set RemoveWhenExpired false * (default). - * This way, is the reporter has issues (eg. deadlock) and can't report, the + * This way, if the reporter has issues (e.g. deadlock) and can't report, the * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * @@ -11287,6 +11374,11 @@ export default class ServiceFabricClient extends ServiceClient { * * @param {string} [options.partitionKeyValue] Partition key. This is required * if the partition scheme for the service is Int64Range or Named. + * This is not the partition ID, but rather, either the integer key value, or + * the name of the partition ID. + * For example, if your service is using ranged partitions from 0 to 10, then + * they PartitionKeyValue would be an + * integer in that range. Query service description to see the range or name. * * @param {string} [options.previousRspVersion] The value in the Version field * of the response that was received previously. This is required if the user @@ -11339,6 +11431,11 @@ export default class ServiceFabricClient extends ServiceClient { * * @param {string} [options.partitionKeyValue] Partition key. This is required * if the partition scheme for the service is Int64Range or Named. + * This is not the partition ID, but rather, either the integer key value, or + * the name of the partition ID. + * For example, if your service is using ranged partitions from 0 to 10, then + * they PartitionKeyValue would be an + * integer in that range. Query service description to see the range or name. * * @param {string} [options.previousRspVersion] The value in the Version field * of the response that was received previously. This is required if the user @@ -11933,8 +12030,8 @@ export default class ServiceFabricClient extends ServiceClient { * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. * * The percentage represents the maximum tolerated percentage of services that * can be unhealthy before the application is considered in error. @@ -12096,8 +12193,8 @@ export default class ServiceFabricClient extends ServiceClient { * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. * * The percentage represents the maximum tolerated percentage of services that * can be unhealthy before the application is considered in error. @@ -12238,7 +12335,7 @@ export default class ServiceFabricClient extends ServiceClient { * of this property is false by default. * When clients report periodically, they should set RemoveWhenExpired false * (default). - * This way, is the reporter has issues (eg. deadlock) and can't report, the + * This way, if the reporter has issues (e.g. deadlock) and can't report, the * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * @@ -12363,7 +12460,7 @@ export default class ServiceFabricClient extends ServiceClient { * of this property is false by default. * When clients report periodically, they should set RemoveWhenExpired false * (default). - * This way, is the reporter has issues (eg. deadlock) and can't report, the + * This way, if the reporter has issues (e.g. deadlock) and can't report, the * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * @@ -14342,8 +14439,8 @@ export default class ServiceFabricClient extends ServiceClient { * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. * * The percentage represents the maximum tolerated percentage of services that * can be unhealthy before the application is considered in error. @@ -14473,8 +14570,8 @@ export default class ServiceFabricClient extends ServiceClient { * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. * * The percentage represents the maximum tolerated percentage of services that * can be unhealthy before the application is considered in error. @@ -14615,7 +14712,7 @@ export default class ServiceFabricClient extends ServiceClient { * of this property is false by default. * When clients report periodically, they should set RemoveWhenExpired false * (default). - * This way, is the reporter has issues (eg. deadlock) and can't report, the + * This way, if the reporter has issues (e.g. deadlock) and can't report, the * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * @@ -14746,7 +14843,7 @@ export default class ServiceFabricClient extends ServiceClient { * of this property is false by default. * When clients report periodically, they should set RemoveWhenExpired false * (default). - * This way, is the reporter has issues (eg. deadlock) and can't report, the + * This way, if the reporter has issues (e.g. deadlock) and can't report, the * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * @@ -15694,8 +15791,8 @@ export default class ServiceFabricClient extends ServiceClient { * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. * * The percentage represents the maximum tolerated percentage of services that * can be unhealthy before the application is considered in error. @@ -15834,8 +15931,8 @@ export default class ServiceFabricClient extends ServiceClient { * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. * * The percentage represents the maximum tolerated percentage of services that * can be unhealthy before the application is considered in error. @@ -15982,7 +16079,7 @@ export default class ServiceFabricClient extends ServiceClient { * of this property is false by default. * When clients report periodically, they should set RemoveWhenExpired false * (default). - * This way, is the reporter has issues (eg. deadlock) and can't report, the + * This way, if the reporter has issues (e.g. deadlock) and can't report, the * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * @@ -16118,7 +16215,7 @@ export default class ServiceFabricClient extends ServiceClient { * of this property is false by default. * When clients report periodically, they should set RemoveWhenExpired false * (default). - * This way, is the reporter has issues (eg. deadlock) and can't report, the + * This way, if the reporter has issues (e.g. deadlock) and can't report, the * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * @@ -17401,8 +17498,8 @@ export default class ServiceFabricClient extends ServiceClient { * * @param {number} * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. * * The percentage represents the maximum tolerated percentage of services that * can be unhealthy before the application is considered in error. @@ -17597,8 +17694,8 @@ export default class ServiceFabricClient extends ServiceClient { * * @param {number} * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. * * The percentage represents the maximum tolerated percentage of services that * can be unhealthy before the application is considered in error. @@ -17651,6 +17748,76 @@ export default class ServiceFabricClient extends ServiceClient { startComposeDeploymentUpgrade(deploymentName: string, composeDeploymentUpgradeDescription: models.ComposeDeploymentUpgradeDescription, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** + * @summary Starts rolling back a compose deployment upgrade in the Service + * Fabric cluster. + * + * Rollback a service fabric compose deployment upgrade. + * + * @param {string} deploymentName The identity of the deployment. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + startRollbackComposeDeploymentUpgradeWithHttpOperationResponse(deploymentName: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Starts rolling back a compose deployment upgrade in the Service + * Fabric cluster. + * + * Rollback a service fabric compose deployment upgrade. + * + * @param {string} deploymentName The identity of the deployment. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + startRollbackComposeDeploymentUpgrade(deploymentName: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + startRollbackComposeDeploymentUpgrade(deploymentName: string, callback: ServiceCallback): void; + startRollbackComposeDeploymentUpgrade(deploymentName: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + /** * @summary Get the status of Chaos. * @@ -18674,7 +18841,7 @@ export default class ServiceFabricClient extends ServiceClient { * @summary Deletes existing image store content. * * Deletes existing image store content being found within the given image - * store relative path. This can be used to delete uploaded application + * store relative path. This command can be used to delete uploaded application * packages once they are provisioned. * * @param {string} contentPath Relative path to file or folder in the image @@ -18702,7 +18869,7 @@ export default class ServiceFabricClient extends ServiceClient { * @summary Deletes existing image store content. * * Deletes existing image store content being found within the given image - * store relative path. This can be used to delete uploaded application + * store relative path. This command can be used to delete uploaded application * packages once they are provisioned. * * @param {string} contentPath Relative path to file or folder in the image @@ -20389,7 +20556,7 @@ export default class ServiceFabricClient extends ServiceClient { * @summary Gets a list of user-induced fault operations filtered by provided * input. * - * Gets the a list of user-induced fault operations filtered by provided input. + * Gets the list of user-induced fault operations filtered by provided input. * * @param {number} typeFilter Used to filter on OperationType for user-induced * operations. @@ -20433,7 +20600,7 @@ export default class ServiceFabricClient extends ServiceClient { * @summary Gets a list of user-induced fault operations filtered by provided * input. * - * Gets the a list of user-induced fault operations filtered by provided input. + * Gets the list of user-induced fault operations filtered by provided input. * * @param {number} typeFilter Used to filter on OperationType for user-induced * operations. @@ -20522,8 +20689,8 @@ export default class ServiceFabricClient extends ServiceClient { * @param {uuid} operationId A GUID that identifies a call of this API. This * is passed into the corresponding GetProgress API * - * @param {boolean} force Indicates whether to gracefully rollback and clean up - * internal system state modified by executing the user-induced operation. + * @param {boolean} force Indicates whether to gracefully roll back and clean + * up internal system state modified by executing the user-induced operation. * * @param {object} [options] Optional Parameters. * @@ -20574,8 +20741,8 @@ export default class ServiceFabricClient extends ServiceClient { * @param {uuid} operationId A GUID that identifies a call of this API. This * is passed into the corresponding GetProgress API * - * @param {boolean} force Indicates whether to gracefully rollback and clean up - * internal system state modified by executing the user-induced operation. + * @param {boolean} force Indicates whether to gracefully roll back and clean + * up internal system state modified by executing the user-induced operation. * * @param {object} [options] Optional Parameters. * @@ -20652,6 +20819,12 @@ export default class ServiceFabricClient extends ServiceClient { * @param {string} backupPolicyDescription.storage.storageKind Polymorphic * Discriminator * + * @param {object} [backupPolicyDescription.retentionPolicy] Describes the + * policy to retain backups in storage. + * + * @param {string} backupPolicyDescription.retentionPolicy.retentionPolicyType + * Polymorphic Discriminator + * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -20709,6 +20882,12 @@ export default class ServiceFabricClient extends ServiceClient { * @param {string} backupPolicyDescription.storage.storageKind Polymorphic * Discriminator * + * @param {object} [backupPolicyDescription.retentionPolicy] Describes the + * policy to retain backups in storage. + * + * @param {string} backupPolicyDescription.retentionPolicy.retentionPolicyType + * Polymorphic Discriminator + * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -21130,6 +21309,12 @@ export default class ServiceFabricClient extends ServiceClient { * @param {string} backupPolicyDescription.storage.storageKind Polymorphic * Discriminator * + * @param {object} [backupPolicyDescription.retentionPolicy] Describes the + * policy to retain backups in storage. + * + * @param {string} backupPolicyDescription.retentionPolicy.retentionPolicyType + * Polymorphic Discriminator + * * @param {string} backupPolicyName The name of the backup policy. * * @param {object} [options] Optional Parameters. @@ -21188,6 +21373,12 @@ export default class ServiceFabricClient extends ServiceClient { * @param {string} backupPolicyDescription.storage.storageKind Polymorphic * Discriminator * + * @param {object} [backupPolicyDescription.retentionPolicy] Describes the + * policy to retain backups in storage. + * + * @param {string} backupPolicyDescription.retentionPolicy.retentionPolicyType + * Polymorphic Discriminator + * * @param {string} backupPolicyName The name of the backup policy. * * @param {object} [options] Optional Parameters. @@ -21349,6 +21540,13 @@ export default class ServiceFabricClient extends ServiceClient { * client is willing to wait for the requested operation to complete. The * default value for this parameter is 60 seconds. * + * @param {object} [options.disableBackupDescription] Specifies the parameters + * to disable backup for any backup entity. + * + * @param {boolean} options.disableBackupDescription.cleanBackup Boolean flag + * to delete backups. It can be set to true for deleting all the backups which + * were created for the backup entity that is getting disabled for backup. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -21358,7 +21556,7 @@ export default class ServiceFabricClient extends ServiceClient { * * @reject {Error|ServiceError} - The error object. */ - disableApplicationBackupWithHttpOperationResponse(applicationId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + disableApplicationBackupWithHttpOperationResponse(applicationId: string, options?: { timeout? : number, disableBackupDescription? : models.DisableBackupDescription, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * @summary Disables periodic backup of Service Fabric application. @@ -21381,6 +21579,13 @@ export default class ServiceFabricClient extends ServiceClient { * client is willing to wait for the requested operation to complete. The * default value for this parameter is 60 seconds. * + * @param {object} [options.disableBackupDescription] Specifies the parameters + * to disable backup for any backup entity. + * + * @param {boolean} options.disableBackupDescription.cleanBackup Boolean flag + * to delete backups. It can be set to true for deleting all the backups which + * were created for the backup entity that is getting disabled for backup. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -21405,9 +21610,9 @@ export default class ServiceFabricClient extends ServiceClient { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - disableApplicationBackup(applicationId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + disableApplicationBackup(applicationId: string, options?: { timeout? : number, disableBackupDescription? : models.DisableBackupDescription, customHeaders? : { [headerName: string]: string; } }): Promise; disableApplicationBackup(applicationId: string, callback: ServiceCallback): void; - disableApplicationBackup(applicationId: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + disableApplicationBackup(applicationId: string, options: { timeout? : number, disableBackupDescription? : models.DisableBackupDescription, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -21977,6 +22182,13 @@ export default class ServiceFabricClient extends ServiceClient { * * @param {object} [options] Optional Parameters. * + * @param {object} [options.disableBackupDescription] Specifies the parameters + * to disable backup for any backup entity. + * + * @param {boolean} options.disableBackupDescription.cleanBackup Boolean flag + * to delete backups. It can be set to true for deleting all the backups which + * were created for the backup entity that is getting disabled for backup. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -21991,7 +22203,7 @@ export default class ServiceFabricClient extends ServiceClient { * * @reject {Error|ServiceError} - The error object. */ - disableServiceBackupWithHttpOperationResponse(serviceId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + disableServiceBackupWithHttpOperationResponse(serviceId: string, options?: { disableBackupDescription? : models.DisableBackupDescription, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * @summary Disables periodic backup of Service Fabric service which was @@ -22013,6 +22225,13 @@ export default class ServiceFabricClient extends ServiceClient { * * @param {object} [options] Optional Parameters. * + * @param {object} [options.disableBackupDescription] Specifies the parameters + * to disable backup for any backup entity. + * + * @param {boolean} options.disableBackupDescription.cleanBackup Boolean flag + * to delete backups. It can be set to true for deleting all the backups which + * were created for the backup entity that is getting disabled for backup. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -22042,9 +22261,9 @@ export default class ServiceFabricClient extends ServiceClient { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - disableServiceBackup(serviceId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + disableServiceBackup(serviceId: string, options?: { disableBackupDescription? : models.DisableBackupDescription, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; disableServiceBackup(serviceId: string, callback: ServiceCallback): void; - disableServiceBackup(serviceId: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + disableServiceBackup(serviceId: string, options: { disableBackupDescription? : models.DisableBackupDescription, timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -22588,6 +22807,13 @@ export default class ServiceFabricClient extends ServiceClient { * * @param {object} [options] Optional Parameters. * + * @param {object} [options.disableBackupDescription] Specifies the parameters + * to disable backup for any backup entity. + * + * @param {boolean} options.disableBackupDescription.cleanBackup Boolean flag + * to delete backups. It can be set to true for deleting all the backups which + * were created for the backup entity that is getting disabled for backup. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -22602,7 +22828,7 @@ export default class ServiceFabricClient extends ServiceClient { * * @reject {Error|ServiceError} - The error object. */ - disablePartitionBackupWithHttpOperationResponse(partitionId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + disablePartitionBackupWithHttpOperationResponse(partitionId: string, options?: { disableBackupDescription? : models.DisableBackupDescription, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * @summary Disables periodic backup of Service Fabric partition which was @@ -22618,6 +22844,13 @@ export default class ServiceFabricClient extends ServiceClient { * * @param {object} [options] Optional Parameters. * + * @param {object} [options.disableBackupDescription] Specifies the parameters + * to disable backup for any backup entity. + * + * @param {boolean} options.disableBackupDescription.cleanBackup Boolean flag + * to delete backups. It can be set to true for deleting all the backups which + * were created for the backup entity that is getting disabled for backup. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -22647,9 +22880,9 @@ export default class ServiceFabricClient extends ServiceClient { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - disablePartitionBackup(partitionId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + disablePartitionBackup(partitionId: string, options?: { disableBackupDescription? : models.DisableBackupDescription, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; disablePartitionBackup(partitionId: string, callback: ServiceCallback): void; - disablePartitionBackup(partitionId: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + disablePartitionBackup(partitionId: string, options: { disableBackupDescription? : models.DisableBackupDescription, timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -25622,748 +25855,6 @@ export default class ServiceFabricClient extends ServiceClient { getCorrelatedEventList(eventInstanceId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; getCorrelatedEventList(eventInstanceId: string, callback: ServiceCallback): void; getCorrelatedEventList(eventInstanceId: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * @summary Creates or updates an application resource. - * - * Creates an application with the specified name and description. If an - * application with the same name already exists, then its description are - * updated to the one indicated in this request. - * - * @param {string} applicationResourceName Service Fabric application resource - * name. - * - * @param {object} applicationResourceDescription Description for creating an - * application resource. - * - * @param {string} [applicationResourceDescription.description] User readable - * description of the application. - * - * @param {string} [applicationResourceDescription.debugParams] Internal use. - * - * @param {array} [applicationResourceDescription.services] describes the - * services in the application. - * - * @param {object} [applicationResourceDescription.diagnostics] Describes the - * diagnostics definition and usage for an application resource. - * - * @param {array} [applicationResourceDescription.diagnostics.sinks] List of - * supported sinks that can be referenced. - * - * @param {boolean} [applicationResourceDescription.diagnostics.enabled] Status - * of whether or not sinks are enabled. - * - * @param {array} [applicationResourceDescription.diagnostics.defaultSinkRefs] - * The sinks to be used if diagnostics is enabled. Sink choices can be - * overridden at the service and code package level. - * - * @param {string} applicationResourceDescription.name Application resource - * name. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - createApplicationResourceWithHttpOperationResponse(applicationResourceName: string, applicationResourceDescription: models.ApplicationResourceDescription, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * @summary Creates or updates an application resource. - * - * Creates an application with the specified name and description. If an - * application with the same name already exists, then its description are - * updated to the one indicated in this request. - * - * @param {string} applicationResourceName Service Fabric application resource - * name. - * - * @param {object} applicationResourceDescription Description for creating an - * application resource. - * - * @param {string} [applicationResourceDescription.description] User readable - * description of the application. - * - * @param {string} [applicationResourceDescription.debugParams] Internal use. - * - * @param {array} [applicationResourceDescription.services] describes the - * services in the application. - * - * @param {object} [applicationResourceDescription.diagnostics] Describes the - * diagnostics definition and usage for an application resource. - * - * @param {array} [applicationResourceDescription.diagnostics.sinks] List of - * supported sinks that can be referenced. - * - * @param {boolean} [applicationResourceDescription.diagnostics.enabled] Status - * of whether or not sinks are enabled. - * - * @param {array} [applicationResourceDescription.diagnostics.defaultSinkRefs] - * The sinks to be used if diagnostics is enabled. Sink choices can be - * overridden at the service and code package level. - * - * @param {string} applicationResourceDescription.name Application resource - * name. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {null} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {null} [result] - The deserialized result object if an error did not occur. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - createApplicationResource(applicationResourceName: string, applicationResourceDescription: models.ApplicationResourceDescription, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createApplicationResource(applicationResourceName: string, applicationResourceDescription: models.ApplicationResourceDescription, callback: ServiceCallback): void; - createApplicationResource(applicationResourceName: string, applicationResourceDescription: models.ApplicationResourceDescription, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * @summary Gets the application with the given name. - * - * Gets the application with the given name. This includes the information - * about the application's services and other runtime information. - * - * @param {string} applicationResourceName Service Fabric application resource - * name. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - getApplicationResourceWithHttpOperationResponse(applicationResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * @summary Gets the application with the given name. - * - * Gets the application with the given name. This includes the information - * about the application's services and other runtime information. - * - * @param {string} applicationResourceName Service Fabric application resource - * name. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {ApplicationResourceDescription} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {ApplicationResourceDescription} [result] - The deserialized result object if an error did not occur. - * See {@link ApplicationResourceDescription} for more - * information. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - getApplicationResource(applicationResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getApplicationResource(applicationResourceName: string, callback: ServiceCallback): void; - getApplicationResource(applicationResourceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * @summary Deletes the specified application. - * - * Deletes the application identified by the name. - * - * @param {string} applicationResourceName Service Fabric application resource - * name. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - deleteApplicationResourceWithHttpOperationResponse(applicationResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * @summary Deletes the specified application. - * - * Deletes the application identified by the name. - * - * @param {string} applicationResourceName Service Fabric application resource - * name. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {null} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {null} [result] - The deserialized result object if an error did not occur. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - deleteApplicationResource(applicationResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteApplicationResource(applicationResourceName: string, callback: ServiceCallback): void; - deleteApplicationResource(applicationResourceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * @summary Gets all the services in the application resource. - * - * The operation returns the service descriptions of all the services in the - * application resource. - * - * @param {string} applicationResourceName Service Fabric application resource - * name. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - getServicesWithHttpOperationResponse(applicationResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * @summary Gets all the services in the application resource. - * - * The operation returns the service descriptions of all the services in the - * application resource. - * - * @param {string} applicationResourceName Service Fabric application resource - * name. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {PagedServiceResourceDescriptionList} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {PagedServiceResourceDescriptionList} [result] - The deserialized result object if an error did not occur. - * See {@link PagedServiceResourceDescriptionList} for - * more information. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - getServices(applicationResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getServices(applicationResourceName: string, callback: ServiceCallback): void; - getServices(applicationResourceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * @summary Gets the description of the specified service in an application - * resource. - * - * Gets the description of the service resource. - * - * @param {string} applicationResourceName Service Fabric application resource - * name. - * - * @param {string} serviceResourceName Service Fabric service resource name. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - getServiceWithHttpOperationResponse(applicationResourceName: string, serviceResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * @summary Gets the description of the specified service in an application - * resource. - * - * Gets the description of the service resource. - * - * @param {string} applicationResourceName Service Fabric application resource - * name. - * - * @param {string} serviceResourceName Service Fabric service resource name. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {ServiceResourceDescription} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {ServiceResourceDescription} [result] - The deserialized result object if an error did not occur. - * See {@link ServiceResourceDescription} for more - * information. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - getService(applicationResourceName: string, serviceResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getService(applicationResourceName: string, serviceResourceName: string, callback: ServiceCallback): void; - getService(applicationResourceName: string, serviceResourceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * @summary Gets replicas of a given service in an applciation resource. - * - * Gets the information about all replicas of a given service of an - * application. The information includes the runtime properties of the replica - * instance. - * - * @param {string} applicationResourceName Service Fabric application resource - * name. - * - * @param {string} serviceResourceName Service Fabric service resource name. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - getReplicasWithHttpOperationResponse(applicationResourceName: string, serviceResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * @summary Gets replicas of a given service in an applciation resource. - * - * Gets the information about all replicas of a given service of an - * application. The information includes the runtime properties of the replica - * instance. - * - * @param {string} applicationResourceName Service Fabric application resource - * name. - * - * @param {string} serviceResourceName Service Fabric service resource name. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {PagedServiceResourceReplicaDescriptionList} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {PagedServiceResourceReplicaDescriptionList} [result] - The deserialized result object if an error did not occur. - * See {@link PagedServiceResourceReplicaDescriptionList} - * for more information. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - getReplicas(applicationResourceName: string, serviceResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getReplicas(applicationResourceName: string, serviceResourceName: string, callback: ServiceCallback): void; - getReplicas(applicationResourceName: string, serviceResourceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * @summary Gets a specific replica of a given service in an application - * resource. - * - * Gets the information about the specified replica of a given service of an - * application. The information includes the runtime properties of the replica - * instance. - * - * @param {string} applicationResourceName Service Fabric application resource - * name. - * - * @param {string} serviceResourceName Service Fabric service resource name. - * - * @param {string} replicaName Service Fabric replica name. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - getReplicaWithHttpOperationResponse(applicationResourceName: string, serviceResourceName: string, replicaName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * @summary Gets a specific replica of a given service in an application - * resource. - * - * Gets the information about the specified replica of a given service of an - * application. The information includes the runtime properties of the replica - * instance. - * - * @param {string} applicationResourceName Service Fabric application resource - * name. - * - * @param {string} serviceResourceName Service Fabric service resource name. - * - * @param {string} replicaName Service Fabric replica name. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {ServiceResourceReplicaDescription} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {ServiceResourceReplicaDescription} [result] - The deserialized result object if an error did not occur. - * See {@link ServiceResourceReplicaDescription} for more - * information. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - getReplica(applicationResourceName: string, serviceResourceName: string, replicaName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getReplica(applicationResourceName: string, serviceResourceName: string, replicaName: string, callback: ServiceCallback): void; - getReplica(applicationResourceName: string, serviceResourceName: string, replicaName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * @summary Creates or updates a volume resource. - * - * Creates a volume resource with the specified name and description. If a - * volume with the same name already exists, then its description is updated to - * the one indicated in this request. - * - * @param {string} volumeResourceName Service Fabric volume resource name. - * - * @param {object} volumeResourceDescription Description for creating a volume - * resource. - * - * @param {string} [volumeResourceDescription.description] User readable - * description of the volume. - * - * @param {object} [volumeResourceDescription.azureFileParameters] This type - * describes a volume provided by an Azure Files file share. - * - * @param {string} volumeResourceDescription.azureFileParameters.accountName - * Name of the Azure storage account for the File Share. - * - * @param {string} [volumeResourceDescription.azureFileParameters.accountKey] - * Access key of the Azure storage account for the File Share. - * - * @param {string} volumeResourceDescription.azureFileParameters.shareName Name - * of the Azure Files file share that provides storage for the volume. - * - * @param {string} volumeResourceDescription.name Volume resource name. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - createVolumeResourceWithHttpOperationResponse(volumeResourceName: string, volumeResourceDescription: models.VolumeResourceDescription, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * @summary Creates or updates a volume resource. - * - * Creates a volume resource with the specified name and description. If a - * volume with the same name already exists, then its description is updated to - * the one indicated in this request. - * - * @param {string} volumeResourceName Service Fabric volume resource name. - * - * @param {object} volumeResourceDescription Description for creating a volume - * resource. - * - * @param {string} [volumeResourceDescription.description] User readable - * description of the volume. - * - * @param {object} [volumeResourceDescription.azureFileParameters] This type - * describes a volume provided by an Azure Files file share. - * - * @param {string} volumeResourceDescription.azureFileParameters.accountName - * Name of the Azure storage account for the File Share. - * - * @param {string} [volumeResourceDescription.azureFileParameters.accountKey] - * Access key of the Azure storage account for the File Share. - * - * @param {string} volumeResourceDescription.azureFileParameters.shareName Name - * of the Azure Files file share that provides storage for the volume. - * - * @param {string} volumeResourceDescription.name Volume resource name. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {null} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {null} [result] - The deserialized result object if an error did not occur. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - createVolumeResource(volumeResourceName: string, volumeResourceDescription: models.VolumeResourceDescription, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createVolumeResource(volumeResourceName: string, volumeResourceDescription: models.VolumeResourceDescription, callback: ServiceCallback): void; - createVolumeResource(volumeResourceName: string, volumeResourceDescription: models.VolumeResourceDescription, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * @summary Gets the volume resource. - * - * Gets the information about the volume resource with a given name. This - * information includes the volume description and other runtime information. - * - * @param {string} volumeResourceName Service Fabric volume resource name. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - getVolumeResourceWithHttpOperationResponse(volumeResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * @summary Gets the volume resource. - * - * Gets the information about the volume resource with a given name. This - * information includes the volume description and other runtime information. - * - * @param {string} volumeResourceName Service Fabric volume resource name. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {VolumeResourceDescription} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {VolumeResourceDescription} [result] - The deserialized result object if an error did not occur. - * See {@link VolumeResourceDescription} for more - * information. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - getVolumeResource(volumeResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getVolumeResource(volumeResourceName: string, callback: ServiceCallback): void; - getVolumeResource(volumeResourceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * @summary Deletes the volume resource. - * - * Deletes the volume identified by the name. - * - * @param {string} volumeResourceName Service Fabric volume resource name. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - deleteVolumeResourceWithHttpOperationResponse(volumeResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * @summary Deletes the volume resource. - * - * Deletes the volume identified by the name. - * - * @param {string} volumeResourceName Service Fabric volume resource name. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {null} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {null} [result] - The deserialized result object if an error did not occur. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - deleteVolumeResource(volumeResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteVolumeResource(volumeResourceName: string, callback: ServiceCallback): void; - deleteVolumeResource(volumeResourceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } export { ServiceFabricClient, models as ServiceFabricModels }; diff --git a/lib/services/serviceFabric/lib/serviceFabricClient.js b/lib/services/serviceFabric/lib/serviceFabricClient.js index f1e08a0de1..cf54504851 100644 --- a/lib/services/serviceFabric/lib/serviceFabricClient.js +++ b/lib/services/serviceFabric/lib/serviceFabricClient.js @@ -19,6 +19,7 @@ const ServiceClient = msRest.ServiceClient; const WebResource = msRest.WebResource; const models = require('./models'); +const operations = require('./operations'); /** @@ -1348,7 +1349,7 @@ function _getClusterHealthChunkUsingPolicyAndAdvancedFilters(options, callback) * of this property is false by default. * When clients report periodically, they should set RemoveWhenExpired false * (default). - * This way, is the reporter has issues (eg. deadlock) and can't report, the + * This way, if the reporter has issues (e.g. deadlock) and can't report, the * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * @@ -2916,9 +2917,9 @@ function _unprovisionCluster(unprovisionFabricDescription, options, callback) { } /** - * @summary Rollback the upgrade of a Service Fabric cluster. + * @summary Roll back the upgrade of a Service Fabric cluster. * - * Rollback the code or configuration upgrade of a Service Fabric cluster. + * Roll back the code or configuration upgrade of a Service Fabric cluster. * * @param {object} [options] Optional Parameters. * @@ -3529,11 +3530,14 @@ function _startClusterUpgrade(startClusterUpgradeDescription, options, callback) * standalone cluster configuration upgrade. * * @param {string} clusterConfigurationUpgradeDescription.clusterConfig The - * cluster configuration. + * cluster configuration as a JSON string. For example, [this + * file](https://github.com/Azure-Samples/service-fabric-dotnet-standalone-cluster-configuration/blob/master/Samples/ClusterConfig.Unsecure.DevCluster.json) + * contains JSON describing the [nodes and other properties of the + * cluster](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-manifest). * * @param {moment.duration} * [clusterConfigurationUpgradeDescription.healthCheckRetryTimeout] The length - * of time between attempts to perform a health checks if the application or + * of time between attempts to perform health checks if the application or * cluster is not healthy. * * @param {moment.duration} @@ -3543,7 +3547,8 @@ function _startClusterUpgrade(startClusterUpgradeDescription, options, callback) * * @param {moment.duration} * [clusterConfigurationUpgradeDescription.healthCheckStableDurationInSeconds] - * The length of time that the application or cluster must remain healthy. + * The length of time that the application or cluster must remain healthy + * before the upgrade proceeds to the next upgrade domain. * * @param {moment.duration} * [clusterConfigurationUpgradeDescription.upgradeDomainTimeoutInSeconds] The @@ -4191,6 +4196,150 @@ function _getAadMetadata(options, callback) { }); } +/** + * @summary Get the current Service Fabric cluster version. + * + * If a cluster upgrade is happening, then this API will return the lowest + * (older) version of the current and target cluster runtime versions. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ClusterVersion} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getClusterVersion(options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.4'; + // Validate + try { + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + '$/GetClusterVersion'; + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ClusterVersion']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + /** * @summary Gets the list of nodes in the Service Fabric cluster. * @@ -5064,7 +5213,7 @@ function _getNodeHealthUsingPolicy(nodeName, options, callback) { * of this property is false by default. * When clients report periodically, they should set RemoveWhenExpired false * (default). - * This way, is the reporter has issues (eg. deadlock) and can't report, the + * This way, if the reporter has issues (e.g. deadlock) and can't report, the * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * @@ -6934,7 +7083,7 @@ function _getServiceTypeInfoList(applicationTypeName, applicationTypeVersion, op * Gets the information about a specific service type that is supported by a * provisioned application type in a Service Fabric cluster. The provided * application type must exist. Otherwise, a 404 status is returned. A 204 - * response is returned if the specificed service type is not found in the + * response is returned if the specified service type is not found in the * cluster. * * @param {string} applicationTypeName The name of the application type. @@ -8957,8 +9106,8 @@ function _getApplicationHealth(applicationId, options, callback) { * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. * * The percentage represents the maximum tolerated percentage of services that * can be unhealthy before the application is considered in error. @@ -9246,7 +9395,7 @@ function _getApplicationHealthUsingPolicy(applicationId, options, callback) { * of this property is false by default. * When clients report periodically, they should set RemoveWhenExpired false * (default). - * This way, is the reporter has issues (eg. deadlock) and can't report, the + * This way, if the reporter has issues (e.g. deadlock) and can't report, the * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * @@ -9571,8 +9720,8 @@ function _reportApplicationHealth(applicationId, healthInformation, options, cal * * @param {number} * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. * * The percentage represents the maximum tolerated percentage of services that * can be unhealthy before the application is considered in error. @@ -9970,8 +10119,8 @@ function _getApplicationUpgrade(applicationId, options, callback) { * * @param {number} * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. * * The percentage represents the maximum tolerated percentage of services that * can be unhealthy before the application is considered in error. @@ -11268,8 +11417,8 @@ function _getDeployedApplicationHealth(nodeName, applicationId, options, callbac * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. * * The percentage represents the maximum tolerated percentage of services that * can be unhealthy before the application is considered in error. @@ -11565,7 +11714,7 @@ function _getDeployedApplicationHealthUsingPolicy(nodeName, applicationId, optio * of this property is false by default. * When clients report periodically, they should set RemoveWhenExpired false * (default). - * This way, is the reporter has issues (eg. deadlock) and can't report, the + * This way, if the reporter has issues (e.g. deadlock) and can't report, the * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * @@ -13701,8 +13850,8 @@ function _getServiceHealth(serviceId, options, callback) { * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. * * The percentage represents the maximum tolerated percentage of services that * can be unhealthy before the application is considered in error. @@ -13990,7 +14139,7 @@ function _getServiceHealthUsingPolicy(serviceId, options, callback) { * of this property is false by default. * When clients report periodically, they should set RemoveWhenExpired false * (default). - * This way, is the reporter has issues (eg. deadlock) and can't report, the + * This way, if the reporter has issues (e.g. deadlock) and can't report, the * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * @@ -14192,6 +14341,11 @@ function _reportServiceHealth(serviceId, healthInformation, options, callback) { * * @param {string} [options.partitionKeyValue] Partition key. This is required * if the partition scheme for the service is Int64Range or Named. + * This is not the partition ID, but rather, either the integer key value, or + * the name of the partition ID. + * For example, if your service is using ranged partitions from 0 to 10, then + * they PartitionKeyValue would be an + * integer in that range. Query service description to see the range or name. * * @param {string} [options.previousRspVersion] The value in the Version field * of the response that was received previously. This is required if the user @@ -14418,7 +14572,7 @@ function _getPartitionInfoList(serviceId, options, callback) { } let continuationToken = (options && options.continuationToken !== undefined) ? options.continuationToken : undefined; let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; - let apiVersion = '6.0'; + let apiVersion = '6.4'; // Validate try { if (serviceId === null || serviceId === undefined || typeof serviceId.valueOf() !== 'string') { @@ -15184,8 +15338,8 @@ function _getPartitionHealth(partitionId, options, callback) { * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. * * The percentage represents the maximum tolerated percentage of services that * can be unhealthy before the application is considered in error. @@ -15467,7 +15621,7 @@ function _getPartitionHealthUsingPolicy(partitionId, options, callback) { * of this property is false by default. * When clients report periodically, they should set RemoveWhenExpired false * (default). - * This way, is the reporter has issues (eg. deadlock) and can't report, the + * This way, if the reporter has issues (e.g. deadlock) and can't report, the * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * @@ -18378,8 +18532,8 @@ function _getReplicaHealth(partitionId, replicaId, options, callback) { * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. * * The percentage represents the maximum tolerated percentage of services that * can be unhealthy before the application is considered in error. @@ -18651,7 +18805,7 @@ function _getReplicaHealthUsingPolicy(partitionId, replicaId, options, callback) * of this property is false by default. * When clients report periodically, they should set RemoveWhenExpired false * (default). - * This way, is the reporter has issues (eg. deadlock) and can't report, the + * This way, if the reporter has issues (e.g. deadlock) and can't report, the * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * @@ -20336,8 +20490,8 @@ function _getDeployedServicePackageHealth(nodeName, applicationId, servicePackag * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. * * The percentage represents the maximum tolerated percentage of services that * can be unhealthy before the application is considered in error. @@ -20619,7 +20773,7 @@ function _getDeployedServicePackageHealthUsingPolicy(nodeName, applicationId, se * of this property is false by default. * When clients report periodically, they should set RemoveWhenExpired false * (default). - * This way, is the reporter has issues (eg. deadlock) and can't report, the + * This way, if the reporter has issues (e.g. deadlock) and can't report, the * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * @@ -22724,8 +22878,8 @@ function _removeComposeDeployment(deploymentName, options, callback) { * * @param {number} * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. * * The percentage represents the maximum tolerated percentage of services that * can be unhealthy before the application is considered in error. @@ -22883,6 +23037,138 @@ function _startComposeDeploymentUpgrade(deploymentName, composeDeploymentUpgrade }); } +/** + * @summary Starts rolling back a compose deployment upgrade in the Service + * Fabric cluster. + * + * Rollback a service fabric compose deployment upgrade. + * + * @param {string} deploymentName The identity of the deployment. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _startRollbackComposeDeploymentUpgrade(deploymentName, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.4-preview'; + // Validate + try { + if (deploymentName === null || deploymentName === undefined || typeof deploymentName.valueOf() !== 'string') { + throw new Error('deploymentName cannot be null or undefined and it must be of type string.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'ComposeDeployments/{deploymentName}/$/RollbackUpgrade'; + requestUrl = requestUrl.replace('{deploymentName}', deploymentName); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + /** * @summary Get the status of Chaos. * @@ -24287,7 +24573,7 @@ function _getImageStoreContent(contentPath, options, callback) { * @summary Deletes existing image store content. * * Deletes existing image store content being found within the given image - * store relative path. This can be used to delete uploaded application + * store relative path. This command can be used to delete uploaded application * packages once they are provisioned. * * @param {string} contentPath Relative path to file or folder in the image @@ -27184,7 +27470,7 @@ function _getNodeTransitionProgress(nodeName, operationId, options, callback) { * @summary Gets a list of user-induced fault operations filtered by provided * input. * - * Gets the a list of user-induced fault operations filtered by provided input. + * Gets the list of user-induced fault operations filtered by provided input. * * @param {number} typeFilter Used to filter on OperationType for user-induced * operations. @@ -27396,8 +27682,8 @@ function _getFaultOperationList(typeFilter, stateFilter, options, callback) { * @param {uuid} operationId A GUID that identifies a call of this API. This * is passed into the corresponding GetProgress API * - * @param {boolean} force Indicates whether to gracefully rollback and clean up - * internal system state modified by executing the user-induced operation. + * @param {boolean} force Indicates whether to gracefully roll back and clean + * up internal system state modified by executing the user-induced operation. * * @param {object} [options] Optional Parameters. * @@ -27566,6 +27852,12 @@ function _cancelOperation(operationId, force, options, callback) { * @param {string} backupPolicyDescription.storage.storageKind Polymorphic * Discriminator * + * @param {object} [backupPolicyDescription.retentionPolicy] Describes the + * policy to retain backups in storage. + * + * @param {string} backupPolicyDescription.retentionPolicy.retentionPolicyType + * Polymorphic Discriminator + * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -27599,7 +27891,7 @@ function _createBackupPolicy(backupPolicyDescription, options, callback) { throw new Error('callback cannot be null.'); } let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; - let apiVersion = '6.2-preview'; + let apiVersion = '6.4'; // Validate try { if (backupPolicyDescription === null || backupPolicyDescription === undefined) { @@ -27746,7 +28038,7 @@ function _deleteBackupPolicy(backupPolicyName, options, callback) { throw new Error('callback cannot be null.'); } let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; - let apiVersion = '6.2-preview'; + let apiVersion = '6.4'; // Validate try { if (backupPolicyName === null || backupPolicyName === undefined || typeof backupPolicyName.valueOf() !== 'string') { @@ -27895,7 +28187,7 @@ function _getBackupPolicyList(options, callback) { let continuationToken = (options && options.continuationToken !== undefined) ? options.continuationToken : undefined; let maxResults = (options && options.maxResults !== undefined) ? options.maxResults : 0; let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; - let apiVersion = '6.2-preview'; + let apiVersion = '6.4'; // Validate try { if (continuationToken !== null && continuationToken !== undefined && typeof continuationToken.valueOf() !== 'string') { @@ -28059,7 +28351,7 @@ function _getBackupPolicyByName(backupPolicyName, options, callback) { throw new Error('callback cannot be null.'); } let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; - let apiVersion = '6.2-preview'; + let apiVersion = '6.4'; // Validate try { if (backupPolicyName === null || backupPolicyName === undefined || typeof backupPolicyName.valueOf() !== 'string') { @@ -28228,7 +28520,7 @@ function _getAllEntitiesBackedUpByPolicy(backupPolicyName, options, callback) { let continuationToken = (options && options.continuationToken !== undefined) ? options.continuationToken : undefined; let maxResults = (options && options.maxResults !== undefined) ? options.maxResults : 0; let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; - let apiVersion = '6.2-preview'; + let apiVersion = '6.4'; // Validate try { if (backupPolicyName === null || backupPolicyName === undefined || typeof backupPolicyName.valueOf() !== 'string') { @@ -28392,6 +28684,12 @@ function _getAllEntitiesBackedUpByPolicy(backupPolicyName, options, callback) { * @param {string} backupPolicyDescription.storage.storageKind Polymorphic * Discriminator * + * @param {object} [backupPolicyDescription.retentionPolicy] Describes the + * policy to retain backups in storage. + * + * @param {string} backupPolicyDescription.retentionPolicy.retentionPolicyType + * Polymorphic Discriminator + * * @param {string} backupPolicyName The name of the backup policy. * * @param {object} [options] Optional Parameters. @@ -28427,7 +28725,7 @@ function _updateBackupPolicy(backupPolicyDescription, backupPolicyName, options, throw new Error('callback cannot be null.'); } let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; - let apiVersion = '6.2-preview'; + let apiVersion = '6.4'; // Validate try { if (backupPolicyDescription === null || backupPolicyDescription === undefined) { @@ -28592,7 +28890,7 @@ function _enableApplicationBackup(applicationId, enableBackupDescription, option throw new Error('callback cannot be null.'); } let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; - let apiVersion = '6.2-preview'; + let apiVersion = '6.4'; // Validate try { if (applicationId === null || applicationId === undefined || typeof applicationId.valueOf() !== 'string') { @@ -28721,6 +29019,13 @@ function _enableApplicationBackup(applicationId, enableBackupDescription, option * client is willing to wait for the requested operation to complete. The * default value for this parameter is 60 seconds. * + * @param {object} [options.disableBackupDescription] Specifies the parameters + * to disable backup for any backup entity. + * + * @param {boolean} options.disableBackupDescription.cleanBackup Boolean flag + * to delete backups. It can be set to true for deleting all the backups which + * were created for the backup entity that is getting disabled for backup. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -28747,7 +29052,8 @@ function _disableApplicationBackup(applicationId, options, callback) { throw new Error('callback cannot be null.'); } let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; - let apiVersion = '6.2-preview'; + let disableBackupDescription = (options && options.disableBackupDescription !== undefined) ? options.disableBackupDescription : undefined; + let apiVersion = '6.4'; // Validate try { if (applicationId === null || applicationId === undefined || typeof applicationId.valueOf() !== 'string') { @@ -28797,7 +29103,21 @@ function _disableApplicationBackup(applicationId, options, callback) { } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (disableBackupDescription !== null && disableBackupDescription !== undefined) { + let requestModelMapper = new client.models['DisableBackupDescription']().mapper(); + requestModel = client.serialize(requestModelMapper, disableBackupDescription, 'disableBackupDescription'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(disableBackupDescription, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -28906,7 +29226,7 @@ function _getApplicationBackupConfigurationInfo(applicationId, options, callback let continuationToken = (options && options.continuationToken !== undefined) ? options.continuationToken : undefined; let maxResults = (options && options.maxResults !== undefined) ? options.maxResults : 0; let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; - let apiVersion = '6.2-preview'; + let apiVersion = '6.4'; // Validate try { if (applicationId === null || applicationId === undefined || typeof applicationId.valueOf() !== 'string') { @@ -29118,7 +29438,7 @@ function _getApplicationBackupList(applicationId, options, callback) { let endDateTimeFilter = (options && options.endDateTimeFilter !== undefined) ? options.endDateTimeFilter : undefined; let continuationToken = (options && options.continuationToken !== undefined) ? options.continuationToken : undefined; let maxResults = (options && options.maxResults !== undefined) ? options.maxResults : 0; - let apiVersion = '6.2-preview'; + let apiVersion = '6.4'; // Validate try { if (applicationId === null || applicationId === undefined || typeof applicationId.valueOf() !== 'string') { @@ -29314,7 +29634,7 @@ function _suspendApplicationBackup(applicationId, options, callback) { throw new Error('callback cannot be null.'); } let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; - let apiVersion = '6.2-preview'; + let apiVersion = '6.4'; // Validate try { if (applicationId === null || applicationId === undefined || typeof applicationId.valueOf() !== 'string') { @@ -29453,7 +29773,7 @@ function _resumeApplicationBackup(applicationId, options, callback) { throw new Error('callback cannot be null.'); } let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; - let apiVersion = '6.2-preview'; + let apiVersion = '6.4'; // Validate try { if (applicationId === null || applicationId === undefined || typeof applicationId.valueOf() !== 'string') { @@ -29604,7 +29924,7 @@ function _enableServiceBackup(serviceId, enableBackupDescription, options, callb throw new Error('callback cannot be null.'); } let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; - let apiVersion = '6.2-preview'; + let apiVersion = '6.4'; // Validate try { if (serviceId === null || serviceId === undefined || typeof serviceId.valueOf() !== 'string') { @@ -29732,6 +30052,13 @@ function _enableServiceBackup(serviceId, enableBackupDescription, options, callb * * @param {object} [options] Optional Parameters. * + * @param {object} [options.disableBackupDescription] Specifies the parameters + * to disable backup for any backup entity. + * + * @param {boolean} options.disableBackupDescription.cleanBackup Boolean flag + * to delete backups. It can be set to true for deleting all the backups which + * were created for the backup entity that is getting disabled for backup. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -29762,8 +30089,9 @@ function _disableServiceBackup(serviceId, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let disableBackupDescription = (options && options.disableBackupDescription !== undefined) ? options.disableBackupDescription : undefined; let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; - let apiVersion = '6.2-preview'; + let apiVersion = '6.4'; // Validate try { if (serviceId === null || serviceId === undefined || typeof serviceId.valueOf() !== 'string') { @@ -29813,7 +30141,21 @@ function _disableServiceBackup(serviceId, options, callback) { } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (disableBackupDescription !== null && disableBackupDescription !== undefined) { + let requestModelMapper = new client.models['DisableBackupDescription']().mapper(); + requestModel = client.serialize(requestModelMapper, disableBackupDescription, 'disableBackupDescription'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(disableBackupDescription, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -29921,7 +30263,7 @@ function _getServiceBackupConfigurationInfo(serviceId, options, callback) { let continuationToken = (options && options.continuationToken !== undefined) ? options.continuationToken : undefined; let maxResults = (options && options.maxResults !== undefined) ? options.maxResults : 0; let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; - let apiVersion = '6.2-preview'; + let apiVersion = '6.4'; // Validate try { if (serviceId === null || serviceId === undefined || typeof serviceId.valueOf() !== 'string') { @@ -30133,7 +30475,7 @@ function _getServiceBackupList(serviceId, options, callback) { let endDateTimeFilter = (options && options.endDateTimeFilter !== undefined) ? options.endDateTimeFilter : undefined; let continuationToken = (options && options.continuationToken !== undefined) ? options.continuationToken : undefined; let maxResults = (options && options.maxResults !== undefined) ? options.maxResults : 0; - let apiVersion = '6.2-preview'; + let apiVersion = '6.4'; // Validate try { if (serviceId === null || serviceId === undefined || typeof serviceId.valueOf() !== 'string') { @@ -30328,7 +30670,7 @@ function _suspendServiceBackup(serviceId, options, callback) { throw new Error('callback cannot be null.'); } let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; - let apiVersion = '6.2-preview'; + let apiVersion = '6.4'; // Validate try { if (serviceId === null || serviceId === undefined || typeof serviceId.valueOf() !== 'string') { @@ -30467,7 +30809,7 @@ function _resumeServiceBackup(serviceId, options, callback) { throw new Error('callback cannot be null.'); } let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; - let apiVersion = '6.2-preview'; + let apiVersion = '6.4'; // Validate try { if (serviceId === null || serviceId === undefined || typeof serviceId.valueOf() !== 'string') { @@ -30610,7 +30952,7 @@ function _enablePartitionBackup(partitionId, enableBackupDescription, options, c throw new Error('callback cannot be null.'); } let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; - let apiVersion = '6.2-preview'; + let apiVersion = '6.4'; // Validate try { if (partitionId === null || partitionId === undefined || typeof partitionId.valueOf() !== 'string' || !msRest.isValidUuid(partitionId)) { @@ -30732,6 +31074,13 @@ function _enablePartitionBackup(partitionId, enableBackupDescription, options, c * * @param {object} [options] Optional Parameters. * + * @param {object} [options.disableBackupDescription] Specifies the parameters + * to disable backup for any backup entity. + * + * @param {boolean} options.disableBackupDescription.cleanBackup Boolean flag + * to delete backups. It can be set to true for deleting all the backups which + * were created for the backup entity that is getting disabled for backup. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -30762,8 +31111,9 @@ function _disablePartitionBackup(partitionId, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let disableBackupDescription = (options && options.disableBackupDescription !== undefined) ? options.disableBackupDescription : undefined; let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; - let apiVersion = '6.2-preview'; + let apiVersion = '6.4'; // Validate try { if (partitionId === null || partitionId === undefined || typeof partitionId.valueOf() !== 'string' || !msRest.isValidUuid(partitionId)) { @@ -30813,7 +31163,21 @@ function _disablePartitionBackup(partitionId, options, callback) { } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (disableBackupDescription !== null && disableBackupDescription !== undefined) { + let requestModelMapper = new client.models['DisableBackupDescription']().mapper(); + requestModel = client.serialize(requestModelMapper, disableBackupDescription, 'disableBackupDescription'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(disableBackupDescription, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -30897,7 +31261,7 @@ function _getPartitionBackupConfigurationInfo(partitionId, options, callback) { throw new Error('callback cannot be null.'); } let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; - let apiVersion = '6.2-preview'; + let apiVersion = '6.4'; // Validate try { if (partitionId === null || partitionId === undefined || typeof partitionId.valueOf() !== 'string' || !msRest.isValidUuid(partitionId)) { @@ -31065,7 +31429,7 @@ function _getPartitionBackupList(partitionId, options, callback) { let latest = (options && options.latest !== undefined) ? options.latest : false; let startDateTimeFilter = (options && options.startDateTimeFilter !== undefined) ? options.startDateTimeFilter : undefined; let endDateTimeFilter = (options && options.endDateTimeFilter !== undefined) ? options.endDateTimeFilter : undefined; - let apiVersion = '6.2-preview'; + let apiVersion = '6.4'; // Validate try { if (partitionId === null || partitionId === undefined || typeof partitionId.valueOf() !== 'string' || !msRest.isValidUuid(partitionId)) { @@ -31234,7 +31598,7 @@ function _suspendPartitionBackup(partitionId, options, callback) { throw new Error('callback cannot be null.'); } let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; - let apiVersion = '6.2-preview'; + let apiVersion = '6.4'; // Validate try { if (partitionId === null || partitionId === undefined || typeof partitionId.valueOf() !== 'string' || !msRest.isValidUuid(partitionId)) { @@ -31367,7 +31731,7 @@ function _resumePartitionBackup(partitionId, options, callback) { throw new Error('callback cannot be null.'); } let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; - let apiVersion = '6.2-preview'; + let apiVersion = '6.4'; // Validate try { if (partitionId === null || partitionId === undefined || typeof partitionId.valueOf() !== 'string' || !msRest.isValidUuid(partitionId)) { @@ -31530,7 +31894,7 @@ function _backupPartition(partitionId, options, callback) { let backupPartitionDescription = (options && options.backupPartitionDescription !== undefined) ? options.backupPartitionDescription : undefined; let backupTimeout = (options && options.backupTimeout !== undefined) ? options.backupTimeout : 10; let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; - let apiVersion = '6.2-preview'; + let apiVersion = '6.4'; // Validate try { if (partitionId === null || partitionId === undefined || typeof partitionId.valueOf() !== 'string' || !msRest.isValidUuid(partitionId)) { @@ -31683,7 +32047,7 @@ function _getPartitionBackupProgress(partitionId, options, callback) { throw new Error('callback cannot be null.'); } let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; - let apiVersion = '6.2-preview'; + let apiVersion = '6.4'; // Validate try { if (partitionId === null || partitionId === undefined || typeof partitionId.valueOf() !== 'string' || !msRest.isValidUuid(partitionId)) { @@ -31866,7 +32230,7 @@ function _restorePartition(partitionId, restorePartitionDescription, options, ca } let restoreTimeout = (options && options.restoreTimeout !== undefined) ? options.restoreTimeout : 10; let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; - let apiVersion = '6.2-preview'; + let apiVersion = '6.4'; // Validate try { if (partitionId === null || partitionId === undefined || typeof partitionId.valueOf() !== 'string' || !msRest.isValidUuid(partitionId)) { @@ -32023,7 +32387,7 @@ function _getPartitionRestoreProgress(partitionId, options, callback) { throw new Error('callback cannot be null.'); } let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; - let apiVersion = '6.2-preview'; + let apiVersion = '6.4'; // Validate try { if (partitionId === null || partitionId === undefined || typeof partitionId.valueOf() !== 'string' || !msRest.isValidUuid(partitionId)) { @@ -32225,7 +32589,7 @@ function _getBackupsFromBackupLocation(getBackupByStorageQueryDescription, optio let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; let continuationToken = (options && options.continuationToken !== undefined) ? options.continuationToken : undefined; let maxResults = (options && options.maxResults !== undefined) ? options.maxResults : 0; - let apiVersion = '6.2-preview'; + let apiVersion = '6.4'; // Validate try { if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { @@ -33845,6 +34209,214 @@ function _getClusterEventList(startTimeUtc, endTimeUtc, options, callback) { let eventsTypesFilter = (options && options.eventsTypesFilter !== undefined) ? options.eventsTypesFilter : undefined; let excludeAnalysisEvents = (options && options.excludeAnalysisEvents !== undefined) ? options.excludeAnalysisEvents : undefined; let skipCorrelationLookup = (options && options.skipCorrelationLookup !== undefined) ? options.skipCorrelationLookup : undefined; + let apiVersion = '6.4'; + // Validate + try { + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + if (startTimeUtc === null || startTimeUtc === undefined || typeof startTimeUtc.valueOf() !== 'string') { + throw new Error('startTimeUtc cannot be null or undefined and it must be of type string.'); + } + if (endTimeUtc === null || endTimeUtc === undefined || typeof endTimeUtc.valueOf() !== 'string') { + throw new Error('endTimeUtc cannot be null or undefined and it must be of type string.'); + } + if (eventsTypesFilter !== null && eventsTypesFilter !== undefined && typeof eventsTypesFilter.valueOf() !== 'string') { + throw new Error('eventsTypesFilter must be of type string.'); + } + if (excludeAnalysisEvents !== null && excludeAnalysisEvents !== undefined && typeof excludeAnalysisEvents !== 'boolean') { + throw new Error('excludeAnalysisEvents must be of type boolean.'); + } + if (skipCorrelationLookup !== null && skipCorrelationLookup !== undefined && typeof skipCorrelationLookup !== 'boolean') { + throw new Error('skipCorrelationLookup must be of type boolean.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'EventsStore/Cluster/Events'; + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + queryParameters.push('StartTimeUtc=' + encodeURIComponent(startTimeUtc)); + queryParameters.push('EndTimeUtc=' + encodeURIComponent(endTimeUtc)); + if (eventsTypesFilter !== null && eventsTypesFilter !== undefined) { + queryParameters.push('EventsTypesFilter=' + encodeURIComponent(eventsTypesFilter)); + } + if (excludeAnalysisEvents !== null && excludeAnalysisEvents !== undefined) { + queryParameters.push('ExcludeAnalysisEvents=' + encodeURIComponent(excludeAnalysisEvents.toString())); + } + if (skipCorrelationLookup !== null && skipCorrelationLookup !== undefined) { + queryParameters.push('SkipCorrelationLookup=' + encodeURIComponent(skipCorrelationLookup.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ClusterEventElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ClusterEvent' + } + } + } + }; + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets all Containers-related events. + * + * The response is list of ContainerInstanceEvent objects. + * + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * @param {boolean} [options.skipCorrelationLookup] This param disables the + * search of CorrelatedEvents information if true is passed. otherwise the + * CorrelationEvents get processed and HasCorrelatedEvents field in every + * FabricEvent gets populated. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {array} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getContainersEventList(startTimeUtc, endTimeUtc, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let eventsTypesFilter = (options && options.eventsTypesFilter !== undefined) ? options.eventsTypesFilter : undefined; + let excludeAnalysisEvents = (options && options.excludeAnalysisEvents !== undefined) ? options.excludeAnalysisEvents : undefined; + let skipCorrelationLookup = (options && options.skipCorrelationLookup !== undefined) ? options.skipCorrelationLookup : undefined; let apiVersion = '6.2-preview'; // Validate try { @@ -33882,7 +34454,7 @@ function _getClusterEventList(startTimeUtc, endTimeUtc, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'EventsStore/Cluster/Events'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'EventsStore/Containers/Events'; let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (timeout !== null && timeout !== undefined) { @@ -33967,7 +34539,7 @@ function _getClusterEventList(startTimeUtc, endTimeUtc, options, callback) { name: 'Sequence', element: { required: false, - serializedName: 'ClusterEventElementType', + serializedName: 'ContainerInstanceEventElementType', type: { name: 'Composite', polymorphicDiscriminator: { @@ -33975,7 +34547,7 @@ function _getClusterEventList(startTimeUtc, endTimeUtc, options, callback) { clientName: 'kind' }, uberParent: 'FabricEvent', - className: 'ClusterEvent' + className: 'ContainerInstanceEvent' } } } @@ -33995,9 +34567,11 @@ function _getClusterEventList(startTimeUtc, endTimeUtc, options, callback) { } /** - * @summary Gets all Containers-related events. + * @summary Gets a Node-related events. * - * The response is list of ContainerInstanceEvent objects. + * The response is list of NodeEvent objects. + * + * @param {string} nodeName The name of the node. * * @param {string} startTimeUtc The start time of a lookup query in ISO UTC * yyyy-MM-ddTHH:mm:ssZ. @@ -34039,7 +34613,7 @@ function _getClusterEventList(startTimeUtc, endTimeUtc, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getContainersEventList(startTimeUtc, endTimeUtc, options, callback) { +function _getNodeEventList(nodeName, startTimeUtc, endTimeUtc, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -34053,9 +34627,12 @@ function _getContainersEventList(startTimeUtc, endTimeUtc, options, callback) { let eventsTypesFilter = (options && options.eventsTypesFilter !== undefined) ? options.eventsTypesFilter : undefined; let excludeAnalysisEvents = (options && options.excludeAnalysisEvents !== undefined) ? options.excludeAnalysisEvents : undefined; let skipCorrelationLookup = (options && options.skipCorrelationLookup !== undefined) ? options.skipCorrelationLookup : undefined; - let apiVersion = '6.2-preview'; + let apiVersion = '6.4'; // Validate try { + if (nodeName === null || nodeName === undefined || typeof nodeName.valueOf() !== 'string') { + throw new Error('nodeName cannot be null or undefined and it must be of type string.'); + } if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { throw new Error('timeout must be of type number.'); } @@ -34090,7 +34667,8 @@ function _getContainersEventList(startTimeUtc, endTimeUtc, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'EventsStore/Containers/Events'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'EventsStore/Nodes/{nodeName}/$/Events'; + requestUrl = requestUrl.replace('{nodeName}', encodeURIComponent(nodeName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (timeout !== null && timeout !== undefined) { @@ -34175,7 +34753,7 @@ function _getContainersEventList(startTimeUtc, endTimeUtc, options, callback) { name: 'Sequence', element: { required: false, - serializedName: 'ContainerInstanceEventElementType', + serializedName: 'NodeEventElementType', type: { name: 'Composite', polymorphicDiscriminator: { @@ -34183,7 +34761,7 @@ function _getContainersEventList(startTimeUtc, endTimeUtc, options, callback) { clientName: 'kind' }, uberParent: 'FabricEvent', - className: 'ContainerInstanceEvent' + className: 'NodeEvent' } } } @@ -34203,12 +34781,10 @@ function _getContainersEventList(startTimeUtc, endTimeUtc, options, callback) { } /** - * @summary Gets a Node-related events. + * @summary Gets all Nodes-related Events. * * The response is list of NodeEvent objects. * - * @param {string} nodeName The name of the node. - * * @param {string} startTimeUtc The start time of a lookup query in ISO UTC * yyyy-MM-ddTHH:mm:ssZ. * @@ -34249,7 +34825,7 @@ function _getContainersEventList(startTimeUtc, endTimeUtc, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getNodeEventList(nodeName, startTimeUtc, endTimeUtc, options, callback) { +function _getNodesEventList(startTimeUtc, endTimeUtc, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -34263,12 +34839,9 @@ function _getNodeEventList(nodeName, startTimeUtc, endTimeUtc, options, callback let eventsTypesFilter = (options && options.eventsTypesFilter !== undefined) ? options.eventsTypesFilter : undefined; let excludeAnalysisEvents = (options && options.excludeAnalysisEvents !== undefined) ? options.excludeAnalysisEvents : undefined; let skipCorrelationLookup = (options && options.skipCorrelationLookup !== undefined) ? options.skipCorrelationLookup : undefined; - let apiVersion = '6.2-preview'; + let apiVersion = '6.4'; // Validate try { - if (nodeName === null || nodeName === undefined || typeof nodeName.valueOf() !== 'string') { - throw new Error('nodeName cannot be null or undefined and it must be of type string.'); - } if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { throw new Error('timeout must be of type number.'); } @@ -34303,8 +34876,7 @@ function _getNodeEventList(nodeName, startTimeUtc, endTimeUtc, options, callback // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'EventsStore/Nodes/{nodeName}/$/Events'; - requestUrl = requestUrl.replace('{nodeName}', encodeURIComponent(nodeName)); + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'EventsStore/Nodes/Events'; let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (timeout !== null && timeout !== undefined) { @@ -34417,9 +34989,17 @@ function _getNodeEventList(nodeName, startTimeUtc, endTimeUtc, options, callback } /** - * @summary Gets all Nodes-related Events. + * @summary Gets an Application-related events. * - * The response is list of NodeEvent objects. + * The response is list of ApplicationEvent objects. + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * previous versions. * * @param {string} startTimeUtc The start time of a lookup query in ISO UTC * yyyy-MM-ddTHH:mm:ssZ. @@ -34461,7 +35041,7 @@ function _getNodeEventList(nodeName, startTimeUtc, endTimeUtc, options, callback * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getNodesEventList(startTimeUtc, endTimeUtc, options, callback) { +function _getApplicationEventList(applicationId, startTimeUtc, endTimeUtc, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -34475,9 +35055,12 @@ function _getNodesEventList(startTimeUtc, endTimeUtc, options, callback) { let eventsTypesFilter = (options && options.eventsTypesFilter !== undefined) ? options.eventsTypesFilter : undefined; let excludeAnalysisEvents = (options && options.excludeAnalysisEvents !== undefined) ? options.excludeAnalysisEvents : undefined; let skipCorrelationLookup = (options && options.skipCorrelationLookup !== undefined) ? options.skipCorrelationLookup : undefined; - let apiVersion = '6.2-preview'; + let apiVersion = '6.4'; // Validate try { + if (applicationId === null || applicationId === undefined || typeof applicationId.valueOf() !== 'string') { + throw new Error('applicationId cannot be null or undefined and it must be of type string.'); + } if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { throw new Error('timeout must be of type number.'); } @@ -34512,7 +35095,8 @@ function _getNodesEventList(startTimeUtc, endTimeUtc, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'EventsStore/Nodes/Events'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'EventsStore/Applications/{applicationId}/$/Events'; + requestUrl = requestUrl.replace('{applicationId}', applicationId); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (timeout !== null && timeout !== undefined) { @@ -34597,7 +35181,7 @@ function _getNodesEventList(startTimeUtc, endTimeUtc, options, callback) { name: 'Sequence', element: { required: false, - serializedName: 'NodeEventElementType', + serializedName: 'ApplicationEventElementType', type: { name: 'Composite', polymorphicDiscriminator: { @@ -34605,7 +35189,7 @@ function _getNodesEventList(startTimeUtc, endTimeUtc, options, callback) { clientName: 'kind' }, uberParent: 'FabricEvent', - className: 'NodeEvent' + className: 'ApplicationEvent' } } } @@ -34625,18 +35209,10 @@ function _getNodesEventList(startTimeUtc, endTimeUtc, options, callback) { } /** - * @summary Gets an Application-related events. + * @summary Gets all Applications-related events. * * The response is list of ApplicationEvent objects. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. - * * @param {string} startTimeUtc The start time of a lookup query in ISO UTC * yyyy-MM-ddTHH:mm:ssZ. * @@ -34677,7 +35253,7 @@ function _getNodesEventList(startTimeUtc, endTimeUtc, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getApplicationEventList(applicationId, startTimeUtc, endTimeUtc, options, callback) { +function _getApplicationsEventList(startTimeUtc, endTimeUtc, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -34691,12 +35267,9 @@ function _getApplicationEventList(applicationId, startTimeUtc, endTimeUtc, optio let eventsTypesFilter = (options && options.eventsTypesFilter !== undefined) ? options.eventsTypesFilter : undefined; let excludeAnalysisEvents = (options && options.excludeAnalysisEvents !== undefined) ? options.excludeAnalysisEvents : undefined; let skipCorrelationLookup = (options && options.skipCorrelationLookup !== undefined) ? options.skipCorrelationLookup : undefined; - let apiVersion = '6.2-preview'; + let apiVersion = '6.4'; // Validate try { - if (applicationId === null || applicationId === undefined || typeof applicationId.valueOf() !== 'string') { - throw new Error('applicationId cannot be null or undefined and it must be of type string.'); - } if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { throw new Error('timeout must be of type number.'); } @@ -34731,8 +35304,7 @@ function _getApplicationEventList(applicationId, startTimeUtc, endTimeUtc, optio // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'EventsStore/Applications/{applicationId}/$/Events'; - requestUrl = requestUrl.replace('{applicationId}', applicationId); + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'EventsStore/Applications/Events'; let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (timeout !== null && timeout !== undefined) { @@ -34845,9 +35417,17 @@ function _getApplicationEventList(applicationId, startTimeUtc, endTimeUtc, optio } /** - * @summary Gets all Applications-related events. + * @summary Gets a Service-related events. * - * The response is list of ApplicationEvent objects. + * The response is list of ServiceEvent objects. + * + * @param {string} serviceId The identity of the service. This ID is typically + * the full name of the service without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * previous versions. * * @param {string} startTimeUtc The start time of a lookup query in ISO UTC * yyyy-MM-ddTHH:mm:ssZ. @@ -34889,7 +35469,7 @@ function _getApplicationEventList(applicationId, startTimeUtc, endTimeUtc, optio * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getApplicationsEventList(startTimeUtc, endTimeUtc, options, callback) { +function _getServiceEventList(serviceId, startTimeUtc, endTimeUtc, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -34903,9 +35483,12 @@ function _getApplicationsEventList(startTimeUtc, endTimeUtc, options, callback) let eventsTypesFilter = (options && options.eventsTypesFilter !== undefined) ? options.eventsTypesFilter : undefined; let excludeAnalysisEvents = (options && options.excludeAnalysisEvents !== undefined) ? options.excludeAnalysisEvents : undefined; let skipCorrelationLookup = (options && options.skipCorrelationLookup !== undefined) ? options.skipCorrelationLookup : undefined; - let apiVersion = '6.2-preview'; + let apiVersion = '6.4'; // Validate try { + if (serviceId === null || serviceId === undefined || typeof serviceId.valueOf() !== 'string') { + throw new Error('serviceId cannot be null or undefined and it must be of type string.'); + } if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { throw new Error('timeout must be of type number.'); } @@ -34940,7 +35523,8 @@ function _getApplicationsEventList(startTimeUtc, endTimeUtc, options, callback) // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'EventsStore/Applications/Events'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'EventsStore/Services/{serviceId}/$/Events'; + requestUrl = requestUrl.replace('{serviceId}', serviceId); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (timeout !== null && timeout !== undefined) { @@ -35025,7 +35609,7 @@ function _getApplicationsEventList(startTimeUtc, endTimeUtc, options, callback) name: 'Sequence', element: { required: false, - serializedName: 'ApplicationEventElementType', + serializedName: 'ServiceEventElementType', type: { name: 'Composite', polymorphicDiscriminator: { @@ -35033,7 +35617,7 @@ function _getApplicationsEventList(startTimeUtc, endTimeUtc, options, callback) clientName: 'kind' }, uberParent: 'FabricEvent', - className: 'ApplicationEvent' + className: 'ServiceEvent' } } } @@ -35053,18 +35637,10 @@ function _getApplicationsEventList(startTimeUtc, endTimeUtc, options, callback) } /** - * @summary Gets a Service-related events. + * @summary Gets all Services-related events. * * The response is list of ServiceEvent objects. * - * @param {string} serviceId The identity of the service. This ID is typically - * the full name of the service without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the service name is "fabric:/myapp/app1/svc1", the service - * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in - * previous versions. - * * @param {string} startTimeUtc The start time of a lookup query in ISO UTC * yyyy-MM-ddTHH:mm:ssZ. * @@ -35105,7 +35681,7 @@ function _getApplicationsEventList(startTimeUtc, endTimeUtc, options, callback) * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getServiceEventList(serviceId, startTimeUtc, endTimeUtc, options, callback) { +function _getServicesEventList(startTimeUtc, endTimeUtc, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -35119,12 +35695,9 @@ function _getServiceEventList(serviceId, startTimeUtc, endTimeUtc, options, call let eventsTypesFilter = (options && options.eventsTypesFilter !== undefined) ? options.eventsTypesFilter : undefined; let excludeAnalysisEvents = (options && options.excludeAnalysisEvents !== undefined) ? options.excludeAnalysisEvents : undefined; let skipCorrelationLookup = (options && options.skipCorrelationLookup !== undefined) ? options.skipCorrelationLookup : undefined; - let apiVersion = '6.2-preview'; + let apiVersion = '6.4'; // Validate try { - if (serviceId === null || serviceId === undefined || typeof serviceId.valueOf() !== 'string') { - throw new Error('serviceId cannot be null or undefined and it must be of type string.'); - } if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { throw new Error('timeout must be of type number.'); } @@ -35159,8 +35732,7 @@ function _getServiceEventList(serviceId, startTimeUtc, endTimeUtc, options, call // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'EventsStore/Services/{serviceId}/$/Events'; - requestUrl = requestUrl.replace('{serviceId}', serviceId); + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'EventsStore/Services/Events'; let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (timeout !== null && timeout !== undefined) { @@ -35273,9 +35845,11 @@ function _getServiceEventList(serviceId, startTimeUtc, endTimeUtc, options, call } /** - * @summary Gets all Services-related events. + * @summary Gets a Partition-related events. * - * The response is list of ServiceEvent objects. + * The response is list of PartitionEvent objects. + * + * @param {uuid} partitionId The identity of the partition. * * @param {string} startTimeUtc The start time of a lookup query in ISO UTC * yyyy-MM-ddTHH:mm:ssZ. @@ -35317,7 +35891,7 @@ function _getServiceEventList(serviceId, startTimeUtc, endTimeUtc, options, call * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getServicesEventList(startTimeUtc, endTimeUtc, options, callback) { +function _getPartitionEventList(partitionId, startTimeUtc, endTimeUtc, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -35331,9 +35905,12 @@ function _getServicesEventList(startTimeUtc, endTimeUtc, options, callback) { let eventsTypesFilter = (options && options.eventsTypesFilter !== undefined) ? options.eventsTypesFilter : undefined; let excludeAnalysisEvents = (options && options.excludeAnalysisEvents !== undefined) ? options.excludeAnalysisEvents : undefined; let skipCorrelationLookup = (options && options.skipCorrelationLookup !== undefined) ? options.skipCorrelationLookup : undefined; - let apiVersion = '6.2-preview'; + let apiVersion = '6.4'; // Validate try { + if (partitionId === null || partitionId === undefined || typeof partitionId.valueOf() !== 'string' || !msRest.isValidUuid(partitionId)) { + throw new Error('partitionId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + } if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { throw new Error('timeout must be of type number.'); } @@ -35368,7 +35945,8 @@ function _getServicesEventList(startTimeUtc, endTimeUtc, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'EventsStore/Services/Events'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'EventsStore/Partitions/{partitionId}/$/Events'; + requestUrl = requestUrl.replace('{partitionId}', partitionId.toString()); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (timeout !== null && timeout !== undefined) { @@ -35453,7 +36031,7 @@ function _getServicesEventList(startTimeUtc, endTimeUtc, options, callback) { name: 'Sequence', element: { required: false, - serializedName: 'ServiceEventElementType', + serializedName: 'PartitionEventElementType', type: { name: 'Composite', polymorphicDiscriminator: { @@ -35461,7 +36039,7 @@ function _getServicesEventList(startTimeUtc, endTimeUtc, options, callback) { clientName: 'kind' }, uberParent: 'FabricEvent', - className: 'ServiceEvent' + className: 'PartitionEvent' } } } @@ -35481,12 +36059,10 @@ function _getServicesEventList(startTimeUtc, endTimeUtc, options, callback) { } /** - * @summary Gets a Partition-related events. + * @summary Gets all Partitions-related events. * * The response is list of PartitionEvent objects. * - * @param {uuid} partitionId The identity of the partition. - * * @param {string} startTimeUtc The start time of a lookup query in ISO UTC * yyyy-MM-ddTHH:mm:ssZ. * @@ -35527,7 +36103,7 @@ function _getServicesEventList(startTimeUtc, endTimeUtc, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getPartitionEventList(partitionId, startTimeUtc, endTimeUtc, options, callback) { +function _getPartitionsEventList(startTimeUtc, endTimeUtc, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -35541,12 +36117,9 @@ function _getPartitionEventList(partitionId, startTimeUtc, endTimeUtc, options, let eventsTypesFilter = (options && options.eventsTypesFilter !== undefined) ? options.eventsTypesFilter : undefined; let excludeAnalysisEvents = (options && options.excludeAnalysisEvents !== undefined) ? options.excludeAnalysisEvents : undefined; let skipCorrelationLookup = (options && options.skipCorrelationLookup !== undefined) ? options.skipCorrelationLookup : undefined; - let apiVersion = '6.2-preview'; + let apiVersion = '6.4'; // Validate try { - if (partitionId === null || partitionId === undefined || typeof partitionId.valueOf() !== 'string' || !msRest.isValidUuid(partitionId)) { - throw new Error('partitionId cannot be null or undefined and it must be of type string and must be a valid uuid.'); - } if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { throw new Error('timeout must be of type number.'); } @@ -35581,8 +36154,7 @@ function _getPartitionEventList(partitionId, startTimeUtc, endTimeUtc, options, // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'EventsStore/Partitions/{partitionId}/$/Events'; - requestUrl = requestUrl.replace('{partitionId}', partitionId.toString()); + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'EventsStore/Partitions/Events'; let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (timeout !== null && timeout !== undefined) { @@ -35695,9 +36267,13 @@ function _getPartitionEventList(partitionId, startTimeUtc, endTimeUtc, options, } /** - * @summary Gets all Partitions-related events. + * @summary Gets a Partition Replica-related events. * - * The response is list of PartitionEvent objects. + * The response is list of ReplicaEvent objects. + * + * @param {uuid} partitionId The identity of the partition. + * + * @param {string} replicaId The identifier of the replica. * * @param {string} startTimeUtc The start time of a lookup query in ISO UTC * yyyy-MM-ddTHH:mm:ssZ. @@ -35739,7 +36315,7 @@ function _getPartitionEventList(partitionId, startTimeUtc, endTimeUtc, options, * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getPartitionsEventList(startTimeUtc, endTimeUtc, options, callback) { +function _getPartitionReplicaEventList(partitionId, replicaId, startTimeUtc, endTimeUtc, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -35753,9 +36329,15 @@ function _getPartitionsEventList(startTimeUtc, endTimeUtc, options, callback) { let eventsTypesFilter = (options && options.eventsTypesFilter !== undefined) ? options.eventsTypesFilter : undefined; let excludeAnalysisEvents = (options && options.excludeAnalysisEvents !== undefined) ? options.excludeAnalysisEvents : undefined; let skipCorrelationLookup = (options && options.skipCorrelationLookup !== undefined) ? options.skipCorrelationLookup : undefined; - let apiVersion = '6.2-preview'; + let apiVersion = '6.4'; // Validate try { + if (partitionId === null || partitionId === undefined || typeof partitionId.valueOf() !== 'string' || !msRest.isValidUuid(partitionId)) { + throw new Error('partitionId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + } + if (replicaId === null || replicaId === undefined || typeof replicaId.valueOf() !== 'string') { + throw new Error('replicaId cannot be null or undefined and it must be of type string.'); + } if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { throw new Error('timeout must be of type number.'); } @@ -35790,7 +36372,9 @@ function _getPartitionsEventList(startTimeUtc, endTimeUtc, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'EventsStore/Partitions/Events'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'EventsStore/Partitions/{partitionId}/$/Replicas/{replicaId}/$/Events'; + requestUrl = requestUrl.replace('{partitionId}', partitionId.toString()); + requestUrl = requestUrl.replace('{replicaId}', replicaId); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (timeout !== null && timeout !== undefined) { @@ -35875,7 +36459,7 @@ function _getPartitionsEventList(startTimeUtc, endTimeUtc, options, callback) { name: 'Sequence', element: { required: false, - serializedName: 'PartitionEventElementType', + serializedName: 'ReplicaEventElementType', type: { name: 'Composite', polymorphicDiscriminator: { @@ -35883,7 +36467,7 @@ function _getPartitionsEventList(startTimeUtc, endTimeUtc, options, callback) { clientName: 'kind' }, uberParent: 'FabricEvent', - className: 'PartitionEvent' + className: 'ReplicaEvent' } } } @@ -35903,14 +36487,12 @@ function _getPartitionsEventList(startTimeUtc, endTimeUtc, options, callback) { } /** - * @summary Gets a Partition Replica-related events. + * @summary Gets all Replicas-related events for a Partition. * * The response is list of ReplicaEvent objects. * * @param {uuid} partitionId The identity of the partition. * - * @param {string} replicaId The identifier of the replica. - * * @param {string} startTimeUtc The start time of a lookup query in ISO UTC * yyyy-MM-ddTHH:mm:ssZ. * @@ -35951,7 +36533,7 @@ function _getPartitionsEventList(startTimeUtc, endTimeUtc, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getPartitionReplicaEventList(partitionId, replicaId, startTimeUtc, endTimeUtc, options, callback) { +function _getPartitionReplicasEventList(partitionId, startTimeUtc, endTimeUtc, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -35965,15 +36547,12 @@ function _getPartitionReplicaEventList(partitionId, replicaId, startTimeUtc, end let eventsTypesFilter = (options && options.eventsTypesFilter !== undefined) ? options.eventsTypesFilter : undefined; let excludeAnalysisEvents = (options && options.excludeAnalysisEvents !== undefined) ? options.excludeAnalysisEvents : undefined; let skipCorrelationLookup = (options && options.skipCorrelationLookup !== undefined) ? options.skipCorrelationLookup : undefined; - let apiVersion = '6.2-preview'; + let apiVersion = '6.4'; // Validate try { if (partitionId === null || partitionId === undefined || typeof partitionId.valueOf() !== 'string' || !msRest.isValidUuid(partitionId)) { throw new Error('partitionId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (replicaId === null || replicaId === undefined || typeof replicaId.valueOf() !== 'string') { - throw new Error('replicaId cannot be null or undefined and it must be of type string.'); - } if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { throw new Error('timeout must be of type number.'); } @@ -36008,9 +36587,8 @@ function _getPartitionReplicaEventList(partitionId, replicaId, startTimeUtc, end // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'EventsStore/Partitions/{partitionId}/$/Replicas/{replicaId}/$/Events'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'EventsStore/Partitions/{partitionId}/$/Replicas/Events'; requestUrl = requestUrl.replace('{partitionId}', partitionId.toString()); - requestUrl = requestUrl.replace('{replicaId}', replicaId); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (timeout !== null && timeout !== undefined) { @@ -36123,17 +36701,11 @@ function _getPartitionReplicaEventList(partitionId, replicaId, startTimeUtc, end } /** - * @summary Gets all Replicas-related events for a Partition. - * - * The response is list of ReplicaEvent objects. - * - * @param {uuid} partitionId The identity of the partition. + * @summary Gets all correlated events for a given event. * - * @param {string} startTimeUtc The start time of a lookup query in ISO UTC - * yyyy-MM-ddTHH:mm:ssZ. + * The response is list of FabricEvents. * - * @param {string} endTimeUtc The end time of a lookup query in ISO UTC - * yyyy-MM-ddTHH:mm:ssZ. + * @param {string} eventInstanceId The EventInstanceId. * * @param {object} [options] Optional Parameters. * @@ -36142,18 +36714,6 @@ function _getPartitionReplicaEventList(partitionId, replicaId, startTimeUtc, end * client is willing to wait for the requested operation to complete. The * default value for this parameter is 60 seconds. * - * @param {string} [options.eventsTypesFilter] This is a comma separated string - * specifying the types of FabricEvents that should only be included in the - * response. - * - * @param {boolean} [options.excludeAnalysisEvents] This param disables the - * retrieval of AnalysisEvents if true is passed. - * - * @param {boolean} [options.skipCorrelationLookup] This param disables the - * search of CorrelatedEvents information if true is passed. otherwise the - * CorrelationEvents get processed and HasCorrelatedEvents field in every - * FabricEvent gets populated. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -36169,7 +36729,7 @@ function _getPartitionReplicaEventList(partitionId, replicaId, startTimeUtc, end * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getPartitionReplicasEventList(partitionId, startTimeUtc, endTimeUtc, options, callback) { +function _getCorrelatedEventList(eventInstanceId, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -36180,14 +36740,11 @@ function _getPartitionReplicasEventList(partitionId, startTimeUtc, endTimeUtc, o throw new Error('callback cannot be null.'); } let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; - let eventsTypesFilter = (options && options.eventsTypesFilter !== undefined) ? options.eventsTypesFilter : undefined; - let excludeAnalysisEvents = (options && options.excludeAnalysisEvents !== undefined) ? options.excludeAnalysisEvents : undefined; - let skipCorrelationLookup = (options && options.skipCorrelationLookup !== undefined) ? options.skipCorrelationLookup : undefined; - let apiVersion = '6.2-preview'; + let apiVersion = '6.4'; // Validate try { - if (partitionId === null || partitionId === undefined || typeof partitionId.valueOf() !== 'string' || !msRest.isValidUuid(partitionId)) { - throw new Error('partitionId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + if (eventInstanceId === null || eventInstanceId === undefined || typeof eventInstanceId.valueOf() !== 'string') { + throw new Error('eventInstanceId cannot be null or undefined and it must be of type string.'); } if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { throw new Error('timeout must be of type number.'); @@ -36202,207 +36759,14 @@ function _getPartitionReplicasEventList(partitionId, startTimeUtc, endTimeUtc, o throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); } } - if (startTimeUtc === null || startTimeUtc === undefined || typeof startTimeUtc.valueOf() !== 'string') { - throw new Error('startTimeUtc cannot be null or undefined and it must be of type string.'); - } - if (endTimeUtc === null || endTimeUtc === undefined || typeof endTimeUtc.valueOf() !== 'string') { - throw new Error('endTimeUtc cannot be null or undefined and it must be of type string.'); - } - if (eventsTypesFilter !== null && eventsTypesFilter !== undefined && typeof eventsTypesFilter.valueOf() !== 'string') { - throw new Error('eventsTypesFilter must be of type string.'); - } - if (excludeAnalysisEvents !== null && excludeAnalysisEvents !== undefined && typeof excludeAnalysisEvents !== 'boolean') { - throw new Error('excludeAnalysisEvents must be of type boolean.'); - } - if (skipCorrelationLookup !== null && skipCorrelationLookup !== undefined && typeof skipCorrelationLookup !== 'boolean') { - throw new Error('skipCorrelationLookup must be of type boolean.'); - } } catch (error) { return callback(error); } // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'EventsStore/Partitions/{partitionId}/$/Replicas/Events'; - requestUrl = requestUrl.replace('{partitionId}', partitionId.toString()); - let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); - if (timeout !== null && timeout !== undefined) { - queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); - } - queryParameters.push('StartTimeUtc=' + encodeURIComponent(startTimeUtc)); - queryParameters.push('EndTimeUtc=' + encodeURIComponent(endTimeUtc)); - if (eventsTypesFilter !== null && eventsTypesFilter !== undefined) { - queryParameters.push('EventsTypesFilter=' + encodeURIComponent(eventsTypesFilter)); - } - if (excludeAnalysisEvents !== null && excludeAnalysisEvents !== undefined) { - queryParameters.push('ExcludeAnalysisEvents=' + encodeURIComponent(excludeAnalysisEvents.toString())); - } - if (skipCorrelationLookup !== null && skipCorrelationLookup !== undefined) { - queryParameters.push('SkipCorrelationLookup=' + encodeURIComponent(skipCorrelationLookup.toString())); - } - if (queryParameters.length > 0) { - requestUrl += '?' + queryParameters.join('&'); - } - - // Create HTTP transport objects - let httpRequest = new WebResource(); - httpRequest.method = 'GET'; - httpRequest.url = requestUrl; - httpRequest.headers = {}; - // Set Headers - httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; - if(options) { - for(let headerName in options['customHeaders']) { - if (options['customHeaders'].hasOwnProperty(headerName)) { - httpRequest.headers[headerName] = options['customHeaders'][headerName]; - } - } - } - httpRequest.body = null; - // Send Request - return client.pipeline(httpRequest, (err, response, responseBody) => { - if (err) { - return callback(err); - } - let statusCode = response.statusCode; - if (statusCode !== 200) { - let error = new Error(responseBody); - error.statusCode = response.statusCode; - error.request = msRest.stripRequest(httpRequest); - error.response = msRest.stripResponse(response); - if (responseBody === '') responseBody = null; - let parsedErrorResponse; - try { - parsedErrorResponse = JSON.parse(responseBody); - if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; - } - if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { - let resultMapper = new client.models['FabricError']().mapper(); - error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); - } - } catch (defaultError) { - error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + - `- "${responseBody}" for the default response.`; - return callback(error); - } - return callback(error); - } - // Create Result - let result = null; - if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = { - required: false, - serializedName: 'parsedResponse', - type: { - name: 'Sequence', - element: { - required: false, - serializedName: 'ReplicaEventElementType', - type: { - name: 'Composite', - polymorphicDiscriminator: { - serializedName: 'Kind', - clientName: 'kind' - }, - uberParent: 'FabricEvent', - className: 'ReplicaEvent' - } - } - } - }; - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } - - return callback(null, result, httpRequest, response); - }); -} - -/** - * @summary Gets all correlated events for a given event. - * - * The response is list of FabricEvents. - * - * @param {string} eventInstanceId The EventInstanceId. - * - * @param {object} [options] Optional Parameters. - * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} callback - The callback. - * - * @returns {function} callback(err, result, request, response) - * - * {Error} err - The Error object if an error occurred, null otherwise. - * - * {array} [result] - The deserialized result object if an error did not occur. - * - * {object} [request] - The HTTP Request object if an error did not occur. - * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ -function _getCorrelatedEventList(eventInstanceId, options, callback) { - /* jshint validthis: true */ - let client = this; - if(!callback && typeof options === 'function') { - callback = options; - options = null; - } - if (!callback) { - throw new Error('callback cannot be null.'); - } - let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; - let apiVersion = '6.2-preview'; - // Validate - try { - if (eventInstanceId === null || eventInstanceId === undefined || typeof eventInstanceId.valueOf() !== 'string') { - throw new Error('eventInstanceId cannot be null or undefined and it must be of type string.'); - } - if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { - throw new Error('timeout must be of type number.'); - } - if (timeout !== null && timeout !== undefined) { - if (timeout > 4294967295) - { - throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); - } - if (timeout < 1) - { - throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); - } - } - } catch (error) { - return callback(error); - } - - // Construct URL - let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'EventsStore/CorrelatedEvents/{eventInstanceId}/$/Events'; - requestUrl = requestUrl.replace('{eventInstanceId}', encodeURIComponent(eventInstanceId)); + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'EventsStore/CorrelatedEvents/{eventInstanceId}/$/Events'; + requestUrl = requestUrl.replace('{eventInstanceId}', encodeURIComponent(eventInstanceId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (timeout !== null && timeout !== undefined) { @@ -36503,2983 +36867,259 @@ function _getCorrelatedEventList(eventInstanceId, options, callback) { }); } -/** - * @summary Creates or updates an application resource. - * - * Creates an application with the specified name and description. If an - * application with the same name already exists, then its description are - * updated to the one indicated in this request. - * - * @param {string} applicationResourceName Service Fabric application resource - * name. - * - * @param {object} applicationResourceDescription Description for creating an - * application resource. - * - * @param {string} [applicationResourceDescription.description] User readable - * description of the application. - * - * @param {string} [applicationResourceDescription.debugParams] Internal use. - * - * @param {array} [applicationResourceDescription.services] describes the - * services in the application. - * - * @param {object} [applicationResourceDescription.diagnostics] Describes the - * diagnostics definition and usage for an application resource. - * - * @param {array} [applicationResourceDescription.diagnostics.sinks] List of - * supported sinks that can be referenced. - * - * @param {boolean} [applicationResourceDescription.diagnostics.enabled] Status - * of whether or not sinks are enabled. - * - * @param {array} [applicationResourceDescription.diagnostics.defaultSinkRefs] - * The sinks to be used if diagnostics is enabled. Sink choices can be - * overridden at the service and code package level. - * - * @param {string} applicationResourceDescription.name Application resource - * name. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} callback - The callback. - * - * @returns {function} callback(err, result, request, response) - * - * {Error} err - The Error object if an error occurred, null otherwise. - * - * {null} [result] - The deserialized result object if an error did not occur. - * - * {object} [request] - The HTTP Request object if an error did not occur. - * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ -function _createApplicationResource(applicationResourceName, applicationResourceDescription, options, callback) { - /* jshint validthis: true */ - let client = this; - if(!callback && typeof options === 'function') { - callback = options; - options = null; - } - if (!callback) { - throw new Error('callback cannot be null.'); - } - let apiVersion = '6.3-preview'; - // Validate - try { - if (applicationResourceName === null || applicationResourceName === undefined || typeof applicationResourceName.valueOf() !== 'string') { - throw new Error('applicationResourceName cannot be null or undefined and it must be of type string.'); - } - if (applicationResourceDescription === null || applicationResourceDescription === undefined) { - throw new Error('applicationResourceDescription cannot be null or undefined.'); - } - } catch (error) { - return callback(error); - } - - // Construct URL - let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Resources/Applications/{applicationResourceName}'; - requestUrl = requestUrl.replace('{applicationResourceName}', applicationResourceName); - let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); - if (queryParameters.length > 0) { - requestUrl += '?' + queryParameters.join('&'); - } - - // Create HTTP transport objects - let httpRequest = new WebResource(); - httpRequest.method = 'PUT'; - httpRequest.url = requestUrl; - httpRequest.headers = {}; - // Set Headers - httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; - if(options) { - for(let headerName in options['customHeaders']) { - if (options['customHeaders'].hasOwnProperty(headerName)) { - httpRequest.headers[headerName] = options['customHeaders'][headerName]; - } - } - } - // Serialize Request - let requestContent = null; - let requestModel = null; - try { - if (applicationResourceDescription !== null && applicationResourceDescription !== undefined) { - let requestModelMapper = new client.models['ApplicationResourceDescription']().mapper(); - requestModel = client.serialize(requestModelMapper, applicationResourceDescription, 'applicationResourceDescription'); - requestContent = JSON.stringify(requestModel); - } - } catch (error) { - let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(applicationResourceDescription, null, 2)}.`); - return callback(serializationError); - } - httpRequest.body = requestContent; - // Send Request - return client.pipeline(httpRequest, (err, response, responseBody) => { - if (err) { - return callback(err); - } - let statusCode = response.statusCode; - if (statusCode !== 201 && statusCode !== 202) { - let error = new Error(responseBody); - error.statusCode = response.statusCode; - error.request = msRest.stripRequest(httpRequest); - error.response = msRest.stripResponse(response); - if (responseBody === '') responseBody = null; - let parsedErrorResponse; - try { - parsedErrorResponse = JSON.parse(responseBody); - if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; - } - if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { - let resultMapper = new client.models['FabricError']().mapper(); - error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); - } - } catch (defaultError) { - error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + - `- "${responseBody}" for the default response.`; - return callback(error); - } - return callback(error); - } - // Create Result - let result = null; - if (responseBody === '') responseBody = null; - - return callback(null, result, httpRequest, response); - }); -} - -/** - * @summary Gets the application with the given name. - * - * Gets the application with the given name. This includes the information - * about the application's services and other runtime information. - * - * @param {string} applicationResourceName Service Fabric application resource - * name. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} callback - The callback. - * - * @returns {function} callback(err, result, request, response) - * - * {Error} err - The Error object if an error occurred, null otherwise. - * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ApplicationResourceDescription} for more - * information. - * - * {object} [request] - The HTTP Request object if an error did not occur. - * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ -function _getApplicationResource(applicationResourceName, options, callback) { - /* jshint validthis: true */ - let client = this; - if(!callback && typeof options === 'function') { - callback = options; - options = null; - } - if (!callback) { - throw new Error('callback cannot be null.'); - } - let apiVersion = '6.3-preview'; - // Validate - try { - if (applicationResourceName === null || applicationResourceName === undefined || typeof applicationResourceName.valueOf() !== 'string') { - throw new Error('applicationResourceName cannot be null or undefined and it must be of type string.'); - } - } catch (error) { - return callback(error); - } - - // Construct URL - let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Resources/Applications/{applicationResourceName}'; - requestUrl = requestUrl.replace('{applicationResourceName}', applicationResourceName); - let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); - if (queryParameters.length > 0) { - requestUrl += '?' + queryParameters.join('&'); - } +/** Class representing a ServiceFabricClient. */ +class ServiceFabricClient extends ServiceClient { + /** + * Create a ServiceFabricClient. + * @param {string} [baseUri] - The base URI of the service. + * @param {object} [options] - The parameter options + * @param {Array} [options.filters] - Filters to be added to the request pipeline + * @param {object} [options.requestOptions] - Options for the underlying request object + * {@link https://github.com/request/request#requestoptions-callback Options doc} + * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy + */ + constructor(baseUri, options) { - // Create HTTP transport objects - let httpRequest = new WebResource(); - httpRequest.method = 'GET'; - httpRequest.url = requestUrl; - httpRequest.headers = {}; - // Set Headers - httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; - if(options) { - for(let headerName in options['customHeaders']) { - if (options['customHeaders'].hasOwnProperty(headerName)) { - httpRequest.headers[headerName] = options['customHeaders'][headerName]; - } - } - } - httpRequest.body = null; - // Send Request - return client.pipeline(httpRequest, (err, response, responseBody) => { - if (err) { - return callback(err); - } - let statusCode = response.statusCode; - if (statusCode !== 200) { - let error = new Error(responseBody); - error.statusCode = response.statusCode; - error.request = msRest.stripRequest(httpRequest); - error.response = msRest.stripResponse(response); - if (responseBody === '') responseBody = null; - let parsedErrorResponse; - try { - parsedErrorResponse = JSON.parse(responseBody); - if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; - } - if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { - let resultMapper = new client.models['FabricError']().mapper(); - error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); - } - } catch (defaultError) { - error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + - `- "${responseBody}" for the default response.`; - return callback(error); - } - return callback(error); - } - // Create Result - let result = null; - if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ApplicationResourceDescription']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } + if (!options) options = {}; - return callback(null, result, httpRequest, response); - }); -} + super(null, options); -/** - * @summary Deletes the specified application. - * - * Deletes the application identified by the name. - * - * @param {string} applicationResourceName Service Fabric application resource - * name. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} callback - The callback. - * - * @returns {function} callback(err, result, request, response) - * - * {Error} err - The Error object if an error occurred, null otherwise. - * - * {null} [result] - The deserialized result object if an error did not occur. - * - * {object} [request] - The HTTP Request object if an error did not occur. - * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ -function _deleteApplicationResource(applicationResourceName, options, callback) { - /* jshint validthis: true */ - let client = this; - if(!callback && typeof options === 'function') { - callback = options; - options = null; - } - if (!callback) { - throw new Error('callback cannot be null.'); - } - let apiVersion = '6.3-preview'; - // Validate - try { - if (applicationResourceName === null || applicationResourceName === undefined || typeof applicationResourceName.valueOf() !== 'string') { - throw new Error('applicationResourceName cannot be null or undefined and it must be of type string.'); + this.baseUri = baseUri; + if (!this.baseUri) { + this.baseUri = 'http://localhost:19080'; } - } catch (error) { - return callback(error); - } - - // Construct URL - let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Resources/Applications/{applicationResourceName}'; - requestUrl = requestUrl.replace('{applicationResourceName}', applicationResourceName); - let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); - if (queryParameters.length > 0) { - requestUrl += '?' + queryParameters.join('&'); - } - // Create HTTP transport objects - let httpRequest = new WebResource(); - httpRequest.method = 'DELETE'; - httpRequest.url = requestUrl; - httpRequest.headers = {}; - // Set Headers - httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; - if(options) { - for(let headerName in options['customHeaders']) { - if (options['customHeaders'].hasOwnProperty(headerName)) { - httpRequest.headers[headerName] = options['customHeaders'][headerName]; - } - } - } - httpRequest.body = null; - // Send Request - return client.pipeline(httpRequest, (err, response, responseBody) => { - if (err) { - return callback(err); - } - let statusCode = response.statusCode; - if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { - let error = new Error(responseBody); - error.statusCode = response.statusCode; - error.request = msRest.stripRequest(httpRequest); - error.response = msRest.stripResponse(response); - if (responseBody === '') responseBody = null; - let parsedErrorResponse; - try { - parsedErrorResponse = JSON.parse(responseBody); - if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; - } - if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { - let resultMapper = new client.models['FabricError']().mapper(); - error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); - } - } catch (defaultError) { - error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + - `- "${responseBody}" for the default response.`; - return callback(error); - } - return callback(error); - } - // Create Result - let result = null; - if (responseBody === '') responseBody = null; - - return callback(null, result, httpRequest, response); - }); -} - -/** - * @summary Gets all the services in the application resource. - * - * The operation returns the service descriptions of all the services in the - * application resource. - * - * @param {string} applicationResourceName Service Fabric application resource - * name. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} callback - The callback. - * - * @returns {function} callback(err, result, request, response) - * - * {Error} err - The Error object if an error occurred, null otherwise. - * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PagedServiceResourceDescriptionList} for - * more information. - * - * {object} [request] - The HTTP Request object if an error did not occur. - * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ -function _getServices(applicationResourceName, options, callback) { - /* jshint validthis: true */ - let client = this; - if(!callback && typeof options === 'function') { - callback = options; - options = null; - } - if (!callback) { - throw new Error('callback cannot be null.'); - } - let apiVersion = '6.3-preview'; - // Validate - try { - if (applicationResourceName === null || applicationResourceName === undefined || typeof applicationResourceName.valueOf() !== 'string') { - throw new Error('applicationResourceName cannot be null or undefined and it must be of type string.'); - } - } catch (error) { - return callback(error); - } - - // Construct URL - let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Resources/Applications/{applicationResourceName}/Services'; - requestUrl = requestUrl.replace('{applicationResourceName}', applicationResourceName); - let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); - if (queryParameters.length > 0) { - requestUrl += '?' + queryParameters.join('&'); - } - - // Create HTTP transport objects - let httpRequest = new WebResource(); - httpRequest.method = 'GET'; - httpRequest.url = requestUrl; - httpRequest.headers = {}; - // Set Headers - httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; - if(options) { - for(let headerName in options['customHeaders']) { - if (options['customHeaders'].hasOwnProperty(headerName)) { - httpRequest.headers[headerName] = options['customHeaders'][headerName]; - } - } - } - httpRequest.body = null; - // Send Request - return client.pipeline(httpRequest, (err, response, responseBody) => { - if (err) { - return callback(err); - } - let statusCode = response.statusCode; - if (statusCode !== 200) { - let error = new Error(responseBody); - error.statusCode = response.statusCode; - error.request = msRest.stripRequest(httpRequest); - error.response = msRest.stripResponse(response); - if (responseBody === '') responseBody = null; - let parsedErrorResponse; - try { - parsedErrorResponse = JSON.parse(responseBody); - if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; - } - } catch (defaultError) { - error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + - `- "${responseBody}" for the default response.`; - return callback(error); - } - return callback(error); - } - // Create Result - let result = null; - if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['PagedServiceResourceDescriptionList']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } - - return callback(null, result, httpRequest, response); - }); -} - -/** - * @summary Gets the description of the specified service in an application - * resource. - * - * Gets the description of the service resource. - * - * @param {string} applicationResourceName Service Fabric application resource - * name. - * - * @param {string} serviceResourceName Service Fabric service resource name. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} callback - The callback. - * - * @returns {function} callback(err, result, request, response) - * - * {Error} err - The Error object if an error occurred, null otherwise. - * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ServiceResourceDescription} for more - * information. - * - * {object} [request] - The HTTP Request object if an error did not occur. - * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ -function _getService(applicationResourceName, serviceResourceName, options, callback) { - /* jshint validthis: true */ - let client = this; - if(!callback && typeof options === 'function') { - callback = options; - options = null; - } - if (!callback) { - throw new Error('callback cannot be null.'); - } - let apiVersion = '6.3-preview'; - // Validate - try { - if (applicationResourceName === null || applicationResourceName === undefined || typeof applicationResourceName.valueOf() !== 'string') { - throw new Error('applicationResourceName cannot be null or undefined and it must be of type string.'); - } - if (serviceResourceName === null || serviceResourceName === undefined || typeof serviceResourceName.valueOf() !== 'string') { - throw new Error('serviceResourceName cannot be null or undefined and it must be of type string.'); - } - } catch (error) { - return callback(error); - } - - // Construct URL - let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}'; - requestUrl = requestUrl.replace('{applicationResourceName}', applicationResourceName); - requestUrl = requestUrl.replace('{serviceResourceName}', serviceResourceName); - let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); - if (queryParameters.length > 0) { - requestUrl += '?' + queryParameters.join('&'); - } - - // Create HTTP transport objects - let httpRequest = new WebResource(); - httpRequest.method = 'GET'; - httpRequest.url = requestUrl; - httpRequest.headers = {}; - // Set Headers - httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; - if(options) { - for(let headerName in options['customHeaders']) { - if (options['customHeaders'].hasOwnProperty(headerName)) { - httpRequest.headers[headerName] = options['customHeaders'][headerName]; - } - } - } - httpRequest.body = null; - // Send Request - return client.pipeline(httpRequest, (err, response, responseBody) => { - if (err) { - return callback(err); - } - let statusCode = response.statusCode; - if (statusCode !== 200) { - let error = new Error(responseBody); - error.statusCode = response.statusCode; - error.request = msRest.stripRequest(httpRequest); - error.response = msRest.stripResponse(response); - if (responseBody === '') responseBody = null; - let parsedErrorResponse; - try { - parsedErrorResponse = JSON.parse(responseBody); - if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; - } - } catch (defaultError) { - error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + - `- "${responseBody}" for the default response.`; - return callback(error); - } - return callback(error); - } - // Create Result - let result = null; - if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ServiceResourceDescription']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } - - return callback(null, result, httpRequest, response); - }); -} - -/** - * @summary Gets replicas of a given service in an applciation resource. - * - * Gets the information about all replicas of a given service of an - * application. The information includes the runtime properties of the replica - * instance. - * - * @param {string} applicationResourceName Service Fabric application resource - * name. - * - * @param {string} serviceResourceName Service Fabric service resource name. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} callback - The callback. - * - * @returns {function} callback(err, result, request, response) - * - * {Error} err - The Error object if an error occurred, null otherwise. - * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PagedServiceResourceReplicaDescriptionList} - * for more information. - * - * {object} [request] - The HTTP Request object if an error did not occur. - * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ -function _getReplicas(applicationResourceName, serviceResourceName, options, callback) { - /* jshint validthis: true */ - let client = this; - if(!callback && typeof options === 'function') { - callback = options; - options = null; - } - if (!callback) { - throw new Error('callback cannot be null.'); - } - let apiVersion = '6.3-preview'; - // Validate - try { - if (applicationResourceName === null || applicationResourceName === undefined || typeof applicationResourceName.valueOf() !== 'string') { - throw new Error('applicationResourceName cannot be null or undefined and it must be of type string.'); - } - if (serviceResourceName === null || serviceResourceName === undefined || typeof serviceResourceName.valueOf() !== 'string') { - throw new Error('serviceResourceName cannot be null or undefined and it must be of type string.'); - } - } catch (error) { - return callback(error); - } - - // Construct URL - let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/replicas'; - requestUrl = requestUrl.replace('{applicationResourceName}', applicationResourceName); - requestUrl = requestUrl.replace('{serviceResourceName}', serviceResourceName); - let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); - if (queryParameters.length > 0) { - requestUrl += '?' + queryParameters.join('&'); - } - - // Create HTTP transport objects - let httpRequest = new WebResource(); - httpRequest.method = 'GET'; - httpRequest.url = requestUrl; - httpRequest.headers = {}; - // Set Headers - httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; - if(options) { - for(let headerName in options['customHeaders']) { - if (options['customHeaders'].hasOwnProperty(headerName)) { - httpRequest.headers[headerName] = options['customHeaders'][headerName]; - } - } - } - httpRequest.body = null; - // Send Request - return client.pipeline(httpRequest, (err, response, responseBody) => { - if (err) { - return callback(err); - } - let statusCode = response.statusCode; - if (statusCode !== 200) { - let error = new Error(responseBody); - error.statusCode = response.statusCode; - error.request = msRest.stripRequest(httpRequest); - error.response = msRest.stripResponse(response); - if (responseBody === '') responseBody = null; - let parsedErrorResponse; - try { - parsedErrorResponse = JSON.parse(responseBody); - if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; - } - } catch (defaultError) { - error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + - `- "${responseBody}" for the default response.`; - return callback(error); - } - return callback(error); - } - // Create Result - let result = null; - if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['PagedServiceResourceReplicaDescriptionList']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } - - return callback(null, result, httpRequest, response); - }); -} - -/** - * @summary Gets a specific replica of a given service in an application - * resource. - * - * Gets the information about the specified replica of a given service of an - * application. The information includes the runtime properties of the replica - * instance. - * - * @param {string} applicationResourceName Service Fabric application resource - * name. - * - * @param {string} serviceResourceName Service Fabric service resource name. - * - * @param {string} replicaName Service Fabric replica name. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} callback - The callback. - * - * @returns {function} callback(err, result, request, response) - * - * {Error} err - The Error object if an error occurred, null otherwise. - * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ServiceResourceReplicaDescription} for more - * information. - * - * {object} [request] - The HTTP Request object if an error did not occur. - * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ -function _getReplica(applicationResourceName, serviceResourceName, replicaName, options, callback) { - /* jshint validthis: true */ - let client = this; - if(!callback && typeof options === 'function') { - callback = options; - options = null; - } - if (!callback) { - throw new Error('callback cannot be null.'); - } - let apiVersion = '6.3-preview'; - // Validate - try { - if (applicationResourceName === null || applicationResourceName === undefined || typeof applicationResourceName.valueOf() !== 'string') { - throw new Error('applicationResourceName cannot be null or undefined and it must be of type string.'); - } - if (serviceResourceName === null || serviceResourceName === undefined || typeof serviceResourceName.valueOf() !== 'string') { - throw new Error('serviceResourceName cannot be null or undefined and it must be of type string.'); - } - if (replicaName === null || replicaName === undefined || typeof replicaName.valueOf() !== 'string') { - throw new Error('replicaName cannot be null or undefined and it must be of type string.'); - } - } catch (error) { - return callback(error); - } - - // Construct URL - let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas/{replicaName}'; - requestUrl = requestUrl.replace('{applicationResourceName}', applicationResourceName); - requestUrl = requestUrl.replace('{serviceResourceName}', serviceResourceName); - requestUrl = requestUrl.replace('{replicaName}', replicaName); - let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); - if (queryParameters.length > 0) { - requestUrl += '?' + queryParameters.join('&'); - } - - // Create HTTP transport objects - let httpRequest = new WebResource(); - httpRequest.method = 'GET'; - httpRequest.url = requestUrl; - httpRequest.headers = {}; - // Set Headers - httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; - if(options) { - for(let headerName in options['customHeaders']) { - if (options['customHeaders'].hasOwnProperty(headerName)) { - httpRequest.headers[headerName] = options['customHeaders'][headerName]; - } - } - } - httpRequest.body = null; - // Send Request - return client.pipeline(httpRequest, (err, response, responseBody) => { - if (err) { - return callback(err); - } - let statusCode = response.statusCode; - if (statusCode !== 200) { - let error = new Error(responseBody); - error.statusCode = response.statusCode; - error.request = msRest.stripRequest(httpRequest); - error.response = msRest.stripResponse(response); - if (responseBody === '') responseBody = null; - let parsedErrorResponse; - try { - parsedErrorResponse = JSON.parse(responseBody); - if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; - } - } catch (defaultError) { - error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + - `- "${responseBody}" for the default response.`; - return callback(error); - } - return callback(error); - } - // Create Result - let result = null; - if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ServiceResourceReplicaDescription']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } - - return callback(null, result, httpRequest, response); - }); -} - -/** - * @summary Creates or updates a volume resource. - * - * Creates a volume resource with the specified name and description. If a - * volume with the same name already exists, then its description is updated to - * the one indicated in this request. - * - * @param {string} volumeResourceName Service Fabric volume resource name. - * - * @param {object} volumeResourceDescription Description for creating a volume - * resource. - * - * @param {string} [volumeResourceDescription.description] User readable - * description of the volume. - * - * @param {object} [volumeResourceDescription.azureFileParameters] This type - * describes a volume provided by an Azure Files file share. - * - * @param {string} volumeResourceDescription.azureFileParameters.accountName - * Name of the Azure storage account for the File Share. - * - * @param {string} [volumeResourceDescription.azureFileParameters.accountKey] - * Access key of the Azure storage account for the File Share. - * - * @param {string} volumeResourceDescription.azureFileParameters.shareName Name - * of the Azure Files file share that provides storage for the volume. - * - * @param {string} volumeResourceDescription.name Volume resource name. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} callback - The callback. - * - * @returns {function} callback(err, result, request, response) - * - * {Error} err - The Error object if an error occurred, null otherwise. - * - * {null} [result] - The deserialized result object if an error did not occur. - * - * {object} [request] - The HTTP Request object if an error did not occur. - * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ -function _createVolumeResource(volumeResourceName, volumeResourceDescription, options, callback) { - /* jshint validthis: true */ - let client = this; - if(!callback && typeof options === 'function') { - callback = options; - options = null; - } - if (!callback) { - throw new Error('callback cannot be null.'); - } - let apiVersion = '6.3-preview'; - if (volumeResourceDescription === null || volumeResourceDescription === undefined) - { - volumeResourceDescription = {}; - } - // Validate - try { - if (volumeResourceName === null || volumeResourceName === undefined || typeof volumeResourceName.valueOf() !== 'string') { - throw new Error('volumeResourceName cannot be null or undefined and it must be of type string.'); - } - if (volumeResourceDescription === null || volumeResourceDescription === undefined) { - throw new Error('volumeResourceDescription cannot be null or undefined.'); - } - } catch (error) { - return callback(error); - } - - // Construct URL - let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Resources/Volumes/{volumeResourceName}'; - requestUrl = requestUrl.replace('{volumeResourceName}', volumeResourceName); - let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); - if (queryParameters.length > 0) { - requestUrl += '?' + queryParameters.join('&'); - } - - // Create HTTP transport objects - let httpRequest = new WebResource(); - httpRequest.method = 'PUT'; - httpRequest.url = requestUrl; - httpRequest.headers = {}; - // Set Headers - httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; - if(options) { - for(let headerName in options['customHeaders']) { - if (options['customHeaders'].hasOwnProperty(headerName)) { - httpRequest.headers[headerName] = options['customHeaders'][headerName]; - } - } - } - // Serialize Request - let requestContent = null; - let requestModel = null; - try { - if (volumeResourceDescription !== null && volumeResourceDescription !== undefined) { - let requestModelMapper = new client.models['VolumeResourceDescription']().mapper(); - requestModel = client.serialize(requestModelMapper, volumeResourceDescription, 'volumeResourceDescription'); - requestContent = JSON.stringify(requestModel); - } - } catch (error) { - let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(volumeResourceDescription, null, 2)}.`); - return callback(serializationError); - } - httpRequest.body = requestContent; - // Send Request - return client.pipeline(httpRequest, (err, response, responseBody) => { - if (err) { - return callback(err); - } - let statusCode = response.statusCode; - if (statusCode !== 201 && statusCode !== 202) { - let error = new Error(responseBody); - error.statusCode = response.statusCode; - error.request = msRest.stripRequest(httpRequest); - error.response = msRest.stripResponse(response); - if (responseBody === '') responseBody = null; - let parsedErrorResponse; - try { - parsedErrorResponse = JSON.parse(responseBody); - if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; - } - if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { - let resultMapper = new client.models['FabricError']().mapper(); - error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); - } - } catch (defaultError) { - error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + - `- "${responseBody}" for the default response.`; - return callback(error); - } - return callback(error); - } - // Create Result - let result = null; - if (responseBody === '') responseBody = null; - - return callback(null, result, httpRequest, response); - }); -} - -/** - * @summary Gets the volume resource. - * - * Gets the information about the volume resource with a given name. This - * information includes the volume description and other runtime information. - * - * @param {string} volumeResourceName Service Fabric volume resource name. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} callback - The callback. - * - * @returns {function} callback(err, result, request, response) - * - * {Error} err - The Error object if an error occurred, null otherwise. - * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link VolumeResourceDescription} for more - * information. - * - * {object} [request] - The HTTP Request object if an error did not occur. - * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ -function _getVolumeResource(volumeResourceName, options, callback) { - /* jshint validthis: true */ - let client = this; - if(!callback && typeof options === 'function') { - callback = options; - options = null; - } - if (!callback) { - throw new Error('callback cannot be null.'); - } - let apiVersion = '6.3-preview'; - // Validate - try { - if (volumeResourceName === null || volumeResourceName === undefined || typeof volumeResourceName.valueOf() !== 'string') { - throw new Error('volumeResourceName cannot be null or undefined and it must be of type string.'); - } - } catch (error) { - return callback(error); - } - - // Construct URL - let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Resources/Volumes/{volumeResourceName}'; - requestUrl = requestUrl.replace('{volumeResourceName}', volumeResourceName); - let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); - if (queryParameters.length > 0) { - requestUrl += '?' + queryParameters.join('&'); - } - - // Create HTTP transport objects - let httpRequest = new WebResource(); - httpRequest.method = 'GET'; - httpRequest.url = requestUrl; - httpRequest.headers = {}; - // Set Headers - httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; - if(options) { - for(let headerName in options['customHeaders']) { - if (options['customHeaders'].hasOwnProperty(headerName)) { - httpRequest.headers[headerName] = options['customHeaders'][headerName]; - } - } - } - httpRequest.body = null; - // Send Request - return client.pipeline(httpRequest, (err, response, responseBody) => { - if (err) { - return callback(err); - } - let statusCode = response.statusCode; - if (statusCode !== 200) { - let error = new Error(responseBody); - error.statusCode = response.statusCode; - error.request = msRest.stripRequest(httpRequest); - error.response = msRest.stripResponse(response); - if (responseBody === '') responseBody = null; - let parsedErrorResponse; - try { - parsedErrorResponse = JSON.parse(responseBody); - if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; - } - if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { - let resultMapper = new client.models['FabricError']().mapper(); - error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); - } - } catch (defaultError) { - error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + - `- "${responseBody}" for the default response.`; - return callback(error); - } - return callback(error); - } - // Create Result - let result = null; - if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['VolumeResourceDescription']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } - - return callback(null, result, httpRequest, response); - }); -} - -/** - * @summary Deletes the volume resource. - * - * Deletes the volume identified by the name. - * - * @param {string} volumeResourceName Service Fabric volume resource name. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} callback - The callback. - * - * @returns {function} callback(err, result, request, response) - * - * {Error} err - The Error object if an error occurred, null otherwise. - * - * {null} [result] - The deserialized result object if an error did not occur. - * - * {object} [request] - The HTTP Request object if an error did not occur. - * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ -function _deleteVolumeResource(volumeResourceName, options, callback) { - /* jshint validthis: true */ - let client = this; - if(!callback && typeof options === 'function') { - callback = options; - options = null; - } - if (!callback) { - throw new Error('callback cannot be null.'); - } - let apiVersion = '6.3-preview'; - // Validate - try { - if (volumeResourceName === null || volumeResourceName === undefined || typeof volumeResourceName.valueOf() !== 'string') { - throw new Error('volumeResourceName cannot be null or undefined and it must be of type string.'); - } - } catch (error) { - return callback(error); - } - - // Construct URL - let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Resources/Volumes/{volumeResourceName}'; - requestUrl = requestUrl.replace('{volumeResourceName}', volumeResourceName); - let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); - if (queryParameters.length > 0) { - requestUrl += '?' + queryParameters.join('&'); - } - - // Create HTTP transport objects - let httpRequest = new WebResource(); - httpRequest.method = 'DELETE'; - httpRequest.url = requestUrl; - httpRequest.headers = {}; - // Set Headers - httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; - if(options) { - for(let headerName in options['customHeaders']) { - if (options['customHeaders'].hasOwnProperty(headerName)) { - httpRequest.headers[headerName] = options['customHeaders'][headerName]; - } - } - } - httpRequest.body = null; - // Send Request - return client.pipeline(httpRequest, (err, response, responseBody) => { - if (err) { - return callback(err); - } - let statusCode = response.statusCode; - if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { - let error = new Error(responseBody); - error.statusCode = response.statusCode; - error.request = msRest.stripRequest(httpRequest); - error.response = msRest.stripResponse(response); - if (responseBody === '') responseBody = null; - let parsedErrorResponse; - try { - parsedErrorResponse = JSON.parse(responseBody); - if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; - } - if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { - let resultMapper = new client.models['FabricError']().mapper(); - error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); - } - } catch (defaultError) { - error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + - `- "${responseBody}" for the default response.`; - return callback(error); - } - return callback(error); - } - // Create Result - let result = null; - if (responseBody === '') responseBody = null; - - return callback(null, result, httpRequest, response); - }); -} - -/** Class representing a ServiceFabricClient. */ -class ServiceFabricClient extends ServiceClient { - /** - * Create a ServiceFabricClient. - * @param {string} [baseUri] - The base URI of the service. - * @param {object} [options] - The parameter options - * @param {Array} [options.filters] - Filters to be added to the request pipeline - * @param {object} [options.requestOptions] - Options for the underlying request object - * {@link https://github.com/request/request#requestoptions-callback Options doc} - * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy - */ - constructor(baseUri, options) { - - if (!options) options = {}; - - super(null, options); - - this.baseUri = baseUri; - if (!this.baseUri) { - this.baseUri = 'http://localhost:19080'; - } - - let packageInfo = this.getPackageJsonInfo(__dirname); - this.addUserAgentInfo(`${packageInfo.name}/${packageInfo.version}`); - this.models = models; - this._getClusterManifest = _getClusterManifest; - this._getClusterHealth = _getClusterHealth; - this._getClusterHealthUsingPolicy = _getClusterHealthUsingPolicy; - this._getClusterHealthChunk = _getClusterHealthChunk; - this._getClusterHealthChunkUsingPolicyAndAdvancedFilters = _getClusterHealthChunkUsingPolicyAndAdvancedFilters; - this._reportClusterHealth = _reportClusterHealth; - this._getProvisionedFabricCodeVersionInfoList = _getProvisionedFabricCodeVersionInfoList; - this._getProvisionedFabricConfigVersionInfoList = _getProvisionedFabricConfigVersionInfoList; - this._getClusterUpgradeProgress = _getClusterUpgradeProgress; - this._getClusterConfiguration = _getClusterConfiguration; - this._getClusterConfigurationUpgradeStatus = _getClusterConfigurationUpgradeStatus; - this._getUpgradeOrchestrationServiceState = _getUpgradeOrchestrationServiceState; - this._setUpgradeOrchestrationServiceState = _setUpgradeOrchestrationServiceState; - this._provisionCluster = _provisionCluster; - this._unprovisionCluster = _unprovisionCluster; - this._rollbackClusterUpgrade = _rollbackClusterUpgrade; - this._resumeClusterUpgrade = _resumeClusterUpgrade; - this._startClusterUpgrade = _startClusterUpgrade; - this._startClusterConfigurationUpgrade = _startClusterConfigurationUpgrade; - this._updateClusterUpgrade = _updateClusterUpgrade; - this._getAadMetadata = _getAadMetadata; - this._getNodeInfoList = _getNodeInfoList; - this._getNodeInfo = _getNodeInfo; - this._getNodeHealth = _getNodeHealth; - this._getNodeHealthUsingPolicy = _getNodeHealthUsingPolicy; - this._reportNodeHealth = _reportNodeHealth; - this._getNodeLoadInfo = _getNodeLoadInfo; - this._disableNode = _disableNode; - this._enableNode = _enableNode; - this._removeNodeState = _removeNodeState; - this._restartNode = _restartNode; - this._getApplicationTypeInfoList = _getApplicationTypeInfoList; - this._getApplicationTypeInfoListByName = _getApplicationTypeInfoListByName; - this._provisionApplicationType = _provisionApplicationType; - this._unprovisionApplicationType = _unprovisionApplicationType; - this._getServiceTypeInfoList = _getServiceTypeInfoList; - this._getServiceTypeInfoByName = _getServiceTypeInfoByName; - this._getServiceManifest = _getServiceManifest; - this._getDeployedServiceTypeInfoList = _getDeployedServiceTypeInfoList; - this._getDeployedServiceTypeInfoByName = _getDeployedServiceTypeInfoByName; - this._createApplication = _createApplication; - this._deleteApplication = _deleteApplication; - this._getApplicationLoadInfo = _getApplicationLoadInfo; - this._getApplicationInfoList = _getApplicationInfoList; - this._getApplicationInfo = _getApplicationInfo; - this._getApplicationHealth = _getApplicationHealth; - this._getApplicationHealthUsingPolicy = _getApplicationHealthUsingPolicy; - this._reportApplicationHealth = _reportApplicationHealth; - this._startApplicationUpgrade = _startApplicationUpgrade; - this._getApplicationUpgrade = _getApplicationUpgrade; - this._updateApplicationUpgrade = _updateApplicationUpgrade; - this._resumeApplicationUpgrade = _resumeApplicationUpgrade; - this._rollbackApplicationUpgrade = _rollbackApplicationUpgrade; - this._getDeployedApplicationInfoList = _getDeployedApplicationInfoList; - this._getDeployedApplicationInfo = _getDeployedApplicationInfo; - this._getDeployedApplicationHealth = _getDeployedApplicationHealth; - this._getDeployedApplicationHealthUsingPolicy = _getDeployedApplicationHealthUsingPolicy; - this._reportDeployedApplicationHealth = _reportDeployedApplicationHealth; - this._getApplicationManifest = _getApplicationManifest; - this._getServiceInfoList = _getServiceInfoList; - this._getServiceInfo = _getServiceInfo; - this._getApplicationNameInfo = _getApplicationNameInfo; - this._createService = _createService; - this._createServiceFromTemplate = _createServiceFromTemplate; - this._deleteService = _deleteService; - this._updateService = _updateService; - this._getServiceDescription = _getServiceDescription; - this._getServiceHealth = _getServiceHealth; - this._getServiceHealthUsingPolicy = _getServiceHealthUsingPolicy; - this._reportServiceHealth = _reportServiceHealth; - this._resolveService = _resolveService; - this._getPartitionInfoList = _getPartitionInfoList; - this._getPartitionInfo = _getPartitionInfo; - this._getServiceNameInfo = _getServiceNameInfo; - this._getPartitionHealth = _getPartitionHealth; - this._getPartitionHealthUsingPolicy = _getPartitionHealthUsingPolicy; - this._reportPartitionHealth = _reportPartitionHealth; - this._getPartitionLoadInformation = _getPartitionLoadInformation; - this._resetPartitionLoad = _resetPartitionLoad; - this._recoverPartition = _recoverPartition; - this._recoverServicePartitions = _recoverServicePartitions; - this._recoverSystemPartitions = _recoverSystemPartitions; - this._recoverAllPartitions = _recoverAllPartitions; - this._createRepairTask = _createRepairTask; - this._cancelRepairTask = _cancelRepairTask; - this._deleteRepairTask = _deleteRepairTask; - this._getRepairTaskList = _getRepairTaskList; - this._forceApproveRepairTask = _forceApproveRepairTask; - this._updateRepairTaskHealthPolicy = _updateRepairTaskHealthPolicy; - this._updateRepairExecutionState = _updateRepairExecutionState; - this._getReplicaInfoList = _getReplicaInfoList; - this._getReplicaInfo = _getReplicaInfo; - this._getReplicaHealth = _getReplicaHealth; - this._getReplicaHealthUsingPolicy = _getReplicaHealthUsingPolicy; - this._reportReplicaHealth = _reportReplicaHealth; - this._getDeployedServiceReplicaInfoList = _getDeployedServiceReplicaInfoList; - this._getDeployedServiceReplicaDetailInfo = _getDeployedServiceReplicaDetailInfo; - this._getDeployedServiceReplicaDetailInfoByPartitionId = _getDeployedServiceReplicaDetailInfoByPartitionId; - this._restartReplica = _restartReplica; - this._removeReplica = _removeReplica; - this._getDeployedServicePackageInfoList = _getDeployedServicePackageInfoList; - this._getDeployedServicePackageInfoListByName = _getDeployedServicePackageInfoListByName; - this._getDeployedServicePackageHealth = _getDeployedServicePackageHealth; - this._getDeployedServicePackageHealthUsingPolicy = _getDeployedServicePackageHealthUsingPolicy; - this._reportDeployedServicePackageHealth = _reportDeployedServicePackageHealth; - this._deployServicePackageToNode = _deployServicePackageToNode; - this._getDeployedCodePackageInfoList = _getDeployedCodePackageInfoList; - this._restartDeployedCodePackage = _restartDeployedCodePackage; - this._getContainerLogsDeployedOnNode = _getContainerLogsDeployedOnNode; - this._invokeContainerApi = _invokeContainerApi; - this._createComposeDeployment = _createComposeDeployment; - this._getComposeDeploymentStatus = _getComposeDeploymentStatus; - this._getComposeDeploymentStatusList = _getComposeDeploymentStatusList; - this._getComposeDeploymentUpgradeProgress = _getComposeDeploymentUpgradeProgress; - this._removeComposeDeployment = _removeComposeDeployment; - this._startComposeDeploymentUpgrade = _startComposeDeploymentUpgrade; - this._getChaos = _getChaos; - this._startChaos = _startChaos; - this._stopChaos = _stopChaos; - this._getChaosEvents = _getChaosEvents; - this._getChaosSchedule = _getChaosSchedule; - this._postChaosSchedule = _postChaosSchedule; - this._uploadFile = _uploadFile; - this._getImageStoreContent = _getImageStoreContent; - this._deleteImageStoreContent = _deleteImageStoreContent; - this._getImageStoreRootContent = _getImageStoreRootContent; - this._copyImageStoreContent = _copyImageStoreContent; - this._deleteImageStoreUploadSession = _deleteImageStoreUploadSession; - this._commitImageStoreUploadSession = _commitImageStoreUploadSession; - this._getImageStoreUploadSessionById = _getImageStoreUploadSessionById; - this._getImageStoreUploadSessionByPath = _getImageStoreUploadSessionByPath; - this._uploadFileChunk = _uploadFileChunk; - this._invokeInfrastructureCommand = _invokeInfrastructureCommand; - this._invokeInfrastructureQuery = _invokeInfrastructureQuery; - this._startDataLoss = _startDataLoss; - this._getDataLossProgress = _getDataLossProgress; - this._startQuorumLoss = _startQuorumLoss; - this._getQuorumLossProgress = _getQuorumLossProgress; - this._startPartitionRestart = _startPartitionRestart; - this._getPartitionRestartProgress = _getPartitionRestartProgress; - this._startNodeTransition = _startNodeTransition; - this._getNodeTransitionProgress = _getNodeTransitionProgress; - this._getFaultOperationList = _getFaultOperationList; - this._cancelOperation = _cancelOperation; - this._createBackupPolicy = _createBackupPolicy; - this._deleteBackupPolicy = _deleteBackupPolicy; - this._getBackupPolicyList = _getBackupPolicyList; - this._getBackupPolicyByName = _getBackupPolicyByName; - this._getAllEntitiesBackedUpByPolicy = _getAllEntitiesBackedUpByPolicy; - this._updateBackupPolicy = _updateBackupPolicy; - this._enableApplicationBackup = _enableApplicationBackup; - this._disableApplicationBackup = _disableApplicationBackup; - this._getApplicationBackupConfigurationInfo = _getApplicationBackupConfigurationInfo; - this._getApplicationBackupList = _getApplicationBackupList; - this._suspendApplicationBackup = _suspendApplicationBackup; - this._resumeApplicationBackup = _resumeApplicationBackup; - this._enableServiceBackup = _enableServiceBackup; - this._disableServiceBackup = _disableServiceBackup; - this._getServiceBackupConfigurationInfo = _getServiceBackupConfigurationInfo; - this._getServiceBackupList = _getServiceBackupList; - this._suspendServiceBackup = _suspendServiceBackup; - this._resumeServiceBackup = _resumeServiceBackup; - this._enablePartitionBackup = _enablePartitionBackup; - this._disablePartitionBackup = _disablePartitionBackup; - this._getPartitionBackupConfigurationInfo = _getPartitionBackupConfigurationInfo; - this._getPartitionBackupList = _getPartitionBackupList; - this._suspendPartitionBackup = _suspendPartitionBackup; - this._resumePartitionBackup = _resumePartitionBackup; - this._backupPartition = _backupPartition; - this._getPartitionBackupProgress = _getPartitionBackupProgress; - this._restorePartition = _restorePartition; - this._getPartitionRestoreProgress = _getPartitionRestoreProgress; - this._getBackupsFromBackupLocation = _getBackupsFromBackupLocation; - this._createName = _createName; - this._getNameExistsInfo = _getNameExistsInfo; - this._deleteName = _deleteName; - this._getSubNameInfoList = _getSubNameInfoList; - this._getPropertyInfoList = _getPropertyInfoList; - this._putProperty = _putProperty; - this._getPropertyInfo = _getPropertyInfo; - this._deleteProperty = _deleteProperty; - this._submitPropertyBatch = _submitPropertyBatch; - this._getClusterEventList = _getClusterEventList; - this._getContainersEventList = _getContainersEventList; - this._getNodeEventList = _getNodeEventList; - this._getNodesEventList = _getNodesEventList; - this._getApplicationEventList = _getApplicationEventList; - this._getApplicationsEventList = _getApplicationsEventList; - this._getServiceEventList = _getServiceEventList; - this._getServicesEventList = _getServicesEventList; - this._getPartitionEventList = _getPartitionEventList; - this._getPartitionsEventList = _getPartitionsEventList; - this._getPartitionReplicaEventList = _getPartitionReplicaEventList; - this._getPartitionReplicasEventList = _getPartitionReplicasEventList; - this._getCorrelatedEventList = _getCorrelatedEventList; - this._createApplicationResource = _createApplicationResource; - this._getApplicationResource = _getApplicationResource; - this._deleteApplicationResource = _deleteApplicationResource; - this._getServices = _getServices; - this._getService = _getService; - this._getReplicas = _getReplicas; - this._getReplica = _getReplica; - this._createVolumeResource = _createVolumeResource; - this._getVolumeResource = _getVolumeResource; - this._deleteVolumeResource = _deleteVolumeResource; - msRest.addSerializationMixin(this); - } - - /** - * @summary Get the Service Fabric cluster manifest. - * - * Get the Service Fabric cluster manifest. The cluster manifest contains - * properties of the cluster that include different node types on the cluster, - * security configurations, fault, and upgrade domain topologies, etc. - * - * These properties are specified as part of the ClusterConfig.JSON file while - * deploying a stand-alone cluster. However, most of the information in the - * cluster manifest - * is generated internally by service fabric during cluster deployment in other - * deployment scenarios (e.g. when using Azure portal). - * - * The contents of the cluster manifest are for informational purposes only and - * users are not expected to take a dependency on the format of the file - * contents or its interpretation. - * - * @param {object} [options] Optional Parameters. - * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error} - The error object. - */ - getClusterManifestWithHttpOperationResponse(options) { - let client = this; - let self = this; - return new Promise((resolve, reject) => { - self._getClusterManifest(options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * @summary Get the Service Fabric cluster manifest. - * - * Get the Service Fabric cluster manifest. The cluster manifest contains - * properties of the cluster that include different node types on the cluster, - * security configurations, fault, and upgrade domain topologies, etc. - * - * These properties are specified as part of the ClusterConfig.JSON file while - * deploying a stand-alone cluster. However, most of the information in the - * cluster manifest - * is generated internally by service fabric during cluster deployment in other - * deployment scenarios (e.g. when using Azure portal). - * - * The contents of the cluster manifest are for informational purposes only and - * users are not expected to take a dependency on the format of the file - * contents or its interpretation. - * - * @param {object} [options] Optional Parameters. - * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} [optionalCallback] - The optional callback. - * - * @returns {function|Promise} If a callback was passed as the last parameter - * then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned - * - * @resolve {ClusterManifest} - The deserialized result object. - * - * @reject {Error} - The error object. - * - * {function} optionalCallback(err, result, request, response) - * - * {Error} err - The Error object if an error occurred, null otherwise. - * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ClusterManifest} for more information. - * - * {object} [request] - The HTTP Request object if an error did not occur. - * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ - getClusterManifest(options, optionalCallback) { - let client = this; - let self = this; - if (!optionalCallback && typeof options === 'function') { - optionalCallback = options; - options = null; - } - if (!optionalCallback) { - return new Promise((resolve, reject) => { - self._getClusterManifest(options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._getClusterManifest(options, optionalCallback); - } - } - - /** - * @summary Gets the health of a Service Fabric cluster. - * - * Use EventsHealthStateFilter to filter the collection of health events - * reported on the cluster based on the health state. - * Similarly, use NodesHealthStateFilter and ApplicationsHealthStateFilter to - * filter the collection of nodes and applications returned based on their - * aggregated health state. - * - * @param {object} [options] Optional Parameters. - * - * @param {number} [options.nodesHealthStateFilter] Allows filtering of the - * node health state objects returned in the result of cluster health query - * based on their health state. The possible values for this parameter include - * integer value of one of the - * following health states. Only nodes that match the filter are returned. All - * nodes are used to evaluate the aggregated health state. - * If not specified, all entries are returned. - * The state values are flag-based enumeration, so the value could be a - * combination of these values obtained using bitwise 'OR' operator. - * For example, if the provided value is 6 then health state of nodes with - * HealthState value of OK (2) and Warning (4) are returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. - * - * @param {number} [options.applicationsHealthStateFilter] Allows filtering of - * the application health state objects returned in the result of cluster - * health - * query based on their health state. - * The possible values for this parameter include integer value obtained from - * members or bitwise operations - * on members of HealthStateFilter enumeration. Only applications that match - * the filter are returned. - * All applications are used to evaluate the aggregated health state. If not - * specified, all entries are returned. - * The state values are flag-based enumeration, so the value could be a - * combination of these values obtained using bitwise 'OR' operator. - * For example, if the provided value is 6 then health state of applications - * with HealthState value of OK (2) and Warning (4) are returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. - * - * @param {number} [options.eventsHealthStateFilter] Allows filtering the - * collection of HealthEvent objects returned based on health state. - * The possible values for this parameter include integer value of one of the - * following health states. - * Only events that match the filter are returned. All events are used to - * evaluate the aggregated health state. - * If not specified, all entries are returned. The state values are flag-based - * enumeration, so the value could be a combination of these values, obtained - * using the bitwise 'OR' operator. For example, If the provided value is 6 - * then all of the events with HealthState value of OK (2) and Warning (4) are - * returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. - * - * @param {boolean} [options.excludeHealthStatistics] Indicates whether the - * health statistics should be returned as part of the query result. False by - * default. - * The statistics show the number of children entities in health state Ok, - * Warning, and Error. - * - * @param {boolean} [options.includeSystemApplicationHealthStatistics] - * Indicates whether the health statistics should include the fabric:/System - * application health statistics. False by default. - * If IncludeSystemApplicationHealthStatistics is set to true, the health - * statistics include the entities that belong to the fabric:/System - * application. - * Otherwise, the query result includes health statistics only for user - * applications. - * The health statistics must be included in the query result for this - * parameter to be applied. - * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error} - The error object. - */ - getClusterHealthWithHttpOperationResponse(options) { - let client = this; - let self = this; - return new Promise((resolve, reject) => { - self._getClusterHealth(options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * @summary Gets the health of a Service Fabric cluster. - * - * Use EventsHealthStateFilter to filter the collection of health events - * reported on the cluster based on the health state. - * Similarly, use NodesHealthStateFilter and ApplicationsHealthStateFilter to - * filter the collection of nodes and applications returned based on their - * aggregated health state. - * - * @param {object} [options] Optional Parameters. - * - * @param {number} [options.nodesHealthStateFilter] Allows filtering of the - * node health state objects returned in the result of cluster health query - * based on their health state. The possible values for this parameter include - * integer value of one of the - * following health states. Only nodes that match the filter are returned. All - * nodes are used to evaluate the aggregated health state. - * If not specified, all entries are returned. - * The state values are flag-based enumeration, so the value could be a - * combination of these values obtained using bitwise 'OR' operator. - * For example, if the provided value is 6 then health state of nodes with - * HealthState value of OK (2) and Warning (4) are returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. - * - * @param {number} [options.applicationsHealthStateFilter] Allows filtering of - * the application health state objects returned in the result of cluster - * health - * query based on their health state. - * The possible values for this parameter include integer value obtained from - * members or bitwise operations - * on members of HealthStateFilter enumeration. Only applications that match - * the filter are returned. - * All applications are used to evaluate the aggregated health state. If not - * specified, all entries are returned. - * The state values are flag-based enumeration, so the value could be a - * combination of these values obtained using bitwise 'OR' operator. - * For example, if the provided value is 6 then health state of applications - * with HealthState value of OK (2) and Warning (4) are returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. - * - * @param {number} [options.eventsHealthStateFilter] Allows filtering the - * collection of HealthEvent objects returned based on health state. - * The possible values for this parameter include integer value of one of the - * following health states. - * Only events that match the filter are returned. All events are used to - * evaluate the aggregated health state. - * If not specified, all entries are returned. The state values are flag-based - * enumeration, so the value could be a combination of these values, obtained - * using the bitwise 'OR' operator. For example, If the provided value is 6 - * then all of the events with HealthState value of OK (2) and Warning (4) are - * returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. - * - * @param {boolean} [options.excludeHealthStatistics] Indicates whether the - * health statistics should be returned as part of the query result. False by - * default. - * The statistics show the number of children entities in health state Ok, - * Warning, and Error. - * - * @param {boolean} [options.includeSystemApplicationHealthStatistics] - * Indicates whether the health statistics should include the fabric:/System - * application health statistics. False by default. - * If IncludeSystemApplicationHealthStatistics is set to true, the health - * statistics include the entities that belong to the fabric:/System - * application. - * Otherwise, the query result includes health statistics only for user - * applications. - * The health statistics must be included in the query result for this - * parameter to be applied. - * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} [optionalCallback] - The optional callback. - * - * @returns {function|Promise} If a callback was passed as the last parameter - * then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned - * - * @resolve {ClusterHealth} - The deserialized result object. - * - * @reject {Error} - The error object. - * - * {function} optionalCallback(err, result, request, response) - * - * {Error} err - The Error object if an error occurred, null otherwise. - * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ClusterHealth} for more information. - * - * {object} [request] - The HTTP Request object if an error did not occur. - * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ - getClusterHealth(options, optionalCallback) { - let client = this; - let self = this; - if (!optionalCallback && typeof options === 'function') { - optionalCallback = options; - options = null; - } - if (!optionalCallback) { - return new Promise((resolve, reject) => { - self._getClusterHealth(options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._getClusterHealth(options, optionalCallback); - } - } - - /** - * @summary Gets the health of a Service Fabric cluster using the specified - * policy. - * - * Use EventsHealthStateFilter to filter the collection of health events - * reported on the cluster based on the health state. - * Similarly, use NodesHealthStateFilter and ApplicationsHealthStateFilter to - * filter the collection of nodes and applications returned based on their - * aggregated health state. - * Use ClusterHealthPolicies to override the health policies used to evaluate - * the health. - * - * @param {object} [options] Optional Parameters. - * - * @param {number} [options.nodesHealthStateFilter] Allows filtering of the - * node health state objects returned in the result of cluster health query - * based on their health state. The possible values for this parameter include - * integer value of one of the - * following health states. Only nodes that match the filter are returned. All - * nodes are used to evaluate the aggregated health state. - * If not specified, all entries are returned. - * The state values are flag-based enumeration, so the value could be a - * combination of these values obtained using bitwise 'OR' operator. - * For example, if the provided value is 6 then health state of nodes with - * HealthState value of OK (2) and Warning (4) are returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. - * - * @param {number} [options.applicationsHealthStateFilter] Allows filtering of - * the application health state objects returned in the result of cluster - * health - * query based on their health state. - * The possible values for this parameter include integer value obtained from - * members or bitwise operations - * on members of HealthStateFilter enumeration. Only applications that match - * the filter are returned. - * All applications are used to evaluate the aggregated health state. If not - * specified, all entries are returned. - * The state values are flag-based enumeration, so the value could be a - * combination of these values obtained using bitwise 'OR' operator. - * For example, if the provided value is 6 then health state of applications - * with HealthState value of OK (2) and Warning (4) are returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. - * - * @param {number} [options.eventsHealthStateFilter] Allows filtering the - * collection of HealthEvent objects returned based on health state. - * The possible values for this parameter include integer value of one of the - * following health states. - * Only events that match the filter are returned. All events are used to - * evaluate the aggregated health state. - * If not specified, all entries are returned. The state values are flag-based - * enumeration, so the value could be a combination of these values, obtained - * using the bitwise 'OR' operator. For example, If the provided value is 6 - * then all of the events with HealthState value of OK (2) and Warning (4) are - * returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. - * - * @param {boolean} [options.excludeHealthStatistics] Indicates whether the - * health statistics should be returned as part of the query result. False by - * default. - * The statistics show the number of children entities in health state Ok, - * Warning, and Error. - * - * @param {boolean} [options.includeSystemApplicationHealthStatistics] - * Indicates whether the health statistics should include the fabric:/System - * application health statistics. False by default. - * If IncludeSystemApplicationHealthStatistics is set to true, the health - * statistics include the entities that belong to the fabric:/System - * application. - * Otherwise, the query result includes health statistics only for user - * applications. - * The health statistics must be included in the query result for this - * parameter to be applied. - * - * @param {object} [options.clusterHealthPolicies] Describes the health - * policies used to evaluate the cluster health. - * If not present, the health evaluation uses the cluster health policy defined - * in the cluster manifest or the default cluster health policy. - * By default, each application is evaluated using its specific application - * health policy, defined in the application manifest, or the default health - * policy, if no policy is defined in manifest. - * If the application health policy map is specified, and it has an entry for - * an application, the specified application health policy - * is used to evaluate the application health. - * - * @param {array} [options.clusterHealthPolicies.applicationHealthPolicyMap] - * Defines a map that contains specific application health policies for - * different applications. - * Each entry specifies as key the application name and as value an - * ApplicationHealthPolicy used to evaluate the application health. - * If an application is not specified in the map, the application health - * evaluation uses the ApplicationHealthPolicy found in its application - * manifest or the default application health policy (if no health policy is - * defined in the manifest). - * The map is empty by default. - * - * @param {object} [options.clusterHealthPolicies.clusterHealthPolicy] Defines - * a health policy used to evaluate the health of the cluster or of a cluster - * node. - * - * @param {boolean} - * [options.clusterHealthPolicies.clusterHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. - * - * @param {number} - * [options.clusterHealthPolicies.clusterHealthPolicy.maxPercentUnhealthyNodes] - * The maximum allowed percentage of unhealthy nodes before reporting an error. - * For example, to allow 10% of nodes to be unhealthy, this value would be 10. - * - * The percentage represents the maximum tolerated percentage of nodes that can - * be unhealthy before the cluster is considered in error. - * If the percentage is respected but there is at least one unhealthy node, the - * health is evaluated as Warning. - * The percentage is calculated by dividing the number of unhealthy nodes over - * the total number of nodes in the cluster. - * The computation rounds up to tolerate one failure on small numbers of nodes. - * Default percentage is zero. - * - * In large clusters, some nodes will always be down or out for repairs, so - * this percentage should be configured to tolerate that. - * - * @param {number} - * [options.clusterHealthPolicies.clusterHealthPolicy.maxPercentUnhealthyApplications] - * The maximum allowed percentage of unhealthy applications before reporting an - * error. For example, to allow 10% of applications to be unhealthy, this value - * would be 10. - * - * The percentage represents the maximum tolerated percentage of applications - * that can be unhealthy before the cluster is considered in error. - * If the percentage is respected but there is at least one unhealthy - * application, the health is evaluated as Warning. - * This is calculated by dividing the number of unhealthy applications over the - * total number of application instances in the cluster, excluding applications - * of application types that are included in the - * ApplicationTypeHealthPolicyMap. - * The computation rounds up to tolerate one failure on small numbers of - * applications. Default percentage is zero. - * - * @param {array} - * [options.clusterHealthPolicies.clusterHealthPolicy.applicationTypeHealthPolicyMap] - * Defines a map with max percentage unhealthy applications for specific - * application types. - * Each entry specifies as key the application type name and as value an - * integer that represents the MaxPercentUnhealthyApplications percentage used - * to evaluate the applications of the specified application type. - * - * The application type health policy map can be used during cluster health - * evaluation to describe special application types. - * The application types included in the map are evaluated against the - * percentage specified in the map, and not with the global - * MaxPercentUnhealthyApplications defined in the cluster health policy. - * The applications of application types specified in the map are not counted - * against the global pool of applications. - * For example, if some applications of a type are critical, the cluster - * administrator can add an entry to the map for that application type - * and assign it a value of 0% (that is, do not tolerate any failures). - * All other applications can be evaluated with MaxPercentUnhealthyApplications - * set to 20% to tolerate some failures out of the thousands of application - * instances. - * The application type health policy map is used only if the cluster manifest - * enables application type health evaluation using the configuration entry for - * HealthManager/EnableApplicationTypeHealthEvaluation. - * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error} - The error object. - */ - getClusterHealthUsingPolicyWithHttpOperationResponse(options) { - let client = this; - let self = this; - return new Promise((resolve, reject) => { - self._getClusterHealthUsingPolicy(options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * @summary Gets the health of a Service Fabric cluster using the specified - * policy. - * - * Use EventsHealthStateFilter to filter the collection of health events - * reported on the cluster based on the health state. - * Similarly, use NodesHealthStateFilter and ApplicationsHealthStateFilter to - * filter the collection of nodes and applications returned based on their - * aggregated health state. - * Use ClusterHealthPolicies to override the health policies used to evaluate - * the health. - * - * @param {object} [options] Optional Parameters. - * - * @param {number} [options.nodesHealthStateFilter] Allows filtering of the - * node health state objects returned in the result of cluster health query - * based on their health state. The possible values for this parameter include - * integer value of one of the - * following health states. Only nodes that match the filter are returned. All - * nodes are used to evaluate the aggregated health state. - * If not specified, all entries are returned. - * The state values are flag-based enumeration, so the value could be a - * combination of these values obtained using bitwise 'OR' operator. - * For example, if the provided value is 6 then health state of nodes with - * HealthState value of OK (2) and Warning (4) are returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. - * - * @param {number} [options.applicationsHealthStateFilter] Allows filtering of - * the application health state objects returned in the result of cluster - * health - * query based on their health state. - * The possible values for this parameter include integer value obtained from - * members or bitwise operations - * on members of HealthStateFilter enumeration. Only applications that match - * the filter are returned. - * All applications are used to evaluate the aggregated health state. If not - * specified, all entries are returned. - * The state values are flag-based enumeration, so the value could be a - * combination of these values obtained using bitwise 'OR' operator. - * For example, if the provided value is 6 then health state of applications - * with HealthState value of OK (2) and Warning (4) are returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. - * - * @param {number} [options.eventsHealthStateFilter] Allows filtering the - * collection of HealthEvent objects returned based on health state. - * The possible values for this parameter include integer value of one of the - * following health states. - * Only events that match the filter are returned. All events are used to - * evaluate the aggregated health state. - * If not specified, all entries are returned. The state values are flag-based - * enumeration, so the value could be a combination of these values, obtained - * using the bitwise 'OR' operator. For example, If the provided value is 6 - * then all of the events with HealthState value of OK (2) and Warning (4) are - * returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. - * - * @param {boolean} [options.excludeHealthStatistics] Indicates whether the - * health statistics should be returned as part of the query result. False by - * default. - * The statistics show the number of children entities in health state Ok, - * Warning, and Error. - * - * @param {boolean} [options.includeSystemApplicationHealthStatistics] - * Indicates whether the health statistics should include the fabric:/System - * application health statistics. False by default. - * If IncludeSystemApplicationHealthStatistics is set to true, the health - * statistics include the entities that belong to the fabric:/System - * application. - * Otherwise, the query result includes health statistics only for user - * applications. - * The health statistics must be included in the query result for this - * parameter to be applied. - * - * @param {object} [options.clusterHealthPolicies] Describes the health - * policies used to evaluate the cluster health. - * If not present, the health evaluation uses the cluster health policy defined - * in the cluster manifest or the default cluster health policy. - * By default, each application is evaluated using its specific application - * health policy, defined in the application manifest, or the default health - * policy, if no policy is defined in manifest. - * If the application health policy map is specified, and it has an entry for - * an application, the specified application health policy - * is used to evaluate the application health. - * - * @param {array} [options.clusterHealthPolicies.applicationHealthPolicyMap] - * Defines a map that contains specific application health policies for - * different applications. - * Each entry specifies as key the application name and as value an - * ApplicationHealthPolicy used to evaluate the application health. - * If an application is not specified in the map, the application health - * evaluation uses the ApplicationHealthPolicy found in its application - * manifest or the default application health policy (if no health policy is - * defined in the manifest). - * The map is empty by default. - * - * @param {object} [options.clusterHealthPolicies.clusterHealthPolicy] Defines - * a health policy used to evaluate the health of the cluster or of a cluster - * node. - * - * @param {boolean} - * [options.clusterHealthPolicies.clusterHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. - * - * @param {number} - * [options.clusterHealthPolicies.clusterHealthPolicy.maxPercentUnhealthyNodes] - * The maximum allowed percentage of unhealthy nodes before reporting an error. - * For example, to allow 10% of nodes to be unhealthy, this value would be 10. - * - * The percentage represents the maximum tolerated percentage of nodes that can - * be unhealthy before the cluster is considered in error. - * If the percentage is respected but there is at least one unhealthy node, the - * health is evaluated as Warning. - * The percentage is calculated by dividing the number of unhealthy nodes over - * the total number of nodes in the cluster. - * The computation rounds up to tolerate one failure on small numbers of nodes. - * Default percentage is zero. - * - * In large clusters, some nodes will always be down or out for repairs, so - * this percentage should be configured to tolerate that. - * - * @param {number} - * [options.clusterHealthPolicies.clusterHealthPolicy.maxPercentUnhealthyApplications] - * The maximum allowed percentage of unhealthy applications before reporting an - * error. For example, to allow 10% of applications to be unhealthy, this value - * would be 10. - * - * The percentage represents the maximum tolerated percentage of applications - * that can be unhealthy before the cluster is considered in error. - * If the percentage is respected but there is at least one unhealthy - * application, the health is evaluated as Warning. - * This is calculated by dividing the number of unhealthy applications over the - * total number of application instances in the cluster, excluding applications - * of application types that are included in the - * ApplicationTypeHealthPolicyMap. - * The computation rounds up to tolerate one failure on small numbers of - * applications. Default percentage is zero. - * - * @param {array} - * [options.clusterHealthPolicies.clusterHealthPolicy.applicationTypeHealthPolicyMap] - * Defines a map with max percentage unhealthy applications for specific - * application types. - * Each entry specifies as key the application type name and as value an - * integer that represents the MaxPercentUnhealthyApplications percentage used - * to evaluate the applications of the specified application type. - * - * The application type health policy map can be used during cluster health - * evaluation to describe special application types. - * The application types included in the map are evaluated against the - * percentage specified in the map, and not with the global - * MaxPercentUnhealthyApplications defined in the cluster health policy. - * The applications of application types specified in the map are not counted - * against the global pool of applications. - * For example, if some applications of a type are critical, the cluster - * administrator can add an entry to the map for that application type - * and assign it a value of 0% (that is, do not tolerate any failures). - * All other applications can be evaluated with MaxPercentUnhealthyApplications - * set to 20% to tolerate some failures out of the thousands of application - * instances. - * The application type health policy map is used only if the cluster manifest - * enables application type health evaluation using the configuration entry for - * HealthManager/EnableApplicationTypeHealthEvaluation. - * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} [optionalCallback] - The optional callback. - * - * @returns {function|Promise} If a callback was passed as the last parameter - * then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned - * - * @resolve {ClusterHealth} - The deserialized result object. - * - * @reject {Error} - The error object. - * - * {function} optionalCallback(err, result, request, response) - * - * {Error} err - The Error object if an error occurred, null otherwise. - * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ClusterHealth} for more information. - * - * {object} [request] - The HTTP Request object if an error did not occur. - * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ - getClusterHealthUsingPolicy(options, optionalCallback) { - let client = this; - let self = this; - if (!optionalCallback && typeof options === 'function') { - optionalCallback = options; - options = null; - } - if (!optionalCallback) { - return new Promise((resolve, reject) => { - self._getClusterHealthUsingPolicy(options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._getClusterHealthUsingPolicy(options, optionalCallback); - } - } - - /** - * @summary Gets the health of a Service Fabric cluster using health chunks. - * - * Gets the health of a Service Fabric cluster using health chunks. Includes - * the aggregated health state of the cluster, but none of the cluster - * entities. - * To expand the cluster health and get the health state of all or some of the - * entities, use the POST URI and specify the cluster health chunk query - * description. - * - * @param {object} [options] Optional Parameters. - * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error} - The error object. - */ - getClusterHealthChunkWithHttpOperationResponse(options) { - let client = this; - let self = this; - return new Promise((resolve, reject) => { - self._getClusterHealthChunk(options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * @summary Gets the health of a Service Fabric cluster using health chunks. - * - * Gets the health of a Service Fabric cluster using health chunks. Includes - * the aggregated health state of the cluster, but none of the cluster - * entities. - * To expand the cluster health and get the health state of all or some of the - * entities, use the POST URI and specify the cluster health chunk query - * description. - * - * @param {object} [options] Optional Parameters. - * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} [optionalCallback] - The optional callback. - * - * @returns {function|Promise} If a callback was passed as the last parameter - * then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned - * - * @resolve {ClusterHealthChunk} - The deserialized result object. - * - * @reject {Error} - The error object. - * - * {function} optionalCallback(err, result, request, response) - * - * {Error} err - The Error object if an error occurred, null otherwise. - * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ClusterHealthChunk} for more information. - * - * {object} [request] - The HTTP Request object if an error did not occur. - * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ - getClusterHealthChunk(options, optionalCallback) { - let client = this; - let self = this; - if (!optionalCallback && typeof options === 'function') { - optionalCallback = options; - options = null; - } - if (!optionalCallback) { - return new Promise((resolve, reject) => { - self._getClusterHealthChunk(options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._getClusterHealthChunk(options, optionalCallback); - } - } - - /** - * @summary Gets the health of a Service Fabric cluster using health chunks. - * - * Gets the health of a Service Fabric cluster using health chunks. The health - * evaluation is done based on the input cluster health chunk query - * description. - * The query description allows users to specify health policies for evaluating - * the cluster and its children. - * Users can specify very flexible filters to select which cluster entities to - * return. The selection can be done based on the entities health state and - * based on the hierarchy. - * The query can return multi-level children of the entities based on the - * specified filters. For example, it can return one application with a - * specified name, and for this application, return - * only services that are in Error or Warning, and all partitions and replicas - * for one of these services. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.clusterHealthChunkQueryDescription] Describes the - * cluster and application health policies used to evaluate the cluster health - * and the filters to select which cluster entities to be returned. - * If the cluster health policy is present, it is used to evaluate the cluster - * events and the cluster nodes. If not present, the health evaluation uses the - * cluster health policy defined in the cluster manifest or the default cluster - * health policy. - * By default, each application is evaluated using its specific application - * health policy, defined in the application manifest, or the default health - * policy, if no policy is defined in manifest. - * If the application health policy map is specified, and it has an entry for - * an application, the specified application health policy - * is used to evaluate the application health. - * Users can specify very flexible filters to select which cluster entities to - * include in response. The selection can be done based on the entities health - * state and based on the hierarchy. - * The query can return multi-level children of the entities based on the - * specified filters. For example, it can return one application with a - * specified name, and for this application, return - * only services that are in Error or Warning, and all partitions and replicas - * for one of these services. - * - * @param {array} [options.clusterHealthChunkQueryDescription.nodeFilters] - * Defines a list of filters that specify which nodes to be included in the - * returned cluster health chunk. - * If no filters are specified, no nodes are returned. All the nodes are used - * to evaluate the cluster's aggregated health state, regardless of the input - * filters. - * The cluster health chunk query may specify multiple node filters. - * For example, it can specify a filter to return all nodes with health state - * Error and another filter to always include a node identified by its - * NodeName. - * - * @param {array} - * [options.clusterHealthChunkQueryDescription.applicationFilters] Defines a - * list of filters that specify which applications to be included in the - * returned cluster health chunk. - * If no filters are specified, no applications are returned. All the - * applications are used to evaluate the cluster's aggregated health state, - * regardless of the input filters. - * The cluster health chunk query may specify multiple application filters. - * For example, it can specify a filter to return all applications with health - * state Error and another filter to always include applications of a specified - * application type. - * - * @param {object} - * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy] Defines a - * health policy used to evaluate the health of the cluster or of a cluster - * node. - * - * @param {boolean} - * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. - * - * @param {number} - * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.maxPercentUnhealthyNodes] - * The maximum allowed percentage of unhealthy nodes before reporting an error. - * For example, to allow 10% of nodes to be unhealthy, this value would be 10. - * - * The percentage represents the maximum tolerated percentage of nodes that can - * be unhealthy before the cluster is considered in error. - * If the percentage is respected but there is at least one unhealthy node, the - * health is evaluated as Warning. - * The percentage is calculated by dividing the number of unhealthy nodes over - * the total number of nodes in the cluster. - * The computation rounds up to tolerate one failure on small numbers of nodes. - * Default percentage is zero. - * - * In large clusters, some nodes will always be down or out for repairs, so - * this percentage should be configured to tolerate that. - * - * @param {number} - * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.maxPercentUnhealthyApplications] - * The maximum allowed percentage of unhealthy applications before reporting an - * error. For example, to allow 10% of applications to be unhealthy, this value - * would be 10. - * - * The percentage represents the maximum tolerated percentage of applications - * that can be unhealthy before the cluster is considered in error. - * If the percentage is respected but there is at least one unhealthy - * application, the health is evaluated as Warning. - * This is calculated by dividing the number of unhealthy applications over the - * total number of application instances in the cluster, excluding applications - * of application types that are included in the - * ApplicationTypeHealthPolicyMap. - * The computation rounds up to tolerate one failure on small numbers of - * applications. Default percentage is zero. - * - * @param {array} - * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] - * Defines a map with max percentage unhealthy applications for specific - * application types. - * Each entry specifies as key the application type name and as value an - * integer that represents the MaxPercentUnhealthyApplications percentage used - * to evaluate the applications of the specified application type. - * - * The application type health policy map can be used during cluster health - * evaluation to describe special application types. - * The application types included in the map are evaluated against the - * percentage specified in the map, and not with the global - * MaxPercentUnhealthyApplications defined in the cluster health policy. - * The applications of application types specified in the map are not counted - * against the global pool of applications. - * For example, if some applications of a type are critical, the cluster - * administrator can add an entry to the map for that application type - * and assign it a value of 0% (that is, do not tolerate any failures). - * All other applications can be evaluated with MaxPercentUnhealthyApplications - * set to 20% to tolerate some failures out of the thousands of application - * instances. - * The application type health policy map is used only if the cluster manifest - * enables application type health evaluation using the configuration entry for - * HealthManager/EnableApplicationTypeHealthEvaluation. - * - * @param {object} - * [options.clusterHealthChunkQueryDescription.applicationHealthPolicies] - * Defines the application health policy map used to evaluate the health of an - * application or one of its children entities. - * - * @param {array} - * [options.clusterHealthChunkQueryDescription.applicationHealthPolicies.applicationHealthPolicyMap] - * The wrapper that contains the map with application health policies used to - * evaluate specific applications in the cluster. - * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error} - The error object. - */ - getClusterHealthChunkUsingPolicyAndAdvancedFiltersWithHttpOperationResponse(options) { - let client = this; - let self = this; - return new Promise((resolve, reject) => { - self._getClusterHealthChunkUsingPolicyAndAdvancedFilters(options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * @summary Gets the health of a Service Fabric cluster using health chunks. - * - * Gets the health of a Service Fabric cluster using health chunks. The health - * evaluation is done based on the input cluster health chunk query - * description. - * The query description allows users to specify health policies for evaluating - * the cluster and its children. - * Users can specify very flexible filters to select which cluster entities to - * return. The selection can be done based on the entities health state and - * based on the hierarchy. - * The query can return multi-level children of the entities based on the - * specified filters. For example, it can return one application with a - * specified name, and for this application, return - * only services that are in Error or Warning, and all partitions and replicas - * for one of these services. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.clusterHealthChunkQueryDescription] Describes the - * cluster and application health policies used to evaluate the cluster health - * and the filters to select which cluster entities to be returned. - * If the cluster health policy is present, it is used to evaluate the cluster - * events and the cluster nodes. If not present, the health evaluation uses the - * cluster health policy defined in the cluster manifest or the default cluster - * health policy. - * By default, each application is evaluated using its specific application - * health policy, defined in the application manifest, or the default health - * policy, if no policy is defined in manifest. - * If the application health policy map is specified, and it has an entry for - * an application, the specified application health policy - * is used to evaluate the application health. - * Users can specify very flexible filters to select which cluster entities to - * include in response. The selection can be done based on the entities health - * state and based on the hierarchy. - * The query can return multi-level children of the entities based on the - * specified filters. For example, it can return one application with a - * specified name, and for this application, return - * only services that are in Error or Warning, and all partitions and replicas - * for one of these services. - * - * @param {array} [options.clusterHealthChunkQueryDescription.nodeFilters] - * Defines a list of filters that specify which nodes to be included in the - * returned cluster health chunk. - * If no filters are specified, no nodes are returned. All the nodes are used - * to evaluate the cluster's aggregated health state, regardless of the input - * filters. - * The cluster health chunk query may specify multiple node filters. - * For example, it can specify a filter to return all nodes with health state - * Error and another filter to always include a node identified by its - * NodeName. - * - * @param {array} - * [options.clusterHealthChunkQueryDescription.applicationFilters] Defines a - * list of filters that specify which applications to be included in the - * returned cluster health chunk. - * If no filters are specified, no applications are returned. All the - * applications are used to evaluate the cluster's aggregated health state, - * regardless of the input filters. - * The cluster health chunk query may specify multiple application filters. - * For example, it can specify a filter to return all applications with health - * state Error and another filter to always include applications of a specified - * application type. - * - * @param {object} - * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy] Defines a - * health policy used to evaluate the health of the cluster or of a cluster - * node. - * - * @param {boolean} - * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. - * - * @param {number} - * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.maxPercentUnhealthyNodes] - * The maximum allowed percentage of unhealthy nodes before reporting an error. - * For example, to allow 10% of nodes to be unhealthy, this value would be 10. - * - * The percentage represents the maximum tolerated percentage of nodes that can - * be unhealthy before the cluster is considered in error. - * If the percentage is respected but there is at least one unhealthy node, the - * health is evaluated as Warning. - * The percentage is calculated by dividing the number of unhealthy nodes over - * the total number of nodes in the cluster. - * The computation rounds up to tolerate one failure on small numbers of nodes. - * Default percentage is zero. - * - * In large clusters, some nodes will always be down or out for repairs, so - * this percentage should be configured to tolerate that. - * - * @param {number} - * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.maxPercentUnhealthyApplications] - * The maximum allowed percentage of unhealthy applications before reporting an - * error. For example, to allow 10% of applications to be unhealthy, this value - * would be 10. - * - * The percentage represents the maximum tolerated percentage of applications - * that can be unhealthy before the cluster is considered in error. - * If the percentage is respected but there is at least one unhealthy - * application, the health is evaluated as Warning. - * This is calculated by dividing the number of unhealthy applications over the - * total number of application instances in the cluster, excluding applications - * of application types that are included in the - * ApplicationTypeHealthPolicyMap. - * The computation rounds up to tolerate one failure on small numbers of - * applications. Default percentage is zero. - * - * @param {array} - * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] - * Defines a map with max percentage unhealthy applications for specific - * application types. - * Each entry specifies as key the application type name and as value an - * integer that represents the MaxPercentUnhealthyApplications percentage used - * to evaluate the applications of the specified application type. - * - * The application type health policy map can be used during cluster health - * evaluation to describe special application types. - * The application types included in the map are evaluated against the - * percentage specified in the map, and not with the global - * MaxPercentUnhealthyApplications defined in the cluster health policy. - * The applications of application types specified in the map are not counted - * against the global pool of applications. - * For example, if some applications of a type are critical, the cluster - * administrator can add an entry to the map for that application type - * and assign it a value of 0% (that is, do not tolerate any failures). - * All other applications can be evaluated with MaxPercentUnhealthyApplications - * set to 20% to tolerate some failures out of the thousands of application - * instances. - * The application type health policy map is used only if the cluster manifest - * enables application type health evaluation using the configuration entry for - * HealthManager/EnableApplicationTypeHealthEvaluation. - * - * @param {object} - * [options.clusterHealthChunkQueryDescription.applicationHealthPolicies] - * Defines the application health policy map used to evaluate the health of an - * application or one of its children entities. - * - * @param {array} - * [options.clusterHealthChunkQueryDescription.applicationHealthPolicies.applicationHealthPolicyMap] - * The wrapper that contains the map with application health policies used to - * evaluate specific applications in the cluster. - * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} [optionalCallback] - The optional callback. - * - * @returns {function|Promise} If a callback was passed as the last parameter - * then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned - * - * @resolve {ClusterHealthChunk} - The deserialized result object. - * - * @reject {Error} - The error object. - * - * {function} optionalCallback(err, result, request, response) - * - * {Error} err - The Error object if an error occurred, null otherwise. - * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ClusterHealthChunk} for more information. - * - * {object} [request] - The HTTP Request object if an error did not occur. - * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ - getClusterHealthChunkUsingPolicyAndAdvancedFilters(options, optionalCallback) { - let client = this; - let self = this; - if (!optionalCallback && typeof options === 'function') { - optionalCallback = options; - options = null; - } - if (!optionalCallback) { - return new Promise((resolve, reject) => { - self._getClusterHealthChunkUsingPolicyAndAdvancedFilters(options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._getClusterHealthChunkUsingPolicyAndAdvancedFilters(options, optionalCallback); - } - } - - /** - * @summary Sends a health report on the Service Fabric cluster. - * - * Sends a health report on a Service Fabric cluster. The report must contain - * the information about the source of the health report and property on which - * it is reported. - * The report is sent to a Service Fabric gateway node, which forwards to the - * health store. - * The report may be accepted by the gateway, but rejected by the health store - * after extra validation. - * For example, the health store may reject the report because of an invalid - * parameter, like a stale sequence number. - * To see whether the report was applied in the health store, run - * GetClusterHealth and check that the report appears in the HealthEvents - * section. - * - * @param {object} healthInformation Describes the health information for the - * health report. This information needs to be present in all of the health - * reports sent to the health manager. - * - * @param {string} healthInformation.sourceId The source name that identifies - * the client/watchdog/system component that generated the health information. - * - * @param {string} healthInformation.property The property of the health - * information. An entity can have health reports for different properties. - * The property is a string and not a fixed enumeration to allow the reporter - * flexibility to categorize the state condition that triggers the report. - * For example, a reporter with SourceId "LocalWatchdog" can monitor the state - * of the available disk on a node, - * so it can report "AvailableDisk" property on that node. - * The same reporter can monitor the node connectivity, so it can report a - * property "Connectivity" on the same node. - * In the health store, these reports are treated as separate health events for - * the specified node. - * - * Together with the SourceId, the property uniquely identifies the health - * information. - * - * @param {string} healthInformation.healthState The health state of a Service - * Fabric entity such as Cluster, Node, Application, Service, Partition, - * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - * 'Unknown' - * - * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field uses ISO8601 - * format for specifying the duration. - * When clients report periodically, they should send reports with higher - * frequency than time to live. - * If clients report on transition, they can set the time to live to infinite. - * When time to live expires, the health event that contains the health - * information - * is either removed from health store, if RemoveWhenExpired is true, or - * evaluated at error, if RemoveWhenExpired false. - * - * If not specified, time to live defaults to infinite value. + let packageInfo = this.getPackageJsonInfo(__dirname); + this.addUserAgentInfo(`${packageInfo.name}/${packageInfo.version}`); + this.meshSecret = new operations.MeshSecret(this); + this.meshSecretValue = new operations.MeshSecretValue(this); + this.meshVolume = new operations.MeshVolume(this); + this.meshNetwork = new operations.MeshNetwork(this); + this.meshApplication = new operations.MeshApplication(this); + this.meshService = new operations.MeshService(this); + this.meshCodePackage = new operations.MeshCodePackage(this); + this.meshServiceReplica = new operations.MeshServiceReplica(this); + this.meshGateway = new operations.MeshGateway(this); + this.models = models; + this._getClusterManifest = _getClusterManifest; + this._getClusterHealth = _getClusterHealth; + this._getClusterHealthUsingPolicy = _getClusterHealthUsingPolicy; + this._getClusterHealthChunk = _getClusterHealthChunk; + this._getClusterHealthChunkUsingPolicyAndAdvancedFilters = _getClusterHealthChunkUsingPolicyAndAdvancedFilters; + this._reportClusterHealth = _reportClusterHealth; + this._getProvisionedFabricCodeVersionInfoList = _getProvisionedFabricCodeVersionInfoList; + this._getProvisionedFabricConfigVersionInfoList = _getProvisionedFabricConfigVersionInfoList; + this._getClusterUpgradeProgress = _getClusterUpgradeProgress; + this._getClusterConfiguration = _getClusterConfiguration; + this._getClusterConfigurationUpgradeStatus = _getClusterConfigurationUpgradeStatus; + this._getUpgradeOrchestrationServiceState = _getUpgradeOrchestrationServiceState; + this._setUpgradeOrchestrationServiceState = _setUpgradeOrchestrationServiceState; + this._provisionCluster = _provisionCluster; + this._unprovisionCluster = _unprovisionCluster; + this._rollbackClusterUpgrade = _rollbackClusterUpgrade; + this._resumeClusterUpgrade = _resumeClusterUpgrade; + this._startClusterUpgrade = _startClusterUpgrade; + this._startClusterConfigurationUpgrade = _startClusterConfigurationUpgrade; + this._updateClusterUpgrade = _updateClusterUpgrade; + this._getAadMetadata = _getAadMetadata; + this._getClusterVersion = _getClusterVersion; + this._getNodeInfoList = _getNodeInfoList; + this._getNodeInfo = _getNodeInfo; + this._getNodeHealth = _getNodeHealth; + this._getNodeHealthUsingPolicy = _getNodeHealthUsingPolicy; + this._reportNodeHealth = _reportNodeHealth; + this._getNodeLoadInfo = _getNodeLoadInfo; + this._disableNode = _disableNode; + this._enableNode = _enableNode; + this._removeNodeState = _removeNodeState; + this._restartNode = _restartNode; + this._getApplicationTypeInfoList = _getApplicationTypeInfoList; + this._getApplicationTypeInfoListByName = _getApplicationTypeInfoListByName; + this._provisionApplicationType = _provisionApplicationType; + this._unprovisionApplicationType = _unprovisionApplicationType; + this._getServiceTypeInfoList = _getServiceTypeInfoList; + this._getServiceTypeInfoByName = _getServiceTypeInfoByName; + this._getServiceManifest = _getServiceManifest; + this._getDeployedServiceTypeInfoList = _getDeployedServiceTypeInfoList; + this._getDeployedServiceTypeInfoByName = _getDeployedServiceTypeInfoByName; + this._createApplication = _createApplication; + this._deleteApplication = _deleteApplication; + this._getApplicationLoadInfo = _getApplicationLoadInfo; + this._getApplicationInfoList = _getApplicationInfoList; + this._getApplicationInfo = _getApplicationInfo; + this._getApplicationHealth = _getApplicationHealth; + this._getApplicationHealthUsingPolicy = _getApplicationHealthUsingPolicy; + this._reportApplicationHealth = _reportApplicationHealth; + this._startApplicationUpgrade = _startApplicationUpgrade; + this._getApplicationUpgrade = _getApplicationUpgrade; + this._updateApplicationUpgrade = _updateApplicationUpgrade; + this._resumeApplicationUpgrade = _resumeApplicationUpgrade; + this._rollbackApplicationUpgrade = _rollbackApplicationUpgrade; + this._getDeployedApplicationInfoList = _getDeployedApplicationInfoList; + this._getDeployedApplicationInfo = _getDeployedApplicationInfo; + this._getDeployedApplicationHealth = _getDeployedApplicationHealth; + this._getDeployedApplicationHealthUsingPolicy = _getDeployedApplicationHealthUsingPolicy; + this._reportDeployedApplicationHealth = _reportDeployedApplicationHealth; + this._getApplicationManifest = _getApplicationManifest; + this._getServiceInfoList = _getServiceInfoList; + this._getServiceInfo = _getServiceInfo; + this._getApplicationNameInfo = _getApplicationNameInfo; + this._createService = _createService; + this._createServiceFromTemplate = _createServiceFromTemplate; + this._deleteService = _deleteService; + this._updateService = _updateService; + this._getServiceDescription = _getServiceDescription; + this._getServiceHealth = _getServiceHealth; + this._getServiceHealthUsingPolicy = _getServiceHealthUsingPolicy; + this._reportServiceHealth = _reportServiceHealth; + this._resolveService = _resolveService; + this._getPartitionInfoList = _getPartitionInfoList; + this._getPartitionInfo = _getPartitionInfo; + this._getServiceNameInfo = _getServiceNameInfo; + this._getPartitionHealth = _getPartitionHealth; + this._getPartitionHealthUsingPolicy = _getPartitionHealthUsingPolicy; + this._reportPartitionHealth = _reportPartitionHealth; + this._getPartitionLoadInformation = _getPartitionLoadInformation; + this._resetPartitionLoad = _resetPartitionLoad; + this._recoverPartition = _recoverPartition; + this._recoverServicePartitions = _recoverServicePartitions; + this._recoverSystemPartitions = _recoverSystemPartitions; + this._recoverAllPartitions = _recoverAllPartitions; + this._createRepairTask = _createRepairTask; + this._cancelRepairTask = _cancelRepairTask; + this._deleteRepairTask = _deleteRepairTask; + this._getRepairTaskList = _getRepairTaskList; + this._forceApproveRepairTask = _forceApproveRepairTask; + this._updateRepairTaskHealthPolicy = _updateRepairTaskHealthPolicy; + this._updateRepairExecutionState = _updateRepairExecutionState; + this._getReplicaInfoList = _getReplicaInfoList; + this._getReplicaInfo = _getReplicaInfo; + this._getReplicaHealth = _getReplicaHealth; + this._getReplicaHealthUsingPolicy = _getReplicaHealthUsingPolicy; + this._reportReplicaHealth = _reportReplicaHealth; + this._getDeployedServiceReplicaInfoList = _getDeployedServiceReplicaInfoList; + this._getDeployedServiceReplicaDetailInfo = _getDeployedServiceReplicaDetailInfo; + this._getDeployedServiceReplicaDetailInfoByPartitionId = _getDeployedServiceReplicaDetailInfoByPartitionId; + this._restartReplica = _restartReplica; + this._removeReplica = _removeReplica; + this._getDeployedServicePackageInfoList = _getDeployedServicePackageInfoList; + this._getDeployedServicePackageInfoListByName = _getDeployedServicePackageInfoListByName; + this._getDeployedServicePackageHealth = _getDeployedServicePackageHealth; + this._getDeployedServicePackageHealthUsingPolicy = _getDeployedServicePackageHealthUsingPolicy; + this._reportDeployedServicePackageHealth = _reportDeployedServicePackageHealth; + this._deployServicePackageToNode = _deployServicePackageToNode; + this._getDeployedCodePackageInfoList = _getDeployedCodePackageInfoList; + this._restartDeployedCodePackage = _restartDeployedCodePackage; + this._getContainerLogsDeployedOnNode = _getContainerLogsDeployedOnNode; + this._invokeContainerApi = _invokeContainerApi; + this._createComposeDeployment = _createComposeDeployment; + this._getComposeDeploymentStatus = _getComposeDeploymentStatus; + this._getComposeDeploymentStatusList = _getComposeDeploymentStatusList; + this._getComposeDeploymentUpgradeProgress = _getComposeDeploymentUpgradeProgress; + this._removeComposeDeployment = _removeComposeDeployment; + this._startComposeDeploymentUpgrade = _startComposeDeploymentUpgrade; + this._startRollbackComposeDeploymentUpgrade = _startRollbackComposeDeploymentUpgrade; + this._getChaos = _getChaos; + this._startChaos = _startChaos; + this._stopChaos = _stopChaos; + this._getChaosEvents = _getChaosEvents; + this._getChaosSchedule = _getChaosSchedule; + this._postChaosSchedule = _postChaosSchedule; + this._uploadFile = _uploadFile; + this._getImageStoreContent = _getImageStoreContent; + this._deleteImageStoreContent = _deleteImageStoreContent; + this._getImageStoreRootContent = _getImageStoreRootContent; + this._copyImageStoreContent = _copyImageStoreContent; + this._deleteImageStoreUploadSession = _deleteImageStoreUploadSession; + this._commitImageStoreUploadSession = _commitImageStoreUploadSession; + this._getImageStoreUploadSessionById = _getImageStoreUploadSessionById; + this._getImageStoreUploadSessionByPath = _getImageStoreUploadSessionByPath; + this._uploadFileChunk = _uploadFileChunk; + this._invokeInfrastructureCommand = _invokeInfrastructureCommand; + this._invokeInfrastructureQuery = _invokeInfrastructureQuery; + this._startDataLoss = _startDataLoss; + this._getDataLossProgress = _getDataLossProgress; + this._startQuorumLoss = _startQuorumLoss; + this._getQuorumLossProgress = _getQuorumLossProgress; + this._startPartitionRestart = _startPartitionRestart; + this._getPartitionRestartProgress = _getPartitionRestartProgress; + this._startNodeTransition = _startNodeTransition; + this._getNodeTransitionProgress = _getNodeTransitionProgress; + this._getFaultOperationList = _getFaultOperationList; + this._cancelOperation = _cancelOperation; + this._createBackupPolicy = _createBackupPolicy; + this._deleteBackupPolicy = _deleteBackupPolicy; + this._getBackupPolicyList = _getBackupPolicyList; + this._getBackupPolicyByName = _getBackupPolicyByName; + this._getAllEntitiesBackedUpByPolicy = _getAllEntitiesBackedUpByPolicy; + this._updateBackupPolicy = _updateBackupPolicy; + this._enableApplicationBackup = _enableApplicationBackup; + this._disableApplicationBackup = _disableApplicationBackup; + this._getApplicationBackupConfigurationInfo = _getApplicationBackupConfigurationInfo; + this._getApplicationBackupList = _getApplicationBackupList; + this._suspendApplicationBackup = _suspendApplicationBackup; + this._resumeApplicationBackup = _resumeApplicationBackup; + this._enableServiceBackup = _enableServiceBackup; + this._disableServiceBackup = _disableServiceBackup; + this._getServiceBackupConfigurationInfo = _getServiceBackupConfigurationInfo; + this._getServiceBackupList = _getServiceBackupList; + this._suspendServiceBackup = _suspendServiceBackup; + this._resumeServiceBackup = _resumeServiceBackup; + this._enablePartitionBackup = _enablePartitionBackup; + this._disablePartitionBackup = _disablePartitionBackup; + this._getPartitionBackupConfigurationInfo = _getPartitionBackupConfigurationInfo; + this._getPartitionBackupList = _getPartitionBackupList; + this._suspendPartitionBackup = _suspendPartitionBackup; + this._resumePartitionBackup = _resumePartitionBackup; + this._backupPartition = _backupPartition; + this._getPartitionBackupProgress = _getPartitionBackupProgress; + this._restorePartition = _restorePartition; + this._getPartitionRestoreProgress = _getPartitionRestoreProgress; + this._getBackupsFromBackupLocation = _getBackupsFromBackupLocation; + this._createName = _createName; + this._getNameExistsInfo = _getNameExistsInfo; + this._deleteName = _deleteName; + this._getSubNameInfoList = _getSubNameInfoList; + this._getPropertyInfoList = _getPropertyInfoList; + this._putProperty = _putProperty; + this._getPropertyInfo = _getPropertyInfo; + this._deleteProperty = _deleteProperty; + this._submitPropertyBatch = _submitPropertyBatch; + this._getClusterEventList = _getClusterEventList; + this._getContainersEventList = _getContainersEventList; + this._getNodeEventList = _getNodeEventList; + this._getNodesEventList = _getNodesEventList; + this._getApplicationEventList = _getApplicationEventList; + this._getApplicationsEventList = _getApplicationsEventList; + this._getServiceEventList = _getServiceEventList; + this._getServicesEventList = _getServicesEventList; + this._getPartitionEventList = _getPartitionEventList; + this._getPartitionsEventList = _getPartitionsEventList; + this._getPartitionReplicaEventList = _getPartitionReplicaEventList; + this._getPartitionReplicasEventList = _getPartitionReplicasEventList; + this._getCorrelatedEventList = _getCorrelatedEventList; + msRest.addSerializationMixin(this); + } + + /** + * @summary Get the Service Fabric cluster manifest. * - * @param {string} [healthInformation.description] The description of the - * health information. It represents free text used to add human readable - * information about the report. - * The maximum string length for the description is 4096 characters. - * If the provided string is longer, it will be automatically truncated. - * When truncated, the last characters of the description contain a marker - * "[Truncated]", and total string size is 4096 characters. - * The presence of the marker indicates to users that truncation occurred. - * Note that when truncated, the description has less than 4096 characters from - * the original string. + * Get the Service Fabric cluster manifest. The cluster manifest contains + * properties of the cluster that include different node types on the cluster, + * security configurations, fault, and upgrade domain topologies, etc. * - * @param {string} [healthInformation.sequenceNumber] The sequence number for - * this health report as a numeric string. - * The report sequence number is used by the health store to detect stale - * reports. - * If not specified, a sequence number is auto-generated by the health client - * when a report is added. + * These properties are specified as part of the ClusterConfig.JSON file while + * deploying a stand-alone cluster. However, most of the information in the + * cluster manifest + * is generated internally by service fabric during cluster deployment in other + * deployment scenarios (e.g. when using Azure portal). * - * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates - * whether the report is removed from health store when it expires. - * If set to true, the report is removed from the health store after it - * expires. - * If set to false, the report is treated as an error when expired. The value - * of this property is false by default. - * When clients report periodically, they should set RemoveWhenExpired false - * (default). - * This way, is the reporter has issues (eg. deadlock) and can't report, the - * entity is evaluated at error when the health report expires. - * This flags the entity as being in Error health state. + * The contents of the cluster manifest are for informational purposes only and + * users are not expected to take a dependency on the format of the file + * contents or its interpretation. * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.immediate] A flag that indicates whether the - * report should be sent immediately. - * A health report is sent to a Service Fabric gateway Application, which - * forwards to the health store. - * If Immediate is set to true, the report is sent immediately from HTTP - * Gateway to the health store, regardless of the fabric client settings that - * the HTTP Gateway Application is using. - * This is useful for critical reports that should be sent as soon as possible. - * Depending on timing and other conditions, sending the report may still fail, - * for example if the HTTP Gateway is closed or the message doesn't reach the - * Gateway. - * If Immediate is set to false, the report is sent based on the health client - * settings from the HTTP Gateway. Therefore, it will be batched according to - * the HealthReportSendInterval configuration. - * This is the recommended setting because it allows the health client to - * optimize health reporting messages to health store as well as health report - * processing. - * By default, reports are not sent immediately. - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -39490,15 +37130,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - reportClusterHealthWithHttpOperationResponse(healthInformation, options) { + getClusterManifestWithHttpOperationResponse(options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._reportClusterHealth(healthInformation, options, (err, result, request, response) => { + self._getClusterManifest(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -39509,112 +37149,24 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Sends a health report on the Service Fabric cluster. - * - * Sends a health report on a Service Fabric cluster. The report must contain - * the information about the source of the health report and property on which - * it is reported. - * The report is sent to a Service Fabric gateway node, which forwards to the - * health store. - * The report may be accepted by the gateway, but rejected by the health store - * after extra validation. - * For example, the health store may reject the report because of an invalid - * parameter, like a stale sequence number. - * To see whether the report was applied in the health store, run - * GetClusterHealth and check that the report appears in the HealthEvents - * section. - * - * @param {object} healthInformation Describes the health information for the - * health report. This information needs to be present in all of the health - * reports sent to the health manager. - * - * @param {string} healthInformation.sourceId The source name that identifies - * the client/watchdog/system component that generated the health information. - * - * @param {string} healthInformation.property The property of the health - * information. An entity can have health reports for different properties. - * The property is a string and not a fixed enumeration to allow the reporter - * flexibility to categorize the state condition that triggers the report. - * For example, a reporter with SourceId "LocalWatchdog" can monitor the state - * of the available disk on a node, - * so it can report "AvailableDisk" property on that node. - * The same reporter can monitor the node connectivity, so it can report a - * property "Connectivity" on the same node. - * In the health store, these reports are treated as separate health events for - * the specified node. - * - * Together with the SourceId, the property uniquely identifies the health - * information. - * - * @param {string} healthInformation.healthState The health state of a Service - * Fabric entity such as Cluster, Node, Application, Service, Partition, - * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - * 'Unknown' - * - * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field uses ISO8601 - * format for specifying the duration. - * When clients report periodically, they should send reports with higher - * frequency than time to live. - * If clients report on transition, they can set the time to live to infinite. - * When time to live expires, the health event that contains the health - * information - * is either removed from health store, if RemoveWhenExpired is true, or - * evaluated at error, if RemoveWhenExpired false. - * - * If not specified, time to live defaults to infinite value. + * @summary Get the Service Fabric cluster manifest. * - * @param {string} [healthInformation.description] The description of the - * health information. It represents free text used to add human readable - * information about the report. - * The maximum string length for the description is 4096 characters. - * If the provided string is longer, it will be automatically truncated. - * When truncated, the last characters of the description contain a marker - * "[Truncated]", and total string size is 4096 characters. - * The presence of the marker indicates to users that truncation occurred. - * Note that when truncated, the description has less than 4096 characters from - * the original string. + * Get the Service Fabric cluster manifest. The cluster manifest contains + * properties of the cluster that include different node types on the cluster, + * security configurations, fault, and upgrade domain topologies, etc. * - * @param {string} [healthInformation.sequenceNumber] The sequence number for - * this health report as a numeric string. - * The report sequence number is used by the health store to detect stale - * reports. - * If not specified, a sequence number is auto-generated by the health client - * when a report is added. + * These properties are specified as part of the ClusterConfig.JSON file while + * deploying a stand-alone cluster. However, most of the information in the + * cluster manifest + * is generated internally by service fabric during cluster deployment in other + * deployment scenarios (e.g. when using Azure portal). * - * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates - * whether the report is removed from health store when it expires. - * If set to true, the report is removed from the health store after it - * expires. - * If set to false, the report is treated as an error when expired. The value - * of this property is false by default. - * When clients report periodically, they should set RemoveWhenExpired false - * (default). - * This way, is the reporter has issues (eg. deadlock) and can't report, the - * entity is evaluated at error when the health report expires. - * This flags the entity as being in Error health state. + * The contents of the cluster manifest are for informational purposes only and + * users are not expected to take a dependency on the format of the file + * contents or its interpretation. * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.immediate] A flag that indicates whether the - * report should be sent immediately. - * A health report is sent to a Service Fabric gateway Application, which - * forwards to the health store. - * If Immediate is set to true, the report is sent immediately from HTTP - * Gateway to the health store, regardless of the fabric client settings that - * the HTTP Gateway Application is using. - * This is useful for critical reports that should be sent as soon as possible. - * Depending on timing and other conditions, sending the report may still fail, - * for example if the HTTP Gateway is closed or the message doesn't reach the - * Gateway. - * If Immediate is set to false, the report is sent based on the health client - * settings from the HTTP Gateway. Therefore, it will be batched according to - * the HealthReportSendInterval configuration. - * This is the recommended setting because it allows the health client to - * optimize health reporting messages to health store as well as health report - * processing. - * By default, reports are not sent immediately. - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -39630,7 +37182,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {ClusterManifest} - The deserialized result object. * * @reject {Error} - The error object. * @@ -39638,13 +37190,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ClusterManifest} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - reportClusterHealth(healthInformation, options, optionalCallback) { + getClusterManifest(options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -39653,130 +37206,116 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._reportClusterHealth(healthInformation, options, (err, result, request, response) => { + self._getClusterManifest(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._reportClusterHealth(healthInformation, options, optionalCallback); + return self._getClusterManifest(options, optionalCallback); } } /** - * @summary Gets a list of fabric code versions that are provisioned in a - * Service Fabric cluster. - * - * Gets a list of information about fabric code versions that are provisioned - * in the cluster. The parameter CodeVersion can be used to optionally filter - * the output to only that particular version. - * - * @param {object} [options] Optional Parameters. - * - * @param {string} [options.codeVersion] The product version of Service Fabric. - * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error} - The error object. - */ - getProvisionedFabricCodeVersionInfoListWithHttpOperationResponse(options) { - let client = this; - let self = this; - return new Promise((resolve, reject) => { - self._getProvisionedFabricCodeVersionInfoList(options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * @summary Gets a list of fabric code versions that are provisioned in a - * Service Fabric cluster. + * @summary Gets the health of a Service Fabric cluster. * - * Gets a list of information about fabric code versions that are provisioned - * in the cluster. The parameter CodeVersion can be used to optionally filter - * the output to only that particular version. + * Use EventsHealthStateFilter to filter the collection of health events + * reported on the cluster based on the health state. + * Similarly, use NodesHealthStateFilter and ApplicationsHealthStateFilter to + * filter the collection of nodes and applications returned based on their + * aggregated health state. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.codeVersion] The product version of Service Fabric. - * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} [optionalCallback] - The optional callback. - * - * @returns {function|Promise} If a callback was passed as the last parameter - * then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned - * - * @resolve {Array} - The deserialized result object. - * - * @reject {Error} - The error object. - * - * {function} optionalCallback(err, result, request, response) + * @param {number} [options.nodesHealthStateFilter] Allows filtering of the + * node health state objects returned in the result of cluster health query + * based on their health state. The possible values for this parameter include + * integer value of one of the + * following health states. Only nodes that match the filter are returned. All + * nodes are used to evaluate the aggregated health state. + * If not specified, all entries are returned. + * The state values are flag-based enumeration, so the value could be a + * combination of these values obtained using bitwise 'OR' operator. + * For example, if the provided value is 6 then health state of nodes with + * HealthState value of OK (2) and Warning (4) are returned. * - * {Error} err - The Error object if an error occurred, null otherwise. + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. * - * {array} [result] - The deserialized result object if an error did not occur. + * @param {number} [options.applicationsHealthStateFilter] Allows filtering of + * the application health state objects returned in the result of cluster + * health + * query based on their health state. + * The possible values for this parameter include integer value obtained from + * members or bitwise operations + * on members of HealthStateFilter enumeration. Only applications that match + * the filter are returned. + * All applications are used to evaluate the aggregated health state. If not + * specified, all entries are returned. + * The state values are flag-based enumeration, so the value could be a + * combination of these values obtained using bitwise 'OR' operator. + * For example, if the provided value is 6 then health state of applications + * with HealthState value of OK (2) and Warning (4) are returned. * - * {object} [request] - The HTTP Request object if an error did not occur. + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ - getProvisionedFabricCodeVersionInfoList(options, optionalCallback) { - let client = this; - let self = this; - if (!optionalCallback && typeof options === 'function') { - optionalCallback = options; - options = null; - } - if (!optionalCallback) { - return new Promise((resolve, reject) => { - self._getProvisionedFabricCodeVersionInfoList(options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._getProvisionedFabricCodeVersionInfoList(options, optionalCallback); - } - } - - /** - * @summary Gets a list of fabric config versions that are provisioned in a - * Service Fabric cluster. + * @param {number} [options.eventsHealthStateFilter] Allows filtering the + * collection of HealthEvent objects returned based on health state. + * The possible values for this parameter include integer value of one of the + * following health states. + * Only events that match the filter are returned. All events are used to + * evaluate the aggregated health state. + * If not specified, all entries are returned. The state values are flag-based + * enumeration, so the value could be a combination of these values, obtained + * using the bitwise 'OR' operator. For example, If the provided value is 6 + * then all of the events with HealthState value of OK (2) and Warning (4) are + * returned. * - * Gets a list of information about fabric config versions that are provisioned - * in the cluster. The parameter ConfigVersion can be used to optionally filter - * the output to only that particular version. + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. * - * @param {object} [options] Optional Parameters. + * @param {boolean} [options.excludeHealthStatistics] Indicates whether the + * health statistics should be returned as part of the query result. False by + * default. + * The statistics show the number of children entities in health state Ok, + * Warning, and Error. * - * @param {string} [options.configVersion] The config version of Service - * Fabric. + * @param {boolean} [options.includeSystemApplicationHealthStatistics] + * Indicates whether the health statistics should include the fabric:/System + * application health statistics. False by default. + * If IncludeSystemApplicationHealthStatistics is set to true, the health + * statistics include the entities that belong to the fabric:/System + * application. + * Otherwise, the query result includes health statistics only for user + * applications. + * The health statistics must be included in the query result for this + * parameter to be applied. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -39788,15 +37327,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getProvisionedFabricConfigVersionInfoListWithHttpOperationResponse(options) { + getClusterHealthWithHttpOperationResponse(options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getProvisionedFabricConfigVersionInfoList(options, (err, result, request, response) => { + self._getClusterHealth(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -39807,17 +37346,104 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets a list of fabric config versions that are provisioned in a - * Service Fabric cluster. + * @summary Gets the health of a Service Fabric cluster. * - * Gets a list of information about fabric config versions that are provisioned - * in the cluster. The parameter ConfigVersion can be used to optionally filter - * the output to only that particular version. + * Use EventsHealthStateFilter to filter the collection of health events + * reported on the cluster based on the health state. + * Similarly, use NodesHealthStateFilter and ApplicationsHealthStateFilter to + * filter the collection of nodes and applications returned based on their + * aggregated health state. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.configVersion] The config version of Service - * Fabric. + * @param {number} [options.nodesHealthStateFilter] Allows filtering of the + * node health state objects returned in the result of cluster health query + * based on their health state. The possible values for this parameter include + * integer value of one of the + * following health states. Only nodes that match the filter are returned. All + * nodes are used to evaluate the aggregated health state. + * If not specified, all entries are returned. + * The state values are flag-based enumeration, so the value could be a + * combination of these values obtained using bitwise 'OR' operator. + * For example, if the provided value is 6 then health state of nodes with + * HealthState value of OK (2) and Warning (4) are returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * @param {number} [options.applicationsHealthStateFilter] Allows filtering of + * the application health state objects returned in the result of cluster + * health + * query based on their health state. + * The possible values for this parameter include integer value obtained from + * members or bitwise operations + * on members of HealthStateFilter enumeration. Only applications that match + * the filter are returned. + * All applications are used to evaluate the aggregated health state. If not + * specified, all entries are returned. + * The state values are flag-based enumeration, so the value could be a + * combination of these values obtained using bitwise 'OR' operator. + * For example, if the provided value is 6 then health state of applications + * with HealthState value of OK (2) and Warning (4) are returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * @param {number} [options.eventsHealthStateFilter] Allows filtering the + * collection of HealthEvent objects returned based on health state. + * The possible values for this parameter include integer value of one of the + * following health states. + * Only events that match the filter are returned. All events are used to + * evaluate the aggregated health state. + * If not specified, all entries are returned. The state values are flag-based + * enumeration, so the value could be a combination of these values, obtained + * using the bitwise 'OR' operator. For example, If the provided value is 6 + * then all of the events with HealthState value of OK (2) and Warning (4) are + * returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * @param {boolean} [options.excludeHealthStatistics] Indicates whether the + * health statistics should be returned as part of the query result. False by + * default. + * The statistics show the number of children entities in health state Ok, + * Warning, and Error. + * + * @param {boolean} [options.includeSystemApplicationHealthStatistics] + * Indicates whether the health statistics should include the fabric:/System + * application health statistics. False by default. + * If IncludeSystemApplicationHealthStatistics is set to true, the health + * statistics include the entities that belong to the fabric:/System + * application. + * Otherwise, the query result includes health statistics only for user + * applications. + * The health statistics must be included in the query result for this + * parameter to be applied. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -39834,7 +37460,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {Array} - The deserialized result object. + * @resolve {ClusterHealth} - The deserialized result object. * * @reject {Error} - The error object. * @@ -39842,13 +37468,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ClusterHealth} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getProvisionedFabricConfigVersionInfoList(options, optionalCallback) { + getClusterHealth(options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -39857,123 +37484,208 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getProvisionedFabricConfigVersionInfoList(options, (err, result, request, response) => { + self._getClusterHealth(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getProvisionedFabricConfigVersionInfoList(options, optionalCallback); + return self._getClusterHealth(options, optionalCallback); } } /** - * @summary Gets the progress of the current cluster upgrade. + * @summary Gets the health of a Service Fabric cluster using the specified + * policy. * - * Gets the current progress of the ongoing cluster upgrade. If no upgrade is - * currently in progress, get the last state of the previous cluster upgrade. + * Use EventsHealthStateFilter to filter the collection of health events + * reported on the cluster based on the health state. + * Similarly, use NodesHealthStateFilter and ApplicationsHealthStateFilter to + * filter the collection of nodes and applications returned based on their + * aggregated health state. + * Use ClusterHealthPolicies to override the health policies used to evaluate + * the health. * * @param {object} [options] Optional Parameters. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {number} [options.nodesHealthStateFilter] Allows filtering of the + * node health state objects returned in the result of cluster health query + * based on their health state. The possible values for this parameter include + * integer value of one of the + * following health states. Only nodes that match the filter are returned. All + * nodes are used to evaluate the aggregated health state. + * If not specified, all entries are returned. + * The state values are flag-based enumeration, so the value could be a + * combination of these values obtained using bitwise 'OR' operator. + * For example, if the provided value is 6 then health state of nodes with + * HealthState value of OK (2) and Warning (4) are returned. * - * @reject {Error} - The error object. - */ - getClusterUpgradeProgressWithHttpOperationResponse(options) { - let client = this; - let self = this; - return new Promise((resolve, reject) => { - self._getClusterUpgradeProgress(options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * @summary Gets the progress of the current cluster upgrade. + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. * - * Gets the current progress of the ongoing cluster upgrade. If no upgrade is - * currently in progress, get the last state of the previous cluster upgrade. + * @param {number} [options.applicationsHealthStateFilter] Allows filtering of + * the application health state objects returned in the result of cluster + * health + * query based on their health state. + * The possible values for this parameter include integer value obtained from + * members or bitwise operations + * on members of HealthStateFilter enumeration. Only applications that match + * the filter are returned. + * All applications are used to evaluate the aggregated health state. If not + * specified, all entries are returned. + * The state values are flag-based enumeration, so the value could be a + * combination of these values obtained using bitwise 'OR' operator. + * For example, if the provided value is 6 then health state of applications + * with HealthState value of OK (2) and Warning (4) are returned. * - * @param {object} [options] Optional Parameters. + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. + * @param {number} [options.eventsHealthStateFilter] Allows filtering the + * collection of HealthEvent objects returned based on health state. + * The possible values for this parameter include integer value of one of the + * following health states. + * Only events that match the filter are returned. All events are used to + * evaluate the aggregated health state. + * If not specified, all entries are returned. The state values are flag-based + * enumeration, so the value could be a combination of these values, obtained + * using the bitwise 'OR' operator. For example, If the provided value is 6 + * then all of the events with HealthState value of OK (2) and Warning (4) are + * returned. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. * - * @param {function} [optionalCallback] - The optional callback. + * @param {boolean} [options.excludeHealthStatistics] Indicates whether the + * health statistics should be returned as part of the query result. False by + * default. + * The statistics show the number of children entities in health state Ok, + * Warning, and Error. * - * @returns {function|Promise} If a callback was passed as the last parameter - * then it returns the callback else returns a Promise. + * @param {boolean} [options.includeSystemApplicationHealthStatistics] + * Indicates whether the health statistics should include the fabric:/System + * application health statistics. False by default. + * If IncludeSystemApplicationHealthStatistics is set to true, the health + * statistics include the entities that belong to the fabric:/System + * application. + * Otherwise, the query result includes health statistics only for user + * applications. + * The health statistics must be included in the query result for this + * parameter to be applied. * - * {Promise} A promise is returned + * @param {object} [options.clusterHealthPolicies] Describes the health + * policies used to evaluate the cluster health. + * If not present, the health evaluation uses the cluster health policy defined + * in the cluster manifest or the default cluster health policy. + * By default, each application is evaluated using its specific application + * health policy, defined in the application manifest, or the default health + * policy, if no policy is defined in manifest. + * If the application health policy map is specified, and it has an entry for + * an application, the specified application health policy + * is used to evaluate the application health. * - * @resolve {ClusterUpgradeProgressObject} - The deserialized result object. + * @param {array} [options.clusterHealthPolicies.applicationHealthPolicyMap] + * Defines a map that contains specific application health policies for + * different applications. + * Each entry specifies as key the application name and as value an + * ApplicationHealthPolicy used to evaluate the application health. + * If an application is not specified in the map, the application health + * evaluation uses the ApplicationHealthPolicy found in its application + * manifest or the default application health policy (if no health policy is + * defined in the manifest). + * The map is empty by default. * - * @reject {Error} - The error object. + * @param {object} [options.clusterHealthPolicies.clusterHealthPolicy] Defines + * a health policy used to evaluate the health of the cluster or of a cluster + * node. * - * {function} optionalCallback(err, result, request, response) + * @param {boolean} + * [options.clusterHealthPolicies.clusterHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. * - * {Error} err - The Error object if an error occurred, null otherwise. + * @param {number} + * [options.clusterHealthPolicies.clusterHealthPolicy.maxPercentUnhealthyNodes] + * The maximum allowed percentage of unhealthy nodes before reporting an error. + * For example, to allow 10% of nodes to be unhealthy, this value would be 10. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ClusterUpgradeProgressObject} for more - * information. + * The percentage represents the maximum tolerated percentage of nodes that can + * be unhealthy before the cluster is considered in error. + * If the percentage is respected but there is at least one unhealthy node, the + * health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy nodes over + * the total number of nodes in the cluster. + * The computation rounds up to tolerate one failure on small numbers of nodes. + * Default percentage is zero. * - * {object} [request] - The HTTP Request object if an error did not occur. + * In large clusters, some nodes will always be down or out for repairs, so + * this percentage should be configured to tolerate that. * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ - getClusterUpgradeProgress(options, optionalCallback) { - let client = this; - let self = this; - if (!optionalCallback && typeof options === 'function') { - optionalCallback = options; - options = null; - } - if (!optionalCallback) { - return new Promise((resolve, reject) => { - self._getClusterUpgradeProgress(options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._getClusterUpgradeProgress(options, optionalCallback); - } - } - - /** - * @summary Get the Service Fabric standalone cluster configuration. + * @param {number} + * [options.clusterHealthPolicies.clusterHealthPolicy.maxPercentUnhealthyApplications] + * The maximum allowed percentage of unhealthy applications before reporting an + * error. For example, to allow 10% of applications to be unhealthy, this value + * would be 10. * - * The cluster configuration contains properties of the cluster that include - * different node types on the cluster, - * security configurations, fault, and upgrade domain topologies, etc. + * The percentage represents the maximum tolerated percentage of applications + * that can be unhealthy before the cluster is considered in error. + * If the percentage is respected but there is at least one unhealthy + * application, the health is evaluated as Warning. + * This is calculated by dividing the number of unhealthy applications over the + * total number of application instances in the cluster, excluding applications + * of application types that are included in the + * ApplicationTypeHealthPolicyMap. + * The computation rounds up to tolerate one failure on small numbers of + * applications. Default percentage is zero. * - * @param {string} configurationApiVersion The API version of the Standalone - * cluster json configuration. + * @param {array} + * [options.clusterHealthPolicies.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * Defines a map with max percentage unhealthy applications for specific + * application types. + * Each entry specifies as key the application type name and as value an + * integer that represents the MaxPercentUnhealthyApplications percentage used + * to evaluate the applications of the specified application type. * - * @param {object} [options] Optional Parameters. + * The application type health policy map can be used during cluster health + * evaluation to describe special application types. + * The application types included in the map are evaluated against the + * percentage specified in the map, and not with the global + * MaxPercentUnhealthyApplications defined in the cluster health policy. + * The applications of application types specified in the map are not counted + * against the global pool of applications. + * For example, if some applications of a type are critical, the cluster + * administrator can add an entry to the map for that application type + * and assign it a value of 0% (that is, do not tolerate any failures). + * All other applications can be evaluated with MaxPercentUnhealthyApplications + * set to 20% to tolerate some failures out of the thousands of application + * instances. + * The application type health policy map is used only if the cluster manifest + * enables application type health evaluation using the configuration entry for + * HealthManager/EnableApplicationTypeHealthEvaluation. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -39985,15 +37697,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getClusterConfigurationWithHttpOperationResponse(configurationApiVersion, options) { + getClusterHealthUsingPolicyWithHttpOperationResponse(options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getClusterConfiguration(configurationApiVersion, options, (err, result, request, response) => { + self._getClusterHealthUsingPolicy(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -40004,112 +37716,196 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Get the Service Fabric standalone cluster configuration. - * - * The cluster configuration contains properties of the cluster that include - * different node types on the cluster, - * security configurations, fault, and upgrade domain topologies, etc. + * @summary Gets the health of a Service Fabric cluster using the specified + * policy. * - * @param {string} configurationApiVersion The API version of the Standalone - * cluster json configuration. + * Use EventsHealthStateFilter to filter the collection of health events + * reported on the cluster based on the health state. + * Similarly, use NodesHealthStateFilter and ApplicationsHealthStateFilter to + * filter the collection of nodes and applications returned based on their + * aggregated health state. + * Use ClusterHealthPolicies to override the health policies used to evaluate + * the health. * * @param {object} [options] Optional Parameters. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} [optionalCallback] - The optional callback. + * @param {number} [options.nodesHealthStateFilter] Allows filtering of the + * node health state objects returned in the result of cluster health query + * based on their health state. The possible values for this parameter include + * integer value of one of the + * following health states. Only nodes that match the filter are returned. All + * nodes are used to evaluate the aggregated health state. + * If not specified, all entries are returned. + * The state values are flag-based enumeration, so the value could be a + * combination of these values obtained using bitwise 'OR' operator. + * For example, if the provided value is 6 then health state of nodes with + * HealthState value of OK (2) and Warning (4) are returned. * - * @returns {function|Promise} If a callback was passed as the last parameter - * then it returns the callback else returns a Promise. + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. * - * {Promise} A promise is returned + * @param {number} [options.applicationsHealthStateFilter] Allows filtering of + * the application health state objects returned in the result of cluster + * health + * query based on their health state. + * The possible values for this parameter include integer value obtained from + * members or bitwise operations + * on members of HealthStateFilter enumeration. Only applications that match + * the filter are returned. + * All applications are used to evaluate the aggregated health state. If not + * specified, all entries are returned. + * The state values are flag-based enumeration, so the value could be a + * combination of these values obtained using bitwise 'OR' operator. + * For example, if the provided value is 6 then health state of applications + * with HealthState value of OK (2) and Warning (4) are returned. * - * @resolve {ClusterConfiguration} - The deserialized result object. + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. * - * @reject {Error} - The error object. + * @param {number} [options.eventsHealthStateFilter] Allows filtering the + * collection of HealthEvent objects returned based on health state. + * The possible values for this parameter include integer value of one of the + * following health states. + * Only events that match the filter are returned. All events are used to + * evaluate the aggregated health state. + * If not specified, all entries are returned. The state values are flag-based + * enumeration, so the value could be a combination of these values, obtained + * using the bitwise 'OR' operator. For example, If the provided value is 6 + * then all of the events with HealthState value of OK (2) and Warning (4) are + * returned. * - * {function} optionalCallback(err, result, request, response) + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. * - * {Error} err - The Error object if an error occurred, null otherwise. + * @param {boolean} [options.excludeHealthStatistics] Indicates whether the + * health statistics should be returned as part of the query result. False by + * default. + * The statistics show the number of children entities in health state Ok, + * Warning, and Error. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ClusterConfiguration} for more information. + * @param {boolean} [options.includeSystemApplicationHealthStatistics] + * Indicates whether the health statistics should include the fabric:/System + * application health statistics. False by default. + * If IncludeSystemApplicationHealthStatistics is set to true, the health + * statistics include the entities that belong to the fabric:/System + * application. + * Otherwise, the query result includes health statistics only for user + * applications. + * The health statistics must be included in the query result for this + * parameter to be applied. * - * {object} [request] - The HTTP Request object if an error did not occur. + * @param {object} [options.clusterHealthPolicies] Describes the health + * policies used to evaluate the cluster health. + * If not present, the health evaluation uses the cluster health policy defined + * in the cluster manifest or the default cluster health policy. + * By default, each application is evaluated using its specific application + * health policy, defined in the application manifest, or the default health + * policy, if no policy is defined in manifest. + * If the application health policy map is specified, and it has an entry for + * an application, the specified application health policy + * is used to evaluate the application health. * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ - getClusterConfiguration(configurationApiVersion, options, optionalCallback) { - let client = this; - let self = this; - if (!optionalCallback && typeof options === 'function') { - optionalCallback = options; - options = null; - } - if (!optionalCallback) { - return new Promise((resolve, reject) => { - self._getClusterConfiguration(configurationApiVersion, options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._getClusterConfiguration(configurationApiVersion, options, optionalCallback); - } - } - - /** - * @summary Get the cluster configuration upgrade status of a Service Fabric - * standalone cluster. + * @param {array} [options.clusterHealthPolicies.applicationHealthPolicyMap] + * Defines a map that contains specific application health policies for + * different applications. + * Each entry specifies as key the application name and as value an + * ApplicationHealthPolicy used to evaluate the application health. + * If an application is not specified in the map, the application health + * evaluation uses the ApplicationHealthPolicy found in its application + * manifest or the default application health policy (if no health policy is + * defined in the manifest). + * The map is empty by default. * - * Get the cluster configuration upgrade status details of a Service Fabric - * standalone cluster. + * @param {object} [options.clusterHealthPolicies.clusterHealthPolicy] Defines + * a health policy used to evaluate the health of the cluster or of a cluster + * node. * - * @param {object} [options] Optional Parameters. + * @param {boolean} + * [options.clusterHealthPolicies.clusterHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. + * @param {number} + * [options.clusterHealthPolicies.clusterHealthPolicy.maxPercentUnhealthyNodes] + * The maximum allowed percentage of unhealthy nodes before reporting an error. + * For example, to allow 10% of nodes to be unhealthy, this value would be 10. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * The percentage represents the maximum tolerated percentage of nodes that can + * be unhealthy before the cluster is considered in error. + * If the percentage is respected but there is at least one unhealthy node, the + * health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy nodes over + * the total number of nodes in the cluster. + * The computation rounds up to tolerate one failure on small numbers of nodes. + * Default percentage is zero. * - * @returns {Promise} A promise is returned + * In large clusters, some nodes will always be down or out for repairs, so + * this percentage should be configured to tolerate that. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {number} + * [options.clusterHealthPolicies.clusterHealthPolicy.maxPercentUnhealthyApplications] + * The maximum allowed percentage of unhealthy applications before reporting an + * error. For example, to allow 10% of applications to be unhealthy, this value + * would be 10. * - * @reject {Error} - The error object. - */ - getClusterConfigurationUpgradeStatusWithHttpOperationResponse(options) { - let client = this; - let self = this; - return new Promise((resolve, reject) => { - self._getClusterConfigurationUpgradeStatus(options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * @summary Get the cluster configuration upgrade status of a Service Fabric - * standalone cluster. + * The percentage represents the maximum tolerated percentage of applications + * that can be unhealthy before the cluster is considered in error. + * If the percentage is respected but there is at least one unhealthy + * application, the health is evaluated as Warning. + * This is calculated by dividing the number of unhealthy applications over the + * total number of application instances in the cluster, excluding applications + * of application types that are included in the + * ApplicationTypeHealthPolicyMap. + * The computation rounds up to tolerate one failure on small numbers of + * applications. Default percentage is zero. * - * Get the cluster configuration upgrade status details of a Service Fabric - * standalone cluster. + * @param {array} + * [options.clusterHealthPolicies.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * Defines a map with max percentage unhealthy applications for specific + * application types. + * Each entry specifies as key the application type name and as value an + * integer that represents the MaxPercentUnhealthyApplications percentage used + * to evaluate the applications of the specified application type. * - * @param {object} [options] Optional Parameters. + * The application type health policy map can be used during cluster health + * evaluation to describe special application types. + * The application types included in the map are evaluated against the + * percentage specified in the map, and not with the global + * MaxPercentUnhealthyApplications defined in the cluster health policy. + * The applications of application types specified in the map are not counted + * against the global pool of applications. + * For example, if some applications of a type are critical, the cluster + * administrator can add an entry to the map for that application type + * and assign it a value of 0% (that is, do not tolerate any failures). + * All other applications can be evaluated with MaxPercentUnhealthyApplications + * set to 20% to tolerate some failures out of the thousands of application + * instances. + * The application type health policy map is used only if the cluster manifest + * enables application type health evaluation using the configuration entry for + * HealthManager/EnableApplicationTypeHealthEvaluation. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -40126,7 +37922,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ClusterConfigurationUpgradeStatusInfo} - The deserialized result object. + * @resolve {ClusterHealth} - The deserialized result object. * * @reject {Error} - The error object. * @@ -40135,14 +37931,13 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ClusterConfigurationUpgradeStatusInfo} for - * more information. + * See {@link ClusterHealth} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getClusterConfigurationUpgradeStatus(options, optionalCallback) { + getClusterHealthUsingPolicy(options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -40151,23 +37946,26 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getClusterConfigurationUpgradeStatus(options, (err, result, request, response) => { + self._getClusterHealthUsingPolicy(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getClusterConfigurationUpgradeStatus(options, optionalCallback); + return self._getClusterHealthUsingPolicy(options, optionalCallback); } } /** - * @summary Get the service state of Service Fabric Upgrade Orchestration - * Service. + * @summary Gets the health of a Service Fabric cluster using health chunks. * - * Get the service state of Service Fabric Upgrade Orchestration Service. This - * API is internally used for support purposes. + * Gets the health of a Service Fabric cluster using health chunks. Includes + * the aggregated health state of the cluster, but none of the cluster + * entities. + * To expand the cluster health and get the health state of all or some of the + * entities, use the POST URI and specify the cluster health chunk query + * description. * * @param {object} [options] Optional Parameters. * @@ -40181,15 +37979,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getUpgradeOrchestrationServiceStateWithHttpOperationResponse(options) { + getClusterHealthChunkWithHttpOperationResponse(options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getUpgradeOrchestrationServiceState(options, (err, result, request, response) => { + self._getClusterHealthChunk(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -40200,11 +37998,14 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Get the service state of Service Fabric Upgrade Orchestration - * Service. + * @summary Gets the health of a Service Fabric cluster using health chunks. * - * Get the service state of Service Fabric Upgrade Orchestration Service. This - * API is internally used for support purposes. + * Gets the health of a Service Fabric cluster using health chunks. Includes + * the aggregated health state of the cluster, but none of the cluster + * entities. + * To expand the cluster health and get the health state of all or some of the + * entities, use the POST URI and specify the cluster health chunk query + * description. * * @param {object} [options] Optional Parameters. * @@ -40223,7 +38024,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {UpgradeOrchestrationServiceState} - The deserialized result object. + * @resolve {ClusterHealthChunk} - The deserialized result object. * * @reject {Error} - The error object. * @@ -40232,14 +38033,13 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link UpgradeOrchestrationServiceState} for more - * information. + * See {@link ClusterHealthChunk} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getUpgradeOrchestrationServiceState(options, optionalCallback) { + getClusterHealthChunk(options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -40248,143 +38048,158 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getUpgradeOrchestrationServiceState(options, (err, result, request, response) => { + self._getClusterHealthChunk(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getUpgradeOrchestrationServiceState(options, optionalCallback); + return self._getClusterHealthChunk(options, optionalCallback); } } /** - * @summary Update the service state of Service Fabric Upgrade Orchestration - * Service. - * - * Update the service state of Service Fabric Upgrade Orchestration Service. - * This API is internally used for support purposes. - * - * @param {object} upgradeOrchestrationServiceState Service state of Service - * Fabric Upgrade Orchestration Service. - * - * @param {string} [upgradeOrchestrationServiceState.serviceState] The state of - * Service Fabric Upgrade Orchestration Service. - * - * @param {object} [options] Optional Parameters. - * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error} - The error object. - */ - setUpgradeOrchestrationServiceStateWithHttpOperationResponse(upgradeOrchestrationServiceState, options) { - let client = this; - let self = this; - return new Promise((resolve, reject) => { - self._setUpgradeOrchestrationServiceState(upgradeOrchestrationServiceState, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * @summary Update the service state of Service Fabric Upgrade Orchestration - * Service. - * - * Update the service state of Service Fabric Upgrade Orchestration Service. - * This API is internally used for support purposes. - * - * @param {object} upgradeOrchestrationServiceState Service state of Service - * Fabric Upgrade Orchestration Service. + * @summary Gets the health of a Service Fabric cluster using health chunks. * - * @param {string} [upgradeOrchestrationServiceState.serviceState] The state of - * Service Fabric Upgrade Orchestration Service. + * Gets the health of a Service Fabric cluster using health chunks. The health + * evaluation is done based on the input cluster health chunk query + * description. + * The query description allows users to specify health policies for evaluating + * the cluster and its children. + * Users can specify very flexible filters to select which cluster entities to + * return. The selection can be done based on the entities health state and + * based on the hierarchy. + * The query can return multi-level children of the entities based on the + * specified filters. For example, it can return one application with a + * specified name, and for this application, return + * only services that are in Error or Warning, and all partitions and replicas + * for one of these services. * * @param {object} [options] Optional Parameters. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} [optionalCallback] - The optional callback. - * - * @returns {function|Promise} If a callback was passed as the last parameter - * then it returns the callback else returns a Promise. + * @param {object} [options.clusterHealthChunkQueryDescription] Describes the + * cluster and application health policies used to evaluate the cluster health + * and the filters to select which cluster entities to be returned. + * If the cluster health policy is present, it is used to evaluate the cluster + * events and the cluster nodes. If not present, the health evaluation uses the + * cluster health policy defined in the cluster manifest or the default cluster + * health policy. + * By default, each application is evaluated using its specific application + * health policy, defined in the application manifest, or the default health + * policy, if no policy is defined in manifest. + * If the application health policy map is specified, and it has an entry for + * an application, the specified application health policy + * is used to evaluate the application health. + * Users can specify very flexible filters to select which cluster entities to + * include in response. The selection can be done based on the entities health + * state and based on the hierarchy. + * The query can return multi-level children of the entities based on the + * specified filters. For example, it can return one application with a + * specified name, and for this application, return + * only services that are in Error or Warning, and all partitions and replicas + * for one of these services. * - * {Promise} A promise is returned + * @param {array} [options.clusterHealthChunkQueryDescription.nodeFilters] + * Defines a list of filters that specify which nodes to be included in the + * returned cluster health chunk. + * If no filters are specified, no nodes are returned. All the nodes are used + * to evaluate the cluster's aggregated health state, regardless of the input + * filters. + * The cluster health chunk query may specify multiple node filters. + * For example, it can specify a filter to return all nodes with health state + * Error and another filter to always include a node identified by its + * NodeName. * - * @resolve {UpgradeOrchestrationServiceStateSummary} - The deserialized result object. + * @param {array} + * [options.clusterHealthChunkQueryDescription.applicationFilters] Defines a + * list of filters that specify which applications to be included in the + * returned cluster health chunk. + * If no filters are specified, no applications are returned. All the + * applications are used to evaluate the cluster's aggregated health state, + * regardless of the input filters. + * The cluster health chunk query may specify multiple application filters. + * For example, it can specify a filter to return all applications with health + * state Error and another filter to always include applications of a specified + * application type. * - * @reject {Error} - The error object. + * @param {object} + * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy] Defines a + * health policy used to evaluate the health of the cluster or of a cluster + * node. * - * {function} optionalCallback(err, result, request, response) + * @param {boolean} + * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. * - * {Error} err - The Error object if an error occurred, null otherwise. + * @param {number} + * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.maxPercentUnhealthyNodes] + * The maximum allowed percentage of unhealthy nodes before reporting an error. + * For example, to allow 10% of nodes to be unhealthy, this value would be 10. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link UpgradeOrchestrationServiceStateSummary} for - * more information. + * The percentage represents the maximum tolerated percentage of nodes that can + * be unhealthy before the cluster is considered in error. + * If the percentage is respected but there is at least one unhealthy node, the + * health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy nodes over + * the total number of nodes in the cluster. + * The computation rounds up to tolerate one failure on small numbers of nodes. + * Default percentage is zero. * - * {object} [request] - The HTTP Request object if an error did not occur. + * In large clusters, some nodes will always be down or out for repairs, so + * this percentage should be configured to tolerate that. * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ - setUpgradeOrchestrationServiceState(upgradeOrchestrationServiceState, options, optionalCallback) { - let client = this; - let self = this; - if (!optionalCallback && typeof options === 'function') { - optionalCallback = options; - options = null; - } - if (!optionalCallback) { - return new Promise((resolve, reject) => { - self._setUpgradeOrchestrationServiceState(upgradeOrchestrationServiceState, options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._setUpgradeOrchestrationServiceState(upgradeOrchestrationServiceState, options, optionalCallback); - } - } - - /** - * @summary Provision the code or configuration packages of a Service Fabric - * cluster. + * @param {number} + * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.maxPercentUnhealthyApplications] + * The maximum allowed percentage of unhealthy applications before reporting an + * error. For example, to allow 10% of applications to be unhealthy, this value + * would be 10. * - * Validate and provision the code or configuration packages of a Service - * Fabric cluster. + * The percentage represents the maximum tolerated percentage of applications + * that can be unhealthy before the cluster is considered in error. + * If the percentage is respected but there is at least one unhealthy + * application, the health is evaluated as Warning. + * This is calculated by dividing the number of unhealthy applications over the + * total number of application instances in the cluster, excluding applications + * of application types that are included in the + * ApplicationTypeHealthPolicyMap. + * The computation rounds up to tolerate one failure on small numbers of + * applications. Default percentage is zero. * - * @param {object} provisionFabricDescription Describes the parameters for - * provisioning a cluster. + * @param {array} + * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * Defines a map with max percentage unhealthy applications for specific + * application types. + * Each entry specifies as key the application type name and as value an + * integer that represents the MaxPercentUnhealthyApplications percentage used + * to evaluate the applications of the specified application type. * - * @param {string} [provisionFabricDescription.codeFilePath] The cluster code - * package file path. + * The application type health policy map can be used during cluster health + * evaluation to describe special application types. + * The application types included in the map are evaluated against the + * percentage specified in the map, and not with the global + * MaxPercentUnhealthyApplications defined in the cluster health policy. + * The applications of application types specified in the map are not counted + * against the global pool of applications. + * For example, if some applications of a type are critical, the cluster + * administrator can add an entry to the map for that application type + * and assign it a value of 0% (that is, do not tolerate any failures). + * All other applications can be evaluated with MaxPercentUnhealthyApplications + * set to 20% to tolerate some failures out of the thousands of application + * instances. + * The application type health policy map is used only if the cluster manifest + * enables application type health evaluation using the configuration entry for + * HealthManager/EnableApplicationTypeHealthEvaluation. * - * @param {string} [provisionFabricDescription.clusterManifestFilePath] The - * cluster manifest file path. + * @param {object} + * [options.clusterHealthChunkQueryDescription.applicationHealthPolicies] + * Defines the application health policy map used to evaluate the health of an + * application or one of its children entities. * - * @param {object} [options] Optional Parameters. + * @param {array} + * [options.clusterHealthChunkQueryDescription.applicationHealthPolicies.applicationHealthPolicyMap] + * The wrapper that contains the map with application health policies used to + * evaluate specific applications in the cluster. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -40396,15 +38211,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - provisionClusterWithHttpOperationResponse(provisionFabricDescription, options) { + getClusterHealthChunkUsingPolicyAndAdvancedFiltersWithHttpOperationResponse(options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._provisionCluster(provisionFabricDescription, options, (err, result, request, response) => { + self._getClusterHealthChunkUsingPolicyAndAdvancedFilters(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -40415,133 +38230,146 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Provision the code or configuration packages of a Service Fabric - * cluster. - * - * Validate and provision the code or configuration packages of a Service - * Fabric cluster. - * - * @param {object} provisionFabricDescription Describes the parameters for - * provisioning a cluster. - * - * @param {string} [provisionFabricDescription.codeFilePath] The cluster code - * package file path. + * @summary Gets the health of a Service Fabric cluster using health chunks. * - * @param {string} [provisionFabricDescription.clusterManifestFilePath] The - * cluster manifest file path. + * Gets the health of a Service Fabric cluster using health chunks. The health + * evaluation is done based on the input cluster health chunk query + * description. + * The query description allows users to specify health policies for evaluating + * the cluster and its children. + * Users can specify very flexible filters to select which cluster entities to + * return. The selection can be done based on the entities health state and + * based on the hierarchy. + * The query can return multi-level children of the entities based on the + * specified filters. For example, it can return one application with a + * specified name, and for this application, return + * only services that are in Error or Warning, and all partitions and replicas + * for one of these services. * * @param {object} [options] Optional Parameters. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} [optionalCallback] - The optional callback. - * - * @returns {function|Promise} If a callback was passed as the last parameter - * then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned - * - * @resolve {null} - The deserialized result object. - * - * @reject {Error} - The error object. - * - * {function} optionalCallback(err, result, request, response) - * - * {Error} err - The Error object if an error occurred, null otherwise. - * - * {null} [result] - The deserialized result object if an error did not occur. - * - * {object} [request] - The HTTP Request object if an error did not occur. - * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ - provisionCluster(provisionFabricDescription, options, optionalCallback) { - let client = this; - let self = this; - if (!optionalCallback && typeof options === 'function') { - optionalCallback = options; - options = null; - } - if (!optionalCallback) { - return new Promise((resolve, reject) => { - self._provisionCluster(provisionFabricDescription, options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._provisionCluster(provisionFabricDescription, options, optionalCallback); - } - } - - /** - * @summary Unprovision the code or configuration packages of a Service Fabric - * cluster. - * - * It is supported to unprovision code and configuration separately. - * - * @param {object} unprovisionFabricDescription Describes the parameters for - * unprovisioning a cluster. + * @param {object} [options.clusterHealthChunkQueryDescription] Describes the + * cluster and application health policies used to evaluate the cluster health + * and the filters to select which cluster entities to be returned. + * If the cluster health policy is present, it is used to evaluate the cluster + * events and the cluster nodes. If not present, the health evaluation uses the + * cluster health policy defined in the cluster manifest or the default cluster + * health policy. + * By default, each application is evaluated using its specific application + * health policy, defined in the application manifest, or the default health + * policy, if no policy is defined in manifest. + * If the application health policy map is specified, and it has an entry for + * an application, the specified application health policy + * is used to evaluate the application health. + * Users can specify very flexible filters to select which cluster entities to + * include in response. The selection can be done based on the entities health + * state and based on the hierarchy. + * The query can return multi-level children of the entities based on the + * specified filters. For example, it can return one application with a + * specified name, and for this application, return + * only services that are in Error or Warning, and all partitions and replicas + * for one of these services. * - * @param {string} [unprovisionFabricDescription.codeVersion] The cluster code - * package version. + * @param {array} [options.clusterHealthChunkQueryDescription.nodeFilters] + * Defines a list of filters that specify which nodes to be included in the + * returned cluster health chunk. + * If no filters are specified, no nodes are returned. All the nodes are used + * to evaluate the cluster's aggregated health state, regardless of the input + * filters. + * The cluster health chunk query may specify multiple node filters. + * For example, it can specify a filter to return all nodes with health state + * Error and another filter to always include a node identified by its + * NodeName. * - * @param {string} [unprovisionFabricDescription.configVersion] The cluster - * manifest version. + * @param {array} + * [options.clusterHealthChunkQueryDescription.applicationFilters] Defines a + * list of filters that specify which applications to be included in the + * returned cluster health chunk. + * If no filters are specified, no applications are returned. All the + * applications are used to evaluate the cluster's aggregated health state, + * regardless of the input filters. + * The cluster health chunk query may specify multiple application filters. + * For example, it can specify a filter to return all applications with health + * state Error and another filter to always include applications of a specified + * application type. * - * @param {object} [options] Optional Parameters. + * @param {object} + * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy] Defines a + * health policy used to evaluate the health of the cluster or of a cluster + * node. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. + * @param {boolean} + * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {number} + * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.maxPercentUnhealthyNodes] + * The maximum allowed percentage of unhealthy nodes before reporting an error. + * For example, to allow 10% of nodes to be unhealthy, this value would be 10. * - * @returns {Promise} A promise is returned + * The percentage represents the maximum tolerated percentage of nodes that can + * be unhealthy before the cluster is considered in error. + * If the percentage is respected but there is at least one unhealthy node, the + * health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy nodes over + * the total number of nodes in the cluster. + * The computation rounds up to tolerate one failure on small numbers of nodes. + * Default percentage is zero. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * In large clusters, some nodes will always be down or out for repairs, so + * this percentage should be configured to tolerate that. * - * @reject {Error} - The error object. - */ - unprovisionClusterWithHttpOperationResponse(unprovisionFabricDescription, options) { - let client = this; - let self = this; - return new Promise((resolve, reject) => { - self._unprovisionCluster(unprovisionFabricDescription, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * @summary Unprovision the code or configuration packages of a Service Fabric - * cluster. + * @param {number} + * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.maxPercentUnhealthyApplications] + * The maximum allowed percentage of unhealthy applications before reporting an + * error. For example, to allow 10% of applications to be unhealthy, this value + * would be 10. * - * It is supported to unprovision code and configuration separately. + * The percentage represents the maximum tolerated percentage of applications + * that can be unhealthy before the cluster is considered in error. + * If the percentage is respected but there is at least one unhealthy + * application, the health is evaluated as Warning. + * This is calculated by dividing the number of unhealthy applications over the + * total number of application instances in the cluster, excluding applications + * of application types that are included in the + * ApplicationTypeHealthPolicyMap. + * The computation rounds up to tolerate one failure on small numbers of + * applications. Default percentage is zero. * - * @param {object} unprovisionFabricDescription Describes the parameters for - * unprovisioning a cluster. + * @param {array} + * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * Defines a map with max percentage unhealthy applications for specific + * application types. + * Each entry specifies as key the application type name and as value an + * integer that represents the MaxPercentUnhealthyApplications percentage used + * to evaluate the applications of the specified application type. * - * @param {string} [unprovisionFabricDescription.codeVersion] The cluster code - * package version. + * The application type health policy map can be used during cluster health + * evaluation to describe special application types. + * The application types included in the map are evaluated against the + * percentage specified in the map, and not with the global + * MaxPercentUnhealthyApplications defined in the cluster health policy. + * The applications of application types specified in the map are not counted + * against the global pool of applications. + * For example, if some applications of a type are critical, the cluster + * administrator can add an entry to the map for that application type + * and assign it a value of 0% (that is, do not tolerate any failures). + * All other applications can be evaluated with MaxPercentUnhealthyApplications + * set to 20% to tolerate some failures out of the thousands of application + * instances. + * The application type health policy map is used only if the cluster manifest + * enables application type health evaluation using the configuration entry for + * HealthManager/EnableApplicationTypeHealthEvaluation. * - * @param {string} [unprovisionFabricDescription.configVersion] The cluster - * manifest version. + * @param {object} + * [options.clusterHealthChunkQueryDescription.applicationHealthPolicies] + * Defines the application health policy map used to evaluate the health of an + * application or one of its children entities. * - * @param {object} [options] Optional Parameters. + * @param {array} + * [options.clusterHealthChunkQueryDescription.applicationHealthPolicies.applicationHealthPolicyMap] + * The wrapper that contains the map with application health policies used to + * evaluate specific applications in the cluster. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -40558,7 +38386,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {ClusterHealthChunk} - The deserialized result object. * * @reject {Error} - The error object. * @@ -40566,13 +38394,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ClusterHealthChunk} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - unprovisionCluster(unprovisionFabricDescription, options, optionalCallback) { + getClusterHealthChunkUsingPolicyAndAdvancedFilters(options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -40581,122 +38410,124 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._unprovisionCluster(unprovisionFabricDescription, options, (err, result, request, response) => { + self._getClusterHealthChunkUsingPolicyAndAdvancedFilters(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._unprovisionCluster(unprovisionFabricDescription, options, optionalCallback); + return self._getClusterHealthChunkUsingPolicyAndAdvancedFilters(options, optionalCallback); } } /** - * @summary Rollback the upgrade of a Service Fabric cluster. - * - * Rollback the code or configuration upgrade of a Service Fabric cluster. - * - * @param {object} [options] Optional Parameters. - * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error} - The error object. - */ - rollbackClusterUpgradeWithHttpOperationResponse(options) { - let client = this; - let self = this; - return new Promise((resolve, reject) => { - self._rollbackClusterUpgrade(options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * @summary Rollback the upgrade of a Service Fabric cluster. - * - * Rollback the code or configuration upgrade of a Service Fabric cluster. - * - * @param {object} [options] Optional Parameters. - * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} [optionalCallback] - The optional callback. - * - * @returns {function|Promise} If a callback was passed as the last parameter - * then it returns the callback else returns a Promise. + * @summary Sends a health report on the Service Fabric cluster. * - * {Promise} A promise is returned + * Sends a health report on a Service Fabric cluster. The report must contain + * the information about the source of the health report and property on which + * it is reported. + * The report is sent to a Service Fabric gateway node, which forwards to the + * health store. + * The report may be accepted by the gateway, but rejected by the health store + * after extra validation. + * For example, the health store may reject the report because of an invalid + * parameter, like a stale sequence number. + * To see whether the report was applied in the health store, run + * GetClusterHealth and check that the report appears in the HealthEvents + * section. * - * @resolve {null} - The deserialized result object. + * @param {object} healthInformation Describes the health information for the + * health report. This information needs to be present in all of the health + * reports sent to the health manager. * - * @reject {Error} - The error object. + * @param {string} healthInformation.sourceId The source name that identifies + * the client/watchdog/system component that generated the health information. * - * {function} optionalCallback(err, result, request, response) + * @param {string} healthInformation.property The property of the health + * information. An entity can have health reports for different properties. + * The property is a string and not a fixed enumeration to allow the reporter + * flexibility to categorize the state condition that triggers the report. + * For example, a reporter with SourceId "LocalWatchdog" can monitor the state + * of the available disk on a node, + * so it can report "AvailableDisk" property on that node. + * The same reporter can monitor the node connectivity, so it can report a + * property "Connectivity" on the same node. + * In the health store, these reports are treated as separate health events for + * the specified node. * - * {Error} err - The Error object if an error occurred, null otherwise. + * Together with the SourceId, the property uniquely identifies the health + * information. * - * {null} [result] - The deserialized result object if an error did not occur. + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' * - * {object} [request] - The HTTP Request object if an error did not occur. + * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The + * duration for which this health report is valid. This field uses ISO8601 + * format for specifying the duration. + * When clients report periodically, they should send reports with higher + * frequency than time to live. + * If clients report on transition, they can set the time to live to infinite. + * When time to live expires, the health event that contains the health + * information + * is either removed from health store, if RemoveWhenExpired is true, or + * evaluated at error, if RemoveWhenExpired false. * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ - rollbackClusterUpgrade(options, optionalCallback) { - let client = this; - let self = this; - if (!optionalCallback && typeof options === 'function') { - optionalCallback = options; - options = null; - } - if (!optionalCallback) { - return new Promise((resolve, reject) => { - self._rollbackClusterUpgrade(options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._rollbackClusterUpgrade(options, optionalCallback); - } - } - - /** - * @summary Make the cluster upgrade move on to the next upgrade domain. + * If not specified, time to live defaults to infinite value. * - * Make the cluster code or configuration upgrade move on to the next upgrade - * domain if appropriate. + * @param {string} [healthInformation.description] The description of the + * health information. It represents free text used to add human readable + * information about the report. + * The maximum string length for the description is 4096 characters. + * If the provided string is longer, it will be automatically truncated. + * When truncated, the last characters of the description contain a marker + * "[Truncated]", and total string size is 4096 characters. + * The presence of the marker indicates to users that truncation occurred. + * Note that when truncated, the description has less than 4096 characters from + * the original string. * - * @param {object} resumeClusterUpgradeDescription Describes the parameters for - * resuming a cluster upgrade. + * @param {string} [healthInformation.sequenceNumber] The sequence number for + * this health report as a numeric string. + * The report sequence number is used by the health store to detect stale + * reports. + * If not specified, a sequence number is auto-generated by the health client + * when a report is added. * - * @param {string} resumeClusterUpgradeDescription.upgradeDomain The next - * upgrade domain for this cluster upgrade. + * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates + * whether the report is removed from health store when it expires. + * If set to true, the report is removed from the health store after it + * expires. + * If set to false, the report is treated as an error when expired. The value + * of this property is false by default. + * When clients report periodically, they should set RemoveWhenExpired false + * (default). + * This way, if the reporter has issues (e.g. deadlock) and can't report, the + * entity is evaluated at error when the health report expires. + * This flags the entity as being in Error health state. * * @param {object} [options] Optional Parameters. * + * @param {boolean} [options.immediate] A flag that indicates whether the + * report should be sent immediately. + * A health report is sent to a Service Fabric gateway Application, which + * forwards to the health store. + * If Immediate is set to true, the report is sent immediately from HTTP + * Gateway to the health store, regardless of the fabric client settings that + * the HTTP Gateway Application is using. + * This is useful for critical reports that should be sent as soon as possible. + * Depending on timing and other conditions, sending the report may still fail, + * for example if the HTTP Gateway is closed or the message doesn't reach the + * Gateway. + * If Immediate is set to false, the report is sent based on the health client + * settings from the HTTP Gateway. Therefore, it will be batched according to + * the HealthReportSendInterval configuration. + * This is the recommended setting because it allows the health client to + * optimize health reporting messages to health store as well as health report + * processing. + * By default, reports are not sent immediately. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -40711,11 +38542,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - resumeClusterUpgradeWithHttpOperationResponse(resumeClusterUpgradeDescription, options) { + reportClusterHealthWithHttpOperationResponse(healthInformation, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._resumeClusterUpgrade(resumeClusterUpgradeDescription, options, (err, result, request, response) => { + self._reportClusterHealth(healthInformation, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -40726,19 +38557,112 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Make the cluster upgrade move on to the next upgrade domain. + * @summary Sends a health report on the Service Fabric cluster. * - * Make the cluster code or configuration upgrade move on to the next upgrade - * domain if appropriate. + * Sends a health report on a Service Fabric cluster. The report must contain + * the information about the source of the health report and property on which + * it is reported. + * The report is sent to a Service Fabric gateway node, which forwards to the + * health store. + * The report may be accepted by the gateway, but rejected by the health store + * after extra validation. + * For example, the health store may reject the report because of an invalid + * parameter, like a stale sequence number. + * To see whether the report was applied in the health store, run + * GetClusterHealth and check that the report appears in the HealthEvents + * section. * - * @param {object} resumeClusterUpgradeDescription Describes the parameters for - * resuming a cluster upgrade. + * @param {object} healthInformation Describes the health information for the + * health report. This information needs to be present in all of the health + * reports sent to the health manager. * - * @param {string} resumeClusterUpgradeDescription.upgradeDomain The next - * upgrade domain for this cluster upgrade. + * @param {string} healthInformation.sourceId The source name that identifies + * the client/watchdog/system component that generated the health information. + * + * @param {string} healthInformation.property The property of the health + * information. An entity can have health reports for different properties. + * The property is a string and not a fixed enumeration to allow the reporter + * flexibility to categorize the state condition that triggers the report. + * For example, a reporter with SourceId "LocalWatchdog" can monitor the state + * of the available disk on a node, + * so it can report "AvailableDisk" property on that node. + * The same reporter can monitor the node connectivity, so it can report a + * property "Connectivity" on the same node. + * In the health store, these reports are treated as separate health events for + * the specified node. + * + * Together with the SourceId, the property uniquely identifies the health + * information. + * + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' + * + * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The + * duration for which this health report is valid. This field uses ISO8601 + * format for specifying the duration. + * When clients report periodically, they should send reports with higher + * frequency than time to live. + * If clients report on transition, they can set the time to live to infinite. + * When time to live expires, the health event that contains the health + * information + * is either removed from health store, if RemoveWhenExpired is true, or + * evaluated at error, if RemoveWhenExpired false. + * + * If not specified, time to live defaults to infinite value. + * + * @param {string} [healthInformation.description] The description of the + * health information. It represents free text used to add human readable + * information about the report. + * The maximum string length for the description is 4096 characters. + * If the provided string is longer, it will be automatically truncated. + * When truncated, the last characters of the description contain a marker + * "[Truncated]", and total string size is 4096 characters. + * The presence of the marker indicates to users that truncation occurred. + * Note that when truncated, the description has less than 4096 characters from + * the original string. + * + * @param {string} [healthInformation.sequenceNumber] The sequence number for + * this health report as a numeric string. + * The report sequence number is used by the health store to detect stale + * reports. + * If not specified, a sequence number is auto-generated by the health client + * when a report is added. + * + * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates + * whether the report is removed from health store when it expires. + * If set to true, the report is removed from the health store after it + * expires. + * If set to false, the report is treated as an error when expired. The value + * of this property is false by default. + * When clients report periodically, they should set RemoveWhenExpired false + * (default). + * This way, if the reporter has issues (e.g. deadlock) and can't report, the + * entity is evaluated at error when the health report expires. + * This flags the entity as being in Error health state. * * @param {object} [options] Optional Parameters. * + * @param {boolean} [options.immediate] A flag that indicates whether the + * report should be sent immediately. + * A health report is sent to a Service Fabric gateway Application, which + * forwards to the health store. + * If Immediate is set to true, the report is sent immediately from HTTP + * Gateway to the health store, regardless of the fabric client settings that + * the HTTP Gateway Application is using. + * This is useful for critical reports that should be sent as soon as possible. + * Depending on timing and other conditions, sending the report may still fail, + * for example if the HTTP Gateway is closed or the message doesn't reach the + * Gateway. + * If Immediate is set to false, the report is sent based on the health client + * settings from the HTTP Gateway. Therefore, it will be batched according to + * the HealthReportSendInterval configuration. + * This is the recommended setting because it allows the health client to + * optimize health reporting messages to health store as well as health report + * processing. + * By default, reports are not sent immediately. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -40768,7 +38692,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - resumeClusterUpgrade(resumeClusterUpgradeDescription, options, optionalCallback) { + reportClusterHealth(healthInformation, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -40777,211 +38701,29 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._resumeClusterUpgrade(resumeClusterUpgradeDescription, options, (err, result, request, response) => { + self._reportClusterHealth(healthInformation, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._resumeClusterUpgrade(resumeClusterUpgradeDescription, options, optionalCallback); + return self._reportClusterHealth(healthInformation, options, optionalCallback); } } /** - * @summary Start upgrading the code or configuration version of a Service - * Fabric cluster. - * - * Validate the supplied upgrade parameters and start upgrading the code or - * configuration version of a Service Fabric cluster if the parameters are - * valid. - * - * @param {object} startClusterUpgradeDescription Describes the parameters for - * starting a cluster upgrade. - * - * @param {string} [startClusterUpgradeDescription.codeVersion] The cluster - * code version. - * - * @param {string} [startClusterUpgradeDescription.configVersion] The cluster - * configuration version. - * - * @param {string} [startClusterUpgradeDescription.upgradeKind] The kind of - * upgrade out of the following possible values. Possible values include: - * 'Invalid', 'Rolling' - * - * @param {string} [startClusterUpgradeDescription.rollingUpgradeMode] The mode - * used to monitor health during a rolling upgrade. The values are - * UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: - * 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' - * - * @param {number} - * [startClusterUpgradeDescription.upgradeReplicaSetCheckTimeoutInSeconds] The - * maximum amount of time to block processing of an upgrade domain and prevent - * loss of availability when there are unexpected issues. When this timeout - * expires, processing of the upgrade domain will proceed regardless of - * availability loss issues. The timeout is reset at the start of each upgrade - * domain. Valid values are between 0 and 42949672925 inclusive. (unsigned - * 32-bit integer). - * - * @param {boolean} [startClusterUpgradeDescription.forceRestart] If true, then - * processes are forcefully restarted during upgrade even when the code version - * has not changed (the upgrade only changes configuration or data). - * - * @param {object} [startClusterUpgradeDescription.monitoringPolicy] Describes - * the parameters for monitoring an upgrade in Monitored mode. - * - * @param {string} - * [startClusterUpgradeDescription.monitoringPolicy.failureAction] The - * compensating action to perform when a Monitored upgrade encounters - * monitoring policy or health policy violations. - * Invalid indicates the failure action is invalid. Rollback specifies that the - * upgrade will start rolling back automatically. - * Manual indicates that the upgrade will switch to UnmonitoredManual upgrade - * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' - * - * @param {string} - * [startClusterUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] - * The amount of time to wait after completing an upgrade domain before - * applying health policies. It is first interpreted as a string representing - * an ISO 8601 duration. If that fails, then it is interpreted as a number - * representing the total number of milliseconds. - * - * @param {string} - * [startClusterUpgradeDescription.monitoringPolicy.healthCheckStableDurationInMilliseconds] - * The amount of time that the application or cluster must remain healthy - * before the upgrade proceeds to the next upgrade domain. It is first - * interpreted as a string representing an ISO 8601 duration. If that fails, - * then it is interpreted as a number representing the total number of - * milliseconds. - * - * @param {string} - * [startClusterUpgradeDescription.monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] - * The amount of time to retry health evaluation when the application or - * cluster is unhealthy before FailureAction is executed. It is first - * interpreted as a string representing an ISO 8601 duration. If that fails, - * then it is interpreted as a number representing the total number of - * milliseconds. - * - * @param {string} - * [startClusterUpgradeDescription.monitoringPolicy.upgradeTimeoutInMilliseconds] - * The amount of time the overall upgrade has to complete before FailureAction - * is executed. It is first interpreted as a string representing an ISO 8601 - * duration. If that fails, then it is interpreted as a number representing the - * total number of milliseconds. - * - * @param {string} - * [startClusterUpgradeDescription.monitoringPolicy.upgradeDomainTimeoutInMilliseconds] - * The amount of time each upgrade domain has to complete before FailureAction - * is executed. It is first interpreted as a string representing an ISO 8601 - * duration. If that fails, then it is interpreted as a number representing the - * total number of milliseconds. - * - * @param {object} [startClusterUpgradeDescription.clusterHealthPolicy] Defines - * a health policy used to evaluate the health of the cluster or of a cluster - * node. - * - * @param {boolean} - * [startClusterUpgradeDescription.clusterHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. - * - * @param {number} - * [startClusterUpgradeDescription.clusterHealthPolicy.maxPercentUnhealthyNodes] - * The maximum allowed percentage of unhealthy nodes before reporting an error. - * For example, to allow 10% of nodes to be unhealthy, this value would be 10. - * - * The percentage represents the maximum tolerated percentage of nodes that can - * be unhealthy before the cluster is considered in error. - * If the percentage is respected but there is at least one unhealthy node, the - * health is evaluated as Warning. - * The percentage is calculated by dividing the number of unhealthy nodes over - * the total number of nodes in the cluster. - * The computation rounds up to tolerate one failure on small numbers of nodes. - * Default percentage is zero. - * - * In large clusters, some nodes will always be down or out for repairs, so - * this percentage should be configured to tolerate that. - * - * @param {number} - * [startClusterUpgradeDescription.clusterHealthPolicy.maxPercentUnhealthyApplications] - * The maximum allowed percentage of unhealthy applications before reporting an - * error. For example, to allow 10% of applications to be unhealthy, this value - * would be 10. - * - * The percentage represents the maximum tolerated percentage of applications - * that can be unhealthy before the cluster is considered in error. - * If the percentage is respected but there is at least one unhealthy - * application, the health is evaluated as Warning. - * This is calculated by dividing the number of unhealthy applications over the - * total number of application instances in the cluster, excluding applications - * of application types that are included in the - * ApplicationTypeHealthPolicyMap. - * The computation rounds up to tolerate one failure on small numbers of - * applications. Default percentage is zero. - * - * @param {array} - * [startClusterUpgradeDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] - * Defines a map with max percentage unhealthy applications for specific - * application types. - * Each entry specifies as key the application type name and as value an - * integer that represents the MaxPercentUnhealthyApplications percentage used - * to evaluate the applications of the specified application type. - * - * The application type health policy map can be used during cluster health - * evaluation to describe special application types. - * The application types included in the map are evaluated against the - * percentage specified in the map, and not with the global - * MaxPercentUnhealthyApplications defined in the cluster health policy. - * The applications of application types specified in the map are not counted - * against the global pool of applications. - * For example, if some applications of a type are critical, the cluster - * administrator can add an entry to the map for that application type - * and assign it a value of 0% (that is, do not tolerate any failures). - * All other applications can be evaluated with MaxPercentUnhealthyApplications - * set to 20% to tolerate some failures out of the thousands of application - * instances. - * The application type health policy map is used only if the cluster manifest - * enables application type health evaluation using the configuration entry for - * HealthManager/EnableApplicationTypeHealthEvaluation. - * - * @param {boolean} - * [startClusterUpgradeDescription.enableDeltaHealthEvaluation] When true, - * enables delta health evaluation rather than absolute health evaluation after - * completion of each upgrade domain. - * - * @param {object} [startClusterUpgradeDescription.clusterUpgradeHealthPolicy] - * Defines a health policy used to evaluate the health of the cluster during a - * cluster upgrade. - * - * @param {number} - * [startClusterUpgradeDescription.clusterUpgradeHealthPolicy.maxPercentDeltaUnhealthyNodes] - * The maximum allowed percentage of nodes health degradation allowed during - * cluster upgrades. The delta is measured between the state of the nodes at - * the beginning of upgrade and the state of the nodes at the time of the - * health evaluation. The check is performed after every upgrade domain upgrade - * completion to make sure the global state of the cluster is within tolerated - * limits. The default value is 10%. - * - * @param {number} - * [startClusterUpgradeDescription.clusterUpgradeHealthPolicy.maxPercentUpgradeDomainDeltaUnhealthyNodes] - * The maximum allowed percentage of upgrade domain nodes health degradation - * allowed during cluster upgrades. The delta is measured between the state of - * the upgrade domain nodes at the beginning of upgrade and the state of the - * upgrade domain nodes at the time of the health evaluation. The check is - * performed after every upgrade domain upgrade completion for all completed - * upgrade domains to make sure the state of the upgrade domains is within - * tolerated limits. The default value is 15%. - * - * @param {object} [startClusterUpgradeDescription.applicationHealthPolicyMap] - * Defines the application health policy map used to evaluate the health of an - * application or one of its children entities. + * @summary Gets a list of fabric code versions that are provisioned in a + * Service Fabric cluster. * - * @param {array} - * [startClusterUpgradeDescription.applicationHealthPolicyMap.applicationHealthPolicyMap] - * The wrapper that contains the map with application health policies used to - * evaluate specific applications in the cluster. + * Gets a list of information about fabric code versions that are provisioned + * in the cluster. The parameter CodeVersion can be used to optionally filter + * the output to only that particular version. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.codeVersion] The product version of Service Fabric. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -40992,15 +38734,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - startClusterUpgradeWithHttpOperationResponse(startClusterUpgradeDescription, options) { + getProvisionedFabricCodeVersionInfoListWithHttpOperationResponse(options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._startClusterUpgrade(startClusterUpgradeDescription, options, (err, result, request, response) => { + self._getProvisionedFabricCodeVersionInfoList(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -41011,199 +38753,17 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Start upgrading the code or configuration version of a Service - * Fabric cluster. - * - * Validate the supplied upgrade parameters and start upgrading the code or - * configuration version of a Service Fabric cluster if the parameters are - * valid. - * - * @param {object} startClusterUpgradeDescription Describes the parameters for - * starting a cluster upgrade. - * - * @param {string} [startClusterUpgradeDescription.codeVersion] The cluster - * code version. - * - * @param {string} [startClusterUpgradeDescription.configVersion] The cluster - * configuration version. - * - * @param {string} [startClusterUpgradeDescription.upgradeKind] The kind of - * upgrade out of the following possible values. Possible values include: - * 'Invalid', 'Rolling' - * - * @param {string} [startClusterUpgradeDescription.rollingUpgradeMode] The mode - * used to monitor health during a rolling upgrade. The values are - * UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: - * 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' - * - * @param {number} - * [startClusterUpgradeDescription.upgradeReplicaSetCheckTimeoutInSeconds] The - * maximum amount of time to block processing of an upgrade domain and prevent - * loss of availability when there are unexpected issues. When this timeout - * expires, processing of the upgrade domain will proceed regardless of - * availability loss issues. The timeout is reset at the start of each upgrade - * domain. Valid values are between 0 and 42949672925 inclusive. (unsigned - * 32-bit integer). - * - * @param {boolean} [startClusterUpgradeDescription.forceRestart] If true, then - * processes are forcefully restarted during upgrade even when the code version - * has not changed (the upgrade only changes configuration or data). - * - * @param {object} [startClusterUpgradeDescription.monitoringPolicy] Describes - * the parameters for monitoring an upgrade in Monitored mode. - * - * @param {string} - * [startClusterUpgradeDescription.monitoringPolicy.failureAction] The - * compensating action to perform when a Monitored upgrade encounters - * monitoring policy or health policy violations. - * Invalid indicates the failure action is invalid. Rollback specifies that the - * upgrade will start rolling back automatically. - * Manual indicates that the upgrade will switch to UnmonitoredManual upgrade - * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' - * - * @param {string} - * [startClusterUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] - * The amount of time to wait after completing an upgrade domain before - * applying health policies. It is first interpreted as a string representing - * an ISO 8601 duration. If that fails, then it is interpreted as a number - * representing the total number of milliseconds. - * - * @param {string} - * [startClusterUpgradeDescription.monitoringPolicy.healthCheckStableDurationInMilliseconds] - * The amount of time that the application or cluster must remain healthy - * before the upgrade proceeds to the next upgrade domain. It is first - * interpreted as a string representing an ISO 8601 duration. If that fails, - * then it is interpreted as a number representing the total number of - * milliseconds. - * - * @param {string} - * [startClusterUpgradeDescription.monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] - * The amount of time to retry health evaluation when the application or - * cluster is unhealthy before FailureAction is executed. It is first - * interpreted as a string representing an ISO 8601 duration. If that fails, - * then it is interpreted as a number representing the total number of - * milliseconds. - * - * @param {string} - * [startClusterUpgradeDescription.monitoringPolicy.upgradeTimeoutInMilliseconds] - * The amount of time the overall upgrade has to complete before FailureAction - * is executed. It is first interpreted as a string representing an ISO 8601 - * duration. If that fails, then it is interpreted as a number representing the - * total number of milliseconds. - * - * @param {string} - * [startClusterUpgradeDescription.monitoringPolicy.upgradeDomainTimeoutInMilliseconds] - * The amount of time each upgrade domain has to complete before FailureAction - * is executed. It is first interpreted as a string representing an ISO 8601 - * duration. If that fails, then it is interpreted as a number representing the - * total number of milliseconds. - * - * @param {object} [startClusterUpgradeDescription.clusterHealthPolicy] Defines - * a health policy used to evaluate the health of the cluster or of a cluster - * node. - * - * @param {boolean} - * [startClusterUpgradeDescription.clusterHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. - * - * @param {number} - * [startClusterUpgradeDescription.clusterHealthPolicy.maxPercentUnhealthyNodes] - * The maximum allowed percentage of unhealthy nodes before reporting an error. - * For example, to allow 10% of nodes to be unhealthy, this value would be 10. - * - * The percentage represents the maximum tolerated percentage of nodes that can - * be unhealthy before the cluster is considered in error. - * If the percentage is respected but there is at least one unhealthy node, the - * health is evaluated as Warning. - * The percentage is calculated by dividing the number of unhealthy nodes over - * the total number of nodes in the cluster. - * The computation rounds up to tolerate one failure on small numbers of nodes. - * Default percentage is zero. - * - * In large clusters, some nodes will always be down or out for repairs, so - * this percentage should be configured to tolerate that. - * - * @param {number} - * [startClusterUpgradeDescription.clusterHealthPolicy.maxPercentUnhealthyApplications] - * The maximum allowed percentage of unhealthy applications before reporting an - * error. For example, to allow 10% of applications to be unhealthy, this value - * would be 10. - * - * The percentage represents the maximum tolerated percentage of applications - * that can be unhealthy before the cluster is considered in error. - * If the percentage is respected but there is at least one unhealthy - * application, the health is evaluated as Warning. - * This is calculated by dividing the number of unhealthy applications over the - * total number of application instances in the cluster, excluding applications - * of application types that are included in the - * ApplicationTypeHealthPolicyMap. - * The computation rounds up to tolerate one failure on small numbers of - * applications. Default percentage is zero. - * - * @param {array} - * [startClusterUpgradeDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] - * Defines a map with max percentage unhealthy applications for specific - * application types. - * Each entry specifies as key the application type name and as value an - * integer that represents the MaxPercentUnhealthyApplications percentage used - * to evaluate the applications of the specified application type. - * - * The application type health policy map can be used during cluster health - * evaluation to describe special application types. - * The application types included in the map are evaluated against the - * percentage specified in the map, and not with the global - * MaxPercentUnhealthyApplications defined in the cluster health policy. - * The applications of application types specified in the map are not counted - * against the global pool of applications. - * For example, if some applications of a type are critical, the cluster - * administrator can add an entry to the map for that application type - * and assign it a value of 0% (that is, do not tolerate any failures). - * All other applications can be evaluated with MaxPercentUnhealthyApplications - * set to 20% to tolerate some failures out of the thousands of application - * instances. - * The application type health policy map is used only if the cluster manifest - * enables application type health evaluation using the configuration entry for - * HealthManager/EnableApplicationTypeHealthEvaluation. - * - * @param {boolean} - * [startClusterUpgradeDescription.enableDeltaHealthEvaluation] When true, - * enables delta health evaluation rather than absolute health evaluation after - * completion of each upgrade domain. - * - * @param {object} [startClusterUpgradeDescription.clusterUpgradeHealthPolicy] - * Defines a health policy used to evaluate the health of the cluster during a - * cluster upgrade. - * - * @param {number} - * [startClusterUpgradeDescription.clusterUpgradeHealthPolicy.maxPercentDeltaUnhealthyNodes] - * The maximum allowed percentage of nodes health degradation allowed during - * cluster upgrades. The delta is measured between the state of the nodes at - * the beginning of upgrade and the state of the nodes at the time of the - * health evaluation. The check is performed after every upgrade domain upgrade - * completion to make sure the global state of the cluster is within tolerated - * limits. The default value is 10%. - * - * @param {number} - * [startClusterUpgradeDescription.clusterUpgradeHealthPolicy.maxPercentUpgradeDomainDeltaUnhealthyNodes] - * The maximum allowed percentage of upgrade domain nodes health degradation - * allowed during cluster upgrades. The delta is measured between the state of - * the upgrade domain nodes at the beginning of upgrade and the state of the - * upgrade domain nodes at the time of the health evaluation. The check is - * performed after every upgrade domain upgrade completion for all completed - * upgrade domains to make sure the state of the upgrade domains is within - * tolerated limits. The default value is 15%. - * - * @param {object} [startClusterUpgradeDescription.applicationHealthPolicyMap] - * Defines the application health policy map used to evaluate the health of an - * application or one of its children entities. + * @summary Gets a list of fabric code versions that are provisioned in a + * Service Fabric cluster. * - * @param {array} - * [startClusterUpgradeDescription.applicationHealthPolicyMap.applicationHealthPolicyMap] - * The wrapper that contains the map with application health policies used to - * evaluate specific applications in the cluster. + * Gets a list of information about fabric code versions that are provisioned + * in the cluster. The parameter CodeVersion can be used to optionally filter + * the output to only that particular version. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.codeVersion] The product version of Service Fabric. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -41219,7 +38779,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error} - The error object. * @@ -41227,13 +38787,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - startClusterUpgrade(startClusterUpgradeDescription, options, optionalCallback) { + getProvisionedFabricCodeVersionInfoList(options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -41242,84 +38802,30 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._startClusterUpgrade(startClusterUpgradeDescription, options, (err, result, request, response) => { + self._getProvisionedFabricCodeVersionInfoList(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._startClusterUpgrade(startClusterUpgradeDescription, options, optionalCallback); + return self._getProvisionedFabricCodeVersionInfoList(options, optionalCallback); } } /** - * @summary Start upgrading the configuration of a Service Fabric standalone - * cluster. - * - * Validate the supplied configuration upgrade parameters and start upgrading - * the cluster configuration if the parameters are valid. - * - * @param {object} clusterConfigurationUpgradeDescription Parameters for a - * standalone cluster configuration upgrade. - * - * @param {string} clusterConfigurationUpgradeDescription.clusterConfig The - * cluster configuration. - * - * @param {moment.duration} - * [clusterConfigurationUpgradeDescription.healthCheckRetryTimeout] The length - * of time between attempts to perform a health checks if the application or - * cluster is not healthy. - * - * @param {moment.duration} - * [clusterConfigurationUpgradeDescription.healthCheckWaitDurationInSeconds] - * The length of time to wait after completing an upgrade domain before - * starting the health checks process. - * - * @param {moment.duration} - * [clusterConfigurationUpgradeDescription.healthCheckStableDurationInSeconds] - * The length of time that the application or cluster must remain healthy. - * - * @param {moment.duration} - * [clusterConfigurationUpgradeDescription.upgradeDomainTimeoutInSeconds] The - * timeout for the upgrade domain. - * - * @param {moment.duration} - * [clusterConfigurationUpgradeDescription.upgradeTimeoutInSeconds] The upgrade - * timeout. - * - * @param {number} - * [clusterConfigurationUpgradeDescription.maxPercentUnhealthyApplications] The - * maximum allowed percentage of unhealthy applications during the upgrade. - * Allowed values are integer values from zero to 100. - * - * @param {number} - * [clusterConfigurationUpgradeDescription.maxPercentUnhealthyNodes] The - * maximum allowed percentage of unhealthy nodes during the upgrade. Allowed - * values are integer values from zero to 100. - * - * @param {number} - * [clusterConfigurationUpgradeDescription.maxPercentDeltaUnhealthyNodes] The - * maximum allowed percentage of delta health degradation during the upgrade. - * Allowed values are integer values from zero to 100. - * - * @param {number} - * [clusterConfigurationUpgradeDescription.maxPercentUpgradeDomainDeltaUnhealthyNodes] - * The maximum allowed percentage of upgrade domain delta health degradation - * during the upgrade. Allowed values are integer values from zero to 100. - * - * @param {object} - * [clusterConfigurationUpgradeDescription.applicationHealthPolicies] Defines - * the application health policy map used to evaluate the health of an - * application or one of its children entities. + * @summary Gets a list of fabric config versions that are provisioned in a + * Service Fabric cluster. * - * @param {array} - * [clusterConfigurationUpgradeDescription.applicationHealthPolicies.applicationHealthPolicyMap] - * The wrapper that contains the map with application health policies used to - * evaluate specific applications in the cluster. + * Gets a list of information about fabric config versions that are provisioned + * in the cluster. The parameter ConfigVersion can be used to optionally filter + * the output to only that particular version. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.configVersion] The config version of Service + * Fabric. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -41330,15 +38836,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - startClusterConfigurationUpgradeWithHttpOperationResponse(clusterConfigurationUpgradeDescription, options) { + getProvisionedFabricConfigVersionInfoListWithHttpOperationResponse(options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._startClusterConfigurationUpgrade(clusterConfigurationUpgradeDescription, options, (err, result, request, response) => { + self._getProvisionedFabricConfigVersionInfoList(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -41349,72 +38855,18 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Start upgrading the configuration of a Service Fabric standalone - * cluster. - * - * Validate the supplied configuration upgrade parameters and start upgrading - * the cluster configuration if the parameters are valid. - * - * @param {object} clusterConfigurationUpgradeDescription Parameters for a - * standalone cluster configuration upgrade. - * - * @param {string} clusterConfigurationUpgradeDescription.clusterConfig The - * cluster configuration. - * - * @param {moment.duration} - * [clusterConfigurationUpgradeDescription.healthCheckRetryTimeout] The length - * of time between attempts to perform a health checks if the application or - * cluster is not healthy. - * - * @param {moment.duration} - * [clusterConfigurationUpgradeDescription.healthCheckWaitDurationInSeconds] - * The length of time to wait after completing an upgrade domain before - * starting the health checks process. - * - * @param {moment.duration} - * [clusterConfigurationUpgradeDescription.healthCheckStableDurationInSeconds] - * The length of time that the application or cluster must remain healthy. - * - * @param {moment.duration} - * [clusterConfigurationUpgradeDescription.upgradeDomainTimeoutInSeconds] The - * timeout for the upgrade domain. - * - * @param {moment.duration} - * [clusterConfigurationUpgradeDescription.upgradeTimeoutInSeconds] The upgrade - * timeout. - * - * @param {number} - * [clusterConfigurationUpgradeDescription.maxPercentUnhealthyApplications] The - * maximum allowed percentage of unhealthy applications during the upgrade. - * Allowed values are integer values from zero to 100. - * - * @param {number} - * [clusterConfigurationUpgradeDescription.maxPercentUnhealthyNodes] The - * maximum allowed percentage of unhealthy nodes during the upgrade. Allowed - * values are integer values from zero to 100. - * - * @param {number} - * [clusterConfigurationUpgradeDescription.maxPercentDeltaUnhealthyNodes] The - * maximum allowed percentage of delta health degradation during the upgrade. - * Allowed values are integer values from zero to 100. - * - * @param {number} - * [clusterConfigurationUpgradeDescription.maxPercentUpgradeDomainDeltaUnhealthyNodes] - * The maximum allowed percentage of upgrade domain delta health degradation - * during the upgrade. Allowed values are integer values from zero to 100. - * - * @param {object} - * [clusterConfigurationUpgradeDescription.applicationHealthPolicies] Defines - * the application health policy map used to evaluate the health of an - * application or one of its children entities. + * @summary Gets a list of fabric config versions that are provisioned in a + * Service Fabric cluster. * - * @param {array} - * [clusterConfigurationUpgradeDescription.applicationHealthPolicies.applicationHealthPolicyMap] - * The wrapper that contains the map with application health policies used to - * evaluate specific applications in the cluster. + * Gets a list of information about fabric config versions that are provisioned + * in the cluster. The parameter ConfigVersion can be used to optionally filter + * the output to only that particular version. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.configVersion] The config version of Service + * Fabric. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -41430,7 +38882,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error} - The error object. * @@ -41438,13 +38890,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - startClusterConfigurationUpgrade(clusterConfigurationUpgradeDescription, options, optionalCallback) { + getProvisionedFabricConfigVersionInfoList(options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -41453,202 +38905,121 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._startClusterConfigurationUpgrade(clusterConfigurationUpgradeDescription, options, (err, result, request, response) => { + self._getProvisionedFabricConfigVersionInfoList(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._startClusterConfigurationUpgrade(clusterConfigurationUpgradeDescription, options, optionalCallback); + return self._getProvisionedFabricConfigVersionInfoList(options, optionalCallback); } } /** - * @summary Update the upgrade parameters of a Service Fabric cluster upgrade. - * - * Update the upgrade parameters used during a Service Fabric cluster upgrade. - * - * @param {object} updateClusterUpgradeDescription Parameters for updating a - * cluster upgrade. - * - * @param {string} [updateClusterUpgradeDescription.upgradeKind] The type of - * upgrade out of the following possible values. Possible values include: - * 'Invalid', 'Rolling', 'Rolling_ForceRestart' - * - * @param {object} [updateClusterUpgradeDescription.updateDescription] - * Describes the parameters for updating a rolling upgrade of application or - * cluster. - * - * @param {string} - * updateClusterUpgradeDescription.updateDescription.rollingUpgradeMode The - * mode used to monitor health during a rolling upgrade. The values are - * UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: - * 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' - * - * @param {boolean} - * [updateClusterUpgradeDescription.updateDescription.forceRestart] If true, - * then processes are forcefully restarted during upgrade even when the code - * version has not changed (the upgrade only changes configuration or data). - * - * @param {number} - * [updateClusterUpgradeDescription.updateDescription.replicaSetCheckTimeoutInMilliseconds] - * The maximum amount of time to block processing of an upgrade domain and - * prevent loss of availability when there are unexpected issues. When this - * timeout expires, processing of the upgrade domain will proceed regardless of - * availability loss issues. The timeout is reset at the start of each upgrade - * domain. Valid values are between 0 and 42949672925 inclusive. (unsigned - * 32-bit integer). + * @summary Gets the progress of the current cluster upgrade. * - * @param {string} - * [updateClusterUpgradeDescription.updateDescription.failureAction] The - * compensating action to perform when a Monitored upgrade encounters - * monitoring policy or health policy violations. - * Invalid indicates the failure action is invalid. Rollback specifies that the - * upgrade will start rolling back automatically. - * Manual indicates that the upgrade will switch to UnmonitoredManual upgrade - * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' + * Gets the current progress of the ongoing cluster upgrade. If no upgrade is + * currently in progress, get the last state of the previous cluster upgrade. * - * @param {string} - * [updateClusterUpgradeDescription.updateDescription.healthCheckWaitDurationInMilliseconds] - * The amount of time to wait after completing an upgrade domain before - * applying health policies. It is first interpreted as a string representing - * an ISO 8601 duration. If that fails, then it is interpreted as a number - * representing the total number of milliseconds. + * @param {object} [options] Optional Parameters. * - * @param {string} - * [updateClusterUpgradeDescription.updateDescription.healthCheckStableDurationInMilliseconds] - * The amount of time that the application or cluster must remain healthy - * before the upgrade proceeds to the next upgrade domain. It is first - * interpreted as a string representing an ISO 8601 duration. If that fails, - * then it is interpreted as a number representing the total number of - * milliseconds. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {string} - * [updateClusterUpgradeDescription.updateDescription.healthCheckRetryTimeoutInMilliseconds] - * The amount of time to retry health evaluation when the application or - * cluster is unhealthy before FailureAction is executed. It is first - * interpreted as a string representing an ISO 8601 duration. If that fails, - * then it is interpreted as a number representing the total number of - * milliseconds. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} - * [updateClusterUpgradeDescription.updateDescription.upgradeTimeoutInMilliseconds] - * The amount of time the overall upgrade has to complete before FailureAction - * is executed. It is first interpreted as a string representing an ISO 8601 - * duration. If that fails, then it is interpreted as a number representing the - * total number of milliseconds. + * @returns {Promise} A promise is returned * - * @param {string} - * [updateClusterUpgradeDescription.updateDescription.upgradeDomainTimeoutInMilliseconds] - * The amount of time each upgrade domain has to complete before FailureAction - * is executed. It is first interpreted as a string representing an ISO 8601 - * duration. If that fails, then it is interpreted as a number representing the - * total number of milliseconds. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {object} [updateClusterUpgradeDescription.clusterHealthPolicy] - * Defines a health policy used to evaluate the health of the cluster or of a - * cluster node. + * @reject {Error} - The error object. + */ + getClusterUpgradeProgressWithHttpOperationResponse(options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getClusterUpgradeProgress(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets the progress of the current cluster upgrade. * - * @param {boolean} - * [updateClusterUpgradeDescription.clusterHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. + * Gets the current progress of the ongoing cluster upgrade. If no upgrade is + * currently in progress, get the last state of the previous cluster upgrade. * - * @param {number} - * [updateClusterUpgradeDescription.clusterHealthPolicy.maxPercentUnhealthyNodes] - * The maximum allowed percentage of unhealthy nodes before reporting an error. - * For example, to allow 10% of nodes to be unhealthy, this value would be 10. + * @param {object} [options] Optional Parameters. * - * The percentage represents the maximum tolerated percentage of nodes that can - * be unhealthy before the cluster is considered in error. - * If the percentage is respected but there is at least one unhealthy node, the - * health is evaluated as Warning. - * The percentage is calculated by dividing the number of unhealthy nodes over - * the total number of nodes in the cluster. - * The computation rounds up to tolerate one failure on small numbers of nodes. - * Default percentage is zero. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * In large clusters, some nodes will always be down or out for repairs, so - * this percentage should be configured to tolerate that. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {number} - * [updateClusterUpgradeDescription.clusterHealthPolicy.maxPercentUnhealthyApplications] - * The maximum allowed percentage of unhealthy applications before reporting an - * error. For example, to allow 10% of applications to be unhealthy, this value - * would be 10. + * @param {function} [optionalCallback] - The optional callback. * - * The percentage represents the maximum tolerated percentage of applications - * that can be unhealthy before the cluster is considered in error. - * If the percentage is respected but there is at least one unhealthy - * application, the health is evaluated as Warning. - * This is calculated by dividing the number of unhealthy applications over the - * total number of application instances in the cluster, excluding applications - * of application types that are included in the - * ApplicationTypeHealthPolicyMap. - * The computation rounds up to tolerate one failure on small numbers of - * applications. Default percentage is zero. + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. * - * @param {array} - * [updateClusterUpgradeDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] - * Defines a map with max percentage unhealthy applications for specific - * application types. - * Each entry specifies as key the application type name and as value an - * integer that represents the MaxPercentUnhealthyApplications percentage used - * to evaluate the applications of the specified application type. + * {Promise} A promise is returned * - * The application type health policy map can be used during cluster health - * evaluation to describe special application types. - * The application types included in the map are evaluated against the - * percentage specified in the map, and not with the global - * MaxPercentUnhealthyApplications defined in the cluster health policy. - * The applications of application types specified in the map are not counted - * against the global pool of applications. - * For example, if some applications of a type are critical, the cluster - * administrator can add an entry to the map for that application type - * and assign it a value of 0% (that is, do not tolerate any failures). - * All other applications can be evaluated with MaxPercentUnhealthyApplications - * set to 20% to tolerate some failures out of the thousands of application - * instances. - * The application type health policy map is used only if the cluster manifest - * enables application type health evaluation using the configuration entry for - * HealthManager/EnableApplicationTypeHealthEvaluation. + * @resolve {ClusterUpgradeProgressObject} - The deserialized result object. * - * @param {boolean} - * [updateClusterUpgradeDescription.enableDeltaHealthEvaluation] When true, - * enables delta health evaluation rather than absolute health evaluation after - * completion of each upgrade domain. + * @reject {Error} - The error object. * - * @param {object} [updateClusterUpgradeDescription.clusterUpgradeHealthPolicy] - * Defines a health policy used to evaluate the health of the cluster during a - * cluster upgrade. + * {function} optionalCallback(err, result, request, response) * - * @param {number} - * [updateClusterUpgradeDescription.clusterUpgradeHealthPolicy.maxPercentDeltaUnhealthyNodes] - * The maximum allowed percentage of nodes health degradation allowed during - * cluster upgrades. The delta is measured between the state of the nodes at - * the beginning of upgrade and the state of the nodes at the time of the - * health evaluation. The check is performed after every upgrade domain upgrade - * completion to make sure the global state of the cluster is within tolerated - * limits. The default value is 10%. + * {Error} err - The Error object if an error occurred, null otherwise. * - * @param {number} - * [updateClusterUpgradeDescription.clusterUpgradeHealthPolicy.maxPercentUpgradeDomainDeltaUnhealthyNodes] - * The maximum allowed percentage of upgrade domain nodes health degradation - * allowed during cluster upgrades. The delta is measured between the state of - * the upgrade domain nodes at the beginning of upgrade and the state of the - * upgrade domain nodes at the time of the health evaluation. The check is - * performed after every upgrade domain upgrade completion for all completed - * upgrade domains to make sure the state of the upgrade domains is within - * tolerated limits. The default value is 15%. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ClusterUpgradeProgressObject} for more + * information. * - * @param {object} [updateClusterUpgradeDescription.applicationHealthPolicyMap] - * Defines the application health policy map used to evaluate the health of an - * application or one of its children entities. + * {object} [request] - The HTTP Request object if an error did not occur. * - * @param {array} - * [updateClusterUpgradeDescription.applicationHealthPolicyMap.applicationHealthPolicyMap] - * The wrapper that contains the map with application health policies used to - * evaluate specific applications in the cluster. + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getClusterUpgradeProgress(options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getClusterUpgradeProgress(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getClusterUpgradeProgress(options, optionalCallback); + } + } + + /** + * @summary Get the Service Fabric standalone cluster configuration. + * + * The cluster configuration contains properties of the cluster that include + * different node types on the cluster, + * security configurations, fault, and upgrade domain topologies, etc. + * + * @param {string} configurationApiVersion The API version of the Standalone + * cluster json configuration. * * @param {object} [options] Optional Parameters. * @@ -41662,15 +39033,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - updateClusterUpgradeWithHttpOperationResponse(updateClusterUpgradeDescription, options) { + getClusterConfigurationWithHttpOperationResponse(configurationApiVersion, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._updateClusterUpgrade(updateClusterUpgradeDescription, options, (err, result, request, response) => { + self._getClusterConfiguration(configurationApiVersion, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -41681,190 +39052,110 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Update the upgrade parameters of a Service Fabric cluster upgrade. - * - * Update the upgrade parameters used during a Service Fabric cluster upgrade. - * - * @param {object} updateClusterUpgradeDescription Parameters for updating a - * cluster upgrade. - * - * @param {string} [updateClusterUpgradeDescription.upgradeKind] The type of - * upgrade out of the following possible values. Possible values include: - * 'Invalid', 'Rolling', 'Rolling_ForceRestart' - * - * @param {object} [updateClusterUpgradeDescription.updateDescription] - * Describes the parameters for updating a rolling upgrade of application or - * cluster. - * - * @param {string} - * updateClusterUpgradeDescription.updateDescription.rollingUpgradeMode The - * mode used to monitor health during a rolling upgrade. The values are - * UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: - * 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' + * @summary Get the Service Fabric standalone cluster configuration. * - * @param {boolean} - * [updateClusterUpgradeDescription.updateDescription.forceRestart] If true, - * then processes are forcefully restarted during upgrade even when the code - * version has not changed (the upgrade only changes configuration or data). + * The cluster configuration contains properties of the cluster that include + * different node types on the cluster, + * security configurations, fault, and upgrade domain topologies, etc. * - * @param {number} - * [updateClusterUpgradeDescription.updateDescription.replicaSetCheckTimeoutInMilliseconds] - * The maximum amount of time to block processing of an upgrade domain and - * prevent loss of availability when there are unexpected issues. When this - * timeout expires, processing of the upgrade domain will proceed regardless of - * availability loss issues. The timeout is reset at the start of each upgrade - * domain. Valid values are between 0 and 42949672925 inclusive. (unsigned - * 32-bit integer). + * @param {string} configurationApiVersion The API version of the Standalone + * cluster json configuration. * - * @param {string} - * [updateClusterUpgradeDescription.updateDescription.failureAction] The - * compensating action to perform when a Monitored upgrade encounters - * monitoring policy or health policy violations. - * Invalid indicates the failure action is invalid. Rollback specifies that the - * upgrade will start rolling back automatically. - * Manual indicates that the upgrade will switch to UnmonitoredManual upgrade - * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' + * @param {object} [options] Optional Parameters. * - * @param {string} - * [updateClusterUpgradeDescription.updateDescription.healthCheckWaitDurationInMilliseconds] - * The amount of time to wait after completing an upgrade domain before - * applying health policies. It is first interpreted as a string representing - * an ISO 8601 duration. If that fails, then it is interpreted as a number - * representing the total number of milliseconds. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {string} - * [updateClusterUpgradeDescription.updateDescription.healthCheckStableDurationInMilliseconds] - * The amount of time that the application or cluster must remain healthy - * before the upgrade proceeds to the next upgrade domain. It is first - * interpreted as a string representing an ISO 8601 duration. If that fails, - * then it is interpreted as a number representing the total number of - * milliseconds. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} - * [updateClusterUpgradeDescription.updateDescription.healthCheckRetryTimeoutInMilliseconds] - * The amount of time to retry health evaluation when the application or - * cluster is unhealthy before FailureAction is executed. It is first - * interpreted as a string representing an ISO 8601 duration. If that fails, - * then it is interpreted as a number representing the total number of - * milliseconds. + * @param {function} [optionalCallback] - The optional callback. * - * @param {string} - * [updateClusterUpgradeDescription.updateDescription.upgradeTimeoutInMilliseconds] - * The amount of time the overall upgrade has to complete before FailureAction - * is executed. It is first interpreted as a string representing an ISO 8601 - * duration. If that fails, then it is interpreted as a number representing the - * total number of milliseconds. + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. * - * @param {string} - * [updateClusterUpgradeDescription.updateDescription.upgradeDomainTimeoutInMilliseconds] - * The amount of time each upgrade domain has to complete before FailureAction - * is executed. It is first interpreted as a string representing an ISO 8601 - * duration. If that fails, then it is interpreted as a number representing the - * total number of milliseconds. + * {Promise} A promise is returned * - * @param {object} [updateClusterUpgradeDescription.clusterHealthPolicy] - * Defines a health policy used to evaluate the health of the cluster or of a - * cluster node. + * @resolve {ClusterConfiguration} - The deserialized result object. * - * @param {boolean} - * [updateClusterUpgradeDescription.clusterHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. + * @reject {Error} - The error object. * - * @param {number} - * [updateClusterUpgradeDescription.clusterHealthPolicy.maxPercentUnhealthyNodes] - * The maximum allowed percentage of unhealthy nodes before reporting an error. - * For example, to allow 10% of nodes to be unhealthy, this value would be 10. + * {function} optionalCallback(err, result, request, response) * - * The percentage represents the maximum tolerated percentage of nodes that can - * be unhealthy before the cluster is considered in error. - * If the percentage is respected but there is at least one unhealthy node, the - * health is evaluated as Warning. - * The percentage is calculated by dividing the number of unhealthy nodes over - * the total number of nodes in the cluster. - * The computation rounds up to tolerate one failure on small numbers of nodes. - * Default percentage is zero. + * {Error} err - The Error object if an error occurred, null otherwise. * - * In large clusters, some nodes will always be down or out for repairs, so - * this percentage should be configured to tolerate that. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ClusterConfiguration} for more information. * - * @param {number} - * [updateClusterUpgradeDescription.clusterHealthPolicy.maxPercentUnhealthyApplications] - * The maximum allowed percentage of unhealthy applications before reporting an - * error. For example, to allow 10% of applications to be unhealthy, this value - * would be 10. + * {object} [request] - The HTTP Request object if an error did not occur. * - * The percentage represents the maximum tolerated percentage of applications - * that can be unhealthy before the cluster is considered in error. - * If the percentage is respected but there is at least one unhealthy - * application, the health is evaluated as Warning. - * This is calculated by dividing the number of unhealthy applications over the - * total number of application instances in the cluster, excluding applications - * of application types that are included in the - * ApplicationTypeHealthPolicyMap. - * The computation rounds up to tolerate one failure on small numbers of - * applications. Default percentage is zero. + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getClusterConfiguration(configurationApiVersion, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getClusterConfiguration(configurationApiVersion, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getClusterConfiguration(configurationApiVersion, options, optionalCallback); + } + } + + /** + * @summary Get the cluster configuration upgrade status of a Service Fabric + * standalone cluster. * - * @param {array} - * [updateClusterUpgradeDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] - * Defines a map with max percentage unhealthy applications for specific - * application types. - * Each entry specifies as key the application type name and as value an - * integer that represents the MaxPercentUnhealthyApplications percentage used - * to evaluate the applications of the specified application type. + * Get the cluster configuration upgrade status details of a Service Fabric + * standalone cluster. * - * The application type health policy map can be used during cluster health - * evaluation to describe special application types. - * The application types included in the map are evaluated against the - * percentage specified in the map, and not with the global - * MaxPercentUnhealthyApplications defined in the cluster health policy. - * The applications of application types specified in the map are not counted - * against the global pool of applications. - * For example, if some applications of a type are critical, the cluster - * administrator can add an entry to the map for that application type - * and assign it a value of 0% (that is, do not tolerate any failures). - * All other applications can be evaluated with MaxPercentUnhealthyApplications - * set to 20% to tolerate some failures out of the thousands of application - * instances. - * The application type health policy map is used only if the cluster manifest - * enables application type health evaluation using the configuration entry for - * HealthManager/EnableApplicationTypeHealthEvaluation. + * @param {object} [options] Optional Parameters. * - * @param {boolean} - * [updateClusterUpgradeDescription.enableDeltaHealthEvaluation] When true, - * enables delta health evaluation rather than absolute health evaluation after - * completion of each upgrade domain. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {object} [updateClusterUpgradeDescription.clusterUpgradeHealthPolicy] - * Defines a health policy used to evaluate the health of the cluster during a - * cluster upgrade. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {number} - * [updateClusterUpgradeDescription.clusterUpgradeHealthPolicy.maxPercentDeltaUnhealthyNodes] - * The maximum allowed percentage of nodes health degradation allowed during - * cluster upgrades. The delta is measured between the state of the nodes at - * the beginning of upgrade and the state of the nodes at the time of the - * health evaluation. The check is performed after every upgrade domain upgrade - * completion to make sure the global state of the cluster is within tolerated - * limits. The default value is 10%. + * @returns {Promise} A promise is returned * - * @param {number} - * [updateClusterUpgradeDescription.clusterUpgradeHealthPolicy.maxPercentUpgradeDomainDeltaUnhealthyNodes] - * The maximum allowed percentage of upgrade domain nodes health degradation - * allowed during cluster upgrades. The delta is measured between the state of - * the upgrade domain nodes at the beginning of upgrade and the state of the - * upgrade domain nodes at the time of the health evaluation. The check is - * performed after every upgrade domain upgrade completion for all completed - * upgrade domains to make sure the state of the upgrade domains is within - * tolerated limits. The default value is 15%. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {object} [updateClusterUpgradeDescription.applicationHealthPolicyMap] - * Defines the application health policy map used to evaluate the health of an - * application or one of its children entities. + * @reject {Error} - The error object. + */ + getClusterConfigurationUpgradeStatusWithHttpOperationResponse(options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getClusterConfigurationUpgradeStatus(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Get the cluster configuration upgrade status of a Service Fabric + * standalone cluster. * - * @param {array} - * [updateClusterUpgradeDescription.applicationHealthPolicyMap.applicationHealthPolicyMap] - * The wrapper that contains the map with application health policies used to - * evaluate specific applications in the cluster. + * Get the cluster configuration upgrade status details of a Service Fabric + * standalone cluster. * * @param {object} [options] Optional Parameters. * @@ -41883,7 +39174,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {ClusterConfigurationUpgradeStatusInfo} - The deserialized result object. * * @reject {Error} - The error object. * @@ -41891,13 +39182,15 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ClusterConfigurationUpgradeStatusInfo} for + * more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - updateClusterUpgrade(updateClusterUpgradeDescription, options, optionalCallback) { + getClusterConfigurationUpgradeStatus(options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -41906,26 +39199,23 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._updateClusterUpgrade(updateClusterUpgradeDescription, options, (err, result, request, response) => { + self._getClusterConfigurationUpgradeStatus(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._updateClusterUpgrade(updateClusterUpgradeDescription, options, optionalCallback); + return self._getClusterConfigurationUpgradeStatus(options, optionalCallback); } } /** - * @summary Gets the Azure Active Directory metadata used for secured - * connection to cluster. + * @summary Get the service state of Service Fabric Upgrade Orchestration + * Service. * - * Gets the Azure Active Directory metadata used for secured connection to - * cluster. - * This API is not supposed to be called separately. It provides information - * needed to set up an Azure Active Directory secured connection with a Service - * Fabric cluster. + * Get the service state of Service Fabric Upgrade Orchestration Service. This + * API is internally used for support purposes. * * @param {object} [options] Optional Parameters. * @@ -41939,15 +39229,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getAadMetadataWithHttpOperationResponse(options) { + getUpgradeOrchestrationServiceStateWithHttpOperationResponse(options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getAadMetadata(options, (err, result, request, response) => { + self._getUpgradeOrchestrationServiceState(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -41958,14 +39248,11 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the Azure Active Directory metadata used for secured - * connection to cluster. + * @summary Get the service state of Service Fabric Upgrade Orchestration + * Service. * - * Gets the Azure Active Directory metadata used for secured connection to - * cluster. - * This API is not supposed to be called separately. It provides information - * needed to set up an Azure Active Directory secured connection with a Service - * Fabric cluster. + * Get the service state of Service Fabric Upgrade Orchestration Service. This + * API is internally used for support purposes. * * @param {object} [options] Optional Parameters. * @@ -41984,7 +39271,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {AadMetadataObject} - The deserialized result object. + * @resolve {UpgradeOrchestrationServiceState} - The deserialized result object. * * @reject {Error} - The error object. * @@ -41993,13 +39280,14 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link AadMetadataObject} for more information. + * See {@link UpgradeOrchestrationServiceState} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getAadMetadata(options, optionalCallback) { + getUpgradeOrchestrationServiceState(options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -42008,46 +39296,31 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getAadMetadata(options, (err, result, request, response) => { + self._getUpgradeOrchestrationServiceState(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getAadMetadata(options, optionalCallback); + return self._getUpgradeOrchestrationServiceState(options, optionalCallback); } } /** - * @summary Gets the list of nodes in the Service Fabric cluster. - * - * The response includes the name, status, ID, health, uptime, and other - * details about the nodes. + * @summary Update the service state of Service Fabric Upgrade Orchestration + * Service. * - * @param {object} [options] Optional Parameters. + * Update the service state of Service Fabric Upgrade Orchestration Service. + * This API is internally used for support purposes. * - * @param {string} [options.continuationToken] The continuation token parameter - * is used to obtain next set of results. A continuation token with a non-empty - * value is included in the response of the API when the results from the - * system do not fit in a single response. When this value is passed to the - * next API call, the API returns next set of results. If there are no further - * results, then the continuation token does not contain a value. The value of - * this parameter should not be URL encoded. + * @param {object} upgradeOrchestrationServiceState Service state of Service + * Fabric Upgrade Orchestration Service. * - * @param {string} [options.nodeStatusFilter] Allows filtering the nodes based - * on the NodeStatus. Only the nodes that are matching the specified filter - * value will be returned. The filter value can be one of the following. - * Possible values include: 'default', 'all', 'up', 'down', 'enabling', - * 'disabling', 'disabled', 'unknown', 'removed' + * @param {string} [upgradeOrchestrationServiceState.serviceState] The state of + * Service Fabric Upgrade Orchestration Service. * - * @param {number} [options.maxResults] The maximum number of results to be - * returned as part of the paged queries. This parameter defines the upper - * bound on the number of results returned. The results returned can be less - * than the specified maximum results if they do not fit in the message as per - * the max message size restrictions defined in the configuration. If this - * parameter is zero or not specified, the paged query includes as many results - * as possible that fit in the return message. + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -42059,15 +39332,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getNodeInfoListWithHttpOperationResponse(options) { + setUpgradeOrchestrationServiceStateWithHttpOperationResponse(upgradeOrchestrationServiceState, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getNodeInfoList(options, (err, result, request, response) => { + self._setUpgradeOrchestrationServiceState(upgradeOrchestrationServiceState, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -42078,34 +39351,19 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the list of nodes in the Service Fabric cluster. - * - * The response includes the name, status, ID, health, uptime, and other - * details about the nodes. + * @summary Update the service state of Service Fabric Upgrade Orchestration + * Service. * - * @param {object} [options] Optional Parameters. + * Update the service state of Service Fabric Upgrade Orchestration Service. + * This API is internally used for support purposes. * - * @param {string} [options.continuationToken] The continuation token parameter - * is used to obtain next set of results. A continuation token with a non-empty - * value is included in the response of the API when the results from the - * system do not fit in a single response. When this value is passed to the - * next API call, the API returns next set of results. If there are no further - * results, then the continuation token does not contain a value. The value of - * this parameter should not be URL encoded. + * @param {object} upgradeOrchestrationServiceState Service state of Service + * Fabric Upgrade Orchestration Service. * - * @param {string} [options.nodeStatusFilter] Allows filtering the nodes based - * on the NodeStatus. Only the nodes that are matching the specified filter - * value will be returned. The filter value can be one of the following. - * Possible values include: 'default', 'all', 'up', 'down', 'enabling', - * 'disabling', 'disabled', 'unknown', 'removed' + * @param {string} [upgradeOrchestrationServiceState.serviceState] The state of + * Service Fabric Upgrade Orchestration Service. * - * @param {number} [options.maxResults] The maximum number of results to be - * returned as part of the paged queries. This parameter defines the upper - * bound on the number of results returned. The results returned can be less - * than the specified maximum results if they do not fit in the message as per - * the max message size restrictions defined in the configuration. If this - * parameter is zero or not specified, the paged query includes as many results - * as possible that fit in the return message. + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -42122,7 +39380,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {PagedNodeInfoList} - The deserialized result object. + * @resolve {UpgradeOrchestrationServiceStateSummary} - The deserialized result object. * * @reject {Error} - The error object. * @@ -42131,13 +39389,14 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PagedNodeInfoList} for more information. + * See {@link UpgradeOrchestrationServiceStateSummary} for + * more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getNodeInfoList(options, optionalCallback) { + setUpgradeOrchestrationServiceState(upgradeOrchestrationServiceState, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -42146,25 +39405,32 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getNodeInfoList(options, (err, result, request, response) => { + self._setUpgradeOrchestrationServiceState(upgradeOrchestrationServiceState, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getNodeInfoList(options, optionalCallback); + return self._setUpgradeOrchestrationServiceState(upgradeOrchestrationServiceState, options, optionalCallback); } } /** - * @summary Gets the information about a specific node in the Service Fabric + * @summary Provision the code or configuration packages of a Service Fabric * cluster. * - * The response includes the name, status, ID, health, uptime, and other - * details about the node. + * Validate and provision the code or configuration packages of a Service + * Fabric cluster. * - * @param {string} nodeName The name of the node. + * @param {object} provisionFabricDescription Describes the parameters for + * provisioning a cluster. + * + * @param {string} [provisionFabricDescription.codeFilePath] The cluster code + * package file path. + * + * @param {string} [provisionFabricDescription.clusterManifestFilePath] The + * cluster manifest file path. * * @param {object} [options] Optional Parameters. * @@ -42178,15 +39444,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getNodeInfoWithHttpOperationResponse(nodeName, options) { + provisionClusterWithHttpOperationResponse(provisionFabricDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getNodeInfo(nodeName, options, (err, result, request, response) => { + self._provisionCluster(provisionFabricDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -42197,13 +39463,20 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the information about a specific node in the Service Fabric + * @summary Provision the code or configuration packages of a Service Fabric * cluster. * - * The response includes the name, status, ID, health, uptime, and other - * details about the node. + * Validate and provision the code or configuration packages of a Service + * Fabric cluster. + * + * @param {object} provisionFabricDescription Describes the parameters for + * provisioning a cluster. * - * @param {string} nodeName The name of the node. + * @param {string} [provisionFabricDescription.codeFilePath] The cluster code + * package file path. + * + * @param {string} [provisionFabricDescription.clusterManifestFilePath] The + * cluster manifest file path. * * @param {object} [options] Optional Parameters. * @@ -42222,7 +39495,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {NodeInfo} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -42230,14 +39503,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link NodeInfo} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getNodeInfo(nodeName, options, optionalCallback) { + provisionCluster(provisionFabricDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -42246,51 +39518,33 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getNodeInfo(nodeName, options, (err, result, request, response) => { + self._provisionCluster(provisionFabricDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getNodeInfo(nodeName, options, optionalCallback); + return self._provisionCluster(provisionFabricDescription, options, optionalCallback); } } /** - * @summary Gets the health of a Service Fabric node. + * @summary Unprovision the code or configuration packages of a Service Fabric + * cluster. * - * Gets the health of a Service Fabric node. Use EventsHealthStateFilter to - * filter the collection of health events reported on the node based on the - * health state. If the node that you specify by name does not exist in the - * health store, this returns an error. + * It is supported to unprovision code and configuration separately. * - * @param {string} nodeName The name of the node. + * @param {object} unprovisionFabricDescription Describes the parameters for + * unprovisioning a cluster. * - * @param {object} [options] Optional Parameters. + * @param {string} [unprovisionFabricDescription.codeVersion] The cluster code + * package version. * - * @param {number} [options.eventsHealthStateFilter] Allows filtering the - * collection of HealthEvent objects returned based on health state. - * The possible values for this parameter include integer value of one of the - * following health states. - * Only events that match the filter are returned. All events are used to - * evaluate the aggregated health state. - * If not specified, all entries are returned. The state values are flag-based - * enumeration, so the value could be a combination of these values, obtained - * using the bitwise 'OR' operator. For example, If the provided value is 6 - * then all of the events with HealthState value of OK (2) and Warning (4) are - * returned. + * @param {string} [unprovisionFabricDescription.configVersion] The cluster + * manifest version. * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -42302,15 +39556,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getNodeHealthWithHttpOperationResponse(nodeName, options) { + unprovisionClusterWithHttpOperationResponse(unprovisionFabricDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getNodeHealth(nodeName, options, (err, result, request, response) => { + self._unprovisionCluster(unprovisionFabricDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -42321,39 +39575,21 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the health of a Service Fabric node. + * @summary Unprovision the code or configuration packages of a Service Fabric + * cluster. * - * Gets the health of a Service Fabric node. Use EventsHealthStateFilter to - * filter the collection of health events reported on the node based on the - * health state. If the node that you specify by name does not exist in the - * health store, this returns an error. + * It is supported to unprovision code and configuration separately. * - * @param {string} nodeName The name of the node. + * @param {object} unprovisionFabricDescription Describes the parameters for + * unprovisioning a cluster. * - * @param {object} [options] Optional Parameters. + * @param {string} [unprovisionFabricDescription.codeVersion] The cluster code + * package version. * - * @param {number} [options.eventsHealthStateFilter] Allows filtering the - * collection of HealthEvent objects returned based on health state. - * The possible values for this parameter include integer value of one of the - * following health states. - * Only events that match the filter are returned. All events are used to - * evaluate the aggregated health state. - * If not specified, all entries are returned. The state values are flag-based - * enumeration, so the value could be a combination of these values, obtained - * using the bitwise 'OR' operator. For example, If the provided value is 6 - * then all of the events with HealthState value of OK (2) and Warning (4) are - * returned. + * @param {string} [unprovisionFabricDescription.configVersion] The cluster + * manifest version. * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -42370,7 +39606,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {NodeHealth} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -42378,14 +39614,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link NodeHealth} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getNodeHealth(nodeName, options, optionalCallback) { + unprovisionCluster(unprovisionFabricDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -42394,119 +39629,24 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getNodeHealth(nodeName, options, (err, result, request, response) => { + self._unprovisionCluster(unprovisionFabricDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getNodeHealth(nodeName, options, optionalCallback); + return self._unprovisionCluster(unprovisionFabricDescription, options, optionalCallback); } } /** - * @summary Gets the health of a Service Fabric node, by using the specified - * health policy. - * - * Gets the health of a Service Fabric node. Use EventsHealthStateFilter to - * filter the collection of health events reported on the node based on the - * health state. Use ClusterHealthPolicy in the POST body to override the - * health policies used to evaluate the health. If the node that you specify by - * name does not exist in the health store, this returns an error. + * @summary Roll back the upgrade of a Service Fabric cluster. * - * @param {string} nodeName The name of the node. + * Roll back the code or configuration upgrade of a Service Fabric cluster. * * @param {object} [options] Optional Parameters. * - * @param {number} [options.eventsHealthStateFilter] Allows filtering the - * collection of HealthEvent objects returned based on health state. - * The possible values for this parameter include integer value of one of the - * following health states. - * Only events that match the filter are returned. All events are used to - * evaluate the aggregated health state. - * If not specified, all entries are returned. The state values are flag-based - * enumeration, so the value could be a combination of these values, obtained - * using the bitwise 'OR' operator. For example, If the provided value is 6 - * then all of the events with HealthState value of OK (2) and Warning (4) are - * returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. - * - * @param {object} [options.clusterHealthPolicy] Describes the health policies - * used to evaluate the health of a cluster or node. If not present, the health - * evaluation uses the health policy from cluster manifest or the default - * health policy. - * - * @param {boolean} [options.clusterHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. - * - * @param {number} [options.clusterHealthPolicy.maxPercentUnhealthyNodes] The - * maximum allowed percentage of unhealthy nodes before reporting an error. For - * example, to allow 10% of nodes to be unhealthy, this value would be 10. - * - * The percentage represents the maximum tolerated percentage of nodes that can - * be unhealthy before the cluster is considered in error. - * If the percentage is respected but there is at least one unhealthy node, the - * health is evaluated as Warning. - * The percentage is calculated by dividing the number of unhealthy nodes over - * the total number of nodes in the cluster. - * The computation rounds up to tolerate one failure on small numbers of nodes. - * Default percentage is zero. - * - * In large clusters, some nodes will always be down or out for repairs, so - * this percentage should be configured to tolerate that. - * - * @param {number} - * [options.clusterHealthPolicy.maxPercentUnhealthyApplications] The maximum - * allowed percentage of unhealthy applications before reporting an error. For - * example, to allow 10% of applications to be unhealthy, this value would be - * 10. - * - * The percentage represents the maximum tolerated percentage of applications - * that can be unhealthy before the cluster is considered in error. - * If the percentage is respected but there is at least one unhealthy - * application, the health is evaluated as Warning. - * This is calculated by dividing the number of unhealthy applications over the - * total number of application instances in the cluster, excluding applications - * of application types that are included in the - * ApplicationTypeHealthPolicyMap. - * The computation rounds up to tolerate one failure on small numbers of - * applications. Default percentage is zero. - * - * @param {array} [options.clusterHealthPolicy.applicationTypeHealthPolicyMap] - * Defines a map with max percentage unhealthy applications for specific - * application types. - * Each entry specifies as key the application type name and as value an - * integer that represents the MaxPercentUnhealthyApplications percentage used - * to evaluate the applications of the specified application type. - * - * The application type health policy map can be used during cluster health - * evaluation to describe special application types. - * The application types included in the map are evaluated against the - * percentage specified in the map, and not with the global - * MaxPercentUnhealthyApplications defined in the cluster health policy. - * The applications of application types specified in the map are not counted - * against the global pool of applications. - * For example, if some applications of a type are critical, the cluster - * administrator can add an entry to the map for that application type - * and assign it a value of 0% (that is, do not tolerate any failures). - * All other applications can be evaluated with MaxPercentUnhealthyApplications - * set to 20% to tolerate some failures out of the thousands of application - * instances. - * The application type health policy map is used only if the cluster manifest - * enables application type health evaluation using the configuration entry for - * HealthManager/EnableApplicationTypeHealthEvaluation. - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -42517,15 +39657,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getNodeHealthUsingPolicyWithHttpOperationResponse(nodeName, options) { + rollbackClusterUpgradeWithHttpOperationResponse(options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getNodeHealthUsingPolicy(nodeName, options, (err, result, request, response) => { + self._rollbackClusterUpgrade(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -42536,107 +39676,12 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the health of a Service Fabric node, by using the specified - * health policy. - * - * Gets the health of a Service Fabric node. Use EventsHealthStateFilter to - * filter the collection of health events reported on the node based on the - * health state. Use ClusterHealthPolicy in the POST body to override the - * health policies used to evaluate the health. If the node that you specify by - * name does not exist in the health store, this returns an error. + * @summary Roll back the upgrade of a Service Fabric cluster. * - * @param {string} nodeName The name of the node. + * Roll back the code or configuration upgrade of a Service Fabric cluster. * * @param {object} [options] Optional Parameters. * - * @param {number} [options.eventsHealthStateFilter] Allows filtering the - * collection of HealthEvent objects returned based on health state. - * The possible values for this parameter include integer value of one of the - * following health states. - * Only events that match the filter are returned. All events are used to - * evaluate the aggregated health state. - * If not specified, all entries are returned. The state values are flag-based - * enumeration, so the value could be a combination of these values, obtained - * using the bitwise 'OR' operator. For example, If the provided value is 6 - * then all of the events with HealthState value of OK (2) and Warning (4) are - * returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. - * - * @param {object} [options.clusterHealthPolicy] Describes the health policies - * used to evaluate the health of a cluster or node. If not present, the health - * evaluation uses the health policy from cluster manifest or the default - * health policy. - * - * @param {boolean} [options.clusterHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. - * - * @param {number} [options.clusterHealthPolicy.maxPercentUnhealthyNodes] The - * maximum allowed percentage of unhealthy nodes before reporting an error. For - * example, to allow 10% of nodes to be unhealthy, this value would be 10. - * - * The percentage represents the maximum tolerated percentage of nodes that can - * be unhealthy before the cluster is considered in error. - * If the percentage is respected but there is at least one unhealthy node, the - * health is evaluated as Warning. - * The percentage is calculated by dividing the number of unhealthy nodes over - * the total number of nodes in the cluster. - * The computation rounds up to tolerate one failure on small numbers of nodes. - * Default percentage is zero. - * - * In large clusters, some nodes will always be down or out for repairs, so - * this percentage should be configured to tolerate that. - * - * @param {number} - * [options.clusterHealthPolicy.maxPercentUnhealthyApplications] The maximum - * allowed percentage of unhealthy applications before reporting an error. For - * example, to allow 10% of applications to be unhealthy, this value would be - * 10. - * - * The percentage represents the maximum tolerated percentage of applications - * that can be unhealthy before the cluster is considered in error. - * If the percentage is respected but there is at least one unhealthy - * application, the health is evaluated as Warning. - * This is calculated by dividing the number of unhealthy applications over the - * total number of application instances in the cluster, excluding applications - * of application types that are included in the - * ApplicationTypeHealthPolicyMap. - * The computation rounds up to tolerate one failure on small numbers of - * applications. Default percentage is zero. - * - * @param {array} [options.clusterHealthPolicy.applicationTypeHealthPolicyMap] - * Defines a map with max percentage unhealthy applications for specific - * application types. - * Each entry specifies as key the application type name and as value an - * integer that represents the MaxPercentUnhealthyApplications percentage used - * to evaluate the applications of the specified application type. - * - * The application type health policy map can be used during cluster health - * evaluation to describe special application types. - * The application types included in the map are evaluated against the - * percentage specified in the map, and not with the global - * MaxPercentUnhealthyApplications defined in the cluster health policy. - * The applications of application types specified in the map are not counted - * against the global pool of applications. - * For example, if some applications of a type are critical, the cluster - * administrator can add an entry to the map for that application type - * and assign it a value of 0% (that is, do not tolerate any failures). - * All other applications can be evaluated with MaxPercentUnhealthyApplications - * set to 20% to tolerate some failures out of the thousands of application - * instances. - * The application type health policy map is used only if the cluster manifest - * enables application type health evaluation using the configuration entry for - * HealthManager/EnableApplicationTypeHealthEvaluation. - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -42652,7 +39697,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {NodeHealth} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -42660,14 +39705,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link NodeHealth} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getNodeHealthUsingPolicy(nodeName, options, optionalCallback) { + rollbackClusterUpgrade(options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -42676,125 +39720,31 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getNodeHealthUsingPolicy(nodeName, options, (err, result, request, response) => { + self._rollbackClusterUpgrade(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getNodeHealthUsingPolicy(nodeName, options, optionalCallback); + return self._rollbackClusterUpgrade(options, optionalCallback); } } /** - * @summary Sends a health report on the Service Fabric node. - * - * Reports health state of the specified Service Fabric node. The report must - * contain the information about the source of the health report and property - * on which it is reported. - * The report is sent to a Service Fabric gateway node, which forwards to the - * health store. - * The report may be accepted by the gateway, but rejected by the health store - * after extra validation. - * For example, the health store may reject the report because of an invalid - * parameter, like a stale sequence number. - * To see whether the report was applied in the health store, run GetNodeHealth - * and check that the report appears in the HealthEvents section. - * - * @param {string} nodeName The name of the node. - * - * @param {object} healthInformation Describes the health information for the - * health report. This information needs to be present in all of the health - * reports sent to the health manager. - * - * @param {string} healthInformation.sourceId The source name that identifies - * the client/watchdog/system component that generated the health information. - * - * @param {string} healthInformation.property The property of the health - * information. An entity can have health reports for different properties. - * The property is a string and not a fixed enumeration to allow the reporter - * flexibility to categorize the state condition that triggers the report. - * For example, a reporter with SourceId "LocalWatchdog" can monitor the state - * of the available disk on a node, - * so it can report "AvailableDisk" property on that node. - * The same reporter can monitor the node connectivity, so it can report a - * property "Connectivity" on the same node. - * In the health store, these reports are treated as separate health events for - * the specified node. - * - * Together with the SourceId, the property uniquely identifies the health - * information. - * - * @param {string} healthInformation.healthState The health state of a Service - * Fabric entity such as Cluster, Node, Application, Service, Partition, - * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - * 'Unknown' - * - * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field uses ISO8601 - * format for specifying the duration. - * When clients report periodically, they should send reports with higher - * frequency than time to live. - * If clients report on transition, they can set the time to live to infinite. - * When time to live expires, the health event that contains the health - * information - * is either removed from health store, if RemoveWhenExpired is true, or - * evaluated at error, if RemoveWhenExpired false. - * - * If not specified, time to live defaults to infinite value. + * @summary Make the cluster upgrade move on to the next upgrade domain. * - * @param {string} [healthInformation.description] The description of the - * health information. It represents free text used to add human readable - * information about the report. - * The maximum string length for the description is 4096 characters. - * If the provided string is longer, it will be automatically truncated. - * When truncated, the last characters of the description contain a marker - * "[Truncated]", and total string size is 4096 characters. - * The presence of the marker indicates to users that truncation occurred. - * Note that when truncated, the description has less than 4096 characters from - * the original string. + * Make the cluster code or configuration upgrade move on to the next upgrade + * domain if appropriate. * - * @param {string} [healthInformation.sequenceNumber] The sequence number for - * this health report as a numeric string. - * The report sequence number is used by the health store to detect stale - * reports. - * If not specified, a sequence number is auto-generated by the health client - * when a report is added. + * @param {object} resumeClusterUpgradeDescription Describes the parameters for + * resuming a cluster upgrade. * - * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates - * whether the report is removed from health store when it expires. - * If set to true, the report is removed from the health store after it - * expires. - * If set to false, the report is treated as an error when expired. The value - * of this property is false by default. - * When clients report periodically, they should set RemoveWhenExpired false - * (default). - * This way, is the reporter has issues (eg. deadlock) and can't report, the - * entity is evaluated at error when the health report expires. - * This flags the entity as being in Error health state. + * @param {string} resumeClusterUpgradeDescription.upgradeDomain The next + * upgrade domain for this cluster upgrade. * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.immediate] A flag that indicates whether the - * report should be sent immediately. - * A health report is sent to a Service Fabric gateway Application, which - * forwards to the health store. - * If Immediate is set to true, the report is sent immediately from HTTP - * Gateway to the health store, regardless of the fabric client settings that - * the HTTP Gateway Application is using. - * This is useful for critical reports that should be sent as soon as possible. - * Depending on timing and other conditions, sending the report may still fail, - * for example if the HTTP Gateway is closed or the message doesn't reach the - * Gateway. - * If Immediate is set to false, the report is sent based on the health client - * settings from the HTTP Gateway. Therefore, it will be batched according to - * the HealthReportSendInterval configuration. - * This is the recommended setting because it allows the health client to - * optimize health reporting messages to health store as well as health report - * processing. - * By default, reports are not sent immediately. - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -42809,11 +39759,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - reportNodeHealthWithHttpOperationResponse(nodeName, healthInformation, options) { + resumeClusterUpgradeWithHttpOperationResponse(resumeClusterUpgradeDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._reportNodeHealth(nodeName, healthInformation, options, (err, result, request, response) => { + self._resumeClusterUpgrade(resumeClusterUpgradeDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -42824,112 +39774,18 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Sends a health report on the Service Fabric node. - * - * Reports health state of the specified Service Fabric node. The report must - * contain the information about the source of the health report and property - * on which it is reported. - * The report is sent to a Service Fabric gateway node, which forwards to the - * health store. - * The report may be accepted by the gateway, but rejected by the health store - * after extra validation. - * For example, the health store may reject the report because of an invalid - * parameter, like a stale sequence number. - * To see whether the report was applied in the health store, run GetNodeHealth - * and check that the report appears in the HealthEvents section. - * - * @param {string} nodeName The name of the node. - * - * @param {object} healthInformation Describes the health information for the - * health report. This information needs to be present in all of the health - * reports sent to the health manager. - * - * @param {string} healthInformation.sourceId The source name that identifies - * the client/watchdog/system component that generated the health information. - * - * @param {string} healthInformation.property The property of the health - * information. An entity can have health reports for different properties. - * The property is a string and not a fixed enumeration to allow the reporter - * flexibility to categorize the state condition that triggers the report. - * For example, a reporter with SourceId "LocalWatchdog" can monitor the state - * of the available disk on a node, - * so it can report "AvailableDisk" property on that node. - * The same reporter can monitor the node connectivity, so it can report a - * property "Connectivity" on the same node. - * In the health store, these reports are treated as separate health events for - * the specified node. - * - * Together with the SourceId, the property uniquely identifies the health - * information. - * - * @param {string} healthInformation.healthState The health state of a Service - * Fabric entity such as Cluster, Node, Application, Service, Partition, - * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - * 'Unknown' - * - * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field uses ISO8601 - * format for specifying the duration. - * When clients report periodically, they should send reports with higher - * frequency than time to live. - * If clients report on transition, they can set the time to live to infinite. - * When time to live expires, the health event that contains the health - * information - * is either removed from health store, if RemoveWhenExpired is true, or - * evaluated at error, if RemoveWhenExpired false. - * - * If not specified, time to live defaults to infinite value. - * - * @param {string} [healthInformation.description] The description of the - * health information. It represents free text used to add human readable - * information about the report. - * The maximum string length for the description is 4096 characters. - * If the provided string is longer, it will be automatically truncated. - * When truncated, the last characters of the description contain a marker - * "[Truncated]", and total string size is 4096 characters. - * The presence of the marker indicates to users that truncation occurred. - * Note that when truncated, the description has less than 4096 characters from - * the original string. - * - * @param {string} [healthInformation.sequenceNumber] The sequence number for - * this health report as a numeric string. - * The report sequence number is used by the health store to detect stale - * reports. - * If not specified, a sequence number is auto-generated by the health client - * when a report is added. + * @summary Make the cluster upgrade move on to the next upgrade domain. * - * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates - * whether the report is removed from health store when it expires. - * If set to true, the report is removed from the health store after it - * expires. - * If set to false, the report is treated as an error when expired. The value - * of this property is false by default. - * When clients report periodically, they should set RemoveWhenExpired false - * (default). - * This way, is the reporter has issues (eg. deadlock) and can't report, the - * entity is evaluated at error when the health report expires. - * This flags the entity as being in Error health state. + * Make the cluster code or configuration upgrade move on to the next upgrade + * domain if appropriate. * - * @param {object} [options] Optional Parameters. + * @param {object} resumeClusterUpgradeDescription Describes the parameters for + * resuming a cluster upgrade. * - * @param {boolean} [options.immediate] A flag that indicates whether the - * report should be sent immediately. - * A health report is sent to a Service Fabric gateway Application, which - * forwards to the health store. - * If Immediate is set to true, the report is sent immediately from HTTP - * Gateway to the health store, regardless of the fabric client settings that - * the HTTP Gateway Application is using. - * This is useful for critical reports that should be sent as soon as possible. - * Depending on timing and other conditions, sending the report may still fail, - * for example if the HTTP Gateway is closed or the message doesn't reach the - * Gateway. - * If Immediate is set to false, the report is sent based on the health client - * settings from the HTTP Gateway. Therefore, it will be batched according to - * the HealthReportSendInterval configuration. - * This is the recommended setting because it allows the health client to - * optimize health reporting messages to health store as well as health report - * processing. - * By default, reports are not sent immediately. + * @param {string} resumeClusterUpgradeDescription.upgradeDomain The next + * upgrade domain for this cluster upgrade. + * + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -42960,7 +39816,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - reportNodeHealth(nodeName, healthInformation, options, optionalCallback) { + resumeClusterUpgrade(resumeClusterUpgradeDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -42969,24 +39825,208 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._reportNodeHealth(nodeName, healthInformation, options, (err, result, request, response) => { + self._resumeClusterUpgrade(resumeClusterUpgradeDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._reportNodeHealth(nodeName, healthInformation, options, optionalCallback); + return self._resumeClusterUpgrade(resumeClusterUpgradeDescription, options, optionalCallback); } } /** - * @summary Gets the load information of a Service Fabric node. + * @summary Start upgrading the code or configuration version of a Service + * Fabric cluster. * - * Retrieves the load information of a Service Fabric node for all the metrics - * that have load or capacity defined. + * Validate the supplied upgrade parameters and start upgrading the code or + * configuration version of a Service Fabric cluster if the parameters are + * valid. * - * @param {string} nodeName The name of the node. + * @param {object} startClusterUpgradeDescription Describes the parameters for + * starting a cluster upgrade. + * + * @param {string} [startClusterUpgradeDescription.codeVersion] The cluster + * code version. + * + * @param {string} [startClusterUpgradeDescription.configVersion] The cluster + * configuration version. + * + * @param {string} [startClusterUpgradeDescription.upgradeKind] The kind of + * upgrade out of the following possible values. Possible values include: + * 'Invalid', 'Rolling' + * + * @param {string} [startClusterUpgradeDescription.rollingUpgradeMode] The mode + * used to monitor health during a rolling upgrade. The values are + * UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: + * 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' + * + * @param {number} + * [startClusterUpgradeDescription.upgradeReplicaSetCheckTimeoutInSeconds] The + * maximum amount of time to block processing of an upgrade domain and prevent + * loss of availability when there are unexpected issues. When this timeout + * expires, processing of the upgrade domain will proceed regardless of + * availability loss issues. The timeout is reset at the start of each upgrade + * domain. Valid values are between 0 and 42949672925 inclusive. (unsigned + * 32-bit integer). + * + * @param {boolean} [startClusterUpgradeDescription.forceRestart] If true, then + * processes are forcefully restarted during upgrade even when the code version + * has not changed (the upgrade only changes configuration or data). + * + * @param {object} [startClusterUpgradeDescription.monitoringPolicy] Describes + * the parameters for monitoring an upgrade in Monitored mode. + * + * @param {string} + * [startClusterUpgradeDescription.monitoringPolicy.failureAction] The + * compensating action to perform when a Monitored upgrade encounters + * monitoring policy or health policy violations. + * Invalid indicates the failure action is invalid. Rollback specifies that the + * upgrade will start rolling back automatically. + * Manual indicates that the upgrade will switch to UnmonitoredManual upgrade + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' + * + * @param {string} + * [startClusterUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] + * The amount of time to wait after completing an upgrade domain before + * applying health policies. It is first interpreted as a string representing + * an ISO 8601 duration. If that fails, then it is interpreted as a number + * representing the total number of milliseconds. + * + * @param {string} + * [startClusterUpgradeDescription.monitoringPolicy.healthCheckStableDurationInMilliseconds] + * The amount of time that the application or cluster must remain healthy + * before the upgrade proceeds to the next upgrade domain. It is first + * interpreted as a string representing an ISO 8601 duration. If that fails, + * then it is interpreted as a number representing the total number of + * milliseconds. + * + * @param {string} + * [startClusterUpgradeDescription.monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] + * The amount of time to retry health evaluation when the application or + * cluster is unhealthy before FailureAction is executed. It is first + * interpreted as a string representing an ISO 8601 duration. If that fails, + * then it is interpreted as a number representing the total number of + * milliseconds. + * + * @param {string} + * [startClusterUpgradeDescription.monitoringPolicy.upgradeTimeoutInMilliseconds] + * The amount of time the overall upgrade has to complete before FailureAction + * is executed. It is first interpreted as a string representing an ISO 8601 + * duration. If that fails, then it is interpreted as a number representing the + * total number of milliseconds. + * + * @param {string} + * [startClusterUpgradeDescription.monitoringPolicy.upgradeDomainTimeoutInMilliseconds] + * The amount of time each upgrade domain has to complete before FailureAction + * is executed. It is first interpreted as a string representing an ISO 8601 + * duration. If that fails, then it is interpreted as a number representing the + * total number of milliseconds. + * + * @param {object} [startClusterUpgradeDescription.clusterHealthPolicy] Defines + * a health policy used to evaluate the health of the cluster or of a cluster + * node. + * + * @param {boolean} + * [startClusterUpgradeDescription.clusterHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. + * + * @param {number} + * [startClusterUpgradeDescription.clusterHealthPolicy.maxPercentUnhealthyNodes] + * The maximum allowed percentage of unhealthy nodes before reporting an error. + * For example, to allow 10% of nodes to be unhealthy, this value would be 10. + * + * The percentage represents the maximum tolerated percentage of nodes that can + * be unhealthy before the cluster is considered in error. + * If the percentage is respected but there is at least one unhealthy node, the + * health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy nodes over + * the total number of nodes in the cluster. + * The computation rounds up to tolerate one failure on small numbers of nodes. + * Default percentage is zero. + * + * In large clusters, some nodes will always be down or out for repairs, so + * this percentage should be configured to tolerate that. + * + * @param {number} + * [startClusterUpgradeDescription.clusterHealthPolicy.maxPercentUnhealthyApplications] + * The maximum allowed percentage of unhealthy applications before reporting an + * error. For example, to allow 10% of applications to be unhealthy, this value + * would be 10. + * + * The percentage represents the maximum tolerated percentage of applications + * that can be unhealthy before the cluster is considered in error. + * If the percentage is respected but there is at least one unhealthy + * application, the health is evaluated as Warning. + * This is calculated by dividing the number of unhealthy applications over the + * total number of application instances in the cluster, excluding applications + * of application types that are included in the + * ApplicationTypeHealthPolicyMap. + * The computation rounds up to tolerate one failure on small numbers of + * applications. Default percentage is zero. + * + * @param {array} + * [startClusterUpgradeDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * Defines a map with max percentage unhealthy applications for specific + * application types. + * Each entry specifies as key the application type name and as value an + * integer that represents the MaxPercentUnhealthyApplications percentage used + * to evaluate the applications of the specified application type. + * + * The application type health policy map can be used during cluster health + * evaluation to describe special application types. + * The application types included in the map are evaluated against the + * percentage specified in the map, and not with the global + * MaxPercentUnhealthyApplications defined in the cluster health policy. + * The applications of application types specified in the map are not counted + * against the global pool of applications. + * For example, if some applications of a type are critical, the cluster + * administrator can add an entry to the map for that application type + * and assign it a value of 0% (that is, do not tolerate any failures). + * All other applications can be evaluated with MaxPercentUnhealthyApplications + * set to 20% to tolerate some failures out of the thousands of application + * instances. + * The application type health policy map is used only if the cluster manifest + * enables application type health evaluation using the configuration entry for + * HealthManager/EnableApplicationTypeHealthEvaluation. + * + * @param {boolean} + * [startClusterUpgradeDescription.enableDeltaHealthEvaluation] When true, + * enables delta health evaluation rather than absolute health evaluation after + * completion of each upgrade domain. + * + * @param {object} [startClusterUpgradeDescription.clusterUpgradeHealthPolicy] + * Defines a health policy used to evaluate the health of the cluster during a + * cluster upgrade. + * + * @param {number} + * [startClusterUpgradeDescription.clusterUpgradeHealthPolicy.maxPercentDeltaUnhealthyNodes] + * The maximum allowed percentage of nodes health degradation allowed during + * cluster upgrades. The delta is measured between the state of the nodes at + * the beginning of upgrade and the state of the nodes at the time of the + * health evaluation. The check is performed after every upgrade domain upgrade + * completion to make sure the global state of the cluster is within tolerated + * limits. The default value is 10%. + * + * @param {number} + * [startClusterUpgradeDescription.clusterUpgradeHealthPolicy.maxPercentUpgradeDomainDeltaUnhealthyNodes] + * The maximum allowed percentage of upgrade domain nodes health degradation + * allowed during cluster upgrades. The delta is measured between the state of + * the upgrade domain nodes at the beginning of upgrade and the state of the + * upgrade domain nodes at the time of the health evaluation. The check is + * performed after every upgrade domain upgrade completion for all completed + * upgrade domains to make sure the state of the upgrade domains is within + * tolerated limits. The default value is 15%. + * + * @param {object} [startClusterUpgradeDescription.applicationHealthPolicyMap] + * Defines the application health policy map used to evaluate the health of an + * application or one of its children entities. + * + * @param {array} + * [startClusterUpgradeDescription.applicationHealthPolicyMap.applicationHealthPolicyMap] + * The wrapper that contains the map with application health policies used to + * evaluate specific applications in the cluster. * * @param {object} [options] Optional Parameters. * @@ -43000,15 +40040,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getNodeLoadInfoWithHttpOperationResponse(nodeName, options) { + startClusterUpgradeWithHttpOperationResponse(startClusterUpgradeDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getNodeLoadInfo(nodeName, options, (err, result, request, response) => { + self._startClusterUpgrade(startClusterUpgradeDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -43019,12 +40059,196 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the load information of a Service Fabric node. + * @summary Start upgrading the code or configuration version of a Service + * Fabric cluster. * - * Retrieves the load information of a Service Fabric node for all the metrics - * that have load or capacity defined. + * Validate the supplied upgrade parameters and start upgrading the code or + * configuration version of a Service Fabric cluster if the parameters are + * valid. * - * @param {string} nodeName The name of the node. + * @param {object} startClusterUpgradeDescription Describes the parameters for + * starting a cluster upgrade. + * + * @param {string} [startClusterUpgradeDescription.codeVersion] The cluster + * code version. + * + * @param {string} [startClusterUpgradeDescription.configVersion] The cluster + * configuration version. + * + * @param {string} [startClusterUpgradeDescription.upgradeKind] The kind of + * upgrade out of the following possible values. Possible values include: + * 'Invalid', 'Rolling' + * + * @param {string} [startClusterUpgradeDescription.rollingUpgradeMode] The mode + * used to monitor health during a rolling upgrade. The values are + * UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: + * 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' + * + * @param {number} + * [startClusterUpgradeDescription.upgradeReplicaSetCheckTimeoutInSeconds] The + * maximum amount of time to block processing of an upgrade domain and prevent + * loss of availability when there are unexpected issues. When this timeout + * expires, processing of the upgrade domain will proceed regardless of + * availability loss issues. The timeout is reset at the start of each upgrade + * domain. Valid values are between 0 and 42949672925 inclusive. (unsigned + * 32-bit integer). + * + * @param {boolean} [startClusterUpgradeDescription.forceRestart] If true, then + * processes are forcefully restarted during upgrade even when the code version + * has not changed (the upgrade only changes configuration or data). + * + * @param {object} [startClusterUpgradeDescription.monitoringPolicy] Describes + * the parameters for monitoring an upgrade in Monitored mode. + * + * @param {string} + * [startClusterUpgradeDescription.monitoringPolicy.failureAction] The + * compensating action to perform when a Monitored upgrade encounters + * monitoring policy or health policy violations. + * Invalid indicates the failure action is invalid. Rollback specifies that the + * upgrade will start rolling back automatically. + * Manual indicates that the upgrade will switch to UnmonitoredManual upgrade + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' + * + * @param {string} + * [startClusterUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] + * The amount of time to wait after completing an upgrade domain before + * applying health policies. It is first interpreted as a string representing + * an ISO 8601 duration. If that fails, then it is interpreted as a number + * representing the total number of milliseconds. + * + * @param {string} + * [startClusterUpgradeDescription.monitoringPolicy.healthCheckStableDurationInMilliseconds] + * The amount of time that the application or cluster must remain healthy + * before the upgrade proceeds to the next upgrade domain. It is first + * interpreted as a string representing an ISO 8601 duration. If that fails, + * then it is interpreted as a number representing the total number of + * milliseconds. + * + * @param {string} + * [startClusterUpgradeDescription.monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] + * The amount of time to retry health evaluation when the application or + * cluster is unhealthy before FailureAction is executed. It is first + * interpreted as a string representing an ISO 8601 duration. If that fails, + * then it is interpreted as a number representing the total number of + * milliseconds. + * + * @param {string} + * [startClusterUpgradeDescription.monitoringPolicy.upgradeTimeoutInMilliseconds] + * The amount of time the overall upgrade has to complete before FailureAction + * is executed. It is first interpreted as a string representing an ISO 8601 + * duration. If that fails, then it is interpreted as a number representing the + * total number of milliseconds. + * + * @param {string} + * [startClusterUpgradeDescription.monitoringPolicy.upgradeDomainTimeoutInMilliseconds] + * The amount of time each upgrade domain has to complete before FailureAction + * is executed. It is first interpreted as a string representing an ISO 8601 + * duration. If that fails, then it is interpreted as a number representing the + * total number of milliseconds. + * + * @param {object} [startClusterUpgradeDescription.clusterHealthPolicy] Defines + * a health policy used to evaluate the health of the cluster or of a cluster + * node. + * + * @param {boolean} + * [startClusterUpgradeDescription.clusterHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. + * + * @param {number} + * [startClusterUpgradeDescription.clusterHealthPolicy.maxPercentUnhealthyNodes] + * The maximum allowed percentage of unhealthy nodes before reporting an error. + * For example, to allow 10% of nodes to be unhealthy, this value would be 10. + * + * The percentage represents the maximum tolerated percentage of nodes that can + * be unhealthy before the cluster is considered in error. + * If the percentage is respected but there is at least one unhealthy node, the + * health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy nodes over + * the total number of nodes in the cluster. + * The computation rounds up to tolerate one failure on small numbers of nodes. + * Default percentage is zero. + * + * In large clusters, some nodes will always be down or out for repairs, so + * this percentage should be configured to tolerate that. + * + * @param {number} + * [startClusterUpgradeDescription.clusterHealthPolicy.maxPercentUnhealthyApplications] + * The maximum allowed percentage of unhealthy applications before reporting an + * error. For example, to allow 10% of applications to be unhealthy, this value + * would be 10. + * + * The percentage represents the maximum tolerated percentage of applications + * that can be unhealthy before the cluster is considered in error. + * If the percentage is respected but there is at least one unhealthy + * application, the health is evaluated as Warning. + * This is calculated by dividing the number of unhealthy applications over the + * total number of application instances in the cluster, excluding applications + * of application types that are included in the + * ApplicationTypeHealthPolicyMap. + * The computation rounds up to tolerate one failure on small numbers of + * applications. Default percentage is zero. + * + * @param {array} + * [startClusterUpgradeDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * Defines a map with max percentage unhealthy applications for specific + * application types. + * Each entry specifies as key the application type name and as value an + * integer that represents the MaxPercentUnhealthyApplications percentage used + * to evaluate the applications of the specified application type. + * + * The application type health policy map can be used during cluster health + * evaluation to describe special application types. + * The application types included in the map are evaluated against the + * percentage specified in the map, and not with the global + * MaxPercentUnhealthyApplications defined in the cluster health policy. + * The applications of application types specified in the map are not counted + * against the global pool of applications. + * For example, if some applications of a type are critical, the cluster + * administrator can add an entry to the map for that application type + * and assign it a value of 0% (that is, do not tolerate any failures). + * All other applications can be evaluated with MaxPercentUnhealthyApplications + * set to 20% to tolerate some failures out of the thousands of application + * instances. + * The application type health policy map is used only if the cluster manifest + * enables application type health evaluation using the configuration entry for + * HealthManager/EnableApplicationTypeHealthEvaluation. + * + * @param {boolean} + * [startClusterUpgradeDescription.enableDeltaHealthEvaluation] When true, + * enables delta health evaluation rather than absolute health evaluation after + * completion of each upgrade domain. + * + * @param {object} [startClusterUpgradeDescription.clusterUpgradeHealthPolicy] + * Defines a health policy used to evaluate the health of the cluster during a + * cluster upgrade. + * + * @param {number} + * [startClusterUpgradeDescription.clusterUpgradeHealthPolicy.maxPercentDeltaUnhealthyNodes] + * The maximum allowed percentage of nodes health degradation allowed during + * cluster upgrades. The delta is measured between the state of the nodes at + * the beginning of upgrade and the state of the nodes at the time of the + * health evaluation. The check is performed after every upgrade domain upgrade + * completion to make sure the global state of the cluster is within tolerated + * limits. The default value is 10%. + * + * @param {number} + * [startClusterUpgradeDescription.clusterUpgradeHealthPolicy.maxPercentUpgradeDomainDeltaUnhealthyNodes] + * The maximum allowed percentage of upgrade domain nodes health degradation + * allowed during cluster upgrades. The delta is measured between the state of + * the upgrade domain nodes at the beginning of upgrade and the state of the + * upgrade domain nodes at the time of the health evaluation. The check is + * performed after every upgrade domain upgrade completion for all completed + * upgrade domains to make sure the state of the upgrade domains is within + * tolerated limits. The default value is 15%. + * + * @param {object} [startClusterUpgradeDescription.applicationHealthPolicyMap] + * Defines the application health policy map used to evaluate the health of an + * application or one of its children entities. + * + * @param {array} + * [startClusterUpgradeDescription.applicationHealthPolicyMap.applicationHealthPolicyMap] + * The wrapper that contains the map with application health policies used to + * evaluate specific applications in the cluster. * * @param {object} [options] Optional Parameters. * @@ -43043,7 +40267,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {NodeLoadInfo} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -43051,14 +40275,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link NodeLoadInfo} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getNodeLoadInfo(nodeName, options, optionalCallback) { + startClusterUpgrade(startClusterUpgradeDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -43067,39 +40290,85 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getNodeLoadInfo(nodeName, options, (err, result, request, response) => { + self._startClusterUpgrade(startClusterUpgradeDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getNodeLoadInfo(nodeName, options, optionalCallback); + return self._startClusterUpgrade(startClusterUpgradeDescription, options, optionalCallback); } } /** - * @summary Deactivate a Service Fabric cluster node with the specified - * deactivation intent. + * @summary Start upgrading the configuration of a Service Fabric standalone + * cluster. * - * Deactivate a Service Fabric cluster node with the specified deactivation - * intent. Once the deactivation is in progress, the deactivation intent can be - * increased, but not decreased (for example, a node that is deactivated with - * the Pause intent can be deactivated further with Restart, but not the other - * way around. Nodes may be reactivated using the Activate a node operation any - * time after they are deactivated. If the deactivation is not complete, this - * will cancel the deactivation. A node that goes down and comes back up while - * deactivated will still need to be reactivated before services will be placed - * on that node. + * Validate the supplied configuration upgrade parameters and start upgrading + * the cluster configuration if the parameters are valid. * - * @param {string} nodeName The name of the node. + * @param {object} clusterConfigurationUpgradeDescription Parameters for a + * standalone cluster configuration upgrade. * - * @param {object} deactivationIntentDescription Describes the intent or reason - * for deactivating the node. + * @param {string} clusterConfigurationUpgradeDescription.clusterConfig The + * cluster configuration as a JSON string. For example, [this + * file](https://github.com/Azure-Samples/service-fabric-dotnet-standalone-cluster-configuration/blob/master/Samples/ClusterConfig.Unsecure.DevCluster.json) + * contains JSON describing the [nodes and other properties of the + * cluster](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-manifest). * - * @param {string} [deactivationIntentDescription.deactivationIntent] Describes - * the intent or reason for deactivating the node. The possible values are - * following. Possible values include: 'Pause', 'Restart', 'RemoveData' + * @param {moment.duration} + * [clusterConfigurationUpgradeDescription.healthCheckRetryTimeout] The length + * of time between attempts to perform health checks if the application or + * cluster is not healthy. + * + * @param {moment.duration} + * [clusterConfigurationUpgradeDescription.healthCheckWaitDurationInSeconds] + * The length of time to wait after completing an upgrade domain before + * starting the health checks process. + * + * @param {moment.duration} + * [clusterConfigurationUpgradeDescription.healthCheckStableDurationInSeconds] + * The length of time that the application or cluster must remain healthy + * before the upgrade proceeds to the next upgrade domain. + * + * @param {moment.duration} + * [clusterConfigurationUpgradeDescription.upgradeDomainTimeoutInSeconds] The + * timeout for the upgrade domain. + * + * @param {moment.duration} + * [clusterConfigurationUpgradeDescription.upgradeTimeoutInSeconds] The upgrade + * timeout. + * + * @param {number} + * [clusterConfigurationUpgradeDescription.maxPercentUnhealthyApplications] The + * maximum allowed percentage of unhealthy applications during the upgrade. + * Allowed values are integer values from zero to 100. + * + * @param {number} + * [clusterConfigurationUpgradeDescription.maxPercentUnhealthyNodes] The + * maximum allowed percentage of unhealthy nodes during the upgrade. Allowed + * values are integer values from zero to 100. + * + * @param {number} + * [clusterConfigurationUpgradeDescription.maxPercentDeltaUnhealthyNodes] The + * maximum allowed percentage of delta health degradation during the upgrade. + * Allowed values are integer values from zero to 100. + * + * @param {number} + * [clusterConfigurationUpgradeDescription.maxPercentUpgradeDomainDeltaUnhealthyNodes] + * The maximum allowed percentage of upgrade domain delta health degradation + * during the upgrade. Allowed values are integer values from zero to 100. + * + * @param {object} + * [clusterConfigurationUpgradeDescription.applicationHealthPolicies] Defines + * the application health policy map used to evaluate the health of an + * application or one of its children entities. + * + * @param {array} + * [clusterConfigurationUpgradeDescription.applicationHealthPolicies.applicationHealthPolicyMap] + * The wrapper that contains the map with application health policies used to + * evaluate specific applications in the cluster. * * @param {object} [options] Optional Parameters. * @@ -43117,11 +40386,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - disableNodeWithHttpOperationResponse(nodeName, deactivationIntentDescription, options) { + startClusterConfigurationUpgradeWithHttpOperationResponse(clusterConfigurationUpgradeDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._disableNode(nodeName, deactivationIntentDescription, options, (err, result, request, response) => { + self._startClusterConfigurationUpgrade(clusterConfigurationUpgradeDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -43132,27 +40401,73 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Deactivate a Service Fabric cluster node with the specified - * deactivation intent. + * @summary Start upgrading the configuration of a Service Fabric standalone + * cluster. * - * Deactivate a Service Fabric cluster node with the specified deactivation - * intent. Once the deactivation is in progress, the deactivation intent can be - * increased, but not decreased (for example, a node that is deactivated with - * the Pause intent can be deactivated further with Restart, but not the other - * way around. Nodes may be reactivated using the Activate a node operation any - * time after they are deactivated. If the deactivation is not complete, this - * will cancel the deactivation. A node that goes down and comes back up while - * deactivated will still need to be reactivated before services will be placed - * on that node. + * Validate the supplied configuration upgrade parameters and start upgrading + * the cluster configuration if the parameters are valid. * - * @param {string} nodeName The name of the node. + * @param {object} clusterConfigurationUpgradeDescription Parameters for a + * standalone cluster configuration upgrade. * - * @param {object} deactivationIntentDescription Describes the intent or reason - * for deactivating the node. + * @param {string} clusterConfigurationUpgradeDescription.clusterConfig The + * cluster configuration as a JSON string. For example, [this + * file](https://github.com/Azure-Samples/service-fabric-dotnet-standalone-cluster-configuration/blob/master/Samples/ClusterConfig.Unsecure.DevCluster.json) + * contains JSON describing the [nodes and other properties of the + * cluster](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-manifest). * - * @param {string} [deactivationIntentDescription.deactivationIntent] Describes - * the intent or reason for deactivating the node. The possible values are - * following. Possible values include: 'Pause', 'Restart', 'RemoveData' + * @param {moment.duration} + * [clusterConfigurationUpgradeDescription.healthCheckRetryTimeout] The length + * of time between attempts to perform health checks if the application or + * cluster is not healthy. + * + * @param {moment.duration} + * [clusterConfigurationUpgradeDescription.healthCheckWaitDurationInSeconds] + * The length of time to wait after completing an upgrade domain before + * starting the health checks process. + * + * @param {moment.duration} + * [clusterConfigurationUpgradeDescription.healthCheckStableDurationInSeconds] + * The length of time that the application or cluster must remain healthy + * before the upgrade proceeds to the next upgrade domain. + * + * @param {moment.duration} + * [clusterConfigurationUpgradeDescription.upgradeDomainTimeoutInSeconds] The + * timeout for the upgrade domain. + * + * @param {moment.duration} + * [clusterConfigurationUpgradeDescription.upgradeTimeoutInSeconds] The upgrade + * timeout. + * + * @param {number} + * [clusterConfigurationUpgradeDescription.maxPercentUnhealthyApplications] The + * maximum allowed percentage of unhealthy applications during the upgrade. + * Allowed values are integer values from zero to 100. + * + * @param {number} + * [clusterConfigurationUpgradeDescription.maxPercentUnhealthyNodes] The + * maximum allowed percentage of unhealthy nodes during the upgrade. Allowed + * values are integer values from zero to 100. + * + * @param {number} + * [clusterConfigurationUpgradeDescription.maxPercentDeltaUnhealthyNodes] The + * maximum allowed percentage of delta health degradation during the upgrade. + * Allowed values are integer values from zero to 100. + * + * @param {number} + * [clusterConfigurationUpgradeDescription.maxPercentUpgradeDomainDeltaUnhealthyNodes] + * The maximum allowed percentage of upgrade domain delta health degradation + * during the upgrade. Allowed values are integer values from zero to 100. + * + * @param {object} + * [clusterConfigurationUpgradeDescription.applicationHealthPolicies] Defines + * the application health policy map used to evaluate the health of an + * application or one of its children entities. + * + * @param {array} + * [clusterConfigurationUpgradeDescription.applicationHealthPolicies.applicationHealthPolicyMap] + * The wrapper that contains the map with application health policies used to + * evaluate specific applications in the cluster. * * @param {object} [options] Optional Parameters. * @@ -43185,7 +40500,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - disableNode(nodeName, deactivationIntentDescription, options, optionalCallback) { + startClusterConfigurationUpgrade(clusterConfigurationUpgradeDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -43194,134 +40509,202 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._disableNode(nodeName, deactivationIntentDescription, options, (err, result, request, response) => { + self._startClusterConfigurationUpgrade(clusterConfigurationUpgradeDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._disableNode(nodeName, deactivationIntentDescription, options, optionalCallback); + return self._startClusterConfigurationUpgrade(clusterConfigurationUpgradeDescription, options, optionalCallback); } } /** - * @summary Activate a Service Fabric cluster node that is currently - * deactivated. + * @summary Update the upgrade parameters of a Service Fabric cluster upgrade. * - * Activates a Service Fabric cluster node that is currently deactivated. Once - * activated, the node will again become a viable target for placing new - * replicas, and any deactivated replicas remaining on the node will be - * reactivated. + * Update the upgrade parameters used during a Service Fabric cluster upgrade. * - * @param {string} nodeName The name of the node. + * @param {object} updateClusterUpgradeDescription Parameters for updating a + * cluster upgrade. * - * @param {object} [options] Optional Parameters. + * @param {string} [updateClusterUpgradeDescription.upgradeKind] The type of + * upgrade out of the following possible values. Possible values include: + * 'Invalid', 'Rolling', 'Rolling_ForceRestart' * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. + * @param {object} [updateClusterUpgradeDescription.updateDescription] + * Describes the parameters for updating a rolling upgrade of application or + * cluster. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} + * updateClusterUpgradeDescription.updateDescription.rollingUpgradeMode The + * mode used to monitor health during a rolling upgrade. The values are + * UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: + * 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' * - * @returns {Promise} A promise is returned + * @param {boolean} + * [updateClusterUpgradeDescription.updateDescription.forceRestart] If true, + * then processes are forcefully restarted during upgrade even when the code + * version has not changed (the upgrade only changes configuration or data). * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {number} + * [updateClusterUpgradeDescription.updateDescription.replicaSetCheckTimeoutInMilliseconds] + * The maximum amount of time to block processing of an upgrade domain and + * prevent loss of availability when there are unexpected issues. When this + * timeout expires, processing of the upgrade domain will proceed regardless of + * availability loss issues. The timeout is reset at the start of each upgrade + * domain. Valid values are between 0 and 42949672925 inclusive. (unsigned + * 32-bit integer). * - * @reject {Error} - The error object. - */ - enableNodeWithHttpOperationResponse(nodeName, options) { - let client = this; - let self = this; - return new Promise((resolve, reject) => { - self._enableNode(nodeName, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * @summary Activate a Service Fabric cluster node that is currently - * deactivated. + * @param {string} + * [updateClusterUpgradeDescription.updateDescription.failureAction] The + * compensating action to perform when a Monitored upgrade encounters + * monitoring policy or health policy violations. + * Invalid indicates the failure action is invalid. Rollback specifies that the + * upgrade will start rolling back automatically. + * Manual indicates that the upgrade will switch to UnmonitoredManual upgrade + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * - * Activates a Service Fabric cluster node that is currently deactivated. Once - * activated, the node will again become a viable target for placing new - * replicas, and any deactivated replicas remaining on the node will be - * reactivated. + * @param {string} + * [updateClusterUpgradeDescription.updateDescription.healthCheckWaitDurationInMilliseconds] + * The amount of time to wait after completing an upgrade domain before + * applying health policies. It is first interpreted as a string representing + * an ISO 8601 duration. If that fails, then it is interpreted as a number + * representing the total number of milliseconds. * - * @param {string} nodeName The name of the node. + * @param {string} + * [updateClusterUpgradeDescription.updateDescription.healthCheckStableDurationInMilliseconds] + * The amount of time that the application or cluster must remain healthy + * before the upgrade proceeds to the next upgrade domain. It is first + * interpreted as a string representing an ISO 8601 duration. If that fails, + * then it is interpreted as a number representing the total number of + * milliseconds. * - * @param {object} [options] Optional Parameters. + * @param {string} + * [updateClusterUpgradeDescription.updateDescription.healthCheckRetryTimeoutInMilliseconds] + * The amount of time to retry health evaluation when the application or + * cluster is unhealthy before FailureAction is executed. It is first + * interpreted as a string representing an ISO 8601 duration. If that fails, + * then it is interpreted as a number representing the total number of + * milliseconds. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. + * @param {string} + * [updateClusterUpgradeDescription.updateDescription.upgradeTimeoutInMilliseconds] + * The amount of time the overall upgrade has to complete before FailureAction + * is executed. It is first interpreted as a string representing an ISO 8601 + * duration. If that fails, then it is interpreted as a number representing the + * total number of milliseconds. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} + * [updateClusterUpgradeDescription.updateDescription.upgradeDomainTimeoutInMilliseconds] + * The amount of time each upgrade domain has to complete before FailureAction + * is executed. It is first interpreted as a string representing an ISO 8601 + * duration. If that fails, then it is interpreted as a number representing the + * total number of milliseconds. * - * @param {function} [optionalCallback] - The optional callback. + * @param {object} [updateClusterUpgradeDescription.clusterHealthPolicy] + * Defines a health policy used to evaluate the health of the cluster or of a + * cluster node. * - * @returns {function|Promise} If a callback was passed as the last parameter - * then it returns the callback else returns a Promise. + * @param {boolean} + * [updateClusterUpgradeDescription.clusterHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. * - * {Promise} A promise is returned + * @param {number} + * [updateClusterUpgradeDescription.clusterHealthPolicy.maxPercentUnhealthyNodes] + * The maximum allowed percentage of unhealthy nodes before reporting an error. + * For example, to allow 10% of nodes to be unhealthy, this value would be 10. * - * @resolve {null} - The deserialized result object. + * The percentage represents the maximum tolerated percentage of nodes that can + * be unhealthy before the cluster is considered in error. + * If the percentage is respected but there is at least one unhealthy node, the + * health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy nodes over + * the total number of nodes in the cluster. + * The computation rounds up to tolerate one failure on small numbers of nodes. + * Default percentage is zero. * - * @reject {Error} - The error object. + * In large clusters, some nodes will always be down or out for repairs, so + * this percentage should be configured to tolerate that. * - * {function} optionalCallback(err, result, request, response) + * @param {number} + * [updateClusterUpgradeDescription.clusterHealthPolicy.maxPercentUnhealthyApplications] + * The maximum allowed percentage of unhealthy applications before reporting an + * error. For example, to allow 10% of applications to be unhealthy, this value + * would be 10. * - * {Error} err - The Error object if an error occurred, null otherwise. + * The percentage represents the maximum tolerated percentage of applications + * that can be unhealthy before the cluster is considered in error. + * If the percentage is respected but there is at least one unhealthy + * application, the health is evaluated as Warning. + * This is calculated by dividing the number of unhealthy applications over the + * total number of application instances in the cluster, excluding applications + * of application types that are included in the + * ApplicationTypeHealthPolicyMap. + * The computation rounds up to tolerate one failure on small numbers of + * applications. Default percentage is zero. * - * {null} [result] - The deserialized result object if an error did not occur. + * @param {array} + * [updateClusterUpgradeDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * Defines a map with max percentage unhealthy applications for specific + * application types. + * Each entry specifies as key the application type name and as value an + * integer that represents the MaxPercentUnhealthyApplications percentage used + * to evaluate the applications of the specified application type. * - * {object} [request] - The HTTP Request object if an error did not occur. + * The application type health policy map can be used during cluster health + * evaluation to describe special application types. + * The application types included in the map are evaluated against the + * percentage specified in the map, and not with the global + * MaxPercentUnhealthyApplications defined in the cluster health policy. + * The applications of application types specified in the map are not counted + * against the global pool of applications. + * For example, if some applications of a type are critical, the cluster + * administrator can add an entry to the map for that application type + * and assign it a value of 0% (that is, do not tolerate any failures). + * All other applications can be evaluated with MaxPercentUnhealthyApplications + * set to 20% to tolerate some failures out of the thousands of application + * instances. + * The application type health policy map is used only if the cluster manifest + * enables application type health evaluation using the configuration entry for + * HealthManager/EnableApplicationTypeHealthEvaluation. * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ - enableNode(nodeName, options, optionalCallback) { - let client = this; - let self = this; - if (!optionalCallback && typeof options === 'function') { - optionalCallback = options; - options = null; - } - if (!optionalCallback) { - return new Promise((resolve, reject) => { - self._enableNode(nodeName, options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._enableNode(nodeName, options, optionalCallback); - } - } - - /** - * @summary Notifies Service Fabric that the persisted state on a node has been - * permanently removed or lost. + * @param {boolean} + * [updateClusterUpgradeDescription.enableDeltaHealthEvaluation] When true, + * enables delta health evaluation rather than absolute health evaluation after + * completion of each upgrade domain. * - * This implies that it is not possible to recover the persisted state of that - * node. This generally happens if a hard disk has been wiped clean, or if a - * hard disk crashes. The node has to be down for this operation to be - * successful. This operation lets Service Fabric know that the replicas on - * that node no longer exist, and that Service Fabric should stop waiting for - * those replicas to come back up. Do not run this cmdlet if the state on the - * node has not been removed and the node can come back up with its state - * intact. + * @param {object} [updateClusterUpgradeDescription.clusterUpgradeHealthPolicy] + * Defines a health policy used to evaluate the health of the cluster during a + * cluster upgrade. * - * @param {string} nodeName The name of the node. + * @param {number} + * [updateClusterUpgradeDescription.clusterUpgradeHealthPolicy.maxPercentDeltaUnhealthyNodes] + * The maximum allowed percentage of nodes health degradation allowed during + * cluster upgrades. The delta is measured between the state of the nodes at + * the beginning of upgrade and the state of the nodes at the time of the + * health evaluation. The check is performed after every upgrade domain upgrade + * completion to make sure the global state of the cluster is within tolerated + * limits. The default value is 10%. + * + * @param {number} + * [updateClusterUpgradeDescription.clusterUpgradeHealthPolicy.maxPercentUpgradeDomainDeltaUnhealthyNodes] + * The maximum allowed percentage of upgrade domain nodes health degradation + * allowed during cluster upgrades. The delta is measured between the state of + * the upgrade domain nodes at the beginning of upgrade and the state of the + * upgrade domain nodes at the time of the health evaluation. The check is + * performed after every upgrade domain upgrade completion for all completed + * upgrade domains to make sure the state of the upgrade domains is within + * tolerated limits. The default value is 15%. + * + * @param {object} [updateClusterUpgradeDescription.applicationHealthPolicyMap] + * Defines the application health policy map used to evaluate the health of an + * application or one of its children entities. + * + * @param {array} + * [updateClusterUpgradeDescription.applicationHealthPolicyMap.applicationHealthPolicyMap] + * The wrapper that contains the map with application health policies used to + * evaluate specific applications in the cluster. * * @param {object} [options] Optional Parameters. * @@ -43339,11 +40722,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - removeNodeStateWithHttpOperationResponse(nodeName, options) { + updateClusterUpgradeWithHttpOperationResponse(updateClusterUpgradeDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._removeNodeState(nodeName, options, (err, result, request, response) => { + self._updateClusterUpgrade(updateClusterUpgradeDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -43354,19 +40737,190 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Notifies Service Fabric that the persisted state on a node has been - * permanently removed or lost. + * @summary Update the upgrade parameters of a Service Fabric cluster upgrade. + * + * Update the upgrade parameters used during a Service Fabric cluster upgrade. + * + * @param {object} updateClusterUpgradeDescription Parameters for updating a + * cluster upgrade. + * + * @param {string} [updateClusterUpgradeDescription.upgradeKind] The type of + * upgrade out of the following possible values. Possible values include: + * 'Invalid', 'Rolling', 'Rolling_ForceRestart' + * + * @param {object} [updateClusterUpgradeDescription.updateDescription] + * Describes the parameters for updating a rolling upgrade of application or + * cluster. + * + * @param {string} + * updateClusterUpgradeDescription.updateDescription.rollingUpgradeMode The + * mode used to monitor health during a rolling upgrade. The values are + * UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: + * 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' + * + * @param {boolean} + * [updateClusterUpgradeDescription.updateDescription.forceRestart] If true, + * then processes are forcefully restarted during upgrade even when the code + * version has not changed (the upgrade only changes configuration or data). + * + * @param {number} + * [updateClusterUpgradeDescription.updateDescription.replicaSetCheckTimeoutInMilliseconds] + * The maximum amount of time to block processing of an upgrade domain and + * prevent loss of availability when there are unexpected issues. When this + * timeout expires, processing of the upgrade domain will proceed regardless of + * availability loss issues. The timeout is reset at the start of each upgrade + * domain. Valid values are between 0 and 42949672925 inclusive. (unsigned + * 32-bit integer). + * + * @param {string} + * [updateClusterUpgradeDescription.updateDescription.failureAction] The + * compensating action to perform when a Monitored upgrade encounters + * monitoring policy or health policy violations. + * Invalid indicates the failure action is invalid. Rollback specifies that the + * upgrade will start rolling back automatically. + * Manual indicates that the upgrade will switch to UnmonitoredManual upgrade + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' + * + * @param {string} + * [updateClusterUpgradeDescription.updateDescription.healthCheckWaitDurationInMilliseconds] + * The amount of time to wait after completing an upgrade domain before + * applying health policies. It is first interpreted as a string representing + * an ISO 8601 duration. If that fails, then it is interpreted as a number + * representing the total number of milliseconds. + * + * @param {string} + * [updateClusterUpgradeDescription.updateDescription.healthCheckStableDurationInMilliseconds] + * The amount of time that the application or cluster must remain healthy + * before the upgrade proceeds to the next upgrade domain. It is first + * interpreted as a string representing an ISO 8601 duration. If that fails, + * then it is interpreted as a number representing the total number of + * milliseconds. + * + * @param {string} + * [updateClusterUpgradeDescription.updateDescription.healthCheckRetryTimeoutInMilliseconds] + * The amount of time to retry health evaluation when the application or + * cluster is unhealthy before FailureAction is executed. It is first + * interpreted as a string representing an ISO 8601 duration. If that fails, + * then it is interpreted as a number representing the total number of + * milliseconds. + * + * @param {string} + * [updateClusterUpgradeDescription.updateDescription.upgradeTimeoutInMilliseconds] + * The amount of time the overall upgrade has to complete before FailureAction + * is executed. It is first interpreted as a string representing an ISO 8601 + * duration. If that fails, then it is interpreted as a number representing the + * total number of milliseconds. + * + * @param {string} + * [updateClusterUpgradeDescription.updateDescription.upgradeDomainTimeoutInMilliseconds] + * The amount of time each upgrade domain has to complete before FailureAction + * is executed. It is first interpreted as a string representing an ISO 8601 + * duration. If that fails, then it is interpreted as a number representing the + * total number of milliseconds. + * + * @param {object} [updateClusterUpgradeDescription.clusterHealthPolicy] + * Defines a health policy used to evaluate the health of the cluster or of a + * cluster node. + * + * @param {boolean} + * [updateClusterUpgradeDescription.clusterHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. + * + * @param {number} + * [updateClusterUpgradeDescription.clusterHealthPolicy.maxPercentUnhealthyNodes] + * The maximum allowed percentage of unhealthy nodes before reporting an error. + * For example, to allow 10% of nodes to be unhealthy, this value would be 10. + * + * The percentage represents the maximum tolerated percentage of nodes that can + * be unhealthy before the cluster is considered in error. + * If the percentage is respected but there is at least one unhealthy node, the + * health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy nodes over + * the total number of nodes in the cluster. + * The computation rounds up to tolerate one failure on small numbers of nodes. + * Default percentage is zero. + * + * In large clusters, some nodes will always be down or out for repairs, so + * this percentage should be configured to tolerate that. + * + * @param {number} + * [updateClusterUpgradeDescription.clusterHealthPolicy.maxPercentUnhealthyApplications] + * The maximum allowed percentage of unhealthy applications before reporting an + * error. For example, to allow 10% of applications to be unhealthy, this value + * would be 10. + * + * The percentage represents the maximum tolerated percentage of applications + * that can be unhealthy before the cluster is considered in error. + * If the percentage is respected but there is at least one unhealthy + * application, the health is evaluated as Warning. + * This is calculated by dividing the number of unhealthy applications over the + * total number of application instances in the cluster, excluding applications + * of application types that are included in the + * ApplicationTypeHealthPolicyMap. + * The computation rounds up to tolerate one failure on small numbers of + * applications. Default percentage is zero. + * + * @param {array} + * [updateClusterUpgradeDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * Defines a map with max percentage unhealthy applications for specific + * application types. + * Each entry specifies as key the application type name and as value an + * integer that represents the MaxPercentUnhealthyApplications percentage used + * to evaluate the applications of the specified application type. + * + * The application type health policy map can be used during cluster health + * evaluation to describe special application types. + * The application types included in the map are evaluated against the + * percentage specified in the map, and not with the global + * MaxPercentUnhealthyApplications defined in the cluster health policy. + * The applications of application types specified in the map are not counted + * against the global pool of applications. + * For example, if some applications of a type are critical, the cluster + * administrator can add an entry to the map for that application type + * and assign it a value of 0% (that is, do not tolerate any failures). + * All other applications can be evaluated with MaxPercentUnhealthyApplications + * set to 20% to tolerate some failures out of the thousands of application + * instances. + * The application type health policy map is used only if the cluster manifest + * enables application type health evaluation using the configuration entry for + * HealthManager/EnableApplicationTypeHealthEvaluation. + * + * @param {boolean} + * [updateClusterUpgradeDescription.enableDeltaHealthEvaluation] When true, + * enables delta health evaluation rather than absolute health evaluation after + * completion of each upgrade domain. + * + * @param {object} [updateClusterUpgradeDescription.clusterUpgradeHealthPolicy] + * Defines a health policy used to evaluate the health of the cluster during a + * cluster upgrade. + * + * @param {number} + * [updateClusterUpgradeDescription.clusterUpgradeHealthPolicy.maxPercentDeltaUnhealthyNodes] + * The maximum allowed percentage of nodes health degradation allowed during + * cluster upgrades. The delta is measured between the state of the nodes at + * the beginning of upgrade and the state of the nodes at the time of the + * health evaluation. The check is performed after every upgrade domain upgrade + * completion to make sure the global state of the cluster is within tolerated + * limits. The default value is 10%. + * + * @param {number} + * [updateClusterUpgradeDescription.clusterUpgradeHealthPolicy.maxPercentUpgradeDomainDeltaUnhealthyNodes] + * The maximum allowed percentage of upgrade domain nodes health degradation + * allowed during cluster upgrades. The delta is measured between the state of + * the upgrade domain nodes at the beginning of upgrade and the state of the + * upgrade domain nodes at the time of the health evaluation. The check is + * performed after every upgrade domain upgrade completion for all completed + * upgrade domains to make sure the state of the upgrade domains is within + * tolerated limits. The default value is 15%. * - * This implies that it is not possible to recover the persisted state of that - * node. This generally happens if a hard disk has been wiped clean, or if a - * hard disk crashes. The node has to be down for this operation to be - * successful. This operation lets Service Fabric know that the replicas on - * that node no longer exist, and that Service Fabric should stop waiting for - * those replicas to come back up. Do not run this cmdlet if the state on the - * node has not been removed and the node can come back up with its state - * intact. + * @param {object} [updateClusterUpgradeDescription.applicationHealthPolicyMap] + * Defines the application health policy map used to evaluate the health of an + * application or one of its children entities. * - * @param {string} nodeName The name of the node. + * @param {array} + * [updateClusterUpgradeDescription.applicationHealthPolicyMap.applicationHealthPolicyMap] + * The wrapper that contains the map with application health policies used to + * evaluate specific applications in the cluster. * * @param {object} [options] Optional Parameters. * @@ -43399,7 +40953,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - removeNodeState(nodeName, options, optionalCallback) { + updateClusterUpgrade(updateClusterUpgradeDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -43408,35 +40962,26 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._removeNodeState(nodeName, options, (err, result, request, response) => { + self._updateClusterUpgrade(updateClusterUpgradeDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._removeNodeState(nodeName, options, optionalCallback); + return self._updateClusterUpgrade(updateClusterUpgradeDescription, options, optionalCallback); } } /** - * @summary Restarts a Service Fabric cluster node. - * - * Restarts a Service Fabric cluster node that is already started. - * - * @param {string} nodeName The name of the node. - * - * @param {object} restartNodeDescription The instance of the node to be - * restarted and a flag indicating the need to take dump of the fabric process. - * - * @param {string} restartNodeDescription.nodeInstanceId The instance ID of the - * target node. If instance ID is specified the node is restarted only if it - * matches with the current instance of the node. A default value of "0" would - * match any instance ID. The instance ID can be obtained using get node query. + * @summary Gets the Azure Active Directory metadata used for secured + * connection to cluster. * - * @param {string} [restartNodeDescription.createFabricDump] Specify True to - * create a dump of the fabric node process. This is case-sensitive. Possible - * values include: 'False', 'True' + * Gets the Azure Active Directory metadata used for secured connection to + * cluster. + * This API is not supposed to be called separately. It provides information + * needed to set up an Azure Active Directory secured connection with a Service + * Fabric cluster. * * @param {object} [options] Optional Parameters. * @@ -43450,15 +40995,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - restartNodeWithHttpOperationResponse(nodeName, restartNodeDescription, options) { + getAadMetadataWithHttpOperationResponse(options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._restartNode(nodeName, restartNodeDescription, options, (err, result, request, response) => { + self._getAadMetadata(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -43469,23 +41014,14 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Restarts a Service Fabric cluster node. - * - * Restarts a Service Fabric cluster node that is already started. - * - * @param {string} nodeName The name of the node. - * - * @param {object} restartNodeDescription The instance of the node to be - * restarted and a flag indicating the need to take dump of the fabric process. - * - * @param {string} restartNodeDescription.nodeInstanceId The instance ID of the - * target node. If instance ID is specified the node is restarted only if it - * matches with the current instance of the node. A default value of "0" would - * match any instance ID. The instance ID can be obtained using get node query. + * @summary Gets the Azure Active Directory metadata used for secured + * connection to cluster. * - * @param {string} [restartNodeDescription.createFabricDump] Specify True to - * create a dump of the fabric node process. This is case-sensitive. Possible - * values include: 'False', 'True' + * Gets the Azure Active Directory metadata used for secured connection to + * cluster. + * This API is not supposed to be called separately. It provides information + * needed to set up an Azure Active Directory secured connection with a Service + * Fabric cluster. * * @param {object} [options] Optional Parameters. * @@ -43504,7 +41040,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {AadMetadataObject} - The deserialized result object. * * @reject {Error} - The error object. * @@ -43512,13 +41048,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link AadMetadataObject} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - restartNode(nodeName, restartNodeDescription, options, optionalCallback) { + getAadMetadata(options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -43527,67 +41064,25 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._restartNode(nodeName, restartNodeDescription, options, (err, result, request, response) => { + self._getAadMetadata(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._restartNode(nodeName, restartNodeDescription, options, optionalCallback); + return self._getAadMetadata(options, optionalCallback); } } /** - * @summary Gets the list of application types in the Service Fabric cluster. + * @summary Get the current Service Fabric cluster version. * - * Returns the information about the application types that are provisioned or - * in the process of being provisioned in the Service Fabric cluster. Each - * version of an application type is returned as one application type. The - * response includes the name, version, status, and other details about the - * application type. This is a paged query, meaning that if not all of the - * application types fit in a page, one page of results is returned as well as - * a continuation token, which can be used to get the next page. For example, - * if there are 10 application types but a page only fits the first three - * application types, or if max results is set to 3, then three is returned. To - * access the rest of the results, retrieve subsequent pages by using the - * returned continuation token in the next query. An empty continuation token - * is returned if there are no subsequent pages. + * If a cluster upgrade is happening, then this API will return the lowest + * (older) version of the current and target cluster runtime versions. * * @param {object} [options] Optional Parameters. * - * @param {number} [options.applicationTypeDefinitionKindFilter] Used to filter - * on ApplicationTypeDefinitionKind which is the mechanism used to define a - * Service Fabric application type. - * - Default - Default value, which performs the same function as selecting - * "All". The value is 0. - * - All - Filter that matches input with any ApplicationTypeDefinitionKind - * value. The value is 65535. - * - ServiceFabricApplicationPackage - Filter that matches input with - * ApplicationTypeDefinitionKind value ServiceFabricApplicationPackage. The - * value is 1. - * - Compose - Filter that matches input with ApplicationTypeDefinitionKind - * value Compose. The value is 2. - * - * @param {boolean} [options.excludeApplicationParameters] The flag that - * specifies whether application parameters will be excluded from the result. - * - * @param {string} [options.continuationToken] The continuation token parameter - * is used to obtain next set of results. A continuation token with a non-empty - * value is included in the response of the API when the results from the - * system do not fit in a single response. When this value is passed to the - * next API call, the API returns next set of results. If there are no further - * results, then the continuation token does not contain a value. The value of - * this parameter should not be URL encoded. - * - * @param {number} [options.maxResults] The maximum number of results to be - * returned as part of the paged queries. This parameter defines the upper - * bound on the number of results returned. The results returned can be less - * than the specified maximum results if they do not fit in the message as per - * the max message size restrictions defined in the configuration. If this - * parameter is zero or not specified, the paged query includes as many results - * as possible that fit in the return message. - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -43598,15 +41093,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getApplicationTypeInfoListWithHttpOperationResponse(options) { + getClusterVersionWithHttpOperationResponse(options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getApplicationTypeInfoList(options, (err, result, request, response) => { + self._getClusterVersion(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -43617,55 +41112,13 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the list of application types in the Service Fabric cluster. + * @summary Get the current Service Fabric cluster version. * - * Returns the information about the application types that are provisioned or - * in the process of being provisioned in the Service Fabric cluster. Each - * version of an application type is returned as one application type. The - * response includes the name, version, status, and other details about the - * application type. This is a paged query, meaning that if not all of the - * application types fit in a page, one page of results is returned as well as - * a continuation token, which can be used to get the next page. For example, - * if there are 10 application types but a page only fits the first three - * application types, or if max results is set to 3, then three is returned. To - * access the rest of the results, retrieve subsequent pages by using the - * returned continuation token in the next query. An empty continuation token - * is returned if there are no subsequent pages. + * If a cluster upgrade is happening, then this API will return the lowest + * (older) version of the current and target cluster runtime versions. * * @param {object} [options] Optional Parameters. * - * @param {number} [options.applicationTypeDefinitionKindFilter] Used to filter - * on ApplicationTypeDefinitionKind which is the mechanism used to define a - * Service Fabric application type. - * - Default - Default value, which performs the same function as selecting - * "All". The value is 0. - * - All - Filter that matches input with any ApplicationTypeDefinitionKind - * value. The value is 65535. - * - ServiceFabricApplicationPackage - Filter that matches input with - * ApplicationTypeDefinitionKind value ServiceFabricApplicationPackage. The - * value is 1. - * - Compose - Filter that matches input with ApplicationTypeDefinitionKind - * value Compose. The value is 2. - * - * @param {boolean} [options.excludeApplicationParameters] The flag that - * specifies whether application parameters will be excluded from the result. - * - * @param {string} [options.continuationToken] The continuation token parameter - * is used to obtain next set of results. A continuation token with a non-empty - * value is included in the response of the API when the results from the - * system do not fit in a single response. When this value is passed to the - * next API call, the API returns next set of results. If there are no further - * results, then the continuation token does not contain a value. The value of - * this parameter should not be URL encoded. - * - * @param {number} [options.maxResults] The maximum number of results to be - * returned as part of the paged queries. This parameter defines the upper - * bound on the number of results returned. The results returned can be less - * than the specified maximum results if they do not fit in the message as per - * the max message size restrictions defined in the configuration. If this - * parameter is zero or not specified, the paged query includes as many results - * as possible that fit in the return message. - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -43681,7 +41134,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {PagedApplicationTypeInfoList} - The deserialized result object. + * @resolve {ClusterVersion} - The deserialized result object. * * @reject {Error} - The error object. * @@ -43690,14 +41143,13 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PagedApplicationTypeInfoList} for more - * information. + * See {@link ClusterVersion} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getApplicationTypeInfoList(options, optionalCallback) { + getClusterVersion(options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -43706,47 +41158,25 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getApplicationTypeInfoList(options, (err, result, request, response) => { + self._getClusterVersion(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getApplicationTypeInfoList(options, optionalCallback); + return self._getClusterVersion(options, optionalCallback); } } /** - * @summary Gets the list of application types in the Service Fabric cluster - * matching exactly the specified name. - * - * Returns the information about the application types that are provisioned or - * in the process of being provisioned in the Service Fabric cluster. These - * results are of application types whose name match exactly the one specified - * as the parameter, and which comply with the given query parameters. All - * versions of the application type matching the application type name are - * returned, with each version returned as one application type. The response - * includes the name, version, status, and other details about the application - * type. This is a paged query, meaning that if not all of the application - * types fit in a page, one page of results is returned as well as a - * continuation token, which can be used to get the next page. For example, if - * there are 10 application types but a page only fits the first three - * application types, or if max results is set to 3, then three is returned. To - * access the rest of the results, retrieve subsequent pages by using the - * returned continuation token in the next query. An empty continuation token - * is returned if there are no subsequent pages. + * @summary Gets the list of nodes in the Service Fabric cluster. * - * @param {string} applicationTypeName The name of the application type. + * The response includes the name, status, ID, health, uptime, and other + * details about the nodes. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.applicationTypeVersion] The version of the - * application type. - * - * @param {boolean} [options.excludeApplicationParameters] The flag that - * specifies whether application parameters will be excluded from the result. - * * @param {string} [options.continuationToken] The continuation token parameter * is used to obtain next set of results. A continuation token with a non-empty * value is included in the response of the API when the results from the @@ -43755,6 +41185,12 @@ class ServiceFabricClient extends ServiceClient { * results, then the continuation token does not contain a value. The value of * this parameter should not be URL encoded. * + * @param {string} [options.nodeStatusFilter] Allows filtering the nodes based + * on the NodeStatus. Only the nodes that are matching the specified filter + * value will be returned. The filter value can be one of the following. + * Possible values include: 'default', 'all', 'up', 'down', 'enabling', + * 'disabling', 'disabled', 'unknown', 'removed' + * * @param {number} [options.maxResults] The maximum number of results to be * returned as part of the paged queries. This parameter defines the upper * bound on the number of results returned. The results returned can be less @@ -43773,15 +41209,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getApplicationTypeInfoListByNameWithHttpOperationResponse(applicationTypeName, options) { + getNodeInfoListWithHttpOperationResponse(options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getApplicationTypeInfoListByName(applicationTypeName, options, (err, result, request, response) => { + self._getNodeInfoList(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -43792,35 +41228,13 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the list of application types in the Service Fabric cluster - * matching exactly the specified name. - * - * Returns the information about the application types that are provisioned or - * in the process of being provisioned in the Service Fabric cluster. These - * results are of application types whose name match exactly the one specified - * as the parameter, and which comply with the given query parameters. All - * versions of the application type matching the application type name are - * returned, with each version returned as one application type. The response - * includes the name, version, status, and other details about the application - * type. This is a paged query, meaning that if not all of the application - * types fit in a page, one page of results is returned as well as a - * continuation token, which can be used to get the next page. For example, if - * there are 10 application types but a page only fits the first three - * application types, or if max results is set to 3, then three is returned. To - * access the rest of the results, retrieve subsequent pages by using the - * returned continuation token in the next query. An empty continuation token - * is returned if there are no subsequent pages. + * @summary Gets the list of nodes in the Service Fabric cluster. * - * @param {string} applicationTypeName The name of the application type. + * The response includes the name, status, ID, health, uptime, and other + * details about the nodes. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.applicationTypeVersion] The version of the - * application type. - * - * @param {boolean} [options.excludeApplicationParameters] The flag that - * specifies whether application parameters will be excluded from the result. - * * @param {string} [options.continuationToken] The continuation token parameter * is used to obtain next set of results. A continuation token with a non-empty * value is included in the response of the API when the results from the @@ -43829,6 +41243,12 @@ class ServiceFabricClient extends ServiceClient { * results, then the continuation token does not contain a value. The value of * this parameter should not be URL encoded. * + * @param {string} [options.nodeStatusFilter] Allows filtering the nodes based + * on the NodeStatus. Only the nodes that are matching the specified filter + * value will be returned. The filter value can be one of the following. + * Possible values include: 'default', 'all', 'up', 'down', 'enabling', + * 'disabling', 'disabled', 'unknown', 'removed' + * * @param {number} [options.maxResults] The maximum number of results to be * returned as part of the paged queries. This parameter defines the upper * bound on the number of results returned. The results returned can be less @@ -43852,7 +41272,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {PagedApplicationTypeInfoList} - The deserialized result object. + * @resolve {PagedNodeInfoList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -43861,14 +41281,13 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PagedApplicationTypeInfoList} for more - * information. + * See {@link PagedNodeInfoList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getApplicationTypeInfoListByName(applicationTypeName, options, optionalCallback) { + getNodeInfoList(options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -43877,43 +41296,25 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getApplicationTypeInfoListByName(applicationTypeName, options, (err, result, request, response) => { + self._getNodeInfoList(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getApplicationTypeInfoListByName(applicationTypeName, options, optionalCallback); + return self._getNodeInfoList(options, optionalCallback); } } /** - * @summary Provisions or registers a Service Fabric application type with the - * cluster using the '.sfpkg' package in the external store or using the - * application package in the image store. - * - * Provisions a Service Fabric application type with the cluster. The provision - * is required before any new applications can be instantiated. - * The provision operation can be performed either on the application package - * specified by the relativePathInImageStore, or by using the URI of the - * external '.sfpkg'. - * - * @param {object} provisionApplicationTypeDescriptionBaseRequiredBodyParam The - * base type of provision application type description which supports either - * image store-based provision or external store-based provision. + * @summary Gets the information about a specific node in the Service Fabric + * cluster. * - * @param {boolean} - * provisionApplicationTypeDescriptionBaseRequiredBodyParam.async Indicates - * whether or not provisioning should occur asynchronously. When set to true, - * the provision operation returns when the request is accepted by the system, - * and the provision operation continues without any timeout limit. The default - * value is false. For large application packages, we recommend setting the - * value to true. + * The response includes the name, status, ID, health, uptime, and other + * details about the node. * - * @param {string} - * provisionApplicationTypeDescriptionBaseRequiredBodyParam.kind Polymorphic - * Discriminator + * @param {string} nodeName The name of the node. * * @param {object} [options] Optional Parameters. * @@ -43927,15 +41328,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - provisionApplicationTypeWithHttpOperationResponse(provisionApplicationTypeDescriptionBaseRequiredBodyParam, options) { + getNodeInfoWithHttpOperationResponse(nodeName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._provisionApplicationType(provisionApplicationTypeDescriptionBaseRequiredBodyParam, options, (err, result, request, response) => { + self._getNodeInfo(nodeName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -43946,31 +41347,13 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Provisions or registers a Service Fabric application type with the - * cluster using the '.sfpkg' package in the external store or using the - * application package in the image store. - * - * Provisions a Service Fabric application type with the cluster. The provision - * is required before any new applications can be instantiated. - * The provision operation can be performed either on the application package - * specified by the relativePathInImageStore, or by using the URI of the - * external '.sfpkg'. - * - * @param {object} provisionApplicationTypeDescriptionBaseRequiredBodyParam The - * base type of provision application type description which supports either - * image store-based provision or external store-based provision. + * @summary Gets the information about a specific node in the Service Fabric + * cluster. * - * @param {boolean} - * provisionApplicationTypeDescriptionBaseRequiredBodyParam.async Indicates - * whether or not provisioning should occur asynchronously. When set to true, - * the provision operation returns when the request is accepted by the system, - * and the provision operation continues without any timeout limit. The default - * value is false. For large application packages, we recommend setting the - * value to true. + * The response includes the name, status, ID, health, uptime, and other + * details about the node. * - * @param {string} - * provisionApplicationTypeDescriptionBaseRequiredBodyParam.kind Polymorphic - * Discriminator + * @param {string} nodeName The name of the node. * * @param {object} [options] Optional Parameters. * @@ -43989,7 +41372,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {NodeInfo} - The deserialized result object. * * @reject {Error} - The error object. * @@ -43997,13 +41380,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link NodeInfo} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - provisionApplicationType(provisionApplicationTypeDescriptionBaseRequiredBodyParam, options, optionalCallback) { + getNodeInfo(nodeName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -44012,44 +41396,51 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._provisionApplicationType(provisionApplicationTypeDescriptionBaseRequiredBodyParam, options, (err, result, request, response) => { + self._getNodeInfo(nodeName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._provisionApplicationType(provisionApplicationTypeDescriptionBaseRequiredBodyParam, options, optionalCallback); + return self._getNodeInfo(nodeName, options, optionalCallback); } } /** - * @summary Removes or unregisters a Service Fabric application type from the - * cluster. - * - * This operation can only be performed if all application instances of the - * application type have been deleted. Once the application type is - * unregistered, no new application instances can be created for this - * particular application type. + * @summary Gets the health of a Service Fabric node. * - * @param {string} applicationTypeName The name of the application type. + * Gets the health of a Service Fabric node. Use EventsHealthStateFilter to + * filter the collection of health events reported on the node based on the + * health state. If the node that you specify by name does not exist in the + * health store, this returns an error. * - * @param {object} unprovisionApplicationTypeDescriptionInfo The relative path - * for the application package in the image store specified during the prior - * copy operation. + * @param {string} nodeName The name of the node. * - * @param {string} - * unprovisionApplicationTypeDescriptionInfo.applicationTypeVersion The version - * of the application type as defined in the application manifest. + * @param {object} [options] Optional Parameters. * - * @param {boolean} [unprovisionApplicationTypeDescriptionInfo.async] The flag - * indicating whether or not unprovision should occur asynchronously. When set - * to true, the unprovision operation returns when the request is accepted by - * the system, and the unprovision operation continues without any timeout - * limit. The default value is false. However, we recommend setting it to true - * for large application packages that were provisioned. + * @param {number} [options.eventsHealthStateFilter] Allows filtering the + * collection of HealthEvent objects returned based on health state. + * The possible values for this parameter include integer value of one of the + * following health states. + * Only events that match the filter are returned. All events are used to + * evaluate the aggregated health state. + * If not specified, all entries are returned. The state values are flag-based + * enumeration, so the value could be a combination of these values, obtained + * using the bitwise 'OR' operator. For example, If the provided value is 6 + * then all of the events with HealthState value of OK (2) and Warning (4) are + * returned. * - * @param {object} [options] Optional Parameters. + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -44061,15 +41452,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - unprovisionApplicationTypeWithHttpOperationResponse(applicationTypeName, unprovisionApplicationTypeDescriptionInfo, options) { + getNodeHealthWithHttpOperationResponse(nodeName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._unprovisionApplicationType(applicationTypeName, unprovisionApplicationTypeDescriptionInfo, options, (err, result, request, response) => { + self._getNodeHealth(nodeName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -44080,32 +41471,39 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Removes or unregisters a Service Fabric application type from the - * cluster. - * - * This operation can only be performed if all application instances of the - * application type have been deleted. Once the application type is - * unregistered, no new application instances can be created for this - * particular application type. + * @summary Gets the health of a Service Fabric node. * - * @param {string} applicationTypeName The name of the application type. + * Gets the health of a Service Fabric node. Use EventsHealthStateFilter to + * filter the collection of health events reported on the node based on the + * health state. If the node that you specify by name does not exist in the + * health store, this returns an error. * - * @param {object} unprovisionApplicationTypeDescriptionInfo The relative path - * for the application package in the image store specified during the prior - * copy operation. + * @param {string} nodeName The name of the node. * - * @param {string} - * unprovisionApplicationTypeDescriptionInfo.applicationTypeVersion The version - * of the application type as defined in the application manifest. + * @param {object} [options] Optional Parameters. * - * @param {boolean} [unprovisionApplicationTypeDescriptionInfo.async] The flag - * indicating whether or not unprovision should occur asynchronously. When set - * to true, the unprovision operation returns when the request is accepted by - * the system, and the unprovision operation continues without any timeout - * limit. The default value is false. However, we recommend setting it to true - * for large application packages that were provisioned. + * @param {number} [options.eventsHealthStateFilter] Allows filtering the + * collection of HealthEvent objects returned based on health state. + * The possible values for this parameter include integer value of one of the + * following health states. + * Only events that match the filter are returned. All events are used to + * evaluate the aggregated health state. + * If not specified, all entries are returned. The state values are flag-based + * enumeration, so the value could be a combination of these values, obtained + * using the bitwise 'OR' operator. For example, If the provided value is 6 + * then all of the events with HealthState value of OK (2) and Warning (4) are + * returned. * - * @param {object} [options] Optional Parameters. + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -44122,7 +41520,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {NodeHealth} - The deserialized result object. * * @reject {Error} - The error object. * @@ -44130,13 +41528,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link NodeHealth} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - unprovisionApplicationType(applicationTypeName, unprovisionApplicationTypeDescriptionInfo, options, optionalCallback) { + getNodeHealth(nodeName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -44145,30 +41544,118 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._unprovisionApplicationType(applicationTypeName, unprovisionApplicationTypeDescriptionInfo, options, (err, result, request, response) => { + self._getNodeHealth(nodeName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._unprovisionApplicationType(applicationTypeName, unprovisionApplicationTypeDescriptionInfo, options, optionalCallback); + return self._getNodeHealth(nodeName, options, optionalCallback); } } /** - * @summary Gets the list containing the information about service types that - * are supported by a provisioned application type in a Service Fabric cluster. + * @summary Gets the health of a Service Fabric node, by using the specified + * health policy. + * + * Gets the health of a Service Fabric node. Use EventsHealthStateFilter to + * filter the collection of health events reported on the node based on the + * health state. Use ClusterHealthPolicy in the POST body to override the + * health policies used to evaluate the health. If the node that you specify by + * name does not exist in the health store, this returns an error. + * + * @param {string} nodeName The name of the node. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.eventsHealthStateFilter] Allows filtering the + * collection of HealthEvent objects returned based on health state. + * The possible values for this parameter include integer value of one of the + * following health states. + * Only events that match the filter are returned. All events are used to + * evaluate the aggregated health state. + * If not specified, all entries are returned. The state values are flag-based + * enumeration, so the value could be a combination of these values, obtained + * using the bitwise 'OR' operator. For example, If the provided value is 6 + * then all of the events with HealthState value of OK (2) and Warning (4) are + * returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * @param {object} [options.clusterHealthPolicy] Describes the health policies + * used to evaluate the health of a cluster or node. If not present, the health + * evaluation uses the health policy from cluster manifest or the default + * health policy. + * + * @param {boolean} [options.clusterHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. + * + * @param {number} [options.clusterHealthPolicy.maxPercentUnhealthyNodes] The + * maximum allowed percentage of unhealthy nodes before reporting an error. For + * example, to allow 10% of nodes to be unhealthy, this value would be 10. * - * Gets the list containing the information about service types that are - * supported by a provisioned application type in a Service Fabric cluster. The - * provided application type must exist. Otherwise, a 404 status is returned. + * The percentage represents the maximum tolerated percentage of nodes that can + * be unhealthy before the cluster is considered in error. + * If the percentage is respected but there is at least one unhealthy node, the + * health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy nodes over + * the total number of nodes in the cluster. + * The computation rounds up to tolerate one failure on small numbers of nodes. + * Default percentage is zero. * - * @param {string} applicationTypeName The name of the application type. + * In large clusters, some nodes will always be down or out for repairs, so + * this percentage should be configured to tolerate that. * - * @param {string} applicationTypeVersion The version of the application type. + * @param {number} + * [options.clusterHealthPolicy.maxPercentUnhealthyApplications] The maximum + * allowed percentage of unhealthy applications before reporting an error. For + * example, to allow 10% of applications to be unhealthy, this value would be + * 10. * - * @param {object} [options] Optional Parameters. + * The percentage represents the maximum tolerated percentage of applications + * that can be unhealthy before the cluster is considered in error. + * If the percentage is respected but there is at least one unhealthy + * application, the health is evaluated as Warning. + * This is calculated by dividing the number of unhealthy applications over the + * total number of application instances in the cluster, excluding applications + * of application types that are included in the + * ApplicationTypeHealthPolicyMap. + * The computation rounds up to tolerate one failure on small numbers of + * applications. Default percentage is zero. + * + * @param {array} [options.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * Defines a map with max percentage unhealthy applications for specific + * application types. + * Each entry specifies as key the application type name and as value an + * integer that represents the MaxPercentUnhealthyApplications percentage used + * to evaluate the applications of the specified application type. + * + * The application type health policy map can be used during cluster health + * evaluation to describe special application types. + * The application types included in the map are evaluated against the + * percentage specified in the map, and not with the global + * MaxPercentUnhealthyApplications defined in the cluster health policy. + * The applications of application types specified in the map are not counted + * against the global pool of applications. + * For example, if some applications of a type are critical, the cluster + * administrator can add an entry to the map for that application type + * and assign it a value of 0% (that is, do not tolerate any failures). + * All other applications can be evaluated with MaxPercentUnhealthyApplications + * set to 20% to tolerate some failures out of the thousands of application + * instances. + * The application type health policy map is used only if the cluster manifest + * enables application type health evaluation using the configuration entry for + * HealthManager/EnableApplicationTypeHealthEvaluation. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -44180,15 +41667,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getServiceTypeInfoListWithHttpOperationResponse(applicationTypeName, applicationTypeVersion, options) { + getNodeHealthUsingPolicyWithHttpOperationResponse(nodeName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getServiceTypeInfoList(applicationTypeName, applicationTypeVersion, options, (err, result, request, response) => { + self._getNodeHealthUsingPolicy(nodeName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -44199,19 +41686,107 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the list containing the information about service types that - * are supported by a provisioned application type in a Service Fabric cluster. - * - * Gets the list containing the information about service types that are - * supported by a provisioned application type in a Service Fabric cluster. The - * provided application type must exist. Otherwise, a 404 status is returned. + * @summary Gets the health of a Service Fabric node, by using the specified + * health policy. * - * @param {string} applicationTypeName The name of the application type. + * Gets the health of a Service Fabric node. Use EventsHealthStateFilter to + * filter the collection of health events reported on the node based on the + * health state. Use ClusterHealthPolicy in the POST body to override the + * health policies used to evaluate the health. If the node that you specify by + * name does not exist in the health store, this returns an error. * - * @param {string} applicationTypeVersion The version of the application type. + * @param {string} nodeName The name of the node. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.eventsHealthStateFilter] Allows filtering the + * collection of HealthEvent objects returned based on health state. + * The possible values for this parameter include integer value of one of the + * following health states. + * Only events that match the filter are returned. All events are used to + * evaluate the aggregated health state. + * If not specified, all entries are returned. The state values are flag-based + * enumeration, so the value could be a combination of these values, obtained + * using the bitwise 'OR' operator. For example, If the provided value is 6 + * then all of the events with HealthState value of OK (2) and Warning (4) are + * returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * @param {object} [options.clusterHealthPolicy] Describes the health policies + * used to evaluate the health of a cluster or node. If not present, the health + * evaluation uses the health policy from cluster manifest or the default + * health policy. + * + * @param {boolean} [options.clusterHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. + * + * @param {number} [options.clusterHealthPolicy.maxPercentUnhealthyNodes] The + * maximum allowed percentage of unhealthy nodes before reporting an error. For + * example, to allow 10% of nodes to be unhealthy, this value would be 10. + * + * The percentage represents the maximum tolerated percentage of nodes that can + * be unhealthy before the cluster is considered in error. + * If the percentage is respected but there is at least one unhealthy node, the + * health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy nodes over + * the total number of nodes in the cluster. + * The computation rounds up to tolerate one failure on small numbers of nodes. + * Default percentage is zero. + * + * In large clusters, some nodes will always be down or out for repairs, so + * this percentage should be configured to tolerate that. + * + * @param {number} + * [options.clusterHealthPolicy.maxPercentUnhealthyApplications] The maximum + * allowed percentage of unhealthy applications before reporting an error. For + * example, to allow 10% of applications to be unhealthy, this value would be + * 10. + * + * The percentage represents the maximum tolerated percentage of applications + * that can be unhealthy before the cluster is considered in error. + * If the percentage is respected but there is at least one unhealthy + * application, the health is evaluated as Warning. + * This is calculated by dividing the number of unhealthy applications over the + * total number of application instances in the cluster, excluding applications + * of application types that are included in the + * ApplicationTypeHealthPolicyMap. + * The computation rounds up to tolerate one failure on small numbers of + * applications. Default percentage is zero. + * + * @param {array} [options.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * Defines a map with max percentage unhealthy applications for specific + * application types. + * Each entry specifies as key the application type name and as value an + * integer that represents the MaxPercentUnhealthyApplications percentage used + * to evaluate the applications of the specified application type. + * + * The application type health policy map can be used during cluster health + * evaluation to describe special application types. + * The application types included in the map are evaluated against the + * percentage specified in the map, and not with the global + * MaxPercentUnhealthyApplications defined in the cluster health policy. + * The applications of application types specified in the map are not counted + * against the global pool of applications. + * For example, if some applications of a type are critical, the cluster + * administrator can add an entry to the map for that application type + * and assign it a value of 0% (that is, do not tolerate any failures). + * All other applications can be evaluated with MaxPercentUnhealthyApplications + * set to 20% to tolerate some failures out of the thousands of application + * instances. + * The application type health policy map is used only if the cluster manifest + * enables application type health evaluation using the configuration entry for + * HealthManager/EnableApplicationTypeHealthEvaluation. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -44227,7 +41802,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {Array} - The deserialized result object. + * @resolve {NodeHealth} - The deserialized result object. * * @reject {Error} - The error object. * @@ -44235,13 +41810,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link NodeHealth} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getServiceTypeInfoList(applicationTypeName, applicationTypeVersion, options, optionalCallback) { + getNodeHealthUsingPolicy(nodeName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -44250,36 +41826,125 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getServiceTypeInfoList(applicationTypeName, applicationTypeVersion, options, (err, result, request, response) => { + self._getNodeHealthUsingPolicy(nodeName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getServiceTypeInfoList(applicationTypeName, applicationTypeVersion, options, optionalCallback); + return self._getNodeHealthUsingPolicy(nodeName, options, optionalCallback); } } /** - * @summary Gets the information about a specific service type that is - * supported by a provisioned application type in a Service Fabric cluster. + * @summary Sends a health report on the Service Fabric node. * - * Gets the information about a specific service type that is supported by a - * provisioned application type in a Service Fabric cluster. The provided - * application type must exist. Otherwise, a 404 status is returned. A 204 - * response is returned if the specificed service type is not found in the - * cluster. + * Reports health state of the specified Service Fabric node. The report must + * contain the information about the source of the health report and property + * on which it is reported. + * The report is sent to a Service Fabric gateway node, which forwards to the + * health store. + * The report may be accepted by the gateway, but rejected by the health store + * after extra validation. + * For example, the health store may reject the report because of an invalid + * parameter, like a stale sequence number. + * To see whether the report was applied in the health store, run GetNodeHealth + * and check that the report appears in the HealthEvents section. * - * @param {string} applicationTypeName The name of the application type. + * @param {string} nodeName The name of the node. * - * @param {string} applicationTypeVersion The version of the application type. + * @param {object} healthInformation Describes the health information for the + * health report. This information needs to be present in all of the health + * reports sent to the health manager. * - * @param {string} serviceTypeName Specifies the name of a Service Fabric - * service type. + * @param {string} healthInformation.sourceId The source name that identifies + * the client/watchdog/system component that generated the health information. + * + * @param {string} healthInformation.property The property of the health + * information. An entity can have health reports for different properties. + * The property is a string and not a fixed enumeration to allow the reporter + * flexibility to categorize the state condition that triggers the report. + * For example, a reporter with SourceId "LocalWatchdog" can monitor the state + * of the available disk on a node, + * so it can report "AvailableDisk" property on that node. + * The same reporter can monitor the node connectivity, so it can report a + * property "Connectivity" on the same node. + * In the health store, these reports are treated as separate health events for + * the specified node. + * + * Together with the SourceId, the property uniquely identifies the health + * information. + * + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' + * + * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The + * duration for which this health report is valid. This field uses ISO8601 + * format for specifying the duration. + * When clients report periodically, they should send reports with higher + * frequency than time to live. + * If clients report on transition, they can set the time to live to infinite. + * When time to live expires, the health event that contains the health + * information + * is either removed from health store, if RemoveWhenExpired is true, or + * evaluated at error, if RemoveWhenExpired false. + * + * If not specified, time to live defaults to infinite value. + * + * @param {string} [healthInformation.description] The description of the + * health information. It represents free text used to add human readable + * information about the report. + * The maximum string length for the description is 4096 characters. + * If the provided string is longer, it will be automatically truncated. + * When truncated, the last characters of the description contain a marker + * "[Truncated]", and total string size is 4096 characters. + * The presence of the marker indicates to users that truncation occurred. + * Note that when truncated, the description has less than 4096 characters from + * the original string. + * + * @param {string} [healthInformation.sequenceNumber] The sequence number for + * this health report as a numeric string. + * The report sequence number is used by the health store to detect stale + * reports. + * If not specified, a sequence number is auto-generated by the health client + * when a report is added. + * + * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates + * whether the report is removed from health store when it expires. + * If set to true, the report is removed from the health store after it + * expires. + * If set to false, the report is treated as an error when expired. The value + * of this property is false by default. + * When clients report periodically, they should set RemoveWhenExpired false + * (default). + * This way, if the reporter has issues (e.g. deadlock) and can't report, the + * entity is evaluated at error when the health report expires. + * This flags the entity as being in Error health state. * * @param {object} [options] Optional Parameters. * + * @param {boolean} [options.immediate] A flag that indicates whether the + * report should be sent immediately. + * A health report is sent to a Service Fabric gateway Application, which + * forwards to the health store. + * If Immediate is set to true, the report is sent immediately from HTTP + * Gateway to the health store, regardless of the fabric client settings that + * the HTTP Gateway Application is using. + * This is useful for critical reports that should be sent as soon as possible. + * Depending on timing and other conditions, sending the report may still fail, + * for example if the HTTP Gateway is closed or the message doesn't reach the + * Gateway. + * If Immediate is set to false, the report is sent based on the health client + * settings from the HTTP Gateway. Therefore, it will be batched according to + * the HealthReportSendInterval configuration. + * This is the recommended setting because it allows the health client to + * optimize health reporting messages to health store as well as health report + * processing. + * By default, reports are not sent immediately. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -44290,15 +41955,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getServiceTypeInfoByNameWithHttpOperationResponse(applicationTypeName, applicationTypeVersion, serviceTypeName, options) { + reportNodeHealthWithHttpOperationResponse(nodeName, healthInformation, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getServiceTypeInfoByName(applicationTypeName, applicationTypeVersion, serviceTypeName, options, (err, result, request, response) => { + self._reportNodeHealth(nodeName, healthInformation, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -44309,24 +41974,113 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the information about a specific service type that is - * supported by a provisioned application type in a Service Fabric cluster. + * @summary Sends a health report on the Service Fabric node. * - * Gets the information about a specific service type that is supported by a - * provisioned application type in a Service Fabric cluster. The provided - * application type must exist. Otherwise, a 404 status is returned. A 204 - * response is returned if the specificed service type is not found in the - * cluster. + * Reports health state of the specified Service Fabric node. The report must + * contain the information about the source of the health report and property + * on which it is reported. + * The report is sent to a Service Fabric gateway node, which forwards to the + * health store. + * The report may be accepted by the gateway, but rejected by the health store + * after extra validation. + * For example, the health store may reject the report because of an invalid + * parameter, like a stale sequence number. + * To see whether the report was applied in the health store, run GetNodeHealth + * and check that the report appears in the HealthEvents section. * - * @param {string} applicationTypeName The name of the application type. + * @param {string} nodeName The name of the node. * - * @param {string} applicationTypeVersion The version of the application type. + * @param {object} healthInformation Describes the health information for the + * health report. This information needs to be present in all of the health + * reports sent to the health manager. * - * @param {string} serviceTypeName Specifies the name of a Service Fabric - * service type. + * @param {string} healthInformation.sourceId The source name that identifies + * the client/watchdog/system component that generated the health information. + * + * @param {string} healthInformation.property The property of the health + * information. An entity can have health reports for different properties. + * The property is a string and not a fixed enumeration to allow the reporter + * flexibility to categorize the state condition that triggers the report. + * For example, a reporter with SourceId "LocalWatchdog" can monitor the state + * of the available disk on a node, + * so it can report "AvailableDisk" property on that node. + * The same reporter can monitor the node connectivity, so it can report a + * property "Connectivity" on the same node. + * In the health store, these reports are treated as separate health events for + * the specified node. + * + * Together with the SourceId, the property uniquely identifies the health + * information. + * + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' + * + * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The + * duration for which this health report is valid. This field uses ISO8601 + * format for specifying the duration. + * When clients report periodically, they should send reports with higher + * frequency than time to live. + * If clients report on transition, they can set the time to live to infinite. + * When time to live expires, the health event that contains the health + * information + * is either removed from health store, if RemoveWhenExpired is true, or + * evaluated at error, if RemoveWhenExpired false. + * + * If not specified, time to live defaults to infinite value. + * + * @param {string} [healthInformation.description] The description of the + * health information. It represents free text used to add human readable + * information about the report. + * The maximum string length for the description is 4096 characters. + * If the provided string is longer, it will be automatically truncated. + * When truncated, the last characters of the description contain a marker + * "[Truncated]", and total string size is 4096 characters. + * The presence of the marker indicates to users that truncation occurred. + * Note that when truncated, the description has less than 4096 characters from + * the original string. + * + * @param {string} [healthInformation.sequenceNumber] The sequence number for + * this health report as a numeric string. + * The report sequence number is used by the health store to detect stale + * reports. + * If not specified, a sequence number is auto-generated by the health client + * when a report is added. + * + * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates + * whether the report is removed from health store when it expires. + * If set to true, the report is removed from the health store after it + * expires. + * If set to false, the report is treated as an error when expired. The value + * of this property is false by default. + * When clients report periodically, they should set RemoveWhenExpired false + * (default). + * This way, if the reporter has issues (e.g. deadlock) and can't report, the + * entity is evaluated at error when the health report expires. + * This flags the entity as being in Error health state. * * @param {object} [options] Optional Parameters. * + * @param {boolean} [options.immediate] A flag that indicates whether the + * report should be sent immediately. + * A health report is sent to a Service Fabric gateway Application, which + * forwards to the health store. + * If Immediate is set to true, the report is sent immediately from HTTP + * Gateway to the health store, regardless of the fabric client settings that + * the HTTP Gateway Application is using. + * This is useful for critical reports that should be sent as soon as possible. + * Depending on timing and other conditions, sending the report may still fail, + * for example if the HTTP Gateway is closed or the message doesn't reach the + * Gateway. + * If Immediate is set to false, the report is sent based on the health client + * settings from the HTTP Gateway. Therefore, it will be batched according to + * the HealthReportSendInterval configuration. + * This is the recommended setting because it allows the health client to + * optimize health reporting messages to health store as well as health report + * processing. + * By default, reports are not sent immediately. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -44342,7 +42096,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ServiceTypeInfo} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -44350,14 +42104,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ServiceTypeInfo} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getServiceTypeInfoByName(applicationTypeName, applicationTypeVersion, serviceTypeName, options, optionalCallback) { + reportNodeHealth(nodeName, healthInformation, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -44366,29 +42119,24 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getServiceTypeInfoByName(applicationTypeName, applicationTypeVersion, serviceTypeName, options, (err, result, request, response) => { + self._reportNodeHealth(nodeName, healthInformation, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getServiceTypeInfoByName(applicationTypeName, applicationTypeVersion, serviceTypeName, options, optionalCallback); + return self._reportNodeHealth(nodeName, healthInformation, options, optionalCallback); } } /** - * @summary Gets the manifest describing a service type. - * - * Gets the manifest describing a service type. The response contains the - * service manifest XML as a string. - * - * @param {string} applicationTypeName The name of the application type. + * @summary Gets the load information of a Service Fabric node. * - * @param {string} applicationTypeVersion The version of the application type. + * Retrieves the load information of a Service Fabric node for all the metrics + * that have load or capacity defined. * - * @param {string} serviceManifestName The name of a service manifest - * registered as part of an application type in a Service Fabric cluster. + * @param {string} nodeName The name of the node. * * @param {object} [options] Optional Parameters. * @@ -44402,15 +42150,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getServiceManifestWithHttpOperationResponse(applicationTypeName, applicationTypeVersion, serviceManifestName, options) { + getNodeLoadInfoWithHttpOperationResponse(nodeName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getServiceManifest(applicationTypeName, applicationTypeVersion, serviceManifestName, options, (err, result, request, response) => { + self._getNodeLoadInfo(nodeName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -44421,17 +42169,12 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the manifest describing a service type. - * - * Gets the manifest describing a service type. The response contains the - * service manifest XML as a string. - * - * @param {string} applicationTypeName The name of the application type. + * @summary Gets the load information of a Service Fabric node. * - * @param {string} applicationTypeVersion The version of the application type. + * Retrieves the load information of a Service Fabric node for all the metrics + * that have load or capacity defined. * - * @param {string} serviceManifestName The name of a service manifest - * registered as part of an application type in a Service Fabric cluster. + * @param {string} nodeName The name of the node. * * @param {object} [options] Optional Parameters. * @@ -44450,7 +42193,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ServiceTypeManifest} - The deserialized result object. + * @resolve {NodeLoadInfo} - The deserialized result object. * * @reject {Error} - The error object. * @@ -44459,13 +42202,13 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ServiceTypeManifest} for more information. + * See {@link NodeLoadInfo} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getServiceManifest(applicationTypeName, applicationTypeVersion, serviceManifestName, options, optionalCallback) { + getNodeLoadInfo(nodeName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -44474,42 +42217,41 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getServiceManifest(applicationTypeName, applicationTypeVersion, serviceManifestName, options, (err, result, request, response) => { + self._getNodeLoadInfo(nodeName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getServiceManifest(applicationTypeName, applicationTypeVersion, serviceManifestName, options, optionalCallback); + return self._getNodeLoadInfo(nodeName, options, optionalCallback); } } /** - * @summary Gets the list containing the information about service types from - * the applications deployed on a node in a Service Fabric cluster. + * @summary Deactivate a Service Fabric cluster node with the specified + * deactivation intent. * - * Gets the list containing the information about service types from the - * applications deployed on a node in a Service Fabric cluster. The response - * includes the name of the service type, its registration status, the code - * package that registered it and activation ID of the service package. + * Deactivate a Service Fabric cluster node with the specified deactivation + * intent. Once the deactivation is in progress, the deactivation intent can be + * increased, but not decreased (for example, a node that is deactivated with + * the Pause intent can be deactivated further with Restart, but not the other + * way around. Nodes may be reactivated using the Activate a node operation any + * time after they are deactivated. If the deactivation is not complete, this + * will cancel the deactivation. A node that goes down and comes back up while + * deactivated will still need to be reactivated before services will be placed + * on that node. * * @param {string} nodeName The name of the node. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. + * @param {object} deactivationIntentDescription Describes the intent or reason + * for deactivating the node. * - * @param {object} [options] Optional Parameters. + * @param {string} [deactivationIntentDescription.deactivationIntent] Describes + * the intent or reason for deactivating the node. The possible values are + * following. Possible values include: 'Pause', 'Restart', 'RemoveData' * - * @param {string} [options.serviceManifestName] The name of the service - * manifest to filter the list of deployed service type information. If - * specified, the response will only contain the information about service - * types that are defined in this service manifest. + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -44521,15 +42263,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getDeployedServiceTypeInfoListWithHttpOperationResponse(nodeName, applicationId, options) { + disableNodeWithHttpOperationResponse(nodeName, deactivationIntentDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getDeployedServiceTypeInfoList(nodeName, applicationId, options, (err, result, request, response) => { + self._disableNode(nodeName, deactivationIntentDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -44540,30 +42282,29 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the list containing the information about service types from - * the applications deployed on a node in a Service Fabric cluster. + * @summary Deactivate a Service Fabric cluster node with the specified + * deactivation intent. * - * Gets the list containing the information about service types from the - * applications deployed on a node in a Service Fabric cluster. The response - * includes the name of the service type, its registration status, the code - * package that registered it and activation ID of the service package. + * Deactivate a Service Fabric cluster node with the specified deactivation + * intent. Once the deactivation is in progress, the deactivation intent can be + * increased, but not decreased (for example, a node that is deactivated with + * the Pause intent can be deactivated further with Restart, but not the other + * way around. Nodes may be reactivated using the Activate a node operation any + * time after they are deactivated. If the deactivation is not complete, this + * will cancel the deactivation. A node that goes down and comes back up while + * deactivated will still need to be reactivated before services will be placed + * on that node. * * @param {string} nodeName The name of the node. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. + * @param {object} deactivationIntentDescription Describes the intent or reason + * for deactivating the node. * - * @param {object} [options] Optional Parameters. + * @param {string} [deactivationIntentDescription.deactivationIntent] Describes + * the intent or reason for deactivating the node. The possible values are + * following. Possible values include: 'Pause', 'Restart', 'RemoveData' * - * @param {string} [options.serviceManifestName] The name of the service - * manifest to filter the list of deployed service type information. If - * specified, the response will only contain the information about service - * types that are defined in this service manifest. + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -44580,7 +42321,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {Array} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -44588,13 +42329,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getDeployedServiceTypeInfoList(nodeName, applicationId, options, optionalCallback) { + disableNode(nodeName, deactivationIntentDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -44603,48 +42344,30 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getDeployedServiceTypeInfoList(nodeName, applicationId, options, (err, result, request, response) => { + self._disableNode(nodeName, deactivationIntentDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getDeployedServiceTypeInfoList(nodeName, applicationId, options, optionalCallback); + return self._disableNode(nodeName, deactivationIntentDescription, options, optionalCallback); } } /** - * @summary Gets the information about a specified service type of the - * application deployed on a node in a Service Fabric cluster. + * @summary Activate a Service Fabric cluster node that is currently + * deactivated. * - * Gets the list containing the information about a specific service type from - * the applications deployed on a node in a Service Fabric cluster. The - * response includes the name of the service type, its registration status, the - * code package that registered it and activation ID of the service package. - * Each entry represents one activation of a service type, differentiated by - * the activation ID. + * Activates a Service Fabric cluster node that is currently deactivated. Once + * activated, the node will again become a viable target for placing new + * replicas, and any deactivated replicas remaining on the node will be + * reactivated. * * @param {string} nodeName The name of the node. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. - * - * @param {string} serviceTypeName Specifies the name of a Service Fabric - * service type. - * * @param {object} [options] Optional Parameters. * - * @param {string} [options.serviceManifestName] The name of the service - * manifest to filter the list of deployed service type information. If - * specified, the response will only contain the information about service - * types that are defined in this service manifest. - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -44655,15 +42378,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getDeployedServiceTypeInfoByNameWithHttpOperationResponse(nodeName, applicationId, serviceTypeName, options) { + enableNodeWithHttpOperationResponse(nodeName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getDeployedServiceTypeInfoByName(nodeName, applicationId, serviceTypeName, options, (err, result, request, response) => { + self._enableNode(nodeName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -44674,36 +42397,18 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the information about a specified service type of the - * application deployed on a node in a Service Fabric cluster. + * @summary Activate a Service Fabric cluster node that is currently + * deactivated. * - * Gets the list containing the information about a specific service type from - * the applications deployed on a node in a Service Fabric cluster. The - * response includes the name of the service type, its registration status, the - * code package that registered it and activation ID of the service package. - * Each entry represents one activation of a service type, differentiated by - * the activation ID. + * Activates a Service Fabric cluster node that is currently deactivated. Once + * activated, the node will again become a viable target for placing new + * replicas, and any deactivated replicas remaining on the node will be + * reactivated. * * @param {string} nodeName The name of the node. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. - * - * @param {string} serviceTypeName Specifies the name of a Service Fabric - * service type. - * * @param {object} [options] Optional Parameters. * - * @param {string} [options.serviceManifestName] The name of the service - * manifest to filter the list of deployed service type information. If - * specified, the response will only contain the information about service - * types that are defined in this service manifest. - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -44719,7 +42424,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {Array} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -44727,13 +42432,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getDeployedServiceTypeInfoByName(nodeName, applicationId, serviceTypeName, options, optionalCallback) { + enableNode(nodeName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -44742,64 +42447,31 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getDeployedServiceTypeInfoByName(nodeName, applicationId, serviceTypeName, options, (err, result, request, response) => { + self._enableNode(nodeName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getDeployedServiceTypeInfoByName(nodeName, applicationId, serviceTypeName, options, optionalCallback); + return self._enableNode(nodeName, options, optionalCallback); } } /** - * @summary Creates a Service Fabric application. - * - * Creates a Service Fabric application using the specified description. - * - * @param {object} applicationDescription Description for creating an - * application. - * - * @param {string} applicationDescription.name The name of the application, - * including the 'fabric:' URI scheme. - * - * @param {string} applicationDescription.typeName The application type name as - * defined in the application manifest. - * - * @param {string} applicationDescription.typeVersion The version of the - * application type as defined in the application manifest. - * - * @param {array} [applicationDescription.parameterList] List of application - * parameters with overridden values from their default values specified in the - * application manifest. - * - * @param {object} [applicationDescription.applicationCapacity] Describes - * capacity information for services of this application. This description can - * be used for describing the following. - * - Reserving the capacity for the services on the nodes - * - Limiting the total number of nodes that services of this application can - * run on - * - Limiting the custom capacity metrics to limit the total consumption of - * this metric by the services of this application - * - * @param {number} [applicationDescription.applicationCapacity.minimumNodes] - * The minimum number of nodes where Service Fabric will reserve capacity for - * this application. Note that this does not mean that the services of this - * application will be placed on all of those nodes. If this property is set to - * zero, no capacity will be reserved. The value of this property cannot be - * more than the value of the MaximumNodes property. + * @summary Notifies Service Fabric that the persisted state on a node has been + * permanently removed or lost. * - * @param {number} [applicationDescription.applicationCapacity.maximumNodes] - * The maximum number of nodes where Service Fabric will reserve capacity for - * this application. Note that this does not mean that the services of this - * application will be placed on all of those nodes. By default, the value of - * this property is zero and it means that the services can be placed on any - * node. + * This implies that it is not possible to recover the persisted state of that + * node. This generally happens if a hard disk has been wiped clean, or if a + * hard disk crashes. The node has to be down for this operation to be + * successful. This operation lets Service Fabric know that the replicas on + * that node no longer exist, and that Service Fabric should stop waiting for + * those replicas to come back up. Do not run this cmdlet if the state on the + * node has not been removed and the node can come back up with its state + * intact. * - * @param {array} - * [applicationDescription.applicationCapacity.applicationMetrics] List of - * application capacity metric description. + * @param {string} nodeName The name of the node. * * @param {object} [options] Optional Parameters. * @@ -44817,11 +42489,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - createApplicationWithHttpOperationResponse(applicationDescription, options) { + removeNodeStateWithHttpOperationResponse(nodeName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._createApplication(applicationDescription, options, (err, result, request, response) => { + self._removeNodeState(nodeName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -44832,52 +42504,19 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Creates a Service Fabric application. - * - * Creates a Service Fabric application using the specified description. - * - * @param {object} applicationDescription Description for creating an - * application. - * - * @param {string} applicationDescription.name The name of the application, - * including the 'fabric:' URI scheme. - * - * @param {string} applicationDescription.typeName The application type name as - * defined in the application manifest. - * - * @param {string} applicationDescription.typeVersion The version of the - * application type as defined in the application manifest. - * - * @param {array} [applicationDescription.parameterList] List of application - * parameters with overridden values from their default values specified in the - * application manifest. - * - * @param {object} [applicationDescription.applicationCapacity] Describes - * capacity information for services of this application. This description can - * be used for describing the following. - * - Reserving the capacity for the services on the nodes - * - Limiting the total number of nodes that services of this application can - * run on - * - Limiting the custom capacity metrics to limit the total consumption of - * this metric by the services of this application - * - * @param {number} [applicationDescription.applicationCapacity.minimumNodes] - * The minimum number of nodes where Service Fabric will reserve capacity for - * this application. Note that this does not mean that the services of this - * application will be placed on all of those nodes. If this property is set to - * zero, no capacity will be reserved. The value of this property cannot be - * more than the value of the MaximumNodes property. + * @summary Notifies Service Fabric that the persisted state on a node has been + * permanently removed or lost. * - * @param {number} [applicationDescription.applicationCapacity.maximumNodes] - * The maximum number of nodes where Service Fabric will reserve capacity for - * this application. Note that this does not mean that the services of this - * application will be placed on all of those nodes. By default, the value of - * this property is zero and it means that the services can be placed on any - * node. + * This implies that it is not possible to recover the persisted state of that + * node. This generally happens if a hard disk has been wiped clean, or if a + * hard disk crashes. The node has to be down for this operation to be + * successful. This operation lets Service Fabric know that the replicas on + * that node no longer exist, and that Service Fabric should stop waiting for + * those replicas to come back up. Do not run this cmdlet if the state on the + * node has not been removed and the node can come back up with its state + * intact. * - * @param {array} - * [applicationDescription.applicationCapacity.applicationMetrics] List of - * application capacity metric description. + * @param {string} nodeName The name of the node. * * @param {object} [options] Optional Parameters. * @@ -44910,7 +42549,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createApplication(applicationDescription, options, optionalCallback) { + removeNodeState(nodeName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -44919,43 +42558,37 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createApplication(applicationDescription, options, (err, result, request, response) => { + self._removeNodeState(nodeName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createApplication(applicationDescription, options, optionalCallback); + return self._removeNodeState(nodeName, options, optionalCallback); } } /** - * @summary Deletes an existing Service Fabric application. + * @summary Restarts a Service Fabric cluster node. * - * An application must be created before it can be deleted. Deleting an - * application will delete all services that are part of that application. By - * default, Service Fabric will try to close service replicas in a graceful - * manner and then delete the service. However, if a service is having issues - * closing the replica gracefully, the delete operation may take a long time or - * get stuck. Use the optional ForceRemove flag to skip the graceful close - * sequence and forcefully delete the application and all of its services. + * Restarts a Service Fabric cluster node that is already started. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. + * @param {string} nodeName The name of the node. * - * @param {object} [options] Optional Parameters. + * @param {object} restartNodeDescription The instance of the node to be + * restarted and a flag indicating the need to take dump of the fabric process. * - * @param {boolean} [options.forceRemove] Remove a Service Fabric application - * or service forcefully without going through the graceful shutdown sequence. - * This parameter can be used to forcefully delete an application or service - * for which delete is timing out due to issues in the service code that - * prevents graceful close of replicas. + * @param {string} restartNodeDescription.nodeInstanceId The instance ID of the + * target node. If instance ID is specified the node is restarted only if it + * matches with the current instance of the node. A default value of "0" would + * match any instance ID. The instance ID can be obtained using get node query. + * + * @param {string} [restartNodeDescription.createFabricDump] Specify True to + * create a dump of the fabric node process. This is case-sensitive. Possible + * values include: 'False', 'True' + * + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -44971,11 +42604,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - deleteApplicationWithHttpOperationResponse(applicationId, options) { + restartNodeWithHttpOperationResponse(nodeName, restartNodeDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._deleteApplication(applicationId, options, (err, result, request, response) => { + self._restartNode(nodeName, restartNodeDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -44986,31 +42619,25 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Deletes an existing Service Fabric application. + * @summary Restarts a Service Fabric cluster node. * - * An application must be created before it can be deleted. Deleting an - * application will delete all services that are part of that application. By - * default, Service Fabric will try to close service replicas in a graceful - * manner and then delete the service. However, if a service is having issues - * closing the replica gracefully, the delete operation may take a long time or - * get stuck. Use the optional ForceRemove flag to skip the graceful close - * sequence and forcefully delete the application and all of its services. + * Restarts a Service Fabric cluster node that is already started. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. + * @param {string} nodeName The name of the node. * - * @param {object} [options] Optional Parameters. + * @param {object} restartNodeDescription The instance of the node to be + * restarted and a flag indicating the need to take dump of the fabric process. * - * @param {boolean} [options.forceRemove] Remove a Service Fabric application - * or service forcefully without going through the graceful shutdown sequence. - * This parameter can be used to forcefully delete an application or service - * for which delete is timing out due to issues in the service code that - * prevents graceful close of replicas. + * @param {string} restartNodeDescription.nodeInstanceId The instance ID of the + * target node. If instance ID is specified the node is restarted only if it + * matches with the current instance of the node. A default value of "0" would + * match any instance ID. The instance ID can be obtained using get node query. + * + * @param {string} [restartNodeDescription.createFabricDump] Specify True to + * create a dump of the fabric node process. This is case-sensitive. Possible + * values include: 'False', 'True' + * + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -45041,7 +42668,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteApplication(applicationId, options, optionalCallback) { + restartNode(nodeName, restartNodeDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -45050,37 +42677,67 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteApplication(applicationId, options, (err, result, request, response) => { + self._restartNode(nodeName, restartNodeDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteApplication(applicationId, options, optionalCallback); + return self._restartNode(nodeName, restartNodeDescription, options, optionalCallback); } } /** - * @summary Gets load information about a Service Fabric application. - * - * Returns the load information about the application that was created or in - * the process of being created in the Service Fabric cluster and whose name - * matches the one specified as the parameter. The response includes the name, - * minimum nodes, maximum nodes, the number of nodes the application is - * occupying currently, and application load metric information about the - * application. + * @summary Gets the list of application types in the Service Fabric cluster. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. + * Returns the information about the application types that are provisioned or + * in the process of being provisioned in the Service Fabric cluster. Each + * version of an application type is returned as one application type. The + * response includes the name, version, status, and other details about the + * application type. This is a paged query, meaning that if not all of the + * application types fit in a page, one page of results is returned as well as + * a continuation token, which can be used to get the next page. For example, + * if there are 10 application types but a page only fits the first three + * application types, or if max results is set to 3, then three is returned. To + * access the rest of the results, retrieve subsequent pages by using the + * returned continuation token in the next query. An empty continuation token + * is returned if there are no subsequent pages. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.applicationTypeDefinitionKindFilter] Used to filter + * on ApplicationTypeDefinitionKind which is the mechanism used to define a + * Service Fabric application type. + * - Default - Default value, which performs the same function as selecting + * "All". The value is 0. + * - All - Filter that matches input with any ApplicationTypeDefinitionKind + * value. The value is 65535. + * - ServiceFabricApplicationPackage - Filter that matches input with + * ApplicationTypeDefinitionKind value ServiceFabricApplicationPackage. The + * value is 1. + * - Compose - Filter that matches input with ApplicationTypeDefinitionKind + * value Compose. The value is 2. + * + * @param {boolean} [options.excludeApplicationParameters] The flag that + * specifies whether application parameters will be excluded from the result. + * + * @param {string} [options.continuationToken] The continuation token parameter + * is used to obtain next set of results. A continuation token with a non-empty + * value is included in the response of the API when the results from the + * system do not fit in a single response. When this value is passed to the + * next API call, the API returns next set of results. If there are no further + * results, then the continuation token does not contain a value. The value of + * this parameter should not be URL encoded. + * + * @param {number} [options.maxResults] The maximum number of results to be + * returned as part of the paged queries. This parameter defines the upper + * bound on the number of results returned. The results returned can be less + * than the specified maximum results if they do not fit in the message as per + * the max message size restrictions defined in the configuration. If this + * parameter is zero or not specified, the paged query includes as many results + * as possible that fit in the return message. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -45091,15 +42748,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getApplicationLoadInfoWithHttpOperationResponse(applicationId, options) { + getApplicationTypeInfoListWithHttpOperationResponse(options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getApplicationLoadInfo(applicationId, options, (err, result, request, response) => { + self._getApplicationTypeInfoList(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -45110,25 +42767,55 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets load information about a Service Fabric application. - * - * Returns the load information about the application that was created or in - * the process of being created in the Service Fabric cluster and whose name - * matches the one specified as the parameter. The response includes the name, - * minimum nodes, maximum nodes, the number of nodes the application is - * occupying currently, and application load metric information about the - * application. + * @summary Gets the list of application types in the Service Fabric cluster. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. + * Returns the information about the application types that are provisioned or + * in the process of being provisioned in the Service Fabric cluster. Each + * version of an application type is returned as one application type. The + * response includes the name, version, status, and other details about the + * application type. This is a paged query, meaning that if not all of the + * application types fit in a page, one page of results is returned as well as + * a continuation token, which can be used to get the next page. For example, + * if there are 10 application types but a page only fits the first three + * application types, or if max results is set to 3, then three is returned. To + * access the rest of the results, retrieve subsequent pages by using the + * returned continuation token in the next query. An empty continuation token + * is returned if there are no subsequent pages. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.applicationTypeDefinitionKindFilter] Used to filter + * on ApplicationTypeDefinitionKind which is the mechanism used to define a + * Service Fabric application type. + * - Default - Default value, which performs the same function as selecting + * "All". The value is 0. + * - All - Filter that matches input with any ApplicationTypeDefinitionKind + * value. The value is 65535. + * - ServiceFabricApplicationPackage - Filter that matches input with + * ApplicationTypeDefinitionKind value ServiceFabricApplicationPackage. The + * value is 1. + * - Compose - Filter that matches input with ApplicationTypeDefinitionKind + * value Compose. The value is 2. + * + * @param {boolean} [options.excludeApplicationParameters] The flag that + * specifies whether application parameters will be excluded from the result. + * + * @param {string} [options.continuationToken] The continuation token parameter + * is used to obtain next set of results. A continuation token with a non-empty + * value is included in the response of the API when the results from the + * system do not fit in a single response. When this value is passed to the + * next API call, the API returns next set of results. If there are no further + * results, then the continuation token does not contain a value. The value of + * this parameter should not be URL encoded. + * + * @param {number} [options.maxResults] The maximum number of results to be + * returned as part of the paged queries. This parameter defines the upper + * bound on the number of results returned. The results returned can be less + * than the specified maximum results if they do not fit in the message as per + * the max message size restrictions defined in the configuration. If this + * parameter is zero or not specified, the paged query includes as many results + * as possible that fit in the return message. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -45144,7 +42831,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ApplicationLoadInfo} - The deserialized result object. + * @resolve {PagedApplicationTypeInfoList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -45153,13 +42840,14 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ApplicationLoadInfo} for more information. + * See {@link PagedApplicationTypeInfoList} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getApplicationLoadInfo(applicationId, options, optionalCallback) { + getApplicationTypeInfoList(options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -45168,47 +42856,43 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getApplicationLoadInfo(applicationId, options, (err, result, request, response) => { + self._getApplicationTypeInfoList(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getApplicationLoadInfo(applicationId, options, optionalCallback); + return self._getApplicationTypeInfoList(options, optionalCallback); } } /** - * @summary Gets the list of applications created in the Service Fabric cluster - * that match the specified filters. + * @summary Gets the list of application types in the Service Fabric cluster + * matching exactly the specified name. * - * Gets the information about the applications that were created or in the - * process of being created in the Service Fabric cluster and match the - * specified filters. The response includes the name, type, status, parameters, - * and other details about the application. If the applications do not fit in a - * page, one page of results is returned as well as a continuation token, which - * can be used to get the next page. Filters ApplicationTypeName and - * ApplicationDefinitionKindFilter cannot be specified at the same time. + * Returns the information about the application types that are provisioned or + * in the process of being provisioned in the Service Fabric cluster. These + * results are of application types whose name match exactly the one specified + * as the parameter, and which comply with the given query parameters. All + * versions of the application type matching the application type name are + * returned, with each version returned as one application type. The response + * includes the name, version, status, and other details about the application + * type. This is a paged query, meaning that if not all of the application + * types fit in a page, one page of results is returned as well as a + * continuation token, which can be used to get the next page. For example, if + * there are 10 application types but a page only fits the first three + * application types, or if max results is set to 3, then three is returned. To + * access the rest of the results, retrieve subsequent pages by using the + * returned continuation token in the next query. An empty continuation token + * is returned if there are no subsequent pages. * - * @param {object} [options] Optional Parameters. + * @param {string} applicationTypeName The name of the application type. * - * @param {number} [options.applicationDefinitionKindFilter] Used to filter on - * ApplicationDefinitionKind, which is the mechanism used to define a Service - * Fabric application. - * - Default - Default value, which performs the same function as selecting - * "All". The value is 0. - * - All - Filter that matches input with any ApplicationDefinitionKind value. - * The value is 65535. - * - ServiceFabricApplicationDescription - Filter that matches input with - * ApplicationDefinitionKind value ServiceFabricApplicationDescription. The - * value is 1. - * - Compose - Filter that matches input with ApplicationDefinitionKind value - * Compose. The value is 2. + * @param {object} [options] Optional Parameters. * - * @param {string} [options.applicationTypeName] The application type name used - * to filter the applications to query for. This value should not contain the - * application type version. + * @param {string} [options.applicationTypeVersion] The version of the + * application type. * * @param {boolean} [options.excludeApplicationParameters] The flag that * specifies whether application parameters will be excluded from the result. @@ -45239,15 +42923,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getApplicationInfoListWithHttpOperationResponse(options) { + getApplicationTypeInfoListByNameWithHttpOperationResponse(applicationTypeName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getApplicationInfoList(options, (err, result, request, response) => { + self._getApplicationTypeInfoListByName(applicationTypeName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -45258,35 +42942,31 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the list of applications created in the Service Fabric cluster - * that match the specified filters. + * @summary Gets the list of application types in the Service Fabric cluster + * matching exactly the specified name. + * + * Returns the information about the application types that are provisioned or + * in the process of being provisioned in the Service Fabric cluster. These + * results are of application types whose name match exactly the one specified + * as the parameter, and which comply with the given query parameters. All + * versions of the application type matching the application type name are + * returned, with each version returned as one application type. The response + * includes the name, version, status, and other details about the application + * type. This is a paged query, meaning that if not all of the application + * types fit in a page, one page of results is returned as well as a + * continuation token, which can be used to get the next page. For example, if + * there are 10 application types but a page only fits the first three + * application types, or if max results is set to 3, then three is returned. To + * access the rest of the results, retrieve subsequent pages by using the + * returned continuation token in the next query. An empty continuation token + * is returned if there are no subsequent pages. * - * Gets the information about the applications that were created or in the - * process of being created in the Service Fabric cluster and match the - * specified filters. The response includes the name, type, status, parameters, - * and other details about the application. If the applications do not fit in a - * page, one page of results is returned as well as a continuation token, which - * can be used to get the next page. Filters ApplicationTypeName and - * ApplicationDefinitionKindFilter cannot be specified at the same time. + * @param {string} applicationTypeName The name of the application type. * * @param {object} [options] Optional Parameters. * - * @param {number} [options.applicationDefinitionKindFilter] Used to filter on - * ApplicationDefinitionKind, which is the mechanism used to define a Service - * Fabric application. - * - Default - Default value, which performs the same function as selecting - * "All". The value is 0. - * - All - Filter that matches input with any ApplicationDefinitionKind value. - * The value is 65535. - * - ServiceFabricApplicationDescription - Filter that matches input with - * ApplicationDefinitionKind value ServiceFabricApplicationDescription. The - * value is 1. - * - Compose - Filter that matches input with ApplicationDefinitionKind value - * Compose. The value is 2. - * - * @param {string} [options.applicationTypeName] The application type name used - * to filter the applications to query for. This value should not contain the - * application type version. + * @param {string} [options.applicationTypeVersion] The version of the + * application type. * * @param {boolean} [options.excludeApplicationParameters] The flag that * specifies whether application parameters will be excluded from the result. @@ -45322,7 +43002,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {PagedApplicationInfoList} - The deserialized result object. + * @resolve {PagedApplicationTypeInfoList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -45331,14 +43011,14 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PagedApplicationInfoList} for more + * See {@link PagedApplicationTypeInfoList} for more * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getApplicationInfoList(options, optionalCallback) { + getApplicationTypeInfoListByName(applicationTypeName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -45347,37 +43027,45 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getApplicationInfoList(options, (err, result, request, response) => { + self._getApplicationTypeInfoListByName(applicationTypeName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getApplicationInfoList(options, optionalCallback); + return self._getApplicationTypeInfoListByName(applicationTypeName, options, optionalCallback); } } /** - * @summary Gets information about a Service Fabric application. + * @summary Provisions or registers a Service Fabric application type with the + * cluster using the '.sfpkg' package in the external store or using the + * application package in the image store. * - * Returns the information about the application that was created or in the - * process of being created in the Service Fabric cluster and whose name - * matches the one specified as the parameter. The response includes the name, - * type, status, parameters, and other details about the application. + * Provisions a Service Fabric application type with the cluster. The provision + * is required before any new applications can be instantiated. + * The provision operation can be performed either on the application package + * specified by the relativePathInImageStore, or by using the URI of the + * external '.sfpkg'. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. + * @param {object} provisionApplicationTypeDescriptionBaseRequiredBodyParam The + * base type of provision application type description which supports either + * image store-based provision or external store-based provision. * - * @param {object} [options] Optional Parameters. + * @param {boolean} + * provisionApplicationTypeDescriptionBaseRequiredBodyParam.async Indicates + * whether or not provisioning should occur asynchronously. When set to true, + * the provision operation returns when the request is accepted by the system, + * and the provision operation continues without any timeout limit. The default + * value is false. For large application packages, we recommend setting the + * value to true. * - * @param {boolean} [options.excludeApplicationParameters] The flag that - * specifies whether application parameters will be excluded from the result. + * @param {string} + * provisionApplicationTypeDescriptionBaseRequiredBodyParam.kind Polymorphic + * Discriminator + * + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -45389,15 +43077,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getApplicationInfoWithHttpOperationResponse(applicationId, options) { + provisionApplicationTypeWithHttpOperationResponse(provisionApplicationTypeDescriptionBaseRequiredBodyParam, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getApplicationInfo(applicationId, options, (err, result, request, response) => { + self._provisionApplicationType(provisionApplicationTypeDescriptionBaseRequiredBodyParam, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -45408,25 +43096,33 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets information about a Service Fabric application. + * @summary Provisions or registers a Service Fabric application type with the + * cluster using the '.sfpkg' package in the external store or using the + * application package in the image store. * - * Returns the information about the application that was created or in the - * process of being created in the Service Fabric cluster and whose name - * matches the one specified as the parameter. The response includes the name, - * type, status, parameters, and other details about the application. + * Provisions a Service Fabric application type with the cluster. The provision + * is required before any new applications can be instantiated. + * The provision operation can be performed either on the application package + * specified by the relativePathInImageStore, or by using the URI of the + * external '.sfpkg'. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. + * @param {object} provisionApplicationTypeDescriptionBaseRequiredBodyParam The + * base type of provision application type description which supports either + * image store-based provision or external store-based provision. * - * @param {object} [options] Optional Parameters. + * @param {boolean} + * provisionApplicationTypeDescriptionBaseRequiredBodyParam.async Indicates + * whether or not provisioning should occur asynchronously. When set to true, + * the provision operation returns when the request is accepted by the system, + * and the provision operation continues without any timeout limit. The default + * value is false. For large application packages, we recommend setting the + * value to true. * - * @param {boolean} [options.excludeApplicationParameters] The flag that - * specifies whether application parameters will be excluded from the result. + * @param {string} + * provisionApplicationTypeDescriptionBaseRequiredBodyParam.kind Polymorphic + * Discriminator + * + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -45443,7 +43139,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ApplicationInfo} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -45451,14 +43147,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ApplicationInfo} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getApplicationInfo(applicationId, options, optionalCallback) { + provisionApplicationType(provisionApplicationTypeDescriptionBaseRequiredBodyParam, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -45467,110 +43162,44 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getApplicationInfo(applicationId, options, (err, result, request, response) => { + self._provisionApplicationType(provisionApplicationTypeDescriptionBaseRequiredBodyParam, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getApplicationInfo(applicationId, options, optionalCallback); + return self._provisionApplicationType(provisionApplicationTypeDescriptionBaseRequiredBodyParam, options, optionalCallback); } } /** - * @summary Gets the health of the service fabric application. - * - * Returns the heath state of the service fabric application. The response - * reports either Ok, Error or Warning health state. If the entity is not found - * in the health store, it will return Error. - * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. - * - * @param {object} [options] Optional Parameters. - * - * @param {number} [options.eventsHealthStateFilter] Allows filtering the - * collection of HealthEvent objects returned based on health state. - * The possible values for this parameter include integer value of one of the - * following health states. - * Only events that match the filter are returned. All events are used to - * evaluate the aggregated health state. - * If not specified, all entries are returned. The state values are flag-based - * enumeration, so the value could be a combination of these values, obtained - * using the bitwise 'OR' operator. For example, If the provided value is 6 - * then all of the events with HealthState value of OK (2) and Warning (4) are - * returned. + * @summary Removes or unregisters a Service Fabric application type from the + * cluster. * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * This operation can only be performed if all application instances of the + * application type have been deleted. Once the application type is + * unregistered, no new application instances can be created for this + * particular application type. * - * @param {number} [options.deployedApplicationsHealthStateFilter] Allows - * filtering of the deployed applications health state objects returned in the - * result of application health query based on their health state. - * The possible values for this parameter include integer value of one of the - * following health states. Only deployed applications that match the filter - * will be returned. - * All deployed applications are used to evaluate the aggregated health state. - * If not specified, all entries are returned. - * The state values are flag-based enumeration, so the value could be a - * combination of these values, obtained using bitwise 'OR' operator. - * For example, if the provided value is 6 then health state of deployed - * applications with HealthState value of OK (2) and Warning (4) are returned. + * @param {string} applicationTypeName The name of the application type. * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * @param {object} unprovisionApplicationTypeDescriptionInfo The relative path + * for the application package in the image store specified during the prior + * copy operation. * - * @param {number} [options.servicesHealthStateFilter] Allows filtering of the - * services health state objects returned in the result of services health - * query based on their health state. - * The possible values for this parameter include integer value of one of the - * following health states. - * Only services that match the filter are returned. All services are used to - * evaluate the aggregated health state. - * If not specified, all entries are returned. The state values are flag-based - * enumeration, so the value could be a combination of these values, - * obtained using bitwise 'OR' operator. For example, if the provided value is - * 6 then health state of services with HealthState value of OK (2) and Warning - * (4) will be returned. + * @param {string} + * unprovisionApplicationTypeDescriptionInfo.applicationTypeVersion The version + * of the application type as defined in the application manifest. * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * @param {boolean} [unprovisionApplicationTypeDescriptionInfo.async] The flag + * indicating whether or not unprovision should occur asynchronously. When set + * to true, the unprovision operation returns when the request is accepted by + * the system, and the unprovision operation continues without any timeout + * limit. The default value is false. However, we recommend setting it to true + * for large application packages that were provisioned. * - * @param {boolean} [options.excludeHealthStatistics] Indicates whether the - * health statistics should be returned as part of the query result. False by - * default. - * The statistics show the number of children entities in health state Ok, - * Warning, and Error. + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -45582,15 +43211,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getApplicationHealthWithHttpOperationResponse(applicationId, options) { + unprovisionApplicationTypeWithHttpOperationResponse(applicationTypeName, unprovisionApplicationTypeDescriptionInfo, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getApplicationHealth(applicationId, options, (err, result, request, response) => { + self._unprovisionApplicationType(applicationTypeName, unprovisionApplicationTypeDescriptionInfo, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -45601,98 +43230,32 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the health of the service fabric application. - * - * Returns the heath state of the service fabric application. The response - * reports either Ok, Error or Warning health state. If the entity is not found - * in the health store, it will return Error. - * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. - * - * @param {object} [options] Optional Parameters. - * - * @param {number} [options.eventsHealthStateFilter] Allows filtering the - * collection of HealthEvent objects returned based on health state. - * The possible values for this parameter include integer value of one of the - * following health states. - * Only events that match the filter are returned. All events are used to - * evaluate the aggregated health state. - * If not specified, all entries are returned. The state values are flag-based - * enumeration, so the value could be a combination of these values, obtained - * using the bitwise 'OR' operator. For example, If the provided value is 6 - * then all of the events with HealthState value of OK (2) and Warning (4) are - * returned. + * @summary Removes or unregisters a Service Fabric application type from the + * cluster. * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * This operation can only be performed if all application instances of the + * application type have been deleted. Once the application type is + * unregistered, no new application instances can be created for this + * particular application type. * - * @param {number} [options.deployedApplicationsHealthStateFilter] Allows - * filtering of the deployed applications health state objects returned in the - * result of application health query based on their health state. - * The possible values for this parameter include integer value of one of the - * following health states. Only deployed applications that match the filter - * will be returned. - * All deployed applications are used to evaluate the aggregated health state. - * If not specified, all entries are returned. - * The state values are flag-based enumeration, so the value could be a - * combination of these values, obtained using bitwise 'OR' operator. - * For example, if the provided value is 6 then health state of deployed - * applications with HealthState value of OK (2) and Warning (4) are returned. + * @param {string} applicationTypeName The name of the application type. * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * @param {object} unprovisionApplicationTypeDescriptionInfo The relative path + * for the application package in the image store specified during the prior + * copy operation. * - * @param {number} [options.servicesHealthStateFilter] Allows filtering of the - * services health state objects returned in the result of services health - * query based on their health state. - * The possible values for this parameter include integer value of one of the - * following health states. - * Only services that match the filter are returned. All services are used to - * evaluate the aggregated health state. - * If not specified, all entries are returned. The state values are flag-based - * enumeration, so the value could be a combination of these values, - * obtained using bitwise 'OR' operator. For example, if the provided value is - * 6 then health state of services with HealthState value of OK (2) and Warning - * (4) will be returned. + * @param {string} + * unprovisionApplicationTypeDescriptionInfo.applicationTypeVersion The version + * of the application type as defined in the application manifest. * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * @param {boolean} [unprovisionApplicationTypeDescriptionInfo.async] The flag + * indicating whether or not unprovision should occur asynchronously. When set + * to true, the unprovision operation returns when the request is accepted by + * the system, and the unprovision operation continues without any timeout + * limit. The default value is false. However, we recommend setting it to true + * for large application packages that were provisioned. * - * @param {boolean} [options.excludeHealthStatistics] Indicates whether the - * health statistics should be returned as part of the query result. False by - * default. - * The statistics show the number of children entities in health state Ok, - * Warning, and Error. + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -45709,7 +43272,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ApplicationHealth} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -45717,14 +43280,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ApplicationHealth} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getApplicationHealth(applicationId, options, optionalCallback) { + unprovisionApplicationType(applicationTypeName, unprovisionApplicationTypeDescriptionInfo, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -45733,185 +43295,30 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getApplicationHealth(applicationId, options, (err, result, request, response) => { + self._unprovisionApplicationType(applicationTypeName, unprovisionApplicationTypeDescriptionInfo, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getApplicationHealth(applicationId, options, optionalCallback); + return self._unprovisionApplicationType(applicationTypeName, unprovisionApplicationTypeDescriptionInfo, options, optionalCallback); } } /** - * @summary Gets the health of a Service Fabric application using the specified - * policy. - * - * Gets the health of a Service Fabric application. Use EventsHealthStateFilter - * to filter the collection of health events reported on the node based on the - * health state. Use ClusterHealthPolicies to override the health policies used - * to evaluate the health. - * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. - * - * @param {object} [options] Optional Parameters. - * - * @param {number} [options.eventsHealthStateFilter] Allows filtering the - * collection of HealthEvent objects returned based on health state. - * The possible values for this parameter include integer value of one of the - * following health states. - * Only events that match the filter are returned. All events are used to - * evaluate the aggregated health state. - * If not specified, all entries are returned. The state values are flag-based - * enumeration, so the value could be a combination of these values, obtained - * using the bitwise 'OR' operator. For example, If the provided value is 6 - * then all of the events with HealthState value of OK (2) and Warning (4) are - * returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. - * - * @param {number} [options.deployedApplicationsHealthStateFilter] Allows - * filtering of the deployed applications health state objects returned in the - * result of application health query based on their health state. - * The possible values for this parameter include integer value of one of the - * following health states. Only deployed applications that match the filter - * will be returned. - * All deployed applications are used to evaluate the aggregated health state. - * If not specified, all entries are returned. - * The state values are flag-based enumeration, so the value could be a - * combination of these values, obtained using bitwise 'OR' operator. - * For example, if the provided value is 6 then health state of deployed - * applications with HealthState value of OK (2) and Warning (4) are returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. - * - * @param {number} [options.servicesHealthStateFilter] Allows filtering of the - * services health state objects returned in the result of services health - * query based on their health state. - * The possible values for this parameter include integer value of one of the - * following health states. - * Only services that match the filter are returned. All services are used to - * evaluate the aggregated health state. - * If not specified, all entries are returned. The state values are flag-based - * enumeration, so the value could be a combination of these values, - * obtained using bitwise 'OR' operator. For example, if the provided value is - * 6 then health state of services with HealthState value of OK (2) and Warning - * (4) will be returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. - * - * @param {boolean} [options.excludeHealthStatistics] Indicates whether the - * health statistics should be returned as part of the query result. False by - * default. - * The statistics show the number of children entities in health state Ok, - * Warning, and Error. - * - * @param {object} [options.applicationHealthPolicy] Describes the health - * policies used to evaluate the health of an application or one of its - * children. - * If not present, the health evaluation uses the health policy from - * application manifest or the default health policy. - * - * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. - * - * @param {number} - * [options.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] - * The maximum allowed percentage of unhealthy deployed applications. Allowed - * values are Byte values from zero to 100. - * The percentage represents the maximum tolerated percentage of deployed - * applications that can be unhealthy before the application is considered in - * error. - * This is calculated by dividing the number of unhealthy deployed applications - * over the number of nodes where the application is currently deployed on in - * the cluster. - * The computation rounds up to tolerate one failure on small numbers of nodes. - * Default percentage is zero. - * - * @param {object} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health - * policy used by default to evaluate the health of a service type. - * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] - * The maximum allowed percentage of unhealthy partitions per service. Allowed - * values are Byte values from zero to 100 - * - * The percentage represents the maximum tolerated percentage of partitions - * that can be unhealthy before the service is considered in error. - * If the percentage is respected but there is at least one unhealthy - * partition, the health is evaluated as Warning. - * The percentage is calculated by dividing the number of unhealthy partitions - * over the total number of partitions in the service. - * The computation rounds up to tolerate one failure on small numbers of - * partitions. Default percentage is zero. - * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] - * The maximum allowed percentage of unhealthy replicas per partition. Allowed - * values are Byte values from zero to 100. + * @summary Gets the list containing the information about service types that + * are supported by a provisioned application type in a Service Fabric cluster. * - * The percentage represents the maximum tolerated percentage of replicas that - * can be unhealthy before the partition is considered in error. - * If the percentage is respected but there is at least one unhealthy replica, - * the health is evaluated as Warning. - * The percentage is calculated by dividing the number of unhealthy replicas - * over the total number of replicas in the partition. - * The computation rounds up to tolerate one failure on small numbers of - * replicas. Default percentage is zero. + * Gets the list containing the information about service types that are + * supported by a provisioned application type in a Service Fabric cluster. The + * provided application type must exist. Otherwise, a 404 status is returned. * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * @param {string} applicationTypeName The name of the application type. * - * The percentage represents the maximum tolerated percentage of services that - * can be unhealthy before the application is considered in error. - * If the percentage is respected but there is at least one unhealthy service, - * the health is evaluated as Warning. - * This is calculated by dividing the number of unhealthy services of the - * specific service type over the total number of services of the specific - * service type. - * The computation rounds up to tolerate one failure on small numbers of - * services. Default percentage is zero. + * @param {string} applicationTypeVersion The version of the application type. * - * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] - * The map with service type health policy per service type name. The map is - * empty by default. + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -45923,15 +43330,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getApplicationHealthUsingPolicyWithHttpOperationResponse(applicationId, options) { + getServiceTypeInfoListWithHttpOperationResponse(applicationTypeName, applicationTypeVersion, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getApplicationHealthUsingPolicy(applicationId, options, (err, result, request, response) => { + self._getServiceTypeInfoList(applicationTypeName, applicationTypeVersion, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -45942,173 +43349,18 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the health of a Service Fabric application using the specified - * policy. - * - * Gets the health of a Service Fabric application. Use EventsHealthStateFilter - * to filter the collection of health events reported on the node based on the - * health state. Use ClusterHealthPolicies to override the health policies used - * to evaluate the health. - * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. - * - * @param {object} [options] Optional Parameters. - * - * @param {number} [options.eventsHealthStateFilter] Allows filtering the - * collection of HealthEvent objects returned based on health state. - * The possible values for this parameter include integer value of one of the - * following health states. - * Only events that match the filter are returned. All events are used to - * evaluate the aggregated health state. - * If not specified, all entries are returned. The state values are flag-based - * enumeration, so the value could be a combination of these values, obtained - * using the bitwise 'OR' operator. For example, If the provided value is 6 - * then all of the events with HealthState value of OK (2) and Warning (4) are - * returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. - * - * @param {number} [options.deployedApplicationsHealthStateFilter] Allows - * filtering of the deployed applications health state objects returned in the - * result of application health query based on their health state. - * The possible values for this parameter include integer value of one of the - * following health states. Only deployed applications that match the filter - * will be returned. - * All deployed applications are used to evaluate the aggregated health state. - * If not specified, all entries are returned. - * The state values are flag-based enumeration, so the value could be a - * combination of these values, obtained using bitwise 'OR' operator. - * For example, if the provided value is 6 then health state of deployed - * applications with HealthState value of OK (2) and Warning (4) are returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. - * - * @param {number} [options.servicesHealthStateFilter] Allows filtering of the - * services health state objects returned in the result of services health - * query based on their health state. - * The possible values for this parameter include integer value of one of the - * following health states. - * Only services that match the filter are returned. All services are used to - * evaluate the aggregated health state. - * If not specified, all entries are returned. The state values are flag-based - * enumeration, so the value could be a combination of these values, - * obtained using bitwise 'OR' operator. For example, if the provided value is - * 6 then health state of services with HealthState value of OK (2) and Warning - * (4) will be returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. - * - * @param {boolean} [options.excludeHealthStatistics] Indicates whether the - * health statistics should be returned as part of the query result. False by - * default. - * The statistics show the number of children entities in health state Ok, - * Warning, and Error. - * - * @param {object} [options.applicationHealthPolicy] Describes the health - * policies used to evaluate the health of an application or one of its - * children. - * If not present, the health evaluation uses the health policy from - * application manifest or the default health policy. - * - * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. - * - * @param {number} - * [options.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] - * The maximum allowed percentage of unhealthy deployed applications. Allowed - * values are Byte values from zero to 100. - * The percentage represents the maximum tolerated percentage of deployed - * applications that can be unhealthy before the application is considered in - * error. - * This is calculated by dividing the number of unhealthy deployed applications - * over the number of nodes where the application is currently deployed on in - * the cluster. - * The computation rounds up to tolerate one failure on small numbers of nodes. - * Default percentage is zero. - * - * @param {object} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health - * policy used by default to evaluate the health of a service type. - * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] - * The maximum allowed percentage of unhealthy partitions per service. Allowed - * values are Byte values from zero to 100 - * - * The percentage represents the maximum tolerated percentage of partitions - * that can be unhealthy before the service is considered in error. - * If the percentage is respected but there is at least one unhealthy - * partition, the health is evaluated as Warning. - * The percentage is calculated by dividing the number of unhealthy partitions - * over the total number of partitions in the service. - * The computation rounds up to tolerate one failure on small numbers of - * partitions. Default percentage is zero. - * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] - * The maximum allowed percentage of unhealthy replicas per partition. Allowed - * values are Byte values from zero to 100. + * @summary Gets the list containing the information about service types that + * are supported by a provisioned application type in a Service Fabric cluster. * - * The percentage represents the maximum tolerated percentage of replicas that - * can be unhealthy before the partition is considered in error. - * If the percentage is respected but there is at least one unhealthy replica, - * the health is evaluated as Warning. - * The percentage is calculated by dividing the number of unhealthy replicas - * over the total number of replicas in the partition. - * The computation rounds up to tolerate one failure on small numbers of - * replicas. Default percentage is zero. + * Gets the list containing the information about service types that are + * supported by a provisioned application type in a Service Fabric cluster. The + * provided application type must exist. Otherwise, a 404 status is returned. * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * @param {string} applicationTypeName The name of the application type. * - * The percentage represents the maximum tolerated percentage of services that - * can be unhealthy before the application is considered in error. - * If the percentage is respected but there is at least one unhealthy service, - * the health is evaluated as Warning. - * This is calculated by dividing the number of unhealthy services of the - * specific service type over the total number of services of the specific - * service type. - * The computation rounds up to tolerate one failure on small numbers of - * services. Default percentage is zero. + * @param {string} applicationTypeVersion The version of the application type. * - * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] - * The map with service type health policy per service type name. The map is - * empty by default. + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -46125,7 +43377,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ApplicationHealth} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error} - The error object. * @@ -46133,14 +43385,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ApplicationHealth} for more information. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getApplicationHealthUsingPolicy(applicationId, options, optionalCallback) { + getServiceTypeInfoList(applicationTypeName, applicationTypeVersion, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -46149,131 +43400,36 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getApplicationHealthUsingPolicy(applicationId, options, (err, result, request, response) => { + self._getServiceTypeInfoList(applicationTypeName, applicationTypeVersion, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getApplicationHealthUsingPolicy(applicationId, options, optionalCallback); + return self._getServiceTypeInfoList(applicationTypeName, applicationTypeVersion, options, optionalCallback); } } /** - * @summary Sends a health report on the Service Fabric application. - * - * Reports health state of the specified Service Fabric application. The report - * must contain the information about the source of the health report and - * property on which it is reported. - * The report is sent to a Service Fabric gateway Application, which forwards - * to the health store. - * The report may be accepted by the gateway, but rejected by the health store - * after extra validation. - * For example, the health store may reject the report because of an invalid - * parameter, like a stale sequence number. - * To see whether the report was applied in the health store, get application - * health and check that the report appears in the HealthEvents section. - * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. - * - * @param {object} healthInformation Describes the health information for the - * health report. This information needs to be present in all of the health - * reports sent to the health manager. - * - * @param {string} healthInformation.sourceId The source name that identifies - * the client/watchdog/system component that generated the health information. - * - * @param {string} healthInformation.property The property of the health - * information. An entity can have health reports for different properties. - * The property is a string and not a fixed enumeration to allow the reporter - * flexibility to categorize the state condition that triggers the report. - * For example, a reporter with SourceId "LocalWatchdog" can monitor the state - * of the available disk on a node, - * so it can report "AvailableDisk" property on that node. - * The same reporter can monitor the node connectivity, so it can report a - * property "Connectivity" on the same node. - * In the health store, these reports are treated as separate health events for - * the specified node. - * - * Together with the SourceId, the property uniquely identifies the health - * information. - * - * @param {string} healthInformation.healthState The health state of a Service - * Fabric entity such as Cluster, Node, Application, Service, Partition, - * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - * 'Unknown' - * - * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field uses ISO8601 - * format for specifying the duration. - * When clients report periodically, they should send reports with higher - * frequency than time to live. - * If clients report on transition, they can set the time to live to infinite. - * When time to live expires, the health event that contains the health - * information - * is either removed from health store, if RemoveWhenExpired is true, or - * evaluated at error, if RemoveWhenExpired false. + * @summary Gets the information about a specific service type that is + * supported by a provisioned application type in a Service Fabric cluster. * - * If not specified, time to live defaults to infinite value. + * Gets the information about a specific service type that is supported by a + * provisioned application type in a Service Fabric cluster. The provided + * application type must exist. Otherwise, a 404 status is returned. A 204 + * response is returned if the specified service type is not found in the + * cluster. * - * @param {string} [healthInformation.description] The description of the - * health information. It represents free text used to add human readable - * information about the report. - * The maximum string length for the description is 4096 characters. - * If the provided string is longer, it will be automatically truncated. - * When truncated, the last characters of the description contain a marker - * "[Truncated]", and total string size is 4096 characters. - * The presence of the marker indicates to users that truncation occurred. - * Note that when truncated, the description has less than 4096 characters from - * the original string. + * @param {string} applicationTypeName The name of the application type. * - * @param {string} [healthInformation.sequenceNumber] The sequence number for - * this health report as a numeric string. - * The report sequence number is used by the health store to detect stale - * reports. - * If not specified, a sequence number is auto-generated by the health client - * when a report is added. + * @param {string} applicationTypeVersion The version of the application type. * - * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates - * whether the report is removed from health store when it expires. - * If set to true, the report is removed from the health store after it - * expires. - * If set to false, the report is treated as an error when expired. The value - * of this property is false by default. - * When clients report periodically, they should set RemoveWhenExpired false - * (default). - * This way, is the reporter has issues (eg. deadlock) and can't report, the - * entity is evaluated at error when the health report expires. - * This flags the entity as being in Error health state. + * @param {string} serviceTypeName Specifies the name of a Service Fabric + * service type. * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.immediate] A flag that indicates whether the - * report should be sent immediately. - * A health report is sent to a Service Fabric gateway Application, which - * forwards to the health store. - * If Immediate is set to true, the report is sent immediately from HTTP - * Gateway to the health store, regardless of the fabric client settings that - * the HTTP Gateway Application is using. - * This is useful for critical reports that should be sent as soon as possible. - * Depending on timing and other conditions, sending the report may still fail, - * for example if the HTTP Gateway is closed or the message doesn't reach the - * Gateway. - * If Immediate is set to false, the report is sent based on the health client - * settings from the HTTP Gateway. Therefore, it will be batched according to - * the HealthReportSendInterval configuration. - * This is the recommended setting because it allows the health client to - * optimize health reporting messages to health store as well as health report - * processing. - * By default, reports are not sent immediately. - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -46284,15 +43440,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - reportApplicationHealthWithHttpOperationResponse(applicationId, healthInformation, options) { + getServiceTypeInfoByNameWithHttpOperationResponse(applicationTypeName, applicationTypeVersion, serviceTypeName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._reportApplicationHealth(applicationId, healthInformation, options, (err, result, request, response) => { + self._getServiceTypeInfoByName(applicationTypeName, applicationTypeVersion, serviceTypeName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -46303,118 +43459,131 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Sends a health report on the Service Fabric application. + * @summary Gets the information about a specific service type that is + * supported by a provisioned application type in a Service Fabric cluster. * - * Reports health state of the specified Service Fabric application. The report - * must contain the information about the source of the health report and - * property on which it is reported. - * The report is sent to a Service Fabric gateway Application, which forwards - * to the health store. - * The report may be accepted by the gateway, but rejected by the health store - * after extra validation. - * For example, the health store may reject the report because of an invalid - * parameter, like a stale sequence number. - * To see whether the report was applied in the health store, get application - * health and check that the report appears in the HealthEvents section. + * Gets the information about a specific service type that is supported by a + * provisioned application type in a Service Fabric cluster. The provided + * application type must exist. Otherwise, a 404 status is returned. A 204 + * response is returned if the specified service type is not found in the + * cluster. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. + * @param {string} applicationTypeName The name of the application type. * - * @param {object} healthInformation Describes the health information for the - * health report. This information needs to be present in all of the health - * reports sent to the health manager. + * @param {string} applicationTypeVersion The version of the application type. * - * @param {string} healthInformation.sourceId The source name that identifies - * the client/watchdog/system component that generated the health information. + * @param {string} serviceTypeName Specifies the name of a Service Fabric + * service type. * - * @param {string} healthInformation.property The property of the health - * information. An entity can have health reports for different properties. - * The property is a string and not a fixed enumeration to allow the reporter - * flexibility to categorize the state condition that triggers the report. - * For example, a reporter with SourceId "LocalWatchdog" can monitor the state - * of the available disk on a node, - * so it can report "AvailableDisk" property on that node. - * The same reporter can monitor the node connectivity, so it can report a - * property "Connectivity" on the same node. - * In the health store, these reports are treated as separate health events for - * the specified node. + * @param {object} [options] Optional Parameters. * - * Together with the SourceId, the property uniquely identifies the health - * information. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {string} healthInformation.healthState The health state of a Service - * Fabric entity such as Cluster, Node, Application, Service, Partition, - * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - * 'Unknown' + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field uses ISO8601 - * format for specifying the duration. - * When clients report periodically, they should send reports with higher - * frequency than time to live. - * If clients report on transition, they can set the time to live to infinite. - * When time to live expires, the health event that contains the health - * information - * is either removed from health store, if RemoveWhenExpired is true, or - * evaluated at error, if RemoveWhenExpired false. + * @param {function} [optionalCallback] - The optional callback. * - * If not specified, time to live defaults to infinite value. + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. * - * @param {string} [healthInformation.description] The description of the - * health information. It represents free text used to add human readable - * information about the report. - * The maximum string length for the description is 4096 characters. - * If the provided string is longer, it will be automatically truncated. - * When truncated, the last characters of the description contain a marker - * "[Truncated]", and total string size is 4096 characters. - * The presence of the marker indicates to users that truncation occurred. - * Note that when truncated, the description has less than 4096 characters from - * the original string. + * {Promise} A promise is returned * - * @param {string} [healthInformation.sequenceNumber] The sequence number for - * this health report as a numeric string. - * The report sequence number is used by the health store to detect stale - * reports. - * If not specified, a sequence number is auto-generated by the health client - * when a report is added. + * @resolve {ServiceTypeInfo} - The deserialized result object. * - * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates - * whether the report is removed from health store when it expires. - * If set to true, the report is removed from the health store after it - * expires. - * If set to false, the report is treated as an error when expired. The value - * of this property is false by default. - * When clients report periodically, they should set RemoveWhenExpired false - * (default). - * This way, is the reporter has issues (eg. deadlock) and can't report, the - * entity is evaluated at error when the health report expires. - * This flags the entity as being in Error health state. + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ServiceTypeInfo} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getServiceTypeInfoByName(applicationTypeName, applicationTypeVersion, serviceTypeName, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getServiceTypeInfoByName(applicationTypeName, applicationTypeVersion, serviceTypeName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getServiceTypeInfoByName(applicationTypeName, applicationTypeVersion, serviceTypeName, options, optionalCallback); + } + } + + /** + * @summary Gets the manifest describing a service type. + * + * Gets the manifest describing a service type. The response contains the + * service manifest XML as a string. + * + * @param {string} applicationTypeName The name of the application type. + * + * @param {string} applicationTypeVersion The version of the application type. + * + * @param {string} serviceManifestName The name of a service manifest + * registered as part of an application type in a Service Fabric cluster. * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.immediate] A flag that indicates whether the - * report should be sent immediately. - * A health report is sent to a Service Fabric gateway Application, which - * forwards to the health store. - * If Immediate is set to true, the report is sent immediately from HTTP - * Gateway to the health store, regardless of the fabric client settings that - * the HTTP Gateway Application is using. - * This is useful for critical reports that should be sent as soon as possible. - * Depending on timing and other conditions, sending the report may still fail, - * for example if the HTTP Gateway is closed or the message doesn't reach the - * Gateway. - * If Immediate is set to false, the report is sent based on the health client - * settings from the HTTP Gateway. Therefore, it will be batched according to - * the HealthReportSendInterval configuration. - * This is the recommended setting because it allows the health client to - * optimize health reporting messages to health store as well as health report - * processing. - * By default, reports are not sent immediately. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getServiceManifestWithHttpOperationResponse(applicationTypeName, applicationTypeVersion, serviceManifestName, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getServiceManifest(applicationTypeName, applicationTypeVersion, serviceManifestName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets the manifest describing a service type. + * + * Gets the manifest describing a service type. The response contains the + * service manifest XML as a string. + * + * @param {string} applicationTypeName The name of the application type. + * + * @param {string} applicationTypeVersion The version of the application type. + * + * @param {string} serviceManifestName The name of a service manifest + * registered as part of an application type in a Service Fabric cluster. + * + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -46431,7 +43600,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {ServiceTypeManifest} - The deserialized result object. * * @reject {Error} - The error object. * @@ -46439,13 +43608,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ServiceTypeManifest} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - reportApplicationHealth(applicationId, healthInformation, options, optionalCallback) { + getServiceManifest(applicationTypeName, applicationTypeVersion, serviceManifestName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -46454,22 +43624,27 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._reportApplicationHealth(applicationId, healthInformation, options, (err, result, request, response) => { + self._getServiceManifest(applicationTypeName, applicationTypeVersion, serviceManifestName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._reportApplicationHealth(applicationId, healthInformation, options, optionalCallback); + return self._getServiceManifest(applicationTypeName, applicationTypeVersion, serviceManifestName, options, optionalCallback); } } /** - * @summary Starts upgrading an application in the Service Fabric cluster. + * @summary Gets the list containing the information about service types from + * the applications deployed on a node in a Service Fabric cluster. * - * Validates the supplied application upgrade parameters and starts upgrading - * the application if the parameters are valid. + * Gets the list containing the information about service types from the + * applications deployed on a node in a Service Fabric cluster. The response + * includes the name of the service type, its registration status, the code + * package that registered it and activation ID of the service package. + * + * @param {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. @@ -46479,166 +43654,147 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * @param {object} applicationUpgradeDescription Parameters for an application - * upgrade. + * @param {object} [options] Optional Parameters. * - * @param {string} applicationUpgradeDescription.name The name of the target - * application, including the 'fabric:' URI scheme. + * @param {string} [options.serviceManifestName] The name of the service + * manifest to filter the list of deployed service type information. If + * specified, the response will only contain the information about service + * types that are defined in this service manifest. * - * @param {string} applicationUpgradeDescription.targetApplicationTypeVersion - * The target application type version (found in the application manifest) for - * the application upgrade. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {array} applicationUpgradeDescription.parameters List of application - * parameters with overridden values from their default values specified in the - * application manifest. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} applicationUpgradeDescription.upgradeKind The kind of - * upgrade out of the following possible values. Possible values include: - * 'Invalid', 'Rolling' + * @returns {Promise} A promise is returned * - * @param {string} [applicationUpgradeDescription.rollingUpgradeMode] The mode - * used to monitor health during a rolling upgrade. The values are - * UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: - * 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {number} - * [applicationUpgradeDescription.upgradeReplicaSetCheckTimeoutInSeconds] The - * maximum amount of time to block processing of an upgrade domain and prevent - * loss of availability when there are unexpected issues. When this timeout - * expires, processing of the upgrade domain will proceed regardless of - * availability loss issues. The timeout is reset at the start of each upgrade - * domain. Valid values are between 0 and 42949672925 inclusive. (unsigned - * 32-bit integer). + * @reject {Error} - The error object. + */ + getDeployedServiceTypeInfoListWithHttpOperationResponse(nodeName, applicationId, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getDeployedServiceTypeInfoList(nodeName, applicationId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets the list containing the information about service types from + * the applications deployed on a node in a Service Fabric cluster. * - * @param {boolean} [applicationUpgradeDescription.forceRestart] If true, then - * processes are forcefully restarted during upgrade even when the code version - * has not changed (the upgrade only changes configuration or data). + * Gets the list containing the information about service types from the + * applications deployed on a node in a Service Fabric cluster. The response + * includes the name of the service type, its registration status, the code + * package that registered it and activation ID of the service package. * - * @param {object} [applicationUpgradeDescription.monitoringPolicy] Describes - * the parameters for monitoring an upgrade in Monitored mode. + * @param {string} nodeName The name of the node. * - * @param {string} - * [applicationUpgradeDescription.monitoringPolicy.failureAction] The - * compensating action to perform when a Monitored upgrade encounters - * monitoring policy or health policy violations. - * Invalid indicates the failure action is invalid. Rollback specifies that the - * upgrade will start rolling back automatically. - * Manual indicates that the upgrade will switch to UnmonitoredManual upgrade - * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * previous versions. * - * @param {string} - * [applicationUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] - * The amount of time to wait after completing an upgrade domain before - * applying health policies. It is first interpreted as a string representing - * an ISO 8601 duration. If that fails, then it is interpreted as a number - * representing the total number of milliseconds. + * @param {object} [options] Optional Parameters. * - * @param {string} - * [applicationUpgradeDescription.monitoringPolicy.healthCheckStableDurationInMilliseconds] - * The amount of time that the application or cluster must remain healthy - * before the upgrade proceeds to the next upgrade domain. It is first - * interpreted as a string representing an ISO 8601 duration. If that fails, - * then it is interpreted as a number representing the total number of - * milliseconds. + * @param {string} [options.serviceManifestName] The name of the service + * manifest to filter the list of deployed service type information. If + * specified, the response will only contain the information about service + * types that are defined in this service manifest. * - * @param {string} - * [applicationUpgradeDescription.monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] - * The amount of time to retry health evaluation when the application or - * cluster is unhealthy before FailureAction is executed. It is first - * interpreted as a string representing an ISO 8601 duration. If that fails, - * then it is interpreted as a number representing the total number of - * milliseconds. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {string} - * [applicationUpgradeDescription.monitoringPolicy.upgradeTimeoutInMilliseconds] - * The amount of time the overall upgrade has to complete before FailureAction - * is executed. It is first interpreted as a string representing an ISO 8601 - * duration. If that fails, then it is interpreted as a number representing the - * total number of milliseconds. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} - * [applicationUpgradeDescription.monitoringPolicy.upgradeDomainTimeoutInMilliseconds] - * The amount of time each upgrade domain has to complete before FailureAction - * is executed. It is first interpreted as a string representing an ISO 8601 - * duration. If that fails, then it is interpreted as a number representing the - * total number of milliseconds. + * @param {function} [optionalCallback] - The optional callback. * - * @param {object} [applicationUpgradeDescription.applicationHealthPolicy] - * Defines a health policy used to evaluate the health of an application or one - * of its children entities. + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. * - * @param {boolean} - * [applicationUpgradeDescription.applicationHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. + * {Promise} A promise is returned * - * @param {number} - * [applicationUpgradeDescription.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] - * The maximum allowed percentage of unhealthy deployed applications. Allowed - * values are Byte values from zero to 100. - * The percentage represents the maximum tolerated percentage of deployed - * applications that can be unhealthy before the application is considered in - * error. - * This is calculated by dividing the number of unhealthy deployed applications - * over the number of nodes where the application is currently deployed on in - * the cluster. - * The computation rounds up to tolerate one failure on small numbers of nodes. - * Default percentage is zero. + * @resolve {Array} - The deserialized result object. * - * @param {object} - * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] - * The health policy used by default to evaluate the health of a service type. + * @reject {Error} - The error object. * - * @param {number} - * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] - * The maximum allowed percentage of unhealthy partitions per service. Allowed - * values are Byte values from zero to 100 + * {function} optionalCallback(err, result, request, response) * - * The percentage represents the maximum tolerated percentage of partitions - * that can be unhealthy before the service is considered in error. - * If the percentage is respected but there is at least one unhealthy - * partition, the health is evaluated as Warning. - * The percentage is calculated by dividing the number of unhealthy partitions - * over the total number of partitions in the service. - * The computation rounds up to tolerate one failure on small numbers of - * partitions. Default percentage is zero. + * {Error} err - The Error object if an error occurred, null otherwise. * - * @param {number} - * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] - * The maximum allowed percentage of unhealthy replicas per partition. Allowed - * values are Byte values from zero to 100. + * {array} [result] - The deserialized result object if an error did not occur. * - * The percentage represents the maximum tolerated percentage of replicas that - * can be unhealthy before the partition is considered in error. - * If the percentage is respected but there is at least one unhealthy replica, - * the health is evaluated as Warning. - * The percentage is calculated by dividing the number of unhealthy replicas - * over the total number of replicas in the partition. - * The computation rounds up to tolerate one failure on small numbers of - * replicas. Default percentage is zero. + * {object} [request] - The HTTP Request object if an error did not occur. * - * @param {number} - * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getDeployedServiceTypeInfoList(nodeName, applicationId, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getDeployedServiceTypeInfoList(nodeName, applicationId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getDeployedServiceTypeInfoList(nodeName, applicationId, options, optionalCallback); + } + } + + /** + * @summary Gets the information about a specified service type of the + * application deployed on a node in a Service Fabric cluster. * - * The percentage represents the maximum tolerated percentage of services that - * can be unhealthy before the application is considered in error. - * If the percentage is respected but there is at least one unhealthy service, - * the health is evaluated as Warning. - * This is calculated by dividing the number of unhealthy services of the - * specific service type over the total number of services of the specific - * service type. - * The computation rounds up to tolerate one failure on small numbers of - * services. Default percentage is zero. + * Gets the list containing the information about a specific service type from + * the applications deployed on a node in a Service Fabric cluster. The + * response includes the name of the service type, its registration status, the + * code package that registered it and activation ID of the service package. + * Each entry represents one activation of a service type, differentiated by + * the activation ID. * - * @param {array} - * [applicationUpgradeDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] - * The map with service type health policy per service type name. The map is - * empty by default. + * @param {string} nodeName The name of the node. + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * previous versions. + * + * @param {string} serviceTypeName Specifies the name of a Service Fabric + * service type. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.serviceManifestName] The name of the service + * manifest to filter the list of deployed service type information. If + * specified, the response will only contain the information about service + * types that are defined in this service manifest. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -46649,15 +43805,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - startApplicationUpgradeWithHttpOperationResponse(applicationId, applicationUpgradeDescription, options) { + getDeployedServiceTypeInfoByNameWithHttpOperationResponse(nodeName, applicationId, serviceTypeName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._startApplicationUpgrade(applicationId, applicationUpgradeDescription, options, (err, result, request, response) => { + self._getDeployedServiceTypeInfoByName(nodeName, applicationId, serviceTypeName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -46668,10 +43824,17 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Starts upgrading an application in the Service Fabric cluster. + * @summary Gets the information about a specified service type of the + * application deployed on a node in a Service Fabric cluster. * - * Validates the supplied application upgrade parameters and starts upgrading - * the application if the parameters are valid. + * Gets the list containing the information about a specific service type from + * the applications deployed on a node in a Service Fabric cluster. The + * response includes the name of the service type, its registration status, the + * code package that registered it and activation ID of the service package. + * Each entry represents one activation of a service type, differentiated by + * the activation ID. + * + * @param {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. @@ -46681,163 +43844,190 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * @param {object} applicationUpgradeDescription Parameters for an application - * upgrade. + * @param {string} serviceTypeName Specifies the name of a Service Fabric + * service type. * - * @param {string} applicationUpgradeDescription.name The name of the target - * application, including the 'fabric:' URI scheme. + * @param {object} [options] Optional Parameters. * - * @param {string} applicationUpgradeDescription.targetApplicationTypeVersion - * The target application type version (found in the application manifest) for - * the application upgrade. + * @param {string} [options.serviceManifestName] The name of the service + * manifest to filter the list of deployed service type information. If + * specified, the response will only contain the information about service + * types that are defined in this service manifest. * - * @param {array} applicationUpgradeDescription.parameters List of application - * parameters with overridden values from their default values specified in the - * application manifest. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {string} applicationUpgradeDescription.upgradeKind The kind of - * upgrade out of the following possible values. Possible values include: - * 'Invalid', 'Rolling' + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [applicationUpgradeDescription.rollingUpgradeMode] The mode - * used to monitor health during a rolling upgrade. The values are - * UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: - * 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' + * @param {function} [optionalCallback] - The optional callback. * - * @param {number} - * [applicationUpgradeDescription.upgradeReplicaSetCheckTimeoutInSeconds] The - * maximum amount of time to block processing of an upgrade domain and prevent - * loss of availability when there are unexpected issues. When this timeout - * expires, processing of the upgrade domain will proceed regardless of - * availability loss issues. The timeout is reset at the start of each upgrade - * domain. Valid values are between 0 and 42949672925 inclusive. (unsigned - * 32-bit integer). + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. * - * @param {boolean} [applicationUpgradeDescription.forceRestart] If true, then - * processes are forcefully restarted during upgrade even when the code version - * has not changed (the upgrade only changes configuration or data). + * {Promise} A promise is returned * - * @param {object} [applicationUpgradeDescription.monitoringPolicy] Describes - * the parameters for monitoring an upgrade in Monitored mode. + * @resolve {Array} - The deserialized result object. * - * @param {string} - * [applicationUpgradeDescription.monitoringPolicy.failureAction] The - * compensating action to perform when a Monitored upgrade encounters - * monitoring policy or health policy violations. - * Invalid indicates the failure action is invalid. Rollback specifies that the - * upgrade will start rolling back automatically. - * Manual indicates that the upgrade will switch to UnmonitoredManual upgrade - * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' + * @reject {Error} - The error object. * - * @param {string} - * [applicationUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] - * The amount of time to wait after completing an upgrade domain before - * applying health policies. It is first interpreted as a string representing - * an ISO 8601 duration. If that fails, then it is interpreted as a number - * representing the total number of milliseconds. + * {function} optionalCallback(err, result, request, response) * - * @param {string} - * [applicationUpgradeDescription.monitoringPolicy.healthCheckStableDurationInMilliseconds] - * The amount of time that the application or cluster must remain healthy - * before the upgrade proceeds to the next upgrade domain. It is first - * interpreted as a string representing an ISO 8601 duration. If that fails, - * then it is interpreted as a number representing the total number of - * milliseconds. + * {Error} err - The Error object if an error occurred, null otherwise. * - * @param {string} - * [applicationUpgradeDescription.monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] - * The amount of time to retry health evaluation when the application or - * cluster is unhealthy before FailureAction is executed. It is first - * interpreted as a string representing an ISO 8601 duration. If that fails, - * then it is interpreted as a number representing the total number of - * milliseconds. + * {array} [result] - The deserialized result object if an error did not occur. * - * @param {string} - * [applicationUpgradeDescription.monitoringPolicy.upgradeTimeoutInMilliseconds] - * The amount of time the overall upgrade has to complete before FailureAction - * is executed. It is first interpreted as a string representing an ISO 8601 - * duration. If that fails, then it is interpreted as a number representing the - * total number of milliseconds. + * {object} [request] - The HTTP Request object if an error did not occur. * - * @param {string} - * [applicationUpgradeDescription.monitoringPolicy.upgradeDomainTimeoutInMilliseconds] - * The amount of time each upgrade domain has to complete before FailureAction - * is executed. It is first interpreted as a string representing an ISO 8601 - * duration. If that fails, then it is interpreted as a number representing the - * total number of milliseconds. + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getDeployedServiceTypeInfoByName(nodeName, applicationId, serviceTypeName, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getDeployedServiceTypeInfoByName(nodeName, applicationId, serviceTypeName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getDeployedServiceTypeInfoByName(nodeName, applicationId, serviceTypeName, options, optionalCallback); + } + } + + /** + * @summary Creates a Service Fabric application. * - * @param {object} [applicationUpgradeDescription.applicationHealthPolicy] - * Defines a health policy used to evaluate the health of an application or one - * of its children entities. + * Creates a Service Fabric application using the specified description. * - * @param {boolean} - * [applicationUpgradeDescription.applicationHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. + * @param {object} applicationDescription Description for creating an + * application. * - * @param {number} - * [applicationUpgradeDescription.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] - * The maximum allowed percentage of unhealthy deployed applications. Allowed - * values are Byte values from zero to 100. - * The percentage represents the maximum tolerated percentage of deployed - * applications that can be unhealthy before the application is considered in - * error. - * This is calculated by dividing the number of unhealthy deployed applications - * over the number of nodes where the application is currently deployed on in - * the cluster. - * The computation rounds up to tolerate one failure on small numbers of nodes. - * Default percentage is zero. + * @param {string} applicationDescription.name The name of the application, + * including the 'fabric:' URI scheme. + * + * @param {string} applicationDescription.typeName The application type name as + * defined in the application manifest. + * + * @param {string} applicationDescription.typeVersion The version of the + * application type as defined in the application manifest. + * + * @param {array} [applicationDescription.parameterList] List of application + * parameters with overridden values from their default values specified in the + * application manifest. + * + * @param {object} [applicationDescription.applicationCapacity] Describes + * capacity information for services of this application. This description can + * be used for describing the following. + * - Reserving the capacity for the services on the nodes + * - Limiting the total number of nodes that services of this application can + * run on + * - Limiting the custom capacity metrics to limit the total consumption of + * this metric by the services of this application + * + * @param {number} [applicationDescription.applicationCapacity.minimumNodes] + * The minimum number of nodes where Service Fabric will reserve capacity for + * this application. Note that this does not mean that the services of this + * application will be placed on all of those nodes. If this property is set to + * zero, no capacity will be reserved. The value of this property cannot be + * more than the value of the MaximumNodes property. + * + * @param {number} [applicationDescription.applicationCapacity.maximumNodes] + * The maximum number of nodes where Service Fabric will reserve capacity for + * this application. Note that this does not mean that the services of this + * application will be placed on all of those nodes. By default, the value of + * this property is zero and it means that the services can be placed on any + * node. + * + * @param {array} + * [applicationDescription.applicationCapacity.applicationMetrics] List of + * application capacity metric description. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + createApplicationWithHttpOperationResponse(applicationDescription, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._createApplication(applicationDescription, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Creates a Service Fabric application. * - * @param {object} - * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] - * The health policy used by default to evaluate the health of a service type. + * Creates a Service Fabric application using the specified description. * - * @param {number} - * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] - * The maximum allowed percentage of unhealthy partitions per service. Allowed - * values are Byte values from zero to 100 + * @param {object} applicationDescription Description for creating an + * application. * - * The percentage represents the maximum tolerated percentage of partitions - * that can be unhealthy before the service is considered in error. - * If the percentage is respected but there is at least one unhealthy - * partition, the health is evaluated as Warning. - * The percentage is calculated by dividing the number of unhealthy partitions - * over the total number of partitions in the service. - * The computation rounds up to tolerate one failure on small numbers of - * partitions. Default percentage is zero. + * @param {string} applicationDescription.name The name of the application, + * including the 'fabric:' URI scheme. * - * @param {number} - * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] - * The maximum allowed percentage of unhealthy replicas per partition. Allowed - * values are Byte values from zero to 100. + * @param {string} applicationDescription.typeName The application type name as + * defined in the application manifest. * - * The percentage represents the maximum tolerated percentage of replicas that - * can be unhealthy before the partition is considered in error. - * If the percentage is respected but there is at least one unhealthy replica, - * the health is evaluated as Warning. - * The percentage is calculated by dividing the number of unhealthy replicas - * over the total number of replicas in the partition. - * The computation rounds up to tolerate one failure on small numbers of - * replicas. Default percentage is zero. + * @param {string} applicationDescription.typeVersion The version of the + * application type as defined in the application manifest. * - * @param {number} - * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * @param {array} [applicationDescription.parameterList] List of application + * parameters with overridden values from their default values specified in the + * application manifest. * - * The percentage represents the maximum tolerated percentage of services that - * can be unhealthy before the application is considered in error. - * If the percentage is respected but there is at least one unhealthy service, - * the health is evaluated as Warning. - * This is calculated by dividing the number of unhealthy services of the - * specific service type over the total number of services of the specific - * service type. - * The computation rounds up to tolerate one failure on small numbers of - * services. Default percentage is zero. + * @param {object} [applicationDescription.applicationCapacity] Describes + * capacity information for services of this application. This description can + * be used for describing the following. + * - Reserving the capacity for the services on the nodes + * - Limiting the total number of nodes that services of this application can + * run on + * - Limiting the custom capacity metrics to limit the total consumption of + * this metric by the services of this application + * + * @param {number} [applicationDescription.applicationCapacity.minimumNodes] + * The minimum number of nodes where Service Fabric will reserve capacity for + * this application. Note that this does not mean that the services of this + * application will be placed on all of those nodes. If this property is set to + * zero, no capacity will be reserved. The value of this property cannot be + * more than the value of the MaximumNodes property. + * + * @param {number} [applicationDescription.applicationCapacity.maximumNodes] + * The maximum number of nodes where Service Fabric will reserve capacity for + * this application. Note that this does not mean that the services of this + * application will be placed on all of those nodes. By default, the value of + * this property is zero and it means that the services can be placed on any + * node. * * @param {array} - * [applicationUpgradeDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] - * The map with service type health policy per service type name. The map is - * empty by default. + * [applicationDescription.applicationCapacity.applicationMetrics] List of + * application capacity metric description. * * @param {object} [options] Optional Parameters. * @@ -46870,7 +44060,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - startApplicationUpgrade(applicationId, applicationUpgradeDescription, options, optionalCallback) { + createApplication(applicationDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -46879,22 +44069,27 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._startApplicationUpgrade(applicationId, applicationUpgradeDescription, options, (err, result, request, response) => { + self._createApplication(applicationDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._startApplicationUpgrade(applicationId, applicationUpgradeDescription, options, optionalCallback); + return self._createApplication(applicationDescription, options, optionalCallback); } } /** - * @summary Gets details for the latest upgrade performed on this application. + * @summary Deletes an existing Service Fabric application. * - * Returns information about the state of the latest application upgrade along - * with details to aid debugging application health issues. + * An application must be created before it can be deleted. Deleting an + * application will delete all services that are part of that application. By + * default, Service Fabric will try to close service replicas in a graceful + * manner and then delete the service. However, if a service is having issues + * closing the replica gracefully, the delete operation may take a long time or + * get stuck. Use the optional ForceRemove flag to skip the graceful close + * sequence and forcefully delete the application and all of its services. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. @@ -46906,6 +44101,12 @@ class ServiceFabricClient extends ServiceClient { * * @param {object} [options] Optional Parameters. * + * @param {boolean} [options.forceRemove] Remove a Service Fabric application + * or service forcefully without going through the graceful shutdown sequence. + * This parameter can be used to forcefully delete an application or service + * for which delete is timing out due to issues in the service code that + * prevents graceful close of replicas. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -46916,15 +44117,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getApplicationUpgradeWithHttpOperationResponse(applicationId, options) { + deleteApplicationWithHttpOperationResponse(applicationId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getApplicationUpgrade(applicationId, options, (err, result, request, response) => { + self._deleteApplication(applicationId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -46935,10 +44136,15 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets details for the latest upgrade performed on this application. + * @summary Deletes an existing Service Fabric application. * - * Returns information about the state of the latest application upgrade along - * with details to aid debugging application health issues. + * An application must be created before it can be deleted. Deleting an + * application will delete all services that are part of that application. By + * default, Service Fabric will try to close service replicas in a graceful + * manner and then delete the service. However, if a service is having issues + * closing the replica gracefully, the delete operation may take a long time or + * get stuck. Use the optional ForceRemove flag to skip the graceful close + * sequence and forcefully delete the application and all of its services. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. @@ -46950,6 +44156,12 @@ class ServiceFabricClient extends ServiceClient { * * @param {object} [options] Optional Parameters. * + * @param {boolean} [options.forceRemove] Remove a Service Fabric application + * or service forcefully without going through the graceful shutdown sequence. + * This parameter can be used to forcefully delete an application or service + * for which delete is timing out due to issues in the service code that + * prevents graceful close of replicas. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -46965,7 +44177,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ApplicationUpgradeProgressInfo} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -46973,15 +44185,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ApplicationUpgradeProgressInfo} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getApplicationUpgrade(applicationId, options, optionalCallback) { + deleteApplication(applicationId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -46990,25 +44200,26 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getApplicationUpgrade(applicationId, options, (err, result, request, response) => { + self._deleteApplication(applicationId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getApplicationUpgrade(applicationId, options, optionalCallback); + return self._deleteApplication(applicationId, options, optionalCallback); } } /** - * @summary Updates an ongoing application upgrade in the Service Fabric - * cluster. + * @summary Gets load information about a Service Fabric application. * - * Updates the parameters of an ongoing application upgrade from the ones - * specified at the time of starting the application upgrade. This may be - * required to mitigate stuck application upgrades due to incorrect parameters - * or issues in the application to make progress. + * Returns the load information about the application that was created or in + * the process of being created in the Service Fabric cluster and whose name + * matches the one specified as the parameter. The response includes the name, + * minimum nodes, maximum nodes, the number of nodes the application is + * occupying currently, and application load metric information about the + * application. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. @@ -47018,161 +44229,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * @param {object} applicationUpgradeUpdateDescription Parameters for updating - * an existing application upgrade. - * - * @param {string} applicationUpgradeUpdateDescription.name The name of the - * application, including the 'fabric:' URI scheme. - * - * @param {string} applicationUpgradeUpdateDescription.upgradeKind The kind of - * upgrade out of the following possible values. Possible values include: - * 'Invalid', 'Rolling' - * - * @param {object} - * [applicationUpgradeUpdateDescription.applicationHealthPolicy] Defines a - * health policy used to evaluate the health of an application or one of its - * children entities. - * - * @param {boolean} - * [applicationUpgradeUpdateDescription.applicationHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. - * - * @param {number} - * [applicationUpgradeUpdateDescription.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] - * The maximum allowed percentage of unhealthy deployed applications. Allowed - * values are Byte values from zero to 100. - * The percentage represents the maximum tolerated percentage of deployed - * applications that can be unhealthy before the application is considered in - * error. - * This is calculated by dividing the number of unhealthy deployed applications - * over the number of nodes where the application is currently deployed on in - * the cluster. - * The computation rounds up to tolerate one failure on small numbers of nodes. - * Default percentage is zero. - * - * @param {object} - * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] - * The health policy used by default to evaluate the health of a service type. - * - * @param {number} - * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] - * The maximum allowed percentage of unhealthy partitions per service. Allowed - * values are Byte values from zero to 100 - * - * The percentage represents the maximum tolerated percentage of partitions - * that can be unhealthy before the service is considered in error. - * If the percentage is respected but there is at least one unhealthy - * partition, the health is evaluated as Warning. - * The percentage is calculated by dividing the number of unhealthy partitions - * over the total number of partitions in the service. - * The computation rounds up to tolerate one failure on small numbers of - * partitions. Default percentage is zero. - * - * @param {number} - * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] - * The maximum allowed percentage of unhealthy replicas per partition. Allowed - * values are Byte values from zero to 100. - * - * The percentage represents the maximum tolerated percentage of replicas that - * can be unhealthy before the partition is considered in error. - * If the percentage is respected but there is at least one unhealthy replica, - * the health is evaluated as Warning. - * The percentage is calculated by dividing the number of unhealthy replicas - * over the total number of replicas in the partition. - * The computation rounds up to tolerate one failure on small numbers of - * replicas. Default percentage is zero. - * - * @param {number} - * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. - * - * The percentage represents the maximum tolerated percentage of services that - * can be unhealthy before the application is considered in error. - * If the percentage is respected but there is at least one unhealthy service, - * the health is evaluated as Warning. - * This is calculated by dividing the number of unhealthy services of the - * specific service type over the total number of services of the specific - * service type. - * The computation rounds up to tolerate one failure on small numbers of - * services. Default percentage is zero. - * - * @param {array} - * [applicationUpgradeUpdateDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] - * The map with service type health policy per service type name. The map is - * empty by default. - * - * @param {object} [applicationUpgradeUpdateDescription.updateDescription] - * Describes the parameters for updating a rolling upgrade of application or - * cluster. - * - * @param {string} - * applicationUpgradeUpdateDescription.updateDescription.rollingUpgradeMode The - * mode used to monitor health during a rolling upgrade. The values are - * UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: - * 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' - * - * @param {boolean} - * [applicationUpgradeUpdateDescription.updateDescription.forceRestart] If - * true, then processes are forcefully restarted during upgrade even when the - * code version has not changed (the upgrade only changes configuration or - * data). - * - * @param {number} - * [applicationUpgradeUpdateDescription.updateDescription.replicaSetCheckTimeoutInMilliseconds] - * The maximum amount of time to block processing of an upgrade domain and - * prevent loss of availability when there are unexpected issues. When this - * timeout expires, processing of the upgrade domain will proceed regardless of - * availability loss issues. The timeout is reset at the start of each upgrade - * domain. Valid values are between 0 and 42949672925 inclusive. (unsigned - * 32-bit integer). - * - * @param {string} - * [applicationUpgradeUpdateDescription.updateDescription.failureAction] The - * compensating action to perform when a Monitored upgrade encounters - * monitoring policy or health policy violations. - * Invalid indicates the failure action is invalid. Rollback specifies that the - * upgrade will start rolling back automatically. - * Manual indicates that the upgrade will switch to UnmonitoredManual upgrade - * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' - * - * @param {string} - * [applicationUpgradeUpdateDescription.updateDescription.healthCheckWaitDurationInMilliseconds] - * The amount of time to wait after completing an upgrade domain before - * applying health policies. It is first interpreted as a string representing - * an ISO 8601 duration. If that fails, then it is interpreted as a number - * representing the total number of milliseconds. - * - * @param {string} - * [applicationUpgradeUpdateDescription.updateDescription.healthCheckStableDurationInMilliseconds] - * The amount of time that the application or cluster must remain healthy - * before the upgrade proceeds to the next upgrade domain. It is first - * interpreted as a string representing an ISO 8601 duration. If that fails, - * then it is interpreted as a number representing the total number of - * milliseconds. - * - * @param {string} - * [applicationUpgradeUpdateDescription.updateDescription.healthCheckRetryTimeoutInMilliseconds] - * The amount of time to retry health evaluation when the application or - * cluster is unhealthy before FailureAction is executed. It is first - * interpreted as a string representing an ISO 8601 duration. If that fails, - * then it is interpreted as a number representing the total number of - * milliseconds. - * - * @param {string} - * [applicationUpgradeUpdateDescription.updateDescription.upgradeTimeoutInMilliseconds] - * The amount of time the overall upgrade has to complete before FailureAction - * is executed. It is first interpreted as a string representing an ISO 8601 - * duration. If that fails, then it is interpreted as a number representing the - * total number of milliseconds. - * - * @param {string} - * [applicationUpgradeUpdateDescription.updateDescription.upgradeDomainTimeoutInMilliseconds] - * The amount of time each upgrade domain has to complete before FailureAction - * is executed. It is first interpreted as a string representing an ISO 8601 - * duration. If that fails, then it is interpreted as a number representing the - * total number of milliseconds. - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -47185,15 +44241,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - updateApplicationUpgradeWithHttpOperationResponse(applicationId, applicationUpgradeUpdateDescription, options) { + getApplicationLoadInfoWithHttpOperationResponse(applicationId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._updateApplicationUpgrade(applicationId, applicationUpgradeUpdateDescription, options, (err, result, request, response) => { + self._getApplicationLoadInfo(applicationId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -47204,13 +44260,14 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Updates an ongoing application upgrade in the Service Fabric - * cluster. + * @summary Gets load information about a Service Fabric application. * - * Updates the parameters of an ongoing application upgrade from the ones - * specified at the time of starting the application upgrade. This may be - * required to mitigate stuck application upgrades due to incorrect parameters - * or issues in the application to make progress. + * Returns the load information about the application that was created or in + * the process of being created in the Service Fabric cluster and whose name + * matches the one specified as the parameter. The response includes the name, + * minimum nodes, maximum nodes, the number of nodes the application is + * occupying currently, and application load metric information about the + * application. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. @@ -47220,162 +44277,185 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * @param {object} applicationUpgradeUpdateDescription Parameters for updating - * an existing application upgrade. + * @param {object} [options] Optional Parameters. * - * @param {string} applicationUpgradeUpdateDescription.name The name of the - * application, including the 'fabric:' URI scheme. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {string} applicationUpgradeUpdateDescription.upgradeKind The kind of - * upgrade out of the following possible values. Possible values include: - * 'Invalid', 'Rolling' + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} - * [applicationUpgradeUpdateDescription.applicationHealthPolicy] Defines a - * health policy used to evaluate the health of an application or one of its - * children entities. + * @param {function} [optionalCallback] - The optional callback. * - * @param {boolean} - * [applicationUpgradeUpdateDescription.applicationHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. * - * @param {number} - * [applicationUpgradeUpdateDescription.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] - * The maximum allowed percentage of unhealthy deployed applications. Allowed - * values are Byte values from zero to 100. - * The percentage represents the maximum tolerated percentage of deployed - * applications that can be unhealthy before the application is considered in - * error. - * This is calculated by dividing the number of unhealthy deployed applications - * over the number of nodes where the application is currently deployed on in - * the cluster. - * The computation rounds up to tolerate one failure on small numbers of nodes. - * Default percentage is zero. + * {Promise} A promise is returned * - * @param {object} - * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] - * The health policy used by default to evaluate the health of a service type. + * @resolve {ApplicationLoadInfo} - The deserialized result object. * - * @param {number} - * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] - * The maximum allowed percentage of unhealthy partitions per service. Allowed - * values are Byte values from zero to 100 + * @reject {Error} - The error object. * - * The percentage represents the maximum tolerated percentage of partitions - * that can be unhealthy before the service is considered in error. - * If the percentage is respected but there is at least one unhealthy - * partition, the health is evaluated as Warning. - * The percentage is calculated by dividing the number of unhealthy partitions - * over the total number of partitions in the service. - * The computation rounds up to tolerate one failure on small numbers of - * partitions. Default percentage is zero. + * {function} optionalCallback(err, result, request, response) * - * @param {number} - * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] - * The maximum allowed percentage of unhealthy replicas per partition. Allowed - * values are Byte values from zero to 100. + * {Error} err - The Error object if an error occurred, null otherwise. * - * The percentage represents the maximum tolerated percentage of replicas that - * can be unhealthy before the partition is considered in error. - * If the percentage is respected but there is at least one unhealthy replica, - * the health is evaluated as Warning. - * The percentage is calculated by dividing the number of unhealthy replicas - * over the total number of replicas in the partition. - * The computation rounds up to tolerate one failure on small numbers of - * replicas. Default percentage is zero. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ApplicationLoadInfo} for more information. * - * @param {number} - * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * {object} [request] - The HTTP Request object if an error did not occur. * - * The percentage represents the maximum tolerated percentage of services that - * can be unhealthy before the application is considered in error. - * If the percentage is respected but there is at least one unhealthy service, - * the health is evaluated as Warning. - * This is calculated by dividing the number of unhealthy services of the - * specific service type over the total number of services of the specific - * service type. - * The computation rounds up to tolerate one failure on small numbers of - * services. Default percentage is zero. + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getApplicationLoadInfo(applicationId, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getApplicationLoadInfo(applicationId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getApplicationLoadInfo(applicationId, options, optionalCallback); + } + } + + /** + * @summary Gets the list of applications created in the Service Fabric cluster + * that match the specified filters. * - * @param {array} - * [applicationUpgradeUpdateDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] - * The map with service type health policy per service type name. The map is - * empty by default. + * Gets the information about the applications that were created or in the + * process of being created in the Service Fabric cluster and match the + * specified filters. The response includes the name, type, status, parameters, + * and other details about the application. If the applications do not fit in a + * page, one page of results is returned as well as a continuation token, which + * can be used to get the next page. Filters ApplicationTypeName and + * ApplicationDefinitionKindFilter cannot be specified at the same time. * - * @param {object} [applicationUpgradeUpdateDescription.updateDescription] - * Describes the parameters for updating a rolling upgrade of application or - * cluster. + * @param {object} [options] Optional Parameters. * - * @param {string} - * applicationUpgradeUpdateDescription.updateDescription.rollingUpgradeMode The - * mode used to monitor health during a rolling upgrade. The values are - * UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: - * 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' + * @param {number} [options.applicationDefinitionKindFilter] Used to filter on + * ApplicationDefinitionKind, which is the mechanism used to define a Service + * Fabric application. + * - Default - Default value, which performs the same function as selecting + * "All". The value is 0. + * - All - Filter that matches input with any ApplicationDefinitionKind value. + * The value is 65535. + * - ServiceFabricApplicationDescription - Filter that matches input with + * ApplicationDefinitionKind value ServiceFabricApplicationDescription. The + * value is 1. + * - Compose - Filter that matches input with ApplicationDefinitionKind value + * Compose. The value is 2. * - * @param {boolean} - * [applicationUpgradeUpdateDescription.updateDescription.forceRestart] If - * true, then processes are forcefully restarted during upgrade even when the - * code version has not changed (the upgrade only changes configuration or - * data). + * @param {string} [options.applicationTypeName] The application type name used + * to filter the applications to query for. This value should not contain the + * application type version. * - * @param {number} - * [applicationUpgradeUpdateDescription.updateDescription.replicaSetCheckTimeoutInMilliseconds] - * The maximum amount of time to block processing of an upgrade domain and - * prevent loss of availability when there are unexpected issues. When this - * timeout expires, processing of the upgrade domain will proceed regardless of - * availability loss issues. The timeout is reset at the start of each upgrade - * domain. Valid values are between 0 and 42949672925 inclusive. (unsigned - * 32-bit integer). + * @param {boolean} [options.excludeApplicationParameters] The flag that + * specifies whether application parameters will be excluded from the result. + * + * @param {string} [options.continuationToken] The continuation token parameter + * is used to obtain next set of results. A continuation token with a non-empty + * value is included in the response of the API when the results from the + * system do not fit in a single response. When this value is passed to the + * next API call, the API returns next set of results. If there are no further + * results, then the continuation token does not contain a value. The value of + * this parameter should not be URL encoded. + * + * @param {number} [options.maxResults] The maximum number of results to be + * returned as part of the paged queries. This parameter defines the upper + * bound on the number of results returned. The results returned can be less + * than the specified maximum results if they do not fit in the message as per + * the max message size restrictions defined in the configuration. If this + * parameter is zero or not specified, the paged query includes as many results + * as possible that fit in the return message. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getApplicationInfoListWithHttpOperationResponse(options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getApplicationInfoList(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets the list of applications created in the Service Fabric cluster + * that match the specified filters. * - * @param {string} - * [applicationUpgradeUpdateDescription.updateDescription.failureAction] The - * compensating action to perform when a Monitored upgrade encounters - * monitoring policy or health policy violations. - * Invalid indicates the failure action is invalid. Rollback specifies that the - * upgrade will start rolling back automatically. - * Manual indicates that the upgrade will switch to UnmonitoredManual upgrade - * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' + * Gets the information about the applications that were created or in the + * process of being created in the Service Fabric cluster and match the + * specified filters. The response includes the name, type, status, parameters, + * and other details about the application. If the applications do not fit in a + * page, one page of results is returned as well as a continuation token, which + * can be used to get the next page. Filters ApplicationTypeName and + * ApplicationDefinitionKindFilter cannot be specified at the same time. * - * @param {string} - * [applicationUpgradeUpdateDescription.updateDescription.healthCheckWaitDurationInMilliseconds] - * The amount of time to wait after completing an upgrade domain before - * applying health policies. It is first interpreted as a string representing - * an ISO 8601 duration. If that fails, then it is interpreted as a number - * representing the total number of milliseconds. + * @param {object} [options] Optional Parameters. * - * @param {string} - * [applicationUpgradeUpdateDescription.updateDescription.healthCheckStableDurationInMilliseconds] - * The amount of time that the application or cluster must remain healthy - * before the upgrade proceeds to the next upgrade domain. It is first - * interpreted as a string representing an ISO 8601 duration. If that fails, - * then it is interpreted as a number representing the total number of - * milliseconds. + * @param {number} [options.applicationDefinitionKindFilter] Used to filter on + * ApplicationDefinitionKind, which is the mechanism used to define a Service + * Fabric application. + * - Default - Default value, which performs the same function as selecting + * "All". The value is 0. + * - All - Filter that matches input with any ApplicationDefinitionKind value. + * The value is 65535. + * - ServiceFabricApplicationDescription - Filter that matches input with + * ApplicationDefinitionKind value ServiceFabricApplicationDescription. The + * value is 1. + * - Compose - Filter that matches input with ApplicationDefinitionKind value + * Compose. The value is 2. * - * @param {string} - * [applicationUpgradeUpdateDescription.updateDescription.healthCheckRetryTimeoutInMilliseconds] - * The amount of time to retry health evaluation when the application or - * cluster is unhealthy before FailureAction is executed. It is first - * interpreted as a string representing an ISO 8601 duration. If that fails, - * then it is interpreted as a number representing the total number of - * milliseconds. + * @param {string} [options.applicationTypeName] The application type name used + * to filter the applications to query for. This value should not contain the + * application type version. * - * @param {string} - * [applicationUpgradeUpdateDescription.updateDescription.upgradeTimeoutInMilliseconds] - * The amount of time the overall upgrade has to complete before FailureAction - * is executed. It is first interpreted as a string representing an ISO 8601 - * duration. If that fails, then it is interpreted as a number representing the - * total number of milliseconds. + * @param {boolean} [options.excludeApplicationParameters] The flag that + * specifies whether application parameters will be excluded from the result. * - * @param {string} - * [applicationUpgradeUpdateDescription.updateDescription.upgradeDomainTimeoutInMilliseconds] - * The amount of time each upgrade domain has to complete before FailureAction - * is executed. It is first interpreted as a string representing an ISO 8601 - * duration. If that fails, then it is interpreted as a number representing the - * total number of milliseconds. + * @param {string} [options.continuationToken] The continuation token parameter + * is used to obtain next set of results. A continuation token with a non-empty + * value is included in the response of the API when the results from the + * system do not fit in a single response. When this value is passed to the + * next API call, the API returns next set of results. If there are no further + * results, then the continuation token does not contain a value. The value of + * this parameter should not be URL encoded. * - * @param {object} [options] Optional Parameters. + * @param {number} [options.maxResults] The maximum number of results to be + * returned as part of the paged queries. This parameter defines the upper + * bound on the number of results returned. The results returned can be less + * than the specified maximum results if they do not fit in the message as per + * the max message size restrictions defined in the configuration. If this + * parameter is zero or not specified, the paged query includes as many results + * as possible that fit in the return message. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -47392,7 +44472,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {PagedApplicationInfoList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -47400,13 +44480,15 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedApplicationInfoList} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - updateApplicationUpgrade(applicationId, applicationUpgradeUpdateDescription, options, optionalCallback) { + getApplicationInfoList(options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -47415,24 +44497,24 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._updateApplicationUpgrade(applicationId, applicationUpgradeUpdateDescription, options, (err, result, request, response) => { + self._getApplicationInfoList(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._updateApplicationUpgrade(applicationId, applicationUpgradeUpdateDescription, options, optionalCallback); + return self._getApplicationInfoList(options, optionalCallback); } } /** - * @summary Resumes upgrading an application in the Service Fabric cluster. + * @summary Gets information about a Service Fabric application. * - * Resumes an unmonitored manual Service Fabric application upgrade. Service - * Fabric upgrades one upgrade domain at a time. For unmonitored manual - * upgrades, after Service Fabric finishes an upgrade domain, it waits for you - * to call this API before proceeding to the next upgrade domain. + * Returns the information about the application that was created or in the + * process of being created in the Service Fabric cluster and whose name + * matches the one specified as the parameter. The response includes the name, + * type, status, parameters, and other details about the application. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. @@ -47442,14 +44524,11 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * @param {object} resumeApplicationUpgradeDescription Describes the parameters - * for resuming an application upgrade. - * - * @param {string} resumeApplicationUpgradeDescription.upgradeDomainName The - * name of the upgrade domain in which to resume the upgrade. - * * @param {object} [options] Optional Parameters. * + * @param {boolean} [options.excludeApplicationParameters] The flag that + * specifies whether application parameters will be excluded from the result. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -47460,15 +44539,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - resumeApplicationUpgradeWithHttpOperationResponse(applicationId, resumeApplicationUpgradeDescription, options) { + getApplicationInfoWithHttpOperationResponse(applicationId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._resumeApplicationUpgrade(applicationId, resumeApplicationUpgradeDescription, options, (err, result, request, response) => { + self._getApplicationInfo(applicationId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -47479,12 +44558,12 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Resumes upgrading an application in the Service Fabric cluster. + * @summary Gets information about a Service Fabric application. * - * Resumes an unmonitored manual Service Fabric application upgrade. Service - * Fabric upgrades one upgrade domain at a time. For unmonitored manual - * upgrades, after Service Fabric finishes an upgrade domain, it waits for you - * to call this API before proceeding to the next upgrade domain. + * Returns the information about the application that was created or in the + * process of being created in the Service Fabric cluster and whose name + * matches the one specified as the parameter. The response includes the name, + * type, status, parameters, and other details about the application. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. @@ -47494,14 +44573,11 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * @param {object} resumeApplicationUpgradeDescription Describes the parameters - * for resuming an application upgrade. - * - * @param {string} resumeApplicationUpgradeDescription.upgradeDomainName The - * name of the upgrade domain in which to resume the upgrade. - * * @param {object} [options] Optional Parameters. * + * @param {boolean} [options.excludeApplicationParameters] The flag that + * specifies whether application parameters will be excluded from the result. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -47517,7 +44593,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {ApplicationInfo} - The deserialized result object. * * @reject {Error} - The error object. * @@ -47525,13 +44601,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ApplicationInfo} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - resumeApplicationUpgrade(applicationId, resumeApplicationUpgradeDescription, options, optionalCallback) { + getApplicationInfo(applicationId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -47540,26 +44617,23 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._resumeApplicationUpgrade(applicationId, resumeApplicationUpgradeDescription, options, (err, result, request, response) => { + self._getApplicationInfo(applicationId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._resumeApplicationUpgrade(applicationId, resumeApplicationUpgradeDescription, options, optionalCallback); + return self._getApplicationInfo(applicationId, options, optionalCallback); } } /** - * @summary Starts rolling back the currently on-going upgrade of an - * application in the Service Fabric cluster. + * @summary Gets the health of the service fabric application. * - * Starts rolling back the current application upgrade to the previous version. - * This API can only be used to roll back the current in-progress upgrade that - * is rolling forward to new version. If the application is not currently being - * upgraded use StartApplicationUpgrade API to upgrade it to desired version, - * including rolling back to a previous version. + * Returns the heath state of the service fabric application. The response + * reports either Ok, Error or Warning health state. If the entity is not found + * in the health store, it will return Error. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. @@ -47571,6 +44645,83 @@ class ServiceFabricClient extends ServiceClient { * * @param {object} [options] Optional Parameters. * + * @param {number} [options.eventsHealthStateFilter] Allows filtering the + * collection of HealthEvent objects returned based on health state. + * The possible values for this parameter include integer value of one of the + * following health states. + * Only events that match the filter are returned. All events are used to + * evaluate the aggregated health state. + * If not specified, all entries are returned. The state values are flag-based + * enumeration, so the value could be a combination of these values, obtained + * using the bitwise 'OR' operator. For example, If the provided value is 6 + * then all of the events with HealthState value of OK (2) and Warning (4) are + * returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * @param {number} [options.deployedApplicationsHealthStateFilter] Allows + * filtering of the deployed applications health state objects returned in the + * result of application health query based on their health state. + * The possible values for this parameter include integer value of one of the + * following health states. Only deployed applications that match the filter + * will be returned. + * All deployed applications are used to evaluate the aggregated health state. + * If not specified, all entries are returned. + * The state values are flag-based enumeration, so the value could be a + * combination of these values, obtained using bitwise 'OR' operator. + * For example, if the provided value is 6 then health state of deployed + * applications with HealthState value of OK (2) and Warning (4) are returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * @param {number} [options.servicesHealthStateFilter] Allows filtering of the + * services health state objects returned in the result of services health + * query based on their health state. + * The possible values for this parameter include integer value of one of the + * following health states. + * Only services that match the filter are returned. All services are used to + * evaluate the aggregated health state. + * If not specified, all entries are returned. The state values are flag-based + * enumeration, so the value could be a combination of these values, + * obtained using bitwise 'OR' operator. For example, if the provided value is + * 6 then health state of services with HealthState value of OK (2) and Warning + * (4) will be returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * @param {boolean} [options.excludeHealthStatistics] Indicates whether the + * health statistics should be returned as part of the query result. False by + * default. + * The statistics show the number of children entities in health state Ok, + * Warning, and Error. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -47581,15 +44732,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - rollbackApplicationUpgradeWithHttpOperationResponse(applicationId, options) { + getApplicationHealthWithHttpOperationResponse(applicationId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._rollbackApplicationUpgrade(applicationId, options, (err, result, request, response) => { + self._getApplicationHealth(applicationId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -47600,14 +44751,11 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Starts rolling back the currently on-going upgrade of an - * application in the Service Fabric cluster. + * @summary Gets the health of the service fabric application. * - * Starts rolling back the current application upgrade to the previous version. - * This API can only be used to roll back the current in-progress upgrade that - * is rolling forward to new version. If the application is not currently being - * upgraded use StartApplicationUpgrade API to upgrade it to desired version, - * including rolling back to a previous version. + * Returns the heath state of the service fabric application. The response + * reports either Ok, Error or Warning health state. If the entity is not found + * in the health store, it will return Error. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. @@ -47619,6 +44767,83 @@ class ServiceFabricClient extends ServiceClient { * * @param {object} [options] Optional Parameters. * + * @param {number} [options.eventsHealthStateFilter] Allows filtering the + * collection of HealthEvent objects returned based on health state. + * The possible values for this parameter include integer value of one of the + * following health states. + * Only events that match the filter are returned. All events are used to + * evaluate the aggregated health state. + * If not specified, all entries are returned. The state values are flag-based + * enumeration, so the value could be a combination of these values, obtained + * using the bitwise 'OR' operator. For example, If the provided value is 6 + * then all of the events with HealthState value of OK (2) and Warning (4) are + * returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * @param {number} [options.deployedApplicationsHealthStateFilter] Allows + * filtering of the deployed applications health state objects returned in the + * result of application health query based on their health state. + * The possible values for this parameter include integer value of one of the + * following health states. Only deployed applications that match the filter + * will be returned. + * All deployed applications are used to evaluate the aggregated health state. + * If not specified, all entries are returned. + * The state values are flag-based enumeration, so the value could be a + * combination of these values, obtained using bitwise 'OR' operator. + * For example, if the provided value is 6 then health state of deployed + * applications with HealthState value of OK (2) and Warning (4) are returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * @param {number} [options.servicesHealthStateFilter] Allows filtering of the + * services health state objects returned in the result of services health + * query based on their health state. + * The possible values for this parameter include integer value of one of the + * following health states. + * Only services that match the filter are returned. All services are used to + * evaluate the aggregated health state. + * If not specified, all entries are returned. The state values are flag-based + * enumeration, so the value could be a combination of these values, + * obtained using bitwise 'OR' operator. For example, if the provided value is + * 6 then health state of services with HealthState value of OK (2) and Warning + * (4) will be returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * @param {boolean} [options.excludeHealthStatistics] Indicates whether the + * health statistics should be returned as part of the query result. False by + * default. + * The statistics show the number of children entities in health state Ok, + * Warning, and Error. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -47634,7 +44859,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {ApplicationHealth} - The deserialized result object. * * @reject {Error} - The error object. * @@ -47642,13 +44867,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ApplicationHealth} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - rollbackApplicationUpgrade(applicationId, options, optionalCallback) { + getApplicationHealth(applicationId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -47657,224 +44883,205 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._rollbackApplicationUpgrade(applicationId, options, (err, result, request, response) => { + self._getApplicationHealth(applicationId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._rollbackApplicationUpgrade(applicationId, options, optionalCallback); + return self._getApplicationHealth(applicationId, options, optionalCallback); } } /** - * @summary Gets the list of applications deployed on a Service Fabric node. - * - * Gets the list of applications deployed on a Service Fabric node. The results - * do not include information about deployed system applications unless - * explicitly queried for by ID. Results encompass deployed applications in - * active, activating, and downloading states. This query requires that the - * node name corresponds to a node on the cluster. The query fails if the - * provided node name does not point to any active Service Fabric nodes on the - * cluster. - * - * @param {string} nodeName The name of the node. - * - * @param {object} [options] Optional Parameters. - * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. - * - * @param {boolean} [options.includeHealthState] Include the health state of an - * entity. - * If this parameter is false or not specified, then the health state returned - * is "Unknown". - * When set to true, the query goes in parallel to the node and the health - * system service before the results are merged. - * As a result, the query is more expensive and may take a longer time. - * - * @param {string} [options.continuationToken] The continuation token parameter - * is used to obtain next set of results. A continuation token with a non-empty - * value is included in the response of the API when the results from the - * system do not fit in a single response. When this value is passed to the - * next API call, the API returns next set of results. If there are no further - * results, then the continuation token does not contain a value. The value of - * this parameter should not be URL encoded. - * - * @param {number} [options.maxResults] The maximum number of results to be - * returned as part of the paged queries. This parameter defines the upper - * bound on the number of results returned. The results returned can be less - * than the specified maximum results if they do not fit in the message as per - * the max message size restrictions defined in the configuration. If this - * parameter is zero or not specified, the paged query includes as many results - * as possible that fit in the return message. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error} - The error object. - */ - getDeployedApplicationInfoListWithHttpOperationResponse(nodeName, options) { - let client = this; - let self = this; - return new Promise((resolve, reject) => { - self._getDeployedApplicationInfoList(nodeName, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * @summary Gets the list of applications deployed on a Service Fabric node. + * @summary Gets the health of a Service Fabric application using the specified + * policy. * - * Gets the list of applications deployed on a Service Fabric node. The results - * do not include information about deployed system applications unless - * explicitly queried for by ID. Results encompass deployed applications in - * active, activating, and downloading states. This query requires that the - * node name corresponds to a node on the cluster. The query fails if the - * provided node name does not point to any active Service Fabric nodes on the - * cluster. + * Gets the health of a Service Fabric application. Use EventsHealthStateFilter + * to filter the collection of health events reported on the node based on the + * health state. Use ClusterHealthPolicies to override the health policies used + * to evaluate the health. * - * @param {string} nodeName The name of the node. + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * previous versions. * * @param {object} [options] Optional Parameters. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. - * - * @param {boolean} [options.includeHealthState] Include the health state of an - * entity. - * If this parameter is false or not specified, then the health state returned - * is "Unknown". - * When set to true, the query goes in parallel to the node and the health - * system service before the results are merged. - * As a result, the query is more expensive and may take a longer time. + * @param {number} [options.eventsHealthStateFilter] Allows filtering the + * collection of HealthEvent objects returned based on health state. + * The possible values for this parameter include integer value of one of the + * following health states. + * Only events that match the filter are returned. All events are used to + * evaluate the aggregated health state. + * If not specified, all entries are returned. The state values are flag-based + * enumeration, so the value could be a combination of these values, obtained + * using the bitwise 'OR' operator. For example, If the provided value is 6 + * then all of the events with HealthState value of OK (2) and Warning (4) are + * returned. * - * @param {string} [options.continuationToken] The continuation token parameter - * is used to obtain next set of results. A continuation token with a non-empty - * value is included in the response of the API when the results from the - * system do not fit in a single response. When this value is passed to the - * next API call, the API returns next set of results. If there are no further - * results, then the continuation token does not contain a value. The value of - * this parameter should not be URL encoded. + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. * - * @param {number} [options.maxResults] The maximum number of results to be - * returned as part of the paged queries. This parameter defines the upper - * bound on the number of results returned. The results returned can be less - * than the specified maximum results if they do not fit in the message as per - * the max message size restrictions defined in the configuration. If this - * parameter is zero or not specified, the paged query includes as many results - * as possible that fit in the return message. + * @param {number} [options.deployedApplicationsHealthStateFilter] Allows + * filtering of the deployed applications health state objects returned in the + * result of application health query based on their health state. + * The possible values for this parameter include integer value of one of the + * following health states. Only deployed applications that match the filter + * will be returned. + * All deployed applications are used to evaluate the aggregated health state. + * If not specified, all entries are returned. + * The state values are flag-based enumeration, so the value could be a + * combination of these values, obtained using bitwise 'OR' operator. + * For example, if the provided value is 6 then health state of deployed + * applications with HealthState value of OK (2) and Warning (4) are returned. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. * - * @param {function} [optionalCallback] - The optional callback. + * @param {number} [options.servicesHealthStateFilter] Allows filtering of the + * services health state objects returned in the result of services health + * query based on their health state. + * The possible values for this parameter include integer value of one of the + * following health states. + * Only services that match the filter are returned. All services are used to + * evaluate the aggregated health state. + * If not specified, all entries are returned. The state values are flag-based + * enumeration, so the value could be a combination of these values, + * obtained using bitwise 'OR' operator. For example, if the provided value is + * 6 then health state of services with HealthState value of OK (2) and Warning + * (4) will be returned. * - * @returns {function|Promise} If a callback was passed as the last parameter - * then it returns the callback else returns a Promise. + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. * - * {Promise} A promise is returned + * @param {boolean} [options.excludeHealthStatistics] Indicates whether the + * health statistics should be returned as part of the query result. False by + * default. + * The statistics show the number of children entities in health state Ok, + * Warning, and Error. * - * @resolve {PagedDeployedApplicationInfoList} - The deserialized result object. + * @param {object} [options.applicationHealthPolicy] Describes the health + * policies used to evaluate the health of an application or one of its + * children. + * If not present, the health evaluation uses the health policy from + * application manifest or the default health policy. * - * @reject {Error} - The error object. + * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. * - * {function} optionalCallback(err, result, request, response) + * @param {number} + * [options.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] + * The maximum allowed percentage of unhealthy deployed applications. Allowed + * values are Byte values from zero to 100. + * The percentage represents the maximum tolerated percentage of deployed + * applications that can be unhealthy before the application is considered in + * error. + * This is calculated by dividing the number of unhealthy deployed applications + * over the number of nodes where the application is currently deployed on in + * the cluster. + * The computation rounds up to tolerate one failure on small numbers of nodes. + * Default percentage is zero. * - * {Error} err - The Error object if an error occurred, null otherwise. + * @param {object} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health + * policy used by default to evaluate the health of a service type. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PagedDeployedApplicationInfoList} for more - * information. + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] + * The maximum allowed percentage of unhealthy partitions per service. Allowed + * values are Byte values from zero to 100 * - * {object} [request] - The HTTP Request object if an error did not occur. + * The percentage represents the maximum tolerated percentage of partitions + * that can be unhealthy before the service is considered in error. + * If the percentage is respected but there is at least one unhealthy + * partition, the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy partitions + * over the total number of partitions in the service. + * The computation rounds up to tolerate one failure on small numbers of + * partitions. Default percentage is zero. * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ - getDeployedApplicationInfoList(nodeName, options, optionalCallback) { - let client = this; - let self = this; - if (!optionalCallback && typeof options === 'function') { - optionalCallback = options; - options = null; - } - if (!optionalCallback) { - return new Promise((resolve, reject) => { - self._getDeployedApplicationInfoList(nodeName, options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._getDeployedApplicationInfoList(nodeName, options, optionalCallback); - } - } - - /** - * @summary Gets the information about an application deployed on a Service - * Fabric node. + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] + * The maximum allowed percentage of unhealthy replicas per partition. Allowed + * values are Byte values from zero to 100. * - * This query returns system application information if the application ID - * provided is for system application. Results encompass deployed applications - * in active, activating, and downloading states. This query requires that the - * node name corresponds to a node on the cluster. The query fails if the - * provided node name does not point to any active Service Fabric nodes on the - * cluster. + * The percentage represents the maximum tolerated percentage of replicas that + * can be unhealthy before the partition is considered in error. + * If the percentage is respected but there is at least one unhealthy replica, + * the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy replicas + * over the total number of replicas in the partition. + * The computation rounds up to tolerate one failure on small numbers of + * replicas. Default percentage is zero. * - * @param {string} nodeName The name of the node. + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. + * The percentage represents the maximum tolerated percentage of services that + * can be unhealthy before the application is considered in error. + * If the percentage is respected but there is at least one unhealthy service, + * the health is evaluated as Warning. + * This is calculated by dividing the number of unhealthy services of the + * specific service type over the total number of services of the specific + * service type. + * The computation rounds up to tolerate one failure on small numbers of + * services. Default percentage is zero. * - * @param {object} [options] Optional Parameters. + * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The * default value for this parameter is 60 seconds. * - * @param {boolean} [options.includeHealthState] Include the health state of an - * entity. - * If this parameter is false or not specified, then the health state returned - * is "Unknown". - * When set to true, the query goes in parallel to the node and the health - * system service before the results are merged. - * As a result, the query is more expensive and may take a longer time. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getDeployedApplicationInfoWithHttpOperationResponse(nodeName, applicationId, options) { + getApplicationHealthUsingPolicyWithHttpOperationResponse(applicationId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getDeployedApplicationInfo(nodeName, applicationId, options, (err, result, request, response) => { + self._getApplicationHealthUsingPolicy(applicationId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -47885,17 +45092,13 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the information about an application deployed on a Service - * Fabric node. - * - * This query returns system application information if the application ID - * provided is for system application. Results encompass deployed applications - * in active, activating, and downloading states. This query requires that the - * node name corresponds to a node on the cluster. The query fails if the - * provided node name does not point to any active Service Fabric nodes on the - * cluster. + * @summary Gets the health of a Service Fabric application using the specified + * policy. * - * @param {string} nodeName The name of the node. + * Gets the health of a Service Fabric application. Use EventsHealthStateFilter + * to filter the collection of health events reported on the node based on the + * health state. Use ClusterHealthPolicies to override the health policies used + * to evaluate the health. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. @@ -47907,19 +45110,161 @@ class ServiceFabricClient extends ServiceClient { * * @param {object} [options] Optional Parameters. * + * @param {number} [options.eventsHealthStateFilter] Allows filtering the + * collection of HealthEvent objects returned based on health state. + * The possible values for this parameter include integer value of one of the + * following health states. + * Only events that match the filter are returned. All events are used to + * evaluate the aggregated health state. + * If not specified, all entries are returned. The state values are flag-based + * enumeration, so the value could be a combination of these values, obtained + * using the bitwise 'OR' operator. For example, If the provided value is 6 + * then all of the events with HealthState value of OK (2) and Warning (4) are + * returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * @param {number} [options.deployedApplicationsHealthStateFilter] Allows + * filtering of the deployed applications health state objects returned in the + * result of application health query based on their health state. + * The possible values for this parameter include integer value of one of the + * following health states. Only deployed applications that match the filter + * will be returned. + * All deployed applications are used to evaluate the aggregated health state. + * If not specified, all entries are returned. + * The state values are flag-based enumeration, so the value could be a + * combination of these values, obtained using bitwise 'OR' operator. + * For example, if the provided value is 6 then health state of deployed + * applications with HealthState value of OK (2) and Warning (4) are returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * @param {number} [options.servicesHealthStateFilter] Allows filtering of the + * services health state objects returned in the result of services health + * query based on their health state. + * The possible values for this parameter include integer value of one of the + * following health states. + * Only services that match the filter are returned. All services are used to + * evaluate the aggregated health state. + * If not specified, all entries are returned. The state values are flag-based + * enumeration, so the value could be a combination of these values, + * obtained using bitwise 'OR' operator. For example, if the provided value is + * 6 then health state of services with HealthState value of OK (2) and Warning + * (4) will be returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * @param {boolean} [options.excludeHealthStatistics] Indicates whether the + * health statistics should be returned as part of the query result. False by + * default. + * The statistics show the number of children entities in health state Ok, + * Warning, and Error. + * + * @param {object} [options.applicationHealthPolicy] Describes the health + * policies used to evaluate the health of an application or one of its + * children. + * If not present, the health evaluation uses the health policy from + * application manifest or the default health policy. + * + * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. + * + * @param {number} + * [options.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] + * The maximum allowed percentage of unhealthy deployed applications. Allowed + * values are Byte values from zero to 100. + * The percentage represents the maximum tolerated percentage of deployed + * applications that can be unhealthy before the application is considered in + * error. + * This is calculated by dividing the number of unhealthy deployed applications + * over the number of nodes where the application is currently deployed on in + * the cluster. + * The computation rounds up to tolerate one failure on small numbers of nodes. + * Default percentage is zero. + * + * @param {object} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health + * policy used by default to evaluate the health of a service type. + * + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] + * The maximum allowed percentage of unhealthy partitions per service. Allowed + * values are Byte values from zero to 100 + * + * The percentage represents the maximum tolerated percentage of partitions + * that can be unhealthy before the service is considered in error. + * If the percentage is respected but there is at least one unhealthy + * partition, the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy partitions + * over the total number of partitions in the service. + * The computation rounds up to tolerate one failure on small numbers of + * partitions. Default percentage is zero. + * + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] + * The maximum allowed percentage of unhealthy replicas per partition. Allowed + * values are Byte values from zero to 100. + * + * The percentage represents the maximum tolerated percentage of replicas that + * can be unhealthy before the partition is considered in error. + * If the percentage is respected but there is at least one unhealthy replica, + * the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy replicas + * over the total number of replicas in the partition. + * The computation rounds up to tolerate one failure on small numbers of + * replicas. Default percentage is zero. + * + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. + * + * The percentage represents the maximum tolerated percentage of services that + * can be unhealthy before the application is considered in error. + * If the percentage is respected but there is at least one unhealthy service, + * the health is evaluated as Warning. + * This is calculated by dividing the number of unhealthy services of the + * specific service type over the total number of services of the specific + * service type. + * The computation rounds up to tolerate one failure on small numbers of + * services. Default percentage is zero. + * + * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The * default value for this parameter is 60 seconds. * - * @param {boolean} [options.includeHealthState] Include the health state of an - * entity. - * If this parameter is false or not specified, then the health state returned - * is "Unknown". - * When set to true, the query goes in parallel to the node and the health - * system service before the results are merged. - * As a result, the query is more expensive and may take a longer time. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -47930,7 +45275,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {DeployedApplicationInfo} - The deserialized result object. + * @resolve {ApplicationHealth} - The deserialized result object. * * @reject {Error} - The error object. * @@ -47939,14 +45284,13 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DeployedApplicationInfo} for more - * information. + * See {@link ApplicationHealth} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getDeployedApplicationInfo(nodeName, applicationId, options, optionalCallback) { + getApplicationHealthUsingPolicy(applicationId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -47955,28 +45299,31 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getDeployedApplicationInfo(nodeName, applicationId, options, (err, result, request, response) => { + self._getApplicationHealthUsingPolicy(applicationId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getDeployedApplicationInfo(nodeName, applicationId, options, optionalCallback); + return self._getApplicationHealthUsingPolicy(applicationId, options, optionalCallback); } } /** - * @summary Gets the information about health of an application deployed on a - * Service Fabric node. - * - * Gets the information about health of an application deployed on a Service - * Fabric node. Use EventsHealthStateFilter to optionally filter for the - * collection of HealthEvent objects reported on the deployed application based - * on health state. Use DeployedServicePackagesHealthStateFilter to optionally - * filter for DeployedServicePackageHealth children based on health state. + * @summary Sends a health report on the Service Fabric application. * - * @param {string} nodeName The name of the node. + * Reports health state of the specified Service Fabric application. The report + * must contain the information about the source of the health report and + * property on which it is reported. + * The report is sent to a Service Fabric gateway Application, which forwards + * to the health store. + * The report may be accepted by the gateway, but rejected by the health store + * after extra validation. + * For example, the health store may reject the report because of an invalid + * parameter, like a stale sequence number. + * To see whether the report was applied in the health store, get application + * health and check that the report appears in the HealthEvents section. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. @@ -47986,61 +45333,96 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * @param {object} [options] Optional Parameters. + * @param {object} healthInformation Describes the health information for the + * health report. This information needs to be present in all of the health + * reports sent to the health manager. * - * @param {number} [options.eventsHealthStateFilter] Allows filtering the - * collection of HealthEvent objects returned based on health state. - * The possible values for this parameter include integer value of one of the - * following health states. - * Only events that match the filter are returned. All events are used to - * evaluate the aggregated health state. - * If not specified, all entries are returned. The state values are flag-based - * enumeration, so the value could be a combination of these values, obtained - * using the bitwise 'OR' operator. For example, If the provided value is 6 - * then all of the events with HealthState value of OK (2) and Warning (4) are - * returned. + * @param {string} healthInformation.sourceId The source name that identifies + * the client/watchdog/system component that generated the health information. * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * @param {string} healthInformation.property The property of the health + * information. An entity can have health reports for different properties. + * The property is a string and not a fixed enumeration to allow the reporter + * flexibility to categorize the state condition that triggers the report. + * For example, a reporter with SourceId "LocalWatchdog" can monitor the state + * of the available disk on a node, + * so it can report "AvailableDisk" property on that node. + * The same reporter can monitor the node connectivity, so it can report a + * property "Connectivity" on the same node. + * In the health store, these reports are treated as separate health events for + * the specified node. * - * @param {number} [options.deployedServicePackagesHealthStateFilter] Allows - * filtering of the deployed service package health state objects returned in - * the result of deployed application health query based on their health state. - * The possible values for this parameter include integer value of one of the - * following health states. - * Only deployed service packages that match the filter are returned. All - * deployed service packages are used to evaluate the aggregated health state - * of the deployed application. - * If not specified, all entries are returned. - * The state values are flag-based enumeration, so the value can be a - * combination of these values, obtained using the bitwise 'OR' operator. - * For example, if the provided value is 6 then health state of service - * packages with HealthState value of OK (2) and Warning (4) are returned. + * Together with the SourceId, the property uniquely identifies the health + * information. * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' * - * @param {boolean} [options.excludeHealthStatistics] Indicates whether the - * health statistics should be returned as part of the query result. False by - * default. - * The statistics show the number of children entities in health state Ok, - * Warning, and Error. + * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The + * duration for which this health report is valid. This field uses ISO8601 + * format for specifying the duration. + * When clients report periodically, they should send reports with higher + * frequency than time to live. + * If clients report on transition, they can set the time to live to infinite. + * When time to live expires, the health event that contains the health + * information + * is either removed from health store, if RemoveWhenExpired is true, or + * evaluated at error, if RemoveWhenExpired false. + * + * If not specified, time to live defaults to infinite value. + * + * @param {string} [healthInformation.description] The description of the + * health information. It represents free text used to add human readable + * information about the report. + * The maximum string length for the description is 4096 characters. + * If the provided string is longer, it will be automatically truncated. + * When truncated, the last characters of the description contain a marker + * "[Truncated]", and total string size is 4096 characters. + * The presence of the marker indicates to users that truncation occurred. + * Note that when truncated, the description has less than 4096 characters from + * the original string. + * + * @param {string} [healthInformation.sequenceNumber] The sequence number for + * this health report as a numeric string. + * The report sequence number is used by the health store to detect stale + * reports. + * If not specified, a sequence number is auto-generated by the health client + * when a report is added. + * + * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates + * whether the report is removed from health store when it expires. + * If set to true, the report is removed from the health store after it + * expires. + * If set to false, the report is treated as an error when expired. The value + * of this property is false by default. + * When clients report periodically, they should set RemoveWhenExpired false + * (default). + * This way, if the reporter has issues (e.g. deadlock) and can't report, the + * entity is evaluated at error when the health report expires. + * This flags the entity as being in Error health state. + * + * @param {object} [options] Optional Parameters. + * + * @param {boolean} [options.immediate] A flag that indicates whether the + * report should be sent immediately. + * A health report is sent to a Service Fabric gateway Application, which + * forwards to the health store. + * If Immediate is set to true, the report is sent immediately from HTTP + * Gateway to the health store, regardless of the fabric client settings that + * the HTTP Gateway Application is using. + * This is useful for critical reports that should be sent as soon as possible. + * Depending on timing and other conditions, sending the report may still fail, + * for example if the HTTP Gateway is closed or the message doesn't reach the + * Gateway. + * If Immediate is set to false, the report is sent based on the health client + * settings from the HTTP Gateway. Therefore, it will be batched according to + * the HealthReportSendInterval configuration. + * This is the recommended setting because it allows the health client to + * optimize health reporting messages to health store as well as health report + * processing. + * By default, reports are not sent immediately. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -48052,35 +45434,38 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getDeployedApplicationHealthWithHttpOperationResponse(nodeName, applicationId, options) { + reportApplicationHealthWithHttpOperationResponse(applicationId, healthInformation, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getDeployedApplicationHealth(nodeName, applicationId, options, (err, result, request, response) => { + self._reportApplicationHealth(applicationId, healthInformation, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * @summary Gets the information about health of an application deployed on a - * Service Fabric node. - * - * Gets the information about health of an application deployed on a Service - * Fabric node. Use EventsHealthStateFilter to optionally filter for the - * collection of HealthEvent objects reported on the deployed application based - * on health state. Use DeployedServicePackagesHealthStateFilter to optionally - * filter for DeployedServicePackageHealth children based on health state. + return; + }); + }); + } + + /** + * @summary Sends a health report on the Service Fabric application. * - * @param {string} nodeName The name of the node. + * Reports health state of the specified Service Fabric application. The report + * must contain the information about the source of the health report and + * property on which it is reported. + * The report is sent to a Service Fabric gateway Application, which forwards + * to the health store. + * The report may be accepted by the gateway, but rejected by the health store + * after extra validation. + * For example, the health store may reject the report because of an invalid + * parameter, like a stale sequence number. + * To see whether the report was applied in the health store, get application + * health and check that the report appears in the HealthEvents section. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. @@ -48090,61 +45475,96 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * @param {object} [options] Optional Parameters. + * @param {object} healthInformation Describes the health information for the + * health report. This information needs to be present in all of the health + * reports sent to the health manager. * - * @param {number} [options.eventsHealthStateFilter] Allows filtering the - * collection of HealthEvent objects returned based on health state. - * The possible values for this parameter include integer value of one of the - * following health states. - * Only events that match the filter are returned. All events are used to - * evaluate the aggregated health state. - * If not specified, all entries are returned. The state values are flag-based - * enumeration, so the value could be a combination of these values, obtained - * using the bitwise 'OR' operator. For example, If the provided value is 6 - * then all of the events with HealthState value of OK (2) and Warning (4) are - * returned. + * @param {string} healthInformation.sourceId The source name that identifies + * the client/watchdog/system component that generated the health information. * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * @param {string} healthInformation.property The property of the health + * information. An entity can have health reports for different properties. + * The property is a string and not a fixed enumeration to allow the reporter + * flexibility to categorize the state condition that triggers the report. + * For example, a reporter with SourceId "LocalWatchdog" can monitor the state + * of the available disk on a node, + * so it can report "AvailableDisk" property on that node. + * The same reporter can monitor the node connectivity, so it can report a + * property "Connectivity" on the same node. + * In the health store, these reports are treated as separate health events for + * the specified node. * - * @param {number} [options.deployedServicePackagesHealthStateFilter] Allows - * filtering of the deployed service package health state objects returned in - * the result of deployed application health query based on their health state. - * The possible values for this parameter include integer value of one of the - * following health states. - * Only deployed service packages that match the filter are returned. All - * deployed service packages are used to evaluate the aggregated health state - * of the deployed application. - * If not specified, all entries are returned. - * The state values are flag-based enumeration, so the value can be a - * combination of these values, obtained using the bitwise 'OR' operator. - * For example, if the provided value is 6 then health state of service - * packages with HealthState value of OK (2) and Warning (4) are returned. + * Together with the SourceId, the property uniquely identifies the health + * information. * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' * - * @param {boolean} [options.excludeHealthStatistics] Indicates whether the - * health statistics should be returned as part of the query result. False by - * default. - * The statistics show the number of children entities in health state Ok, - * Warning, and Error. + * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The + * duration for which this health report is valid. This field uses ISO8601 + * format for specifying the duration. + * When clients report periodically, they should send reports with higher + * frequency than time to live. + * If clients report on transition, they can set the time to live to infinite. + * When time to live expires, the health event that contains the health + * information + * is either removed from health store, if RemoveWhenExpired is true, or + * evaluated at error, if RemoveWhenExpired false. + * + * If not specified, time to live defaults to infinite value. + * + * @param {string} [healthInformation.description] The description of the + * health information. It represents free text used to add human readable + * information about the report. + * The maximum string length for the description is 4096 characters. + * If the provided string is longer, it will be automatically truncated. + * When truncated, the last characters of the description contain a marker + * "[Truncated]", and total string size is 4096 characters. + * The presence of the marker indicates to users that truncation occurred. + * Note that when truncated, the description has less than 4096 characters from + * the original string. + * + * @param {string} [healthInformation.sequenceNumber] The sequence number for + * this health report as a numeric string. + * The report sequence number is used by the health store to detect stale + * reports. + * If not specified, a sequence number is auto-generated by the health client + * when a report is added. + * + * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates + * whether the report is removed from health store when it expires. + * If set to true, the report is removed from the health store after it + * expires. + * If set to false, the report is treated as an error when expired. The value + * of this property is false by default. + * When clients report periodically, they should set RemoveWhenExpired false + * (default). + * This way, if the reporter has issues (e.g. deadlock) and can't report, the + * entity is evaluated at error when the health report expires. + * This flags the entity as being in Error health state. + * + * @param {object} [options] Optional Parameters. + * + * @param {boolean} [options.immediate] A flag that indicates whether the + * report should be sent immediately. + * A health report is sent to a Service Fabric gateway Application, which + * forwards to the health store. + * If Immediate is set to true, the report is sent immediately from HTTP + * Gateway to the health store, regardless of the fabric client settings that + * the HTTP Gateway Application is using. + * This is useful for critical reports that should be sent as soon as possible. + * Depending on timing and other conditions, sending the report may still fail, + * for example if the HTTP Gateway is closed or the message doesn't reach the + * Gateway. + * If Immediate is set to false, the report is sent based on the health client + * settings from the HTTP Gateway. Therefore, it will be batched according to + * the HealthReportSendInterval configuration. + * This is the recommended setting because it allows the health client to + * optimize health reporting messages to health store as well as health report + * processing. + * By default, reports are not sent immediately. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -48161,7 +45581,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {DeployedApplicationHealth} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -48169,15 +45589,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DeployedApplicationHealth} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getDeployedApplicationHealth(nodeName, applicationId, options, optionalCallback) { + reportApplicationHealth(applicationId, healthInformation, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -48186,33 +45604,22 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getDeployedApplicationHealth(nodeName, applicationId, options, (err, result, request, response) => { + self._reportApplicationHealth(applicationId, healthInformation, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getDeployedApplicationHealth(nodeName, applicationId, options, optionalCallback); + return self._reportApplicationHealth(applicationId, healthInformation, options, optionalCallback); } } /** - * @summary Gets the information about health of an application deployed on a - * Service Fabric node. using the specified policy. - * - * Gets the information about health of an application deployed on a Service - * Fabric node using the specified policy. Use EventsHealthStateFilter to - * optionally filter for the collection of HealthEvent objects reported on the - * deployed application based on health state. Use - * DeployedServicePackagesHealthStateFilter to optionally filter for - * DeployedServicePackageHealth children based on health state. Use - * ApplicationHealthPolicy to optionally override the health policies used to - * evaluate the health. This API only uses 'ConsiderWarningAsError' field of - * the ApplicationHealthPolicy. The rest of the fields are ignored while - * evaluating the health of the deployed application. + * @summary Starts upgrading an application in the Service Fabric cluster. * - * @param {string} nodeName The name of the node. + * Validates the supplied application upgrade parameters and starts upgrading + * the application if the parameters are valid. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. @@ -48222,67 +45629,101 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * @param {object} [options] Optional Parameters. + * @param {object} applicationUpgradeDescription Parameters for an application + * upgrade. * - * @param {number} [options.eventsHealthStateFilter] Allows filtering the - * collection of HealthEvent objects returned based on health state. - * The possible values for this parameter include integer value of one of the - * following health states. - * Only events that match the filter are returned. All events are used to - * evaluate the aggregated health state. - * If not specified, all entries are returned. The state values are flag-based - * enumeration, so the value could be a combination of these values, obtained - * using the bitwise 'OR' operator. For example, If the provided value is 6 - * then all of the events with HealthState value of OK (2) and Warning (4) are - * returned. + * @param {string} applicationUpgradeDescription.name The name of the target + * application, including the 'fabric:' URI scheme. * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * @param {string} applicationUpgradeDescription.targetApplicationTypeVersion + * The target application type version (found in the application manifest) for + * the application upgrade. * - * @param {number} [options.deployedServicePackagesHealthStateFilter] Allows - * filtering of the deployed service package health state objects returned in - * the result of deployed application health query based on their health state. - * The possible values for this parameter include integer value of one of the - * following health states. - * Only deployed service packages that match the filter are returned. All - * deployed service packages are used to evaluate the aggregated health state - * of the deployed application. - * If not specified, all entries are returned. - * The state values are flag-based enumeration, so the value can be a - * combination of these values, obtained using the bitwise 'OR' operator. - * For example, if the provided value is 6 then health state of service - * packages with HealthState value of OK (2) and Warning (4) are returned. + * @param {array} applicationUpgradeDescription.parameters List of application + * parameters with overridden values from their default values specified in the + * application manifest. * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * @param {string} applicationUpgradeDescription.upgradeKind The kind of + * upgrade out of the following possible values. Possible values include: + * 'Invalid', 'Rolling' * - * @param {object} [options.applicationHealthPolicy] Describes the health - * policies used to evaluate the health of an application or one of its - * children. - * If not present, the health evaluation uses the health policy from - * application manifest or the default health policy. + * @param {string} [applicationUpgradeDescription.rollingUpgradeMode] The mode + * used to monitor health during a rolling upgrade. The values are + * UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: + * 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' * - * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] + * @param {number} + * [applicationUpgradeDescription.upgradeReplicaSetCheckTimeoutInSeconds] The + * maximum amount of time to block processing of an upgrade domain and prevent + * loss of availability when there are unexpected issues. When this timeout + * expires, processing of the upgrade domain will proceed regardless of + * availability loss issues. The timeout is reset at the start of each upgrade + * domain. Valid values are between 0 and 42949672925 inclusive. (unsigned + * 32-bit integer). + * + * @param {boolean} [applicationUpgradeDescription.forceRestart] If true, then + * processes are forcefully restarted during upgrade even when the code version + * has not changed (the upgrade only changes configuration or data). + * + * @param {object} [applicationUpgradeDescription.monitoringPolicy] Describes + * the parameters for monitoring an upgrade in Monitored mode. + * + * @param {string} + * [applicationUpgradeDescription.monitoringPolicy.failureAction] The + * compensating action to perform when a Monitored upgrade encounters + * monitoring policy or health policy violations. + * Invalid indicates the failure action is invalid. Rollback specifies that the + * upgrade will start rolling back automatically. + * Manual indicates that the upgrade will switch to UnmonitoredManual upgrade + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' + * + * @param {string} + * [applicationUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] + * The amount of time to wait after completing an upgrade domain before + * applying health policies. It is first interpreted as a string representing + * an ISO 8601 duration. If that fails, then it is interpreted as a number + * representing the total number of milliseconds. + * + * @param {string} + * [applicationUpgradeDescription.monitoringPolicy.healthCheckStableDurationInMilliseconds] + * The amount of time that the application or cluster must remain healthy + * before the upgrade proceeds to the next upgrade domain. It is first + * interpreted as a string representing an ISO 8601 duration. If that fails, + * then it is interpreted as a number representing the total number of + * milliseconds. + * + * @param {string} + * [applicationUpgradeDescription.monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] + * The amount of time to retry health evaluation when the application or + * cluster is unhealthy before FailureAction is executed. It is first + * interpreted as a string representing an ISO 8601 duration. If that fails, + * then it is interpreted as a number representing the total number of + * milliseconds. + * + * @param {string} + * [applicationUpgradeDescription.monitoringPolicy.upgradeTimeoutInMilliseconds] + * The amount of time the overall upgrade has to complete before FailureAction + * is executed. It is first interpreted as a string representing an ISO 8601 + * duration. If that fails, then it is interpreted as a number representing the + * total number of milliseconds. + * + * @param {string} + * [applicationUpgradeDescription.monitoringPolicy.upgradeDomainTimeoutInMilliseconds] + * The amount of time each upgrade domain has to complete before FailureAction + * is executed. It is first interpreted as a string representing an ISO 8601 + * duration. If that fails, then it is interpreted as a number representing the + * total number of milliseconds. + * + * @param {object} [applicationUpgradeDescription.applicationHealthPolicy] + * Defines a health policy used to evaluate the health of an application or one + * of its children entities. + * + * @param {boolean} + * [applicationUpgradeDescription.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. * * @param {number} - * [options.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] + * [applicationUpgradeDescription.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] * The maximum allowed percentage of unhealthy deployed applications. Allowed * values are Byte values from zero to 100. * The percentage represents the maximum tolerated percentage of deployed @@ -48295,11 +45736,11 @@ class ServiceFabricClient extends ServiceClient { * Default percentage is zero. * * @param {object} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health - * policy used by default to evaluate the health of a service type. + * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * The health policy used by default to evaluate the health of a service type. * * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] + * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] * The maximum allowed percentage of unhealthy partitions per service. Allowed * values are Byte values from zero to 100 * @@ -48313,7 +45754,7 @@ class ServiceFabricClient extends ServiceClient { * partitions. Default percentage is zero. * * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] + * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed * values are Byte values from zero to 100. * @@ -48327,9 +45768,9 @@ class ServiceFabricClient extends ServiceClient { * replicas. Default percentage is zero. * * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. * * The percentage represents the maximum tolerated percentage of services that * can be unhealthy before the application is considered in error. @@ -48341,15 +45782,12 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * @param {array} + * [applicationUpgradeDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is * empty by default. * - * @param {boolean} [options.excludeHealthStatistics] Indicates whether the - * health statistics should be returned as part of the query result. False by - * default. - * The statistics show the number of children entities in health state Ok, - * Warning, and Error. + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -48361,15 +45799,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getDeployedApplicationHealthUsingPolicyWithHttpOperationResponse(nodeName, applicationId, options) { + startApplicationUpgradeWithHttpOperationResponse(applicationId, applicationUpgradeDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getDeployedApplicationHealthUsingPolicy(nodeName, applicationId, options, (err, result, request, response) => { + self._startApplicationUpgrade(applicationId, applicationUpgradeDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -48380,21 +45818,10 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the information about health of an application deployed on a - * Service Fabric node. using the specified policy. - * - * Gets the information about health of an application deployed on a Service - * Fabric node using the specified policy. Use EventsHealthStateFilter to - * optionally filter for the collection of HealthEvent objects reported on the - * deployed application based on health state. Use - * DeployedServicePackagesHealthStateFilter to optionally filter for - * DeployedServicePackageHealth children based on health state. Use - * ApplicationHealthPolicy to optionally override the health policies used to - * evaluate the health. This API only uses 'ConsiderWarningAsError' field of - * the ApplicationHealthPolicy. The rest of the fields are ignored while - * evaluating the health of the deployed application. + * @summary Starts upgrading an application in the Service Fabric cluster. * - * @param {string} nodeName The name of the node. + * Validates the supplied application upgrade parameters and starts upgrading + * the application if the parameters are valid. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. @@ -48404,67 +45831,101 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * @param {object} [options] Optional Parameters. + * @param {object} applicationUpgradeDescription Parameters for an application + * upgrade. * - * @param {number} [options.eventsHealthStateFilter] Allows filtering the - * collection of HealthEvent objects returned based on health state. - * The possible values for this parameter include integer value of one of the - * following health states. - * Only events that match the filter are returned. All events are used to - * evaluate the aggregated health state. - * If not specified, all entries are returned. The state values are flag-based - * enumeration, so the value could be a combination of these values, obtained - * using the bitwise 'OR' operator. For example, If the provided value is 6 - * then all of the events with HealthState value of OK (2) and Warning (4) are - * returned. + * @param {string} applicationUpgradeDescription.name The name of the target + * application, including the 'fabric:' URI scheme. * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * @param {string} applicationUpgradeDescription.targetApplicationTypeVersion + * The target application type version (found in the application manifest) for + * the application upgrade. * - * @param {number} [options.deployedServicePackagesHealthStateFilter] Allows - * filtering of the deployed service package health state objects returned in - * the result of deployed application health query based on their health state. - * The possible values for this parameter include integer value of one of the - * following health states. - * Only deployed service packages that match the filter are returned. All - * deployed service packages are used to evaluate the aggregated health state - * of the deployed application. - * If not specified, all entries are returned. - * The state values are flag-based enumeration, so the value can be a - * combination of these values, obtained using the bitwise 'OR' operator. - * For example, if the provided value is 6 then health state of service - * packages with HealthState value of OK (2) and Warning (4) are returned. + * @param {array} applicationUpgradeDescription.parameters List of application + * parameters with overridden values from their default values specified in the + * application manifest. * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * @param {string} applicationUpgradeDescription.upgradeKind The kind of + * upgrade out of the following possible values. Possible values include: + * 'Invalid', 'Rolling' * - * @param {object} [options.applicationHealthPolicy] Describes the health - * policies used to evaluate the health of an application or one of its - * children. - * If not present, the health evaluation uses the health policy from - * application manifest or the default health policy. + * @param {string} [applicationUpgradeDescription.rollingUpgradeMode] The mode + * used to monitor health during a rolling upgrade. The values are + * UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: + * 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' * - * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] + * @param {number} + * [applicationUpgradeDescription.upgradeReplicaSetCheckTimeoutInSeconds] The + * maximum amount of time to block processing of an upgrade domain and prevent + * loss of availability when there are unexpected issues. When this timeout + * expires, processing of the upgrade domain will proceed regardless of + * availability loss issues. The timeout is reset at the start of each upgrade + * domain. Valid values are between 0 and 42949672925 inclusive. (unsigned + * 32-bit integer). + * + * @param {boolean} [applicationUpgradeDescription.forceRestart] If true, then + * processes are forcefully restarted during upgrade even when the code version + * has not changed (the upgrade only changes configuration or data). + * + * @param {object} [applicationUpgradeDescription.monitoringPolicy] Describes + * the parameters for monitoring an upgrade in Monitored mode. + * + * @param {string} + * [applicationUpgradeDescription.monitoringPolicy.failureAction] The + * compensating action to perform when a Monitored upgrade encounters + * monitoring policy or health policy violations. + * Invalid indicates the failure action is invalid. Rollback specifies that the + * upgrade will start rolling back automatically. + * Manual indicates that the upgrade will switch to UnmonitoredManual upgrade + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' + * + * @param {string} + * [applicationUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] + * The amount of time to wait after completing an upgrade domain before + * applying health policies. It is first interpreted as a string representing + * an ISO 8601 duration. If that fails, then it is interpreted as a number + * representing the total number of milliseconds. + * + * @param {string} + * [applicationUpgradeDescription.monitoringPolicy.healthCheckStableDurationInMilliseconds] + * The amount of time that the application or cluster must remain healthy + * before the upgrade proceeds to the next upgrade domain. It is first + * interpreted as a string representing an ISO 8601 duration. If that fails, + * then it is interpreted as a number representing the total number of + * milliseconds. + * + * @param {string} + * [applicationUpgradeDescription.monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] + * The amount of time to retry health evaluation when the application or + * cluster is unhealthy before FailureAction is executed. It is first + * interpreted as a string representing an ISO 8601 duration. If that fails, + * then it is interpreted as a number representing the total number of + * milliseconds. + * + * @param {string} + * [applicationUpgradeDescription.monitoringPolicy.upgradeTimeoutInMilliseconds] + * The amount of time the overall upgrade has to complete before FailureAction + * is executed. It is first interpreted as a string representing an ISO 8601 + * duration. If that fails, then it is interpreted as a number representing the + * total number of milliseconds. + * + * @param {string} + * [applicationUpgradeDescription.monitoringPolicy.upgradeDomainTimeoutInMilliseconds] + * The amount of time each upgrade domain has to complete before FailureAction + * is executed. It is first interpreted as a string representing an ISO 8601 + * duration. If that fails, then it is interpreted as a number representing the + * total number of milliseconds. + * + * @param {object} [applicationUpgradeDescription.applicationHealthPolicy] + * Defines a health policy used to evaluate the health of an application or one + * of its children entities. + * + * @param {boolean} + * [applicationUpgradeDescription.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. * * @param {number} - * [options.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] + * [applicationUpgradeDescription.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] * The maximum allowed percentage of unhealthy deployed applications. Allowed * values are Byte values from zero to 100. * The percentage represents the maximum tolerated percentage of deployed @@ -48477,11 +45938,11 @@ class ServiceFabricClient extends ServiceClient { * Default percentage is zero. * * @param {object} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health - * policy used by default to evaluate the health of a service type. + * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * The health policy used by default to evaluate the health of a service type. * * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] + * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] * The maximum allowed percentage of unhealthy partitions per service. Allowed * values are Byte values from zero to 100 * @@ -48495,7 +45956,7 @@ class ServiceFabricClient extends ServiceClient { * partitions. Default percentage is zero. * * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] + * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed * values are Byte values from zero to 100. * @@ -48509,9 +45970,9 @@ class ServiceFabricClient extends ServiceClient { * replicas. Default percentage is zero. * * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. * * The percentage represents the maximum tolerated percentage of services that * can be unhealthy before the application is considered in error. @@ -48523,15 +45984,12 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * @param {array} + * [applicationUpgradeDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is * empty by default. * - * @param {boolean} [options.excludeHealthStatistics] Indicates whether the - * health statistics should be returned as part of the query result. False by - * default. - * The statistics show the number of children entities in health state Ok, - * Warning, and Error. + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -48548,7 +46006,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {DeployedApplicationHealth} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -48556,15 +46014,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DeployedApplicationHealth} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getDeployedApplicationHealthUsingPolicy(nodeName, applicationId, options, optionalCallback) { + startApplicationUpgrade(applicationId, applicationUpgradeDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -48573,35 +46029,22 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getDeployedApplicationHealthUsingPolicy(nodeName, applicationId, options, (err, result, request, response) => { + self._startApplicationUpgrade(applicationId, applicationUpgradeDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getDeployedApplicationHealthUsingPolicy(nodeName, applicationId, options, optionalCallback); + return self._startApplicationUpgrade(applicationId, applicationUpgradeDescription, options, optionalCallback); } } /** - * @summary Sends a health report on the Service Fabric application deployed on - * a Service Fabric node. - * - * Reports health state of the application deployed on a Service Fabric node. - * The report must contain the information about the source of the health - * report and property on which it is reported. - * The report is sent to a Service Fabric gateway Service, which forwards to - * the health store. - * The report may be accepted by the gateway, but rejected by the health store - * after extra validation. - * For example, the health store may reject the report because of an invalid - * parameter, like a stale sequence number. - * To see whether the report was applied in the health store, get deployed - * application health and check that the report appears in the HealthEvents - * section. + * @summary Gets details for the latest upgrade performed on this application. * - * @param {string} nodeName The name of the node. + * Returns information about the state of the latest application upgrade along + * with details to aid debugging application health issues. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. @@ -48611,97 +46054,8 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * @param {object} healthInformation Describes the health information for the - * health report. This information needs to be present in all of the health - * reports sent to the health manager. - * - * @param {string} healthInformation.sourceId The source name that identifies - * the client/watchdog/system component that generated the health information. - * - * @param {string} healthInformation.property The property of the health - * information. An entity can have health reports for different properties. - * The property is a string and not a fixed enumeration to allow the reporter - * flexibility to categorize the state condition that triggers the report. - * For example, a reporter with SourceId "LocalWatchdog" can monitor the state - * of the available disk on a node, - * so it can report "AvailableDisk" property on that node. - * The same reporter can monitor the node connectivity, so it can report a - * property "Connectivity" on the same node. - * In the health store, these reports are treated as separate health events for - * the specified node. - * - * Together with the SourceId, the property uniquely identifies the health - * information. - * - * @param {string} healthInformation.healthState The health state of a Service - * Fabric entity such as Cluster, Node, Application, Service, Partition, - * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - * 'Unknown' - * - * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field uses ISO8601 - * format for specifying the duration. - * When clients report periodically, they should send reports with higher - * frequency than time to live. - * If clients report on transition, they can set the time to live to infinite. - * When time to live expires, the health event that contains the health - * information - * is either removed from health store, if RemoveWhenExpired is true, or - * evaluated at error, if RemoveWhenExpired false. - * - * If not specified, time to live defaults to infinite value. - * - * @param {string} [healthInformation.description] The description of the - * health information. It represents free text used to add human readable - * information about the report. - * The maximum string length for the description is 4096 characters. - * If the provided string is longer, it will be automatically truncated. - * When truncated, the last characters of the description contain a marker - * "[Truncated]", and total string size is 4096 characters. - * The presence of the marker indicates to users that truncation occurred. - * Note that when truncated, the description has less than 4096 characters from - * the original string. - * - * @param {string} [healthInformation.sequenceNumber] The sequence number for - * this health report as a numeric string. - * The report sequence number is used by the health store to detect stale - * reports. - * If not specified, a sequence number is auto-generated by the health client - * when a report is added. - * - * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates - * whether the report is removed from health store when it expires. - * If set to true, the report is removed from the health store after it - * expires. - * If set to false, the report is treated as an error when expired. The value - * of this property is false by default. - * When clients report periodically, they should set RemoveWhenExpired false - * (default). - * This way, is the reporter has issues (eg. deadlock) and can't report, the - * entity is evaluated at error when the health report expires. - * This flags the entity as being in Error health state. - * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.immediate] A flag that indicates whether the - * report should be sent immediately. - * A health report is sent to a Service Fabric gateway Application, which - * forwards to the health store. - * If Immediate is set to true, the report is sent immediately from HTTP - * Gateway to the health store, regardless of the fabric client settings that - * the HTTP Gateway Application is using. - * This is useful for critical reports that should be sent as soon as possible. - * Depending on timing and other conditions, sending the report may still fail, - * for example if the HTTP Gateway is closed or the message doesn't reach the - * Gateway. - * If Immediate is set to false, the report is sent based on the health client - * settings from the HTTP Gateway. Therefore, it will be batched according to - * the HealthReportSendInterval configuration. - * This is the recommended setting because it allows the health client to - * optimize health reporting messages to health store as well as health report - * processing. - * By default, reports are not sent immediately. - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -48712,15 +46066,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - reportDeployedApplicationHealthWithHttpOperationResponse(nodeName, applicationId, healthInformation, options) { + getApplicationUpgradeWithHttpOperationResponse(applicationId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._reportDeployedApplicationHealth(nodeName, applicationId, healthInformation, options, (err, result, request, response) => { + self._getApplicationUpgrade(applicationId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -48731,23 +46085,10 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Sends a health report on the Service Fabric application deployed on - * a Service Fabric node. - * - * Reports health state of the application deployed on a Service Fabric node. - * The report must contain the information about the source of the health - * report and property on which it is reported. - * The report is sent to a Service Fabric gateway Service, which forwards to - * the health store. - * The report may be accepted by the gateway, but rejected by the health store - * after extra validation. - * For example, the health store may reject the report because of an invalid - * parameter, like a stale sequence number. - * To see whether the report was applied in the health store, get deployed - * application health and check that the report appears in the HealthEvents - * section. + * @summary Gets details for the latest upgrade performed on this application. * - * @param {string} nodeName The name of the node. + * Returns information about the state of the latest application upgrade along + * with details to aid debugging application health issues. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. @@ -48757,97 +46098,8 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * @param {object} healthInformation Describes the health information for the - * health report. This information needs to be present in all of the health - * reports sent to the health manager. - * - * @param {string} healthInformation.sourceId The source name that identifies - * the client/watchdog/system component that generated the health information. - * - * @param {string} healthInformation.property The property of the health - * information. An entity can have health reports for different properties. - * The property is a string and not a fixed enumeration to allow the reporter - * flexibility to categorize the state condition that triggers the report. - * For example, a reporter with SourceId "LocalWatchdog" can monitor the state - * of the available disk on a node, - * so it can report "AvailableDisk" property on that node. - * The same reporter can monitor the node connectivity, so it can report a - * property "Connectivity" on the same node. - * In the health store, these reports are treated as separate health events for - * the specified node. - * - * Together with the SourceId, the property uniquely identifies the health - * information. - * - * @param {string} healthInformation.healthState The health state of a Service - * Fabric entity such as Cluster, Node, Application, Service, Partition, - * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - * 'Unknown' - * - * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field uses ISO8601 - * format for specifying the duration. - * When clients report periodically, they should send reports with higher - * frequency than time to live. - * If clients report on transition, they can set the time to live to infinite. - * When time to live expires, the health event that contains the health - * information - * is either removed from health store, if RemoveWhenExpired is true, or - * evaluated at error, if RemoveWhenExpired false. - * - * If not specified, time to live defaults to infinite value. - * - * @param {string} [healthInformation.description] The description of the - * health information. It represents free text used to add human readable - * information about the report. - * The maximum string length for the description is 4096 characters. - * If the provided string is longer, it will be automatically truncated. - * When truncated, the last characters of the description contain a marker - * "[Truncated]", and total string size is 4096 characters. - * The presence of the marker indicates to users that truncation occurred. - * Note that when truncated, the description has less than 4096 characters from - * the original string. - * - * @param {string} [healthInformation.sequenceNumber] The sequence number for - * this health report as a numeric string. - * The report sequence number is used by the health store to detect stale - * reports. - * If not specified, a sequence number is auto-generated by the health client - * when a report is added. - * - * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates - * whether the report is removed from health store when it expires. - * If set to true, the report is removed from the health store after it - * expires. - * If set to false, the report is treated as an error when expired. The value - * of this property is false by default. - * When clients report periodically, they should set RemoveWhenExpired false - * (default). - * This way, is the reporter has issues (eg. deadlock) and can't report, the - * entity is evaluated at error when the health report expires. - * This flags the entity as being in Error health state. - * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.immediate] A flag that indicates whether the - * report should be sent immediately. - * A health report is sent to a Service Fabric gateway Application, which - * forwards to the health store. - * If Immediate is set to true, the report is sent immediately from HTTP - * Gateway to the health store, regardless of the fabric client settings that - * the HTTP Gateway Application is using. - * This is useful for critical reports that should be sent as soon as possible. - * Depending on timing and other conditions, sending the report may still fail, - * for example if the HTTP Gateway is closed or the message doesn't reach the - * Gateway. - * If Immediate is set to false, the report is sent based on the health client - * settings from the HTTP Gateway. Therefore, it will be batched according to - * the HealthReportSendInterval configuration. - * This is the recommended setting because it allows the health client to - * optimize health reporting messages to health store as well as health report - * processing. - * By default, reports are not sent immediately. - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -48863,7 +46115,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {ApplicationUpgradeProgressInfo} - The deserialized result object. * * @reject {Error} - The error object. * @@ -48871,13 +46123,15 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ApplicationUpgradeProgressInfo} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - reportDeployedApplicationHealth(nodeName, applicationId, healthInformation, options, optionalCallback) { + getApplicationUpgrade(applicationId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -48886,64 +46140,390 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._reportDeployedApplicationHealth(nodeName, applicationId, healthInformation, options, (err, result, request, response) => { + self._getApplicationUpgrade(applicationId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._reportDeployedApplicationHealth(nodeName, applicationId, healthInformation, options, optionalCallback); + return self._getApplicationUpgrade(applicationId, options, optionalCallback); } } /** - * @summary Gets the manifest describing an application type. + * @summary Updates an ongoing application upgrade in the Service Fabric + * cluster. + * + * Updates the parameters of an ongoing application upgrade from the ones + * specified at the time of starting the application upgrade. This may be + * required to mitigate stuck application upgrades due to incorrect parameters + * or issues in the application to make progress. + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * previous versions. + * + * @param {object} applicationUpgradeUpdateDescription Parameters for updating + * an existing application upgrade. + * + * @param {string} applicationUpgradeUpdateDescription.name The name of the + * application, including the 'fabric:' URI scheme. + * + * @param {string} applicationUpgradeUpdateDescription.upgradeKind The kind of + * upgrade out of the following possible values. Possible values include: + * 'Invalid', 'Rolling' + * + * @param {object} + * [applicationUpgradeUpdateDescription.applicationHealthPolicy] Defines a + * health policy used to evaluate the health of an application or one of its + * children entities. + * + * @param {boolean} + * [applicationUpgradeUpdateDescription.applicationHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. + * + * @param {number} + * [applicationUpgradeUpdateDescription.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] + * The maximum allowed percentage of unhealthy deployed applications. Allowed + * values are Byte values from zero to 100. + * The percentage represents the maximum tolerated percentage of deployed + * applications that can be unhealthy before the application is considered in + * error. + * This is calculated by dividing the number of unhealthy deployed applications + * over the number of nodes where the application is currently deployed on in + * the cluster. + * The computation rounds up to tolerate one failure on small numbers of nodes. + * Default percentage is zero. + * + * @param {object} + * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * The health policy used by default to evaluate the health of a service type. + * + * @param {number} + * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] + * The maximum allowed percentage of unhealthy partitions per service. Allowed + * values are Byte values from zero to 100 + * + * The percentage represents the maximum tolerated percentage of partitions + * that can be unhealthy before the service is considered in error. + * If the percentage is respected but there is at least one unhealthy + * partition, the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy partitions + * over the total number of partitions in the service. + * The computation rounds up to tolerate one failure on small numbers of + * partitions. Default percentage is zero. + * + * @param {number} + * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] + * The maximum allowed percentage of unhealthy replicas per partition. Allowed + * values are Byte values from zero to 100. + * + * The percentage represents the maximum tolerated percentage of replicas that + * can be unhealthy before the partition is considered in error. + * If the percentage is respected but there is at least one unhealthy replica, + * the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy replicas + * over the total number of replicas in the partition. + * The computation rounds up to tolerate one failure on small numbers of + * replicas. Default percentage is zero. + * + * @param {number} + * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. + * + * The percentage represents the maximum tolerated percentage of services that + * can be unhealthy before the application is considered in error. + * If the percentage is respected but there is at least one unhealthy service, + * the health is evaluated as Warning. + * This is calculated by dividing the number of unhealthy services of the + * specific service type over the total number of services of the specific + * service type. + * The computation rounds up to tolerate one failure on small numbers of + * services. Default percentage is zero. + * + * @param {array} + * [applicationUpgradeUpdateDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. + * + * @param {object} [applicationUpgradeUpdateDescription.updateDescription] + * Describes the parameters for updating a rolling upgrade of application or + * cluster. + * + * @param {string} + * applicationUpgradeUpdateDescription.updateDescription.rollingUpgradeMode The + * mode used to monitor health during a rolling upgrade. The values are + * UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: + * 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' + * + * @param {boolean} + * [applicationUpgradeUpdateDescription.updateDescription.forceRestart] If + * true, then processes are forcefully restarted during upgrade even when the + * code version has not changed (the upgrade only changes configuration or + * data). + * + * @param {number} + * [applicationUpgradeUpdateDescription.updateDescription.replicaSetCheckTimeoutInMilliseconds] + * The maximum amount of time to block processing of an upgrade domain and + * prevent loss of availability when there are unexpected issues. When this + * timeout expires, processing of the upgrade domain will proceed regardless of + * availability loss issues. The timeout is reset at the start of each upgrade + * domain. Valid values are between 0 and 42949672925 inclusive. (unsigned + * 32-bit integer). + * + * @param {string} + * [applicationUpgradeUpdateDescription.updateDescription.failureAction] The + * compensating action to perform when a Monitored upgrade encounters + * monitoring policy or health policy violations. + * Invalid indicates the failure action is invalid. Rollback specifies that the + * upgrade will start rolling back automatically. + * Manual indicates that the upgrade will switch to UnmonitoredManual upgrade + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' + * + * @param {string} + * [applicationUpgradeUpdateDescription.updateDescription.healthCheckWaitDurationInMilliseconds] + * The amount of time to wait after completing an upgrade domain before + * applying health policies. It is first interpreted as a string representing + * an ISO 8601 duration. If that fails, then it is interpreted as a number + * representing the total number of milliseconds. + * + * @param {string} + * [applicationUpgradeUpdateDescription.updateDescription.healthCheckStableDurationInMilliseconds] + * The amount of time that the application or cluster must remain healthy + * before the upgrade proceeds to the next upgrade domain. It is first + * interpreted as a string representing an ISO 8601 duration. If that fails, + * then it is interpreted as a number representing the total number of + * milliseconds. + * + * @param {string} + * [applicationUpgradeUpdateDescription.updateDescription.healthCheckRetryTimeoutInMilliseconds] + * The amount of time to retry health evaluation when the application or + * cluster is unhealthy before FailureAction is executed. It is first + * interpreted as a string representing an ISO 8601 duration. If that fails, + * then it is interpreted as a number representing the total number of + * milliseconds. + * + * @param {string} + * [applicationUpgradeUpdateDescription.updateDescription.upgradeTimeoutInMilliseconds] + * The amount of time the overall upgrade has to complete before FailureAction + * is executed. It is first interpreted as a string representing an ISO 8601 + * duration. If that fails, then it is interpreted as a number representing the + * total number of milliseconds. + * + * @param {string} + * [applicationUpgradeUpdateDescription.updateDescription.upgradeDomainTimeoutInMilliseconds] + * The amount of time each upgrade domain has to complete before FailureAction + * is executed. It is first interpreted as a string representing an ISO 8601 + * duration. If that fails, then it is interpreted as a number representing the + * total number of milliseconds. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + updateApplicationUpgradeWithHttpOperationResponse(applicationId, applicationUpgradeUpdateDescription, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._updateApplicationUpgrade(applicationId, applicationUpgradeUpdateDescription, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Updates an ongoing application upgrade in the Service Fabric + * cluster. + * + * Updates the parameters of an ongoing application upgrade from the ones + * specified at the time of starting the application upgrade. This may be + * required to mitigate stuck application upgrades due to incorrect parameters + * or issues in the application to make progress. + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * previous versions. + * + * @param {object} applicationUpgradeUpdateDescription Parameters for updating + * an existing application upgrade. + * + * @param {string} applicationUpgradeUpdateDescription.name The name of the + * application, including the 'fabric:' URI scheme. + * + * @param {string} applicationUpgradeUpdateDescription.upgradeKind The kind of + * upgrade out of the following possible values. Possible values include: + * 'Invalid', 'Rolling' + * + * @param {object} + * [applicationUpgradeUpdateDescription.applicationHealthPolicy] Defines a + * health policy used to evaluate the health of an application or one of its + * children entities. + * + * @param {boolean} + * [applicationUpgradeUpdateDescription.applicationHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. + * + * @param {number} + * [applicationUpgradeUpdateDescription.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] + * The maximum allowed percentage of unhealthy deployed applications. Allowed + * values are Byte values from zero to 100. + * The percentage represents the maximum tolerated percentage of deployed + * applications that can be unhealthy before the application is considered in + * error. + * This is calculated by dividing the number of unhealthy deployed applications + * over the number of nodes where the application is currently deployed on in + * the cluster. + * The computation rounds up to tolerate one failure on small numbers of nodes. + * Default percentage is zero. + * + * @param {object} + * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * The health policy used by default to evaluate the health of a service type. + * + * @param {number} + * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] + * The maximum allowed percentage of unhealthy partitions per service. Allowed + * values are Byte values from zero to 100 + * + * The percentage represents the maximum tolerated percentage of partitions + * that can be unhealthy before the service is considered in error. + * If the percentage is respected but there is at least one unhealthy + * partition, the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy partitions + * over the total number of partitions in the service. + * The computation rounds up to tolerate one failure on small numbers of + * partitions. Default percentage is zero. * - * The response contains the application manifest XML as a string. + * @param {number} + * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] + * The maximum allowed percentage of unhealthy replicas per partition. Allowed + * values are Byte values from zero to 100. * - * @param {string} applicationTypeName The name of the application type. + * The percentage represents the maximum tolerated percentage of replicas that + * can be unhealthy before the partition is considered in error. + * If the percentage is respected but there is at least one unhealthy replica, + * the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy replicas + * over the total number of replicas in the partition. + * The computation rounds up to tolerate one failure on small numbers of + * replicas. Default percentage is zero. * - * @param {string} applicationTypeVersion The version of the application type. + * @param {number} + * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. * - * @param {object} [options] Optional Parameters. + * The percentage represents the maximum tolerated percentage of services that + * can be unhealthy before the application is considered in error. + * If the percentage is respected but there is at least one unhealthy service, + * the health is evaluated as Warning. + * This is calculated by dividing the number of unhealthy services of the + * specific service type over the total number of services of the specific + * service type. + * The computation rounds up to tolerate one failure on small numbers of + * services. Default percentage is zero. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. + * @param {array} + * [applicationUpgradeUpdateDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {object} [applicationUpgradeUpdateDescription.updateDescription] + * Describes the parameters for updating a rolling upgrade of application or + * cluster. * - * @returns {Promise} A promise is returned + * @param {string} + * applicationUpgradeUpdateDescription.updateDescription.rollingUpgradeMode The + * mode used to monitor health during a rolling upgrade. The values are + * UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: + * 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {boolean} + * [applicationUpgradeUpdateDescription.updateDescription.forceRestart] If + * true, then processes are forcefully restarted during upgrade even when the + * code version has not changed (the upgrade only changes configuration or + * data). * - * @reject {Error} - The error object. - */ - getApplicationManifestWithHttpOperationResponse(applicationTypeName, applicationTypeVersion, options) { - let client = this; - let self = this; - return new Promise((resolve, reject) => { - self._getApplicationManifest(applicationTypeName, applicationTypeVersion, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * @summary Gets the manifest describing an application type. + * @param {number} + * [applicationUpgradeUpdateDescription.updateDescription.replicaSetCheckTimeoutInMilliseconds] + * The maximum amount of time to block processing of an upgrade domain and + * prevent loss of availability when there are unexpected issues. When this + * timeout expires, processing of the upgrade domain will proceed regardless of + * availability loss issues. The timeout is reset at the start of each upgrade + * domain. Valid values are between 0 and 42949672925 inclusive. (unsigned + * 32-bit integer). * - * The response contains the application manifest XML as a string. + * @param {string} + * [applicationUpgradeUpdateDescription.updateDescription.failureAction] The + * compensating action to perform when a Monitored upgrade encounters + * monitoring policy or health policy violations. + * Invalid indicates the failure action is invalid. Rollback specifies that the + * upgrade will start rolling back automatically. + * Manual indicates that the upgrade will switch to UnmonitoredManual upgrade + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * - * @param {string} applicationTypeName The name of the application type. + * @param {string} + * [applicationUpgradeUpdateDescription.updateDescription.healthCheckWaitDurationInMilliseconds] + * The amount of time to wait after completing an upgrade domain before + * applying health policies. It is first interpreted as a string representing + * an ISO 8601 duration. If that fails, then it is interpreted as a number + * representing the total number of milliseconds. * - * @param {string} applicationTypeVersion The version of the application type. + * @param {string} + * [applicationUpgradeUpdateDescription.updateDescription.healthCheckStableDurationInMilliseconds] + * The amount of time that the application or cluster must remain healthy + * before the upgrade proceeds to the next upgrade domain. It is first + * interpreted as a string representing an ISO 8601 duration. If that fails, + * then it is interpreted as a number representing the total number of + * milliseconds. + * + * @param {string} + * [applicationUpgradeUpdateDescription.updateDescription.healthCheckRetryTimeoutInMilliseconds] + * The amount of time to retry health evaluation when the application or + * cluster is unhealthy before FailureAction is executed. It is first + * interpreted as a string representing an ISO 8601 duration. If that fails, + * then it is interpreted as a number representing the total number of + * milliseconds. + * + * @param {string} + * [applicationUpgradeUpdateDescription.updateDescription.upgradeTimeoutInMilliseconds] + * The amount of time the overall upgrade has to complete before FailureAction + * is executed. It is first interpreted as a string representing an ISO 8601 + * duration. If that fails, then it is interpreted as a number representing the + * total number of milliseconds. + * + * @param {string} + * [applicationUpgradeUpdateDescription.updateDescription.upgradeDomainTimeoutInMilliseconds] + * The amount of time each upgrade domain has to complete before FailureAction + * is executed. It is first interpreted as a string representing an ISO 8601 + * duration. If that fails, then it is interpreted as a number representing the + * total number of milliseconds. * * @param {object} [options] Optional Parameters. * @@ -48962,7 +46542,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ApplicationTypeManifest} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -48970,15 +46550,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ApplicationTypeManifest} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getApplicationManifest(applicationTypeName, applicationTypeVersion, options, optionalCallback) { + updateApplicationUpgrade(applicationId, applicationUpgradeUpdateDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -48987,23 +46565,24 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getApplicationManifest(applicationTypeName, applicationTypeVersion, options, (err, result, request, response) => { + self._updateApplicationUpgrade(applicationId, applicationUpgradeUpdateDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getApplicationManifest(applicationTypeName, applicationTypeVersion, options, optionalCallback); + return self._updateApplicationUpgrade(applicationId, applicationUpgradeUpdateDescription, options, optionalCallback); } } /** - * @summary Gets the information about all services belonging to the - * application specified by the application ID. + * @summary Resumes upgrading an application in the Service Fabric cluster. * - * Returns the information about all services belonging to the application - * specified by the application ID. + * Resumes an unmonitored manual Service Fabric application upgrade. Service + * Fabric upgrades one upgrade domain at a time. For unmonitored manual + * upgrades, after Service Fabric finishes an upgrade domain, it waits for you + * to call this API before proceeding to the next upgrade domain. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. @@ -49013,18 +46592,13 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * @param {object} [options] Optional Parameters. + * @param {object} resumeApplicationUpgradeDescription Describes the parameters + * for resuming an application upgrade. * - * @param {string} [options.serviceTypeName] The service type name used to - * filter the services to query for. + * @param {string} resumeApplicationUpgradeDescription.upgradeDomainName The + * name of the upgrade domain in which to resume the upgrade. * - * @param {string} [options.continuationToken] The continuation token parameter - * is used to obtain next set of results. A continuation token with a non-empty - * value is included in the response of the API when the results from the - * system do not fit in a single response. When this value is passed to the - * next API call, the API returns next set of results. If there are no further - * results, then the continuation token does not contain a value. The value of - * this parameter should not be URL encoded. + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -49036,15 +46610,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getServiceInfoListWithHttpOperationResponse(applicationId, options) { + resumeApplicationUpgradeWithHttpOperationResponse(applicationId, resumeApplicationUpgradeDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getServiceInfoList(applicationId, options, (err, result, request, response) => { + self._resumeApplicationUpgrade(applicationId, resumeApplicationUpgradeDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -49055,11 +46629,12 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the information about all services belonging to the - * application specified by the application ID. + * @summary Resumes upgrading an application in the Service Fabric cluster. * - * Returns the information about all services belonging to the application - * specified by the application ID. + * Resumes an unmonitored manual Service Fabric application upgrade. Service + * Fabric upgrades one upgrade domain at a time. For unmonitored manual + * upgrades, after Service Fabric finishes an upgrade domain, it waits for you + * to call this API before proceeding to the next upgrade domain. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. @@ -49069,18 +46644,13 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * @param {object} [options] Optional Parameters. + * @param {object} resumeApplicationUpgradeDescription Describes the parameters + * for resuming an application upgrade. * - * @param {string} [options.serviceTypeName] The service type name used to - * filter the services to query for. + * @param {string} resumeApplicationUpgradeDescription.upgradeDomainName The + * name of the upgrade domain in which to resume the upgrade. * - * @param {string} [options.continuationToken] The continuation token parameter - * is used to obtain next set of results. A continuation token with a non-empty - * value is included in the response of the API when the results from the - * system do not fit in a single response. When this value is passed to the - * next API call, the API returns next set of results. If there are no further - * results, then the continuation token does not contain a value. The value of - * this parameter should not be URL encoded. + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -49097,7 +46667,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {PagedServiceInfoList} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -49105,14 +46675,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PagedServiceInfoList} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getServiceInfoList(applicationId, options, optionalCallback) { + resumeApplicationUpgrade(applicationId, resumeApplicationUpgradeDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -49121,23 +46690,26 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getServiceInfoList(applicationId, options, (err, result, request, response) => { + self._resumeApplicationUpgrade(applicationId, resumeApplicationUpgradeDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getServiceInfoList(applicationId, options, optionalCallback); + return self._resumeApplicationUpgrade(applicationId, resumeApplicationUpgradeDescription, options, optionalCallback); } } /** - * @summary Gets the information about the specific service belonging to the - * Service Fabric application. + * @summary Starts rolling back the currently on-going upgrade of an + * application in the Service Fabric cluster. * - * Returns the information about the specified service belonging to the - * specified Service Fabric application. + * Starts rolling back the current application upgrade to the previous version. + * This API can only be used to roll back the current in-progress upgrade that + * is rolling forward to new version. If the application is not currently being + * upgraded use StartApplicationUpgrade API to upgrade it to desired version, + * including rolling back to a previous version. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. @@ -49147,14 +46719,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * @param {string} serviceId The identity of the service. This ID is typically - * the full name of the service without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the service name is "fabric:/myapp/app1/svc1", the service - * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in - * previous versions. - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -49167,15 +46731,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getServiceInfoWithHttpOperationResponse(applicationId, serviceId, options) { + rollbackApplicationUpgradeWithHttpOperationResponse(applicationId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getServiceInfo(applicationId, serviceId, options, (err, result, request, response) => { + self._rollbackApplicationUpgrade(applicationId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -49186,11 +46750,14 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the information about the specific service belonging to the - * Service Fabric application. + * @summary Starts rolling back the currently on-going upgrade of an + * application in the Service Fabric cluster. * - * Returns the information about the specified service belonging to the - * specified Service Fabric application. + * Starts rolling back the current application upgrade to the previous version. + * This API can only be used to roll back the current in-progress upgrade that + * is rolling forward to new version. If the application is not currently being + * upgraded use StartApplicationUpgrade API to upgrade it to desired version, + * including rolling back to a previous version. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. @@ -49200,14 +46767,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * @param {string} serviceId The identity of the service. This ID is typically - * the full name of the service without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the service name is "fabric:/myapp/app1/svc1", the service - * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in - * previous versions. - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -49225,7 +46784,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ServiceInfo} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -49233,14 +46792,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ServiceInfo} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getServiceInfo(applicationId, serviceId, options, optionalCallback) { + rollbackApplicationUpgrade(applicationId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -49249,31 +46807,29 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getServiceInfo(applicationId, serviceId, options, (err, result, request, response) => { + self._rollbackApplicationUpgrade(applicationId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getServiceInfo(applicationId, serviceId, options, optionalCallback); + return self._rollbackApplicationUpgrade(applicationId, options, optionalCallback); } } /** - * @summary Gets the name of the Service Fabric application for a service. + * @summary Gets the list of applications deployed on a Service Fabric node. * - * Gets the name of the application for the specified service. A 404 - * FABRIC_E_SERVICE_DOES_NOT_EXIST error is returned if a service with the - * provided service ID does not exist. + * Gets the list of applications deployed on a Service Fabric node. The results + * do not include information about deployed system applications unless + * explicitly queried for by ID. Results encompass deployed applications in + * active, activating, and downloading states. This query requires that the + * node name corresponds to a node on the cluster. The query fails if the + * provided node name does not point to any active Service Fabric nodes on the + * cluster. * - * @param {string} serviceId The identity of the service. This ID is typically - * the full name of the service without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the service name is "fabric:/myapp/app1/svc1", the service - * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in - * previous versions. + * @param {string} nodeName The name of the node. * * @param {object} [options] Optional Parameters. * @@ -49282,20 +46838,44 @@ class ServiceFabricClient extends ServiceClient { * client is willing to wait for the requested operation to complete. The * default value for this parameter is 60 seconds. * + * @param {boolean} [options.includeHealthState] Include the health state of an + * entity. + * If this parameter is false or not specified, then the health state returned + * is "Unknown". + * When set to true, the query goes in parallel to the node and the health + * system service before the results are merged. + * As a result, the query is more expensive and may take a longer time. + * + * @param {string} [options.continuationToken] The continuation token parameter + * is used to obtain next set of results. A continuation token with a non-empty + * value is included in the response of the API when the results from the + * system do not fit in a single response. When this value is passed to the + * next API call, the API returns next set of results. If there are no further + * results, then the continuation token does not contain a value. The value of + * this parameter should not be URL encoded. + * + * @param {number} [options.maxResults] The maximum number of results to be + * returned as part of the paged queries. This parameter defines the upper + * bound on the number of results returned. The results returned can be less + * than the specified maximum results if they do not fit in the message as per + * the max message size restrictions defined in the configuration. If this + * parameter is zero or not specified, the paged query includes as many results + * as possible that fit in the return message. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getApplicationNameInfoWithHttpOperationResponse(serviceId, options) { + getDeployedApplicationInfoListWithHttpOperationResponse(nodeName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getApplicationNameInfo(serviceId, options, (err, result, request, response) => { + self._getDeployedApplicationInfoList(nodeName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -49306,19 +46886,17 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the name of the Service Fabric application for a service. + * @summary Gets the list of applications deployed on a Service Fabric node. * - * Gets the name of the application for the specified service. A 404 - * FABRIC_E_SERVICE_DOES_NOT_EXIST error is returned if a service with the - * provided service ID does not exist. + * Gets the list of applications deployed on a Service Fabric node. The results + * do not include information about deployed system applications unless + * explicitly queried for by ID. Results encompass deployed applications in + * active, activating, and downloading states. This query requires that the + * node name corresponds to a node on the cluster. The query fails if the + * provided node name does not point to any active Service Fabric nodes on the + * cluster. * - * @param {string} serviceId The identity of the service. This ID is typically - * the full name of the service without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the service name is "fabric:/myapp/app1/svc1", the service - * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in - * previous versions. + * @param {string} nodeName The name of the node. * * @param {object} [options] Optional Parameters. * @@ -49327,6 +46905,30 @@ class ServiceFabricClient extends ServiceClient { * client is willing to wait for the requested operation to complete. The * default value for this parameter is 60 seconds. * + * @param {boolean} [options.includeHealthState] Include the health state of an + * entity. + * If this parameter is false or not specified, then the health state returned + * is "Unknown". + * When set to true, the query goes in parallel to the node and the health + * system service before the results are merged. + * As a result, the query is more expensive and may take a longer time. + * + * @param {string} [options.continuationToken] The continuation token parameter + * is used to obtain next set of results. A continuation token with a non-empty + * value is included in the response of the API when the results from the + * system do not fit in a single response. When this value is passed to the + * next API call, the API returns next set of results. If there are no further + * results, then the continuation token does not contain a value. The value of + * this parameter should not be URL encoded. + * + * @param {number} [options.maxResults] The maximum number of results to be + * returned as part of the paged queries. This parameter defines the upper + * bound on the number of results returned. The results returned can be less + * than the specified maximum results if they do not fit in the message as per + * the max message size restrictions defined in the configuration. If this + * parameter is zero or not specified, the paged query includes as many results + * as possible that fit in the return message. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -49337,7 +46939,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ApplicationNameInfo} - The deserialized result object. + * @resolve {PagedDeployedApplicationInfoList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -49346,13 +46948,14 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ApplicationNameInfo} for more information. + * See {@link PagedDeployedApplicationInfoList} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getApplicationNameInfo(serviceId, options, optionalCallback) { + getDeployedApplicationInfoList(nodeName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -49361,192 +46964,96 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getApplicationNameInfo(serviceId, options, (err, result, request, response) => { + self._getDeployedApplicationInfoList(nodeName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getApplicationNameInfo(serviceId, options, optionalCallback); + return self._getDeployedApplicationInfoList(nodeName, options, optionalCallback); } } /** - * @summary Creates the specified Service Fabric service. - * - * This api allows creating a new Service Fabric stateless or stateful service - * under a specified Service Fabric application. The description for creating - * the service includes partitioning information and optional properties for - * placement and load balancing. Some of the properties can later be modified - * using `UpdateService` API. - * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. - * - * @param {object} serviceDescription The information necessary to create a - * service. - * - * @param {string} [serviceDescription.applicationName] The name of the - * application, including the 'fabric:' URI scheme. - * - * @param {string} serviceDescription.serviceName The full name of the service - * with 'fabric:' URI scheme. - * - * @param {string} serviceDescription.serviceTypeName Name of the service type - * as specified in the service manifest. - * - * @param {array} [serviceDescription.initializationData] The initialization - * data as an array of bytes. Initialization data is passed to service - * instances or replicas when they are created. - * - * @param {object} serviceDescription.partitionDescription The partition - * description as an object. - * - * @param {string} serviceDescription.partitionDescription.partitionScheme - * Polymorphic Discriminator - * - * @param {string} [serviceDescription.placementConstraints] The placement - * constraints as a string. Placement constraints are boolean expressions on - * node properties and allow for restricting a service to particular nodes - * based on the service requirements. For example, to place a service on nodes - * where NodeType is blue specify the following: "NodeColor == blue)". - * - * @param {array} [serviceDescription.correlationScheme] The correlation - * scheme. - * - * @param {array} [serviceDescription.serviceLoadMetrics] The service load - * metrics. - * - * @param {array} [serviceDescription.servicePlacementPolicies] The service - * placement policies. - * - * @param {string} [serviceDescription.defaultMoveCost] The move cost for the - * service. Possible values include: 'Zero', 'Low', 'Medium', 'High' - * - * @param {boolean} [serviceDescription.isDefaultMoveCostSpecified] Indicates - * if the DefaultMoveCost property is specified. - * - * @param {string} [serviceDescription.servicePackageActivationMode] The - * activation mode of service package to be used for a service. Possible values - * include: 'SharedProcess', 'ExclusiveProcess' + * @summary Gets the information about an application deployed on a Service + * Fabric node. * - * @param {string} [serviceDescription.serviceDnsName] The DNS name of the - * service. It requires the DNS system service to be enabled in Service Fabric + * This query returns system application information if the application ID + * provided is for system application. Results encompass deployed applications + * in active, activating, and downloading states. This query requires that the + * node name corresponds to a node on the cluster. The query fails if the + * provided node name does not point to any active Service Fabric nodes on the * cluster. * - * @param {array} [serviceDescription.scalingPolicies] Scaling policies for - * this service. - * - * @param {string} serviceDescription.serviceKind Polymorphic Discriminator - * - * @param {object} [options] Optional Parameters. - * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error} - The error object. - */ - createServiceWithHttpOperationResponse(applicationId, serviceDescription, options) { - let client = this; - let self = this; - return new Promise((resolve, reject) => { - self._createService(applicationId, serviceDescription, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * @summary Creates the specified Service Fabric service. - * - * This api allows creating a new Service Fabric stateless or stateful service - * under a specified Service Fabric application. The description for creating - * the service includes partitioning information and optional properties for - * placement and load balancing. Some of the properties can later be modified - * using `UpdateService` API. + * @param {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. - * - * @param {object} serviceDescription The information necessary to create a - * service. - * - * @param {string} [serviceDescription.applicationName] The name of the - * application, including the 'fabric:' URI scheme. - * - * @param {string} serviceDescription.serviceName The full name of the service - * with 'fabric:' URI scheme. - * - * @param {string} serviceDescription.serviceTypeName Name of the service type - * as specified in the service manifest. - * - * @param {array} [serviceDescription.initializationData] The initialization - * data as an array of bytes. Initialization data is passed to service - * instances or replicas when they are created. - * - * @param {object} serviceDescription.partitionDescription The partition - * description as an object. - * - * @param {string} serviceDescription.partitionDescription.partitionScheme - * Polymorphic Discriminator - * - * @param {string} [serviceDescription.placementConstraints] The placement - * constraints as a string. Placement constraints are boolean expressions on - * node properties and allow for restricting a service to particular nodes - * based on the service requirements. For example, to place a service on nodes - * where NodeType is blue specify the following: "NodeColor == blue)". + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * previous versions. * - * @param {array} [serviceDescription.correlationScheme] The correlation - * scheme. + * @param {object} [options] Optional Parameters. * - * @param {array} [serviceDescription.serviceLoadMetrics] The service load - * metrics. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {array} [serviceDescription.servicePlacementPolicies] The service - * placement policies. + * @param {boolean} [options.includeHealthState] Include the health state of an + * entity. + * If this parameter is false or not specified, then the health state returned + * is "Unknown". + * When set to true, the query goes in parallel to the node and the health + * system service before the results are merged. + * As a result, the query is more expensive and may take a longer time. * - * @param {string} [serviceDescription.defaultMoveCost] The move cost for the - * service. Possible values include: 'Zero', 'Low', 'Medium', 'High' + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {boolean} [serviceDescription.isDefaultMoveCostSpecified] Indicates - * if the DefaultMoveCost property is specified. + * @returns {Promise} A promise is returned * - * @param {string} [serviceDescription.servicePackageActivationMode] The - * activation mode of service package to be used for a service. Possible values - * include: 'SharedProcess', 'ExclusiveProcess' + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {string} [serviceDescription.serviceDnsName] The DNS name of the - * service. It requires the DNS system service to be enabled in Service Fabric + * @reject {Error} - The error object. + */ + getDeployedApplicationInfoWithHttpOperationResponse(nodeName, applicationId, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getDeployedApplicationInfo(nodeName, applicationId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets the information about an application deployed on a Service + * Fabric node. + * + * This query returns system application information if the application ID + * provided is for system application. Results encompass deployed applications + * in active, activating, and downloading states. This query requires that the + * node name corresponds to a node on the cluster. The query fails if the + * provided node name does not point to any active Service Fabric nodes on the * cluster. * - * @param {array} [serviceDescription.scalingPolicies] Scaling policies for - * this service. + * @param {string} nodeName The name of the node. * - * @param {string} serviceDescription.serviceKind Polymorphic Discriminator + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * previous versions. * * @param {object} [options] Optional Parameters. * @@ -49555,6 +47062,14 @@ class ServiceFabricClient extends ServiceClient { * client is willing to wait for the requested operation to complete. The * default value for this parameter is 60 seconds. * + * @param {boolean} [options.includeHealthState] Include the health state of an + * entity. + * If this parameter is false or not specified, then the health state returned + * is "Unknown". + * When set to true, the query goes in parallel to the node and the health + * system service before the results are merged. + * As a result, the query is more expensive and may take a longer time. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -49565,7 +47080,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {DeployedApplicationInfo} - The deserialized result object. * * @reject {Error} - The error object. * @@ -49573,13 +47088,15 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DeployedApplicationInfo} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createService(applicationId, serviceDescription, options, optionalCallback) { + getDeployedApplicationInfo(nodeName, applicationId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -49588,25 +47105,28 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createService(applicationId, serviceDescription, options, (err, result, request, response) => { + self._getDeployedApplicationInfo(nodeName, applicationId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createService(applicationId, serviceDescription, options, optionalCallback); + return self._getDeployedApplicationInfo(nodeName, applicationId, options, optionalCallback); } } /** - * @summary Creates a Service Fabric service from the service template. + * @summary Gets the information about health of an application deployed on a + * Service Fabric node. * - * Creates a Service Fabric service from the service template defined in the - * application manifest. A service template contains the properties that will - * be same for the service instance of the same type. The API allows overriding - * the properties that are usually different for different services of the same - * service type. + * Gets the information about health of an application deployed on a Service + * Fabric node. Use EventsHealthStateFilter to optionally filter for the + * collection of HealthEvent objects reported on the deployed application based + * on health state. Use DeployedServicePackagesHealthStateFilter to optionally + * filter for DeployedServicePackageHealth children based on health state. + * + * @param {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. @@ -49616,31 +47136,61 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * @param {object} serviceFromTemplateDescription Describes the service that - * needs to be created from the template defined in the application manifest. - * - * @param {string} serviceFromTemplateDescription.applicationName The name of - * the application, including the 'fabric:' URI scheme. - * - * @param {string} serviceFromTemplateDescription.serviceName The full name of - * the service with 'fabric:' URI scheme. + * @param {object} [options] Optional Parameters. * - * @param {string} serviceFromTemplateDescription.serviceTypeName Name of the - * service type as specified in the service manifest. + * @param {number} [options.eventsHealthStateFilter] Allows filtering the + * collection of HealthEvent objects returned based on health state. + * The possible values for this parameter include integer value of one of the + * following health states. + * Only events that match the filter are returned. All events are used to + * evaluate the aggregated health state. + * If not specified, all entries are returned. The state values are flag-based + * enumeration, so the value could be a combination of these values, obtained + * using the bitwise 'OR' operator. For example, If the provided value is 6 + * then all of the events with HealthState value of OK (2) and Warning (4) are + * returned. * - * @param {array} [serviceFromTemplateDescription.initializationData] The - * initialization data for the newly created service instance. + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. * - * @param {string} - * [serviceFromTemplateDescription.servicePackageActivationMode] The activation - * mode of service package to be used for a service. Possible values include: - * 'SharedProcess', 'ExclusiveProcess' + * @param {number} [options.deployedServicePackagesHealthStateFilter] Allows + * filtering of the deployed service package health state objects returned in + * the result of deployed application health query based on their health state. + * The possible values for this parameter include integer value of one of the + * following health states. + * Only deployed service packages that match the filter are returned. All + * deployed service packages are used to evaluate the aggregated health state + * of the deployed application. + * If not specified, all entries are returned. + * The state values are flag-based enumeration, so the value can be a + * combination of these values, obtained using the bitwise 'OR' operator. + * For example, if the provided value is 6 then health state of service + * packages with HealthState value of OK (2) and Warning (4) are returned. * - * @param {string} [serviceFromTemplateDescription.serviceDnsName] The DNS name - * of the service. It requires the DNS system service to be enabled in Service - * Fabric cluster. + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. * - * @param {object} [options] Optional Parameters. + * @param {boolean} [options.excludeHealthStatistics] Indicates whether the + * health statistics should be returned as part of the query result. False by + * default. + * The statistics show the number of children entities in health state Ok, + * Warning, and Error. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -49652,15 +47202,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - createServiceFromTemplateWithHttpOperationResponse(applicationId, serviceFromTemplateDescription, options) { + getDeployedApplicationHealthWithHttpOperationResponse(nodeName, applicationId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._createServiceFromTemplate(applicationId, serviceFromTemplateDescription, options, (err, result, request, response) => { + self._getDeployedApplicationHealth(nodeName, applicationId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -49671,13 +47221,16 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Creates a Service Fabric service from the service template. + * @summary Gets the information about health of an application deployed on a + * Service Fabric node. * - * Creates a Service Fabric service from the service template defined in the - * application manifest. A service template contains the properties that will - * be same for the service instance of the same type. The API allows overriding - * the properties that are usually different for different services of the same - * service type. + * Gets the information about health of an application deployed on a Service + * Fabric node. Use EventsHealthStateFilter to optionally filter for the + * collection of HealthEvent objects reported on the deployed application based + * on health state. Use DeployedServicePackagesHealthStateFilter to optionally + * filter for DeployedServicePackageHealth children based on health state. + * + * @param {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. @@ -49687,31 +47240,61 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * @param {object} serviceFromTemplateDescription Describes the service that - * needs to be created from the template defined in the application manifest. - * - * @param {string} serviceFromTemplateDescription.applicationName The name of - * the application, including the 'fabric:' URI scheme. - * - * @param {string} serviceFromTemplateDescription.serviceName The full name of - * the service with 'fabric:' URI scheme. + * @param {object} [options] Optional Parameters. * - * @param {string} serviceFromTemplateDescription.serviceTypeName Name of the - * service type as specified in the service manifest. + * @param {number} [options.eventsHealthStateFilter] Allows filtering the + * collection of HealthEvent objects returned based on health state. + * The possible values for this parameter include integer value of one of the + * following health states. + * Only events that match the filter are returned. All events are used to + * evaluate the aggregated health state. + * If not specified, all entries are returned. The state values are flag-based + * enumeration, so the value could be a combination of these values, obtained + * using the bitwise 'OR' operator. For example, If the provided value is 6 + * then all of the events with HealthState value of OK (2) and Warning (4) are + * returned. * - * @param {array} [serviceFromTemplateDescription.initializationData] The - * initialization data for the newly created service instance. + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. * - * @param {string} - * [serviceFromTemplateDescription.servicePackageActivationMode] The activation - * mode of service package to be used for a service. Possible values include: - * 'SharedProcess', 'ExclusiveProcess' + * @param {number} [options.deployedServicePackagesHealthStateFilter] Allows + * filtering of the deployed service package health state objects returned in + * the result of deployed application health query based on their health state. + * The possible values for this parameter include integer value of one of the + * following health states. + * Only deployed service packages that match the filter are returned. All + * deployed service packages are used to evaluate the aggregated health state + * of the deployed application. + * If not specified, all entries are returned. + * The state values are flag-based enumeration, so the value can be a + * combination of these values, obtained using the bitwise 'OR' operator. + * For example, if the provided value is 6 then health state of service + * packages with HealthState value of OK (2) and Warning (4) are returned. * - * @param {string} [serviceFromTemplateDescription.serviceDnsName] The DNS name - * of the service. It requires the DNS system service to be enabled in Service - * Fabric cluster. + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. * - * @param {object} [options] Optional Parameters. + * @param {boolean} [options.excludeHealthStatistics] Indicates whether the + * health statistics should be returned as part of the query result. False by + * default. + * The statistics show the number of children entities in health state Ok, + * Warning, and Error. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -49728,7 +47311,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {DeployedApplicationHealth} - The deserialized result object. * * @reject {Error} - The error object. * @@ -49736,13 +47319,15 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DeployedApplicationHealth} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createServiceFromTemplate(applicationId, serviceFromTemplateDescription, options, optionalCallback) { + getDeployedApplicationHealth(nodeName, applicationId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -49751,96 +47336,352 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createServiceFromTemplate(applicationId, serviceFromTemplateDescription, options, (err, result, request, response) => { + self._getDeployedApplicationHealth(nodeName, applicationId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createServiceFromTemplate(applicationId, serviceFromTemplateDescription, options, optionalCallback); + return self._getDeployedApplicationHealth(nodeName, applicationId, options, optionalCallback); } } /** - * @summary Deletes an existing Service Fabric service. + * @summary Gets the information about health of an application deployed on a + * Service Fabric node. using the specified policy. + * + * Gets the information about health of an application deployed on a Service + * Fabric node using the specified policy. Use EventsHealthStateFilter to + * optionally filter for the collection of HealthEvent objects reported on the + * deployed application based on health state. Use + * DeployedServicePackagesHealthStateFilter to optionally filter for + * DeployedServicePackageHealth children based on health state. Use + * ApplicationHealthPolicy to optionally override the health policies used to + * evaluate the health. This API only uses 'ConsiderWarningAsError' field of + * the ApplicationHealthPolicy. The rest of the fields are ignored while + * evaluating the health of the deployed application. + * + * @param {string} nodeName The name of the node. + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * previous versions. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.eventsHealthStateFilter] Allows filtering the + * collection of HealthEvent objects returned based on health state. + * The possible values for this parameter include integer value of one of the + * following health states. + * Only events that match the filter are returned. All events are used to + * evaluate the aggregated health state. + * If not specified, all entries are returned. The state values are flag-based + * enumeration, so the value could be a combination of these values, obtained + * using the bitwise 'OR' operator. For example, If the provided value is 6 + * then all of the events with HealthState value of OK (2) and Warning (4) are + * returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * @param {number} [options.deployedServicePackagesHealthStateFilter] Allows + * filtering of the deployed service package health state objects returned in + * the result of deployed application health query based on their health state. + * The possible values for this parameter include integer value of one of the + * following health states. + * Only deployed service packages that match the filter are returned. All + * deployed service packages are used to evaluate the aggregated health state + * of the deployed application. + * If not specified, all entries are returned. + * The state values are flag-based enumeration, so the value can be a + * combination of these values, obtained using the bitwise 'OR' operator. + * For example, if the provided value is 6 then health state of service + * packages with HealthState value of OK (2) and Warning (4) are returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * @param {object} [options.applicationHealthPolicy] Describes the health + * policies used to evaluate the health of an application or one of its + * children. + * If not present, the health evaluation uses the health policy from + * application manifest or the default health policy. + * + * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. + * + * @param {number} + * [options.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] + * The maximum allowed percentage of unhealthy deployed applications. Allowed + * values are Byte values from zero to 100. + * The percentage represents the maximum tolerated percentage of deployed + * applications that can be unhealthy before the application is considered in + * error. + * This is calculated by dividing the number of unhealthy deployed applications + * over the number of nodes where the application is currently deployed on in + * the cluster. + * The computation rounds up to tolerate one failure on small numbers of nodes. + * Default percentage is zero. + * + * @param {object} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health + * policy used by default to evaluate the health of a service type. + * + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] + * The maximum allowed percentage of unhealthy partitions per service. Allowed + * values are Byte values from zero to 100 + * + * The percentage represents the maximum tolerated percentage of partitions + * that can be unhealthy before the service is considered in error. + * If the percentage is respected but there is at least one unhealthy + * partition, the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy partitions + * over the total number of partitions in the service. + * The computation rounds up to tolerate one failure on small numbers of + * partitions. Default percentage is zero. + * + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] + * The maximum allowed percentage of unhealthy replicas per partition. Allowed + * values are Byte values from zero to 100. + * + * The percentage represents the maximum tolerated percentage of replicas that + * can be unhealthy before the partition is considered in error. + * If the percentage is respected but there is at least one unhealthy replica, + * the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy replicas + * over the total number of replicas in the partition. + * The computation rounds up to tolerate one failure on small numbers of + * replicas. Default percentage is zero. + * + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. + * + * The percentage represents the maximum tolerated percentage of services that + * can be unhealthy before the application is considered in error. + * If the percentage is respected but there is at least one unhealthy service, + * the health is evaluated as Warning. + * This is calculated by dividing the number of unhealthy services of the + * specific service type over the total number of services of the specific + * service type. + * The computation rounds up to tolerate one failure on small numbers of + * services. Default percentage is zero. + * + * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. + * + * @param {boolean} [options.excludeHealthStatistics] Indicates whether the + * health statistics should be returned as part of the query result. False by + * default. + * The statistics show the number of children entities in health state Ok, + * Warning, and Error. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getDeployedApplicationHealthUsingPolicyWithHttpOperationResponse(nodeName, applicationId, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getDeployedApplicationHealthUsingPolicy(nodeName, applicationId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets the information about health of an application deployed on a + * Service Fabric node. using the specified policy. + * + * Gets the information about health of an application deployed on a Service + * Fabric node using the specified policy. Use EventsHealthStateFilter to + * optionally filter for the collection of HealthEvent objects reported on the + * deployed application based on health state. Use + * DeployedServicePackagesHealthStateFilter to optionally filter for + * DeployedServicePackageHealth children based on health state. Use + * ApplicationHealthPolicy to optionally override the health policies used to + * evaluate the health. This API only uses 'ConsiderWarningAsError' field of + * the ApplicationHealthPolicy. The rest of the fields are ignored while + * evaluating the health of the deployed application. + * + * @param {string} nodeName The name of the node. + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * previous versions. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.eventsHealthStateFilter] Allows filtering the + * collection of HealthEvent objects returned based on health state. + * The possible values for this parameter include integer value of one of the + * following health states. + * Only events that match the filter are returned. All events are used to + * evaluate the aggregated health state. + * If not specified, all entries are returned. The state values are flag-based + * enumeration, so the value could be a combination of these values, obtained + * using the bitwise 'OR' operator. For example, If the provided value is 6 + * then all of the events with HealthState value of OK (2) and Warning (4) are + * returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * @param {number} [options.deployedServicePackagesHealthStateFilter] Allows + * filtering of the deployed service package health state objects returned in + * the result of deployed application health query based on their health state. + * The possible values for this parameter include integer value of one of the + * following health states. + * Only deployed service packages that match the filter are returned. All + * deployed service packages are used to evaluate the aggregated health state + * of the deployed application. + * If not specified, all entries are returned. + * The state values are flag-based enumeration, so the value can be a + * combination of these values, obtained using the bitwise 'OR' operator. + * For example, if the provided value is 6 then health state of service + * packages with HealthState value of OK (2) and Warning (4) are returned. * - * A service must be created before it can be deleted. By default, Service - * Fabric will try to close service replicas in a graceful manner and then - * delete the service. However, if the service is having issues closing the - * replica gracefully, the delete operation may take a long time or get stuck. - * Use the optional ForceRemove flag to skip the graceful close sequence and - * forcefully delete the service. + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. * - * @param {string} serviceId The identity of the service. This ID is typically - * the full name of the service without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the service name is "fabric:/myapp/app1/svc1", the service - * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in - * previous versions. + * @param {object} [options.applicationHealthPolicy] Describes the health + * policies used to evaluate the health of an application or one of its + * children. + * If not present, the health evaluation uses the health policy from + * application manifest or the default health policy. * - * @param {object} [options] Optional Parameters. + * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. * - * @param {boolean} [options.forceRemove] Remove a Service Fabric application - * or service forcefully without going through the graceful shutdown sequence. - * This parameter can be used to forcefully delete an application or service - * for which delete is timing out due to issues in the service code that - * prevents graceful close of replicas. + * @param {number} + * [options.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] + * The maximum allowed percentage of unhealthy deployed applications. Allowed + * values are Byte values from zero to 100. + * The percentage represents the maximum tolerated percentage of deployed + * applications that can be unhealthy before the application is considered in + * error. + * This is calculated by dividing the number of unhealthy deployed applications + * over the number of nodes where the application is currently deployed on in + * the cluster. + * The computation rounds up to tolerate one failure on small numbers of nodes. + * Default percentage is zero. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. + * @param {object} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health + * policy used by default to evaluate the health of a service type. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] + * The maximum allowed percentage of unhealthy partitions per service. Allowed + * values are Byte values from zero to 100 * - * @returns {Promise} A promise is returned + * The percentage represents the maximum tolerated percentage of partitions + * that can be unhealthy before the service is considered in error. + * If the percentage is respected but there is at least one unhealthy + * partition, the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy partitions + * over the total number of partitions in the service. + * The computation rounds up to tolerate one failure on small numbers of + * partitions. Default percentage is zero. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] + * The maximum allowed percentage of unhealthy replicas per partition. Allowed + * values are Byte values from zero to 100. * - * @reject {Error} - The error object. - */ - deleteServiceWithHttpOperationResponse(serviceId, options) { - let client = this; - let self = this; - return new Promise((resolve, reject) => { - self._deleteService(serviceId, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * @summary Deletes an existing Service Fabric service. + * The percentage represents the maximum tolerated percentage of replicas that + * can be unhealthy before the partition is considered in error. + * If the percentage is respected but there is at least one unhealthy replica, + * the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy replicas + * over the total number of replicas in the partition. + * The computation rounds up to tolerate one failure on small numbers of + * replicas. Default percentage is zero. * - * A service must be created before it can be deleted. By default, Service - * Fabric will try to close service replicas in a graceful manner and then - * delete the service. However, if the service is having issues closing the - * replica gracefully, the delete operation may take a long time or get stuck. - * Use the optional ForceRemove flag to skip the graceful close sequence and - * forcefully delete the service. + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. * - * @param {string} serviceId The identity of the service. This ID is typically - * the full name of the service without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the service name is "fabric:/myapp/app1/svc1", the service - * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in - * previous versions. + * The percentage represents the maximum tolerated percentage of services that + * can be unhealthy before the application is considered in error. + * If the percentage is respected but there is at least one unhealthy service, + * the health is evaluated as Warning. + * This is calculated by dividing the number of unhealthy services of the + * specific service type over the total number of services of the specific + * service type. + * The computation rounds up to tolerate one failure on small numbers of + * services. Default percentage is zero. * - * @param {object} [options] Optional Parameters. + * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. * - * @param {boolean} [options.forceRemove] Remove a Service Fabric application - * or service forcefully without going through the graceful shutdown sequence. - * This parameter can be used to forcefully delete an application or service - * for which delete is timing out due to issues in the service code that - * prevents graceful close of replicas. + * @param {boolean} [options.excludeHealthStatistics] Indicates whether the + * health statistics should be returned as part of the query result. False by + * default. + * The statistics show the number of children entities in health state Ok, + * Warning, and Error. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -49857,7 +47698,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {DeployedApplicationHealth} - The deserialized result object. * * @reject {Error} - The error object. * @@ -49865,13 +47706,15 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DeployedApplicationHealth} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteService(serviceId, options, optionalCallback) { + getDeployedApplicationHealthUsingPolicy(nodeName, applicationId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -49880,103 +47723,135 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteService(serviceId, options, (err, result, request, response) => { + self._getDeployedApplicationHealthUsingPolicy(nodeName, applicationId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteService(serviceId, options, optionalCallback); + return self._getDeployedApplicationHealthUsingPolicy(nodeName, applicationId, options, optionalCallback); } } /** - * @summary Updates a Service Fabric service using the specified update - * description. + * @summary Sends a health report on the Service Fabric application deployed on + * a Service Fabric node. * - * This API allows updating properties of a running Service Fabric service. The - * set of properties that can be updated are a subset of the properties that - * were specified at the time of creating the service. The current set of - * properties can be obtained using `GetServiceDescription` API. Note that - * updating the properties of a running service is different than upgrading - * your application using `StartApplicationUpgrade` API. The upgrade is a long - * running background operation that involves moving the application from one - * version to another, one upgrade domain at a time, whereas update applies the - * new properties immediately to the service. + * Reports health state of the application deployed on a Service Fabric node. + * The report must contain the information about the source of the health + * report and property on which it is reported. + * The report is sent to a Service Fabric gateway Service, which forwards to + * the health store. + * The report may be accepted by the gateway, but rejected by the health store + * after extra validation. + * For example, the health store may reject the report because of an invalid + * parameter, like a stale sequence number. + * To see whether the report was applied in the health store, get deployed + * application health and check that the report appears in the HealthEvents + * section. * - * @param {string} serviceId The identity of the service. This ID is typically - * the full name of the service without the 'fabric:' URI scheme. + * @param {string} nodeName The name of the node. + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" * character. - * For example, if the service name is "fabric:/myapp/app1/svc1", the service - * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * @param {object} serviceUpdateDescription The information necessary to update - * a service. + * @param {object} healthInformation Describes the health information for the + * health report. This information needs to be present in all of the health + * reports sent to the health manager. * - * @param {string} [serviceUpdateDescription.flags] Flags indicating whether - * other properties are set. Each of the associated properties corresponds to a - * flag, specified below, which, if set, indicate that the property is - * specified. - * This property can be a combination of those flags obtained using bitwise - * 'OR' operator. - * For example, if the provided value is 6 then the flags for - * ReplicaRestartWaitDuration (2) and QuorumLossWaitDuration (4) are set. + * @param {string} healthInformation.sourceId The source name that identifies + * the client/watchdog/system component that generated the health information. * - * - None - Does not indicate any other properties are set. The value is zero. - * - TargetReplicaSetSize/InstanceCount - Indicates whether the - * TargetReplicaSetSize property (for Stateful services) or the InstanceCount - * property (for Stateless services) is set. The value is 1. - * - ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration - * property is set. The value is 2. - * - QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is - * set. The value is 4. - * - StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration - * property is set. The value is 8. - * - MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The - * value is 16. - * - PlacementConstraints - Indicates the PlacementConstraints property is set. - * The value is 32. - * - PlacementPolicyList - Indicates the ServicePlacementPolicies property is - * set. The value is 64. - * - Correlation - Indicates the CorrelationScheme property is set. The value - * is 128. - * - Metrics - Indicates the ServiceLoadMetrics property is set. The value is - * 256. - * - DefaultMoveCost - Indicates the DefaultMoveCost property is set. The value - * is 512. - * - ScalingPolicy - Indicates the ScalingPolicies property is set. The value - * is 1024. + * @param {string} healthInformation.property The property of the health + * information. An entity can have health reports for different properties. + * The property is a string and not a fixed enumeration to allow the reporter + * flexibility to categorize the state condition that triggers the report. + * For example, a reporter with SourceId "LocalWatchdog" can monitor the state + * of the available disk on a node, + * so it can report "AvailableDisk" property on that node. + * The same reporter can monitor the node connectivity, so it can report a + * property "Connectivity" on the same node. + * In the health store, these reports are treated as separate health events for + * the specified node. * - * @param {string} [serviceUpdateDescription.placementConstraints] The - * placement constraints as a string. Placement constraints are boolean - * expressions on node properties and allow for restricting a service to - * particular nodes based on the service requirements. For example, to place a - * service on nodes where NodeType is blue specify the following: "NodeColor == - * blue)". + * Together with the SourceId, the property uniquely identifies the health + * information. * - * @param {array} [serviceUpdateDescription.correlationScheme] The correlation - * scheme. + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' * - * @param {array} [serviceUpdateDescription.loadMetrics] The service load - * metrics. + * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The + * duration for which this health report is valid. This field uses ISO8601 + * format for specifying the duration. + * When clients report periodically, they should send reports with higher + * frequency than time to live. + * If clients report on transition, they can set the time to live to infinite. + * When time to live expires, the health event that contains the health + * information + * is either removed from health store, if RemoveWhenExpired is true, or + * evaluated at error, if RemoveWhenExpired false. * - * @param {array} [serviceUpdateDescription.servicePlacementPolicies] The - * service placement policies. + * If not specified, time to live defaults to infinite value. * - * @param {string} [serviceUpdateDescription.defaultMoveCost] The move cost for - * the service. Possible values include: 'Zero', 'Low', 'Medium', 'High' + * @param {string} [healthInformation.description] The description of the + * health information. It represents free text used to add human readable + * information about the report. + * The maximum string length for the description is 4096 characters. + * If the provided string is longer, it will be automatically truncated. + * When truncated, the last characters of the description contain a marker + * "[Truncated]", and total string size is 4096 characters. + * The presence of the marker indicates to users that truncation occurred. + * Note that when truncated, the description has less than 4096 characters from + * the original string. * - * @param {array} [serviceUpdateDescription.scalingPolicies] Scaling policies - * for this service. + * @param {string} [healthInformation.sequenceNumber] The sequence number for + * this health report as a numeric string. + * The report sequence number is used by the health store to detect stale + * reports. + * If not specified, a sequence number is auto-generated by the health client + * when a report is added. * - * @param {string} serviceUpdateDescription.serviceKind Polymorphic - * Discriminator + * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates + * whether the report is removed from health store when it expires. + * If set to true, the report is removed from the health store after it + * expires. + * If set to false, the report is treated as an error when expired. The value + * of this property is false by default. + * When clients report periodically, they should set RemoveWhenExpired false + * (default). + * This way, if the reporter has issues (e.g. deadlock) and can't report, the + * entity is evaluated at error when the health report expires. + * This flags the entity as being in Error health state. * * @param {object} [options] Optional Parameters. * + * @param {boolean} [options.immediate] A flag that indicates whether the + * report should be sent immediately. + * A health report is sent to a Service Fabric gateway Application, which + * forwards to the health store. + * If Immediate is set to true, the report is sent immediately from HTTP + * Gateway to the health store, regardless of the fabric client settings that + * the HTTP Gateway Application is using. + * This is useful for critical reports that should be sent as soon as possible. + * Depending on timing and other conditions, sending the report may still fail, + * for example if the HTTP Gateway is closed or the message doesn't reach the + * Gateway. + * If Immediate is set to false, the report is sent based on the health client + * settings from the HTTP Gateway. Therefore, it will be batched according to + * the HealthReportSendInterval configuration. + * This is the recommended setting because it allows the health client to + * optimize health reporting messages to health store as well as health report + * processing. + * By default, reports are not sent immediately. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -49991,11 +47866,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - updateServiceWithHttpOperationResponse(serviceId, serviceUpdateDescription, options) { + reportDeployedApplicationHealthWithHttpOperationResponse(nodeName, applicationId, healthInformation, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._updateService(serviceId, serviceUpdateDescription, options, (err, result, request, response) => { + self._reportDeployedApplicationHealth(nodeName, applicationId, healthInformation, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -50006,91 +47881,123 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Updates a Service Fabric service using the specified update - * description. + * @summary Sends a health report on the Service Fabric application deployed on + * a Service Fabric node. * - * This API allows updating properties of a running Service Fabric service. The - * set of properties that can be updated are a subset of the properties that - * were specified at the time of creating the service. The current set of - * properties can be obtained using `GetServiceDescription` API. Note that - * updating the properties of a running service is different than upgrading - * your application using `StartApplicationUpgrade` API. The upgrade is a long - * running background operation that involves moving the application from one - * version to another, one upgrade domain at a time, whereas update applies the - * new properties immediately to the service. + * Reports health state of the application deployed on a Service Fabric node. + * The report must contain the information about the source of the health + * report and property on which it is reported. + * The report is sent to a Service Fabric gateway Service, which forwards to + * the health store. + * The report may be accepted by the gateway, but rejected by the health store + * after extra validation. + * For example, the health store may reject the report because of an invalid + * parameter, like a stale sequence number. + * To see whether the report was applied in the health store, get deployed + * application health and check that the report appears in the HealthEvents + * section. * - * @param {string} serviceId The identity of the service. This ID is typically - * the full name of the service without the 'fabric:' URI scheme. + * @param {string} nodeName The name of the node. + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" * character. - * For example, if the service name is "fabric:/myapp/app1/svc1", the service - * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * @param {object} serviceUpdateDescription The information necessary to update - * a service. + * @param {object} healthInformation Describes the health information for the + * health report. This information needs to be present in all of the health + * reports sent to the health manager. * - * @param {string} [serviceUpdateDescription.flags] Flags indicating whether - * other properties are set. Each of the associated properties corresponds to a - * flag, specified below, which, if set, indicate that the property is - * specified. - * This property can be a combination of those flags obtained using bitwise - * 'OR' operator. - * For example, if the provided value is 6 then the flags for - * ReplicaRestartWaitDuration (2) and QuorumLossWaitDuration (4) are set. + * @param {string} healthInformation.sourceId The source name that identifies + * the client/watchdog/system component that generated the health information. * - * - None - Does not indicate any other properties are set. The value is zero. - * - TargetReplicaSetSize/InstanceCount - Indicates whether the - * TargetReplicaSetSize property (for Stateful services) or the InstanceCount - * property (for Stateless services) is set. The value is 1. - * - ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration - * property is set. The value is 2. - * - QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is - * set. The value is 4. - * - StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration - * property is set. The value is 8. - * - MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The - * value is 16. - * - PlacementConstraints - Indicates the PlacementConstraints property is set. - * The value is 32. - * - PlacementPolicyList - Indicates the ServicePlacementPolicies property is - * set. The value is 64. - * - Correlation - Indicates the CorrelationScheme property is set. The value - * is 128. - * - Metrics - Indicates the ServiceLoadMetrics property is set. The value is - * 256. - * - DefaultMoveCost - Indicates the DefaultMoveCost property is set. The value - * is 512. - * - ScalingPolicy - Indicates the ScalingPolicies property is set. The value - * is 1024. + * @param {string} healthInformation.property The property of the health + * information. An entity can have health reports for different properties. + * The property is a string and not a fixed enumeration to allow the reporter + * flexibility to categorize the state condition that triggers the report. + * For example, a reporter with SourceId "LocalWatchdog" can monitor the state + * of the available disk on a node, + * so it can report "AvailableDisk" property on that node. + * The same reporter can monitor the node connectivity, so it can report a + * property "Connectivity" on the same node. + * In the health store, these reports are treated as separate health events for + * the specified node. * - * @param {string} [serviceUpdateDescription.placementConstraints] The - * placement constraints as a string. Placement constraints are boolean - * expressions on node properties and allow for restricting a service to - * particular nodes based on the service requirements. For example, to place a - * service on nodes where NodeType is blue specify the following: "NodeColor == - * blue)". + * Together with the SourceId, the property uniquely identifies the health + * information. * - * @param {array} [serviceUpdateDescription.correlationScheme] The correlation - * scheme. + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' * - * @param {array} [serviceUpdateDescription.loadMetrics] The service load - * metrics. + * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The + * duration for which this health report is valid. This field uses ISO8601 + * format for specifying the duration. + * When clients report periodically, they should send reports with higher + * frequency than time to live. + * If clients report on transition, they can set the time to live to infinite. + * When time to live expires, the health event that contains the health + * information + * is either removed from health store, if RemoveWhenExpired is true, or + * evaluated at error, if RemoveWhenExpired false. * - * @param {array} [serviceUpdateDescription.servicePlacementPolicies] The - * service placement policies. + * If not specified, time to live defaults to infinite value. * - * @param {string} [serviceUpdateDescription.defaultMoveCost] The move cost for - * the service. Possible values include: 'Zero', 'Low', 'Medium', 'High' + * @param {string} [healthInformation.description] The description of the + * health information. It represents free text used to add human readable + * information about the report. + * The maximum string length for the description is 4096 characters. + * If the provided string is longer, it will be automatically truncated. + * When truncated, the last characters of the description contain a marker + * "[Truncated]", and total string size is 4096 characters. + * The presence of the marker indicates to users that truncation occurred. + * Note that when truncated, the description has less than 4096 characters from + * the original string. * - * @param {array} [serviceUpdateDescription.scalingPolicies] Scaling policies - * for this service. + * @param {string} [healthInformation.sequenceNumber] The sequence number for + * this health report as a numeric string. + * The report sequence number is used by the health store to detect stale + * reports. + * If not specified, a sequence number is auto-generated by the health client + * when a report is added. * - * @param {string} serviceUpdateDescription.serviceKind Polymorphic - * Discriminator + * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates + * whether the report is removed from health store when it expires. + * If set to true, the report is removed from the health store after it + * expires. + * If set to false, the report is treated as an error when expired. The value + * of this property is false by default. + * When clients report periodically, they should set RemoveWhenExpired false + * (default). + * This way, if the reporter has issues (e.g. deadlock) and can't report, the + * entity is evaluated at error when the health report expires. + * This flags the entity as being in Error health state. * * @param {object} [options] Optional Parameters. * + * @param {boolean} [options.immediate] A flag that indicates whether the + * report should be sent immediately. + * A health report is sent to a Service Fabric gateway Application, which + * forwards to the health store. + * If Immediate is set to true, the report is sent immediately from HTTP + * Gateway to the health store, regardless of the fabric client settings that + * the HTTP Gateway Application is using. + * This is useful for critical reports that should be sent as soon as possible. + * Depending on timing and other conditions, sending the report may still fail, + * for example if the HTTP Gateway is closed or the message doesn't reach the + * Gateway. + * If Immediate is set to false, the report is sent based on the health client + * settings from the HTTP Gateway. Therefore, it will be batched according to + * the HealthReportSendInterval configuration. + * This is the recommended setting because it allows the health client to + * optimize health reporting messages to health store as well as health report + * processing. + * By default, reports are not sent immediately. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -50120,7 +48027,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - updateService(serviceId, serviceUpdateDescription, options, optionalCallback) { + reportDeployedApplicationHealth(nodeName, applicationId, healthInformation, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -50129,30 +48036,25 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._updateService(serviceId, serviceUpdateDescription, options, (err, result, request, response) => { + self._reportDeployedApplicationHealth(nodeName, applicationId, healthInformation, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._updateService(serviceId, serviceUpdateDescription, options, optionalCallback); + return self._reportDeployedApplicationHealth(nodeName, applicationId, healthInformation, options, optionalCallback); } } /** - * @summary Gets the description of an existing Service Fabric service. - * - * Gets the description of an existing Service Fabric service. A service must - * be created before its description can be obtained. - * - * @param {string} serviceId The identity of the service. This ID is typically - * the full name of the service without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the service name is "fabric:/myapp/app1/svc1", the service - * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in - * previous versions. + * @summary Gets the manifest describing an application type. + * + * The response contains the application manifest XML as a string. + * + * @param {string} applicationTypeName The name of the application type. + * + * @param {string} applicationTypeVersion The version of the application type. * * @param {object} [options] Optional Parameters. * @@ -50166,15 +48068,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getServiceDescriptionWithHttpOperationResponse(serviceId, options) { + getApplicationManifestWithHttpOperationResponse(applicationTypeName, applicationTypeVersion, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getServiceDescription(serviceId, options, (err, result, request, response) => { + self._getApplicationManifest(applicationTypeName, applicationTypeVersion, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -50185,18 +48087,13 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the description of an existing Service Fabric service. + * @summary Gets the manifest describing an application type. * - * Gets the description of an existing Service Fabric service. A service must - * be created before its description can be obtained. + * The response contains the application manifest XML as a string. * - * @param {string} serviceId The identity of the service. This ID is typically - * the full name of the service without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the service name is "fabric:/myapp/app1/svc1", the service - * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in - * previous versions. + * @param {string} applicationTypeName The name of the application type. + * + * @param {string} applicationTypeVersion The version of the application type. * * @param {object} [options] Optional Parameters. * @@ -50215,7 +48112,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ServiceDescription} - The deserialized result object. + * @resolve {ApplicationTypeManifest} - The deserialized result object. * * @reject {Error} - The error object. * @@ -50224,13 +48121,14 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ServiceDescription} for more information. + * See {@link ApplicationTypeManifest} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getServiceDescription(serviceId, options, optionalCallback) { + getApplicationManifest(applicationTypeName, applicationTypeVersion, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -50239,90 +48137,44 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getServiceDescription(serviceId, options, (err, result, request, response) => { + self._getApplicationManifest(applicationTypeName, applicationTypeVersion, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getServiceDescription(serviceId, options, optionalCallback); + return self._getApplicationManifest(applicationTypeName, applicationTypeVersion, options, optionalCallback); } } /** - * @summary Gets the health of the specified Service Fabric service. + * @summary Gets the information about all services belonging to the + * application specified by the application ID. * - * Gets the health information of the specified service. - * Use EventsHealthStateFilter to filter the collection of health events - * reported on the service based on the health state. - * Use PartitionsHealthStateFilter to filter the collection of partitions - * returned. - * If you specify a service that does not exist in the health store, this - * request returns an error. + * Returns the information about all services belonging to the application + * specified by the application ID. * - * @param {string} serviceId The identity of the service. This ID is typically - * the full name of the service without the 'fabric:' URI scheme. + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" * character. - * For example, if the service name is "fabric:/myapp/app1/svc1", the service - * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * * @param {object} [options] Optional Parameters. * - * @param {number} [options.eventsHealthStateFilter] Allows filtering the - * collection of HealthEvent objects returned based on health state. - * The possible values for this parameter include integer value of one of the - * following health states. - * Only events that match the filter are returned. All events are used to - * evaluate the aggregated health state. - * If not specified, all entries are returned. The state values are flag-based - * enumeration, so the value could be a combination of these values, obtained - * using the bitwise 'OR' operator. For example, If the provided value is 6 - * then all of the events with HealthState value of OK (2) and Warning (4) are - * returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. - * - * @param {number} [options.partitionsHealthStateFilter] Allows filtering of - * the partitions health state objects returned in the result of service health - * query based on their health state. - * The possible values for this parameter include integer value of one of the - * following health states. - * Only partitions that match the filter are returned. All partitions are used - * to evaluate the aggregated health state. - * If not specified, all entries are returned. The state values are flag-based - * enumeration, so the value could be a combination of these value - * obtained using bitwise 'OR' operator. For example, if the provided value is - * 6 then health state of partitions with HealthState value of OK (2) and - * Warning (4) will be returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * @param {string} [options.serviceTypeName] The service type name used to + * filter the services to query for. * - * @param {boolean} [options.excludeHealthStatistics] Indicates whether the - * health statistics should be returned as part of the query result. False by - * default. - * The statistics show the number of children entities in health state Ok, - * Warning, and Error. + * @param {string} [options.continuationToken] The continuation token parameter + * is used to obtain next set of results. A continuation token with a non-empty + * value is included in the response of the API when the results from the + * system do not fit in a single response. When this value is passed to the + * next API call, the API returns next set of results. If there are no further + * results, then the continuation token does not contain a value. The value of + * this parameter should not be URL encoded. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -50334,15 +48186,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getServiceHealthWithHttpOperationResponse(serviceId, options) { + getServiceInfoListWithHttpOperationResponse(applicationId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getServiceHealth(serviceId, options, (err, result, request, response) => { + self._getServiceInfoList(applicationId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -50353,78 +48205,32 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the health of the specified Service Fabric service. + * @summary Gets the information about all services belonging to the + * application specified by the application ID. * - * Gets the health information of the specified service. - * Use EventsHealthStateFilter to filter the collection of health events - * reported on the service based on the health state. - * Use PartitionsHealthStateFilter to filter the collection of partitions - * returned. - * If you specify a service that does not exist in the health store, this - * request returns an error. + * Returns the information about all services belonging to the application + * specified by the application ID. * - * @param {string} serviceId The identity of the service. This ID is typically - * the full name of the service without the 'fabric:' URI scheme. + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" * character. - * For example, if the service name is "fabric:/myapp/app1/svc1", the service - * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * * @param {object} [options] Optional Parameters. * - * @param {number} [options.eventsHealthStateFilter] Allows filtering the - * collection of HealthEvent objects returned based on health state. - * The possible values for this parameter include integer value of one of the - * following health states. - * Only events that match the filter are returned. All events are used to - * evaluate the aggregated health state. - * If not specified, all entries are returned. The state values are flag-based - * enumeration, so the value could be a combination of these values, obtained - * using the bitwise 'OR' operator. For example, If the provided value is 6 - * then all of the events with HealthState value of OK (2) and Warning (4) are - * returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. - * - * @param {number} [options.partitionsHealthStateFilter] Allows filtering of - * the partitions health state objects returned in the result of service health - * query based on their health state. - * The possible values for this parameter include integer value of one of the - * following health states. - * Only partitions that match the filter are returned. All partitions are used - * to evaluate the aggregated health state. - * If not specified, all entries are returned. The state values are flag-based - * enumeration, so the value could be a combination of these value - * obtained using bitwise 'OR' operator. For example, if the provided value is - * 6 then health state of partitions with HealthState value of OK (2) and - * Warning (4) will be returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * @param {string} [options.serviceTypeName] The service type name used to + * filter the services to query for. * - * @param {boolean} [options.excludeHealthStatistics] Indicates whether the - * health statistics should be returned as part of the query result. False by - * default. - * The statistics show the number of children entities in health state Ok, - * Warning, and Error. + * @param {string} [options.continuationToken] The continuation token parameter + * is used to obtain next set of results. A continuation token with a non-empty + * value is included in the response of the API when the results from the + * system do not fit in a single response. When this value is passed to the + * next API call, the API returns next set of results. If there are no further + * results, then the continuation token does not contain a value. The value of + * this parameter should not be URL encoded. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -50441,7 +48247,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ServiceHealth} - The deserialized result object. + * @resolve {PagedServiceInfoList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -50450,13 +48256,13 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ServiceHealth} for more information. + * See {@link PagedServiceInfoList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getServiceHealth(serviceId, options, optionalCallback) { + getServiceInfoList(applicationId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -50465,33 +48271,31 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getServiceHealth(serviceId, options, (err, result, request, response) => { + self._getServiceInfoList(applicationId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getServiceHealth(serviceId, options, optionalCallback); + return self._getServiceInfoList(applicationId, options, optionalCallback); } } /** - * @summary Gets the health of the specified Service Fabric service, by using - * the specified health policy. + * @summary Gets the information about the specific service belonging to the + * Service Fabric application. * - * Gets the health information of the specified service. - * If the application health policy is specified, the health evaluation uses it - * to get the aggregated health state. - * If the policy is not specified, the health evaluation uses the application - * health policy defined in the application manifest, or the default health - * policy, if no policy is defined in the manifest. - * Use EventsHealthStateFilter to filter the collection of health events - * reported on the service based on the health state. - * Use PartitionsHealthStateFilter to filter the collection of partitions - * returned. - * If you specify a service that does not exist in the health store, this - * request returns an error. + * Returns the information about the specified service belonging to the + * specified Service Fabric application. + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * previous versions. * * @param {string} serviceId The identity of the service. This ID is typically * the full name of the service without the 'fabric:' URI scheme. @@ -50503,132 +48307,6 @@ class ServiceFabricClient extends ServiceClient { * * @param {object} [options] Optional Parameters. * - * @param {number} [options.eventsHealthStateFilter] Allows filtering the - * collection of HealthEvent objects returned based on health state. - * The possible values for this parameter include integer value of one of the - * following health states. - * Only events that match the filter are returned. All events are used to - * evaluate the aggregated health state. - * If not specified, all entries are returned. The state values are flag-based - * enumeration, so the value could be a combination of these values, obtained - * using the bitwise 'OR' operator. For example, If the provided value is 6 - * then all of the events with HealthState value of OK (2) and Warning (4) are - * returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. - * - * @param {number} [options.partitionsHealthStateFilter] Allows filtering of - * the partitions health state objects returned in the result of service health - * query based on their health state. - * The possible values for this parameter include integer value of one of the - * following health states. - * Only partitions that match the filter are returned. All partitions are used - * to evaluate the aggregated health state. - * If not specified, all entries are returned. The state values are flag-based - * enumeration, so the value could be a combination of these value - * obtained using bitwise 'OR' operator. For example, if the provided value is - * 6 then health state of partitions with HealthState value of OK (2) and - * Warning (4) will be returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. - * - * @param {object} [options.applicationHealthPolicy] Describes the health - * policies used to evaluate the health of an application or one of its - * children. - * If not present, the health evaluation uses the health policy from - * application manifest or the default health policy. - * - * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. - * - * @param {number} - * [options.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] - * The maximum allowed percentage of unhealthy deployed applications. Allowed - * values are Byte values from zero to 100. - * The percentage represents the maximum tolerated percentage of deployed - * applications that can be unhealthy before the application is considered in - * error. - * This is calculated by dividing the number of unhealthy deployed applications - * over the number of nodes where the application is currently deployed on in - * the cluster. - * The computation rounds up to tolerate one failure on small numbers of nodes. - * Default percentage is zero. - * - * @param {object} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health - * policy used by default to evaluate the health of a service type. - * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] - * The maximum allowed percentage of unhealthy partitions per service. Allowed - * values are Byte values from zero to 100 - * - * The percentage represents the maximum tolerated percentage of partitions - * that can be unhealthy before the service is considered in error. - * If the percentage is respected but there is at least one unhealthy - * partition, the health is evaluated as Warning. - * The percentage is calculated by dividing the number of unhealthy partitions - * over the total number of partitions in the service. - * The computation rounds up to tolerate one failure on small numbers of - * partitions. Default percentage is zero. - * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] - * The maximum allowed percentage of unhealthy replicas per partition. Allowed - * values are Byte values from zero to 100. - * - * The percentage represents the maximum tolerated percentage of replicas that - * can be unhealthy before the partition is considered in error. - * If the percentage is respected but there is at least one unhealthy replica, - * the health is evaluated as Warning. - * The percentage is calculated by dividing the number of unhealthy replicas - * over the total number of replicas in the partition. - * The computation rounds up to tolerate one failure on small numbers of - * replicas. Default percentage is zero. - * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. - * - * The percentage represents the maximum tolerated percentage of services that - * can be unhealthy before the application is considered in error. - * If the percentage is respected but there is at least one unhealthy service, - * the health is evaluated as Warning. - * This is calculated by dividing the number of unhealthy services of the - * specific service type over the total number of services of the specific - * service type. - * The computation rounds up to tolerate one failure on small numbers of - * services. Default percentage is zero. - * - * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] - * The map with service type health policy per service type name. The map is - * empty by default. - * - * @param {boolean} [options.excludeHealthStatistics] Indicates whether the - * health statistics should be returned as part of the query result. False by - * default. - * The statistics show the number of children entities in health state Ok, - * Warning, and Error. - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -50639,15 +48317,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getServiceHealthUsingPolicyWithHttpOperationResponse(serviceId, options) { + getServiceInfoWithHttpOperationResponse(applicationId, serviceId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getServiceHealthUsingPolicy(serviceId, options, (err, result, request, response) => { + self._getServiceInfo(applicationId, serviceId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -50658,21 +48336,19 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the health of the specified Service Fabric service, by using - * the specified health policy. + * @summary Gets the information about the specific service belonging to the + * Service Fabric application. * - * Gets the health information of the specified service. - * If the application health policy is specified, the health evaluation uses it - * to get the aggregated health state. - * If the policy is not specified, the health evaluation uses the application - * health policy defined in the application manifest, or the default health - * policy, if no policy is defined in the manifest. - * Use EventsHealthStateFilter to filter the collection of health events - * reported on the service based on the health state. - * Use PartitionsHealthStateFilter to filter the collection of partitions - * returned. - * If you specify a service that does not exist in the health store, this - * request returns an error. + * Returns the information about the specified service belonging to the + * specified Service Fabric application. + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * previous versions. * * @param {string} serviceId The identity of the service. This ID is typically * the full name of the service without the 'fabric:' URI scheme. @@ -50684,131 +48360,117 @@ class ServiceFabricClient extends ServiceClient { * * @param {object} [options] Optional Parameters. * - * @param {number} [options.eventsHealthStateFilter] Allows filtering the - * collection of HealthEvent objects returned based on health state. - * The possible values for this parameter include integer value of one of the - * following health states. - * Only events that match the filter are returned. All events are used to - * evaluate the aggregated health state. - * If not specified, all entries are returned. The state values are flag-based - * enumeration, so the value could be a combination of these values, obtained - * using the bitwise 'OR' operator. For example, If the provided value is 6 - * then all of the events with HealthState value of OK (2) and Warning (4) are - * returned. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {number} [options.partitionsHealthStateFilter] Allows filtering of - * the partitions health state objects returned in the result of service health - * query based on their health state. - * The possible values for this parameter include integer value of one of the - * following health states. - * Only partitions that match the filter are returned. All partitions are used - * to evaluate the aggregated health state. - * If not specified, all entries are returned. The state values are flag-based - * enumeration, so the value could be a combination of these value - * obtained using bitwise 'OR' operator. For example, if the provided value is - * 6 then health state of partitions with HealthState value of OK (2) and - * Warning (4) will be returned. + * @param {function} [optionalCallback] - The optional callback. * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. * - * @param {object} [options.applicationHealthPolicy] Describes the health - * policies used to evaluate the health of an application or one of its - * children. - * If not present, the health evaluation uses the health policy from - * application manifest or the default health policy. + * {Promise} A promise is returned * - * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. + * @resolve {ServiceInfo} - The deserialized result object. * - * @param {number} - * [options.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] - * The maximum allowed percentage of unhealthy deployed applications. Allowed - * values are Byte values from zero to 100. - * The percentage represents the maximum tolerated percentage of deployed - * applications that can be unhealthy before the application is considered in - * error. - * This is calculated by dividing the number of unhealthy deployed applications - * over the number of nodes where the application is currently deployed on in - * the cluster. - * The computation rounds up to tolerate one failure on small numbers of nodes. - * Default percentage is zero. + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ServiceInfo} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getServiceInfo(applicationId, serviceId, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getServiceInfo(applicationId, serviceId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getServiceInfo(applicationId, serviceId, options, optionalCallback); + } + } + + /** + * @summary Gets the name of the Service Fabric application for a service. + * + * Gets the name of the application for the specified service. A 404 + * FABRIC_E_SERVICE_DOES_NOT_EXIST error is returned if a service with the + * provided service ID does not exist. + * + * @param {string} serviceId The identity of the service. This ID is typically + * the full name of the service without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * previous versions. * - * @param {object} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health - * policy used by default to evaluate the health of a service type. + * @param {object} [options] Optional Parameters. * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] - * The maximum allowed percentage of unhealthy partitions per service. Allowed - * values are Byte values from zero to 100 + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * The percentage represents the maximum tolerated percentage of partitions - * that can be unhealthy before the service is considered in error. - * If the percentage is respected but there is at least one unhealthy - * partition, the health is evaluated as Warning. - * The percentage is calculated by dividing the number of unhealthy partitions - * over the total number of partitions in the service. - * The computation rounds up to tolerate one failure on small numbers of - * partitions. Default percentage is zero. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] - * The maximum allowed percentage of unhealthy replicas per partition. Allowed - * values are Byte values from zero to 100. + * @returns {Promise} A promise is returned * - * The percentage represents the maximum tolerated percentage of replicas that - * can be unhealthy before the partition is considered in error. - * If the percentage is respected but there is at least one unhealthy replica, - * the health is evaluated as Warning. - * The percentage is calculated by dividing the number of unhealthy replicas - * over the total number of replicas in the partition. - * The computation rounds up to tolerate one failure on small numbers of - * replicas. Default percentage is zero. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * @reject {Error} - The error object. + */ + getApplicationNameInfoWithHttpOperationResponse(serviceId, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getApplicationNameInfo(serviceId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets the name of the Service Fabric application for a service. * - * The percentage represents the maximum tolerated percentage of services that - * can be unhealthy before the application is considered in error. - * If the percentage is respected but there is at least one unhealthy service, - * the health is evaluated as Warning. - * This is calculated by dividing the number of unhealthy services of the - * specific service type over the total number of services of the specific - * service type. - * The computation rounds up to tolerate one failure on small numbers of - * services. Default percentage is zero. + * Gets the name of the application for the specified service. A 404 + * FABRIC_E_SERVICE_DOES_NOT_EXIST error is returned if a service with the + * provided service ID does not exist. * - * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] - * The map with service type health policy per service type name. The map is - * empty by default. + * @param {string} serviceId The identity of the service. This ID is typically + * the full name of the service without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * previous versions. * - * @param {boolean} [options.excludeHealthStatistics] Indicates whether the - * health statistics should be returned as part of the query result. False by - * default. - * The statistics show the number of children entities in health state Ok, - * Warning, and Error. + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -50825,7 +48487,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ServiceHealth} - The deserialized result object. + * @resolve {ApplicationNameInfo} - The deserialized result object. * * @reject {Error} - The error object. * @@ -50834,13 +48496,13 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ServiceHealth} for more information. + * See {@link ApplicationNameInfo} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getServiceHealthUsingPolicy(serviceId, options, optionalCallback) { + getApplicationNameInfo(serviceId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -50849,131 +48511,91 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getServiceHealthUsingPolicy(serviceId, options, (err, result, request, response) => { + self._getApplicationNameInfo(serviceId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getServiceHealthUsingPolicy(serviceId, options, optionalCallback); + return self._getApplicationNameInfo(serviceId, options, optionalCallback); } } /** - * @summary Sends a health report on the Service Fabric service. + * @summary Creates the specified Service Fabric service. * - * Reports health state of the specified Service Fabric service. The report - * must contain the information about the source of the health report and - * property on which it is reported. - * The report is sent to a Service Fabric gateway Service, which forwards to - * the health store. - * The report may be accepted by the gateway, but rejected by the health store - * after extra validation. - * For example, the health store may reject the report because of an invalid - * parameter, like a stale sequence number. - * To see whether the report was applied in the health store, run - * GetServiceHealth and check that the report appears in the HealthEvents - * section. + * This api allows creating a new Service Fabric stateless or stateful service + * under a specified Service Fabric application. The description for creating + * the service includes partitioning information and optional properties for + * placement and load balancing. Some of the properties can later be modified + * using `UpdateService` API. * - * @param {string} serviceId The identity of the service. This ID is typically - * the full name of the service without the 'fabric:' URI scheme. + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" * character. - * For example, if the service name is "fabric:/myapp/app1/svc1", the service - * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * @param {object} healthInformation Describes the health information for the - * health report. This information needs to be present in all of the health - * reports sent to the health manager. + * @param {object} serviceDescription The information necessary to create a + * service. * - * @param {string} healthInformation.sourceId The source name that identifies - * the client/watchdog/system component that generated the health information. + * @param {string} [serviceDescription.applicationName] The name of the + * application, including the 'fabric:' URI scheme. * - * @param {string} healthInformation.property The property of the health - * information. An entity can have health reports for different properties. - * The property is a string and not a fixed enumeration to allow the reporter - * flexibility to categorize the state condition that triggers the report. - * For example, a reporter with SourceId "LocalWatchdog" can monitor the state - * of the available disk on a node, - * so it can report "AvailableDisk" property on that node. - * The same reporter can monitor the node connectivity, so it can report a - * property "Connectivity" on the same node. - * In the health store, these reports are treated as separate health events for - * the specified node. + * @param {string} serviceDescription.serviceName The full name of the service + * with 'fabric:' URI scheme. * - * Together with the SourceId, the property uniquely identifies the health - * information. + * @param {string} serviceDescription.serviceTypeName Name of the service type + * as specified in the service manifest. * - * @param {string} healthInformation.healthState The health state of a Service - * Fabric entity such as Cluster, Node, Application, Service, Partition, - * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - * 'Unknown' + * @param {array} [serviceDescription.initializationData] The initialization + * data as an array of bytes. Initialization data is passed to service + * instances or replicas when they are created. * - * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field uses ISO8601 - * format for specifying the duration. - * When clients report periodically, they should send reports with higher - * frequency than time to live. - * If clients report on transition, they can set the time to live to infinite. - * When time to live expires, the health event that contains the health - * information - * is either removed from health store, if RemoveWhenExpired is true, or - * evaluated at error, if RemoveWhenExpired false. + * @param {object} serviceDescription.partitionDescription The partition + * description as an object. * - * If not specified, time to live defaults to infinite value. + * @param {string} serviceDescription.partitionDescription.partitionScheme + * Polymorphic Discriminator * - * @param {string} [healthInformation.description] The description of the - * health information. It represents free text used to add human readable - * information about the report. - * The maximum string length for the description is 4096 characters. - * If the provided string is longer, it will be automatically truncated. - * When truncated, the last characters of the description contain a marker - * "[Truncated]", and total string size is 4096 characters. - * The presence of the marker indicates to users that truncation occurred. - * Note that when truncated, the description has less than 4096 characters from - * the original string. + * @param {string} [serviceDescription.placementConstraints] The placement + * constraints as a string. Placement constraints are boolean expressions on + * node properties and allow for restricting a service to particular nodes + * based on the service requirements. For example, to place a service on nodes + * where NodeType is blue specify the following: "NodeColor == blue)". * - * @param {string} [healthInformation.sequenceNumber] The sequence number for - * this health report as a numeric string. - * The report sequence number is used by the health store to detect stale - * reports. - * If not specified, a sequence number is auto-generated by the health client - * when a report is added. + * @param {array} [serviceDescription.correlationScheme] The correlation + * scheme. * - * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates - * whether the report is removed from health store when it expires. - * If set to true, the report is removed from the health store after it - * expires. - * If set to false, the report is treated as an error when expired. The value - * of this property is false by default. - * When clients report periodically, they should set RemoveWhenExpired false - * (default). - * This way, is the reporter has issues (eg. deadlock) and can't report, the - * entity is evaluated at error when the health report expires. - * This flags the entity as being in Error health state. + * @param {array} [serviceDescription.serviceLoadMetrics] The service load + * metrics. * - * @param {object} [options] Optional Parameters. + * @param {array} [serviceDescription.servicePlacementPolicies] The service + * placement policies. * - * @param {boolean} [options.immediate] A flag that indicates whether the - * report should be sent immediately. - * A health report is sent to a Service Fabric gateway Application, which - * forwards to the health store. - * If Immediate is set to true, the report is sent immediately from HTTP - * Gateway to the health store, regardless of the fabric client settings that - * the HTTP Gateway Application is using. - * This is useful for critical reports that should be sent as soon as possible. - * Depending on timing and other conditions, sending the report may still fail, - * for example if the HTTP Gateway is closed or the message doesn't reach the - * Gateway. - * If Immediate is set to false, the report is sent based on the health client - * settings from the HTTP Gateway. Therefore, it will be batched according to - * the HealthReportSendInterval configuration. - * This is the recommended setting because it allows the health client to - * optimize health reporting messages to health store as well as health report - * processing. - * By default, reports are not sent immediately. + * @param {string} [serviceDescription.defaultMoveCost] The move cost for the + * service. Possible values include: 'Zero', 'Low', 'Medium', 'High' + * + * @param {boolean} [serviceDescription.isDefaultMoveCostSpecified] Indicates + * if the DefaultMoveCost property is specified. + * + * @param {string} [serviceDescription.servicePackageActivationMode] The + * activation mode of service package to be used for a service. Possible values + * include: 'SharedProcess', 'ExclusiveProcess' + * + * @param {string} [serviceDescription.serviceDnsName] The DNS name of the + * service. It requires the DNS system service to be enabled in Service Fabric + * cluster. + * + * @param {array} [serviceDescription.scalingPolicies] Scaling policies for + * this service. + * + * @param {string} serviceDescription.serviceKind Polymorphic Discriminator + * + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -50989,11 +48611,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - reportServiceHealthWithHttpOperationResponse(serviceId, healthInformation, options) { + createServiceWithHttpOperationResponse(applicationId, serviceDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._reportServiceHealth(serviceId, healthInformation, options, (err, result, request, response) => { + self._createService(applicationId, serviceDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -51004,119 +48626,79 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Sends a health report on the Service Fabric service. + * @summary Creates the specified Service Fabric service. * - * Reports health state of the specified Service Fabric service. The report - * must contain the information about the source of the health report and - * property on which it is reported. - * The report is sent to a Service Fabric gateway Service, which forwards to - * the health store. - * The report may be accepted by the gateway, but rejected by the health store - * after extra validation. - * For example, the health store may reject the report because of an invalid - * parameter, like a stale sequence number. - * To see whether the report was applied in the health store, run - * GetServiceHealth and check that the report appears in the HealthEvents - * section. + * This api allows creating a new Service Fabric stateless or stateful service + * under a specified Service Fabric application. The description for creating + * the service includes partitioning information and optional properties for + * placement and load balancing. Some of the properties can later be modified + * using `UpdateService` API. * - * @param {string} serviceId The identity of the service. This ID is typically - * the full name of the service without the 'fabric:' URI scheme. + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" * character. - * For example, if the service name is "fabric:/myapp/app1/svc1", the service - * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * @param {object} healthInformation Describes the health information for the - * health report. This information needs to be present in all of the health - * reports sent to the health manager. + * @param {object} serviceDescription The information necessary to create a + * service. * - * @param {string} healthInformation.sourceId The source name that identifies - * the client/watchdog/system component that generated the health information. + * @param {string} [serviceDescription.applicationName] The name of the + * application, including the 'fabric:' URI scheme. * - * @param {string} healthInformation.property The property of the health - * information. An entity can have health reports for different properties. - * The property is a string and not a fixed enumeration to allow the reporter - * flexibility to categorize the state condition that triggers the report. - * For example, a reporter with SourceId "LocalWatchdog" can monitor the state - * of the available disk on a node, - * so it can report "AvailableDisk" property on that node. - * The same reporter can monitor the node connectivity, so it can report a - * property "Connectivity" on the same node. - * In the health store, these reports are treated as separate health events for - * the specified node. + * @param {string} serviceDescription.serviceName The full name of the service + * with 'fabric:' URI scheme. * - * Together with the SourceId, the property uniquely identifies the health - * information. + * @param {string} serviceDescription.serviceTypeName Name of the service type + * as specified in the service manifest. * - * @param {string} healthInformation.healthState The health state of a Service - * Fabric entity such as Cluster, Node, Application, Service, Partition, - * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - * 'Unknown' + * @param {array} [serviceDescription.initializationData] The initialization + * data as an array of bytes. Initialization data is passed to service + * instances or replicas when they are created. * - * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field uses ISO8601 - * format for specifying the duration. - * When clients report periodically, they should send reports with higher - * frequency than time to live. - * If clients report on transition, they can set the time to live to infinite. - * When time to live expires, the health event that contains the health - * information - * is either removed from health store, if RemoveWhenExpired is true, or - * evaluated at error, if RemoveWhenExpired false. + * @param {object} serviceDescription.partitionDescription The partition + * description as an object. * - * If not specified, time to live defaults to infinite value. + * @param {string} serviceDescription.partitionDescription.partitionScheme + * Polymorphic Discriminator * - * @param {string} [healthInformation.description] The description of the - * health information. It represents free text used to add human readable - * information about the report. - * The maximum string length for the description is 4096 characters. - * If the provided string is longer, it will be automatically truncated. - * When truncated, the last characters of the description contain a marker - * "[Truncated]", and total string size is 4096 characters. - * The presence of the marker indicates to users that truncation occurred. - * Note that when truncated, the description has less than 4096 characters from - * the original string. + * @param {string} [serviceDescription.placementConstraints] The placement + * constraints as a string. Placement constraints are boolean expressions on + * node properties and allow for restricting a service to particular nodes + * based on the service requirements. For example, to place a service on nodes + * where NodeType is blue specify the following: "NodeColor == blue)". * - * @param {string} [healthInformation.sequenceNumber] The sequence number for - * this health report as a numeric string. - * The report sequence number is used by the health store to detect stale - * reports. - * If not specified, a sequence number is auto-generated by the health client - * when a report is added. + * @param {array} [serviceDescription.correlationScheme] The correlation + * scheme. * - * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates - * whether the report is removed from health store when it expires. - * If set to true, the report is removed from the health store after it - * expires. - * If set to false, the report is treated as an error when expired. The value - * of this property is false by default. - * When clients report periodically, they should set RemoveWhenExpired false - * (default). - * This way, is the reporter has issues (eg. deadlock) and can't report, the - * entity is evaluated at error when the health report expires. - * This flags the entity as being in Error health state. + * @param {array} [serviceDescription.serviceLoadMetrics] The service load + * metrics. * - * @param {object} [options] Optional Parameters. + * @param {array} [serviceDescription.servicePlacementPolicies] The service + * placement policies. * - * @param {boolean} [options.immediate] A flag that indicates whether the - * report should be sent immediately. - * A health report is sent to a Service Fabric gateway Application, which - * forwards to the health store. - * If Immediate is set to true, the report is sent immediately from HTTP - * Gateway to the health store, regardless of the fabric client settings that - * the HTTP Gateway Application is using. - * This is useful for critical reports that should be sent as soon as possible. - * Depending on timing and other conditions, sending the report may still fail, - * for example if the HTTP Gateway is closed or the message doesn't reach the - * Gateway. - * If Immediate is set to false, the report is sent based on the health client - * settings from the HTTP Gateway. Therefore, it will be batched according to - * the HealthReportSendInterval configuration. - * This is the recommended setting because it allows the health client to - * optimize health reporting messages to health store as well as health report - * processing. - * By default, reports are not sent immediately. + * @param {string} [serviceDescription.defaultMoveCost] The move cost for the + * service. Possible values include: 'Zero', 'Low', 'Medium', 'High' + * + * @param {boolean} [serviceDescription.isDefaultMoveCostSpecified] Indicates + * if the DefaultMoveCost property is specified. + * + * @param {string} [serviceDescription.servicePackageActivationMode] The + * activation mode of service package to be used for a service. Possible values + * include: 'SharedProcess', 'ExclusiveProcess' + * + * @param {string} [serviceDescription.serviceDnsName] The DNS name of the + * service. It requires the DNS system service to be enabled in Service Fabric + * cluster. + * + * @param {array} [serviceDescription.scalingPolicies] Scaling policies for + * this service. + * + * @param {string} serviceDescription.serviceKind Polymorphic Discriminator + * + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -51147,7 +48729,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - reportServiceHealth(serviceId, healthInformation, options, optionalCallback) { + createService(applicationId, serviceDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -51156,52 +48738,59 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._reportServiceHealth(serviceId, healthInformation, options, (err, result, request, response) => { + self._createService(applicationId, serviceDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._reportServiceHealth(serviceId, healthInformation, options, optionalCallback); + return self._createService(applicationId, serviceDescription, options, optionalCallback); } } /** - * @summary Resolve a Service Fabric partition. + * @summary Creates a Service Fabric service from the service template. * - * Resolve a Service Fabric service partition to get the endpoints of the - * service replicas. + * Creates a Service Fabric service from the service template defined in the + * application manifest. A service template contains the properties that will + * be same for the service instance of the same type. The API allows overriding + * the properties that are usually different for different services of the same + * service type. * - * @param {string} serviceId The identity of the service. This ID is typically - * the full name of the service without the 'fabric:' URI scheme. + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" * character. - * For example, if the service name is "fabric:/myapp/app1/svc1", the service - * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * @param {object} [options] Optional Parameters. + * @param {object} serviceFromTemplateDescription Describes the service that + * needs to be created from the template defined in the application manifest. * - * @param {number} [options.partitionKeyType] Key type for the partition. This - * parameter is required if the partition scheme for the service is Int64Range - * or Named. The possible values are following. - * - None (1) - Indicates that the PartitionKeyValue parameter is not - * specified. This is valid for the partitions with partitioning scheme as - * Singleton. This is the default value. The value is 1. - * - Int64Range (2) - Indicates that the PartitionKeyValue parameter is an - * int64 partition key. This is valid for the partitions with partitioning - * scheme as Int64Range. The value is 2. - * - Named (3) - Indicates that the PartitionKeyValue parameter is a name of - * the partition. This is valid for the partitions with partitioning scheme as - * Named. The value is 3. + * @param {string} serviceFromTemplateDescription.applicationName The name of + * the application, including the 'fabric:' URI scheme. * - * @param {string} [options.partitionKeyValue] Partition key. This is required - * if the partition scheme for the service is Int64Range or Named. + * @param {string} serviceFromTemplateDescription.serviceName The full name of + * the service with 'fabric:' URI scheme. * - * @param {string} [options.previousRspVersion] The value in the Version field - * of the response that was received previously. This is required if the user - * knows that the result that was gotten previously is stale. + * @param {string} serviceFromTemplateDescription.serviceTypeName Name of the + * service type as specified in the service manifest. + * + * @param {array} [serviceFromTemplateDescription.initializationData] The + * initialization data for the newly created service instance. + * + * @param {string} + * [serviceFromTemplateDescription.servicePackageActivationMode] The activation + * mode of service package to be used for a service. Possible values include: + * 'SharedProcess', 'ExclusiveProcess' + * + * @param {string} [serviceFromTemplateDescription.serviceDnsName] The DNS name + * of the service. It requires the DNS system service to be enabled in Service + * Fabric cluster. + * + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -51213,15 +48802,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - resolveServiceWithHttpOperationResponse(serviceId, options) { + createServiceFromTemplateWithHttpOperationResponse(applicationId, serviceFromTemplateDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._resolveService(serviceId, options, (err, result, request, response) => { + self._createServiceFromTemplate(applicationId, serviceFromTemplateDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -51232,40 +48821,47 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Resolve a Service Fabric partition. + * @summary Creates a Service Fabric service from the service template. * - * Resolve a Service Fabric service partition to get the endpoints of the - * service replicas. + * Creates a Service Fabric service from the service template defined in the + * application manifest. A service template contains the properties that will + * be same for the service instance of the same type. The API allows overriding + * the properties that are usually different for different services of the same + * service type. * - * @param {string} serviceId The identity of the service. This ID is typically - * the full name of the service without the 'fabric:' URI scheme. + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" * character. - * For example, if the service name is "fabric:/myapp/app1/svc1", the service - * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * @param {object} [options] Optional Parameters. + * @param {object} serviceFromTemplateDescription Describes the service that + * needs to be created from the template defined in the application manifest. * - * @param {number} [options.partitionKeyType] Key type for the partition. This - * parameter is required if the partition scheme for the service is Int64Range - * or Named. The possible values are following. - * - None (1) - Indicates that the PartitionKeyValue parameter is not - * specified. This is valid for the partitions with partitioning scheme as - * Singleton. This is the default value. The value is 1. - * - Int64Range (2) - Indicates that the PartitionKeyValue parameter is an - * int64 partition key. This is valid for the partitions with partitioning - * scheme as Int64Range. The value is 2. - * - Named (3) - Indicates that the PartitionKeyValue parameter is a name of - * the partition. This is valid for the partitions with partitioning scheme as - * Named. The value is 3. + * @param {string} serviceFromTemplateDescription.applicationName The name of + * the application, including the 'fabric:' URI scheme. + * + * @param {string} serviceFromTemplateDescription.serviceName The full name of + * the service with 'fabric:' URI scheme. + * + * @param {string} serviceFromTemplateDescription.serviceTypeName Name of the + * service type as specified in the service manifest. * - * @param {string} [options.partitionKeyValue] Partition key. This is required - * if the partition scheme for the service is Int64Range or Named. + * @param {array} [serviceFromTemplateDescription.initializationData] The + * initialization data for the newly created service instance. * - * @param {string} [options.previousRspVersion] The value in the Version field - * of the response that was received previously. This is required if the user - * knows that the result that was gotten previously is stale. + * @param {string} + * [serviceFromTemplateDescription.servicePackageActivationMode] The activation + * mode of service package to be used for a service. Possible values include: + * 'SharedProcess', 'ExclusiveProcess' + * + * @param {string} [serviceFromTemplateDescription.serviceDnsName] The DNS name + * of the service. It requires the DNS system service to be enabled in Service + * Fabric cluster. + * + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -51282,7 +48878,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ResolvedServicePartition} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -51290,15 +48886,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResolvedServicePartition} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - resolveService(serviceId, options, optionalCallback) { + createServiceFromTemplate(applicationId, serviceFromTemplateDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -51307,23 +48901,26 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._resolveService(serviceId, options, (err, result, request, response) => { + self._createServiceFromTemplate(applicationId, serviceFromTemplateDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._resolveService(serviceId, options, optionalCallback); + return self._createServiceFromTemplate(applicationId, serviceFromTemplateDescription, options, optionalCallback); } } /** - * @summary Gets the list of partitions of a Service Fabric service. + * @summary Deletes an existing Service Fabric service. * - * The response includes the partition ID, partitioning scheme information, - * keys supported by the partition, status, health, and other details about the - * partition. + * A service must be created before it can be deleted. By default, Service + * Fabric will try to close service replicas in a graceful manner and then + * delete the service. However, if the service is having issues closing the + * replica gracefully, the delete operation may take a long time or get stuck. + * Use the optional ForceRemove flag to skip the graceful close sequence and + * forcefully delete the service. * * @param {string} serviceId The identity of the service. This ID is typically * the full name of the service without the 'fabric:' URI scheme. @@ -51335,13 +48932,11 @@ class ServiceFabricClient extends ServiceClient { * * @param {object} [options] Optional Parameters. * - * @param {string} [options.continuationToken] The continuation token parameter - * is used to obtain next set of results. A continuation token with a non-empty - * value is included in the response of the API when the results from the - * system do not fit in a single response. When this value is passed to the - * next API call, the API returns next set of results. If there are no further - * results, then the continuation token does not contain a value. The value of - * this parameter should not be URL encoded. + * @param {boolean} [options.forceRemove] Remove a Service Fabric application + * or service forcefully without going through the graceful shutdown sequence. + * This parameter can be used to forcefully delete an application or service + * for which delete is timing out due to issues in the service code that + * prevents graceful close of replicas. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -51353,15 +48948,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getPartitionInfoListWithHttpOperationResponse(serviceId, options) { + deleteServiceWithHttpOperationResponse(serviceId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getPartitionInfoList(serviceId, options, (err, result, request, response) => { + self._deleteService(serviceId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -51372,11 +48967,14 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the list of partitions of a Service Fabric service. + * @summary Deletes an existing Service Fabric service. * - * The response includes the partition ID, partitioning scheme information, - * keys supported by the partition, status, health, and other details about the - * partition. + * A service must be created before it can be deleted. By default, Service + * Fabric will try to close service replicas in a graceful manner and then + * delete the service. However, if the service is having issues closing the + * replica gracefully, the delete operation may take a long time or get stuck. + * Use the optional ForceRemove flag to skip the graceful close sequence and + * forcefully delete the service. * * @param {string} serviceId The identity of the service. This ID is typically * the full name of the service without the 'fabric:' URI scheme. @@ -51388,13 +48986,11 @@ class ServiceFabricClient extends ServiceClient { * * @param {object} [options] Optional Parameters. * - * @param {string} [options.continuationToken] The continuation token parameter - * is used to obtain next set of results. A continuation token with a non-empty - * value is included in the response of the API when the results from the - * system do not fit in a single response. When this value is passed to the - * next API call, the API returns next set of results. If there are no further - * results, then the continuation token does not contain a value. The value of - * this parameter should not be URL encoded. + * @param {boolean} [options.forceRemove] Remove a Service Fabric application + * or service forcefully without going through the graceful shutdown sequence. + * This parameter can be used to forcefully delete an application or service + * for which delete is timing out due to issues in the service code that + * prevents graceful close of replicas. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -51411,7 +49007,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {PagedServicePartitionInfoList} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -51419,15 +49015,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PagedServicePartitionInfoList} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getPartitionInfoList(serviceId, options, optionalCallback) { + deleteService(serviceId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -51436,25 +49030,100 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getPartitionInfoList(serviceId, options, (err, result, request, response) => { + self._deleteService(serviceId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getPartitionInfoList(serviceId, options, optionalCallback); + return self._deleteService(serviceId, options, optionalCallback); } } /** - * @summary Gets the information about a Service Fabric partition. + * @summary Updates a Service Fabric service using the specified update + * description. * - * Gets the information about the specified partition. The response includes - * the partition ID, partitioning scheme information, keys supported by the - * partition, status, health, and other details about the partition. + * This API allows updating properties of a running Service Fabric service. The + * set of properties that can be updated are a subset of the properties that + * were specified at the time of creating the service. The current set of + * properties can be obtained using `GetServiceDescription` API. Note that + * updating the properties of a running service is different than upgrading + * your application using `StartApplicationUpgrade` API. The upgrade is a long + * running background operation that involves moving the application from one + * version to another, one upgrade domain at a time, whereas update applies the + * new properties immediately to the service. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} serviceId The identity of the service. This ID is typically + * the full name of the service without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * previous versions. + * + * @param {object} serviceUpdateDescription The information necessary to update + * a service. + * + * @param {string} [serviceUpdateDescription.flags] Flags indicating whether + * other properties are set. Each of the associated properties corresponds to a + * flag, specified below, which, if set, indicate that the property is + * specified. + * This property can be a combination of those flags obtained using bitwise + * 'OR' operator. + * For example, if the provided value is 6 then the flags for + * ReplicaRestartWaitDuration (2) and QuorumLossWaitDuration (4) are set. + * + * - None - Does not indicate any other properties are set. The value is zero. + * - TargetReplicaSetSize/InstanceCount - Indicates whether the + * TargetReplicaSetSize property (for Stateful services) or the InstanceCount + * property (for Stateless services) is set. The value is 1. + * - ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration + * property is set. The value is 2. + * - QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is + * set. The value is 4. + * - StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration + * property is set. The value is 8. + * - MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The + * value is 16. + * - PlacementConstraints - Indicates the PlacementConstraints property is set. + * The value is 32. + * - PlacementPolicyList - Indicates the ServicePlacementPolicies property is + * set. The value is 64. + * - Correlation - Indicates the CorrelationScheme property is set. The value + * is 128. + * - Metrics - Indicates the ServiceLoadMetrics property is set. The value is + * 256. + * - DefaultMoveCost - Indicates the DefaultMoveCost property is set. The value + * is 512. + * - ScalingPolicy - Indicates the ScalingPolicies property is set. The value + * is 1024. + * + * @param {string} [serviceUpdateDescription.placementConstraints] The + * placement constraints as a string. Placement constraints are boolean + * expressions on node properties and allow for restricting a service to + * particular nodes based on the service requirements. For example, to place a + * service on nodes where NodeType is blue specify the following: "NodeColor == + * blue)". + * + * @param {array} [serviceUpdateDescription.correlationScheme] The correlation + * scheme. + * + * @param {array} [serviceUpdateDescription.loadMetrics] The service load + * metrics. + * + * @param {array} [serviceUpdateDescription.servicePlacementPolicies] The + * service placement policies. + * + * @param {string} [serviceUpdateDescription.defaultMoveCost] The move cost for + * the service. Possible values include: 'Zero', 'Low', 'Medium', 'High' + * + * @param {array} [serviceUpdateDescription.scalingPolicies] Scaling policies + * for this service. + * + * @param {string} serviceUpdateDescription.serviceKind Polymorphic + * Discriminator * * @param {object} [options] Optional Parameters. * @@ -51468,15 +49137,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getPartitionInfoWithHttpOperationResponse(partitionId, options) { + updateServiceWithHttpOperationResponse(serviceId, serviceUpdateDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getPartitionInfo(partitionId, options, (err, result, request, response) => { + self._updateService(serviceId, serviceUpdateDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -51487,13 +49156,88 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the information about a Service Fabric partition. + * @summary Updates a Service Fabric service using the specified update + * description. * - * Gets the information about the specified partition. The response includes - * the partition ID, partitioning scheme information, keys supported by the - * partition, status, health, and other details about the partition. + * This API allows updating properties of a running Service Fabric service. The + * set of properties that can be updated are a subset of the properties that + * were specified at the time of creating the service. The current set of + * properties can be obtained using `GetServiceDescription` API. Note that + * updating the properties of a running service is different than upgrading + * your application using `StartApplicationUpgrade` API. The upgrade is a long + * running background operation that involves moving the application from one + * version to another, one upgrade domain at a time, whereas update applies the + * new properties immediately to the service. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} serviceId The identity of the service. This ID is typically + * the full name of the service without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * previous versions. + * + * @param {object} serviceUpdateDescription The information necessary to update + * a service. + * + * @param {string} [serviceUpdateDescription.flags] Flags indicating whether + * other properties are set. Each of the associated properties corresponds to a + * flag, specified below, which, if set, indicate that the property is + * specified. + * This property can be a combination of those flags obtained using bitwise + * 'OR' operator. + * For example, if the provided value is 6 then the flags for + * ReplicaRestartWaitDuration (2) and QuorumLossWaitDuration (4) are set. + * + * - None - Does not indicate any other properties are set. The value is zero. + * - TargetReplicaSetSize/InstanceCount - Indicates whether the + * TargetReplicaSetSize property (for Stateful services) or the InstanceCount + * property (for Stateless services) is set. The value is 1. + * - ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration + * property is set. The value is 2. + * - QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is + * set. The value is 4. + * - StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration + * property is set. The value is 8. + * - MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The + * value is 16. + * - PlacementConstraints - Indicates the PlacementConstraints property is set. + * The value is 32. + * - PlacementPolicyList - Indicates the ServicePlacementPolicies property is + * set. The value is 64. + * - Correlation - Indicates the CorrelationScheme property is set. The value + * is 128. + * - Metrics - Indicates the ServiceLoadMetrics property is set. The value is + * 256. + * - DefaultMoveCost - Indicates the DefaultMoveCost property is set. The value + * is 512. + * - ScalingPolicy - Indicates the ScalingPolicies property is set. The value + * is 1024. + * + * @param {string} [serviceUpdateDescription.placementConstraints] The + * placement constraints as a string. Placement constraints are boolean + * expressions on node properties and allow for restricting a service to + * particular nodes based on the service requirements. For example, to place a + * service on nodes where NodeType is blue specify the following: "NodeColor == + * blue)". + * + * @param {array} [serviceUpdateDescription.correlationScheme] The correlation + * scheme. + * + * @param {array} [serviceUpdateDescription.loadMetrics] The service load + * metrics. + * + * @param {array} [serviceUpdateDescription.servicePlacementPolicies] The + * service placement policies. + * + * @param {string} [serviceUpdateDescription.defaultMoveCost] The move cost for + * the service. Possible values include: 'Zero', 'Low', 'Medium', 'High' + * + * @param {array} [serviceUpdateDescription.scalingPolicies] Scaling policies + * for this service. + * + * @param {string} serviceUpdateDescription.serviceKind Polymorphic + * Discriminator * * @param {object} [options] Optional Parameters. * @@ -51512,7 +49256,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ServicePartitionInfo} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -51520,14 +49264,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ServicePartitionInfo} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getPartitionInfo(partitionId, options, optionalCallback) { + updateService(serviceId, serviceUpdateDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -51536,24 +49279,30 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getPartitionInfo(partitionId, options, (err, result, request, response) => { + self._updateService(serviceId, serviceUpdateDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getPartitionInfo(partitionId, options, optionalCallback); + return self._updateService(serviceId, serviceUpdateDescription, options, optionalCallback); } } /** - * @summary Gets the name of the Service Fabric service for a partition. + * @summary Gets the description of an existing Service Fabric service. * - * Gets name of the service for the specified partition. A 404 error is - * returned if the partition ID does not exist in the cluster. + * Gets the description of an existing Service Fabric service. A service must + * be created before its description can be obtained. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} serviceId The identity of the service. This ID is typically + * the full name of the service without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * previous versions. * * @param {object} [options] Optional Parameters. * @@ -51567,15 +49316,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getServiceNameInfoWithHttpOperationResponse(partitionId, options) { + getServiceDescriptionWithHttpOperationResponse(serviceId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getServiceNameInfo(partitionId, options, (err, result, request, response) => { + self._getServiceDescription(serviceId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -51586,12 +49335,18 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the name of the Service Fabric service for a partition. + * @summary Gets the description of an existing Service Fabric service. * - * Gets name of the service for the specified partition. A 404 error is - * returned if the partition ID does not exist in the cluster. + * Gets the description of an existing Service Fabric service. A service must + * be created before its description can be obtained. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} serviceId The identity of the service. This ID is typically + * the full name of the service without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * previous versions. * * @param {object} [options] Optional Parameters. * @@ -51610,7 +49365,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ServiceNameInfo} - The deserialized result object. + * @resolve {ServiceDescription} - The deserialized result object. * * @reject {Error} - The error object. * @@ -51619,13 +49374,13 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ServiceNameInfo} for more information. + * See {@link ServiceDescription} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getServiceNameInfo(partitionId, options, optionalCallback) { + getServiceDescription(serviceId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -51634,28 +49389,35 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getServiceNameInfo(partitionId, options, (err, result, request, response) => { + self._getServiceDescription(serviceId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getServiceNameInfo(partitionId, options, optionalCallback); + return self._getServiceDescription(serviceId, options, optionalCallback); } } /** - * @summary Gets the health of the specified Service Fabric partition. + * @summary Gets the health of the specified Service Fabric service. * + * Gets the health information of the specified service. * Use EventsHealthStateFilter to filter the collection of health events * reported on the service based on the health state. - * Use ReplicasHealthStateFilter to filter the collection of ReplicaHealthState - * objects on the partition. - * If you specify a partition that does not exist in the health store, this + * Use PartitionsHealthStateFilter to filter the collection of partitions + * returned. + * If you specify a service that does not exist in the health store, this * request returns an error. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} serviceId The identity of the service. This ID is typically + * the full name of the service without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * previous versions. * * @param {object} [options] Optional Parameters. * @@ -51682,17 +49444,18 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * @param {number} [options.replicasHealthStateFilter] Allows filtering the - * collection of ReplicaHealthState objects on the partition. The value can be - * obtained from members or bitwise operations on members of HealthStateFilter. - * Only replicas that match the filter will be returned. All replicas will be - * used to evaluate the aggregated health state. If not specified, all entries - * will be returned.The state values are flag-based enumeration, so the value - * could be a combination of these values obtained using bitwise 'OR' operator. - * For example, If the provided value is 6 then all of the events with - * HealthState value of OK (2) and Warning (4) will be returned. The possible - * values for this parameter include integer value of one of the following - * health states. + * @param {number} [options.partitionsHealthStateFilter] Allows filtering of + * the partitions health state objects returned in the result of service health + * query based on their health state. + * The possible values for this parameter include integer value of one of the + * following health states. + * Only partitions that match the filter are returned. All partitions are used + * to evaluate the aggregated health state. + * If not specified, all entries are returned. The state values are flag-based + * enumeration, so the value could be a combination of these value + * obtained using bitwise 'OR' operator. For example, if the provided value is + * 6 then health state of partitions with HealthState value of OK (2) and + * Warning (4) will be returned. * * - Default - Default value. Matches any HealthState. The value is zero. * - None - Filter that doesn't match any HealthState value. Used in order to @@ -51721,15 +49484,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getPartitionHealthWithHttpOperationResponse(partitionId, options) { + getServiceHealthWithHttpOperationResponse(serviceId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getPartitionHealth(partitionId, options, (err, result, request, response) => { + self._getServiceHealth(serviceId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -51740,16 +49503,23 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the health of the specified Service Fabric partition. + * @summary Gets the health of the specified Service Fabric service. * + * Gets the health information of the specified service. * Use EventsHealthStateFilter to filter the collection of health events * reported on the service based on the health state. - * Use ReplicasHealthStateFilter to filter the collection of ReplicaHealthState - * objects on the partition. - * If you specify a partition that does not exist in the health store, this + * Use PartitionsHealthStateFilter to filter the collection of partitions + * returned. + * If you specify a service that does not exist in the health store, this * request returns an error. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} serviceId The identity of the service. This ID is typically + * the full name of the service without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * previous versions. * * @param {object} [options] Optional Parameters. * @@ -51776,17 +49546,18 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * @param {number} [options.replicasHealthStateFilter] Allows filtering the - * collection of ReplicaHealthState objects on the partition. The value can be - * obtained from members or bitwise operations on members of HealthStateFilter. - * Only replicas that match the filter will be returned. All replicas will be - * used to evaluate the aggregated health state. If not specified, all entries - * will be returned.The state values are flag-based enumeration, so the value - * could be a combination of these values obtained using bitwise 'OR' operator. - * For example, If the provided value is 6 then all of the events with - * HealthState value of OK (2) and Warning (4) will be returned. The possible - * values for this parameter include integer value of one of the following - * health states. + * @param {number} [options.partitionsHealthStateFilter] Allows filtering of + * the partitions health state objects returned in the result of service health + * query based on their health state. + * The possible values for this parameter include integer value of one of the + * following health states. + * Only partitions that match the filter are returned. All partitions are used + * to evaluate the aggregated health state. + * If not specified, all entries are returned. The state values are flag-based + * enumeration, so the value could be a combination of these value + * obtained using bitwise 'OR' operator. For example, if the provided value is + * 6 then health state of partitions with HealthState value of OK (2) and + * Warning (4) will be returned. * * - Default - Default value. Matches any HealthState. The value is zero. * - None - Filter that doesn't match any HealthState value. Used in order to @@ -51820,7 +49591,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {PartitionHealth} - The deserialized result object. + * @resolve {ServiceHealth} - The deserialized result object. * * @reject {Error} - The error object. * @@ -51829,13 +49600,13 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PartitionHealth} for more information. + * See {@link ServiceHealth} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getPartitionHealth(partitionId, options, optionalCallback) { + getServiceHealth(serviceId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -51844,36 +49615,41 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getPartitionHealth(partitionId, options, (err, result, request, response) => { + self._getServiceHealth(serviceId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getPartitionHealth(partitionId, options, optionalCallback); + return self._getServiceHealth(serviceId, options, optionalCallback); } } /** - * @summary Gets the health of the specified Service Fabric partition, by using + * @summary Gets the health of the specified Service Fabric service, by using * the specified health policy. * - * Gets the health information of the specified partition. + * Gets the health information of the specified service. * If the application health policy is specified, the health evaluation uses it * to get the aggregated health state. * If the policy is not specified, the health evaluation uses the application * health policy defined in the application manifest, or the default health * policy, if no policy is defined in the manifest. * Use EventsHealthStateFilter to filter the collection of health events - * reported on the partition based on the health state. - * Use ReplicasHealthStateFilter to filter the collection of ReplicaHealthState - * objects on the partition. Use ApplicationHealthPolicy in the POST body to - * override the health policies used to evaluate the health. - * If you specify a partition that does not exist in the health store, this + * reported on the service based on the health state. + * Use PartitionsHealthStateFilter to filter the collection of partitions + * returned. + * If you specify a service that does not exist in the health store, this * request returns an error. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} serviceId The identity of the service. This ID is typically + * the full name of the service without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * previous versions. * * @param {object} [options] Optional Parameters. * @@ -51900,17 +49676,18 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * @param {number} [options.replicasHealthStateFilter] Allows filtering the - * collection of ReplicaHealthState objects on the partition. The value can be - * obtained from members or bitwise operations on members of HealthStateFilter. - * Only replicas that match the filter will be returned. All replicas will be - * used to evaluate the aggregated health state. If not specified, all entries - * will be returned.The state values are flag-based enumeration, so the value - * could be a combination of these values obtained using bitwise 'OR' operator. - * For example, If the provided value is 6 then all of the events with - * HealthState value of OK (2) and Warning (4) will be returned. The possible - * values for this parameter include integer value of one of the following - * health states. + * @param {number} [options.partitionsHealthStateFilter] Allows filtering of + * the partitions health state objects returned in the result of service health + * query based on their health state. + * The possible values for this parameter include integer value of one of the + * following health states. + * Only partitions that match the filter are returned. All partitions are used + * to evaluate the aggregated health state. + * If not specified, all entries are returned. The state values are flag-based + * enumeration, so the value could be a combination of these value + * obtained using bitwise 'OR' operator. For example, if the provided value is + * 6 then health state of partitions with HealthState value of OK (2) and + * Warning (4) will be returned. * * - Default - Default value. Matches any HealthState. The value is zero. * - None - Filter that doesn't match any HealthState value. Used in order to @@ -51979,8 +49756,8 @@ class ServiceFabricClient extends ServiceClient { * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. * * The percentage represents the maximum tolerated percentage of services that * can be unhealthy before the application is considered in error. @@ -52012,15 +49789,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getPartitionHealthUsingPolicyWithHttpOperationResponse(partitionId, options) { + getServiceHealthUsingPolicyWithHttpOperationResponse(serviceId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getPartitionHealthUsingPolicy(partitionId, options, (err, result, request, response) => { + self._getServiceHealthUsingPolicy(serviceId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -52031,24 +49808,29 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the health of the specified Service Fabric partition, by using + * @summary Gets the health of the specified Service Fabric service, by using * the specified health policy. * - * Gets the health information of the specified partition. + * Gets the health information of the specified service. * If the application health policy is specified, the health evaluation uses it * to get the aggregated health state. * If the policy is not specified, the health evaluation uses the application * health policy defined in the application manifest, or the default health * policy, if no policy is defined in the manifest. * Use EventsHealthStateFilter to filter the collection of health events - * reported on the partition based on the health state. - * Use ReplicasHealthStateFilter to filter the collection of ReplicaHealthState - * objects on the partition. Use ApplicationHealthPolicy in the POST body to - * override the health policies used to evaluate the health. - * If you specify a partition that does not exist in the health store, this + * reported on the service based on the health state. + * Use PartitionsHealthStateFilter to filter the collection of partitions + * returned. + * If you specify a service that does not exist in the health store, this * request returns an error. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} serviceId The identity of the service. This ID is typically + * the full name of the service without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * previous versions. * * @param {object} [options] Optional Parameters. * @@ -52067,25 +49849,26 @@ class ServiceFabricClient extends ServiceClient { * - Default - Default value. Matches any HealthState. The value is zero. * - None - Filter that doesn't match any HealthState value. Used in order to * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. - * - * @param {number} [options.replicasHealthStateFilter] Allows filtering the - * collection of ReplicaHealthState objects on the partition. The value can be - * obtained from members or bitwise operations on members of HealthStateFilter. - * Only replicas that match the filter will be returned. All replicas will be - * used to evaluate the aggregated health state. If not specified, all entries - * will be returned.The state values are flag-based enumeration, so the value - * could be a combination of these values obtained using bitwise 'OR' operator. - * For example, If the provided value is 6 then all of the events with - * HealthState value of OK (2) and Warning (4) will be returned. The possible - * values for this parameter include integer value of one of the following - * health states. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * @param {number} [options.partitionsHealthStateFilter] Allows filtering of + * the partitions health state objects returned in the result of service health + * query based on their health state. + * The possible values for this parameter include integer value of one of the + * following health states. + * Only partitions that match the filter are returned. All partitions are used + * to evaluate the aggregated health state. + * If not specified, all entries are returned. The state values are flag-based + * enumeration, so the value could be a combination of these value + * obtained using bitwise 'OR' operator. For example, if the provided value is + * 6 then health state of partitions with HealthState value of OK (2) and + * Warning (4) will be returned. * * - Default - Default value. Matches any HealthState. The value is zero. * - None - Filter that doesn't match any HealthState value. Used in order to @@ -52154,8 +49937,8 @@ class ServiceFabricClient extends ServiceClient { * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. * * The percentage represents the maximum tolerated percentage of services that * can be unhealthy before the application is considered in error. @@ -52192,7 +49975,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {PartitionHealth} - The deserialized result object. + * @resolve {ServiceHealth} - The deserialized result object. * * @reject {Error} - The error object. * @@ -52201,13 +49984,13 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PartitionHealth} for more information. + * See {@link ServiceHealth} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getPartitionHealthUsingPolicy(partitionId, options, optionalCallback) { + getServiceHealthUsingPolicy(serviceId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -52216,34 +49999,40 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getPartitionHealthUsingPolicy(partitionId, options, (err, result, request, response) => { + self._getServiceHealthUsingPolicy(serviceId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getPartitionHealthUsingPolicy(partitionId, options, optionalCallback); + return self._getServiceHealthUsingPolicy(serviceId, options, optionalCallback); } } /** - * @summary Sends a health report on the Service Fabric partition. + * @summary Sends a health report on the Service Fabric service. * - * Reports health state of the specified Service Fabric partition. The report + * Reports health state of the specified Service Fabric service. The report * must contain the information about the source of the health report and * property on which it is reported. - * The report is sent to a Service Fabric gateway Partition, which forwards to + * The report is sent to a Service Fabric gateway Service, which forwards to * the health store. * The report may be accepted by the gateway, but rejected by the health store * after extra validation. * For example, the health store may reject the report because of an invalid * parameter, like a stale sequence number. * To see whether the report was applied in the health store, run - * GetPartitionHealth and check that the report appears in the HealthEvents + * GetServiceHealth and check that the report appears in the HealthEvents * section. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} serviceId The identity of the service. This ID is typically + * the full name of the service without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * previous versions. * * @param {object} healthInformation Describes the health information for the * health report. This information needs to be present in all of the health @@ -52311,7 +50100,7 @@ class ServiceFabricClient extends ServiceClient { * of this property is false by default. * When clients report periodically, they should set RemoveWhenExpired false * (default). - * This way, is the reporter has issues (eg. deadlock) and can't report, the + * This way, if the reporter has issues (e.g. deadlock) and can't report, the * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * @@ -52350,11 +50139,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - reportPartitionHealthWithHttpOperationResponse(partitionId, healthInformation, options) { + reportServiceHealthWithHttpOperationResponse(serviceId, healthInformation, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._reportPartitionHealth(partitionId, healthInformation, options, (err, result, request, response) => { + self._reportServiceHealth(serviceId, healthInformation, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -52365,22 +50154,28 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Sends a health report on the Service Fabric partition. + * @summary Sends a health report on the Service Fabric service. * - * Reports health state of the specified Service Fabric partition. The report + * Reports health state of the specified Service Fabric service. The report * must contain the information about the source of the health report and * property on which it is reported. - * The report is sent to a Service Fabric gateway Partition, which forwards to + * The report is sent to a Service Fabric gateway Service, which forwards to * the health store. * The report may be accepted by the gateway, but rejected by the health store * after extra validation. * For example, the health store may reject the report because of an invalid * parameter, like a stale sequence number. * To see whether the report was applied in the health store, run - * GetPartitionHealth and check that the report appears in the HealthEvents + * GetServiceHealth and check that the report appears in the HealthEvents * section. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} serviceId The identity of the service. This ID is typically + * the full name of the service without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * previous versions. * * @param {object} healthInformation Describes the health information for the * health report. This information needs to be present in all of the health @@ -52448,7 +50243,7 @@ class ServiceFabricClient extends ServiceClient { * of this property is false by default. * When clients report periodically, they should set RemoveWhenExpired false * (default). - * This way, is the reporter has issues (eg. deadlock) and can't report, the + * This way, if the reporter has issues (e.g. deadlock) and can't report, the * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * @@ -52502,7 +50297,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - reportPartitionHealth(partitionId, healthInformation, options, optionalCallback) { + reportServiceHealth(serviceId, healthInformation, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -52511,30 +50306,58 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._reportPartitionHealth(partitionId, healthInformation, options, (err, result, request, response) => { + self._reportServiceHealth(serviceId, healthInformation, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._reportPartitionHealth(partitionId, healthInformation, options, optionalCallback); + return self._reportServiceHealth(serviceId, healthInformation, options, optionalCallback); } } /** - * @summary Gets the load information of the specified Service Fabric - * partition. + * @summary Resolve a Service Fabric partition. * - * Returns information about the load of a specified partition. - * The response includes a list of load reports for a Service Fabric partition. - * Each report includes the load metric name, value, and last reported time in - * UTC. + * Resolve a Service Fabric service partition to get the endpoints of the + * service replicas. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} serviceId The identity of the service. This ID is typically + * the full name of the service without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * previous versions. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.partitionKeyType] Key type for the partition. This + * parameter is required if the partition scheme for the service is Int64Range + * or Named. The possible values are following. + * - None (1) - Indicates that the PartitionKeyValue parameter is not + * specified. This is valid for the partitions with partitioning scheme as + * Singleton. This is the default value. The value is 1. + * - Int64Range (2) - Indicates that the PartitionKeyValue parameter is an + * int64 partition key. This is valid for the partitions with partitioning + * scheme as Int64Range. The value is 2. + * - Named (3) - Indicates that the PartitionKeyValue parameter is a name of + * the partition. This is valid for the partitions with partitioning scheme as + * Named. The value is 3. + * + * @param {string} [options.partitionKeyValue] Partition key. This is required + * if the partition scheme for the service is Int64Range or Named. + * This is not the partition ID, but rather, either the integer key value, or + * the name of the partition ID. + * For example, if your service is using ranged partitions from 0 to 10, then + * they PartitionKeyValue would be an + * integer in that range. Query service description to see the range or name. + * + * @param {string} [options.previousRspVersion] The value in the Version field + * of the response that was received previously. This is required if the user + * knows that the result that was gotten previously is stale. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -52545,15 +50368,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getPartitionLoadInformationWithHttpOperationResponse(partitionId, options) { + resolveServiceWithHttpOperationResponse(serviceId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getPartitionLoadInformation(partitionId, options, (err, result, request, response) => { + self._resolveService(serviceId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -52564,18 +50387,175 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the load information of the specified Service Fabric + * @summary Resolve a Service Fabric partition. + * + * Resolve a Service Fabric service partition to get the endpoints of the + * service replicas. + * + * @param {string} serviceId The identity of the service. This ID is typically + * the full name of the service without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * previous versions. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.partitionKeyType] Key type for the partition. This + * parameter is required if the partition scheme for the service is Int64Range + * or Named. The possible values are following. + * - None (1) - Indicates that the PartitionKeyValue parameter is not + * specified. This is valid for the partitions with partitioning scheme as + * Singleton. This is the default value. The value is 1. + * - Int64Range (2) - Indicates that the PartitionKeyValue parameter is an + * int64 partition key. This is valid for the partitions with partitioning + * scheme as Int64Range. The value is 2. + * - Named (3) - Indicates that the PartitionKeyValue parameter is a name of + * the partition. This is valid for the partitions with partitioning scheme as + * Named. The value is 3. + * + * @param {string} [options.partitionKeyValue] Partition key. This is required + * if the partition scheme for the service is Int64Range or Named. + * This is not the partition ID, but rather, either the integer key value, or + * the name of the partition ID. + * For example, if your service is using ranged partitions from 0 to 10, then + * they PartitionKeyValue would be an + * integer in that range. Query service description to see the range or name. + * + * @param {string} [options.previousRspVersion] The value in the Version field + * of the response that was received previously. This is required if the user + * knows that the result that was gotten previously is stale. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ResolvedServicePartition} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ResolvedServicePartition} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + resolveService(serviceId, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._resolveService(serviceId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._resolveService(serviceId, options, optionalCallback); + } + } + + /** + * @summary Gets the list of partitions of a Service Fabric service. + * + * The response includes the partition ID, partitioning scheme information, + * keys supported by the partition, status, health, and other details about the * partition. * - * Returns information about the load of a specified partition. - * The response includes a list of load reports for a Service Fabric partition. - * Each report includes the load metric name, value, and last reported time in - * UTC. + * @param {string} serviceId The identity of the service. This ID is typically + * the full name of the service without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * previous versions. * - * @param {uuid} partitionId The identity of the partition. + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.continuationToken] The continuation token parameter + * is used to obtain next set of results. A continuation token with a non-empty + * value is included in the response of the API when the results from the + * system do not fit in a single response. When this value is passed to the + * next API call, the API returns next set of results. If there are no further + * results, then the continuation token does not contain a value. The value of + * this parameter should not be URL encoded. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getPartitionInfoListWithHttpOperationResponse(serviceId, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getPartitionInfoList(serviceId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets the list of partitions of a Service Fabric service. + * + * The response includes the partition ID, partitioning scheme information, + * keys supported by the partition, status, health, and other details about the + * partition. + * + * @param {string} serviceId The identity of the service. This ID is typically + * the full name of the service without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * previous versions. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.continuationToken] The continuation token parameter + * is used to obtain next set of results. A continuation token with a non-empty + * value is included in the response of the API when the results from the + * system do not fit in a single response. When this value is passed to the + * next API call, the API returns next set of results. If there are no further + * results, then the continuation token does not contain a value. The value of + * this parameter should not be URL encoded. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -52591,7 +50571,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {PartitionLoadInformation} - The deserialized result object. + * @resolve {PagedServicePartitionInfoList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -52600,14 +50580,14 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PartitionLoadInformation} for more + * See {@link PagedServicePartitionInfoList} for more * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getPartitionLoadInformation(partitionId, options, optionalCallback) { + getPartitionInfoList(serviceId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -52616,22 +50596,23 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getPartitionLoadInformation(partitionId, options, (err, result, request, response) => { + self._getPartitionInfoList(serviceId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getPartitionLoadInformation(partitionId, options, optionalCallback); + return self._getPartitionInfoList(serviceId, options, optionalCallback); } } /** - * @summary Resets the current load of a Service Fabric partition. + * @summary Gets the information about a Service Fabric partition. * - * Resets the current load of a Service Fabric partition to the default load - * for the service. + * Gets the information about the specified partition. The response includes + * the partition ID, partitioning scheme information, keys supported by the + * partition, status, health, and other details about the partition. * * @param {uuid} partitionId The identity of the partition. * @@ -52647,15 +50628,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - resetPartitionLoadWithHttpOperationResponse(partitionId, options) { + getPartitionInfoWithHttpOperationResponse(partitionId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._resetPartitionLoad(partitionId, options, (err, result, request, response) => { + self._getPartitionInfo(partitionId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -52666,10 +50647,11 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Resets the current load of a Service Fabric partition. + * @summary Gets the information about a Service Fabric partition. * - * Resets the current load of a Service Fabric partition to the default load - * for the service. + * Gets the information about the specified partition. The response includes + * the partition ID, partitioning scheme information, keys supported by the + * partition, status, health, and other details about the partition. * * @param {uuid} partitionId The identity of the partition. * @@ -52690,7 +50672,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {ServicePartitionInfo} - The deserialized result object. * * @reject {Error} - The error object. * @@ -52698,13 +50680,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ServicePartitionInfo} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - resetPartitionLoad(partitionId, options, optionalCallback) { + getPartitionInfo(partitionId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -52713,24 +50696,22 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._resetPartitionLoad(partitionId, options, (err, result, request, response) => { + self._getPartitionInfo(partitionId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._resetPartitionLoad(partitionId, options, optionalCallback); + return self._getPartitionInfo(partitionId, options, optionalCallback); } } /** - * @summary Indicates to the Service Fabric cluster that it should attempt to - * recover a specific partition that is currently stuck in quorum loss. + * @summary Gets the name of the Service Fabric service for a partition. * - * This operation should only be performed if it is known that the replicas - * that are down cannot be recovered. Incorrect use of this API can cause - * potential data loss. + * Gets name of the service for the specified partition. A 404 error is + * returned if the partition ID does not exist in the cluster. * * @param {uuid} partitionId The identity of the partition. * @@ -52746,15 +50727,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - recoverPartitionWithHttpOperationResponse(partitionId, options) { + getServiceNameInfoWithHttpOperationResponse(partitionId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._recoverPartition(partitionId, options, (err, result, request, response) => { + self._getServiceNameInfo(partitionId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -52765,12 +50746,10 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Indicates to the Service Fabric cluster that it should attempt to - * recover a specific partition that is currently stuck in quorum loss. + * @summary Gets the name of the Service Fabric service for a partition. * - * This operation should only be performed if it is known that the replicas - * that are down cannot be recovered. Incorrect use of this API can cause - * potential data loss. + * Gets name of the service for the specified partition. A 404 error is + * returned if the partition ID does not exist in the cluster. * * @param {uuid} partitionId The identity of the partition. * @@ -52791,7 +50770,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {ServiceNameInfo} - The deserialized result object. * * @reject {Error} - The error object. * @@ -52799,13 +50778,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ServiceNameInfo} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - recoverPartition(partitionId, options, optionalCallback) { + getServiceNameInfo(partitionId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -52814,37 +50794,83 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._recoverPartition(partitionId, options, (err, result, request, response) => { + self._getServiceNameInfo(partitionId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._recoverPartition(partitionId, options, optionalCallback); + return self._getServiceNameInfo(partitionId, options, optionalCallback); } } /** - * @summary Indicates to the Service Fabric cluster that it should attempt to - * recover the specified service that is currently stuck in quorum loss. + * @summary Gets the health of the specified Service Fabric partition. * - * Indicates to the Service Fabric cluster that it should attempt to recover - * the specified service that is currently stuck in quorum loss. This operation - * should only be performed if it is known that the replicas that are down - * cannot be recovered. Incorrect use of this API can cause potential data - * loss. + * Use EventsHealthStateFilter to filter the collection of health events + * reported on the service based on the health state. + * Use ReplicasHealthStateFilter to filter the collection of ReplicaHealthState + * objects on the partition. + * If you specify a partition that does not exist in the health store, this + * request returns an error. * - * @param {string} serviceId The identity of the service. This ID is typically - * the full name of the service without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the service name is "fabric:/myapp/app1/svc1", the service - * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in - * previous versions. + * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.eventsHealthStateFilter] Allows filtering the + * collection of HealthEvent objects returned based on health state. + * The possible values for this parameter include integer value of one of the + * following health states. + * Only events that match the filter are returned. All events are used to + * evaluate the aggregated health state. + * If not specified, all entries are returned. The state values are flag-based + * enumeration, so the value could be a combination of these values, obtained + * using the bitwise 'OR' operator. For example, If the provided value is 6 + * then all of the events with HealthState value of OK (2) and Warning (4) are + * returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * @param {number} [options.replicasHealthStateFilter] Allows filtering the + * collection of ReplicaHealthState objects on the partition. The value can be + * obtained from members or bitwise operations on members of HealthStateFilter. + * Only replicas that match the filter will be returned. All replicas will be + * used to evaluate the aggregated health state. If not specified, all entries + * will be returned.The state values are flag-based enumeration, so the value + * could be a combination of these values obtained using bitwise 'OR' operator. + * For example, If the provided value is 6 then all of the events with + * HealthState value of OK (2) and Warning (4) will be returned. The possible + * values for this parameter include integer value of one of the following + * health states. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * @param {boolean} [options.excludeHealthStatistics] Indicates whether the + * health statistics should be returned as part of the query result. False by + * default. + * The statistics show the number of children entities in health state Ok, + * Warning, and Error. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -52855,15 +50881,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - recoverServicePartitionsWithHttpOperationResponse(serviceId, options) { + getPartitionHealthWithHttpOperationResponse(partitionId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._recoverServicePartitions(serviceId, options, (err, result, request, response) => { + self._getPartitionHealth(partitionId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -52874,25 +50900,71 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Indicates to the Service Fabric cluster that it should attempt to - * recover the specified service that is currently stuck in quorum loss. + * @summary Gets the health of the specified Service Fabric partition. * - * Indicates to the Service Fabric cluster that it should attempt to recover - * the specified service that is currently stuck in quorum loss. This operation - * should only be performed if it is known that the replicas that are down - * cannot be recovered. Incorrect use of this API can cause potential data - * loss. + * Use EventsHealthStateFilter to filter the collection of health events + * reported on the service based on the health state. + * Use ReplicasHealthStateFilter to filter the collection of ReplicaHealthState + * objects on the partition. + * If you specify a partition that does not exist in the health store, this + * request returns an error. * - * @param {string} serviceId The identity of the service. This ID is typically - * the full name of the service without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the service name is "fabric:/myapp/app1/svc1", the service - * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in - * previous versions. + * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.eventsHealthStateFilter] Allows filtering the + * collection of HealthEvent objects returned based on health state. + * The possible values for this parameter include integer value of one of the + * following health states. + * Only events that match the filter are returned. All events are used to + * evaluate the aggregated health state. + * If not specified, all entries are returned. The state values are flag-based + * enumeration, so the value could be a combination of these values, obtained + * using the bitwise 'OR' operator. For example, If the provided value is 6 + * then all of the events with HealthState value of OK (2) and Warning (4) are + * returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * @param {number} [options.replicasHealthStateFilter] Allows filtering the + * collection of ReplicaHealthState objects on the partition. The value can be + * obtained from members or bitwise operations on members of HealthStateFilter. + * Only replicas that match the filter will be returned. All replicas will be + * used to evaluate the aggregated health state. If not specified, all entries + * will be returned.The state values are flag-based enumeration, so the value + * could be a combination of these values obtained using bitwise 'OR' operator. + * For example, If the provided value is 6 then all of the events with + * HealthState value of OK (2) and Warning (4) will be returned. The possible + * values for this parameter include integer value of one of the following + * health states. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * @param {boolean} [options.excludeHealthStatistics] Indicates whether the + * health statistics should be returned as part of the query result. False by + * default. + * The statistics show the number of children entities in health state Ok, + * Warning, and Error. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -52908,7 +50980,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {PartitionHealth} - The deserialized result object. * * @reject {Error} - The error object. * @@ -52916,13 +50988,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PartitionHealth} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - recoverServicePartitions(serviceId, options, optionalCallback) { + getPartitionHealth(partitionId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -52931,29 +51004,164 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._recoverServicePartitions(serviceId, options, (err, result, request, response) => { + self._getPartitionHealth(partitionId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._recoverServicePartitions(serviceId, options, optionalCallback); + return self._getPartitionHealth(partitionId, options, optionalCallback); } } /** - * @summary Indicates to the Service Fabric cluster that it should attempt to - * recover the system services that are currently stuck in quorum loss. + * @summary Gets the health of the specified Service Fabric partition, by using + * the specified health policy. * - * Indicates to the Service Fabric cluster that it should attempt to recover - * the system services that are currently stuck in quorum loss. This operation - * should only be performed if it is known that the replicas that are down - * cannot be recovered. Incorrect use of this API can cause potential data - * loss. + * Gets the health information of the specified partition. + * If the application health policy is specified, the health evaluation uses it + * to get the aggregated health state. + * If the policy is not specified, the health evaluation uses the application + * health policy defined in the application manifest, or the default health + * policy, if no policy is defined in the manifest. + * Use EventsHealthStateFilter to filter the collection of health events + * reported on the partition based on the health state. + * Use ReplicasHealthStateFilter to filter the collection of ReplicaHealthState + * objects on the partition. Use ApplicationHealthPolicy in the POST body to + * override the health policies used to evaluate the health. + * If you specify a partition that does not exist in the health store, this + * request returns an error. + * + * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.eventsHealthStateFilter] Allows filtering the + * collection of HealthEvent objects returned based on health state. + * The possible values for this parameter include integer value of one of the + * following health states. + * Only events that match the filter are returned. All events are used to + * evaluate the aggregated health state. + * If not specified, all entries are returned. The state values are flag-based + * enumeration, so the value could be a combination of these values, obtained + * using the bitwise 'OR' operator. For example, If the provided value is 6 + * then all of the events with HealthState value of OK (2) and Warning (4) are + * returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * @param {number} [options.replicasHealthStateFilter] Allows filtering the + * collection of ReplicaHealthState objects on the partition. The value can be + * obtained from members or bitwise operations on members of HealthStateFilter. + * Only replicas that match the filter will be returned. All replicas will be + * used to evaluate the aggregated health state. If not specified, all entries + * will be returned.The state values are flag-based enumeration, so the value + * could be a combination of these values obtained using bitwise 'OR' operator. + * For example, If the provided value is 6 then all of the events with + * HealthState value of OK (2) and Warning (4) will be returned. The possible + * values for this parameter include integer value of one of the following + * health states. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * @param {object} [options.applicationHealthPolicy] Describes the health + * policies used to evaluate the health of an application or one of its + * children. + * If not present, the health evaluation uses the health policy from + * application manifest or the default health policy. + * + * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. + * + * @param {number} + * [options.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] + * The maximum allowed percentage of unhealthy deployed applications. Allowed + * values are Byte values from zero to 100. + * The percentage represents the maximum tolerated percentage of deployed + * applications that can be unhealthy before the application is considered in + * error. + * This is calculated by dividing the number of unhealthy deployed applications + * over the number of nodes where the application is currently deployed on in + * the cluster. + * The computation rounds up to tolerate one failure on small numbers of nodes. + * Default percentage is zero. + * + * @param {object} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health + * policy used by default to evaluate the health of a service type. + * + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] + * The maximum allowed percentage of unhealthy partitions per service. Allowed + * values are Byte values from zero to 100 + * + * The percentage represents the maximum tolerated percentage of partitions + * that can be unhealthy before the service is considered in error. + * If the percentage is respected but there is at least one unhealthy + * partition, the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy partitions + * over the total number of partitions in the service. + * The computation rounds up to tolerate one failure on small numbers of + * partitions. Default percentage is zero. + * + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] + * The maximum allowed percentage of unhealthy replicas per partition. Allowed + * values are Byte values from zero to 100. + * + * The percentage represents the maximum tolerated percentage of replicas that + * can be unhealthy before the partition is considered in error. + * If the percentage is respected but there is at least one unhealthy replica, + * the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy replicas + * over the total number of replicas in the partition. + * The computation rounds up to tolerate one failure on small numbers of + * replicas. Default percentage is zero. + * + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. + * + * The percentage represents the maximum tolerated percentage of services that + * can be unhealthy before the application is considered in error. + * If the percentage is respected but there is at least one unhealthy service, + * the health is evaluated as Warning. + * This is calculated by dividing the number of unhealthy services of the + * specific service type over the total number of services of the specific + * service type. + * The computation rounds up to tolerate one failure on small numbers of + * services. Default percentage is zero. + * + * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. + * + * @param {boolean} [options.excludeHealthStatistics] Indicates whether the + * health statistics should be returned as part of the query result. False by + * default. + * The statistics show the number of children entities in health state Ok, + * Warning, and Error. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -52964,15 +51172,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - recoverSystemPartitionsWithHttpOperationResponse(options) { + getPartitionHealthUsingPolicyWithHttpOperationResponse(partitionId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._recoverSystemPartitions(options, (err, result, request, response) => { + self._getPartitionHealthUsingPolicy(partitionId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -52983,17 +51191,152 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Indicates to the Service Fabric cluster that it should attempt to - * recover the system services that are currently stuck in quorum loss. + * @summary Gets the health of the specified Service Fabric partition, by using + * the specified health policy. * - * Indicates to the Service Fabric cluster that it should attempt to recover - * the system services that are currently stuck in quorum loss. This operation - * should only be performed if it is known that the replicas that are down - * cannot be recovered. Incorrect use of this API can cause potential data - * loss. + * Gets the health information of the specified partition. + * If the application health policy is specified, the health evaluation uses it + * to get the aggregated health state. + * If the policy is not specified, the health evaluation uses the application + * health policy defined in the application manifest, or the default health + * policy, if no policy is defined in the manifest. + * Use EventsHealthStateFilter to filter the collection of health events + * reported on the partition based on the health state. + * Use ReplicasHealthStateFilter to filter the collection of ReplicaHealthState + * objects on the partition. Use ApplicationHealthPolicy in the POST body to + * override the health policies used to evaluate the health. + * If you specify a partition that does not exist in the health store, this + * request returns an error. + * + * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.eventsHealthStateFilter] Allows filtering the + * collection of HealthEvent objects returned based on health state. + * The possible values for this parameter include integer value of one of the + * following health states. + * Only events that match the filter are returned. All events are used to + * evaluate the aggregated health state. + * If not specified, all entries are returned. The state values are flag-based + * enumeration, so the value could be a combination of these values, obtained + * using the bitwise 'OR' operator. For example, If the provided value is 6 + * then all of the events with HealthState value of OK (2) and Warning (4) are + * returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * @param {number} [options.replicasHealthStateFilter] Allows filtering the + * collection of ReplicaHealthState objects on the partition. The value can be + * obtained from members or bitwise operations on members of HealthStateFilter. + * Only replicas that match the filter will be returned. All replicas will be + * used to evaluate the aggregated health state. If not specified, all entries + * will be returned.The state values are flag-based enumeration, so the value + * could be a combination of these values obtained using bitwise 'OR' operator. + * For example, If the provided value is 6 then all of the events with + * HealthState value of OK (2) and Warning (4) will be returned. The possible + * values for this parameter include integer value of one of the following + * health states. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * @param {object} [options.applicationHealthPolicy] Describes the health + * policies used to evaluate the health of an application or one of its + * children. + * If not present, the health evaluation uses the health policy from + * application manifest or the default health policy. + * + * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. + * + * @param {number} + * [options.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] + * The maximum allowed percentage of unhealthy deployed applications. Allowed + * values are Byte values from zero to 100. + * The percentage represents the maximum tolerated percentage of deployed + * applications that can be unhealthy before the application is considered in + * error. + * This is calculated by dividing the number of unhealthy deployed applications + * over the number of nodes where the application is currently deployed on in + * the cluster. + * The computation rounds up to tolerate one failure on small numbers of nodes. + * Default percentage is zero. + * + * @param {object} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health + * policy used by default to evaluate the health of a service type. + * + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] + * The maximum allowed percentage of unhealthy partitions per service. Allowed + * values are Byte values from zero to 100 + * + * The percentage represents the maximum tolerated percentage of partitions + * that can be unhealthy before the service is considered in error. + * If the percentage is respected but there is at least one unhealthy + * partition, the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy partitions + * over the total number of partitions in the service. + * The computation rounds up to tolerate one failure on small numbers of + * partitions. Default percentage is zero. + * + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] + * The maximum allowed percentage of unhealthy replicas per partition. Allowed + * values are Byte values from zero to 100. + * + * The percentage represents the maximum tolerated percentage of replicas that + * can be unhealthy before the partition is considered in error. + * If the percentage is respected but there is at least one unhealthy replica, + * the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy replicas + * over the total number of replicas in the partition. + * The computation rounds up to tolerate one failure on small numbers of + * replicas. Default percentage is zero. + * + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. + * + * The percentage represents the maximum tolerated percentage of services that + * can be unhealthy before the application is considered in error. + * If the percentage is respected but there is at least one unhealthy service, + * the health is evaluated as Warning. + * This is calculated by dividing the number of unhealthy services of the + * specific service type over the total number of services of the specific + * service type. + * The computation rounds up to tolerate one failure on small numbers of + * services. Default percentage is zero. + * + * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. + * + * @param {boolean} [options.excludeHealthStatistics] Indicates whether the + * health statistics should be returned as part of the query result. False by + * default. + * The statistics show the number of children entities in health state Ok, + * Warning, and Error. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -53009,7 +51352,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {PartitionHealth} - The deserialized result object. * * @reject {Error} - The error object. * @@ -53017,13 +51360,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PartitionHealth} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - recoverSystemPartitions(options, optionalCallback) { + getPartitionHealthUsingPolicy(partitionId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -53032,28 +51376,126 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._recoverSystemPartitions(options, (err, result, request, response) => { + self._getPartitionHealthUsingPolicy(partitionId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._recoverSystemPartitions(options, optionalCallback); + return self._getPartitionHealthUsingPolicy(partitionId, options, optionalCallback); } } /** - * @summary Indicates to the Service Fabric cluster that it should attempt to - * recover any services (including system services) which are currently stuck - * in quorum loss. + * @summary Sends a health report on the Service Fabric partition. * - * This operation should only be performed if it is known that the replicas - * that are down cannot be recovered. Incorrect use of this API can cause - * potential data loss. + * Reports health state of the specified Service Fabric partition. The report + * must contain the information about the source of the health report and + * property on which it is reported. + * The report is sent to a Service Fabric gateway Partition, which forwards to + * the health store. + * The report may be accepted by the gateway, but rejected by the health store + * after extra validation. + * For example, the health store may reject the report because of an invalid + * parameter, like a stale sequence number. + * To see whether the report was applied in the health store, run + * GetPartitionHealth and check that the report appears in the HealthEvents + * section. + * + * @param {uuid} partitionId The identity of the partition. + * + * @param {object} healthInformation Describes the health information for the + * health report. This information needs to be present in all of the health + * reports sent to the health manager. + * + * @param {string} healthInformation.sourceId The source name that identifies + * the client/watchdog/system component that generated the health information. + * + * @param {string} healthInformation.property The property of the health + * information. An entity can have health reports for different properties. + * The property is a string and not a fixed enumeration to allow the reporter + * flexibility to categorize the state condition that triggers the report. + * For example, a reporter with SourceId "LocalWatchdog" can monitor the state + * of the available disk on a node, + * so it can report "AvailableDisk" property on that node. + * The same reporter can monitor the node connectivity, so it can report a + * property "Connectivity" on the same node. + * In the health store, these reports are treated as separate health events for + * the specified node. + * + * Together with the SourceId, the property uniquely identifies the health + * information. + * + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' + * + * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The + * duration for which this health report is valid. This field uses ISO8601 + * format for specifying the duration. + * When clients report periodically, they should send reports with higher + * frequency than time to live. + * If clients report on transition, they can set the time to live to infinite. + * When time to live expires, the health event that contains the health + * information + * is either removed from health store, if RemoveWhenExpired is true, or + * evaluated at error, if RemoveWhenExpired false. + * + * If not specified, time to live defaults to infinite value. + * + * @param {string} [healthInformation.description] The description of the + * health information. It represents free text used to add human readable + * information about the report. + * The maximum string length for the description is 4096 characters. + * If the provided string is longer, it will be automatically truncated. + * When truncated, the last characters of the description contain a marker + * "[Truncated]", and total string size is 4096 characters. + * The presence of the marker indicates to users that truncation occurred. + * Note that when truncated, the description has less than 4096 characters from + * the original string. + * + * @param {string} [healthInformation.sequenceNumber] The sequence number for + * this health report as a numeric string. + * The report sequence number is used by the health store to detect stale + * reports. + * If not specified, a sequence number is auto-generated by the health client + * when a report is added. + * + * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates + * whether the report is removed from health store when it expires. + * If set to true, the report is removed from the health store after it + * expires. + * If set to false, the report is treated as an error when expired. The value + * of this property is false by default. + * When clients report periodically, they should set RemoveWhenExpired false + * (default). + * This way, if the reporter has issues (e.g. deadlock) and can't report, the + * entity is evaluated at error when the health report expires. + * This flags the entity as being in Error health state. * * @param {object} [options] Optional Parameters. * + * @param {boolean} [options.immediate] A flag that indicates whether the + * report should be sent immediately. + * A health report is sent to a Service Fabric gateway Application, which + * forwards to the health store. + * If Immediate is set to true, the report is sent immediately from HTTP + * Gateway to the health store, regardless of the fabric client settings that + * the HTTP Gateway Application is using. + * This is useful for critical reports that should be sent as soon as possible. + * Depending on timing and other conditions, sending the report may still fail, + * for example if the HTTP Gateway is closed or the message doesn't reach the + * Gateway. + * If Immediate is set to false, the report is sent based on the health client + * settings from the HTTP Gateway. Therefore, it will be batched according to + * the HealthReportSendInterval configuration. + * This is the recommended setting because it allows the health client to + * optimize health reporting messages to health store as well as health report + * processing. + * By default, reports are not sent immediately. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -53068,11 +51510,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - recoverAllPartitionsWithHttpOperationResponse(options) { + reportPartitionHealthWithHttpOperationResponse(partitionId, healthInformation, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._recoverAllPartitions(options, (err, result, request, response) => { + self._reportPartitionHealth(partitionId, healthInformation, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -53083,16 +51525,114 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Indicates to the Service Fabric cluster that it should attempt to - * recover any services (including system services) which are currently stuck - * in quorum loss. + * @summary Sends a health report on the Service Fabric partition. * - * This operation should only be performed if it is known that the replicas - * that are down cannot be recovered. Incorrect use of this API can cause - * potential data loss. + * Reports health state of the specified Service Fabric partition. The report + * must contain the information about the source of the health report and + * property on which it is reported. + * The report is sent to a Service Fabric gateway Partition, which forwards to + * the health store. + * The report may be accepted by the gateway, but rejected by the health store + * after extra validation. + * For example, the health store may reject the report because of an invalid + * parameter, like a stale sequence number. + * To see whether the report was applied in the health store, run + * GetPartitionHealth and check that the report appears in the HealthEvents + * section. + * + * @param {uuid} partitionId The identity of the partition. + * + * @param {object} healthInformation Describes the health information for the + * health report. This information needs to be present in all of the health + * reports sent to the health manager. + * + * @param {string} healthInformation.sourceId The source name that identifies + * the client/watchdog/system component that generated the health information. + * + * @param {string} healthInformation.property The property of the health + * information. An entity can have health reports for different properties. + * The property is a string and not a fixed enumeration to allow the reporter + * flexibility to categorize the state condition that triggers the report. + * For example, a reporter with SourceId "LocalWatchdog" can monitor the state + * of the available disk on a node, + * so it can report "AvailableDisk" property on that node. + * The same reporter can monitor the node connectivity, so it can report a + * property "Connectivity" on the same node. + * In the health store, these reports are treated as separate health events for + * the specified node. + * + * Together with the SourceId, the property uniquely identifies the health + * information. + * + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' + * + * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The + * duration for which this health report is valid. This field uses ISO8601 + * format for specifying the duration. + * When clients report periodically, they should send reports with higher + * frequency than time to live. + * If clients report on transition, they can set the time to live to infinite. + * When time to live expires, the health event that contains the health + * information + * is either removed from health store, if RemoveWhenExpired is true, or + * evaluated at error, if RemoveWhenExpired false. + * + * If not specified, time to live defaults to infinite value. + * + * @param {string} [healthInformation.description] The description of the + * health information. It represents free text used to add human readable + * information about the report. + * The maximum string length for the description is 4096 characters. + * If the provided string is longer, it will be automatically truncated. + * When truncated, the last characters of the description contain a marker + * "[Truncated]", and total string size is 4096 characters. + * The presence of the marker indicates to users that truncation occurred. + * Note that when truncated, the description has less than 4096 characters from + * the original string. + * + * @param {string} [healthInformation.sequenceNumber] The sequence number for + * this health report as a numeric string. + * The report sequence number is used by the health store to detect stale + * reports. + * If not specified, a sequence number is auto-generated by the health client + * when a report is added. + * + * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates + * whether the report is removed from health store when it expires. + * If set to true, the report is removed from the health store after it + * expires. + * If set to false, the report is treated as an error when expired. The value + * of this property is false by default. + * When clients report periodically, they should set RemoveWhenExpired false + * (default). + * This way, if the reporter has issues (e.g. deadlock) and can't report, the + * entity is evaluated at error when the health report expires. + * This flags the entity as being in Error health state. * * @param {object} [options] Optional Parameters. * + * @param {boolean} [options.immediate] A flag that indicates whether the + * report should be sent immediately. + * A health report is sent to a Service Fabric gateway Application, which + * forwards to the health store. + * If Immediate is set to true, the report is sent immediately from HTTP + * Gateway to the health store, regardless of the fabric client settings that + * the HTTP Gateway Application is using. + * This is useful for critical reports that should be sent as soon as possible. + * Depending on timing and other conditions, sending the report may still fail, + * for example if the HTTP Gateway is closed or the message doesn't reach the + * Gateway. + * If Immediate is set to false, the report is sent based on the health client + * settings from the HTTP Gateway. Therefore, it will be batched according to + * the HealthReportSendInterval configuration. + * This is the recommended setting because it allows the health client to + * optimize health reporting messages to health store as well as health report + * processing. + * By default, reports are not sent immediately. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -53122,7 +51662,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - recoverAllPartitions(options, optionalCallback) { + reportPartitionHealth(partitionId, healthInformation, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -53131,176 +51671,49 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._recoverAllPartitions(options, (err, result, request, response) => { + self._reportPartitionHealth(partitionId, healthInformation, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._recoverAllPartitions(options, optionalCallback); + return self._reportPartitionHealth(partitionId, healthInformation, options, optionalCallback); } } /** - * @summary Creates a new repair task. - * - * For clusters that have the Repair Manager Service configured, - * this API provides a way to create repair tasks that run automatically or - * manually. - * For repair tasks that run automatically, an appropriate repair executor - * must be running for each repair action to run automatically. - * These are currently only available in specially-configured Azure Cloud - * Services. - * - * To create a manual repair task, provide the set of impacted node names and - * the - * expected impact. When the state of the created repair task changes to - * approved, - * you can safely perform repair actions on those nodes. - * - * This API supports the Service Fabric platform; it is not meant to be used - * directly from your code. - * - * @param {object} repairTask Describes the repair task to be created or - * updated. - * - * @param {string} repairTask.taskId The ID of the repair task. - * - * @param {string} [repairTask.version] The version of the repair task. - * When creating a new repair task, the version must be set to zero. When - * updating a repair task, - * the version is used for optimistic concurrency checks. If the version is - * set to zero, the update will not check for write conflicts. If the version - * is set to a non-zero value, then the - * update will only succeed if the actual current version of the repair task - * matches this value. - * - * @param {string} [repairTask.description] A description of the purpose of the - * repair task, or other informational details. - * May be set when the repair task is created, and is immutable once set. - * - * @param {string} repairTask.state The workflow state of the repair task. - * Valid initial states are Created, Claimed, and Preparing. Possible values - * include: 'Invalid', 'Created', 'Claimed', 'Preparing', 'Approved', - * 'Executing', 'Restoring', 'Completed' - * - * @param {number} [repairTask.flags] A bitwise-OR of the following values, - * which gives additional details about the status of the repair task. - * - 1 - Cancellation of the repair has been requested - * - 2 - Abort of the repair has been requested - * - 4 - Approval of the repair was forced via client request - * - * @param {string} repairTask.action The requested repair action. Must be - * specified when the repair task is created, and is immutable once set. - * - * @param {object} [repairTask.target] The target object determines what - * actions the system will take to prepare for the impact of the repair, prior - * to approving execution of the repair. - * May be set when the repair task is created, and is immutable once set. - * - * @param {string} repairTask.target.kind Polymorphic Discriminator - * - * @param {string} [repairTask.executor] The name of the repair executor. Must - * be specified in Claimed and later states, and is immutable once set. - * - * @param {string} [repairTask.executorData] A data string that the repair - * executor can use to store its internal state. - * - * @param {object} [repairTask.impact] The impact object determines what - * actions the system will take to prepare for the impact of the repair, prior - * to approving execution of the repair. - * Impact must be specified by the repair executor when transitioning to the - * Preparing state, and is immutable once set. - * - * @param {string} repairTask.impact.kind Polymorphic Discriminator - * - * @param {string} [repairTask.resultStatus] A value describing the overall - * result of the repair task execution. Must be specified in the Restoring and - * later states, and is immutable once set. Possible values include: 'Invalid', - * 'Succeeded', 'Cancelled', 'Interrupted', 'Failed', 'Pending' - * - * @param {number} [repairTask.resultCode] A numeric value providing additional - * details about the result of the repair task execution. - * May be specified in the Restoring and later states, and is immutable once - * set. - * - * @param {string} [repairTask.resultDetails] A string providing additional - * details about the result of the repair task execution. - * May be specified in the Restoring and later states, and is immutable once - * set. - * - * @param {object} [repairTask.history] An object that contains timestamps of - * the repair task's state transitions. - * These timestamps are updated by the system, and cannot be directly modified. - * - * @param {date} [repairTask.history.createdUtcTimestamp] The time when the - * repair task entered the Created state. - * - * @param {date} [repairTask.history.claimedUtcTimestamp] The time when the - * repair task entered the Claimed state. - * - * @param {date} [repairTask.history.preparingUtcTimestamp] The time when the - * repair task entered the Preparing state. - * - * @param {date} [repairTask.history.approvedUtcTimestamp] The time when the - * repair task entered the Approved state - * - * @param {date} [repairTask.history.executingUtcTimestamp] The time when the - * repair task entered the Executing state - * - * @param {date} [repairTask.history.restoringUtcTimestamp] The time when the - * repair task entered the Restoring state - * - * @param {date} [repairTask.history.completedUtcTimestamp] The time when the - * repair task entered the Completed state - * - * @param {date} [repairTask.history.preparingHealthCheckStartUtcTimestamp] The - * time when the repair task started the health check in the Preparing state. - * - * @param {date} [repairTask.history.preparingHealthCheckEndUtcTimestamp] The - * time when the repair task completed the health check in the Preparing state. - * - * @param {date} [repairTask.history.restoringHealthCheckStartUtcTimestamp] The - * time when the repair task started the health check in the Restoring state. - * - * @param {date} [repairTask.history.restoringHealthCheckEndUtcTimestamp] The - * time when the repair task completed the health check in the Restoring state. - * - * @param {string} [repairTask.preparingHealthCheckState] The workflow state of - * the health check when the repair task is in the Preparing state. Possible - * values include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', - * 'TimedOut' - * - * @param {string} [repairTask.restoringHealthCheckState] The workflow state of - * the health check when the repair task is in the Restoring state. Possible - * values include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', - * 'TimedOut' + * @summary Gets the load information of the specified Service Fabric + * partition. * - * @param {boolean} [repairTask.performPreparingHealthCheck] A value to - * determine if health checks will be performed when the repair task enters the - * Preparing state. + * Returns information about the load of a specified partition. + * The response includes a list of load reports for a Service Fabric partition. + * Each report includes the load metric name, value, and last reported time in + * UTC. * - * @param {boolean} [repairTask.performRestoringHealthCheck] A value to - * determine if health checks will be performed when the repair task enters the - * Restoring state. + * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - createRepairTaskWithHttpOperationResponse(repairTask, options) { + getPartitionLoadInformationWithHttpOperationResponse(partitionId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._createRepairTask(repairTask, options, (err, result, request, response) => { + self._getPartitionLoadInformation(partitionId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -53311,150 +51724,23 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Creates a new repair task. - * - * For clusters that have the Repair Manager Service configured, - * this API provides a way to create repair tasks that run automatically or - * manually. - * For repair tasks that run automatically, an appropriate repair executor - * must be running for each repair action to run automatically. - * These are currently only available in specially-configured Azure Cloud - * Services. - * - * To create a manual repair task, provide the set of impacted node names and - * the - * expected impact. When the state of the created repair task changes to - * approved, - * you can safely perform repair actions on those nodes. - * - * This API supports the Service Fabric platform; it is not meant to be used - * directly from your code. - * - * @param {object} repairTask Describes the repair task to be created or - * updated. - * - * @param {string} repairTask.taskId The ID of the repair task. - * - * @param {string} [repairTask.version] The version of the repair task. - * When creating a new repair task, the version must be set to zero. When - * updating a repair task, - * the version is used for optimistic concurrency checks. If the version is - * set to zero, the update will not check for write conflicts. If the version - * is set to a non-zero value, then the - * update will only succeed if the actual current version of the repair task - * matches this value. - * - * @param {string} [repairTask.description] A description of the purpose of the - * repair task, or other informational details. - * May be set when the repair task is created, and is immutable once set. - * - * @param {string} repairTask.state The workflow state of the repair task. - * Valid initial states are Created, Claimed, and Preparing. Possible values - * include: 'Invalid', 'Created', 'Claimed', 'Preparing', 'Approved', - * 'Executing', 'Restoring', 'Completed' - * - * @param {number} [repairTask.flags] A bitwise-OR of the following values, - * which gives additional details about the status of the repair task. - * - 1 - Cancellation of the repair has been requested - * - 2 - Abort of the repair has been requested - * - 4 - Approval of the repair was forced via client request - * - * @param {string} repairTask.action The requested repair action. Must be - * specified when the repair task is created, and is immutable once set. - * - * @param {object} [repairTask.target] The target object determines what - * actions the system will take to prepare for the impact of the repair, prior - * to approving execution of the repair. - * May be set when the repair task is created, and is immutable once set. - * - * @param {string} repairTask.target.kind Polymorphic Discriminator - * - * @param {string} [repairTask.executor] The name of the repair executor. Must - * be specified in Claimed and later states, and is immutable once set. - * - * @param {string} [repairTask.executorData] A data string that the repair - * executor can use to store its internal state. - * - * @param {object} [repairTask.impact] The impact object determines what - * actions the system will take to prepare for the impact of the repair, prior - * to approving execution of the repair. - * Impact must be specified by the repair executor when transitioning to the - * Preparing state, and is immutable once set. - * - * @param {string} repairTask.impact.kind Polymorphic Discriminator - * - * @param {string} [repairTask.resultStatus] A value describing the overall - * result of the repair task execution. Must be specified in the Restoring and - * later states, and is immutable once set. Possible values include: 'Invalid', - * 'Succeeded', 'Cancelled', 'Interrupted', 'Failed', 'Pending' - * - * @param {number} [repairTask.resultCode] A numeric value providing additional - * details about the result of the repair task execution. - * May be specified in the Restoring and later states, and is immutable once - * set. - * - * @param {string} [repairTask.resultDetails] A string providing additional - * details about the result of the repair task execution. - * May be specified in the Restoring and later states, and is immutable once - * set. - * - * @param {object} [repairTask.history] An object that contains timestamps of - * the repair task's state transitions. - * These timestamps are updated by the system, and cannot be directly modified. - * - * @param {date} [repairTask.history.createdUtcTimestamp] The time when the - * repair task entered the Created state. - * - * @param {date} [repairTask.history.claimedUtcTimestamp] The time when the - * repair task entered the Claimed state. - * - * @param {date} [repairTask.history.preparingUtcTimestamp] The time when the - * repair task entered the Preparing state. - * - * @param {date} [repairTask.history.approvedUtcTimestamp] The time when the - * repair task entered the Approved state - * - * @param {date} [repairTask.history.executingUtcTimestamp] The time when the - * repair task entered the Executing state - * - * @param {date} [repairTask.history.restoringUtcTimestamp] The time when the - * repair task entered the Restoring state - * - * @param {date} [repairTask.history.completedUtcTimestamp] The time when the - * repair task entered the Completed state - * - * @param {date} [repairTask.history.preparingHealthCheckStartUtcTimestamp] The - * time when the repair task started the health check in the Preparing state. - * - * @param {date} [repairTask.history.preparingHealthCheckEndUtcTimestamp] The - * time when the repair task completed the health check in the Preparing state. - * - * @param {date} [repairTask.history.restoringHealthCheckStartUtcTimestamp] The - * time when the repair task started the health check in the Restoring state. - * - * @param {date} [repairTask.history.restoringHealthCheckEndUtcTimestamp] The - * time when the repair task completed the health check in the Restoring state. - * - * @param {string} [repairTask.preparingHealthCheckState] The workflow state of - * the health check when the repair task is in the Preparing state. Possible - * values include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', - * 'TimedOut' - * - * @param {string} [repairTask.restoringHealthCheckState] The workflow state of - * the health check when the repair task is in the Restoring state. Possible - * values include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', - * 'TimedOut' + * @summary Gets the load information of the specified Service Fabric + * partition. * - * @param {boolean} [repairTask.performPreparingHealthCheck] A value to - * determine if health checks will be performed when the repair task enters the - * Preparing state. + * Returns information about the load of a specified partition. + * The response includes a list of load reports for a Service Fabric partition. + * Each report includes the load metric name, value, and last reported time in + * UTC. * - * @param {boolean} [repairTask.performRestoringHealthCheck] A value to - * determine if health checks will be performed when the repair task enters the - * Restoring state. + * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -53465,7 +51751,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {RepairTaskUpdateInfo} - The deserialized result object. + * @resolve {PartitionLoadInformation} - The deserialized result object. * * @reject {Error} - The error object. * @@ -53474,13 +51760,14 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link RepairTaskUpdateInfo} for more information. + * See {@link PartitionLoadInformation} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createRepairTask(repairTask, options, optionalCallback) { + getPartitionLoadInformation(partitionId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -53489,55 +51776,46 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createRepairTask(repairTask, options, (err, result, request, response) => { + self._getPartitionLoadInformation(partitionId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createRepairTask(repairTask, options, optionalCallback); + return self._getPartitionLoadInformation(partitionId, options, optionalCallback); } } /** - * @summary Requests the cancellation of the given repair task. - * - * This API supports the Service Fabric platform; it is not meant to be used - * directly from your code. - * - * @param {object} repairTaskCancelDescription Describes the repair task to be - * cancelled. - * - * @param {string} repairTaskCancelDescription.taskId The ID of the repair - * task. + * @summary Resets the current load of a Service Fabric partition. * - * @param {string} [repairTaskCancelDescription.version] The current version - * number of the repair task. If non-zero, then the request will only succeed - * if this value matches the actual current version of the repair task. If - * zero, then no version check is performed. + * Resets the current load of a Service Fabric partition to the default load + * for the service. * - * @param {boolean} [repairTaskCancelDescription.requestAbort] _True_ if the - * repair should be stopped as soon as possible even if it has already started - * executing. _False_ if the repair should be cancelled only if execution has - * not yet started. + * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - cancelRepairTaskWithHttpOperationResponse(repairTaskCancelDescription, options) { + resetPartitionLoadWithHttpOperationResponse(partitionId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._cancelRepairTask(repairTaskCancelDescription, options, (err, result, request, response) => { + self._resetPartitionLoad(partitionId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -53548,29 +51826,20 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Requests the cancellation of the given repair task. - * - * This API supports the Service Fabric platform; it is not meant to be used - * directly from your code. - * - * @param {object} repairTaskCancelDescription Describes the repair task to be - * cancelled. - * - * @param {string} repairTaskCancelDescription.taskId The ID of the repair - * task. + * @summary Resets the current load of a Service Fabric partition. * - * @param {string} [repairTaskCancelDescription.version] The current version - * number of the repair task. If non-zero, then the request will only succeed - * if this value matches the actual current version of the repair task. If - * zero, then no version check is performed. + * Resets the current load of a Service Fabric partition to the default load + * for the service. * - * @param {boolean} [repairTaskCancelDescription.requestAbort] _True_ if the - * repair should be stopped as soon as possible even if it has already started - * executing. _False_ if the repair should be cancelled only if execution has - * not yet started. + * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -53581,7 +51850,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {RepairTaskUpdateInfo} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -53589,14 +51858,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link RepairTaskUpdateInfo} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - cancelRepairTask(repairTaskCancelDescription, options, optionalCallback) { + resetPartitionLoad(partitionId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -53605,36 +51873,34 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._cancelRepairTask(repairTaskCancelDescription, options, (err, result, request, response) => { + self._resetPartitionLoad(partitionId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._cancelRepairTask(repairTaskCancelDescription, options, optionalCallback); + return self._resetPartitionLoad(partitionId, options, optionalCallback); } } /** - * @summary Deletes a completed repair task. - * - * This API supports the Service Fabric platform; it is not meant to be used - * directly from your code. - * - * @param {object} repairTaskDeleteDescription Describes the repair task to be - * deleted. + * @summary Indicates to the Service Fabric cluster that it should attempt to + * recover a specific partition that is currently stuck in quorum loss. * - * @param {string} repairTaskDeleteDescription.taskId The ID of the completed - * repair task to be deleted. + * This operation should only be performed if it is known that the replicas + * that are down cannot be recovered. Incorrect use of this API can cause + * potential data loss. * - * @param {string} [repairTaskDeleteDescription.version] The current version - * number of the repair task. If non-zero, then the request will only succeed - * if this value matches the actual current version of the repair task. If - * zero, then no version check is performed. + * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -53644,11 +51910,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - deleteRepairTaskWithHttpOperationResponse(repairTaskDeleteDescription, options) { + recoverPartitionWithHttpOperationResponse(partitionId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._deleteRepairTask(repairTaskDeleteDescription, options, (err, result, request, response) => { + self._recoverPartition(partitionId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -53659,24 +51925,22 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Deletes a completed repair task. - * - * This API supports the Service Fabric platform; it is not meant to be used - * directly from your code. - * - * @param {object} repairTaskDeleteDescription Describes the repair task to be - * deleted. + * @summary Indicates to the Service Fabric cluster that it should attempt to + * recover a specific partition that is currently stuck in quorum loss. * - * @param {string} repairTaskDeleteDescription.taskId The ID of the completed - * repair task to be deleted. + * This operation should only be performed if it is known that the replicas + * that are down cannot be recovered. Incorrect use of this API can cause + * potential data loss. * - * @param {string} [repairTaskDeleteDescription.version] The current version - * number of the repair task. If non-zero, then the request will only succeed - * if this value matches the actual current version of the repair task. If - * zero, then no version check is performed. + * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -53701,7 +51965,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteRepairTask(repairTaskDeleteDescription, options, optionalCallback) { + recoverPartition(partitionId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -53710,56 +51974,56 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteRepairTask(repairTaskDeleteDescription, options, (err, result, request, response) => { + self._recoverPartition(partitionId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteRepairTask(repairTaskDeleteDescription, options, optionalCallback); + return self._recoverPartition(partitionId, options, optionalCallback); } } /** - * @summary Gets a list of repair tasks matching the given filters. - * - * This API supports the Service Fabric platform; it is not meant to be used - * directly from your code. - * - * @param {object} [options] Optional Parameters. + * @summary Indicates to the Service Fabric cluster that it should attempt to + * recover the specified service that is currently stuck in quorum loss. * - * @param {string} [options.taskIdFilter] The repair task ID prefix to be - * matched. + * Indicates to the Service Fabric cluster that it should attempt to recover + * the specified service that is currently stuck in quorum loss. This operation + * should only be performed if it is known that the replicas that are down + * cannot be recovered. Incorrect use of this API can cause potential data + * loss. * - * @param {number} [options.stateFilter] A bitwise-OR of the following values, - * specifying which task states should be included in the result list. + * @param {string} serviceId The identity of the service. This ID is typically + * the full name of the service without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * previous versions. * - * - 1 - Created - * - 2 - Claimed - * - 4 - Preparing - * - 8 - Approved - * - 16 - Executing - * - 32 - Restoring - * - 64 - Completed + * @param {object} [options] Optional Parameters. * - * @param {string} [options.executorFilter] The name of the repair executor - * whose claimed tasks should be included in the list. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getRepairTaskListWithHttpOperationResponse(options) { + recoverServicePartitionsWithHttpOperationResponse(serviceId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getRepairTaskList(options, (err, result, request, response) => { + self._recoverServicePartitions(serviceId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -53770,29 +52034,29 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets a list of repair tasks matching the given filters. - * - * This API supports the Service Fabric platform; it is not meant to be used - * directly from your code. - * - * @param {object} [options] Optional Parameters. + * @summary Indicates to the Service Fabric cluster that it should attempt to + * recover the specified service that is currently stuck in quorum loss. * - * @param {string} [options.taskIdFilter] The repair task ID prefix to be - * matched. + * Indicates to the Service Fabric cluster that it should attempt to recover + * the specified service that is currently stuck in quorum loss. This operation + * should only be performed if it is known that the replicas that are down + * cannot be recovered. Incorrect use of this API can cause potential data + * loss. * - * @param {number} [options.stateFilter] A bitwise-OR of the following values, - * specifying which task states should be included in the result list. + * @param {string} serviceId The identity of the service. This ID is typically + * the full name of the service without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * previous versions. * - * - 1 - Created - * - 2 - Claimed - * - 4 - Preparing - * - 8 - Approved - * - 16 - Executing - * - 32 - Restoring - * - 64 - Completed + * @param {object} [options] Optional Parameters. * - * @param {string} [options.executorFilter] The name of the repair executor - * whose claimed tasks should be included in the list. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -53804,7 +52068,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {Array} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -53812,13 +52076,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getRepairTaskList(options, optionalCallback) { + recoverServicePartitions(serviceId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -53827,50 +52091,48 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getRepairTaskList(options, (err, result, request, response) => { + self._recoverServicePartitions(serviceId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getRepairTaskList(options, optionalCallback); + return self._recoverServicePartitions(serviceId, options, optionalCallback); } } /** - * @summary Forces the approval of the given repair task. - * - * This API supports the Service Fabric platform; it is not meant to be used - * directly from your code. - * - * @param {object} repairTaskApproveDescription Describes the repair task to be - * approved. - * - * @param {string} repairTaskApproveDescription.taskId The ID of the repair - * task. + * @summary Indicates to the Service Fabric cluster that it should attempt to + * recover the system services that are currently stuck in quorum loss. * - * @param {string} [repairTaskApproveDescription.version] The current version - * number of the repair task. If non-zero, then the request will only succeed - * if this value matches the actual current version of the repair task. If - * zero, then no version check is performed. + * Indicates to the Service Fabric cluster that it should attempt to recover + * the system services that are currently stuck in quorum loss. This operation + * should only be performed if it is known that the replicas that are down + * cannot be recovered. Incorrect use of this API can cause potential data + * loss. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - forceApproveRepairTaskWithHttpOperationResponse(repairTaskApproveDescription, options) { + recoverSystemPartitionsWithHttpOperationResponse(options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._forceApproveRepairTask(repairTaskApproveDescription, options, (err, result, request, response) => { + self._recoverSystemPartitions(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -53881,24 +52143,22 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Forces the approval of the given repair task. - * - * This API supports the Service Fabric platform; it is not meant to be used - * directly from your code. - * - * @param {object} repairTaskApproveDescription Describes the repair task to be - * approved. - * - * @param {string} repairTaskApproveDescription.taskId The ID of the repair - * task. + * @summary Indicates to the Service Fabric cluster that it should attempt to + * recover the system services that are currently stuck in quorum loss. * - * @param {string} [repairTaskApproveDescription.version] The current version - * number of the repair task. If non-zero, then the request will only succeed - * if this value matches the actual current version of the repair task. If - * zero, then no version check is performed. + * Indicates to the Service Fabric cluster that it should attempt to recover + * the system services that are currently stuck in quorum loss. This operation + * should only be performed if it is known that the replicas that are down + * cannot be recovered. Incorrect use of this API can cause potential data + * loss. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -53909,7 +52169,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {RepairTaskUpdateInfo} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -53917,14 +52177,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link RepairTaskUpdateInfo} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - forceApproveRepairTask(repairTaskApproveDescription, options, optionalCallback) { + recoverSystemPartitions(options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -53933,62 +52192,47 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._forceApproveRepairTask(repairTaskApproveDescription, options, (err, result, request, response) => { + self._recoverSystemPartitions(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._forceApproveRepairTask(repairTaskApproveDescription, options, optionalCallback); + return self._recoverSystemPartitions(options, optionalCallback); } } /** - * @summary Updates the health policy of the given repair task. - * - * This API supports the Service Fabric platform; it is not meant to be used - * directly from your code. - * - * @param {object} repairTaskUpdateHealthPolicyDescription Describes the repair - * task healthy policy to be updated. - * - * @param {string} repairTaskUpdateHealthPolicyDescription.taskId The ID of the - * repair task to be updated. - * - * @param {string} [repairTaskUpdateHealthPolicyDescription.version] The - * current version number of the repair task. If non-zero, then the request - * will only succeed if this value matches the actual current value of the - * repair task. If zero, then no version check is performed. - * - * @param {boolean} - * [repairTaskUpdateHealthPolicyDescription.performPreparingHealthCheck] A - * boolean indicating if health check is to be performed in the Preparing stage - * of the repair task. If not specified the existing value should not be - * altered. Otherwise, specify the desired new value. + * @summary Indicates to the Service Fabric cluster that it should attempt to + * recover any services (including system services) which are currently stuck + * in quorum loss. * - * @param {boolean} - * [repairTaskUpdateHealthPolicyDescription.performRestoringHealthCheck] A - * boolean indicating if health check is to be performed in the Restoring stage - * of the repair task. If not specified the existing value should not be - * altered. Otherwise, specify the desired new value. + * This operation should only be performed if it is known that the replicas + * that are down cannot be recovered. Incorrect use of this API can cause + * potential data loss. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - updateRepairTaskHealthPolicyWithHttpOperationResponse(repairTaskUpdateHealthPolicyDescription, options) { + recoverAllPartitionsWithHttpOperationResponse(options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._updateRepairTaskHealthPolicy(repairTaskUpdateHealthPolicyDescription, options, (err, result, request, response) => { + self._recoverAllPartitions(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -53999,36 +52243,21 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Updates the health policy of the given repair task. - * - * This API supports the Service Fabric platform; it is not meant to be used - * directly from your code. - * - * @param {object} repairTaskUpdateHealthPolicyDescription Describes the repair - * task healthy policy to be updated. - * - * @param {string} repairTaskUpdateHealthPolicyDescription.taskId The ID of the - * repair task to be updated. - * - * @param {string} [repairTaskUpdateHealthPolicyDescription.version] The - * current version number of the repair task. If non-zero, then the request - * will only succeed if this value matches the actual current value of the - * repair task. If zero, then no version check is performed. - * - * @param {boolean} - * [repairTaskUpdateHealthPolicyDescription.performPreparingHealthCheck] A - * boolean indicating if health check is to be performed in the Preparing stage - * of the repair task. If not specified the existing value should not be - * altered. Otherwise, specify the desired new value. + * @summary Indicates to the Service Fabric cluster that it should attempt to + * recover any services (including system services) which are currently stuck + * in quorum loss. * - * @param {boolean} - * [repairTaskUpdateHealthPolicyDescription.performRestoringHealthCheck] A - * boolean indicating if health check is to be performed in the Restoring stage - * of the repair task. If not specified the existing value should not be - * altered. Otherwise, specify the desired new value. + * This operation should only be performed if it is known that the replicas + * that are down cannot be recovered. Incorrect use of this API can cause + * potential data loss. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -54039,7 +52268,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {RepairTaskUpdateInfo} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -54047,14 +52276,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link RepairTaskUpdateInfo} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - updateRepairTaskHealthPolicy(repairTaskUpdateHealthPolicyDescription, options, optionalCallback) { + recoverAllPartitions(options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -54063,19 +52291,33 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._updateRepairTaskHealthPolicy(repairTaskUpdateHealthPolicyDescription, options, (err, result, request, response) => { + self._recoverAllPartitions(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._updateRepairTaskHealthPolicy(repairTaskUpdateHealthPolicyDescription, options, optionalCallback); + return self._recoverAllPartitions(options, optionalCallback); } } /** - * @summary Updates the execution state of a repair task. + * @summary Creates a new repair task. + * + * For clusters that have the Repair Manager Service configured, + * this API provides a way to create repair tasks that run automatically or + * manually. + * For repair tasks that run automatically, an appropriate repair executor + * must be running for each repair action to run automatically. + * These are currently only available in specially-configured Azure Cloud + * Services. + * + * To create a manual repair task, provide the set of impacted node names and + * the + * expected impact. When the state of the created repair task changes to + * approved, + * you can safely perform repair actions on those nodes. * * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. @@ -54214,11 +52456,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - updateRepairExecutionStateWithHttpOperationResponse(repairTask, options) { + createRepairTaskWithHttpOperationResponse(repairTask, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._updateRepairExecutionState(repairTask, options, (err, result, request, response) => { + self._createRepairTask(repairTask, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -54229,7 +52471,21 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Updates the execution state of a repair task. + * @summary Creates a new repair task. + * + * For clusters that have the Repair Manager Service configured, + * this API provides a way to create repair tasks that run automatically or + * manually. + * For repair tasks that run automatically, an appropriate repair executor + * must be running for each repair action to run automatically. + * These are currently only available in specially-configured Azure Cloud + * Services. + * + * To create a manual repair task, provide the set of impacted node names and + * the + * expected impact. When the state of the created repair task changes to + * approved, + * you can safely perform repair actions on those nodes. * * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. @@ -54384,7 +52640,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - updateRepairExecutionState(repairTask, options, optionalCallback) { + createRepairTask(repairTask, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -54393,166 +52649,55 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._updateRepairExecutionState(repairTask, options, (err, result, request, response) => { + self._createRepairTask(repairTask, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._updateRepairExecutionState(repairTask, options, optionalCallback); + return self._createRepairTask(repairTask, options, optionalCallback); } } /** - * @summary Gets the information about replicas of a Service Fabric service - * partition. - * - * The GetReplicas endpoint returns information about the replicas of the - * specified partition. The response includes the ID, role, status, health, - * node name, uptime, and other details about the replica. - * - * @param {uuid} partitionId The identity of the partition. - * - * @param {object} [options] Optional Parameters. - * - * @param {string} [options.continuationToken] The continuation token parameter - * is used to obtain next set of results. A continuation token with a non-empty - * value is included in the response of the API when the results from the - * system do not fit in a single response. When this value is passed to the - * next API call, the API returns next set of results. If there are no further - * results, then the continuation token does not contain a value. The value of - * this parameter should not be URL encoded. - * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error} - The error object. - */ - getReplicaInfoListWithHttpOperationResponse(partitionId, options) { - let client = this; - let self = this; - return new Promise((resolve, reject) => { - self._getReplicaInfoList(partitionId, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * @summary Gets the information about replicas of a Service Fabric service - * partition. - * - * The GetReplicas endpoint returns information about the replicas of the - * specified partition. The response includes the ID, role, status, health, - * node name, uptime, and other details about the replica. - * - * @param {uuid} partitionId The identity of the partition. - * - * @param {object} [options] Optional Parameters. - * - * @param {string} [options.continuationToken] The continuation token parameter - * is used to obtain next set of results. A continuation token with a non-empty - * value is included in the response of the API when the results from the - * system do not fit in a single response. When this value is passed to the - * next API call, the API returns next set of results. If there are no further - * results, then the continuation token does not contain a value. The value of - * this parameter should not be URL encoded. - * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} [optionalCallback] - The optional callback. - * - * @returns {function|Promise} If a callback was passed as the last parameter - * then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned - * - * @resolve {PagedReplicaInfoList} - The deserialized result object. - * - * @reject {Error} - The error object. - * - * {function} optionalCallback(err, result, request, response) - * - * {Error} err - The Error object if an error occurred, null otherwise. - * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PagedReplicaInfoList} for more information. + * @summary Requests the cancellation of the given repair task. * - * {object} [request] - The HTTP Request object if an error did not occur. + * This API supports the Service Fabric platform; it is not meant to be used + * directly from your code. * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ - getReplicaInfoList(partitionId, options, optionalCallback) { - let client = this; - let self = this; - if (!optionalCallback && typeof options === 'function') { - optionalCallback = options; - options = null; - } - if (!optionalCallback) { - return new Promise((resolve, reject) => { - self._getReplicaInfoList(partitionId, options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._getReplicaInfoList(partitionId, options, optionalCallback); - } - } - - /** - * @summary Gets the information about a replica of a Service Fabric partition. + * @param {object} repairTaskCancelDescription Describes the repair task to be + * cancelled. * - * The response includes the ID, role, status, health, node name, uptime, and - * other details about the replica. + * @param {string} repairTaskCancelDescription.taskId The ID of the repair + * task. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} [repairTaskCancelDescription.version] The current version + * number of the repair task. If non-zero, then the request will only succeed + * if this value matches the actual current version of the repair task. If + * zero, then no version check is performed. * - * @param {string} replicaId The identifier of the replica. + * @param {boolean} [repairTaskCancelDescription.requestAbort] _True_ if the + * repair should be stopped as soon as possible even if it has already started + * executing. _False_ if the repair should be cancelled only if execution has + * not yet started. * * @param {object} [options] Optional Parameters. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getReplicaInfoWithHttpOperationResponse(partitionId, replicaId, options) { + cancelRepairTaskWithHttpOperationResponse(repairTaskCancelDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getReplicaInfo(partitionId, replicaId, options, (err, result, request, response) => { + self._cancelRepairTask(repairTaskCancelDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -54563,21 +52708,28 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the information about a replica of a Service Fabric partition. + * @summary Requests the cancellation of the given repair task. * - * The response includes the ID, role, status, health, node name, uptime, and - * other details about the replica. + * This API supports the Service Fabric platform; it is not meant to be used + * directly from your code. * - * @param {uuid} partitionId The identity of the partition. + * @param {object} repairTaskCancelDescription Describes the repair task to be + * cancelled. * - * @param {string} replicaId The identifier of the replica. + * @param {string} repairTaskCancelDescription.taskId The ID of the repair + * task. * - * @param {object} [options] Optional Parameters. + * @param {string} [repairTaskCancelDescription.version] The current version + * number of the repair task. If non-zero, then the request will only succeed + * if this value matches the actual current version of the repair task. If + * zero, then no version check is performed. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. + * @param {boolean} [repairTaskCancelDescription.requestAbort] _True_ if the + * repair should be stopped as soon as possible even if it has already started + * executing. _False_ if the repair should be cancelled only if execution has + * not yet started. + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -54589,7 +52741,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ReplicaInfo} - The deserialized result object. + * @resolve {RepairTaskUpdateInfo} - The deserialized result object. * * @reject {Error} - The error object. * @@ -54598,13 +52750,13 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ReplicaInfo} for more information. + * See {@link RepairTaskUpdateInfo} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getReplicaInfo(partitionId, replicaId, options, optionalCallback) { + cancelRepairTask(repairTaskCancelDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -54613,123 +52765,77 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getReplicaInfo(partitionId, replicaId, options, (err, result, request, response) => { + self._cancelRepairTask(repairTaskCancelDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getReplicaInfo(partitionId, replicaId, options, optionalCallback); + return self._cancelRepairTask(repairTaskCancelDescription, options, optionalCallback); } } /** - * @summary Gets the health of a Service Fabric stateful service replica or - * stateless service instance. - * - * Gets the health of a Service Fabric replica. - * Use EventsHealthStateFilter to filter the collection of health events - * reported on the replica based on the health state. - * - * @param {uuid} partitionId The identity of the partition. + * @summary Deletes a completed repair task. * - * @param {string} replicaId The identifier of the replica. + * This API supports the Service Fabric platform; it is not meant to be used + * directly from your code. * - * @param {object} [options] Optional Parameters. + * @param {object} repairTaskDeleteDescription Describes the repair task to be + * deleted. * - * @param {number} [options.eventsHealthStateFilter] Allows filtering the - * collection of HealthEvent objects returned based on health state. - * The possible values for this parameter include integer value of one of the - * following health states. - * Only events that match the filter are returned. All events are used to - * evaluate the aggregated health state. - * If not specified, all entries are returned. The state values are flag-based - * enumeration, so the value could be a combination of these values, obtained - * using the bitwise 'OR' operator. For example, If the provided value is 6 - * then all of the events with HealthState value of OK (2) and Warning (4) are - * returned. + * @param {string} repairTaskDeleteDescription.taskId The ID of the completed + * repair task to be deleted. * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * @param {string} [repairTaskDeleteDescription.version] The current version + * number of the repair task. If non-zero, then the request will only succeed + * if this value matches the actual current version of the repair task. If + * zero, then no version check is performed. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getReplicaHealthWithHttpOperationResponse(partitionId, replicaId, options) { + deleteRepairTaskWithHttpOperationResponse(repairTaskDeleteDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getReplicaHealth(partitionId, replicaId, options, (err, result, request, response) => { + self._deleteRepairTask(repairTaskDeleteDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } else { resolve(httpOperationResponse); } return; }); - }); - } - - /** - * @summary Gets the health of a Service Fabric stateful service replica or - * stateless service instance. - * - * Gets the health of a Service Fabric replica. - * Use EventsHealthStateFilter to filter the collection of health events - * reported on the replica based on the health state. - * - * @param {uuid} partitionId The identity of the partition. + }); + } + + /** + * @summary Deletes a completed repair task. * - * @param {string} replicaId The identifier of the replica. + * This API supports the Service Fabric platform; it is not meant to be used + * directly from your code. * - * @param {object} [options] Optional Parameters. + * @param {object} repairTaskDeleteDescription Describes the repair task to be + * deleted. * - * @param {number} [options.eventsHealthStateFilter] Allows filtering the - * collection of HealthEvent objects returned based on health state. - * The possible values for this parameter include integer value of one of the - * following health states. - * Only events that match the filter are returned. All events are used to - * evaluate the aggregated health state. - * If not specified, all entries are returned. The state values are flag-based - * enumeration, so the value could be a combination of these values, obtained - * using the bitwise 'OR' operator. For example, If the provided value is 6 - * then all of the events with HealthState value of OK (2) and Warning (4) are - * returned. + * @param {string} repairTaskDeleteDescription.taskId The ID of the completed + * repair task to be deleted. * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * @param {string} [repairTaskDeleteDescription.version] The current version + * number of the repair task. If non-zero, then the request will only succeed + * if this value matches the actual current version of the repair task. If + * zero, then no version check is performed. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -54741,7 +52847,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ReplicaHealth} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -54749,14 +52855,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ReplicaHealth} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getReplicaHealth(partitionId, replicaId, options, optionalCallback) { + deleteRepairTask(repairTaskDeleteDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -54765,151 +52870,56 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getReplicaHealth(partitionId, replicaId, options, (err, result, request, response) => { + self._deleteRepairTask(repairTaskDeleteDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getReplicaHealth(partitionId, replicaId, options, optionalCallback); + return self._deleteRepairTask(repairTaskDeleteDescription, options, optionalCallback); } } /** - * @summary Gets the health of a Service Fabric stateful service replica or - * stateless service instance using the specified policy. - * - * Gets the health of a Service Fabric stateful service replica or stateless - * service instance. - * Use EventsHealthStateFilter to filter the collection of health events - * reported on the cluster based on the health state. - * Use ApplicationHealthPolicy to optionally override the health policies used - * to evaluate the health. This API only uses 'ConsiderWarningAsError' field of - * the ApplicationHealthPolicy. The rest of the fields are ignored while - * evaluating the health of the replica. - * - * @param {uuid} partitionId The identity of the partition. + * @summary Gets a list of repair tasks matching the given filters. * - * @param {string} replicaId The identifier of the replica. + * This API supports the Service Fabric platform; it is not meant to be used + * directly from your code. * * @param {object} [options] Optional Parameters. * - * @param {number} [options.eventsHealthStateFilter] Allows filtering the - * collection of HealthEvent objects returned based on health state. - * The possible values for this parameter include integer value of one of the - * following health states. - * Only events that match the filter are returned. All events are used to - * evaluate the aggregated health state. - * If not specified, all entries are returned. The state values are flag-based - * enumeration, so the value could be a combination of these values, obtained - * using the bitwise 'OR' operator. For example, If the provided value is 6 - * then all of the events with HealthState value of OK (2) and Warning (4) are - * returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. - * - * @param {object} [options.applicationHealthPolicy] Describes the health - * policies used to evaluate the health of an application or one of its - * children. - * If not present, the health evaluation uses the health policy from - * application manifest or the default health policy. - * - * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. - * - * @param {number} - * [options.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] - * The maximum allowed percentage of unhealthy deployed applications. Allowed - * values are Byte values from zero to 100. - * The percentage represents the maximum tolerated percentage of deployed - * applications that can be unhealthy before the application is considered in - * error. - * This is calculated by dividing the number of unhealthy deployed applications - * over the number of nodes where the application is currently deployed on in - * the cluster. - * The computation rounds up to tolerate one failure on small numbers of nodes. - * Default percentage is zero. - * - * @param {object} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health - * policy used by default to evaluate the health of a service type. - * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] - * The maximum allowed percentage of unhealthy partitions per service. Allowed - * values are Byte values from zero to 100 - * - * The percentage represents the maximum tolerated percentage of partitions - * that can be unhealthy before the service is considered in error. - * If the percentage is respected but there is at least one unhealthy - * partition, the health is evaluated as Warning. - * The percentage is calculated by dividing the number of unhealthy partitions - * over the total number of partitions in the service. - * The computation rounds up to tolerate one failure on small numbers of - * partitions. Default percentage is zero. - * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] - * The maximum allowed percentage of unhealthy replicas per partition. Allowed - * values are Byte values from zero to 100. - * - * The percentage represents the maximum tolerated percentage of replicas that - * can be unhealthy before the partition is considered in error. - * If the percentage is respected but there is at least one unhealthy replica, - * the health is evaluated as Warning. - * The percentage is calculated by dividing the number of unhealthy replicas - * over the total number of replicas in the partition. - * The computation rounds up to tolerate one failure on small numbers of - * replicas. Default percentage is zero. - * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * @param {string} [options.taskIdFilter] The repair task ID prefix to be + * matched. * - * The percentage represents the maximum tolerated percentage of services that - * can be unhealthy before the application is considered in error. - * If the percentage is respected but there is at least one unhealthy service, - * the health is evaluated as Warning. - * This is calculated by dividing the number of unhealthy services of the - * specific service type over the total number of services of the specific - * service type. - * The computation rounds up to tolerate one failure on small numbers of - * services. Default percentage is zero. + * @param {number} [options.stateFilter] A bitwise-OR of the following values, + * specifying which task states should be included in the result list. * - * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] - * The map with service type health policy per service type name. The map is - * empty by default. + * - 1 - Created + * - 2 - Claimed + * - 4 - Preparing + * - 8 - Approved + * - 16 - Executing + * - 32 - Restoring + * - 64 - Completed * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. + * @param {string} [options.executorFilter] The name of the repair executor + * whose claimed tasks should be included in the list. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getReplicaHealthUsingPolicyWithHttpOperationResponse(partitionId, replicaId, options) { + getRepairTaskListWithHttpOperationResponse(options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getReplicaHealthUsingPolicy(partitionId, replicaId, options, (err, result, request, response) => { + self._getRepairTaskList(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -54920,124 +52930,29 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the health of a Service Fabric stateful service replica or - * stateless service instance using the specified policy. - * - * Gets the health of a Service Fabric stateful service replica or stateless - * service instance. - * Use EventsHealthStateFilter to filter the collection of health events - * reported on the cluster based on the health state. - * Use ApplicationHealthPolicy to optionally override the health policies used - * to evaluate the health. This API only uses 'ConsiderWarningAsError' field of - * the ApplicationHealthPolicy. The rest of the fields are ignored while - * evaluating the health of the replica. - * - * @param {uuid} partitionId The identity of the partition. + * @summary Gets a list of repair tasks matching the given filters. * - * @param {string} replicaId The identifier of the replica. + * This API supports the Service Fabric platform; it is not meant to be used + * directly from your code. * * @param {object} [options] Optional Parameters. * - * @param {number} [options.eventsHealthStateFilter] Allows filtering the - * collection of HealthEvent objects returned based on health state. - * The possible values for this parameter include integer value of one of the - * following health states. - * Only events that match the filter are returned. All events are used to - * evaluate the aggregated health state. - * If not specified, all entries are returned. The state values are flag-based - * enumeration, so the value could be a combination of these values, obtained - * using the bitwise 'OR' operator. For example, If the provided value is 6 - * then all of the events with HealthState value of OK (2) and Warning (4) are - * returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. - * - * @param {object} [options.applicationHealthPolicy] Describes the health - * policies used to evaluate the health of an application or one of its - * children. - * If not present, the health evaluation uses the health policy from - * application manifest or the default health policy. - * - * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. - * - * @param {number} - * [options.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] - * The maximum allowed percentage of unhealthy deployed applications. Allowed - * values are Byte values from zero to 100. - * The percentage represents the maximum tolerated percentage of deployed - * applications that can be unhealthy before the application is considered in - * error. - * This is calculated by dividing the number of unhealthy deployed applications - * over the number of nodes where the application is currently deployed on in - * the cluster. - * The computation rounds up to tolerate one failure on small numbers of nodes. - * Default percentage is zero. - * - * @param {object} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health - * policy used by default to evaluate the health of a service type. - * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] - * The maximum allowed percentage of unhealthy partitions per service. Allowed - * values are Byte values from zero to 100 - * - * The percentage represents the maximum tolerated percentage of partitions - * that can be unhealthy before the service is considered in error. - * If the percentage is respected but there is at least one unhealthy - * partition, the health is evaluated as Warning. - * The percentage is calculated by dividing the number of unhealthy partitions - * over the total number of partitions in the service. - * The computation rounds up to tolerate one failure on small numbers of - * partitions. Default percentage is zero. - * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] - * The maximum allowed percentage of unhealthy replicas per partition. Allowed - * values are Byte values from zero to 100. - * - * The percentage represents the maximum tolerated percentage of replicas that - * can be unhealthy before the partition is considered in error. - * If the percentage is respected but there is at least one unhealthy replica, - * the health is evaluated as Warning. - * The percentage is calculated by dividing the number of unhealthy replicas - * over the total number of replicas in the partition. - * The computation rounds up to tolerate one failure on small numbers of - * replicas. Default percentage is zero. - * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * @param {string} [options.taskIdFilter] The repair task ID prefix to be + * matched. * - * The percentage represents the maximum tolerated percentage of services that - * can be unhealthy before the application is considered in error. - * If the percentage is respected but there is at least one unhealthy service, - * the health is evaluated as Warning. - * This is calculated by dividing the number of unhealthy services of the - * specific service type over the total number of services of the specific - * service type. - * The computation rounds up to tolerate one failure on small numbers of - * services. Default percentage is zero. + * @param {number} [options.stateFilter] A bitwise-OR of the following values, + * specifying which task states should be included in the result list. * - * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] - * The map with service type health policy per service type name. The map is - * empty by default. + * - 1 - Created + * - 2 - Claimed + * - 4 - Preparing + * - 8 - Approved + * - 16 - Executing + * - 32 - Restoring + * - 64 - Completed * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. + * @param {string} [options.executorFilter] The name of the repair executor + * whose claimed tasks should be included in the list. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -55049,7 +52964,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ReplicaHealth} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error} - The error object. * @@ -55057,14 +52972,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ReplicaHealth} for more information. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getReplicaHealthUsingPolicy(partitionId, replicaId, options, optionalCallback) { + getRepairTaskList(options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -55073,279 +52987,77 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getReplicaHealthUsingPolicy(partitionId, replicaId, options, (err, result, request, response) => { + self._getRepairTaskList(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getReplicaHealthUsingPolicy(partitionId, replicaId, options, optionalCallback); + return self._getRepairTaskList(options, optionalCallback); } } /** - * @summary Sends a health report on the Service Fabric replica. - * - * Reports health state of the specified Service Fabric replica. The report - * must contain the information about the source of the health report and - * property on which it is reported. - * The report is sent to a Service Fabric gateway Replica, which forwards to - * the health store. - * The report may be accepted by the gateway, but rejected by the health store - * after extra validation. - * For example, the health store may reject the report because of an invalid - * parameter, like a stale sequence number. - * To see whether the report was applied in the health store, run - * GetReplicaHealth and check that the report appears in the HealthEvents - * section. - * - * @param {uuid} partitionId The identity of the partition. - * - * @param {string} replicaId The identifier of the replica. - * - * @param {string} replicaHealthReportServiceKind The kind of service replica - * (Stateless or Stateful) for which the health is being reported. Following - * are the possible values. Possible values include: 'Stateless', 'Stateful' - * - * @param {object} healthInformation Describes the health information for the - * health report. This information needs to be present in all of the health - * reports sent to the health manager. - * - * @param {string} healthInformation.sourceId The source name that identifies - * the client/watchdog/system component that generated the health information. - * - * @param {string} healthInformation.property The property of the health - * information. An entity can have health reports for different properties. - * The property is a string and not a fixed enumeration to allow the reporter - * flexibility to categorize the state condition that triggers the report. - * For example, a reporter with SourceId "LocalWatchdog" can monitor the state - * of the available disk on a node, - * so it can report "AvailableDisk" property on that node. - * The same reporter can monitor the node connectivity, so it can report a - * property "Connectivity" on the same node. - * In the health store, these reports are treated as separate health events for - * the specified node. - * - * Together with the SourceId, the property uniquely identifies the health - * information. - * - * @param {string} healthInformation.healthState The health state of a Service - * Fabric entity such as Cluster, Node, Application, Service, Partition, - * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - * 'Unknown' - * - * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field uses ISO8601 - * format for specifying the duration. - * When clients report periodically, they should send reports with higher - * frequency than time to live. - * If clients report on transition, they can set the time to live to infinite. - * When time to live expires, the health event that contains the health - * information - * is either removed from health store, if RemoveWhenExpired is true, or - * evaluated at error, if RemoveWhenExpired false. + * @summary Forces the approval of the given repair task. * - * If not specified, time to live defaults to infinite value. + * This API supports the Service Fabric platform; it is not meant to be used + * directly from your code. * - * @param {string} [healthInformation.description] The description of the - * health information. It represents free text used to add human readable - * information about the report. - * The maximum string length for the description is 4096 characters. - * If the provided string is longer, it will be automatically truncated. - * When truncated, the last characters of the description contain a marker - * "[Truncated]", and total string size is 4096 characters. - * The presence of the marker indicates to users that truncation occurred. - * Note that when truncated, the description has less than 4096 characters from - * the original string. + * @param {object} repairTaskApproveDescription Describes the repair task to be + * approved. * - * @param {string} [healthInformation.sequenceNumber] The sequence number for - * this health report as a numeric string. - * The report sequence number is used by the health store to detect stale - * reports. - * If not specified, a sequence number is auto-generated by the health client - * when a report is added. + * @param {string} repairTaskApproveDescription.taskId The ID of the repair + * task. * - * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates - * whether the report is removed from health store when it expires. - * If set to true, the report is removed from the health store after it - * expires. - * If set to false, the report is treated as an error when expired. The value - * of this property is false by default. - * When clients report periodically, they should set RemoveWhenExpired false - * (default). - * This way, is the reporter has issues (eg. deadlock) and can't report, the - * entity is evaluated at error when the health report expires. - * This flags the entity as being in Error health state. + * @param {string} [repairTaskApproveDescription.version] The current version + * number of the repair task. If non-zero, then the request will only succeed + * if this value matches the actual current version of the repair task. If + * zero, then no version check is performed. * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.immediate] A flag that indicates whether the - * report should be sent immediately. - * A health report is sent to a Service Fabric gateway Application, which - * forwards to the health store. - * If Immediate is set to true, the report is sent immediately from HTTP - * Gateway to the health store, regardless of the fabric client settings that - * the HTTP Gateway Application is using. - * This is useful for critical reports that should be sent as soon as possible. - * Depending on timing and other conditions, sending the report may still fail, - * for example if the HTTP Gateway is closed or the message doesn't reach the - * Gateway. - * If Immediate is set to false, the report is sent based on the health client - * settings from the HTTP Gateway. Therefore, it will be batched according to - * the HealthReportSendInterval configuration. - * This is the recommended setting because it allows the health client to - * optimize health reporting messages to health store as well as health report - * processing. - * By default, reports are not sent immediately. - * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error} - The error object. - */ - reportReplicaHealthWithHttpOperationResponse(partitionId, replicaId, replicaHealthReportServiceKind, healthInformation, options) { - let client = this; - let self = this; - return new Promise((resolve, reject) => { - self._reportReplicaHealth(partitionId, replicaId, replicaHealthReportServiceKind, healthInformation, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * @summary Sends a health report on the Service Fabric replica. - * - * Reports health state of the specified Service Fabric replica. The report - * must contain the information about the source of the health report and - * property on which it is reported. - * The report is sent to a Service Fabric gateway Replica, which forwards to - * the health store. - * The report may be accepted by the gateway, but rejected by the health store - * after extra validation. - * For example, the health store may reject the report because of an invalid - * parameter, like a stale sequence number. - * To see whether the report was applied in the health store, run - * GetReplicaHealth and check that the report appears in the HealthEvents - * section. - * - * @param {uuid} partitionId The identity of the partition. - * - * @param {string} replicaId The identifier of the replica. - * - * @param {string} replicaHealthReportServiceKind The kind of service replica - * (Stateless or Stateful) for which the health is being reported. Following - * are the possible values. Possible values include: 'Stateless', 'Stateful' - * - * @param {object} healthInformation Describes the health information for the - * health report. This information needs to be present in all of the health - * reports sent to the health manager. - * - * @param {string} healthInformation.sourceId The source name that identifies - * the client/watchdog/system component that generated the health information. - * - * @param {string} healthInformation.property The property of the health - * information. An entity can have health reports for different properties. - * The property is a string and not a fixed enumeration to allow the reporter - * flexibility to categorize the state condition that triggers the report. - * For example, a reporter with SourceId "LocalWatchdog" can monitor the state - * of the available disk on a node, - * so it can report "AvailableDisk" property on that node. - * The same reporter can monitor the node connectivity, so it can report a - * property "Connectivity" on the same node. - * In the health store, these reports are treated as separate health events for - * the specified node. - * - * Together with the SourceId, the property uniquely identifies the health - * information. - * - * @param {string} healthInformation.healthState The health state of a Service - * Fabric entity such as Cluster, Node, Application, Service, Partition, - * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - * 'Unknown' + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field uses ISO8601 - * format for specifying the duration. - * When clients report periodically, they should send reports with higher - * frequency than time to live. - * If clients report on transition, they can set the time to live to infinite. - * When time to live expires, the health event that contains the health - * information - * is either removed from health store, if RemoveWhenExpired is true, or - * evaluated at error, if RemoveWhenExpired false. + * @returns {Promise} A promise is returned * - * If not specified, time to live defaults to infinite value. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {string} [healthInformation.description] The description of the - * health information. It represents free text used to add human readable - * information about the report. - * The maximum string length for the description is 4096 characters. - * If the provided string is longer, it will be automatically truncated. - * When truncated, the last characters of the description contain a marker - * "[Truncated]", and total string size is 4096 characters. - * The presence of the marker indicates to users that truncation occurred. - * Note that when truncated, the description has less than 4096 characters from - * the original string. + * @reject {Error} - The error object. + */ + forceApproveRepairTaskWithHttpOperationResponse(repairTaskApproveDescription, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._forceApproveRepairTask(repairTaskApproveDescription, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Forces the approval of the given repair task. * - * @param {string} [healthInformation.sequenceNumber] The sequence number for - * this health report as a numeric string. - * The report sequence number is used by the health store to detect stale - * reports. - * If not specified, a sequence number is auto-generated by the health client - * when a report is added. + * This API supports the Service Fabric platform; it is not meant to be used + * directly from your code. * - * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates - * whether the report is removed from health store when it expires. - * If set to true, the report is removed from the health store after it - * expires. - * If set to false, the report is treated as an error when expired. The value - * of this property is false by default. - * When clients report periodically, they should set RemoveWhenExpired false - * (default). - * This way, is the reporter has issues (eg. deadlock) and can't report, the - * entity is evaluated at error when the health report expires. - * This flags the entity as being in Error health state. + * @param {object} repairTaskApproveDescription Describes the repair task to be + * approved. * - * @param {object} [options] Optional Parameters. + * @param {string} repairTaskApproveDescription.taskId The ID of the repair + * task. * - * @param {boolean} [options.immediate] A flag that indicates whether the - * report should be sent immediately. - * A health report is sent to a Service Fabric gateway Application, which - * forwards to the health store. - * If Immediate is set to true, the report is sent immediately from HTTP - * Gateway to the health store, regardless of the fabric client settings that - * the HTTP Gateway Application is using. - * This is useful for critical reports that should be sent as soon as possible. - * Depending on timing and other conditions, sending the report may still fail, - * for example if the HTTP Gateway is closed or the message doesn't reach the - * Gateway. - * If Immediate is set to false, the report is sent based on the health client - * settings from the HTTP Gateway. Therefore, it will be batched according to - * the HealthReportSendInterval configuration. - * This is the recommended setting because it allows the health client to - * optimize health reporting messages to health store as well as health report - * processing. - * By default, reports are not sent immediately. + * @param {string} [repairTaskApproveDescription.version] The current version + * number of the repair task. If non-zero, then the request will only succeed + * if this value matches the actual current version of the repair task. If + * zero, then no version check is performed. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -55357,7 +53069,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {RepairTaskUpdateInfo} - The deserialized result object. * * @reject {Error} - The error object. * @@ -55365,13 +53077,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link RepairTaskUpdateInfo} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - reportReplicaHealth(partitionId, replicaId, replicaHealthReportServiceKind, healthInformation, options, optionalCallback) { + forceApproveRepairTask(repairTaskApproveDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -55380,63 +53093,62 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._reportReplicaHealth(partitionId, replicaId, replicaHealthReportServiceKind, healthInformation, options, (err, result, request, response) => { + self._forceApproveRepairTask(repairTaskApproveDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._reportReplicaHealth(partitionId, replicaId, replicaHealthReportServiceKind, healthInformation, options, optionalCallback); + return self._forceApproveRepairTask(repairTaskApproveDescription, options, optionalCallback); } } /** - * @summary Gets the list of replicas deployed on a Service Fabric node. + * @summary Updates the health policy of the given repair task. * - * Gets the list containing the information about replicas deployed on a - * Service Fabric node. The information include partition ID, replica ID, - * status of the replica, name of the service, name of the service type, and - * other information. Use PartitionId or ServiceManifestName query parameters - * to return information about the deployed replicas matching the specified - * values for those parameters. + * This API supports the Service Fabric platform; it is not meant to be used + * directly from your code. * - * @param {string} nodeName The name of the node. + * @param {object} repairTaskUpdateHealthPolicyDescription Describes the repair + * task healthy policy to be updated. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. + * @param {string} repairTaskUpdateHealthPolicyDescription.taskId The ID of the + * repair task to be updated. * - * @param {object} [options] Optional Parameters. + * @param {string} [repairTaskUpdateHealthPolicyDescription.version] The + * current version number of the repair task. If non-zero, then the request + * will only succeed if this value matches the actual current value of the + * repair task. If zero, then no version check is performed. * - * @param {uuid} [options.partitionId] The identity of the partition. + * @param {boolean} + * [repairTaskUpdateHealthPolicyDescription.performPreparingHealthCheck] A + * boolean indicating if health check is to be performed in the Preparing stage + * of the repair task. If not specified the existing value should not be + * altered. Otherwise, specify the desired new value. * - * @param {string} [options.serviceManifestName] The name of a service manifest - * registered as part of an application type in a Service Fabric cluster. + * @param {boolean} + * [repairTaskUpdateHealthPolicyDescription.performRestoringHealthCheck] A + * boolean indicating if health check is to be performed in the Restoring stage + * of the repair task. If not specified the existing value should not be + * altered. Otherwise, specify the desired new value. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getDeployedServiceReplicaInfoListWithHttpOperationResponse(nodeName, applicationId, options) { + updateRepairTaskHealthPolicyWithHttpOperationResponse(repairTaskUpdateHealthPolicyDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getDeployedServiceReplicaInfoList(nodeName, applicationId, options, (err, result, request, response) => { + self._updateRepairTaskHealthPolicy(repairTaskUpdateHealthPolicyDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -55447,36 +53159,35 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the list of replicas deployed on a Service Fabric node. + * @summary Updates the health policy of the given repair task. * - * Gets the list containing the information about replicas deployed on a - * Service Fabric node. The information include partition ID, replica ID, - * status of the replica, name of the service, name of the service type, and - * other information. Use PartitionId or ServiceManifestName query parameters - * to return information about the deployed replicas matching the specified - * values for those parameters. + * This API supports the Service Fabric platform; it is not meant to be used + * directly from your code. * - * @param {string} nodeName The name of the node. + * @param {object} repairTaskUpdateHealthPolicyDescription Describes the repair + * task healthy policy to be updated. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. + * @param {string} repairTaskUpdateHealthPolicyDescription.taskId The ID of the + * repair task to be updated. * - * @param {object} [options] Optional Parameters. + * @param {string} [repairTaskUpdateHealthPolicyDescription.version] The + * current version number of the repair task. If non-zero, then the request + * will only succeed if this value matches the actual current value of the + * repair task. If zero, then no version check is performed. * - * @param {uuid} [options.partitionId] The identity of the partition. + * @param {boolean} + * [repairTaskUpdateHealthPolicyDescription.performPreparingHealthCheck] A + * boolean indicating if health check is to be performed in the Preparing stage + * of the repair task. If not specified the existing value should not be + * altered. Otherwise, specify the desired new value. * - * @param {string} [options.serviceManifestName] The name of a service manifest - * registered as part of an application type in a Service Fabric cluster. + * @param {boolean} + * [repairTaskUpdateHealthPolicyDescription.performRestoringHealthCheck] A + * boolean indicating if health check is to be performed in the Restoring stage + * of the repair task. If not specified the existing value should not be + * altered. Otherwise, specify the desired new value. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -55488,7 +53199,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {Array} - The deserialized result object. + * @resolve {RepairTaskUpdateInfo} - The deserialized result object. * * @reject {Error} - The error object. * @@ -55496,13 +53207,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link RepairTaskUpdateInfo} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getDeployedServiceReplicaInfoList(nodeName, applicationId, options, optionalCallback) { + updateRepairTaskHealthPolicy(repairTaskUpdateHealthPolicyDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -55511,52 +53223,162 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getDeployedServiceReplicaInfoList(nodeName, applicationId, options, (err, result, request, response) => { + self._updateRepairTaskHealthPolicy(repairTaskUpdateHealthPolicyDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getDeployedServiceReplicaInfoList(nodeName, applicationId, options, optionalCallback); + return self._updateRepairTaskHealthPolicy(repairTaskUpdateHealthPolicyDescription, options, optionalCallback); } } /** - * @summary Gets the details of replica deployed on a Service Fabric node. + * @summary Updates the execution state of a repair task. * - * Gets the details of the replica deployed on a Service Fabric node. The - * information includes service kind, service name, current service operation, - * current service operation start date time, partition ID, replica/instance - * ID, reported load, and other information. + * This API supports the Service Fabric platform; it is not meant to be used + * directly from your code. * - * @param {string} nodeName The name of the node. + * @param {object} repairTask Describes the repair task to be created or + * updated. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} repairTask.taskId The ID of the repair task. * - * @param {string} replicaId The identifier of the replica. + * @param {string} [repairTask.version] The version of the repair task. + * When creating a new repair task, the version must be set to zero. When + * updating a repair task, + * the version is used for optimistic concurrency checks. If the version is + * set to zero, the update will not check for write conflicts. If the version + * is set to a non-zero value, then the + * update will only succeed if the actual current version of the repair task + * matches this value. * - * @param {object} [options] Optional Parameters. + * @param {string} [repairTask.description] A description of the purpose of the + * repair task, or other informational details. + * May be set when the repair task is created, and is immutable once set. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. + * @param {string} repairTask.state The workflow state of the repair task. + * Valid initial states are Created, Claimed, and Preparing. Possible values + * include: 'Invalid', 'Created', 'Claimed', 'Preparing', 'Approved', + * 'Executing', 'Restoring', 'Completed' + * + * @param {number} [repairTask.flags] A bitwise-OR of the following values, + * which gives additional details about the status of the repair task. + * - 1 - Cancellation of the repair has been requested + * - 2 - Abort of the repair has been requested + * - 4 - Approval of the repair was forced via client request + * + * @param {string} repairTask.action The requested repair action. Must be + * specified when the repair task is created, and is immutable once set. + * + * @param {object} [repairTask.target] The target object determines what + * actions the system will take to prepare for the impact of the repair, prior + * to approving execution of the repair. + * May be set when the repair task is created, and is immutable once set. + * + * @param {string} repairTask.target.kind Polymorphic Discriminator + * + * @param {string} [repairTask.executor] The name of the repair executor. Must + * be specified in Claimed and later states, and is immutable once set. + * + * @param {string} [repairTask.executorData] A data string that the repair + * executor can use to store its internal state. + * + * @param {object} [repairTask.impact] The impact object determines what + * actions the system will take to prepare for the impact of the repair, prior + * to approving execution of the repair. + * Impact must be specified by the repair executor when transitioning to the + * Preparing state, and is immutable once set. + * + * @param {string} repairTask.impact.kind Polymorphic Discriminator + * + * @param {string} [repairTask.resultStatus] A value describing the overall + * result of the repair task execution. Must be specified in the Restoring and + * later states, and is immutable once set. Possible values include: 'Invalid', + * 'Succeeded', 'Cancelled', 'Interrupted', 'Failed', 'Pending' + * + * @param {number} [repairTask.resultCode] A numeric value providing additional + * details about the result of the repair task execution. + * May be specified in the Restoring and later states, and is immutable once + * set. + * + * @param {string} [repairTask.resultDetails] A string providing additional + * details about the result of the repair task execution. + * May be specified in the Restoring and later states, and is immutable once + * set. + * + * @param {object} [repairTask.history] An object that contains timestamps of + * the repair task's state transitions. + * These timestamps are updated by the system, and cannot be directly modified. + * + * @param {date} [repairTask.history.createdUtcTimestamp] The time when the + * repair task entered the Created state. + * + * @param {date} [repairTask.history.claimedUtcTimestamp] The time when the + * repair task entered the Claimed state. + * + * @param {date} [repairTask.history.preparingUtcTimestamp] The time when the + * repair task entered the Preparing state. + * + * @param {date} [repairTask.history.approvedUtcTimestamp] The time when the + * repair task entered the Approved state + * + * @param {date} [repairTask.history.executingUtcTimestamp] The time when the + * repair task entered the Executing state + * + * @param {date} [repairTask.history.restoringUtcTimestamp] The time when the + * repair task entered the Restoring state + * + * @param {date} [repairTask.history.completedUtcTimestamp] The time when the + * repair task entered the Completed state + * + * @param {date} [repairTask.history.preparingHealthCheckStartUtcTimestamp] The + * time when the repair task started the health check in the Preparing state. + * + * @param {date} [repairTask.history.preparingHealthCheckEndUtcTimestamp] The + * time when the repair task completed the health check in the Preparing state. + * + * @param {date} [repairTask.history.restoringHealthCheckStartUtcTimestamp] The + * time when the repair task started the health check in the Restoring state. + * + * @param {date} [repairTask.history.restoringHealthCheckEndUtcTimestamp] The + * time when the repair task completed the health check in the Restoring state. + * + * @param {string} [repairTask.preparingHealthCheckState] The workflow state of + * the health check when the repair task is in the Preparing state. Possible + * values include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', + * 'TimedOut' + * + * @param {string} [repairTask.restoringHealthCheckState] The workflow state of + * the health check when the repair task is in the Restoring state. Possible + * values include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', + * 'TimedOut' + * + * @param {boolean} [repairTask.performPreparingHealthCheck] A value to + * determine if health checks will be performed when the repair task enters the + * Preparing state. + * + * @param {boolean} [repairTask.performRestoringHealthCheck] A value to + * determine if health checks will be performed when the repair task enters the + * Restoring state. + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getDeployedServiceReplicaDetailInfoWithHttpOperationResponse(nodeName, partitionId, replicaId, options) { + updateRepairExecutionStateWithHttpOperationResponse(repairTask, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getDeployedServiceReplicaDetailInfo(nodeName, partitionId, replicaId, options, (err, result, request, response) => { + self._updateRepairExecutionState(repairTask, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -55567,25 +53389,135 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the details of replica deployed on a Service Fabric node. + * @summary Updates the execution state of a repair task. * - * Gets the details of the replica deployed on a Service Fabric node. The - * information includes service kind, service name, current service operation, - * current service operation start date time, partition ID, replica/instance - * ID, reported load, and other information. + * This API supports the Service Fabric platform; it is not meant to be used + * directly from your code. * - * @param {string} nodeName The name of the node. + * @param {object} repairTask Describes the repair task to be created or + * updated. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} repairTask.taskId The ID of the repair task. * - * @param {string} replicaId The identifier of the replica. + * @param {string} [repairTask.version] The version of the repair task. + * When creating a new repair task, the version must be set to zero. When + * updating a repair task, + * the version is used for optimistic concurrency checks. If the version is + * set to zero, the update will not check for write conflicts. If the version + * is set to a non-zero value, then the + * update will only succeed if the actual current version of the repair task + * matches this value. * - * @param {object} [options] Optional Parameters. + * @param {string} [repairTask.description] A description of the purpose of the + * repair task, or other informational details. + * May be set when the repair task is created, and is immutable once set. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. + * @param {string} repairTask.state The workflow state of the repair task. + * Valid initial states are Created, Claimed, and Preparing. Possible values + * include: 'Invalid', 'Created', 'Claimed', 'Preparing', 'Approved', + * 'Executing', 'Restoring', 'Completed' + * + * @param {number} [repairTask.flags] A bitwise-OR of the following values, + * which gives additional details about the status of the repair task. + * - 1 - Cancellation of the repair has been requested + * - 2 - Abort of the repair has been requested + * - 4 - Approval of the repair was forced via client request + * + * @param {string} repairTask.action The requested repair action. Must be + * specified when the repair task is created, and is immutable once set. + * + * @param {object} [repairTask.target] The target object determines what + * actions the system will take to prepare for the impact of the repair, prior + * to approving execution of the repair. + * May be set when the repair task is created, and is immutable once set. + * + * @param {string} repairTask.target.kind Polymorphic Discriminator + * + * @param {string} [repairTask.executor] The name of the repair executor. Must + * be specified in Claimed and later states, and is immutable once set. + * + * @param {string} [repairTask.executorData] A data string that the repair + * executor can use to store its internal state. + * + * @param {object} [repairTask.impact] The impact object determines what + * actions the system will take to prepare for the impact of the repair, prior + * to approving execution of the repair. + * Impact must be specified by the repair executor when transitioning to the + * Preparing state, and is immutable once set. + * + * @param {string} repairTask.impact.kind Polymorphic Discriminator + * + * @param {string} [repairTask.resultStatus] A value describing the overall + * result of the repair task execution. Must be specified in the Restoring and + * later states, and is immutable once set. Possible values include: 'Invalid', + * 'Succeeded', 'Cancelled', 'Interrupted', 'Failed', 'Pending' + * + * @param {number} [repairTask.resultCode] A numeric value providing additional + * details about the result of the repair task execution. + * May be specified in the Restoring and later states, and is immutable once + * set. + * + * @param {string} [repairTask.resultDetails] A string providing additional + * details about the result of the repair task execution. + * May be specified in the Restoring and later states, and is immutable once + * set. + * + * @param {object} [repairTask.history] An object that contains timestamps of + * the repair task's state transitions. + * These timestamps are updated by the system, and cannot be directly modified. + * + * @param {date} [repairTask.history.createdUtcTimestamp] The time when the + * repair task entered the Created state. + * + * @param {date} [repairTask.history.claimedUtcTimestamp] The time when the + * repair task entered the Claimed state. + * + * @param {date} [repairTask.history.preparingUtcTimestamp] The time when the + * repair task entered the Preparing state. + * + * @param {date} [repairTask.history.approvedUtcTimestamp] The time when the + * repair task entered the Approved state + * + * @param {date} [repairTask.history.executingUtcTimestamp] The time when the + * repair task entered the Executing state + * + * @param {date} [repairTask.history.restoringUtcTimestamp] The time when the + * repair task entered the Restoring state + * + * @param {date} [repairTask.history.completedUtcTimestamp] The time when the + * repair task entered the Completed state + * + * @param {date} [repairTask.history.preparingHealthCheckStartUtcTimestamp] The + * time when the repair task started the health check in the Preparing state. + * + * @param {date} [repairTask.history.preparingHealthCheckEndUtcTimestamp] The + * time when the repair task completed the health check in the Preparing state. + * + * @param {date} [repairTask.history.restoringHealthCheckStartUtcTimestamp] The + * time when the repair task started the health check in the Restoring state. + * + * @param {date} [repairTask.history.restoringHealthCheckEndUtcTimestamp] The + * time when the repair task completed the health check in the Restoring state. + * + * @param {string} [repairTask.preparingHealthCheckState] The workflow state of + * the health check when the repair task is in the Preparing state. Possible + * values include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', + * 'TimedOut' + * + * @param {string} [repairTask.restoringHealthCheckState] The workflow state of + * the health check when the repair task is in the Restoring state. Possible + * values include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', + * 'TimedOut' + * + * @param {boolean} [repairTask.performPreparingHealthCheck] A value to + * determine if health checks will be performed when the repair task enters the + * Preparing state. + * + * @param {boolean} [repairTask.performRestoringHealthCheck] A value to + * determine if health checks will be performed when the repair task enters the + * Restoring state. + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -55597,7 +53529,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {DeployedServiceReplicaDetailInfo} - The deserialized result object. + * @resolve {RepairTaskUpdateInfo} - The deserialized result object. * * @reject {Error} - The error object. * @@ -55606,14 +53538,13 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DeployedServiceReplicaDetailInfo} for more - * information. + * See {@link RepairTaskUpdateInfo} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getDeployedServiceReplicaDetailInfo(nodeName, partitionId, replicaId, options, optionalCallback) { + updateRepairExecutionState(repairTask, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -55622,31 +53553,37 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getDeployedServiceReplicaDetailInfo(nodeName, partitionId, replicaId, options, (err, result, request, response) => { + self._updateRepairExecutionState(repairTask, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getDeployedServiceReplicaDetailInfo(nodeName, partitionId, replicaId, options, optionalCallback); + return self._updateRepairExecutionState(repairTask, options, optionalCallback); } } - - /** - * @summary Gets the details of replica deployed on a Service Fabric node. - * - * Gets the details of the replica deployed on a Service Fabric node. The - * information includes service kind, service name, current service operation, - * current service operation start date time, partition ID, replica/instance - * ID, reported load, and other information. + + /** + * @summary Gets the information about replicas of a Service Fabric service + * partition. * - * @param {string} nodeName The name of the node. + * The GetReplicas endpoint returns information about the replicas of the + * specified partition. The response includes the ID, role, status, health, + * node name, uptime, and other details about the replica. * * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.continuationToken] The continuation token parameter + * is used to obtain next set of results. A continuation token with a non-empty + * value is included in the response of the API when the results from the + * system do not fit in a single response. When this value is passed to the + * next API call, the API returns next set of results. If there are no further + * results, then the continuation token does not contain a value. The value of + * this parameter should not be URL encoded. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -55657,15 +53594,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getDeployedServiceReplicaDetailInfoByPartitionIdWithHttpOperationResponse(nodeName, partitionId, options) { + getReplicaInfoListWithHttpOperationResponse(partitionId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getDeployedServiceReplicaDetailInfoByPartitionId(nodeName, partitionId, options, (err, result, request, response) => { + self._getReplicaInfoList(partitionId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -55676,19 +53613,25 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the details of replica deployed on a Service Fabric node. - * - * Gets the details of the replica deployed on a Service Fabric node. The - * information includes service kind, service name, current service operation, - * current service operation start date time, partition ID, replica/instance - * ID, reported load, and other information. + * @summary Gets the information about replicas of a Service Fabric service + * partition. * - * @param {string} nodeName The name of the node. + * The GetReplicas endpoint returns information about the replicas of the + * specified partition. The response includes the ID, role, status, health, + * node name, uptime, and other details about the replica. * * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.continuationToken] The continuation token parameter + * is used to obtain next set of results. A continuation token with a non-empty + * value is included in the response of the API when the results from the + * system do not fit in a single response. When this value is passed to the + * next API call, the API returns next set of results. If there are no further + * results, then the continuation token does not contain a value. The value of + * this parameter should not be URL encoded. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -55704,7 +53647,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {DeployedServiceReplicaDetailInfo} - The deserialized result object. + * @resolve {PagedReplicaInfoList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -55713,14 +53656,13 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DeployedServiceReplicaDetailInfo} for more - * information. + * See {@link PagedReplicaInfoList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getDeployedServiceReplicaDetailInfoByPartitionId(nodeName, partitionId, options, optionalCallback) { + getReplicaInfoList(partitionId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -55729,26 +53671,22 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getDeployedServiceReplicaDetailInfoByPartitionId(nodeName, partitionId, options, (err, result, request, response) => { + self._getReplicaInfoList(partitionId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getDeployedServiceReplicaDetailInfoByPartitionId(nodeName, partitionId, options, optionalCallback); + return self._getReplicaInfoList(partitionId, options, optionalCallback); } } /** - * @summary Restarts a service replica of a persisted service running on a - * node. - * - * Restarts a service replica of a persisted service running on a node. Warning - * - There are no safety checks performed when this API is used. Incorrect use - * of this API can lead to availability loss for stateful services. + * @summary Gets the information about a replica of a Service Fabric partition. * - * @param {string} nodeName The name of the node. + * The response includes the ID, role, status, health, node name, uptime, and + * other details about the replica. * * @param {uuid} partitionId The identity of the partition. * @@ -55766,15 +53704,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - restartReplicaWithHttpOperationResponse(nodeName, partitionId, replicaId, options) { + getReplicaInfoWithHttpOperationResponse(partitionId, replicaId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._restartReplica(nodeName, partitionId, replicaId, options, (err, result, request, response) => { + self._getReplicaInfo(partitionId, replicaId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -55785,14 +53723,10 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Restarts a service replica of a persisted service running on a - * node. - * - * Restarts a service replica of a persisted service running on a node. Warning - * - There are no safety checks performed when this API is used. Incorrect use - * of this API can lead to availability loss for stateful services. + * @summary Gets the information about a replica of a Service Fabric partition. * - * @param {string} nodeName The name of the node. + * The response includes the ID, role, status, health, node name, uptime, and + * other details about the replica. * * @param {uuid} partitionId The identity of the partition. * @@ -55815,7 +53749,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {ReplicaInfo} - The deserialized result object. * * @reject {Error} - The error object. * @@ -55823,13 +53757,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ReplicaInfo} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - restartReplica(nodeName, partitionId, replicaId, options, optionalCallback) { + getReplicaInfo(partitionId, replicaId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -55838,31 +53773,24 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._restartReplica(nodeName, partitionId, replicaId, options, (err, result, request, response) => { + self._getReplicaInfo(partitionId, replicaId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._restartReplica(nodeName, partitionId, replicaId, options, optionalCallback); + return self._getReplicaInfo(partitionId, replicaId, options, optionalCallback); } } /** - * @summary Removes a service replica running on a node. - * - * This API simulates a Service Fabric replica failure by removing a replica - * from a Service Fabric cluster. The removal closes the replica, transitions - * the replica to the role None, and then removes all of the state information - * of the replica from the cluster. This API tests the replica state removal - * path, and simulates the report fault permanent path through client APIs. - * Warning - There are no safety checks performed when this API is used. - * Incorrect use of this API can lead to data loss for stateful services. In - * addition, the forceRemove flag impacts all other replicas hosted in the same - * process. + * @summary Gets the health of a Service Fabric stateful service replica or + * stateless service instance. * - * @param {string} nodeName The name of the node. + * Gets the health of a Service Fabric replica. + * Use EventsHealthStateFilter to filter the collection of health events + * reported on the replica based on the health state. * * @param {uuid} partitionId The identity of the partition. * @@ -55870,11 +53798,28 @@ class ServiceFabricClient extends ServiceClient { * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.forceRemove] Remove a Service Fabric application - * or service forcefully without going through the graceful shutdown sequence. - * This parameter can be used to forcefully delete an application or service - * for which delete is timing out due to issues in the service code that - * prevents graceful close of replicas. + * @param {number} [options.eventsHealthStateFilter] Allows filtering the + * collection of HealthEvent objects returned based on health state. + * The possible values for this parameter include integer value of one of the + * following health states. + * Only events that match the filter are returned. All events are used to + * evaluate the aggregated health state. + * If not specified, all entries are returned. The state values are flag-based + * enumeration, so the value could be a combination of these values, obtained + * using the bitwise 'OR' operator. For example, If the provided value is 6 + * then all of the events with HealthState value of OK (2) and Warning (4) are + * returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -55886,15 +53831,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - removeReplicaWithHttpOperationResponse(nodeName, partitionId, replicaId, options) { + getReplicaHealthWithHttpOperationResponse(partitionId, replicaId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._removeReplica(nodeName, partitionId, replicaId, options, (err, result, request, response) => { + self._getReplicaHealth(partitionId, replicaId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -55905,19 +53850,12 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Removes a service replica running on a node. - * - * This API simulates a Service Fabric replica failure by removing a replica - * from a Service Fabric cluster. The removal closes the replica, transitions - * the replica to the role None, and then removes all of the state information - * of the replica from the cluster. This API tests the replica state removal - * path, and simulates the report fault permanent path through client APIs. - * Warning - There are no safety checks performed when this API is used. - * Incorrect use of this API can lead to data loss for stateful services. In - * addition, the forceRemove flag impacts all other replicas hosted in the same - * process. + * @summary Gets the health of a Service Fabric stateful service replica or + * stateless service instance. * - * @param {string} nodeName The name of the node. + * Gets the health of a Service Fabric replica. + * Use EventsHealthStateFilter to filter the collection of health events + * reported on the replica based on the health state. * * @param {uuid} partitionId The identity of the partition. * @@ -55925,11 +53863,28 @@ class ServiceFabricClient extends ServiceClient { * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.forceRemove] Remove a Service Fabric application - * or service forcefully without going through the graceful shutdown sequence. - * This parameter can be used to forcefully delete an application or service - * for which delete is timing out due to issues in the service code that - * prevents graceful close of replicas. + * @param {number} [options.eventsHealthStateFilter] Allows filtering the + * collection of HealthEvent objects returned based on health state. + * The possible values for this parameter include integer value of one of the + * following health states. + * Only events that match the filter are returned. All events are used to + * evaluate the aggregated health state. + * If not specified, all entries are returned. The state values are flag-based + * enumeration, so the value could be a combination of these values, obtained + * using the bitwise 'OR' operator. For example, If the provided value is 6 + * then all of the events with HealthState value of OK (2) and Warning (4) are + * returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -55946,7 +53901,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {ReplicaHealth} - The deserialized result object. * * @reject {Error} - The error object. * @@ -55954,13 +53909,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ReplicaHealth} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - removeReplica(nodeName, partitionId, replicaId, options, optionalCallback) { + getReplicaHealth(partitionId, replicaId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -55969,36 +53925,132 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._removeReplica(nodeName, partitionId, replicaId, options, (err, result, request, response) => { + self._getReplicaHealth(partitionId, replicaId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._removeReplica(nodeName, partitionId, replicaId, options, optionalCallback); + return self._getReplicaHealth(partitionId, replicaId, options, optionalCallback); } } /** - * @summary Gets the list of service packages deployed on a Service Fabric - * node. + * @summary Gets the health of a Service Fabric stateful service replica or + * stateless service instance using the specified policy. * - * Returns the information about the service packages deployed on a Service - * Fabric node for the given application. + * Gets the health of a Service Fabric stateful service replica or stateless + * service instance. + * Use EventsHealthStateFilter to filter the collection of health events + * reported on the cluster based on the health state. + * Use ApplicationHealthPolicy to optionally override the health policies used + * to evaluate the health. This API only uses 'ConsiderWarningAsError' field of + * the ApplicationHealthPolicy. The rest of the fields are ignored while + * evaluating the health of the replica. * - * @param {string} nodeName The name of the node. + * @param {uuid} partitionId The identity of the partition. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. + * @param {string} replicaId The identifier of the replica. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.eventsHealthStateFilter] Allows filtering the + * collection of HealthEvent objects returned based on health state. + * The possible values for this parameter include integer value of one of the + * following health states. + * Only events that match the filter are returned. All events are used to + * evaluate the aggregated health state. + * If not specified, all entries are returned. The state values are flag-based + * enumeration, so the value could be a combination of these values, obtained + * using the bitwise 'OR' operator. For example, If the provided value is 6 + * then all of the events with HealthState value of OK (2) and Warning (4) are + * returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * @param {object} [options.applicationHealthPolicy] Describes the health + * policies used to evaluate the health of an application or one of its + * children. + * If not present, the health evaluation uses the health policy from + * application manifest or the default health policy. + * + * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. + * + * @param {number} + * [options.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] + * The maximum allowed percentage of unhealthy deployed applications. Allowed + * values are Byte values from zero to 100. + * The percentage represents the maximum tolerated percentage of deployed + * applications that can be unhealthy before the application is considered in + * error. + * This is calculated by dividing the number of unhealthy deployed applications + * over the number of nodes where the application is currently deployed on in + * the cluster. + * The computation rounds up to tolerate one failure on small numbers of nodes. + * Default percentage is zero. + * + * @param {object} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health + * policy used by default to evaluate the health of a service type. + * + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] + * The maximum allowed percentage of unhealthy partitions per service. Allowed + * values are Byte values from zero to 100 + * + * The percentage represents the maximum tolerated percentage of partitions + * that can be unhealthy before the service is considered in error. + * If the percentage is respected but there is at least one unhealthy + * partition, the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy partitions + * over the total number of partitions in the service. + * The computation rounds up to tolerate one failure on small numbers of + * partitions. Default percentage is zero. + * + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] + * The maximum allowed percentage of unhealthy replicas per partition. Allowed + * values are Byte values from zero to 100. + * + * The percentage represents the maximum tolerated percentage of replicas that + * can be unhealthy before the partition is considered in error. + * If the percentage is respected but there is at least one unhealthy replica, + * the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy replicas + * over the total number of replicas in the partition. + * The computation rounds up to tolerate one failure on small numbers of + * replicas. Default percentage is zero. + * + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. + * + * The percentage represents the maximum tolerated percentage of services that + * can be unhealthy before the application is considered in error. + * If the percentage is respected but there is at least one unhealthy service, + * the health is evaluated as Warning. + * This is calculated by dividing the number of unhealthy services of the + * specific service type over the total number of services of the specific + * service type. + * The computation rounds up to tolerate one failure on small numbers of + * services. Default percentage is zero. + * + * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -56009,15 +54061,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getDeployedServicePackageInfoListWithHttpOperationResponse(nodeName, applicationId, options) { + getReplicaHealthUsingPolicyWithHttpOperationResponse(partitionId, replicaId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getDeployedServicePackageInfoList(nodeName, applicationId, options, (err, result, request, response) => { + self._getReplicaHealthUsingPolicy(partitionId, replicaId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -56028,24 +54080,120 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the list of service packages deployed on a Service Fabric - * node. + * @summary Gets the health of a Service Fabric stateful service replica or + * stateless service instance using the specified policy. * - * Returns the information about the service packages deployed on a Service - * Fabric node for the given application. + * Gets the health of a Service Fabric stateful service replica or stateless + * service instance. + * Use EventsHealthStateFilter to filter the collection of health events + * reported on the cluster based on the health state. + * Use ApplicationHealthPolicy to optionally override the health policies used + * to evaluate the health. This API only uses 'ConsiderWarningAsError' field of + * the ApplicationHealthPolicy. The rest of the fields are ignored while + * evaluating the health of the replica. * - * @param {string} nodeName The name of the node. + * @param {uuid} partitionId The identity of the partition. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. + * @param {string} replicaId The identifier of the replica. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.eventsHealthStateFilter] Allows filtering the + * collection of HealthEvent objects returned based on health state. + * The possible values for this parameter include integer value of one of the + * following health states. + * Only events that match the filter are returned. All events are used to + * evaluate the aggregated health state. + * If not specified, all entries are returned. The state values are flag-based + * enumeration, so the value could be a combination of these values, obtained + * using the bitwise 'OR' operator. For example, If the provided value is 6 + * then all of the events with HealthState value of OK (2) and Warning (4) are + * returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * @param {object} [options.applicationHealthPolicy] Describes the health + * policies used to evaluate the health of an application or one of its + * children. + * If not present, the health evaluation uses the health policy from + * application manifest or the default health policy. + * + * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. + * + * @param {number} + * [options.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] + * The maximum allowed percentage of unhealthy deployed applications. Allowed + * values are Byte values from zero to 100. + * The percentage represents the maximum tolerated percentage of deployed + * applications that can be unhealthy before the application is considered in + * error. + * This is calculated by dividing the number of unhealthy deployed applications + * over the number of nodes where the application is currently deployed on in + * the cluster. + * The computation rounds up to tolerate one failure on small numbers of nodes. + * Default percentage is zero. + * + * @param {object} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health + * policy used by default to evaluate the health of a service type. + * + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] + * The maximum allowed percentage of unhealthy partitions per service. Allowed + * values are Byte values from zero to 100 + * + * The percentage represents the maximum tolerated percentage of partitions + * that can be unhealthy before the service is considered in error. + * If the percentage is respected but there is at least one unhealthy + * partition, the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy partitions + * over the total number of partitions in the service. + * The computation rounds up to tolerate one failure on small numbers of + * partitions. Default percentage is zero. + * + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] + * The maximum allowed percentage of unhealthy replicas per partition. Allowed + * values are Byte values from zero to 100. + * + * The percentage represents the maximum tolerated percentage of replicas that + * can be unhealthy before the partition is considered in error. + * If the percentage is respected but there is at least one unhealthy replica, + * the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy replicas + * over the total number of replicas in the partition. + * The computation rounds up to tolerate one failure on small numbers of + * replicas. Default percentage is zero. + * + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. + * + * The percentage represents the maximum tolerated percentage of services that + * can be unhealthy before the application is considered in error. + * If the percentage is respected but there is at least one unhealthy service, + * the health is evaluated as Warning. + * This is calculated by dividing the number of unhealthy services of the + * specific service type over the total number of services of the specific + * service type. + * The computation rounds up to tolerate one failure on small numbers of + * services. Default percentage is zero. + * + * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -56061,7 +54209,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {Array} - The deserialized result object. + * @resolve {ReplicaHealth} - The deserialized result object. * * @reject {Error} - The error object. * @@ -56069,13 +54217,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ReplicaHealth} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getDeployedServicePackageInfoList(nodeName, applicationId, options, optionalCallback) { + getReplicaHealthUsingPolicy(partitionId, replicaId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -56084,40 +54233,132 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getDeployedServicePackageInfoList(nodeName, applicationId, options, (err, result, request, response) => { + self._getReplicaHealthUsingPolicy(partitionId, replicaId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getDeployedServicePackageInfoList(nodeName, applicationId, options, optionalCallback); + return self._getReplicaHealthUsingPolicy(partitionId, replicaId, options, optionalCallback); } } /** - * @summary Gets the list of service packages deployed on a Service Fabric node - * matching exactly the specified name. + * @summary Sends a health report on the Service Fabric replica. * - * Returns the information about the service packages deployed on a Service - * Fabric node for the given application. These results are of service packages - * whose name match exactly the service package name specified as the - * parameter. + * Reports health state of the specified Service Fabric replica. The report + * must contain the information about the source of the health report and + * property on which it is reported. + * The report is sent to a Service Fabric gateway Replica, which forwards to + * the health store. + * The report may be accepted by the gateway, but rejected by the health store + * after extra validation. + * For example, the health store may reject the report because of an invalid + * parameter, like a stale sequence number. + * To see whether the report was applied in the health store, run + * GetReplicaHealth and check that the report appears in the HealthEvents + * section. + * + * @param {uuid} partitionId The identity of the partition. + * + * @param {string} replicaId The identifier of the replica. + * + * @param {string} replicaHealthReportServiceKind The kind of service replica + * (Stateless or Stateful) for which the health is being reported. Following + * are the possible values. Possible values include: 'Stateless', 'Stateful' + * + * @param {object} healthInformation Describes the health information for the + * health report. This information needs to be present in all of the health + * reports sent to the health manager. + * + * @param {string} healthInformation.sourceId The source name that identifies + * the client/watchdog/system component that generated the health information. + * + * @param {string} healthInformation.property The property of the health + * information. An entity can have health reports for different properties. + * The property is a string and not a fixed enumeration to allow the reporter + * flexibility to categorize the state condition that triggers the report. + * For example, a reporter with SourceId "LocalWatchdog" can monitor the state + * of the available disk on a node, + * so it can report "AvailableDisk" property on that node. + * The same reporter can monitor the node connectivity, so it can report a + * property "Connectivity" on the same node. + * In the health store, these reports are treated as separate health events for + * the specified node. + * + * Together with the SourceId, the property uniquely identifies the health + * information. + * + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' + * + * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The + * duration for which this health report is valid. This field uses ISO8601 + * format for specifying the duration. + * When clients report periodically, they should send reports with higher + * frequency than time to live. + * If clients report on transition, they can set the time to live to infinite. + * When time to live expires, the health event that contains the health + * information + * is either removed from health store, if RemoveWhenExpired is true, or + * evaluated at error, if RemoveWhenExpired false. * - * @param {string} nodeName The name of the node. + * If not specified, time to live defaults to infinite value. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. + * @param {string} [healthInformation.description] The description of the + * health information. It represents free text used to add human readable + * information about the report. + * The maximum string length for the description is 4096 characters. + * If the provided string is longer, it will be automatically truncated. + * When truncated, the last characters of the description contain a marker + * "[Truncated]", and total string size is 4096 characters. + * The presence of the marker indicates to users that truncation occurred. + * Note that when truncated, the description has less than 4096 characters from + * the original string. * - * @param {string} servicePackageName The name of the service package. + * @param {string} [healthInformation.sequenceNumber] The sequence number for + * this health report as a numeric string. + * The report sequence number is used by the health store to detect stale + * reports. + * If not specified, a sequence number is auto-generated by the health client + * when a report is added. + * + * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates + * whether the report is removed from health store when it expires. + * If set to true, the report is removed from the health store after it + * expires. + * If set to false, the report is treated as an error when expired. The value + * of this property is false by default. + * When clients report periodically, they should set RemoveWhenExpired false + * (default). + * This way, if the reporter has issues (e.g. deadlock) and can't report, the + * entity is evaluated at error when the health report expires. + * This flags the entity as being in Error health state. * * @param {object} [options] Optional Parameters. * + * @param {boolean} [options.immediate] A flag that indicates whether the + * report should be sent immediately. + * A health report is sent to a Service Fabric gateway Application, which + * forwards to the health store. + * If Immediate is set to true, the report is sent immediately from HTTP + * Gateway to the health store, regardless of the fabric client settings that + * the HTTP Gateway Application is using. + * This is useful for critical reports that should be sent as soon as possible. + * Depending on timing and other conditions, sending the report may still fail, + * for example if the HTTP Gateway is closed or the message doesn't reach the + * Gateway. + * If Immediate is set to false, the report is sent based on the health client + * settings from the HTTP Gateway. Therefore, it will be batched according to + * the HealthReportSendInterval configuration. + * This is the recommended setting because it allows the health client to + * optimize health reporting messages to health store as well as health report + * processing. + * By default, reports are not sent immediately. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -56128,15 +54369,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getDeployedServicePackageInfoListByNameWithHttpOperationResponse(nodeName, applicationId, servicePackageName, options) { + reportReplicaHealthWithHttpOperationResponse(partitionId, replicaId, replicaHealthReportServiceKind, healthInformation, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getDeployedServicePackageInfoListByName(nodeName, applicationId, servicePackageName, options, (err, result, request, response) => { + self._reportReplicaHealth(partitionId, replicaId, replicaHealthReportServiceKind, healthInformation, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -56147,28 +54388,120 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the list of service packages deployed on a Service Fabric node - * matching exactly the specified name. + * @summary Sends a health report on the Service Fabric replica. * - * Returns the information about the service packages deployed on a Service - * Fabric node for the given application. These results are of service packages - * whose name match exactly the service package name specified as the - * parameter. + * Reports health state of the specified Service Fabric replica. The report + * must contain the information about the source of the health report and + * property on which it is reported. + * The report is sent to a Service Fabric gateway Replica, which forwards to + * the health store. + * The report may be accepted by the gateway, but rejected by the health store + * after extra validation. + * For example, the health store may reject the report because of an invalid + * parameter, like a stale sequence number. + * To see whether the report was applied in the health store, run + * GetReplicaHealth and check that the report appears in the HealthEvents + * section. * - * @param {string} nodeName The name of the node. + * @param {uuid} partitionId The identity of the partition. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. + * @param {string} replicaId The identifier of the replica. * - * @param {string} servicePackageName The name of the service package. + * @param {string} replicaHealthReportServiceKind The kind of service replica + * (Stateless or Stateful) for which the health is being reported. Following + * are the possible values. Possible values include: 'Stateless', 'Stateful' + * + * @param {object} healthInformation Describes the health information for the + * health report. This information needs to be present in all of the health + * reports sent to the health manager. + * + * @param {string} healthInformation.sourceId The source name that identifies + * the client/watchdog/system component that generated the health information. + * + * @param {string} healthInformation.property The property of the health + * information. An entity can have health reports for different properties. + * The property is a string and not a fixed enumeration to allow the reporter + * flexibility to categorize the state condition that triggers the report. + * For example, a reporter with SourceId "LocalWatchdog" can monitor the state + * of the available disk on a node, + * so it can report "AvailableDisk" property on that node. + * The same reporter can monitor the node connectivity, so it can report a + * property "Connectivity" on the same node. + * In the health store, these reports are treated as separate health events for + * the specified node. + * + * Together with the SourceId, the property uniquely identifies the health + * information. + * + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' + * + * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The + * duration for which this health report is valid. This field uses ISO8601 + * format for specifying the duration. + * When clients report periodically, they should send reports with higher + * frequency than time to live. + * If clients report on transition, they can set the time to live to infinite. + * When time to live expires, the health event that contains the health + * information + * is either removed from health store, if RemoveWhenExpired is true, or + * evaluated at error, if RemoveWhenExpired false. + * + * If not specified, time to live defaults to infinite value. + * + * @param {string} [healthInformation.description] The description of the + * health information. It represents free text used to add human readable + * information about the report. + * The maximum string length for the description is 4096 characters. + * If the provided string is longer, it will be automatically truncated. + * When truncated, the last characters of the description contain a marker + * "[Truncated]", and total string size is 4096 characters. + * The presence of the marker indicates to users that truncation occurred. + * Note that when truncated, the description has less than 4096 characters from + * the original string. + * + * @param {string} [healthInformation.sequenceNumber] The sequence number for + * this health report as a numeric string. + * The report sequence number is used by the health store to detect stale + * reports. + * If not specified, a sequence number is auto-generated by the health client + * when a report is added. + * + * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates + * whether the report is removed from health store when it expires. + * If set to true, the report is removed from the health store after it + * expires. + * If set to false, the report is treated as an error when expired. The value + * of this property is false by default. + * When clients report periodically, they should set RemoveWhenExpired false + * (default). + * This way, if the reporter has issues (e.g. deadlock) and can't report, the + * entity is evaluated at error when the health report expires. + * This flags the entity as being in Error health state. * * @param {object} [options] Optional Parameters. * + * @param {boolean} [options.immediate] A flag that indicates whether the + * report should be sent immediately. + * A health report is sent to a Service Fabric gateway Application, which + * forwards to the health store. + * If Immediate is set to true, the report is sent immediately from HTTP + * Gateway to the health store, regardless of the fabric client settings that + * the HTTP Gateway Application is using. + * This is useful for critical reports that should be sent as soon as possible. + * Depending on timing and other conditions, sending the report may still fail, + * for example if the HTTP Gateway is closed or the message doesn't reach the + * Gateway. + * If Immediate is set to false, the report is sent based on the health client + * settings from the HTTP Gateway. Therefore, it will be batched according to + * the HealthReportSendInterval configuration. + * This is the recommended setting because it allows the health client to + * optimize health reporting messages to health store as well as health report + * processing. + * By default, reports are not sent immediately. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -56184,7 +54517,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {Array} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -56192,13 +54525,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getDeployedServicePackageInfoListByName(nodeName, applicationId, servicePackageName, options, optionalCallback) { + reportReplicaHealth(partitionId, replicaId, replicaHealthReportServiceKind, healthInformation, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -56207,25 +54540,26 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getDeployedServicePackageInfoListByName(nodeName, applicationId, servicePackageName, options, (err, result, request, response) => { + self._reportReplicaHealth(partitionId, replicaId, replicaHealthReportServiceKind, healthInformation, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getDeployedServicePackageInfoListByName(nodeName, applicationId, servicePackageName, options, optionalCallback); + return self._reportReplicaHealth(partitionId, replicaId, replicaHealthReportServiceKind, healthInformation, options, optionalCallback); } } /** - * @summary Gets the information about health of a service package for a - * specific application deployed for a Service Fabric node and application. + * @summary Gets the list of replicas deployed on a Service Fabric node. * - * Gets the information about health of a service package for a specific - * application deployed on a Service Fabric node. Use EventsHealthStateFilter - * to optionally filter for the collection of HealthEvent objects reported on - * the deployed service package based on health state. + * Gets the list containing the information about replicas deployed on a + * Service Fabric node. The information include partition ID, replica ID, + * status of the replica, name of the service, name of the service type, and + * other information. Use PartitionId or ServiceManifestName query parameters + * to return information about the deployed replicas matching the specified + * values for those parameters. * * @param {string} nodeName The name of the node. * @@ -56237,32 +54571,12 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * @param {string} servicePackageName The name of the service package. - * * @param {object} [options] Optional Parameters. * - * @param {number} [options.eventsHealthStateFilter] Allows filtering the - * collection of HealthEvent objects returned based on health state. - * The possible values for this parameter include integer value of one of the - * following health states. - * Only events that match the filter are returned. All events are used to - * evaluate the aggregated health state. - * If not specified, all entries are returned. The state values are flag-based - * enumeration, so the value could be a combination of these values, obtained - * using the bitwise 'OR' operator. For example, If the provided value is 6 - * then all of the events with HealthState value of OK (2) and Warning (4) are - * returned. + * @param {uuid} [options.partitionId] The identity of the partition. * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * @param {string} [options.serviceManifestName] The name of a service manifest + * registered as part of an application type in a Service Fabric cluster. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -56274,15 +54588,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getDeployedServicePackageHealthWithHttpOperationResponse(nodeName, applicationId, servicePackageName, options) { + getDeployedServiceReplicaInfoListWithHttpOperationResponse(nodeName, applicationId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getDeployedServicePackageHealth(nodeName, applicationId, servicePackageName, options, (err, result, request, response) => { + self._getDeployedServiceReplicaInfoList(nodeName, applicationId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -56293,13 +54607,14 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the information about health of a service package for a - * specific application deployed for a Service Fabric node and application. + * @summary Gets the list of replicas deployed on a Service Fabric node. * - * Gets the information about health of a service package for a specific - * application deployed on a Service Fabric node. Use EventsHealthStateFilter - * to optionally filter for the collection of HealthEvent objects reported on - * the deployed service package based on health state. + * Gets the list containing the information about replicas deployed on a + * Service Fabric node. The information include partition ID, replica ID, + * status of the replica, name of the service, name of the service type, and + * other information. Use PartitionId or ServiceManifestName query parameters + * to return information about the deployed replicas matching the specified + * values for those parameters. * * @param {string} nodeName The name of the node. * @@ -56311,32 +54626,12 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * @param {string} servicePackageName The name of the service package. - * * @param {object} [options] Optional Parameters. * - * @param {number} [options.eventsHealthStateFilter] Allows filtering the - * collection of HealthEvent objects returned based on health state. - * The possible values for this parameter include integer value of one of the - * following health states. - * Only events that match the filter are returned. All events are used to - * evaluate the aggregated health state. - * If not specified, all entries are returned. The state values are flag-based - * enumeration, so the value could be a combination of these values, obtained - * using the bitwise 'OR' operator. For example, If the provided value is 6 - * then all of the events with HealthState value of OK (2) and Warning (4) are - * returned. + * @param {uuid} [options.partitionId] The identity of the partition. * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * @param {string} [options.serviceManifestName] The name of a service manifest + * registered as part of an application type in a Service Fabric cluster. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -56353,7 +54648,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {DeployedServicePackageHealth} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error} - The error object. * @@ -56361,15 +54656,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DeployedServicePackageHealth} for more - * information. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getDeployedServicePackageHealth(nodeName, applicationId, servicePackageName, options, optionalCallback) { + getDeployedServiceReplicaInfoList(nodeName, applicationId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -56378,141 +54671,33 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getDeployedServicePackageHealth(nodeName, applicationId, servicePackageName, options, (err, result, request, response) => { + self._getDeployedServiceReplicaInfoList(nodeName, applicationId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getDeployedServicePackageHealth(nodeName, applicationId, servicePackageName, options, optionalCallback); + return self._getDeployedServiceReplicaInfoList(nodeName, applicationId, options, optionalCallback); } } /** - * @summary Gets the information about health of service package for a specific - * application deployed on a Service Fabric node using the specified policy. + * @summary Gets the details of replica deployed on a Service Fabric node. * - * Gets the information about health of a service package for a specific - * application deployed on a Service Fabric node. using the specified policy. - * Use EventsHealthStateFilter to optionally filter for the collection of - * HealthEvent objects reported on the deployed service package based on health - * state. Use ApplicationHealthPolicy to optionally override the health - * policies used to evaluate the health. This API only uses - * 'ConsiderWarningAsError' field of the ApplicationHealthPolicy. The rest of - * the fields are ignored while evaluating the health of the deployed service - * package. + * Gets the details of the replica deployed on a Service Fabric node. The + * information includes service kind, service name, current service operation, + * current service operation start date time, partition ID, replica/instance + * ID, reported load, and other information. * * @param {string} nodeName The name of the node. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. + * @param {uuid} partitionId The identity of the partition. * - * @param {string} servicePackageName The name of the service package. + * @param {string} replicaId The identifier of the replica. * * @param {object} [options] Optional Parameters. * - * @param {number} [options.eventsHealthStateFilter] Allows filtering the - * collection of HealthEvent objects returned based on health state. - * The possible values for this parameter include integer value of one of the - * following health states. - * Only events that match the filter are returned. All events are used to - * evaluate the aggregated health state. - * If not specified, all entries are returned. The state values are flag-based - * enumeration, so the value could be a combination of these values, obtained - * using the bitwise 'OR' operator. For example, If the provided value is 6 - * then all of the events with HealthState value of OK (2) and Warning (4) are - * returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. - * - * @param {object} [options.applicationHealthPolicy] Describes the health - * policies used to evaluate the health of an application or one of its - * children. - * If not present, the health evaluation uses the health policy from - * application manifest or the default health policy. - * - * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. - * - * @param {number} - * [options.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] - * The maximum allowed percentage of unhealthy deployed applications. Allowed - * values are Byte values from zero to 100. - * The percentage represents the maximum tolerated percentage of deployed - * applications that can be unhealthy before the application is considered in - * error. - * This is calculated by dividing the number of unhealthy deployed applications - * over the number of nodes where the application is currently deployed on in - * the cluster. - * The computation rounds up to tolerate one failure on small numbers of nodes. - * Default percentage is zero. - * - * @param {object} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health - * policy used by default to evaluate the health of a service type. - * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] - * The maximum allowed percentage of unhealthy partitions per service. Allowed - * values are Byte values from zero to 100 - * - * The percentage represents the maximum tolerated percentage of partitions - * that can be unhealthy before the service is considered in error. - * If the percentage is respected but there is at least one unhealthy - * partition, the health is evaluated as Warning. - * The percentage is calculated by dividing the number of unhealthy partitions - * over the total number of partitions in the service. - * The computation rounds up to tolerate one failure on small numbers of - * partitions. Default percentage is zero. - * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] - * The maximum allowed percentage of unhealthy replicas per partition. Allowed - * values are Byte values from zero to 100. - * - * The percentage represents the maximum tolerated percentage of replicas that - * can be unhealthy before the partition is considered in error. - * If the percentage is respected but there is at least one unhealthy replica, - * the health is evaluated as Warning. - * The percentage is calculated by dividing the number of unhealthy replicas - * over the total number of replicas in the partition. - * The computation rounds up to tolerate one failure on small numbers of - * replicas. Default percentage is zero. - * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. - * - * The percentage represents the maximum tolerated percentage of services that - * can be unhealthy before the application is considered in error. - * If the percentage is respected but there is at least one unhealthy service, - * the health is evaluated as Warning. - * This is calculated by dividing the number of unhealthy services of the - * specific service type over the total number of services of the specific - * service type. - * The computation rounds up to tolerate one failure on small numbers of - * services. Default percentage is zero. - * - * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] - * The map with service type health policy per service type name. The map is - * empty by default. - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -56521,149 +54706,41 @@ class ServiceFabricClient extends ServiceClient { * @param {object} [options.customHeaders] Headers that will be added to the * request * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error} - The error object. - */ - getDeployedServicePackageHealthUsingPolicyWithHttpOperationResponse(nodeName, applicationId, servicePackageName, options) { - let client = this; - let self = this; - return new Promise((resolve, reject) => { - self._getDeployedServicePackageHealthUsingPolicy(nodeName, applicationId, servicePackageName, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * @summary Gets the information about health of service package for a specific - * application deployed on a Service Fabric node using the specified policy. - * - * Gets the information about health of a service package for a specific - * application deployed on a Service Fabric node. using the specified policy. - * Use EventsHealthStateFilter to optionally filter for the collection of - * HealthEvent objects reported on the deployed service package based on health - * state. Use ApplicationHealthPolicy to optionally override the health - * policies used to evaluate the health. This API only uses - * 'ConsiderWarningAsError' field of the ApplicationHealthPolicy. The rest of - * the fields are ignored while evaluating the health of the deployed service - * package. - * - * @param {string} nodeName The name of the node. - * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. - * - * @param {string} servicePackageName The name of the service package. - * - * @param {object} [options] Optional Parameters. - * - * @param {number} [options.eventsHealthStateFilter] Allows filtering the - * collection of HealthEvent objects returned based on health state. - * The possible values for this parameter include integer value of one of the - * following health states. - * Only events that match the filter are returned. All events are used to - * evaluate the aggregated health state. - * If not specified, all entries are returned. The state values are flag-based - * enumeration, so the value could be a combination of these values, obtained - * using the bitwise 'OR' operator. For example, If the provided value is 6 - * then all of the events with HealthState value of OK (2) and Warning (4) are - * returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. - * - * @param {object} [options.applicationHealthPolicy] Describes the health - * policies used to evaluate the health of an application or one of its - * children. - * If not present, the health evaluation uses the health policy from - * application manifest or the default health policy. - * - * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. - * - * @param {number} - * [options.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] - * The maximum allowed percentage of unhealthy deployed applications. Allowed - * values are Byte values from zero to 100. - * The percentage represents the maximum tolerated percentage of deployed - * applications that can be unhealthy before the application is considered in - * error. - * This is calculated by dividing the number of unhealthy deployed applications - * over the number of nodes where the application is currently deployed on in - * the cluster. - * The computation rounds up to tolerate one failure on small numbers of nodes. - * Default percentage is zero. - * - * @param {object} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health - * policy used by default to evaluate the health of a service type. - * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] - * The maximum allowed percentage of unhealthy partitions per service. Allowed - * values are Byte values from zero to 100 - * - * The percentage represents the maximum tolerated percentage of partitions - * that can be unhealthy before the service is considered in error. - * If the percentage is respected but there is at least one unhealthy - * partition, the health is evaluated as Warning. - * The percentage is calculated by dividing the number of unhealthy partitions - * over the total number of partitions in the service. - * The computation rounds up to tolerate one failure on small numbers of - * partitions. Default percentage is zero. + * @returns {Promise} A promise is returned * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] - * The maximum allowed percentage of unhealthy replicas per partition. Allowed - * values are Byte values from zero to 100. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * The percentage represents the maximum tolerated percentage of replicas that - * can be unhealthy before the partition is considered in error. - * If the percentage is respected but there is at least one unhealthy replica, - * the health is evaluated as Warning. - * The percentage is calculated by dividing the number of unhealthy replicas - * over the total number of replicas in the partition. - * The computation rounds up to tolerate one failure on small numbers of - * replicas. Default percentage is zero. + * @reject {Error} - The error object. + */ + getDeployedServiceReplicaDetailInfoWithHttpOperationResponse(nodeName, partitionId, replicaId, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getDeployedServiceReplicaDetailInfo(nodeName, partitionId, replicaId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets the details of replica deployed on a Service Fabric node. * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * Gets the details of the replica deployed on a Service Fabric node. The + * information includes service kind, service name, current service operation, + * current service operation start date time, partition ID, replica/instance + * ID, reported load, and other information. * - * The percentage represents the maximum tolerated percentage of services that - * can be unhealthy before the application is considered in error. - * If the percentage is respected but there is at least one unhealthy service, - * the health is evaluated as Warning. - * This is calculated by dividing the number of unhealthy services of the - * specific service type over the total number of services of the specific - * service type. - * The computation rounds up to tolerate one failure on small numbers of - * services. Default percentage is zero. + * @param {string} nodeName The name of the node. * - * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] - * The map with service type health policy per service type name. The map is - * empty by default. + * @param {uuid} partitionId The identity of the partition. + * + * @param {string} replicaId The identifier of the replica. + * + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -56680,7 +54757,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {DeployedServicePackageHealth} - The deserialized result object. + * @resolve {DeployedServiceReplicaDetailInfo} - The deserialized result object. * * @reject {Error} - The error object. * @@ -56689,14 +54766,14 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DeployedServicePackageHealth} for more + * See {@link DeployedServiceReplicaDetailInfo} for more * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getDeployedServicePackageHealthUsingPolicy(nodeName, applicationId, servicePackageName, options, optionalCallback) { + getDeployedServiceReplicaDetailInfo(nodeName, partitionId, replicaId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -56705,137 +54782,31 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getDeployedServicePackageHealthUsingPolicy(nodeName, applicationId, servicePackageName, options, (err, result, request, response) => { + self._getDeployedServiceReplicaDetailInfo(nodeName, partitionId, replicaId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getDeployedServicePackageHealthUsingPolicy(nodeName, applicationId, servicePackageName, options, optionalCallback); + return self._getDeployedServiceReplicaDetailInfo(nodeName, partitionId, replicaId, options, optionalCallback); } } /** - * @summary Sends a health report on the Service Fabric deployed service - * package. + * @summary Gets the details of replica deployed on a Service Fabric node. * - * Reports health state of the service package of the application deployed on a - * Service Fabric node. The report must contain the information about the - * source of the health report and property on which it is reported. - * The report is sent to a Service Fabric gateway Service, which forwards to - * the health store. - * The report may be accepted by the gateway, but rejected by the health store - * after extra validation. - * For example, the health store may reject the report because of an invalid - * parameter, like a stale sequence number. - * To see whether the report was applied in the health store, get deployed - * service package health and check that the report appears in the HealthEvents - * section. + * Gets the details of the replica deployed on a Service Fabric node. The + * information includes service kind, service name, current service operation, + * current service operation start date time, partition ID, replica/instance + * ID, reported load, and other information. * * @param {string} nodeName The name of the node. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. - * - * @param {string} servicePackageName The name of the service package. - * - * @param {object} healthInformation Describes the health information for the - * health report. This information needs to be present in all of the health - * reports sent to the health manager. - * - * @param {string} healthInformation.sourceId The source name that identifies - * the client/watchdog/system component that generated the health information. - * - * @param {string} healthInformation.property The property of the health - * information. An entity can have health reports for different properties. - * The property is a string and not a fixed enumeration to allow the reporter - * flexibility to categorize the state condition that triggers the report. - * For example, a reporter with SourceId "LocalWatchdog" can monitor the state - * of the available disk on a node, - * so it can report "AvailableDisk" property on that node. - * The same reporter can monitor the node connectivity, so it can report a - * property "Connectivity" on the same node. - * In the health store, these reports are treated as separate health events for - * the specified node. - * - * Together with the SourceId, the property uniquely identifies the health - * information. - * - * @param {string} healthInformation.healthState The health state of a Service - * Fabric entity such as Cluster, Node, Application, Service, Partition, - * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - * 'Unknown' - * - * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field uses ISO8601 - * format for specifying the duration. - * When clients report periodically, they should send reports with higher - * frequency than time to live. - * If clients report on transition, they can set the time to live to infinite. - * When time to live expires, the health event that contains the health - * information - * is either removed from health store, if RemoveWhenExpired is true, or - * evaluated at error, if RemoveWhenExpired false. - * - * If not specified, time to live defaults to infinite value. - * - * @param {string} [healthInformation.description] The description of the - * health information. It represents free text used to add human readable - * information about the report. - * The maximum string length for the description is 4096 characters. - * If the provided string is longer, it will be automatically truncated. - * When truncated, the last characters of the description contain a marker - * "[Truncated]", and total string size is 4096 characters. - * The presence of the marker indicates to users that truncation occurred. - * Note that when truncated, the description has less than 4096 characters from - * the original string. - * - * @param {string} [healthInformation.sequenceNumber] The sequence number for - * this health report as a numeric string. - * The report sequence number is used by the health store to detect stale - * reports. - * If not specified, a sequence number is auto-generated by the health client - * when a report is added. - * - * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates - * whether the report is removed from health store when it expires. - * If set to true, the report is removed from the health store after it - * expires. - * If set to false, the report is treated as an error when expired. The value - * of this property is false by default. - * When clients report periodically, they should set RemoveWhenExpired false - * (default). - * This way, is the reporter has issues (eg. deadlock) and can't report, the - * entity is evaluated at error when the health report expires. - * This flags the entity as being in Error health state. + * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.immediate] A flag that indicates whether the - * report should be sent immediately. - * A health report is sent to a Service Fabric gateway Application, which - * forwards to the health store. - * If Immediate is set to true, the report is sent immediately from HTTP - * Gateway to the health store, regardless of the fabric client settings that - * the HTTP Gateway Application is using. - * This is useful for critical reports that should be sent as soon as possible. - * Depending on timing and other conditions, sending the report may still fail, - * for example if the HTTP Gateway is closed or the message doesn't reach the - * Gateway. - * If Immediate is set to false, the report is sent based on the health client - * settings from the HTTP Gateway. Therefore, it will be batched according to - * the HealthReportSendInterval configuration. - * This is the recommended setting because it allows the health client to - * optimize health reporting messages to health store as well as health report - * processing. - * By default, reports are not sent immediately. - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -56846,15 +54817,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - reportDeployedServicePackageHealthWithHttpOperationResponse(nodeName, applicationId, servicePackageName, healthInformation, options) { + getDeployedServiceReplicaDetailInfoByPartitionIdWithHttpOperationResponse(nodeName, partitionId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._reportDeployedServicePackageHealth(nodeName, applicationId, servicePackageName, healthInformation, options, (err, result, request, response) => { + self._getDeployedServiceReplicaDetailInfoByPartitionId(nodeName, partitionId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -56865,125 +54836,19 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Sends a health report on the Service Fabric deployed service - * package. + * @summary Gets the details of replica deployed on a Service Fabric node. * - * Reports health state of the service package of the application deployed on a - * Service Fabric node. The report must contain the information about the - * source of the health report and property on which it is reported. - * The report is sent to a Service Fabric gateway Service, which forwards to - * the health store. - * The report may be accepted by the gateway, but rejected by the health store - * after extra validation. - * For example, the health store may reject the report because of an invalid - * parameter, like a stale sequence number. - * To see whether the report was applied in the health store, get deployed - * service package health and check that the report appears in the HealthEvents - * section. + * Gets the details of the replica deployed on a Service Fabric node. The + * information includes service kind, service name, current service operation, + * current service operation start date time, partition ID, replica/instance + * ID, reported load, and other information. * * @param {string} nodeName The name of the node. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. - * - * @param {string} servicePackageName The name of the service package. - * - * @param {object} healthInformation Describes the health information for the - * health report. This information needs to be present in all of the health - * reports sent to the health manager. - * - * @param {string} healthInformation.sourceId The source name that identifies - * the client/watchdog/system component that generated the health information. - * - * @param {string} healthInformation.property The property of the health - * information. An entity can have health reports for different properties. - * The property is a string and not a fixed enumeration to allow the reporter - * flexibility to categorize the state condition that triggers the report. - * For example, a reporter with SourceId "LocalWatchdog" can monitor the state - * of the available disk on a node, - * so it can report "AvailableDisk" property on that node. - * The same reporter can monitor the node connectivity, so it can report a - * property "Connectivity" on the same node. - * In the health store, these reports are treated as separate health events for - * the specified node. - * - * Together with the SourceId, the property uniquely identifies the health - * information. - * - * @param {string} healthInformation.healthState The health state of a Service - * Fabric entity such as Cluster, Node, Application, Service, Partition, - * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - * 'Unknown' - * - * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field uses ISO8601 - * format for specifying the duration. - * When clients report periodically, they should send reports with higher - * frequency than time to live. - * If clients report on transition, they can set the time to live to infinite. - * When time to live expires, the health event that contains the health - * information - * is either removed from health store, if RemoveWhenExpired is true, or - * evaluated at error, if RemoveWhenExpired false. - * - * If not specified, time to live defaults to infinite value. - * - * @param {string} [healthInformation.description] The description of the - * health information. It represents free text used to add human readable - * information about the report. - * The maximum string length for the description is 4096 characters. - * If the provided string is longer, it will be automatically truncated. - * When truncated, the last characters of the description contain a marker - * "[Truncated]", and total string size is 4096 characters. - * The presence of the marker indicates to users that truncation occurred. - * Note that when truncated, the description has less than 4096 characters from - * the original string. - * - * @param {string} [healthInformation.sequenceNumber] The sequence number for - * this health report as a numeric string. - * The report sequence number is used by the health store to detect stale - * reports. - * If not specified, a sequence number is auto-generated by the health client - * when a report is added. - * - * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates - * whether the report is removed from health store when it expires. - * If set to true, the report is removed from the health store after it - * expires. - * If set to false, the report is treated as an error when expired. The value - * of this property is false by default. - * When clients report periodically, they should set RemoveWhenExpired false - * (default). - * This way, is the reporter has issues (eg. deadlock) and can't report, the - * entity is evaluated at error when the health report expires. - * This flags the entity as being in Error health state. + * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.immediate] A flag that indicates whether the - * report should be sent immediately. - * A health report is sent to a Service Fabric gateway Application, which - * forwards to the health store. - * If Immediate is set to true, the report is sent immediately from HTTP - * Gateway to the health store, regardless of the fabric client settings that - * the HTTP Gateway Application is using. - * This is useful for critical reports that should be sent as soon as possible. - * Depending on timing and other conditions, sending the report may still fail, - * for example if the HTTP Gateway is closed or the message doesn't reach the - * Gateway. - * If Immediate is set to false, the report is sent based on the health client - * settings from the HTTP Gateway. Therefore, it will be batched according to - * the HealthReportSendInterval configuration. - * This is the recommended setting because it allows the health client to - * optimize health reporting messages to health store as well as health report - * processing. - * By default, reports are not sent immediately. - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -56999,7 +54864,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {DeployedServiceReplicaDetailInfo} - The deserialized result object. * * @reject {Error} - The error object. * @@ -57007,13 +54872,15 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DeployedServiceReplicaDetailInfo} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - reportDeployedServicePackageHealth(nodeName, applicationId, servicePackageName, healthInformation, options, optionalCallback) { + getDeployedServiceReplicaDetailInfoByPartitionId(nodeName, partitionId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -57022,47 +54889,30 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._reportDeployedServicePackageHealth(nodeName, applicationId, servicePackageName, healthInformation, options, (err, result, request, response) => { + self._getDeployedServiceReplicaDetailInfoByPartitionId(nodeName, partitionId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._reportDeployedServicePackageHealth(nodeName, applicationId, servicePackageName, healthInformation, options, optionalCallback); + return self._getDeployedServiceReplicaDetailInfoByPartitionId(nodeName, partitionId, options, optionalCallback); } } /** - * @summary Downloads all of the code packages associated with specified - * service manifest on the specified node. + * @summary Restarts a service replica of a persisted service running on a + * node. * - * This API provides a way to download code packages including the container - * images on a specific node outside of the normal application deployment and - * upgrade path. This is useful for the large code packages and container - * images to be present on the node before the actual application deployment - * and upgrade, thus significantly reducing the total time required for the - * deployment or upgrade. + * Restarts a service replica of a persisted service running on a node. Warning + * - There are no safety checks performed when this API is used. Incorrect use + * of this API can lead to availability loss for stateful services. * * @param {string} nodeName The name of the node. * - * @param {object} deployServicePackageToNodeDescription Describes information - * for deploying a service package to a Service Fabric node. - * - * @param {string} deployServicePackageToNodeDescription.serviceManifestName - * The name of service manifest whose packages need to be downloaded. - * - * @param {string} deployServicePackageToNodeDescription.applicationTypeName - * The application type name as defined in the application manifest. - * - * @param {string} deployServicePackageToNodeDescription.applicationTypeVersion - * The version of the application type as defined in the application manifest. - * - * @param {string} deployServicePackageToNodeDescription.nodeName The name of a - * Service Fabric node. + * @param {uuid} partitionId The identity of the partition. * - * @param {array} [deployServicePackageToNodeDescription.packageSharingPolicy] - * List of package sharing policy information. + * @param {string} replicaId The identifier of the replica. * * @param {object} [options] Optional Parameters. * @@ -57080,11 +54930,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - deployServicePackageToNodeWithHttpOperationResponse(nodeName, deployServicePackageToNodeDescription, options) { + restartReplicaWithHttpOperationResponse(nodeName, partitionId, replicaId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._deployServicePackageToNode(nodeName, deployServicePackageToNodeDescription, options, (err, result, request, response) => { + self._restartReplica(nodeName, partitionId, replicaId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -57095,35 +54945,18 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Downloads all of the code packages associated with specified - * service manifest on the specified node. + * @summary Restarts a service replica of a persisted service running on a + * node. * - * This API provides a way to download code packages including the container - * images on a specific node outside of the normal application deployment and - * upgrade path. This is useful for the large code packages and container - * images to be present on the node before the actual application deployment - * and upgrade, thus significantly reducing the total time required for the - * deployment or upgrade. + * Restarts a service replica of a persisted service running on a node. Warning + * - There are no safety checks performed when this API is used. Incorrect use + * of this API can lead to availability loss for stateful services. * * @param {string} nodeName The name of the node. * - * @param {object} deployServicePackageToNodeDescription Describes information - * for deploying a service package to a Service Fabric node. - * - * @param {string} deployServicePackageToNodeDescription.serviceManifestName - * The name of service manifest whose packages need to be downloaded. - * - * @param {string} deployServicePackageToNodeDescription.applicationTypeName - * The application type name as defined in the application manifest. - * - * @param {string} deployServicePackageToNodeDescription.applicationTypeVersion - * The version of the application type as defined in the application manifest. - * - * @param {string} deployServicePackageToNodeDescription.nodeName The name of a - * Service Fabric node. + * @param {uuid} partitionId The identity of the partition. * - * @param {array} [deployServicePackageToNodeDescription.packageSharingPolicy] - * List of package sharing policy information. + * @param {string} replicaId The identifier of the replica. * * @param {object} [options] Optional Parameters. * @@ -57156,7 +54989,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deployServicePackageToNode(nodeName, deployServicePackageToNodeDescription, options, optionalCallback) { + restartReplica(nodeName, partitionId, replicaId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -57165,41 +54998,43 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deployServicePackageToNode(nodeName, deployServicePackageToNodeDescription, options, (err, result, request, response) => { + self._restartReplica(nodeName, partitionId, replicaId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deployServicePackageToNode(nodeName, deployServicePackageToNodeDescription, options, optionalCallback); + return self._restartReplica(nodeName, partitionId, replicaId, options, optionalCallback); } } /** - * @summary Gets the list of code packages deployed on a Service Fabric node. + * @summary Removes a service replica running on a node. * - * Gets the list of code packages deployed on a Service Fabric node for the - * given application. + * This API simulates a Service Fabric replica failure by removing a replica + * from a Service Fabric cluster. The removal closes the replica, transitions + * the replica to the role None, and then removes all of the state information + * of the replica from the cluster. This API tests the replica state removal + * path, and simulates the report fault permanent path through client APIs. + * Warning - There are no safety checks performed when this API is used. + * Incorrect use of this API can lead to data loss for stateful services. In + * addition, the forceRemove flag impacts all other replicas hosted in the same + * process. * * @param {string} nodeName The name of the node. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. + * @param {uuid} partitionId The identity of the partition. * - * @param {object} [options] Optional Parameters. + * @param {string} replicaId The identifier of the replica. * - * @param {string} [options.serviceManifestName] The name of a service manifest - * registered as part of an application type in a Service Fabric cluster. + * @param {object} [options] Optional Parameters. * - * @param {string} [options.codePackageName] The name of code package specified - * in service manifest registered as part of an application type in a Service - * Fabric cluster. + * @param {boolean} [options.forceRemove] Remove a Service Fabric application + * or service forcefully without going through the graceful shutdown sequence. + * This parameter can be used to forcefully delete an application or service + * for which delete is timing out due to issues in the service code that + * prevents graceful close of replicas. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -57211,15 +55046,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getDeployedCodePackageInfoListWithHttpOperationResponse(nodeName, applicationId, options) { + removeReplicaWithHttpOperationResponse(nodeName, partitionId, replicaId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getDeployedCodePackageInfoList(nodeName, applicationId, options, (err, result, request, response) => { + self._removeReplica(nodeName, partitionId, replicaId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -57230,29 +55065,31 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the list of code packages deployed on a Service Fabric node. + * @summary Removes a service replica running on a node. * - * Gets the list of code packages deployed on a Service Fabric node for the - * given application. + * This API simulates a Service Fabric replica failure by removing a replica + * from a Service Fabric cluster. The removal closes the replica, transitions + * the replica to the role None, and then removes all of the state information + * of the replica from the cluster. This API tests the replica state removal + * path, and simulates the report fault permanent path through client APIs. + * Warning - There are no safety checks performed when this API is used. + * Incorrect use of this API can lead to data loss for stateful services. In + * addition, the forceRemove flag impacts all other replicas hosted in the same + * process. * * @param {string} nodeName The name of the node. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. + * @param {uuid} partitionId The identity of the partition. * - * @param {object} [options] Optional Parameters. + * @param {string} replicaId The identifier of the replica. * - * @param {string} [options.serviceManifestName] The name of a service manifest - * registered as part of an application type in a Service Fabric cluster. + * @param {object} [options] Optional Parameters. * - * @param {string} [options.codePackageName] The name of code package specified - * in service manifest registered as part of an application type in a Service - * Fabric cluster. + * @param {boolean} [options.forceRemove] Remove a Service Fabric application + * or service forcefully without going through the graceful shutdown sequence. + * This parameter can be used to forcefully delete an application or service + * for which delete is timing out due to issues in the service code that + * prevents graceful close of replicas. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -57269,7 +55106,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {Array} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -57277,13 +55114,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getDeployedCodePackageInfoList(nodeName, applicationId, options, optionalCallback) { + removeReplica(nodeName, partitionId, replicaId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -57292,63 +55129,33 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getDeployedCodePackageInfoList(nodeName, applicationId, options, (err, result, request, response) => { + self._removeReplica(nodeName, partitionId, replicaId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getDeployedCodePackageInfoList(nodeName, applicationId, options, optionalCallback); + return self._removeReplica(nodeName, partitionId, replicaId, options, optionalCallback); } } /** - * @summary Restarts a code package deployed on a Service Fabric node in a - * cluster. - * - * Restarts a code package deployed on a Service Fabric node in a cluster. This - * aborts the code package process, which will restart all the user service - * replicas hosted in that process. - * - * @param {string} nodeName The name of the node. - * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. - * - * @param {object} restartDeployedCodePackageDescription Describes the deployed - * code package on Service Fabric node to restart. - * - * @param {string} restartDeployedCodePackageDescription.serviceManifestName - * The name of service manifest that specified this code package. - * - * @param {string} - * [restartDeployedCodePackageDescription.servicePackageActivationId] The - * ActivationId of a deployed service package. If ServicePackageActivationMode - * specified at the time of creating the service - * is 'SharedProcess' (or if it is not specified, in which case it defaults to - * 'SharedProcess'), then value of ServicePackageActivationId - * is always an empty string. + * @summary Gets the list of service packages deployed on a Service Fabric + * node. * - * @param {string} restartDeployedCodePackageDescription.codePackageName The - * name of the code package defined in the service manifest. + * Returns the information about the service packages deployed on a Service + * Fabric node for the given application. * - * @param {string} restartDeployedCodePackageDescription.codePackageInstanceId - * The instance ID for currently running entry point. For a code package setup - * entry point (if specified) runs first and after it finishes main entry point - * is started. - * Each time entry point executable is run, its instance ID will change. If 0 - * is passed in as the code package instance ID, the API will restart the code - * package with whatever instance ID it is currently running. - * If an instance ID other than 0 is passed in, the API will restart the code - * package only if the current Instance ID matches the passed in instance ID. - * Note, passing in the exact instance ID (not 0) in the API is safer, because - * if ensures at most one restart of the code package. + * @param {string} nodeName The name of the node. + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * previous versions. * * @param {object} [options] Optional Parameters. * @@ -57362,15 +55169,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - restartDeployedCodePackageWithHttpOperationResponse(nodeName, applicationId, restartDeployedCodePackageDescription, options) { + getDeployedServicePackageInfoListWithHttpOperationResponse(nodeName, applicationId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._restartDeployedCodePackage(nodeName, applicationId, restartDeployedCodePackageDescription, options, (err, result, request, response) => { + self._getDeployedServicePackageInfoList(nodeName, applicationId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -57381,12 +55188,11 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Restarts a code package deployed on a Service Fabric node in a - * cluster. + * @summary Gets the list of service packages deployed on a Service Fabric + * node. * - * Restarts a code package deployed on a Service Fabric node in a cluster. This - * aborts the code package process, which will restart all the user service - * replicas hosted in that process. + * Returns the information about the service packages deployed on a Service + * Fabric node for the given application. * * @param {string} nodeName The name of the node. * @@ -57398,35 +55204,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * @param {object} restartDeployedCodePackageDescription Describes the deployed - * code package on Service Fabric node to restart. - * - * @param {string} restartDeployedCodePackageDescription.serviceManifestName - * The name of service manifest that specified this code package. - * - * @param {string} - * [restartDeployedCodePackageDescription.servicePackageActivationId] The - * ActivationId of a deployed service package. If ServicePackageActivationMode - * specified at the time of creating the service - * is 'SharedProcess' (or if it is not specified, in which case it defaults to - * 'SharedProcess'), then value of ServicePackageActivationId - * is always an empty string. - * - * @param {string} restartDeployedCodePackageDescription.codePackageName The - * name of the code package defined in the service manifest. - * - * @param {string} restartDeployedCodePackageDescription.codePackageInstanceId - * The instance ID for currently running entry point. For a code package setup - * entry point (if specified) runs first and after it finishes main entry point - * is started. - * Each time entry point executable is run, its instance ID will change. If 0 - * is passed in as the code package instance ID, the API will restart the code - * package with whatever instance ID it is currently running. - * If an instance ID other than 0 is passed in, the API will restart the code - * package only if the current Instance ID matches the passed in instance ID. - * Note, passing in the exact instance ID (not 0) in the API is safer, because - * if ensures at most one restart of the code package. - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -57444,7 +55221,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error} - The error object. * @@ -57452,13 +55229,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - restartDeployedCodePackage(nodeName, applicationId, restartDeployedCodePackageDescription, options, optionalCallback) { + getDeployedServicePackageInfoList(nodeName, applicationId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -57467,23 +55244,25 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._restartDeployedCodePackage(nodeName, applicationId, restartDeployedCodePackageDescription, options, (err, result, request, response) => { + self._getDeployedServicePackageInfoList(nodeName, applicationId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._restartDeployedCodePackage(nodeName, applicationId, restartDeployedCodePackageDescription, options, optionalCallback); + return self._getDeployedServicePackageInfoList(nodeName, applicationId, options, optionalCallback); } } /** - * @summary Gets the container logs for container deployed on a Service Fabric - * node. + * @summary Gets the list of service packages deployed on a Service Fabric node + * matching exactly the specified name. * - * Gets the container logs for container deployed on a Service Fabric node for - * the given code package. + * Returns the information about the service packages deployed on a Service + * Fabric node for the given application. These results are of service packages + * whose name match exactly the service package name specified as the + * parameter. * * @param {string} nodeName The name of the node. * @@ -57495,21 +55274,10 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * @param {string} serviceManifestName The name of a service manifest - * registered as part of an application type in a Service Fabric cluster. - * - * @param {string} codePackageName The name of code package specified in - * service manifest registered as part of an application type in a Service - * Fabric cluster. + * @param {string} servicePackageName The name of the service package. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.tail] Number of lines to show from the end of the - * logs. Default is 100. 'all' to show the complete logs. - * - * @param {boolean} [options.previous] Specifies whether to get container logs - * from exited/dead containers of the code package instance. - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -57520,15 +55288,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getContainerLogsDeployedOnNodeWithHttpOperationResponse(nodeName, applicationId, serviceManifestName, codePackageName, options) { + getDeployedServicePackageInfoListByNameWithHttpOperationResponse(nodeName, applicationId, servicePackageName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getContainerLogsDeployedOnNode(nodeName, applicationId, serviceManifestName, codePackageName, options, (err, result, request, response) => { + self._getDeployedServicePackageInfoListByName(nodeName, applicationId, servicePackageName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -57539,11 +55307,13 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the container logs for container deployed on a Service Fabric - * node. + * @summary Gets the list of service packages deployed on a Service Fabric node + * matching exactly the specified name. * - * Gets the container logs for container deployed on a Service Fabric node for - * the given code package. + * Returns the information about the service packages deployed on a Service + * Fabric node for the given application. These results are of service packages + * whose name match exactly the service package name specified as the + * parameter. * * @param {string} nodeName The name of the node. * @@ -57555,21 +55325,10 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * @param {string} serviceManifestName The name of a service manifest - * registered as part of an application type in a Service Fabric cluster. - * - * @param {string} codePackageName The name of code package specified in - * service manifest registered as part of an application type in a Service - * Fabric cluster. + * @param {string} servicePackageName The name of the service package. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.tail] Number of lines to show from the end of the - * logs. Default is 100. 'all' to show the complete logs. - * - * @param {boolean} [options.previous] Specifies whether to get container logs - * from exited/dead containers of the code package instance. - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -57585,7 +55344,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ContainerLogs} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error} - The error object. * @@ -57593,14 +55352,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ContainerLogs} for more information. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getContainerLogsDeployedOnNode(nodeName, applicationId, serviceManifestName, codePackageName, options, optionalCallback) { + getDeployedServicePackageInfoListByName(nodeName, applicationId, servicePackageName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -57609,23 +55367,25 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getContainerLogsDeployedOnNode(nodeName, applicationId, serviceManifestName, codePackageName, options, (err, result, request, response) => { + self._getDeployedServicePackageInfoListByName(nodeName, applicationId, servicePackageName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getContainerLogsDeployedOnNode(nodeName, applicationId, serviceManifestName, codePackageName, options, optionalCallback); + return self._getDeployedServicePackageInfoListByName(nodeName, applicationId, servicePackageName, options, optionalCallback); } } /** - * @summary Invoke container API on a container deployed on a Service Fabric - * node. + * @summary Gets the information about health of a service package for a + * specific application deployed for a Service Fabric node and application. * - * Invoke container API on a container deployed on a Service Fabric node for - * the given code package. + * Gets the information about health of a service package for a specific + * application deployed on a Service Fabric node. Use EventsHealthStateFilter + * to optionally filter for the collection of HealthEvent objects reported on + * the deployed service package based on health state. * * @param {string} nodeName The name of the node. * @@ -57637,32 +55397,32 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * @param {string} serviceManifestName The name of a service manifest - * registered as part of an application type in a Service Fabric cluster. - * - * @param {string} codePackageName The name of code package specified in - * service manifest registered as part of an application type in a Service - * Fabric cluster. - * - * @param {string} codePackageInstanceId ID that uniquely identifies a code - * package instance deployed on a service fabric node. - * - * @param {object} containerApiRequestBody Parameters for making container API - * call - * - * @param {string} [containerApiRequestBody.httpVerb] HTTP verb of container - * REST API, defaults to "GET" - * - * @param {string} containerApiRequestBody.uriPath URI path of container REST - * API + * @param {string} servicePackageName The name of the service package. * - * @param {string} [containerApiRequestBody.contentType] Content type of - * container REST API request, defaults to "application/json" + * @param {object} [options] Optional Parameters. * - * @param {string} [containerApiRequestBody.body] HTTP request body of - * container REST API + * @param {number} [options.eventsHealthStateFilter] Allows filtering the + * collection of HealthEvent objects returned based on health state. + * The possible values for this parameter include integer value of one of the + * following health states. + * Only events that match the filter are returned. All events are used to + * evaluate the aggregated health state. + * If not specified, all entries are returned. The state values are flag-based + * enumeration, so the value could be a combination of these values, obtained + * using the bitwise 'OR' operator. For example, If the provided value is 6 + * then all of the events with HealthState value of OK (2) and Warning (4) are + * returned. * - * @param {object} [options] Optional Parameters. + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -57674,15 +55434,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - invokeContainerApiWithHttpOperationResponse(nodeName, applicationId, serviceManifestName, codePackageName, codePackageInstanceId, containerApiRequestBody, options) { + getDeployedServicePackageHealthWithHttpOperationResponse(nodeName, applicationId, servicePackageName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._invokeContainerApi(nodeName, applicationId, serviceManifestName, codePackageName, codePackageInstanceId, containerApiRequestBody, options, (err, result, request, response) => { + self._getDeployedServicePackageHealth(nodeName, applicationId, servicePackageName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -57693,11 +55453,13 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Invoke container API on a container deployed on a Service Fabric - * node. + * @summary Gets the information about health of a service package for a + * specific application deployed for a Service Fabric node and application. * - * Invoke container API on a container deployed on a Service Fabric node for - * the given code package. + * Gets the information about health of a service package for a specific + * application deployed on a Service Fabric node. Use EventsHealthStateFilter + * to optionally filter for the collection of HealthEvent objects reported on + * the deployed service package based on health state. * * @param {string} nodeName The name of the node. * @@ -57709,32 +55471,32 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * @param {string} serviceManifestName The name of a service manifest - * registered as part of an application type in a Service Fabric cluster. - * - * @param {string} codePackageName The name of code package specified in - * service manifest registered as part of an application type in a Service - * Fabric cluster. - * - * @param {string} codePackageInstanceId ID that uniquely identifies a code - * package instance deployed on a service fabric node. - * - * @param {object} containerApiRequestBody Parameters for making container API - * call - * - * @param {string} [containerApiRequestBody.httpVerb] HTTP verb of container - * REST API, defaults to "GET" - * - * @param {string} containerApiRequestBody.uriPath URI path of container REST - * API + * @param {string} servicePackageName The name of the service package. * - * @param {string} [containerApiRequestBody.contentType] Content type of - * container REST API request, defaults to "application/json" + * @param {object} [options] Optional Parameters. * - * @param {string} [containerApiRequestBody.body] HTTP request body of - * container REST API + * @param {number} [options.eventsHealthStateFilter] Allows filtering the + * collection of HealthEvent objects returned based on health state. + * The possible values for this parameter include integer value of one of the + * following health states. + * Only events that match the filter are returned. All events are used to + * evaluate the aggregated health state. + * If not specified, all entries are returned. The state values are flag-based + * enumeration, so the value could be a combination of these values, obtained + * using the bitwise 'OR' operator. For example, If the provided value is 6 + * then all of the events with HealthState value of OK (2) and Warning (4) are + * returned. * - * @param {object} [options] Optional Parameters. + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -57751,7 +55513,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ContainerApiResponse} - The deserialized result object. + * @resolve {DeployedServicePackageHealth} - The deserialized result object. * * @reject {Error} - The error object. * @@ -57760,13 +55522,14 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ContainerApiResponse} for more information. + * See {@link DeployedServicePackageHealth} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - invokeContainerApi(nodeName, applicationId, serviceManifestName, codePackageName, codePackageInstanceId, containerApiRequestBody, options, optionalCallback) { + getDeployedServicePackageHealth(nodeName, applicationId, servicePackageName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -57775,50 +55538,140 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._invokeContainerApi(nodeName, applicationId, serviceManifestName, codePackageName, codePackageInstanceId, containerApiRequestBody, options, (err, result, request, response) => { + self._getDeployedServicePackageHealth(nodeName, applicationId, servicePackageName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._invokeContainerApi(nodeName, applicationId, serviceManifestName, codePackageName, codePackageInstanceId, containerApiRequestBody, options, optionalCallback); + return self._getDeployedServicePackageHealth(nodeName, applicationId, servicePackageName, options, optionalCallback); } } /** - * @summary Creates a Service Fabric compose deployment. + * @summary Gets the information about health of service package for a specific + * application deployed on a Service Fabric node using the specified policy. * - * Compose is a file format that describes multi-container applications. This - * API allows deploying container based applications defined in compose format - * in a Service Fabric cluster. Once the deployment is created, its status can - * be tracked via the `GetComposeDeploymentStatus` API. + * Gets the information about health of a service package for a specific + * application deployed on a Service Fabric node. using the specified policy. + * Use EventsHealthStateFilter to optionally filter for the collection of + * HealthEvent objects reported on the deployed service package based on health + * state. Use ApplicationHealthPolicy to optionally override the health + * policies used to evaluate the health. This API only uses + * 'ConsiderWarningAsError' field of the ApplicationHealthPolicy. The rest of + * the fields are ignored while evaluating the health of the deployed service + * package. * - * @param {object} createComposeDeploymentDescription Describes the compose - * deployment that needs to be created. + * @param {string} nodeName The name of the node. * - * @param {string} createComposeDeploymentDescription.deploymentName The name - * of the deployment. + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * previous versions. * - * @param {string} createComposeDeploymentDescription.composeFileContent The - * content of the compose file that describes the deployment to create. + * @param {string} servicePackageName The name of the service package. * - * @param {object} [createComposeDeploymentDescription.registryCredential] - * Credential information to connect to container registry. + * @param {object} [options] Optional Parameters. * - * @param {string} - * [createComposeDeploymentDescription.registryCredential.registryUserName] The - * user name to connect to container registry. + * @param {number} [options.eventsHealthStateFilter] Allows filtering the + * collection of HealthEvent objects returned based on health state. + * The possible values for this parameter include integer value of one of the + * following health states. + * Only events that match the filter are returned. All events are used to + * evaluate the aggregated health state. + * If not specified, all entries are returned. The state values are flag-based + * enumeration, so the value could be a combination of these values, obtained + * using the bitwise 'OR' operator. For example, If the provided value is 6 + * then all of the events with HealthState value of OK (2) and Warning (4) are + * returned. * - * @param {string} - * [createComposeDeploymentDescription.registryCredential.registryPassword] The - * password for supplied username to connect to container registry. + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. * - * @param {boolean} - * [createComposeDeploymentDescription.registryCredential.passwordEncrypted] - * Indicates that supplied container registry password is encrypted. + * @param {object} [options.applicationHealthPolicy] Describes the health + * policies used to evaluate the health of an application or one of its + * children. + * If not present, the health evaluation uses the health policy from + * application manifest or the default health policy. * - * @param {object} [options] Optional Parameters. + * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. + * + * @param {number} + * [options.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] + * The maximum allowed percentage of unhealthy deployed applications. Allowed + * values are Byte values from zero to 100. + * The percentage represents the maximum tolerated percentage of deployed + * applications that can be unhealthy before the application is considered in + * error. + * This is calculated by dividing the number of unhealthy deployed applications + * over the number of nodes where the application is currently deployed on in + * the cluster. + * The computation rounds up to tolerate one failure on small numbers of nodes. + * Default percentage is zero. + * + * @param {object} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health + * policy used by default to evaluate the health of a service type. + * + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] + * The maximum allowed percentage of unhealthy partitions per service. Allowed + * values are Byte values from zero to 100 + * + * The percentage represents the maximum tolerated percentage of partitions + * that can be unhealthy before the service is considered in error. + * If the percentage is respected but there is at least one unhealthy + * partition, the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy partitions + * over the total number of partitions in the service. + * The computation rounds up to tolerate one failure on small numbers of + * partitions. Default percentage is zero. + * + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] + * The maximum allowed percentage of unhealthy replicas per partition. Allowed + * values are Byte values from zero to 100. + * + * The percentage represents the maximum tolerated percentage of replicas that + * can be unhealthy before the partition is considered in error. + * If the percentage is respected but there is at least one unhealthy replica, + * the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy replicas + * over the total number of replicas in the partition. + * The computation rounds up to tolerate one failure on small numbers of + * replicas. Default percentage is zero. + * + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. + * + * The percentage represents the maximum tolerated percentage of services that + * can be unhealthy before the application is considered in error. + * If the percentage is respected but there is at least one unhealthy service, + * the health is evaluated as Warning. + * This is calculated by dividing the number of unhealthy services of the + * specific service type over the total number of services of the specific + * service type. + * The computation rounds up to tolerate one failure on small numbers of + * services. Default percentage is zero. + * + * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -57830,15 +55683,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - createComposeDeploymentWithHttpOperationResponse(createComposeDeploymentDescription, options) { + getDeployedServicePackageHealthUsingPolicyWithHttpOperationResponse(nodeName, applicationId, servicePackageName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._createComposeDeployment(createComposeDeploymentDescription, options, (err, result, request, response) => { + self._getDeployedServicePackageHealthUsingPolicy(nodeName, applicationId, servicePackageName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -57849,38 +55702,128 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Creates a Service Fabric compose deployment. + * @summary Gets the information about health of service package for a specific + * application deployed on a Service Fabric node using the specified policy. * - * Compose is a file format that describes multi-container applications. This - * API allows deploying container based applications defined in compose format - * in a Service Fabric cluster. Once the deployment is created, its status can - * be tracked via the `GetComposeDeploymentStatus` API. + * Gets the information about health of a service package for a specific + * application deployed on a Service Fabric node. using the specified policy. + * Use EventsHealthStateFilter to optionally filter for the collection of + * HealthEvent objects reported on the deployed service package based on health + * state. Use ApplicationHealthPolicy to optionally override the health + * policies used to evaluate the health. This API only uses + * 'ConsiderWarningAsError' field of the ApplicationHealthPolicy. The rest of + * the fields are ignored while evaluating the health of the deployed service + * package. * - * @param {object} createComposeDeploymentDescription Describes the compose - * deployment that needs to be created. + * @param {string} nodeName The name of the node. * - * @param {string} createComposeDeploymentDescription.deploymentName The name - * of the deployment. + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * previous versions. * - * @param {string} createComposeDeploymentDescription.composeFileContent The - * content of the compose file that describes the deployment to create. + * @param {string} servicePackageName The name of the service package. * - * @param {object} [createComposeDeploymentDescription.registryCredential] - * Credential information to connect to container registry. + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.eventsHealthStateFilter] Allows filtering the + * collection of HealthEvent objects returned based on health state. + * The possible values for this parameter include integer value of one of the + * following health states. + * Only events that match the filter are returned. All events are used to + * evaluate the aggregated health state. + * If not specified, all entries are returned. The state values are flag-based + * enumeration, so the value could be a combination of these values, obtained + * using the bitwise 'OR' operator. For example, If the provided value is 6 + * then all of the events with HealthState value of OK (2) and Warning (4) are + * returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * @param {object} [options.applicationHealthPolicy] Describes the health + * policies used to evaluate the health of an application or one of its + * children. + * If not present, the health evaluation uses the health policy from + * application manifest or the default health policy. + * + * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. + * + * @param {number} + * [options.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] + * The maximum allowed percentage of unhealthy deployed applications. Allowed + * values are Byte values from zero to 100. + * The percentage represents the maximum tolerated percentage of deployed + * applications that can be unhealthy before the application is considered in + * error. + * This is calculated by dividing the number of unhealthy deployed applications + * over the number of nodes where the application is currently deployed on in + * the cluster. + * The computation rounds up to tolerate one failure on small numbers of nodes. + * Default percentage is zero. + * + * @param {object} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health + * policy used by default to evaluate the health of a service type. + * + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] + * The maximum allowed percentage of unhealthy partitions per service. Allowed + * values are Byte values from zero to 100 + * + * The percentage represents the maximum tolerated percentage of partitions + * that can be unhealthy before the service is considered in error. + * If the percentage is respected but there is at least one unhealthy + * partition, the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy partitions + * over the total number of partitions in the service. + * The computation rounds up to tolerate one failure on small numbers of + * partitions. Default percentage is zero. + * + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] + * The maximum allowed percentage of unhealthy replicas per partition. Allowed + * values are Byte values from zero to 100. * - * @param {string} - * [createComposeDeploymentDescription.registryCredential.registryUserName] The - * user name to connect to container registry. + * The percentage represents the maximum tolerated percentage of replicas that + * can be unhealthy before the partition is considered in error. + * If the percentage is respected but there is at least one unhealthy replica, + * the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy replicas + * over the total number of replicas in the partition. + * The computation rounds up to tolerate one failure on small numbers of + * replicas. Default percentage is zero. * - * @param {string} - * [createComposeDeploymentDescription.registryCredential.registryPassword] The - * password for supplied username to connect to container registry. + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. * - * @param {boolean} - * [createComposeDeploymentDescription.registryCredential.passwordEncrypted] - * Indicates that supplied container registry password is encrypted. + * The percentage represents the maximum tolerated percentage of services that + * can be unhealthy before the application is considered in error. + * If the percentage is respected but there is at least one unhealthy service, + * the health is evaluated as Warning. + * This is calculated by dividing the number of unhealthy services of the + * specific service type over the total number of services of the specific + * service type. + * The computation rounds up to tolerate one failure on small numbers of + * services. Default percentage is zero. * - * @param {object} [options] Optional Parameters. + * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -57897,7 +55840,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {DeployedServicePackageHealth} - The deserialized result object. * * @reject {Error} - The error object. * @@ -57905,13 +55848,15 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DeployedServicePackageHealth} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createComposeDeployment(createComposeDeploymentDescription, options, optionalCallback) { + getDeployedServicePackageHealthUsingPolicy(nodeName, applicationId, servicePackageName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -57920,29 +55865,137 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createComposeDeployment(createComposeDeploymentDescription, options, (err, result, request, response) => { + self._getDeployedServicePackageHealthUsingPolicy(nodeName, applicationId, servicePackageName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createComposeDeployment(createComposeDeploymentDescription, options, optionalCallback); + return self._getDeployedServicePackageHealthUsingPolicy(nodeName, applicationId, servicePackageName, options, optionalCallback); } } /** - * @summary Gets information about a Service Fabric compose deployment. + * @summary Sends a health report on the Service Fabric deployed service + * package. * - * Returns the status of the compose deployment that was created or in the - * process of being created in the Service Fabric cluster and whose name - * matches the one specified as the parameter. The response includes the name, - * status, and other details about the deployment. + * Reports health state of the service package of the application deployed on a + * Service Fabric node. The report must contain the information about the + * source of the health report and property on which it is reported. + * The report is sent to a Service Fabric gateway Service, which forwards to + * the health store. + * The report may be accepted by the gateway, but rejected by the health store + * after extra validation. + * For example, the health store may reject the report because of an invalid + * parameter, like a stale sequence number. + * To see whether the report was applied in the health store, get deployed + * service package health and check that the report appears in the HealthEvents + * section. * - * @param {string} deploymentName The identity of the deployment. + * @param {string} nodeName The name of the node. + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * previous versions. + * + * @param {string} servicePackageName The name of the service package. + * + * @param {object} healthInformation Describes the health information for the + * health report. This information needs to be present in all of the health + * reports sent to the health manager. + * + * @param {string} healthInformation.sourceId The source name that identifies + * the client/watchdog/system component that generated the health information. + * + * @param {string} healthInformation.property The property of the health + * information. An entity can have health reports for different properties. + * The property is a string and not a fixed enumeration to allow the reporter + * flexibility to categorize the state condition that triggers the report. + * For example, a reporter with SourceId "LocalWatchdog" can monitor the state + * of the available disk on a node, + * so it can report "AvailableDisk" property on that node. + * The same reporter can monitor the node connectivity, so it can report a + * property "Connectivity" on the same node. + * In the health store, these reports are treated as separate health events for + * the specified node. + * + * Together with the SourceId, the property uniquely identifies the health + * information. + * + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' + * + * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The + * duration for which this health report is valid. This field uses ISO8601 + * format for specifying the duration. + * When clients report periodically, they should send reports with higher + * frequency than time to live. + * If clients report on transition, they can set the time to live to infinite. + * When time to live expires, the health event that contains the health + * information + * is either removed from health store, if RemoveWhenExpired is true, or + * evaluated at error, if RemoveWhenExpired false. + * + * If not specified, time to live defaults to infinite value. + * + * @param {string} [healthInformation.description] The description of the + * health information. It represents free text used to add human readable + * information about the report. + * The maximum string length for the description is 4096 characters. + * If the provided string is longer, it will be automatically truncated. + * When truncated, the last characters of the description contain a marker + * "[Truncated]", and total string size is 4096 characters. + * The presence of the marker indicates to users that truncation occurred. + * Note that when truncated, the description has less than 4096 characters from + * the original string. + * + * @param {string} [healthInformation.sequenceNumber] The sequence number for + * this health report as a numeric string. + * The report sequence number is used by the health store to detect stale + * reports. + * If not specified, a sequence number is auto-generated by the health client + * when a report is added. + * + * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates + * whether the report is removed from health store when it expires. + * If set to true, the report is removed from the health store after it + * expires. + * If set to false, the report is treated as an error when expired. The value + * of this property is false by default. + * When clients report periodically, they should set RemoveWhenExpired false + * (default). + * This way, if the reporter has issues (e.g. deadlock) and can't report, the + * entity is evaluated at error when the health report expires. + * This flags the entity as being in Error health state. * * @param {object} [options] Optional Parameters. * + * @param {boolean} [options.immediate] A flag that indicates whether the + * report should be sent immediately. + * A health report is sent to a Service Fabric gateway Application, which + * forwards to the health store. + * If Immediate is set to true, the report is sent immediately from HTTP + * Gateway to the health store, regardless of the fabric client settings that + * the HTTP Gateway Application is using. + * This is useful for critical reports that should be sent as soon as possible. + * Depending on timing and other conditions, sending the report may still fail, + * for example if the HTTP Gateway is closed or the message doesn't reach the + * Gateway. + * If Immediate is set to false, the report is sent based on the health client + * settings from the HTTP Gateway. Therefore, it will be batched according to + * the HealthReportSendInterval configuration. + * This is the recommended setting because it allows the health client to + * optimize health reporting messages to health store as well as health report + * processing. + * By default, reports are not sent immediately. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -57953,15 +56006,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getComposeDeploymentStatusWithHttpOperationResponse(deploymentName, options) { + reportDeployedServicePackageHealthWithHttpOperationResponse(nodeName, applicationId, servicePackageName, healthInformation, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getComposeDeploymentStatus(deploymentName, options, (err, result, request, response) => { + self._reportDeployedServicePackageHealth(nodeName, applicationId, servicePackageName, healthInformation, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -57972,17 +56025,125 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets information about a Service Fabric compose deployment. + * @summary Sends a health report on the Service Fabric deployed service + * package. * - * Returns the status of the compose deployment that was created or in the - * process of being created in the Service Fabric cluster and whose name - * matches the one specified as the parameter. The response includes the name, - * status, and other details about the deployment. + * Reports health state of the service package of the application deployed on a + * Service Fabric node. The report must contain the information about the + * source of the health report and property on which it is reported. + * The report is sent to a Service Fabric gateway Service, which forwards to + * the health store. + * The report may be accepted by the gateway, but rejected by the health store + * after extra validation. + * For example, the health store may reject the report because of an invalid + * parameter, like a stale sequence number. + * To see whether the report was applied in the health store, get deployed + * service package health and check that the report appears in the HealthEvents + * section. * - * @param {string} deploymentName The identity of the deployment. + * @param {string} nodeName The name of the node. + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * previous versions. + * + * @param {string} servicePackageName The name of the service package. + * + * @param {object} healthInformation Describes the health information for the + * health report. This information needs to be present in all of the health + * reports sent to the health manager. + * + * @param {string} healthInformation.sourceId The source name that identifies + * the client/watchdog/system component that generated the health information. + * + * @param {string} healthInformation.property The property of the health + * information. An entity can have health reports for different properties. + * The property is a string and not a fixed enumeration to allow the reporter + * flexibility to categorize the state condition that triggers the report. + * For example, a reporter with SourceId "LocalWatchdog" can monitor the state + * of the available disk on a node, + * so it can report "AvailableDisk" property on that node. + * The same reporter can monitor the node connectivity, so it can report a + * property "Connectivity" on the same node. + * In the health store, these reports are treated as separate health events for + * the specified node. + * + * Together with the SourceId, the property uniquely identifies the health + * information. + * + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' + * + * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The + * duration for which this health report is valid. This field uses ISO8601 + * format for specifying the duration. + * When clients report periodically, they should send reports with higher + * frequency than time to live. + * If clients report on transition, they can set the time to live to infinite. + * When time to live expires, the health event that contains the health + * information + * is either removed from health store, if RemoveWhenExpired is true, or + * evaluated at error, if RemoveWhenExpired false. + * + * If not specified, time to live defaults to infinite value. + * + * @param {string} [healthInformation.description] The description of the + * health information. It represents free text used to add human readable + * information about the report. + * The maximum string length for the description is 4096 characters. + * If the provided string is longer, it will be automatically truncated. + * When truncated, the last characters of the description contain a marker + * "[Truncated]", and total string size is 4096 characters. + * The presence of the marker indicates to users that truncation occurred. + * Note that when truncated, the description has less than 4096 characters from + * the original string. + * + * @param {string} [healthInformation.sequenceNumber] The sequence number for + * this health report as a numeric string. + * The report sequence number is used by the health store to detect stale + * reports. + * If not specified, a sequence number is auto-generated by the health client + * when a report is added. + * + * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates + * whether the report is removed from health store when it expires. + * If set to true, the report is removed from the health store after it + * expires. + * If set to false, the report is treated as an error when expired. The value + * of this property is false by default. + * When clients report periodically, they should set RemoveWhenExpired false + * (default). + * This way, if the reporter has issues (e.g. deadlock) and can't report, the + * entity is evaluated at error when the health report expires. + * This flags the entity as being in Error health state. * * @param {object} [options] Optional Parameters. * + * @param {boolean} [options.immediate] A flag that indicates whether the + * report should be sent immediately. + * A health report is sent to a Service Fabric gateway Application, which + * forwards to the health store. + * If Immediate is set to true, the report is sent immediately from HTTP + * Gateway to the health store, regardless of the fabric client settings that + * the HTTP Gateway Application is using. + * This is useful for critical reports that should be sent as soon as possible. + * Depending on timing and other conditions, sending the report may still fail, + * for example if the HTTP Gateway is closed or the message doesn't reach the + * Gateway. + * If Immediate is set to false, the report is sent based on the health client + * settings from the HTTP Gateway. Therefore, it will be batched according to + * the HealthReportSendInterval configuration. + * This is the recommended setting because it allows the health client to + * optimize health reporting messages to health store as well as health report + * processing. + * By default, reports are not sent immediately. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -57998,7 +56159,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ComposeDeploymentStatusInfo} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -58006,15 +56167,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ComposeDeploymentStatusInfo} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getComposeDeploymentStatus(deploymentName, options, optionalCallback) { + reportDeployedServicePackageHealth(nodeName, applicationId, servicePackageName, healthInformation, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -58023,45 +56182,49 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getComposeDeploymentStatus(deploymentName, options, (err, result, request, response) => { + self._reportDeployedServicePackageHealth(nodeName, applicationId, servicePackageName, healthInformation, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getComposeDeploymentStatus(deploymentName, options, optionalCallback); + return self._reportDeployedServicePackageHealth(nodeName, applicationId, servicePackageName, healthInformation, options, optionalCallback); } } /** - * @summary Gets the list of compose deployments created in the Service Fabric - * cluster. + * @summary Downloads all of the code packages associated with specified + * service manifest on the specified node. * - * Gets the status about the compose deployments that were created or in the - * process of being created in the Service Fabric cluster. The response - * includes the name, status, and other details about the compose deployments. - * If the list of deployments do not fit in a page, one page of results is - * returned as well as a continuation token, which can be used to get the next - * page. + * This API provides a way to download code packages including the container + * images on a specific node outside of the normal application deployment and + * upgrade path. This is useful for the large code packages and container + * images to be present on the node before the actual application deployment + * and upgrade, thus significantly reducing the total time required for the + * deployment or upgrade. * - * @param {object} [options] Optional Parameters. + * @param {string} nodeName The name of the node. * - * @param {string} [options.continuationToken] The continuation token parameter - * is used to obtain next set of results. A continuation token with a non-empty - * value is included in the response of the API when the results from the - * system do not fit in a single response. When this value is passed to the - * next API call, the API returns next set of results. If there are no further - * results, then the continuation token does not contain a value. The value of - * this parameter should not be URL encoded. + * @param {object} deployServicePackageToNodeDescription Describes information + * for deploying a service package to a Service Fabric node. * - * @param {number} [options.maxResults] The maximum number of results to be - * returned as part of the paged queries. This parameter defines the upper - * bound on the number of results returned. The results returned can be less - * than the specified maximum results if they do not fit in the message as per - * the max message size restrictions defined in the configuration. If this - * parameter is zero or not specified, the paged query includes as many results - * as possible that fit in the return message. + * @param {string} deployServicePackageToNodeDescription.serviceManifestName + * The name of service manifest whose packages need to be downloaded. + * + * @param {string} deployServicePackageToNodeDescription.applicationTypeName + * The application type name as defined in the application manifest. + * + * @param {string} deployServicePackageToNodeDescription.applicationTypeVersion + * The version of the application type as defined in the application manifest. + * + * @param {string} deployServicePackageToNodeDescription.nodeName The name of a + * Service Fabric node. + * + * @param {array} [deployServicePackageToNodeDescription.packageSharingPolicy] + * List of package sharing policy information. + * + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -58073,15 +56236,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getComposeDeploymentStatusListWithHttpOperationResponse(options) { + deployServicePackageToNodeWithHttpOperationResponse(nodeName, deployServicePackageToNodeDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getComposeDeploymentStatusList(options, (err, result, request, response) => { + self._deployServicePackageToNode(nodeName, deployServicePackageToNodeDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -58092,33 +56255,37 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the list of compose deployments created in the Service Fabric - * cluster. + * @summary Downloads all of the code packages associated with specified + * service manifest on the specified node. * - * Gets the status about the compose deployments that were created or in the - * process of being created in the Service Fabric cluster. The response - * includes the name, status, and other details about the compose deployments. - * If the list of deployments do not fit in a page, one page of results is - * returned as well as a continuation token, which can be used to get the next - * page. + * This API provides a way to download code packages including the container + * images on a specific node outside of the normal application deployment and + * upgrade path. This is useful for the large code packages and container + * images to be present on the node before the actual application deployment + * and upgrade, thus significantly reducing the total time required for the + * deployment or upgrade. * - * @param {object} [options] Optional Parameters. + * @param {string} nodeName The name of the node. * - * @param {string} [options.continuationToken] The continuation token parameter - * is used to obtain next set of results. A continuation token with a non-empty - * value is included in the response of the API when the results from the - * system do not fit in a single response. When this value is passed to the - * next API call, the API returns next set of results. If there are no further - * results, then the continuation token does not contain a value. The value of - * this parameter should not be URL encoded. + * @param {object} deployServicePackageToNodeDescription Describes information + * for deploying a service package to a Service Fabric node. * - * @param {number} [options.maxResults] The maximum number of results to be - * returned as part of the paged queries. This parameter defines the upper - * bound on the number of results returned. The results returned can be less - * than the specified maximum results if they do not fit in the message as per - * the max message size restrictions defined in the configuration. If this - * parameter is zero or not specified, the paged query includes as many results - * as possible that fit in the return message. + * @param {string} deployServicePackageToNodeDescription.serviceManifestName + * The name of service manifest whose packages need to be downloaded. + * + * @param {string} deployServicePackageToNodeDescription.applicationTypeName + * The application type name as defined in the application manifest. + * + * @param {string} deployServicePackageToNodeDescription.applicationTypeVersion + * The version of the application type as defined in the application manifest. + * + * @param {string} deployServicePackageToNodeDescription.nodeName The name of a + * Service Fabric node. + * + * @param {array} [deployServicePackageToNodeDescription.packageSharingPolicy] + * List of package sharing policy information. + * + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -58135,7 +56302,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {PagedComposeDeploymentStatusInfoList} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -58143,15 +56310,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PagedComposeDeploymentStatusInfoList} for - * more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getComposeDeploymentStatusList(options, optionalCallback) { + deployServicePackageToNode(nodeName, deployServicePackageToNodeDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -58160,28 +56325,42 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getComposeDeploymentStatusList(options, (err, result, request, response) => { + self._deployServicePackageToNode(nodeName, deployServicePackageToNodeDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getComposeDeploymentStatusList(options, optionalCallback); + return self._deployServicePackageToNode(nodeName, deployServicePackageToNodeDescription, options, optionalCallback); } } /** - * @summary Gets details for the latest upgrade performed on this Service - * Fabric compose deployment. + * @summary Gets the list of code packages deployed on a Service Fabric node. * - * Returns the information about the state of the compose deployment upgrade - * along with details to aid debugging application health issues. + * Gets the list of code packages deployed on a Service Fabric node for the + * given application. * - * @param {string} deploymentName The identity of the deployment. + * @param {string} nodeName The name of the node. + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * previous versions. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.serviceManifestName] The name of a service manifest + * registered as part of an application type in a Service Fabric cluster. + * + * @param {string} [options.codePackageName] The name of code package specified + * in service manifest registered as part of an application type in a Service + * Fabric cluster. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -58192,15 +56371,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getComposeDeploymentUpgradeProgressWithHttpOperationResponse(deploymentName, options) { + getDeployedCodePackageInfoListWithHttpOperationResponse(nodeName, applicationId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getComposeDeploymentUpgradeProgress(deploymentName, options, (err, result, request, response) => { + self._getDeployedCodePackageInfoList(nodeName, applicationId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -58211,16 +56390,30 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets details for the latest upgrade performed on this Service - * Fabric compose deployment. + * @summary Gets the list of code packages deployed on a Service Fabric node. * - * Returns the information about the state of the compose deployment upgrade - * along with details to aid debugging application health issues. + * Gets the list of code packages deployed on a Service Fabric node for the + * given application. * - * @param {string} deploymentName The identity of the deployment. + * @param {string} nodeName The name of the node. + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * previous versions. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.serviceManifestName] The name of a service manifest + * registered as part of an application type in a Service Fabric cluster. + * + * @param {string} [options.codePackageName] The name of code package specified + * in service manifest registered as part of an application type in a Service + * Fabric cluster. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -58236,7 +56429,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ComposeDeploymentUpgradeProgressInfo} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error} - The error object. * @@ -58244,15 +56437,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ComposeDeploymentUpgradeProgressInfo} for - * more information. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getComposeDeploymentUpgradeProgress(deploymentName, options, optionalCallback) { + getDeployedCodePackageInfoList(nodeName, applicationId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -58261,23 +56452,63 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getComposeDeploymentUpgradeProgress(deploymentName, options, (err, result, request, response) => { + self._getDeployedCodePackageInfoList(nodeName, applicationId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getComposeDeploymentUpgradeProgress(deploymentName, options, optionalCallback); + return self._getDeployedCodePackageInfoList(nodeName, applicationId, options, optionalCallback); } } /** - * @summary Deletes an existing Service Fabric compose deployment from cluster. + * @summary Restarts a code package deployed on a Service Fabric node in a + * cluster. + * + * Restarts a code package deployed on a Service Fabric node in a cluster. This + * aborts the code package process, which will restart all the user service + * replicas hosted in that process. + * + * @param {string} nodeName The name of the node. + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * previous versions. + * + * @param {object} restartDeployedCodePackageDescription Describes the deployed + * code package on Service Fabric node to restart. + * + * @param {string} restartDeployedCodePackageDescription.serviceManifestName + * The name of service manifest that specified this code package. + * + * @param {string} + * [restartDeployedCodePackageDescription.servicePackageActivationId] The + * ActivationId of a deployed service package. If ServicePackageActivationMode + * specified at the time of creating the service + * is 'SharedProcess' (or if it is not specified, in which case it defaults to + * 'SharedProcess'), then value of ServicePackageActivationId + * is always an empty string. * - * Deletes an existing Service Fabric compose deployment. + * @param {string} restartDeployedCodePackageDescription.codePackageName The + * name of the code package defined in the service manifest. * - * @param {string} deploymentName The identity of the deployment. + * @param {string} restartDeployedCodePackageDescription.codePackageInstanceId + * The instance ID for currently running entry point. For a code package setup + * entry point (if specified) runs first and after it finishes main entry point + * is started. + * Each time entry point executable is run, its instance ID will change. If 0 + * is passed in as the code package instance ID, the API will restart the code + * package with whatever instance ID it is currently running. + * If an instance ID other than 0 is passed in, the API will restart the code + * package only if the current Instance ID matches the passed in instance ID. + * Note, passing in the exact instance ID (not 0) in the API is safer, because + * if ensures at most one restart of the code package. * * @param {object} [options] Optional Parameters. * @@ -58295,11 +56526,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - removeComposeDeploymentWithHttpOperationResponse(deploymentName, options) { + restartDeployedCodePackageWithHttpOperationResponse(nodeName, applicationId, restartDeployedCodePackageDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._removeComposeDeployment(deploymentName, options, (err, result, request, response) => { + self._restartDeployedCodePackage(nodeName, applicationId, restartDeployedCodePackageDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -58310,11 +56541,51 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Deletes an existing Service Fabric compose deployment from cluster. + * @summary Restarts a code package deployed on a Service Fabric node in a + * cluster. * - * Deletes an existing Service Fabric compose deployment. + * Restarts a code package deployed on a Service Fabric node in a cluster. This + * aborts the code package process, which will restart all the user service + * replicas hosted in that process. * - * @param {string} deploymentName The identity of the deployment. + * @param {string} nodeName The name of the node. + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * previous versions. + * + * @param {object} restartDeployedCodePackageDescription Describes the deployed + * code package on Service Fabric node to restart. + * + * @param {string} restartDeployedCodePackageDescription.serviceManifestName + * The name of service manifest that specified this code package. + * + * @param {string} + * [restartDeployedCodePackageDescription.servicePackageActivationId] The + * ActivationId of a deployed service package. If ServicePackageActivationMode + * specified at the time of creating the service + * is 'SharedProcess' (or if it is not specified, in which case it defaults to + * 'SharedProcess'), then value of ServicePackageActivationId + * is always an empty string. + * + * @param {string} restartDeployedCodePackageDescription.codePackageName The + * name of the code package defined in the service manifest. + * + * @param {string} restartDeployedCodePackageDescription.codePackageInstanceId + * The instance ID for currently running entry point. For a code package setup + * entry point (if specified) runs first and after it finishes main entry point + * is started. + * Each time entry point executable is run, its instance ID will change. If 0 + * is passed in as the code package instance ID, the API will restart the code + * package with whatever instance ID it is currently running. + * If an instance ID other than 0 is passed in, the API will restart the code + * package only if the current Instance ID matches the passed in instance ID. + * Note, passing in the exact instance ID (not 0) in the API is safer, because + * if ensures at most one restart of the code package. * * @param {object} [options] Optional Parameters. * @@ -58347,7 +56618,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - removeComposeDeployment(deploymentName, options, optionalCallback) { + restartDeployedCodePackage(nodeName, applicationId, restartDeployedCodePackageDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -58356,196 +56627,48 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._removeComposeDeployment(deploymentName, options, (err, result, request, response) => { + self._restartDeployedCodePackage(nodeName, applicationId, restartDeployedCodePackageDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._removeComposeDeployment(deploymentName, options, optionalCallback); + return self._restartDeployedCodePackage(nodeName, applicationId, restartDeployedCodePackageDescription, options, optionalCallback); } } /** - * @summary Starts upgrading a compose deployment in the Service Fabric - * cluster. - * - * Validates the supplied upgrade parameters and starts upgrading the - * deployment if the parameters are valid. - * - * @param {string} deploymentName The identity of the deployment. - * - * @param {object} composeDeploymentUpgradeDescription Parameters for upgrading - * compose deployment. - * - * @param {string} composeDeploymentUpgradeDescription.deploymentName The name - * of the deployment. - * - * @param {string} composeDeploymentUpgradeDescription.composeFileContent The - * content of the compose file that describes the deployment to create. - * - * @param {object} [composeDeploymentUpgradeDescription.registryCredential] - * Credential information to connect to container registry. - * - * @param {string} - * [composeDeploymentUpgradeDescription.registryCredential.registryUserName] - * The user name to connect to container registry. - * - * @param {string} - * [composeDeploymentUpgradeDescription.registryCredential.registryPassword] - * The password for supplied username to connect to container registry. - * - * @param {boolean} - * [composeDeploymentUpgradeDescription.registryCredential.passwordEncrypted] - * Indicates that supplied container registry password is encrypted. - * - * @param {string} composeDeploymentUpgradeDescription.upgradeKind The kind of - * upgrade out of the following possible values. Possible values include: - * 'Invalid', 'Rolling' - * - * @param {string} [composeDeploymentUpgradeDescription.rollingUpgradeMode] The - * mode used to monitor health during a rolling upgrade. The values are - * UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: - * 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' - * - * @param {number} - * [composeDeploymentUpgradeDescription.upgradeReplicaSetCheckTimeoutInSeconds] - * The maximum amount of time to block processing of an upgrade domain and - * prevent loss of availability when there are unexpected issues. When this - * timeout expires, processing of the upgrade domain will proceed regardless of - * availability loss issues. The timeout is reset at the start of each upgrade - * domain. Valid values are between 0 and 42949672925 inclusive. (unsigned - * 32-bit integer). - * - * @param {boolean} [composeDeploymentUpgradeDescription.forceRestart] If true, - * then processes are forcefully restarted during upgrade even when the code - * version has not changed (the upgrade only changes configuration or data). - * - * @param {object} [composeDeploymentUpgradeDescription.monitoringPolicy] - * Describes the parameters for monitoring an upgrade in Monitored mode. - * - * @param {string} - * [composeDeploymentUpgradeDescription.monitoringPolicy.failureAction] The - * compensating action to perform when a Monitored upgrade encounters - * monitoring policy or health policy violations. - * Invalid indicates the failure action is invalid. Rollback specifies that the - * upgrade will start rolling back automatically. - * Manual indicates that the upgrade will switch to UnmonitoredManual upgrade - * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' - * - * @param {string} - * [composeDeploymentUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] - * The amount of time to wait after completing an upgrade domain before - * applying health policies. It is first interpreted as a string representing - * an ISO 8601 duration. If that fails, then it is interpreted as a number - * representing the total number of milliseconds. - * - * @param {string} - * [composeDeploymentUpgradeDescription.monitoringPolicy.healthCheckStableDurationInMilliseconds] - * The amount of time that the application or cluster must remain healthy - * before the upgrade proceeds to the next upgrade domain. It is first - * interpreted as a string representing an ISO 8601 duration. If that fails, - * then it is interpreted as a number representing the total number of - * milliseconds. - * - * @param {string} - * [composeDeploymentUpgradeDescription.monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] - * The amount of time to retry health evaluation when the application or - * cluster is unhealthy before FailureAction is executed. It is first - * interpreted as a string representing an ISO 8601 duration. If that fails, - * then it is interpreted as a number representing the total number of - * milliseconds. - * - * @param {string} - * [composeDeploymentUpgradeDescription.monitoringPolicy.upgradeTimeoutInMilliseconds] - * The amount of time the overall upgrade has to complete before FailureAction - * is executed. It is first interpreted as a string representing an ISO 8601 - * duration. If that fails, then it is interpreted as a number representing the - * total number of milliseconds. - * - * @param {string} - * [composeDeploymentUpgradeDescription.monitoringPolicy.upgradeDomainTimeoutInMilliseconds] - * The amount of time each upgrade domain has to complete before FailureAction - * is executed. It is first interpreted as a string representing an ISO 8601 - * duration. If that fails, then it is interpreted as a number representing the - * total number of milliseconds. - * - * @param {object} - * [composeDeploymentUpgradeDescription.applicationHealthPolicy] Defines a - * health policy used to evaluate the health of an application or one of its - * children entities. - * - * @param {boolean} - * [composeDeploymentUpgradeDescription.applicationHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. - * - * @param {number} - * [composeDeploymentUpgradeDescription.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] - * The maximum allowed percentage of unhealthy deployed applications. Allowed - * values are Byte values from zero to 100. - * The percentage represents the maximum tolerated percentage of deployed - * applications that can be unhealthy before the application is considered in - * error. - * This is calculated by dividing the number of unhealthy deployed applications - * over the number of nodes where the application is currently deployed on in - * the cluster. - * The computation rounds up to tolerate one failure on small numbers of nodes. - * Default percentage is zero. - * - * @param {object} - * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] - * The health policy used by default to evaluate the health of a service type. + * @summary Gets the container logs for container deployed on a Service Fabric + * node. * - * @param {number} - * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] - * The maximum allowed percentage of unhealthy partitions per service. Allowed - * values are Byte values from zero to 100 + * Gets the container logs for container deployed on a Service Fabric node for + * the given code package. * - * The percentage represents the maximum tolerated percentage of partitions - * that can be unhealthy before the service is considered in error. - * If the percentage is respected but there is at least one unhealthy - * partition, the health is evaluated as Warning. - * The percentage is calculated by dividing the number of unhealthy partitions - * over the total number of partitions in the service. - * The computation rounds up to tolerate one failure on small numbers of - * partitions. Default percentage is zero. + * @param {string} nodeName The name of the node. * - * @param {number} - * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] - * The maximum allowed percentage of unhealthy replicas per partition. Allowed - * values are Byte values from zero to 100. + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * previous versions. * - * The percentage represents the maximum tolerated percentage of replicas that - * can be unhealthy before the partition is considered in error. - * If the percentage is respected but there is at least one unhealthy replica, - * the health is evaluated as Warning. - * The percentage is calculated by dividing the number of unhealthy replicas - * over the total number of replicas in the partition. - * The computation rounds up to tolerate one failure on small numbers of - * replicas. Default percentage is zero. + * @param {string} serviceManifestName The name of a service manifest + * registered as part of an application type in a Service Fabric cluster. * - * @param {number} - * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * @param {string} codePackageName The name of code package specified in + * service manifest registered as part of an application type in a Service + * Fabric cluster. * - * The percentage represents the maximum tolerated percentage of services that - * can be unhealthy before the application is considered in error. - * If the percentage is respected but there is at least one unhealthy service, - * the health is evaluated as Warning. - * This is calculated by dividing the number of unhealthy services of the - * specific service type over the total number of services of the specific - * service type. - * The computation rounds up to tolerate one failure on small numbers of - * services. Default percentage is zero. + * @param {object} [options] Optional Parameters. * - * @param {array} - * [composeDeploymentUpgradeDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] - * The map with service type health policy per service type name. The map is - * empty by default. + * @param {string} [options.tail] Number of lines to show from the end of the + * logs. Default is 100. 'all' to show the complete logs. * - * @param {object} [options] Optional Parameters. + * @param {boolean} [options.previous] Specifies whether to get container logs + * from exited/dead containers of the code package instance. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -58557,15 +56680,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - startComposeDeploymentUpgradeWithHttpOperationResponse(deploymentName, composeDeploymentUpgradeDescription, options) { + getContainerLogsDeployedOnNodeWithHttpOperationResponse(nodeName, applicationId, serviceManifestName, codePackageName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._startComposeDeploymentUpgrade(deploymentName, composeDeploymentUpgradeDescription, options, (err, result, request, response) => { + self._getContainerLogsDeployedOnNode(nodeName, applicationId, serviceManifestName, codePackageName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -58576,184 +56699,36 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Starts upgrading a compose deployment in the Service Fabric - * cluster. - * - * Validates the supplied upgrade parameters and starts upgrading the - * deployment if the parameters are valid. - * - * @param {string} deploymentName The identity of the deployment. - * - * @param {object} composeDeploymentUpgradeDescription Parameters for upgrading - * compose deployment. - * - * @param {string} composeDeploymentUpgradeDescription.deploymentName The name - * of the deployment. - * - * @param {string} composeDeploymentUpgradeDescription.composeFileContent The - * content of the compose file that describes the deployment to create. - * - * @param {object} [composeDeploymentUpgradeDescription.registryCredential] - * Credential information to connect to container registry. - * - * @param {string} - * [composeDeploymentUpgradeDescription.registryCredential.registryUserName] - * The user name to connect to container registry. - * - * @param {string} - * [composeDeploymentUpgradeDescription.registryCredential.registryPassword] - * The password for supplied username to connect to container registry. - * - * @param {boolean} - * [composeDeploymentUpgradeDescription.registryCredential.passwordEncrypted] - * Indicates that supplied container registry password is encrypted. - * - * @param {string} composeDeploymentUpgradeDescription.upgradeKind The kind of - * upgrade out of the following possible values. Possible values include: - * 'Invalid', 'Rolling' - * - * @param {string} [composeDeploymentUpgradeDescription.rollingUpgradeMode] The - * mode used to monitor health during a rolling upgrade. The values are - * UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: - * 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' - * - * @param {number} - * [composeDeploymentUpgradeDescription.upgradeReplicaSetCheckTimeoutInSeconds] - * The maximum amount of time to block processing of an upgrade domain and - * prevent loss of availability when there are unexpected issues. When this - * timeout expires, processing of the upgrade domain will proceed regardless of - * availability loss issues. The timeout is reset at the start of each upgrade - * domain. Valid values are between 0 and 42949672925 inclusive. (unsigned - * 32-bit integer). - * - * @param {boolean} [composeDeploymentUpgradeDescription.forceRestart] If true, - * then processes are forcefully restarted during upgrade even when the code - * version has not changed (the upgrade only changes configuration or data). - * - * @param {object} [composeDeploymentUpgradeDescription.monitoringPolicy] - * Describes the parameters for monitoring an upgrade in Monitored mode. - * - * @param {string} - * [composeDeploymentUpgradeDescription.monitoringPolicy.failureAction] The - * compensating action to perform when a Monitored upgrade encounters - * monitoring policy or health policy violations. - * Invalid indicates the failure action is invalid. Rollback specifies that the - * upgrade will start rolling back automatically. - * Manual indicates that the upgrade will switch to UnmonitoredManual upgrade - * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' - * - * @param {string} - * [composeDeploymentUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] - * The amount of time to wait after completing an upgrade domain before - * applying health policies. It is first interpreted as a string representing - * an ISO 8601 duration. If that fails, then it is interpreted as a number - * representing the total number of milliseconds. - * - * @param {string} - * [composeDeploymentUpgradeDescription.monitoringPolicy.healthCheckStableDurationInMilliseconds] - * The amount of time that the application or cluster must remain healthy - * before the upgrade proceeds to the next upgrade domain. It is first - * interpreted as a string representing an ISO 8601 duration. If that fails, - * then it is interpreted as a number representing the total number of - * milliseconds. - * - * @param {string} - * [composeDeploymentUpgradeDescription.monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] - * The amount of time to retry health evaluation when the application or - * cluster is unhealthy before FailureAction is executed. It is first - * interpreted as a string representing an ISO 8601 duration. If that fails, - * then it is interpreted as a number representing the total number of - * milliseconds. - * - * @param {string} - * [composeDeploymentUpgradeDescription.monitoringPolicy.upgradeTimeoutInMilliseconds] - * The amount of time the overall upgrade has to complete before FailureAction - * is executed. It is first interpreted as a string representing an ISO 8601 - * duration. If that fails, then it is interpreted as a number representing the - * total number of milliseconds. - * - * @param {string} - * [composeDeploymentUpgradeDescription.monitoringPolicy.upgradeDomainTimeoutInMilliseconds] - * The amount of time each upgrade domain has to complete before FailureAction - * is executed. It is first interpreted as a string representing an ISO 8601 - * duration. If that fails, then it is interpreted as a number representing the - * total number of milliseconds. - * - * @param {object} - * [composeDeploymentUpgradeDescription.applicationHealthPolicy] Defines a - * health policy used to evaluate the health of an application or one of its - * children entities. - * - * @param {boolean} - * [composeDeploymentUpgradeDescription.applicationHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. - * - * @param {number} - * [composeDeploymentUpgradeDescription.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] - * The maximum allowed percentage of unhealthy deployed applications. Allowed - * values are Byte values from zero to 100. - * The percentage represents the maximum tolerated percentage of deployed - * applications that can be unhealthy before the application is considered in - * error. - * This is calculated by dividing the number of unhealthy deployed applications - * over the number of nodes where the application is currently deployed on in - * the cluster. - * The computation rounds up to tolerate one failure on small numbers of nodes. - * Default percentage is zero. - * - * @param {object} - * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] - * The health policy used by default to evaluate the health of a service type. + * @summary Gets the container logs for container deployed on a Service Fabric + * node. * - * @param {number} - * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] - * The maximum allowed percentage of unhealthy partitions per service. Allowed - * values are Byte values from zero to 100 + * Gets the container logs for container deployed on a Service Fabric node for + * the given code package. * - * The percentage represents the maximum tolerated percentage of partitions - * that can be unhealthy before the service is considered in error. - * If the percentage is respected but there is at least one unhealthy - * partition, the health is evaluated as Warning. - * The percentage is calculated by dividing the number of unhealthy partitions - * over the total number of partitions in the service. - * The computation rounds up to tolerate one failure on small numbers of - * partitions. Default percentage is zero. + * @param {string} nodeName The name of the node. * - * @param {number} - * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] - * The maximum allowed percentage of unhealthy replicas per partition. Allowed - * values are Byte values from zero to 100. + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * previous versions. * - * The percentage represents the maximum tolerated percentage of replicas that - * can be unhealthy before the partition is considered in error. - * If the percentage is respected but there is at least one unhealthy replica, - * the health is evaluated as Warning. - * The percentage is calculated by dividing the number of unhealthy replicas - * over the total number of replicas in the partition. - * The computation rounds up to tolerate one failure on small numbers of - * replicas. Default percentage is zero. + * @param {string} serviceManifestName The name of a service manifest + * registered as part of an application type in a Service Fabric cluster. * - * @param {number} - * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * @param {string} codePackageName The name of code package specified in + * service manifest registered as part of an application type in a Service + * Fabric cluster. * - * The percentage represents the maximum tolerated percentage of services that - * can be unhealthy before the application is considered in error. - * If the percentage is respected but there is at least one unhealthy service, - * the health is evaluated as Warning. - * This is calculated by dividing the number of unhealthy services of the - * specific service type over the total number of services of the specific - * service type. - * The computation rounds up to tolerate one failure on small numbers of - * services. Default percentage is zero. + * @param {object} [options] Optional Parameters. * - * @param {array} - * [composeDeploymentUpgradeDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] - * The map with service type health policy per service type name. The map is - * empty by default. + * @param {string} [options.tail] Number of lines to show from the end of the + * logs. Default is 100. 'all' to show the complete logs. * - * @param {object} [options] Optional Parameters. + * @param {boolean} [options.previous] Specifies whether to get container logs + * from exited/dead containers of the code package instance. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -58770,7 +56745,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {ContainerLogs} - The deserialized result object. * * @reject {Error} - The error object. * @@ -58778,13 +56753,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ContainerLogs} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - startComposeDeploymentUpgrade(deploymentName, composeDeploymentUpgradeDescription, options, optionalCallback) { + getContainerLogsDeployedOnNode(nodeName, applicationId, serviceManifestName, codePackageName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -58793,23 +56769,58 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._startComposeDeploymentUpgrade(deploymentName, composeDeploymentUpgradeDescription, options, (err, result, request, response) => { + self._getContainerLogsDeployedOnNode(nodeName, applicationId, serviceManifestName, codePackageName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._startComposeDeploymentUpgrade(deploymentName, composeDeploymentUpgradeDescription, options, optionalCallback); + return self._getContainerLogsDeployedOnNode(nodeName, applicationId, serviceManifestName, codePackageName, options, optionalCallback); } } /** - * @summary Get the status of Chaos. + * @summary Invoke container API on a container deployed on a Service Fabric + * node. * - * Get the status of Chaos indicating whether or not Chaos is running, the - * Chaos parameters used for running Chaos and the status of the Chaos - * Schedule. + * Invoke container API on a container deployed on a Service Fabric node for + * the given code package. + * + * @param {string} nodeName The name of the node. + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * previous versions. + * + * @param {string} serviceManifestName The name of a service manifest + * registered as part of an application type in a Service Fabric cluster. + * + * @param {string} codePackageName The name of code package specified in + * service manifest registered as part of an application type in a Service + * Fabric cluster. + * + * @param {string} codePackageInstanceId ID that uniquely identifies a code + * package instance deployed on a service fabric node. + * + * @param {object} containerApiRequestBody Parameters for making container API + * call + * + * @param {string} [containerApiRequestBody.httpVerb] HTTP verb of container + * REST API, defaults to "GET" + * + * @param {string} containerApiRequestBody.uriPath URI path of container REST + * API + * + * @param {string} [containerApiRequestBody.contentType] Content type of + * container REST API request, defaults to "application/json" + * + * @param {string} [containerApiRequestBody.body] HTTP request body of + * container REST API * * @param {object} [options] Optional Parameters. * @@ -58823,15 +56834,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getChaosWithHttpOperationResponse(options) { + invokeContainerApiWithHttpOperationResponse(nodeName, applicationId, serviceManifestName, codePackageName, codePackageInstanceId, containerApiRequestBody, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getChaos(options, (err, result, request, response) => { + self._invokeContainerApi(nodeName, applicationId, serviceManifestName, codePackageName, codePackageInstanceId, containerApiRequestBody, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -58842,11 +56853,46 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Get the status of Chaos. + * @summary Invoke container API on a container deployed on a Service Fabric + * node. * - * Get the status of Chaos indicating whether or not Chaos is running, the - * Chaos parameters used for running Chaos and the status of the Chaos - * Schedule. + * Invoke container API on a container deployed on a Service Fabric node for + * the given code package. + * + * @param {string} nodeName The name of the node. + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * previous versions. + * + * @param {string} serviceManifestName The name of a service manifest + * registered as part of an application type in a Service Fabric cluster. + * + * @param {string} codePackageName The name of code package specified in + * service manifest registered as part of an application type in a Service + * Fabric cluster. + * + * @param {string} codePackageInstanceId ID that uniquely identifies a code + * package instance deployed on a service fabric node. + * + * @param {object} containerApiRequestBody Parameters for making container API + * call + * + * @param {string} [containerApiRequestBody.httpVerb] HTTP verb of container + * REST API, defaults to "GET" + * + * @param {string} containerApiRequestBody.uriPath URI path of container REST + * API + * + * @param {string} [containerApiRequestBody.contentType] Content type of + * container REST API request, defaults to "application/json" + * + * @param {string} [containerApiRequestBody.body] HTTP request body of + * container REST API * * @param {object} [options] Optional Parameters. * @@ -58865,7 +56911,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {Chaos} - The deserialized result object. + * @resolve {ContainerApiResponse} - The deserialized result object. * * @reject {Error} - The error object. * @@ -58874,13 +56920,13 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link Chaos} for more information. + * See {@link ContainerApiResponse} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getChaos(options, optionalCallback) { + invokeContainerApi(nodeName, applicationId, serviceManifestName, codePackageName, codePackageInstanceId, containerApiRequestBody, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -58889,185 +56935,48 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getChaos(options, (err, result, request, response) => { + self._invokeContainerApi(nodeName, applicationId, serviceManifestName, codePackageName, codePackageInstanceId, containerApiRequestBody, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getChaos(options, optionalCallback); + return self._invokeContainerApi(nodeName, applicationId, serviceManifestName, codePackageName, codePackageInstanceId, containerApiRequestBody, options, optionalCallback); } } /** - * @summary Starts Chaos in the cluster. - * - * If Chaos is not already running in the cluster, it starts Chaos with the - * passed in Chaos parameters. - * If Chaos is already running when this call is made, the call fails with the - * error code FABRIC_E_CHAOS_ALREADY_RUNNING. - * Refer to the article [Induce controlled Chaos in Service Fabric - * clusters](https://docs.microsoft.com/azure/service-fabric/service-fabric-controlled-chaos) - * for more details. - * - * @param {object} chaosParameters Describes all the parameters to configure a - * Chaos run. + * @summary Creates a Service Fabric compose deployment. * - * @param {string} [chaosParameters.timeToRunInSeconds] Total time (in seconds) - * for which Chaos will run before automatically stopping. The maximum allowed - * value is 4,294,967,295 (System.UInt32.MaxValue). + * Compose is a file format that describes multi-container applications. This + * API allows deploying container based applications defined in compose format + * in a Service Fabric cluster. Once the deployment is created, its status can + * be tracked via the `GetComposeDeploymentStatus` API. * - * @param {number} [chaosParameters.maxClusterStabilizationTimeoutInSeconds] - * The maximum amount of time to wait for all cluster entities to become stable - * and healthy. Chaos executes in iterations and at the start of each iteration - * it validates the health of cluster entities. - * During validation if a cluster entity is not stable and healthy within - * MaxClusterStabilizationTimeoutInSeconds, Chaos generates a validation failed - * event. + * @param {object} createComposeDeploymentDescription Describes the compose + * deployment that needs to be created. * - * @param {number} [chaosParameters.maxConcurrentFaults] MaxConcurrentFaults is - * the maximum number of concurrent faults induced per iteration. - * Chaos executes in iterations and two consecutive iterations are separated by - * a validation phase. - * The higher the concurrency, the more aggressive the injection of faults, - * leading to inducing more complex series of states to uncover bugs. - * The recommendation is to start with a value of 2 or 3 and to exercise - * caution while moving up. + * @param {string} createComposeDeploymentDescription.deploymentName The name + * of the deployment. * - * @param {boolean} [chaosParameters.enableMoveReplicaFaults] Enables or - * disables the move primary and move secondary faults. + * @param {string} createComposeDeploymentDescription.composeFileContent The + * content of the compose file that describes the deployment to create. * - * @param {number} [chaosParameters.waitTimeBetweenFaultsInSeconds] Wait time - * (in seconds) between consecutive faults within a single iteration. - * The larger the value, the lower the overlapping between faults and the - * simpler the sequence of state transitions that the cluster goes through. - * The recommendation is to start with a value between 1 and 5 and exercise - * caution while moving up. + * @param {object} [createComposeDeploymentDescription.registryCredential] + * Credential information to connect to container registry. * - * @param {number} [chaosParameters.waitTimeBetweenIterationsInSeconds] - * Time-separation (in seconds) between two consecutive iterations of Chaos. - * The larger the value, the lower the fault injection rate. + * @param {string} + * [createComposeDeploymentDescription.registryCredential.registryUserName] The + * user name to connect to container registry. * - * @param {object} [chaosParameters.clusterHealthPolicy] Passed-in cluster - * health policy is used to validate health of the cluster in between Chaos - * iterations. If the cluster health is in error or if an unexpected exception - * happens during fault execution--to provide the cluster with some time to - * recuperate--Chaos will wait for 30 minutes before the next health-check. + * @param {string} + * [createComposeDeploymentDescription.registryCredential.registryPassword] The + * password for supplied username to connect to container registry. * * @param {boolean} - * [chaosParameters.clusterHealthPolicy.considerWarningAsError] Indicates - * whether warnings are treated with the same severity as errors. - * - * @param {number} - * [chaosParameters.clusterHealthPolicy.maxPercentUnhealthyNodes] The maximum - * allowed percentage of unhealthy nodes before reporting an error. For - * example, to allow 10% of nodes to be unhealthy, this value would be 10. - * - * The percentage represents the maximum tolerated percentage of nodes that can - * be unhealthy before the cluster is considered in error. - * If the percentage is respected but there is at least one unhealthy node, the - * health is evaluated as Warning. - * The percentage is calculated by dividing the number of unhealthy nodes over - * the total number of nodes in the cluster. - * The computation rounds up to tolerate one failure on small numbers of nodes. - * Default percentage is zero. - * - * In large clusters, some nodes will always be down or out for repairs, so - * this percentage should be configured to tolerate that. - * - * @param {number} - * [chaosParameters.clusterHealthPolicy.maxPercentUnhealthyApplications] The - * maximum allowed percentage of unhealthy applications before reporting an - * error. For example, to allow 10% of applications to be unhealthy, this value - * would be 10. - * - * The percentage represents the maximum tolerated percentage of applications - * that can be unhealthy before the cluster is considered in error. - * If the percentage is respected but there is at least one unhealthy - * application, the health is evaluated as Warning. - * This is calculated by dividing the number of unhealthy applications over the - * total number of application instances in the cluster, excluding applications - * of application types that are included in the - * ApplicationTypeHealthPolicyMap. - * The computation rounds up to tolerate one failure on small numbers of - * applications. Default percentage is zero. - * - * @param {array} - * [chaosParameters.clusterHealthPolicy.applicationTypeHealthPolicyMap] Defines - * a map with max percentage unhealthy applications for specific application - * types. - * Each entry specifies as key the application type name and as value an - * integer that represents the MaxPercentUnhealthyApplications percentage used - * to evaluate the applications of the specified application type. - * - * The application type health policy map can be used during cluster health - * evaluation to describe special application types. - * The application types included in the map are evaluated against the - * percentage specified in the map, and not with the global - * MaxPercentUnhealthyApplications defined in the cluster health policy. - * The applications of application types specified in the map are not counted - * against the global pool of applications. - * For example, if some applications of a type are critical, the cluster - * administrator can add an entry to the map for that application type - * and assign it a value of 0% (that is, do not tolerate any failures). - * All other applications can be evaluated with MaxPercentUnhealthyApplications - * set to 20% to tolerate some failures out of the thousands of application - * instances. - * The application type health policy map is used only if the cluster manifest - * enables application type health evaluation using the configuration entry for - * HealthManager/EnableApplicationTypeHealthEvaluation. - * - * @param {object} [chaosParameters.context] Describes a map, which is a - * collection of (string, string) type key-value pairs. The map can be used to - * record information about - * the Chaos run. There cannot be more than 100 such pairs and each string (key - * or value) can be at most 4095 characters long. - * This map is set by the starter of the Chaos run to optionally store the - * context about the specific run. - * - * @param {object} [chaosParameters.context.map] Describes a map that contains - * a collection of ChaosContextMapItem's. - * - * @param {object} [chaosParameters.chaosTargetFilter] List of cluster entities - * to target for Chaos faults. - * This filter can be used to target Chaos faults only to certain node types or - * only to certain application instances. If ChaosTargetFilter is not used, - * Chaos faults all cluster entities. - * If ChaosTargetFilter is used, Chaos faults only the entities that meet the - * ChaosTargetFilter specification. - * - * @param {array} [chaosParameters.chaosTargetFilter.nodeTypeInclusionList] A - * list of node types to include in Chaos faults. - * All types of faults (restart node, restart code package, remove replica, - * restart replica, move primary, and move secondary) are enabled for the nodes - * of these node types. - * If a nodetype (say NodeTypeX) does not appear in the NodeTypeInclusionList, - * then node level faults (like NodeRestart) will never be enabled for the - * nodes of - * NodeTypeX, but code package and replica faults can still be enabled for - * NodeTypeX if an application in the ApplicationInclusionList. - * happens to reside on a node of NodeTypeX. - * At most 100 node type names can be included in this list, to increase this - * number, a config upgrade is required for - * MaxNumberOfNodeTypesInChaosEntityFilter configuration. - * - * @param {array} [chaosParameters.chaosTargetFilter.applicationInclusionList] - * A list of application URI's to include in Chaos faults. - * All replicas belonging to services of these applications are amenable to - * replica faults (restart replica, remove replica, move primary, and move - * secondary) by Chaos. - * Chaos may restart a code package only if the code package hosts replicas of - * these applications only. - * If an application does not appear in this list, it can still be faulted in - * some Chaos iteration if the application ends up on a node of a node type - * that is included in NodeTypeInclusionList. - * However, if applicationX is tied to nodeTypeY through placement constraints - * and applicationX is absent from ApplicationInclusionList and nodeTypeY is - * absent from NodeTypeInclusionList, then applicationX will never be faulted. - * At most 1000 application names can be included in this list, to increase - * this number, a config upgrade is required for - * MaxNumberOfApplicationsInChaosEntityFilter configuration. + * [createComposeDeploymentDescription.registryCredential.passwordEncrypted] + * Indicates that supplied container registry password is encrypted. * * @param {object} [options] Optional Parameters. * @@ -59085,11 +56994,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - startChaosWithHttpOperationResponse(chaosParameters, options) { + createComposeDeploymentWithHttpOperationResponse(createComposeDeploymentDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._startChaos(chaosParameters, options, (err, result, request, response) => { + self._createComposeDeployment(createComposeDeploymentDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -59100,173 +57009,36 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Starts Chaos in the cluster. - * - * If Chaos is not already running in the cluster, it starts Chaos with the - * passed in Chaos parameters. - * If Chaos is already running when this call is made, the call fails with the - * error code FABRIC_E_CHAOS_ALREADY_RUNNING. - * Refer to the article [Induce controlled Chaos in Service Fabric - * clusters](https://docs.microsoft.com/azure/service-fabric/service-fabric-controlled-chaos) - * for more details. - * - * @param {object} chaosParameters Describes all the parameters to configure a - * Chaos run. + * @summary Creates a Service Fabric compose deployment. * - * @param {string} [chaosParameters.timeToRunInSeconds] Total time (in seconds) - * for which Chaos will run before automatically stopping. The maximum allowed - * value is 4,294,967,295 (System.UInt32.MaxValue). + * Compose is a file format that describes multi-container applications. This + * API allows deploying container based applications defined in compose format + * in a Service Fabric cluster. Once the deployment is created, its status can + * be tracked via the `GetComposeDeploymentStatus` API. * - * @param {number} [chaosParameters.maxClusterStabilizationTimeoutInSeconds] - * The maximum amount of time to wait for all cluster entities to become stable - * and healthy. Chaos executes in iterations and at the start of each iteration - * it validates the health of cluster entities. - * During validation if a cluster entity is not stable and healthy within - * MaxClusterStabilizationTimeoutInSeconds, Chaos generates a validation failed - * event. + * @param {object} createComposeDeploymentDescription Describes the compose + * deployment that needs to be created. * - * @param {number} [chaosParameters.maxConcurrentFaults] MaxConcurrentFaults is - * the maximum number of concurrent faults induced per iteration. - * Chaos executes in iterations and two consecutive iterations are separated by - * a validation phase. - * The higher the concurrency, the more aggressive the injection of faults, - * leading to inducing more complex series of states to uncover bugs. - * The recommendation is to start with a value of 2 or 3 and to exercise - * caution while moving up. + * @param {string} createComposeDeploymentDescription.deploymentName The name + * of the deployment. * - * @param {boolean} [chaosParameters.enableMoveReplicaFaults] Enables or - * disables the move primary and move secondary faults. + * @param {string} createComposeDeploymentDescription.composeFileContent The + * content of the compose file that describes the deployment to create. * - * @param {number} [chaosParameters.waitTimeBetweenFaultsInSeconds] Wait time - * (in seconds) between consecutive faults within a single iteration. - * The larger the value, the lower the overlapping between faults and the - * simpler the sequence of state transitions that the cluster goes through. - * The recommendation is to start with a value between 1 and 5 and exercise - * caution while moving up. + * @param {object} [createComposeDeploymentDescription.registryCredential] + * Credential information to connect to container registry. * - * @param {number} [chaosParameters.waitTimeBetweenIterationsInSeconds] - * Time-separation (in seconds) between two consecutive iterations of Chaos. - * The larger the value, the lower the fault injection rate. + * @param {string} + * [createComposeDeploymentDescription.registryCredential.registryUserName] The + * user name to connect to container registry. * - * @param {object} [chaosParameters.clusterHealthPolicy] Passed-in cluster - * health policy is used to validate health of the cluster in between Chaos - * iterations. If the cluster health is in error or if an unexpected exception - * happens during fault execution--to provide the cluster with some time to - * recuperate--Chaos will wait for 30 minutes before the next health-check. + * @param {string} + * [createComposeDeploymentDescription.registryCredential.registryPassword] The + * password for supplied username to connect to container registry. * * @param {boolean} - * [chaosParameters.clusterHealthPolicy.considerWarningAsError] Indicates - * whether warnings are treated with the same severity as errors. - * - * @param {number} - * [chaosParameters.clusterHealthPolicy.maxPercentUnhealthyNodes] The maximum - * allowed percentage of unhealthy nodes before reporting an error. For - * example, to allow 10% of nodes to be unhealthy, this value would be 10. - * - * The percentage represents the maximum tolerated percentage of nodes that can - * be unhealthy before the cluster is considered in error. - * If the percentage is respected but there is at least one unhealthy node, the - * health is evaluated as Warning. - * The percentage is calculated by dividing the number of unhealthy nodes over - * the total number of nodes in the cluster. - * The computation rounds up to tolerate one failure on small numbers of nodes. - * Default percentage is zero. - * - * In large clusters, some nodes will always be down or out for repairs, so - * this percentage should be configured to tolerate that. - * - * @param {number} - * [chaosParameters.clusterHealthPolicy.maxPercentUnhealthyApplications] The - * maximum allowed percentage of unhealthy applications before reporting an - * error. For example, to allow 10% of applications to be unhealthy, this value - * would be 10. - * - * The percentage represents the maximum tolerated percentage of applications - * that can be unhealthy before the cluster is considered in error. - * If the percentage is respected but there is at least one unhealthy - * application, the health is evaluated as Warning. - * This is calculated by dividing the number of unhealthy applications over the - * total number of application instances in the cluster, excluding applications - * of application types that are included in the - * ApplicationTypeHealthPolicyMap. - * The computation rounds up to tolerate one failure on small numbers of - * applications. Default percentage is zero. - * - * @param {array} - * [chaosParameters.clusterHealthPolicy.applicationTypeHealthPolicyMap] Defines - * a map with max percentage unhealthy applications for specific application - * types. - * Each entry specifies as key the application type name and as value an - * integer that represents the MaxPercentUnhealthyApplications percentage used - * to evaluate the applications of the specified application type. - * - * The application type health policy map can be used during cluster health - * evaluation to describe special application types. - * The application types included in the map are evaluated against the - * percentage specified in the map, and not with the global - * MaxPercentUnhealthyApplications defined in the cluster health policy. - * The applications of application types specified in the map are not counted - * against the global pool of applications. - * For example, if some applications of a type are critical, the cluster - * administrator can add an entry to the map for that application type - * and assign it a value of 0% (that is, do not tolerate any failures). - * All other applications can be evaluated with MaxPercentUnhealthyApplications - * set to 20% to tolerate some failures out of the thousands of application - * instances. - * The application type health policy map is used only if the cluster manifest - * enables application type health evaluation using the configuration entry for - * HealthManager/EnableApplicationTypeHealthEvaluation. - * - * @param {object} [chaosParameters.context] Describes a map, which is a - * collection of (string, string) type key-value pairs. The map can be used to - * record information about - * the Chaos run. There cannot be more than 100 such pairs and each string (key - * or value) can be at most 4095 characters long. - * This map is set by the starter of the Chaos run to optionally store the - * context about the specific run. - * - * @param {object} [chaosParameters.context.map] Describes a map that contains - * a collection of ChaosContextMapItem's. - * - * @param {object} [chaosParameters.chaosTargetFilter] List of cluster entities - * to target for Chaos faults. - * This filter can be used to target Chaos faults only to certain node types or - * only to certain application instances. If ChaosTargetFilter is not used, - * Chaos faults all cluster entities. - * If ChaosTargetFilter is used, Chaos faults only the entities that meet the - * ChaosTargetFilter specification. - * - * @param {array} [chaosParameters.chaosTargetFilter.nodeTypeInclusionList] A - * list of node types to include in Chaos faults. - * All types of faults (restart node, restart code package, remove replica, - * restart replica, move primary, and move secondary) are enabled for the nodes - * of these node types. - * If a nodetype (say NodeTypeX) does not appear in the NodeTypeInclusionList, - * then node level faults (like NodeRestart) will never be enabled for the - * nodes of - * NodeTypeX, but code package and replica faults can still be enabled for - * NodeTypeX if an application in the ApplicationInclusionList. - * happens to reside on a node of NodeTypeX. - * At most 100 node type names can be included in this list, to increase this - * number, a config upgrade is required for - * MaxNumberOfNodeTypesInChaosEntityFilter configuration. - * - * @param {array} [chaosParameters.chaosTargetFilter.applicationInclusionList] - * A list of application URI's to include in Chaos faults. - * All replicas belonging to services of these applications are amenable to - * replica faults (restart replica, remove replica, move primary, and move - * secondary) by Chaos. - * Chaos may restart a code package only if the code package hosts replicas of - * these applications only. - * If an application does not appear in this list, it can still be faulted in - * some Chaos iteration if the application ends up on a node of a node type - * that is included in NodeTypeInclusionList. - * However, if applicationX is tied to nodeTypeY through placement constraints - * and applicationX is absent from ApplicationInclusionList and nodeTypeY is - * absent from NodeTypeInclusionList, then applicationX will never be faulted. - * At most 1000 application names can be included in this list, to increase - * this number, a config upgrade is required for - * MaxNumberOfApplicationsInChaosEntityFilter configuration. + * [createComposeDeploymentDescription.registryCredential.passwordEncrypted] + * Indicates that supplied container registry password is encrypted. * * @param {object} [options] Optional Parameters. * @@ -59299,7 +57071,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - startChaos(chaosParameters, options, optionalCallback) { + createComposeDeployment(createComposeDeploymentDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -59308,27 +57080,26 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._startChaos(chaosParameters, options, (err, result, request, response) => { + self._createComposeDeployment(createComposeDeploymentDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._startChaos(chaosParameters, options, optionalCallback); + return self._createComposeDeployment(createComposeDeploymentDescription, options, optionalCallback); } } /** - * @summary Stops Chaos if it is running in the cluster and put the Chaos - * Schedule in a stopped state. + * @summary Gets information about a Service Fabric compose deployment. * - * Stops Chaos from executing new faults. In-flight faults will continue to - * execute until they are complete. The current Chaos Schedule is put into a - * stopped state. - * Once a schedule is stopped, it will stay in the stopped state and not be - * used to Chaos Schedule new runs of Chaos. A new Chaos Schedule must be set - * in order to resume scheduling. + * Returns the status of the compose deployment that was created or in the + * process of being created in the Service Fabric cluster and whose name + * matches the one specified as the parameter. The response includes the name, + * status, and other details about the deployment. + * + * @param {string} deploymentName The identity of the deployment. * * @param {object} [options] Optional Parameters. * @@ -59342,15 +57113,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - stopChaosWithHttpOperationResponse(options) { + getComposeDeploymentStatusWithHttpOperationResponse(deploymentName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._stopChaos(options, (err, result, request, response) => { + self._getComposeDeploymentStatus(deploymentName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -59361,15 +57132,14 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Stops Chaos if it is running in the cluster and put the Chaos - * Schedule in a stopped state. + * @summary Gets information about a Service Fabric compose deployment. * - * Stops Chaos from executing new faults. In-flight faults will continue to - * execute until they are complete. The current Chaos Schedule is put into a - * stopped state. - * Once a schedule is stopped, it will stay in the stopped state and not be - * used to Chaos Schedule new runs of Chaos. A new Chaos Schedule must be set - * in order to resume scheduling. + * Returns the status of the compose deployment that was created or in the + * process of being created in the Service Fabric cluster and whose name + * matches the one specified as the parameter. The response includes the name, + * status, and other details about the deployment. + * + * @param {string} deploymentName The identity of the deployment. * * @param {object} [options] Optional Parameters. * @@ -59388,7 +57158,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {ComposeDeploymentStatusInfo} - The deserialized result object. * * @reject {Error} - The error object. * @@ -59396,13 +57166,15 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ComposeDeploymentStatusInfo} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - stopChaos(options, optionalCallback) { + getComposeDeploymentStatus(deploymentName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -59411,30 +57183,27 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._stopChaos(options, (err, result, request, response) => { + self._getComposeDeploymentStatus(deploymentName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._stopChaos(options, optionalCallback); + return self._getComposeDeploymentStatus(deploymentName, options, optionalCallback); } } /** - * @summary Gets the next segment of the Chaos events based on the continuation - * token or the time range. + * @summary Gets the list of compose deployments created in the Service Fabric + * cluster. * - * To get the next segment of the Chaos events, you can specify the - * ContinuationToken. To get the start of a new segment of Chaos events, you - * can specify the time range - * through StartTimeUtc and EndTimeUtc. You cannot specify both the - * ContinuationToken and the time range in the same call. - * When there are more than 100 Chaos events, the Chaos events are returned in - * multiple segments where a segment contains no more than 100 Chaos events and - * to get the next segment you make a call to this API with the continuation - * token. + * Gets the status about the compose deployments that were created or in the + * process of being created in the Service Fabric cluster. The response + * includes the name, status, and other details about the compose deployments. + * If the list of deployments do not fit in a page, one page of results is + * returned as well as a continuation token, which can be used to get the next + * page. * * @param {object} [options] Optional Parameters. * @@ -59443,20 +57212,8 @@ class ServiceFabricClient extends ServiceClient { * value is included in the response of the API when the results from the * system do not fit in a single response. When this value is passed to the * next API call, the API returns next set of results. If there are no further - * results, then the continuation token does not contain a value. The value of - * this parameter should not be URL encoded. - * - * @param {string} [options.startTimeUtc] The Windows file time representing - * the start time of the time range for which a Chaos report is to be - * generated. Consult [DateTime.ToFileTimeUtc - * Method](https://msdn.microsoft.com/library/system.datetime.tofiletimeutc(v=vs.110).aspx) - * for details. - * - * @param {string} [options.endTimeUtc] The Windows file time representing the - * end time of the time range for which a Chaos report is to be generated. - * Consult [DateTime.ToFileTimeUtc - * Method](https://msdn.microsoft.com/library/system.datetime.tofiletimeutc(v=vs.110).aspx) - * for details. + * results, then the continuation token does not contain a value. The value of + * this parameter should not be URL encoded. * * @param {number} [options.maxResults] The maximum number of results to be * returned as part of the paged queries. This parameter defines the upper @@ -59476,15 +57233,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getChaosEventsWithHttpOperationResponse(options) { + getComposeDeploymentStatusListWithHttpOperationResponse(options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getChaosEvents(options, (err, result, request, response) => { + self._getComposeDeploymentStatusList(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -59495,18 +57252,15 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the next segment of the Chaos events based on the continuation - * token or the time range. + * @summary Gets the list of compose deployments created in the Service Fabric + * cluster. * - * To get the next segment of the Chaos events, you can specify the - * ContinuationToken. To get the start of a new segment of Chaos events, you - * can specify the time range - * through StartTimeUtc and EndTimeUtc. You cannot specify both the - * ContinuationToken and the time range in the same call. - * When there are more than 100 Chaos events, the Chaos events are returned in - * multiple segments where a segment contains no more than 100 Chaos events and - * to get the next segment you make a call to this API with the continuation - * token. + * Gets the status about the compose deployments that were created or in the + * process of being created in the Service Fabric cluster. The response + * includes the name, status, and other details about the compose deployments. + * If the list of deployments do not fit in a page, one page of results is + * returned as well as a continuation token, which can be used to get the next + * page. * * @param {object} [options] Optional Parameters. * @@ -59518,18 +57272,6 @@ class ServiceFabricClient extends ServiceClient { * results, then the continuation token does not contain a value. The value of * this parameter should not be URL encoded. * - * @param {string} [options.startTimeUtc] The Windows file time representing - * the start time of the time range for which a Chaos report is to be - * generated. Consult [DateTime.ToFileTimeUtc - * Method](https://msdn.microsoft.com/library/system.datetime.tofiletimeutc(v=vs.110).aspx) - * for details. - * - * @param {string} [options.endTimeUtc] The Windows file time representing the - * end time of the time range for which a Chaos report is to be generated. - * Consult [DateTime.ToFileTimeUtc - * Method](https://msdn.microsoft.com/library/system.datetime.tofiletimeutc(v=vs.110).aspx) - * for details. - * * @param {number} [options.maxResults] The maximum number of results to be * returned as part of the paged queries. This parameter defines the upper * bound on the number of results returned. The results returned can be less @@ -59553,7 +57295,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ChaosEventsSegment} - The deserialized result object. + * @resolve {PagedComposeDeploymentStatusInfoList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -59562,13 +57304,14 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ChaosEventsSegment} for more information. + * See {@link PagedComposeDeploymentStatusInfoList} for + * more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getChaosEvents(options, optionalCallback) { + getComposeDeploymentStatusList(options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -59577,22 +57320,25 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getChaosEvents(options, (err, result, request, response) => { + self._getComposeDeploymentStatusList(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getChaosEvents(options, optionalCallback); + return self._getComposeDeploymentStatusList(options, optionalCallback); } } /** - * @summary Get the Chaos Schedule defining when and how to run Chaos. + * @summary Gets details for the latest upgrade performed on this Service + * Fabric compose deployment. * - * Gets the version of the Chaos Schedule in use and the Chaos Schedule that - * defines when and how to run Chaos. + * Returns the information about the state of the compose deployment upgrade + * along with details to aid debugging application health issues. + * + * @param {string} deploymentName The identity of the deployment. * * @param {object} [options] Optional Parameters. * @@ -59606,15 +57352,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getChaosScheduleWithHttpOperationResponse(options) { + getComposeDeploymentUpgradeProgressWithHttpOperationResponse(deploymentName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getChaosSchedule(options, (err, result, request, response) => { + self._getComposeDeploymentUpgradeProgress(deploymentName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -59625,10 +57371,13 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Get the Chaos Schedule defining when and how to run Chaos. + * @summary Gets details for the latest upgrade performed on this Service + * Fabric compose deployment. * - * Gets the version of the Chaos Schedule in use and the Chaos Schedule that - * defines when and how to run Chaos. + * Returns the information about the state of the compose deployment upgrade + * along with details to aid debugging application health issues. + * + * @param {string} deploymentName The identity of the deployment. * * @param {object} [options] Optional Parameters. * @@ -59647,7 +57396,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ChaosScheduleDescription} - The deserialized result object. + * @resolve {ComposeDeploymentUpgradeProgressInfo} - The deserialized result object. * * @reject {Error} - The error object. * @@ -59656,14 +57405,14 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ChaosScheduleDescription} for more - * information. + * See {@link ComposeDeploymentUpgradeProgressInfo} for + * more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getChaosSchedule(options, optionalCallback) { + getComposeDeploymentUpgradeProgress(deploymentName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -59672,45 +57421,23 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getChaosSchedule(options, (err, result, request, response) => { + self._getComposeDeploymentUpgradeProgress(deploymentName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getChaosSchedule(options, optionalCallback); + return self._getComposeDeploymentUpgradeProgress(deploymentName, options, optionalCallback); } } /** - * @summary Set the schedule used by Chaos. - * - * Chaos will automatically schedule runs based on the Chaos Schedule. - * The Chaos Schedule will be updated if the provided version matches the - * version on the server. - * When updating the Chaos Schedule, the version on the server is incremented - * by 1. - * The version on the server will wrap back to 0 after reaching a large number. - * If Chaos is running when this call is made, the call will fail. - * - * @param {object} chaosSchedule Describes the schedule used by Chaos. - * - * @param {number} [chaosSchedule.version] The version number of the Schedule. - * - * @param {object} [chaosSchedule.schedule] Defines the schedule used by Chaos. - * - * @param {date} [chaosSchedule.schedule.startDate] The date and time Chaos - * will start using this schedule. - * - * @param {date} [chaosSchedule.schedule.expiryDate] The date and time Chaos - * will continue to use this schedule until. + * @summary Deletes an existing Service Fabric compose deployment from cluster. * - * @param {array} [chaosSchedule.schedule.chaosParametersDictionary] A mapping - * of string names to Chaos Parameters to be referenced by Chaos Schedule Jobs. + * Deletes an existing Service Fabric compose deployment. * - * @param {array} [chaosSchedule.schedule.jobs] A list of all Chaos Schedule - * Jobs that will be automated by the schedule. + * @param {string} deploymentName The identity of the deployment. * * @param {object} [options] Optional Parameters. * @@ -59728,11 +57455,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - postChaosScheduleWithHttpOperationResponse(chaosSchedule, options) { + removeComposeDeploymentWithHttpOperationResponse(deploymentName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._postChaosSchedule(chaosSchedule, options, (err, result, request, response) => { + self._removeComposeDeployment(deploymentName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -59743,33 +57470,11 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Set the schedule used by Chaos. - * - * Chaos will automatically schedule runs based on the Chaos Schedule. - * The Chaos Schedule will be updated if the provided version matches the - * version on the server. - * When updating the Chaos Schedule, the version on the server is incremented - * by 1. - * The version on the server will wrap back to 0 after reaching a large number. - * If Chaos is running when this call is made, the call will fail. - * - * @param {object} chaosSchedule Describes the schedule used by Chaos. - * - * @param {number} [chaosSchedule.version] The version number of the Schedule. - * - * @param {object} [chaosSchedule.schedule] Defines the schedule used by Chaos. - * - * @param {date} [chaosSchedule.schedule.startDate] The date and time Chaos - * will start using this schedule. - * - * @param {date} [chaosSchedule.schedule.expiryDate] The date and time Chaos - * will continue to use this schedule until. + * @summary Deletes an existing Service Fabric compose deployment from cluster. * - * @param {array} [chaosSchedule.schedule.chaosParametersDictionary] A mapping - * of string names to Chaos Parameters to be referenced by Chaos Schedule Jobs. + * Deletes an existing Service Fabric compose deployment. * - * @param {array} [chaosSchedule.schedule.jobs] A list of all Chaos Schedule - * Jobs that will be automated by the schedule. + * @param {string} deploymentName The identity of the deployment. * * @param {object} [options] Optional Parameters. * @@ -59802,7 +57507,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - postChaosSchedule(chaosSchedule, options, optionalCallback) { + removeComposeDeployment(deploymentName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -59811,34 +57516,194 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._postChaosSchedule(chaosSchedule, options, (err, result, request, response) => { + self._removeComposeDeployment(deploymentName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._postChaosSchedule(chaosSchedule, options, optionalCallback); + return self._removeComposeDeployment(deploymentName, options, optionalCallback); } } /** - * @summary Uploads contents of the file to the image store. + * @summary Starts upgrading a compose deployment in the Service Fabric + * cluster. * - * Uploads contents of the file to the image store. Use this API if the file is - * small enough to upload again if the connection fails. The file's data needs - * to be added to the request body. The contents will be uploaded to the - * specified path. Image store service uses a mark file to indicate the - * availability of the folder. The mark file is an empty file named "_.dir". - * The mark file is generated by the image store service when all files in a - * folder are uploaded. When using File-by-File approach to upload application - * package in REST, the image store service isn't aware of the file hierarchy - * of the application package; you need to create a mark file per folder and - * upload it last, to let the image store service know that the folder is - * complete. + * Validates the supplied upgrade parameters and starts upgrading the + * deployment if the parameters are valid. * - * @param {string} contentPath Relative path to file or folder in the image - * store from its root. + * @param {string} deploymentName The identity of the deployment. + * + * @param {object} composeDeploymentUpgradeDescription Parameters for upgrading + * compose deployment. + * + * @param {string} composeDeploymentUpgradeDescription.deploymentName The name + * of the deployment. + * + * @param {string} composeDeploymentUpgradeDescription.composeFileContent The + * content of the compose file that describes the deployment to create. + * + * @param {object} [composeDeploymentUpgradeDescription.registryCredential] + * Credential information to connect to container registry. + * + * @param {string} + * [composeDeploymentUpgradeDescription.registryCredential.registryUserName] + * The user name to connect to container registry. + * + * @param {string} + * [composeDeploymentUpgradeDescription.registryCredential.registryPassword] + * The password for supplied username to connect to container registry. + * + * @param {boolean} + * [composeDeploymentUpgradeDescription.registryCredential.passwordEncrypted] + * Indicates that supplied container registry password is encrypted. + * + * @param {string} composeDeploymentUpgradeDescription.upgradeKind The kind of + * upgrade out of the following possible values. Possible values include: + * 'Invalid', 'Rolling' + * + * @param {string} [composeDeploymentUpgradeDescription.rollingUpgradeMode] The + * mode used to monitor health during a rolling upgrade. The values are + * UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: + * 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' + * + * @param {number} + * [composeDeploymentUpgradeDescription.upgradeReplicaSetCheckTimeoutInSeconds] + * The maximum amount of time to block processing of an upgrade domain and + * prevent loss of availability when there are unexpected issues. When this + * timeout expires, processing of the upgrade domain will proceed regardless of + * availability loss issues. The timeout is reset at the start of each upgrade + * domain. Valid values are between 0 and 42949672925 inclusive. (unsigned + * 32-bit integer). + * + * @param {boolean} [composeDeploymentUpgradeDescription.forceRestart] If true, + * then processes are forcefully restarted during upgrade even when the code + * version has not changed (the upgrade only changes configuration or data). + * + * @param {object} [composeDeploymentUpgradeDescription.monitoringPolicy] + * Describes the parameters for monitoring an upgrade in Monitored mode. + * + * @param {string} + * [composeDeploymentUpgradeDescription.monitoringPolicy.failureAction] The + * compensating action to perform when a Monitored upgrade encounters + * monitoring policy or health policy violations. + * Invalid indicates the failure action is invalid. Rollback specifies that the + * upgrade will start rolling back automatically. + * Manual indicates that the upgrade will switch to UnmonitoredManual upgrade + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' + * + * @param {string} + * [composeDeploymentUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] + * The amount of time to wait after completing an upgrade domain before + * applying health policies. It is first interpreted as a string representing + * an ISO 8601 duration. If that fails, then it is interpreted as a number + * representing the total number of milliseconds. + * + * @param {string} + * [composeDeploymentUpgradeDescription.monitoringPolicy.healthCheckStableDurationInMilliseconds] + * The amount of time that the application or cluster must remain healthy + * before the upgrade proceeds to the next upgrade domain. It is first + * interpreted as a string representing an ISO 8601 duration. If that fails, + * then it is interpreted as a number representing the total number of + * milliseconds. + * + * @param {string} + * [composeDeploymentUpgradeDescription.monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] + * The amount of time to retry health evaluation when the application or + * cluster is unhealthy before FailureAction is executed. It is first + * interpreted as a string representing an ISO 8601 duration. If that fails, + * then it is interpreted as a number representing the total number of + * milliseconds. + * + * @param {string} + * [composeDeploymentUpgradeDescription.monitoringPolicy.upgradeTimeoutInMilliseconds] + * The amount of time the overall upgrade has to complete before FailureAction + * is executed. It is first interpreted as a string representing an ISO 8601 + * duration. If that fails, then it is interpreted as a number representing the + * total number of milliseconds. + * + * @param {string} + * [composeDeploymentUpgradeDescription.monitoringPolicy.upgradeDomainTimeoutInMilliseconds] + * The amount of time each upgrade domain has to complete before FailureAction + * is executed. It is first interpreted as a string representing an ISO 8601 + * duration. If that fails, then it is interpreted as a number representing the + * total number of milliseconds. + * + * @param {object} + * [composeDeploymentUpgradeDescription.applicationHealthPolicy] Defines a + * health policy used to evaluate the health of an application or one of its + * children entities. + * + * @param {boolean} + * [composeDeploymentUpgradeDescription.applicationHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. + * + * @param {number} + * [composeDeploymentUpgradeDescription.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] + * The maximum allowed percentage of unhealthy deployed applications. Allowed + * values are Byte values from zero to 100. + * The percentage represents the maximum tolerated percentage of deployed + * applications that can be unhealthy before the application is considered in + * error. + * This is calculated by dividing the number of unhealthy deployed applications + * over the number of nodes where the application is currently deployed on in + * the cluster. + * The computation rounds up to tolerate one failure on small numbers of nodes. + * Default percentage is zero. + * + * @param {object} + * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * The health policy used by default to evaluate the health of a service type. + * + * @param {number} + * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] + * The maximum allowed percentage of unhealthy partitions per service. Allowed + * values are Byte values from zero to 100 + * + * The percentage represents the maximum tolerated percentage of partitions + * that can be unhealthy before the service is considered in error. + * If the percentage is respected but there is at least one unhealthy + * partition, the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy partitions + * over the total number of partitions in the service. + * The computation rounds up to tolerate one failure on small numbers of + * partitions. Default percentage is zero. + * + * @param {number} + * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] + * The maximum allowed percentage of unhealthy replicas per partition. Allowed + * values are Byte values from zero to 100. + * + * The percentage represents the maximum tolerated percentage of replicas that + * can be unhealthy before the partition is considered in error. + * If the percentage is respected but there is at least one unhealthy replica, + * the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy replicas + * over the total number of replicas in the partition. + * The computation rounds up to tolerate one failure on small numbers of + * replicas. Default percentage is zero. + * + * @param {number} + * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. + * + * The percentage represents the maximum tolerated percentage of services that + * can be unhealthy before the application is considered in error. + * If the percentage is respected but there is at least one unhealthy service, + * the health is evaluated as Warning. + * This is calculated by dividing the number of unhealthy services of the + * specific service type over the total number of services of the specific + * service type. + * The computation rounds up to tolerate one failure on small numbers of + * services. Default percentage is zero. + * + * @param {array} + * [composeDeploymentUpgradeDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. * * @param {object} [options] Optional Parameters. * @@ -59854,39 +57719,199 @@ class ServiceFabricClient extends ServiceClient { * * @resolve {HttpOperationResponse} - The deserialized result object. * - * @reject {Error} - The error object. - */ - uploadFileWithHttpOperationResponse(contentPath, options) { - let client = this; - let self = this; - return new Promise((resolve, reject) => { - self._uploadFile(contentPath, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * @summary Uploads contents of the file to the image store. + * @reject {Error} - The error object. + */ + startComposeDeploymentUpgradeWithHttpOperationResponse(deploymentName, composeDeploymentUpgradeDescription, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._startComposeDeploymentUpgrade(deploymentName, composeDeploymentUpgradeDescription, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Starts upgrading a compose deployment in the Service Fabric + * cluster. + * + * Validates the supplied upgrade parameters and starts upgrading the + * deployment if the parameters are valid. + * + * @param {string} deploymentName The identity of the deployment. + * + * @param {object} composeDeploymentUpgradeDescription Parameters for upgrading + * compose deployment. + * + * @param {string} composeDeploymentUpgradeDescription.deploymentName The name + * of the deployment. + * + * @param {string} composeDeploymentUpgradeDescription.composeFileContent The + * content of the compose file that describes the deployment to create. + * + * @param {object} [composeDeploymentUpgradeDescription.registryCredential] + * Credential information to connect to container registry. + * + * @param {string} + * [composeDeploymentUpgradeDescription.registryCredential.registryUserName] + * The user name to connect to container registry. + * + * @param {string} + * [composeDeploymentUpgradeDescription.registryCredential.registryPassword] + * The password for supplied username to connect to container registry. + * + * @param {boolean} + * [composeDeploymentUpgradeDescription.registryCredential.passwordEncrypted] + * Indicates that supplied container registry password is encrypted. + * + * @param {string} composeDeploymentUpgradeDescription.upgradeKind The kind of + * upgrade out of the following possible values. Possible values include: + * 'Invalid', 'Rolling' + * + * @param {string} [composeDeploymentUpgradeDescription.rollingUpgradeMode] The + * mode used to monitor health during a rolling upgrade. The values are + * UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: + * 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' + * + * @param {number} + * [composeDeploymentUpgradeDescription.upgradeReplicaSetCheckTimeoutInSeconds] + * The maximum amount of time to block processing of an upgrade domain and + * prevent loss of availability when there are unexpected issues. When this + * timeout expires, processing of the upgrade domain will proceed regardless of + * availability loss issues. The timeout is reset at the start of each upgrade + * domain. Valid values are between 0 and 42949672925 inclusive. (unsigned + * 32-bit integer). + * + * @param {boolean} [composeDeploymentUpgradeDescription.forceRestart] If true, + * then processes are forcefully restarted during upgrade even when the code + * version has not changed (the upgrade only changes configuration or data). + * + * @param {object} [composeDeploymentUpgradeDescription.monitoringPolicy] + * Describes the parameters for monitoring an upgrade in Monitored mode. + * + * @param {string} + * [composeDeploymentUpgradeDescription.monitoringPolicy.failureAction] The + * compensating action to perform when a Monitored upgrade encounters + * monitoring policy or health policy violations. + * Invalid indicates the failure action is invalid. Rollback specifies that the + * upgrade will start rolling back automatically. + * Manual indicates that the upgrade will switch to UnmonitoredManual upgrade + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' + * + * @param {string} + * [composeDeploymentUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] + * The amount of time to wait after completing an upgrade domain before + * applying health policies. It is first interpreted as a string representing + * an ISO 8601 duration. If that fails, then it is interpreted as a number + * representing the total number of milliseconds. + * + * @param {string} + * [composeDeploymentUpgradeDescription.monitoringPolicy.healthCheckStableDurationInMilliseconds] + * The amount of time that the application or cluster must remain healthy + * before the upgrade proceeds to the next upgrade domain. It is first + * interpreted as a string representing an ISO 8601 duration. If that fails, + * then it is interpreted as a number representing the total number of + * milliseconds. + * + * @param {string} + * [composeDeploymentUpgradeDescription.monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] + * The amount of time to retry health evaluation when the application or + * cluster is unhealthy before FailureAction is executed. It is first + * interpreted as a string representing an ISO 8601 duration. If that fails, + * then it is interpreted as a number representing the total number of + * milliseconds. + * + * @param {string} + * [composeDeploymentUpgradeDescription.monitoringPolicy.upgradeTimeoutInMilliseconds] + * The amount of time the overall upgrade has to complete before FailureAction + * is executed. It is first interpreted as a string representing an ISO 8601 + * duration. If that fails, then it is interpreted as a number representing the + * total number of milliseconds. + * + * @param {string} + * [composeDeploymentUpgradeDescription.monitoringPolicy.upgradeDomainTimeoutInMilliseconds] + * The amount of time each upgrade domain has to complete before FailureAction + * is executed. It is first interpreted as a string representing an ISO 8601 + * duration. If that fails, then it is interpreted as a number representing the + * total number of milliseconds. + * + * @param {object} + * [composeDeploymentUpgradeDescription.applicationHealthPolicy] Defines a + * health policy used to evaluate the health of an application or one of its + * children entities. + * + * @param {boolean} + * [composeDeploymentUpgradeDescription.applicationHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. + * + * @param {number} + * [composeDeploymentUpgradeDescription.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] + * The maximum allowed percentage of unhealthy deployed applications. Allowed + * values are Byte values from zero to 100. + * The percentage represents the maximum tolerated percentage of deployed + * applications that can be unhealthy before the application is considered in + * error. + * This is calculated by dividing the number of unhealthy deployed applications + * over the number of nodes where the application is currently deployed on in + * the cluster. + * The computation rounds up to tolerate one failure on small numbers of nodes. + * Default percentage is zero. + * + * @param {object} + * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * The health policy used by default to evaluate the health of a service type. + * + * @param {number} + * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] + * The maximum allowed percentage of unhealthy partitions per service. Allowed + * values are Byte values from zero to 100 + * + * The percentage represents the maximum tolerated percentage of partitions + * that can be unhealthy before the service is considered in error. + * If the percentage is respected but there is at least one unhealthy + * partition, the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy partitions + * over the total number of partitions in the service. + * The computation rounds up to tolerate one failure on small numbers of + * partitions. Default percentage is zero. + * + * @param {number} + * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] + * The maximum allowed percentage of unhealthy replicas per partition. Allowed + * values are Byte values from zero to 100. + * + * The percentage represents the maximum tolerated percentage of replicas that + * can be unhealthy before the partition is considered in error. + * If the percentage is respected but there is at least one unhealthy replica, + * the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy replicas + * over the total number of replicas in the partition. + * The computation rounds up to tolerate one failure on small numbers of + * replicas. Default percentage is zero. + * + * @param {number} + * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. * - * Uploads contents of the file to the image store. Use this API if the file is - * small enough to upload again if the connection fails. The file's data needs - * to be added to the request body. The contents will be uploaded to the - * specified path. Image store service uses a mark file to indicate the - * availability of the folder. The mark file is an empty file named "_.dir". - * The mark file is generated by the image store service when all files in a - * folder are uploaded. When using File-by-File approach to upload application - * package in REST, the image store service isn't aware of the file hierarchy - * of the application package; you need to create a mark file per folder and - * upload it last, to let the image store service know that the folder is - * complete. + * The percentage represents the maximum tolerated percentage of services that + * can be unhealthy before the application is considered in error. + * If the percentage is respected but there is at least one unhealthy service, + * the health is evaluated as Warning. + * This is calculated by dividing the number of unhealthy services of the + * specific service type over the total number of services of the specific + * service type. + * The computation rounds up to tolerate one failure on small numbers of + * services. Default percentage is zero. * - * @param {string} contentPath Relative path to file or folder in the image - * store from its root. + * @param {array} + * [composeDeploymentUpgradeDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. * * @param {object} [options] Optional Parameters. * @@ -59919,7 +57944,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - uploadFile(contentPath, options, optionalCallback) { + startComposeDeploymentUpgrade(deploymentName, composeDeploymentUpgradeDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -59928,25 +57953,24 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._uploadFile(contentPath, options, (err, result, request, response) => { + self._startComposeDeploymentUpgrade(deploymentName, composeDeploymentUpgradeDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._uploadFile(contentPath, options, optionalCallback); + return self._startComposeDeploymentUpgrade(deploymentName, composeDeploymentUpgradeDescription, options, optionalCallback); } } /** - * @summary Gets the image store content information. + * @summary Starts rolling back a compose deployment upgrade in the Service + * Fabric cluster. * - * Returns the information about the image store content at the specified - * contentPath. The contentPath is relative to the root of the image store. + * Rollback a service fabric compose deployment upgrade. * - * @param {string} contentPath Relative path to file or folder in the image - * store from its root. + * @param {string} deploymentName The identity of the deployment. * * @param {object} [options] Optional Parameters. * @@ -59960,15 +57984,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getImageStoreContentWithHttpOperationResponse(contentPath, options) { + startRollbackComposeDeploymentUpgradeWithHttpOperationResponse(deploymentName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getImageStoreContent(contentPath, options, (err, result, request, response) => { + self._startRollbackComposeDeploymentUpgrade(deploymentName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -59979,13 +58003,12 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the image store content information. + * @summary Starts rolling back a compose deployment upgrade in the Service + * Fabric cluster. * - * Returns the information about the image store content at the specified - * contentPath. The contentPath is relative to the root of the image store. + * Rollback a service fabric compose deployment upgrade. * - * @param {string} contentPath Relative path to file or folder in the image - * store from its root. + * @param {string} deploymentName The identity of the deployment. * * @param {object} [options] Optional Parameters. * @@ -60004,7 +58027,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ImageStoreContent} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -60012,14 +58035,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ImageStoreContent} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getImageStoreContent(contentPath, options, optionalCallback) { + startRollbackComposeDeploymentUpgrade(deploymentName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -60028,26 +58050,23 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getImageStoreContent(contentPath, options, (err, result, request, response) => { + self._startRollbackComposeDeploymentUpgrade(deploymentName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getImageStoreContent(contentPath, options, optionalCallback); + return self._startRollbackComposeDeploymentUpgrade(deploymentName, options, optionalCallback); } } /** - * @summary Deletes existing image store content. - * - * Deletes existing image store content being found within the given image - * store relative path. This can be used to delete uploaded application - * packages once they are provisioned. + * @summary Get the status of Chaos. * - * @param {string} contentPath Relative path to file or folder in the image - * store from its root. + * Get the status of Chaos indicating whether or not Chaos is running, the + * Chaos parameters used for running Chaos and the status of the Chaos + * Schedule. * * @param {object} [options] Optional Parameters. * @@ -60061,15 +58080,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - deleteImageStoreContentWithHttpOperationResponse(contentPath, options) { + getChaosWithHttpOperationResponse(options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._deleteImageStoreContent(contentPath, options, (err, result, request, response) => { + self._getChaos(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -60080,14 +58099,11 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Deletes existing image store content. - * - * Deletes existing image store content being found within the given image - * store relative path. This can be used to delete uploaded application - * packages once they are provisioned. + * @summary Get the status of Chaos. * - * @param {string} contentPath Relative path to file or folder in the image - * store from its root. + * Get the status of Chaos indicating whether or not Chaos is running, the + * Chaos parameters used for running Chaos and the status of the Chaos + * Schedule. * * @param {object} [options] Optional Parameters. * @@ -60106,7 +58122,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {Chaos} - The deserialized result object. * * @reject {Error} - The error object. * @@ -60114,13 +58130,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Chaos} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteImageStoreContent(contentPath, options, optionalCallback) { + getChaos(options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -60129,134 +58146,185 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteImageStoreContent(contentPath, options, (err, result, request, response) => { + self._getChaos(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteImageStoreContent(contentPath, options, optionalCallback); + return self._getChaos(options, optionalCallback); } } /** - * @summary Gets the content information at the root of the image store. - * - * Returns the information about the image store content at the root of the - * image store. - * - * @param {object} [options] Optional Parameters. - * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned + * @summary Starts Chaos in the cluster. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * If Chaos is not already running in the cluster, it starts Chaos with the + * passed in Chaos parameters. + * If Chaos is already running when this call is made, the call fails with the + * error code FABRIC_E_CHAOS_ALREADY_RUNNING. + * Refer to the article [Induce controlled Chaos in Service Fabric + * clusters](https://docs.microsoft.com/azure/service-fabric/service-fabric-controlled-chaos) + * for more details. * - * @reject {Error} - The error object. - */ - getImageStoreRootContentWithHttpOperationResponse(options) { - let client = this; - let self = this; - return new Promise((resolve, reject) => { - self._getImageStoreRootContent(options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * @summary Gets the content information at the root of the image store. + * @param {object} chaosParameters Describes all the parameters to configure a + * Chaos run. * - * Returns the information about the image store content at the root of the - * image store. + * @param {string} [chaosParameters.timeToRunInSeconds] Total time (in seconds) + * for which Chaos will run before automatically stopping. The maximum allowed + * value is 4,294,967,295 (System.UInt32.MaxValue). * - * @param {object} [options] Optional Parameters. + * @param {number} [chaosParameters.maxClusterStabilizationTimeoutInSeconds] + * The maximum amount of time to wait for all cluster entities to become stable + * and healthy. Chaos executes in iterations and at the start of each iteration + * it validates the health of cluster entities. + * During validation if a cluster entity is not stable and healthy within + * MaxClusterStabilizationTimeoutInSeconds, Chaos generates a validation failed + * event. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. + * @param {number} [chaosParameters.maxConcurrentFaults] MaxConcurrentFaults is + * the maximum number of concurrent faults induced per iteration. + * Chaos executes in iterations and two consecutive iterations are separated by + * a validation phase. + * The higher the concurrency, the more aggressive the injection of faults, + * leading to inducing more complex series of states to uncover bugs. + * The recommendation is to start with a value of 2 or 3 and to exercise + * caution while moving up. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {boolean} [chaosParameters.enableMoveReplicaFaults] Enables or + * disables the move primary and move secondary faults. * - * @param {function} [optionalCallback] - The optional callback. + * @param {number} [chaosParameters.waitTimeBetweenFaultsInSeconds] Wait time + * (in seconds) between consecutive faults within a single iteration. + * The larger the value, the lower the overlapping between faults and the + * simpler the sequence of state transitions that the cluster goes through. + * The recommendation is to start with a value between 1 and 5 and exercise + * caution while moving up. * - * @returns {function|Promise} If a callback was passed as the last parameter - * then it returns the callback else returns a Promise. + * @param {number} [chaosParameters.waitTimeBetweenIterationsInSeconds] + * Time-separation (in seconds) between two consecutive iterations of Chaos. + * The larger the value, the lower the fault injection rate. * - * {Promise} A promise is returned + * @param {object} [chaosParameters.clusterHealthPolicy] Passed-in cluster + * health policy is used to validate health of the cluster in between Chaos + * iterations. If the cluster health is in error or if an unexpected exception + * happens during fault execution--to provide the cluster with some time to + * recuperate--Chaos will wait for 30 minutes before the next health-check. * - * @resolve {ImageStoreContent} - The deserialized result object. + * @param {boolean} + * [chaosParameters.clusterHealthPolicy.considerWarningAsError] Indicates + * whether warnings are treated with the same severity as errors. * - * @reject {Error} - The error object. + * @param {number} + * [chaosParameters.clusterHealthPolicy.maxPercentUnhealthyNodes] The maximum + * allowed percentage of unhealthy nodes before reporting an error. For + * example, to allow 10% of nodes to be unhealthy, this value would be 10. * - * {function} optionalCallback(err, result, request, response) + * The percentage represents the maximum tolerated percentage of nodes that can + * be unhealthy before the cluster is considered in error. + * If the percentage is respected but there is at least one unhealthy node, the + * health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy nodes over + * the total number of nodes in the cluster. + * The computation rounds up to tolerate one failure on small numbers of nodes. + * Default percentage is zero. * - * {Error} err - The Error object if an error occurred, null otherwise. + * In large clusters, some nodes will always be down or out for repairs, so + * this percentage should be configured to tolerate that. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ImageStoreContent} for more information. + * @param {number} + * [chaosParameters.clusterHealthPolicy.maxPercentUnhealthyApplications] The + * maximum allowed percentage of unhealthy applications before reporting an + * error. For example, to allow 10% of applications to be unhealthy, this value + * would be 10. * - * {object} [request] - The HTTP Request object if an error did not occur. + * The percentage represents the maximum tolerated percentage of applications + * that can be unhealthy before the cluster is considered in error. + * If the percentage is respected but there is at least one unhealthy + * application, the health is evaluated as Warning. + * This is calculated by dividing the number of unhealthy applications over the + * total number of application instances in the cluster, excluding applications + * of application types that are included in the + * ApplicationTypeHealthPolicyMap. + * The computation rounds up to tolerate one failure on small numbers of + * applications. Default percentage is zero. * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ - getImageStoreRootContent(options, optionalCallback) { - let client = this; - let self = this; - if (!optionalCallback && typeof options === 'function') { - optionalCallback = options; - options = null; - } - if (!optionalCallback) { - return new Promise((resolve, reject) => { - self._getImageStoreRootContent(options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._getImageStoreRootContent(options, optionalCallback); - } - } - - /** - * @summary Copies image store content internally + * @param {array} + * [chaosParameters.clusterHealthPolicy.applicationTypeHealthPolicyMap] Defines + * a map with max percentage unhealthy applications for specific application + * types. + * Each entry specifies as key the application type name and as value an + * integer that represents the MaxPercentUnhealthyApplications percentage used + * to evaluate the applications of the specified application type. * - * Copies the image store content from the source image store relative path to - * the destination image store relative path. + * The application type health policy map can be used during cluster health + * evaluation to describe special application types. + * The application types included in the map are evaluated against the + * percentage specified in the map, and not with the global + * MaxPercentUnhealthyApplications defined in the cluster health policy. + * The applications of application types specified in the map are not counted + * against the global pool of applications. + * For example, if some applications of a type are critical, the cluster + * administrator can add an entry to the map for that application type + * and assign it a value of 0% (that is, do not tolerate any failures). + * All other applications can be evaluated with MaxPercentUnhealthyApplications + * set to 20% to tolerate some failures out of the thousands of application + * instances. + * The application type health policy map is used only if the cluster manifest + * enables application type health evaluation using the configuration entry for + * HealthManager/EnableApplicationTypeHealthEvaluation. * - * @param {object} imageStoreCopyDescription Describes the copy description for - * the image store. + * @param {object} [chaosParameters.context] Describes a map, which is a + * collection of (string, string) type key-value pairs. The map can be used to + * record information about + * the Chaos run. There cannot be more than 100 such pairs and each string (key + * or value) can be at most 4095 characters long. + * This map is set by the starter of the Chaos run to optionally store the + * context about the specific run. * - * @param {string} imageStoreCopyDescription.remoteSource The relative path of - * source image store content to be copied from. + * @param {object} [chaosParameters.context.map] Describes a map that contains + * a collection of ChaosContextMapItem's. * - * @param {string} imageStoreCopyDescription.remoteDestination The relative - * path of destination image store content to be copied to. + * @param {object} [chaosParameters.chaosTargetFilter] List of cluster entities + * to target for Chaos faults. + * This filter can be used to target Chaos faults only to certain node types or + * only to certain application instances. If ChaosTargetFilter is not used, + * Chaos faults all cluster entities. + * If ChaosTargetFilter is used, Chaos faults only the entities that meet the + * ChaosTargetFilter specification. * - * @param {array} [imageStoreCopyDescription.skipFiles] The list of the file - * names to be skipped for copying. + * @param {array} [chaosParameters.chaosTargetFilter.nodeTypeInclusionList] A + * list of node types to include in Chaos faults. + * All types of faults (restart node, restart code package, remove replica, + * restart replica, move primary, and move secondary) are enabled for the nodes + * of these node types. + * If a nodetype (say NodeTypeX) does not appear in the NodeTypeInclusionList, + * then node level faults (like NodeRestart) will never be enabled for the + * nodes of + * NodeTypeX, but code package and replica faults can still be enabled for + * NodeTypeX if an application in the ApplicationInclusionList. + * happens to reside on a node of NodeTypeX. + * At most 100 node type names can be included in this list, to increase this + * number, a config upgrade is required for + * MaxNumberOfNodeTypesInChaosEntityFilter configuration. * - * @param {boolean} [imageStoreCopyDescription.checkMarkFile] Indicates whether - * to check mark file during copying. The property is true if checking mark - * file is required, false otherwise. The mark file is used to check whether - * the folder is well constructed. If the property is true and mark file does - * not exist, the copy is skipped. + * @param {array} [chaosParameters.chaosTargetFilter.applicationInclusionList] + * A list of application URI's to include in Chaos faults. + * All replicas belonging to services of these applications are amenable to + * replica faults (restart replica, remove replica, move primary, and move + * secondary) by Chaos. + * Chaos may restart a code package only if the code package hosts replicas of + * these applications only. + * If an application does not appear in this list, it can still be faulted in + * some Chaos iteration if the application ends up on a node of a node type + * that is included in NodeTypeInclusionList. + * However, if applicationX is tied to nodeTypeY through placement constraints + * and applicationX is absent from ApplicationInclusionList and nodeTypeY is + * absent from NodeTypeInclusionList, then applicationX will never be faulted. + * At most 1000 application names can be included in this list, to increase + * this number, a config upgrade is required for + * MaxNumberOfApplicationsInChaosEntityFilter configuration. * * @param {object} [options] Optional Parameters. * @@ -60274,11 +58342,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - copyImageStoreContentWithHttpOperationResponse(imageStoreCopyDescription, options) { + startChaosWithHttpOperationResponse(chaosParameters, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._copyImageStoreContent(imageStoreCopyDescription, options, (err, result, request, response) => { + self._startChaos(chaosParameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -60289,28 +58357,173 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Copies image store content internally + * @summary Starts Chaos in the cluster. * - * Copies the image store content from the source image store relative path to - * the destination image store relative path. + * If Chaos is not already running in the cluster, it starts Chaos with the + * passed in Chaos parameters. + * If Chaos is already running when this call is made, the call fails with the + * error code FABRIC_E_CHAOS_ALREADY_RUNNING. + * Refer to the article [Induce controlled Chaos in Service Fabric + * clusters](https://docs.microsoft.com/azure/service-fabric/service-fabric-controlled-chaos) + * for more details. * - * @param {object} imageStoreCopyDescription Describes the copy description for - * the image store. + * @param {object} chaosParameters Describes all the parameters to configure a + * Chaos run. * - * @param {string} imageStoreCopyDescription.remoteSource The relative path of - * source image store content to be copied from. + * @param {string} [chaosParameters.timeToRunInSeconds] Total time (in seconds) + * for which Chaos will run before automatically stopping. The maximum allowed + * value is 4,294,967,295 (System.UInt32.MaxValue). * - * @param {string} imageStoreCopyDescription.remoteDestination The relative - * path of destination image store content to be copied to. + * @param {number} [chaosParameters.maxClusterStabilizationTimeoutInSeconds] + * The maximum amount of time to wait for all cluster entities to become stable + * and healthy. Chaos executes in iterations and at the start of each iteration + * it validates the health of cluster entities. + * During validation if a cluster entity is not stable and healthy within + * MaxClusterStabilizationTimeoutInSeconds, Chaos generates a validation failed + * event. * - * @param {array} [imageStoreCopyDescription.skipFiles] The list of the file - * names to be skipped for copying. + * @param {number} [chaosParameters.maxConcurrentFaults] MaxConcurrentFaults is + * the maximum number of concurrent faults induced per iteration. + * Chaos executes in iterations and two consecutive iterations are separated by + * a validation phase. + * The higher the concurrency, the more aggressive the injection of faults, + * leading to inducing more complex series of states to uncover bugs. + * The recommendation is to start with a value of 2 or 3 and to exercise + * caution while moving up. + * + * @param {boolean} [chaosParameters.enableMoveReplicaFaults] Enables or + * disables the move primary and move secondary faults. + * + * @param {number} [chaosParameters.waitTimeBetweenFaultsInSeconds] Wait time + * (in seconds) between consecutive faults within a single iteration. + * The larger the value, the lower the overlapping between faults and the + * simpler the sequence of state transitions that the cluster goes through. + * The recommendation is to start with a value between 1 and 5 and exercise + * caution while moving up. + * + * @param {number} [chaosParameters.waitTimeBetweenIterationsInSeconds] + * Time-separation (in seconds) between two consecutive iterations of Chaos. + * The larger the value, the lower the fault injection rate. + * + * @param {object} [chaosParameters.clusterHealthPolicy] Passed-in cluster + * health policy is used to validate health of the cluster in between Chaos + * iterations. If the cluster health is in error or if an unexpected exception + * happens during fault execution--to provide the cluster with some time to + * recuperate--Chaos will wait for 30 minutes before the next health-check. + * + * @param {boolean} + * [chaosParameters.clusterHealthPolicy.considerWarningAsError] Indicates + * whether warnings are treated with the same severity as errors. + * + * @param {number} + * [chaosParameters.clusterHealthPolicy.maxPercentUnhealthyNodes] The maximum + * allowed percentage of unhealthy nodes before reporting an error. For + * example, to allow 10% of nodes to be unhealthy, this value would be 10. + * + * The percentage represents the maximum tolerated percentage of nodes that can + * be unhealthy before the cluster is considered in error. + * If the percentage is respected but there is at least one unhealthy node, the + * health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy nodes over + * the total number of nodes in the cluster. + * The computation rounds up to tolerate one failure on small numbers of nodes. + * Default percentage is zero. + * + * In large clusters, some nodes will always be down or out for repairs, so + * this percentage should be configured to tolerate that. + * + * @param {number} + * [chaosParameters.clusterHealthPolicy.maxPercentUnhealthyApplications] The + * maximum allowed percentage of unhealthy applications before reporting an + * error. For example, to allow 10% of applications to be unhealthy, this value + * would be 10. + * + * The percentage represents the maximum tolerated percentage of applications + * that can be unhealthy before the cluster is considered in error. + * If the percentage is respected but there is at least one unhealthy + * application, the health is evaluated as Warning. + * This is calculated by dividing the number of unhealthy applications over the + * total number of application instances in the cluster, excluding applications + * of application types that are included in the + * ApplicationTypeHealthPolicyMap. + * The computation rounds up to tolerate one failure on small numbers of + * applications. Default percentage is zero. + * + * @param {array} + * [chaosParameters.clusterHealthPolicy.applicationTypeHealthPolicyMap] Defines + * a map with max percentage unhealthy applications for specific application + * types. + * Each entry specifies as key the application type name and as value an + * integer that represents the MaxPercentUnhealthyApplications percentage used + * to evaluate the applications of the specified application type. + * + * The application type health policy map can be used during cluster health + * evaluation to describe special application types. + * The application types included in the map are evaluated against the + * percentage specified in the map, and not with the global + * MaxPercentUnhealthyApplications defined in the cluster health policy. + * The applications of application types specified in the map are not counted + * against the global pool of applications. + * For example, if some applications of a type are critical, the cluster + * administrator can add an entry to the map for that application type + * and assign it a value of 0% (that is, do not tolerate any failures). + * All other applications can be evaluated with MaxPercentUnhealthyApplications + * set to 20% to tolerate some failures out of the thousands of application + * instances. + * The application type health policy map is used only if the cluster manifest + * enables application type health evaluation using the configuration entry for + * HealthManager/EnableApplicationTypeHealthEvaluation. + * + * @param {object} [chaosParameters.context] Describes a map, which is a + * collection of (string, string) type key-value pairs. The map can be used to + * record information about + * the Chaos run. There cannot be more than 100 such pairs and each string (key + * or value) can be at most 4095 characters long. + * This map is set by the starter of the Chaos run to optionally store the + * context about the specific run. + * + * @param {object} [chaosParameters.context.map] Describes a map that contains + * a collection of ChaosContextMapItem's. + * + * @param {object} [chaosParameters.chaosTargetFilter] List of cluster entities + * to target for Chaos faults. + * This filter can be used to target Chaos faults only to certain node types or + * only to certain application instances. If ChaosTargetFilter is not used, + * Chaos faults all cluster entities. + * If ChaosTargetFilter is used, Chaos faults only the entities that meet the + * ChaosTargetFilter specification. + * + * @param {array} [chaosParameters.chaosTargetFilter.nodeTypeInclusionList] A + * list of node types to include in Chaos faults. + * All types of faults (restart node, restart code package, remove replica, + * restart replica, move primary, and move secondary) are enabled for the nodes + * of these node types. + * If a nodetype (say NodeTypeX) does not appear in the NodeTypeInclusionList, + * then node level faults (like NodeRestart) will never be enabled for the + * nodes of + * NodeTypeX, but code package and replica faults can still be enabled for + * NodeTypeX if an application in the ApplicationInclusionList. + * happens to reside on a node of NodeTypeX. + * At most 100 node type names can be included in this list, to increase this + * number, a config upgrade is required for + * MaxNumberOfNodeTypesInChaosEntityFilter configuration. * - * @param {boolean} [imageStoreCopyDescription.checkMarkFile] Indicates whether - * to check mark file during copying. The property is true if checking mark - * file is required, false otherwise. The mark file is used to check whether - * the folder is well constructed. If the property is true and mark file does - * not exist, the copy is skipped. + * @param {array} [chaosParameters.chaosTargetFilter.applicationInclusionList] + * A list of application URI's to include in Chaos faults. + * All replicas belonging to services of these applications are amenable to + * replica faults (restart replica, remove replica, move primary, and move + * secondary) by Chaos. + * Chaos may restart a code package only if the code package hosts replicas of + * these applications only. + * If an application does not appear in this list, it can still be faulted in + * some Chaos iteration if the application ends up on a node of a node type + * that is included in NodeTypeInclusionList. + * However, if applicationX is tied to nodeTypeY through placement constraints + * and applicationX is absent from ApplicationInclusionList and nodeTypeY is + * absent from NodeTypeInclusionList, then applicationX will never be faulted. + * At most 1000 application names can be included in this list, to increase + * this number, a config upgrade is required for + * MaxNumberOfApplicationsInChaosEntityFilter configuration. * * @param {object} [options] Optional Parameters. * @@ -60343,7 +58556,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - copyImageStoreContent(imageStoreCopyDescription, options, optionalCallback) { + startChaos(chaosParameters, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -60352,26 +58565,27 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._copyImageStoreContent(imageStoreCopyDescription, options, (err, result, request, response) => { + self._startChaos(chaosParameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._copyImageStoreContent(imageStoreCopyDescription, options, optionalCallback); + return self._startChaos(chaosParameters, options, optionalCallback); } } /** - * @summary Cancels an image store upload session. - * - * The DELETE request will cause the existing upload session to expire and - * remove any previously uploaded file chunks. + * @summary Stops Chaos if it is running in the cluster and put the Chaos + * Schedule in a stopped state. * - * @param {uuid} sessionId A GUID generated by the user for a file uploading. - * It identifies an image store upload session which keeps track of all file - * chunks until it is committed. + * Stops Chaos from executing new faults. In-flight faults will continue to + * execute until they are complete. The current Chaos Schedule is put into a + * stopped state. + * Once a schedule is stopped, it will stay in the stopped state and not be + * used to Chaos Schedule new runs of Chaos. A new Chaos Schedule must be set + * in order to resume scheduling. * * @param {object} [options] Optional Parameters. * @@ -60389,11 +58603,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - deleteImageStoreUploadSessionWithHttpOperationResponse(sessionId, options) { + stopChaosWithHttpOperationResponse(options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._deleteImageStoreUploadSession(sessionId, options, (err, result, request, response) => { + self._stopChaos(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -60404,14 +58618,15 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Cancels an image store upload session. - * - * The DELETE request will cause the existing upload session to expire and - * remove any previously uploaded file chunks. + * @summary Stops Chaos if it is running in the cluster and put the Chaos + * Schedule in a stopped state. * - * @param {uuid} sessionId A GUID generated by the user for a file uploading. - * It identifies an image store upload session which keeps track of all file - * chunks until it is committed. + * Stops Chaos from executing new faults. In-flight faults will continue to + * execute until they are complete. The current Chaos Schedule is put into a + * stopped state. + * Once a schedule is stopped, it will stay in the stopped state and not be + * used to Chaos Schedule new runs of Chaos. A new Chaos Schedule must be set + * in order to resume scheduling. * * @param {object} [options] Optional Parameters. * @@ -60444,7 +58659,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteImageStoreUploadSession(sessionId, options, optionalCallback) { + stopChaos(options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -60453,31 +58668,61 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteImageStoreUploadSession(sessionId, options, (err, result, request, response) => { + self._stopChaos(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteImageStoreUploadSession(sessionId, options, optionalCallback); + return self._stopChaos(options, optionalCallback); } } /** - * @summary Commit an image store upload session. - * - * When all file chunks have been uploaded, the upload session needs to be - * committed explicitly to complete the upload. Image store preserves the - * upload session until the expiration time, which is 30 minutes after the last - * chunk received. + * @summary Gets the next segment of the Chaos events based on the continuation + * token or the time range. * - * @param {uuid} sessionId A GUID generated by the user for a file uploading. - * It identifies an image store upload session which keeps track of all file - * chunks until it is committed. + * To get the next segment of the Chaos events, you can specify the + * ContinuationToken. To get the start of a new segment of Chaos events, you + * can specify the time range + * through StartTimeUtc and EndTimeUtc. You cannot specify both the + * ContinuationToken and the time range in the same call. + * When there are more than 100 Chaos events, the Chaos events are returned in + * multiple segments where a segment contains no more than 100 Chaos events and + * to get the next segment you make a call to this API with the continuation + * token. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.continuationToken] The continuation token parameter + * is used to obtain next set of results. A continuation token with a non-empty + * value is included in the response of the API when the results from the + * system do not fit in a single response. When this value is passed to the + * next API call, the API returns next set of results. If there are no further + * results, then the continuation token does not contain a value. The value of + * this parameter should not be URL encoded. + * + * @param {string} [options.startTimeUtc] The Windows file time representing + * the start time of the time range for which a Chaos report is to be + * generated. Consult [DateTime.ToFileTimeUtc + * Method](https://msdn.microsoft.com/library/system.datetime.tofiletimeutc(v=vs.110).aspx) + * for details. + * + * @param {string} [options.endTimeUtc] The Windows file time representing the + * end time of the time range for which a Chaos report is to be generated. + * Consult [DateTime.ToFileTimeUtc + * Method](https://msdn.microsoft.com/library/system.datetime.tofiletimeutc(v=vs.110).aspx) + * for details. + * + * @param {number} [options.maxResults] The maximum number of results to be + * returned as part of the paged queries. This parameter defines the upper + * bound on the number of results returned. The results returned can be less + * than the specified maximum results if they do not fit in the message as per + * the max message size restrictions defined in the configuration. If this + * parameter is zero or not specified, the paged query includes as many results + * as possible that fit in the return message. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -60488,15 +58733,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - commitImageStoreUploadSessionWithHttpOperationResponse(sessionId, options) { + getChaosEventsWithHttpOperationResponse(options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._commitImageStoreUploadSession(sessionId, options, (err, result, request, response) => { + self._getChaosEvents(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -60507,19 +58752,49 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Commit an image store upload session. - * - * When all file chunks have been uploaded, the upload session needs to be - * committed explicitly to complete the upload. Image store preserves the - * upload session until the expiration time, which is 30 minutes after the last - * chunk received. + * @summary Gets the next segment of the Chaos events based on the continuation + * token or the time range. * - * @param {uuid} sessionId A GUID generated by the user for a file uploading. - * It identifies an image store upload session which keeps track of all file - * chunks until it is committed. + * To get the next segment of the Chaos events, you can specify the + * ContinuationToken. To get the start of a new segment of Chaos events, you + * can specify the time range + * through StartTimeUtc and EndTimeUtc. You cannot specify both the + * ContinuationToken and the time range in the same call. + * When there are more than 100 Chaos events, the Chaos events are returned in + * multiple segments where a segment contains no more than 100 Chaos events and + * to get the next segment you make a call to this API with the continuation + * token. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.continuationToken] The continuation token parameter + * is used to obtain next set of results. A continuation token with a non-empty + * value is included in the response of the API when the results from the + * system do not fit in a single response. When this value is passed to the + * next API call, the API returns next set of results. If there are no further + * results, then the continuation token does not contain a value. The value of + * this parameter should not be URL encoded. + * + * @param {string} [options.startTimeUtc] The Windows file time representing + * the start time of the time range for which a Chaos report is to be + * generated. Consult [DateTime.ToFileTimeUtc + * Method](https://msdn.microsoft.com/library/system.datetime.tofiletimeutc(v=vs.110).aspx) + * for details. + * + * @param {string} [options.endTimeUtc] The Windows file time representing the + * end time of the time range for which a Chaos report is to be generated. + * Consult [DateTime.ToFileTimeUtc + * Method](https://msdn.microsoft.com/library/system.datetime.tofiletimeutc(v=vs.110).aspx) + * for details. + * + * @param {number} [options.maxResults] The maximum number of results to be + * returned as part of the paged queries. This parameter defines the upper + * bound on the number of results returned. The results returned can be less + * than the specified maximum results if they do not fit in the message as per + * the max message size restrictions defined in the configuration. If this + * parameter is zero or not specified, the paged query includes as many results + * as possible that fit in the return message. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -60535,7 +58810,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {ChaosEventsSegment} - The deserialized result object. * * @reject {Error} - The error object. * @@ -60543,13 +58818,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ChaosEventsSegment} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - commitImageStoreUploadSession(sessionId, options, optionalCallback) { + getChaosEvents(options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -60558,26 +58834,22 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._commitImageStoreUploadSession(sessionId, options, (err, result, request, response) => { + self._getChaosEvents(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._commitImageStoreUploadSession(sessionId, options, optionalCallback); + return self._getChaosEvents(options, optionalCallback); } } /** - * @summary Get the image store upload session by ID. - * - * Gets the image store upload session identified by the given ID. User can - * query the upload session at any time during uploading. + * @summary Get the Chaos Schedule defining when and how to run Chaos. * - * @param {uuid} sessionId A GUID generated by the user for a file uploading. - * It identifies an image store upload session which keeps track of all file - * chunks until it is committed. + * Gets the version of the Chaos Schedule in use and the Chaos Schedule that + * defines when and how to run Chaos. * * @param {object} [options] Optional Parameters. * @@ -60591,15 +58863,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getImageStoreUploadSessionByIdWithHttpOperationResponse(sessionId, options) { + getChaosScheduleWithHttpOperationResponse(options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getImageStoreUploadSessionById(sessionId, options, (err, result, request, response) => { + self._getChaosSchedule(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -60610,14 +58882,10 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Get the image store upload session by ID. - * - * Gets the image store upload session identified by the given ID. User can - * query the upload session at any time during uploading. + * @summary Get the Chaos Schedule defining when and how to run Chaos. * - * @param {uuid} sessionId A GUID generated by the user for a file uploading. - * It identifies an image store upload session which keeps track of all file - * chunks until it is committed. + * Gets the version of the Chaos Schedule in use and the Chaos Schedule that + * defines when and how to run Chaos. * * @param {object} [options] Optional Parameters. * @@ -60636,7 +58904,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {UploadSession} - The deserialized result object. + * @resolve {ChaosScheduleDescription} - The deserialized result object. * * @reject {Error} - The error object. * @@ -60645,13 +58913,14 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link UploadSession} for more information. + * See {@link ChaosScheduleDescription} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getImageStoreUploadSessionById(sessionId, options, optionalCallback) { + getChaosSchedule(options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -60660,26 +58929,45 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getImageStoreUploadSessionById(sessionId, options, (err, result, request, response) => { + self._getChaosSchedule(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getImageStoreUploadSessionById(sessionId, options, optionalCallback); + return self._getChaosSchedule(options, optionalCallback); } } /** - * @summary Get the image store upload session by relative path. + * @summary Set the schedule used by Chaos. * - * Gets the image store upload session associated with the given image store - * relative path. User can query the upload session at any time during - * uploading. + * Chaos will automatically schedule runs based on the Chaos Schedule. + * The Chaos Schedule will be updated if the provided version matches the + * version on the server. + * When updating the Chaos Schedule, the version on the server is incremented + * by 1. + * The version on the server will wrap back to 0 after reaching a large number. + * If Chaos is running when this call is made, the call will fail. * - * @param {string} contentPath Relative path to file or folder in the image - * store from its root. + * @param {object} chaosSchedule Describes the schedule used by Chaos. + * + * @param {number} [chaosSchedule.version] The version number of the Schedule. + * + * @param {object} [chaosSchedule.schedule] Defines the schedule used by Chaos. + * + * @param {date} [chaosSchedule.schedule.startDate] The date and time Chaos + * will start using this schedule. + * + * @param {date} [chaosSchedule.schedule.expiryDate] The date and time Chaos + * will continue to use this schedule until. + * + * @param {array} [chaosSchedule.schedule.chaosParametersDictionary] A mapping + * of string names to Chaos Parameters to be referenced by Chaos Schedule Jobs. + * + * @param {array} [chaosSchedule.schedule.jobs] A list of all Chaos Schedule + * Jobs that will be automated by the schedule. * * @param {object} [options] Optional Parameters. * @@ -60693,15 +58981,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getImageStoreUploadSessionByPathWithHttpOperationResponse(contentPath, options) { + postChaosScheduleWithHttpOperationResponse(chaosSchedule, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getImageStoreUploadSessionByPath(contentPath, options, (err, result, request, response) => { + self._postChaosSchedule(chaosSchedule, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -60712,14 +59000,33 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Get the image store upload session by relative path. + * @summary Set the schedule used by Chaos. * - * Gets the image store upload session associated with the given image store - * relative path. User can query the upload session at any time during - * uploading. + * Chaos will automatically schedule runs based on the Chaos Schedule. + * The Chaos Schedule will be updated if the provided version matches the + * version on the server. + * When updating the Chaos Schedule, the version on the server is incremented + * by 1. + * The version on the server will wrap back to 0 after reaching a large number. + * If Chaos is running when this call is made, the call will fail. * - * @param {string} contentPath Relative path to file or folder in the image - * store from its root. + * @param {object} chaosSchedule Describes the schedule used by Chaos. + * + * @param {number} [chaosSchedule.version] The version number of the Schedule. + * + * @param {object} [chaosSchedule.schedule] Defines the schedule used by Chaos. + * + * @param {date} [chaosSchedule.schedule.startDate] The date and time Chaos + * will start using this schedule. + * + * @param {date} [chaosSchedule.schedule.expiryDate] The date and time Chaos + * will continue to use this schedule until. + * + * @param {array} [chaosSchedule.schedule.chaosParametersDictionary] A mapping + * of string names to Chaos Parameters to be referenced by Chaos Schedule Jobs. + * + * @param {array} [chaosSchedule.schedule.jobs] A list of all Chaos Schedule + * Jobs that will be automated by the schedule. * * @param {object} [options] Optional Parameters. * @@ -60738,7 +59045,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {UploadSession} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -60746,14 +59053,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link UploadSession} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getImageStoreUploadSessionByPath(contentPath, options, optionalCallback) { + postChaosSchedule(chaosSchedule, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -60762,46 +59068,35 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getImageStoreUploadSessionByPath(contentPath, options, (err, result, request, response) => { + self._postChaosSchedule(chaosSchedule, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getImageStoreUploadSessionByPath(contentPath, options, optionalCallback); + return self._postChaosSchedule(chaosSchedule, options, optionalCallback); } } /** - * @summary Uploads a file chunk to the image store relative path. - * - * Uploads a file chunk to the image store with the specified upload session ID - * and image store relative path. This API allows user to resume the file - * upload operation. user doesn't have to restart the file upload from scratch - * whenever there is a network interruption. Use this option if the file size - * is large. + * @summary Uploads contents of the file to the image store. * - * To perform a resumable file upload, user need to break the file into - * multiple chunks and upload these chunks to the image store one-by-one. - * Chunks don't have to be uploaded in order. If the file represented by the - * image store relative path already exists, it will be overwritten when the - * upload session commits. + * Uploads contents of the file to the image store. Use this API if the file is + * small enough to upload again if the connection fails. The file's data needs + * to be added to the request body. The contents will be uploaded to the + * specified path. Image store service uses a mark file to indicate the + * availability of the folder. The mark file is an empty file named "_.dir". + * The mark file is generated by the image store service when all files in a + * folder are uploaded. When using File-by-File approach to upload application + * package in REST, the image store service isn't aware of the file hierarchy + * of the application package; you need to create a mark file per folder and + * upload it last, to let the image store service know that the folder is + * complete. * * @param {string} contentPath Relative path to file or folder in the image * store from its root. * - * @param {uuid} sessionId A GUID generated by the user for a file uploading. - * It identifies an image store upload session which keeps track of all file - * chunks until it is committed. - * - * @param {string} contentRange When uploading file chunks to the image store, - * the Content-Range header field need to be configured and sent with a - * request. The format should looks like "bytes - * {First-Byte-Position}-{Last-Byte-Position}/{File-Length}". For example, - * Content-Range:bytes 300-5000/20000 indicates that user is sending bytes 300 - * through 5,000 and the total file length is 20,000 bytes. - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -60818,11 +59113,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - uploadFileChunkWithHttpOperationResponse(contentPath, sessionId, contentRange, options) { + uploadFileWithHttpOperationResponse(contentPath, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._uploadFileChunk(contentPath, sessionId, contentRange, options, (err, result, request, response) => { + self._uploadFile(contentPath, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -60833,34 +59128,23 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Uploads a file chunk to the image store relative path. - * - * Uploads a file chunk to the image store with the specified upload session ID - * and image store relative path. This API allows user to resume the file - * upload operation. user doesn't have to restart the file upload from scratch - * whenever there is a network interruption. Use this option if the file size - * is large. + * @summary Uploads contents of the file to the image store. * - * To perform a resumable file upload, user need to break the file into - * multiple chunks and upload these chunks to the image store one-by-one. - * Chunks don't have to be uploaded in order. If the file represented by the - * image store relative path already exists, it will be overwritten when the - * upload session commits. + * Uploads contents of the file to the image store. Use this API if the file is + * small enough to upload again if the connection fails. The file's data needs + * to be added to the request body. The contents will be uploaded to the + * specified path. Image store service uses a mark file to indicate the + * availability of the folder. The mark file is an empty file named "_.dir". + * The mark file is generated by the image store service when all files in a + * folder are uploaded. When using File-by-File approach to upload application + * package in REST, the image store service isn't aware of the file hierarchy + * of the application package; you need to create a mark file per folder and + * upload it last, to let the image store service know that the folder is + * complete. * * @param {string} contentPath Relative path to file or folder in the image * store from its root. * - * @param {uuid} sessionId A GUID generated by the user for a file uploading. - * It identifies an image store upload session which keeps track of all file - * chunks until it is committed. - * - * @param {string} contentRange When uploading file chunks to the image store, - * the Content-Range header field need to be configured and sent with a - * request. The format should looks like "bytes - * {First-Byte-Position}-{Last-Byte-Position}/{File-Length}". For example, - * Content-Range:bytes 300-5000/20000 indicates that user is sending bytes 300 - * through 5,000 and the total file length is 20,000 bytes. - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -60892,7 +59176,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - uploadFileChunk(contentPath, sessionId, contentRange, options, optionalCallback) { + uploadFile(contentPath, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -60901,44 +59185,28 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._uploadFileChunk(contentPath, sessionId, contentRange, options, (err, result, request, response) => { + self._uploadFile(contentPath, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._uploadFileChunk(contentPath, sessionId, contentRange, options, optionalCallback); + return self._uploadFile(contentPath, options, optionalCallback); } } /** - * @summary Invokes an administrative command on the given Infrastructure - * Service instance. - * - * For clusters that have one or more instances of the Infrastructure Service - * configured, - * this API provides a way to send infrastructure-specific commands to a - * particular - * instance of the Infrastructure Service. - * - * Available commands and their corresponding response formats vary depending - * upon - * the infrastructure on which the cluster is running. + * @summary Gets the image store content information. * - * This API supports the Service Fabric platform; it is not meant to be used - * directly from your code. + * Returns the information about the image store content at the specified + * contentPath. The contentPath is relative to the root of the image store. * - * @param {string} command The text of the command to be invoked. The content - * of the command is infrastructure-specific. + * @param {string} contentPath Relative path to file or folder in the image + * store from its root. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.serviceId] The identity of the infrastructure - * service. This is the full name of the infrastructure service without the - * 'fabric:' URI scheme. This parameter required only for the cluster that has - * more than one instance of infrastructure service running. - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -60949,15 +59217,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - invokeInfrastructureCommandWithHttpOperationResponse(command, options) { + getImageStoreContentWithHttpOperationResponse(contentPath, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._invokeInfrastructureCommand(command, options, (err, result, request, response) => { + self._getImageStoreContent(contentPath, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -60968,32 +59236,16 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Invokes an administrative command on the given Infrastructure - * Service instance. - * - * For clusters that have one or more instances of the Infrastructure Service - * configured, - * this API provides a way to send infrastructure-specific commands to a - * particular - * instance of the Infrastructure Service. - * - * Available commands and their corresponding response formats vary depending - * upon - * the infrastructure on which the cluster is running. + * @summary Gets the image store content information. * - * This API supports the Service Fabric platform; it is not meant to be used - * directly from your code. + * Returns the information about the image store content at the specified + * contentPath. The contentPath is relative to the root of the image store. * - * @param {string} command The text of the command to be invoked. The content - * of the command is infrastructure-specific. + * @param {string} contentPath Relative path to file or folder in the image + * store from its root. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.serviceId] The identity of the infrastructure - * service. This is the full name of the infrastructure service without the - * 'fabric:' URI scheme. This parameter required only for the cluster that has - * more than one instance of infrastructure service running. - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -61009,7 +59261,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {String} - The deserialized result object. + * @resolve {ImageStoreContent} - The deserialized result object. * * @reject {Error} - The error object. * @@ -61017,13 +59269,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {string} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ImageStoreContent} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - invokeInfrastructureCommand(command, options, optionalCallback) { + getImageStoreContent(contentPath, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -61032,44 +59285,29 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._invokeInfrastructureCommand(command, options, (err, result, request, response) => { + self._getImageStoreContent(contentPath, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._invokeInfrastructureCommand(command, options, optionalCallback); + return self._getImageStoreContent(contentPath, options, optionalCallback); } } /** - * @summary Invokes a read-only query on the given infrastructure service - * instance. - * - * For clusters that have one or more instances of the Infrastructure Service - * configured, - * this API provides a way to send infrastructure-specific queries to a - * particular - * instance of the Infrastructure Service. - * - * Available commands and their corresponding response formats vary depending - * upon - * the infrastructure on which the cluster is running. + * @summary Deletes existing image store content. * - * This API supports the Service Fabric platform; it is not meant to be used - * directly from your code. + * Deletes existing image store content being found within the given image + * store relative path. This command can be used to delete uploaded application + * packages once they are provisioned. * - * @param {string} command The text of the command to be invoked. The content - * of the command is infrastructure-specific. + * @param {string} contentPath Relative path to file or folder in the image + * store from its root. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.serviceId] The identity of the infrastructure - * service. This is the full name of the infrastructure service without the - * 'fabric:' URI scheme. This parameter required only for the cluster that has - * more than one instance of infrastructure service running. - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -61080,15 +59318,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - invokeInfrastructureQueryWithHttpOperationResponse(command, options) { + deleteImageStoreContentWithHttpOperationResponse(contentPath, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._invokeInfrastructureQuery(command, options, (err, result, request, response) => { + self._deleteImageStoreContent(contentPath, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -61099,32 +59337,17 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Invokes a read-only query on the given infrastructure service - * instance. - * - * For clusters that have one or more instances of the Infrastructure Service - * configured, - * this API provides a way to send infrastructure-specific queries to a - * particular - * instance of the Infrastructure Service. - * - * Available commands and their corresponding response formats vary depending - * upon - * the infrastructure on which the cluster is running. + * @summary Deletes existing image store content. * - * This API supports the Service Fabric platform; it is not meant to be used - * directly from your code. + * Deletes existing image store content being found within the given image + * store relative path. This command can be used to delete uploaded application + * packages once they are provisioned. * - * @param {string} command The text of the command to be invoked. The content - * of the command is infrastructure-specific. + * @param {string} contentPath Relative path to file or folder in the image + * store from its root. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.serviceId] The identity of the infrastructure - * service. This is the full name of the infrastructure service without the - * 'fabric:' URI scheme. This parameter required only for the cluster that has - * more than one instance of infrastructure service running. - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -61140,7 +59363,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {String} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -61148,13 +59371,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {string} [result] - The deserialized result object if an error did not occur. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - invokeInfrastructureQuery(command, options, optionalCallback) { + deleteImageStoreContent(contentPath, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -61163,59 +59386,22 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._invokeInfrastructureQuery(command, options, (err, result, request, response) => { + self._deleteImageStoreContent(contentPath, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._invokeInfrastructureQuery(command, options, optionalCallback); + return self._deleteImageStoreContent(contentPath, options, optionalCallback); } } /** - * @summary This API will induce data loss for the specified partition. It will - * trigger a call to the OnDataLossAsync API of the partition. - * - * This API will induce data loss for the specified partition. It will trigger - * a call to the OnDataLoss API of the partition. - * Actual data loss will depend on the specified DataLossMode. - * - * - PartialDataLoss - Only a quorum of replicas are removed and OnDataLoss is - * triggered for the partition but actual data loss depends on the presence of - * in-flight replication. - * - FullDataLoss - All replicas are removed hence all data is lost and - * OnDataLoss is triggered. - * - * This API should only be called with a stateful service as the target. - * - * Calling this API with a system service as the target is not advised. - * - * Note: Once this API has been called, it cannot be reversed. Calling - * CancelOperation will only stop execution and clean up internal system state. - * It will not restore data if the command has progressed far enough to cause - * data loss. - * - * Call the GetDataLossProgress API with the same OperationId to return - * information on the operation started with this API. - * - * @param {string} serviceId The identity of the service. This ID is typically - * the full name of the service without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the service name is "fabric:/myapp/app1/svc1", the service - * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in - * previous versions. - * - * @param {uuid} partitionId The identity of the partition. - * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @summary Gets the content information at the root of the image store. * - * @param {string} dataLossMode This enum is passed to the StartDataLoss API to - * indicate what type of data loss to induce. Possible values include: - * 'Invalid', 'PartialDataLoss', 'FullDataLoss' + * Returns the information about the image store content at the root of the + * image store. * * @param {object} [options] Optional Parameters. * @@ -61229,15 +59415,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - startDataLossWithHttpOperationResponse(serviceId, partitionId, operationId, dataLossMode, options) { + getImageStoreRootContentWithHttpOperationResponse(options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._startDataLoss(serviceId, partitionId, operationId, dataLossMode, options, (err, result, request, response) => { + self._getImageStoreRootContent(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -61248,47 +59434,10 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary This API will induce data loss for the specified partition. It will - * trigger a call to the OnDataLossAsync API of the partition. - * - * This API will induce data loss for the specified partition. It will trigger - * a call to the OnDataLoss API of the partition. - * Actual data loss will depend on the specified DataLossMode. - * - * - PartialDataLoss - Only a quorum of replicas are removed and OnDataLoss is - * triggered for the partition but actual data loss depends on the presence of - * in-flight replication. - * - FullDataLoss - All replicas are removed hence all data is lost and - * OnDataLoss is triggered. - * - * This API should only be called with a stateful service as the target. - * - * Calling this API with a system service as the target is not advised. - * - * Note: Once this API has been called, it cannot be reversed. Calling - * CancelOperation will only stop execution and clean up internal system state. - * It will not restore data if the command has progressed far enough to cause - * data loss. - * - * Call the GetDataLossProgress API with the same OperationId to return - * information on the operation started with this API. - * - * @param {string} serviceId The identity of the service. This ID is typically - * the full name of the service without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the service name is "fabric:/myapp/app1/svc1", the service - * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in - * previous versions. - * - * @param {uuid} partitionId The identity of the partition. - * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @summary Gets the content information at the root of the image store. * - * @param {string} dataLossMode This enum is passed to the StartDataLoss API to - * indicate what type of data loss to induce. Possible values include: - * 'Invalid', 'PartialDataLoss', 'FullDataLoss' + * Returns the information about the image store content at the root of the + * image store. * * @param {object} [options] Optional Parameters. * @@ -61307,7 +59456,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {ImageStoreContent} - The deserialized result object. * * @reject {Error} - The error object. * @@ -61315,13 +59464,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ImageStoreContent} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - startDataLoss(serviceId, partitionId, operationId, dataLossMode, options, optionalCallback) { + getImageStoreRootContent(options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -61330,36 +59480,40 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._startDataLoss(serviceId, partitionId, operationId, dataLossMode, options, (err, result, request, response) => { + self._getImageStoreRootContent(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._startDataLoss(serviceId, partitionId, operationId, dataLossMode, options, optionalCallback); + return self._getImageStoreRootContent(options, optionalCallback); } } /** - * @summary Gets the progress of a partition data loss operation started using - * the StartDataLoss API. + * @summary Copies image store content internally * - * Gets the progress of a data loss operation started with StartDataLoss, using - * the OperationId. + * Copies the image store content from the source image store relative path to + * the destination image store relative path. * - * @param {string} serviceId The identity of the service. This ID is typically - * the full name of the service without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the service name is "fabric:/myapp/app1/svc1", the service - * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in - * previous versions. + * @param {object} imageStoreCopyDescription Describes the copy description for + * the image store. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} imageStoreCopyDescription.remoteSource The relative path of + * source image store content to be copied from. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @param {string} imageStoreCopyDescription.remoteDestination The relative + * path of destination image store content to be copied to. + * + * @param {array} [imageStoreCopyDescription.skipFiles] The list of the file + * names to be skipped for copying. + * + * @param {boolean} [imageStoreCopyDescription.checkMarkFile] Indicates whether + * to check mark file during copying. The property is true if checking mark + * file is required, false otherwise. The mark file is used to check whether + * the folder is well constructed. If the property is true and mark file does + * not exist, the copy is skipped. * * @param {object} [options] Optional Parameters. * @@ -61373,15 +59527,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getDataLossProgressWithHttpOperationResponse(serviceId, partitionId, operationId, options) { + copyImageStoreContentWithHttpOperationResponse(imageStoreCopyDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getDataLossProgress(serviceId, partitionId, operationId, options, (err, result, request, response) => { + self._copyImageStoreContent(imageStoreCopyDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -61392,24 +59546,28 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the progress of a partition data loss operation started using - * the StartDataLoss API. + * @summary Copies image store content internally * - * Gets the progress of a data loss operation started with StartDataLoss, using - * the OperationId. + * Copies the image store content from the source image store relative path to + * the destination image store relative path. * - * @param {string} serviceId The identity of the service. This ID is typically - * the full name of the service without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the service name is "fabric:/myapp/app1/svc1", the service - * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in - * previous versions. + * @param {object} imageStoreCopyDescription Describes the copy description for + * the image store. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} imageStoreCopyDescription.remoteSource The relative path of + * source image store content to be copied from. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @param {string} imageStoreCopyDescription.remoteDestination The relative + * path of destination image store content to be copied to. + * + * @param {array} [imageStoreCopyDescription.skipFiles] The list of the file + * names to be skipped for copying. + * + * @param {boolean} [imageStoreCopyDescription.checkMarkFile] Indicates whether + * to check mark file during copying. The property is true if checking mark + * file is required, false otherwise. The mark file is used to check whether + * the folder is well constructed. If the property is true and mark file does + * not exist, the copy is skipped. * * @param {object} [options] Optional Parameters. * @@ -61428,7 +59586,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {PartitionDataLossProgress} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -61436,15 +59594,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PartitionDataLossProgress} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getDataLossProgress(serviceId, partitionId, operationId, options, optionalCallback) { + copyImageStoreContent(imageStoreCopyDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -61453,48 +59609,26 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getDataLossProgress(serviceId, partitionId, operationId, options, (err, result, request, response) => { + self._copyImageStoreContent(imageStoreCopyDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getDataLossProgress(serviceId, partitionId, operationId, options, optionalCallback); + return self._copyImageStoreContent(imageStoreCopyDescription, options, optionalCallback); } } /** - * @summary Induces quorum loss for a given stateful service partition. - * - * This API is useful for a temporary quorum loss situation on your service. - * - * Call the GetQuorumLossProgress API with the same OperationId to return - * information on the operation started with this API. - * - * This can only be called on stateful persisted (HasPersistedState==true) - * services. Do not use this API on stateless services or stateful in-memory - * only services. - * - * @param {string} serviceId The identity of the service. This ID is typically - * the full name of the service without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the service name is "fabric:/myapp/app1/svc1", the service - * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in - * previous versions. - * - * @param {uuid} partitionId The identity of the partition. - * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @summary Cancels an image store upload session. * - * @param {string} quorumLossMode This enum is passed to the StartQuorumLoss - * API to indicate what type of quorum loss to induce. Possible values include: - * 'Invalid', 'QuorumReplicas', 'AllReplicas' + * The DELETE request will cause the existing upload session to expire and + * remove any previously uploaded file chunks. * - * @param {number} quorumLossDuration The amount of time for which the - * partition will be kept in quorum loss. This must be specified in seconds. + * @param {uuid} sessionId A GUID generated by the user for a file uploading. + * It identifies an image store upload session which keeps track of all file + * chunks until it is committed. * * @param {object} [options] Optional Parameters. * @@ -61512,11 +59646,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - startQuorumLossWithHttpOperationResponse(serviceId, partitionId, operationId, quorumLossMode, quorumLossDuration, options) { + deleteImageStoreUploadSessionWithHttpOperationResponse(sessionId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._startQuorumLoss(serviceId, partitionId, operationId, quorumLossMode, quorumLossDuration, options, (err, result, request, response) => { + self._deleteImageStoreUploadSession(sessionId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -61527,36 +59661,14 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Induces quorum loss for a given stateful service partition. - * - * This API is useful for a temporary quorum loss situation on your service. - * - * Call the GetQuorumLossProgress API with the same OperationId to return - * information on the operation started with this API. - * - * This can only be called on stateful persisted (HasPersistedState==true) - * services. Do not use this API on stateless services or stateful in-memory - * only services. - * - * @param {string} serviceId The identity of the service. This ID is typically - * the full name of the service without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the service name is "fabric:/myapp/app1/svc1", the service - * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in - * previous versions. - * - * @param {uuid} partitionId The identity of the partition. - * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @summary Cancels an image store upload session. * - * @param {string} quorumLossMode This enum is passed to the StartQuorumLoss - * API to indicate what type of quorum loss to induce. Possible values include: - * 'Invalid', 'QuorumReplicas', 'AllReplicas' + * The DELETE request will cause the existing upload session to expire and + * remove any previously uploaded file chunks. * - * @param {number} quorumLossDuration The amount of time for which the - * partition will be kept in quorum loss. This must be specified in seconds. + * @param {uuid} sessionId A GUID generated by the user for a file uploading. + * It identifies an image store upload session which keeps track of all file + * chunks until it is committed. * * @param {object} [options] Optional Parameters. * @@ -61589,7 +59701,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - startQuorumLoss(serviceId, partitionId, operationId, quorumLossMode, quorumLossDuration, options, optionalCallback) { + deleteImageStoreUploadSession(sessionId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -61598,36 +59710,28 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._startQuorumLoss(serviceId, partitionId, operationId, quorumLossMode, quorumLossDuration, options, (err, result, request, response) => { + self._deleteImageStoreUploadSession(sessionId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._startQuorumLoss(serviceId, partitionId, operationId, quorumLossMode, quorumLossDuration, options, optionalCallback); + return self._deleteImageStoreUploadSession(sessionId, options, optionalCallback); } } /** - * @summary Gets the progress of a quorum loss operation on a partition started - * using the StartQuorumLoss API. - * - * Gets the progress of a quorum loss operation started with StartQuorumLoss, - * using the provided OperationId. - * - * @param {string} serviceId The identity of the service. This ID is typically - * the full name of the service without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the service name is "fabric:/myapp/app1/svc1", the service - * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in - * previous versions. + * @summary Commit an image store upload session. * - * @param {uuid} partitionId The identity of the partition. + * When all file chunks have been uploaded, the upload session needs to be + * committed explicitly to complete the upload. Image store preserves the + * upload session until the expiration time, which is 30 minutes after the last + * chunk received. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @param {uuid} sessionId A GUID generated by the user for a file uploading. + * It identifies an image store upload session which keeps track of all file + * chunks until it is committed. * * @param {object} [options] Optional Parameters. * @@ -61641,15 +59745,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getQuorumLossProgressWithHttpOperationResponse(serviceId, partitionId, operationId, options) { + commitImageStoreUploadSessionWithHttpOperationResponse(sessionId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getQuorumLossProgress(serviceId, partitionId, operationId, options, (err, result, request, response) => { + self._commitImageStoreUploadSession(sessionId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -61660,24 +59764,16 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the progress of a quorum loss operation on a partition started - * using the StartQuorumLoss API. - * - * Gets the progress of a quorum loss operation started with StartQuorumLoss, - * using the provided OperationId. - * - * @param {string} serviceId The identity of the service. This ID is typically - * the full name of the service without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the service name is "fabric:/myapp/app1/svc1", the service - * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in - * previous versions. + * @summary Commit an image store upload session. * - * @param {uuid} partitionId The identity of the partition. + * When all file chunks have been uploaded, the upload session needs to be + * committed explicitly to complete the upload. Image store preserves the + * upload session until the expiration time, which is 30 minutes after the last + * chunk received. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @param {uuid} sessionId A GUID generated by the user for a file uploading. + * It identifies an image store upload session which keeps track of all file + * chunks until it is committed. * * @param {object} [options] Optional Parameters. * @@ -61696,7 +59792,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {PartitionQuorumLossProgress} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -61704,15 +59800,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PartitionQuorumLossProgress} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getQuorumLossProgress(serviceId, partitionId, operationId, options, optionalCallback) { + commitImageStoreUploadSession(sessionId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -61721,45 +59815,26 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getQuorumLossProgress(serviceId, partitionId, operationId, options, (err, result, request, response) => { + self._commitImageStoreUploadSession(sessionId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getQuorumLossProgress(serviceId, partitionId, operationId, options, optionalCallback); + return self._commitImageStoreUploadSession(sessionId, options, optionalCallback); } } /** - * @summary This API will restart some or all replicas or instances of the - * specified partition. - * - * This API is useful for testing failover. - * - * If used to target a stateless service partition, RestartPartitionMode must - * be AllReplicasOrInstances. - * - * Call the GetPartitionRestartProgress API using the same OperationId to get - * the progress. - * - * @param {string} serviceId The identity of the service. This ID is typically - * the full name of the service without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the service name is "fabric:/myapp/app1/svc1", the service - * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in - * previous versions. - * - * @param {uuid} partitionId The identity of the partition. + * @summary Get the image store upload session by ID. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * Gets the image store upload session identified by the given ID. User can + * query the upload session at any time during uploading. * - * @param {string} restartPartitionMode Describe which partitions to restart. - * Possible values include: 'Invalid', 'AllReplicasOrInstances', - * 'OnlyActiveSecondaries' + * @param {uuid} sessionId A GUID generated by the user for a file uploading. + * It identifies an image store upload session which keeps track of all file + * chunks until it is committed. * * @param {object} [options] Optional Parameters. * @@ -61773,15 +59848,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - startPartitionRestartWithHttpOperationResponse(serviceId, partitionId, operationId, restartPartitionMode, options) { + getImageStoreUploadSessionByIdWithHttpOperationResponse(sessionId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._startPartitionRestart(serviceId, partitionId, operationId, restartPartitionMode, options, (err, result, request, response) => { + self._getImageStoreUploadSessionById(sessionId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -61792,33 +59867,14 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary This API will restart some or all replicas or instances of the - * specified partition. - * - * This API is useful for testing failover. - * - * If used to target a stateless service partition, RestartPartitionMode must - * be AllReplicasOrInstances. - * - * Call the GetPartitionRestartProgress API using the same OperationId to get - * the progress. - * - * @param {string} serviceId The identity of the service. This ID is typically - * the full name of the service without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the service name is "fabric:/myapp/app1/svc1", the service - * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in - * previous versions. - * - * @param {uuid} partitionId The identity of the partition. + * @summary Get the image store upload session by ID. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * Gets the image store upload session identified by the given ID. User can + * query the upload session at any time during uploading. * - * @param {string} restartPartitionMode Describe which partitions to restart. - * Possible values include: 'Invalid', 'AllReplicasOrInstances', - * 'OnlyActiveSecondaries' + * @param {uuid} sessionId A GUID generated by the user for a file uploading. + * It identifies an image store upload session which keeps track of all file + * chunks until it is committed. * * @param {object} [options] Optional Parameters. * @@ -61837,7 +59893,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {UploadSession} - The deserialized result object. * * @reject {Error} - The error object. * @@ -61845,13 +59901,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link UploadSession} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - startPartitionRestart(serviceId, partitionId, operationId, restartPartitionMode, options, optionalCallback) { + getImageStoreUploadSessionById(sessionId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -61860,36 +59917,26 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._startPartitionRestart(serviceId, partitionId, operationId, restartPartitionMode, options, (err, result, request, response) => { + self._getImageStoreUploadSessionById(sessionId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._startPartitionRestart(serviceId, partitionId, operationId, restartPartitionMode, options, optionalCallback); + return self._getImageStoreUploadSessionById(sessionId, options, optionalCallback); } } /** - * @summary Gets the progress of a PartitionRestart operation started using - * StartPartitionRestart. - * - * Gets the progress of a PartitionRestart started with StartPartitionRestart - * using the provided OperationId. - * - * @param {string} serviceId The identity of the service. This ID is typically - * the full name of the service without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the service name is "fabric:/myapp/app1/svc1", the service - * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in - * previous versions. + * @summary Get the image store upload session by relative path. * - * @param {uuid} partitionId The identity of the partition. + * Gets the image store upload session associated with the given image store + * relative path. User can query the upload session at any time during + * uploading. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @param {string} contentPath Relative path to file or folder in the image + * store from its root. * * @param {object} [options] Optional Parameters. * @@ -61903,15 +59950,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getPartitionRestartProgressWithHttpOperationResponse(serviceId, partitionId, operationId, options) { + getImageStoreUploadSessionByPathWithHttpOperationResponse(contentPath, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getPartitionRestartProgress(serviceId, partitionId, operationId, options, (err, result, request, response) => { + self._getImageStoreUploadSessionByPath(contentPath, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -61922,24 +59969,14 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the progress of a PartitionRestart operation started using - * StartPartitionRestart. - * - * Gets the progress of a PartitionRestart started with StartPartitionRestart - * using the provided OperationId. - * - * @param {string} serviceId The identity of the service. This ID is typically - * the full name of the service without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the service name is "fabric:/myapp/app1/svc1", the service - * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in - * previous versions. + * @summary Get the image store upload session by relative path. * - * @param {uuid} partitionId The identity of the partition. + * Gets the image store upload session associated with the given image store + * relative path. User can query the upload session at any time during + * uploading. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @param {string} contentPath Relative path to file or folder in the image + * store from its root. * * @param {object} [options] Optional Parameters. * @@ -61958,7 +59995,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {PartitionRestartProgress} - The deserialized result object. + * @resolve {UploadSession} - The deserialized result object. * * @reject {Error} - The error object. * @@ -61967,14 +60004,13 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PartitionRestartProgress} for more - * information. + * See {@link UploadSession} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getPartitionRestartProgress(serviceId, partitionId, operationId, options, optionalCallback) { + getImageStoreUploadSessionByPath(contentPath, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -61983,45 +60019,45 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getPartitionRestartProgress(serviceId, partitionId, operationId, options, (err, result, request, response) => { + self._getImageStoreUploadSessionByPath(contentPath, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getPartitionRestartProgress(serviceId, partitionId, operationId, options, optionalCallback); + return self._getImageStoreUploadSessionByPath(contentPath, options, optionalCallback); } } /** - * @summary Starts or stops a cluster node. - * - * Starts or stops a cluster node. A cluster node is a process, not the OS - * instance itself. To start a node, pass in "Start" for the - * NodeTransitionType parameter. - * To stop a node, pass in "Stop" for the NodeTransitionType parameter. This - * API starts the operation - when the API returns the node may not have - * finished transitioning yet. - * Call GetNodeTransitionProgress with the same OperationId to get the progress - * of the operation. + * @summary Uploads a file chunk to the image store relative path. * - * @param {string} nodeName The name of the node. + * Uploads a file chunk to the image store with the specified upload session ID + * and image store relative path. This API allows user to resume the file + * upload operation. user doesn't have to restart the file upload from scratch + * whenever there is a network interruption. Use this option if the file size + * is large. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * To perform a resumable file upload, user need to break the file into + * multiple chunks and upload these chunks to the image store one-by-one. + * Chunks don't have to be uploaded in order. If the file represented by the + * image store relative path already exists, it will be overwritten when the + * upload session commits. * - * @param {string} nodeTransitionType Indicates the type of transition to - * perform. NodeTransitionType.Start will start a stopped node. - * NodeTransitionType.Stop will stop a node that is up. Possible values - * include: 'Invalid', 'Start', 'Stop' + * @param {string} contentPath Relative path to file or folder in the image + * store from its root. * - * @param {string} nodeInstanceId The node instance ID of the target node. - * This can be determined through GetNodeInfo API. + * @param {uuid} sessionId A GUID generated by the user for a file uploading. + * It identifies an image store upload session which keeps track of all file + * chunks until it is committed. * - * @param {number} stopDurationInSeconds The duration, in seconds, to keep the - * node stopped. The minimum value is 600, the maximum is 14400. After this - * time expires, the node will automatically come back up. + * @param {string} contentRange When uploading file chunks to the image store, + * the Content-Range header field need to be configured and sent with a + * request. The format should looks like "bytes + * {First-Byte-Position}-{Last-Byte-Position}/{File-Length}". For example, + * Content-Range:bytes 300-5000/20000 indicates that user is sending bytes 300 + * through 5,000 and the total file length is 20,000 bytes. * * @param {object} [options] Optional Parameters. * @@ -62039,11 +60075,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - startNodeTransitionWithHttpOperationResponse(nodeName, operationId, nodeTransitionType, nodeInstanceId, stopDurationInSeconds, options) { + uploadFileChunkWithHttpOperationResponse(contentPath, sessionId, contentRange, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._startNodeTransition(nodeName, operationId, nodeTransitionType, nodeInstanceId, stopDurationInSeconds, options, (err, result, request, response) => { + self._uploadFileChunk(contentPath, sessionId, contentRange, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -62054,33 +60090,33 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Starts or stops a cluster node. - * - * Starts or stops a cluster node. A cluster node is a process, not the OS - * instance itself. To start a node, pass in "Start" for the - * NodeTransitionType parameter. - * To stop a node, pass in "Stop" for the NodeTransitionType parameter. This - * API starts the operation - when the API returns the node may not have - * finished transitioning yet. - * Call GetNodeTransitionProgress with the same OperationId to get the progress - * of the operation. + * @summary Uploads a file chunk to the image store relative path. * - * @param {string} nodeName The name of the node. + * Uploads a file chunk to the image store with the specified upload session ID + * and image store relative path. This API allows user to resume the file + * upload operation. user doesn't have to restart the file upload from scratch + * whenever there is a network interruption. Use this option if the file size + * is large. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * To perform a resumable file upload, user need to break the file into + * multiple chunks and upload these chunks to the image store one-by-one. + * Chunks don't have to be uploaded in order. If the file represented by the + * image store relative path already exists, it will be overwritten when the + * upload session commits. * - * @param {string} nodeTransitionType Indicates the type of transition to - * perform. NodeTransitionType.Start will start a stopped node. - * NodeTransitionType.Stop will stop a node that is up. Possible values - * include: 'Invalid', 'Start', 'Stop' + * @param {string} contentPath Relative path to file or folder in the image + * store from its root. * - * @param {string} nodeInstanceId The node instance ID of the target node. - * This can be determined through GetNodeInfo API. + * @param {uuid} sessionId A GUID generated by the user for a file uploading. + * It identifies an image store upload session which keeps track of all file + * chunks until it is committed. * - * @param {number} stopDurationInSeconds The duration, in seconds, to keep the - * node stopped. The minimum value is 600, the maximum is 14400. After this - * time expires, the node will automatically come back up. + * @param {string} contentRange When uploading file chunks to the image store, + * the Content-Range header field need to be configured and sent with a + * request. The format should looks like "bytes + * {First-Byte-Position}-{Last-Byte-Position}/{File-Length}". For example, + * Content-Range:bytes 300-5000/20000 indicates that user is sending bytes 300 + * through 5,000 and the total file length is 20,000 bytes. * * @param {object} [options] Optional Parameters. * @@ -62113,7 +60149,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - startNodeTransition(nodeName, operationId, nodeTransitionType, nodeInstanceId, stopDurationInSeconds, options, optionalCallback) { + uploadFileChunk(contentPath, sessionId, contentRange, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -62122,31 +60158,44 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._startNodeTransition(nodeName, operationId, nodeTransitionType, nodeInstanceId, stopDurationInSeconds, options, (err, result, request, response) => { + self._uploadFileChunk(contentPath, sessionId, contentRange, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._startNodeTransition(nodeName, operationId, nodeTransitionType, nodeInstanceId, stopDurationInSeconds, options, optionalCallback); + return self._uploadFileChunk(contentPath, sessionId, contentRange, options, optionalCallback); } } /** - * @summary Gets the progress of an operation started using - * StartNodeTransition. + * @summary Invokes an administrative command on the given Infrastructure + * Service instance. * - * Gets the progress of an operation started with StartNodeTransition using the - * provided OperationId. + * For clusters that have one or more instances of the Infrastructure Service + * configured, + * this API provides a way to send infrastructure-specific commands to a + * particular + * instance of the Infrastructure Service. * - * @param {string} nodeName The name of the node. + * Available commands and their corresponding response formats vary depending + * upon + * the infrastructure on which the cluster is running. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * This API supports the Service Fabric platform; it is not meant to be used + * directly from your code. + * + * @param {string} command The text of the command to be invoked. The content + * of the command is infrastructure-specific. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.serviceId] The identity of the infrastructure + * service. This is the full name of the infrastructure service without the + * 'fabric:' URI scheme. This parameter required only for the cluster that has + * more than one instance of infrastructure service running. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -62157,15 +60206,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getNodeTransitionProgressWithHttpOperationResponse(nodeName, operationId, options) { + invokeInfrastructureCommandWithHttpOperationResponse(command, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getNodeTransitionProgress(nodeName, operationId, options, (err, result, request, response) => { + self._invokeInfrastructureCommand(command, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -62176,19 +60225,32 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the progress of an operation started using - * StartNodeTransition. + * @summary Invokes an administrative command on the given Infrastructure + * Service instance. * - * Gets the progress of an operation started with StartNodeTransition using the - * provided OperationId. + * For clusters that have one or more instances of the Infrastructure Service + * configured, + * this API provides a way to send infrastructure-specific commands to a + * particular + * instance of the Infrastructure Service. * - * @param {string} nodeName The name of the node. + * Available commands and their corresponding response formats vary depending + * upon + * the infrastructure on which the cluster is running. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * This API supports the Service Fabric platform; it is not meant to be used + * directly from your code. + * + * @param {string} command The text of the command to be invoked. The content + * of the command is infrastructure-specific. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.serviceId] The identity of the infrastructure + * service. This is the full name of the infrastructure service without the + * 'fabric:' URI scheme. This parameter required only for the cluster that has + * more than one instance of infrastructure service running. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -62204,7 +60266,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {NodeTransitionProgress} - The deserialized result object. + * @resolve {String} - The deserialized result object. * * @reject {Error} - The error object. * @@ -62212,15 +60274,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link NodeTransitionProgress} for more - * information. + * {string} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getNodeTransitionProgress(nodeName, operationId, options, optionalCallback) { + invokeInfrastructureCommand(command, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -62229,45 +60289,44 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getNodeTransitionProgress(nodeName, operationId, options, (err, result, request, response) => { + self._invokeInfrastructureCommand(command, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getNodeTransitionProgress(nodeName, operationId, options, optionalCallback); + return self._invokeInfrastructureCommand(command, options, optionalCallback); } } /** - * @summary Gets a list of user-induced fault operations filtered by provided - * input. - * - * Gets the a list of user-induced fault operations filtered by provided input. + * @summary Invokes a read-only query on the given infrastructure service + * instance. * - * @param {number} typeFilter Used to filter on OperationType for user-induced - * operations. + * For clusters that have one or more instances of the Infrastructure Service + * configured, + * this API provides a way to send infrastructure-specific queries to a + * particular + * instance of the Infrastructure Service. * - * - 65535 - select all - * - 1 - select PartitionDataLoss. - * - 2 - select PartitionQuorumLoss. - * - 4 - select PartitionRestart. - * - 8 - select NodeTransition. + * Available commands and their corresponding response formats vary depending + * upon + * the infrastructure on which the cluster is running. * - * @param {number} stateFilter Used to filter on OperationState's for - * user-induced operations. + * This API supports the Service Fabric platform; it is not meant to be used + * directly from your code. * - * - 65535 - select All - * - 1 - select Running - * - 2 - select RollingBack - * - 8 - select Completed - * - 16 - select Faulted - * - 32 - select Cancelled - * - 64 - select ForceCancelled + * @param {string} command The text of the command to be invoked. The content + * of the command is infrastructure-specific. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.serviceId] The identity of the infrastructure + * service. This is the full name of the infrastructure service without the + * 'fabric:' URI scheme. This parameter required only for the cluster that has + * more than one instance of infrastructure service running. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -62278,15 +60337,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getFaultOperationListWithHttpOperationResponse(typeFilter, stateFilter, options) { + invokeInfrastructureQueryWithHttpOperationResponse(command, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getFaultOperationList(typeFilter, stateFilter, options, (err, result, request, response) => { + self._invokeInfrastructureQuery(command, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -62297,33 +60356,32 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets a list of user-induced fault operations filtered by provided - * input. - * - * Gets the a list of user-induced fault operations filtered by provided input. + * @summary Invokes a read-only query on the given infrastructure service + * instance. * - * @param {number} typeFilter Used to filter on OperationType for user-induced - * operations. + * For clusters that have one or more instances of the Infrastructure Service + * configured, + * this API provides a way to send infrastructure-specific queries to a + * particular + * instance of the Infrastructure Service. * - * - 65535 - select all - * - 1 - select PartitionDataLoss. - * - 2 - select PartitionQuorumLoss. - * - 4 - select PartitionRestart. - * - 8 - select NodeTransition. + * Available commands and their corresponding response formats vary depending + * upon + * the infrastructure on which the cluster is running. * - * @param {number} stateFilter Used to filter on OperationState's for - * user-induced operations. + * This API supports the Service Fabric platform; it is not meant to be used + * directly from your code. * - * - 65535 - select All - * - 1 - select Running - * - 2 - select RollingBack - * - 8 - select Completed - * - 16 - select Faulted - * - 32 - select Cancelled - * - 64 - select ForceCancelled + * @param {string} command The text of the command to be invoked. The content + * of the command is infrastructure-specific. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.serviceId] The identity of the infrastructure + * service. This is the full name of the infrastructure service without the + * 'fabric:' URI scheme. This parameter required only for the cluster that has + * more than one instance of infrastructure service running. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -62339,7 +60397,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {Array} - The deserialized result object. + * @resolve {String} - The deserialized result object. * * @reject {Error} - The error object. * @@ -62347,13 +60405,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * {string} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getFaultOperationList(typeFilter, stateFilter, options, optionalCallback) { + invokeInfrastructureQuery(command, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -62362,50 +60420,59 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getFaultOperationList(typeFilter, stateFilter, options, (err, result, request, response) => { + self._invokeInfrastructureQuery(command, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getFaultOperationList(typeFilter, stateFilter, options, optionalCallback); + return self._invokeInfrastructureQuery(command, options, optionalCallback); } } /** - * @summary Cancels a user-induced fault operation. + * @summary This API will induce data loss for the specified partition. It will + * trigger a call to the OnDataLossAsync API of the partition. * - * The following APIs start fault operations that may be cancelled by using - * CancelOperation: StartDataLoss, StartQuorumLoss, StartPartitionRestart, - * StartNodeTransition. + * This API will induce data loss for the specified partition. It will trigger + * a call to the OnDataLoss API of the partition. + * Actual data loss will depend on the specified DataLossMode. * - * If force is false, then the specified user-induced operation will be - * gracefully stopped and cleaned up. If force is true, the command will be - * aborted, and some internal state - * may be left behind. Specifying force as true should be used with care. - * Calling this API with force set to true is not allowed until this API has - * already - * been called on the same test command with force set to false first, or - * unless the test command already has an OperationState of - * OperationState.RollingBack. - * Clarification: OperationState.RollingBack means that the system will be/is - * cleaning up internal system state caused by executing the command. It will - * not restore data if the - * test command was to cause data loss. For example, if you call StartDataLoss - * then call this API, the system will only clean up internal state from - * running the command. - * It will not restore the target partition's data, if the command progressed - * far enough to cause data loss. + * - PartialDataLoss - Only a quorum of replicas are removed and OnDataLoss is + * triggered for the partition but actual data loss depends on the presence of + * in-flight replication. + * - FullDataLoss - All replicas are removed hence all data is lost and + * OnDataLoss is triggered. * - * Important note: if this API is invoked with force==true, internal state may - * be left behind. + * This API should only be called with a stateful service as the target. + * + * Calling this API with a system service as the target is not advised. + * + * Note: Once this API has been called, it cannot be reversed. Calling + * CancelOperation will only stop execution and clean up internal system state. + * It will not restore data if the command has progressed far enough to cause + * data loss. + * + * Call the GetDataLossProgress API with the same OperationId to return + * information on the operation started with this API. + * + * @param {string} serviceId The identity of the service. This ID is typically + * the full name of the service without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * previous versions. + * + * @param {uuid} partitionId The identity of the partition. * * @param {uuid} operationId A GUID that identifies a call of this API. This * is passed into the corresponding GetProgress API * - * @param {boolean} force Indicates whether to gracefully rollback and clean up - * internal system state modified by executing the user-induced operation. + * @param {string} dataLossMode This enum is passed to the StartDataLoss API to + * indicate what type of data loss to induce. Possible values include: + * 'Invalid', 'PartialDataLoss', 'FullDataLoss' * * @param {object} [options] Optional Parameters. * @@ -62423,11 +60490,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - cancelOperationWithHttpOperationResponse(operationId, force, options) { + startDataLossWithHttpOperationResponse(serviceId, partitionId, operationId, dataLossMode, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._cancelOperation(operationId, force, options, (err, result, request, response) => { + self._startDataLoss(serviceId, partitionId, operationId, dataLossMode, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -62438,38 +60505,47 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Cancels a user-induced fault operation. + * @summary This API will induce data loss for the specified partition. It will + * trigger a call to the OnDataLossAsync API of the partition. * - * The following APIs start fault operations that may be cancelled by using - * CancelOperation: StartDataLoss, StartQuorumLoss, StartPartitionRestart, - * StartNodeTransition. + * This API will induce data loss for the specified partition. It will trigger + * a call to the OnDataLoss API of the partition. + * Actual data loss will depend on the specified DataLossMode. * - * If force is false, then the specified user-induced operation will be - * gracefully stopped and cleaned up. If force is true, the command will be - * aborted, and some internal state - * may be left behind. Specifying force as true should be used with care. - * Calling this API with force set to true is not allowed until this API has - * already - * been called on the same test command with force set to false first, or - * unless the test command already has an OperationState of - * OperationState.RollingBack. - * Clarification: OperationState.RollingBack means that the system will be/is - * cleaning up internal system state caused by executing the command. It will - * not restore data if the - * test command was to cause data loss. For example, if you call StartDataLoss - * then call this API, the system will only clean up internal state from - * running the command. - * It will not restore the target partition's data, if the command progressed - * far enough to cause data loss. + * - PartialDataLoss - Only a quorum of replicas are removed and OnDataLoss is + * triggered for the partition but actual data loss depends on the presence of + * in-flight replication. + * - FullDataLoss - All replicas are removed hence all data is lost and + * OnDataLoss is triggered. * - * Important note: if this API is invoked with force==true, internal state may - * be left behind. + * This API should only be called with a stateful service as the target. + * + * Calling this API with a system service as the target is not advised. + * + * Note: Once this API has been called, it cannot be reversed. Calling + * CancelOperation will only stop execution and clean up internal system state. + * It will not restore data if the command has progressed far enough to cause + * data loss. + * + * Call the GetDataLossProgress API with the same OperationId to return + * information on the operation started with this API. + * + * @param {string} serviceId The identity of the service. This ID is typically + * the full name of the service without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * previous versions. + * + * @param {uuid} partitionId The identity of the partition. * * @param {uuid} operationId A GUID that identifies a call of this API. This * is passed into the corresponding GetProgress API * - * @param {boolean} force Indicates whether to gracefully rollback and clean up - * internal system state modified by executing the user-induced operation. + * @param {string} dataLossMode This enum is passed to the StartDataLoss API to + * indicate what type of data loss to induce. Possible values include: + * 'Invalid', 'PartialDataLoss', 'FullDataLoss' * * @param {object} [options] Optional Parameters. * @@ -62502,7 +60578,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - cancelOperation(operationId, force, options, optionalCallback) { + startDataLoss(serviceId, partitionId, operationId, dataLossMode, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -62511,55 +60587,36 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._cancelOperation(operationId, force, options, (err, result, request, response) => { + self._startDataLoss(serviceId, partitionId, operationId, dataLossMode, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._cancelOperation(operationId, force, options, optionalCallback); + return self._startDataLoss(serviceId, partitionId, operationId, dataLossMode, options, optionalCallback); } } /** - * @summary Creates a backup policy. - * - * Creates a backup policy which can be associated later with a Service Fabric - * application, service or a partition for periodic backup. - * - * @param {object} backupPolicyDescription Describes the backup policy. - * - * @param {string} backupPolicyDescription.name The unique name identifying - * this backup policy. - * - * @param {boolean} backupPolicyDescription.autoRestoreOnDataLoss Specifies - * whether to trigger restore automatically using the latest available backup - * in case the partition experiences a data loss event. - * - * @param {number} backupPolicyDescription.maxIncrementalBackups Defines the - * maximum number of incremental backups to be taken between two full backups. - * This is just the upper limit. A full backup may be taken before specified - * number of incremental backups are completed in one of the following - * conditions - * - The replica has never taken a full backup since it has become primary, - * - Some of the log records since the last backup has been truncated, or - * - Replica passed the MaxAccumulatedBackupLogSizeInMB limit. - * - * @param {object} backupPolicyDescription.schedule Describes the backup - * schedule parameters. + * @summary Gets the progress of a partition data loss operation started using + * the StartDataLoss API. * - * @param {string} backupPolicyDescription.schedule.scheduleKind Polymorphic - * Discriminator + * Gets the progress of a data loss operation started with StartDataLoss, using + * the OperationId. * - * @param {object} backupPolicyDescription.storage Describes the details of - * backup storage where to store the periodic backups. + * @param {string} serviceId The identity of the service. This ID is typically + * the full name of the service without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * previous versions. * - * @param {string} [backupPolicyDescription.storage.friendlyName] Friendly name - * for this backup storage. + * @param {uuid} partitionId The identity of the partition. * - * @param {string} backupPolicyDescription.storage.storageKind Polymorphic - * Discriminator + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API * * @param {object} [options] Optional Parameters. * @@ -62573,15 +60630,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - createBackupPolicyWithHttpOperationResponse(backupPolicyDescription, options) { + getDataLossProgressWithHttpOperationResponse(serviceId, partitionId, operationId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._createBackupPolicy(backupPolicyDescription, options, (err, result, request, response) => { + self._getDataLossProgress(serviceId, partitionId, operationId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -62592,43 +60649,24 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Creates a backup policy. - * - * Creates a backup policy which can be associated later with a Service Fabric - * application, service or a partition for periodic backup. - * - * @param {object} backupPolicyDescription Describes the backup policy. - * - * @param {string} backupPolicyDescription.name The unique name identifying - * this backup policy. - * - * @param {boolean} backupPolicyDescription.autoRestoreOnDataLoss Specifies - * whether to trigger restore automatically using the latest available backup - * in case the partition experiences a data loss event. - * - * @param {number} backupPolicyDescription.maxIncrementalBackups Defines the - * maximum number of incremental backups to be taken between two full backups. - * This is just the upper limit. A full backup may be taken before specified - * number of incremental backups are completed in one of the following - * conditions - * - The replica has never taken a full backup since it has become primary, - * - Some of the log records since the last backup has been truncated, or - * - Replica passed the MaxAccumulatedBackupLogSizeInMB limit. - * - * @param {object} backupPolicyDescription.schedule Describes the backup - * schedule parameters. + * @summary Gets the progress of a partition data loss operation started using + * the StartDataLoss API. * - * @param {string} backupPolicyDescription.schedule.scheduleKind Polymorphic - * Discriminator + * Gets the progress of a data loss operation started with StartDataLoss, using + * the OperationId. * - * @param {object} backupPolicyDescription.storage Describes the details of - * backup storage where to store the periodic backups. + * @param {string} serviceId The identity of the service. This ID is typically + * the full name of the service without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * previous versions. * - * @param {string} [backupPolicyDescription.storage.friendlyName] Friendly name - * for this backup storage. + * @param {uuid} partitionId The identity of the partition. * - * @param {string} backupPolicyDescription.storage.storageKind Polymorphic - * Discriminator + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API * * @param {object} [options] Optional Parameters. * @@ -62647,7 +60685,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {PartitionDataLossProgress} - The deserialized result object. * * @reject {Error} - The error object. * @@ -62655,13 +60693,15 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PartitionDataLossProgress} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createBackupPolicy(backupPolicyDescription, options, optionalCallback) { + getDataLossProgress(serviceId, partitionId, operationId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -62670,26 +60710,48 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createBackupPolicy(backupPolicyDescription, options, (err, result, request, response) => { + self._getDataLossProgress(serviceId, partitionId, operationId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createBackupPolicy(backupPolicyDescription, options, optionalCallback); + return self._getDataLossProgress(serviceId, partitionId, operationId, options, optionalCallback); } } /** - * @summary Deletes the backup policy. + * @summary Induces quorum loss for a given stateful service partition. * - * Deletes an existing backup policy. A backup policy must be created before it - * can be deleted. A currently active backup policy, associated with any - * Service Fabric application, service or partition, cannot be deleted without - * first deleting the mapping. + * This API is useful for a temporary quorum loss situation on your service. * - * @param {string} backupPolicyName The name of the backup policy. + * Call the GetQuorumLossProgress API with the same OperationId to return + * information on the operation started with this API. + * + * This can only be called on stateful persisted (HasPersistedState==true) + * services. Do not use this API on stateless services or stateful in-memory + * only services. + * + * @param {string} serviceId The identity of the service. This ID is typically + * the full name of the service without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * previous versions. + * + * @param {uuid} partitionId The identity of the partition. + * + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API + * + * @param {string} quorumLossMode This enum is passed to the StartQuorumLoss + * API to indicate what type of quorum loss to induce. Possible values include: + * 'Invalid', 'QuorumReplicas', 'AllReplicas' + * + * @param {number} quorumLossDuration The amount of time for which the + * partition will be kept in quorum loss. This must be specified in seconds. * * @param {object} [options] Optional Parameters. * @@ -62707,11 +60769,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - deleteBackupPolicyWithHttpOperationResponse(backupPolicyName, options) { + startQuorumLossWithHttpOperationResponse(serviceId, partitionId, operationId, quorumLossMode, quorumLossDuration, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._deleteBackupPolicy(backupPolicyName, options, (err, result, request, response) => { + self._startQuorumLoss(serviceId, partitionId, operationId, quorumLossMode, quorumLossDuration, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -62722,14 +60784,36 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Deletes the backup policy. + * @summary Induces quorum loss for a given stateful service partition. + * + * This API is useful for a temporary quorum loss situation on your service. + * + * Call the GetQuorumLossProgress API with the same OperationId to return + * information on the operation started with this API. + * + * This can only be called on stateful persisted (HasPersistedState==true) + * services. Do not use this API on stateless services or stateful in-memory + * only services. + * + * @param {string} serviceId The identity of the service. This ID is typically + * the full name of the service without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * previous versions. * - * Deletes an existing backup policy. A backup policy must be created before it - * can be deleted. A currently active backup policy, associated with any - * Service Fabric application, service or partition, cannot be deleted without - * first deleting the mapping. + * @param {uuid} partitionId The identity of the partition. * - * @param {string} backupPolicyName The name of the backup policy. + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API + * + * @param {string} quorumLossMode This enum is passed to the StartQuorumLoss + * API to indicate what type of quorum loss to induce. Possible values include: + * 'Invalid', 'QuorumReplicas', 'AllReplicas' + * + * @param {number} quorumLossDuration The amount of time for which the + * partition will be kept in quorum loss. This must be specified in seconds. * * @param {object} [options] Optional Parameters. * @@ -62762,7 +60846,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteBackupPolicy(backupPolicyName, options, optionalCallback) { + startQuorumLoss(serviceId, partitionId, operationId, quorumLossMode, quorumLossDuration, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -62771,39 +60855,38 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteBackupPolicy(backupPolicyName, options, (err, result, request, response) => { + self._startQuorumLoss(serviceId, partitionId, operationId, quorumLossMode, quorumLossDuration, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteBackupPolicy(backupPolicyName, options, optionalCallback); + return self._startQuorumLoss(serviceId, partitionId, operationId, quorumLossMode, quorumLossDuration, options, optionalCallback); } } /** - * @summary Gets all the backup policies configured. + * @summary Gets the progress of a quorum loss operation on a partition started + * using the StartQuorumLoss API. * - * Get a list of all the backup policies configured. + * Gets the progress of a quorum loss operation started with StartQuorumLoss, + * using the provided OperationId. * - * @param {object} [options] Optional Parameters. + * @param {string} serviceId The identity of the service. This ID is typically + * the full name of the service without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * previous versions. * - * @param {string} [options.continuationToken] The continuation token parameter - * is used to obtain next set of results. A continuation token with a non-empty - * value is included in the response of the API when the results from the - * system do not fit in a single response. When this value is passed to the - * next API call, the API returns next set of results. If there are no further - * results, then the continuation token does not contain a value. The value of - * this parameter should not be URL encoded. + * @param {uuid} partitionId The identity of the partition. * - * @param {number} [options.maxResults] The maximum number of results to be - * returned as part of the paged queries. This parameter defines the upper - * bound on the number of results returned. The results returned can be less - * than the specified maximum results if they do not fit in the message as per - * the max message size restrictions defined in the configuration. If this - * parameter is zero or not specified, the paged query includes as many results - * as possible that fit in the return message. + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API + * + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -62815,15 +60898,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getBackupPolicyListWithHttpOperationResponse(options) { + getQuorumLossProgressWithHttpOperationResponse(serviceId, partitionId, operationId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getBackupPolicyList(options, (err, result, request, response) => { + self._getQuorumLossProgress(serviceId, partitionId, operationId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -62834,27 +60917,26 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets all the backup policies configured. + * @summary Gets the progress of a quorum loss operation on a partition started + * using the StartQuorumLoss API. * - * Get a list of all the backup policies configured. + * Gets the progress of a quorum loss operation started with StartQuorumLoss, + * using the provided OperationId. * - * @param {object} [options] Optional Parameters. + * @param {string} serviceId The identity of the service. This ID is typically + * the full name of the service without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * previous versions. * - * @param {string} [options.continuationToken] The continuation token parameter - * is used to obtain next set of results. A continuation token with a non-empty - * value is included in the response of the API when the results from the - * system do not fit in a single response. When this value is passed to the - * next API call, the API returns next set of results. If there are no further - * results, then the continuation token does not contain a value. The value of - * this parameter should not be URL encoded. + * @param {uuid} partitionId The identity of the partition. * - * @param {number} [options.maxResults] The maximum number of results to be - * returned as part of the paged queries. This parameter defines the upper - * bound on the number of results returned. The results returned can be less - * than the specified maximum results if they do not fit in the message as per - * the max message size restrictions defined in the configuration. If this - * parameter is zero or not specified, the paged query includes as many results - * as possible that fit in the return message. + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API + * + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -62871,7 +60953,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {PagedBackupPolicyDescriptionList} - The deserialized result object. + * @resolve {PartitionQuorumLossProgress} - The deserialized result object. * * @reject {Error} - The error object. * @@ -62880,14 +60962,14 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PagedBackupPolicyDescriptionList} for more + * See {@link PartitionQuorumLossProgress} for more * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getBackupPolicyList(options, optionalCallback) { + getQuorumLossProgress(serviceId, partitionId, operationId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -62896,23 +60978,45 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getBackupPolicyList(options, (err, result, request, response) => { + self._getQuorumLossProgress(serviceId, partitionId, operationId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getBackupPolicyList(options, optionalCallback); + return self._getQuorumLossProgress(serviceId, partitionId, operationId, options, optionalCallback); } } /** - * @summary Gets a particular backup policy by name. + * @summary This API will restart some or all replicas or instances of the + * specified partition. * - * Gets a particular backup policy identified by {backupPolicyName} + * This API is useful for testing failover. * - * @param {string} backupPolicyName The name of the backup policy. + * If used to target a stateless service partition, RestartPartitionMode must + * be AllReplicasOrInstances. + * + * Call the GetPartitionRestartProgress API using the same OperationId to get + * the progress. + * + * @param {string} serviceId The identity of the service. This ID is typically + * the full name of the service without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * previous versions. + * + * @param {uuid} partitionId The identity of the partition. + * + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API + * + * @param {string} restartPartitionMode Describe which partitions to restart. + * Possible values include: 'Invalid', 'AllReplicasOrInstances', + * 'OnlyActiveSecondaries' * * @param {object} [options] Optional Parameters. * @@ -62926,15 +61030,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getBackupPolicyByNameWithHttpOperationResponse(backupPolicyName, options) { + startPartitionRestartWithHttpOperationResponse(serviceId, partitionId, operationId, restartPartitionMode, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getBackupPolicyByName(backupPolicyName, options, (err, result, request, response) => { + self._startPartitionRestart(serviceId, partitionId, operationId, restartPartitionMode, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -62945,11 +61049,33 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets a particular backup policy by name. + * @summary This API will restart some or all replicas or instances of the + * specified partition. * - * Gets a particular backup policy identified by {backupPolicyName} + * This API is useful for testing failover. * - * @param {string} backupPolicyName The name of the backup policy. + * If used to target a stateless service partition, RestartPartitionMode must + * be AllReplicasOrInstances. + * + * Call the GetPartitionRestartProgress API using the same OperationId to get + * the progress. + * + * @param {string} serviceId The identity of the service. This ID is typically + * the full name of the service without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * previous versions. + * + * @param {uuid} partitionId The identity of the partition. + * + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API + * + * @param {string} restartPartitionMode Describe which partitions to restart. + * Possible values include: 'Invalid', 'AllReplicasOrInstances', + * 'OnlyActiveSecondaries' * * @param {object} [options] Optional Parameters. * @@ -62968,7 +61094,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {BackupPolicyDescription} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -62976,15 +61102,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link BackupPolicyDescription} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getBackupPolicyByName(backupPolicyName, options, optionalCallback) { + startPartitionRestart(serviceId, partitionId, operationId, restartPartitionMode, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -62993,43 +61117,38 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getBackupPolicyByName(backupPolicyName, options, (err, result, request, response) => { + self._startPartitionRestart(serviceId, partitionId, operationId, restartPartitionMode, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getBackupPolicyByName(backupPolicyName, options, optionalCallback); + return self._startPartitionRestart(serviceId, partitionId, operationId, restartPartitionMode, options, optionalCallback); } } /** - * @summary Gets the list of backup entities that are associated with this - * policy. + * @summary Gets the progress of a PartitionRestart operation started using + * StartPartitionRestart. * - * Returns a list of Service Fabric application, service or partition which are - * associated with this backup policy. + * Gets the progress of a PartitionRestart started with StartPartitionRestart + * using the provided OperationId. * - * @param {string} backupPolicyName The name of the backup policy. + * @param {string} serviceId The identity of the service. This ID is typically + * the full name of the service without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * previous versions. * - * @param {object} [options] Optional Parameters. + * @param {uuid} partitionId The identity of the partition. * - * @param {string} [options.continuationToken] The continuation token parameter - * is used to obtain next set of results. A continuation token with a non-empty - * value is included in the response of the API when the results from the - * system do not fit in a single response. When this value is passed to the - * next API call, the API returns next set of results. If there are no further - * results, then the continuation token does not contain a value. The value of - * this parameter should not be URL encoded. + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API * - * @param {number} [options.maxResults] The maximum number of results to be - * returned as part of the paged queries. This parameter defines the upper - * bound on the number of results returned. The results returned can be less - * than the specified maximum results if they do not fit in the message as per - * the max message size restrictions defined in the configuration. If this - * parameter is zero or not specified, the paged query includes as many results - * as possible that fit in the return message. + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -63041,15 +61160,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getAllEntitiesBackedUpByPolicyWithHttpOperationResponse(backupPolicyName, options) { + getPartitionRestartProgressWithHttpOperationResponse(serviceId, partitionId, operationId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getAllEntitiesBackedUpByPolicy(backupPolicyName, options, (err, result, request, response) => { + self._getPartitionRestartProgress(serviceId, partitionId, operationId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -63060,31 +61179,26 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the list of backup entities that are associated with this - * policy. + * @summary Gets the progress of a PartitionRestart operation started using + * StartPartitionRestart. * - * Returns a list of Service Fabric application, service or partition which are - * associated with this backup policy. + * Gets the progress of a PartitionRestart started with StartPartitionRestart + * using the provided OperationId. * - * @param {string} backupPolicyName The name of the backup policy. + * @param {string} serviceId The identity of the service. This ID is typically + * the full name of the service without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * previous versions. * - * @param {object} [options] Optional Parameters. + * @param {uuid} partitionId The identity of the partition. * - * @param {string} [options.continuationToken] The continuation token parameter - * is used to obtain next set of results. A continuation token with a non-empty - * value is included in the response of the API when the results from the - * system do not fit in a single response. When this value is passed to the - * next API call, the API returns next set of results. If there are no further - * results, then the continuation token does not contain a value. The value of - * this parameter should not be URL encoded. + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API * - * @param {number} [options.maxResults] The maximum number of results to be - * returned as part of the paged queries. This parameter defines the upper - * bound on the number of results returned. The results returned can be less - * than the specified maximum results if they do not fit in the message as per - * the max message size restrictions defined in the configuration. If this - * parameter is zero or not specified, the paged query includes as many results - * as possible that fit in the return message. + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -63101,7 +61215,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {PagedBackupEntityList} - The deserialized result object. + * @resolve {PartitionRestartProgress} - The deserialized result object. * * @reject {Error} - The error object. * @@ -63110,13 +61224,14 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PagedBackupEntityList} for more information. + * See {@link PartitionRestartProgress} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getAllEntitiesBackedUpByPolicy(backupPolicyName, options, optionalCallback) { + getPartitionRestartProgress(serviceId, partitionId, operationId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -63125,56 +61240,45 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getAllEntitiesBackedUpByPolicy(backupPolicyName, options, (err, result, request, response) => { + self._getPartitionRestartProgress(serviceId, partitionId, operationId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getAllEntitiesBackedUpByPolicy(backupPolicyName, options, optionalCallback); + return self._getPartitionRestartProgress(serviceId, partitionId, operationId, options, optionalCallback); } } /** - * @summary Updates the backup policy. - * - * Updates the backup policy identified by {backupPolicyName} - * - * @param {object} backupPolicyDescription Describes the backup policy. - * - * @param {string} backupPolicyDescription.name The unique name identifying - * this backup policy. - * - * @param {boolean} backupPolicyDescription.autoRestoreOnDataLoss Specifies - * whether to trigger restore automatically using the latest available backup - * in case the partition experiences a data loss event. - * - * @param {number} backupPolicyDescription.maxIncrementalBackups Defines the - * maximum number of incremental backups to be taken between two full backups. - * This is just the upper limit. A full backup may be taken before specified - * number of incremental backups are completed in one of the following - * conditions - * - The replica has never taken a full backup since it has become primary, - * - Some of the log records since the last backup has been truncated, or - * - Replica passed the MaxAccumulatedBackupLogSizeInMB limit. + * @summary Starts or stops a cluster node. * - * @param {object} backupPolicyDescription.schedule Describes the backup - * schedule parameters. + * Starts or stops a cluster node. A cluster node is a process, not the OS + * instance itself. To start a node, pass in "Start" for the + * NodeTransitionType parameter. + * To stop a node, pass in "Stop" for the NodeTransitionType parameter. This + * API starts the operation - when the API returns the node may not have + * finished transitioning yet. + * Call GetNodeTransitionProgress with the same OperationId to get the progress + * of the operation. * - * @param {string} backupPolicyDescription.schedule.scheduleKind Polymorphic - * Discriminator + * @param {string} nodeName The name of the node. * - * @param {object} backupPolicyDescription.storage Describes the details of - * backup storage where to store the periodic backups. + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API * - * @param {string} [backupPolicyDescription.storage.friendlyName] Friendly name - * for this backup storage. + * @param {string} nodeTransitionType Indicates the type of transition to + * perform. NodeTransitionType.Start will start a stopped node. + * NodeTransitionType.Stop will stop a node that is up. Possible values + * include: 'Invalid', 'Start', 'Stop' * - * @param {string} backupPolicyDescription.storage.storageKind Polymorphic - * Discriminator + * @param {string} nodeInstanceId The node instance ID of the target node. + * This can be determined through GetNodeInfo API. * - * @param {string} backupPolicyName The name of the backup policy. + * @param {number} stopDurationInSeconds The duration, in seconds, to keep the + * node stopped. The minimum value is 600, the maximum is 14400. After this + * time expires, the node will automatically come back up. * * @param {object} [options] Optional Parameters. * @@ -63192,11 +61296,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - updateBackupPolicyWithHttpOperationResponse(backupPolicyDescription, backupPolicyName, options) { + startNodeTransitionWithHttpOperationResponse(nodeName, operationId, nodeTransitionType, nodeInstanceId, stopDurationInSeconds, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._updateBackupPolicy(backupPolicyDescription, backupPolicyName, options, (err, result, request, response) => { + self._startNodeTransition(nodeName, operationId, nodeTransitionType, nodeInstanceId, stopDurationInSeconds, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -63207,44 +61311,33 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Updates the backup policy. - * - * Updates the backup policy identified by {backupPolicyName} - * - * @param {object} backupPolicyDescription Describes the backup policy. - * - * @param {string} backupPolicyDescription.name The unique name identifying - * this backup policy. - * - * @param {boolean} backupPolicyDescription.autoRestoreOnDataLoss Specifies - * whether to trigger restore automatically using the latest available backup - * in case the partition experiences a data loss event. - * - * @param {number} backupPolicyDescription.maxIncrementalBackups Defines the - * maximum number of incremental backups to be taken between two full backups. - * This is just the upper limit. A full backup may be taken before specified - * number of incremental backups are completed in one of the following - * conditions - * - The replica has never taken a full backup since it has become primary, - * - Some of the log records since the last backup has been truncated, or - * - Replica passed the MaxAccumulatedBackupLogSizeInMB limit. + * @summary Starts or stops a cluster node. * - * @param {object} backupPolicyDescription.schedule Describes the backup - * schedule parameters. + * Starts or stops a cluster node. A cluster node is a process, not the OS + * instance itself. To start a node, pass in "Start" for the + * NodeTransitionType parameter. + * To stop a node, pass in "Stop" for the NodeTransitionType parameter. This + * API starts the operation - when the API returns the node may not have + * finished transitioning yet. + * Call GetNodeTransitionProgress with the same OperationId to get the progress + * of the operation. * - * @param {string} backupPolicyDescription.schedule.scheduleKind Polymorphic - * Discriminator + * @param {string} nodeName The name of the node. * - * @param {object} backupPolicyDescription.storage Describes the details of - * backup storage where to store the periodic backups. + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API * - * @param {string} [backupPolicyDescription.storage.friendlyName] Friendly name - * for this backup storage. + * @param {string} nodeTransitionType Indicates the type of transition to + * perform. NodeTransitionType.Start will start a stopped node. + * NodeTransitionType.Stop will stop a node that is up. Possible values + * include: 'Invalid', 'Start', 'Stop' * - * @param {string} backupPolicyDescription.storage.storageKind Polymorphic - * Discriminator + * @param {string} nodeInstanceId The node instance ID of the target node. + * This can be determined through GetNodeInfo API. * - * @param {string} backupPolicyName The name of the backup policy. + * @param {number} stopDurationInSeconds The duration, in seconds, to keep the + * node stopped. The minimum value is 600, the maximum is 14400. After this + * time expires, the node will automatically come back up. * * @param {object} [options] Optional Parameters. * @@ -63277,7 +61370,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - updateBackupPolicy(backupPolicyDescription, backupPolicyName, options, optionalCallback) { + startNodeTransition(nodeName, operationId, nodeTransitionType, nodeInstanceId, stopDurationInSeconds, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -63286,40 +61379,28 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._updateBackupPolicy(backupPolicyDescription, backupPolicyName, options, (err, result, request, response) => { + self._startNodeTransition(nodeName, operationId, nodeTransitionType, nodeInstanceId, stopDurationInSeconds, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._updateBackupPolicy(backupPolicyDescription, backupPolicyName, options, optionalCallback); + return self._startNodeTransition(nodeName, operationId, nodeTransitionType, nodeInstanceId, stopDurationInSeconds, options, optionalCallback); } } /** - * @summary Enables periodic backup of stateful partitions under this Service - * Fabric application. - * - * Enables periodic backup of stateful partitions which are part of this - * Service Fabric application. Each partition is backed up individually as per - * the specified backup policy description. - * Note only C# based Reliable Actor and Reliable Stateful services are - * currently supported for periodic backup. + * @summary Gets the progress of an operation started using + * StartNodeTransition. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. + * Gets the progress of an operation started with StartNodeTransition using the + * provided OperationId. * - * @param {object} enableBackupDescription Specifies the parameters for - * enabling backup. + * @param {string} nodeName The name of the node. * - * @param {string} enableBackupDescription.backupPolicyName Name of the backup - * policy to be used for enabling periodic backups. + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API * * @param {object} [options] Optional Parameters. * @@ -63333,15 +61414,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - enableApplicationBackupWithHttpOperationResponse(applicationId, enableBackupDescription, options) { + getNodeTransitionProgressWithHttpOperationResponse(nodeName, operationId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._enableApplicationBackup(applicationId, enableBackupDescription, options, (err, result, request, response) => { + self._getNodeTransitionProgress(nodeName, operationId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -63352,28 +61433,16 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Enables periodic backup of stateful partitions under this Service - * Fabric application. - * - * Enables periodic backup of stateful partitions which are part of this - * Service Fabric application. Each partition is backed up individually as per - * the specified backup policy description. - * Note only C# based Reliable Actor and Reliable Stateful services are - * currently supported for periodic backup. + * @summary Gets the progress of an operation started using + * StartNodeTransition. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. + * Gets the progress of an operation started with StartNodeTransition using the + * provided OperationId. * - * @param {object} enableBackupDescription Specifies the parameters for - * enabling backup. + * @param {string} nodeName The name of the node. * - * @param {string} enableBackupDescription.backupPolicyName Name of the backup - * policy to be used for enabling periodic backups. + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API * * @param {object} [options] Optional Parameters. * @@ -63392,7 +61461,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {NodeTransitionProgress} - The deserialized result object. * * @reject {Error} - The error object. * @@ -63400,13 +61469,15 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link NodeTransitionProgress} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - enableApplicationBackup(applicationId, enableBackupDescription, options, optionalCallback) { + getNodeTransitionProgress(nodeName, operationId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -63415,30 +61486,42 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._enableApplicationBackup(applicationId, enableBackupDescription, options, (err, result, request, response) => { + self._getNodeTransitionProgress(nodeName, operationId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._enableApplicationBackup(applicationId, enableBackupDescription, options, optionalCallback); + return self._getNodeTransitionProgress(nodeName, operationId, options, optionalCallback); } } /** - * @summary Disables periodic backup of Service Fabric application. + * @summary Gets a list of user-induced fault operations filtered by provided + * input. * - * Disables periodic backup of Service Fabric application which was previously - * enabled. + * Gets the list of user-induced fault operations filtered by provided input. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. + * @param {number} typeFilter Used to filter on OperationType for user-induced + * operations. + * + * - 65535 - select all + * - 1 - select PartitionDataLoss. + * - 2 - select PartitionQuorumLoss. + * - 4 - select PartitionRestart. + * - 8 - select NodeTransition. + * + * @param {number} stateFilter Used to filter on OperationState's for + * user-induced operations. + * + * - 65535 - select All + * - 1 - select Running + * - 2 - select RollingBack + * - 8 - select Completed + * - 16 - select Faulted + * - 32 - select Cancelled + * - 64 - select ForceCancelled * * @param {object} [options] Optional Parameters. * @@ -63452,15 +61535,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - disableApplicationBackupWithHttpOperationResponse(applicationId, options) { + getFaultOperationListWithHttpOperationResponse(typeFilter, stateFilter, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._disableApplicationBackup(applicationId, options, (err, result, request, response) => { + self._getFaultOperationList(typeFilter, stateFilter, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -63471,18 +61554,30 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Disables periodic backup of Service Fabric application. + * @summary Gets a list of user-induced fault operations filtered by provided + * input. * - * Disables periodic backup of Service Fabric application which was previously - * enabled. + * Gets the list of user-induced fault operations filtered by provided input. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. + * @param {number} typeFilter Used to filter on OperationType for user-induced + * operations. + * + * - 65535 - select all + * - 1 - select PartitionDataLoss. + * - 2 - select PartitionQuorumLoss. + * - 4 - select PartitionRestart. + * - 8 - select NodeTransition. + * + * @param {number} stateFilter Used to filter on OperationState's for + * user-induced operations. + * + * - 65535 - select All + * - 1 - select Running + * - 2 - select RollingBack + * - 8 - select Completed + * - 16 - select Faulted + * - 32 - select Cancelled + * - 64 - select ForceCancelled * * @param {object} [options] Optional Parameters. * @@ -63501,7 +61596,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error} - The error object. * @@ -63509,13 +61604,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - disableApplicationBackup(applicationId, options, optionalCallback) { + getFaultOperationList(typeFilter, stateFilter, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -63524,49 +61619,52 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._disableApplicationBackup(applicationId, options, (err, result, request, response) => { + self._getFaultOperationList(typeFilter, stateFilter, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._disableApplicationBackup(applicationId, options, optionalCallback); + return self._getFaultOperationList(typeFilter, stateFilter, options, optionalCallback); } } /** - * @summary Gets the Service Fabric application backup configuration - * information. + * @summary Cancels a user-induced fault operation. * - * Gets the Service Fabric backup configuration information for the application - * and the services and partitions under this application. + * The following APIs start fault operations that may be cancelled by using + * CancelOperation: StartDataLoss, StartQuorumLoss, StartPartitionRestart, + * StartNodeTransition. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. + * If force is false, then the specified user-induced operation will be + * gracefully stopped and cleaned up. If force is true, the command will be + * aborted, and some internal state + * may be left behind. Specifying force as true should be used with care. + * Calling this API with force set to true is not allowed until this API has + * already + * been called on the same test command with force set to false first, or + * unless the test command already has an OperationState of + * OperationState.RollingBack. + * Clarification: OperationState.RollingBack means that the system will be/is + * cleaning up internal system state caused by executing the command. It will + * not restore data if the + * test command was to cause data loss. For example, if you call StartDataLoss + * then call this API, the system will only clean up internal state from + * running the command. + * It will not restore the target partition's data, if the command progressed + * far enough to cause data loss. * - * @param {object} [options] Optional Parameters. + * Important note: if this API is invoked with force==true, internal state may + * be left behind. * - * @param {string} [options.continuationToken] The continuation token parameter - * is used to obtain next set of results. A continuation token with a non-empty - * value is included in the response of the API when the results from the - * system do not fit in a single response. When this value is passed to the - * next API call, the API returns next set of results. If there are no further - * results, then the continuation token does not contain a value. The value of - * this parameter should not be URL encoded. + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API * - * @param {number} [options.maxResults] The maximum number of results to be - * returned as part of the paged queries. This parameter defines the upper - * bound on the number of results returned. The results returned can be less - * than the specified maximum results if they do not fit in the message as per - * the max message size restrictions defined in the configuration. If this - * parameter is zero or not specified, the paged query includes as many results - * as possible that fit in the return message. + * @param {boolean} force Indicates whether to gracefully roll back and clean + * up internal system state modified by executing the user-induced operation. + * + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -63578,15 +61676,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getApplicationBackupConfigurationInfoWithHttpOperationResponse(applicationId, options) { + cancelOperationWithHttpOperationResponse(operationId, force, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getApplicationBackupConfigurationInfo(applicationId, options, (err, result, request, response) => { + self._cancelOperation(operationId, force, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -63597,37 +61695,40 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the Service Fabric application backup configuration - * information. + * @summary Cancels a user-induced fault operation. * - * Gets the Service Fabric backup configuration information for the application - * and the services and partitions under this application. + * The following APIs start fault operations that may be cancelled by using + * CancelOperation: StartDataLoss, StartQuorumLoss, StartPartitionRestart, + * StartNodeTransition. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. + * If force is false, then the specified user-induced operation will be + * gracefully stopped and cleaned up. If force is true, the command will be + * aborted, and some internal state + * may be left behind. Specifying force as true should be used with care. + * Calling this API with force set to true is not allowed until this API has + * already + * been called on the same test command with force set to false first, or + * unless the test command already has an OperationState of + * OperationState.RollingBack. + * Clarification: OperationState.RollingBack means that the system will be/is + * cleaning up internal system state caused by executing the command. It will + * not restore data if the + * test command was to cause data loss. For example, if you call StartDataLoss + * then call this API, the system will only clean up internal state from + * running the command. + * It will not restore the target partition's data, if the command progressed + * far enough to cause data loss. * - * @param {object} [options] Optional Parameters. + * Important note: if this API is invoked with force==true, internal state may + * be left behind. * - * @param {string} [options.continuationToken] The continuation token parameter - * is used to obtain next set of results. A continuation token with a non-empty - * value is included in the response of the API when the results from the - * system do not fit in a single response. When this value is passed to the - * next API call, the API returns next set of results. If there are no further - * results, then the continuation token does not contain a value. The value of - * this parameter should not be URL encoded. + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API * - * @param {number} [options.maxResults] The maximum number of results to be - * returned as part of the paged queries. This parameter defines the upper - * bound on the number of results returned. The results returned can be less - * than the specified maximum results if they do not fit in the message as per - * the max message size restrictions defined in the configuration. If this - * parameter is zero or not specified, the paged query includes as many results - * as possible that fit in the return message. + * @param {boolean} force Indicates whether to gracefully roll back and clean + * up internal system state modified by executing the user-induced operation. + * + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -63644,7 +61745,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {PagedBackupConfigurationInfoList} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -63652,15 +61753,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PagedBackupConfigurationInfoList} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getApplicationBackupConfigurationInfo(applicationId, options, optionalCallback) { + cancelOperation(operationId, force, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -63669,85 +61768,83 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getApplicationBackupConfigurationInfo(applicationId, options, (err, result, request, response) => { + self._cancelOperation(operationId, force, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getApplicationBackupConfigurationInfo(applicationId, options, optionalCallback); + return self._cancelOperation(operationId, force, options, optionalCallback); } } /** - * @summary Gets the list of backups available for every partition in this - * application. + * @summary Creates a backup policy. * - * Returns a list of backups available for every partition in this Service - * Fabric application. The server enumerates all the backups available at the - * backup location configured in the backup policy. It also allows filtering of - * the result based on start and end datetime or just fetching the latest - * available backup for every partition. + * Creates a backup policy which can be associated later with a Service Fabric + * application, service or a partition for periodic backup. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. + * @param {object} backupPolicyDescription Describes the backup policy. * - * @param {object} [options] Optional Parameters. + * @param {string} backupPolicyDescription.name The unique name identifying + * this backup policy. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. + * @param {boolean} backupPolicyDescription.autoRestoreOnDataLoss Specifies + * whether to trigger restore automatically using the latest available backup + * in case the partition experiences a data loss event. * - * @param {boolean} [options.latest] Specifies whether to get only the most - * recent backup available for a partition for the specified time range. + * @param {number} backupPolicyDescription.maxIncrementalBackups Defines the + * maximum number of incremental backups to be taken between two full backups. + * This is just the upper limit. A full backup may be taken before specified + * number of incremental backups are completed in one of the following + * conditions + * - The replica has never taken a full backup since it has become primary, + * - Some of the log records since the last backup has been truncated, or + * - Replica passed the MaxAccumulatedBackupLogSizeInMB limit. * - * @param {date} [options.startDateTimeFilter] Specify the start date time from - * which to enumerate backups, in datetime format. The date time must be - * specified in ISO8601 format. This is an optional parameter. If not - * specified, all backups from the beginning are enumerated. + * @param {object} backupPolicyDescription.schedule Describes the backup + * schedule parameters. * - * @param {date} [options.endDateTimeFilter] Specify the end date time till - * which to enumerate backups, in datetime format. The date time must be - * specified in ISO8601 format. This is an optional parameter. If not - * specified, enumeration is done till the most recent backup. + * @param {string} backupPolicyDescription.schedule.scheduleKind Polymorphic + * Discriminator * - * @param {string} [options.continuationToken] The continuation token parameter - * is used to obtain next set of results. A continuation token with a non-empty - * value is included in the response of the API when the results from the - * system do not fit in a single response. When this value is passed to the - * next API call, the API returns next set of results. If there are no further - * results, then the continuation token does not contain a value. The value of - * this parameter should not be URL encoded. + * @param {object} backupPolicyDescription.storage Describes the details of + * backup storage where to store the periodic backups. * - * @param {number} [options.maxResults] The maximum number of results to be - * returned as part of the paged queries. This parameter defines the upper - * bound on the number of results returned. The results returned can be less - * than the specified maximum results if they do not fit in the message as per - * the max message size restrictions defined in the configuration. If this - * parameter is zero or not specified, the paged query includes as many results - * as possible that fit in the return message. + * @param {string} [backupPolicyDescription.storage.friendlyName] Friendly name + * for this backup storage. + * + * @param {string} backupPolicyDescription.storage.storageKind Polymorphic + * Discriminator + * + * @param {object} [backupPolicyDescription.retentionPolicy] Describes the + * policy to retain backups in storage. + * + * @param {string} backupPolicyDescription.retentionPolicy.retentionPolicyType + * Polymorphic Discriminator + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getApplicationBackupListWithHttpOperationResponse(applicationId, options) { + createBackupPolicyWithHttpOperationResponse(backupPolicyDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getApplicationBackupList(applicationId, options, (err, result, request, response) => { + self._createBackupPolicy(backupPolicyDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -63758,58 +61855,56 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the list of backups available for every partition in this - * application. + * @summary Creates a backup policy. * - * Returns a list of backups available for every partition in this Service - * Fabric application. The server enumerates all the backups available at the - * backup location configured in the backup policy. It also allows filtering of - * the result based on start and end datetime or just fetching the latest - * available backup for every partition. + * Creates a backup policy which can be associated later with a Service Fabric + * application, service or a partition for periodic backup. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. + * @param {object} backupPolicyDescription Describes the backup policy. * - * @param {object} [options] Optional Parameters. + * @param {string} backupPolicyDescription.name The unique name identifying + * this backup policy. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. + * @param {boolean} backupPolicyDescription.autoRestoreOnDataLoss Specifies + * whether to trigger restore automatically using the latest available backup + * in case the partition experiences a data loss event. * - * @param {boolean} [options.latest] Specifies whether to get only the most - * recent backup available for a partition for the specified time range. + * @param {number} backupPolicyDescription.maxIncrementalBackups Defines the + * maximum number of incremental backups to be taken between two full backups. + * This is just the upper limit. A full backup may be taken before specified + * number of incremental backups are completed in one of the following + * conditions + * - The replica has never taken a full backup since it has become primary, + * - Some of the log records since the last backup has been truncated, or + * - Replica passed the MaxAccumulatedBackupLogSizeInMB limit. * - * @param {date} [options.startDateTimeFilter] Specify the start date time from - * which to enumerate backups, in datetime format. The date time must be - * specified in ISO8601 format. This is an optional parameter. If not - * specified, all backups from the beginning are enumerated. + * @param {object} backupPolicyDescription.schedule Describes the backup + * schedule parameters. * - * @param {date} [options.endDateTimeFilter] Specify the end date time till - * which to enumerate backups, in datetime format. The date time must be - * specified in ISO8601 format. This is an optional parameter. If not - * specified, enumeration is done till the most recent backup. + * @param {string} backupPolicyDescription.schedule.scheduleKind Polymorphic + * Discriminator * - * @param {string} [options.continuationToken] The continuation token parameter - * is used to obtain next set of results. A continuation token with a non-empty - * value is included in the response of the API when the results from the - * system do not fit in a single response. When this value is passed to the - * next API call, the API returns next set of results. If there are no further - * results, then the continuation token does not contain a value. The value of - * this parameter should not be URL encoded. + * @param {object} backupPolicyDescription.storage Describes the details of + * backup storage where to store the periodic backups. * - * @param {number} [options.maxResults] The maximum number of results to be - * returned as part of the paged queries. This parameter defines the upper - * bound on the number of results returned. The results returned can be less - * than the specified maximum results if they do not fit in the message as per - * the max message size restrictions defined in the configuration. If this - * parameter is zero or not specified, the paged query includes as many results - * as possible that fit in the return message. + * @param {string} [backupPolicyDescription.storage.friendlyName] Friendly name + * for this backup storage. + * + * @param {string} backupPolicyDescription.storage.storageKind Polymorphic + * Discriminator + * + * @param {object} [backupPolicyDescription.retentionPolicy] Describes the + * policy to retain backups in storage. + * + * @param {string} backupPolicyDescription.retentionPolicy.retentionPolicyType + * Polymorphic Discriminator + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -63821,7 +61916,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {PagedBackupInfoList} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -63829,14 +61924,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PagedBackupInfoList} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getApplicationBackupList(applicationId, options, optionalCallback) { + createBackupPolicy(backupPolicyDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -63845,33 +61939,26 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getApplicationBackupList(applicationId, options, (err, result, request, response) => { + self._createBackupPolicy(backupPolicyDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getApplicationBackupList(applicationId, options, optionalCallback); + return self._createBackupPolicy(backupPolicyDescription, options, optionalCallback); } } /** - * @summary Suspends periodic backup for the specified Service Fabric - * application. + * @summary Deletes the backup policy. * - * The application which is configured to take periodic backups, is suspended - * for taking further backups till it is resumed again. This operation applies - * to the entire application's hierarchy. It means all the services and - * partitions under this application are now suspended for backup. + * Deletes an existing backup policy. A backup policy must be created before it + * can be deleted. A currently active backup policy, associated with any + * Service Fabric application, service or partition, cannot be deleted without + * first deleting the mapping. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. + * @param {string} backupPolicyName The name of the backup policy. * * @param {object} [options] Optional Parameters. * @@ -63889,11 +61976,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - suspendApplicationBackupWithHttpOperationResponse(applicationId, options) { + deleteBackupPolicyWithHttpOperationResponse(backupPolicyName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._suspendApplicationBackup(applicationId, options, (err, result, request, response) => { + self._deleteBackupPolicy(backupPolicyName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -63904,21 +61991,14 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Suspends periodic backup for the specified Service Fabric - * application. + * @summary Deletes the backup policy. * - * The application which is configured to take periodic backups, is suspended - * for taking further backups till it is resumed again. This operation applies - * to the entire application's hierarchy. It means all the services and - * partitions under this application are now suspended for backup. + * Deletes an existing backup policy. A backup policy must be created before it + * can be deleted. A currently active backup policy, associated with any + * Service Fabric application, service or partition, cannot be deleted without + * first deleting the mapping. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. + * @param {string} backupPolicyName The name of the backup policy. * * @param {object} [options] Optional Parameters. * @@ -63951,7 +62031,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - suspendApplicationBackup(applicationId, options, optionalCallback) { + deleteBackupPolicy(backupPolicyName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -63960,34 +62040,40 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._suspendApplicationBackup(applicationId, options, (err, result, request, response) => { + self._deleteBackupPolicy(backupPolicyName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._suspendApplicationBackup(applicationId, options, optionalCallback); + return self._deleteBackupPolicy(backupPolicyName, options, optionalCallback); } } /** - * @summary Resumes periodic backup of a Service Fabric application which was - * previously suspended. - * - * The previously suspended Service Fabric application resumes taking periodic - * backup as per the backup policy currently configured for the same. + * @summary Gets all the backup policies configured. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. + * Get a list of all the backup policies configured. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.continuationToken] The continuation token parameter + * is used to obtain next set of results. A continuation token with a non-empty + * value is included in the response of the API when the results from the + * system do not fit in a single response. When this value is passed to the + * next API call, the API returns next set of results. If there are no further + * results, then the continuation token does not contain a value. The value of + * this parameter should not be URL encoded. + * + * @param {number} [options.maxResults] The maximum number of results to be + * returned as part of the paged queries. This parameter defines the upper + * bound on the number of results returned. The results returned can be less + * than the specified maximum results if they do not fit in the message as per + * the max message size restrictions defined in the configuration. If this + * parameter is zero or not specified, the paged query includes as many results + * as possible that fit in the return message. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -63998,15 +62084,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - resumeApplicationBackupWithHttpOperationResponse(applicationId, options) { + getBackupPolicyListWithHttpOperationResponse(options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._resumeApplicationBackup(applicationId, options, (err, result, request, response) => { + self._getBackupPolicyList(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -64017,22 +62103,28 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Resumes periodic backup of a Service Fabric application which was - * previously suspended. - * - * The previously suspended Service Fabric application resumes taking periodic - * backup as per the backup policy currently configured for the same. + * @summary Gets all the backup policies configured. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. + * Get a list of all the backup policies configured. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.continuationToken] The continuation token parameter + * is used to obtain next set of results. A continuation token with a non-empty + * value is included in the response of the API when the results from the + * system do not fit in a single response. When this value is passed to the + * next API call, the API returns next set of results. If there are no further + * results, then the continuation token does not contain a value. The value of + * this parameter should not be URL encoded. + * + * @param {number} [options.maxResults] The maximum number of results to be + * returned as part of the paged queries. This parameter defines the upper + * bound on the number of results returned. The results returned can be less + * than the specified maximum results if they do not fit in the message as per + * the max message size restrictions defined in the configuration. If this + * parameter is zero or not specified, the paged query includes as many results + * as possible that fit in the return message. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -64048,7 +62140,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {PagedBackupPolicyDescriptionList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -64056,13 +62148,15 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedBackupPolicyDescriptionList} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - resumeApplicationBackup(applicationId, options, optionalCallback) { + getBackupPolicyList(options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -64071,43 +62165,23 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._resumeApplicationBackup(applicationId, options, (err, result, request, response) => { + self._getBackupPolicyList(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._resumeApplicationBackup(applicationId, options, optionalCallback); + return self._getBackupPolicyList(options, optionalCallback); } } /** - * @summary Enables periodic backup of stateful partitions under this Service - * Fabric service. - * - * Enables periodic backup of stateful partitions which are part of this - * Service Fabric service. Each partition is backed up individually as per the - * specified backup policy description. In case the application, which the - * service is part of, is already enabled for backup then this operation would - * override the policy being used to take the periodic backup for this service - * and its partitions (unless explicitly overridden at the partition level). - * Note only C# based Reliable Actor and Reliable Stateful services are - * currently supported for periodic backup. - * - * @param {string} serviceId The identity of the service. This ID is typically - * the full name of the service without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the service name is "fabric:/myapp/app1/svc1", the service - * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in - * previous versions. + * @summary Gets a particular backup policy by name. * - * @param {object} enableBackupDescription Specifies the parameters for - * enabling backup. + * Gets a particular backup policy identified by {backupPolicyName} * - * @param {string} enableBackupDescription.backupPolicyName Name of the backup - * policy to be used for enabling periodic backups. + * @param {string} backupPolicyName The name of the backup policy. * * @param {object} [options] Optional Parameters. * @@ -64121,15 +62195,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - enableServiceBackupWithHttpOperationResponse(serviceId, enableBackupDescription, options) { + getBackupPolicyByNameWithHttpOperationResponse(backupPolicyName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._enableServiceBackup(serviceId, enableBackupDescription, options, (err, result, request, response) => { + self._getBackupPolicyByName(backupPolicyName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -64140,31 +62214,11 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Enables periodic backup of stateful partitions under this Service - * Fabric service. - * - * Enables periodic backup of stateful partitions which are part of this - * Service Fabric service. Each partition is backed up individually as per the - * specified backup policy description. In case the application, which the - * service is part of, is already enabled for backup then this operation would - * override the policy being used to take the periodic backup for this service - * and its partitions (unless explicitly overridden at the partition level). - * Note only C# based Reliable Actor and Reliable Stateful services are - * currently supported for periodic backup. - * - * @param {string} serviceId The identity of the service. This ID is typically - * the full name of the service without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the service name is "fabric:/myapp/app1/svc1", the service - * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in - * previous versions. + * @summary Gets a particular backup policy by name. * - * @param {object} enableBackupDescription Specifies the parameters for - * enabling backup. + * Gets a particular backup policy identified by {backupPolicyName} * - * @param {string} enableBackupDescription.backupPolicyName Name of the backup - * policy to be used for enabling periodic backups. + * @param {string} backupPolicyName The name of the backup policy. * * @param {object} [options] Optional Parameters. * @@ -64183,7 +62237,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {BackupPolicyDescription} - The deserialized result object. * * @reject {Error} - The error object. * @@ -64191,13 +62245,15 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link BackupPolicyDescription} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - enableServiceBackup(serviceId, enableBackupDescription, options, optionalCallback) { + getBackupPolicyByName(backupPolicyName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -64206,37 +62262,44 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._enableServiceBackup(serviceId, enableBackupDescription, options, (err, result, request, response) => { + self._getBackupPolicyByName(backupPolicyName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._enableServiceBackup(serviceId, enableBackupDescription, options, optionalCallback); + return self._getBackupPolicyByName(backupPolicyName, options, optionalCallback); } } /** - * @summary Disables periodic backup of Service Fabric service which was - * previously enabled. + * @summary Gets the list of backup entities that are associated with this + * policy. * - * Disables periodic backup of Service Fabric service which was previously - * enabled. Backup must be explicitly enabled before it can be disabled. - * In case the backup is enabled for the Service Fabric application, which this - * service is part of, this service would continue to be periodically backed up - * as per the policy mapped at the application level. + * Returns a list of Service Fabric application, service or partition which are + * associated with this backup policy. * - * @param {string} serviceId The identity of the service. This ID is typically - * the full name of the service without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the service name is "fabric:/myapp/app1/svc1", the service - * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in - * previous versions. + * @param {string} backupPolicyName The name of the backup policy. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.continuationToken] The continuation token parameter + * is used to obtain next set of results. A continuation token with a non-empty + * value is included in the response of the API when the results from the + * system do not fit in a single response. When this value is passed to the + * next API call, the API returns next set of results. If there are no further + * results, then the continuation token does not contain a value. The value of + * this parameter should not be URL encoded. + * + * @param {number} [options.maxResults] The maximum number of results to be + * returned as part of the paged queries. This parameter defines the upper + * bound on the number of results returned. The results returned can be less + * than the specified maximum results if they do not fit in the message as per + * the max message size restrictions defined in the configuration. If this + * parameter is zero or not specified, the paged query includes as many results + * as possible that fit in the return message. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -64247,15 +62310,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - disableServiceBackupWithHttpOperationResponse(serviceId, options) { + getAllEntitiesBackedUpByPolicyWithHttpOperationResponse(backupPolicyName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._disableServiceBackup(serviceId, options, (err, result, request, response) => { + self._getAllEntitiesBackedUpByPolicy(backupPolicyName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -64266,25 +62329,32 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Disables periodic backup of Service Fabric service which was - * previously enabled. + * @summary Gets the list of backup entities that are associated with this + * policy. * - * Disables periodic backup of Service Fabric service which was previously - * enabled. Backup must be explicitly enabled before it can be disabled. - * In case the backup is enabled for the Service Fabric application, which this - * service is part of, this service would continue to be periodically backed up - * as per the policy mapped at the application level. + * Returns a list of Service Fabric application, service or partition which are + * associated with this backup policy. * - * @param {string} serviceId The identity of the service. This ID is typically - * the full name of the service without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the service name is "fabric:/myapp/app1/svc1", the service - * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in - * previous versions. + * @param {string} backupPolicyName The name of the backup policy. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.continuationToken] The continuation token parameter + * is used to obtain next set of results. A continuation token with a non-empty + * value is included in the response of the API when the results from the + * system do not fit in a single response. When this value is passed to the + * next API call, the API returns next set of results. If there are no further + * results, then the continuation token does not contain a value. The value of + * this parameter should not be URL encoded. + * + * @param {number} [options.maxResults] The maximum number of results to be + * returned as part of the paged queries. This parameter defines the upper + * bound on the number of results returned. The results returned can be less + * than the specified maximum results if they do not fit in the message as per + * the max message size restrictions defined in the configuration. If this + * parameter is zero or not specified, the paged query includes as many results + * as possible that fit in the return message. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -64300,7 +62370,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {PagedBackupEntityList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -64308,13 +62378,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedBackupEntityList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - disableServiceBackup(serviceId, options, optionalCallback) { + getAllEntitiesBackedUpByPolicy(backupPolicyName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -64323,48 +62394,64 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._disableServiceBackup(serviceId, options, (err, result, request, response) => { + self._getAllEntitiesBackedUpByPolicy(backupPolicyName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._disableServiceBackup(serviceId, options, optionalCallback); + return self._getAllEntitiesBackedUpByPolicy(backupPolicyName, options, optionalCallback); } } /** - * @summary Gets the Service Fabric service backup configuration information. + * @summary Updates the backup policy. * - * Gets the Service Fabric backup configuration information for the service and - * the partitions under this service. + * Updates the backup policy identified by {backupPolicyName} * - * @param {string} serviceId The identity of the service. This ID is typically - * the full name of the service without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the service name is "fabric:/myapp/app1/svc1", the service - * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in - * previous versions. + * @param {object} backupPolicyDescription Describes the backup policy. * - * @param {object} [options] Optional Parameters. + * @param {string} backupPolicyDescription.name The unique name identifying + * this backup policy. * - * @param {string} [options.continuationToken] The continuation token parameter - * is used to obtain next set of results. A continuation token with a non-empty - * value is included in the response of the API when the results from the - * system do not fit in a single response. When this value is passed to the - * next API call, the API returns next set of results. If there are no further - * results, then the continuation token does not contain a value. The value of - * this parameter should not be URL encoded. + * @param {boolean} backupPolicyDescription.autoRestoreOnDataLoss Specifies + * whether to trigger restore automatically using the latest available backup + * in case the partition experiences a data loss event. * - * @param {number} [options.maxResults] The maximum number of results to be - * returned as part of the paged queries. This parameter defines the upper - * bound on the number of results returned. The results returned can be less - * than the specified maximum results if they do not fit in the message as per - * the max message size restrictions defined in the configuration. If this - * parameter is zero or not specified, the paged query includes as many results - * as possible that fit in the return message. + * @param {number} backupPolicyDescription.maxIncrementalBackups Defines the + * maximum number of incremental backups to be taken between two full backups. + * This is just the upper limit. A full backup may be taken before specified + * number of incremental backups are completed in one of the following + * conditions + * - The replica has never taken a full backup since it has become primary, + * - Some of the log records since the last backup has been truncated, or + * - Replica passed the MaxAccumulatedBackupLogSizeInMB limit. + * + * @param {object} backupPolicyDescription.schedule Describes the backup + * schedule parameters. + * + * @param {string} backupPolicyDescription.schedule.scheduleKind Polymorphic + * Discriminator + * + * @param {object} backupPolicyDescription.storage Describes the details of + * backup storage where to store the periodic backups. + * + * @param {string} [backupPolicyDescription.storage.friendlyName] Friendly name + * for this backup storage. + * + * @param {string} backupPolicyDescription.storage.storageKind Polymorphic + * Discriminator + * + * @param {object} [backupPolicyDescription.retentionPolicy] Describes the + * policy to retain backups in storage. + * + * @param {string} backupPolicyDescription.retentionPolicy.retentionPolicyType + * Polymorphic Discriminator + * + * @param {string} backupPolicyName The name of the backup policy. + * + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -64376,15 +62463,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getServiceBackupConfigurationInfoWithHttpOperationResponse(serviceId, options) { + updateBackupPolicyWithHttpOperationResponse(backupPolicyDescription, backupPolicyName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getServiceBackupConfigurationInfo(serviceId, options, (err, result, request, response) => { + self._updateBackupPolicy(backupPolicyDescription, backupPolicyName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -64395,36 +62482,52 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the Service Fabric service backup configuration information. + * @summary Updates the backup policy. * - * Gets the Service Fabric backup configuration information for the service and - * the partitions under this service. + * Updates the backup policy identified by {backupPolicyName} * - * @param {string} serviceId The identity of the service. This ID is typically - * the full name of the service without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the service name is "fabric:/myapp/app1/svc1", the service - * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in - * previous versions. + * @param {object} backupPolicyDescription Describes the backup policy. * - * @param {object} [options] Optional Parameters. + * @param {string} backupPolicyDescription.name The unique name identifying + * this backup policy. * - * @param {string} [options.continuationToken] The continuation token parameter - * is used to obtain next set of results. A continuation token with a non-empty - * value is included in the response of the API when the results from the - * system do not fit in a single response. When this value is passed to the - * next API call, the API returns next set of results. If there are no further - * results, then the continuation token does not contain a value. The value of - * this parameter should not be URL encoded. + * @param {boolean} backupPolicyDescription.autoRestoreOnDataLoss Specifies + * whether to trigger restore automatically using the latest available backup + * in case the partition experiences a data loss event. * - * @param {number} [options.maxResults] The maximum number of results to be - * returned as part of the paged queries. This parameter defines the upper - * bound on the number of results returned. The results returned can be less - * than the specified maximum results if they do not fit in the message as per - * the max message size restrictions defined in the configuration. If this - * parameter is zero or not specified, the paged query includes as many results - * as possible that fit in the return message. + * @param {number} backupPolicyDescription.maxIncrementalBackups Defines the + * maximum number of incremental backups to be taken between two full backups. + * This is just the upper limit. A full backup may be taken before specified + * number of incremental backups are completed in one of the following + * conditions + * - The replica has never taken a full backup since it has become primary, + * - Some of the log records since the last backup has been truncated, or + * - Replica passed the MaxAccumulatedBackupLogSizeInMB limit. + * + * @param {object} backupPolicyDescription.schedule Describes the backup + * schedule parameters. + * + * @param {string} backupPolicyDescription.schedule.scheduleKind Polymorphic + * Discriminator + * + * @param {object} backupPolicyDescription.storage Describes the details of + * backup storage where to store the periodic backups. + * + * @param {string} [backupPolicyDescription.storage.friendlyName] Friendly name + * for this backup storage. + * + * @param {string} backupPolicyDescription.storage.storageKind Polymorphic + * Discriminator + * + * @param {object} [backupPolicyDescription.retentionPolicy] Describes the + * policy to retain backups in storage. + * + * @param {string} backupPolicyDescription.retentionPolicy.retentionPolicyType + * Polymorphic Discriminator + * + * @param {string} backupPolicyName The name of the backup policy. + * + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -64441,7 +62544,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {PagedBackupConfigurationInfoList} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -64449,15 +62552,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PagedBackupConfigurationInfoList} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getServiceBackupConfigurationInfo(serviceId, options, optionalCallback) { + updateBackupPolicy(backupPolicyDescription, backupPolicyName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -64466,35 +62567,41 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getServiceBackupConfigurationInfo(serviceId, options, (err, result, request, response) => { + self._updateBackupPolicy(backupPolicyDescription, backupPolicyName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getServiceBackupConfigurationInfo(serviceId, options, optionalCallback); + return self._updateBackupPolicy(backupPolicyDescription, backupPolicyName, options, optionalCallback); } } /** - * @summary Gets the list of backups available for every partition in this - * service. + * @summary Enables periodic backup of stateful partitions under this Service + * Fabric application. * - * Returns a list of backups available for every partition in this Service - * Fabric service. The server enumerates all the backups available in the - * backup store configured in the backup policy. It also allows filtering of - * the result based on start and end datetime or just fetching the latest - * available backup for every partition. + * Enables periodic backup of stateful partitions which are part of this + * Service Fabric application. Each partition is backed up individually as per + * the specified backup policy description. + * Note only C# based Reliable Actor and Reliable Stateful services are + * currently supported for periodic backup. * - * @param {string} serviceId The identity of the service. This ID is typically - * the full name of the service without the 'fabric:' URI scheme. + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" * character. - * For example, if the service name is "fabric:/myapp/app1/svc1", the service - * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * + * @param {object} enableBackupDescription Specifies the parameters for + * enabling backup. + * + * @param {string} enableBackupDescription.backupPolicyName Name of the backup + * policy to be used for enabling periodic backups. + * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -64502,49 +62609,20 @@ class ServiceFabricClient extends ServiceClient { * client is willing to wait for the requested operation to complete. The * default value for this parameter is 60 seconds. * - * @param {boolean} [options.latest] Specifies whether to get only the most - * recent backup available for a partition for the specified time range. - * - * @param {date} [options.startDateTimeFilter] Specify the start date time from - * which to enumerate backups, in datetime format. The date time must be - * specified in ISO8601 format. This is an optional parameter. If not - * specified, all backups from the beginning are enumerated. - * - * @param {date} [options.endDateTimeFilter] Specify the end date time till - * which to enumerate backups, in datetime format. The date time must be - * specified in ISO8601 format. This is an optional parameter. If not - * specified, enumeration is done till the most recent backup. - * - * @param {string} [options.continuationToken] The continuation token parameter - * is used to obtain next set of results. A continuation token with a non-empty - * value is included in the response of the API when the results from the - * system do not fit in a single response. When this value is passed to the - * next API call, the API returns next set of results. If there are no further - * results, then the continuation token does not contain a value. The value of - * this parameter should not be URL encoded. - * - * @param {number} [options.maxResults] The maximum number of results to be - * returned as part of the paged queries. This parameter defines the upper - * bound on the number of results returned. The results returned can be less - * than the specified maximum results if they do not fit in the message as per - * the max message size restrictions defined in the configuration. If this - * parameter is zero or not specified, the paged query includes as many results - * as possible that fit in the return message. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getServiceBackupListWithHttpOperationResponse(serviceId, options) { + enableApplicationBackupWithHttpOperationResponse(applicationId, enableBackupDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getServiceBackupList(serviceId, options, (err, result, request, response) => { + self._enableApplicationBackup(applicationId, enableBackupDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -64555,23 +62633,29 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the list of backups available for every partition in this - * service. + * @summary Enables periodic backup of stateful partitions under this Service + * Fabric application. * - * Returns a list of backups available for every partition in this Service - * Fabric service. The server enumerates all the backups available in the - * backup store configured in the backup policy. It also allows filtering of - * the result based on start and end datetime or just fetching the latest - * available backup for every partition. + * Enables periodic backup of stateful partitions which are part of this + * Service Fabric application. Each partition is backed up individually as per + * the specified backup policy description. + * Note only C# based Reliable Actor and Reliable Stateful services are + * currently supported for periodic backup. * - * @param {string} serviceId The identity of the service. This ID is typically - * the full name of the service without the 'fabric:' URI scheme. + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" * character. - * For example, if the service name is "fabric:/myapp/app1/svc1", the service - * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * + * @param {object} enableBackupDescription Specifies the parameters for + * enabling backup. + * + * @param {string} enableBackupDescription.backupPolicyName Name of the backup + * policy to be used for enabling periodic backups. + * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -64579,35 +62663,6 @@ class ServiceFabricClient extends ServiceClient { * client is willing to wait for the requested operation to complete. The * default value for this parameter is 60 seconds. * - * @param {boolean} [options.latest] Specifies whether to get only the most - * recent backup available for a partition for the specified time range. - * - * @param {date} [options.startDateTimeFilter] Specify the start date time from - * which to enumerate backups, in datetime format. The date time must be - * specified in ISO8601 format. This is an optional parameter. If not - * specified, all backups from the beginning are enumerated. - * - * @param {date} [options.endDateTimeFilter] Specify the end date time till - * which to enumerate backups, in datetime format. The date time must be - * specified in ISO8601 format. This is an optional parameter. If not - * specified, enumeration is done till the most recent backup. - * - * @param {string} [options.continuationToken] The continuation token parameter - * is used to obtain next set of results. A continuation token with a non-empty - * value is included in the response of the API when the results from the - * system do not fit in a single response. When this value is passed to the - * next API call, the API returns next set of results. If there are no further - * results, then the continuation token does not contain a value. The value of - * this parameter should not be URL encoded. - * - * @param {number} [options.maxResults] The maximum number of results to be - * returned as part of the paged queries. This parameter defines the upper - * bound on the number of results returned. The results returned can be less - * than the specified maximum results if they do not fit in the message as per - * the max message size restrictions defined in the configuration. If this - * parameter is zero or not specified, the paged query includes as many results - * as possible that fit in the return message. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -64618,7 +62673,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {PagedBackupInfoList} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -64626,14 +62681,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PagedBackupInfoList} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getServiceBackupList(serviceId, options, optionalCallback) { + enableApplicationBackup(applicationId, enableBackupDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -64642,31 +62696,29 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getServiceBackupList(serviceId, options, (err, result, request, response) => { + self._enableApplicationBackup(applicationId, enableBackupDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getServiceBackupList(serviceId, options, optionalCallback); + return self._enableApplicationBackup(applicationId, enableBackupDescription, options, optionalCallback); } } /** - * @summary Suspends periodic backup for the specified Service Fabric service. + * @summary Disables periodic backup of Service Fabric application. * - * The service which is configured to take periodic backups, is suspended for - * taking further backups till it is resumed again. This operation applies to - * the entire service's hierarchy. It means all the partitions under this - * service are now suspended for backup. + * Disables periodic backup of Service Fabric application which was previously + * enabled. * - * @param {string} serviceId The identity of the service. This ID is typically - * the full name of the service without the 'fabric:' URI scheme. + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" * character. - * For example, if the service name is "fabric:/myapp/app1/svc1", the service - * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * * @param {object} [options] Optional Parameters. @@ -64676,6 +62728,13 @@ class ServiceFabricClient extends ServiceClient { * client is willing to wait for the requested operation to complete. The * default value for this parameter is 60 seconds. * + * @param {object} [options.disableBackupDescription] Specifies the parameters + * to disable backup for any backup entity. + * + * @param {boolean} options.disableBackupDescription.cleanBackup Boolean flag + * to delete backups. It can be set to true for deleting all the backups which + * were created for the backup entity that is getting disabled for backup. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -64685,11 +62744,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - suspendServiceBackupWithHttpOperationResponse(serviceId, options) { + disableApplicationBackupWithHttpOperationResponse(applicationId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._suspendServiceBackup(serviceId, options, (err, result, request, response) => { + self._disableApplicationBackup(applicationId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -64700,19 +62759,17 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Suspends periodic backup for the specified Service Fabric service. + * @summary Disables periodic backup of Service Fabric application. * - * The service which is configured to take periodic backups, is suspended for - * taking further backups till it is resumed again. This operation applies to - * the entire service's hierarchy. It means all the partitions under this - * service are now suspended for backup. + * Disables periodic backup of Service Fabric application which was previously + * enabled. * - * @param {string} serviceId The identity of the service. This ID is typically - * the full name of the service without the 'fabric:' URI scheme. + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" * character. - * For example, if the service name is "fabric:/myapp/app1/svc1", the service - * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * * @param {object} [options] Optional Parameters. @@ -64722,6 +62779,13 @@ class ServiceFabricClient extends ServiceClient { * client is willing to wait for the requested operation to complete. The * default value for this parameter is 60 seconds. * + * @param {object} [options.disableBackupDescription] Specifies the parameters + * to disable backup for any backup entity. + * + * @param {boolean} options.disableBackupDescription.cleanBackup Boolean flag + * to delete backups. It can be set to true for deleting all the backups which + * were created for the backup entity that is getting disabled for backup. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -64746,7 +62810,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - suspendServiceBackup(serviceId, options, optionalCallback) { + disableApplicationBackup(applicationId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -64755,34 +62819,50 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._suspendServiceBackup(serviceId, options, (err, result, request, response) => { + self._disableApplicationBackup(applicationId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._suspendServiceBackup(serviceId, options, optionalCallback); + return self._disableApplicationBackup(applicationId, options, optionalCallback); } } /** - * @summary Resumes periodic backup of a Service Fabric service which was - * previously suspended. + * @summary Gets the Service Fabric application backup configuration + * information. * - * The previously suspended Service Fabric service resumes taking periodic - * backup as per the backup policy currently configured for the same. + * Gets the Service Fabric backup configuration information for the application + * and the services and partitions under this application. * - * @param {string} serviceId The identity of the service. This ID is typically - * the full name of the service without the 'fabric:' URI scheme. + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" * character. - * For example, if the service name is "fabric:/myapp/app1/svc1", the service - * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.continuationToken] The continuation token parameter + * is used to obtain next set of results. A continuation token with a non-empty + * value is included in the response of the API when the results from the + * system do not fit in a single response. When this value is passed to the + * next API call, the API returns next set of results. If there are no further + * results, then the continuation token does not contain a value. The value of + * this parameter should not be URL encoded. + * + * @param {number} [options.maxResults] The maximum number of results to be + * returned as part of the paged queries. This parameter defines the upper + * bound on the number of results returned. The results returned can be less + * than the specified maximum results if they do not fit in the message as per + * the max message size restrictions defined in the configuration. If this + * parameter is zero or not specified, the paged query includes as many results + * as possible that fit in the return message. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -64793,15 +62873,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - resumeServiceBackupWithHttpOperationResponse(serviceId, options) { + getApplicationBackupConfigurationInfoWithHttpOperationResponse(applicationId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._resumeServiceBackup(serviceId, options, (err, result, request, response) => { + self._getApplicationBackupConfigurationInfo(applicationId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -64812,22 +62892,38 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Resumes periodic backup of a Service Fabric service which was - * previously suspended. + * @summary Gets the Service Fabric application backup configuration + * information. * - * The previously suspended Service Fabric service resumes taking periodic - * backup as per the backup policy currently configured for the same. + * Gets the Service Fabric backup configuration information for the application + * and the services and partitions under this application. * - * @param {string} serviceId The identity of the service. This ID is typically - * the full name of the service without the 'fabric:' URI scheme. + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" * character. - * For example, if the service name is "fabric:/myapp/app1/svc1", the service - * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.continuationToken] The continuation token parameter + * is used to obtain next set of results. A continuation token with a non-empty + * value is included in the response of the API when the results from the + * system do not fit in a single response. When this value is passed to the + * next API call, the API returns next set of results. If there are no further + * results, then the continuation token does not contain a value. The value of + * this parameter should not be URL encoded. + * + * @param {number} [options.maxResults] The maximum number of results to be + * returned as part of the paged queries. This parameter defines the upper + * bound on the number of results returned. The results returned can be less + * than the specified maximum results if they do not fit in the message as per + * the max message size restrictions defined in the configuration. If this + * parameter is zero or not specified, the paged query includes as many results + * as possible that fit in the return message. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -64843,7 +62939,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {PagedBackupConfigurationInfoList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -64851,13 +62947,15 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedBackupConfigurationInfoList} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - resumeServiceBackup(serviceId, options, optionalCallback) { + getApplicationBackupConfigurationInfo(applicationId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -64866,35 +62964,34 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._resumeServiceBackup(serviceId, options, (err, result, request, response) => { + self._getApplicationBackupConfigurationInfo(applicationId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._resumeServiceBackup(serviceId, options, optionalCallback); + return self._getApplicationBackupConfigurationInfo(applicationId, options, optionalCallback); } } /** - * @summary Enables periodic backup of the stateful persisted partition. - * - * Enables periodic backup of stateful persisted partition. Each partition is - * backed up as per the specified backup policy description. In case the - * application or service, which is partition is part of, is already enabled - * for backup then this operation would override the policy being used to take - * the periodic backup of this partition. - * Note only C# based Reliable Actor and Reliable Stateful services are - * currently supported for periodic backup. - * - * @param {uuid} partitionId The identity of the partition. - * - * @param {object} enableBackupDescription Specifies the parameters for - * enabling backup. + * @summary Gets the list of backups available for every partition in this + * application. * - * @param {string} enableBackupDescription.backupPolicyName Name of the backup - * policy to be used for enabling periodic backups. + * Returns a list of backups available for every partition in this Service + * Fabric application. The server enumerates all the backups available at the + * backup location configured in the backup policy. It also allows filtering of + * the result based on start and end datetime or just fetching the latest + * available backup for every partition. + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * previous versions. * * @param {object} [options] Optional Parameters. * @@ -64903,20 +63000,49 @@ class ServiceFabricClient extends ServiceClient { * client is willing to wait for the requested operation to complete. The * default value for this parameter is 60 seconds. * + * @param {boolean} [options.latest] Specifies whether to get only the most + * recent backup available for a partition for the specified time range. + * + * @param {date} [options.startDateTimeFilter] Specify the start date time from + * which to enumerate backups, in datetime format. The date time must be + * specified in ISO8601 format. This is an optional parameter. If not + * specified, all backups from the beginning are enumerated. + * + * @param {date} [options.endDateTimeFilter] Specify the end date time till + * which to enumerate backups, in datetime format. The date time must be + * specified in ISO8601 format. This is an optional parameter. If not + * specified, enumeration is done till the most recent backup. + * + * @param {string} [options.continuationToken] The continuation token parameter + * is used to obtain next set of results. A continuation token with a non-empty + * value is included in the response of the API when the results from the + * system do not fit in a single response. When this value is passed to the + * next API call, the API returns next set of results. If there are no further + * results, then the continuation token does not contain a value. The value of + * this parameter should not be URL encoded. + * + * @param {number} [options.maxResults] The maximum number of results to be + * returned as part of the paged queries. This parameter defines the upper + * bound on the number of results returned. The results returned can be less + * than the specified maximum results if they do not fit in the message as per + * the max message size restrictions defined in the configuration. If this + * parameter is zero or not specified, the paged query includes as many results + * as possible that fit in the return message. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - enablePartitionBackupWithHttpOperationResponse(partitionId, enableBackupDescription, options) { + getApplicationBackupListWithHttpOperationResponse(applicationId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._enablePartitionBackup(partitionId, enableBackupDescription, options, (err, result, request, response) => { + self._getApplicationBackupList(applicationId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -64927,23 +63053,22 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Enables periodic backup of the stateful persisted partition. - * - * Enables periodic backup of stateful persisted partition. Each partition is - * backed up as per the specified backup policy description. In case the - * application or service, which is partition is part of, is already enabled - * for backup then this operation would override the policy being used to take - * the periodic backup of this partition. - * Note only C# based Reliable Actor and Reliable Stateful services are - * currently supported for periodic backup. - * - * @param {uuid} partitionId The identity of the partition. + * @summary Gets the list of backups available for every partition in this + * application. * - * @param {object} enableBackupDescription Specifies the parameters for - * enabling backup. + * Returns a list of backups available for every partition in this Service + * Fabric application. The server enumerates all the backups available at the + * backup location configured in the backup policy. It also allows filtering of + * the result based on start and end datetime or just fetching the latest + * available backup for every partition. * - * @param {string} enableBackupDescription.backupPolicyName Name of the backup - * policy to be used for enabling periodic backups. + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * previous versions. * * @param {object} [options] Optional Parameters. * @@ -64952,6 +63077,35 @@ class ServiceFabricClient extends ServiceClient { * client is willing to wait for the requested operation to complete. The * default value for this parameter is 60 seconds. * + * @param {boolean} [options.latest] Specifies whether to get only the most + * recent backup available for a partition for the specified time range. + * + * @param {date} [options.startDateTimeFilter] Specify the start date time from + * which to enumerate backups, in datetime format. The date time must be + * specified in ISO8601 format. This is an optional parameter. If not + * specified, all backups from the beginning are enumerated. + * + * @param {date} [options.endDateTimeFilter] Specify the end date time till + * which to enumerate backups, in datetime format. The date time must be + * specified in ISO8601 format. This is an optional parameter. If not + * specified, enumeration is done till the most recent backup. + * + * @param {string} [options.continuationToken] The continuation token parameter + * is used to obtain next set of results. A continuation token with a non-empty + * value is included in the response of the API when the results from the + * system do not fit in a single response. When this value is passed to the + * next API call, the API returns next set of results. If there are no further + * results, then the continuation token does not contain a value. The value of + * this parameter should not be URL encoded. + * + * @param {number} [options.maxResults] The maximum number of results to be + * returned as part of the paged queries. This parameter defines the upper + * bound on the number of results returned. The results returned can be less + * than the specified maximum results if they do not fit in the message as per + * the max message size restrictions defined in the configuration. If this + * parameter is zero or not specified, the paged query includes as many results + * as possible that fit in the return message. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -64962,7 +63116,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {PagedBackupInfoList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -64970,13 +63124,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedBackupInfoList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - enablePartitionBackup(partitionId, enableBackupDescription, options, optionalCallback) { + getApplicationBackupList(applicationId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -64985,28 +63140,33 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._enablePartitionBackup(partitionId, enableBackupDescription, options, (err, result, request, response) => { + self._getApplicationBackupList(applicationId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._enablePartitionBackup(partitionId, enableBackupDescription, options, optionalCallback); + return self._getApplicationBackupList(applicationId, options, optionalCallback); } } /** - * @summary Disables periodic backup of Service Fabric partition which was - * previously enabled. + * @summary Suspends periodic backup for the specified Service Fabric + * application. * - * Disables periodic backup of partition which was previously enabled. Backup - * must be explicitly enabled before it can be disabled. - * In case the backup is enabled for the Service Fabric application or service, - * which this partition is part of, this partition would continue to be - * periodically backed up as per the policy mapped at the higher level entity. + * The application which is configured to take periodic backups, is suspended + * for taking further backups till it is resumed again. This operation applies + * to the entire application's hierarchy. It means all the services and + * partitions under this application are now suspended for backup. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * previous versions. * * @param {object} [options] Optional Parameters. * @@ -65024,11 +63184,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - disablePartitionBackupWithHttpOperationResponse(partitionId, options) { + suspendApplicationBackupWithHttpOperationResponse(applicationId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._disablePartitionBackup(partitionId, options, (err, result, request, response) => { + self._suspendApplicationBackup(applicationId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -65039,16 +63199,21 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Disables periodic backup of Service Fabric partition which was - * previously enabled. + * @summary Suspends periodic backup for the specified Service Fabric + * application. * - * Disables periodic backup of partition which was previously enabled. Backup - * must be explicitly enabled before it can be disabled. - * In case the backup is enabled for the Service Fabric application or service, - * which this partition is part of, this partition would continue to be - * periodically backed up as per the policy mapped at the higher level entity. + * The application which is configured to take periodic backups, is suspended + * for taking further backups till it is resumed again. This operation applies + * to the entire application's hierarchy. It means all the services and + * partitions under this application are now suspended for backup. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * previous versions. * * @param {object} [options] Optional Parameters. * @@ -65081,7 +63246,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - disablePartitionBackup(partitionId, options, optionalCallback) { + suspendApplicationBackup(applicationId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -65090,24 +63255,31 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._disablePartitionBackup(partitionId, options, (err, result, request, response) => { + self._suspendApplicationBackup(applicationId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._disablePartitionBackup(partitionId, options, optionalCallback); + return self._suspendApplicationBackup(applicationId, options, optionalCallback); } } /** - * @summary Gets the partition backup configuration information + * @summary Resumes periodic backup of a Service Fabric application which was + * previously suspended. * - * Gets the Service Fabric Backup configuration information for the specified - * partition. + * The previously suspended Service Fabric application resumes taking periodic + * backup as per the backup policy currently configured for the same. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * previous versions. * * @param {object} [options] Optional Parameters. * @@ -65121,15 +63293,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getPartitionBackupConfigurationInfoWithHttpOperationResponse(partitionId, options) { + resumeApplicationBackupWithHttpOperationResponse(applicationId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getPartitionBackupConfigurationInfo(partitionId, options, (err, result, request, response) => { + self._resumeApplicationBackup(applicationId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -65140,12 +63312,19 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the partition backup configuration information + * @summary Resumes periodic backup of a Service Fabric application which was + * previously suspended. * - * Gets the Service Fabric Backup configuration information for the specified - * partition. + * The previously suspended Service Fabric application resumes taking periodic + * backup as per the backup policy currently configured for the same. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * previous versions. * * @param {object} [options] Optional Parameters. * @@ -65164,7 +63343,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {PartitionBackupConfigurationInfo} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -65172,15 +63351,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PartitionBackupConfigurationInfo} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getPartitionBackupConfigurationInfo(partitionId, options, optionalCallback) { + resumeApplicationBackup(applicationId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -65189,26 +63366,43 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getPartitionBackupConfigurationInfo(partitionId, options, (err, result, request, response) => { + self._resumeApplicationBackup(applicationId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getPartitionBackupConfigurationInfo(partitionId, options, optionalCallback); + return self._resumeApplicationBackup(applicationId, options, optionalCallback); } } /** - * @summary Gets the list of backups available for the specified partition. + * @summary Enables periodic backup of stateful partitions under this Service + * Fabric service. * - * Returns a list of backups available for the specified partition. The server - * enumerates all the backups available in the backup store configured in the - * backup policy. It also allows filtering of the result based on start and end - * datetime or just fetching the latest available backup for the partition. + * Enables periodic backup of stateful partitions which are part of this + * Service Fabric service. Each partition is backed up individually as per the + * specified backup policy description. In case the application, which the + * service is part of, is already enabled for backup then this operation would + * override the policy being used to take the periodic backup for this service + * and its partitions (unless explicitly overridden at the partition level). + * Note only C# based Reliable Actor and Reliable Stateful services are + * currently supported for periodic backup. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} serviceId The identity of the service. This ID is typically + * the full name of the service without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * previous versions. + * + * @param {object} enableBackupDescription Specifies the parameters for + * enabling backup. + * + * @param {string} enableBackupDescription.backupPolicyName Name of the backup + * policy to be used for enabling periodic backups. * * @param {object} [options] Optional Parameters. * @@ -65217,33 +63411,20 @@ class ServiceFabricClient extends ServiceClient { * client is willing to wait for the requested operation to complete. The * default value for this parameter is 60 seconds. * - * @param {boolean} [options.latest] Specifies whether to get only the most - * recent backup available for a partition for the specified time range. - * - * @param {date} [options.startDateTimeFilter] Specify the start date time from - * which to enumerate backups, in datetime format. The date time must be - * specified in ISO8601 format. This is an optional parameter. If not - * specified, all backups from the beginning are enumerated. - * - * @param {date} [options.endDateTimeFilter] Specify the end date time till - * which to enumerate backups, in datetime format. The date time must be - * specified in ISO8601 format. This is an optional parameter. If not - * specified, enumeration is done till the most recent backup. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getPartitionBackupListWithHttpOperationResponse(partitionId, options) { + enableServiceBackupWithHttpOperationResponse(serviceId, enableBackupDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getPartitionBackupList(partitionId, options, (err, result, request, response) => { + self._enableServiceBackup(serviceId, enableBackupDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -65254,14 +63435,31 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the list of backups available for the specified partition. + * @summary Enables periodic backup of stateful partitions under this Service + * Fabric service. * - * Returns a list of backups available for the specified partition. The server - * enumerates all the backups available in the backup store configured in the - * backup policy. It also allows filtering of the result based on start and end - * datetime or just fetching the latest available backup for the partition. + * Enables periodic backup of stateful partitions which are part of this + * Service Fabric service. Each partition is backed up individually as per the + * specified backup policy description. In case the application, which the + * service is part of, is already enabled for backup then this operation would + * override the policy being used to take the periodic backup for this service + * and its partitions (unless explicitly overridden at the partition level). + * Note only C# based Reliable Actor and Reliable Stateful services are + * currently supported for periodic backup. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} serviceId The identity of the service. This ID is typically + * the full name of the service without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * previous versions. + * + * @param {object} enableBackupDescription Specifies the parameters for + * enabling backup. + * + * @param {string} enableBackupDescription.backupPolicyName Name of the backup + * policy to be used for enabling periodic backups. * * @param {object} [options] Optional Parameters. * @@ -65270,19 +63468,6 @@ class ServiceFabricClient extends ServiceClient { * client is willing to wait for the requested operation to complete. The * default value for this parameter is 60 seconds. * - * @param {boolean} [options.latest] Specifies whether to get only the most - * recent backup available for a partition for the specified time range. - * - * @param {date} [options.startDateTimeFilter] Specify the start date time from - * which to enumerate backups, in datetime format. The date time must be - * specified in ISO8601 format. This is an optional parameter. If not - * specified, all backups from the beginning are enumerated. - * - * @param {date} [options.endDateTimeFilter] Specify the end date time till - * which to enumerate backups, in datetime format. The date time must be - * specified in ISO8601 format. This is an optional parameter. If not - * specified, enumeration is done till the most recent backup. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -65293,7 +63478,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {PagedBackupInfoList} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -65301,14 +63486,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PagedBackupInfoList} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getPartitionBackupList(partitionId, options, optionalCallback) { + enableServiceBackup(serviceId, enableBackupDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -65317,27 +63501,44 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getPartitionBackupList(partitionId, options, (err, result, request, response) => { + self._enableServiceBackup(serviceId, enableBackupDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getPartitionBackupList(partitionId, options, optionalCallback); + return self._enableServiceBackup(serviceId, enableBackupDescription, options, optionalCallback); } } /** - * @summary Suspends periodic backup for the specified partition. + * @summary Disables periodic backup of Service Fabric service which was + * previously enabled. * - * The partition which is configured to take periodic backups, is suspended for - * taking further backups till it is resumed again. + * Disables periodic backup of Service Fabric service which was previously + * enabled. Backup must be explicitly enabled before it can be disabled. + * In case the backup is enabled for the Service Fabric application, which this + * service is part of, this service would continue to be periodically backed up + * as per the policy mapped at the application level. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} serviceId The identity of the service. This ID is typically + * the full name of the service without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * previous versions. * * @param {object} [options] Optional Parameters. * + * @param {object} [options.disableBackupDescription] Specifies the parameters + * to disable backup for any backup entity. + * + * @param {boolean} options.disableBackupDescription.cleanBackup Boolean flag + * to delete backups. It can be set to true for deleting all the backups which + * were created for the backup entity that is getting disabled for backup. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -65352,11 +63553,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - suspendPartitionBackupWithHttpOperationResponse(partitionId, options) { + disableServiceBackupWithHttpOperationResponse(serviceId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._suspendPartitionBackup(partitionId, options, (err, result, request, response) => { + self._disableServiceBackup(serviceId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -65367,15 +63568,32 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Suspends periodic backup for the specified partition. + * @summary Disables periodic backup of Service Fabric service which was + * previously enabled. * - * The partition which is configured to take periodic backups, is suspended for - * taking further backups till it is resumed again. + * Disables periodic backup of Service Fabric service which was previously + * enabled. Backup must be explicitly enabled before it can be disabled. + * In case the backup is enabled for the Service Fabric application, which this + * service is part of, this service would continue to be periodically backed up + * as per the policy mapped at the application level. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} serviceId The identity of the service. This ID is typically + * the full name of the service without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * previous versions. * * @param {object} [options] Optional Parameters. * + * @param {object} [options.disableBackupDescription] Specifies the parameters + * to disable backup for any backup entity. + * + * @param {boolean} options.disableBackupDescription.cleanBackup Boolean flag + * to delete backups. It can be set to true for deleting all the backups which + * were created for the backup entity that is getting disabled for backup. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -65405,7 +63623,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - suspendPartitionBackup(partitionId, options, optionalCallback) { + disableServiceBackup(serviceId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -65414,28 +63632,49 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._suspendPartitionBackup(partitionId, options, (err, result, request, response) => { + self._disableServiceBackup(serviceId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._suspendPartitionBackup(partitionId, options, optionalCallback); + return self._disableServiceBackup(serviceId, options, optionalCallback); } } /** - * @summary Resumes periodic backup of partition which was previously - * suspended. + * @summary Gets the Service Fabric service backup configuration information. * - * The previously suspended partition resumes taking periodic backup as per the - * backup policy currently configured for the same. + * Gets the Service Fabric backup configuration information for the service and + * the partitions under this service. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} serviceId The identity of the service. This ID is typically + * the full name of the service without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * previous versions. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.continuationToken] The continuation token parameter + * is used to obtain next set of results. A continuation token with a non-empty + * value is included in the response of the API when the results from the + * system do not fit in a single response. When this value is passed to the + * next API call, the API returns next set of results. If there are no further + * results, then the continuation token does not contain a value. The value of + * this parameter should not be URL encoded. + * + * @param {number} [options.maxResults] The maximum number of results to be + * returned as part of the paged queries. This parameter defines the upper + * bound on the number of results returned. The results returned can be less + * than the specified maximum results if they do not fit in the message as per + * the max message size restrictions defined in the configuration. If this + * parameter is zero or not specified, the paged query includes as many results + * as possible that fit in the return message. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -65446,15 +63685,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - resumePartitionBackupWithHttpOperationResponse(partitionId, options) { + getServiceBackupConfigurationInfoWithHttpOperationResponse(serviceId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._resumePartitionBackup(partitionId, options, (err, result, request, response) => { + self._getServiceBackupConfigurationInfo(serviceId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -65465,16 +63704,37 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Resumes periodic backup of partition which was previously - * suspended. + * @summary Gets the Service Fabric service backup configuration information. * - * The previously suspended partition resumes taking periodic backup as per the - * backup policy currently configured for the same. + * Gets the Service Fabric backup configuration information for the service and + * the partitions under this service. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} serviceId The identity of the service. This ID is typically + * the full name of the service without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * previous versions. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.continuationToken] The continuation token parameter + * is used to obtain next set of results. A continuation token with a non-empty + * value is included in the response of the API when the results from the + * system do not fit in a single response. When this value is passed to the + * next API call, the API returns next set of results. If there are no further + * results, then the continuation token does not contain a value. The value of + * this parameter should not be URL encoded. + * + * @param {number} [options.maxResults] The maximum number of results to be + * returned as part of the paged queries. This parameter defines the upper + * bound on the number of results returned. The results returned can be less + * than the specified maximum results if they do not fit in the message as per + * the max message size restrictions defined in the configuration. If this + * parameter is zero or not specified, the paged query includes as many results + * as possible that fit in the return message. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -65490,7 +63750,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {PagedBackupConfigurationInfoList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -65498,13 +63758,15 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedBackupConfigurationInfoList} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - resumePartitionBackup(partitionId, options, optionalCallback) { + getServiceBackupConfigurationInfo(serviceId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -65513,75 +63775,85 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._resumePartitionBackup(partitionId, options, (err, result, request, response) => { + self._getServiceBackupConfigurationInfo(serviceId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._resumePartitionBackup(partitionId, options, optionalCallback); + return self._getServiceBackupConfigurationInfo(serviceId, options, optionalCallback); } } /** - * @summary Triggers backup of the partition's state. + * @summary Gets the list of backups available for every partition in this + * service. * - * Creates a backup of the stateful persisted partition's state. In case the - * partition is already being periodically backed up, then by default the new - * backup is created at the same backup storage. One can also override the same - * by specifying the backup storage details as part of the request body. Once - * the backup is initiated, its progress can be tracked using the - * GetBackupProgress operation. - * In case, the operation times out, specify a greater backup timeout value in - * the query parameter. + * Returns a list of backups available for every partition in this Service + * Fabric service. The server enumerates all the backups available in the + * backup store configured in the backup policy. It also allows filtering of + * the result based on start and end datetime or just fetching the latest + * available backup for every partition. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} serviceId The identity of the service. This ID is typically + * the full name of the service without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * previous versions. * * @param {object} [options] Optional Parameters. * - * @param {object} [options.backupPartitionDescription] Describes the - * parameters to backup the partition now. If not present, backup operation - * uses default parameters from the backup policy current associated with this - * partition. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {object} [options.backupPartitionDescription.backupStorage] Specifies - * the details of the backup storage where to save the backup. + * @param {boolean} [options.latest] Specifies whether to get only the most + * recent backup available for a partition for the specified time range. * - * @param {string} - * [options.backupPartitionDescription.backupStorage.friendlyName] Friendly - * name for this backup storage. + * @param {date} [options.startDateTimeFilter] Specify the start date time from + * which to enumerate backups, in datetime format. The date time must be + * specified in ISO8601 format. This is an optional parameter. If not + * specified, all backups from the beginning are enumerated. * - * @param {string} options.backupPartitionDescription.backupStorage.storageKind - * Polymorphic Discriminator + * @param {date} [options.endDateTimeFilter] Specify the end date time till + * which to enumerate backups, in datetime format. The date time must be + * specified in ISO8601 format. This is an optional parameter. If not + * specified, enumeration is done till the most recent backup. * - * @param {number} [options.backupTimeout] Specifies the maximum amount of - * time, in minutes, to wait for the backup operation to complete. Post that, - * the operation completes with timeout error. However, in certain corner cases - * it could be that though the operation returns back timeout, the backup - * actually goes through. In case of timeout error, its recommended to invoke - * this operation again with a greater timeout value. The default value for the - * same is 10 minutes. + * @param {string} [options.continuationToken] The continuation token parameter + * is used to obtain next set of results. A continuation token with a non-empty + * value is included in the response of the API when the results from the + * system do not fit in a single response. When this value is passed to the + * next API call, the API returns next set of results. If there are no further + * results, then the continuation token does not contain a value. The value of + * this parameter should not be URL encoded. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. + * @param {number} [options.maxResults] The maximum number of results to be + * returned as part of the paged queries. This parameter defines the upper + * bound on the number of results returned. The results returned can be less + * than the specified maximum results if they do not fit in the message as per + * the max message size restrictions defined in the configuration. If this + * parameter is zero or not specified, the paged query includes as many results + * as possible that fit in the return message. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - backupPartitionWithHttpOperationResponse(partitionId, options) { + getServiceBackupListWithHttpOperationResponse(serviceId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._backupPartition(partitionId, options, (err, result, request, response) => { + self._getServiceBackupList(serviceId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -65592,48 +63864,58 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Triggers backup of the partition's state. + * @summary Gets the list of backups available for every partition in this + * service. * - * Creates a backup of the stateful persisted partition's state. In case the - * partition is already being periodically backed up, then by default the new - * backup is created at the same backup storage. One can also override the same - * by specifying the backup storage details as part of the request body. Once - * the backup is initiated, its progress can be tracked using the - * GetBackupProgress operation. - * In case, the operation times out, specify a greater backup timeout value in - * the query parameter. + * Returns a list of backups available for every partition in this Service + * Fabric service. The server enumerates all the backups available in the + * backup store configured in the backup policy. It also allows filtering of + * the result based on start and end datetime or just fetching the latest + * available backup for every partition. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} serviceId The identity of the service. This ID is typically + * the full name of the service without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * previous versions. * * @param {object} [options] Optional Parameters. * - * @param {object} [options.backupPartitionDescription] Describes the - * parameters to backup the partition now. If not present, backup operation - * uses default parameters from the backup policy current associated with this - * partition. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {object} [options.backupPartitionDescription.backupStorage] Specifies - * the details of the backup storage where to save the backup. + * @param {boolean} [options.latest] Specifies whether to get only the most + * recent backup available for a partition for the specified time range. * - * @param {string} - * [options.backupPartitionDescription.backupStorage.friendlyName] Friendly - * name for this backup storage. + * @param {date} [options.startDateTimeFilter] Specify the start date time from + * which to enumerate backups, in datetime format. The date time must be + * specified in ISO8601 format. This is an optional parameter. If not + * specified, all backups from the beginning are enumerated. * - * @param {string} options.backupPartitionDescription.backupStorage.storageKind - * Polymorphic Discriminator + * @param {date} [options.endDateTimeFilter] Specify the end date time till + * which to enumerate backups, in datetime format. The date time must be + * specified in ISO8601 format. This is an optional parameter. If not + * specified, enumeration is done till the most recent backup. * - * @param {number} [options.backupTimeout] Specifies the maximum amount of - * time, in minutes, to wait for the backup operation to complete. Post that, - * the operation completes with timeout error. However, in certain corner cases - * it could be that though the operation returns back timeout, the backup - * actually goes through. In case of timeout error, its recommended to invoke - * this operation again with a greater timeout value. The default value for the - * same is 10 minutes. + * @param {string} [options.continuationToken] The continuation token parameter + * is used to obtain next set of results. A continuation token with a non-empty + * value is included in the response of the API when the results from the + * system do not fit in a single response. When this value is passed to the + * next API call, the API returns next set of results. If there are no further + * results, then the continuation token does not contain a value. The value of + * this parameter should not be URL encoded. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. + * @param {number} [options.maxResults] The maximum number of results to be + * returned as part of the paged queries. This parameter defines the upper + * bound on the number of results returned. The results returned can be less + * than the specified maximum results if they do not fit in the message as per + * the max message size restrictions defined in the configuration. If this + * parameter is zero or not specified, the paged query includes as many results + * as possible that fit in the return message. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -65645,7 +63927,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {PagedBackupInfoList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -65653,13 +63935,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedBackupInfoList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - backupPartition(partitionId, options, optionalCallback) { + getServiceBackupList(serviceId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -65668,24 +63951,32 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._backupPartition(partitionId, options, (err, result, request, response) => { + self._getServiceBackupList(serviceId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._backupPartition(partitionId, options, optionalCallback); + return self._getServiceBackupList(serviceId, options, optionalCallback); } } /** - * @summary Gets details for the latest backup triggered for this partition. + * @summary Suspends periodic backup for the specified Service Fabric service. * - * Returns information about the state of the latest backup along with details - * or failure reason in case of completion. + * The service which is configured to take periodic backups, is suspended for + * taking further backups till it is resumed again. This operation applies to + * the entire service's hierarchy. It means all the partitions under this + * service are now suspended for backup. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} serviceId The identity of the service. This ID is typically + * the full name of the service without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * previous versions. * * @param {object} [options] Optional Parameters. * @@ -65699,15 +63990,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getPartitionBackupProgressWithHttpOperationResponse(partitionId, options) { + suspendServiceBackupWithHttpOperationResponse(serviceId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getPartitionBackupProgress(partitionId, options, (err, result, request, response) => { + self._suspendServiceBackup(serviceId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -65718,12 +64009,20 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets details for the latest backup triggered for this partition. + * @summary Suspends periodic backup for the specified Service Fabric service. * - * Returns information about the state of the latest backup along with details - * or failure reason in case of completion. + * The service which is configured to take periodic backups, is suspended for + * taking further backups till it is resumed again. This operation applies to + * the entire service's hierarchy. It means all the partitions under this + * service are now suspended for backup. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} serviceId The identity of the service. This ID is typically + * the full name of the service without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * previous versions. * * @param {object} [options] Optional Parameters. * @@ -65742,7 +64041,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {BackupProgressInfo} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -65750,14 +64049,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link BackupProgressInfo} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getPartitionBackupProgress(partitionId, options, optionalCallback) { + suspendServiceBackup(serviceId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -65766,60 +64064,34 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getPartitionBackupProgress(partitionId, options, (err, result, request, response) => { + self._suspendServiceBackup(serviceId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getPartitionBackupProgress(partitionId, options, optionalCallback); + return self._suspendServiceBackup(serviceId, options, optionalCallback); } } /** - * @summary Triggers restore of the state of the partition using the specified - * restore partition description. - * - * Restores the state of a of the stateful persisted partition using the - * specified backup point. In case the partition is already being periodically - * backed up, then by default the backup point is looked for in the storage - * specified in backup policy. One can also override the same by specifying the - * backup storage details as part of the restore partition description in body. - * Once the restore is initiated, its progress can be tracked using the - * GetRestoreProgress operation. - * In case, the operation times out, specify a greater restore timeout value in - * the query parameter. - * - * @param {uuid} partitionId The identity of the partition. - * - * @param {object} restorePartitionDescription Describes the parameters to - * restore the partition. - * - * @param {uuid} restorePartitionDescription.backupId Unique backup ID. - * - * @param {string} restorePartitionDescription.backupLocation Location of the - * backup relative to the backup storage specified/ configured. - * - * @param {object} [restorePartitionDescription.backupStorage] Location of the - * backup from where the partition will be restored. + * @summary Resumes periodic backup of a Service Fabric service which was + * previously suspended. * - * @param {string} [restorePartitionDescription.backupStorage.friendlyName] - * Friendly name for this backup storage. + * The previously suspended Service Fabric service resumes taking periodic + * backup as per the backup policy currently configured for the same. * - * @param {string} restorePartitionDescription.backupStorage.storageKind - * Polymorphic Discriminator + * @param {string} serviceId The identity of the service. This ID is typically + * the full name of the service without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * previous versions. * * @param {object} [options] Optional Parameters. * - * @param {number} [options.restoreTimeout] Specifies the maximum amount of - * time to wait, in minutes, for the restore operation to complete. Post that, - * the operation returns back with timeout error. However, in certain corner - * cases it could be that the restore operation goes through even though it - * completes with timeout. In case of timeout error, its recommended to invoke - * this operation again with a greater timeout value. the default value for the - * same is 10 minutes. - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -65834,11 +64106,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - restorePartitionWithHttpOperationResponse(partitionId, restorePartitionDescription, options) { + resumeServiceBackupWithHttpOperationResponse(serviceId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._restorePartition(partitionId, restorePartitionDescription, options, (err, result, request, response) => { + self._resumeServiceBackup(serviceId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -65849,48 +64121,22 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Triggers restore of the state of the partition using the specified - * restore partition description. - * - * Restores the state of a of the stateful persisted partition using the - * specified backup point. In case the partition is already being periodically - * backed up, then by default the backup point is looked for in the storage - * specified in backup policy. One can also override the same by specifying the - * backup storage details as part of the restore partition description in body. - * Once the restore is initiated, its progress can be tracked using the - * GetRestoreProgress operation. - * In case, the operation times out, specify a greater restore timeout value in - * the query parameter. - * - * @param {uuid} partitionId The identity of the partition. - * - * @param {object} restorePartitionDescription Describes the parameters to - * restore the partition. - * - * @param {uuid} restorePartitionDescription.backupId Unique backup ID. - * - * @param {string} restorePartitionDescription.backupLocation Location of the - * backup relative to the backup storage specified/ configured. - * - * @param {object} [restorePartitionDescription.backupStorage] Location of the - * backup from where the partition will be restored. + * @summary Resumes periodic backup of a Service Fabric service which was + * previously suspended. * - * @param {string} [restorePartitionDescription.backupStorage.friendlyName] - * Friendly name for this backup storage. + * The previously suspended Service Fabric service resumes taking periodic + * backup as per the backup policy currently configured for the same. * - * @param {string} restorePartitionDescription.backupStorage.storageKind - * Polymorphic Discriminator + * @param {string} serviceId The identity of the service. This ID is typically + * the full name of the service without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * previous versions. * * @param {object} [options] Optional Parameters. * - * @param {number} [options.restoreTimeout] Specifies the maximum amount of - * time to wait, in minutes, for the restore operation to complete. Post that, - * the operation returns back with timeout error. However, in certain corner - * cases it could be that the restore operation goes through even though it - * completes with timeout. In case of timeout error, its recommended to invoke - * this operation again with a greater timeout value. the default value for the - * same is 10 minutes. - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -65920,7 +64166,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - restorePartition(partitionId, restorePartitionDescription, options, optionalCallback) { + resumeServiceBackup(serviceId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -65929,26 +64175,36 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._restorePartition(partitionId, restorePartitionDescription, options, (err, result, request, response) => { + self._resumeServiceBackup(serviceId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._restorePartition(partitionId, restorePartitionDescription, options, optionalCallback); + return self._resumeServiceBackup(serviceId, options, optionalCallback); } } /** - * @summary Gets details for the latest restore operation triggered for this - * partition. + * @summary Enables periodic backup of the stateful persisted partition. * - * Returns information about the state of the latest restore operation along - * with details or failure reason in case of completion. + * Enables periodic backup of stateful persisted partition. Each partition is + * backed up as per the specified backup policy description. In case the + * application or service, which is partition is part of, is already enabled + * for backup then this operation would override the policy being used to take + * the periodic backup of this partition. + * Note only C# based Reliable Actor and Reliable Stateful services are + * currently supported for periodic backup. * * @param {uuid} partitionId The identity of the partition. * + * @param {object} enableBackupDescription Specifies the parameters for + * enabling backup. + * + * @param {string} enableBackupDescription.backupPolicyName Name of the backup + * policy to be used for enabling periodic backups. + * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -65961,15 +64217,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getPartitionRestoreProgressWithHttpOperationResponse(partitionId, options) { + enablePartitionBackupWithHttpOperationResponse(partitionId, enableBackupDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getPartitionRestoreProgress(partitionId, options, (err, result, request, response) => { + self._enablePartitionBackup(partitionId, enableBackupDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -65980,14 +64236,24 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets details for the latest restore operation triggered for this - * partition. + * @summary Enables periodic backup of the stateful persisted partition. * - * Returns information about the state of the latest restore operation along - * with details or failure reason in case of completion. + * Enables periodic backup of stateful persisted partition. Each partition is + * backed up as per the specified backup policy description. In case the + * application or service, which is partition is part of, is already enabled + * for backup then this operation would override the policy being used to take + * the periodic backup of this partition. + * Note only C# based Reliable Actor and Reliable Stateful services are + * currently supported for periodic backup. * * @param {uuid} partitionId The identity of the partition. * + * @param {object} enableBackupDescription Specifies the parameters for + * enabling backup. + * + * @param {string} enableBackupDescription.backupPolicyName Name of the backup + * policy to be used for enabling periodic backups. + * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -66005,7 +64271,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {RestoreProgressInfo} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -66013,14 +64279,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link RestoreProgressInfo} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getPartitionRestoreProgress(partitionId, options, optionalCallback) { + enablePartitionBackup(partitionId, enableBackupDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -66029,96 +64294,57 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getPartitionRestoreProgress(partitionId, options, (err, result, request, response) => { + self._enablePartitionBackup(partitionId, enableBackupDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getPartitionRestoreProgress(partitionId, options, optionalCallback); + return self._enablePartitionBackup(partitionId, enableBackupDescription, options, optionalCallback); } } /** - * @summary Gets the list of backups available for the specified backed up - * entity at the specified backup location. - * - * Gets the list of backups available for the specified backed up entity - * (Application, Service or Partition) at the specified backup location - * (FileShare or Azure Blob Storage). - * - * @param {object} getBackupByStorageQueryDescription Describes the filters and - * backup storage details to be used for enumerating backups. - * - * @param {date} [getBackupByStorageQueryDescription.startDateTimeFilter] - * Specifies the start date time in ISO8601 from which to enumerate backups. If - * not specified, backups are enumerated from the beginning. - * - * @param {date} [getBackupByStorageQueryDescription.endDateTimeFilter] - * Specifies the end date time in ISO8601 till which to enumerate backups. If - * not specified, backups are enumerated till the end. - * - * @param {boolean} [getBackupByStorageQueryDescription.latest] If specified as - * true, gets the most recent backup (within the specified time range) for - * every partition under the specified backup entity. - * - * @param {object} getBackupByStorageQueryDescription.storage Describes the - * parameters for the backup storage from where to enumerate backups. This is - * optional and by default backups are enumerated from the backup storage where - * this backup entity is currently being backed up (as specified in backup - * policy). This parameter is useful to be able to enumerate backups from - * another cluster where you may intend to restore. + * @summary Disables periodic backup of Service Fabric partition which was + * previously enabled. * - * @param {string} [getBackupByStorageQueryDescription.storage.friendlyName] - * Friendly name for this backup storage. + * Disables periodic backup of partition which was previously enabled. Backup + * must be explicitly enabled before it can be disabled. + * In case the backup is enabled for the Service Fabric application or service, + * which this partition is part of, this partition would continue to be + * periodically backed up as per the policy mapped at the higher level entity. * - * @param {string} getBackupByStorageQueryDescription.storage.storageKind - * Polymorphic Discriminator + * @param {uuid} partitionId The identity of the partition. * - * @param {object} getBackupByStorageQueryDescription.backupEntity Indicates - * the entity for which to enumerate backups. + * @param {object} [options] Optional Parameters. * - * @param {string} getBackupByStorageQueryDescription.backupEntity.entityKind - * Polymorphic Discriminator + * @param {object} [options.disableBackupDescription] Specifies the parameters + * to disable backup for any backup entity. * - * @param {object} [options] Optional Parameters. + * @param {boolean} options.disableBackupDescription.cleanBackup Boolean flag + * to delete backups. It can be set to true for deleting all the backups which + * were created for the backup entity that is getting disabled for backup. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The * default value for this parameter is 60 seconds. * - * @param {string} [options.continuationToken] The continuation token parameter - * is used to obtain next set of results. A continuation token with a non-empty - * value is included in the response of the API when the results from the - * system do not fit in a single response. When this value is passed to the - * next API call, the API returns next set of results. If there are no further - * results, then the continuation token does not contain a value. The value of - * this parameter should not be URL encoded. - * - * @param {number} [options.maxResults] The maximum number of results to be - * returned as part of the paged queries. This parameter defines the upper - * bound on the number of results returned. The results returned can be less - * than the specified maximum results if they do not fit in the message as per - * the max message size restrictions defined in the configuration. If this - * parameter is zero or not specified, the paged query includes as many results - * as possible that fit in the return message. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getBackupsFromBackupLocationWithHttpOperationResponse(getBackupByStorageQueryDescription, options) { + disablePartitionBackupWithHttpOperationResponse(partitionId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getBackupsFromBackupLocation(getBackupByStorageQueryDescription, options, (err, result, request, response) => { + self._disablePartitionBackup(partitionId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -66129,70 +64355,31 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the list of backups available for the specified backed up - * entity at the specified backup location. - * - * Gets the list of backups available for the specified backed up entity - * (Application, Service or Partition) at the specified backup location - * (FileShare or Azure Blob Storage). - * - * @param {object} getBackupByStorageQueryDescription Describes the filters and - * backup storage details to be used for enumerating backups. - * - * @param {date} [getBackupByStorageQueryDescription.startDateTimeFilter] - * Specifies the start date time in ISO8601 from which to enumerate backups. If - * not specified, backups are enumerated from the beginning. - * - * @param {date} [getBackupByStorageQueryDescription.endDateTimeFilter] - * Specifies the end date time in ISO8601 till which to enumerate backups. If - * not specified, backups are enumerated till the end. - * - * @param {boolean} [getBackupByStorageQueryDescription.latest] If specified as - * true, gets the most recent backup (within the specified time range) for - * every partition under the specified backup entity. - * - * @param {object} getBackupByStorageQueryDescription.storage Describes the - * parameters for the backup storage from where to enumerate backups. This is - * optional and by default backups are enumerated from the backup storage where - * this backup entity is currently being backed up (as specified in backup - * policy). This parameter is useful to be able to enumerate backups from - * another cluster where you may intend to restore. + * @summary Disables periodic backup of Service Fabric partition which was + * previously enabled. * - * @param {string} [getBackupByStorageQueryDescription.storage.friendlyName] - * Friendly name for this backup storage. + * Disables periodic backup of partition which was previously enabled. Backup + * must be explicitly enabled before it can be disabled. + * In case the backup is enabled for the Service Fabric application or service, + * which this partition is part of, this partition would continue to be + * periodically backed up as per the policy mapped at the higher level entity. * - * @param {string} getBackupByStorageQueryDescription.storage.storageKind - * Polymorphic Discriminator + * @param {uuid} partitionId The identity of the partition. * - * @param {object} getBackupByStorageQueryDescription.backupEntity Indicates - * the entity for which to enumerate backups. + * @param {object} [options] Optional Parameters. * - * @param {string} getBackupByStorageQueryDescription.backupEntity.entityKind - * Polymorphic Discriminator + * @param {object} [options.disableBackupDescription] Specifies the parameters + * to disable backup for any backup entity. * - * @param {object} [options] Optional Parameters. + * @param {boolean} options.disableBackupDescription.cleanBackup Boolean flag + * to delete backups. It can be set to true for deleting all the backups which + * were created for the backup entity that is getting disabled for backup. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The * default value for this parameter is 60 seconds. * - * @param {string} [options.continuationToken] The continuation token parameter - * is used to obtain next set of results. A continuation token with a non-empty - * value is included in the response of the API when the results from the - * system do not fit in a single response. When this value is passed to the - * next API call, the API returns next set of results. If there are no further - * results, then the continuation token does not contain a value. The value of - * this parameter should not be URL encoded. - * - * @param {number} [options.maxResults] The maximum number of results to be - * returned as part of the paged queries. This parameter defines the upper - * bound on the number of results returned. The results returned can be less - * than the specified maximum results if they do not fit in the message as per - * the max message size restrictions defined in the configuration. If this - * parameter is zero or not specified, the paged query includes as many results - * as possible that fit in the return message. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -66203,7 +64390,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {PagedBackupInfoList} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -66211,14 +64398,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PagedBackupInfoList} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getBackupsFromBackupLocation(getBackupByStorageQueryDescription, options, optionalCallback) { + disablePartitionBackup(partitionId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -66227,27 +64413,24 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getBackupsFromBackupLocation(getBackupByStorageQueryDescription, options, (err, result, request, response) => { + self._disablePartitionBackup(partitionId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getBackupsFromBackupLocation(getBackupByStorageQueryDescription, options, optionalCallback); + return self._disablePartitionBackup(partitionId, options, optionalCallback); } } /** - * @summary Creates a Service Fabric name. - * - * Creates the specified Service Fabric name. + * @summary Gets the partition backup configuration information * - * @param {object} nameDescription Describes the Service Fabric name to be - * created. + * Gets the Service Fabric Backup configuration information for the specified + * partition. * - * @param {string} nameDescription.name The Service Fabric name, including the - * 'fabric:' URI scheme. + * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * @@ -66261,15 +64444,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - createNameWithHttpOperationResponse(nameDescription, options) { + getPartitionBackupConfigurationInfoWithHttpOperationResponse(partitionId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._createName(nameDescription, options, (err, result, request, response) => { + self._getPartitionBackupConfigurationInfo(partitionId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -66280,15 +64463,12 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Creates a Service Fabric name. - * - * Creates the specified Service Fabric name. + * @summary Gets the partition backup configuration information * - * @param {object} nameDescription Describes the Service Fabric name to be - * created. + * Gets the Service Fabric Backup configuration information for the specified + * partition. * - * @param {string} nameDescription.name The Service Fabric name, including the - * 'fabric:' URI scheme. + * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * @@ -66307,7 +64487,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {PartitionBackupConfigurationInfo} - The deserialized result object. * * @reject {Error} - The error object. * @@ -66315,13 +64495,15 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PartitionBackupConfigurationInfo} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createName(nameDescription, options, optionalCallback) { + getPartitionBackupConfigurationInfo(partitionId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -66330,24 +64512,26 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createName(nameDescription, options, (err, result, request, response) => { + self._getPartitionBackupConfigurationInfo(partitionId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createName(nameDescription, options, optionalCallback); + return self._getPartitionBackupConfigurationInfo(partitionId, options, optionalCallback); } } /** - * @summary Returns whether the Service Fabric name exists. + * @summary Gets the list of backups available for the specified partition. * - * Returns whether the specified Service Fabric name exists. + * Returns a list of backups available for the specified partition. The server + * enumerates all the backups available in the backup store configured in the + * backup policy. It also allows filtering of the result based on start and end + * datetime or just fetching the latest available backup for the partition. * - * @param {string} nameId The Service Fabric name, without the 'fabric:' URI - * scheme. + * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * @@ -66356,20 +64540,33 @@ class ServiceFabricClient extends ServiceClient { * client is willing to wait for the requested operation to complete. The * default value for this parameter is 60 seconds. * + * @param {boolean} [options.latest] Specifies whether to get only the most + * recent backup available for a partition for the specified time range. + * + * @param {date} [options.startDateTimeFilter] Specify the start date time from + * which to enumerate backups, in datetime format. The date time must be + * specified in ISO8601 format. This is an optional parameter. If not + * specified, all backups from the beginning are enumerated. + * + * @param {date} [options.endDateTimeFilter] Specify the end date time till + * which to enumerate backups, in datetime format. The date time must be + * specified in ISO8601 format. This is an optional parameter. If not + * specified, enumeration is done till the most recent backup. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getNameExistsInfoWithHttpOperationResponse(nameId, options) { + getPartitionBackupListWithHttpOperationResponse(partitionId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getNameExistsInfo(nameId, options, (err, result, request, response) => { + self._getPartitionBackupList(partitionId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -66380,12 +64577,14 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Returns whether the Service Fabric name exists. + * @summary Gets the list of backups available for the specified partition. * - * Returns whether the specified Service Fabric name exists. + * Returns a list of backups available for the specified partition. The server + * enumerates all the backups available in the backup store configured in the + * backup policy. It also allows filtering of the result based on start and end + * datetime or just fetching the latest available backup for the partition. * - * @param {string} nameId The Service Fabric name, without the 'fabric:' URI - * scheme. + * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * @@ -66394,6 +64593,19 @@ class ServiceFabricClient extends ServiceClient { * client is willing to wait for the requested operation to complete. The * default value for this parameter is 60 seconds. * + * @param {boolean} [options.latest] Specifies whether to get only the most + * recent backup available for a partition for the specified time range. + * + * @param {date} [options.startDateTimeFilter] Specify the start date time from + * which to enumerate backups, in datetime format. The date time must be + * specified in ISO8601 format. This is an optional parameter. If not + * specified, all backups from the beginning are enumerated. + * + * @param {date} [options.endDateTimeFilter] Specify the end date time till + * which to enumerate backups, in datetime format. The date time must be + * specified in ISO8601 format. This is an optional parameter. If not + * specified, enumeration is done till the most recent backup. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -66404,7 +64616,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {PagedBackupInfoList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -66412,13 +64624,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedBackupInfoList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getNameExistsInfo(nameId, options, optionalCallback) { + getPartitionBackupList(partitionId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -66427,25 +64640,24 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getNameExistsInfo(nameId, options, (err, result, request, response) => { + self._getPartitionBackupList(partitionId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getNameExistsInfo(nameId, options, optionalCallback); + return self._getPartitionBackupList(partitionId, options, optionalCallback); } } /** - * @summary Deletes a Service Fabric name. + * @summary Suspends periodic backup for the specified partition. * - * Deletes the specified Service Fabric name. A name must be created before it - * can be deleted. Deleting a name with child properties will fail. + * The partition which is configured to take periodic backups, is suspended for + * taking further backups till it is resumed again. * - * @param {string} nameId The Service Fabric name, without the 'fabric:' URI - * scheme. + * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * @@ -66463,11 +64675,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - deleteNameWithHttpOperationResponse(nameId, options) { + suspendPartitionBackupWithHttpOperationResponse(partitionId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._deleteName(nameId, options, (err, result, request, response) => { + self._suspendPartitionBackup(partitionId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -66478,13 +64690,12 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Deletes a Service Fabric name. + * @summary Suspends periodic backup for the specified partition. * - * Deletes the specified Service Fabric name. A name must be created before it - * can be deleted. Deleting a name with child properties will fail. + * The partition which is configured to take periodic backups, is suspended for + * taking further backups till it is resumed again. * - * @param {string} nameId The Service Fabric name, without the 'fabric:' URI - * scheme. + * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * @@ -66517,7 +64728,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteName(nameId, options, optionalCallback) { + suspendPartitionBackup(partitionId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -66526,41 +64737,28 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteName(nameId, options, (err, result, request, response) => { + self._suspendPartitionBackup(partitionId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteName(nameId, options, optionalCallback); + return self._suspendPartitionBackup(partitionId, options, optionalCallback); } } /** - * @summary Enumerates all the Service Fabric names under a given name. + * @summary Resumes periodic backup of partition which was previously + * suspended. * - * Enumerates all the Service Fabric names under a given name. If the subnames - * do not fit in a page, one page of results is returned as well as a - * continuation token, which can be used to get the next page. Querying a name - * that doesn't exist will fail. + * The previously suspended partition resumes taking periodic backup as per the + * backup policy currently configured for the same. * - * @param {string} nameId The Service Fabric name, without the 'fabric:' URI - * scheme. + * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.recursive] Allows specifying that the search - * performed should be recursive. - * - * @param {string} [options.continuationToken] The continuation token parameter - * is used to obtain next set of results. A continuation token with a non-empty - * value is included in the response of the API when the results from the - * system do not fit in a single response. When this value is passed to the - * next API call, the API returns next set of results. If there are no further - * results, then the continuation token does not contain a value. The value of - * this parameter should not be URL encoded. - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -66571,15 +64769,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getSubNameInfoListWithHttpOperationResponse(nameId, options) { + resumePartitionBackupWithHttpOperationResponse(partitionId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getSubNameInfoList(nameId, options, (err, result, request, response) => { + self._resumePartitionBackup(partitionId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -66590,29 +64788,16 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Enumerates all the Service Fabric names under a given name. + * @summary Resumes periodic backup of partition which was previously + * suspended. * - * Enumerates all the Service Fabric names under a given name. If the subnames - * do not fit in a page, one page of results is returned as well as a - * continuation token, which can be used to get the next page. Querying a name - * that doesn't exist will fail. + * The previously suspended partition resumes taking periodic backup as per the + * backup policy currently configured for the same. * - * @param {string} nameId The Service Fabric name, without the 'fabric:' URI - * scheme. + * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.recursive] Allows specifying that the search - * performed should be recursive. - * - * @param {string} [options.continuationToken] The continuation token parameter - * is used to obtain next set of results. A continuation token with a non-empty - * value is included in the response of the API when the results from the - * system do not fit in a single response. When this value is passed to the - * next API call, the API returns next set of results. If there are no further - * results, then the continuation token does not contain a value. The value of - * this parameter should not be URL encoded. - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -66628,7 +64813,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {PagedSubNameInfoList} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -66636,14 +64821,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PagedSubNameInfoList} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getSubNameInfoList(nameId, options, optionalCallback) { + resumePartitionBackup(partitionId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -66652,42 +64836,55 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getSubNameInfoList(nameId, options, (err, result, request, response) => { + self._resumePartitionBackup(partitionId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getSubNameInfoList(nameId, options, optionalCallback); + return self._resumePartitionBackup(partitionId, options, optionalCallback); } } /** - * @summary Gets information on all Service Fabric properties under a given - * name. + * @summary Triggers backup of the partition's state. * - * A Service Fabric name can have one or more named properties that store - * custom information. This operation gets the information about these - * properties in a paged list. The information includes name, value, and - * metadata about each of the properties. + * Creates a backup of the stateful persisted partition's state. In case the + * partition is already being periodically backed up, then by default the new + * backup is created at the same backup storage. One can also override the same + * by specifying the backup storage details as part of the request body. Once + * the backup is initiated, its progress can be tracked using the + * GetBackupProgress operation. + * In case, the operation times out, specify a greater backup timeout value in + * the query parameter. * - * @param {string} nameId The Service Fabric name, without the 'fabric:' URI - * scheme. + * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.includeValues] Allows specifying whether to - * include the values of the properties returned. True if values should be - * returned with the metadata; False to return only property metadata. + * @param {object} [options.backupPartitionDescription] Describes the + * parameters to backup the partition now. If not present, backup operation + * uses default parameters from the backup policy current associated with this + * partition. * - * @param {string} [options.continuationToken] The continuation token parameter - * is used to obtain next set of results. A continuation token with a non-empty - * value is included in the response of the API when the results from the - * system do not fit in a single response. When this value is passed to the - * next API call, the API returns next set of results. If there are no further - * results, then the continuation token does not contain a value. The value of - * this parameter should not be URL encoded. + * @param {object} [options.backupPartitionDescription.backupStorage] Specifies + * the details of the backup storage where to save the backup. + * + * @param {string} + * [options.backupPartitionDescription.backupStorage.friendlyName] Friendly + * name for this backup storage. + * + * @param {string} options.backupPartitionDescription.backupStorage.storageKind + * Polymorphic Discriminator + * + * @param {number} [options.backupTimeout] Specifies the maximum amount of + * time, in minutes, to wait for the backup operation to complete. Post that, + * the operation completes with timeout error. However, in certain corner cases + * it could be that though the operation returns back timeout, the backup + * actually goes through. In case of timeout error, its recommended to invoke + * this operation again with a greater timeout value. The default value for the + * same is 10 minutes. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -66699,15 +64896,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getPropertyInfoListWithHttpOperationResponse(nameId, options) { + backupPartitionWithHttpOperationResponse(partitionId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getPropertyInfoList(nameId, options, (err, result, request, response) => { + self._backupPartition(partitionId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -66718,30 +64915,43 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets information on all Service Fabric properties under a given - * name. + * @summary Triggers backup of the partition's state. * - * A Service Fabric name can have one or more named properties that store - * custom information. This operation gets the information about these - * properties in a paged list. The information includes name, value, and - * metadata about each of the properties. + * Creates a backup of the stateful persisted partition's state. In case the + * partition is already being periodically backed up, then by default the new + * backup is created at the same backup storage. One can also override the same + * by specifying the backup storage details as part of the request body. Once + * the backup is initiated, its progress can be tracked using the + * GetBackupProgress operation. + * In case, the operation times out, specify a greater backup timeout value in + * the query parameter. * - * @param {string} nameId The Service Fabric name, without the 'fabric:' URI - * scheme. + * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.includeValues] Allows specifying whether to - * include the values of the properties returned. True if values should be - * returned with the metadata; False to return only property metadata. + * @param {object} [options.backupPartitionDescription] Describes the + * parameters to backup the partition now. If not present, backup operation + * uses default parameters from the backup policy current associated with this + * partition. * - * @param {string} [options.continuationToken] The continuation token parameter - * is used to obtain next set of results. A continuation token with a non-empty - * value is included in the response of the API when the results from the - * system do not fit in a single response. When this value is passed to the - * next API call, the API returns next set of results. If there are no further - * results, then the continuation token does not contain a value. The value of - * this parameter should not be URL encoded. + * @param {object} [options.backupPartitionDescription.backupStorage] Specifies + * the details of the backup storage where to save the backup. + * + * @param {string} + * [options.backupPartitionDescription.backupStorage.friendlyName] Friendly + * name for this backup storage. + * + * @param {string} options.backupPartitionDescription.backupStorage.storageKind + * Polymorphic Discriminator + * + * @param {number} [options.backupTimeout] Specifies the maximum amount of + * time, in minutes, to wait for the backup operation to complete. Post that, + * the operation completes with timeout error. However, in certain corner cases + * it could be that though the operation returns back timeout, the backup + * actually goes through. In case of timeout error, its recommended to invoke + * this operation again with a greater timeout value. The default value for the + * same is 10 minutes. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the @@ -66758,7 +64968,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {PagedPropertyInfoList} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -66766,14 +64976,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PagedPropertyInfoList} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getPropertyInfoList(nameId, options, optionalCallback) { + backupPartition(partitionId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -66782,39 +64991,24 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getPropertyInfoList(nameId, options, (err, result, request, response) => { + self._backupPartition(partitionId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getPropertyInfoList(nameId, options, optionalCallback); + return self._backupPartition(partitionId, options, optionalCallback); } } /** - * @summary Creates or updates a Service Fabric property. - * - * Creates or updates the specified Service Fabric property under a given name. - * - * @param {string} nameId The Service Fabric name, without the 'fabric:' URI - * scheme. - * - * @param {object} propertyDescription Describes the Service Fabric property to - * be created. - * - * @param {string} propertyDescription.propertyName The name of the Service - * Fabric property. - * - * @param {string} [propertyDescription.customTypeId] The property's custom - * type ID. Using this property, the user is able to tag the type of the value - * of the property. + * @summary Gets details for the latest backup triggered for this partition. * - * @param {object} propertyDescription.value Describes a Service Fabric - * property value. + * Returns information about the state of the latest backup along with details + * or failure reason in case of completion. * - * @param {string} propertyDescription.value.kind Polymorphic Discriminator + * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * @@ -66828,15 +65022,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - putPropertyWithHttpOperationResponse(nameId, propertyDescription, options) { + getPartitionBackupProgressWithHttpOperationResponse(partitionId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._putProperty(nameId, propertyDescription, options, (err, result, request, response) => { + self._getPartitionBackupProgress(partitionId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -66847,27 +65041,12 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Creates or updates a Service Fabric property. - * - * Creates or updates the specified Service Fabric property under a given name. - * - * @param {string} nameId The Service Fabric name, without the 'fabric:' URI - * scheme. - * - * @param {object} propertyDescription Describes the Service Fabric property to - * be created. - * - * @param {string} propertyDescription.propertyName The name of the Service - * Fabric property. - * - * @param {string} [propertyDescription.customTypeId] The property's custom - * type ID. Using this property, the user is able to tag the type of the value - * of the property. + * @summary Gets details for the latest backup triggered for this partition. * - * @param {object} propertyDescription.value Describes a Service Fabric - * property value. + * Returns information about the state of the latest backup along with details + * or failure reason in case of completion. * - * @param {string} propertyDescription.value.kind Polymorphic Discriminator + * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * @@ -66886,7 +65065,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {BackupProgressInfo} - The deserialized result object. * * @reject {Error} - The error object. * @@ -66894,13 +65073,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link BackupProgressInfo} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - putProperty(nameId, propertyDescription, options, optionalCallback) { + getPartitionBackupProgress(partitionId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -66909,30 +65089,60 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._putProperty(nameId, propertyDescription, options, (err, result, request, response) => { + self._getPartitionBackupProgress(partitionId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._putProperty(nameId, propertyDescription, options, optionalCallback); + return self._getPartitionBackupProgress(partitionId, options, optionalCallback); } } /** - * @summary Gets the specified Service Fabric property. + * @summary Triggers restore of the state of the partition using the specified + * restore partition description. * - * Gets the specified Service Fabric property under a given name. This will - * always return both value and metadata. + * Restores the state of a of the stateful persisted partition using the + * specified backup point. In case the partition is already being periodically + * backed up, then by default the backup point is looked for in the storage + * specified in backup policy. One can also override the same by specifying the + * backup storage details as part of the restore partition description in body. + * Once the restore is initiated, its progress can be tracked using the + * GetRestoreProgress operation. + * In case, the operation times out, specify a greater restore timeout value in + * the query parameter. * - * @param {string} nameId The Service Fabric name, without the 'fabric:' URI - * scheme. + * @param {uuid} partitionId The identity of the partition. * - * @param {string} propertyName Specifies the name of the property to get. + * @param {object} restorePartitionDescription Describes the parameters to + * restore the partition. + * + * @param {uuid} restorePartitionDescription.backupId Unique backup ID. + * + * @param {string} restorePartitionDescription.backupLocation Location of the + * backup relative to the backup storage specified/ configured. + * + * @param {object} [restorePartitionDescription.backupStorage] Location of the + * backup from where the partition will be restored. + * + * @param {string} [restorePartitionDescription.backupStorage.friendlyName] + * Friendly name for this backup storage. + * + * @param {string} restorePartitionDescription.backupStorage.storageKind + * Polymorphic Discriminator * * @param {object} [options] Optional Parameters. * + * @param {number} [options.restoreTimeout] Specifies the maximum amount of + * time to wait, in minutes, for the restore operation to complete. Post that, + * the operation returns back with timeout error. However, in certain corner + * cases it could be that the restore operation goes through even though it + * completes with timeout. In case of timeout error, its recommended to invoke + * this operation again with a greater timeout value. the default value for the + * same is 10 minutes. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -66943,15 +65153,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getPropertyInfoWithHttpOperationResponse(nameId, propertyName, options) { + restorePartitionWithHttpOperationResponse(partitionId, restorePartitionDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getPropertyInfo(nameId, propertyName, options, (err, result, request, response) => { + self._restorePartition(partitionId, restorePartitionDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -66962,18 +65172,48 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the specified Service Fabric property. + * @summary Triggers restore of the state of the partition using the specified + * restore partition description. * - * Gets the specified Service Fabric property under a given name. This will - * always return both value and metadata. + * Restores the state of a of the stateful persisted partition using the + * specified backup point. In case the partition is already being periodically + * backed up, then by default the backup point is looked for in the storage + * specified in backup policy. One can also override the same by specifying the + * backup storage details as part of the restore partition description in body. + * Once the restore is initiated, its progress can be tracked using the + * GetRestoreProgress operation. + * In case, the operation times out, specify a greater restore timeout value in + * the query parameter. * - * @param {string} nameId The Service Fabric name, without the 'fabric:' URI - * scheme. + * @param {uuid} partitionId The identity of the partition. * - * @param {string} propertyName Specifies the name of the property to get. + * @param {object} restorePartitionDescription Describes the parameters to + * restore the partition. + * + * @param {uuid} restorePartitionDescription.backupId Unique backup ID. + * + * @param {string} restorePartitionDescription.backupLocation Location of the + * backup relative to the backup storage specified/ configured. + * + * @param {object} [restorePartitionDescription.backupStorage] Location of the + * backup from where the partition will be restored. + * + * @param {string} [restorePartitionDescription.backupStorage.friendlyName] + * Friendly name for this backup storage. + * + * @param {string} restorePartitionDescription.backupStorage.storageKind + * Polymorphic Discriminator * * @param {object} [options] Optional Parameters. * + * @param {number} [options.restoreTimeout] Specifies the maximum amount of + * time to wait, in minutes, for the restore operation to complete. Post that, + * the operation returns back with timeout error. However, in certain corner + * cases it could be that the restore operation goes through even though it + * completes with timeout. In case of timeout error, its recommended to invoke + * this operation again with a greater timeout value. the default value for the + * same is 10 minutes. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -66989,7 +65229,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {PropertyInfo} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -66997,14 +65237,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PropertyInfo} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getPropertyInfo(nameId, propertyName, options, optionalCallback) { + restorePartition(partitionId, restorePartitionDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -67013,27 +65252,25 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getPropertyInfo(nameId, propertyName, options, (err, result, request, response) => { + self._restorePartition(partitionId, restorePartitionDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getPropertyInfo(nameId, propertyName, options, optionalCallback); + return self._restorePartition(partitionId, restorePartitionDescription, options, optionalCallback); } } /** - * @summary Deletes the specified Service Fabric property. - * - * Deletes the specified Service Fabric property under a given name. A property - * must be created before it can be deleted. + * @summary Gets details for the latest restore operation triggered for this + * partition. * - * @param {string} nameId The Service Fabric name, without the 'fabric:' URI - * scheme. + * Returns information about the state of the latest restore operation along + * with details or failure reason in case of completion. * - * @param {string} propertyName Specifies the name of the property to get. + * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * @@ -67047,15 +65284,15 @@ class ServiceFabricClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - deletePropertyWithHttpOperationResponse(nameId, propertyName, options) { + getPartitionRestoreProgressWithHttpOperationResponse(partitionId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._deleteProperty(nameId, propertyName, options, (err, result, request, response) => { + self._getPartitionRestoreProgress(partitionId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -67066,15 +65303,13 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Deletes the specified Service Fabric property. - * - * Deletes the specified Service Fabric property under a given name. A property - * must be created before it can be deleted. + * @summary Gets details for the latest restore operation triggered for this + * partition. * - * @param {string} nameId The Service Fabric name, without the 'fabric:' URI - * scheme. + * Returns information about the state of the latest restore operation along + * with details or failure reason in case of completion. * - * @param {string} propertyName Specifies the name of the property to get. + * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * @@ -67093,7 +65328,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {RestoreProgressInfo} - The deserialized result object. * * @reject {Error} - The error object. * @@ -67101,13 +65336,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link RestoreProgressInfo} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteProperty(nameId, propertyName, options, optionalCallback) { + getPartitionRestoreProgress(partitionId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -67116,53 +65352,96 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteProperty(nameId, propertyName, options, (err, result, request, response) => { + self._getPartitionRestoreProgress(partitionId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteProperty(nameId, propertyName, options, optionalCallback); + return self._getPartitionRestoreProgress(partitionId, options, optionalCallback); } } /** - * @summary Submits a property batch. + * @summary Gets the list of backups available for the specified backed up + * entity at the specified backup location. * - * Submits a batch of property operations. Either all or none of the operations - * will be committed. + * Gets the list of backups available for the specified backed up entity + * (Application, Service or Partition) at the specified backup location + * (FileShare or Azure Blob Storage). * - * @param {string} nameId The Service Fabric name, without the 'fabric:' URI - * scheme. + * @param {object} getBackupByStorageQueryDescription Describes the filters and + * backup storage details to be used for enumerating backups. * - * @param {object} propertyBatchDescriptionList Describes the property batch - * operations to be submitted. + * @param {date} [getBackupByStorageQueryDescription.startDateTimeFilter] + * Specifies the start date time in ISO8601 from which to enumerate backups. If + * not specified, backups are enumerated from the beginning. * - * @param {array} [propertyBatchDescriptionList.operations] A list of the - * property batch operations to be executed. + * @param {date} [getBackupByStorageQueryDescription.endDateTimeFilter] + * Specifies the end date time in ISO8601 till which to enumerate backups. If + * not specified, backups are enumerated till the end. + * + * @param {boolean} [getBackupByStorageQueryDescription.latest] If specified as + * true, gets the most recent backup (within the specified time range) for + * every partition under the specified backup entity. + * + * @param {object} getBackupByStorageQueryDescription.storage Describes the + * parameters for the backup storage from where to enumerate backups. This is + * optional and by default backups are enumerated from the backup storage where + * this backup entity is currently being backed up (as specified in backup + * policy). This parameter is useful to be able to enumerate backups from + * another cluster where you may intend to restore. + * + * @param {string} [getBackupByStorageQueryDescription.storage.friendlyName] + * Friendly name for this backup storage. + * + * @param {string} getBackupByStorageQueryDescription.storage.storageKind + * Polymorphic Discriminator + * + * @param {object} getBackupByStorageQueryDescription.backupEntity Indicates + * the entity for which to enumerate backups. + * + * @param {string} getBackupByStorageQueryDescription.backupEntity.entityKind + * Polymorphic Discriminator * * @param {object} [options] Optional Parameters. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.continuationToken] The continuation token parameter + * is used to obtain next set of results. A continuation token with a non-empty + * value is included in the response of the API when the results from the + * system do not fit in a single response. When this value is passed to the + * next API call, the API returns next set of results. If there are no further + * results, then the continuation token does not contain a value. The value of + * this parameter should not be URL encoded. + * + * @param {number} [options.maxResults] The maximum number of results to be + * returned as part of the paged queries. This parameter defines the upper + * bound on the number of results returned. The results returned can be less + * than the specified maximum results if they do not fit in the message as per + * the max message size restrictions defined in the configuration. If this + * parameter is zero or not specified, the paged query includes as many results + * as possible that fit in the return message. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - submitPropertyBatchWithHttpOperationResponse(nameId, propertyBatchDescriptionList, options) { + getBackupsFromBackupLocationWithHttpOperationResponse(getBackupByStorageQueryDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._submitPropertyBatch(nameId, propertyBatchDescriptionList, options, (err, result, request, response) => { + self._getBackupsFromBackupLocation(getBackupByStorageQueryDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -67173,19 +65452,46 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Submits a property batch. + * @summary Gets the list of backups available for the specified backed up + * entity at the specified backup location. * - * Submits a batch of property operations. Either all or none of the operations - * will be committed. + * Gets the list of backups available for the specified backed up entity + * (Application, Service or Partition) at the specified backup location + * (FileShare or Azure Blob Storage). * - * @param {string} nameId The Service Fabric name, without the 'fabric:' URI - * scheme. + * @param {object} getBackupByStorageQueryDescription Describes the filters and + * backup storage details to be used for enumerating backups. * - * @param {object} propertyBatchDescriptionList Describes the property batch - * operations to be submitted. + * @param {date} [getBackupByStorageQueryDescription.startDateTimeFilter] + * Specifies the start date time in ISO8601 from which to enumerate backups. If + * not specified, backups are enumerated from the beginning. * - * @param {array} [propertyBatchDescriptionList.operations] A list of the - * property batch operations to be executed. + * @param {date} [getBackupByStorageQueryDescription.endDateTimeFilter] + * Specifies the end date time in ISO8601 till which to enumerate backups. If + * not specified, backups are enumerated till the end. + * + * @param {boolean} [getBackupByStorageQueryDescription.latest] If specified as + * true, gets the most recent backup (within the specified time range) for + * every partition under the specified backup entity. + * + * @param {object} getBackupByStorageQueryDescription.storage Describes the + * parameters for the backup storage from where to enumerate backups. This is + * optional and by default backups are enumerated from the backup storage where + * this backup entity is currently being backed up (as specified in backup + * policy). This parameter is useful to be able to enumerate backups from + * another cluster where you may intend to restore. + * + * @param {string} [getBackupByStorageQueryDescription.storage.friendlyName] + * Friendly name for this backup storage. + * + * @param {string} getBackupByStorageQueryDescription.storage.storageKind + * Polymorphic Discriminator + * + * @param {object} getBackupByStorageQueryDescription.backupEntity Indicates + * the entity for which to enumerate backups. + * + * @param {string} getBackupByStorageQueryDescription.backupEntity.entityKind + * Polymorphic Discriminator * * @param {object} [options] Optional Parameters. * @@ -67194,6 +65500,22 @@ class ServiceFabricClient extends ServiceClient { * client is willing to wait for the requested operation to complete. The * default value for this parameter is 60 seconds. * + * @param {string} [options.continuationToken] The continuation token parameter + * is used to obtain next set of results. A continuation token with a non-empty + * value is included in the response of the API when the results from the + * system do not fit in a single response. When this value is passed to the + * next API call, the API returns next set of results. If there are no further + * results, then the continuation token does not contain a value. The value of + * this parameter should not be URL encoded. + * + * @param {number} [options.maxResults] The maximum number of results to be + * returned as part of the paged queries. This parameter defines the upper + * bound on the number of results returned. The results returned can be less + * than the specified maximum results if they do not fit in the message as per + * the max message size restrictions defined in the configuration. If this + * parameter is zero or not specified, the paged query includes as many results + * as possible that fit in the return message. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -67204,7 +65526,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {PropertyBatchInfo} - The deserialized result object. + * @resolve {PagedBackupInfoList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -67213,13 +65535,13 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PropertyBatchInfo} for more information. + * See {@link PagedBackupInfoList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - submitPropertyBatch(nameId, propertyBatchDescriptionList, options, optionalCallback) { + getBackupsFromBackupLocation(getBackupByStorageQueryDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -67228,27 +65550,27 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._submitPropertyBatch(nameId, propertyBatchDescriptionList, options, (err, result, request, response) => { + self._getBackupsFromBackupLocation(getBackupByStorageQueryDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._submitPropertyBatch(nameId, propertyBatchDescriptionList, options, optionalCallback); + return self._getBackupsFromBackupLocation(getBackupByStorageQueryDescription, options, optionalCallback); } } /** - * @summary Gets all Cluster-related events. + * @summary Creates a Service Fabric name. * - * The response is list of ClusterEvent objects. + * Creates the specified Service Fabric name. * - * @param {string} startTimeUtc The start time of a lookup query in ISO UTC - * yyyy-MM-ddTHH:mm:ssZ. + * @param {object} nameDescription Describes the Service Fabric name to be + * created. * - * @param {string} endTimeUtc The end time of a lookup query in ISO UTC - * yyyy-MM-ddTHH:mm:ssZ. + * @param {string} nameDescription.name The Service Fabric name, including the + * 'fabric:' URI scheme. * * @param {object} [options] Optional Parameters. * @@ -67257,32 +65579,20 @@ class ServiceFabricClient extends ServiceClient { * client is willing to wait for the requested operation to complete. The * default value for this parameter is 60 seconds. * - * @param {string} [options.eventsTypesFilter] This is a comma separated string - * specifying the types of FabricEvents that should only be included in the - * response. - * - * @param {boolean} [options.excludeAnalysisEvents] This param disables the - * retrieval of AnalysisEvents if true is passed. - * - * @param {boolean} [options.skipCorrelationLookup] This param disables the - * search of CorrelatedEvents information if true is passed. otherwise the - * CorrelationEvents get processed and HasCorrelatedEvents field in every - * FabricEvent gets populated. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getClusterEventListWithHttpOperationResponse(startTimeUtc, endTimeUtc, options) { + createNameWithHttpOperationResponse(nameDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getClusterEventList(startTimeUtc, endTimeUtc, options, (err, result, request, response) => { + self._createName(nameDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -67293,15 +65603,15 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets all Cluster-related events. + * @summary Creates a Service Fabric name. * - * The response is list of ClusterEvent objects. + * Creates the specified Service Fabric name. * - * @param {string} startTimeUtc The start time of a lookup query in ISO UTC - * yyyy-MM-ddTHH:mm:ssZ. + * @param {object} nameDescription Describes the Service Fabric name to be + * created. * - * @param {string} endTimeUtc The end time of a lookup query in ISO UTC - * yyyy-MM-ddTHH:mm:ssZ. + * @param {string} nameDescription.name The Service Fabric name, including the + * 'fabric:' URI scheme. * * @param {object} [options] Optional Parameters. * @@ -67310,18 +65620,6 @@ class ServiceFabricClient extends ServiceClient { * client is willing to wait for the requested operation to complete. The * default value for this parameter is 60 seconds. * - * @param {string} [options.eventsTypesFilter] This is a comma separated string - * specifying the types of FabricEvents that should only be included in the - * response. - * - * @param {boolean} [options.excludeAnalysisEvents] This param disables the - * retrieval of AnalysisEvents if true is passed. - * - * @param {boolean} [options.skipCorrelationLookup] This param disables the - * search of CorrelatedEvents information if true is passed. otherwise the - * CorrelationEvents get processed and HasCorrelatedEvents field in every - * FabricEvent gets populated. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -67332,7 +65630,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {Array} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -67340,13 +65638,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getClusterEventList(startTimeUtc, endTimeUtc, options, optionalCallback) { + createName(nameDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -67355,27 +65653,24 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getClusterEventList(startTimeUtc, endTimeUtc, options, (err, result, request, response) => { + self._createName(nameDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getClusterEventList(startTimeUtc, endTimeUtc, options, optionalCallback); + return self._createName(nameDescription, options, optionalCallback); } } /** - * @summary Gets all Containers-related events. - * - * The response is list of ContainerInstanceEvent objects. + * @summary Returns whether the Service Fabric name exists. * - * @param {string} startTimeUtc The start time of a lookup query in ISO UTC - * yyyy-MM-ddTHH:mm:ssZ. + * Returns whether the specified Service Fabric name exists. * - * @param {string} endTimeUtc The end time of a lookup query in ISO UTC - * yyyy-MM-ddTHH:mm:ssZ. + * @param {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. * * @param {object} [options] Optional Parameters. * @@ -67384,32 +65679,20 @@ class ServiceFabricClient extends ServiceClient { * client is willing to wait for the requested operation to complete. The * default value for this parameter is 60 seconds. * - * @param {string} [options.eventsTypesFilter] This is a comma separated string - * specifying the types of FabricEvents that should only be included in the - * response. - * - * @param {boolean} [options.excludeAnalysisEvents] This param disables the - * retrieval of AnalysisEvents if true is passed. - * - * @param {boolean} [options.skipCorrelationLookup] This param disables the - * search of CorrelatedEvents information if true is passed. otherwise the - * CorrelationEvents get processed and HasCorrelatedEvents field in every - * FabricEvent gets populated. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getContainersEventListWithHttpOperationResponse(startTimeUtc, endTimeUtc, options) { + getNameExistsInfoWithHttpOperationResponse(nameId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getContainersEventList(startTimeUtc, endTimeUtc, options, (err, result, request, response) => { + self._getNameExistsInfo(nameId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -67420,15 +65703,12 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets all Containers-related events. - * - * The response is list of ContainerInstanceEvent objects. + * @summary Returns whether the Service Fabric name exists. * - * @param {string} startTimeUtc The start time of a lookup query in ISO UTC - * yyyy-MM-ddTHH:mm:ssZ. + * Returns whether the specified Service Fabric name exists. * - * @param {string} endTimeUtc The end time of a lookup query in ISO UTC - * yyyy-MM-ddTHH:mm:ssZ. + * @param {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. * * @param {object} [options] Optional Parameters. * @@ -67437,18 +65717,6 @@ class ServiceFabricClient extends ServiceClient { * client is willing to wait for the requested operation to complete. The * default value for this parameter is 60 seconds. * - * @param {string} [options.eventsTypesFilter] This is a comma separated string - * specifying the types of FabricEvents that should only be included in the - * response. - * - * @param {boolean} [options.excludeAnalysisEvents] This param disables the - * retrieval of AnalysisEvents if true is passed. - * - * @param {boolean} [options.skipCorrelationLookup] This param disables the - * search of CorrelatedEvents information if true is passed. otherwise the - * CorrelationEvents get processed and HasCorrelatedEvents field in every - * FabricEvent gets populated. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -67459,7 +65727,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {Array} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -67467,13 +65735,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getContainersEventList(startTimeUtc, endTimeUtc, options, optionalCallback) { + getNameExistsInfo(nameId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -67482,29 +65750,25 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getContainersEventList(startTimeUtc, endTimeUtc, options, (err, result, request, response) => { + self._getNameExistsInfo(nameId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getContainersEventList(startTimeUtc, endTimeUtc, options, optionalCallback); + return self._getNameExistsInfo(nameId, options, optionalCallback); } } /** - * @summary Gets a Node-related events. - * - * The response is list of NodeEvent objects. - * - * @param {string} nodeName The name of the node. + * @summary Deletes a Service Fabric name. * - * @param {string} startTimeUtc The start time of a lookup query in ISO UTC - * yyyy-MM-ddTHH:mm:ssZ. + * Deletes the specified Service Fabric name. A name must be created before it + * can be deleted. Deleting a name with child properties will fail. * - * @param {string} endTimeUtc The end time of a lookup query in ISO UTC - * yyyy-MM-ddTHH:mm:ssZ. + * @param {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. * * @param {object} [options] Optional Parameters. * @@ -67513,32 +65777,20 @@ class ServiceFabricClient extends ServiceClient { * client is willing to wait for the requested operation to complete. The * default value for this parameter is 60 seconds. * - * @param {string} [options.eventsTypesFilter] This is a comma separated string - * specifying the types of FabricEvents that should only be included in the - * response. - * - * @param {boolean} [options.excludeAnalysisEvents] This param disables the - * retrieval of AnalysisEvents if true is passed. - * - * @param {boolean} [options.skipCorrelationLookup] This param disables the - * search of CorrelatedEvents information if true is passed. otherwise the - * CorrelationEvents get processed and HasCorrelatedEvents field in every - * FabricEvent gets populated. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getNodeEventListWithHttpOperationResponse(nodeName, startTimeUtc, endTimeUtc, options) { + deleteNameWithHttpOperationResponse(nameId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getNodeEventList(nodeName, startTimeUtc, endTimeUtc, options, (err, result, request, response) => { + self._deleteName(nameId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -67549,17 +65801,13 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets a Node-related events. - * - * The response is list of NodeEvent objects. - * - * @param {string} nodeName The name of the node. + * @summary Deletes a Service Fabric name. * - * @param {string} startTimeUtc The start time of a lookup query in ISO UTC - * yyyy-MM-ddTHH:mm:ssZ. + * Deletes the specified Service Fabric name. A name must be created before it + * can be deleted. Deleting a name with child properties will fail. * - * @param {string} endTimeUtc The end time of a lookup query in ISO UTC - * yyyy-MM-ddTHH:mm:ssZ. + * @param {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. * * @param {object} [options] Optional Parameters. * @@ -67568,18 +65816,6 @@ class ServiceFabricClient extends ServiceClient { * client is willing to wait for the requested operation to complete. The * default value for this parameter is 60 seconds. * - * @param {string} [options.eventsTypesFilter] This is a comma separated string - * specifying the types of FabricEvents that should only be included in the - * response. - * - * @param {boolean} [options.excludeAnalysisEvents] This param disables the - * retrieval of AnalysisEvents if true is passed. - * - * @param {boolean} [options.skipCorrelationLookup] This param disables the - * search of CorrelatedEvents information if true is passed. otherwise the - * CorrelationEvents get processed and HasCorrelatedEvents field in every - * FabricEvent gets populated. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -67590,7 +65826,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {Array} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -67598,13 +65834,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getNodeEventList(nodeName, startTimeUtc, endTimeUtc, options, optionalCallback) { + deleteName(nameId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -67613,61 +65849,60 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getNodeEventList(nodeName, startTimeUtc, endTimeUtc, options, (err, result, request, response) => { + self._deleteName(nameId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getNodeEventList(nodeName, startTimeUtc, endTimeUtc, options, optionalCallback); + return self._deleteName(nameId, options, optionalCallback); } } /** - * @summary Gets all Nodes-related Events. - * - * The response is list of NodeEvent objects. + * @summary Enumerates all the Service Fabric names under a given name. * - * @param {string} startTimeUtc The start time of a lookup query in ISO UTC - * yyyy-MM-ddTHH:mm:ssZ. + * Enumerates all the Service Fabric names under a given name. If the subnames + * do not fit in a page, one page of results is returned as well as a + * continuation token, which can be used to get the next page. Querying a name + * that doesn't exist will fail. * - * @param {string} endTimeUtc The end time of a lookup query in ISO UTC - * yyyy-MM-ddTHH:mm:ssZ. + * @param {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. * * @param {object} [options] Optional Parameters. * + * @param {boolean} [options.recursive] Allows specifying that the search + * performed should be recursive. + * + * @param {string} [options.continuationToken] The continuation token parameter + * is used to obtain next set of results. A continuation token with a non-empty + * value is included in the response of the API when the results from the + * system do not fit in a single response. When this value is passed to the + * next API call, the API returns next set of results. If there are no further + * results, then the continuation token does not contain a value. The value of + * this parameter should not be URL encoded. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The * default value for this parameter is 60 seconds. * - * @param {string} [options.eventsTypesFilter] This is a comma separated string - * specifying the types of FabricEvents that should only be included in the - * response. - * - * @param {boolean} [options.excludeAnalysisEvents] This param disables the - * retrieval of AnalysisEvents if true is passed. - * - * @param {boolean} [options.skipCorrelationLookup] This param disables the - * search of CorrelatedEvents information if true is passed. otherwise the - * CorrelationEvents get processed and HasCorrelatedEvents field in every - * FabricEvent gets populated. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getNodesEventListWithHttpOperationResponse(startTimeUtc, endTimeUtc, options) { + getSubNameInfoListWithHttpOperationResponse(nameId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getNodesEventList(startTimeUtc, endTimeUtc, options, (err, result, request, response) => { + self._getSubNameInfoList(nameId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -67678,35 +65913,34 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets all Nodes-related Events. - * - * The response is list of NodeEvent objects. + * @summary Enumerates all the Service Fabric names under a given name. * - * @param {string} startTimeUtc The start time of a lookup query in ISO UTC - * yyyy-MM-ddTHH:mm:ssZ. + * Enumerates all the Service Fabric names under a given name. If the subnames + * do not fit in a page, one page of results is returned as well as a + * continuation token, which can be used to get the next page. Querying a name + * that doesn't exist will fail. * - * @param {string} endTimeUtc The end time of a lookup query in ISO UTC - * yyyy-MM-ddTHH:mm:ssZ. + * @param {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. * * @param {object} [options] Optional Parameters. * + * @param {boolean} [options.recursive] Allows specifying that the search + * performed should be recursive. + * + * @param {string} [options.continuationToken] The continuation token parameter + * is used to obtain next set of results. A continuation token with a non-empty + * value is included in the response of the API when the results from the + * system do not fit in a single response. When this value is passed to the + * next API call, the API returns next set of results. If there are no further + * results, then the continuation token does not contain a value. The value of + * this parameter should not be URL encoded. + * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The * default value for this parameter is 60 seconds. * - * @param {string} [options.eventsTypesFilter] This is a comma separated string - * specifying the types of FabricEvents that should only be included in the - * response. - * - * @param {boolean} [options.excludeAnalysisEvents] This param disables the - * retrieval of AnalysisEvents if true is passed. - * - * @param {boolean} [options.skipCorrelationLookup] This param disables the - * search of CorrelatedEvents information if true is passed. otherwise the - * CorrelationEvents get processed and HasCorrelatedEvents field in every - * FabricEvent gets populated. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -67717,7 +65951,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {Array} - The deserialized result object. + * @resolve {PagedSubNameInfoList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -67725,13 +65959,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedSubNameInfoList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getNodesEventList(startTimeUtc, endTimeUtc, options, optionalCallback) { + getSubNameInfoList(nameId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -67740,69 +65975,62 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getNodesEventList(startTimeUtc, endTimeUtc, options, (err, result, request, response) => { + self._getSubNameInfoList(nameId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getNodesEventList(startTimeUtc, endTimeUtc, options, optionalCallback); + return self._getSubNameInfoList(nameId, options, optionalCallback); } } /** - * @summary Gets an Application-related events. + * @summary Gets information on all Service Fabric properties under a given + * name. * - * The response is list of ApplicationEvent objects. + * A Service Fabric name can have one or more named properties that store + * custom information. This operation gets the information about these + * properties in a paged list. The information includes name, value, and + * metadata about each of the properties. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. + * @param {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. * - * @param {string} startTimeUtc The start time of a lookup query in ISO UTC - * yyyy-MM-ddTHH:mm:ssZ. + * @param {object} [options] Optional Parameters. * - * @param {string} endTimeUtc The end time of a lookup query in ISO UTC - * yyyy-MM-ddTHH:mm:ssZ. + * @param {boolean} [options.includeValues] Allows specifying whether to + * include the values of the properties returned. True if values should be + * returned with the metadata; False to return only property metadata. * - * @param {object} [options] Optional Parameters. + * @param {string} [options.continuationToken] The continuation token parameter + * is used to obtain next set of results. A continuation token with a non-empty + * value is included in the response of the API when the results from the + * system do not fit in a single response. When this value is passed to the + * next API call, the API returns next set of results. If there are no further + * results, then the continuation token does not contain a value. The value of + * this parameter should not be URL encoded. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The * default value for this parameter is 60 seconds. * - * @param {string} [options.eventsTypesFilter] This is a comma separated string - * specifying the types of FabricEvents that should only be included in the - * response. - * - * @param {boolean} [options.excludeAnalysisEvents] This param disables the - * retrieval of AnalysisEvents if true is passed. - * - * @param {boolean} [options.skipCorrelationLookup] This param disables the - * search of CorrelatedEvents information if true is passed. otherwise the - * CorrelationEvents get processed and HasCorrelatedEvents field in every - * FabricEvent gets populated. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getApplicationEventListWithHttpOperationResponse(applicationId, startTimeUtc, endTimeUtc, options) { + getPropertyInfoListWithHttpOperationResponse(nameId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getApplicationEventList(applicationId, startTimeUtc, endTimeUtc, options, (err, result, request, response) => { + self._getPropertyInfoList(nameId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -67813,43 +66041,36 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets an Application-related events. + * @summary Gets information on all Service Fabric properties under a given + * name. * - * The response is list of ApplicationEvent objects. + * A Service Fabric name can have one or more named properties that store + * custom information. This operation gets the information about these + * properties in a paged list. The information includes name, value, and + * metadata about each of the properties. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the application name is "fabric:/myapp/app1", the - * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. + * @param {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. * - * @param {string} startTimeUtc The start time of a lookup query in ISO UTC - * yyyy-MM-ddTHH:mm:ssZ. + * @param {object} [options] Optional Parameters. * - * @param {string} endTimeUtc The end time of a lookup query in ISO UTC - * yyyy-MM-ddTHH:mm:ssZ. + * @param {boolean} [options.includeValues] Allows specifying whether to + * include the values of the properties returned. True if values should be + * returned with the metadata; False to return only property metadata. * - * @param {object} [options] Optional Parameters. + * @param {string} [options.continuationToken] The continuation token parameter + * is used to obtain next set of results. A continuation token with a non-empty + * value is included in the response of the API when the results from the + * system do not fit in a single response. When this value is passed to the + * next API call, the API returns next set of results. If there are no further + * results, then the continuation token does not contain a value. The value of + * this parameter should not be URL encoded. * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The * default value for this parameter is 60 seconds. * - * @param {string} [options.eventsTypesFilter] This is a comma separated string - * specifying the types of FabricEvents that should only be included in the - * response. - * - * @param {boolean} [options.excludeAnalysisEvents] This param disables the - * retrieval of AnalysisEvents if true is passed. - * - * @param {boolean} [options.skipCorrelationLookup] This param disables the - * search of CorrelatedEvents information if true is passed. otherwise the - * CorrelationEvents get processed and HasCorrelatedEvents field in every - * FabricEvent gets populated. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -67860,7 +66081,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {Array} - The deserialized result object. + * @resolve {PagedPropertyInfoList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -67868,13 +66089,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedPropertyInfoList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getApplicationEventList(applicationId, startTimeUtc, endTimeUtc, options, optionalCallback) { + getPropertyInfoList(nameId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -67883,61 +66105,61 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getApplicationEventList(applicationId, startTimeUtc, endTimeUtc, options, (err, result, request, response) => { + self._getPropertyInfoList(nameId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getApplicationEventList(applicationId, startTimeUtc, endTimeUtc, options, optionalCallback); + return self._getPropertyInfoList(nameId, options, optionalCallback); } } /** - * @summary Gets all Applications-related events. + * @summary Creates or updates a Service Fabric property. * - * The response is list of ApplicationEvent objects. + * Creates or updates the specified Service Fabric property under a given name. * - * @param {string} startTimeUtc The start time of a lookup query in ISO UTC - * yyyy-MM-ddTHH:mm:ssZ. + * @param {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. * - * @param {string} endTimeUtc The end time of a lookup query in ISO UTC - * yyyy-MM-ddTHH:mm:ssZ. + * @param {object} propertyDescription Describes the Service Fabric property to + * be created. * - * @param {object} [options] Optional Parameters. + * @param {string} propertyDescription.propertyName The name of the Service + * Fabric property. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. + * @param {string} [propertyDescription.customTypeId] The property's custom + * type ID. Using this property, the user is able to tag the type of the value + * of the property. * - * @param {string} [options.eventsTypesFilter] This is a comma separated string - * specifying the types of FabricEvents that should only be included in the - * response. + * @param {object} propertyDescription.value Describes a Service Fabric + * property value. * - * @param {boolean} [options.excludeAnalysisEvents] This param disables the - * retrieval of AnalysisEvents if true is passed. + * @param {string} propertyDescription.value.kind Polymorphic Discriminator + * + * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.skipCorrelationLookup] This param disables the - * search of CorrelatedEvents information if true is passed. otherwise the - * CorrelationEvents get processed and HasCorrelatedEvents field in every - * FabricEvent gets populated. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getApplicationsEventListWithHttpOperationResponse(startTimeUtc, endTimeUtc, options) { + putPropertyWithHttpOperationResponse(nameId, propertyDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getApplicationsEventList(startTimeUtc, endTimeUtc, options, (err, result, request, response) => { + self._putProperty(nameId, propertyDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -67948,15 +66170,27 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets all Applications-related events. + * @summary Creates or updates a Service Fabric property. * - * The response is list of ApplicationEvent objects. + * Creates or updates the specified Service Fabric property under a given name. * - * @param {string} startTimeUtc The start time of a lookup query in ISO UTC - * yyyy-MM-ddTHH:mm:ssZ. + * @param {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. * - * @param {string} endTimeUtc The end time of a lookup query in ISO UTC - * yyyy-MM-ddTHH:mm:ssZ. + * @param {object} propertyDescription Describes the Service Fabric property to + * be created. + * + * @param {string} propertyDescription.propertyName The name of the Service + * Fabric property. + * + * @param {string} [propertyDescription.customTypeId] The property's custom + * type ID. Using this property, the user is able to tag the type of the value + * of the property. + * + * @param {object} propertyDescription.value Describes a Service Fabric + * property value. + * + * @param {string} propertyDescription.value.kind Polymorphic Discriminator * * @param {object} [options] Optional Parameters. * @@ -67965,18 +66199,6 @@ class ServiceFabricClient extends ServiceClient { * client is willing to wait for the requested operation to complete. The * default value for this parameter is 60 seconds. * - * @param {string} [options.eventsTypesFilter] This is a comma separated string - * specifying the types of FabricEvents that should only be included in the - * response. - * - * @param {boolean} [options.excludeAnalysisEvents] This param disables the - * retrieval of AnalysisEvents if true is passed. - * - * @param {boolean} [options.skipCorrelationLookup] This param disables the - * search of CorrelatedEvents information if true is passed. otherwise the - * CorrelationEvents get processed and HasCorrelatedEvents field in every - * FabricEvent gets populated. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -67987,7 +66209,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {Array} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -67995,13 +66217,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getApplicationsEventList(startTimeUtc, endTimeUtc, options, optionalCallback) { + putProperty(nameId, propertyDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -68010,35 +66232,27 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getApplicationsEventList(startTimeUtc, endTimeUtc, options, (err, result, request, response) => { + self._putProperty(nameId, propertyDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getApplicationsEventList(startTimeUtc, endTimeUtc, options, optionalCallback); + return self._putProperty(nameId, propertyDescription, options, optionalCallback); } } /** - * @summary Gets a Service-related events. - * - * The response is list of ServiceEvent objects. + * @summary Gets the specified Service Fabric property. * - * @param {string} serviceId The identity of the service. This ID is typically - * the full name of the service without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the service name is "fabric:/myapp/app1/svc1", the service - * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in - * previous versions. + * Gets the specified Service Fabric property under a given name. This will + * always return both value and metadata. * - * @param {string} startTimeUtc The start time of a lookup query in ISO UTC - * yyyy-MM-ddTHH:mm:ssZ. + * @param {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. * - * @param {string} endTimeUtc The end time of a lookup query in ISO UTC - * yyyy-MM-ddTHH:mm:ssZ. + * @param {string} propertyName Specifies the name of the property to get. * * @param {object} [options] Optional Parameters. * @@ -68047,32 +66261,20 @@ class ServiceFabricClient extends ServiceClient { * client is willing to wait for the requested operation to complete. The * default value for this parameter is 60 seconds. * - * @param {string} [options.eventsTypesFilter] This is a comma separated string - * specifying the types of FabricEvents that should only be included in the - * response. - * - * @param {boolean} [options.excludeAnalysisEvents] This param disables the - * retrieval of AnalysisEvents if true is passed. - * - * @param {boolean} [options.skipCorrelationLookup] This param disables the - * search of CorrelatedEvents information if true is passed. otherwise the - * CorrelationEvents get processed and HasCorrelatedEvents field in every - * FabricEvent gets populated. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getServiceEventListWithHttpOperationResponse(serviceId, startTimeUtc, endTimeUtc, options) { + getPropertyInfoWithHttpOperationResponse(nameId, propertyName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getServiceEventList(serviceId, startTimeUtc, endTimeUtc, options, (err, result, request, response) => { + self._getPropertyInfo(nameId, propertyName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -68083,23 +66285,15 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets a Service-related events. - * - * The response is list of ServiceEvent objects. + * @summary Gets the specified Service Fabric property. * - * @param {string} serviceId The identity of the service. This ID is typically - * the full name of the service without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, if the service name is "fabric:/myapp/app1/svc1", the service - * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in - * previous versions. + * Gets the specified Service Fabric property under a given name. This will + * always return both value and metadata. * - * @param {string} startTimeUtc The start time of a lookup query in ISO UTC - * yyyy-MM-ddTHH:mm:ssZ. + * @param {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. * - * @param {string} endTimeUtc The end time of a lookup query in ISO UTC - * yyyy-MM-ddTHH:mm:ssZ. + * @param {string} propertyName Specifies the name of the property to get. * * @param {object} [options] Optional Parameters. * @@ -68108,18 +66302,6 @@ class ServiceFabricClient extends ServiceClient { * client is willing to wait for the requested operation to complete. The * default value for this parameter is 60 seconds. * - * @param {string} [options.eventsTypesFilter] This is a comma separated string - * specifying the types of FabricEvents that should only be included in the - * response. - * - * @param {boolean} [options.excludeAnalysisEvents] This param disables the - * retrieval of AnalysisEvents if true is passed. - * - * @param {boolean} [options.skipCorrelationLookup] This param disables the - * search of CorrelatedEvents information if true is passed. otherwise the - * CorrelationEvents get processed and HasCorrelatedEvents field in every - * FabricEvent gets populated. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -68130,7 +66312,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {Array} - The deserialized result object. + * @resolve {PropertyInfo} - The deserialized result object. * * @reject {Error} - The error object. * @@ -68138,13 +66320,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PropertyInfo} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getServiceEventList(serviceId, startTimeUtc, endTimeUtc, options, optionalCallback) { + getPropertyInfo(nameId, propertyName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -68153,27 +66336,27 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getServiceEventList(serviceId, startTimeUtc, endTimeUtc, options, (err, result, request, response) => { + self._getPropertyInfo(nameId, propertyName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getServiceEventList(serviceId, startTimeUtc, endTimeUtc, options, optionalCallback); + return self._getPropertyInfo(nameId, propertyName, options, optionalCallback); } } /** - * @summary Gets all Services-related events. + * @summary Deletes the specified Service Fabric property. * - * The response is list of ServiceEvent objects. + * Deletes the specified Service Fabric property under a given name. A property + * must be created before it can be deleted. * - * @param {string} startTimeUtc The start time of a lookup query in ISO UTC - * yyyy-MM-ddTHH:mm:ssZ. + * @param {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. * - * @param {string} endTimeUtc The end time of a lookup query in ISO UTC - * yyyy-MM-ddTHH:mm:ssZ. + * @param {string} propertyName Specifies the name of the property to get. * * @param {object} [options] Optional Parameters. * @@ -68182,32 +66365,20 @@ class ServiceFabricClient extends ServiceClient { * client is willing to wait for the requested operation to complete. The * default value for this parameter is 60 seconds. * - * @param {string} [options.eventsTypesFilter] This is a comma separated string - * specifying the types of FabricEvents that should only be included in the - * response. - * - * @param {boolean} [options.excludeAnalysisEvents] This param disables the - * retrieval of AnalysisEvents if true is passed. - * - * @param {boolean} [options.skipCorrelationLookup] This param disables the - * search of CorrelatedEvents information if true is passed. otherwise the - * CorrelationEvents get processed and HasCorrelatedEvents field in every - * FabricEvent gets populated. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getServicesEventListWithHttpOperationResponse(startTimeUtc, endTimeUtc, options) { + deletePropertyWithHttpOperationResponse(nameId, propertyName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getServicesEventList(startTimeUtc, endTimeUtc, options, (err, result, request, response) => { + self._deleteProperty(nameId, propertyName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -68218,15 +66389,15 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets all Services-related events. + * @summary Deletes the specified Service Fabric property. * - * The response is list of ServiceEvent objects. + * Deletes the specified Service Fabric property under a given name. A property + * must be created before it can be deleted. * - * @param {string} startTimeUtc The start time of a lookup query in ISO UTC - * yyyy-MM-ddTHH:mm:ssZ. + * @param {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. * - * @param {string} endTimeUtc The end time of a lookup query in ISO UTC - * yyyy-MM-ddTHH:mm:ssZ. + * @param {string} propertyName Specifies the name of the property to get. * * @param {object} [options] Optional Parameters. * @@ -68235,18 +66406,6 @@ class ServiceFabricClient extends ServiceClient { * client is willing to wait for the requested operation to complete. The * default value for this parameter is 60 seconds. * - * @param {string} [options.eventsTypesFilter] This is a comma separated string - * specifying the types of FabricEvents that should only be included in the - * response. - * - * @param {boolean} [options.excludeAnalysisEvents] This param disables the - * retrieval of AnalysisEvents if true is passed. - * - * @param {boolean} [options.skipCorrelationLookup] This param disables the - * search of CorrelatedEvents information if true is passed. otherwise the - * CorrelationEvents get processed and HasCorrelatedEvents field in every - * FabricEvent gets populated. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -68257,7 +66416,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {Array} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -68265,13 +66424,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getServicesEventList(startTimeUtc, endTimeUtc, options, optionalCallback) { + deleteProperty(nameId, propertyName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -68280,29 +66439,31 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getServicesEventList(startTimeUtc, endTimeUtc, options, (err, result, request, response) => { + self._deleteProperty(nameId, propertyName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getServicesEventList(startTimeUtc, endTimeUtc, options, optionalCallback); + return self._deleteProperty(nameId, propertyName, options, optionalCallback); } } /** - * @summary Gets a Partition-related events. + * @summary Submits a property batch. * - * The response is list of PartitionEvent objects. + * Submits a batch of property operations. Either all or none of the operations + * will be committed. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. * - * @param {string} startTimeUtc The start time of a lookup query in ISO UTC - * yyyy-MM-ddTHH:mm:ssZ. + * @param {object} propertyBatchDescriptionList Describes the property batch + * operations to be submitted. * - * @param {string} endTimeUtc The end time of a lookup query in ISO UTC - * yyyy-MM-ddTHH:mm:ssZ. + * @param {array} [propertyBatchDescriptionList.operations] A list of the + * property batch operations to be executed. * * @param {object} [options] Optional Parameters. * @@ -68311,32 +66472,20 @@ class ServiceFabricClient extends ServiceClient { * client is willing to wait for the requested operation to complete. The * default value for this parameter is 60 seconds. * - * @param {string} [options.eventsTypesFilter] This is a comma separated string - * specifying the types of FabricEvents that should only be included in the - * response. - * - * @param {boolean} [options.excludeAnalysisEvents] This param disables the - * retrieval of AnalysisEvents if true is passed. - * - * @param {boolean} [options.skipCorrelationLookup] This param disables the - * search of CorrelatedEvents information if true is passed. otherwise the - * CorrelationEvents get processed and HasCorrelatedEvents field in every - * FabricEvent gets populated. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getPartitionEventListWithHttpOperationResponse(partitionId, startTimeUtc, endTimeUtc, options) { + submitPropertyBatchWithHttpOperationResponse(nameId, propertyBatchDescriptionList, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getPartitionEventList(partitionId, startTimeUtc, endTimeUtc, options, (err, result, request, response) => { + self._submitPropertyBatch(nameId, propertyBatchDescriptionList, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -68347,17 +66496,19 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets a Partition-related events. + * @summary Submits a property batch. * - * The response is list of PartitionEvent objects. + * Submits a batch of property operations. Either all or none of the operations + * will be committed. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. * - * @param {string} startTimeUtc The start time of a lookup query in ISO UTC - * yyyy-MM-ddTHH:mm:ssZ. + * @param {object} propertyBatchDescriptionList Describes the property batch + * operations to be submitted. * - * @param {string} endTimeUtc The end time of a lookup query in ISO UTC - * yyyy-MM-ddTHH:mm:ssZ. + * @param {array} [propertyBatchDescriptionList.operations] A list of the + * property batch operations to be executed. * * @param {object} [options] Optional Parameters. * @@ -68366,18 +66517,6 @@ class ServiceFabricClient extends ServiceClient { * client is willing to wait for the requested operation to complete. The * default value for this parameter is 60 seconds. * - * @param {string} [options.eventsTypesFilter] This is a comma separated string - * specifying the types of FabricEvents that should only be included in the - * response. - * - * @param {boolean} [options.excludeAnalysisEvents] This param disables the - * retrieval of AnalysisEvents if true is passed. - * - * @param {boolean} [options.skipCorrelationLookup] This param disables the - * search of CorrelatedEvents information if true is passed. otherwise the - * CorrelationEvents get processed and HasCorrelatedEvents field in every - * FabricEvent gets populated. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -68388,7 +66527,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {Array} - The deserialized result object. + * @resolve {PropertyBatchInfo} - The deserialized result object. * * @reject {Error} - The error object. * @@ -68396,13 +66535,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PropertyBatchInfo} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getPartitionEventList(partitionId, startTimeUtc, endTimeUtc, options, optionalCallback) { + submitPropertyBatch(nameId, propertyBatchDescriptionList, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -68411,21 +66551,21 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getPartitionEventList(partitionId, startTimeUtc, endTimeUtc, options, (err, result, request, response) => { + self._submitPropertyBatch(nameId, propertyBatchDescriptionList, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getPartitionEventList(partitionId, startTimeUtc, endTimeUtc, options, optionalCallback); + return self._submitPropertyBatch(nameId, propertyBatchDescriptionList, options, optionalCallback); } } /** - * @summary Gets all Partitions-related events. + * @summary Gets all Cluster-related events. * - * The response is list of PartitionEvent objects. + * The response is list of ClusterEvent objects. * * @param {string} startTimeUtc The start time of a lookup query in ISO UTC * yyyy-MM-ddTHH:mm:ssZ. @@ -68461,11 +66601,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - getPartitionsEventListWithHttpOperationResponse(startTimeUtc, endTimeUtc, options) { + getClusterEventListWithHttpOperationResponse(startTimeUtc, endTimeUtc, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getPartitionsEventList(startTimeUtc, endTimeUtc, options, (err, result, request, response) => { + self._getClusterEventList(startTimeUtc, endTimeUtc, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -68476,9 +66616,9 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets all Partitions-related events. + * @summary Gets all Cluster-related events. * - * The response is list of PartitionEvent objects. + * The response is list of ClusterEvent objects. * * @param {string} startTimeUtc The start time of a lookup query in ISO UTC * yyyy-MM-ddTHH:mm:ssZ. @@ -68529,7 +66669,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getPartitionsEventList(startTimeUtc, endTimeUtc, options, optionalCallback) { + getClusterEventList(startTimeUtc, endTimeUtc, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -68538,25 +66678,21 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getPartitionsEventList(startTimeUtc, endTimeUtc, options, (err, result, request, response) => { + self._getClusterEventList(startTimeUtc, endTimeUtc, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getPartitionsEventList(startTimeUtc, endTimeUtc, options, optionalCallback); + return self._getClusterEventList(startTimeUtc, endTimeUtc, options, optionalCallback); } } /** - * @summary Gets a Partition Replica-related events. - * - * The response is list of ReplicaEvent objects. - * - * @param {uuid} partitionId The identity of the partition. + * @summary Gets all Containers-related events. * - * @param {string} replicaId The identifier of the replica. + * The response is list of ContainerInstanceEvent objects. * * @param {string} startTimeUtc The start time of a lookup query in ISO UTC * yyyy-MM-ddTHH:mm:ssZ. @@ -68592,11 +66728,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - getPartitionReplicaEventListWithHttpOperationResponse(partitionId, replicaId, startTimeUtc, endTimeUtc, options) { + getContainersEventListWithHttpOperationResponse(startTimeUtc, endTimeUtc, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getPartitionReplicaEventList(partitionId, replicaId, startTimeUtc, endTimeUtc, options, (err, result, request, response) => { + self._getContainersEventList(startTimeUtc, endTimeUtc, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -68607,13 +66743,9 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets a Partition Replica-related events. - * - * The response is list of ReplicaEvent objects. - * - * @param {uuid} partitionId The identity of the partition. + * @summary Gets all Containers-related events. * - * @param {string} replicaId The identifier of the replica. + * The response is list of ContainerInstanceEvent objects. * * @param {string} startTimeUtc The start time of a lookup query in ISO UTC * yyyy-MM-ddTHH:mm:ssZ. @@ -68664,7 +66796,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getPartitionReplicaEventList(partitionId, replicaId, startTimeUtc, endTimeUtc, options, optionalCallback) { + getContainersEventList(startTimeUtc, endTimeUtc, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -68673,23 +66805,23 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getPartitionReplicaEventList(partitionId, replicaId, startTimeUtc, endTimeUtc, options, (err, result, request, response) => { + self._getContainersEventList(startTimeUtc, endTimeUtc, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getPartitionReplicaEventList(partitionId, replicaId, startTimeUtc, endTimeUtc, options, optionalCallback); + return self._getContainersEventList(startTimeUtc, endTimeUtc, options, optionalCallback); } } /** - * @summary Gets all Replicas-related events for a Partition. + * @summary Gets a Node-related events. * - * The response is list of ReplicaEvent objects. + * The response is list of NodeEvent objects. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} nodeName The name of the node. * * @param {string} startTimeUtc The start time of a lookup query in ISO UTC * yyyy-MM-ddTHH:mm:ssZ. @@ -68725,11 +66857,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - getPartitionReplicasEventListWithHttpOperationResponse(partitionId, startTimeUtc, endTimeUtc, options) { + getNodeEventListWithHttpOperationResponse(nodeName, startTimeUtc, endTimeUtc, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getPartitionReplicasEventList(partitionId, startTimeUtc, endTimeUtc, options, (err, result, request, response) => { + self._getNodeEventList(nodeName, startTimeUtc, endTimeUtc, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -68740,11 +66872,11 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets all Replicas-related events for a Partition. + * @summary Gets a Node-related events. * - * The response is list of ReplicaEvent objects. + * The response is list of NodeEvent objects. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} nodeName The name of the node. * * @param {string} startTimeUtc The start time of a lookup query in ISO UTC * yyyy-MM-ddTHH:mm:ssZ. @@ -68795,7 +66927,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getPartitionReplicasEventList(partitionId, startTimeUtc, endTimeUtc, options, optionalCallback) { + getNodeEventList(nodeName, startTimeUtc, endTimeUtc, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -68804,23 +66936,27 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getPartitionReplicasEventList(partitionId, startTimeUtc, endTimeUtc, options, (err, result, request, response) => { + self._getNodeEventList(nodeName, startTimeUtc, endTimeUtc, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getPartitionReplicasEventList(partitionId, startTimeUtc, endTimeUtc, options, optionalCallback); + return self._getNodeEventList(nodeName, startTimeUtc, endTimeUtc, options, optionalCallback); } } /** - * @summary Gets all correlated events for a given event. + * @summary Gets all Nodes-related Events. * - * The response is list of FabricEvents. + * The response is list of NodeEvent objects. * - * @param {string} eventInstanceId The EventInstanceId. + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * * @param {object} [options] Optional Parameters. * @@ -68829,6 +66965,18 @@ class ServiceFabricClient extends ServiceClient { * client is willing to wait for the requested operation to complete. The * default value for this parameter is 60 seconds. * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * @param {boolean} [options.skipCorrelationLookup] This param disables the + * search of CorrelatedEvents information if true is passed. otherwise the + * CorrelationEvents get processed and HasCorrelatedEvents field in every + * FabricEvent gets populated. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -68838,11 +66986,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - getCorrelatedEventListWithHttpOperationResponse(eventInstanceId, options) { + getNodesEventListWithHttpOperationResponse(startTimeUtc, endTimeUtc, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getCorrelatedEventList(eventInstanceId, options, (err, result, request, response) => { + self._getNodesEventList(startTimeUtc, endTimeUtc, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -68853,11 +67001,15 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets all correlated events for a given event. + * @summary Gets all Nodes-related Events. * - * The response is list of FabricEvents. + * The response is list of NodeEvent objects. * - * @param {string} eventInstanceId The EventInstanceId. + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * * @param {object} [options] Optional Parameters. * @@ -68866,6 +67018,18 @@ class ServiceFabricClient extends ServiceClient { * client is willing to wait for the requested operation to complete. The * default value for this parameter is 60 seconds. * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * @param {boolean} [options.skipCorrelationLookup] This param disables the + * search of CorrelatedEvents information if true is passed. otherwise the + * CorrelationEvents get processed and HasCorrelatedEvents field in every + * FabricEvent gets populated. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -68890,7 +67054,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getCorrelatedEventList(eventInstanceId, options, optionalCallback) { + getNodesEventList(startTimeUtc, endTimeUtc, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -68899,187 +67063,69 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getCorrelatedEventList(eventInstanceId, options, (err, result, request, response) => { + self._getNodesEventList(startTimeUtc, endTimeUtc, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getCorrelatedEventList(eventInstanceId, options, optionalCallback); + return self._getNodesEventList(startTimeUtc, endTimeUtc, options, optionalCallback); } } /** - * @summary Creates or updates an application resource. - * - * Creates an application with the specified name and description. If an - * application with the same name already exists, then its description are - * updated to the one indicated in this request. - * - * @param {string} applicationResourceName Service Fabric application resource - * name. - * - * @param {object} applicationResourceDescription Description for creating an - * application resource. - * - * @param {string} [applicationResourceDescription.description] User readable - * description of the application. - * - * @param {string} [applicationResourceDescription.debugParams] Internal use. - * - * @param {array} [applicationResourceDescription.services] describes the - * services in the application. - * - * @param {object} [applicationResourceDescription.diagnostics] Describes the - * diagnostics definition and usage for an application resource. - * - * @param {array} [applicationResourceDescription.diagnostics.sinks] List of - * supported sinks that can be referenced. - * - * @param {boolean} [applicationResourceDescription.diagnostics.enabled] Status - * of whether or not sinks are enabled. - * - * @param {array} [applicationResourceDescription.diagnostics.defaultSinkRefs] - * The sinks to be used if diagnostics is enabled. Sink choices can be - * overridden at the service and code package level. - * - * @param {string} applicationResourceDescription.name Application resource - * name. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error} - The error object. - */ - createApplicationResourceWithHttpOperationResponse(applicationResourceName, applicationResourceDescription, options) { - let client = this; - let self = this; - return new Promise((resolve, reject) => { - self._createApplicationResource(applicationResourceName, applicationResourceDescription, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * @summary Creates or updates an application resource. - * - * Creates an application with the specified name and description. If an - * application with the same name already exists, then its description are - * updated to the one indicated in this request. - * - * @param {string} applicationResourceName Service Fabric application resource - * name. - * - * @param {object} applicationResourceDescription Description for creating an - * application resource. - * - * @param {string} [applicationResourceDescription.description] User readable - * description of the application. - * - * @param {string} [applicationResourceDescription.debugParams] Internal use. - * - * @param {array} [applicationResourceDescription.services] describes the - * services in the application. - * - * @param {object} [applicationResourceDescription.diagnostics] Describes the - * diagnostics definition and usage for an application resource. + * @summary Gets an Application-related events. * - * @param {array} [applicationResourceDescription.diagnostics.sinks] List of - * supported sinks that can be referenced. + * The response is list of ApplicationEvent objects. * - * @param {boolean} [applicationResourceDescription.diagnostics.enabled] Status - * of whether or not sinks are enabled. + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * previous versions. * - * @param {array} [applicationResourceDescription.diagnostics.defaultSinkRefs] - * The sinks to be used if diagnostics is enabled. Sink choices can be - * overridden at the service and code package level. + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * - * @param {string} applicationResourceDescription.name Application resource - * name. + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * * @param {object} [options] Optional Parameters. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} [optionalCallback] - The optional callback. - * - * @returns {function|Promise} If a callback was passed as the last parameter - * then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned - * - * @resolve {null} - The deserialized result object. - * - * @reject {Error} - The error object. - * - * {function} optionalCallback(err, result, request, response) - * - * {Error} err - The Error object if an error occurred, null otherwise. - * - * {null} [result] - The deserialized result object if an error did not occur. - * - * {object} [request] - The HTTP Request object if an error did not occur. - * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ - createApplicationResource(applicationResourceName, applicationResourceDescription, options, optionalCallback) { - let client = this; - let self = this; - if (!optionalCallback && typeof options === 'function') { - optionalCallback = options; - options = null; - } - if (!optionalCallback) { - return new Promise((resolve, reject) => { - self._createApplicationResource(applicationResourceName, applicationResourceDescription, options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._createApplicationResource(applicationResourceName, applicationResourceDescription, options, optionalCallback); - } - } - - /** - * @summary Gets the application with the given name. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * Gets the application with the given name. This includes the information - * about the application's services and other runtime information. + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. * - * @param {string} applicationResourceName Service Fabric application resource - * name. + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. * - * @param {object} [options] Optional Parameters. + * @param {boolean} [options.skipCorrelationLookup] This param disables the + * search of CorrelatedEvents information if true is passed. otherwise the + * CorrelationEvents get processed and HasCorrelatedEvents field in every + * FabricEvent gets populated. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getApplicationResourceWithHttpOperationResponse(applicationResourceName, options) { + getApplicationEventListWithHttpOperationResponse(applicationId, startTimeUtc, endTimeUtc, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getApplicationResource(applicationResourceName, options, (err, result, request, response) => { + self._getApplicationEventList(applicationId, startTimeUtc, endTimeUtc, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -69090,16 +67136,43 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the application with the given name. + * @summary Gets an Application-related events. * - * Gets the application with the given name. This includes the information - * about the application's services and other runtime information. + * The response is list of ApplicationEvent objects. * - * @param {string} applicationResourceName Service Fabric application resource - * name. + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * previous versions. + * + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * @param {boolean} [options.skipCorrelationLookup] This param disables the + * search of CorrelatedEvents information if true is passed. otherwise the + * CorrelationEvents get processed and HasCorrelatedEvents field in every + * FabricEvent gets populated. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -69110,7 +67183,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ApplicationResourceDescription} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error} - The error object. * @@ -69118,15 +67191,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ApplicationResourceDescription} for more - * information. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getApplicationResource(applicationResourceName, options, optionalCallback) { + getApplicationEventList(applicationId, startTimeUtc, endTimeUtc, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -69135,41 +67206,61 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getApplicationResource(applicationResourceName, options, (err, result, request, response) => { + self._getApplicationEventList(applicationId, startTimeUtc, endTimeUtc, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getApplicationResource(applicationResourceName, options, optionalCallback); + return self._getApplicationEventList(applicationId, startTimeUtc, endTimeUtc, options, optionalCallback); } } /** - * @summary Deletes the specified application. + * @summary Gets all Applications-related events. + * + * The response is list of ApplicationEvent objects. * - * Deletes the application identified by the name. + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * - * @param {string} applicationResourceName Service Fabric application resource - * name. + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * @param {boolean} [options.skipCorrelationLookup] This param disables the + * search of CorrelatedEvents information if true is passed. otherwise the + * CorrelationEvents get processed and HasCorrelatedEvents field in every + * FabricEvent gets populated. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - deleteApplicationResourceWithHttpOperationResponse(applicationResourceName, options) { + getApplicationsEventListWithHttpOperationResponse(startTimeUtc, endTimeUtc, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._deleteApplicationResource(applicationResourceName, options, (err, result, request, response) => { + self._getApplicationsEventList(startTimeUtc, endTimeUtc, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -69180,15 +67271,35 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Deletes the specified application. + * @summary Gets all Applications-related events. * - * Deletes the application identified by the name. + * The response is list of ApplicationEvent objects. * - * @param {string} applicationResourceName Service Fabric application resource - * name. + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * @param {boolean} [options.skipCorrelationLookup] This param disables the + * search of CorrelatedEvents information if true is passed. otherwise the + * CorrelationEvents get processed and HasCorrelatedEvents field in every + * FabricEvent gets populated. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -69199,7 +67310,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error} - The error object. * @@ -69207,13 +67318,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteApplicationResource(applicationResourceName, options, optionalCallback) { + getApplicationsEventList(startTimeUtc, endTimeUtc, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -69222,42 +67333,69 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteApplicationResource(applicationResourceName, options, (err, result, request, response) => { + self._getApplicationsEventList(startTimeUtc, endTimeUtc, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteApplicationResource(applicationResourceName, options, optionalCallback); + return self._getApplicationsEventList(startTimeUtc, endTimeUtc, options, optionalCallback); } } /** - * @summary Gets all the services in the application resource. + * @summary Gets a Service-related events. * - * The operation returns the service descriptions of all the services in the - * application resource. + * The response is list of ServiceEvent objects. * - * @param {string} applicationResourceName Service Fabric application resource - * name. + * @param {string} serviceId The identity of the service. This ID is typically + * the full name of the service without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * previous versions. + * + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * @param {boolean} [options.skipCorrelationLookup] This param disables the + * search of CorrelatedEvents information if true is passed. otherwise the + * CorrelationEvents get processed and HasCorrelatedEvents field in every + * FabricEvent gets populated. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getServicesWithHttpOperationResponse(applicationResourceName, options) { + getServiceEventListWithHttpOperationResponse(serviceId, startTimeUtc, endTimeUtc, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getServices(applicationResourceName, options, (err, result, request, response) => { + self._getServiceEventList(serviceId, startTimeUtc, endTimeUtc, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -69268,16 +67406,43 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets all the services in the application resource. + * @summary Gets a Service-related events. * - * The operation returns the service descriptions of all the services in the - * application resource. + * The response is list of ServiceEvent objects. * - * @param {string} applicationResourceName Service Fabric application resource - * name. + * @param {string} serviceId The identity of the service. This ID is typically + * the full name of the service without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in + * previous versions. + * + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * @param {boolean} [options.skipCorrelationLookup] This param disables the + * search of CorrelatedEvents information if true is passed. otherwise the + * CorrelationEvents get processed and HasCorrelatedEvents field in every + * FabricEvent gets populated. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -69288,7 +67453,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {PagedServiceResourceDescriptionList} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error} - The error object. * @@ -69296,15 +67461,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PagedServiceResourceDescriptionList} for - * more information. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getServices(applicationResourceName, options, optionalCallback) { + getServiceEventList(serviceId, startTimeUtc, endTimeUtc, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -69313,44 +67476,61 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getServices(applicationResourceName, options, (err, result, request, response) => { + self._getServiceEventList(serviceId, startTimeUtc, endTimeUtc, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getServices(applicationResourceName, options, optionalCallback); + return self._getServiceEventList(serviceId, startTimeUtc, endTimeUtc, options, optionalCallback); } } /** - * @summary Gets the description of the specified service in an application - * resource. + * @summary Gets all Services-related events. * - * Gets the description of the service resource. + * The response is list of ServiceEvent objects. * - * @param {string} applicationResourceName Service Fabric application resource - * name. + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * - * @param {string} serviceResourceName Service Fabric service resource name. + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * @param {boolean} [options.skipCorrelationLookup] This param disables the + * search of CorrelatedEvents information if true is passed. otherwise the + * CorrelationEvents get processed and HasCorrelatedEvents field in every + * FabricEvent gets populated. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getServiceWithHttpOperationResponse(applicationResourceName, serviceResourceName, options) { + getServicesEventListWithHttpOperationResponse(startTimeUtc, endTimeUtc, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getService(applicationResourceName, serviceResourceName, options, (err, result, request, response) => { + self._getServicesEventList(startTimeUtc, endTimeUtc, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -69361,18 +67541,35 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the description of the specified service in an application - * resource. + * @summary Gets all Services-related events. * - * Gets the description of the service resource. + * The response is list of ServiceEvent objects. * - * @param {string} applicationResourceName Service Fabric application resource - * name. + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * - * @param {string} serviceResourceName Service Fabric service resource name. + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * @param {boolean} [options.skipCorrelationLookup] This param disables the + * search of CorrelatedEvents information if true is passed. otherwise the + * CorrelationEvents get processed and HasCorrelatedEvents field in every + * FabricEvent gets populated. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -69383,7 +67580,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ServiceResourceDescription} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error} - The error object. * @@ -69391,15 +67588,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ServiceResourceDescription} for more - * information. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getService(applicationResourceName, serviceResourceName, options, optionalCallback) { + getServicesEventList(startTimeUtc, endTimeUtc, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -69408,45 +67603,63 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getService(applicationResourceName, serviceResourceName, options, (err, result, request, response) => { + self._getServicesEventList(startTimeUtc, endTimeUtc, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getService(applicationResourceName, serviceResourceName, options, optionalCallback); + return self._getServicesEventList(startTimeUtc, endTimeUtc, options, optionalCallback); } } /** - * @summary Gets replicas of a given service in an applciation resource. + * @summary Gets a Partition-related events. * - * Gets the information about all replicas of a given service of an - * application. The information includes the runtime properties of the replica - * instance. + * The response is list of PartitionEvent objects. * - * @param {string} applicationResourceName Service Fabric application resource - * name. + * @param {uuid} partitionId The identity of the partition. + * + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * - * @param {string} serviceResourceName Service Fabric service resource name. + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * @param {boolean} [options.skipCorrelationLookup] This param disables the + * search of CorrelatedEvents information if true is passed. otherwise the + * CorrelationEvents get processed and HasCorrelatedEvents field in every + * FabricEvent gets populated. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getReplicasWithHttpOperationResponse(applicationResourceName, serviceResourceName, options) { + getPartitionEventListWithHttpOperationResponse(partitionId, startTimeUtc, endTimeUtc, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getReplicas(applicationResourceName, serviceResourceName, options, (err, result, request, response) => { + self._getPartitionEventList(partitionId, startTimeUtc, endTimeUtc, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -69457,19 +67670,37 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets replicas of a given service in an applciation resource. + * @summary Gets a Partition-related events. * - * Gets the information about all replicas of a given service of an - * application. The information includes the runtime properties of the replica - * instance. + * The response is list of PartitionEvent objects. * - * @param {string} applicationResourceName Service Fabric application resource - * name. + * @param {uuid} partitionId The identity of the partition. * - * @param {string} serviceResourceName Service Fabric service resource name. + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * @param {boolean} [options.skipCorrelationLookup] This param disables the + * search of CorrelatedEvents information if true is passed. otherwise the + * CorrelationEvents get processed and HasCorrelatedEvents field in every + * FabricEvent gets populated. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -69480,7 +67711,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {PagedServiceResourceReplicaDescriptionList} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error} - The error object. * @@ -69488,15 +67719,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PagedServiceResourceReplicaDescriptionList} - * for more information. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getReplicas(applicationResourceName, serviceResourceName, options, optionalCallback) { + getPartitionEventList(partitionId, startTimeUtc, endTimeUtc, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -69505,48 +67734,61 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getReplicas(applicationResourceName, serviceResourceName, options, (err, result, request, response) => { + self._getPartitionEventList(partitionId, startTimeUtc, endTimeUtc, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getReplicas(applicationResourceName, serviceResourceName, options, optionalCallback); + return self._getPartitionEventList(partitionId, startTimeUtc, endTimeUtc, options, optionalCallback); } } /** - * @summary Gets a specific replica of a given service in an application - * resource. - * - * Gets the information about the specified replica of a given service of an - * application. The information includes the runtime properties of the replica - * instance. + * @summary Gets all Partitions-related events. * - * @param {string} applicationResourceName Service Fabric application resource - * name. + * The response is list of PartitionEvent objects. * - * @param {string} serviceResourceName Service Fabric service resource name. + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * - * @param {string} replicaName Service Fabric replica name. + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * @param {boolean} [options.skipCorrelationLookup] This param disables the + * search of CorrelatedEvents information if true is passed. otherwise the + * CorrelationEvents get processed and HasCorrelatedEvents field in every + * FabricEvent gets populated. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getReplicaWithHttpOperationResponse(applicationResourceName, serviceResourceName, replicaName, options) { + getPartitionsEventListWithHttpOperationResponse(startTimeUtc, endTimeUtc, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getReplica(applicationResourceName, serviceResourceName, replicaName, options, (err, result, request, response) => { + self._getPartitionsEventList(startTimeUtc, endTimeUtc, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -69557,22 +67799,35 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets a specific replica of a given service in an application - * resource. - * - * Gets the information about the specified replica of a given service of an - * application. The information includes the runtime properties of the replica - * instance. + * @summary Gets all Partitions-related events. * - * @param {string} applicationResourceName Service Fabric application resource - * name. + * The response is list of PartitionEvent objects. * - * @param {string} serviceResourceName Service Fabric service resource name. + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * - * @param {string} replicaName Service Fabric replica name. + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * @param {boolean} [options.skipCorrelationLookup] This param disables the + * search of CorrelatedEvents information if true is passed. otherwise the + * CorrelationEvents get processed and HasCorrelatedEvents field in every + * FabricEvent gets populated. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -69583,7 +67838,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ServiceResourceReplicaDescription} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error} - The error object. * @@ -69591,15 +67846,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ServiceResourceReplicaDescription} for more - * information. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getReplica(applicationResourceName, serviceResourceName, replicaName, options, optionalCallback) { + getPartitionsEventList(startTimeUtc, endTimeUtc, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -69608,62 +67861,65 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getReplica(applicationResourceName, serviceResourceName, replicaName, options, (err, result, request, response) => { + self._getPartitionsEventList(startTimeUtc, endTimeUtc, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getReplica(applicationResourceName, serviceResourceName, replicaName, options, optionalCallback); + return self._getPartitionsEventList(startTimeUtc, endTimeUtc, options, optionalCallback); } } /** - * @summary Creates or updates a volume resource. + * @summary Gets a Partition Replica-related events. * - * Creates a volume resource with the specified name and description. If a - * volume with the same name already exists, then its description is updated to - * the one indicated in this request. + * The response is list of ReplicaEvent objects. * - * @param {string} volumeResourceName Service Fabric volume resource name. + * @param {uuid} partitionId The identity of the partition. * - * @param {object} volumeResourceDescription Description for creating a volume - * resource. + * @param {string} replicaId The identifier of the replica. * - * @param {string} [volumeResourceDescription.description] User readable - * description of the volume. + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * - * @param {object} [volumeResourceDescription.azureFileParameters] This type - * describes a volume provided by an Azure Files file share. + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * - * @param {string} volumeResourceDescription.azureFileParameters.accountName - * Name of the Azure storage account for the File Share. + * @param {object} [options] Optional Parameters. * - * @param {string} [volumeResourceDescription.azureFileParameters.accountKey] - * Access key of the Azure storage account for the File Share. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {string} volumeResourceDescription.azureFileParameters.shareName Name - * of the Azure Files file share that provides storage for the volume. + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. * - * @param {string} volumeResourceDescription.name Volume resource name. + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. * - * @param {object} [options] Optional Parameters. + * @param {boolean} [options.skipCorrelationLookup] This param disables the + * search of CorrelatedEvents information if true is passed. otherwise the + * CorrelationEvents get processed and HasCorrelatedEvents field in every + * FabricEvent gets populated. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - createVolumeResourceWithHttpOperationResponse(volumeResourceName, volumeResourceDescription, options) { + getPartitionReplicaEventListWithHttpOperationResponse(partitionId, replicaId, startTimeUtc, endTimeUtc, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._createVolumeResource(volumeResourceName, volumeResourceDescription, options, (err, result, request, response) => { + self._getPartitionReplicaEventList(partitionId, replicaId, startTimeUtc, endTimeUtc, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -69674,35 +67930,38 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Creates or updates a volume resource. + * @summary Gets a Partition Replica-related events. * - * Creates a volume resource with the specified name and description. If a - * volume with the same name already exists, then its description is updated to - * the one indicated in this request. + * The response is list of ReplicaEvent objects. * - * @param {string} volumeResourceName Service Fabric volume resource name. + * @param {uuid} partitionId The identity of the partition. * - * @param {object} volumeResourceDescription Description for creating a volume - * resource. + * @param {string} replicaId The identifier of the replica. * - * @param {string} [volumeResourceDescription.description] User readable - * description of the volume. + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * - * @param {object} [volumeResourceDescription.azureFileParameters] This type - * describes a volume provided by an Azure Files file share. + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * - * @param {string} volumeResourceDescription.azureFileParameters.accountName - * Name of the Azure storage account for the File Share. + * @param {object} [options] Optional Parameters. * - * @param {string} [volumeResourceDescription.azureFileParameters.accountKey] - * Access key of the Azure storage account for the File Share. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {string} volumeResourceDescription.azureFileParameters.shareName Name - * of the Azure Files file share that provides storage for the volume. + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. * - * @param {string} volumeResourceDescription.name Volume resource name. + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. * - * @param {object} [options] Optional Parameters. + * @param {boolean} [options.skipCorrelationLookup] This param disables the + * search of CorrelatedEvents information if true is passed. otherwise the + * CorrelationEvents get processed and HasCorrelatedEvents field in every + * FabricEvent gets populated. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -69714,7 +67973,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error} - The error object. * @@ -69722,13 +67981,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createVolumeResource(volumeResourceName, volumeResourceDescription, options, optionalCallback) { + getPartitionReplicaEventList(partitionId, replicaId, startTimeUtc, endTimeUtc, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -69737,41 +67996,63 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createVolumeResource(volumeResourceName, volumeResourceDescription, options, (err, result, request, response) => { + self._getPartitionReplicaEventList(partitionId, replicaId, startTimeUtc, endTimeUtc, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createVolumeResource(volumeResourceName, volumeResourceDescription, options, optionalCallback); + return self._getPartitionReplicaEventList(partitionId, replicaId, startTimeUtc, endTimeUtc, options, optionalCallback); } } /** - * @summary Gets the volume resource. + * @summary Gets all Replicas-related events for a Partition. * - * Gets the information about the volume resource with a given name. This - * information includes the volume description and other runtime information. + * The response is list of ReplicaEvent objects. + * + * @param {uuid} partitionId The identity of the partition. + * + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * - * @param {string} volumeResourceName Service Fabric volume resource name. + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * @param {boolean} [options.skipCorrelationLookup] This param disables the + * search of CorrelatedEvents information if true is passed. otherwise the + * CorrelationEvents get processed and HasCorrelatedEvents field in every + * FabricEvent gets populated. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getVolumeResourceWithHttpOperationResponse(volumeResourceName, options) { + getPartitionReplicasEventListWithHttpOperationResponse(partitionId, startTimeUtc, endTimeUtc, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getVolumeResource(volumeResourceName, options, (err, result, request, response) => { + self._getPartitionReplicasEventList(partitionId, startTimeUtc, endTimeUtc, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -69782,15 +68063,37 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the volume resource. + * @summary Gets all Replicas-related events for a Partition. + * + * The response is list of ReplicaEvent objects. + * + * @param {uuid} partitionId The identity of the partition. * - * Gets the information about the volume resource with a given name. This - * information includes the volume description and other runtime information. + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * - * @param {string} volumeResourceName Service Fabric volume resource name. + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * @param {boolean} [options.skipCorrelationLookup] This param disables the + * search of CorrelatedEvents information if true is passed. otherwise the + * CorrelationEvents get processed and HasCorrelatedEvents field in every + * FabricEvent gets populated. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -69801,7 +68104,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {VolumeResourceDescription} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error} - The error object. * @@ -69809,15 +68112,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link VolumeResourceDescription} for more - * information. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getVolumeResource(volumeResourceName, options, optionalCallback) { + getPartitionReplicasEventList(partitionId, startTimeUtc, endTimeUtc, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -69826,40 +68127,45 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getVolumeResource(volumeResourceName, options, (err, result, request, response) => { + self._getPartitionReplicasEventList(partitionId, startTimeUtc, endTimeUtc, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getVolumeResource(volumeResourceName, options, optionalCallback); + return self._getPartitionReplicasEventList(partitionId, startTimeUtc, endTimeUtc, options, optionalCallback); } } /** - * @summary Deletes the volume resource. + * @summary Gets all correlated events for a given event. * - * Deletes the volume identified by the name. + * The response is list of FabricEvents. * - * @param {string} volumeResourceName Service Fabric volume resource name. + * @param {string} eventInstanceId The EventInstanceId. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - deleteVolumeResourceWithHttpOperationResponse(volumeResourceName, options) { + getCorrelatedEventListWithHttpOperationResponse(eventInstanceId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._deleteVolumeResource(volumeResourceName, options, (err, result, request, response) => { + self._getCorrelatedEventList(eventInstanceId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -69870,14 +68176,19 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Deletes the volume resource. + * @summary Gets all correlated events for a given event. * - * Deletes the volume identified by the name. + * The response is list of FabricEvents. * - * @param {string} volumeResourceName Service Fabric volume resource name. + * @param {string} eventInstanceId The EventInstanceId. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -69888,7 +68199,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error} - The error object. * @@ -69896,13 +68207,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteVolumeResource(volumeResourceName, options, optionalCallback) { + getCorrelatedEventList(eventInstanceId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -69911,14 +68222,14 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteVolumeResource(volumeResourceName, options, (err, result, request, response) => { + self._getCorrelatedEventList(eventInstanceId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteVolumeResource(volumeResourceName, options, optionalCallback); + return self._getCorrelatedEventList(eventInstanceId, options, optionalCallback); } } diff --git a/lib/services/serviceFabric/package.json b/lib/services/serviceFabric/package.json index f22243b4c5..7bc6c683f9 100644 --- a/lib/services/serviceFabric/package.json +++ b/lib/services/serviceFabric/package.json @@ -2,7 +2,7 @@ "name": "azure-servicefabric", "author": "Microsoft Corporation", "description": "ServiceFabricClient Library with typescript type definitions for node", - "version": "2.2.0", + "version": "3.0.0", "dependencies": { "ms-rest": "^2.3.3" }, @@ -21,4 +21,4 @@ "bugs": { "url": "https://github.com/azure/azure-sdk-for-node/issues" } -} \ No newline at end of file +} diff --git a/lib/services/spellCheck/lib/models/errorModel.js b/lib/services/spellCheck/lib/models/errorModel.js index 29a10321dd..d827e4885e 100644 --- a/lib/services/spellCheck/lib/models/errorModel.js +++ b/lib/services/spellCheck/lib/models/errorModel.js @@ -17,22 +17,22 @@ class ErrorModel { /** * Create a ErrorModel. - * @member {string} code The error code that identifies the category of + * @property {string} code The error code that identifies the category of * error. Possible values include: 'None', 'ServerError', 'InvalidRequest', * 'RateLimitExceeded', 'InvalidAuthorization', 'InsufficientAuthorization'. * Default value: 'None' . - * @member {string} [subCode] The error code that further helps to identify + * @property {string} [subCode] The error code that further helps to identify * the error. Possible values include: 'UnexpectedError', 'ResourceError', * 'NotImplemented', 'ParameterMissing', 'ParameterInvalidValue', * 'HttpNotAllowed', 'Blocked', 'AuthorizationMissing', * 'AuthorizationRedundancy', 'AuthorizationDisabled', 'AuthorizationExpired' - * @member {string} message A description of the error. - * @member {string} [moreDetails] A description that provides additional + * @property {string} message A description of the error. + * @property {string} [moreDetails] A description that provides additional * information about the error. - * @member {string} [parameter] The parameter in the request that caused the - * error. - * @member {string} [value] The parameter's value in the request that was not - * valid. + * @property {string} [parameter] The parameter in the request that caused + * the error. + * @property {string} [value] The parameter's value in the request that was + * not valid. */ constructor() { } diff --git a/lib/services/spellCheck/lib/models/errorResponse.js b/lib/services/spellCheck/lib/models/errorResponse.js index 72ecaea1a0..23d50f367b 100644 --- a/lib/services/spellCheck/lib/models/errorResponse.js +++ b/lib/services/spellCheck/lib/models/errorResponse.js @@ -20,8 +20,8 @@ const models = require('./index'); class ErrorResponse extends models['Response'] { /** * Create a ErrorResponse. - * @member {array} errors A list of errors that describe the reasons why the - * request failed. + * @property {array} errors A list of errors that describe the reasons why + * the request failed. */ constructor() { super(); diff --git a/lib/services/spellCheck/lib/models/identifiable.js b/lib/services/spellCheck/lib/models/identifiable.js index 6cc9e3d679..51ceb85de4 100644 --- a/lib/services/spellCheck/lib/models/identifiable.js +++ b/lib/services/spellCheck/lib/models/identifiable.js @@ -20,7 +20,7 @@ const models = require('./index'); class Identifiable extends models['ResponseBase'] { /** * Create a Identifiable. - * @member {string} [id] A String identifier. + * @property {string} [id] A String identifier. */ constructor() { super(); diff --git a/lib/services/spellCheck/lib/models/index.d.ts b/lib/services/spellCheck/lib/models/index.d.ts index 97ee7eb482..988b21a0f0 100644 --- a/lib/services/spellCheck/lib/models/index.d.ts +++ b/lib/services/spellCheck/lib/models/index.d.ts @@ -1,141 +1,102 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import * as moment from "moment"; - -/** - * @class - * Initializes a new instance of the SpellingTokenSuggestion class. - * @constructor - * @member {string} suggestion - * @member {number} [score] - * @member {string} [pingUrlSuffix] - */ export interface SpellingTokenSuggestion { suggestion: string; readonly score?: number; readonly pingUrlSuffix?: string; } -/** - * @class - * Initializes a new instance of the SpellingFlaggedToken class. - * @constructor - * @member {number} offset - * @member {string} token - * @member {string} type Possible values include: 'UnknownToken', - * 'RepeatedToken'. Default value: 'UnknownToken' . - * @member {array} [suggestions] - * @member {string} [pingUrlSuffix] - */ export interface SpellingFlaggedToken { offset: number; token: string; + /** + * Possible values include: 'UnknownToken', 'RepeatedToken' + */ type: string; readonly suggestions?: SpellingTokenSuggestion[]; readonly pingUrlSuffix?: string; } -/** - * @class - * Initializes a new instance of the ResponseBase class. - * @constructor - * @member {string} _type Polymorphic Discriminator - */ export interface ResponseBase { + /** + * Polymorphic Discriminator + */ _type: string; } /** - * @class - * Initializes a new instance of the Identifiable class. - * @constructor * Defines the identity of a resource. - * - * @member {string} [id] A String identifier. - */ +*/ export interface Identifiable extends ResponseBase { + /** + * A String identifier. + */ readonly id?: string; } /** - * @class - * Initializes a new instance of the Response class. - * @constructor - * Defines a response. All schemas that could be returned at the root of a - * response should inherit from this - * - */ + * Defines a response. All schemas that could be returned at the root of a response should inherit + * from this +*/ export interface Response extends Identifiable { } -/** - * @class - * Initializes a new instance of the Answer class. - * @constructor - */ export interface Answer extends Response { } -/** - * @class - * Initializes a new instance of the SpellCheck class. - * @constructor - * @member {array} flaggedTokens - */ export interface SpellCheck extends Answer { flaggedTokens: SpellingFlaggedToken[]; } /** - * @class - * Initializes a new instance of the ErrorModel class. - * @constructor * Defines the error that occurred. - * - * @member {string} code The error code that identifies the category of error. - * Possible values include: 'None', 'ServerError', 'InvalidRequest', - * 'RateLimitExceeded', 'InvalidAuthorization', 'InsufficientAuthorization'. - * Default value: 'None' . - * @member {string} [subCode] The error code that further helps to identify the - * error. Possible values include: 'UnexpectedError', 'ResourceError', - * 'NotImplemented', 'ParameterMissing', 'ParameterInvalidValue', - * 'HttpNotAllowed', 'Blocked', 'AuthorizationMissing', - * 'AuthorizationRedundancy', 'AuthorizationDisabled', 'AuthorizationExpired' - * @member {string} message A description of the error. - * @member {string} [moreDetails] A description that provides additional - * information about the error. - * @member {string} [parameter] The parameter in the request that caused the - * error. - * @member {string} [value] The parameter's value in the request that was not - * valid. - */ +*/ export interface ErrorModel { + /** + * The error code that identifies the category of error. Possible values include: 'None', + * 'ServerError', 'InvalidRequest', 'RateLimitExceeded', 'InvalidAuthorization', + * 'InsufficientAuthorization' + */ code: string; + /** + * The error code that further helps to identify the error. Possible values include: + * 'UnexpectedError', 'ResourceError', 'NotImplemented', 'ParameterMissing', + * 'ParameterInvalidValue', 'HttpNotAllowed', 'Blocked', 'AuthorizationMissing', + * 'AuthorizationRedundancy', 'AuthorizationDisabled', 'AuthorizationExpired' + */ readonly subCode?: string; + /** + * A description of the error. + */ message: string; + /** + * A description that provides additional information about the error. + */ readonly moreDetails?: string; + /** + * The parameter in the request that caused the error. + */ readonly parameter?: string; + /** + * The parameter's value in the request that was not valid. + */ readonly value?: string; } /** - * @class - * Initializes a new instance of the ErrorResponse class. - * @constructor * The top-level response that represents a failed request. - * - * @member {array} errors A list of errors that describe the reasons why the - * request failed. - */ +*/ export interface ErrorResponse extends Response { + /** + * A list of errors that describe the reasons why the request failed. + */ errors: ErrorModel[]; } diff --git a/lib/services/spellCheck/lib/models/responseBase.js b/lib/services/spellCheck/lib/models/responseBase.js index ffe3d9ee1b..557d5ec790 100644 --- a/lib/services/spellCheck/lib/models/responseBase.js +++ b/lib/services/spellCheck/lib/models/responseBase.js @@ -16,7 +16,7 @@ class ResponseBase { /** * Create a ResponseBase. - * @member {string} _type Polymorphic Discriminator + * @property {string} _type Polymorphic Discriminator */ constructor() { } diff --git a/lib/services/spellCheck/lib/models/spellCheck.js b/lib/services/spellCheck/lib/models/spellCheck.js index 4b21bdd44e..c223703422 100644 --- a/lib/services/spellCheck/lib/models/spellCheck.js +++ b/lib/services/spellCheck/lib/models/spellCheck.js @@ -19,7 +19,7 @@ const models = require('./index'); class SpellCheck extends models['Answer'] { /** * Create a SpellCheck. - * @member {array} flaggedTokens + * @property {array} flaggedTokens */ constructor() { super(); diff --git a/lib/services/spellCheck/lib/models/spellingFlaggedToken.js b/lib/services/spellCheck/lib/models/spellingFlaggedToken.js index 3741133d02..d6aba65621 100644 --- a/lib/services/spellCheck/lib/models/spellingFlaggedToken.js +++ b/lib/services/spellCheck/lib/models/spellingFlaggedToken.js @@ -10,20 +10,18 @@ 'use strict'; -const models = require('./index'); - /** * Class representing a SpellingFlaggedToken. */ class SpellingFlaggedToken { /** * Create a SpellingFlaggedToken. - * @member {number} offset - * @member {string} token - * @member {string} type Possible values include: 'UnknownToken', + * @property {number} offset + * @property {string} token + * @property {string} type Possible values include: 'UnknownToken', * 'RepeatedToken'. Default value: 'UnknownToken' . - * @member {array} [suggestions] - * @member {string} [pingUrlSuffix] + * @property {array} [suggestions] + * @property {string} [pingUrlSuffix] */ constructor() { } diff --git a/lib/services/spellCheck/lib/models/spellingTokenSuggestion.js b/lib/services/spellCheck/lib/models/spellingTokenSuggestion.js index 75e64edb03..77cdd31ab1 100644 --- a/lib/services/spellCheck/lib/models/spellingTokenSuggestion.js +++ b/lib/services/spellCheck/lib/models/spellingTokenSuggestion.js @@ -16,9 +16,9 @@ class SpellingTokenSuggestion { /** * Create a SpellingTokenSuggestion. - * @member {string} suggestion - * @member {number} [score] - * @member {string} [pingUrlSuffix] + * @property {string} suggestion + * @property {number} [score] + * @property {string} [pingUrlSuffix] */ constructor() { } diff --git a/lib/services/spellCheck/lib/spellCheckAPIClient.d.ts b/lib/services/spellCheck/lib/spellCheckClient.d.ts similarity index 97% rename from lib/services/spellCheck/lib/spellCheckAPIClient.d.ts rename to lib/services/spellCheck/lib/spellCheckClient.d.ts index f0241f0201..5d3b4c1843 100644 --- a/lib/services/spellCheck/lib/spellCheckAPIClient.d.ts +++ b/lib/services/spellCheck/lib/spellCheckClient.d.ts @@ -11,16 +11,24 @@ import { ServiceClient, ServiceClientOptions, ServiceCallback, HttpOperationResponse, ServiceClientCredentials } from 'ms-rest'; import * as models from "./models"; -export default class SpellCheckAPIClient extends ServiceClient { +/** + * SpellCheckClientOptions for SpellCheckClient. + */ +declare interface SpellCheckClientOptions extends ServiceClientOptions { + /** + * @property {string} [endpoint] - Supported Cognitive Services endpoints (protocol and hostname, for example: "https://westus.api.cognitive.microsoft.com", "https://api.cognitive.microsoft.com"). + */ + endpoint?: string; +} + +export default class SpellCheckClient extends ServiceClient { /** * @class - * Initializes a new instance of the SpellCheckAPIClient class. + * Initializes a new instance of the SpellCheckClient class. * @constructor * * @param {credentials} credentials - Subscription credentials which uniquely identify client subscription. * - * @param {string} [baseUri] - The base URI of the service. - * * @param {object} [options] - The parameter options * * @param {Array} [options.filters] - Filters to be added to the request pipeline @@ -30,11 +38,15 @@ export default class SpellCheckAPIClient extends ServiceClient { * * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy * + * @param {string} [options.endpoint] - Supported Cognitive Services endpoints (protocol and hostname, for example: "https://westus.api.cognitive.microsoft.com", "https://api.cognitive.microsoft.com"). + * */ - constructor(credentials: ServiceClientCredentials, baseUri?: string, options?: ServiceClientOptions); + constructor(credentials: ServiceClientCredentials, options?: SpellCheckClientOptions); credentials: ServiceClientCredentials; + endpoint: string; + /** * @summary The Bing Spell Check API lets you perform contextual grammar and @@ -499,4 +511,4 @@ export default class SpellCheckAPIClient extends ServiceClient { spellChecker(text: string, options: { acceptLanguage? : string, pragma? : string, userAgent? : string, clientId? : string, clientIp? : string, location? : string, actionType? : string, appName? : string, countryCode? : string, clientMachineName? : string, docId? : string, market? : string, sessionId? : string, setLang? : string, userId? : string, mode? : string, preContextText? : string, postContextText? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } -export { SpellCheckAPIClient, models as SpellCheckAPIModels }; +export { SpellCheckClient, models as SpellCheckModels }; diff --git a/lib/services/spellCheck/lib/spellCheckAPIClient.js b/lib/services/spellCheck/lib/spellCheckClient.js similarity index 98% rename from lib/services/spellCheck/lib/spellCheckAPIClient.js rename to lib/services/spellCheck/lib/spellCheckClient.js index cca1acb1d2..5307c1ca58 100644 --- a/lib/services/spellCheck/lib/spellCheckAPIClient.js +++ b/lib/services/spellCheck/lib/spellCheckClient.js @@ -279,6 +279,9 @@ function _spellChecker(text, options, callback) { let xBingApisSDK = 'true'; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (acceptLanguage !== null && acceptLanguage !== undefined && typeof acceptLanguage.valueOf() !== 'string') { throw new Error('acceptLanguage must be of type string.'); } @@ -343,6 +346,7 @@ function _spellChecker(text, options, callback) { // Construct URL let baseUrl = this.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'spellcheck'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); let queryParameters = []; if (actionType !== null && actionType !== undefined) { queryParameters.push('ActionType=' + encodeURIComponent(actionType)); @@ -482,19 +486,19 @@ function _spellChecker(text, options, callback) { }); } -/** Class representing a SpellCheckAPIClient. */ -class SpellCheckAPIClient extends ServiceClient { +/** Class representing a SpellCheckClient. */ +class SpellCheckClient extends ServiceClient { /** - * Create a SpellCheckAPIClient. + * Create a SpellCheckClient. * @param {credentials} credentials - Subscription credentials which uniquely identify client subscription. - * @param {string} [baseUri] - The base URI of the service. * @param {object} [options] - The parameter options * @param {Array} [options.filters] - Filters to be added to the request pipeline * @param {object} [options.requestOptions] - Options for the underlying request object * {@link https://github.com/request/request#requestoptions-callback Options doc} * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy + * @param {string} [options.endpoint] - Supported Cognitive Services endpoints (protocol and hostname, for example: "https://westus.api.cognitive.microsoft.com", "https://api.cognitive.microsoft.com"). */ - constructor(credentials, baseUri, options) { + constructor(credentials, options) { if (credentials === null || credentials === undefined) { throw new Error('\'credentials\' cannot be null.'); } @@ -503,14 +507,15 @@ class SpellCheckAPIClient extends ServiceClient { super(credentials, options); - this.baseUri = baseUri; - if (!this.baseUri) { - this.baseUri = 'https://api.cognitive.microsoft.com/bing/v7.0'; - } + this.endpoint = 'https://api.cognitive.microsoft.com'; + this.baseUri = '{Endpoint}/bing/v7.0'; this.credentials = credentials; let packageInfo = this.getPackageJsonInfo(__dirname); this.addUserAgentInfo(`${packageInfo.name}/${packageInfo.version}`); + if(options.endpoint !== null && options.endpoint !== undefined) { + this.endpoint = options.endpoint; + } this.models = models; this._spellChecker = _spellChecker; msRest.addSerializationMixin(this); @@ -1008,7 +1013,7 @@ class SpellCheckAPIClient extends ServiceClient { } -module.exports = SpellCheckAPIClient; -module.exports['default'] = SpellCheckAPIClient; -module.exports.SpellCheckAPIClient = SpellCheckAPIClient; -module.exports.SpellCheckAPIModels = models; +module.exports = SpellCheckClient; +module.exports['default'] = SpellCheckClient; +module.exports.SpellCheckClient = SpellCheckClient; +module.exports.SpellCheckModels = models; diff --git a/lib/services/spellCheck/package.json b/lib/services/spellCheck/package.json index e2b9e65d75..8cbf3a973b 100644 --- a/lib/services/spellCheck/package.json +++ b/lib/services/spellCheck/package.json @@ -1,8 +1,8 @@ { "name": "azure-cognitiveservices-spellcheck", "author": "Microsoft Corporation", - "description": "SpellCheckAPIClient Library with typescript type definitions for node", - "version": "1.1.0", + "description": "SpellCheckClient Library with typescript type definitions for node", + "version": "2.0.0", "dependencies": { "ms-rest": "^2.3.3" }, @@ -11,9 +11,9 @@ "azure" ], "license": "MIT", - "main": "./lib/spellCheckAPIClient.js", - "types": "./lib/spellCheckAPIClient.d.ts", - "homepage": "https://github.com/azure/azure-sdk-for-node/lib/services/spellCheck", + "main": "./lib/spellCheckClient.js", + "types": "./lib/spellCheckClient.d.ts", + "homepage": "https://github.com/azure/azure-sdk-for-node/tree/master/lib/services/spellCheck", "repository": { "type": "git", "url": "https://github.com/azure/azure-sdk-for-node.git" @@ -21,4 +21,4 @@ "bugs": { "url": "https://github.com/azure/azure-sdk-for-node/issues" } -} \ No newline at end of file +} diff --git a/lib/services/sqlvirtualmachineManagement/LICENSE.txt b/lib/services/sqlvirtualmachineManagement/LICENSE.txt new file mode 100644 index 0000000000..a70e8cf660 --- /dev/null +++ b/lib/services/sqlvirtualmachineManagement/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2018 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/lib/services/sqlvirtualmachineManagement/README.md b/lib/services/sqlvirtualmachineManagement/README.md new file mode 100644 index 0000000000..05a38f90e7 --- /dev/null +++ b/lib/services/sqlvirtualmachineManagement/README.md @@ -0,0 +1,46 @@ +--- +uid: azure-arm-sqlvirtualmachine +summary: *content + +--- +**This SDK will be deprecated next year and will be replaced by a new TypeScript-based isomorphic SDK (found at https://github.com/Azure/azure-sdk-for-js) which works on Node.js and browsers.** +## Microsoft Azure SDK for Node.js - SqlVirtualMachineManagementClient + +This project provides a Node.js package for accessing Azure. Right now it supports: +- **Node.js version 6.x.x or higher** + +### Features + + +### How to Install + +```bash +npm install azure-arm-sqlvirtualmachine +``` + +### How to use + +#### Authentication, client creation, and get availabilityGroupListeners as an example. + +```javascript +const msRestAzure = require("ms-rest-azure"); +const SqlVirtualMachineManagementClient = require("azure-arm-sqlvirtualmachine"); +msRestAzure.interactiveLogin().then((creds) => { + const subscriptionId = ""; + const client = new SqlVirtualMachineManagementClient(creds, subscriptionId); + const resourceGroupName = "testresourceGroupName"; + const sqlVirtualMachineGroupName = "testsqlVirtualMachineGroupName"; + const availabilityGroupListenerName = "testavailabilityGroupListenerName"; + + return client.availabilityGroupListeners.get(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName).then((result) => { + console.log("The result is:"); + console.log(result); + }); +}).catch((err) => { + console.log('An error occurred:'); + console.dir(err, {depth: null, colors: true}); +}); +``` +### Related projects + +- [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node) diff --git a/lib/services/sqlvirtualmachineManagement/lib/models/additionalFeaturesServerConfigurations.js b/lib/services/sqlvirtualmachineManagement/lib/models/additionalFeaturesServerConfigurations.js new file mode 100644 index 0000000000..0225ffecf4 --- /dev/null +++ b/lib/services/sqlvirtualmachineManagement/lib/models/additionalFeaturesServerConfigurations.js @@ -0,0 +1,53 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Additional SQL Server feature settings. + * + */ +class AdditionalFeaturesServerConfigurations { + /** + * Create a AdditionalFeaturesServerConfigurations. + * @property {boolean} [isRServicesEnabled] Enable or disable R services (SQL + * 2016 onwards). + */ + constructor() { + } + + /** + * Defines the metadata of AdditionalFeaturesServerConfigurations + * + * @returns {object} metadata of AdditionalFeaturesServerConfigurations + * + */ + mapper() { + return { + required: false, + serializedName: 'AdditionalFeaturesServerConfigurations', + type: { + name: 'Composite', + className: 'AdditionalFeaturesServerConfigurations', + modelProperties: { + isRServicesEnabled: { + required: false, + serializedName: 'isRServicesEnabled', + type: { + name: 'Boolean' + } + } + } + } + }; + } +} + +module.exports = AdditionalFeaturesServerConfigurations; diff --git a/lib/services/sqlvirtualmachineManagement/lib/models/autoBackupSettings.js b/lib/services/sqlvirtualmachineManagement/lib/models/autoBackupSettings.js new file mode 100644 index 0000000000..a9dd7a2366 --- /dev/null +++ b/lib/services/sqlvirtualmachineManagement/lib/models/autoBackupSettings.js @@ -0,0 +1,152 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Configure backups for databases in your SQL virtual machine. + * + */ +class AutoBackupSettings { + /** + * Create a AutoBackupSettings. + * @property {boolean} [enable] Enable or disable autobackup on SQL virtual + * machine. + * @property {boolean} [enableEncryption] Enable or disable encryption for + * backup on SQL virtual machine. + * @property {number} [retentionPeriod] Retention period of backup: 1-30 + * days. + * @property {string} [storageAccountUrl] Storage account url where backup + * will be taken to. + * @property {string} [storageAccessKey] Storage account key where backup + * will be taken to. + * @property {string} [password] Password for encryption on backup. + * @property {boolean} [backupSystemDbs] Include or exclude system databases + * from auto backup. + * @property {string} [backupScheduleType] Backup schedule type. Possible + * values include: 'Manual', 'Automated' + * @property {string} [fullBackupFrequency] Frequency of full backups. In + * both cases, full backups begin during the next scheduled time window. + * Possible values include: 'Daily', 'Weekly' + * @property {number} [fullBackupStartTime] Start time of a given day during + * which full backups can take place. 0-23 hours. + * @property {number} [fullBackupWindowHours] Duration of the time window of + * a given day during which full backups can take place. 1-23 hours. + * @property {number} [logBackupFrequency] Frequency of log backups. 5-60 + * minutes. + */ + constructor() { + } + + /** + * Defines the metadata of AutoBackupSettings + * + * @returns {object} metadata of AutoBackupSettings + * + */ + mapper() { + return { + required: false, + serializedName: 'AutoBackupSettings', + type: { + name: 'Composite', + className: 'AutoBackupSettings', + modelProperties: { + enable: { + required: false, + serializedName: 'enable', + type: { + name: 'Boolean' + } + }, + enableEncryption: { + required: false, + serializedName: 'enableEncryption', + type: { + name: 'Boolean' + } + }, + retentionPeriod: { + required: false, + serializedName: 'retentionPeriod', + type: { + name: 'Number' + } + }, + storageAccountUrl: { + required: false, + serializedName: 'storageAccountUrl', + type: { + name: 'String' + } + }, + storageAccessKey: { + required: false, + serializedName: 'storageAccessKey', + type: { + name: 'String' + } + }, + password: { + required: false, + serializedName: 'password', + type: { + name: 'String' + } + }, + backupSystemDbs: { + required: false, + serializedName: 'backupSystemDbs', + type: { + name: 'Boolean' + } + }, + backupScheduleType: { + required: false, + serializedName: 'backupScheduleType', + type: { + name: 'String' + } + }, + fullBackupFrequency: { + required: false, + serializedName: 'fullBackupFrequency', + type: { + name: 'String' + } + }, + fullBackupStartTime: { + required: false, + serializedName: 'fullBackupStartTime', + type: { + name: 'Number' + } + }, + fullBackupWindowHours: { + required: false, + serializedName: 'fullBackupWindowHours', + type: { + name: 'Number' + } + }, + logBackupFrequency: { + required: false, + serializedName: 'logBackupFrequency', + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = AutoBackupSettings; diff --git a/lib/services/sqlvirtualmachineManagement/lib/models/autoPatchingSettings.js b/lib/services/sqlvirtualmachineManagement/lib/models/autoPatchingSettings.js new file mode 100644 index 0000000000..ff32cf8646 --- /dev/null +++ b/lib/services/sqlvirtualmachineManagement/lib/models/autoPatchingSettings.js @@ -0,0 +1,81 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Set a patching window during which Windows and SQL patches will be applied. + * + */ +class AutoPatchingSettings { + /** + * Create a AutoPatchingSettings. + * @property {boolean} [enable] Enable or disable autopatching on SQL virtual + * machine. + * @property {string} [dayOfWeek] Day of week to apply the patch on. Possible + * values include: 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', + * 'Saturday', 'Sunday' + * @property {number} [maintenanceWindowStartingHour] Hour of the day when + * patching is initiated. Local VM time. + * @property {number} [maintenanceWindowDuration] Duration of patching. + */ + constructor() { + } + + /** + * Defines the metadata of AutoPatchingSettings + * + * @returns {object} metadata of AutoPatchingSettings + * + */ + mapper() { + return { + required: false, + serializedName: 'AutoPatchingSettings', + type: { + name: 'Composite', + className: 'AutoPatchingSettings', + modelProperties: { + enable: { + required: false, + serializedName: 'enable', + type: { + name: 'Boolean' + } + }, + dayOfWeek: { + required: false, + serializedName: 'dayOfWeek', + type: { + name: 'Enum', + allowedValues: [ 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday' ] + } + }, + maintenanceWindowStartingHour: { + required: false, + serializedName: 'maintenanceWindowStartingHour', + type: { + name: 'Number' + } + }, + maintenanceWindowDuration: { + required: false, + serializedName: 'maintenanceWindowDuration', + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = AutoPatchingSettings; diff --git a/lib/services/sqlvirtualmachineManagement/lib/models/availabilityGroupListener.js b/lib/services/sqlvirtualmachineManagement/lib/models/availabilityGroupListener.js new file mode 100644 index 0000000000..f50d661862 --- /dev/null +++ b/lib/services/sqlvirtualmachineManagement/lib/models/availabilityGroupListener.js @@ -0,0 +1,124 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * A SQL Server availability group listener. + * + * @extends models['ProxyResource'] + */ +class AvailabilityGroupListener extends models['ProxyResource'] { + /** + * Create a AvailabilityGroupListener. + * @property {string} [provisioningState] Provisioning state to track the + * aysnc operation status. + * @property {string} [availabilityGroupName] Name of the availability group. + * @property {array} [loadBalancerConfigurations] List of load balancer + * configurations for an availability group listener. + * @property {boolean} [createDefaultAvailabilityGroupIfNotExist] Create a + * default availability group if it does not exist. + * @property {number} [port] Listener port. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of AvailabilityGroupListener + * + * @returns {object} metadata of AvailabilityGroupListener + * + */ + mapper() { + return { + required: false, + serializedName: 'AvailabilityGroupListener', + type: { + name: 'Composite', + className: 'AvailabilityGroupListener', + modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, + provisioningState: { + required: false, + readOnly: true, + serializedName: 'properties.provisioningState', + type: { + name: 'String' + } + }, + availabilityGroupName: { + required: false, + serializedName: 'properties.availabilityGroupName', + type: { + name: 'String' + } + }, + loadBalancerConfigurations: { + required: false, + serializedName: 'properties.loadBalancerConfigurations', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'LoadBalancerConfigurationElementType', + type: { + name: 'Composite', + className: 'LoadBalancerConfiguration' + } + } + } + }, + createDefaultAvailabilityGroupIfNotExist: { + required: false, + serializedName: 'properties.createDefaultAvailabilityGroupIfNotExist', + type: { + name: 'Boolean' + } + }, + port: { + required: false, + serializedName: 'properties.port', + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = AvailabilityGroupListener; diff --git a/lib/services/sqlvirtualmachineManagement/lib/models/availabilityGroupListenerListResult.js b/lib/services/sqlvirtualmachineManagement/lib/models/availabilityGroupListenerListResult.js new file mode 100644 index 0000000000..c71503e95c --- /dev/null +++ b/lib/services/sqlvirtualmachineManagement/lib/models/availabilityGroupListenerListResult.js @@ -0,0 +1,69 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * A list of availability group listeners. + */ +class AvailabilityGroupListenerListResult extends Array { + /** + * Create a AvailabilityGroupListenerListResult. + * @property {string} [nextLink] Link to retrieve next page of results. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of AvailabilityGroupListenerListResult + * + * @returns {object} metadata of AvailabilityGroupListenerListResult + * + */ + mapper() { + return { + required: false, + serializedName: 'AvailabilityGroupListenerListResult', + type: { + name: 'Composite', + className: 'AvailabilityGroupListenerListResult', + modelProperties: { + value: { + required: false, + readOnly: true, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'AvailabilityGroupListenerElementType', + type: { + name: 'Composite', + className: 'AvailabilityGroupListener' + } + } + } + }, + nextLink: { + required: false, + readOnly: true, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = AvailabilityGroupListenerListResult; diff --git a/lib/services/sqlvirtualmachineManagement/lib/models/index.d.ts b/lib/services/sqlvirtualmachineManagement/lib/models/index.d.ts new file mode 100644 index 0000000000..8777fca5f9 --- /dev/null +++ b/lib/services/sqlvirtualmachineManagement/lib/models/index.d.ts @@ -0,0 +1,581 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { BaseResource, CloudError } from "ms-rest-azure"; +import * as moment from "moment"; + +export { + + BaseResource, + CloudError +}; + +/** + * A private IP address bound to the availability group listener. + */ +export interface PrivateIPAddress { + /** + * Private IP address bound to the availability group listener. + */ + ipAddress?: string; + /** + * Subnet used to include private IP. + */ + subnetResourceId?: string; +} + +/** + * A load balancer configuration for an availability group listener. + */ +export interface LoadBalancerConfiguration { + /** + * Private IP address. + */ + privateIpAddress?: PrivateIPAddress; + /** + * Resource id of the public IP. + */ + publicIpAddressResourceId?: string; + /** + * Resource id of the load balancer. + */ + loadBalancerResourceId?: string; + /** + * Probe port. + */ + probePort?: number; + /** + * List of the SQL virtual machine instance resource id's that are enrolled into the availability + * group listener. + */ + sqlVirtualMachineInstances?: string[]; +} + +/** + * ARM resource. + */ +export interface Resource extends BaseResource { + /** + * Resource ID. + */ + readonly id?: string; + /** + * Resource name. + */ + readonly name?: string; + /** + * Resource type. + */ + readonly type?: string; +} + +/** + * ARM proxy resource. + */ +export interface ProxyResource extends Resource { +} + +/** + * A SQL Server availability group listener. + */ +export interface AvailabilityGroupListener extends ProxyResource { + /** + * Provisioning state to track the aysnc operation status. + */ + readonly provisioningState?: string; + /** + * Name of the availability group. + */ + availabilityGroupName?: string; + /** + * List of load balancer configurations for an availability group listener. + */ + loadBalancerConfigurations?: LoadBalancerConfiguration[]; + /** + * Create a default availability group if it does not exist. + */ + createDefaultAvailabilityGroupIfNotExist?: boolean; + /** + * Listener port. + */ + port?: number; +} + +/** + * Display metadata associated with the operation. + */ +export interface OperationDisplay { + /** + * The localized friendly form of the resource provider name. + */ + readonly provider?: string; + /** + * The localized friendly form of the resource type related to this action/operation. + */ + readonly resource?: string; + /** + * The localized friendly name for the operation. + */ + readonly operation?: string; + /** + * The localized friendly description for the operation. + */ + readonly description?: string; +} + +/** + * SQL REST API operation definition. + */ +export interface Operation { + /** + * The name of the operation being performed on this particular object. + */ + readonly name?: string; + /** + * The localized display information for this particular operation / action. + */ + readonly display?: OperationDisplay; + /** + * The intended executor of the operation. Possible values include: 'user', 'system' + */ + readonly origin?: string; + /** + * Additional descriptions for the operation. + */ + readonly properties?: { [propertyName: string]: any }; +} + +/** + * Active Directory account details to operate Windows Server Failover Cluster. + */ +export interface WsfcDomainProfile { + /** + * Fully qualified name of the domain. + */ + domainFqdn?: string; + /** + * Organizational Unit path in which the nodes and cluster will be present. + */ + ouPath?: string; + /** + * Account name used for creating cluster (at minimum needs permissions to 'Create Computer + * Objects' in domain). + */ + clusterBootstrapAccount?: string; + /** + * Account name used for operating cluster i.e. will be part of administrators group on all the + * participating virtual machines in the cluster. + */ + clusterOperatorAccount?: string; + /** + * Account name under which SQL service will run on all participating SQL virtual machines in the + * cluster. + */ + sqlServiceAccount?: string; + /** + * Optional path for fileshare witness. + */ + fileShareWitnessPath?: string; + /** + * Fully qualified ARM resource id of the witness storage account. + */ + storageAccountUrl?: string; + /** + * Primary key of the witness storage account. + */ + storageAccountPrimaryKey?: string; +} + +/** + * ARM tracked top level resource. + */ +export interface TrackedResource extends Resource { + /** + * Resource location. + */ + location: string; + /** + * Resource tags. + */ + tags?: { [propertyName: string]: string }; +} + +/** + * A SQL virtual machine group. + */ +export interface SqlVirtualMachineGroup extends TrackedResource { + /** + * Provisioning state to track the aysnc operation status. + */ + readonly provisioningState?: string; + /** + * SQL image offer. Examples may include SQL2016-WS2016, SQL2017-WS2016. + */ + sqlImageOffer?: string; + /** + * SQL image sku. Possible values include: 'Developer', 'Enterprise' + */ + sqlImageSku?: string; + /** + * Scale type. Possible values include: 'HA' + */ + readonly scaleType?: string; + /** + * Type of cluster manager: Windows Server Failover Cluster (WSFC), implied by the scale type of + * the group and the OS type. Possible values include: 'WSFC' + */ + readonly clusterManagerType?: string; + /** + * Cluster type. Possible values include: 'Domainful' + */ + readonly clusterConfiguration?: string; + /** + * Cluster Active Directory domain profile. + */ + wsfcDomainProfile?: WsfcDomainProfile; +} + +/** + * An update to a SQL virtual machine group. + */ +export interface SqlVirtualMachineGroupUpdate { + /** + * Resource tags. + */ + tags?: { [propertyName: string]: string }; +} + +/** + * Azure Active Directory identity configuration for a resource. + */ +export interface ResourceIdentity { + /** + * The Azure Active Directory principal id. + */ + readonly principalId?: string; + /** + * The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an + * Azure Active Directory principal for the resource. Possible values include: 'SystemAssigned' + */ + type?: string; + /** + * The Azure Active Directory tenant id. + */ + readonly tenantId?: string; +} + +/** + * Domain credentials for setting up Windows Server Failover Cluster for SQL availability group. + */ +export interface WsfcDomainCredentials { + /** + * Cluster bootstrap account password. + */ + clusterBootstrapAccountPassword?: string; + /** + * Cluster operator account password. + */ + clusterOperatorAccountPassword?: string; + /** + * SQL service account password. + */ + sqlServiceAccountPassword?: string; +} + +/** + * Set a patching window during which Windows and SQL patches will be applied. + */ +export interface AutoPatchingSettings { + /** + * Enable or disable autopatching on SQL virtual machine. + */ + enable?: boolean; + /** + * Day of week to apply the patch on. Possible values include: 'Monday', 'Tuesday', 'Wednesday', + * 'Thursday', 'Friday', 'Saturday', 'Sunday' + */ + dayOfWeek?: string; + /** + * Hour of the day when patching is initiated. Local VM time. + */ + maintenanceWindowStartingHour?: number; + /** + * Duration of patching. + */ + maintenanceWindowDuration?: number; +} + +/** + * Configure backups for databases in your SQL virtual machine. + */ +export interface AutoBackupSettings { + /** + * Enable or disable autobackup on SQL virtual machine. + */ + enable?: boolean; + /** + * Enable or disable encryption for backup on SQL virtual machine. + */ + enableEncryption?: boolean; + /** + * Retention period of backup: 1-30 days. + */ + retentionPeriod?: number; + /** + * Storage account url where backup will be taken to. + */ + storageAccountUrl?: string; + /** + * Storage account key where backup will be taken to. + */ + storageAccessKey?: string; + /** + * Password for encryption on backup. + */ + password?: string; + /** + * Include or exclude system databases from auto backup. + */ + backupSystemDbs?: boolean; + /** + * Backup schedule type. Possible values include: 'Manual', 'Automated' + */ + backupScheduleType?: string; + /** + * Frequency of full backups. In both cases, full backups begin during the next scheduled time + * window. Possible values include: 'Daily', 'Weekly' + */ + fullBackupFrequency?: string; + /** + * Start time of a given day during which full backups can take place. 0-23 hours. + */ + fullBackupStartTime?: number; + /** + * Duration of the time window of a given day during which full backups can take place. 1-23 + * hours. + */ + fullBackupWindowHours?: number; + /** + * Frequency of log backups. 5-60 minutes. + */ + logBackupFrequency?: number; +} + +/** + * Configure your SQL virtual machine to be able to connect to the Azure Key Vault service. + */ +export interface KeyVaultCredentialSettings { + /** + * Enable or disable key vault credential setting. + */ + enable?: boolean; + /** + * Credential name. + */ + credentialName?: string; + /** + * Azure Key Vault url. + */ + azureKeyVaultUrl?: string; + /** + * Service principal name to access key vault. + */ + servicePrincipalName?: string; + /** + * Service principal name secret to access key vault. + */ + servicePrincipalSecret?: string; +} + +/** + * Set the access level and network port settings for SQL Server. + */ +export interface SqlConnectivityUpdateSettings { + /** + * SQL Server connectivity option. Possible values include: 'LOCAL', 'PRIVATE', 'PUBLIC' + */ + connectivityType?: string; + /** + * SQL Server port. + */ + port?: number; + /** + * SQL Server sysadmin login to create. + */ + sqlAuthUpdateUserName?: string; + /** + * SQL Server sysadmin login password. + */ + sqlAuthUpdatePassword?: string; +} + +/** + * Set workload type to optimize storage for SQL Server. + */ +export interface SqlWorkloadTypeUpdateSettings { + /** + * SQL Server workload type. Possible values include: 'GENERAL', 'OLTP', 'DW' + */ + sqlWorkloadType?: string; +} + +/** + * Set disk storage settings for SQL Server. + */ +export interface SqlStorageUpdateSettings { + /** + * Virtual machine disk count. + */ + diskCount?: number; + /** + * Disk configuration to apply to SQL Server. Possible values include: 'NEW', 'EXTEND', 'ADD' + */ + diskConfigurationType?: string; + /** + * Device id of the first disk to be updated. + */ + startingDeviceId?: number; +} + +/** + * Additional SQL Server feature settings. + */ +export interface AdditionalFeaturesServerConfigurations { + /** + * Enable or disable R services (SQL 2016 onwards). + */ + isRServicesEnabled?: boolean; +} + +/** + * Set the connectivity, storage and workload settings. + */ +export interface ServerConfigurationsManagementSettings { + /** + * SQL connectivity type settings. + */ + sqlConnectivityUpdateSettings?: SqlConnectivityUpdateSettings; + /** + * SQL workload type settings. + */ + sqlWorkloadTypeUpdateSettings?: SqlWorkloadTypeUpdateSettings; + /** + * SQL storage update settings. + */ + sqlStorageUpdateSettings?: SqlStorageUpdateSettings; + /** + * Additional SQL feature settings. + */ + additionalFeaturesServerConfigurations?: AdditionalFeaturesServerConfigurations; +} + +/** + * A SQL virtual machine. + */ +export interface SqlVirtualMachine extends TrackedResource { + /** + * Azure Active Directory identity of the server. + */ + identity?: ResourceIdentity; + /** + * ARM Resource id of underlying virtual machine created from SQL marketplace image. + */ + virtualMachineResourceId?: string; + /** + * Provisioning state to track the aysnc operation status. + */ + readonly provisioningState?: string; + /** + * SQL image offer. Examples include SQL2016-WS2016, SQL2017-WS2016. + */ + readonly sqlImageOffer?: string; + /** + * SQL Server license type. Possible values include: 'PAYG', 'AHUB' + */ + sqlServerLicenseType?: string; + /** + * SQL image sku. Possible values include: 'Developer', 'Express', 'Standard', 'Enterprise', + * 'Web' + */ + readonly sqlImageSku?: string; + /** + * ARM resource id of the SQL virtual machine group this SQL virtual machine is or will be part + * of. + */ + sqlVirtualMachineGroupResourceId?: string; + /** + * Domain credentials for setting up Windows Server Failover Cluster for SQL availability group. + */ + wsfcDomainCredentials?: WsfcDomainCredentials; + /** + * Auto patching settings for applying critical security updates to SQL virtual machine. + */ + autoPatchingSettings?: AutoPatchingSettings; + /** + * Auto backup settings for SQL Server. + */ + autoBackupSettings?: AutoBackupSettings; + /** + * Key vault credential settings. + */ + keyVaultCredentialSettings?: KeyVaultCredentialSettings; + /** + * SQL Server configuration management settings. + */ + serverConfigurationsManagementSettings?: ServerConfigurationsManagementSettings; +} + +/** + * An update to a SQL virtual machine. + */ +export interface SqlVirtualMachineUpdate { + /** + * Resource tags. + */ + tags?: { [propertyName: string]: string }; +} + +/** + * A list of availability group listeners. + */ +export interface AvailabilityGroupListenerListResult extends Array { + /** + * Link to retrieve next page of results. + */ + readonly nextLink?: string; +} + +/** + * Result of the request to list SQL operations. + */ +export interface OperationListResult extends Array { + /** + * Link to retrieve next page of results. + */ + readonly nextLink?: string; +} + +/** + * A list of SQL virtual machine groups. + */ +export interface SqlVirtualMachineGroupListResult extends Array { + /** + * Link to retrieve next page of results. + */ + readonly nextLink?: string; +} + +/** + * A list of SQL virtual machines. + */ +export interface SqlVirtualMachineListResult extends Array { + /** + * Link to retrieve next page of results. + */ + readonly nextLink?: string; +} diff --git a/lib/services/sqlvirtualmachineManagement/lib/models/index.js b/lib/services/sqlvirtualmachineManagement/lib/models/index.js new file mode 100644 index 0000000000..2eddd0259c --- /dev/null +++ b/lib/services/sqlvirtualmachineManagement/lib/models/index.js @@ -0,0 +1,47 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +/* jshint latedef:false */ +/* jshint forin:false */ +/* jshint noempty:false */ + +'use strict'; + +var msRestAzure = require('ms-rest-azure'); + +exports.BaseResource = msRestAzure.BaseResource; +exports.CloudError = msRestAzure.CloudError; +exports.PrivateIPAddress = require('./privateIPAddress'); +exports.LoadBalancerConfiguration = require('./loadBalancerConfiguration'); +exports.Resource = require('./resource'); +exports.ProxyResource = require('./proxyResource'); +exports.AvailabilityGroupListener = require('./availabilityGroupListener'); +exports.OperationDisplay = require('./operationDisplay'); +exports.Operation = require('./operation'); +exports.WsfcDomainProfile = require('./wsfcDomainProfile'); +exports.TrackedResource = require('./trackedResource'); +exports.SqlVirtualMachineGroup = require('./sqlVirtualMachineGroup'); +exports.SqlVirtualMachineGroupUpdate = require('./sqlVirtualMachineGroupUpdate'); +exports.ResourceIdentity = require('./resourceIdentity'); +exports.WsfcDomainCredentials = require('./wsfcDomainCredentials'); +exports.AutoPatchingSettings = require('./autoPatchingSettings'); +exports.AutoBackupSettings = require('./autoBackupSettings'); +exports.KeyVaultCredentialSettings = require('./keyVaultCredentialSettings'); +exports.SqlConnectivityUpdateSettings = require('./sqlConnectivityUpdateSettings'); +exports.SqlWorkloadTypeUpdateSettings = require('./sqlWorkloadTypeUpdateSettings'); +exports.SqlStorageUpdateSettings = require('./sqlStorageUpdateSettings'); +exports.AdditionalFeaturesServerConfigurations = require('./additionalFeaturesServerConfigurations'); +exports.ServerConfigurationsManagementSettings = require('./serverConfigurationsManagementSettings'); +exports.SqlVirtualMachine = require('./sqlVirtualMachine'); +exports.SqlVirtualMachineUpdate = require('./sqlVirtualMachineUpdate'); +exports.AvailabilityGroupListenerListResult = require('./availabilityGroupListenerListResult'); +exports.OperationListResult = require('./operationListResult'); +exports.SqlVirtualMachineGroupListResult = require('./sqlVirtualMachineGroupListResult'); +exports.SqlVirtualMachineListResult = require('./sqlVirtualMachineListResult'); diff --git a/lib/services/sqlvirtualmachineManagement/lib/models/keyVaultCredentialSettings.js b/lib/services/sqlvirtualmachineManagement/lib/models/keyVaultCredentialSettings.js new file mode 100644 index 0000000000..b4d674ae7c --- /dev/null +++ b/lib/services/sqlvirtualmachineManagement/lib/models/keyVaultCredentialSettings.js @@ -0,0 +1,88 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Configure your SQL virtual machine to be able to connect to the Azure Key + * Vault service. + * + */ +class KeyVaultCredentialSettings { + /** + * Create a KeyVaultCredentialSettings. + * @property {boolean} [enable] Enable or disable key vault credential + * setting. + * @property {string} [credentialName] Credential name. + * @property {string} [azureKeyVaultUrl] Azure Key Vault url. + * @property {string} [servicePrincipalName] Service principal name to access + * key vault. + * @property {string} [servicePrincipalSecret] Service principal name secret + * to access key vault. + */ + constructor() { + } + + /** + * Defines the metadata of KeyVaultCredentialSettings + * + * @returns {object} metadata of KeyVaultCredentialSettings + * + */ + mapper() { + return { + required: false, + serializedName: 'KeyVaultCredentialSettings', + type: { + name: 'Composite', + className: 'KeyVaultCredentialSettings', + modelProperties: { + enable: { + required: false, + serializedName: 'enable', + type: { + name: 'Boolean' + } + }, + credentialName: { + required: false, + serializedName: 'credentialName', + type: { + name: 'String' + } + }, + azureKeyVaultUrl: { + required: false, + serializedName: 'azureKeyVaultUrl', + type: { + name: 'String' + } + }, + servicePrincipalName: { + required: false, + serializedName: 'servicePrincipalName', + type: { + name: 'String' + } + }, + servicePrincipalSecret: { + required: false, + serializedName: 'servicePrincipalSecret', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = KeyVaultCredentialSettings; diff --git a/lib/services/sqlvirtualmachineManagement/lib/models/loadBalancerConfiguration.js b/lib/services/sqlvirtualmachineManagement/lib/models/loadBalancerConfiguration.js new file mode 100644 index 0000000000..0b599e9ef4 --- /dev/null +++ b/lib/services/sqlvirtualmachineManagement/lib/models/loadBalancerConfiguration.js @@ -0,0 +1,100 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * A load balancer configuration for an availability group listener. + * + */ +class LoadBalancerConfiguration { + /** + * Create a LoadBalancerConfiguration. + * @property {object} [privateIpAddress] Private IP address. + * @property {string} [privateIpAddress.ipAddress] Private IP address bound + * to the availability group listener. + * @property {string} [privateIpAddress.subnetResourceId] Subnet used to + * include private IP. + * @property {string} [publicIpAddressResourceId] Resource id of the public + * IP. + * @property {string} [loadBalancerResourceId] Resource id of the load + * balancer. + * @property {number} [probePort] Probe port. + * @property {array} [sqlVirtualMachineInstances] List of the SQL virtual + * machine instance resource id's that are enrolled into the availability + * group listener. + */ + constructor() { + } + + /** + * Defines the metadata of LoadBalancerConfiguration + * + * @returns {object} metadata of LoadBalancerConfiguration + * + */ + mapper() { + return { + required: false, + serializedName: 'LoadBalancerConfiguration', + type: { + name: 'Composite', + className: 'LoadBalancerConfiguration', + modelProperties: { + privateIpAddress: { + required: false, + serializedName: 'privateIpAddress', + type: { + name: 'Composite', + className: 'PrivateIPAddress' + } + }, + publicIpAddressResourceId: { + required: false, + serializedName: 'publicIpAddressResourceId', + type: { + name: 'String' + } + }, + loadBalancerResourceId: { + required: false, + serializedName: 'loadBalancerResourceId', + type: { + name: 'String' + } + }, + probePort: { + required: false, + serializedName: 'probePort', + type: { + name: 'Number' + } + }, + sqlVirtualMachineInstances: { + required: false, + serializedName: 'sqlVirtualMachineInstances', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + }; + } +} + +module.exports = LoadBalancerConfiguration; diff --git a/lib/services/sqlvirtualmachineManagement/lib/models/operation.js b/lib/services/sqlvirtualmachineManagement/lib/models/operation.js new file mode 100644 index 0000000000..9f2a00e1af --- /dev/null +++ b/lib/services/sqlvirtualmachineManagement/lib/models/operation.js @@ -0,0 +1,99 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * SQL REST API operation definition. + * + */ +class Operation { + /** + * Create a Operation. + * @property {string} [name] The name of the operation being performed on + * this particular object. + * @property {object} [display] The localized display information for this + * particular operation / action. + * @property {string} [display.provider] The localized friendly form of the + * resource provider name. + * @property {string} [display.resource] The localized friendly form of the + * resource type related to this action/operation. + * @property {string} [display.operation] The localized friendly name for the + * operation. + * @property {string} [display.description] The localized friendly + * description for the operation. + * @property {string} [origin] The intended executor of the operation. + * Possible values include: 'user', 'system' + * @property {object} [properties] Additional descriptions for the operation. + */ + constructor() { + } + + /** + * Defines the metadata of Operation + * + * @returns {object} metadata of Operation + * + */ + mapper() { + return { + required: false, + serializedName: 'Operation', + type: { + name: 'Composite', + className: 'Operation', + modelProperties: { + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + display: { + required: false, + readOnly: true, + serializedName: 'display', + type: { + name: 'Composite', + className: 'OperationDisplay' + } + }, + origin: { + required: false, + readOnly: true, + serializedName: 'origin', + type: { + name: 'String' + } + }, + properties: { + required: false, + readOnly: true, + serializedName: 'properties', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'ObjectElementType', + type: { + name: 'Object' + } + } + } + } + } + } + }; + } +} + +module.exports = Operation; diff --git a/lib/services/sqlvirtualmachineManagement/lib/models/operationDisplay.js b/lib/services/sqlvirtualmachineManagement/lib/models/operationDisplay.js new file mode 100644 index 0000000000..8ed41f761d --- /dev/null +++ b/lib/services/sqlvirtualmachineManagement/lib/models/operationDisplay.js @@ -0,0 +1,84 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Display metadata associated with the operation. + * + */ +class OperationDisplay { + /** + * Create a OperationDisplay. + * @property {string} [provider] The localized friendly form of the resource + * provider name. + * @property {string} [resource] The localized friendly form of the resource + * type related to this action/operation. + * @property {string} [operation] The localized friendly name for the + * operation. + * @property {string} [description] The localized friendly description for + * the operation. + */ + constructor() { + } + + /** + * Defines the metadata of OperationDisplay + * + * @returns {object} metadata of OperationDisplay + * + */ + mapper() { + return { + required: false, + serializedName: 'OperationDisplay', + type: { + name: 'Composite', + className: 'OperationDisplay', + modelProperties: { + provider: { + required: false, + readOnly: true, + serializedName: 'provider', + type: { + name: 'String' + } + }, + resource: { + required: false, + readOnly: true, + serializedName: 'resource', + type: { + name: 'String' + } + }, + operation: { + required: false, + readOnly: true, + serializedName: 'operation', + type: { + name: 'String' + } + }, + description: { + required: false, + readOnly: true, + serializedName: 'description', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = OperationDisplay; diff --git a/lib/services/sqlvirtualmachineManagement/lib/models/operationListResult.js b/lib/services/sqlvirtualmachineManagement/lib/models/operationListResult.js new file mode 100644 index 0000000000..a6179c8d07 --- /dev/null +++ b/lib/services/sqlvirtualmachineManagement/lib/models/operationListResult.js @@ -0,0 +1,69 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Result of the request to list SQL operations. + */ +class OperationListResult extends Array { + /** + * Create a OperationListResult. + * @property {string} [nextLink] Link to retrieve next page of results. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of OperationListResult + * + * @returns {object} metadata of OperationListResult + * + */ + mapper() { + return { + required: false, + serializedName: 'OperationListResult', + type: { + name: 'Composite', + className: 'OperationListResult', + modelProperties: { + value: { + required: false, + readOnly: true, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'OperationElementType', + type: { + name: 'Composite', + className: 'Operation' + } + } + } + }, + nextLink: { + required: false, + readOnly: true, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = OperationListResult; diff --git a/lib/services/sqlvirtualmachineManagement/lib/models/privateIPAddress.js b/lib/services/sqlvirtualmachineManagement/lib/models/privateIPAddress.js new file mode 100644 index 0000000000..774e4cf7fb --- /dev/null +++ b/lib/services/sqlvirtualmachineManagement/lib/models/privateIPAddress.js @@ -0,0 +1,61 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * A private IP address bound to the availability group listener. + * + */ +class PrivateIPAddress { + /** + * Create a PrivateIPAddress. + * @property {string} [ipAddress] Private IP address bound to the + * availability group listener. + * @property {string} [subnetResourceId] Subnet used to include private IP. + */ + constructor() { + } + + /** + * Defines the metadata of PrivateIPAddress + * + * @returns {object} metadata of PrivateIPAddress + * + */ + mapper() { + return { + required: false, + serializedName: 'PrivateIPAddress', + type: { + name: 'Composite', + className: 'PrivateIPAddress', + modelProperties: { + ipAddress: { + required: false, + serializedName: 'ipAddress', + type: { + name: 'String' + } + }, + subnetResourceId: { + required: false, + serializedName: 'subnetResourceId', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = PrivateIPAddress; diff --git a/lib/services/sqlvirtualmachineManagement/lib/models/proxyResource.js b/lib/services/sqlvirtualmachineManagement/lib/models/proxyResource.js new file mode 100644 index 0000000000..4ea685046e --- /dev/null +++ b/lib/services/sqlvirtualmachineManagement/lib/models/proxyResource.js @@ -0,0 +1,72 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * ARM proxy resource. + * + * @extends models['Resource'] + */ +class ProxyResource extends models['Resource'] { + /** + * Create a ProxyResource. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ProxyResource + * + * @returns {object} metadata of ProxyResource + * + */ + mapper() { + return { + required: false, + serializedName: 'ProxyResource', + type: { + name: 'Composite', + className: 'ProxyResource', + modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ProxyResource; diff --git a/lib/services/sqlvirtualmachineManagement/lib/models/resource.js b/lib/services/sqlvirtualmachineManagement/lib/models/resource.js new file mode 100644 index 0000000000..9ccac357d1 --- /dev/null +++ b/lib/services/sqlvirtualmachineManagement/lib/models/resource.js @@ -0,0 +1,75 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * ARM resource. + * + * @extends models['BaseResource'] + */ +class Resource extends models['BaseResource'] { + /** + * Create a Resource. + * @property {string} [id] Resource ID. + * @property {string} [name] Resource name. + * @property {string} [type] Resource type. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of Resource + * + * @returns {object} metadata of Resource + * + */ + mapper() { + return { + required: false, + serializedName: 'Resource', + type: { + name: 'Composite', + className: 'Resource', + modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = Resource; diff --git a/lib/services/sqlvirtualmachineManagement/lib/models/resourceIdentity.js b/lib/services/sqlvirtualmachineManagement/lib/models/resourceIdentity.js new file mode 100644 index 0000000000..7082928fc1 --- /dev/null +++ b/lib/services/sqlvirtualmachineManagement/lib/models/resourceIdentity.js @@ -0,0 +1,72 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Azure Active Directory identity configuration for a resource. + * + */ +class ResourceIdentity { + /** + * Create a ResourceIdentity. + * @property {uuid} [principalId] The Azure Active Directory principal id. + * @property {string} [type] The identity type. Set this to 'SystemAssigned' + * in order to automatically create and assign an Azure Active Directory + * principal for the resource. Possible values include: 'SystemAssigned' + * @property {uuid} [tenantId] The Azure Active Directory tenant id. + */ + constructor() { + } + + /** + * Defines the metadata of ResourceIdentity + * + * @returns {object} metadata of ResourceIdentity + * + */ + mapper() { + return { + required: false, + serializedName: 'ResourceIdentity', + type: { + name: 'Composite', + className: 'ResourceIdentity', + modelProperties: { + principalId: { + required: false, + readOnly: true, + serializedName: 'principalId', + type: { + name: 'String' + } + }, + type: { + required: false, + serializedName: 'type', + type: { + name: 'String' + } + }, + tenantId: { + required: false, + readOnly: true, + serializedName: 'tenantId', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ResourceIdentity; diff --git a/lib/services/sqlvirtualmachineManagement/lib/models/serverConfigurationsManagementSettings.js b/lib/services/sqlvirtualmachineManagement/lib/models/serverConfigurationsManagementSettings.js new file mode 100644 index 0000000000..ded7a6544e --- /dev/null +++ b/lib/services/sqlvirtualmachineManagement/lib/models/serverConfigurationsManagementSettings.js @@ -0,0 +1,103 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Set the connectivity, storage and workload settings. + * + */ +class ServerConfigurationsManagementSettings { + /** + * Create a ServerConfigurationsManagementSettings. + * @property {object} [sqlConnectivityUpdateSettings] SQL connectivity type + * settings. + * @property {string} [sqlConnectivityUpdateSettings.connectivityType] SQL + * Server connectivity option. Possible values include: 'LOCAL', 'PRIVATE', + * 'PUBLIC' + * @property {number} [sqlConnectivityUpdateSettings.port] SQL Server port. + * @property {string} [sqlConnectivityUpdateSettings.sqlAuthUpdateUserName] + * SQL Server sysadmin login to create. + * @property {string} [sqlConnectivityUpdateSettings.sqlAuthUpdatePassword] + * SQL Server sysadmin login password. + * @property {object} [sqlWorkloadTypeUpdateSettings] SQL workload type + * settings. + * @property {string} [sqlWorkloadTypeUpdateSettings.sqlWorkloadType] SQL + * Server workload type. Possible values include: 'GENERAL', 'OLTP', 'DW' + * @property {object} [sqlStorageUpdateSettings] SQL storage update settings. + * @property {number} [sqlStorageUpdateSettings.diskCount] Virtual machine + * disk count. + * @property {string} [sqlStorageUpdateSettings.diskConfigurationType] Disk + * configuration to apply to SQL Server. Possible values include: 'NEW', + * 'EXTEND', 'ADD' + * @property {number} [sqlStorageUpdateSettings.startingDeviceId] Device id + * of the first disk to be updated. + * @property {object} [additionalFeaturesServerConfigurations] Additional SQL + * feature settings. + * @property {boolean} + * [additionalFeaturesServerConfigurations.isRServicesEnabled] Enable or + * disable R services (SQL 2016 onwards). + */ + constructor() { + } + + /** + * Defines the metadata of ServerConfigurationsManagementSettings + * + * @returns {object} metadata of ServerConfigurationsManagementSettings + * + */ + mapper() { + return { + required: false, + serializedName: 'ServerConfigurationsManagementSettings', + type: { + name: 'Composite', + className: 'ServerConfigurationsManagementSettings', + modelProperties: { + sqlConnectivityUpdateSettings: { + required: false, + serializedName: 'sqlConnectivityUpdateSettings', + type: { + name: 'Composite', + className: 'SqlConnectivityUpdateSettings' + } + }, + sqlWorkloadTypeUpdateSettings: { + required: false, + serializedName: 'sqlWorkloadTypeUpdateSettings', + type: { + name: 'Composite', + className: 'SqlWorkloadTypeUpdateSettings' + } + }, + sqlStorageUpdateSettings: { + required: false, + serializedName: 'sqlStorageUpdateSettings', + type: { + name: 'Composite', + className: 'SqlStorageUpdateSettings' + } + }, + additionalFeaturesServerConfigurations: { + required: false, + serializedName: 'additionalFeaturesServerConfigurations', + type: { + name: 'Composite', + className: 'AdditionalFeaturesServerConfigurations' + } + } + } + } + }; + } +} + +module.exports = ServerConfigurationsManagementSettings; diff --git a/lib/services/sqlvirtualmachineManagement/lib/models/sqlConnectivityUpdateSettings.js b/lib/services/sqlvirtualmachineManagement/lib/models/sqlConnectivityUpdateSettings.js new file mode 100644 index 0000000000..305f96edba --- /dev/null +++ b/lib/services/sqlvirtualmachineManagement/lib/models/sqlConnectivityUpdateSettings.js @@ -0,0 +1,79 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Set the access level and network port settings for SQL Server. + * + */ +class SqlConnectivityUpdateSettings { + /** + * Create a SqlConnectivityUpdateSettings. + * @property {string} [connectivityType] SQL Server connectivity option. + * Possible values include: 'LOCAL', 'PRIVATE', 'PUBLIC' + * @property {number} [port] SQL Server port. + * @property {string} [sqlAuthUpdateUserName] SQL Server sysadmin login to + * create. + * @property {string} [sqlAuthUpdatePassword] SQL Server sysadmin login + * password. + */ + constructor() { + } + + /** + * Defines the metadata of SqlConnectivityUpdateSettings + * + * @returns {object} metadata of SqlConnectivityUpdateSettings + * + */ + mapper() { + return { + required: false, + serializedName: 'SqlConnectivityUpdateSettings', + type: { + name: 'Composite', + className: 'SqlConnectivityUpdateSettings', + modelProperties: { + connectivityType: { + required: false, + serializedName: 'connectivityType', + type: { + name: 'String' + } + }, + port: { + required: false, + serializedName: 'port', + type: { + name: 'Number' + } + }, + sqlAuthUpdateUserName: { + required: false, + serializedName: 'sqlAuthUpdateUserName', + type: { + name: 'String' + } + }, + sqlAuthUpdatePassword: { + required: false, + serializedName: 'sqlAuthUpdatePassword', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = SqlConnectivityUpdateSettings; diff --git a/lib/services/sqlvirtualmachineManagement/lib/models/sqlStorageUpdateSettings.js b/lib/services/sqlvirtualmachineManagement/lib/models/sqlStorageUpdateSettings.js new file mode 100644 index 0000000000..b2a51057bb --- /dev/null +++ b/lib/services/sqlvirtualmachineManagement/lib/models/sqlStorageUpdateSettings.js @@ -0,0 +1,70 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Set disk storage settings for SQL Server. + * + */ +class SqlStorageUpdateSettings { + /** + * Create a SqlStorageUpdateSettings. + * @property {number} [diskCount] Virtual machine disk count. + * @property {string} [diskConfigurationType] Disk configuration to apply to + * SQL Server. Possible values include: 'NEW', 'EXTEND', 'ADD' + * @property {number} [startingDeviceId] Device id of the first disk to be + * updated. + */ + constructor() { + } + + /** + * Defines the metadata of SqlStorageUpdateSettings + * + * @returns {object} metadata of SqlStorageUpdateSettings + * + */ + mapper() { + return { + required: false, + serializedName: 'SqlStorageUpdateSettings', + type: { + name: 'Composite', + className: 'SqlStorageUpdateSettings', + modelProperties: { + diskCount: { + required: false, + serializedName: 'diskCount', + type: { + name: 'Number' + } + }, + diskConfigurationType: { + required: false, + serializedName: 'diskConfigurationType', + type: { + name: 'String' + } + }, + startingDeviceId: { + required: false, + serializedName: 'startingDeviceId', + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = SqlStorageUpdateSettings; diff --git a/lib/services/sqlvirtualmachineManagement/lib/models/sqlVirtualMachine.js b/lib/services/sqlvirtualmachineManagement/lib/models/sqlVirtualMachine.js new file mode 100644 index 0000000000..ff0f488c07 --- /dev/null +++ b/lib/services/sqlvirtualmachineManagement/lib/models/sqlVirtualMachine.js @@ -0,0 +1,310 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * A SQL virtual machine. + * + * @extends models['TrackedResource'] + */ +class SqlVirtualMachine extends models['TrackedResource'] { + /** + * Create a SqlVirtualMachine. + * @property {object} [identity] Azure Active Directory identity of the + * server. + * @property {uuid} [identity.principalId] The Azure Active Directory + * principal id. + * @property {string} [identity.type] The identity type. Set this to + * 'SystemAssigned' in order to automatically create and assign an Azure + * Active Directory principal for the resource. Possible values include: + * 'SystemAssigned' + * @property {uuid} [identity.tenantId] The Azure Active Directory tenant id. + * @property {string} [virtualMachineResourceId] ARM Resource id of + * underlying virtual machine created from SQL marketplace image. + * @property {string} [provisioningState] Provisioning state to track the + * aysnc operation status. + * @property {string} [sqlImageOffer] SQL image offer. Examples include + * SQL2016-WS2016, SQL2017-WS2016. + * @property {string} [sqlServerLicenseType] SQL Server license type. + * Possible values include: 'PAYG', 'AHUB' + * @property {string} [sqlImageSku] SQL image sku. Possible values include: + * 'Developer', 'Express', 'Standard', 'Enterprise', 'Web' + * @property {string} [sqlVirtualMachineGroupResourceId] ARM resource id of + * the SQL virtual machine group this SQL virtual machine is or will be part + * of. + * @property {object} [wsfcDomainCredentials] Domain credentials for setting + * up Windows Server Failover Cluster for SQL availability group. + * @property {string} [wsfcDomainCredentials.clusterBootstrapAccountPassword] + * Cluster bootstrap account password. + * @property {string} [wsfcDomainCredentials.clusterOperatorAccountPassword] + * Cluster operator account password. + * @property {string} [wsfcDomainCredentials.sqlServiceAccountPassword] SQL + * service account password. + * @property {object} [autoPatchingSettings] Auto patching settings for + * applying critical security updates to SQL virtual machine. + * @property {boolean} [autoPatchingSettings.enable] Enable or disable + * autopatching on SQL virtual machine. + * @property {string} [autoPatchingSettings.dayOfWeek] Day of week to apply + * the patch on. Possible values include: 'Monday', 'Tuesday', 'Wednesday', + * 'Thursday', 'Friday', 'Saturday', 'Sunday' + * @property {number} [autoPatchingSettings.maintenanceWindowStartingHour] + * Hour of the day when patching is initiated. Local VM time. + * @property {number} [autoPatchingSettings.maintenanceWindowDuration] + * Duration of patching. + * @property {object} [autoBackupSettings] Auto backup settings for SQL + * Server. + * @property {boolean} [autoBackupSettings.enable] Enable or disable + * autobackup on SQL virtual machine. + * @property {boolean} [autoBackupSettings.enableEncryption] Enable or + * disable encryption for backup on SQL virtual machine. + * @property {number} [autoBackupSettings.retentionPeriod] Retention period + * of backup: 1-30 days. + * @property {string} [autoBackupSettings.storageAccountUrl] Storage account + * url where backup will be taken to. + * @property {string} [autoBackupSettings.storageAccessKey] Storage account + * key where backup will be taken to. + * @property {string} [autoBackupSettings.password] Password for encryption + * on backup. + * @property {boolean} [autoBackupSettings.backupSystemDbs] Include or + * exclude system databases from auto backup. + * @property {string} [autoBackupSettings.backupScheduleType] Backup schedule + * type. Possible values include: 'Manual', 'Automated' + * @property {string} [autoBackupSettings.fullBackupFrequency] Frequency of + * full backups. In both cases, full backups begin during the next scheduled + * time window. Possible values include: 'Daily', 'Weekly' + * @property {number} [autoBackupSettings.fullBackupStartTime] Start time of + * a given day during which full backups can take place. 0-23 hours. + * @property {number} [autoBackupSettings.fullBackupWindowHours] Duration of + * the time window of a given day during which full backups can take place. + * 1-23 hours. + * @property {number} [autoBackupSettings.logBackupFrequency] Frequency of + * log backups. 5-60 minutes. + * @property {object} [keyVaultCredentialSettings] Key vault credential + * settings. + * @property {boolean} [keyVaultCredentialSettings.enable] Enable or disable + * key vault credential setting. + * @property {string} [keyVaultCredentialSettings.credentialName] Credential + * name. + * @property {string} [keyVaultCredentialSettings.azureKeyVaultUrl] Azure Key + * Vault url. + * @property {string} [keyVaultCredentialSettings.servicePrincipalName] + * Service principal name to access key vault. + * @property {string} [keyVaultCredentialSettings.servicePrincipalSecret] + * Service principal name secret to access key vault. + * @property {object} [serverConfigurationsManagementSettings] SQL Server + * configuration management settings. + * @property {object} + * [serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings] SQL + * connectivity type settings. + * @property {string} + * [serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings.connectivityType] + * SQL Server connectivity option. Possible values include: 'LOCAL', + * 'PRIVATE', 'PUBLIC' + * @property {number} + * [serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings.port] + * SQL Server port. + * @property {string} + * [serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings.sqlAuthUpdateUserName] + * SQL Server sysadmin login to create. + * @property {string} + * [serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings.sqlAuthUpdatePassword] + * SQL Server sysadmin login password. + * @property {object} + * [serverConfigurationsManagementSettings.sqlWorkloadTypeUpdateSettings] SQL + * workload type settings. + * @property {string} + * [serverConfigurationsManagementSettings.sqlWorkloadTypeUpdateSettings.sqlWorkloadType] + * SQL Server workload type. Possible values include: 'GENERAL', 'OLTP', 'DW' + * @property {object} + * [serverConfigurationsManagementSettings.sqlStorageUpdateSettings] SQL + * storage update settings. + * @property {number} + * [serverConfigurationsManagementSettings.sqlStorageUpdateSettings.diskCount] + * Virtual machine disk count. + * @property {string} + * [serverConfigurationsManagementSettings.sqlStorageUpdateSettings.diskConfigurationType] + * Disk configuration to apply to SQL Server. Possible values include: 'NEW', + * 'EXTEND', 'ADD' + * @property {number} + * [serverConfigurationsManagementSettings.sqlStorageUpdateSettings.startingDeviceId] + * Device id of the first disk to be updated. + * @property {object} + * [serverConfigurationsManagementSettings.additionalFeaturesServerConfigurations] + * Additional SQL feature settings. + * @property {boolean} + * [serverConfigurationsManagementSettings.additionalFeaturesServerConfigurations.isRServicesEnabled] + * Enable or disable R services (SQL 2016 onwards). + */ + constructor() { + super(); + } + + /** + * Defines the metadata of SqlVirtualMachine + * + * @returns {object} metadata of SqlVirtualMachine + * + */ + mapper() { + return { + required: false, + serializedName: 'SqlVirtualMachine', + type: { + name: 'Composite', + className: 'SqlVirtualMachine', + modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, + location: { + required: true, + serializedName: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + identity: { + required: false, + serializedName: 'identity', + type: { + name: 'Composite', + className: 'ResourceIdentity' + } + }, + virtualMachineResourceId: { + required: false, + serializedName: 'properties.virtualMachineResourceId', + type: { + name: 'String' + } + }, + provisioningState: { + required: false, + readOnly: true, + serializedName: 'properties.provisioningState', + type: { + name: 'String' + } + }, + sqlImageOffer: { + required: false, + readOnly: true, + serializedName: 'properties.sqlImageOffer', + type: { + name: 'String' + } + }, + sqlServerLicenseType: { + required: false, + serializedName: 'properties.sqlServerLicenseType', + type: { + name: 'String' + } + }, + sqlImageSku: { + required: false, + readOnly: true, + serializedName: 'properties.sqlImageSku', + type: { + name: 'String' + } + }, + sqlVirtualMachineGroupResourceId: { + required: false, + serializedName: 'properties.sqlVirtualMachineGroupResourceId', + type: { + name: 'String' + } + }, + wsfcDomainCredentials: { + required: false, + serializedName: 'properties.wsfcDomainCredentials', + type: { + name: 'Composite', + className: 'WsfcDomainCredentials' + } + }, + autoPatchingSettings: { + required: false, + serializedName: 'properties.autoPatchingSettings', + type: { + name: 'Composite', + className: 'AutoPatchingSettings' + } + }, + autoBackupSettings: { + required: false, + serializedName: 'properties.autoBackupSettings', + type: { + name: 'Composite', + className: 'AutoBackupSettings' + } + }, + keyVaultCredentialSettings: { + required: false, + serializedName: 'properties.keyVaultCredentialSettings', + type: { + name: 'Composite', + className: 'KeyVaultCredentialSettings' + } + }, + serverConfigurationsManagementSettings: { + required: false, + serializedName: 'properties.serverConfigurationsManagementSettings', + type: { + name: 'Composite', + className: 'ServerConfigurationsManagementSettings' + } + } + } + } + }; + } +} + +module.exports = SqlVirtualMachine; diff --git a/lib/services/sqlvirtualmachineManagement/lib/models/sqlVirtualMachineGroup.js b/lib/services/sqlvirtualmachineManagement/lib/models/sqlVirtualMachineGroup.js new file mode 100644 index 0000000000..5cc02b30b4 --- /dev/null +++ b/lib/services/sqlvirtualmachineManagement/lib/models/sqlVirtualMachineGroup.js @@ -0,0 +1,180 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * A SQL virtual machine group. + * + * @extends models['TrackedResource'] + */ +class SqlVirtualMachineGroup extends models['TrackedResource'] { + /** + * Create a SqlVirtualMachineGroup. + * @property {string} [provisioningState] Provisioning state to track the + * aysnc operation status. + * @property {string} [sqlImageOffer] SQL image offer. Examples may include + * SQL2016-WS2016, SQL2017-WS2016. + * @property {string} [sqlImageSku] SQL image sku. Possible values include: + * 'Developer', 'Enterprise' + * @property {string} [scaleType] Scale type. Possible values include: 'HA' + * @property {string} [clusterManagerType] Type of cluster manager: Windows + * Server Failover Cluster (WSFC), implied by the scale type of the group and + * the OS type. Possible values include: 'WSFC' + * @property {string} [clusterConfiguration] Cluster type. Possible values + * include: 'Domainful' + * @property {object} [wsfcDomainProfile] Cluster Active Directory domain + * profile. + * @property {string} [wsfcDomainProfile.domainFqdn] Fully qualified name of + * the domain. + * @property {string} [wsfcDomainProfile.ouPath] Organizational Unit path in + * which the nodes and cluster will be present. + * @property {string} [wsfcDomainProfile.clusterBootstrapAccount] Account + * name used for creating cluster (at minimum needs permissions to 'Create + * Computer Objects' in domain). + * @property {string} [wsfcDomainProfile.clusterOperatorAccount] Account name + * used for operating cluster i.e. will be part of administrators group on + * all the participating virtual machines in the cluster. + * @property {string} [wsfcDomainProfile.sqlServiceAccount] Account name + * under which SQL service will run on all participating SQL virtual machines + * in the cluster. + * @property {string} [wsfcDomainProfile.fileShareWitnessPath] Optional path + * for fileshare witness. + * @property {string} [wsfcDomainProfile.storageAccountUrl] Fully qualified + * ARM resource id of the witness storage account. + * @property {string} [wsfcDomainProfile.storageAccountPrimaryKey] Primary + * key of the witness storage account. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of SqlVirtualMachineGroup + * + * @returns {object} metadata of SqlVirtualMachineGroup + * + */ + mapper() { + return { + required: false, + serializedName: 'SqlVirtualMachineGroup', + type: { + name: 'Composite', + className: 'SqlVirtualMachineGroup', + modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, + location: { + required: true, + serializedName: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + provisioningState: { + required: false, + readOnly: true, + serializedName: 'properties.provisioningState', + type: { + name: 'String' + } + }, + sqlImageOffer: { + required: false, + serializedName: 'properties.sqlImageOffer', + type: { + name: 'String' + } + }, + sqlImageSku: { + required: false, + serializedName: 'properties.sqlImageSku', + type: { + name: 'String' + } + }, + scaleType: { + required: false, + readOnly: true, + serializedName: 'properties.scaleType', + type: { + name: 'String' + } + }, + clusterManagerType: { + required: false, + readOnly: true, + serializedName: 'properties.clusterManagerType', + type: { + name: 'String' + } + }, + clusterConfiguration: { + required: false, + readOnly: true, + serializedName: 'properties.clusterConfiguration', + type: { + name: 'String' + } + }, + wsfcDomainProfile: { + required: false, + serializedName: 'properties.wsfcDomainProfile', + type: { + name: 'Composite', + className: 'WsfcDomainProfile' + } + } + } + } + }; + } +} + +module.exports = SqlVirtualMachineGroup; diff --git a/lib/services/sqlvirtualmachineManagement/lib/models/sqlVirtualMachineGroupListResult.js b/lib/services/sqlvirtualmachineManagement/lib/models/sqlVirtualMachineGroupListResult.js new file mode 100644 index 0000000000..99aad9497e --- /dev/null +++ b/lib/services/sqlvirtualmachineManagement/lib/models/sqlVirtualMachineGroupListResult.js @@ -0,0 +1,69 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * A list of SQL virtual machine groups. + */ +class SqlVirtualMachineGroupListResult extends Array { + /** + * Create a SqlVirtualMachineGroupListResult. + * @property {string} [nextLink] Link to retrieve next page of results. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of SqlVirtualMachineGroupListResult + * + * @returns {object} metadata of SqlVirtualMachineGroupListResult + * + */ + mapper() { + return { + required: false, + serializedName: 'SqlVirtualMachineGroupListResult', + type: { + name: 'Composite', + className: 'SqlVirtualMachineGroupListResult', + modelProperties: { + value: { + required: false, + readOnly: true, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'SqlVirtualMachineGroupElementType', + type: { + name: 'Composite', + className: 'SqlVirtualMachineGroup' + } + } + } + }, + nextLink: { + required: false, + readOnly: true, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = SqlVirtualMachineGroupListResult; diff --git a/lib/services/sqlvirtualmachineManagement/lib/models/sqlVirtualMachineGroupUpdate.js b/lib/services/sqlvirtualmachineManagement/lib/models/sqlVirtualMachineGroupUpdate.js new file mode 100644 index 0000000000..8fd50fa7ca --- /dev/null +++ b/lib/services/sqlvirtualmachineManagement/lib/models/sqlVirtualMachineGroupUpdate.js @@ -0,0 +1,59 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * An update to a SQL virtual machine group. + * + */ +class SqlVirtualMachineGroupUpdate { + /** + * Create a SqlVirtualMachineGroupUpdate. + * @property {object} [tags] Resource tags. + */ + constructor() { + } + + /** + * Defines the metadata of SqlVirtualMachineGroupUpdate + * + * @returns {object} metadata of SqlVirtualMachineGroupUpdate + * + */ + mapper() { + return { + required: false, + serializedName: 'SqlVirtualMachineGroupUpdate', + type: { + name: 'Composite', + className: 'SqlVirtualMachineGroupUpdate', + modelProperties: { + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + }; + } +} + +module.exports = SqlVirtualMachineGroupUpdate; diff --git a/lib/services/sqlvirtualmachineManagement/lib/models/sqlVirtualMachineListResult.js b/lib/services/sqlvirtualmachineManagement/lib/models/sqlVirtualMachineListResult.js new file mode 100644 index 0000000000..abf5f670f6 --- /dev/null +++ b/lib/services/sqlvirtualmachineManagement/lib/models/sqlVirtualMachineListResult.js @@ -0,0 +1,69 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * A list of SQL virtual machines. + */ +class SqlVirtualMachineListResult extends Array { + /** + * Create a SqlVirtualMachineListResult. + * @property {string} [nextLink] Link to retrieve next page of results. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of SqlVirtualMachineListResult + * + * @returns {object} metadata of SqlVirtualMachineListResult + * + */ + mapper() { + return { + required: false, + serializedName: 'SqlVirtualMachineListResult', + type: { + name: 'Composite', + className: 'SqlVirtualMachineListResult', + modelProperties: { + value: { + required: false, + readOnly: true, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'SqlVirtualMachineElementType', + type: { + name: 'Composite', + className: 'SqlVirtualMachine' + } + } + } + }, + nextLink: { + required: false, + readOnly: true, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = SqlVirtualMachineListResult; diff --git a/lib/services/sqlvirtualmachineManagement/lib/models/sqlVirtualMachineUpdate.js b/lib/services/sqlvirtualmachineManagement/lib/models/sqlVirtualMachineUpdate.js new file mode 100644 index 0000000000..ae01a045b4 --- /dev/null +++ b/lib/services/sqlvirtualmachineManagement/lib/models/sqlVirtualMachineUpdate.js @@ -0,0 +1,59 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * An update to a SQL virtual machine. + * + */ +class SqlVirtualMachineUpdate { + /** + * Create a SqlVirtualMachineUpdate. + * @property {object} [tags] Resource tags. + */ + constructor() { + } + + /** + * Defines the metadata of SqlVirtualMachineUpdate + * + * @returns {object} metadata of SqlVirtualMachineUpdate + * + */ + mapper() { + return { + required: false, + serializedName: 'SqlVirtualMachineUpdate', + type: { + name: 'Composite', + className: 'SqlVirtualMachineUpdate', + modelProperties: { + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + }; + } +} + +module.exports = SqlVirtualMachineUpdate; diff --git a/lib/services/sqlvirtualmachineManagement/lib/models/sqlWorkloadTypeUpdateSettings.js b/lib/services/sqlvirtualmachineManagement/lib/models/sqlWorkloadTypeUpdateSettings.js new file mode 100644 index 0000000000..c454754d55 --- /dev/null +++ b/lib/services/sqlvirtualmachineManagement/lib/models/sqlWorkloadTypeUpdateSettings.js @@ -0,0 +1,53 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Set workload type to optimize storage for SQL Server. + * + */ +class SqlWorkloadTypeUpdateSettings { + /** + * Create a SqlWorkloadTypeUpdateSettings. + * @property {string} [sqlWorkloadType] SQL Server workload type. Possible + * values include: 'GENERAL', 'OLTP', 'DW' + */ + constructor() { + } + + /** + * Defines the metadata of SqlWorkloadTypeUpdateSettings + * + * @returns {object} metadata of SqlWorkloadTypeUpdateSettings + * + */ + mapper() { + return { + required: false, + serializedName: 'SqlWorkloadTypeUpdateSettings', + type: { + name: 'Composite', + className: 'SqlWorkloadTypeUpdateSettings', + modelProperties: { + sqlWorkloadType: { + required: false, + serializedName: 'sqlWorkloadType', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = SqlWorkloadTypeUpdateSettings; diff --git a/lib/services/sqlvirtualmachineManagement/lib/models/trackedResource.js b/lib/services/sqlvirtualmachineManagement/lib/models/trackedResource.js new file mode 100644 index 0000000000..0fe6d7d553 --- /dev/null +++ b/lib/services/sqlvirtualmachineManagement/lib/models/trackedResource.js @@ -0,0 +1,95 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * ARM tracked top level resource. + * + * @extends models['Resource'] + */ +class TrackedResource extends models['Resource'] { + /** + * Create a TrackedResource. + * @property {string} location Resource location. + * @property {object} [tags] Resource tags. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of TrackedResource + * + * @returns {object} metadata of TrackedResource + * + */ + mapper() { + return { + required: false, + serializedName: 'TrackedResource', + type: { + name: 'Composite', + className: 'TrackedResource', + modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, + location: { + required: true, + serializedName: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + }; + } +} + +module.exports = TrackedResource; diff --git a/lib/services/sqlvirtualmachineManagement/lib/models/wsfcDomainCredentials.js b/lib/services/sqlvirtualmachineManagement/lib/models/wsfcDomainCredentials.js new file mode 100644 index 0000000000..fe83d2bde0 --- /dev/null +++ b/lib/services/sqlvirtualmachineManagement/lib/models/wsfcDomainCredentials.js @@ -0,0 +1,72 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Domain credentials for setting up Windows Server Failover Cluster for SQL + * availability group. + * + */ +class WsfcDomainCredentials { + /** + * Create a WsfcDomainCredentials. + * @property {string} [clusterBootstrapAccountPassword] Cluster bootstrap + * account password. + * @property {string} [clusterOperatorAccountPassword] Cluster operator + * account password. + * @property {string} [sqlServiceAccountPassword] SQL service account + * password. + */ + constructor() { + } + + /** + * Defines the metadata of WsfcDomainCredentials + * + * @returns {object} metadata of WsfcDomainCredentials + * + */ + mapper() { + return { + required: false, + serializedName: 'WsfcDomainCredentials', + type: { + name: 'Composite', + className: 'WsfcDomainCredentials', + modelProperties: { + clusterBootstrapAccountPassword: { + required: false, + serializedName: 'clusterBootstrapAccountPassword', + type: { + name: 'String' + } + }, + clusterOperatorAccountPassword: { + required: false, + serializedName: 'clusterOperatorAccountPassword', + type: { + name: 'String' + } + }, + sqlServiceAccountPassword: { + required: false, + serializedName: 'sqlServiceAccountPassword', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = WsfcDomainCredentials; diff --git a/lib/services/sqlvirtualmachineManagement/lib/models/wsfcDomainProfile.js b/lib/services/sqlvirtualmachineManagement/lib/models/wsfcDomainProfile.js new file mode 100644 index 0000000000..40c7b6e3e8 --- /dev/null +++ b/lib/services/sqlvirtualmachineManagement/lib/models/wsfcDomainProfile.js @@ -0,0 +1,117 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Active Directory account details to operate Windows Server Failover Cluster. + * + */ +class WsfcDomainProfile { + /** + * Create a WsfcDomainProfile. + * @property {string} [domainFqdn] Fully qualified name of the domain. + * @property {string} [ouPath] Organizational Unit path in which the nodes + * and cluster will be present. + * @property {string} [clusterBootstrapAccount] Account name used for + * creating cluster (at minimum needs permissions to 'Create Computer + * Objects' in domain). + * @property {string} [clusterOperatorAccount] Account name used for + * operating cluster i.e. will be part of administrators group on all the + * participating virtual machines in the cluster. + * @property {string} [sqlServiceAccount] Account name under which SQL + * service will run on all participating SQL virtual machines in the cluster. + * @property {string} [fileShareWitnessPath] Optional path for fileshare + * witness. + * @property {string} [storageAccountUrl] Fully qualified ARM resource id of + * the witness storage account. + * @property {string} [storageAccountPrimaryKey] Primary key of the witness + * storage account. + */ + constructor() { + } + + /** + * Defines the metadata of WsfcDomainProfile + * + * @returns {object} metadata of WsfcDomainProfile + * + */ + mapper() { + return { + required: false, + serializedName: 'WsfcDomainProfile', + type: { + name: 'Composite', + className: 'WsfcDomainProfile', + modelProperties: { + domainFqdn: { + required: false, + serializedName: 'domainFqdn', + type: { + name: 'String' + } + }, + ouPath: { + required: false, + serializedName: 'ouPath', + type: { + name: 'String' + } + }, + clusterBootstrapAccount: { + required: false, + serializedName: 'clusterBootstrapAccount', + type: { + name: 'String' + } + }, + clusterOperatorAccount: { + required: false, + serializedName: 'clusterOperatorAccount', + type: { + name: 'String' + } + }, + sqlServiceAccount: { + required: false, + serializedName: 'sqlServiceAccount', + type: { + name: 'String' + } + }, + fileShareWitnessPath: { + required: false, + serializedName: 'fileShareWitnessPath', + type: { + name: 'String' + } + }, + storageAccountUrl: { + required: false, + serializedName: 'storageAccountUrl', + type: { + name: 'String' + } + }, + storageAccountPrimaryKey: { + required: false, + serializedName: 'storageAccountPrimaryKey', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = WsfcDomainProfile; diff --git a/lib/services/sqlvirtualmachineManagement/lib/operations/availabilityGroupListeners.js b/lib/services/sqlvirtualmachineManagement/lib/operations/availabilityGroupListeners.js new file mode 100644 index 0000000000..668f9e4a1c --- /dev/null +++ b/lib/services/sqlvirtualmachineManagement/lib/operations/availabilityGroupListeners.js @@ -0,0 +1,1697 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const WebResource = msRest.WebResource; + +/** + * Gets an availability group listener. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {string} availabilityGroupListenerName Name of the availability group + * listener. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link AvailabilityGroupListener} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _get(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (sqlVirtualMachineGroupName === null || sqlVirtualMachineGroupName === undefined || typeof sqlVirtualMachineGroupName.valueOf() !== 'string') { + throw new Error('sqlVirtualMachineGroupName cannot be null or undefined and it must be of type string.'); + } + if (availabilityGroupListenerName === null || availabilityGroupListenerName === undefined || typeof availabilityGroupListenerName.valueOf() !== 'string') { + throw new Error('availabilityGroupListenerName cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{sqlVirtualMachineGroupName}', encodeURIComponent(sqlVirtualMachineGroupName)); + requestUrl = requestUrl.replace('{availabilityGroupListenerName}', encodeURIComponent(availabilityGroupListenerName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['AvailabilityGroupListener']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + + +/** + * Creates or updates an availability group listener. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {string} availabilityGroupListenerName Name of the availability group + * listener. + * + * @param {object} parameters The availability group listener. + * + * @param {string} [parameters.availabilityGroupName] Name of the availability + * group. + * + * @param {array} [parameters.loadBalancerConfigurations] List of load balancer + * configurations for an availability group listener. + * + * @param {boolean} [parameters.createDefaultAvailabilityGroupIfNotExist] + * Create a default availability group if it does not exist. + * + * @param {number} [parameters.port] Listener port. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link AvailabilityGroupListener} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _createOrUpdate(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, parameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginCreateOrUpdate(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, parameters, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['AvailabilityGroupListener']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + + return callback(null, result, httpRequest, response); + }); + }); +} + + +/** + * Deletes an availability group listener. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {string} availabilityGroupListenerName Name of the availability group + * listener. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _deleteMethod(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginDeleteMethod(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + + return callback(null, result, httpRequest, response); + }); + }); +} + +/** + * Lists all availability group listeners in a SQL virtual machine group. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link AvailabilityGroupListenerListResult} for + * more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listByGroup(resourceGroupName, sqlVirtualMachineGroupName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (sqlVirtualMachineGroupName === null || sqlVirtualMachineGroupName === undefined || typeof sqlVirtualMachineGroupName.valueOf() !== 'string') { + throw new Error('sqlVirtualMachineGroupName cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{sqlVirtualMachineGroupName}', encodeURIComponent(sqlVirtualMachineGroupName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['AvailabilityGroupListenerListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Creates or updates an availability group listener. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {string} availabilityGroupListenerName Name of the availability group + * listener. + * + * @param {object} parameters The availability group listener. + * + * @param {string} [parameters.availabilityGroupName] Name of the availability + * group. + * + * @param {array} [parameters.loadBalancerConfigurations] List of load balancer + * configurations for an availability group listener. + * + * @param {boolean} [parameters.createDefaultAvailabilityGroupIfNotExist] + * Create a default availability group if it does not exist. + * + * @param {number} [parameters.port] Listener port. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link AvailabilityGroupListener} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginCreateOrUpdate(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, parameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (sqlVirtualMachineGroupName === null || sqlVirtualMachineGroupName === undefined || typeof sqlVirtualMachineGroupName.valueOf() !== 'string') { + throw new Error('sqlVirtualMachineGroupName cannot be null or undefined and it must be of type string.'); + } + if (availabilityGroupListenerName === null || availabilityGroupListenerName === undefined || typeof availabilityGroupListenerName.valueOf() !== 'string') { + throw new Error('availabilityGroupListenerName cannot be null or undefined and it must be of type string.'); + } + if (parameters === null || parameters === undefined) { + throw new Error('parameters cannot be null or undefined.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{sqlVirtualMachineGroupName}', encodeURIComponent(sqlVirtualMachineGroupName)); + requestUrl = requestUrl.replace('{availabilityGroupListenerName}', encodeURIComponent(availabilityGroupListenerName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PUT'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (parameters !== null && parameters !== undefined) { + let requestModelMapper = new client.models['AvailabilityGroupListener']().mapper(); + requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(parameters, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 201) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['AvailabilityGroupListener']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['AvailabilityGroupListener']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Deletes an availability group listener. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {string} availabilityGroupListenerName Name of the availability group + * listener. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginDeleteMethod(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (sqlVirtualMachineGroupName === null || sqlVirtualMachineGroupName === undefined || typeof sqlVirtualMachineGroupName.valueOf() !== 'string') { + throw new Error('sqlVirtualMachineGroupName cannot be null or undefined and it must be of type string.'); + } + if (availabilityGroupListenerName === null || availabilityGroupListenerName === undefined || typeof availabilityGroupListenerName.valueOf() !== 'string') { + throw new Error('availabilityGroupListenerName cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{sqlVirtualMachineGroupName}', encodeURIComponent(sqlVirtualMachineGroupName)); + requestUrl = requestUrl.replace('{availabilityGroupListenerName}', encodeURIComponent(availabilityGroupListenerName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'DELETE'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Lists all availability group listeners in a SQL virtual machine group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link AvailabilityGroupListenerListResult} for + * more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listByGroupNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['AvailabilityGroupListenerListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a AvailabilityGroupListeners. */ +class AvailabilityGroupListeners { + /** + * Create a AvailabilityGroupListeners. + * @param {SqlVirtualMachineManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._get = _get; + this._createOrUpdate = _createOrUpdate; + this._deleteMethod = _deleteMethod; + this._listByGroup = _listByGroup; + this._beginCreateOrUpdate = _beginCreateOrUpdate; + this._beginDeleteMethod = _beginDeleteMethod; + this._listByGroupNext = _listByGroupNext; + } + + /** + * Gets an availability group listener. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {string} availabilityGroupListenerName Name of the availability group + * listener. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets an availability group listener. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {string} availabilityGroupListenerName Name of the availability group + * listener. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {AvailabilityGroupListener} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link AvailabilityGroupListener} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._get(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, options, optionalCallback); + } + } + + /** + * Creates or updates an availability group listener. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {string} availabilityGroupListenerName Name of the availability group + * listener. + * + * @param {object} parameters The availability group listener. + * + * @param {string} [parameters.availabilityGroupName] Name of the availability + * group. + * + * @param {array} [parameters.loadBalancerConfigurations] List of load balancer + * configurations for an availability group listener. + * + * @param {boolean} [parameters.createDefaultAvailabilityGroupIfNotExist] + * Create a default availability group if it does not exist. + * + * @param {number} [parameters.port] Listener port. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Creates or updates an availability group listener. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {string} availabilityGroupListenerName Name of the availability group + * listener. + * + * @param {object} parameters The availability group listener. + * + * @param {string} [parameters.availabilityGroupName] Name of the availability + * group. + * + * @param {array} [parameters.loadBalancerConfigurations] List of load balancer + * configurations for an availability group listener. + * + * @param {boolean} [parameters.createDefaultAvailabilityGroupIfNotExist] + * Create a default availability group if it does not exist. + * + * @param {number} [parameters.port] Listener port. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {AvailabilityGroupListener} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link AvailabilityGroupListener} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createOrUpdate(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, parameters, options, optionalCallback); + } + } + + /** + * Deletes an availability group listener. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {string} availabilityGroupListenerName Name of the availability group + * listener. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Deletes an availability group listener. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {string} availabilityGroupListenerName Name of the availability group + * listener. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, options, optionalCallback); + } + } + + /** + * Lists all availability group listeners in a SQL virtual machine group. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listByGroupWithHttpOperationResponse(resourceGroupName, sqlVirtualMachineGroupName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByGroup(resourceGroupName, sqlVirtualMachineGroupName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Lists all availability group listeners in a SQL virtual machine group. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {AvailabilityGroupListenerListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link AvailabilityGroupListenerListResult} for + * more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listByGroup(resourceGroupName, sqlVirtualMachineGroupName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listByGroup(resourceGroupName, sqlVirtualMachineGroupName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByGroup(resourceGroupName, sqlVirtualMachineGroupName, options, optionalCallback); + } + } + + /** + * Creates or updates an availability group listener. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {string} availabilityGroupListenerName Name of the availability group + * listener. + * + * @param {object} parameters The availability group listener. + * + * @param {string} [parameters.availabilityGroupName] Name of the availability + * group. + * + * @param {array} [parameters.loadBalancerConfigurations] List of load balancer + * configurations for an availability group listener. + * + * @param {boolean} [parameters.createDefaultAvailabilityGroupIfNotExist] + * Create a default availability group if it does not exist. + * + * @param {number} [parameters.port] Listener port. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Creates or updates an availability group listener. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {string} availabilityGroupListenerName Name of the availability group + * listener. + * + * @param {object} parameters The availability group listener. + * + * @param {string} [parameters.availabilityGroupName] Name of the availability + * group. + * + * @param {array} [parameters.loadBalancerConfigurations] List of load balancer + * configurations for an availability group listener. + * + * @param {boolean} [parameters.createDefaultAvailabilityGroupIfNotExist] + * Create a default availability group if it does not exist. + * + * @param {number} [parameters.port] Listener port. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {AvailabilityGroupListener} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link AvailabilityGroupListener} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginCreateOrUpdate(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginCreateOrUpdate(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, parameters, options, optionalCallback); + } + } + + /** + * Deletes an availability group listener. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {string} availabilityGroupListenerName Name of the availability group + * listener. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginDeleteMethodWithHttpOperationResponse(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginDeleteMethod(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Deletes an availability group listener. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {string} availabilityGroupListenerName Name of the availability group + * listener. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginDeleteMethod(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginDeleteMethod(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginDeleteMethod(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, options, optionalCallback); + } + } + + /** + * Lists all availability group listeners in a SQL virtual machine group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listByGroupNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByGroupNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Lists all availability group listeners in a SQL virtual machine group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {AvailabilityGroupListenerListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link AvailabilityGroupListenerListResult} for + * more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listByGroupNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listByGroupNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByGroupNext(nextPageLink, options, optionalCallback); + } + } + +} + +module.exports = AvailabilityGroupListeners; diff --git a/lib/services/sqlvirtualmachineManagement/lib/operations/index.d.ts b/lib/services/sqlvirtualmachineManagement/lib/operations/index.d.ts new file mode 100644 index 0000000000..cbc43fcd77 --- /dev/null +++ b/lib/services/sqlvirtualmachineManagement/lib/operations/index.d.ts @@ -0,0 +1,2936 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. +*/ + +import { ServiceClientOptions, RequestOptions, ServiceCallback, HttpOperationResponse } from 'ms-rest'; +import * as models from '../models'; + + +/** + * @class + * AvailabilityGroupListeners + * __NOTE__: An instance of this class is automatically created for an + * instance of the SqlVirtualMachineManagementClient. + */ +export interface AvailabilityGroupListeners { + + + /** + * Gets an availability group listener. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {string} availabilityGroupListenerName Name of the availability group + * listener. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName: string, sqlVirtualMachineGroupName: string, availabilityGroupListenerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets an availability group listener. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {string} availabilityGroupListenerName Name of the availability group + * listener. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {AvailabilityGroupListener} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {AvailabilityGroupListener} [result] - The deserialized result object if an error did not occur. + * See {@link AvailabilityGroupListener} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName: string, sqlVirtualMachineGroupName: string, availabilityGroupListenerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, sqlVirtualMachineGroupName: string, availabilityGroupListenerName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, sqlVirtualMachineGroupName: string, availabilityGroupListenerName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Creates or updates an availability group listener. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {string} availabilityGroupListenerName Name of the availability group + * listener. + * + * @param {object} parameters The availability group listener. + * + * @param {string} [parameters.availabilityGroupName] Name of the availability + * group. + * + * @param {array} [parameters.loadBalancerConfigurations] List of load balancer + * configurations for an availability group listener. + * + * @param {boolean} [parameters.createDefaultAvailabilityGroupIfNotExist] + * Create a default availability group if it does not exist. + * + * @param {number} [parameters.port] Listener port. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, sqlVirtualMachineGroupName: string, availabilityGroupListenerName: string, parameters: models.AvailabilityGroupListener, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Creates or updates an availability group listener. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {string} availabilityGroupListenerName Name of the availability group + * listener. + * + * @param {object} parameters The availability group listener. + * + * @param {string} [parameters.availabilityGroupName] Name of the availability + * group. + * + * @param {array} [parameters.loadBalancerConfigurations] List of load balancer + * configurations for an availability group listener. + * + * @param {boolean} [parameters.createDefaultAvailabilityGroupIfNotExist] + * Create a default availability group if it does not exist. + * + * @param {number} [parameters.port] Listener port. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {AvailabilityGroupListener} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {AvailabilityGroupListener} [result] - The deserialized result object if an error did not occur. + * See {@link AvailabilityGroupListener} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(resourceGroupName: string, sqlVirtualMachineGroupName: string, availabilityGroupListenerName: string, parameters: models.AvailabilityGroupListener, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, sqlVirtualMachineGroupName: string, availabilityGroupListenerName: string, parameters: models.AvailabilityGroupListener, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, sqlVirtualMachineGroupName: string, availabilityGroupListenerName: string, parameters: models.AvailabilityGroupListener, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Deletes an availability group listener. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {string} availabilityGroupListenerName Name of the availability group + * listener. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName: string, sqlVirtualMachineGroupName: string, availabilityGroupListenerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Deletes an availability group listener. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {string} availabilityGroupListenerName Name of the availability group + * listener. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName: string, sqlVirtualMachineGroupName: string, availabilityGroupListenerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, sqlVirtualMachineGroupName: string, availabilityGroupListenerName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, sqlVirtualMachineGroupName: string, availabilityGroupListenerName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Lists all availability group listeners in a SQL virtual machine group. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listByGroupWithHttpOperationResponse(resourceGroupName: string, sqlVirtualMachineGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Lists all availability group listeners in a SQL virtual machine group. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {AvailabilityGroupListenerListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {AvailabilityGroupListenerListResult} [result] - The deserialized result object if an error did not occur. + * See {@link AvailabilityGroupListenerListResult} for + * more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listByGroup(resourceGroupName: string, sqlVirtualMachineGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByGroup(resourceGroupName: string, sqlVirtualMachineGroupName: string, callback: ServiceCallback): void; + listByGroup(resourceGroupName: string, sqlVirtualMachineGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Creates or updates an availability group listener. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {string} availabilityGroupListenerName Name of the availability group + * listener. + * + * @param {object} parameters The availability group listener. + * + * @param {string} [parameters.availabilityGroupName] Name of the availability + * group. + * + * @param {array} [parameters.loadBalancerConfigurations] List of load balancer + * configurations for an availability group listener. + * + * @param {boolean} [parameters.createDefaultAvailabilityGroupIfNotExist] + * Create a default availability group if it does not exist. + * + * @param {number} [parameters.port] Listener port. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, sqlVirtualMachineGroupName: string, availabilityGroupListenerName: string, parameters: models.AvailabilityGroupListener, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Creates or updates an availability group listener. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {string} availabilityGroupListenerName Name of the availability group + * listener. + * + * @param {object} parameters The availability group listener. + * + * @param {string} [parameters.availabilityGroupName] Name of the availability + * group. + * + * @param {array} [parameters.loadBalancerConfigurations] List of load balancer + * configurations for an availability group listener. + * + * @param {boolean} [parameters.createDefaultAvailabilityGroupIfNotExist] + * Create a default availability group if it does not exist. + * + * @param {number} [parameters.port] Listener port. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {AvailabilityGroupListener} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {AvailabilityGroupListener} [result] - The deserialized result object if an error did not occur. + * See {@link AvailabilityGroupListener} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginCreateOrUpdate(resourceGroupName: string, sqlVirtualMachineGroupName: string, availabilityGroupListenerName: string, parameters: models.AvailabilityGroupListener, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, sqlVirtualMachineGroupName: string, availabilityGroupListenerName: string, parameters: models.AvailabilityGroupListener, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, sqlVirtualMachineGroupName: string, availabilityGroupListenerName: string, parameters: models.AvailabilityGroupListener, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Deletes an availability group listener. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {string} availabilityGroupListenerName Name of the availability group + * listener. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, sqlVirtualMachineGroupName: string, availabilityGroupListenerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Deletes an availability group listener. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {string} availabilityGroupListenerName Name of the availability group + * listener. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginDeleteMethod(resourceGroupName: string, sqlVirtualMachineGroupName: string, availabilityGroupListenerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, sqlVirtualMachineGroupName: string, availabilityGroupListenerName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, sqlVirtualMachineGroupName: string, availabilityGroupListenerName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Lists all availability group listeners in a SQL virtual machine group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listByGroupNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Lists all availability group listeners in a SQL virtual machine group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {AvailabilityGroupListenerListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {AvailabilityGroupListenerListResult} [result] - The deserialized result object if an error did not occur. + * See {@link AvailabilityGroupListenerListResult} for + * more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listByGroupNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByGroupNext(nextPageLink: string, callback: ServiceCallback): void; + listByGroupNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * Operations + * __NOTE__: An instance of this class is automatically created for an + * instance of the SqlVirtualMachineManagementClient. + */ +export interface Operations { + + + /** + * Lists all of the available SQL Rest API operations. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Lists all of the available SQL Rest API operations. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {OperationListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {OperationListResult} [result] - The deserialized result object if an error did not occur. + * See {@link OperationListResult} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + list(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(callback: ServiceCallback): void; + list(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Lists all of the available SQL Rest API operations. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Lists all of the available SQL Rest API operations. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {OperationListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {OperationListResult} [result] - The deserialized result object if an error did not occur. + * See {@link OperationListResult} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * SqlVirtualMachineGroups + * __NOTE__: An instance of this class is automatically created for an + * instance of the SqlVirtualMachineManagementClient. + */ +export interface SqlVirtualMachineGroups { + + + /** + * Gets a SQL virtual machine group. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName: string, sqlVirtualMachineGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets a SQL virtual machine group. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {SqlVirtualMachineGroup} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {SqlVirtualMachineGroup} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachineGroup} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName: string, sqlVirtualMachineGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, sqlVirtualMachineGroupName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, sqlVirtualMachineGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Creates or updates a SQL virtual machine group. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {object} parameters The SQL virtual machine group. + * + * @param {string} [parameters.sqlImageOffer] SQL image offer. Examples may + * include SQL2016-WS2016, SQL2017-WS2016. + * + * @param {string} [parameters.sqlImageSku] SQL image sku. Possible values + * include: 'Developer', 'Enterprise' + * + * @param {object} [parameters.wsfcDomainProfile] Cluster Active Directory + * domain profile. + * + * @param {string} [parameters.wsfcDomainProfile.domainFqdn] Fully qualified + * name of the domain. + * + * @param {string} [parameters.wsfcDomainProfile.ouPath] Organizational Unit + * path in which the nodes and cluster will be present. + * + * @param {string} [parameters.wsfcDomainProfile.clusterBootstrapAccount] + * Account name used for creating cluster (at minimum needs permissions to + * 'Create Computer Objects' in domain). + * + * @param {string} [parameters.wsfcDomainProfile.clusterOperatorAccount] + * Account name used for operating cluster i.e. will be part of administrators + * group on all the participating virtual machines in the cluster. + * + * @param {string} [parameters.wsfcDomainProfile.sqlServiceAccount] Account + * name under which SQL service will run on all participating SQL virtual + * machines in the cluster. + * + * @param {string} [parameters.wsfcDomainProfile.fileShareWitnessPath] Optional + * path for fileshare witness. + * + * @param {string} [parameters.wsfcDomainProfile.storageAccountUrl] Fully + * qualified ARM resource id of the witness storage account. + * + * @param {string} [parameters.wsfcDomainProfile.storageAccountPrimaryKey] + * Primary key of the witness storage account. + * + * @param {string} parameters.location Resource location. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, sqlVirtualMachineGroupName: string, parameters: models.SqlVirtualMachineGroup, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Creates or updates a SQL virtual machine group. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {object} parameters The SQL virtual machine group. + * + * @param {string} [parameters.sqlImageOffer] SQL image offer. Examples may + * include SQL2016-WS2016, SQL2017-WS2016. + * + * @param {string} [parameters.sqlImageSku] SQL image sku. Possible values + * include: 'Developer', 'Enterprise' + * + * @param {object} [parameters.wsfcDomainProfile] Cluster Active Directory + * domain profile. + * + * @param {string} [parameters.wsfcDomainProfile.domainFqdn] Fully qualified + * name of the domain. + * + * @param {string} [parameters.wsfcDomainProfile.ouPath] Organizational Unit + * path in which the nodes and cluster will be present. + * + * @param {string} [parameters.wsfcDomainProfile.clusterBootstrapAccount] + * Account name used for creating cluster (at minimum needs permissions to + * 'Create Computer Objects' in domain). + * + * @param {string} [parameters.wsfcDomainProfile.clusterOperatorAccount] + * Account name used for operating cluster i.e. will be part of administrators + * group on all the participating virtual machines in the cluster. + * + * @param {string} [parameters.wsfcDomainProfile.sqlServiceAccount] Account + * name under which SQL service will run on all participating SQL virtual + * machines in the cluster. + * + * @param {string} [parameters.wsfcDomainProfile.fileShareWitnessPath] Optional + * path for fileshare witness. + * + * @param {string} [parameters.wsfcDomainProfile.storageAccountUrl] Fully + * qualified ARM resource id of the witness storage account. + * + * @param {string} [parameters.wsfcDomainProfile.storageAccountPrimaryKey] + * Primary key of the witness storage account. + * + * @param {string} parameters.location Resource location. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {SqlVirtualMachineGroup} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {SqlVirtualMachineGroup} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachineGroup} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(resourceGroupName: string, sqlVirtualMachineGroupName: string, parameters: models.SqlVirtualMachineGroup, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, sqlVirtualMachineGroupName: string, parameters: models.SqlVirtualMachineGroup, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, sqlVirtualMachineGroupName: string, parameters: models.SqlVirtualMachineGroup, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Deletes a SQL virtual machine group. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName: string, sqlVirtualMachineGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Deletes a SQL virtual machine group. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName: string, sqlVirtualMachineGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, sqlVirtualMachineGroupName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, sqlVirtualMachineGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Updates SQL virtual machine group tags. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {object} parameters The SQL virtual machine group. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + updateWithHttpOperationResponse(resourceGroupName: string, sqlVirtualMachineGroupName: string, parameters: models.SqlVirtualMachineGroupUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Updates SQL virtual machine group tags. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {object} parameters The SQL virtual machine group. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {SqlVirtualMachineGroup} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {SqlVirtualMachineGroup} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachineGroup} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + update(resourceGroupName: string, sqlVirtualMachineGroupName: string, parameters: models.SqlVirtualMachineGroupUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, sqlVirtualMachineGroupName: string, parameters: models.SqlVirtualMachineGroupUpdate, callback: ServiceCallback): void; + update(resourceGroupName: string, sqlVirtualMachineGroupName: string, parameters: models.SqlVirtualMachineGroupUpdate, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets all SQL virtual machine groups in a resource group. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listByResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets all SQL virtual machine groups in a resource group. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {SqlVirtualMachineGroupListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {SqlVirtualMachineGroupListResult} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachineGroupListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listByResourceGroup(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceGroup(resourceGroupName: string, callback: ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets all SQL virtual machine groups in a subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets all SQL virtual machine groups in a subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {SqlVirtualMachineGroupListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {SqlVirtualMachineGroupListResult} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachineGroupListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + list(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(callback: ServiceCallback): void; + list(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Creates or updates a SQL virtual machine group. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {object} parameters The SQL virtual machine group. + * + * @param {string} [parameters.sqlImageOffer] SQL image offer. Examples may + * include SQL2016-WS2016, SQL2017-WS2016. + * + * @param {string} [parameters.sqlImageSku] SQL image sku. Possible values + * include: 'Developer', 'Enterprise' + * + * @param {object} [parameters.wsfcDomainProfile] Cluster Active Directory + * domain profile. + * + * @param {string} [parameters.wsfcDomainProfile.domainFqdn] Fully qualified + * name of the domain. + * + * @param {string} [parameters.wsfcDomainProfile.ouPath] Organizational Unit + * path in which the nodes and cluster will be present. + * + * @param {string} [parameters.wsfcDomainProfile.clusterBootstrapAccount] + * Account name used for creating cluster (at minimum needs permissions to + * 'Create Computer Objects' in domain). + * + * @param {string} [parameters.wsfcDomainProfile.clusterOperatorAccount] + * Account name used for operating cluster i.e. will be part of administrators + * group on all the participating virtual machines in the cluster. + * + * @param {string} [parameters.wsfcDomainProfile.sqlServiceAccount] Account + * name under which SQL service will run on all participating SQL virtual + * machines in the cluster. + * + * @param {string} [parameters.wsfcDomainProfile.fileShareWitnessPath] Optional + * path for fileshare witness. + * + * @param {string} [parameters.wsfcDomainProfile.storageAccountUrl] Fully + * qualified ARM resource id of the witness storage account. + * + * @param {string} [parameters.wsfcDomainProfile.storageAccountPrimaryKey] + * Primary key of the witness storage account. + * + * @param {string} parameters.location Resource location. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, sqlVirtualMachineGroupName: string, parameters: models.SqlVirtualMachineGroup, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Creates or updates a SQL virtual machine group. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {object} parameters The SQL virtual machine group. + * + * @param {string} [parameters.sqlImageOffer] SQL image offer. Examples may + * include SQL2016-WS2016, SQL2017-WS2016. + * + * @param {string} [parameters.sqlImageSku] SQL image sku. Possible values + * include: 'Developer', 'Enterprise' + * + * @param {object} [parameters.wsfcDomainProfile] Cluster Active Directory + * domain profile. + * + * @param {string} [parameters.wsfcDomainProfile.domainFqdn] Fully qualified + * name of the domain. + * + * @param {string} [parameters.wsfcDomainProfile.ouPath] Organizational Unit + * path in which the nodes and cluster will be present. + * + * @param {string} [parameters.wsfcDomainProfile.clusterBootstrapAccount] + * Account name used for creating cluster (at minimum needs permissions to + * 'Create Computer Objects' in domain). + * + * @param {string} [parameters.wsfcDomainProfile.clusterOperatorAccount] + * Account name used for operating cluster i.e. will be part of administrators + * group on all the participating virtual machines in the cluster. + * + * @param {string} [parameters.wsfcDomainProfile.sqlServiceAccount] Account + * name under which SQL service will run on all participating SQL virtual + * machines in the cluster. + * + * @param {string} [parameters.wsfcDomainProfile.fileShareWitnessPath] Optional + * path for fileshare witness. + * + * @param {string} [parameters.wsfcDomainProfile.storageAccountUrl] Fully + * qualified ARM resource id of the witness storage account. + * + * @param {string} [parameters.wsfcDomainProfile.storageAccountPrimaryKey] + * Primary key of the witness storage account. + * + * @param {string} parameters.location Resource location. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {SqlVirtualMachineGroup} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {SqlVirtualMachineGroup} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachineGroup} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginCreateOrUpdate(resourceGroupName: string, sqlVirtualMachineGroupName: string, parameters: models.SqlVirtualMachineGroup, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, sqlVirtualMachineGroupName: string, parameters: models.SqlVirtualMachineGroup, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, sqlVirtualMachineGroupName: string, parameters: models.SqlVirtualMachineGroup, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Deletes a SQL virtual machine group. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, sqlVirtualMachineGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Deletes a SQL virtual machine group. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginDeleteMethod(resourceGroupName: string, sqlVirtualMachineGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, sqlVirtualMachineGroupName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, sqlVirtualMachineGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Updates SQL virtual machine group tags. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {object} parameters The SQL virtual machine group. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginUpdateWithHttpOperationResponse(resourceGroupName: string, sqlVirtualMachineGroupName: string, parameters: models.SqlVirtualMachineGroupUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Updates SQL virtual machine group tags. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {object} parameters The SQL virtual machine group. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {SqlVirtualMachineGroup} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {SqlVirtualMachineGroup} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachineGroup} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginUpdate(resourceGroupName: string, sqlVirtualMachineGroupName: string, parameters: models.SqlVirtualMachineGroupUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginUpdate(resourceGroupName: string, sqlVirtualMachineGroupName: string, parameters: models.SqlVirtualMachineGroupUpdate, callback: ServiceCallback): void; + beginUpdate(resourceGroupName: string, sqlVirtualMachineGroupName: string, parameters: models.SqlVirtualMachineGroupUpdate, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets all SQL virtual machine groups in a resource group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listByResourceGroupNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets all SQL virtual machine groups in a resource group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {SqlVirtualMachineGroupListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {SqlVirtualMachineGroupListResult} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachineGroupListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listByResourceGroupNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceGroupNext(nextPageLink: string, callback: ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets all SQL virtual machine groups in a subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets all SQL virtual machine groups in a subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {SqlVirtualMachineGroupListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {SqlVirtualMachineGroupListResult} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachineGroupListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * SqlVirtualMachines + * __NOTE__: An instance of this class is automatically created for an + * instance of the SqlVirtualMachineManagementClient. + */ +export interface SqlVirtualMachines { + + + /** + * Gets a SQL virtual machine. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineName Name of the SQL virtual machine. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] The child resources to include in the + * response. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName: string, sqlVirtualMachineName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets a SQL virtual machine. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineName Name of the SQL virtual machine. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] The child resources to include in the + * response. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {SqlVirtualMachine} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {SqlVirtualMachine} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachine} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName: string, sqlVirtualMachineName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, sqlVirtualMachineName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, sqlVirtualMachineName: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Creates or updates a SQL virtual machine. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineName Name of the SQL virtual machine. + * + * @param {object} parameters The SQL virtual machine. + * + * @param {object} [parameters.identity] Azure Active Directory identity of the + * server. + * + * @param {string} [parameters.identity.type] The identity type. Set this to + * 'SystemAssigned' in order to automatically create and assign an Azure Active + * Directory principal for the resource. Possible values include: + * 'SystemAssigned' + * + * @param {string} [parameters.virtualMachineResourceId] ARM Resource id of + * underlying virtual machine created from SQL marketplace image. + * + * @param {string} [parameters.sqlServerLicenseType] SQL Server license type. + * Possible values include: 'PAYG', 'AHUB' + * + * @param {string} [parameters.sqlVirtualMachineGroupResourceId] ARM resource + * id of the SQL virtual machine group this SQL virtual machine is or will be + * part of. + * + * @param {object} [parameters.wsfcDomainCredentials] Domain credentials for + * setting up Windows Server Failover Cluster for SQL availability group. + * + * @param {string} + * [parameters.wsfcDomainCredentials.clusterBootstrapAccountPassword] Cluster + * bootstrap account password. + * + * @param {string} + * [parameters.wsfcDomainCredentials.clusterOperatorAccountPassword] Cluster + * operator account password. + * + * @param {string} [parameters.wsfcDomainCredentials.sqlServiceAccountPassword] + * SQL service account password. + * + * @param {object} [parameters.autoPatchingSettings] Auto patching settings for + * applying critical security updates to SQL virtual machine. + * + * @param {boolean} [parameters.autoPatchingSettings.enable] Enable or disable + * autopatching on SQL virtual machine. + * + * @param {string} [parameters.autoPatchingSettings.dayOfWeek] Day of week to + * apply the patch on. Possible values include: 'Monday', 'Tuesday', + * 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday' + * + * @param {number} + * [parameters.autoPatchingSettings.maintenanceWindowStartingHour] Hour of the + * day when patching is initiated. Local VM time. + * + * @param {number} [parameters.autoPatchingSettings.maintenanceWindowDuration] + * Duration of patching. + * + * @param {object} [parameters.autoBackupSettings] Auto backup settings for SQL + * Server. + * + * @param {boolean} [parameters.autoBackupSettings.enable] Enable or disable + * autobackup on SQL virtual machine. + * + * @param {boolean} [parameters.autoBackupSettings.enableEncryption] Enable or + * disable encryption for backup on SQL virtual machine. + * + * @param {number} [parameters.autoBackupSettings.retentionPeriod] Retention + * period of backup: 1-30 days. + * + * @param {string} [parameters.autoBackupSettings.storageAccountUrl] Storage + * account url where backup will be taken to. + * + * @param {string} [parameters.autoBackupSettings.storageAccessKey] Storage + * account key where backup will be taken to. + * + * @param {string} [parameters.autoBackupSettings.password] Password for + * encryption on backup. + * + * @param {boolean} [parameters.autoBackupSettings.backupSystemDbs] Include or + * exclude system databases from auto backup. + * + * @param {string} [parameters.autoBackupSettings.backupScheduleType] Backup + * schedule type. Possible values include: 'Manual', 'Automated' + * + * @param {string} [parameters.autoBackupSettings.fullBackupFrequency] + * Frequency of full backups. In both cases, full backups begin during the next + * scheduled time window. Possible values include: 'Daily', 'Weekly' + * + * @param {number} [parameters.autoBackupSettings.fullBackupStartTime] Start + * time of a given day during which full backups can take place. 0-23 hours. + * + * @param {number} [parameters.autoBackupSettings.fullBackupWindowHours] + * Duration of the time window of a given day during which full backups can + * take place. 1-23 hours. + * + * @param {number} [parameters.autoBackupSettings.logBackupFrequency] Frequency + * of log backups. 5-60 minutes. + * + * @param {object} [parameters.keyVaultCredentialSettings] Key vault credential + * settings. + * + * @param {boolean} [parameters.keyVaultCredentialSettings.enable] Enable or + * disable key vault credential setting. + * + * @param {string} [parameters.keyVaultCredentialSettings.credentialName] + * Credential name. + * + * @param {string} [parameters.keyVaultCredentialSettings.azureKeyVaultUrl] + * Azure Key Vault url. + * + * @param {string} [parameters.keyVaultCredentialSettings.servicePrincipalName] + * Service principal name to access key vault. + * + * @param {string} + * [parameters.keyVaultCredentialSettings.servicePrincipalSecret] Service + * principal name secret to access key vault. + * + * @param {object} [parameters.serverConfigurationsManagementSettings] SQL + * Server configuration management settings. + * + * @param {object} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings] + * SQL connectivity type settings. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings.connectivityType] + * SQL Server connectivity option. Possible values include: 'LOCAL', 'PRIVATE', + * 'PUBLIC' + * + * @param {number} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings.port] + * SQL Server port. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings.sqlAuthUpdateUserName] + * SQL Server sysadmin login to create. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings.sqlAuthUpdatePassword] + * SQL Server sysadmin login password. + * + * @param {object} + * [parameters.serverConfigurationsManagementSettings.sqlWorkloadTypeUpdateSettings] + * SQL workload type settings. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlWorkloadTypeUpdateSettings.sqlWorkloadType] + * SQL Server workload type. Possible values include: 'GENERAL', 'OLTP', 'DW' + * + * @param {object} + * [parameters.serverConfigurationsManagementSettings.sqlStorageUpdateSettings] + * SQL storage update settings. + * + * @param {number} + * [parameters.serverConfigurationsManagementSettings.sqlStorageUpdateSettings.diskCount] + * Virtual machine disk count. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlStorageUpdateSettings.diskConfigurationType] + * Disk configuration to apply to SQL Server. Possible values include: 'NEW', + * 'EXTEND', 'ADD' + * + * @param {number} + * [parameters.serverConfigurationsManagementSettings.sqlStorageUpdateSettings.startingDeviceId] + * Device id of the first disk to be updated. + * + * @param {object} + * [parameters.serverConfigurationsManagementSettings.additionalFeaturesServerConfigurations] + * Additional SQL feature settings. + * + * @param {boolean} + * [parameters.serverConfigurationsManagementSettings.additionalFeaturesServerConfigurations.isRServicesEnabled] + * Enable or disable R services (SQL 2016 onwards). + * + * @param {string} parameters.location Resource location. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, sqlVirtualMachineName: string, parameters: models.SqlVirtualMachine, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Creates or updates a SQL virtual machine. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineName Name of the SQL virtual machine. + * + * @param {object} parameters The SQL virtual machine. + * + * @param {object} [parameters.identity] Azure Active Directory identity of the + * server. + * + * @param {string} [parameters.identity.type] The identity type. Set this to + * 'SystemAssigned' in order to automatically create and assign an Azure Active + * Directory principal for the resource. Possible values include: + * 'SystemAssigned' + * + * @param {string} [parameters.virtualMachineResourceId] ARM Resource id of + * underlying virtual machine created from SQL marketplace image. + * + * @param {string} [parameters.sqlServerLicenseType] SQL Server license type. + * Possible values include: 'PAYG', 'AHUB' + * + * @param {string} [parameters.sqlVirtualMachineGroupResourceId] ARM resource + * id of the SQL virtual machine group this SQL virtual machine is or will be + * part of. + * + * @param {object} [parameters.wsfcDomainCredentials] Domain credentials for + * setting up Windows Server Failover Cluster for SQL availability group. + * + * @param {string} + * [parameters.wsfcDomainCredentials.clusterBootstrapAccountPassword] Cluster + * bootstrap account password. + * + * @param {string} + * [parameters.wsfcDomainCredentials.clusterOperatorAccountPassword] Cluster + * operator account password. + * + * @param {string} [parameters.wsfcDomainCredentials.sqlServiceAccountPassword] + * SQL service account password. + * + * @param {object} [parameters.autoPatchingSettings] Auto patching settings for + * applying critical security updates to SQL virtual machine. + * + * @param {boolean} [parameters.autoPatchingSettings.enable] Enable or disable + * autopatching on SQL virtual machine. + * + * @param {string} [parameters.autoPatchingSettings.dayOfWeek] Day of week to + * apply the patch on. Possible values include: 'Monday', 'Tuesday', + * 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday' + * + * @param {number} + * [parameters.autoPatchingSettings.maintenanceWindowStartingHour] Hour of the + * day when patching is initiated. Local VM time. + * + * @param {number} [parameters.autoPatchingSettings.maintenanceWindowDuration] + * Duration of patching. + * + * @param {object} [parameters.autoBackupSettings] Auto backup settings for SQL + * Server. + * + * @param {boolean} [parameters.autoBackupSettings.enable] Enable or disable + * autobackup on SQL virtual machine. + * + * @param {boolean} [parameters.autoBackupSettings.enableEncryption] Enable or + * disable encryption for backup on SQL virtual machine. + * + * @param {number} [parameters.autoBackupSettings.retentionPeriod] Retention + * period of backup: 1-30 days. + * + * @param {string} [parameters.autoBackupSettings.storageAccountUrl] Storage + * account url where backup will be taken to. + * + * @param {string} [parameters.autoBackupSettings.storageAccessKey] Storage + * account key where backup will be taken to. + * + * @param {string} [parameters.autoBackupSettings.password] Password for + * encryption on backup. + * + * @param {boolean} [parameters.autoBackupSettings.backupSystemDbs] Include or + * exclude system databases from auto backup. + * + * @param {string} [parameters.autoBackupSettings.backupScheduleType] Backup + * schedule type. Possible values include: 'Manual', 'Automated' + * + * @param {string} [parameters.autoBackupSettings.fullBackupFrequency] + * Frequency of full backups. In both cases, full backups begin during the next + * scheduled time window. Possible values include: 'Daily', 'Weekly' + * + * @param {number} [parameters.autoBackupSettings.fullBackupStartTime] Start + * time of a given day during which full backups can take place. 0-23 hours. + * + * @param {number} [parameters.autoBackupSettings.fullBackupWindowHours] + * Duration of the time window of a given day during which full backups can + * take place. 1-23 hours. + * + * @param {number} [parameters.autoBackupSettings.logBackupFrequency] Frequency + * of log backups. 5-60 minutes. + * + * @param {object} [parameters.keyVaultCredentialSettings] Key vault credential + * settings. + * + * @param {boolean} [parameters.keyVaultCredentialSettings.enable] Enable or + * disable key vault credential setting. + * + * @param {string} [parameters.keyVaultCredentialSettings.credentialName] + * Credential name. + * + * @param {string} [parameters.keyVaultCredentialSettings.azureKeyVaultUrl] + * Azure Key Vault url. + * + * @param {string} [parameters.keyVaultCredentialSettings.servicePrincipalName] + * Service principal name to access key vault. + * + * @param {string} + * [parameters.keyVaultCredentialSettings.servicePrincipalSecret] Service + * principal name secret to access key vault. + * + * @param {object} [parameters.serverConfigurationsManagementSettings] SQL + * Server configuration management settings. + * + * @param {object} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings] + * SQL connectivity type settings. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings.connectivityType] + * SQL Server connectivity option. Possible values include: 'LOCAL', 'PRIVATE', + * 'PUBLIC' + * + * @param {number} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings.port] + * SQL Server port. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings.sqlAuthUpdateUserName] + * SQL Server sysadmin login to create. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings.sqlAuthUpdatePassword] + * SQL Server sysadmin login password. + * + * @param {object} + * [parameters.serverConfigurationsManagementSettings.sqlWorkloadTypeUpdateSettings] + * SQL workload type settings. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlWorkloadTypeUpdateSettings.sqlWorkloadType] + * SQL Server workload type. Possible values include: 'GENERAL', 'OLTP', 'DW' + * + * @param {object} + * [parameters.serverConfigurationsManagementSettings.sqlStorageUpdateSettings] + * SQL storage update settings. + * + * @param {number} + * [parameters.serverConfigurationsManagementSettings.sqlStorageUpdateSettings.diskCount] + * Virtual machine disk count. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlStorageUpdateSettings.diskConfigurationType] + * Disk configuration to apply to SQL Server. Possible values include: 'NEW', + * 'EXTEND', 'ADD' + * + * @param {number} + * [parameters.serverConfigurationsManagementSettings.sqlStorageUpdateSettings.startingDeviceId] + * Device id of the first disk to be updated. + * + * @param {object} + * [parameters.serverConfigurationsManagementSettings.additionalFeaturesServerConfigurations] + * Additional SQL feature settings. + * + * @param {boolean} + * [parameters.serverConfigurationsManagementSettings.additionalFeaturesServerConfigurations.isRServicesEnabled] + * Enable or disable R services (SQL 2016 onwards). + * + * @param {string} parameters.location Resource location. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {SqlVirtualMachine} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {SqlVirtualMachine} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachine} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(resourceGroupName: string, sqlVirtualMachineName: string, parameters: models.SqlVirtualMachine, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, sqlVirtualMachineName: string, parameters: models.SqlVirtualMachine, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, sqlVirtualMachineName: string, parameters: models.SqlVirtualMachine, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Deletes a SQL virtual machine. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineName Name of the SQL virtual machine. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName: string, sqlVirtualMachineName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Deletes a SQL virtual machine. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineName Name of the SQL virtual machine. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName: string, sqlVirtualMachineName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, sqlVirtualMachineName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, sqlVirtualMachineName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Updates a SQL virtual machine. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineName Name of the SQL virtual machine. + * + * @param {object} parameters The SQL virtual machine. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + updateWithHttpOperationResponse(resourceGroupName: string, sqlVirtualMachineName: string, parameters: models.SqlVirtualMachineUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Updates a SQL virtual machine. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineName Name of the SQL virtual machine. + * + * @param {object} parameters The SQL virtual machine. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {SqlVirtualMachine} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {SqlVirtualMachine} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachine} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + update(resourceGroupName: string, sqlVirtualMachineName: string, parameters: models.SqlVirtualMachineUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, sqlVirtualMachineName: string, parameters: models.SqlVirtualMachineUpdate, callback: ServiceCallback): void; + update(resourceGroupName: string, sqlVirtualMachineName: string, parameters: models.SqlVirtualMachineUpdate, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets all SQL virtual machines in a resource group. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listByResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets all SQL virtual machines in a resource group. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {SqlVirtualMachineListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {SqlVirtualMachineListResult} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachineListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listByResourceGroup(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceGroup(resourceGroupName: string, callback: ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets all SQL virtual machines in a subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets all SQL virtual machines in a subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {SqlVirtualMachineListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {SqlVirtualMachineListResult} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachineListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + list(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(callback: ServiceCallback): void; + list(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Creates or updates a SQL virtual machine. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineName Name of the SQL virtual machine. + * + * @param {object} parameters The SQL virtual machine. + * + * @param {object} [parameters.identity] Azure Active Directory identity of the + * server. + * + * @param {string} [parameters.identity.type] The identity type. Set this to + * 'SystemAssigned' in order to automatically create and assign an Azure Active + * Directory principal for the resource. Possible values include: + * 'SystemAssigned' + * + * @param {string} [parameters.virtualMachineResourceId] ARM Resource id of + * underlying virtual machine created from SQL marketplace image. + * + * @param {string} [parameters.sqlServerLicenseType] SQL Server license type. + * Possible values include: 'PAYG', 'AHUB' + * + * @param {string} [parameters.sqlVirtualMachineGroupResourceId] ARM resource + * id of the SQL virtual machine group this SQL virtual machine is or will be + * part of. + * + * @param {object} [parameters.wsfcDomainCredentials] Domain credentials for + * setting up Windows Server Failover Cluster for SQL availability group. + * + * @param {string} + * [parameters.wsfcDomainCredentials.clusterBootstrapAccountPassword] Cluster + * bootstrap account password. + * + * @param {string} + * [parameters.wsfcDomainCredentials.clusterOperatorAccountPassword] Cluster + * operator account password. + * + * @param {string} [parameters.wsfcDomainCredentials.sqlServiceAccountPassword] + * SQL service account password. + * + * @param {object} [parameters.autoPatchingSettings] Auto patching settings for + * applying critical security updates to SQL virtual machine. + * + * @param {boolean} [parameters.autoPatchingSettings.enable] Enable or disable + * autopatching on SQL virtual machine. + * + * @param {string} [parameters.autoPatchingSettings.dayOfWeek] Day of week to + * apply the patch on. Possible values include: 'Monday', 'Tuesday', + * 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday' + * + * @param {number} + * [parameters.autoPatchingSettings.maintenanceWindowStartingHour] Hour of the + * day when patching is initiated. Local VM time. + * + * @param {number} [parameters.autoPatchingSettings.maintenanceWindowDuration] + * Duration of patching. + * + * @param {object} [parameters.autoBackupSettings] Auto backup settings for SQL + * Server. + * + * @param {boolean} [parameters.autoBackupSettings.enable] Enable or disable + * autobackup on SQL virtual machine. + * + * @param {boolean} [parameters.autoBackupSettings.enableEncryption] Enable or + * disable encryption for backup on SQL virtual machine. + * + * @param {number} [parameters.autoBackupSettings.retentionPeriod] Retention + * period of backup: 1-30 days. + * + * @param {string} [parameters.autoBackupSettings.storageAccountUrl] Storage + * account url where backup will be taken to. + * + * @param {string} [parameters.autoBackupSettings.storageAccessKey] Storage + * account key where backup will be taken to. + * + * @param {string} [parameters.autoBackupSettings.password] Password for + * encryption on backup. + * + * @param {boolean} [parameters.autoBackupSettings.backupSystemDbs] Include or + * exclude system databases from auto backup. + * + * @param {string} [parameters.autoBackupSettings.backupScheduleType] Backup + * schedule type. Possible values include: 'Manual', 'Automated' + * + * @param {string} [parameters.autoBackupSettings.fullBackupFrequency] + * Frequency of full backups. In both cases, full backups begin during the next + * scheduled time window. Possible values include: 'Daily', 'Weekly' + * + * @param {number} [parameters.autoBackupSettings.fullBackupStartTime] Start + * time of a given day during which full backups can take place. 0-23 hours. + * + * @param {number} [parameters.autoBackupSettings.fullBackupWindowHours] + * Duration of the time window of a given day during which full backups can + * take place. 1-23 hours. + * + * @param {number} [parameters.autoBackupSettings.logBackupFrequency] Frequency + * of log backups. 5-60 minutes. + * + * @param {object} [parameters.keyVaultCredentialSettings] Key vault credential + * settings. + * + * @param {boolean} [parameters.keyVaultCredentialSettings.enable] Enable or + * disable key vault credential setting. + * + * @param {string} [parameters.keyVaultCredentialSettings.credentialName] + * Credential name. + * + * @param {string} [parameters.keyVaultCredentialSettings.azureKeyVaultUrl] + * Azure Key Vault url. + * + * @param {string} [parameters.keyVaultCredentialSettings.servicePrincipalName] + * Service principal name to access key vault. + * + * @param {string} + * [parameters.keyVaultCredentialSettings.servicePrincipalSecret] Service + * principal name secret to access key vault. + * + * @param {object} [parameters.serverConfigurationsManagementSettings] SQL + * Server configuration management settings. + * + * @param {object} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings] + * SQL connectivity type settings. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings.connectivityType] + * SQL Server connectivity option. Possible values include: 'LOCAL', 'PRIVATE', + * 'PUBLIC' + * + * @param {number} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings.port] + * SQL Server port. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings.sqlAuthUpdateUserName] + * SQL Server sysadmin login to create. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings.sqlAuthUpdatePassword] + * SQL Server sysadmin login password. + * + * @param {object} + * [parameters.serverConfigurationsManagementSettings.sqlWorkloadTypeUpdateSettings] + * SQL workload type settings. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlWorkloadTypeUpdateSettings.sqlWorkloadType] + * SQL Server workload type. Possible values include: 'GENERAL', 'OLTP', 'DW' + * + * @param {object} + * [parameters.serverConfigurationsManagementSettings.sqlStorageUpdateSettings] + * SQL storage update settings. + * + * @param {number} + * [parameters.serverConfigurationsManagementSettings.sqlStorageUpdateSettings.diskCount] + * Virtual machine disk count. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlStorageUpdateSettings.diskConfigurationType] + * Disk configuration to apply to SQL Server. Possible values include: 'NEW', + * 'EXTEND', 'ADD' + * + * @param {number} + * [parameters.serverConfigurationsManagementSettings.sqlStorageUpdateSettings.startingDeviceId] + * Device id of the first disk to be updated. + * + * @param {object} + * [parameters.serverConfigurationsManagementSettings.additionalFeaturesServerConfigurations] + * Additional SQL feature settings. + * + * @param {boolean} + * [parameters.serverConfigurationsManagementSettings.additionalFeaturesServerConfigurations.isRServicesEnabled] + * Enable or disable R services (SQL 2016 onwards). + * + * @param {string} parameters.location Resource location. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, sqlVirtualMachineName: string, parameters: models.SqlVirtualMachine, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Creates or updates a SQL virtual machine. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineName Name of the SQL virtual machine. + * + * @param {object} parameters The SQL virtual machine. + * + * @param {object} [parameters.identity] Azure Active Directory identity of the + * server. + * + * @param {string} [parameters.identity.type] The identity type. Set this to + * 'SystemAssigned' in order to automatically create and assign an Azure Active + * Directory principal for the resource. Possible values include: + * 'SystemAssigned' + * + * @param {string} [parameters.virtualMachineResourceId] ARM Resource id of + * underlying virtual machine created from SQL marketplace image. + * + * @param {string} [parameters.sqlServerLicenseType] SQL Server license type. + * Possible values include: 'PAYG', 'AHUB' + * + * @param {string} [parameters.sqlVirtualMachineGroupResourceId] ARM resource + * id of the SQL virtual machine group this SQL virtual machine is or will be + * part of. + * + * @param {object} [parameters.wsfcDomainCredentials] Domain credentials for + * setting up Windows Server Failover Cluster for SQL availability group. + * + * @param {string} + * [parameters.wsfcDomainCredentials.clusterBootstrapAccountPassword] Cluster + * bootstrap account password. + * + * @param {string} + * [parameters.wsfcDomainCredentials.clusterOperatorAccountPassword] Cluster + * operator account password. + * + * @param {string} [parameters.wsfcDomainCredentials.sqlServiceAccountPassword] + * SQL service account password. + * + * @param {object} [parameters.autoPatchingSettings] Auto patching settings for + * applying critical security updates to SQL virtual machine. + * + * @param {boolean} [parameters.autoPatchingSettings.enable] Enable or disable + * autopatching on SQL virtual machine. + * + * @param {string} [parameters.autoPatchingSettings.dayOfWeek] Day of week to + * apply the patch on. Possible values include: 'Monday', 'Tuesday', + * 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday' + * + * @param {number} + * [parameters.autoPatchingSettings.maintenanceWindowStartingHour] Hour of the + * day when patching is initiated. Local VM time. + * + * @param {number} [parameters.autoPatchingSettings.maintenanceWindowDuration] + * Duration of patching. + * + * @param {object} [parameters.autoBackupSettings] Auto backup settings for SQL + * Server. + * + * @param {boolean} [parameters.autoBackupSettings.enable] Enable or disable + * autobackup on SQL virtual machine. + * + * @param {boolean} [parameters.autoBackupSettings.enableEncryption] Enable or + * disable encryption for backup on SQL virtual machine. + * + * @param {number} [parameters.autoBackupSettings.retentionPeriod] Retention + * period of backup: 1-30 days. + * + * @param {string} [parameters.autoBackupSettings.storageAccountUrl] Storage + * account url where backup will be taken to. + * + * @param {string} [parameters.autoBackupSettings.storageAccessKey] Storage + * account key where backup will be taken to. + * + * @param {string} [parameters.autoBackupSettings.password] Password for + * encryption on backup. + * + * @param {boolean} [parameters.autoBackupSettings.backupSystemDbs] Include or + * exclude system databases from auto backup. + * + * @param {string} [parameters.autoBackupSettings.backupScheduleType] Backup + * schedule type. Possible values include: 'Manual', 'Automated' + * + * @param {string} [parameters.autoBackupSettings.fullBackupFrequency] + * Frequency of full backups. In both cases, full backups begin during the next + * scheduled time window. Possible values include: 'Daily', 'Weekly' + * + * @param {number} [parameters.autoBackupSettings.fullBackupStartTime] Start + * time of a given day during which full backups can take place. 0-23 hours. + * + * @param {number} [parameters.autoBackupSettings.fullBackupWindowHours] + * Duration of the time window of a given day during which full backups can + * take place. 1-23 hours. + * + * @param {number} [parameters.autoBackupSettings.logBackupFrequency] Frequency + * of log backups. 5-60 minutes. + * + * @param {object} [parameters.keyVaultCredentialSettings] Key vault credential + * settings. + * + * @param {boolean} [parameters.keyVaultCredentialSettings.enable] Enable or + * disable key vault credential setting. + * + * @param {string} [parameters.keyVaultCredentialSettings.credentialName] + * Credential name. + * + * @param {string} [parameters.keyVaultCredentialSettings.azureKeyVaultUrl] + * Azure Key Vault url. + * + * @param {string} [parameters.keyVaultCredentialSettings.servicePrincipalName] + * Service principal name to access key vault. + * + * @param {string} + * [parameters.keyVaultCredentialSettings.servicePrincipalSecret] Service + * principal name secret to access key vault. + * + * @param {object} [parameters.serverConfigurationsManagementSettings] SQL + * Server configuration management settings. + * + * @param {object} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings] + * SQL connectivity type settings. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings.connectivityType] + * SQL Server connectivity option. Possible values include: 'LOCAL', 'PRIVATE', + * 'PUBLIC' + * + * @param {number} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings.port] + * SQL Server port. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings.sqlAuthUpdateUserName] + * SQL Server sysadmin login to create. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings.sqlAuthUpdatePassword] + * SQL Server sysadmin login password. + * + * @param {object} + * [parameters.serverConfigurationsManagementSettings.sqlWorkloadTypeUpdateSettings] + * SQL workload type settings. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlWorkloadTypeUpdateSettings.sqlWorkloadType] + * SQL Server workload type. Possible values include: 'GENERAL', 'OLTP', 'DW' + * + * @param {object} + * [parameters.serverConfigurationsManagementSettings.sqlStorageUpdateSettings] + * SQL storage update settings. + * + * @param {number} + * [parameters.serverConfigurationsManagementSettings.sqlStorageUpdateSettings.diskCount] + * Virtual machine disk count. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlStorageUpdateSettings.diskConfigurationType] + * Disk configuration to apply to SQL Server. Possible values include: 'NEW', + * 'EXTEND', 'ADD' + * + * @param {number} + * [parameters.serverConfigurationsManagementSettings.sqlStorageUpdateSettings.startingDeviceId] + * Device id of the first disk to be updated. + * + * @param {object} + * [parameters.serverConfigurationsManagementSettings.additionalFeaturesServerConfigurations] + * Additional SQL feature settings. + * + * @param {boolean} + * [parameters.serverConfigurationsManagementSettings.additionalFeaturesServerConfigurations.isRServicesEnabled] + * Enable or disable R services (SQL 2016 onwards). + * + * @param {string} parameters.location Resource location. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {SqlVirtualMachine} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {SqlVirtualMachine} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachine} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginCreateOrUpdate(resourceGroupName: string, sqlVirtualMachineName: string, parameters: models.SqlVirtualMachine, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, sqlVirtualMachineName: string, parameters: models.SqlVirtualMachine, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, sqlVirtualMachineName: string, parameters: models.SqlVirtualMachine, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Deletes a SQL virtual machine. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineName Name of the SQL virtual machine. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, sqlVirtualMachineName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Deletes a SQL virtual machine. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineName Name of the SQL virtual machine. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginDeleteMethod(resourceGroupName: string, sqlVirtualMachineName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, sqlVirtualMachineName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, sqlVirtualMachineName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Updates a SQL virtual machine. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineName Name of the SQL virtual machine. + * + * @param {object} parameters The SQL virtual machine. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginUpdateWithHttpOperationResponse(resourceGroupName: string, sqlVirtualMachineName: string, parameters: models.SqlVirtualMachineUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Updates a SQL virtual machine. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineName Name of the SQL virtual machine. + * + * @param {object} parameters The SQL virtual machine. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {SqlVirtualMachine} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {SqlVirtualMachine} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachine} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginUpdate(resourceGroupName: string, sqlVirtualMachineName: string, parameters: models.SqlVirtualMachineUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginUpdate(resourceGroupName: string, sqlVirtualMachineName: string, parameters: models.SqlVirtualMachineUpdate, callback: ServiceCallback): void; + beginUpdate(resourceGroupName: string, sqlVirtualMachineName: string, parameters: models.SqlVirtualMachineUpdate, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets all SQL virtual machines in a resource group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listByResourceGroupNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets all SQL virtual machines in a resource group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {SqlVirtualMachineListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {SqlVirtualMachineListResult} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachineListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listByResourceGroupNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceGroupNext(nextPageLink: string, callback: ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets all SQL virtual machines in a subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets all SQL virtual machines in a subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {SqlVirtualMachineListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {SqlVirtualMachineListResult} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachineListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} diff --git a/lib/services/sqlvirtualmachineManagement/lib/operations/index.js b/lib/services/sqlvirtualmachineManagement/lib/operations/index.js new file mode 100644 index 0000000000..77f5ae862d --- /dev/null +++ b/lib/services/sqlvirtualmachineManagement/lib/operations/index.js @@ -0,0 +1,20 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +/* jshint latedef:false */ +/* jshint forin:false */ +/* jshint noempty:false */ + +'use strict'; + +exports.AvailabilityGroupListeners = require('./availabilityGroupListeners'); +exports.Operations = require('./operations'); +exports.SqlVirtualMachineGroups = require('./sqlVirtualMachineGroups'); +exports.SqlVirtualMachines = require('./sqlVirtualMachines'); diff --git a/lib/services/sqlvirtualmachineManagement/lib/operations/operations.js b/lib/services/sqlvirtualmachineManagement/lib/operations/operations.js new file mode 100644 index 0000000000..188df77128 --- /dev/null +++ b/lib/services/sqlvirtualmachineManagement/lib/operations/operations.js @@ -0,0 +1,449 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const WebResource = msRest.WebResource; + +/** + * Lists all of the available SQL Rest API operations. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link OperationListResult} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _list(options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'providers/Microsoft.SqlVirtualMachine/operations'; + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['OperationListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Lists all of the available SQL Rest API operations. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link OperationListResult} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['OperationListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a Operations. */ +class Operations { + /** + * Create a Operations. + * @param {SqlVirtualMachineManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._list = _list; + this._listNext = _listNext; + } + + /** + * Lists all of the available SQL Rest API operations. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listWithHttpOperationResponse(options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._list(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Lists all of the available SQL Rest API operations. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {OperationListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link OperationListResult} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + list(options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._list(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._list(options, optionalCallback); + } + } + + /** + * Lists all of the available SQL Rest API operations. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Lists all of the available SQL Rest API operations. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {OperationListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link OperationListResult} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listNext(nextPageLink, options, optionalCallback); + } + } + +} + +module.exports = Operations; diff --git a/lib/services/sqlvirtualmachineManagement/lib/operations/sqlVirtualMachineGroups.js b/lib/services/sqlvirtualmachineManagement/lib/operations/sqlVirtualMachineGroups.js new file mode 100644 index 0000000000..56c9840af6 --- /dev/null +++ b/lib/services/sqlvirtualmachineManagement/lib/operations/sqlVirtualMachineGroups.js @@ -0,0 +1,2689 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const WebResource = msRest.WebResource; + +/** + * Gets a SQL virtual machine group. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachineGroup} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _get(resourceGroupName, sqlVirtualMachineGroupName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (sqlVirtualMachineGroupName === null || sqlVirtualMachineGroupName === undefined || typeof sqlVirtualMachineGroupName.valueOf() !== 'string') { + throw new Error('sqlVirtualMachineGroupName cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{sqlVirtualMachineGroupName}', encodeURIComponent(sqlVirtualMachineGroupName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SqlVirtualMachineGroup']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + + +/** + * Creates or updates a SQL virtual machine group. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {object} parameters The SQL virtual machine group. + * + * @param {string} [parameters.sqlImageOffer] SQL image offer. Examples may + * include SQL2016-WS2016, SQL2017-WS2016. + * + * @param {string} [parameters.sqlImageSku] SQL image sku. Possible values + * include: 'Developer', 'Enterprise' + * + * @param {object} [parameters.wsfcDomainProfile] Cluster Active Directory + * domain profile. + * + * @param {string} [parameters.wsfcDomainProfile.domainFqdn] Fully qualified + * name of the domain. + * + * @param {string} [parameters.wsfcDomainProfile.ouPath] Organizational Unit + * path in which the nodes and cluster will be present. + * + * @param {string} [parameters.wsfcDomainProfile.clusterBootstrapAccount] + * Account name used for creating cluster (at minimum needs permissions to + * 'Create Computer Objects' in domain). + * + * @param {string} [parameters.wsfcDomainProfile.clusterOperatorAccount] + * Account name used for operating cluster i.e. will be part of administrators + * group on all the participating virtual machines in the cluster. + * + * @param {string} [parameters.wsfcDomainProfile.sqlServiceAccount] Account + * name under which SQL service will run on all participating SQL virtual + * machines in the cluster. + * + * @param {string} [parameters.wsfcDomainProfile.fileShareWitnessPath] Optional + * path for fileshare witness. + * + * @param {string} [parameters.wsfcDomainProfile.storageAccountUrl] Fully + * qualified ARM resource id of the witness storage account. + * + * @param {string} [parameters.wsfcDomainProfile.storageAccountPrimaryKey] + * Primary key of the witness storage account. + * + * @param {string} parameters.location Resource location. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachineGroup} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _createOrUpdate(resourceGroupName, sqlVirtualMachineGroupName, parameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginCreateOrUpdate(resourceGroupName, sqlVirtualMachineGroupName, parameters, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SqlVirtualMachineGroup']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + + return callback(null, result, httpRequest, response); + }); + }); +} + + +/** + * Deletes a SQL virtual machine group. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _deleteMethod(resourceGroupName, sqlVirtualMachineGroupName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginDeleteMethod(resourceGroupName, sqlVirtualMachineGroupName, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + + return callback(null, result, httpRequest, response); + }); + }); +} + + +/** + * Updates SQL virtual machine group tags. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {object} parameters The SQL virtual machine group. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachineGroup} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _update(resourceGroupName, sqlVirtualMachineGroupName, parameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginUpdate(resourceGroupName, sqlVirtualMachineGroupName, parameters, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SqlVirtualMachineGroup']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + + return callback(null, result, httpRequest, response); + }); + }); +} + +/** + * Gets all SQL virtual machine groups in a resource group. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachineGroupListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listByResourceGroup(resourceGroupName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SqlVirtualMachineGroupListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Gets all SQL virtual machine groups in a subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachineGroupListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _list(options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SqlVirtualMachineGroupListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Creates or updates a SQL virtual machine group. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {object} parameters The SQL virtual machine group. + * + * @param {string} [parameters.sqlImageOffer] SQL image offer. Examples may + * include SQL2016-WS2016, SQL2017-WS2016. + * + * @param {string} [parameters.sqlImageSku] SQL image sku. Possible values + * include: 'Developer', 'Enterprise' + * + * @param {object} [parameters.wsfcDomainProfile] Cluster Active Directory + * domain profile. + * + * @param {string} [parameters.wsfcDomainProfile.domainFqdn] Fully qualified + * name of the domain. + * + * @param {string} [parameters.wsfcDomainProfile.ouPath] Organizational Unit + * path in which the nodes and cluster will be present. + * + * @param {string} [parameters.wsfcDomainProfile.clusterBootstrapAccount] + * Account name used for creating cluster (at minimum needs permissions to + * 'Create Computer Objects' in domain). + * + * @param {string} [parameters.wsfcDomainProfile.clusterOperatorAccount] + * Account name used for operating cluster i.e. will be part of administrators + * group on all the participating virtual machines in the cluster. + * + * @param {string} [parameters.wsfcDomainProfile.sqlServiceAccount] Account + * name under which SQL service will run on all participating SQL virtual + * machines in the cluster. + * + * @param {string} [parameters.wsfcDomainProfile.fileShareWitnessPath] Optional + * path for fileshare witness. + * + * @param {string} [parameters.wsfcDomainProfile.storageAccountUrl] Fully + * qualified ARM resource id of the witness storage account. + * + * @param {string} [parameters.wsfcDomainProfile.storageAccountPrimaryKey] + * Primary key of the witness storage account. + * + * @param {string} parameters.location Resource location. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachineGroup} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginCreateOrUpdate(resourceGroupName, sqlVirtualMachineGroupName, parameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (sqlVirtualMachineGroupName === null || sqlVirtualMachineGroupName === undefined || typeof sqlVirtualMachineGroupName.valueOf() !== 'string') { + throw new Error('sqlVirtualMachineGroupName cannot be null or undefined and it must be of type string.'); + } + if (parameters === null || parameters === undefined) { + throw new Error('parameters cannot be null or undefined.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{sqlVirtualMachineGroupName}', encodeURIComponent(sqlVirtualMachineGroupName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PUT'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (parameters !== null && parameters !== undefined) { + let requestModelMapper = new client.models['SqlVirtualMachineGroup']().mapper(); + requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(parameters, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 201) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SqlVirtualMachineGroup']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SqlVirtualMachineGroup']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Deletes a SQL virtual machine group. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginDeleteMethod(resourceGroupName, sqlVirtualMachineGroupName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (sqlVirtualMachineGroupName === null || sqlVirtualMachineGroupName === undefined || typeof sqlVirtualMachineGroupName.valueOf() !== 'string') { + throw new Error('sqlVirtualMachineGroupName cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{sqlVirtualMachineGroupName}', encodeURIComponent(sqlVirtualMachineGroupName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'DELETE'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Updates SQL virtual machine group tags. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {object} parameters The SQL virtual machine group. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachineGroup} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginUpdate(resourceGroupName, sqlVirtualMachineGroupName, parameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (sqlVirtualMachineGroupName === null || sqlVirtualMachineGroupName === undefined || typeof sqlVirtualMachineGroupName.valueOf() !== 'string') { + throw new Error('sqlVirtualMachineGroupName cannot be null or undefined and it must be of type string.'); + } + if (parameters === null || parameters === undefined) { + throw new Error('parameters cannot be null or undefined.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{sqlVirtualMachineGroupName}', encodeURIComponent(sqlVirtualMachineGroupName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PATCH'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (parameters !== null && parameters !== undefined) { + let requestModelMapper = new client.models['SqlVirtualMachineGroupUpdate']().mapper(); + requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(parameters, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SqlVirtualMachineGroup']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Gets all SQL virtual machine groups in a resource group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachineGroupListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listByResourceGroupNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SqlVirtualMachineGroupListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Gets all SQL virtual machine groups in a subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachineGroupListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SqlVirtualMachineGroupListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a SqlVirtualMachineGroups. */ +class SqlVirtualMachineGroups { + /** + * Create a SqlVirtualMachineGroups. + * @param {SqlVirtualMachineManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._get = _get; + this._createOrUpdate = _createOrUpdate; + this._deleteMethod = _deleteMethod; + this._update = _update; + this._listByResourceGroup = _listByResourceGroup; + this._list = _list; + this._beginCreateOrUpdate = _beginCreateOrUpdate; + this._beginDeleteMethod = _beginDeleteMethod; + this._beginUpdate = _beginUpdate; + this._listByResourceGroupNext = _listByResourceGroupNext; + this._listNext = _listNext; + } + + /** + * Gets a SQL virtual machine group. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName, sqlVirtualMachineGroupName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, sqlVirtualMachineGroupName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets a SQL virtual machine group. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {SqlVirtualMachineGroup} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachineGroup} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName, sqlVirtualMachineGroupName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._get(resourceGroupName, sqlVirtualMachineGroupName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, sqlVirtualMachineGroupName, options, optionalCallback); + } + } + + /** + * Creates or updates a SQL virtual machine group. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {object} parameters The SQL virtual machine group. + * + * @param {string} [parameters.sqlImageOffer] SQL image offer. Examples may + * include SQL2016-WS2016, SQL2017-WS2016. + * + * @param {string} [parameters.sqlImageSku] SQL image sku. Possible values + * include: 'Developer', 'Enterprise' + * + * @param {object} [parameters.wsfcDomainProfile] Cluster Active Directory + * domain profile. + * + * @param {string} [parameters.wsfcDomainProfile.domainFqdn] Fully qualified + * name of the domain. + * + * @param {string} [parameters.wsfcDomainProfile.ouPath] Organizational Unit + * path in which the nodes and cluster will be present. + * + * @param {string} [parameters.wsfcDomainProfile.clusterBootstrapAccount] + * Account name used for creating cluster (at minimum needs permissions to + * 'Create Computer Objects' in domain). + * + * @param {string} [parameters.wsfcDomainProfile.clusterOperatorAccount] + * Account name used for operating cluster i.e. will be part of administrators + * group on all the participating virtual machines in the cluster. + * + * @param {string} [parameters.wsfcDomainProfile.sqlServiceAccount] Account + * name under which SQL service will run on all participating SQL virtual + * machines in the cluster. + * + * @param {string} [parameters.wsfcDomainProfile.fileShareWitnessPath] Optional + * path for fileshare witness. + * + * @param {string} [parameters.wsfcDomainProfile.storageAccountUrl] Fully + * qualified ARM resource id of the witness storage account. + * + * @param {string} [parameters.wsfcDomainProfile.storageAccountPrimaryKey] + * Primary key of the witness storage account. + * + * @param {string} parameters.location Resource location. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName, sqlVirtualMachineGroupName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, sqlVirtualMachineGroupName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Creates or updates a SQL virtual machine group. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {object} parameters The SQL virtual machine group. + * + * @param {string} [parameters.sqlImageOffer] SQL image offer. Examples may + * include SQL2016-WS2016, SQL2017-WS2016. + * + * @param {string} [parameters.sqlImageSku] SQL image sku. Possible values + * include: 'Developer', 'Enterprise' + * + * @param {object} [parameters.wsfcDomainProfile] Cluster Active Directory + * domain profile. + * + * @param {string} [parameters.wsfcDomainProfile.domainFqdn] Fully qualified + * name of the domain. + * + * @param {string} [parameters.wsfcDomainProfile.ouPath] Organizational Unit + * path in which the nodes and cluster will be present. + * + * @param {string} [parameters.wsfcDomainProfile.clusterBootstrapAccount] + * Account name used for creating cluster (at minimum needs permissions to + * 'Create Computer Objects' in domain). + * + * @param {string} [parameters.wsfcDomainProfile.clusterOperatorAccount] + * Account name used for operating cluster i.e. will be part of administrators + * group on all the participating virtual machines in the cluster. + * + * @param {string} [parameters.wsfcDomainProfile.sqlServiceAccount] Account + * name under which SQL service will run on all participating SQL virtual + * machines in the cluster. + * + * @param {string} [parameters.wsfcDomainProfile.fileShareWitnessPath] Optional + * path for fileshare witness. + * + * @param {string} [parameters.wsfcDomainProfile.storageAccountUrl] Fully + * qualified ARM resource id of the witness storage account. + * + * @param {string} [parameters.wsfcDomainProfile.storageAccountPrimaryKey] + * Primary key of the witness storage account. + * + * @param {string} parameters.location Resource location. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {SqlVirtualMachineGroup} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachineGroup} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(resourceGroupName, sqlVirtualMachineGroupName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, sqlVirtualMachineGroupName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createOrUpdate(resourceGroupName, sqlVirtualMachineGroupName, parameters, options, optionalCallback); + } + } + + /** + * Deletes a SQL virtual machine group. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName, sqlVirtualMachineGroupName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, sqlVirtualMachineGroupName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Deletes a SQL virtual machine group. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName, sqlVirtualMachineGroupName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, sqlVirtualMachineGroupName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(resourceGroupName, sqlVirtualMachineGroupName, options, optionalCallback); + } + } + + /** + * Updates SQL virtual machine group tags. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {object} parameters The SQL virtual machine group. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + updateWithHttpOperationResponse(resourceGroupName, sqlVirtualMachineGroupName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._update(resourceGroupName, sqlVirtualMachineGroupName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Updates SQL virtual machine group tags. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {object} parameters The SQL virtual machine group. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {SqlVirtualMachineGroup} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachineGroup} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + update(resourceGroupName, sqlVirtualMachineGroupName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._update(resourceGroupName, sqlVirtualMachineGroupName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._update(resourceGroupName, sqlVirtualMachineGroupName, parameters, options, optionalCallback); + } + } + + /** + * Gets all SQL virtual machine groups in a resource group. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listByResourceGroupWithHttpOperationResponse(resourceGroupName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets all SQL virtual machine groups in a resource group. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {SqlVirtualMachineGroupListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachineGroupListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listByResourceGroup(resourceGroupName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByResourceGroup(resourceGroupName, options, optionalCallback); + } + } + + /** + * Gets all SQL virtual machine groups in a subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listWithHttpOperationResponse(options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._list(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets all SQL virtual machine groups in a subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {SqlVirtualMachineGroupListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachineGroupListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + list(options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._list(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._list(options, optionalCallback); + } + } + + /** + * Creates or updates a SQL virtual machine group. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {object} parameters The SQL virtual machine group. + * + * @param {string} [parameters.sqlImageOffer] SQL image offer. Examples may + * include SQL2016-WS2016, SQL2017-WS2016. + * + * @param {string} [parameters.sqlImageSku] SQL image sku. Possible values + * include: 'Developer', 'Enterprise' + * + * @param {object} [parameters.wsfcDomainProfile] Cluster Active Directory + * domain profile. + * + * @param {string} [parameters.wsfcDomainProfile.domainFqdn] Fully qualified + * name of the domain. + * + * @param {string} [parameters.wsfcDomainProfile.ouPath] Organizational Unit + * path in which the nodes and cluster will be present. + * + * @param {string} [parameters.wsfcDomainProfile.clusterBootstrapAccount] + * Account name used for creating cluster (at minimum needs permissions to + * 'Create Computer Objects' in domain). + * + * @param {string} [parameters.wsfcDomainProfile.clusterOperatorAccount] + * Account name used for operating cluster i.e. will be part of administrators + * group on all the participating virtual machines in the cluster. + * + * @param {string} [parameters.wsfcDomainProfile.sqlServiceAccount] Account + * name under which SQL service will run on all participating SQL virtual + * machines in the cluster. + * + * @param {string} [parameters.wsfcDomainProfile.fileShareWitnessPath] Optional + * path for fileshare witness. + * + * @param {string} [parameters.wsfcDomainProfile.storageAccountUrl] Fully + * qualified ARM resource id of the witness storage account. + * + * @param {string} [parameters.wsfcDomainProfile.storageAccountPrimaryKey] + * Primary key of the witness storage account. + * + * @param {string} parameters.location Resource location. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, sqlVirtualMachineGroupName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, sqlVirtualMachineGroupName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Creates or updates a SQL virtual machine group. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {object} parameters The SQL virtual machine group. + * + * @param {string} [parameters.sqlImageOffer] SQL image offer. Examples may + * include SQL2016-WS2016, SQL2017-WS2016. + * + * @param {string} [parameters.sqlImageSku] SQL image sku. Possible values + * include: 'Developer', 'Enterprise' + * + * @param {object} [parameters.wsfcDomainProfile] Cluster Active Directory + * domain profile. + * + * @param {string} [parameters.wsfcDomainProfile.domainFqdn] Fully qualified + * name of the domain. + * + * @param {string} [parameters.wsfcDomainProfile.ouPath] Organizational Unit + * path in which the nodes and cluster will be present. + * + * @param {string} [parameters.wsfcDomainProfile.clusterBootstrapAccount] + * Account name used for creating cluster (at minimum needs permissions to + * 'Create Computer Objects' in domain). + * + * @param {string} [parameters.wsfcDomainProfile.clusterOperatorAccount] + * Account name used for operating cluster i.e. will be part of administrators + * group on all the participating virtual machines in the cluster. + * + * @param {string} [parameters.wsfcDomainProfile.sqlServiceAccount] Account + * name under which SQL service will run on all participating SQL virtual + * machines in the cluster. + * + * @param {string} [parameters.wsfcDomainProfile.fileShareWitnessPath] Optional + * path for fileshare witness. + * + * @param {string} [parameters.wsfcDomainProfile.storageAccountUrl] Fully + * qualified ARM resource id of the witness storage account. + * + * @param {string} [parameters.wsfcDomainProfile.storageAccountPrimaryKey] + * Primary key of the witness storage account. + * + * @param {string} parameters.location Resource location. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {SqlVirtualMachineGroup} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachineGroup} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginCreateOrUpdate(resourceGroupName, sqlVirtualMachineGroupName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, sqlVirtualMachineGroupName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginCreateOrUpdate(resourceGroupName, sqlVirtualMachineGroupName, parameters, options, optionalCallback); + } + } + + /** + * Deletes a SQL virtual machine group. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginDeleteMethodWithHttpOperationResponse(resourceGroupName, sqlVirtualMachineGroupName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginDeleteMethod(resourceGroupName, sqlVirtualMachineGroupName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Deletes a SQL virtual machine group. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginDeleteMethod(resourceGroupName, sqlVirtualMachineGroupName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginDeleteMethod(resourceGroupName, sqlVirtualMachineGroupName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginDeleteMethod(resourceGroupName, sqlVirtualMachineGroupName, options, optionalCallback); + } + } + + /** + * Updates SQL virtual machine group tags. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {object} parameters The SQL virtual machine group. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginUpdateWithHttpOperationResponse(resourceGroupName, sqlVirtualMachineGroupName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginUpdate(resourceGroupName, sqlVirtualMachineGroupName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Updates SQL virtual machine group tags. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineGroupName Name of the SQL virtual machine + * group. + * + * @param {object} parameters The SQL virtual machine group. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {SqlVirtualMachineGroup} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachineGroup} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginUpdate(resourceGroupName, sqlVirtualMachineGroupName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginUpdate(resourceGroupName, sqlVirtualMachineGroupName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginUpdate(resourceGroupName, sqlVirtualMachineGroupName, parameters, options, optionalCallback); + } + } + + /** + * Gets all SQL virtual machine groups in a resource group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listByResourceGroupNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByResourceGroupNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets all SQL virtual machine groups in a resource group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {SqlVirtualMachineGroupListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachineGroupListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listByResourceGroupNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listByResourceGroupNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByResourceGroupNext(nextPageLink, options, optionalCallback); + } + } + + /** + * Gets all SQL virtual machine groups in a subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets all SQL virtual machine groups in a subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {SqlVirtualMachineGroupListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachineGroupListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listNext(nextPageLink, options, optionalCallback); + } + } + +} + +module.exports = SqlVirtualMachineGroups; diff --git a/lib/services/sqlvirtualmachineManagement/lib/operations/sqlVirtualMachines.js b/lib/services/sqlvirtualmachineManagement/lib/operations/sqlVirtualMachines.js new file mode 100644 index 0000000000..ce437295a8 --- /dev/null +++ b/lib/services/sqlvirtualmachineManagement/lib/operations/sqlVirtualMachines.js @@ -0,0 +1,3454 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const WebResource = msRest.WebResource; + +/** + * Gets a SQL virtual machine. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineName Name of the SQL virtual machine. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] The child resources to include in the + * response. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachine} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _get(resourceGroupName, sqlVirtualMachineName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let expand = (options && options.expand !== undefined) ? options.expand : undefined; + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (sqlVirtualMachineName === null || sqlVirtualMachineName === undefined || typeof sqlVirtualMachineName.valueOf() !== 'string') { + throw new Error('sqlVirtualMachineName cannot be null or undefined and it must be of type string.'); + } + if (expand !== null && expand !== undefined && typeof expand.valueOf() !== 'string') { + throw new Error('expand must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{sqlVirtualMachineName}', encodeURIComponent(sqlVirtualMachineName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + if (expand !== null && expand !== undefined) { + queryParameters.push('$expand=' + encodeURIComponent(expand)); + } + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SqlVirtualMachine']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + + +/** + * Creates or updates a SQL virtual machine. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineName Name of the SQL virtual machine. + * + * @param {object} parameters The SQL virtual machine. + * + * @param {object} [parameters.identity] Azure Active Directory identity of the + * server. + * + * @param {string} [parameters.identity.type] The identity type. Set this to + * 'SystemAssigned' in order to automatically create and assign an Azure Active + * Directory principal for the resource. Possible values include: + * 'SystemAssigned' + * + * @param {string} [parameters.virtualMachineResourceId] ARM Resource id of + * underlying virtual machine created from SQL marketplace image. + * + * @param {string} [parameters.sqlServerLicenseType] SQL Server license type. + * Possible values include: 'PAYG', 'AHUB' + * + * @param {string} [parameters.sqlVirtualMachineGroupResourceId] ARM resource + * id of the SQL virtual machine group this SQL virtual machine is or will be + * part of. + * + * @param {object} [parameters.wsfcDomainCredentials] Domain credentials for + * setting up Windows Server Failover Cluster for SQL availability group. + * + * @param {string} + * [parameters.wsfcDomainCredentials.clusterBootstrapAccountPassword] Cluster + * bootstrap account password. + * + * @param {string} + * [parameters.wsfcDomainCredentials.clusterOperatorAccountPassword] Cluster + * operator account password. + * + * @param {string} [parameters.wsfcDomainCredentials.sqlServiceAccountPassword] + * SQL service account password. + * + * @param {object} [parameters.autoPatchingSettings] Auto patching settings for + * applying critical security updates to SQL virtual machine. + * + * @param {boolean} [parameters.autoPatchingSettings.enable] Enable or disable + * autopatching on SQL virtual machine. + * + * @param {string} [parameters.autoPatchingSettings.dayOfWeek] Day of week to + * apply the patch on. Possible values include: 'Monday', 'Tuesday', + * 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday' + * + * @param {number} + * [parameters.autoPatchingSettings.maintenanceWindowStartingHour] Hour of the + * day when patching is initiated. Local VM time. + * + * @param {number} [parameters.autoPatchingSettings.maintenanceWindowDuration] + * Duration of patching. + * + * @param {object} [parameters.autoBackupSettings] Auto backup settings for SQL + * Server. + * + * @param {boolean} [parameters.autoBackupSettings.enable] Enable or disable + * autobackup on SQL virtual machine. + * + * @param {boolean} [parameters.autoBackupSettings.enableEncryption] Enable or + * disable encryption for backup on SQL virtual machine. + * + * @param {number} [parameters.autoBackupSettings.retentionPeriod] Retention + * period of backup: 1-30 days. + * + * @param {string} [parameters.autoBackupSettings.storageAccountUrl] Storage + * account url where backup will be taken to. + * + * @param {string} [parameters.autoBackupSettings.storageAccessKey] Storage + * account key where backup will be taken to. + * + * @param {string} [parameters.autoBackupSettings.password] Password for + * encryption on backup. + * + * @param {boolean} [parameters.autoBackupSettings.backupSystemDbs] Include or + * exclude system databases from auto backup. + * + * @param {string} [parameters.autoBackupSettings.backupScheduleType] Backup + * schedule type. Possible values include: 'Manual', 'Automated' + * + * @param {string} [parameters.autoBackupSettings.fullBackupFrequency] + * Frequency of full backups. In both cases, full backups begin during the next + * scheduled time window. Possible values include: 'Daily', 'Weekly' + * + * @param {number} [parameters.autoBackupSettings.fullBackupStartTime] Start + * time of a given day during which full backups can take place. 0-23 hours. + * + * @param {number} [parameters.autoBackupSettings.fullBackupWindowHours] + * Duration of the time window of a given day during which full backups can + * take place. 1-23 hours. + * + * @param {number} [parameters.autoBackupSettings.logBackupFrequency] Frequency + * of log backups. 5-60 minutes. + * + * @param {object} [parameters.keyVaultCredentialSettings] Key vault credential + * settings. + * + * @param {boolean} [parameters.keyVaultCredentialSettings.enable] Enable or + * disable key vault credential setting. + * + * @param {string} [parameters.keyVaultCredentialSettings.credentialName] + * Credential name. + * + * @param {string} [parameters.keyVaultCredentialSettings.azureKeyVaultUrl] + * Azure Key Vault url. + * + * @param {string} [parameters.keyVaultCredentialSettings.servicePrincipalName] + * Service principal name to access key vault. + * + * @param {string} + * [parameters.keyVaultCredentialSettings.servicePrincipalSecret] Service + * principal name secret to access key vault. + * + * @param {object} [parameters.serverConfigurationsManagementSettings] SQL + * Server configuration management settings. + * + * @param {object} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings] + * SQL connectivity type settings. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings.connectivityType] + * SQL Server connectivity option. Possible values include: 'LOCAL', 'PRIVATE', + * 'PUBLIC' + * + * @param {number} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings.port] + * SQL Server port. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings.sqlAuthUpdateUserName] + * SQL Server sysadmin login to create. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings.sqlAuthUpdatePassword] + * SQL Server sysadmin login password. + * + * @param {object} + * [parameters.serverConfigurationsManagementSettings.sqlWorkloadTypeUpdateSettings] + * SQL workload type settings. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlWorkloadTypeUpdateSettings.sqlWorkloadType] + * SQL Server workload type. Possible values include: 'GENERAL', 'OLTP', 'DW' + * + * @param {object} + * [parameters.serverConfigurationsManagementSettings.sqlStorageUpdateSettings] + * SQL storage update settings. + * + * @param {number} + * [parameters.serverConfigurationsManagementSettings.sqlStorageUpdateSettings.diskCount] + * Virtual machine disk count. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlStorageUpdateSettings.diskConfigurationType] + * Disk configuration to apply to SQL Server. Possible values include: 'NEW', + * 'EXTEND', 'ADD' + * + * @param {number} + * [parameters.serverConfigurationsManagementSettings.sqlStorageUpdateSettings.startingDeviceId] + * Device id of the first disk to be updated. + * + * @param {object} + * [parameters.serverConfigurationsManagementSettings.additionalFeaturesServerConfigurations] + * Additional SQL feature settings. + * + * @param {boolean} + * [parameters.serverConfigurationsManagementSettings.additionalFeaturesServerConfigurations.isRServicesEnabled] + * Enable or disable R services (SQL 2016 onwards). + * + * @param {string} parameters.location Resource location. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachine} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _createOrUpdate(resourceGroupName, sqlVirtualMachineName, parameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginCreateOrUpdate(resourceGroupName, sqlVirtualMachineName, parameters, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SqlVirtualMachine']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + + return callback(null, result, httpRequest, response); + }); + }); +} + + +/** + * Deletes a SQL virtual machine. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineName Name of the SQL virtual machine. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _deleteMethod(resourceGroupName, sqlVirtualMachineName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginDeleteMethod(resourceGroupName, sqlVirtualMachineName, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + + return callback(null, result, httpRequest, response); + }); + }); +} + + +/** + * Updates a SQL virtual machine. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineName Name of the SQL virtual machine. + * + * @param {object} parameters The SQL virtual machine. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachine} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _update(resourceGroupName, sqlVirtualMachineName, parameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginUpdate(resourceGroupName, sqlVirtualMachineName, parameters, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SqlVirtualMachine']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + + return callback(null, result, httpRequest, response); + }); + }); +} + +/** + * Gets all SQL virtual machines in a resource group. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachineListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listByResourceGroup(resourceGroupName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SqlVirtualMachineListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Gets all SQL virtual machines in a subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachineListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _list(options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SqlVirtualMachineListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Creates or updates a SQL virtual machine. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineName Name of the SQL virtual machine. + * + * @param {object} parameters The SQL virtual machine. + * + * @param {object} [parameters.identity] Azure Active Directory identity of the + * server. + * + * @param {string} [parameters.identity.type] The identity type. Set this to + * 'SystemAssigned' in order to automatically create and assign an Azure Active + * Directory principal for the resource. Possible values include: + * 'SystemAssigned' + * + * @param {string} [parameters.virtualMachineResourceId] ARM Resource id of + * underlying virtual machine created from SQL marketplace image. + * + * @param {string} [parameters.sqlServerLicenseType] SQL Server license type. + * Possible values include: 'PAYG', 'AHUB' + * + * @param {string} [parameters.sqlVirtualMachineGroupResourceId] ARM resource + * id of the SQL virtual machine group this SQL virtual machine is or will be + * part of. + * + * @param {object} [parameters.wsfcDomainCredentials] Domain credentials for + * setting up Windows Server Failover Cluster for SQL availability group. + * + * @param {string} + * [parameters.wsfcDomainCredentials.clusterBootstrapAccountPassword] Cluster + * bootstrap account password. + * + * @param {string} + * [parameters.wsfcDomainCredentials.clusterOperatorAccountPassword] Cluster + * operator account password. + * + * @param {string} [parameters.wsfcDomainCredentials.sqlServiceAccountPassword] + * SQL service account password. + * + * @param {object} [parameters.autoPatchingSettings] Auto patching settings for + * applying critical security updates to SQL virtual machine. + * + * @param {boolean} [parameters.autoPatchingSettings.enable] Enable or disable + * autopatching on SQL virtual machine. + * + * @param {string} [parameters.autoPatchingSettings.dayOfWeek] Day of week to + * apply the patch on. Possible values include: 'Monday', 'Tuesday', + * 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday' + * + * @param {number} + * [parameters.autoPatchingSettings.maintenanceWindowStartingHour] Hour of the + * day when patching is initiated. Local VM time. + * + * @param {number} [parameters.autoPatchingSettings.maintenanceWindowDuration] + * Duration of patching. + * + * @param {object} [parameters.autoBackupSettings] Auto backup settings for SQL + * Server. + * + * @param {boolean} [parameters.autoBackupSettings.enable] Enable or disable + * autobackup on SQL virtual machine. + * + * @param {boolean} [parameters.autoBackupSettings.enableEncryption] Enable or + * disable encryption for backup on SQL virtual machine. + * + * @param {number} [parameters.autoBackupSettings.retentionPeriod] Retention + * period of backup: 1-30 days. + * + * @param {string} [parameters.autoBackupSettings.storageAccountUrl] Storage + * account url where backup will be taken to. + * + * @param {string} [parameters.autoBackupSettings.storageAccessKey] Storage + * account key where backup will be taken to. + * + * @param {string} [parameters.autoBackupSettings.password] Password for + * encryption on backup. + * + * @param {boolean} [parameters.autoBackupSettings.backupSystemDbs] Include or + * exclude system databases from auto backup. + * + * @param {string} [parameters.autoBackupSettings.backupScheduleType] Backup + * schedule type. Possible values include: 'Manual', 'Automated' + * + * @param {string} [parameters.autoBackupSettings.fullBackupFrequency] + * Frequency of full backups. In both cases, full backups begin during the next + * scheduled time window. Possible values include: 'Daily', 'Weekly' + * + * @param {number} [parameters.autoBackupSettings.fullBackupStartTime] Start + * time of a given day during which full backups can take place. 0-23 hours. + * + * @param {number} [parameters.autoBackupSettings.fullBackupWindowHours] + * Duration of the time window of a given day during which full backups can + * take place. 1-23 hours. + * + * @param {number} [parameters.autoBackupSettings.logBackupFrequency] Frequency + * of log backups. 5-60 minutes. + * + * @param {object} [parameters.keyVaultCredentialSettings] Key vault credential + * settings. + * + * @param {boolean} [parameters.keyVaultCredentialSettings.enable] Enable or + * disable key vault credential setting. + * + * @param {string} [parameters.keyVaultCredentialSettings.credentialName] + * Credential name. + * + * @param {string} [parameters.keyVaultCredentialSettings.azureKeyVaultUrl] + * Azure Key Vault url. + * + * @param {string} [parameters.keyVaultCredentialSettings.servicePrincipalName] + * Service principal name to access key vault. + * + * @param {string} + * [parameters.keyVaultCredentialSettings.servicePrincipalSecret] Service + * principal name secret to access key vault. + * + * @param {object} [parameters.serverConfigurationsManagementSettings] SQL + * Server configuration management settings. + * + * @param {object} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings] + * SQL connectivity type settings. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings.connectivityType] + * SQL Server connectivity option. Possible values include: 'LOCAL', 'PRIVATE', + * 'PUBLIC' + * + * @param {number} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings.port] + * SQL Server port. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings.sqlAuthUpdateUserName] + * SQL Server sysadmin login to create. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings.sqlAuthUpdatePassword] + * SQL Server sysadmin login password. + * + * @param {object} + * [parameters.serverConfigurationsManagementSettings.sqlWorkloadTypeUpdateSettings] + * SQL workload type settings. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlWorkloadTypeUpdateSettings.sqlWorkloadType] + * SQL Server workload type. Possible values include: 'GENERAL', 'OLTP', 'DW' + * + * @param {object} + * [parameters.serverConfigurationsManagementSettings.sqlStorageUpdateSettings] + * SQL storage update settings. + * + * @param {number} + * [parameters.serverConfigurationsManagementSettings.sqlStorageUpdateSettings.diskCount] + * Virtual machine disk count. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlStorageUpdateSettings.diskConfigurationType] + * Disk configuration to apply to SQL Server. Possible values include: 'NEW', + * 'EXTEND', 'ADD' + * + * @param {number} + * [parameters.serverConfigurationsManagementSettings.sqlStorageUpdateSettings.startingDeviceId] + * Device id of the first disk to be updated. + * + * @param {object} + * [parameters.serverConfigurationsManagementSettings.additionalFeaturesServerConfigurations] + * Additional SQL feature settings. + * + * @param {boolean} + * [parameters.serverConfigurationsManagementSettings.additionalFeaturesServerConfigurations.isRServicesEnabled] + * Enable or disable R services (SQL 2016 onwards). + * + * @param {string} parameters.location Resource location. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachine} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginCreateOrUpdate(resourceGroupName, sqlVirtualMachineName, parameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (sqlVirtualMachineName === null || sqlVirtualMachineName === undefined || typeof sqlVirtualMachineName.valueOf() !== 'string') { + throw new Error('sqlVirtualMachineName cannot be null or undefined and it must be of type string.'); + } + if (parameters === null || parameters === undefined) { + throw new Error('parameters cannot be null or undefined.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{sqlVirtualMachineName}', encodeURIComponent(sqlVirtualMachineName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PUT'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (parameters !== null && parameters !== undefined) { + let requestModelMapper = new client.models['SqlVirtualMachine']().mapper(); + requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(parameters, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 201) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SqlVirtualMachine']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SqlVirtualMachine']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Deletes a SQL virtual machine. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineName Name of the SQL virtual machine. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginDeleteMethod(resourceGroupName, sqlVirtualMachineName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (sqlVirtualMachineName === null || sqlVirtualMachineName === undefined || typeof sqlVirtualMachineName.valueOf() !== 'string') { + throw new Error('sqlVirtualMachineName cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{sqlVirtualMachineName}', encodeURIComponent(sqlVirtualMachineName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'DELETE'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Updates a SQL virtual machine. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineName Name of the SQL virtual machine. + * + * @param {object} parameters The SQL virtual machine. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachine} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginUpdate(resourceGroupName, sqlVirtualMachineName, parameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (sqlVirtualMachineName === null || sqlVirtualMachineName === undefined || typeof sqlVirtualMachineName.valueOf() !== 'string') { + throw new Error('sqlVirtualMachineName cannot be null or undefined and it must be of type string.'); + } + if (parameters === null || parameters === undefined) { + throw new Error('parameters cannot be null or undefined.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{sqlVirtualMachineName}', encodeURIComponent(sqlVirtualMachineName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PATCH'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (parameters !== null && parameters !== undefined) { + let requestModelMapper = new client.models['SqlVirtualMachineUpdate']().mapper(); + requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(parameters, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SqlVirtualMachine']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Gets all SQL virtual machines in a resource group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachineListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listByResourceGroupNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SqlVirtualMachineListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Gets all SQL virtual machines in a subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachineListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SqlVirtualMachineListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a SqlVirtualMachines. */ +class SqlVirtualMachines { + /** + * Create a SqlVirtualMachines. + * @param {SqlVirtualMachineManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._get = _get; + this._createOrUpdate = _createOrUpdate; + this._deleteMethod = _deleteMethod; + this._update = _update; + this._listByResourceGroup = _listByResourceGroup; + this._list = _list; + this._beginCreateOrUpdate = _beginCreateOrUpdate; + this._beginDeleteMethod = _beginDeleteMethod; + this._beginUpdate = _beginUpdate; + this._listByResourceGroupNext = _listByResourceGroupNext; + this._listNext = _listNext; + } + + /** + * Gets a SQL virtual machine. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineName Name of the SQL virtual machine. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] The child resources to include in the + * response. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName, sqlVirtualMachineName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, sqlVirtualMachineName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets a SQL virtual machine. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineName Name of the SQL virtual machine. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] The child resources to include in the + * response. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {SqlVirtualMachine} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachine} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName, sqlVirtualMachineName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._get(resourceGroupName, sqlVirtualMachineName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, sqlVirtualMachineName, options, optionalCallback); + } + } + + /** + * Creates or updates a SQL virtual machine. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineName Name of the SQL virtual machine. + * + * @param {object} parameters The SQL virtual machine. + * + * @param {object} [parameters.identity] Azure Active Directory identity of the + * server. + * + * @param {string} [parameters.identity.type] The identity type. Set this to + * 'SystemAssigned' in order to automatically create and assign an Azure Active + * Directory principal for the resource. Possible values include: + * 'SystemAssigned' + * + * @param {string} [parameters.virtualMachineResourceId] ARM Resource id of + * underlying virtual machine created from SQL marketplace image. + * + * @param {string} [parameters.sqlServerLicenseType] SQL Server license type. + * Possible values include: 'PAYG', 'AHUB' + * + * @param {string} [parameters.sqlVirtualMachineGroupResourceId] ARM resource + * id of the SQL virtual machine group this SQL virtual machine is or will be + * part of. + * + * @param {object} [parameters.wsfcDomainCredentials] Domain credentials for + * setting up Windows Server Failover Cluster for SQL availability group. + * + * @param {string} + * [parameters.wsfcDomainCredentials.clusterBootstrapAccountPassword] Cluster + * bootstrap account password. + * + * @param {string} + * [parameters.wsfcDomainCredentials.clusterOperatorAccountPassword] Cluster + * operator account password. + * + * @param {string} [parameters.wsfcDomainCredentials.sqlServiceAccountPassword] + * SQL service account password. + * + * @param {object} [parameters.autoPatchingSettings] Auto patching settings for + * applying critical security updates to SQL virtual machine. + * + * @param {boolean} [parameters.autoPatchingSettings.enable] Enable or disable + * autopatching on SQL virtual machine. + * + * @param {string} [parameters.autoPatchingSettings.dayOfWeek] Day of week to + * apply the patch on. Possible values include: 'Monday', 'Tuesday', + * 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday' + * + * @param {number} + * [parameters.autoPatchingSettings.maintenanceWindowStartingHour] Hour of the + * day when patching is initiated. Local VM time. + * + * @param {number} [parameters.autoPatchingSettings.maintenanceWindowDuration] + * Duration of patching. + * + * @param {object} [parameters.autoBackupSettings] Auto backup settings for SQL + * Server. + * + * @param {boolean} [parameters.autoBackupSettings.enable] Enable or disable + * autobackup on SQL virtual machine. + * + * @param {boolean} [parameters.autoBackupSettings.enableEncryption] Enable or + * disable encryption for backup on SQL virtual machine. + * + * @param {number} [parameters.autoBackupSettings.retentionPeriod] Retention + * period of backup: 1-30 days. + * + * @param {string} [parameters.autoBackupSettings.storageAccountUrl] Storage + * account url where backup will be taken to. + * + * @param {string} [parameters.autoBackupSettings.storageAccessKey] Storage + * account key where backup will be taken to. + * + * @param {string} [parameters.autoBackupSettings.password] Password for + * encryption on backup. + * + * @param {boolean} [parameters.autoBackupSettings.backupSystemDbs] Include or + * exclude system databases from auto backup. + * + * @param {string} [parameters.autoBackupSettings.backupScheduleType] Backup + * schedule type. Possible values include: 'Manual', 'Automated' + * + * @param {string} [parameters.autoBackupSettings.fullBackupFrequency] + * Frequency of full backups. In both cases, full backups begin during the next + * scheduled time window. Possible values include: 'Daily', 'Weekly' + * + * @param {number} [parameters.autoBackupSettings.fullBackupStartTime] Start + * time of a given day during which full backups can take place. 0-23 hours. + * + * @param {number} [parameters.autoBackupSettings.fullBackupWindowHours] + * Duration of the time window of a given day during which full backups can + * take place. 1-23 hours. + * + * @param {number} [parameters.autoBackupSettings.logBackupFrequency] Frequency + * of log backups. 5-60 minutes. + * + * @param {object} [parameters.keyVaultCredentialSettings] Key vault credential + * settings. + * + * @param {boolean} [parameters.keyVaultCredentialSettings.enable] Enable or + * disable key vault credential setting. + * + * @param {string} [parameters.keyVaultCredentialSettings.credentialName] + * Credential name. + * + * @param {string} [parameters.keyVaultCredentialSettings.azureKeyVaultUrl] + * Azure Key Vault url. + * + * @param {string} [parameters.keyVaultCredentialSettings.servicePrincipalName] + * Service principal name to access key vault. + * + * @param {string} + * [parameters.keyVaultCredentialSettings.servicePrincipalSecret] Service + * principal name secret to access key vault. + * + * @param {object} [parameters.serverConfigurationsManagementSettings] SQL + * Server configuration management settings. + * + * @param {object} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings] + * SQL connectivity type settings. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings.connectivityType] + * SQL Server connectivity option. Possible values include: 'LOCAL', 'PRIVATE', + * 'PUBLIC' + * + * @param {number} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings.port] + * SQL Server port. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings.sqlAuthUpdateUserName] + * SQL Server sysadmin login to create. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings.sqlAuthUpdatePassword] + * SQL Server sysadmin login password. + * + * @param {object} + * [parameters.serverConfigurationsManagementSettings.sqlWorkloadTypeUpdateSettings] + * SQL workload type settings. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlWorkloadTypeUpdateSettings.sqlWorkloadType] + * SQL Server workload type. Possible values include: 'GENERAL', 'OLTP', 'DW' + * + * @param {object} + * [parameters.serverConfigurationsManagementSettings.sqlStorageUpdateSettings] + * SQL storage update settings. + * + * @param {number} + * [parameters.serverConfigurationsManagementSettings.sqlStorageUpdateSettings.diskCount] + * Virtual machine disk count. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlStorageUpdateSettings.diskConfigurationType] + * Disk configuration to apply to SQL Server. Possible values include: 'NEW', + * 'EXTEND', 'ADD' + * + * @param {number} + * [parameters.serverConfigurationsManagementSettings.sqlStorageUpdateSettings.startingDeviceId] + * Device id of the first disk to be updated. + * + * @param {object} + * [parameters.serverConfigurationsManagementSettings.additionalFeaturesServerConfigurations] + * Additional SQL feature settings. + * + * @param {boolean} + * [parameters.serverConfigurationsManagementSettings.additionalFeaturesServerConfigurations.isRServicesEnabled] + * Enable or disable R services (SQL 2016 onwards). + * + * @param {string} parameters.location Resource location. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName, sqlVirtualMachineName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, sqlVirtualMachineName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Creates or updates a SQL virtual machine. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineName Name of the SQL virtual machine. + * + * @param {object} parameters The SQL virtual machine. + * + * @param {object} [parameters.identity] Azure Active Directory identity of the + * server. + * + * @param {string} [parameters.identity.type] The identity type. Set this to + * 'SystemAssigned' in order to automatically create and assign an Azure Active + * Directory principal for the resource. Possible values include: + * 'SystemAssigned' + * + * @param {string} [parameters.virtualMachineResourceId] ARM Resource id of + * underlying virtual machine created from SQL marketplace image. + * + * @param {string} [parameters.sqlServerLicenseType] SQL Server license type. + * Possible values include: 'PAYG', 'AHUB' + * + * @param {string} [parameters.sqlVirtualMachineGroupResourceId] ARM resource + * id of the SQL virtual machine group this SQL virtual machine is or will be + * part of. + * + * @param {object} [parameters.wsfcDomainCredentials] Domain credentials for + * setting up Windows Server Failover Cluster for SQL availability group. + * + * @param {string} + * [parameters.wsfcDomainCredentials.clusterBootstrapAccountPassword] Cluster + * bootstrap account password. + * + * @param {string} + * [parameters.wsfcDomainCredentials.clusterOperatorAccountPassword] Cluster + * operator account password. + * + * @param {string} [parameters.wsfcDomainCredentials.sqlServiceAccountPassword] + * SQL service account password. + * + * @param {object} [parameters.autoPatchingSettings] Auto patching settings for + * applying critical security updates to SQL virtual machine. + * + * @param {boolean} [parameters.autoPatchingSettings.enable] Enable or disable + * autopatching on SQL virtual machine. + * + * @param {string} [parameters.autoPatchingSettings.dayOfWeek] Day of week to + * apply the patch on. Possible values include: 'Monday', 'Tuesday', + * 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday' + * + * @param {number} + * [parameters.autoPatchingSettings.maintenanceWindowStartingHour] Hour of the + * day when patching is initiated. Local VM time. + * + * @param {number} [parameters.autoPatchingSettings.maintenanceWindowDuration] + * Duration of patching. + * + * @param {object} [parameters.autoBackupSettings] Auto backup settings for SQL + * Server. + * + * @param {boolean} [parameters.autoBackupSettings.enable] Enable or disable + * autobackup on SQL virtual machine. + * + * @param {boolean} [parameters.autoBackupSettings.enableEncryption] Enable or + * disable encryption for backup on SQL virtual machine. + * + * @param {number} [parameters.autoBackupSettings.retentionPeriod] Retention + * period of backup: 1-30 days. + * + * @param {string} [parameters.autoBackupSettings.storageAccountUrl] Storage + * account url where backup will be taken to. + * + * @param {string} [parameters.autoBackupSettings.storageAccessKey] Storage + * account key where backup will be taken to. + * + * @param {string} [parameters.autoBackupSettings.password] Password for + * encryption on backup. + * + * @param {boolean} [parameters.autoBackupSettings.backupSystemDbs] Include or + * exclude system databases from auto backup. + * + * @param {string} [parameters.autoBackupSettings.backupScheduleType] Backup + * schedule type. Possible values include: 'Manual', 'Automated' + * + * @param {string} [parameters.autoBackupSettings.fullBackupFrequency] + * Frequency of full backups. In both cases, full backups begin during the next + * scheduled time window. Possible values include: 'Daily', 'Weekly' + * + * @param {number} [parameters.autoBackupSettings.fullBackupStartTime] Start + * time of a given day during which full backups can take place. 0-23 hours. + * + * @param {number} [parameters.autoBackupSettings.fullBackupWindowHours] + * Duration of the time window of a given day during which full backups can + * take place. 1-23 hours. + * + * @param {number} [parameters.autoBackupSettings.logBackupFrequency] Frequency + * of log backups. 5-60 minutes. + * + * @param {object} [parameters.keyVaultCredentialSettings] Key vault credential + * settings. + * + * @param {boolean} [parameters.keyVaultCredentialSettings.enable] Enable or + * disable key vault credential setting. + * + * @param {string} [parameters.keyVaultCredentialSettings.credentialName] + * Credential name. + * + * @param {string} [parameters.keyVaultCredentialSettings.azureKeyVaultUrl] + * Azure Key Vault url. + * + * @param {string} [parameters.keyVaultCredentialSettings.servicePrincipalName] + * Service principal name to access key vault. + * + * @param {string} + * [parameters.keyVaultCredentialSettings.servicePrincipalSecret] Service + * principal name secret to access key vault. + * + * @param {object} [parameters.serverConfigurationsManagementSettings] SQL + * Server configuration management settings. + * + * @param {object} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings] + * SQL connectivity type settings. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings.connectivityType] + * SQL Server connectivity option. Possible values include: 'LOCAL', 'PRIVATE', + * 'PUBLIC' + * + * @param {number} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings.port] + * SQL Server port. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings.sqlAuthUpdateUserName] + * SQL Server sysadmin login to create. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings.sqlAuthUpdatePassword] + * SQL Server sysadmin login password. + * + * @param {object} + * [parameters.serverConfigurationsManagementSettings.sqlWorkloadTypeUpdateSettings] + * SQL workload type settings. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlWorkloadTypeUpdateSettings.sqlWorkloadType] + * SQL Server workload type. Possible values include: 'GENERAL', 'OLTP', 'DW' + * + * @param {object} + * [parameters.serverConfigurationsManagementSettings.sqlStorageUpdateSettings] + * SQL storage update settings. + * + * @param {number} + * [parameters.serverConfigurationsManagementSettings.sqlStorageUpdateSettings.diskCount] + * Virtual machine disk count. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlStorageUpdateSettings.diskConfigurationType] + * Disk configuration to apply to SQL Server. Possible values include: 'NEW', + * 'EXTEND', 'ADD' + * + * @param {number} + * [parameters.serverConfigurationsManagementSettings.sqlStorageUpdateSettings.startingDeviceId] + * Device id of the first disk to be updated. + * + * @param {object} + * [parameters.serverConfigurationsManagementSettings.additionalFeaturesServerConfigurations] + * Additional SQL feature settings. + * + * @param {boolean} + * [parameters.serverConfigurationsManagementSettings.additionalFeaturesServerConfigurations.isRServicesEnabled] + * Enable or disable R services (SQL 2016 onwards). + * + * @param {string} parameters.location Resource location. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {SqlVirtualMachine} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachine} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(resourceGroupName, sqlVirtualMachineName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, sqlVirtualMachineName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createOrUpdate(resourceGroupName, sqlVirtualMachineName, parameters, options, optionalCallback); + } + } + + /** + * Deletes a SQL virtual machine. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineName Name of the SQL virtual machine. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName, sqlVirtualMachineName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, sqlVirtualMachineName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Deletes a SQL virtual machine. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineName Name of the SQL virtual machine. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName, sqlVirtualMachineName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, sqlVirtualMachineName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(resourceGroupName, sqlVirtualMachineName, options, optionalCallback); + } + } + + /** + * Updates a SQL virtual machine. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineName Name of the SQL virtual machine. + * + * @param {object} parameters The SQL virtual machine. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + updateWithHttpOperationResponse(resourceGroupName, sqlVirtualMachineName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._update(resourceGroupName, sqlVirtualMachineName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Updates a SQL virtual machine. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineName Name of the SQL virtual machine. + * + * @param {object} parameters The SQL virtual machine. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {SqlVirtualMachine} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachine} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + update(resourceGroupName, sqlVirtualMachineName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._update(resourceGroupName, sqlVirtualMachineName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._update(resourceGroupName, sqlVirtualMachineName, parameters, options, optionalCallback); + } + } + + /** + * Gets all SQL virtual machines in a resource group. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listByResourceGroupWithHttpOperationResponse(resourceGroupName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets all SQL virtual machines in a resource group. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {SqlVirtualMachineListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachineListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listByResourceGroup(resourceGroupName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByResourceGroup(resourceGroupName, options, optionalCallback); + } + } + + /** + * Gets all SQL virtual machines in a subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listWithHttpOperationResponse(options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._list(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets all SQL virtual machines in a subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {SqlVirtualMachineListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachineListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + list(options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._list(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._list(options, optionalCallback); + } + } + + /** + * Creates or updates a SQL virtual machine. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineName Name of the SQL virtual machine. + * + * @param {object} parameters The SQL virtual machine. + * + * @param {object} [parameters.identity] Azure Active Directory identity of the + * server. + * + * @param {string} [parameters.identity.type] The identity type. Set this to + * 'SystemAssigned' in order to automatically create and assign an Azure Active + * Directory principal for the resource. Possible values include: + * 'SystemAssigned' + * + * @param {string} [parameters.virtualMachineResourceId] ARM Resource id of + * underlying virtual machine created from SQL marketplace image. + * + * @param {string} [parameters.sqlServerLicenseType] SQL Server license type. + * Possible values include: 'PAYG', 'AHUB' + * + * @param {string} [parameters.sqlVirtualMachineGroupResourceId] ARM resource + * id of the SQL virtual machine group this SQL virtual machine is or will be + * part of. + * + * @param {object} [parameters.wsfcDomainCredentials] Domain credentials for + * setting up Windows Server Failover Cluster for SQL availability group. + * + * @param {string} + * [parameters.wsfcDomainCredentials.clusterBootstrapAccountPassword] Cluster + * bootstrap account password. + * + * @param {string} + * [parameters.wsfcDomainCredentials.clusterOperatorAccountPassword] Cluster + * operator account password. + * + * @param {string} [parameters.wsfcDomainCredentials.sqlServiceAccountPassword] + * SQL service account password. + * + * @param {object} [parameters.autoPatchingSettings] Auto patching settings for + * applying critical security updates to SQL virtual machine. + * + * @param {boolean} [parameters.autoPatchingSettings.enable] Enable or disable + * autopatching on SQL virtual machine. + * + * @param {string} [parameters.autoPatchingSettings.dayOfWeek] Day of week to + * apply the patch on. Possible values include: 'Monday', 'Tuesday', + * 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday' + * + * @param {number} + * [parameters.autoPatchingSettings.maintenanceWindowStartingHour] Hour of the + * day when patching is initiated. Local VM time. + * + * @param {number} [parameters.autoPatchingSettings.maintenanceWindowDuration] + * Duration of patching. + * + * @param {object} [parameters.autoBackupSettings] Auto backup settings for SQL + * Server. + * + * @param {boolean} [parameters.autoBackupSettings.enable] Enable or disable + * autobackup on SQL virtual machine. + * + * @param {boolean} [parameters.autoBackupSettings.enableEncryption] Enable or + * disable encryption for backup on SQL virtual machine. + * + * @param {number} [parameters.autoBackupSettings.retentionPeriod] Retention + * period of backup: 1-30 days. + * + * @param {string} [parameters.autoBackupSettings.storageAccountUrl] Storage + * account url where backup will be taken to. + * + * @param {string} [parameters.autoBackupSettings.storageAccessKey] Storage + * account key where backup will be taken to. + * + * @param {string} [parameters.autoBackupSettings.password] Password for + * encryption on backup. + * + * @param {boolean} [parameters.autoBackupSettings.backupSystemDbs] Include or + * exclude system databases from auto backup. + * + * @param {string} [parameters.autoBackupSettings.backupScheduleType] Backup + * schedule type. Possible values include: 'Manual', 'Automated' + * + * @param {string} [parameters.autoBackupSettings.fullBackupFrequency] + * Frequency of full backups. In both cases, full backups begin during the next + * scheduled time window. Possible values include: 'Daily', 'Weekly' + * + * @param {number} [parameters.autoBackupSettings.fullBackupStartTime] Start + * time of a given day during which full backups can take place. 0-23 hours. + * + * @param {number} [parameters.autoBackupSettings.fullBackupWindowHours] + * Duration of the time window of a given day during which full backups can + * take place. 1-23 hours. + * + * @param {number} [parameters.autoBackupSettings.logBackupFrequency] Frequency + * of log backups. 5-60 minutes. + * + * @param {object} [parameters.keyVaultCredentialSettings] Key vault credential + * settings. + * + * @param {boolean} [parameters.keyVaultCredentialSettings.enable] Enable or + * disable key vault credential setting. + * + * @param {string} [parameters.keyVaultCredentialSettings.credentialName] + * Credential name. + * + * @param {string} [parameters.keyVaultCredentialSettings.azureKeyVaultUrl] + * Azure Key Vault url. + * + * @param {string} [parameters.keyVaultCredentialSettings.servicePrincipalName] + * Service principal name to access key vault. + * + * @param {string} + * [parameters.keyVaultCredentialSettings.servicePrincipalSecret] Service + * principal name secret to access key vault. + * + * @param {object} [parameters.serverConfigurationsManagementSettings] SQL + * Server configuration management settings. + * + * @param {object} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings] + * SQL connectivity type settings. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings.connectivityType] + * SQL Server connectivity option. Possible values include: 'LOCAL', 'PRIVATE', + * 'PUBLIC' + * + * @param {number} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings.port] + * SQL Server port. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings.sqlAuthUpdateUserName] + * SQL Server sysadmin login to create. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings.sqlAuthUpdatePassword] + * SQL Server sysadmin login password. + * + * @param {object} + * [parameters.serverConfigurationsManagementSettings.sqlWorkloadTypeUpdateSettings] + * SQL workload type settings. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlWorkloadTypeUpdateSettings.sqlWorkloadType] + * SQL Server workload type. Possible values include: 'GENERAL', 'OLTP', 'DW' + * + * @param {object} + * [parameters.serverConfigurationsManagementSettings.sqlStorageUpdateSettings] + * SQL storage update settings. + * + * @param {number} + * [parameters.serverConfigurationsManagementSettings.sqlStorageUpdateSettings.diskCount] + * Virtual machine disk count. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlStorageUpdateSettings.diskConfigurationType] + * Disk configuration to apply to SQL Server. Possible values include: 'NEW', + * 'EXTEND', 'ADD' + * + * @param {number} + * [parameters.serverConfigurationsManagementSettings.sqlStorageUpdateSettings.startingDeviceId] + * Device id of the first disk to be updated. + * + * @param {object} + * [parameters.serverConfigurationsManagementSettings.additionalFeaturesServerConfigurations] + * Additional SQL feature settings. + * + * @param {boolean} + * [parameters.serverConfigurationsManagementSettings.additionalFeaturesServerConfigurations.isRServicesEnabled] + * Enable or disable R services (SQL 2016 onwards). + * + * @param {string} parameters.location Resource location. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, sqlVirtualMachineName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, sqlVirtualMachineName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Creates or updates a SQL virtual machine. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineName Name of the SQL virtual machine. + * + * @param {object} parameters The SQL virtual machine. + * + * @param {object} [parameters.identity] Azure Active Directory identity of the + * server. + * + * @param {string} [parameters.identity.type] The identity type. Set this to + * 'SystemAssigned' in order to automatically create and assign an Azure Active + * Directory principal for the resource. Possible values include: + * 'SystemAssigned' + * + * @param {string} [parameters.virtualMachineResourceId] ARM Resource id of + * underlying virtual machine created from SQL marketplace image. + * + * @param {string} [parameters.sqlServerLicenseType] SQL Server license type. + * Possible values include: 'PAYG', 'AHUB' + * + * @param {string} [parameters.sqlVirtualMachineGroupResourceId] ARM resource + * id of the SQL virtual machine group this SQL virtual machine is or will be + * part of. + * + * @param {object} [parameters.wsfcDomainCredentials] Domain credentials for + * setting up Windows Server Failover Cluster for SQL availability group. + * + * @param {string} + * [parameters.wsfcDomainCredentials.clusterBootstrapAccountPassword] Cluster + * bootstrap account password. + * + * @param {string} + * [parameters.wsfcDomainCredentials.clusterOperatorAccountPassword] Cluster + * operator account password. + * + * @param {string} [parameters.wsfcDomainCredentials.sqlServiceAccountPassword] + * SQL service account password. + * + * @param {object} [parameters.autoPatchingSettings] Auto patching settings for + * applying critical security updates to SQL virtual machine. + * + * @param {boolean} [parameters.autoPatchingSettings.enable] Enable or disable + * autopatching on SQL virtual machine. + * + * @param {string} [parameters.autoPatchingSettings.dayOfWeek] Day of week to + * apply the patch on. Possible values include: 'Monday', 'Tuesday', + * 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday' + * + * @param {number} + * [parameters.autoPatchingSettings.maintenanceWindowStartingHour] Hour of the + * day when patching is initiated. Local VM time. + * + * @param {number} [parameters.autoPatchingSettings.maintenanceWindowDuration] + * Duration of patching. + * + * @param {object} [parameters.autoBackupSettings] Auto backup settings for SQL + * Server. + * + * @param {boolean} [parameters.autoBackupSettings.enable] Enable or disable + * autobackup on SQL virtual machine. + * + * @param {boolean} [parameters.autoBackupSettings.enableEncryption] Enable or + * disable encryption for backup on SQL virtual machine. + * + * @param {number} [parameters.autoBackupSettings.retentionPeriod] Retention + * period of backup: 1-30 days. + * + * @param {string} [parameters.autoBackupSettings.storageAccountUrl] Storage + * account url where backup will be taken to. + * + * @param {string} [parameters.autoBackupSettings.storageAccessKey] Storage + * account key where backup will be taken to. + * + * @param {string} [parameters.autoBackupSettings.password] Password for + * encryption on backup. + * + * @param {boolean} [parameters.autoBackupSettings.backupSystemDbs] Include or + * exclude system databases from auto backup. + * + * @param {string} [parameters.autoBackupSettings.backupScheduleType] Backup + * schedule type. Possible values include: 'Manual', 'Automated' + * + * @param {string} [parameters.autoBackupSettings.fullBackupFrequency] + * Frequency of full backups. In both cases, full backups begin during the next + * scheduled time window. Possible values include: 'Daily', 'Weekly' + * + * @param {number} [parameters.autoBackupSettings.fullBackupStartTime] Start + * time of a given day during which full backups can take place. 0-23 hours. + * + * @param {number} [parameters.autoBackupSettings.fullBackupWindowHours] + * Duration of the time window of a given day during which full backups can + * take place. 1-23 hours. + * + * @param {number} [parameters.autoBackupSettings.logBackupFrequency] Frequency + * of log backups. 5-60 minutes. + * + * @param {object} [parameters.keyVaultCredentialSettings] Key vault credential + * settings. + * + * @param {boolean} [parameters.keyVaultCredentialSettings.enable] Enable or + * disable key vault credential setting. + * + * @param {string} [parameters.keyVaultCredentialSettings.credentialName] + * Credential name. + * + * @param {string} [parameters.keyVaultCredentialSettings.azureKeyVaultUrl] + * Azure Key Vault url. + * + * @param {string} [parameters.keyVaultCredentialSettings.servicePrincipalName] + * Service principal name to access key vault. + * + * @param {string} + * [parameters.keyVaultCredentialSettings.servicePrincipalSecret] Service + * principal name secret to access key vault. + * + * @param {object} [parameters.serverConfigurationsManagementSettings] SQL + * Server configuration management settings. + * + * @param {object} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings] + * SQL connectivity type settings. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings.connectivityType] + * SQL Server connectivity option. Possible values include: 'LOCAL', 'PRIVATE', + * 'PUBLIC' + * + * @param {number} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings.port] + * SQL Server port. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings.sqlAuthUpdateUserName] + * SQL Server sysadmin login to create. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlConnectivityUpdateSettings.sqlAuthUpdatePassword] + * SQL Server sysadmin login password. + * + * @param {object} + * [parameters.serverConfigurationsManagementSettings.sqlWorkloadTypeUpdateSettings] + * SQL workload type settings. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlWorkloadTypeUpdateSettings.sqlWorkloadType] + * SQL Server workload type. Possible values include: 'GENERAL', 'OLTP', 'DW' + * + * @param {object} + * [parameters.serverConfigurationsManagementSettings.sqlStorageUpdateSettings] + * SQL storage update settings. + * + * @param {number} + * [parameters.serverConfigurationsManagementSettings.sqlStorageUpdateSettings.diskCount] + * Virtual machine disk count. + * + * @param {string} + * [parameters.serverConfigurationsManagementSettings.sqlStorageUpdateSettings.diskConfigurationType] + * Disk configuration to apply to SQL Server. Possible values include: 'NEW', + * 'EXTEND', 'ADD' + * + * @param {number} + * [parameters.serverConfigurationsManagementSettings.sqlStorageUpdateSettings.startingDeviceId] + * Device id of the first disk to be updated. + * + * @param {object} + * [parameters.serverConfigurationsManagementSettings.additionalFeaturesServerConfigurations] + * Additional SQL feature settings. + * + * @param {boolean} + * [parameters.serverConfigurationsManagementSettings.additionalFeaturesServerConfigurations.isRServicesEnabled] + * Enable or disable R services (SQL 2016 onwards). + * + * @param {string} parameters.location Resource location. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {SqlVirtualMachine} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachine} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginCreateOrUpdate(resourceGroupName, sqlVirtualMachineName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, sqlVirtualMachineName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginCreateOrUpdate(resourceGroupName, sqlVirtualMachineName, parameters, options, optionalCallback); + } + } + + /** + * Deletes a SQL virtual machine. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineName Name of the SQL virtual machine. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginDeleteMethodWithHttpOperationResponse(resourceGroupName, sqlVirtualMachineName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginDeleteMethod(resourceGroupName, sqlVirtualMachineName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Deletes a SQL virtual machine. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineName Name of the SQL virtual machine. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginDeleteMethod(resourceGroupName, sqlVirtualMachineName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginDeleteMethod(resourceGroupName, sqlVirtualMachineName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginDeleteMethod(resourceGroupName, sqlVirtualMachineName, options, optionalCallback); + } + } + + /** + * Updates a SQL virtual machine. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineName Name of the SQL virtual machine. + * + * @param {object} parameters The SQL virtual machine. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginUpdateWithHttpOperationResponse(resourceGroupName, sqlVirtualMachineName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginUpdate(resourceGroupName, sqlVirtualMachineName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Updates a SQL virtual machine. + * + * @param {string} resourceGroupName Name of the resource group that contains + * the resource. You can obtain this value from the Azure Resource Manager API + * or the portal. + * + * @param {string} sqlVirtualMachineName Name of the SQL virtual machine. + * + * @param {object} parameters The SQL virtual machine. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {SqlVirtualMachine} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachine} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginUpdate(resourceGroupName, sqlVirtualMachineName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginUpdate(resourceGroupName, sqlVirtualMachineName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginUpdate(resourceGroupName, sqlVirtualMachineName, parameters, options, optionalCallback); + } + } + + /** + * Gets all SQL virtual machines in a resource group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listByResourceGroupNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByResourceGroupNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets all SQL virtual machines in a resource group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {SqlVirtualMachineListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachineListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listByResourceGroupNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listByResourceGroupNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByResourceGroupNext(nextPageLink, options, optionalCallback); + } + } + + /** + * Gets all SQL virtual machines in a subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets all SQL virtual machines in a subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {SqlVirtualMachineListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SqlVirtualMachineListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listNext(nextPageLink, options, optionalCallback); + } + } + +} + +module.exports = SqlVirtualMachines; diff --git a/lib/services/sqlvirtualmachineManagement/lib/sqlVirtualMachineManagementClient.d.ts b/lib/services/sqlvirtualmachineManagement/lib/sqlVirtualMachineManagementClient.d.ts new file mode 100644 index 0000000000..c64edb3179 --- /dev/null +++ b/lib/services/sqlvirtualmachineManagement/lib/sqlVirtualMachineManagementClient.d.ts @@ -0,0 +1,65 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import { ServiceClientCredentials } from 'ms-rest'; +import { AzureServiceClient, AzureServiceClientOptions } from 'ms-rest-azure'; +import * as models from "./models"; +import * as operations from "./operations"; + +export default class SqlVirtualMachineManagementClient extends AzureServiceClient { + /** + * Initializes a new instance of the SqlVirtualMachineManagementClient class. + * @constructor + * + * @class + * @param {credentials} credentials - Credentials needed for the client to connect to Azure. + * + * @param {string} subscriptionId - Subscription ID that identifies an Azure subscription. + * + * @param {string} [baseUri] - The base URI of the service. + * + * @param {object} [options] - The parameter options + * + * @param {Array} [options.filters] - Filters to be added to the request pipeline + * + * @param {object} [options.requestOptions] - Options for the underlying request object + * {@link https://github.com/request/request#requestoptions-callback Options doc} + * + * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy + * + * @param {string} [options.acceptLanguage] - The preferred language for the response. + * + * @param {number} [options.longRunningOperationRetryTimeout] - The retry timeout in seconds for Long Running Operations. Default value is 30. + * + * @param {boolean} [options.generateClientRequestId] - Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * + */ + constructor(credentials: ServiceClientCredentials, subscriptionId: string, baseUri?: string, options?: AzureServiceClientOptions); + + credentials: ServiceClientCredentials; + + subscriptionId: string; + + apiVersion: string; + + acceptLanguage: string; + + longRunningOperationRetryTimeout: number; + + generateClientRequestId: boolean; + + // Operation groups + availabilityGroupListeners: operations.AvailabilityGroupListeners; + operations: operations.Operations; + sqlVirtualMachineGroups: operations.SqlVirtualMachineGroups; + sqlVirtualMachines: operations.SqlVirtualMachines; +} + +export { SqlVirtualMachineManagementClient, models as SqlVirtualMachineManagementModels }; diff --git a/lib/services/sqlvirtualmachineManagement/lib/sqlVirtualMachineManagementClient.js b/lib/services/sqlvirtualmachineManagement/lib/sqlVirtualMachineManagementClient.js new file mode 100644 index 0000000000..faf065647e --- /dev/null +++ b/lib/services/sqlvirtualmachineManagement/lib/sqlVirtualMachineManagementClient.js @@ -0,0 +1,88 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +/* jshint latedef:false */ +/* jshint forin:false */ +/* jshint noempty:false */ + +'use strict'; + +const msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const ServiceClient = msRestAzure.AzureServiceClient; + +const models = require('./models'); +const operations = require('./operations'); + + +/** Class representing a SqlVirtualMachineManagementClient. */ +class SqlVirtualMachineManagementClient extends ServiceClient { + /** + * Create a SqlVirtualMachineManagementClient. + * @param {credentials} credentials - Credentials needed for the client to connect to Azure. + * @param {string} subscriptionId - Subscription ID that identifies an Azure subscription. + * @param {string} [baseUri] - The base URI of the service. + * @param {object} [options] - The parameter options + * @param {Array} [options.filters] - Filters to be added to the request pipeline + * @param {object} [options.requestOptions] - Options for the underlying request object + * {@link https://github.com/request/request#requestoptions-callback Options doc} + * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy + * @param {string} [options.acceptLanguage] - The preferred language for the response. + * @param {number} [options.longRunningOperationRetryTimeout] - The retry timeout in seconds for Long Running Operations. Default value is 30. + * @param {boolean} [options.generateClientRequestId] - Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + */ + constructor(credentials, subscriptionId, baseUri, options) { + if (credentials === null || credentials === undefined) { + throw new Error('\'credentials\' cannot be null.'); + } + if (subscriptionId === null || subscriptionId === undefined) { + throw new Error('\'subscriptionId\' cannot be null.'); + } + + if (!options) options = {}; + + super(credentials, options); + + this.apiVersion = '2017-03-01-preview'; + this.acceptLanguage = 'en-US'; + this.longRunningOperationRetryTimeout = 30; + this.generateClientRequestId = true; + this.baseUri = baseUri; + if (!this.baseUri) { + this.baseUri = 'https://management.azure.com'; + } + this.credentials = credentials; + this.subscriptionId = subscriptionId; + + let packageInfo = this.getPackageJsonInfo(__dirname); + this.addUserAgentInfo(`${packageInfo.name}/${packageInfo.version}`); + if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { + this.acceptLanguage = options.acceptLanguage; + } + if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { + this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; + } + if(options.generateClientRequestId !== null && options.generateClientRequestId !== undefined) { + this.generateClientRequestId = options.generateClientRequestId; + } + this.availabilityGroupListeners = new operations.AvailabilityGroupListeners(this); + this.operations = new operations.Operations(this); + this.sqlVirtualMachineGroups = new operations.SqlVirtualMachineGroups(this); + this.sqlVirtualMachines = new operations.SqlVirtualMachines(this); + this.models = models; + msRest.addSerializationMixin(this); + } + +} + +module.exports = SqlVirtualMachineManagementClient; +module.exports['default'] = SqlVirtualMachineManagementClient; +module.exports.SqlVirtualMachineManagementClient = SqlVirtualMachineManagementClient; +module.exports.SqlVirtualMachineManagementModels = models; diff --git a/lib/services/sqlvirtualmachineManagement/package.json b/lib/services/sqlvirtualmachineManagement/package.json new file mode 100644 index 0000000000..0bfee506f8 --- /dev/null +++ b/lib/services/sqlvirtualmachineManagement/package.json @@ -0,0 +1,25 @@ +{ + "name": "azure-arm-sqlvirtualmachine", + "author": "Microsoft Corporation", + "description": "SqlVirtualMachineManagementClient Library with typescript type definitions for node", + "version": "2.0.0", + "dependencies": { + "ms-rest": "^2.3.3", + "ms-rest-azure": "^2.5.5" + }, + "keywords": [ + "node", + "azure" + ], + "license": "MIT", + "main": "./lib/sqlVirtualMachineManagementClient.js", + "types": "./lib/sqlVirtualMachineManagementClient.d.ts", + "homepage": "https://github.com/azure/azure-sdk-for-node/tree/master/lib/services/sqlvirtualmachineManagement", + "repository": { + "type": "git", + "url": "https://github.com/azure/azure-sdk-for-node.git" + }, + "bugs": { + "url": "https://github.com/azure/azure-sdk-for-node/issues" + } +} diff --git a/lib/services/videoSearch/lib/models/answer.js b/lib/services/videoSearch/lib/models/answer.js index b7210a7fe1..7a34f8ce90 100644 --- a/lib/services/videoSearch/lib/models/answer.js +++ b/lib/services/videoSearch/lib/models/answer.js @@ -19,7 +19,7 @@ const models = require('./index'); class Answer extends models['Response'] { /** * Create a Answer. - * @member {array} [followUpQueries] + * @property {array} [followUpQueries] */ constructor() { super(); diff --git a/lib/services/videoSearch/lib/models/creativeWork.js b/lib/services/videoSearch/lib/models/creativeWork.js index 69651e39fb..65cc2a78f1 100644 --- a/lib/services/videoSearch/lib/models/creativeWork.js +++ b/lib/services/videoSearch/lib/models/creativeWork.js @@ -19,9 +19,9 @@ const models = require('./index'); class CreativeWork extends models['Thing'] { /** * Create a CreativeWork. - * @member {string} [thumbnailUrl] The URL to a thumbnail of the item. - * @member {array} [provider] The source of the creative work. - * @member {string} [text] + * @property {string} [thumbnailUrl] The URL to a thumbnail of the item. + * @property {array} [provider] The source of the creative work. + * @property {string} [text] */ constructor() { super(); diff --git a/lib/services/videoSearch/lib/models/errorModel.js b/lib/services/videoSearch/lib/models/errorModel.js index dc588b31d3..a0d5e32618 100644 --- a/lib/services/videoSearch/lib/models/errorModel.js +++ b/lib/services/videoSearch/lib/models/errorModel.js @@ -17,22 +17,22 @@ class ErrorModel { /** * Create a ErrorModel. - * @member {string} code The error code that identifies the category of + * @property {string} code The error code that identifies the category of * error. Possible values include: 'None', 'ServerError', 'InvalidRequest', * 'RateLimitExceeded', 'InvalidAuthorization', 'InsufficientAuthorization'. * Default value: 'None' . - * @member {string} [subCode] The error code that further helps to identify + * @property {string} [subCode] The error code that further helps to identify * the error. Possible values include: 'UnexpectedError', 'ResourceError', * 'NotImplemented', 'ParameterMissing', 'ParameterInvalidValue', * 'HttpNotAllowed', 'Blocked', 'AuthorizationMissing', * 'AuthorizationRedundancy', 'AuthorizationDisabled', 'AuthorizationExpired' - * @member {string} message A description of the error. - * @member {string} [moreDetails] A description that provides additional + * @property {string} message A description of the error. + * @property {string} [moreDetails] A description that provides additional * information about the error. - * @member {string} [parameter] The parameter in the request that caused the - * error. - * @member {string} [value] The parameter's value in the request that was not - * valid. + * @property {string} [parameter] The parameter in the request that caused + * the error. + * @property {string} [value] The parameter's value in the request that was + * not valid. */ constructor() { } diff --git a/lib/services/videoSearch/lib/models/errorResponse.js b/lib/services/videoSearch/lib/models/errorResponse.js index 3b2a7eb37f..753ea85cac 100644 --- a/lib/services/videoSearch/lib/models/errorResponse.js +++ b/lib/services/videoSearch/lib/models/errorResponse.js @@ -20,8 +20,8 @@ const models = require('./index'); class ErrorResponse extends models['Response'] { /** * Create a ErrorResponse. - * @member {array} errors A list of errors that describe the reasons why the - * request failed. + * @property {array} errors A list of errors that describe the reasons why + * the request failed. */ constructor() { super(); diff --git a/lib/services/videoSearch/lib/models/identifiable.js b/lib/services/videoSearch/lib/models/identifiable.js index 6cc9e3d679..51ceb85de4 100644 --- a/lib/services/videoSearch/lib/models/identifiable.js +++ b/lib/services/videoSearch/lib/models/identifiable.js @@ -20,7 +20,7 @@ const models = require('./index'); class Identifiable extends models['ResponseBase'] { /** * Create a Identifiable. - * @member {string} [id] A String identifier. + * @property {string} [id] A String identifier. */ constructor() { super(); diff --git a/lib/services/videoSearch/lib/models/imageObject.js b/lib/services/videoSearch/lib/models/imageObject.js index 78d55e2d4f..2e33d0bdcc 100644 --- a/lib/services/videoSearch/lib/models/imageObject.js +++ b/lib/services/videoSearch/lib/models/imageObject.js @@ -20,7 +20,7 @@ const models = require('./index'); class ImageObject extends models['MediaObject'] { /** * Create a ImageObject. - * @member {object} [thumbnail] The URL to a thumbnail of the image + * @property {object} [thumbnail] The URL to a thumbnail of the image */ constructor() { super(); diff --git a/lib/services/videoSearch/lib/models/index.d.ts b/lib/services/videoSearch/lib/models/index.d.ts index f32ffde61c..7d72077da4 100644 --- a/lib/services/videoSearch/lib/models/index.d.ts +++ b/lib/services/videoSearch/lib/models/index.d.ts @@ -1,134 +1,107 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import * as moment from "moment"; - -/** - * @class - * Initializes a new instance of the ResponseBase class. - * @constructor - * @member {string} _type Polymorphic Discriminator - */ export interface ResponseBase { + /** + * Polymorphic Discriminator + */ _type: string; } /** - * @class - * Initializes a new instance of the Identifiable class. - * @constructor * Defines the identity of a resource. - * - * @member {string} [id] A String identifier. - */ +*/ export interface Identifiable extends ResponseBase { + /** + * A String identifier. + */ readonly id?: string; } /** - * @class - * Initializes a new instance of the Response class. - * @constructor - * Defines a response. All schemas that could be returned at the root of a - * response should inherit from this - * - * @member {string} [webSearchUrl] The URL To Bing's search result for this - * item. - */ + * Defines a response. All schemas that could be returned at the root of a response should inherit + * from this +*/ export interface Response extends Identifiable { + /** + * The URL To Bing's search result for this item. + */ readonly webSearchUrl?: string; } -/** - * @class - * Initializes a new instance of the Thing class. - * @constructor - * @member {string} [name] The name of the thing represented by this object. - * @member {string} [url] The URL to get more information about the thing - * represented by this object. - * @member {object} [image] - * @member {object} [image.thumbnail] The URL to a thumbnail of the image - * @member {string} [description] A short description of the item. - * @member {string} [alternateName] - * @member {string} [bingId] An ID that uniquely identifies this item. - */ export interface Thing extends Response { + /** + * The name of the thing represented by this object. + */ readonly name?: string; + /** + * The URL to get more information about the thing represented by this object. + */ readonly url?: string; readonly image?: ImageObject; + /** + * A short description of the item. + */ readonly description?: string; readonly alternateName?: string; + /** + * An ID that uniquely identifies this item. + */ readonly bingId?: string; } -/** - * @class - * Initializes a new instance of the CreativeWork class. - * @constructor - * @member {string} [thumbnailUrl] The URL to a thumbnail of the item. - * @member {array} [provider] The source of the creative work. - * @member {string} [text] - */ export interface CreativeWork extends Thing { + /** + * The URL to a thumbnail of the item. + */ readonly thumbnailUrl?: string; + /** + * The source of the creative work. + */ readonly provider?: Thing[]; readonly text?: string; } -/** - * @class - * Initializes a new instance of the MediaObject class. - * @constructor - * @member {string} [contentUrl] Original URL to retrieve the source (file) for - * the media object (e.g the source URL for the image). - * @member {string} [hostPageUrl] URL of the page that hosts the media object. - * @member {number} [width] The width of the source media object, in pixels. - * @member {number} [height] The height of the source media object, in pixels. - */ export interface MediaObject extends CreativeWork { + /** + * Original URL to retrieve the source (file) for the media object (e.g the source URL for the + * image). + */ readonly contentUrl?: string; + /** + * URL of the page that hosts the media object. + */ readonly hostPageUrl?: string; + /** + * The width of the source media object, in pixels. + */ readonly width?: number; + /** + * The height of the source media object, in pixels. + */ readonly height?: number; } /** - * @class - * Initializes a new instance of the ImageObject class. - * @constructor * Defines an image - * - * @member {object} [thumbnail] The URL to a thumbnail of the image - */ +*/ export interface ImageObject extends MediaObject { + /** + * The URL to a thumbnail of the image + */ readonly thumbnail?: ImageObject; } /** - * @class - * Initializes a new instance of the VideoObject class. - * @constructor * Defines a video object that is relevant to the query. - * - * @member {string} [motionThumbnailUrl] - * @member {string} [motionThumbnailId] - * @member {string} [embedHtml] - * @member {boolean} [allowHttpsEmbed] - * @member {number} [viewCount] - * @member {object} [thumbnail] - * @member {object} [thumbnail.thumbnail] The URL to a thumbnail of the image - * @member {string} [videoId] - * @member {boolean} [allowMobileEmbed] - * @member {boolean} [isSuperfresh] - */ +*/ export interface VideoObject extends MediaObject { readonly motionThumbnailUrl?: string; readonly motionThumbnailId?: string; @@ -142,266 +115,172 @@ export interface VideoObject extends MediaObject { } /** - * @class - * Initializes a new instance of the Query class. - * @constructor * Defines a search query. - * - * @member {string} text The query string. Use this string as the query term in - * a new search request. - * @member {string} [displayText] The display version of the query term. This - * version of the query term may contain special characters that highlight the - * search term found in the query string. The string contains the highlighting - * characters only if the query enabled hit highlighting - * @member {string} [webSearchUrl] The URL that takes the user to the Bing - * search results page for the query.Only related search results include this - * field. - * @member {string} [searchLink] - * @member {object} [thumbnail] - * @member {object} [thumbnail.thumbnail] The URL to a thumbnail of the image - */ +*/ export interface Query { + /** + * The query string. Use this string as the query term in a new search request. + */ text: string; + /** + * The display version of the query term. This version of the query term may contain special + * characters that highlight the search term found in the query string. The string contains the + * highlighting characters only if the query enabled hit highlighting + */ readonly displayText?: string; + /** + * The URL that takes the user to the Bing search results page for the query.Only related search + * results include this field. + */ readonly webSearchUrl?: string; readonly searchLink?: string; readonly thumbnail?: ImageObject; } -/** - * @class - * Initializes a new instance of the PivotSuggestions class. - * @constructor - * @member {string} pivot - * @member {array} suggestions - */ export interface PivotSuggestions { pivot: string; suggestions: Query[]; } -/** - * @class - * Initializes a new instance of the Answer class. - * @constructor - * @member {array} [followUpQueries] - */ export interface Answer extends Response { readonly followUpQueries?: Query[]; } -/** - * @class - * Initializes a new instance of the SearchResultsAnswer class. - * @constructor - * @member {number} [totalEstimatedMatches] The estimated number of webpages - * that are relevant to the query. Use this number along with the count and - * offset query parameters to page the results. - * @member {boolean} [isFamilyFriendly] - */ export interface SearchResultsAnswer extends Answer { + /** + * The estimated number of webpages that are relevant to the query. Use this number along with + * the count and offset query parameters to page the results. + */ readonly totalEstimatedMatches?: number; readonly isFamilyFriendly?: boolean; } /** - * @class - * Initializes a new instance of the Videos class. - * @constructor * Defines a video answer. - * - * @member {array} value A list of video objects that are relevant to the - * query. - * @member {number} [nextOffset] - * @member {string} [scenario] Possible values include: 'List', - * 'SingleDominantVideo' - * @member {array} [queryExpansions] - * @member {array} [pivotSuggestions] - */ +*/ export interface Videos extends SearchResultsAnswer { + /** + * A list of video objects that are relevant to the query. + */ value: VideoObject[]; readonly nextOffset?: number; + /** + * Possible values include: 'List', 'SingleDominantVideo' + */ readonly scenario?: string; readonly queryExpansions?: Query[]; readonly pivotSuggestions?: PivotSuggestions[]; } /** - * @class - * Initializes a new instance of the QueryContext class. - * @constructor * Defines the query context that Bing used for the request. - * - * @member {string} originalQuery The query string as specified in the request. - * @member {string} [alteredQuery] The query string used by Bing to perform the - * query. Bing uses the altered query string if the original query string - * contained spelling mistakes. For example, if the query string is "saling - * downwind", the altered query string will be "sailing downwind". This field - * is included only if the original query string contains a spelling mistake. - * @member {string} [alterationOverrideQuery] The query string to use to force - * Bing to use the original string. For example, if the query string is "saling - * downwind", the override query string will be "+saling downwind". Remember to - * encode the query string which results in "%2Bsaling+downwind". This field is - * included only if the original query string contains a spelling mistake. - * @member {boolean} [adultIntent] A Boolean value that indicates whether the - * specified query has adult intent. The value is true if the query has adult - * intent; otherwise, false. - * @member {boolean} [askUserForLocation] A Boolean value that indicates - * whether Bing requires the user's location to provide accurate results. If - * you specified the user's location by using the X-MSEdge-ClientIP and - * X-Search-Location headers, you can ignore this field. For location aware - * queries, such as "today's weather" or "restaurants near me" that need the - * user's location to provide accurate results, this field is set to true. For - * location aware queries that include the location (for example, "Seattle - * weather"), this field is set to false. This field is also set to false for - * queries that are not location aware, such as "best sellers". - * @member {boolean} [isTransactional] - */ +*/ export interface QueryContext { + /** + * The query string as specified in the request. + */ originalQuery: string; + /** + * The query string used by Bing to perform the query. Bing uses the altered query string if the + * original query string contained spelling mistakes. For example, if the query string is "saling + * downwind", the altered query string will be "sailing downwind". This field is included only if + * the original query string contains a spelling mistake. + */ readonly alteredQuery?: string; + /** + * The query string to use to force Bing to use the original string. For example, if the query + * string is "saling downwind", the override query string will be "+saling downwind". Remember to + * encode the query string which results in "%2Bsaling+downwind". This field is included only if + * the original query string contains a spelling mistake. + */ readonly alterationOverrideQuery?: string; + /** + * A Boolean value that indicates whether the specified query has adult intent. The value is true + * if the query has adult intent; otherwise, false. + */ readonly adultIntent?: boolean; + /** + * A Boolean value that indicates whether Bing requires the user's location to provide accurate + * results. If you specified the user's location by using the X-MSEdge-ClientIP and + * X-Search-Location headers, you can ignore this field. For location aware queries, such as + * "today's weather" or "restaurants near me" that need the user's location to provide accurate + * results, this field is set to true. For location aware queries that include the location (for + * example, "Seattle weather"), this field is set to false. This field is also set to false for + * queries that are not location aware, such as "best sellers". + */ readonly askUserForLocation?: boolean; readonly isTransactional?: boolean; } /** - * @class - * Initializes a new instance of the ErrorModel class. - * @constructor * Defines the error that occurred. - * - * @member {string} code The error code that identifies the category of error. - * Possible values include: 'None', 'ServerError', 'InvalidRequest', - * 'RateLimitExceeded', 'InvalidAuthorization', 'InsufficientAuthorization'. - * Default value: 'None' . - * @member {string} [subCode] The error code that further helps to identify the - * error. Possible values include: 'UnexpectedError', 'ResourceError', - * 'NotImplemented', 'ParameterMissing', 'ParameterInvalidValue', - * 'HttpNotAllowed', 'Blocked', 'AuthorizationMissing', - * 'AuthorizationRedundancy', 'AuthorizationDisabled', 'AuthorizationExpired' - * @member {string} message A description of the error. - * @member {string} [moreDetails] A description that provides additional - * information about the error. - * @member {string} [parameter] The parameter in the request that caused the - * error. - * @member {string} [value] The parameter's value in the request that was not - * valid. - */ +*/ export interface ErrorModel { + /** + * The error code that identifies the category of error. Possible values include: 'None', + * 'ServerError', 'InvalidRequest', 'RateLimitExceeded', 'InvalidAuthorization', + * 'InsufficientAuthorization' + */ code: string; + /** + * The error code that further helps to identify the error. Possible values include: + * 'UnexpectedError', 'ResourceError', 'NotImplemented', 'ParameterMissing', + * 'ParameterInvalidValue', 'HttpNotAllowed', 'Blocked', 'AuthorizationMissing', + * 'AuthorizationRedundancy', 'AuthorizationDisabled', 'AuthorizationExpired' + */ readonly subCode?: string; + /** + * A description of the error. + */ message: string; + /** + * A description that provides additional information about the error. + */ readonly moreDetails?: string; + /** + * The parameter in the request that caused the error. + */ readonly parameter?: string; + /** + * The parameter's value in the request that was not valid. + */ readonly value?: string; } /** - * @class - * Initializes a new instance of the ErrorResponse class. - * @constructor * The top-level response that represents a failed request. - * - * @member {array} errors A list of errors that describe the reasons why the - * request failed. - */ +*/ export interface ErrorResponse extends Response { + /** + * A list of errors that describe the reasons why the request failed. + */ errors: ErrorModel[]; } -/** - * @class - * Initializes a new instance of the TrendingVideosTile class. - * @constructor - * @member {object} query - * @member {string} [query.text] The query string. Use this string as the query - * term in a new search request. - * @member {string} [query.displayText] The display version of the query term. - * This version of the query term may contain special characters that highlight - * the search term found in the query string. The string contains the - * highlighting characters only if the query enabled hit highlighting - * @member {string} [query.webSearchUrl] The URL that takes the user to the - * Bing search results page for the query.Only related search results include - * this field. - * @member {string} [query.searchLink] - * @member {object} [query.thumbnail] - * @member {object} [query.thumbnail.thumbnail] The URL to a thumbnail of the - * image - * @member {object} image - * @member {object} [image.thumbnail] The URL to a thumbnail of the image - */ export interface TrendingVideosTile { query: Query; image: ImageObject; } -/** - * @class - * Initializes a new instance of the TrendingVideosSubcategory class. - * @constructor - * @member {string} title - * @member {array} tiles - */ export interface TrendingVideosSubcategory { title: string; tiles: TrendingVideosTile[]; } -/** - * @class - * Initializes a new instance of the TrendingVideosCategory class. - * @constructor - * @member {string} title - * @member {array} subcategories - */ export interface TrendingVideosCategory { title: string; subcategories: TrendingVideosSubcategory[]; } -/** - * @class - * Initializes a new instance of the TrendingVideos class. - * @constructor - * @member {array} bannerTiles - * @member {array} categories - */ export interface TrendingVideos extends Response { bannerTiles: TrendingVideosTile[]; categories: TrendingVideosCategory[]; } -/** - * @class - * Initializes a new instance of the VideosModule class. - * @constructor - * @member {array} [value] - */ export interface VideosModule { readonly value?: VideoObject[]; } -/** - * @class - * Initializes a new instance of the VideoDetails class. - * @constructor - * @member {object} [relatedVideos] - * @member {array} [relatedVideos.value] - * @member {object} [videoResult] - * @member {string} [videoResult.motionThumbnailUrl] - * @member {string} [videoResult.motionThumbnailId] - * @member {string} [videoResult.embedHtml] - * @member {boolean} [videoResult.allowHttpsEmbed] - * @member {number} [videoResult.viewCount] - * @member {object} [videoResult.thumbnail] - * @member {object} [videoResult.thumbnail.thumbnail] The URL to a thumbnail of - * the image - * @member {string} [videoResult.videoId] - * @member {boolean} [videoResult.allowMobileEmbed] - * @member {boolean} [videoResult.isSuperfresh] - */ export interface VideoDetails extends Response { readonly relatedVideos?: VideosModule; readonly videoResult?: VideoObject; diff --git a/lib/services/videoSearch/lib/models/mediaObject.js b/lib/services/videoSearch/lib/models/mediaObject.js index 15d851af7b..a85e0685f7 100644 --- a/lib/services/videoSearch/lib/models/mediaObject.js +++ b/lib/services/videoSearch/lib/models/mediaObject.js @@ -19,12 +19,13 @@ const models = require('./index'); class MediaObject extends models['CreativeWork'] { /** * Create a MediaObject. - * @member {string} [contentUrl] Original URL to retrieve the source (file) + * @property {string} [contentUrl] Original URL to retrieve the source (file) * for the media object (e.g the source URL for the image). - * @member {string} [hostPageUrl] URL of the page that hosts the media + * @property {string} [hostPageUrl] URL of the page that hosts the media * object. - * @member {number} [width] The width of the source media object, in pixels. - * @member {number} [height] The height of the source media object, in + * @property {number} [width] The width of the source media object, in + * pixels. + * @property {number} [height] The height of the source media object, in * pixels. */ constructor() { diff --git a/lib/services/videoSearch/lib/models/pivotSuggestions.js b/lib/services/videoSearch/lib/models/pivotSuggestions.js index 943e32890a..25151260b1 100644 --- a/lib/services/videoSearch/lib/models/pivotSuggestions.js +++ b/lib/services/videoSearch/lib/models/pivotSuggestions.js @@ -10,16 +10,14 @@ 'use strict'; -const models = require('./index'); - /** * Class representing a PivotSuggestions. */ class PivotSuggestions { /** * Create a PivotSuggestions. - * @member {string} pivot - * @member {array} suggestions + * @property {string} pivot + * @property {array} suggestions */ constructor() { } diff --git a/lib/services/videoSearch/lib/models/query.js b/lib/services/videoSearch/lib/models/query.js index 6482ea0f53..551f0ad572 100644 --- a/lib/services/videoSearch/lib/models/query.js +++ b/lib/services/videoSearch/lib/models/query.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Defines a search query. * @@ -19,18 +17,19 @@ const models = require('./index'); class Query { /** * Create a Query. - * @member {string} text The query string. Use this string as the query term - * in a new search request. - * @member {string} [displayText] The display version of the query term. This - * version of the query term may contain special characters that highlight - * the search term found in the query string. The string contains the - * highlighting characters only if the query enabled hit highlighting - * @member {string} [webSearchUrl] The URL that takes the user to the Bing + * @property {string} text The query string. Use this string as the query + * term in a new search request. + * @property {string} [displayText] The display version of the query term. + * This version of the query term may contain special characters that + * highlight the search term found in the query string. The string contains + * the highlighting characters only if the query enabled hit highlighting + * @property {string} [webSearchUrl] The URL that takes the user to the Bing * search results page for the query.Only related search results include this * field. - * @member {string} [searchLink] - * @member {object} [thumbnail] - * @member {object} [thumbnail.thumbnail] The URL to a thumbnail of the image + * @property {string} [searchLink] + * @property {object} [thumbnail] + * @property {object} [thumbnail.thumbnail] The URL to a thumbnail of the + * image */ constructor() { } diff --git a/lib/services/videoSearch/lib/models/queryContext.js b/lib/services/videoSearch/lib/models/queryContext.js index 348f2ae1bd..759718162d 100644 --- a/lib/services/videoSearch/lib/models/queryContext.js +++ b/lib/services/videoSearch/lib/models/queryContext.js @@ -17,23 +17,23 @@ class QueryContext { /** * Create a QueryContext. - * @member {string} originalQuery The query string as specified in the + * @property {string} originalQuery The query string as specified in the * request. - * @member {string} [alteredQuery] The query string used by Bing to perform + * @property {string} [alteredQuery] The query string used by Bing to perform * the query. Bing uses the altered query string if the original query string * contained spelling mistakes. For example, if the query string is "saling * downwind", the altered query string will be "sailing downwind". This field * is included only if the original query string contains a spelling mistake. - * @member {string} [alterationOverrideQuery] The query string to use to + * @property {string} [alterationOverrideQuery] The query string to use to * force Bing to use the original string. For example, if the query string is * "saling downwind", the override query string will be "+saling downwind". * Remember to encode the query string which results in "%2Bsaling+downwind". * This field is included only if the original query string contains a * spelling mistake. - * @member {boolean} [adultIntent] A Boolean value that indicates whether the - * specified query has adult intent. The value is true if the query has adult - * intent; otherwise, false. - * @member {boolean} [askUserForLocation] A Boolean value that indicates + * @property {boolean} [adultIntent] A Boolean value that indicates whether + * the specified query has adult intent. The value is true if the query has + * adult intent; otherwise, false. + * @property {boolean} [askUserForLocation] A Boolean value that indicates * whether Bing requires the user's location to provide accurate results. If * you specified the user's location by using the X-MSEdge-ClientIP and * X-Search-Location headers, you can ignore this field. For location aware @@ -42,7 +42,7 @@ class QueryContext { * For location aware queries that include the location (for example, * "Seattle weather"), this field is set to false. This field is also set to * false for queries that are not location aware, such as "best sellers". - * @member {boolean} [isTransactional] + * @property {boolean} [isTransactional] */ constructor() { } diff --git a/lib/services/videoSearch/lib/models/response.js b/lib/services/videoSearch/lib/models/response.js index cc3b85c266..0bb2aacfa3 100644 --- a/lib/services/videoSearch/lib/models/response.js +++ b/lib/services/videoSearch/lib/models/response.js @@ -21,7 +21,7 @@ const models = require('./index'); class Response extends models['Identifiable'] { /** * Create a Response. - * @member {string} [webSearchUrl] The URL To Bing's search result for this + * @property {string} [webSearchUrl] The URL To Bing's search result for this * item. */ constructor() { diff --git a/lib/services/videoSearch/lib/models/responseBase.js b/lib/services/videoSearch/lib/models/responseBase.js index ffe3d9ee1b..557d5ec790 100644 --- a/lib/services/videoSearch/lib/models/responseBase.js +++ b/lib/services/videoSearch/lib/models/responseBase.js @@ -16,7 +16,7 @@ class ResponseBase { /** * Create a ResponseBase. - * @member {string} _type Polymorphic Discriminator + * @property {string} _type Polymorphic Discriminator */ constructor() { } diff --git a/lib/services/videoSearch/lib/models/searchResultsAnswer.js b/lib/services/videoSearch/lib/models/searchResultsAnswer.js index 7d944a6bcf..5647379508 100644 --- a/lib/services/videoSearch/lib/models/searchResultsAnswer.js +++ b/lib/services/videoSearch/lib/models/searchResultsAnswer.js @@ -19,10 +19,10 @@ const models = require('./index'); class SearchResultsAnswer extends models['Answer'] { /** * Create a SearchResultsAnswer. - * @member {number} [totalEstimatedMatches] The estimated number of webpages - * that are relevant to the query. Use this number along with the count and - * offset query parameters to page the results. - * @member {boolean} [isFamilyFriendly] + * @property {number} [totalEstimatedMatches] The estimated number of + * webpages that are relevant to the query. Use this number along with the + * count and offset query parameters to page the results. + * @property {boolean} [isFamilyFriendly] */ constructor() { super(); diff --git a/lib/services/videoSearch/lib/models/thing.js b/lib/services/videoSearch/lib/models/thing.js index 36eaf992c2..e97cd0ed88 100644 --- a/lib/services/videoSearch/lib/models/thing.js +++ b/lib/services/videoSearch/lib/models/thing.js @@ -19,14 +19,15 @@ const models = require('./index'); class Thing extends models['Response'] { /** * Create a Thing. - * @member {string} [name] The name of the thing represented by this object. - * @member {string} [url] The URL to get more information about the thing + * @property {string} [name] The name of the thing represented by this + * object. + * @property {string} [url] The URL to get more information about the thing * represented by this object. - * @member {object} [image] - * @member {object} [image.thumbnail] The URL to a thumbnail of the image - * @member {string} [description] A short description of the item. - * @member {string} [alternateName] - * @member {string} [bingId] An ID that uniquely identifies this item. + * @property {object} [image] + * @property {object} [image.thumbnail] The URL to a thumbnail of the image + * @property {string} [description] A short description of the item. + * @property {string} [alternateName] + * @property {string} [bingId] An ID that uniquely identifies this item. */ constructor() { super(); diff --git a/lib/services/videoSearch/lib/models/trendingVideos.js b/lib/services/videoSearch/lib/models/trendingVideos.js index 461849c02d..714adfa49d 100644 --- a/lib/services/videoSearch/lib/models/trendingVideos.js +++ b/lib/services/videoSearch/lib/models/trendingVideos.js @@ -19,8 +19,8 @@ const models = require('./index'); class TrendingVideos extends models['Response'] { /** * Create a TrendingVideos. - * @member {array} bannerTiles - * @member {array} categories + * @property {array} bannerTiles + * @property {array} categories */ constructor() { super(); diff --git a/lib/services/videoSearch/lib/models/trendingVideosCategory.js b/lib/services/videoSearch/lib/models/trendingVideosCategory.js index 2b8a0cadbb..8222519cef 100644 --- a/lib/services/videoSearch/lib/models/trendingVideosCategory.js +++ b/lib/services/videoSearch/lib/models/trendingVideosCategory.js @@ -10,16 +10,14 @@ 'use strict'; -const models = require('./index'); - /** * Class representing a TrendingVideosCategory. */ class TrendingVideosCategory { /** * Create a TrendingVideosCategory. - * @member {string} title - * @member {array} subcategories + * @property {string} title + * @property {array} subcategories */ constructor() { } diff --git a/lib/services/videoSearch/lib/models/trendingVideosSubcategory.js b/lib/services/videoSearch/lib/models/trendingVideosSubcategory.js index abc627e14e..d613cc4ac2 100644 --- a/lib/services/videoSearch/lib/models/trendingVideosSubcategory.js +++ b/lib/services/videoSearch/lib/models/trendingVideosSubcategory.js @@ -10,16 +10,14 @@ 'use strict'; -const models = require('./index'); - /** * Class representing a TrendingVideosSubcategory. */ class TrendingVideosSubcategory { /** * Create a TrendingVideosSubcategory. - * @member {string} title - * @member {array} tiles + * @property {string} title + * @property {array} tiles */ constructor() { } diff --git a/lib/services/videoSearch/lib/models/trendingVideosTile.js b/lib/services/videoSearch/lib/models/trendingVideosTile.js index 93d5c3eb00..ff7fc1da0a 100644 --- a/lib/services/videoSearch/lib/models/trendingVideosTile.js +++ b/lib/services/videoSearch/lib/models/trendingVideosTile.js @@ -10,30 +10,28 @@ 'use strict'; -const models = require('./index'); - /** * Class representing a TrendingVideosTile. */ class TrendingVideosTile { /** * Create a TrendingVideosTile. - * @member {object} query - * @member {string} [query.text] The query string. Use this string as the + * @property {object} query + * @property {string} [query.text] The query string. Use this string as the * query term in a new search request. - * @member {string} [query.displayText] The display version of the query + * @property {string} [query.displayText] The display version of the query * term. This version of the query term may contain special characters that * highlight the search term found in the query string. The string contains * the highlighting characters only if the query enabled hit highlighting - * @member {string} [query.webSearchUrl] The URL that takes the user to the + * @property {string} [query.webSearchUrl] The URL that takes the user to the * Bing search results page for the query.Only related search results include * this field. - * @member {string} [query.searchLink] - * @member {object} [query.thumbnail] - * @member {object} [query.thumbnail.thumbnail] The URL to a thumbnail of the - * image - * @member {object} image - * @member {object} [image.thumbnail] The URL to a thumbnail of the image + * @property {string} [query.searchLink] + * @property {object} [query.thumbnail] + * @property {object} [query.thumbnail.thumbnail] The URL to a thumbnail of + * the image + * @property {object} image + * @property {object} [image.thumbnail] The URL to a thumbnail of the image */ constructor() { } diff --git a/lib/services/videoSearch/lib/models/videoDetails.js b/lib/services/videoSearch/lib/models/videoDetails.js index f205231923..581572f82a 100644 --- a/lib/services/videoSearch/lib/models/videoDetails.js +++ b/lib/services/videoSearch/lib/models/videoDetails.js @@ -19,20 +19,20 @@ const models = require('./index'); class VideoDetails extends models['Response'] { /** * Create a VideoDetails. - * @member {object} [relatedVideos] - * @member {array} [relatedVideos.value] - * @member {object} [videoResult] - * @member {string} [videoResult.motionThumbnailUrl] - * @member {string} [videoResult.motionThumbnailId] - * @member {string} [videoResult.embedHtml] - * @member {boolean} [videoResult.allowHttpsEmbed] - * @member {number} [videoResult.viewCount] - * @member {object} [videoResult.thumbnail] - * @member {object} [videoResult.thumbnail.thumbnail] The URL to a thumbnail - * of the image - * @member {string} [videoResult.videoId] - * @member {boolean} [videoResult.allowMobileEmbed] - * @member {boolean} [videoResult.isSuperfresh] + * @property {object} [relatedVideos] + * @property {array} [relatedVideos.value] + * @property {object} [videoResult] + * @property {string} [videoResult.motionThumbnailUrl] + * @property {string} [videoResult.motionThumbnailId] + * @property {string} [videoResult.embedHtml] + * @property {boolean} [videoResult.allowHttpsEmbed] + * @property {number} [videoResult.viewCount] + * @property {object} [videoResult.thumbnail] + * @property {object} [videoResult.thumbnail.thumbnail] The URL to a + * thumbnail of the image + * @property {string} [videoResult.videoId] + * @property {boolean} [videoResult.allowMobileEmbed] + * @property {boolean} [videoResult.isSuperfresh] */ constructor() { super(); diff --git a/lib/services/videoSearch/lib/models/videoObject.js b/lib/services/videoSearch/lib/models/videoObject.js index cdd35d90cf..d4329b8d73 100644 --- a/lib/services/videoSearch/lib/models/videoObject.js +++ b/lib/services/videoSearch/lib/models/videoObject.js @@ -20,16 +20,17 @@ const models = require('./index'); class VideoObject extends models['MediaObject'] { /** * Create a VideoObject. - * @member {string} [motionThumbnailUrl] - * @member {string} [motionThumbnailId] - * @member {string} [embedHtml] - * @member {boolean} [allowHttpsEmbed] - * @member {number} [viewCount] - * @member {object} [thumbnail] - * @member {object} [thumbnail.thumbnail] The URL to a thumbnail of the image - * @member {string} [videoId] - * @member {boolean} [allowMobileEmbed] - * @member {boolean} [isSuperfresh] + * @property {string} [motionThumbnailUrl] + * @property {string} [motionThumbnailId] + * @property {string} [embedHtml] + * @property {boolean} [allowHttpsEmbed] + * @property {number} [viewCount] + * @property {object} [thumbnail] + * @property {object} [thumbnail.thumbnail] The URL to a thumbnail of the + * image + * @property {string} [videoId] + * @property {boolean} [allowMobileEmbed] + * @property {boolean} [isSuperfresh] */ constructor() { super(); diff --git a/lib/services/videoSearch/lib/models/videos.js b/lib/services/videoSearch/lib/models/videos.js index 1144765d59..1efcdc88e4 100644 --- a/lib/services/videoSearch/lib/models/videos.js +++ b/lib/services/videoSearch/lib/models/videos.js @@ -20,13 +20,13 @@ const models = require('./index'); class Videos extends models['SearchResultsAnswer'] { /** * Create a Videos. - * @member {array} value A list of video objects that are relevant to the + * @property {array} value A list of video objects that are relevant to the * query. - * @member {number} [nextOffset] - * @member {string} [scenario] Possible values include: 'List', + * @property {number} [nextOffset] + * @property {string} [scenario] Possible values include: 'List', * 'SingleDominantVideo' - * @member {array} [queryExpansions] - * @member {array} [pivotSuggestions] + * @property {array} [queryExpansions] + * @property {array} [pivotSuggestions] */ constructor() { super(); diff --git a/lib/services/videoSearch/lib/models/videosModule.js b/lib/services/videoSearch/lib/models/videosModule.js index fe0f0fbff7..4d6d1d4fcf 100644 --- a/lib/services/videoSearch/lib/models/videosModule.js +++ b/lib/services/videoSearch/lib/models/videosModule.js @@ -10,15 +10,13 @@ 'use strict'; -const models = require('./index'); - /** * Class representing a VideosModule. */ class VideosModule { /** * Create a VideosModule. - * @member {array} [value] + * @property {array} [value] */ constructor() { } diff --git a/lib/services/videoSearch/lib/operations/index.d.ts b/lib/services/videoSearch/lib/operations/index.d.ts index dfe087cd2f..7da4409aeb 100644 --- a/lib/services/videoSearch/lib/operations/index.d.ts +++ b/lib/services/videoSearch/lib/operations/index.d.ts @@ -16,7 +16,7 @@ import * as models from '../models'; * @class * VideosOperations * __NOTE__: An instance of this class is automatically created for an - * instance of the VideoSearchAPIClient. + * instance of the VideoSearchClient. */ export interface VideosOperations { diff --git a/lib/services/videoSearch/lib/operations/videosOperations.js b/lib/services/videoSearch/lib/operations/videosOperations.js index 6a83078cd5..b269862d72 100644 --- a/lib/services/videoSearch/lib/operations/videosOperations.js +++ b/lib/services/videoSearch/lib/operations/videosOperations.js @@ -332,6 +332,9 @@ function _search(query, options, callback) { let xBingApisSDK = 'true'; // Validate try { + if (this.client.endpoint === null || this.client.endpoint === undefined || typeof this.client.endpoint.valueOf() !== 'string') { + throw new Error('this.client.endpoint cannot be null or undefined and it must be of type string.'); + } if (acceptLanguage !== null && acceptLanguage !== undefined && typeof acceptLanguage.valueOf() !== 'string') { throw new Error('acceptLanguage must be of type string.'); } @@ -414,6 +417,7 @@ function _search(query, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'videos/search'; + requestUrl = requestUrl.replace('{Endpoint}', this.client.endpoint); let queryParameters = []; if (countryCode !== null && countryCode !== undefined) { queryParameters.push('cc=' + encodeURIComponent(countryCode)); @@ -833,6 +837,9 @@ function _details(query, options, callback) { let xBingApisSDK = 'true'; // Validate try { + if (this.client.endpoint === null || this.client.endpoint === undefined || typeof this.client.endpoint.valueOf() !== 'string') { + throw new Error('this.client.endpoint cannot be null or undefined and it must be of type string.'); + } if (acceptLanguage !== null && acceptLanguage !== undefined && typeof acceptLanguage.valueOf() !== 'string') { throw new Error('acceptLanguage must be of type string.'); } @@ -901,6 +908,7 @@ function _details(query, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'videos/details'; + requestUrl = requestUrl.replace('{Endpoint}', this.client.endpoint); let queryParameters = []; if (countryCode !== null && countryCode !== undefined) { queryParameters.push('cc=' + encodeURIComponent(countryCode)); @@ -1272,6 +1280,9 @@ function _trending(options, callback) { let xBingApisSDK = 'true'; // Validate try { + if (this.client.endpoint === null || this.client.endpoint === undefined || typeof this.client.endpoint.valueOf() !== 'string') { + throw new Error('this.client.endpoint cannot be null or undefined and it must be of type string.'); + } if (acceptLanguage !== null && acceptLanguage !== undefined && typeof acceptLanguage.valueOf() !== 'string') { throw new Error('acceptLanguage must be of type string.'); } @@ -1318,6 +1329,7 @@ function _trending(options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'videos/trending'; + requestUrl = requestUrl.replace('{Endpoint}', this.client.endpoint); let queryParameters = []; if (countryCode !== null && countryCode !== undefined) { queryParameters.push('cc=' + encodeURIComponent(countryCode)); @@ -1435,7 +1447,7 @@ function _trending(options, callback) { class VideosOperations { /** * Create a VideosOperations. - * @param {VideoSearchAPIClient} client Reference to the service client. + * @param {VideoSearchClient} client Reference to the service client. */ constructor(client) { this.client = client; diff --git a/lib/services/cognitiveServicesCustomSearch/lib/customSearchAPIClient.d.ts b/lib/services/videoSearch/lib/videoSearchClient.d.ts similarity index 58% rename from lib/services/cognitiveServicesCustomSearch/lib/customSearchAPIClient.d.ts rename to lib/services/videoSearch/lib/videoSearchClient.d.ts index d40d6ef414..4159b5f6e2 100644 --- a/lib/services/cognitiveServicesCustomSearch/lib/customSearchAPIClient.d.ts +++ b/lib/services/videoSearch/lib/videoSearchClient.d.ts @@ -12,16 +12,24 @@ import { ServiceClient, ServiceClientOptions, ServiceClientCredentials } from 'm import * as models from "./models"; import * as operations from "./operations"; -export default class CustomSearchAPIClient extends ServiceClient { +/** + * VideoSearchClientOptions for VideoSearchClient. + */ +declare interface VideoSearchClientOptions extends ServiceClientOptions { + /** + * @property {string} [endpoint] - Supported Cognitive Services endpoints (protocol and hostname, for example: "https://westus.api.cognitive.microsoft.com", "https://api.cognitive.microsoft.com"). + */ + endpoint?: string; +} + +export default class VideoSearchClient extends ServiceClient { /** * @class - * Initializes a new instance of the CustomSearchAPIClient class. + * Initializes a new instance of the VideoSearchClient class. * @constructor * * @param {credentials} credentials - Subscription credentials which uniquely identify client subscription. * - * @param {string} [baseUri] - The base URI of the service. - * * @param {object} [options] - The parameter options * * @param {Array} [options.filters] - Filters to be added to the request pipeline @@ -31,13 +39,17 @@ export default class CustomSearchAPIClient extends ServiceClient { * * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy * + * @param {string} [options.endpoint] - Supported Cognitive Services endpoints (protocol and hostname, for example: "https://westus.api.cognitive.microsoft.com", "https://api.cognitive.microsoft.com"). + * */ - constructor(credentials: ServiceClientCredentials, baseUri?: string, options?: ServiceClientOptions); + constructor(credentials: ServiceClientCredentials, options?: VideoSearchClientOptions); credentials: ServiceClientCredentials; + endpoint: string; + // Operation groups - customInstance: operations.CustomInstance; + videosOperations: operations.VideosOperations; } -export { CustomSearchAPIClient, models as CustomSearchAPIModels }; +export { VideoSearchClient, models as VideoSearchModels }; diff --git a/lib/services/videoSearch/lib/videoSearchAPIClient.js b/lib/services/videoSearch/lib/videoSearchClient.js similarity index 67% rename from lib/services/videoSearch/lib/videoSearchAPIClient.js rename to lib/services/videoSearch/lib/videoSearchClient.js index b417da70b0..2421e90be8 100644 --- a/lib/services/videoSearch/lib/videoSearchAPIClient.js +++ b/lib/services/videoSearch/lib/videoSearchClient.js @@ -21,19 +21,19 @@ const models = require('./models'); const operations = require('./operations'); -/** Class representing a VideoSearchAPIClient. */ -class VideoSearchAPIClient extends ServiceClient { +/** Class representing a VideoSearchClient. */ +class VideoSearchClient extends ServiceClient { /** - * Create a VideoSearchAPIClient. + * Create a VideoSearchClient. * @param {credentials} credentials - Subscription credentials which uniquely identify client subscription. - * @param {string} [baseUri] - The base URI of the service. * @param {object} [options] - The parameter options * @param {Array} [options.filters] - Filters to be added to the request pipeline * @param {object} [options.requestOptions] - Options for the underlying request object * {@link https://github.com/request/request#requestoptions-callback Options doc} * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy + * @param {string} [options.endpoint] - Supported Cognitive Services endpoints (protocol and hostname, for example: "https://westus.api.cognitive.microsoft.com", "https://api.cognitive.microsoft.com"). */ - constructor(credentials, baseUri, options) { + constructor(credentials, options) { if (credentials === null || credentials === undefined) { throw new Error('\'credentials\' cannot be null.'); } @@ -42,14 +42,15 @@ class VideoSearchAPIClient extends ServiceClient { super(credentials, options); - this.baseUri = baseUri; - if (!this.baseUri) { - this.baseUri = 'https://api.cognitive.microsoft.com/bing/v7.0'; - } + this.endpoint = 'https://api.cognitive.microsoft.com'; + this.baseUri = '{Endpoint}/bing/v7.0'; this.credentials = credentials; let packageInfo = this.getPackageJsonInfo(__dirname); this.addUserAgentInfo(`${packageInfo.name}/${packageInfo.version}`); + if(options.endpoint !== null && options.endpoint !== undefined) { + this.endpoint = options.endpoint; + } this.videosOperations = new operations.VideosOperations(this); this.models = models; msRest.addSerializationMixin(this); @@ -57,7 +58,7 @@ class VideoSearchAPIClient extends ServiceClient { } -module.exports = VideoSearchAPIClient; -module.exports['default'] = VideoSearchAPIClient; -module.exports.VideoSearchAPIClient = VideoSearchAPIClient; -module.exports.VideoSearchAPIModels = models; +module.exports = VideoSearchClient; +module.exports['default'] = VideoSearchClient; +module.exports.VideoSearchClient = VideoSearchClient; +module.exports.VideoSearchModels = models; diff --git a/lib/services/videoSearch/package.json b/lib/services/videoSearch/package.json index 3ef604c2ca..ba19ad2f7b 100644 --- a/lib/services/videoSearch/package.json +++ b/lib/services/videoSearch/package.json @@ -1,8 +1,8 @@ { "name": "azure-cognitiveservices-videosearch", "author": "Microsoft Corporation", - "description": "VideoSearchAPIClient Library with typescript type definitions for node", - "version": "1.1.0", + "description": "VideoSearchClient Library with typescript type definitions for node", + "version": "2.0.0", "dependencies": { "ms-rest": "^2.3.3" }, @@ -11,14 +11,14 @@ "azure" ], "license": "MIT", - "main": "./lib/videoSearchAPIClient.js", - "types": "./lib/videoSearchAPIClient.d.ts", - "homepage": "http://github.com/azure/azure-sdk-for-node", + "main": "./lib/videoSearchClient.js", + "types": "./lib/videoSearchClient.d.ts", + "homepage": "https://github.com/azure/azure-sdk-for-node/tree/master/lib/services/videoSearch", "repository": { "type": "git", "url": "https://github.com/azure/azure-sdk-for-node.git" }, "bugs": { - "url": "http://github.com/Azure/azure-sdk-for-node/issues" + "url": "https://github.com/azure/azure-sdk-for-node/issues" } -} \ No newline at end of file +} diff --git a/lib/services/visualSearch/lib/models/action.js b/lib/services/visualSearch/lib/models/action.js index 5a5affbf09..15c0a06e92 100644 --- a/lib/services/visualSearch/lib/models/action.js +++ b/lib/services/visualSearch/lib/models/action.js @@ -20,11 +20,11 @@ const models = require('./index'); class Action extends models['CreativeWork'] { /** * Create a Action. - * @member {array} [result] The result produced in the action. - * @member {string} [displayName] A display name for the action. - * @member {boolean} [isTopAction] A Boolean representing whether this result - * is the top action. - * @member {string} [serviceUrl] Use this URL to get additional data to + * @property {array} [result] The result produced in the action. + * @property {string} [displayName] A display name for the action. + * @property {boolean} [isTopAction] A Boolean representing whether this + * result is the top action. + * @property {string} [serviceUrl] Use this URL to get additional data to * determine how to take the appropriate action. For example, the serviceUrl * might return JSON along with an image URL. */ diff --git a/lib/services/visualSearch/lib/models/aggregateOffer.js b/lib/services/visualSearch/lib/models/aggregateOffer.js index cb82cb7cad..8d2d7a8434 100644 --- a/lib/services/visualSearch/lib/models/aggregateOffer.js +++ b/lib/services/visualSearch/lib/models/aggregateOffer.js @@ -20,7 +20,7 @@ const models = require('./index'); class AggregateOffer extends models['Offer'] { /** * Create a AggregateOffer. - * @member {array} [offers] A list of offers from merchants that have + * @property {array} [offers] A list of offers from merchants that have * offerings related to the image. */ constructor() { diff --git a/lib/services/visualSearch/lib/models/aggregateRating.js b/lib/services/visualSearch/lib/models/aggregateRating.js index 3726e1d297..b1e311c978 100644 --- a/lib/services/visualSearch/lib/models/aggregateRating.js +++ b/lib/services/visualSearch/lib/models/aggregateRating.js @@ -20,7 +20,7 @@ const models = require('./index'); class AggregateRating extends models['Rating'] { /** * Create a AggregateRating. - * @member {number} [reviewCount] The number of times the recipe has been + * @property {number} [reviewCount] The number of times the recipe has been * rated or reviewed. */ constructor() { diff --git a/lib/services/visualSearch/lib/models/creativeWork.js b/lib/services/visualSearch/lib/models/creativeWork.js index 32cd3c2633..5e1625f850 100644 --- a/lib/services/visualSearch/lib/models/creativeWork.js +++ b/lib/services/visualSearch/lib/models/creativeWork.js @@ -21,11 +21,11 @@ const models = require('./index'); class CreativeWork extends models['Thing'] { /** * Create a CreativeWork. - * @member {string} [thumbnailUrl] The URL to a thumbnail of the item. - * @member {array} [provider] The source of the creative work. - * @member {string} [datePublished] The date on which the CreativeWork was + * @property {string} [thumbnailUrl] The URL to a thumbnail of the item. + * @property {array} [provider] The source of the creative work. + * @property {string} [datePublished] The date on which the CreativeWork was * published. - * @member {string} [text] Text content of this creative work. + * @property {string} [text] Text content of this creative work. */ constructor() { super(); diff --git a/lib/services/visualSearch/lib/models/cropArea.js b/lib/services/visualSearch/lib/models/cropArea.js index 17117d18ef..a2632f3706 100644 --- a/lib/services/visualSearch/lib/models/cropArea.js +++ b/lib/services/visualSearch/lib/models/cropArea.js @@ -18,19 +18,19 @@ class CropArea { /** * Create a CropArea. - * @member {number} top The top coordinate of the region to be cropped. The + * @property {number} top The top coordinate of the region to be cropped. The * coordinate is a fractional value of the original image's height and is * measured from the top edge of the image. Specify the coordinate as a value * from 0.0 through 1.0. - * @member {number} bottom The bottom coordinate of the region to be cropped. - * The coordinate is a fractional value of the original image's height and is - * measured from the top edge of the image. Specify the coordinate as a value - * from 0.0 through 1.0. - * @member {number} left The left coordinate of the region to be cropped. The - * coordinate is a fractional value of the original image's width and is + * @property {number} bottom The bottom coordinate of the region to be + * cropped. The coordinate is a fractional value of the original image's + * height and is measured from the top edge of the image. Specify the + * coordinate as a value from 0.0 through 1.0. + * @property {number} left The left coordinate of the region to be cropped. + * The coordinate is a fractional value of the original image's width and is * measured from the left edge of the image. Specify the coordinate as a * value from 0.0 through 1.0. - * @member {number} right The right coordinate of the region to be cropped. + * @property {number} right The right coordinate of the region to be cropped. * The coordinate is a fractional value of the original image's width and is * measured from the left edge of the image. Specify the coordinate as a * value from 0.0 through 1.0. diff --git a/lib/services/visualSearch/lib/models/errorModel.js b/lib/services/visualSearch/lib/models/errorModel.js index 29a10321dd..d827e4885e 100644 --- a/lib/services/visualSearch/lib/models/errorModel.js +++ b/lib/services/visualSearch/lib/models/errorModel.js @@ -17,22 +17,22 @@ class ErrorModel { /** * Create a ErrorModel. - * @member {string} code The error code that identifies the category of + * @property {string} code The error code that identifies the category of * error. Possible values include: 'None', 'ServerError', 'InvalidRequest', * 'RateLimitExceeded', 'InvalidAuthorization', 'InsufficientAuthorization'. * Default value: 'None' . - * @member {string} [subCode] The error code that further helps to identify + * @property {string} [subCode] The error code that further helps to identify * the error. Possible values include: 'UnexpectedError', 'ResourceError', * 'NotImplemented', 'ParameterMissing', 'ParameterInvalidValue', * 'HttpNotAllowed', 'Blocked', 'AuthorizationMissing', * 'AuthorizationRedundancy', 'AuthorizationDisabled', 'AuthorizationExpired' - * @member {string} message A description of the error. - * @member {string} [moreDetails] A description that provides additional + * @property {string} message A description of the error. + * @property {string} [moreDetails] A description that provides additional * information about the error. - * @member {string} [parameter] The parameter in the request that caused the - * error. - * @member {string} [value] The parameter's value in the request that was not - * valid. + * @property {string} [parameter] The parameter in the request that caused + * the error. + * @property {string} [value] The parameter's value in the request that was + * not valid. */ constructor() { } diff --git a/lib/services/visualSearch/lib/models/errorResponse.js b/lib/services/visualSearch/lib/models/errorResponse.js index f24c1e64b3..e37d2932b9 100644 --- a/lib/services/visualSearch/lib/models/errorResponse.js +++ b/lib/services/visualSearch/lib/models/errorResponse.js @@ -20,8 +20,8 @@ const models = require('./index'); class ErrorResponse extends models['Response'] { /** * Create a ErrorResponse. - * @member {array} errors A list of errors that describe the reasons why the - * request failed. + * @property {array} errors A list of errors that describe the reasons why + * the request failed. */ constructor() { super(); diff --git a/lib/services/visualSearch/lib/models/filters.js b/lib/services/visualSearch/lib/models/filters.js index 6a42db7693..2d0e08cd1f 100644 --- a/lib/services/visualSearch/lib/models/filters.js +++ b/lib/services/visualSearch/lib/models/filters.js @@ -18,7 +18,7 @@ class Filters { /** * Create a Filters. - * @member {string} [site] The URL of the site to return similar images and + * @property {string} [site] The URL of the site to return similar images and * similar products from. (e.g., "www.bing.com", "bing.com"). */ constructor() { diff --git a/lib/services/visualSearch/lib/models/identifiable.js b/lib/services/visualSearch/lib/models/identifiable.js index 6cc9e3d679..51ceb85de4 100644 --- a/lib/services/visualSearch/lib/models/identifiable.js +++ b/lib/services/visualSearch/lib/models/identifiable.js @@ -20,7 +20,7 @@ const models = require('./index'); class Identifiable extends models['ResponseBase'] { /** * Create a Identifiable. - * @member {string} [id] A String identifier. + * @property {string} [id] A String identifier. */ constructor() { super(); diff --git a/lib/services/visualSearch/lib/models/imageAction.js b/lib/services/visualSearch/lib/models/imageAction.js index 50f6e1a917..a114e47a96 100644 --- a/lib/services/visualSearch/lib/models/imageAction.js +++ b/lib/services/visualSearch/lib/models/imageAction.js @@ -20,7 +20,7 @@ const models = require('./index'); class ImageAction extends models['Action'] { /** * Create a ImageAction. - * @member {string} [actionType] A string representing the type of action. + * @property {string} [actionType] A string representing the type of action. */ constructor() { super(); diff --git a/lib/services/visualSearch/lib/models/imageInfo.js b/lib/services/visualSearch/lib/models/imageInfo.js index 3cd2667efe..0c0d45debf 100644 --- a/lib/services/visualSearch/lib/models/imageInfo.js +++ b/lib/services/visualSearch/lib/models/imageInfo.js @@ -19,8 +19,8 @@ class ImageInfo { /** * Create a ImageInfo. - * @member {string} [imageInsightsToken] An image insights token. To get the - * insights token, call one of the Image Search APIs (for example, + * @property {string} [imageInsightsToken] An image insights token. To get + * the insights token, call one of the Image Search APIs (for example, * /images/search). In the search results, the * [Image](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#image) * object's @@ -28,28 +28,28 @@ class ImageInfo { * field contains the token. The imageInsightsToken and url fields mutually * exclusive; do not specify both. Do not specify an insights token if the * request includes the image form data. - * @member {string} [url] The URL of the input image. The imageInsightsToken - * and url fields are mutually exclusive; do not specify both. Do not specify - * the URL if the request includes the image form data. - * @member {object} [cropArea] A JSON object consisting of coordinates + * @property {string} [url] The URL of the input image. The + * imageInsightsToken and url fields are mutually exclusive; do not specify + * both. Do not specify the URL if the request includes the image form data. + * @property {object} [cropArea] A JSON object consisting of coordinates * specifying the four corners of a cropped rectangle within the input image. * Use the crop area to identify the region of interest in the image. You can * apply the crop area to the images specified using the imageInsightsToken * or url fields, or an image binary specified in an image form data. - * @member {number} [cropArea.top] The top coordinate of the region to be + * @property {number} [cropArea.top] The top coordinate of the region to be * cropped. The coordinate is a fractional value of the original image's * height and is measured from the top edge of the image. Specify the * coordinate as a value from 0.0 through 1.0. - * @member {number} [cropArea.bottom] The bottom coordinate of the region to - * be cropped. The coordinate is a fractional value of the original image's - * height and is measured from the top edge of the image. Specify the + * @property {number} [cropArea.bottom] The bottom coordinate of the region + * to be cropped. The coordinate is a fractional value of the original + * image's height and is measured from the top edge of the image. Specify the * coordinate as a value from 0.0 through 1.0. - * @member {number} [cropArea.left] The left coordinate of the region to be + * @property {number} [cropArea.left] The left coordinate of the region to be * cropped. The coordinate is a fractional value of the original image's * width and is measured from the left edge of the image. Specify the * coordinate as a value from 0.0 through 1.0. - * @member {number} [cropArea.right] The right coordinate of the region to be - * cropped. The coordinate is a fractional value of the original image's + * @property {number} [cropArea.right] The right coordinate of the region to + * be cropped. The coordinate is a fractional value of the original image's * width and is measured from the left edge of the image. Specify the * coordinate as a value from 0.0 through 1.0. */ diff --git a/lib/services/visualSearch/lib/models/imageKnowledge.js b/lib/services/visualSearch/lib/models/imageKnowledge.js index 19a4b5f4dd..1fa1d3d99a 100644 --- a/lib/services/visualSearch/lib/models/imageKnowledge.js +++ b/lib/services/visualSearch/lib/models/imageKnowledge.js @@ -20,15 +20,15 @@ const models = require('./index'); class ImageKnowledge extends models['Response'] { /** * Create a ImageKnowledge. - * @member {array} [tags] A list of visual search tags. - * @member {object} [image] Image object containing metadata about the + * @property {array} [tags] A list of visual search tags. + * @property {object} [image] Image object containing metadata about the * requested image. - * @member {object} [image.thumbnail] The URL to a thumbnail of the image. - * @member {string} [image.imageInsightsToken] The token that you use in a + * @property {object} [image.thumbnail] The URL to a thumbnail of the image. + * @property {string} [image.imageInsightsToken] The token that you use in a * subsequent call to Visual Search API to get additional information about * the image. For information about using this token, see the * imageInsightsToken field inside the knowledgeRequest request parameter. - * @member {object} [image.insightsMetadata] A count of the number of + * @property {object} [image.insightsMetadata] A count of the number of * websites where you can shop or perform other actions related to the image. * For example, if the image is of an apple pie, this object includes a count * of the number of websites where you can buy an apple pie. To indicate the @@ -36,23 +36,23 @@ class ImageKnowledge extends models['Response'] { * that contains the count. When the user clicks on the icon, use * imageInisghtsToken in a subsequent Visual Search API call to get the list * of shopping websites. - * @member {number} [image.insightsMetadata.shoppingSourcesCount] The number - * of websites that sell the products seen in the image. - * @member {number} [image.insightsMetadata.recipeSourcesCount] The number of - * websites that offer recipes of the food seen in the image. - * @member {object} [image.insightsMetadata.aggregateOffer] A summary of the - * online offers of products found in the image. For example, if the image is - * of a dress, the offer might identify the lowest price and the number of - * offers found. Only visually similar products insights include this field. - * The offer includes the following fields: Name, AggregateRating, - * OfferCount, and LowPrice. - * @member {array} [image.insightsMetadata.aggregateOffer.offers] A list of + * @property {number} [image.insightsMetadata.shoppingSourcesCount] The + * number of websites that sell the products seen in the image. + * @property {number} [image.insightsMetadata.recipeSourcesCount] The number + * of websites that offer recipes of the food seen in the image. + * @property {object} [image.insightsMetadata.aggregateOffer] A summary of + * the online offers of products found in the image. For example, if the + * image is of a dress, the offer might identify the lowest price and the + * number of offers found. Only visually similar products insights include + * this field. The offer includes the following fields: Name, + * AggregateRating, OfferCount, and LowPrice. + * @property {array} [image.insightsMetadata.aggregateOffer.offers] A list of * offers from merchants that have offerings related to the image. - * @member {string} [image.imageId] Unique Id for the image. - * @member {string} [image.accentColor] A three-byte hexadecimal number that - * represents the color that dominates the image. Use the color as the + * @property {string} [image.imageId] Unique Id for the image. + * @property {string} [image.accentColor] A three-byte hexadecimal number + * that represents the color that dominates the image. Use the color as the * temporary background in your client until the image is loaded. - * @member {string} [image.visualWords] For interal use only. + * @property {string} [image.visualWords] For interal use only. */ constructor() { super(); diff --git a/lib/services/visualSearch/lib/models/imageModuleAction.js b/lib/services/visualSearch/lib/models/imageModuleAction.js index 63a26a7206..e0035febb5 100644 --- a/lib/services/visualSearch/lib/models/imageModuleAction.js +++ b/lib/services/visualSearch/lib/models/imageModuleAction.js @@ -20,8 +20,8 @@ const models = require('./index'); class ImageModuleAction extends models['ImageAction'] { /** * Create a ImageModuleAction. - * @member {object} [data] A list of images. - * @member {array} [data.value] A list of images. + * @property {object} [data] A list of images. + * @property {array} [data.value] A list of images. */ constructor() { super(); diff --git a/lib/services/visualSearch/lib/models/imageObject.js b/lib/services/visualSearch/lib/models/imageObject.js index 61ccb03f57..19f881d30a 100644 --- a/lib/services/visualSearch/lib/models/imageObject.js +++ b/lib/services/visualSearch/lib/models/imageObject.js @@ -20,12 +20,12 @@ const models = require('./index'); class ImageObject extends models['MediaObject'] { /** * Create a ImageObject. - * @member {object} [thumbnail] The URL to a thumbnail of the image. - * @member {string} [imageInsightsToken] The token that you use in a + * @property {object} [thumbnail] The URL to a thumbnail of the image. + * @property {string} [imageInsightsToken] The token that you use in a * subsequent call to Visual Search API to get additional information about * the image. For information about using this token, see the * imageInsightsToken field inside the knowledgeRequest request parameter. - * @member {object} [insightsMetadata] A count of the number of websites + * @property {object} [insightsMetadata] A count of the number of websites * where you can shop or perform other actions related to the image. For * example, if the image is of an apple pie, this object includes a count of * the number of websites where you can buy an apple pie. To indicate the @@ -33,23 +33,23 @@ class ImageObject extends models['MediaObject'] { * that contains the count. When the user clicks on the icon, use * imageInisghtsToken in a subsequent Visual Search API call to get the list * of shopping websites. - * @member {number} [insightsMetadata.shoppingSourcesCount] The number of + * @property {number} [insightsMetadata.shoppingSourcesCount] The number of * websites that sell the products seen in the image. - * @member {number} [insightsMetadata.recipeSourcesCount] The number of + * @property {number} [insightsMetadata.recipeSourcesCount] The number of * websites that offer recipes of the food seen in the image. - * @member {object} [insightsMetadata.aggregateOffer] A summary of the online - * offers of products found in the image. For example, if the image is of a - * dress, the offer might identify the lowest price and the number of offers - * found. Only visually similar products insights include this field. The - * offer includes the following fields: Name, AggregateRating, OfferCount, - * and LowPrice. - * @member {array} [insightsMetadata.aggregateOffer.offers] A list of offers - * from merchants that have offerings related to the image. - * @member {string} [imageId] Unique Id for the image. - * @member {string} [accentColor] A three-byte hexadecimal number that + * @property {object} [insightsMetadata.aggregateOffer] A summary of the + * online offers of products found in the image. For example, if the image is + * of a dress, the offer might identify the lowest price and the number of + * offers found. Only visually similar products insights include this field. + * The offer includes the following fields: Name, AggregateRating, + * OfferCount, and LowPrice. + * @property {array} [insightsMetadata.aggregateOffer.offers] A list of + * offers from merchants that have offerings related to the image. + * @property {string} [imageId] Unique Id for the image. + * @property {string} [accentColor] A three-byte hexadecimal number that * represents the color that dominates the image. Use the color as the * temporary background in your client until the image is loaded. - * @member {string} [visualWords] For interal use only. + * @property {string} [visualWords] For interal use only. */ constructor() { super(); diff --git a/lib/services/visualSearch/lib/models/imageRecipesAction.js b/lib/services/visualSearch/lib/models/imageRecipesAction.js index 9b5bb94852..4703fc5e09 100644 --- a/lib/services/visualSearch/lib/models/imageRecipesAction.js +++ b/lib/services/visualSearch/lib/models/imageRecipesAction.js @@ -20,8 +20,8 @@ const models = require('./index'); class ImageRecipesAction extends models['ImageAction'] { /** * Create a ImageRecipesAction. - * @member {object} [data] A list of recipes related to the image. - * @member {array} [data.value] A list of recipes. + * @property {object} [data] A list of recipes related to the image. + * @property {array} [data.value] A list of recipes. */ constructor() { super(); diff --git a/lib/services/visualSearch/lib/models/imageRelatedSearchesAction.js b/lib/services/visualSearch/lib/models/imageRelatedSearchesAction.js index b676b0c9ba..6839d7b526 100644 --- a/lib/services/visualSearch/lib/models/imageRelatedSearchesAction.js +++ b/lib/services/visualSearch/lib/models/imageRelatedSearchesAction.js @@ -20,8 +20,8 @@ const models = require('./index'); class ImageRelatedSearchesAction extends models['ImageAction'] { /** * Create a ImageRelatedSearchesAction. - * @member {object} [data] A list of queries related to the image. - * @member {array} [data.value] A list of related searches. + * @property {object} [data] A list of queries related to the image. + * @property {array} [data.value] A list of related searches. */ constructor() { super(); diff --git a/lib/services/visualSearch/lib/models/imageShoppingSourcesAction.js b/lib/services/visualSearch/lib/models/imageShoppingSourcesAction.js index 37f37d10b6..54585c387d 100644 --- a/lib/services/visualSearch/lib/models/imageShoppingSourcesAction.js +++ b/lib/services/visualSearch/lib/models/imageShoppingSourcesAction.js @@ -20,9 +20,9 @@ const models = require('./index'); class ImageShoppingSourcesAction extends models['ImageAction'] { /** * Create a ImageShoppingSourcesAction. - * @member {object} [data] A list of merchants that offer items related to + * @property {object} [data] A list of merchants that offer items related to * the image. - * @member {array} [data.offers] A list of offers from merchants that have + * @property {array} [data.offers] A list of offers from merchants that have * offerings related to the image. */ constructor() { diff --git a/lib/services/visualSearch/lib/models/imageTag.js b/lib/services/visualSearch/lib/models/imageTag.js index 0de3f507f7..5e80b12024 100644 --- a/lib/services/visualSearch/lib/models/imageTag.js +++ b/lib/services/visualSearch/lib/models/imageTag.js @@ -20,65 +20,65 @@ const models = require('./index'); class ImageTag extends models['Thing'] { /** * Create a ImageTag. - * @member {string} [displayName] Display name for this tag. For the default - * tag, the display name is empty. - * @member {object} [boundingBox] The bounding box for this tag. For the + * @property {string} [displayName] Display name for this tag. For the + * default tag, the display name is empty. + * @property {object} [boundingBox] The bounding box for this tag. For the * default tag, there is no bounding box. - * @member {object} [boundingBox.queryRectangle] A rectangle that outlines + * @property {object} [boundingBox.queryRectangle] A rectangle that outlines * the area of interest for this tag. - * @member {object} [boundingBox.queryRectangle.topLeft] The top left corner - * coordinate. - * @member {number} [boundingBox.queryRectangle.topLeft.x] The x-coordinate - * of the point. - * @member {number} [boundingBox.queryRectangle.topLeft.y] The y-coordinate - * of the point. - * @member {object} [boundingBox.queryRectangle.topRight] The top right + * @property {object} [boundingBox.queryRectangle.topLeft] The top left * corner coordinate. - * @member {number} [boundingBox.queryRectangle.topRight.x] The x-coordinate + * @property {number} [boundingBox.queryRectangle.topLeft.x] The x-coordinate * of the point. - * @member {number} [boundingBox.queryRectangle.topRight.y] The y-coordinate + * @property {number} [boundingBox.queryRectangle.topLeft.y] The y-coordinate * of the point. - * @member {object} [boundingBox.queryRectangle.bottomRight] The bottom right + * @property {object} [boundingBox.queryRectangle.topRight] The top right * corner coordinate. - * @member {number} [boundingBox.queryRectangle.bottomRight.x] The + * @property {number} [boundingBox.queryRectangle.topRight.x] The + * x-coordinate of the point. + * @property {number} [boundingBox.queryRectangle.topRight.y] The + * y-coordinate of the point. + * @property {object} [boundingBox.queryRectangle.bottomRight] The bottom + * right corner coordinate. + * @property {number} [boundingBox.queryRectangle.bottomRight.x] The * x-coordinate of the point. - * @member {number} [boundingBox.queryRectangle.bottomRight.y] The + * @property {number} [boundingBox.queryRectangle.bottomRight.y] The * y-coordinate of the point. - * @member {object} [boundingBox.queryRectangle.bottomLeft] The bottom left + * @property {object} [boundingBox.queryRectangle.bottomLeft] The bottom left * corner coordinate. - * @member {number} [boundingBox.queryRectangle.bottomLeft.x] The + * @property {number} [boundingBox.queryRectangle.bottomLeft.x] The * x-coordinate of the point. - * @member {number} [boundingBox.queryRectangle.bottomLeft.y] The + * @property {number} [boundingBox.queryRectangle.bottomLeft.y] The * y-coordinate of the point. - * @member {object} [boundingBox.displayRectangle] A recommended rectangle to - * show to the user. - * @member {object} [boundingBox.displayRectangle.topLeft] The top left + * @property {object} [boundingBox.displayRectangle] A recommended rectangle + * to show to the user. + * @property {object} [boundingBox.displayRectangle.topLeft] The top left * corner coordinate. - * @member {number} [boundingBox.displayRectangle.topLeft.x] The x-coordinate - * of the point. - * @member {number} [boundingBox.displayRectangle.topLeft.y] The y-coordinate - * of the point. - * @member {object} [boundingBox.displayRectangle.topRight] The top right + * @property {number} [boundingBox.displayRectangle.topLeft.x] The + * x-coordinate of the point. + * @property {number} [boundingBox.displayRectangle.topLeft.y] The + * y-coordinate of the point. + * @property {object} [boundingBox.displayRectangle.topRight] The top right * corner coordinate. - * @member {number} [boundingBox.displayRectangle.topRight.x] The + * @property {number} [boundingBox.displayRectangle.topRight.x] The * x-coordinate of the point. - * @member {number} [boundingBox.displayRectangle.topRight.y] The + * @property {number} [boundingBox.displayRectangle.topRight.y] The * y-coordinate of the point. - * @member {object} [boundingBox.displayRectangle.bottomRight] The bottom + * @property {object} [boundingBox.displayRectangle.bottomRight] The bottom * right corner coordinate. - * @member {number} [boundingBox.displayRectangle.bottomRight.x] The + * @property {number} [boundingBox.displayRectangle.bottomRight.x] The * x-coordinate of the point. - * @member {number} [boundingBox.displayRectangle.bottomRight.y] The + * @property {number} [boundingBox.displayRectangle.bottomRight.y] The * y-coordinate of the point. - * @member {object} [boundingBox.displayRectangle.bottomLeft] The bottom left - * corner coordinate. - * @member {number} [boundingBox.displayRectangle.bottomLeft.x] The + * @property {object} [boundingBox.displayRectangle.bottomLeft] The bottom + * left corner coordinate. + * @property {number} [boundingBox.displayRectangle.bottomLeft.x] The * x-coordinate of the point. - * @member {number} [boundingBox.displayRectangle.bottomLeft.y] The + * @property {number} [boundingBox.displayRectangle.bottomLeft.y] The * y-coordinate of the point. - * @member {array} [actions] Actions within this tag. The order of the items - * denotes the default ranking order of these actions, with the first action - * being the most likely user intent. + * @property {array} [actions] Actions within this tag. The order of the + * items denotes the default ranking order of these actions, with the first + * action being the most likely user intent. */ constructor() { super(); diff --git a/lib/services/visualSearch/lib/models/imageTagRegion.js b/lib/services/visualSearch/lib/models/imageTagRegion.js index 8d36eb80cd..906f5ea663 100644 --- a/lib/services/visualSearch/lib/models/imageTagRegion.js +++ b/lib/services/visualSearch/lib/models/imageTagRegion.js @@ -17,54 +17,57 @@ class ImageTagRegion { /** * Create a ImageTagRegion. - * @member {object} queryRectangle A rectangle that outlines the area of + * @property {object} queryRectangle A rectangle that outlines the area of * interest for this tag. - * @member {object} [queryRectangle.topLeft] The top left corner coordinate. - * @member {number} [queryRectangle.topLeft.x] The x-coordinate of the point. - * @member {number} [queryRectangle.topLeft.y] The y-coordinate of the point. - * @member {object} [queryRectangle.topRight] The top right corner + * @property {object} [queryRectangle.topLeft] The top left corner * coordinate. - * @member {number} [queryRectangle.topRight.x] The x-coordinate of the + * @property {number} [queryRectangle.topLeft.x] The x-coordinate of the * point. - * @member {number} [queryRectangle.topRight.y] The y-coordinate of the + * @property {number} [queryRectangle.topLeft.y] The y-coordinate of the * point. - * @member {object} [queryRectangle.bottomRight] The bottom right corner + * @property {object} [queryRectangle.topRight] The top right corner * coordinate. - * @member {number} [queryRectangle.bottomRight.x] The x-coordinate of the + * @property {number} [queryRectangle.topRight.x] The x-coordinate of the * point. - * @member {number} [queryRectangle.bottomRight.y] The y-coordinate of the + * @property {number} [queryRectangle.topRight.y] The y-coordinate of the * point. - * @member {object} [queryRectangle.bottomLeft] The bottom left corner + * @property {object} [queryRectangle.bottomRight] The bottom right corner * coordinate. - * @member {number} [queryRectangle.bottomLeft.x] The x-coordinate of the + * @property {number} [queryRectangle.bottomRight.x] The x-coordinate of the * point. - * @member {number} [queryRectangle.bottomLeft.y] The y-coordinate of the + * @property {number} [queryRectangle.bottomRight.y] The y-coordinate of the * point. - * @member {object} displayRectangle A recommended rectangle to show to the - * user. - * @member {object} [displayRectangle.topLeft] The top left corner + * @property {object} [queryRectangle.bottomLeft] The bottom left corner * coordinate. - * @member {number} [displayRectangle.topLeft.x] The x-coordinate of the + * @property {number} [queryRectangle.bottomLeft.x] The x-coordinate of the * point. - * @member {number} [displayRectangle.topLeft.y] The y-coordinate of the + * @property {number} [queryRectangle.bottomLeft.y] The y-coordinate of the * point. - * @member {object} [displayRectangle.topRight] The top right corner + * @property {object} displayRectangle A recommended rectangle to show to the + * user. + * @property {object} [displayRectangle.topLeft] The top left corner * coordinate. - * @member {number} [displayRectangle.topRight.x] The x-coordinate of the + * @property {number} [displayRectangle.topLeft.x] The x-coordinate of the * point. - * @member {number} [displayRectangle.topRight.y] The y-coordinate of the + * @property {number} [displayRectangle.topLeft.y] The y-coordinate of the * point. - * @member {object} [displayRectangle.bottomRight] The bottom right corner + * @property {object} [displayRectangle.topRight] The top right corner * coordinate. - * @member {number} [displayRectangle.bottomRight.x] The x-coordinate of the + * @property {number} [displayRectangle.topRight.x] The x-coordinate of the * point. - * @member {number} [displayRectangle.bottomRight.y] The y-coordinate of the + * @property {number} [displayRectangle.topRight.y] The y-coordinate of the * point. - * @member {object} [displayRectangle.bottomLeft] The bottom left corner + * @property {object} [displayRectangle.bottomRight] The bottom right corner + * coordinate. + * @property {number} [displayRectangle.bottomRight.x] The x-coordinate of + * the point. + * @property {number} [displayRectangle.bottomRight.y] The y-coordinate of + * the point. + * @property {object} [displayRectangle.bottomLeft] The bottom left corner * coordinate. - * @member {number} [displayRectangle.bottomLeft.x] The x-coordinate of the + * @property {number} [displayRectangle.bottomLeft.x] The x-coordinate of the * point. - * @member {number} [displayRectangle.bottomLeft.y] The y-coordinate of the + * @property {number} [displayRectangle.bottomLeft.y] The y-coordinate of the * point. */ constructor() { diff --git a/lib/services/visualSearch/lib/models/imagesImageMetadata.js b/lib/services/visualSearch/lib/models/imagesImageMetadata.js index 7891088882..8c0b8103cd 100644 --- a/lib/services/visualSearch/lib/models/imagesImageMetadata.js +++ b/lib/services/visualSearch/lib/models/imagesImageMetadata.js @@ -18,16 +18,16 @@ class ImagesImageMetadata { /** * Create a ImagesImageMetadata. - * @member {number} [shoppingSourcesCount] The number of websites that sell + * @property {number} [shoppingSourcesCount] The number of websites that sell * the products seen in the image. - * @member {number} [recipeSourcesCount] The number of websites that offer + * @property {number} [recipeSourcesCount] The number of websites that offer * recipes of the food seen in the image. - * @member {object} [aggregateOffer] A summary of the online offers of + * @property {object} [aggregateOffer] A summary of the online offers of * products found in the image. For example, if the image is of a dress, the * offer might identify the lowest price and the number of offers found. Only * visually similar products insights include this field. The offer includes * the following fields: Name, AggregateRating, OfferCount, and LowPrice. - * @member {array} [aggregateOffer.offers] A list of offers from merchants + * @property {array} [aggregateOffer.offers] A list of offers from merchants * that have offerings related to the image. */ constructor() { diff --git a/lib/services/visualSearch/lib/models/imagesModule.js b/lib/services/visualSearch/lib/models/imagesModule.js index 459f5629ca..8e14996955 100644 --- a/lib/services/visualSearch/lib/models/imagesModule.js +++ b/lib/services/visualSearch/lib/models/imagesModule.js @@ -17,7 +17,7 @@ class ImagesModule { /** * Create a ImagesModule. - * @member {array} [value] A list of images. + * @property {array} [value] A list of images. */ constructor() { } diff --git a/lib/services/visualSearch/lib/models/index.d.ts b/lib/services/visualSearch/lib/models/index.d.ts index b100a308ae..5246ba2463 100644 --- a/lib/services/visualSearch/lib/models/index.d.ts +++ b/lib/services/visualSearch/lib/models/index.d.ts @@ -1,1006 +1,705 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import * as moment from "moment"; - /** - * @class - * Initializes a new instance of the ResponseBase class. - * @constructor * Response base. - * - * @member {string} _type Polymorphic Discriminator */ export interface ResponseBase { + /** + * Polymorphic Discriminator + */ _type: string; } /** - * @class - * Initializes a new instance of the Identifiable class. - * @constructor * Defines the identity of a resource. - * - * @member {string} [id] A String identifier. */ export interface Identifiable extends ResponseBase { + /** + * A String identifier. + */ readonly id?: string; } /** - * @class - * Initializes a new instance of the Response class. - * @constructor - * Defines a response. All schemas that return at the root of the response must - * inherit from this object. - * - * @member {string} [readLink] The URL that returns this resource. To use the - * URL, append query parameters as appropriate and include the - * Ocp-Apim-Subscription-Key header. - * @member {string} [webSearchUrl] The URL to Bing's search result for this - * item. + * Defines a response. All schemas that return at the root of the response must inherit from this + * object. */ export interface Response extends Identifiable { + /** + * The URL that returns this resource. To use the URL, append query parameters as appropriate and + * include the Ocp-Apim-Subscription-Key header. + */ readonly readLink?: string; + /** + * The URL to Bing's search result for this item. + */ readonly webSearchUrl?: string; } /** - * @class - * Initializes a new instance of the Thing class. - * @constructor * Defines a thing. - * - * @member {string} [name] The name of the thing represented by this object. - * @member {string} [url] The URL to get more information about the thing - * represented by this object. - * @member {object} [image] An image of the item. - * @member {object} [image.thumbnail] The URL to a thumbnail of the image. - * @member {string} [image.imageInsightsToken] The token that you use in a - * subsequent call to Visual Search API to get additional information about the - * image. For information about using this token, see the imageInsightsToken - * field inside the knowledgeRequest request parameter. - * @member {object} [image.insightsMetadata] A count of the number of websites - * where you can shop or perform other actions related to the image. For - * example, if the image is of an apple pie, this object includes a count of - * the number of websites where you can buy an apple pie. To indicate the - * number of offers in your UX, include badging such as a shopping cart icon - * that contains the count. When the user clicks on the icon, use - * imageInisghtsToken in a subsequent Visual Search API call to get the list of - * shopping websites. - * @member {number} [image.insightsMetadata.shoppingSourcesCount] The number of - * websites that sell the products seen in the image. - * @member {number} [image.insightsMetadata.recipeSourcesCount] The number of - * websites that offer recipes of the food seen in the image. - * @member {object} [image.insightsMetadata.aggregateOffer] A summary of the - * online offers of products found in the image. For example, if the image is - * of a dress, the offer might identify the lowest price and the number of - * offers found. Only visually similar products insights include this field. - * The offer includes the following fields: Name, AggregateRating, OfferCount, - * and LowPrice. - * @member {array} [image.insightsMetadata.aggregateOffer.offers] A list of - * offers from merchants that have offerings related to the image. - * @member {string} [image.imageId] Unique Id for the image. - * @member {string} [image.accentColor] A three-byte hexadecimal number that - * represents the color that dominates the image. Use the color as the - * temporary background in your client until the image is loaded. - * @member {string} [image.visualWords] For interal use only. - * @member {string} [description] A short description of the item. - * @member {string} [alternateName] An alias for the item. - * @member {string} [bingId] An ID that uniquely identifies this item. */ export interface Thing extends Response { + /** + * The name of the thing represented by this object. + */ readonly name?: string; + /** + * The URL to get more information about the thing represented by this object. + */ readonly url?: string; + /** + * An image of the item. + */ readonly image?: ImageObject; + /** + * A short description of the item. + */ readonly description?: string; + /** + * An alias for the item. + */ readonly alternateName?: string; + /** + * An ID that uniquely identifies this item. + */ readonly bingId?: string; } /** - * @class - * Initializes a new instance of the Intangible class. - * @constructor - * A utility class that serves as the umbrella for a number of 'intangible' - * things such as quantities, structured values, etc. - * + * A utility class that serves as the umbrella for a number of 'intangible' things such as + * quantities, structured values, etc. */ export interface Intangible extends Thing { } -/** - * @class - * Initializes a new instance of the StructuredValue class. - * @constructor - */ export interface StructuredValue extends Intangible { } /** - * @class - * Initializes a new instance of the Point2D class. - * @constructor * Defines a 2D point with X and Y coordinates. - * - * @member {number} x The x-coordinate of the point. - * @member {number} y The y-coordinate of the point. - */ +*/ export interface Point2D extends StructuredValue { + /** + * The x-coordinate of the point. + */ x: number; + /** + * The y-coordinate of the point. + */ y: number; } /** - * @class - * Initializes a new instance of the NormalizedQuadrilateral class. - * @constructor - * Defines a region of an image. The region is a convex quadrilateral defined - * by coordinates of its top left, top right, bottom left, and bottom right - * points. The coordinates are fractional values of the original image's width - * and height in the range 0.0 through 1.0. - * - * @member {object} topLeft The top left corner coordinate. - * @member {number} [topLeft.x] The x-coordinate of the point. - * @member {number} [topLeft.y] The y-coordinate of the point. - * @member {object} topRight The top right corner coordinate. - * @member {number} [topRight.x] The x-coordinate of the point. - * @member {number} [topRight.y] The y-coordinate of the point. - * @member {object} bottomRight The bottom right corner coordinate. - * @member {number} [bottomRight.x] The x-coordinate of the point. - * @member {number} [bottomRight.y] The y-coordinate of the point. - * @member {object} bottomLeft The bottom left corner coordinate. - * @member {number} [bottomLeft.x] The x-coordinate of the point. - * @member {number} [bottomLeft.y] The y-coordinate of the point. - */ + * Defines a region of an image. The region is a convex quadrilateral defined by coordinates of its + * top left, top right, bottom left, and bottom right points. The coordinates are fractional values + * of the original image's width and height in the range 0.0 through 1.0. +*/ export interface NormalizedQuadrilateral extends StructuredValue { + /** + * The top left corner coordinate. + */ topLeft: Point2D; + /** + * The top right corner coordinate. + */ topRight: Point2D; + /** + * The bottom right corner coordinate. + */ bottomRight: Point2D; + /** + * The bottom left corner coordinate. + */ bottomLeft: Point2D; } /** - * @class - * Initializes a new instance of the ImageTagRegion class. - * @constructor * Defines an image region relevant to the ImageTag. - * - * @member {object} queryRectangle A rectangle that outlines the area of - * interest for this tag. - * @member {object} [queryRectangle.topLeft] The top left corner coordinate. - * @member {number} [queryRectangle.topLeft.x] The x-coordinate of the point. - * @member {number} [queryRectangle.topLeft.y] The y-coordinate of the point. - * @member {object} [queryRectangle.topRight] The top right corner coordinate. - * @member {number} [queryRectangle.topRight.x] The x-coordinate of the point. - * @member {number} [queryRectangle.topRight.y] The y-coordinate of the point. - * @member {object} [queryRectangle.bottomRight] The bottom right corner - * coordinate. - * @member {number} [queryRectangle.bottomRight.x] The x-coordinate of the - * point. - * @member {number} [queryRectangle.bottomRight.y] The y-coordinate of the - * point. - * @member {object} [queryRectangle.bottomLeft] The bottom left corner - * coordinate. - * @member {number} [queryRectangle.bottomLeft.x] The x-coordinate of the - * point. - * @member {number} [queryRectangle.bottomLeft.y] The y-coordinate of the - * point. - * @member {object} displayRectangle A recommended rectangle to show to the - * user. - * @member {object} [displayRectangle.topLeft] The top left corner coordinate. - * @member {number} [displayRectangle.topLeft.x] The x-coordinate of the point. - * @member {number} [displayRectangle.topLeft.y] The y-coordinate of the point. - * @member {object} [displayRectangle.topRight] The top right corner - * coordinate. - * @member {number} [displayRectangle.topRight.x] The x-coordinate of the - * point. - * @member {number} [displayRectangle.topRight.y] The y-coordinate of the - * point. - * @member {object} [displayRectangle.bottomRight] The bottom right corner - * coordinate. - * @member {number} [displayRectangle.bottomRight.x] The x-coordinate of the - * point. - * @member {number} [displayRectangle.bottomRight.y] The y-coordinate of the - * point. - * @member {object} [displayRectangle.bottomLeft] The bottom left corner - * coordinate. - * @member {number} [displayRectangle.bottomLeft.x] The x-coordinate of the - * point. - * @member {number} [displayRectangle.bottomLeft.y] The y-coordinate of the - * point. - */ +*/ export interface ImageTagRegion { + /** + * A rectangle that outlines the area of interest for this tag. + */ queryRectangle: NormalizedQuadrilateral; + /** + * A recommended rectangle to show to the user. + */ displayRectangle: NormalizedQuadrilateral; } /** - * @class - * Initializes a new instance of the CreativeWork class. - * @constructor - * The most generic kind of creative work, including books, movies, - * photographs, software programs, etc. - * - * @member {string} [thumbnailUrl] The URL to a thumbnail of the item. - * @member {array} [provider] The source of the creative work. - * @member {string} [datePublished] The date on which the CreativeWork was - * published. - * @member {string} [text] Text content of this creative work. - */ + * The most generic kind of creative work, including books, movies, photographs, software programs, + * etc. +*/ export interface CreativeWork extends Thing { + /** + * The URL to a thumbnail of the item. + */ readonly thumbnailUrl?: string; + /** + * The source of the creative work. + */ readonly provider?: Thing[]; + /** + * The date on which the CreativeWork was published. + */ readonly datePublished?: string; + /** + * Text content of this creative work. + */ readonly text?: string; } /** - * @class - * Initializes a new instance of the Action class. - * @constructor * Defines an action. - * - * @member {array} [result] The result produced in the action. - * @member {string} [displayName] A display name for the action. - * @member {boolean} [isTopAction] A Boolean representing whether this result - * is the top action. - * @member {string} [serviceUrl] Use this URL to get additional data to - * determine how to take the appropriate action. For example, the serviceUrl - * might return JSON along with an image URL. - */ +*/ export interface Action extends CreativeWork { + /** + * The result produced in the action. + */ readonly result?: Thing[]; + /** + * A display name for the action. + */ readonly displayName?: string; + /** + * A Boolean representing whether this result is the top action. + */ readonly isTopAction?: boolean; + /** + * Use this URL to get additional data to determine how to take the appropriate action. For + * example, the serviceUrl might return JSON along with an image URL. + */ readonly serviceUrl?: string; } /** - * @class - * Initializes a new instance of the ImageAction class. - * @constructor * Defines an image action. - * - * @member {string} [actionType] A string representing the type of action. - */ +*/ export interface ImageAction extends Action { + /** + * A string representing the type of action. + */ readonly actionType?: string; } /** - * @class - * Initializes a new instance of the ImageTag class. - * @constructor * A visual search tag. - * - * @member {string} [displayName] Display name for this tag. For the default - * tag, the display name is empty. - * @member {object} [boundingBox] The bounding box for this tag. For the - * default tag, there is no bounding box. - * @member {object} [boundingBox.queryRectangle] A rectangle that outlines the - * area of interest for this tag. - * @member {object} [boundingBox.queryRectangle.topLeft] The top left corner - * coordinate. - * @member {number} [boundingBox.queryRectangle.topLeft.x] The x-coordinate of - * the point. - * @member {number} [boundingBox.queryRectangle.topLeft.y] The y-coordinate of - * the point. - * @member {object} [boundingBox.queryRectangle.topRight] The top right corner - * coordinate. - * @member {number} [boundingBox.queryRectangle.topRight.x] The x-coordinate of - * the point. - * @member {number} [boundingBox.queryRectangle.topRight.y] The y-coordinate of - * the point. - * @member {object} [boundingBox.queryRectangle.bottomRight] The bottom right - * corner coordinate. - * @member {number} [boundingBox.queryRectangle.bottomRight.x] The x-coordinate - * of the point. - * @member {number} [boundingBox.queryRectangle.bottomRight.y] The y-coordinate - * of the point. - * @member {object} [boundingBox.queryRectangle.bottomLeft] The bottom left - * corner coordinate. - * @member {number} [boundingBox.queryRectangle.bottomLeft.x] The x-coordinate - * of the point. - * @member {number} [boundingBox.queryRectangle.bottomLeft.y] The y-coordinate - * of the point. - * @member {object} [boundingBox.displayRectangle] A recommended rectangle to - * show to the user. - * @member {object} [boundingBox.displayRectangle.topLeft] The top left corner - * coordinate. - * @member {number} [boundingBox.displayRectangle.topLeft.x] The x-coordinate - * of the point. - * @member {number} [boundingBox.displayRectangle.topLeft.y] The y-coordinate - * of the point. - * @member {object} [boundingBox.displayRectangle.topRight] The top right - * corner coordinate. - * @member {number} [boundingBox.displayRectangle.topRight.x] The x-coordinate - * of the point. - * @member {number} [boundingBox.displayRectangle.topRight.y] The y-coordinate - * of the point. - * @member {object} [boundingBox.displayRectangle.bottomRight] The bottom right - * corner coordinate. - * @member {number} [boundingBox.displayRectangle.bottomRight.x] The - * x-coordinate of the point. - * @member {number} [boundingBox.displayRectangle.bottomRight.y] The - * y-coordinate of the point. - * @member {object} [boundingBox.displayRectangle.bottomLeft] The bottom left - * corner coordinate. - * @member {number} [boundingBox.displayRectangle.bottomLeft.x] The - * x-coordinate of the point. - * @member {number} [boundingBox.displayRectangle.bottomLeft.y] The - * y-coordinate of the point. - * @member {array} [actions] Actions within this tag. The order of the items - * denotes the default ranking order of these actions, with the first action - * being the most likely user intent. - */ +*/ export interface ImageTag extends Thing { + /** + * Display name for this tag. For the default tag, the display name is empty. + */ readonly displayName?: string; + /** + * The bounding box for this tag. For the default tag, there is no bounding box. + */ readonly boundingBox?: ImageTagRegion; + /** + * Actions within this tag. The order of the items denotes the default ranking order of these + * actions, with the first action being the most likely user intent. + */ readonly actions?: ImageAction[]; } /** - * @class - * Initializes a new instance of the Organization class. - * @constructor * Defines an organization. - * - */ +*/ export interface Organization extends Thing { } /** - * @class - * Initializes a new instance of the PropertiesItem class. - * @constructor * Defines an item. - * - * @member {string} [text] Text representation of an item. - * @member {string} _type Polymorphic Discriminator - */ +*/ export interface PropertiesItem { + /** + * Text representation of an item. + */ readonly text?: string; + /** + * Polymorphic Discriminator + */ _type: string; } /** - * @class - * Initializes a new instance of the Rating class. - * @constructor * Defines a rating. - * - * @member {number} ratingValue The mean (average) rating. The possible values - * are 1.0 through 5.0. - * @member {number} [bestRating] The highest rated review. The possible values - * are 1.0 through 5.0. - */ +*/ export interface Rating extends PropertiesItem { + /** + * The mean (average) rating. The possible values are 1.0 through 5.0. + */ ratingValue: number; + /** + * The highest rated review. The possible values are 1.0 through 5.0. + */ readonly bestRating?: number; } /** - * @class - * Initializes a new instance of the AggregateRating class. - * @constructor * Defines the metrics that indicate how well an item was rated by others. - * - * @member {number} [reviewCount] The number of times the recipe has been rated - * or reviewed. - */ +*/ export interface AggregateRating extends Rating { + /** + * The number of times the recipe has been rated or reviewed. + */ readonly reviewCount?: number; } /** - * @class - * Initializes a new instance of the Offer class. - * @constructor * Defines a merchant's offer. - * - * @member {object} [seller] Seller for this offer. - * @member {number} [price] The item's price. - * @member {string} [priceCurrency] The monetary currency. For example, USD. - * Possible values include: 'USD', 'CAD', 'GBP', 'EUR', 'COP', 'JPY', 'CNY', - * 'AUD', 'INR', 'AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', 'ARS', 'AWG', 'AZN', - * 'BAM', 'BBD', 'BDT', 'BGN', 'BHD', 'BIF', 'BMD', 'BND', 'BOB', 'BOV', 'BRL', - * 'BSD', 'BTN', 'BWP', 'BYR', 'BZD', 'CDF', 'CHE', 'CHF', 'CHW', 'CLF', 'CLP', - * 'COU', 'CRC', 'CUC', 'CUP', 'CVE', 'CZK', 'DJF', 'DKK', 'DOP', 'DZD', 'EGP', - * 'ERN', 'ETB', 'FJD', 'FKP', 'GEL', 'GHS', 'GIP', 'GMD', 'GNF', 'GTQ', 'GYD', - * 'HKD', 'HNL', 'HRK', 'HTG', 'HUF', 'IDR', 'ILS', 'IQD', 'IRR', 'ISK', 'JMD', - * 'JOD', 'KES', 'KGS', 'KHR', 'KMF', 'KPW', 'KRW', 'KWD', 'KYD', 'KZT', 'LAK', - * 'LBP', 'LKR', 'LRD', 'LSL', 'LYD', 'MAD', 'MDL', 'MGA', 'MKD', 'MMK', 'MNT', - * 'MOP', 'MRO', 'MUR', 'MVR', 'MWK', 'MXN', 'MXV', 'MYR', 'MZN', 'NAD', 'NGN', - * 'NIO', 'NOK', 'NPR', 'NZD', 'OMR', 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', 'PLN', - * 'PYG', 'QAR', 'RON', 'RSD', 'RUB', 'RWF', 'SAR', 'SBD', 'SCR', 'SDG', 'SEK', - * 'SGD', 'SHP', 'SLL', 'SOS', 'SRD', 'SSP', 'STD', 'SYP', 'SZL', 'THB', 'TJS', - * 'TMT', 'TND', 'TOP', 'TRY', 'TTD', 'TWD', 'TZS', 'UAH', 'UGX', 'UYU', 'UZS', - * 'VEF', 'VND', 'VUV', 'WST', 'XAF', 'XCD', 'XOF', 'XPF', 'YER', 'ZAR', 'ZMW'. - * Default value: 'USD' . - * @member {string} [availability] The item's availability. The following are - * the possible values: Discontinued, InStock, InStoreOnly, - * LimitedAvailability, OnlineOnly, OutOfStock, PreOrder, SoldOut. Possible - * values include: 'Discontinued', 'InStock', 'InStoreOnly', - * 'LimitedAvailability', 'OnlineOnly', 'OutOfStock', 'PreOrder', 'SoldOut' - * @member {object} [aggregateRating] An aggregated rating that indicates how - * well the product has been rated by others. - * @member {number} [aggregateRating.reviewCount] The number of times the - * recipe has been rated or reviewed. - * @member {string} [lastUpdated] The last date that the offer was updated. The - * date is in the form YYYY-MM-DD. - */ +*/ export interface Offer extends Thing { + /** + * Seller for this offer. + */ readonly seller?: Organization; + /** + * The item's price. + */ readonly price?: number; + /** + * The monetary currency. For example, USD. Possible values include: 'USD', 'CAD', 'GBP', 'EUR', + * 'COP', 'JPY', 'CNY', 'AUD', 'INR', 'AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', 'ARS', 'AWG', + * 'AZN', 'BAM', 'BBD', 'BDT', 'BGN', 'BHD', 'BIF', 'BMD', 'BND', 'BOB', 'BOV', 'BRL', 'BSD', + * 'BTN', 'BWP', 'BYR', 'BZD', 'CDF', 'CHE', 'CHF', 'CHW', 'CLF', 'CLP', 'COU', 'CRC', 'CUC', + * 'CUP', 'CVE', 'CZK', 'DJF', 'DKK', 'DOP', 'DZD', 'EGP', 'ERN', 'ETB', 'FJD', 'FKP', 'GEL', + * 'GHS', 'GIP', 'GMD', 'GNF', 'GTQ', 'GYD', 'HKD', 'HNL', 'HRK', 'HTG', 'HUF', 'IDR', 'ILS', + * 'IQD', 'IRR', 'ISK', 'JMD', 'JOD', 'KES', 'KGS', 'KHR', 'KMF', 'KPW', 'KRW', 'KWD', 'KYD', + * 'KZT', 'LAK', 'LBP', 'LKR', 'LRD', 'LSL', 'LYD', 'MAD', 'MDL', 'MGA', 'MKD', 'MMK', 'MNT', + * 'MOP', 'MRO', 'MUR', 'MVR', 'MWK', 'MXN', 'MXV', 'MYR', 'MZN', 'NAD', 'NGN', 'NIO', 'NOK', + * 'NPR', 'NZD', 'OMR', 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', 'PLN', 'PYG', 'QAR', 'RON', 'RSD', + * 'RUB', 'RWF', 'SAR', 'SBD', 'SCR', 'SDG', 'SEK', 'SGD', 'SHP', 'SLL', 'SOS', 'SRD', 'SSP', + * 'STD', 'SYP', 'SZL', 'THB', 'TJS', 'TMT', 'TND', 'TOP', 'TRY', 'TTD', 'TWD', 'TZS', 'UAH', + * 'UGX', 'UYU', 'UZS', 'VEF', 'VND', 'VUV', 'WST', 'XAF', 'XCD', 'XOF', 'XPF', 'YER', 'ZAR', + * 'ZMW' + */ readonly priceCurrency?: string; + /** + * The item's availability. The following are the possible values: Discontinued, InStock, + * InStoreOnly, LimitedAvailability, OnlineOnly, OutOfStock, PreOrder, SoldOut. Possible values + * include: 'Discontinued', 'InStock', 'InStoreOnly', 'LimitedAvailability', 'OnlineOnly', + * 'OutOfStock', 'PreOrder', 'SoldOut' + */ readonly availability?: string; + /** + * An aggregated rating that indicates how well the product has been rated by others. + */ readonly aggregateRating?: AggregateRating; + /** + * The last date that the offer was updated. The date is in the form YYYY-MM-DD. + */ readonly lastUpdated?: string; } /** - * @class - * Initializes a new instance of the AggregateOffer class. - * @constructor * Defines a list of offers from merchants that are related to the image. - * - * @member {array} [offers] A list of offers from merchants that have offerings - * related to the image. - */ +*/ export interface AggregateOffer extends Offer { + /** + * A list of offers from merchants that have offerings related to the image. + */ readonly offers?: Offer[]; } /** - * @class - * Initializes a new instance of the ImagesImageMetadata class. - * @constructor - * Defines a count of the number of websites where you can shop or perform - * other actions related to the image. - * - * @member {number} [shoppingSourcesCount] The number of websites that sell the - * products seen in the image. - * @member {number} [recipeSourcesCount] The number of websites that offer - * recipes of the food seen in the image. - * @member {object} [aggregateOffer] A summary of the online offers of products - * found in the image. For example, if the image is of a dress, the offer might - * identify the lowest price and the number of offers found. Only visually - * similar products insights include this field. The offer includes the - * following fields: Name, AggregateRating, OfferCount, and LowPrice. - * @member {array} [aggregateOffer.offers] A list of offers from merchants that - * have offerings related to the image. - */ + * Defines a count of the number of websites where you can shop or perform other actions related to + * the image. +*/ export interface ImagesImageMetadata { + /** + * The number of websites that sell the products seen in the image. + */ readonly shoppingSourcesCount?: number; + /** + * The number of websites that offer recipes of the food seen in the image. + */ readonly recipeSourcesCount?: number; + /** + * A summary of the online offers of products found in the image. For example, if the image is of + * a dress, the offer might identify the lowest price and the number of offers found. Only + * visually similar products insights include this field. The offer includes the following + * fields: Name, AggregateRating, OfferCount, and LowPrice. + */ readonly aggregateOffer?: AggregateOffer; } /** - * @class - * Initializes a new instance of the MediaObject class. - * @constructor * Defines a media object. - * - * @member {string} [contentUrl] Original URL to retrieve the source (file) for - * the media object (e.g., the source URL for the image). - * @member {string} [hostPageUrl] URL of the page that hosts the media object. - * @member {string} [contentSize] Size of the media object content. Use format - * "value unit" (e.g., "1024 B"). - * @member {string} [encodingFormat] Encoding format (e.g., png, gif, jpeg, - * etc). - * @member {string} [hostPageDisplayUrl] Display URL of the page that hosts the - * media object. - * @member {number} [width] The width of the media object, in pixels. - * @member {number} [height] The height of the media object, in pixels. - */ +*/ export interface MediaObject extends CreativeWork { + /** + * Original URL to retrieve the source (file) for the media object (e.g., the source URL for the + * image). + */ readonly contentUrl?: string; + /** + * URL of the page that hosts the media object. + */ readonly hostPageUrl?: string; + /** + * Size of the media object content. Use format "value unit" (e.g., "1024 B"). + */ readonly contentSize?: string; + /** + * Encoding format (e.g., png, gif, jpeg, etc). + */ readonly encodingFormat?: string; + /** + * Display URL of the page that hosts the media object. + */ readonly hostPageDisplayUrl?: string; + /** + * The width of the media object, in pixels. + */ readonly width?: number; + /** + * The height of the media object, in pixels. + */ readonly height?: number; } /** - * @class - * Initializes a new instance of the ImageObject class. - * @constructor * Defines an image. - * - * @member {object} [thumbnail] The URL to a thumbnail of the image. - * @member {string} [imageInsightsToken] The token that you use in a subsequent - * call to Visual Search API to get additional information about the image. For - * information about using this token, see the imageInsightsToken field inside - * the knowledgeRequest request parameter. - * @member {object} [insightsMetadata] A count of the number of websites where - * you can shop or perform other actions related to the image. For example, if - * the image is of an apple pie, this object includes a count of the number of - * websites where you can buy an apple pie. To indicate the number of offers in - * your UX, include badging such as a shopping cart icon that contains the - * count. When the user clicks on the icon, use imageInisghtsToken in a - * subsequent Visual Search API call to get the list of shopping websites. - * @member {number} [insightsMetadata.shoppingSourcesCount] The number of - * websites that sell the products seen in the image. - * @member {number} [insightsMetadata.recipeSourcesCount] The number of - * websites that offer recipes of the food seen in the image. - * @member {object} [insightsMetadata.aggregateOffer] A summary of the online - * offers of products found in the image. For example, if the image is of a - * dress, the offer might identify the lowest price and the number of offers - * found. Only visually similar products insights include this field. The offer - * includes the following fields: Name, AggregateRating, OfferCount, and - * LowPrice. - * @member {array} [insightsMetadata.aggregateOffer.offers] A list of offers - * from merchants that have offerings related to the image. - * @member {string} [imageId] Unique Id for the image. - * @member {string} [accentColor] A three-byte hexadecimal number that - * represents the color that dominates the image. Use the color as the - * temporary background in your client until the image is loaded. - * @member {string} [visualWords] For interal use only. - */ +*/ export interface ImageObject extends MediaObject { + /** + * The URL to a thumbnail of the image. + */ readonly thumbnail?: ImageObject; + /** + * The token that you use in a subsequent call to Visual Search API to get additional information + * about the image. For information about using this token, see the imageInsightsToken field + * inside the knowledgeRequest request parameter. + */ readonly imageInsightsToken?: string; + /** + * A count of the number of websites where you can shop or perform other actions related to the + * image. For example, if the image is of an apple pie, this object includes a count of the + * number of websites where you can buy an apple pie. To indicate the number of offers in your + * UX, include badging such as a shopping cart icon that contains the count. When the user clicks + * on the icon, use imageInisghtsToken in a subsequent Visual Search API call to get the list of + * shopping websites. + */ readonly insightsMetadata?: ImagesImageMetadata; + /** + * Unique Id for the image. + */ readonly imageId?: string; + /** + * A three-byte hexadecimal number that represents the color that dominates the image. Use the + * color as the temporary background in your client until the image is loaded. + */ readonly accentColor?: string; + /** + * For interal use only. + */ readonly visualWords?: string; } /** - * @class - * Initializes a new instance of the ImageKnowledge class. - * @constructor * Defines a visual search API response. - * - * @member {array} [tags] A list of visual search tags. - * @member {object} [image] Image object containing metadata about the - * requested image. - * @member {object} [image.thumbnail] The URL to a thumbnail of the image. - * @member {string} [image.imageInsightsToken] The token that you use in a - * subsequent call to Visual Search API to get additional information about the - * image. For information about using this token, see the imageInsightsToken - * field inside the knowledgeRequest request parameter. - * @member {object} [image.insightsMetadata] A count of the number of websites - * where you can shop or perform other actions related to the image. For - * example, if the image is of an apple pie, this object includes a count of - * the number of websites where you can buy an apple pie. To indicate the - * number of offers in your UX, include badging such as a shopping cart icon - * that contains the count. When the user clicks on the icon, use - * imageInisghtsToken in a subsequent Visual Search API call to get the list of - * shopping websites. - * @member {number} [image.insightsMetadata.shoppingSourcesCount] The number of - * websites that sell the products seen in the image. - * @member {number} [image.insightsMetadata.recipeSourcesCount] The number of - * websites that offer recipes of the food seen in the image. - * @member {object} [image.insightsMetadata.aggregateOffer] A summary of the - * online offers of products found in the image. For example, if the image is - * of a dress, the offer might identify the lowest price and the number of - * offers found. Only visually similar products insights include this field. - * The offer includes the following fields: Name, AggregateRating, OfferCount, - * and LowPrice. - * @member {array} [image.insightsMetadata.aggregateOffer.offers] A list of - * offers from merchants that have offerings related to the image. - * @member {string} [image.imageId] Unique Id for the image. - * @member {string} [image.accentColor] A three-byte hexadecimal number that - * represents the color that dominates the image. Use the color as the - * temporary background in your client until the image is loaded. - * @member {string} [image.visualWords] For interal use only. - */ +*/ export interface ImageKnowledge extends Response { + /** + * A list of visual search tags. + */ readonly tags?: ImageTag[]; + /** + * Image object containing metadata about the requested image. + */ readonly image?: ImageObject; } /** - * @class - * Initializes a new instance of the ErrorModel class. - * @constructor * Defines the error that occurred. - * - * @member {string} code The error code that identifies the category of error. - * Possible values include: 'None', 'ServerError', 'InvalidRequest', - * 'RateLimitExceeded', 'InvalidAuthorization', 'InsufficientAuthorization'. - * Default value: 'None' . - * @member {string} [subCode] The error code that further helps to identify the - * error. Possible values include: 'UnexpectedError', 'ResourceError', - * 'NotImplemented', 'ParameterMissing', 'ParameterInvalidValue', - * 'HttpNotAllowed', 'Blocked', 'AuthorizationMissing', - * 'AuthorizationRedundancy', 'AuthorizationDisabled', 'AuthorizationExpired' - * @member {string} message A description of the error. - * @member {string} [moreDetails] A description that provides additional - * information about the error. - * @member {string} [parameter] The parameter in the request that caused the - * error. - * @member {string} [value] The parameter's value in the request that was not - * valid. - */ +*/ export interface ErrorModel { + /** + * The error code that identifies the category of error. Possible values include: 'None', + * 'ServerError', 'InvalidRequest', 'RateLimitExceeded', 'InvalidAuthorization', + * 'InsufficientAuthorization' + */ code: string; + /** + * The error code that further helps to identify the error. Possible values include: + * 'UnexpectedError', 'ResourceError', 'NotImplemented', 'ParameterMissing', + * 'ParameterInvalidValue', 'HttpNotAllowed', 'Blocked', 'AuthorizationMissing', + * 'AuthorizationRedundancy', 'AuthorizationDisabled', 'AuthorizationExpired' + */ readonly subCode?: string; + /** + * A description of the error. + */ message: string; + /** + * A description that provides additional information about the error. + */ readonly moreDetails?: string; + /** + * The parameter in the request that caused the error. + */ readonly parameter?: string; + /** + * The parameter's value in the request that was not valid. + */ readonly value?: string; } /** - * @class - * Initializes a new instance of the ErrorResponse class. - * @constructor * The top-level response that represents a failed request. - * - * @member {array} errors A list of errors that describe the reasons why the - * request failed. - */ +*/ export interface ErrorResponse extends Response { + /** + * A list of errors that describe the reasons why the request failed. + */ errors: ErrorModel[]; } /** - * @class - * Initializes a new instance of the Person class. - * @constructor * Defines a person. - * - * @member {string} [jobTitle] The person's job title. - * @member {string} [twitterProfile] The URL of the person's twitter profile. - */ +*/ export interface Person extends Thing { + /** + * The person's job title. + */ readonly jobTitle?: string; + /** + * The URL of the person's twitter profile. + */ readonly twitterProfile?: string; } /** - * @class - * Initializes a new instance of the ImageEntityAction class. - * @constructor * Defines an entity action. - * - */ +*/ export interface ImageEntityAction extends ImageAction { } /** - * @class - * Initializes a new instance of the ImagesModule class. - * @constructor * Defines a list of images. - * - * @member {array} [value] A list of images. - */ +*/ export interface ImagesModule { + /** + * A list of images. + */ readonly value?: ImageObject[]; } /** - * @class - * Initializes a new instance of the ImageModuleAction class. - * @constructor * Defines an image list action. - * - * @member {object} [data] A list of images. - * @member {array} [data.value] A list of images. - */ +*/ export interface ImageModuleAction extends ImageAction { + /** + * A list of images. + */ readonly data?: ImagesModule; } /** - * @class - * Initializes a new instance of the Recipe class. - * @constructor * Defines a cooking recipe. - * - * @member {string} [cookTime] The amount of time the food takes to cook. For - * example, PT25M. For information about the time format, see - * http://en.wikipedia.org/wiki/ISO_8601#Durations. - * @member {string} [prepTime] The amount of time required to prepare the - * ingredients. For example, PT15M. For information about the time format, see - * http://en.wikipedia.org/wiki/ISO_8601#Durations. - * @member {string} [totalTime] The total amount of time it takes to prepare - * and cook the recipe. For example, PT45M. For information about the time - * format, see http://en.wikipedia.org/wiki/ISO_8601#Durations. - */ +*/ export interface Recipe extends CreativeWork { + /** + * The amount of time the food takes to cook. For example, PT25M. For information about the time + * format, see http://en.wikipedia.org/wiki/ISO_8601#Durations. + */ readonly cookTime?: string; + /** + * The amount of time required to prepare the ingredients. For example, PT15M. For information + * about the time format, see http://en.wikipedia.org/wiki/ISO_8601#Durations. + */ readonly prepTime?: string; + /** + * The total amount of time it takes to prepare and cook the recipe. For example, PT45M. For + * information about the time format, see http://en.wikipedia.org/wiki/ISO_8601#Durations. + */ readonly totalTime?: string; } /** - * @class - * Initializes a new instance of the RecipesModule class. - * @constructor * Defines a list of recipes. - * - * @member {array} [value] A list of recipes. - */ +*/ export interface RecipesModule { + /** + * A list of recipes. + */ readonly value?: Recipe[]; } /** - * @class - * Initializes a new instance of the ImageRecipesAction class. - * @constructor * Defines an recipe action. - * - * @member {object} [data] A list of recipes related to the image. - * @member {array} [data.value] A list of recipes. - */ +*/ export interface ImageRecipesAction extends ImageAction { + /** + * A list of recipes related to the image. + */ readonly data?: RecipesModule; } /** - * @class - * Initializes a new instance of the Query class. - * @constructor * Defines a search query. - * - * @member {string} text The query string. Use this string as the query term in - * a new search request. - * @member {string} [displayText] The display version of the query term. - * @member {string} [webSearchUrl] The URL that takes the user to the Bing - * search results page for the query. - * @member {string} [searchLink] The URL that you use to get the results of the - * related search. Before using the URL, you must append query parameters as - * appropriate and include the Ocp-Apim-Subscription-Key header. Use this URL - * if you're displaying the results in your own user interface. Otherwise, use - * the webSearchUrl URL. - * @member {object} [thumbnail] The URL to a thumbnail of a related image. - * @member {object} [thumbnail.thumbnail] The URL to a thumbnail of the image. - * @member {string} [thumbnail.imageInsightsToken] The token that you use in a - * subsequent call to Visual Search API to get additional information about the - * image. For information about using this token, see the imageInsightsToken - * field inside the knowledgeRequest request parameter. - * @member {object} [thumbnail.insightsMetadata] A count of the number of - * websites where you can shop or perform other actions related to the image. - * For example, if the image is of an apple pie, this object includes a count - * of the number of websites where you can buy an apple pie. To indicate the - * number of offers in your UX, include badging such as a shopping cart icon - * that contains the count. When the user clicks on the icon, use - * imageInisghtsToken in a subsequent Visual Search API call to get the list of - * shopping websites. - * @member {number} [thumbnail.insightsMetadata.shoppingSourcesCount] The - * number of websites that sell the products seen in the image. - * @member {number} [thumbnail.insightsMetadata.recipeSourcesCount] The number - * of websites that offer recipes of the food seen in the image. - * @member {object} [thumbnail.insightsMetadata.aggregateOffer] A summary of - * the online offers of products found in the image. For example, if the image - * is of a dress, the offer might identify the lowest price and the number of - * offers found. Only visually similar products insights include this field. - * The offer includes the following fields: Name, AggregateRating, OfferCount, - * and LowPrice. - * @member {array} [thumbnail.insightsMetadata.aggregateOffer.offers] A list of - * offers from merchants that have offerings related to the image. - * @member {string} [thumbnail.imageId] Unique Id for the image. - * @member {string} [thumbnail.accentColor] A three-byte hexadecimal number - * that represents the color that dominates the image. Use the color as the - * temporary background in your client until the image is loaded. - * @member {string} [thumbnail.visualWords] For interal use only. - */ +*/ export interface Query { + /** + * The query string. Use this string as the query term in a new search request. + */ text: string; + /** + * The display version of the query term. + */ readonly displayText?: string; + /** + * The URL that takes the user to the Bing search results page for the query. + */ readonly webSearchUrl?: string; + /** + * The URL that you use to get the results of the related search. Before using the URL, you must + * append query parameters as appropriate and include the Ocp-Apim-Subscription-Key header. Use + * this URL if you're displaying the results in your own user interface. Otherwise, use the + * webSearchUrl URL. + */ readonly searchLink?: string; + /** + * The URL to a thumbnail of a related image. + */ readonly thumbnail?: ImageObject; } /** - * @class - * Initializes a new instance of the RelatedSearchesModule class. - * @constructor * Defines a list of related searches. - * - * @member {array} [value] A list of related searches. - */ +*/ export interface RelatedSearchesModule { + /** + * A list of related searches. + */ readonly value?: Query[]; } /** - * @class - * Initializes a new instance of the ImageRelatedSearchesAction class. - * @constructor * Defines an related search action. - * - * @member {object} [data] A list of queries related to the image. - * @member {array} [data.value] A list of related searches. - */ +*/ export interface ImageRelatedSearchesAction extends ImageAction { + /** + * A list of queries related to the image. + */ readonly data?: RelatedSearchesModule; } /** - * @class - * Initializes a new instance of the ImageShoppingSourcesAction class. - * @constructor * Defines a shopping sources action. - * - * @member {object} [data] A list of merchants that offer items related to the - * image. - * @member {array} [data.offers] A list of offers from merchants that have - * offerings related to the image. - */ +*/ export interface ImageShoppingSourcesAction extends ImageAction { + /** + * A list of merchants that offer items related to the image. + */ readonly data?: AggregateOffer; } /** - * @class - * Initializes a new instance of the CropArea class. - * @constructor - * A JSON object consisting of coordinates specifying the four corners of a - * cropped rectangle within the input image. - * - * @member {number} top The top coordinate of the region to be cropped. The - * coordinate is a fractional value of the original image's height and is - * measured from the top edge of the image. Specify the coordinate as a value - * from 0.0 through 1.0. - * @member {number} bottom The bottom coordinate of the region to be cropped. - * The coordinate is a fractional value of the original image's height and is - * measured from the top edge of the image. Specify the coordinate as a value - * from 0.0 through 1.0. - * @member {number} left The left coordinate of the region to be cropped. The - * coordinate is a fractional value of the original image's width and is - * measured from the left edge of the image. Specify the coordinate as a value - * from 0.0 through 1.0. - * @member {number} right The right coordinate of the region to be cropped. The - * coordinate is a fractional value of the original image's width and is - * measured from the left edge of the image. Specify the coordinate as a value - * from 0.0 through 1.0. - */ + * A JSON object consisting of coordinates specifying the four corners of a cropped rectangle + * within the input image. +*/ export interface CropArea { + /** + * The top coordinate of the region to be cropped. The coordinate is a fractional value of the + * original image's height and is measured from the top edge of the image. Specify the coordinate + * as a value from 0.0 through 1.0. + */ top: number; + /** + * The bottom coordinate of the region to be cropped. The coordinate is a fractional value of the + * original image's height and is measured from the top edge of the image. Specify the coordinate + * as a value from 0.0 through 1.0. + */ bottom: number; + /** + * The left coordinate of the region to be cropped. The coordinate is a fractional value of the + * original image's width and is measured from the left edge of the image. Specify the coordinate + * as a value from 0.0 through 1.0. + */ left: number; + /** + * The right coordinate of the region to be cropped. The coordinate is a fractional value of the + * original image's width and is measured from the left edge of the image. Specify the coordinate + * as a value from 0.0 through 1.0. + */ right: number; } /** - * @class - * Initializes a new instance of the ImageInfo class. - * @constructor - * A JSON object that identities the image to get insights of . It also - * includes the optional crop area that you use to identify the region of - * interest in the image. - * - * @member {string} [imageInsightsToken] An image insights token. To get the - * insights token, call one of the Image Search APIs (for example, - * /images/search). In the search results, the - * [Image](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#image) - * object's - * [imageInsightsToken](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#image-imageinsightstoken) - * field contains the token. The imageInsightsToken and url fields mutually - * exclusive; do not specify both. Do not specify an insights token if the - * request includes the image form data. - * @member {string} [url] The URL of the input image. The imageInsightsToken - * and url fields are mutually exclusive; do not specify both. Do not specify - * the URL if the request includes the image form data. - * @member {object} [cropArea] A JSON object consisting of coordinates - * specifying the four corners of a cropped rectangle within the input image. - * Use the crop area to identify the region of interest in the image. You can - * apply the crop area to the images specified using the imageInsightsToken or - * url fields, or an image binary specified in an image form data. - * @member {number} [cropArea.top] The top coordinate of the region to be - * cropped. The coordinate is a fractional value of the original image's height - * and is measured from the top edge of the image. Specify the coordinate as a - * value from 0.0 through 1.0. - * @member {number} [cropArea.bottom] The bottom coordinate of the region to be - * cropped. The coordinate is a fractional value of the original image's height - * and is measured from the top edge of the image. Specify the coordinate as a - * value from 0.0 through 1.0. - * @member {number} [cropArea.left] The left coordinate of the region to be - * cropped. The coordinate is a fractional value of the original image's width - * and is measured from the left edge of the image. Specify the coordinate as a - * value from 0.0 through 1.0. - * @member {number} [cropArea.right] The right coordinate of the region to be - * cropped. The coordinate is a fractional value of the original image's width - * and is measured from the left edge of the image. Specify the coordinate as a - * value from 0.0 through 1.0. - */ + * A JSON object that identities the image to get insights of . It also includes the optional crop + * area that you use to identify the region of interest in the image. +*/ export interface ImageInfo { + /** + * An image insights token. To get the insights token, call one of the Image Search APIs (for + * example, /images/search). In the search results, the + * [Image](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#image) + * object's + * [imageInsightsToken](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#image-imageinsightstoken) + * field contains the token. The imageInsightsToken and url fields mutually exclusive; do not + * specify both. Do not specify an insights token if the request includes the image form data. + */ imageInsightsToken?: string; + /** + * The URL of the input image. The imageInsightsToken and url fields are mutually exclusive; do + * not specify both. Do not specify the URL if the request includes the image form data. + */ url?: string; + /** + * A JSON object consisting of coordinates specifying the four corners of a cropped rectangle + * within the input image. Use the crop area to identify the region of interest in the image. You + * can apply the crop area to the images specified using the imageInsightsToken or url fields, or + * an image binary specified in an image form data. + */ cropArea?: CropArea; } /** - * @class - * Initializes a new instance of the Filters class. - * @constructor - * A key-value object consisting of filters that may be specified to limit the - * results returned by the API. Current available filters: site. - * - * @member {string} [site] The URL of the site to return similar images and - * similar products from. (e.g., "www.bing.com", "bing.com"). - */ + * A key-value object consisting of filters that may be specified to limit the results returned by + * the API. Current available filters: site. +*/ export interface Filters { + /** + * The URL of the site to return similar images and similar products from. (e.g., "www.bing.com", + * "bing.com"). + */ site?: string; } /** - * @class - * Initializes a new instance of the KnowledgeRequest class. - * @constructor - * A JSON object containing information about the request, such as filters for - * the resulting actions. - * - * @member {object} [filters] A key-value object consisting of filters that may - * be specified to limit the results returned by the API. - * @member {string} [filters.site] The URL of the site to return similar images - * and similar products from. (e.g., "www.bing.com", "bing.com"). - */ + * A JSON object containing information about the request, such as filters for the resulting + * actions. +*/ export interface KnowledgeRequest { + /** + * A key-value object consisting of filters that may be specified to limit the results returned + * by the API. + */ filters?: Filters; } /** - * @class - * Initializes a new instance of the VisualSearchRequest class. - * @constructor - * A JSON object that contains information about the image to get insights of. - * Specify this object only in a knowledgeRequest form data. - * - * @member {object} [imageInfo] A JSON object that identities the image to get - * insights of. - * @member {string} [imageInfo.imageInsightsToken] An image insights token. To - * get the insights token, call one of the Image Search APIs (for example, - * /images/search). In the search results, the - * [Image](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#image) - * object's - * [imageInsightsToken](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#image-imageinsightstoken) - * field contains the token. The imageInsightsToken and url fields mutually - * exclusive; do not specify both. Do not specify an insights token if the - * request includes the image form data. - * @member {string} [imageInfo.url] The URL of the input image. The - * imageInsightsToken and url fields are mutually exclusive; do not specify - * both. Do not specify the URL if the request includes the image form data. - * @member {object} [imageInfo.cropArea] A JSON object consisting of - * coordinates specifying the four corners of a cropped rectangle within the - * input image. Use the crop area to identify the region of interest in the - * image. You can apply the crop area to the images specified using the - * imageInsightsToken or url fields, or an image binary specified in an image - * form data. - * @member {number} [imageInfo.cropArea.top] The top coordinate of the region - * to be cropped. The coordinate is a fractional value of the original image's - * height and is measured from the top edge of the image. Specify the - * coordinate as a value from 0.0 through 1.0. - * @member {number} [imageInfo.cropArea.bottom] The bottom coordinate of the - * region to be cropped. The coordinate is a fractional value of the original - * image's height and is measured from the top edge of the image. Specify the - * coordinate as a value from 0.0 through 1.0. - * @member {number} [imageInfo.cropArea.left] The left coordinate of the region - * to be cropped. The coordinate is a fractional value of the original image's - * width and is measured from the left edge of the image. Specify the - * coordinate as a value from 0.0 through 1.0. - * @member {number} [imageInfo.cropArea.right] The right coordinate of the - * region to be cropped. The coordinate is a fractional value of the original - * image's width and is measured from the left edge of the image. Specify the - * coordinate as a value from 0.0 through 1.0. - * @member {object} [knowledgeRequest] A JSON object containing information - * about the request, such as filters, or a description. - * @member {object} [knowledgeRequest.filters] A key-value object consisting of - * filters that may be specified to limit the results returned by the API. - * @member {string} [knowledgeRequest.filters.site] The URL of the site to - * return similar images and similar products from. (e.g., "www.bing.com", - * "bing.com"). - */ + * A JSON object that contains information about the image to get insights of. Specify this object + * only in a knowledgeRequest form data. +*/ export interface VisualSearchRequest { + /** + * A JSON object that identities the image to get insights of. + */ imageInfo?: ImageInfo; + /** + * A JSON object containing information about the request, such as filters, or a description. + */ knowledgeRequest?: KnowledgeRequest; } diff --git a/lib/services/visualSearch/lib/models/knowledgeRequest.js b/lib/services/visualSearch/lib/models/knowledgeRequest.js index 560884fb0c..a13f6d8f87 100644 --- a/lib/services/visualSearch/lib/models/knowledgeRequest.js +++ b/lib/services/visualSearch/lib/models/knowledgeRequest.js @@ -18,9 +18,9 @@ class KnowledgeRequest { /** * Create a KnowledgeRequest. - * @member {object} [filters] A key-value object consisting of filters that + * @property {object} [filters] A key-value object consisting of filters that * may be specified to limit the results returned by the API. - * @member {string} [filters.site] The URL of the site to return similar + * @property {string} [filters.site] The URL of the site to return similar * images and similar products from. (e.g., "www.bing.com", "bing.com"). */ constructor() { diff --git a/lib/services/visualSearch/lib/models/mediaObject.js b/lib/services/visualSearch/lib/models/mediaObject.js index be0d035407..ed500b8ac7 100644 --- a/lib/services/visualSearch/lib/models/mediaObject.js +++ b/lib/services/visualSearch/lib/models/mediaObject.js @@ -20,18 +20,18 @@ const models = require('./index'); class MediaObject extends models['CreativeWork'] { /** * Create a MediaObject. - * @member {string} [contentUrl] Original URL to retrieve the source (file) + * @property {string} [contentUrl] Original URL to retrieve the source (file) * for the media object (e.g., the source URL for the image). - * @member {string} [hostPageUrl] URL of the page that hosts the media + * @property {string} [hostPageUrl] URL of the page that hosts the media * object. - * @member {string} [contentSize] Size of the media object content. Use + * @property {string} [contentSize] Size of the media object content. Use * format "value unit" (e.g., "1024 B"). - * @member {string} [encodingFormat] Encoding format (e.g., png, gif, jpeg, + * @property {string} [encodingFormat] Encoding format (e.g., png, gif, jpeg, * etc). - * @member {string} [hostPageDisplayUrl] Display URL of the page that hosts + * @property {string} [hostPageDisplayUrl] Display URL of the page that hosts * the media object. - * @member {number} [width] The width of the media object, in pixels. - * @member {number} [height] The height of the media object, in pixels. + * @property {number} [width] The width of the media object, in pixels. + * @property {number} [height] The height of the media object, in pixels. */ constructor() { super(); diff --git a/lib/services/visualSearch/lib/models/normalizedQuadrilateral.js b/lib/services/visualSearch/lib/models/normalizedQuadrilateral.js index b2d7ac2586..ffab24e575 100644 --- a/lib/services/visualSearch/lib/models/normalizedQuadrilateral.js +++ b/lib/services/visualSearch/lib/models/normalizedQuadrilateral.js @@ -23,18 +23,18 @@ const models = require('./index'); class NormalizedQuadrilateral extends models['StructuredValue'] { /** * Create a NormalizedQuadrilateral. - * @member {object} topLeft The top left corner coordinate. - * @member {number} [topLeft.x] The x-coordinate of the point. - * @member {number} [topLeft.y] The y-coordinate of the point. - * @member {object} topRight The top right corner coordinate. - * @member {number} [topRight.x] The x-coordinate of the point. - * @member {number} [topRight.y] The y-coordinate of the point. - * @member {object} bottomRight The bottom right corner coordinate. - * @member {number} [bottomRight.x] The x-coordinate of the point. - * @member {number} [bottomRight.y] The y-coordinate of the point. - * @member {object} bottomLeft The bottom left corner coordinate. - * @member {number} [bottomLeft.x] The x-coordinate of the point. - * @member {number} [bottomLeft.y] The y-coordinate of the point. + * @property {object} topLeft The top left corner coordinate. + * @property {number} [topLeft.x] The x-coordinate of the point. + * @property {number} [topLeft.y] The y-coordinate of the point. + * @property {object} topRight The top right corner coordinate. + * @property {number} [topRight.x] The x-coordinate of the point. + * @property {number} [topRight.y] The y-coordinate of the point. + * @property {object} bottomRight The bottom right corner coordinate. + * @property {number} [bottomRight.x] The x-coordinate of the point. + * @property {number} [bottomRight.y] The y-coordinate of the point. + * @property {object} bottomLeft The bottom left corner coordinate. + * @property {number} [bottomLeft.x] The x-coordinate of the point. + * @property {number} [bottomLeft.y] The y-coordinate of the point. */ constructor() { super(); diff --git a/lib/services/visualSearch/lib/models/offer.js b/lib/services/visualSearch/lib/models/offer.js index bc2bb0770e..52383317ec 100644 --- a/lib/services/visualSearch/lib/models/offer.js +++ b/lib/services/visualSearch/lib/models/offer.js @@ -20,36 +20,36 @@ const models = require('./index'); class Offer extends models['Thing'] { /** * Create a Offer. - * @member {object} [seller] Seller for this offer. - * @member {number} [price] The item's price. - * @member {string} [priceCurrency] The monetary currency. For example, USD. - * Possible values include: 'USD', 'CAD', 'GBP', 'EUR', 'COP', 'JPY', 'CNY', - * 'AUD', 'INR', 'AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', 'ARS', 'AWG', - * 'AZN', 'BAM', 'BBD', 'BDT', 'BGN', 'BHD', 'BIF', 'BMD', 'BND', 'BOB', - * 'BOV', 'BRL', 'BSD', 'BTN', 'BWP', 'BYR', 'BZD', 'CDF', 'CHE', 'CHF', - * 'CHW', 'CLF', 'CLP', 'COU', 'CRC', 'CUC', 'CUP', 'CVE', 'CZK', 'DJF', - * 'DKK', 'DOP', 'DZD', 'EGP', 'ERN', 'ETB', 'FJD', 'FKP', 'GEL', 'GHS', - * 'GIP', 'GMD', 'GNF', 'GTQ', 'GYD', 'HKD', 'HNL', 'HRK', 'HTG', 'HUF', - * 'IDR', 'ILS', 'IQD', 'IRR', 'ISK', 'JMD', 'JOD', 'KES', 'KGS', 'KHR', - * 'KMF', 'KPW', 'KRW', 'KWD', 'KYD', 'KZT', 'LAK', 'LBP', 'LKR', 'LRD', - * 'LSL', 'LYD', 'MAD', 'MDL', 'MGA', 'MKD', 'MMK', 'MNT', 'MOP', 'MRO', - * 'MUR', 'MVR', 'MWK', 'MXN', 'MXV', 'MYR', 'MZN', 'NAD', 'NGN', 'NIO', - * 'NOK', 'NPR', 'NZD', 'OMR', 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', 'PLN', - * 'PYG', 'QAR', 'RON', 'RSD', 'RUB', 'RWF', 'SAR', 'SBD', 'SCR', 'SDG', - * 'SEK', 'SGD', 'SHP', 'SLL', 'SOS', 'SRD', 'SSP', 'STD', 'SYP', 'SZL', - * 'THB', 'TJS', 'TMT', 'TND', 'TOP', 'TRY', 'TTD', 'TWD', 'TZS', 'UAH', - * 'UGX', 'UYU', 'UZS', 'VEF', 'VND', 'VUV', 'WST', 'XAF', 'XCD', 'XOF', - * 'XPF', 'YER', 'ZAR', 'ZMW'. Default value: 'USD' . - * @member {string} [availability] The item's availability. The following are - * the possible values: Discontinued, InStock, InStoreOnly, + * @property {object} [seller] Seller for this offer. + * @property {number} [price] The item's price. + * @property {string} [priceCurrency] The monetary currency. For example, + * USD. Possible values include: 'USD', 'CAD', 'GBP', 'EUR', 'COP', 'JPY', + * 'CNY', 'AUD', 'INR', 'AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', 'ARS', + * 'AWG', 'AZN', 'BAM', 'BBD', 'BDT', 'BGN', 'BHD', 'BIF', 'BMD', 'BND', + * 'BOB', 'BOV', 'BRL', 'BSD', 'BTN', 'BWP', 'BYR', 'BZD', 'CDF', 'CHE', + * 'CHF', 'CHW', 'CLF', 'CLP', 'COU', 'CRC', 'CUC', 'CUP', 'CVE', 'CZK', + * 'DJF', 'DKK', 'DOP', 'DZD', 'EGP', 'ERN', 'ETB', 'FJD', 'FKP', 'GEL', + * 'GHS', 'GIP', 'GMD', 'GNF', 'GTQ', 'GYD', 'HKD', 'HNL', 'HRK', 'HTG', + * 'HUF', 'IDR', 'ILS', 'IQD', 'IRR', 'ISK', 'JMD', 'JOD', 'KES', 'KGS', + * 'KHR', 'KMF', 'KPW', 'KRW', 'KWD', 'KYD', 'KZT', 'LAK', 'LBP', 'LKR', + * 'LRD', 'LSL', 'LYD', 'MAD', 'MDL', 'MGA', 'MKD', 'MMK', 'MNT', 'MOP', + * 'MRO', 'MUR', 'MVR', 'MWK', 'MXN', 'MXV', 'MYR', 'MZN', 'NAD', 'NGN', + * 'NIO', 'NOK', 'NPR', 'NZD', 'OMR', 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', + * 'PLN', 'PYG', 'QAR', 'RON', 'RSD', 'RUB', 'RWF', 'SAR', 'SBD', 'SCR', + * 'SDG', 'SEK', 'SGD', 'SHP', 'SLL', 'SOS', 'SRD', 'SSP', 'STD', 'SYP', + * 'SZL', 'THB', 'TJS', 'TMT', 'TND', 'TOP', 'TRY', 'TTD', 'TWD', 'TZS', + * 'UAH', 'UGX', 'UYU', 'UZS', 'VEF', 'VND', 'VUV', 'WST', 'XAF', 'XCD', + * 'XOF', 'XPF', 'YER', 'ZAR', 'ZMW'. Default value: 'USD' . + * @property {string} [availability] The item's availability. The following + * are the possible values: Discontinued, InStock, InStoreOnly, * LimitedAvailability, OnlineOnly, OutOfStock, PreOrder, SoldOut. Possible * values include: 'Discontinued', 'InStock', 'InStoreOnly', * 'LimitedAvailability', 'OnlineOnly', 'OutOfStock', 'PreOrder', 'SoldOut' - * @member {object} [aggregateRating] An aggregated rating that indicates how - * well the product has been rated by others. - * @member {number} [aggregateRating.reviewCount] The number of times the + * @property {object} [aggregateRating] An aggregated rating that indicates + * how well the product has been rated by others. + * @property {number} [aggregateRating.reviewCount] The number of times the * recipe has been rated or reviewed. - * @member {string} [lastUpdated] The last date that the offer was updated. + * @property {string} [lastUpdated] The last date that the offer was updated. * The date is in the form YYYY-MM-DD. */ constructor() { diff --git a/lib/services/visualSearch/lib/models/person.js b/lib/services/visualSearch/lib/models/person.js index e7a51c88cb..7332675608 100644 --- a/lib/services/visualSearch/lib/models/person.js +++ b/lib/services/visualSearch/lib/models/person.js @@ -20,8 +20,9 @@ const models = require('./index'); class Person extends models['Thing'] { /** * Create a Person. - * @member {string} [jobTitle] The person's job title. - * @member {string} [twitterProfile] The URL of the person's twitter profile. + * @property {string} [jobTitle] The person's job title. + * @property {string} [twitterProfile] The URL of the person's twitter + * profile. */ constructor() { super(); diff --git a/lib/services/visualSearch/lib/models/point2D.js b/lib/services/visualSearch/lib/models/point2D.js index 4d174266ed..ff19ad65c1 100644 --- a/lib/services/visualSearch/lib/models/point2D.js +++ b/lib/services/visualSearch/lib/models/point2D.js @@ -20,8 +20,8 @@ const models = require('./index'); class Point2D extends models['StructuredValue'] { /** * Create a Point2D. - * @member {number} x The x-coordinate of the point. - * @member {number} y The y-coordinate of the point. + * @property {number} x The x-coordinate of the point. + * @property {number} y The y-coordinate of the point. */ constructor() { super(); diff --git a/lib/services/visualSearch/lib/models/propertiesItem.js b/lib/services/visualSearch/lib/models/propertiesItem.js index 305d567fbe..f0d4255576 100644 --- a/lib/services/visualSearch/lib/models/propertiesItem.js +++ b/lib/services/visualSearch/lib/models/propertiesItem.js @@ -17,8 +17,8 @@ class PropertiesItem { /** * Create a PropertiesItem. - * @member {string} [text] Text representation of an item. - * @member {string} _type Polymorphic Discriminator + * @property {string} [text] Text representation of an item. + * @property {string} _type Polymorphic Discriminator */ constructor() { } diff --git a/lib/services/visualSearch/lib/models/query.js b/lib/services/visualSearch/lib/models/query.js index 1aa7a33cc1..d67d7b3863 100644 --- a/lib/services/visualSearch/lib/models/query.js +++ b/lib/services/visualSearch/lib/models/query.js @@ -17,24 +17,24 @@ class Query { /** * Create a Query. - * @member {string} text The query string. Use this string as the query term - * in a new search request. - * @member {string} [displayText] The display version of the query term. - * @member {string} [webSearchUrl] The URL that takes the user to the Bing + * @property {string} text The query string. Use this string as the query + * term in a new search request. + * @property {string} [displayText] The display version of the query term. + * @property {string} [webSearchUrl] The URL that takes the user to the Bing * search results page for the query. - * @member {string} [searchLink] The URL that you use to get the results of + * @property {string} [searchLink] The URL that you use to get the results of * the related search. Before using the URL, you must append query parameters * as appropriate and include the Ocp-Apim-Subscription-Key header. Use this * URL if you're displaying the results in your own user interface. * Otherwise, use the webSearchUrl URL. - * @member {object} [thumbnail] The URL to a thumbnail of a related image. - * @member {object} [thumbnail.thumbnail] The URL to a thumbnail of the + * @property {object} [thumbnail] The URL to a thumbnail of a related image. + * @property {object} [thumbnail.thumbnail] The URL to a thumbnail of the * image. - * @member {string} [thumbnail.imageInsightsToken] The token that you use in - * a subsequent call to Visual Search API to get additional information about - * the image. For information about using this token, see the + * @property {string} [thumbnail.imageInsightsToken] The token that you use + * in a subsequent call to Visual Search API to get additional information + * about the image. For information about using this token, see the * imageInsightsToken field inside the knowledgeRequest request parameter. - * @member {object} [thumbnail.insightsMetadata] A count of the number of + * @property {object} [thumbnail.insightsMetadata] A count of the number of * websites where you can shop or perform other actions related to the image. * For example, if the image is of an apple pie, this object includes a count * of the number of websites where you can buy an apple pie. To indicate the @@ -42,23 +42,23 @@ class Query { * that contains the count. When the user clicks on the icon, use * imageInisghtsToken in a subsequent Visual Search API call to get the list * of shopping websites. - * @member {number} [thumbnail.insightsMetadata.shoppingSourcesCount] The + * @property {number} [thumbnail.insightsMetadata.shoppingSourcesCount] The * number of websites that sell the products seen in the image. - * @member {number} [thumbnail.insightsMetadata.recipeSourcesCount] The + * @property {number} [thumbnail.insightsMetadata.recipeSourcesCount] The * number of websites that offer recipes of the food seen in the image. - * @member {object} [thumbnail.insightsMetadata.aggregateOffer] A summary of - * the online offers of products found in the image. For example, if the + * @property {object} [thumbnail.insightsMetadata.aggregateOffer] A summary + * of the online offers of products found in the image. For example, if the * image is of a dress, the offer might identify the lowest price and the * number of offers found. Only visually similar products insights include * this field. The offer includes the following fields: Name, * AggregateRating, OfferCount, and LowPrice. - * @member {array} [thumbnail.insightsMetadata.aggregateOffer.offers] A list - * of offers from merchants that have offerings related to the image. - * @member {string} [thumbnail.imageId] Unique Id for the image. - * @member {string} [thumbnail.accentColor] A three-byte hexadecimal number + * @property {array} [thumbnail.insightsMetadata.aggregateOffer.offers] A + * list of offers from merchants that have offerings related to the image. + * @property {string} [thumbnail.imageId] Unique Id for the image. + * @property {string} [thumbnail.accentColor] A three-byte hexadecimal number * that represents the color that dominates the image. Use the color as the * temporary background in your client until the image is loaded. - * @member {string} [thumbnail.visualWords] For interal use only. + * @property {string} [thumbnail.visualWords] For interal use only. */ constructor() { } diff --git a/lib/services/visualSearch/lib/models/rating.js b/lib/services/visualSearch/lib/models/rating.js index d9e3588f00..a253d29c97 100644 --- a/lib/services/visualSearch/lib/models/rating.js +++ b/lib/services/visualSearch/lib/models/rating.js @@ -20,9 +20,9 @@ const models = require('./index'); class Rating extends models['PropertiesItem'] { /** * Create a Rating. - * @member {number} ratingValue The mean (average) rating. The possible + * @property {number} ratingValue The mean (average) rating. The possible * values are 1.0 through 5.0. - * @member {number} [bestRating] The highest rated review. The possible + * @property {number} [bestRating] The highest rated review. The possible * values are 1.0 through 5.0. */ constructor() { diff --git a/lib/services/visualSearch/lib/models/recipe.js b/lib/services/visualSearch/lib/models/recipe.js index 37fc1dce8c..944a218d27 100644 --- a/lib/services/visualSearch/lib/models/recipe.js +++ b/lib/services/visualSearch/lib/models/recipe.js @@ -20,15 +20,15 @@ const models = require('./index'); class Recipe extends models['CreativeWork'] { /** * Create a Recipe. - * @member {string} [cookTime] The amount of time the food takes to cook. For - * example, PT25M. For information about the time format, see + * @property {string} [cookTime] The amount of time the food takes to cook. + * For example, PT25M. For information about the time format, see * http://en.wikipedia.org/wiki/ISO_8601#Durations. - * @member {string} [prepTime] The amount of time required to prepare the + * @property {string} [prepTime] The amount of time required to prepare the * ingredients. For example, PT15M. For information about the time format, * see http://en.wikipedia.org/wiki/ISO_8601#Durations. - * @member {string} [totalTime] The total amount of time it takes to prepare - * and cook the recipe. For example, PT45M. For information about the time - * format, see http://en.wikipedia.org/wiki/ISO_8601#Durations. + * @property {string} [totalTime] The total amount of time it takes to + * prepare and cook the recipe. For example, PT45M. For information about the + * time format, see http://en.wikipedia.org/wiki/ISO_8601#Durations. */ constructor() { super(); diff --git a/lib/services/visualSearch/lib/models/recipesModule.js b/lib/services/visualSearch/lib/models/recipesModule.js index 6f3f43bfcf..1144d8c827 100644 --- a/lib/services/visualSearch/lib/models/recipesModule.js +++ b/lib/services/visualSearch/lib/models/recipesModule.js @@ -17,7 +17,7 @@ class RecipesModule { /** * Create a RecipesModule. - * @member {array} [value] A list of recipes. + * @property {array} [value] A list of recipes. */ constructor() { } diff --git a/lib/services/visualSearch/lib/models/relatedSearchesModule.js b/lib/services/visualSearch/lib/models/relatedSearchesModule.js index 7b5f38f9c7..7d96b49549 100644 --- a/lib/services/visualSearch/lib/models/relatedSearchesModule.js +++ b/lib/services/visualSearch/lib/models/relatedSearchesModule.js @@ -17,7 +17,7 @@ class RelatedSearchesModule { /** * Create a RelatedSearchesModule. - * @member {array} [value] A list of related searches. + * @property {array} [value] A list of related searches. */ constructor() { } diff --git a/lib/services/visualSearch/lib/models/response.js b/lib/services/visualSearch/lib/models/response.js index 74c01ee6cd..5024c0620c 100644 --- a/lib/services/visualSearch/lib/models/response.js +++ b/lib/services/visualSearch/lib/models/response.js @@ -21,10 +21,10 @@ const models = require('./index'); class Response extends models['Identifiable'] { /** * Create a Response. - * @member {string} [readLink] The URL that returns this resource. To use the - * URL, append query parameters as appropriate and include the + * @property {string} [readLink] The URL that returns this resource. To use + * the URL, append query parameters as appropriate and include the * Ocp-Apim-Subscription-Key header. - * @member {string} [webSearchUrl] The URL to Bing's search result for this + * @property {string} [webSearchUrl] The URL to Bing's search result for this * item. */ constructor() { diff --git a/lib/services/visualSearch/lib/models/responseBase.js b/lib/services/visualSearch/lib/models/responseBase.js index 4fee91b356..9b139e863d 100644 --- a/lib/services/visualSearch/lib/models/responseBase.js +++ b/lib/services/visualSearch/lib/models/responseBase.js @@ -17,7 +17,7 @@ class ResponseBase { /** * Create a ResponseBase. - * @member {string} _type Polymorphic Discriminator + * @property {string} _type Polymorphic Discriminator */ constructor() { } diff --git a/lib/services/visualSearch/lib/models/thing.js b/lib/services/visualSearch/lib/models/thing.js index d818b5dc02..3d1c5eedca 100644 --- a/lib/services/visualSearch/lib/models/thing.js +++ b/lib/services/visualSearch/lib/models/thing.js @@ -20,16 +20,17 @@ const models = require('./index'); class Thing extends models['Response'] { /** * Create a Thing. - * @member {string} [name] The name of the thing represented by this object. - * @member {string} [url] The URL to get more information about the thing + * @property {string} [name] The name of the thing represented by this + * object. + * @property {string} [url] The URL to get more information about the thing * represented by this object. - * @member {object} [image] An image of the item. - * @member {object} [image.thumbnail] The URL to a thumbnail of the image. - * @member {string} [image.imageInsightsToken] The token that you use in a + * @property {object} [image] An image of the item. + * @property {object} [image.thumbnail] The URL to a thumbnail of the image. + * @property {string} [image.imageInsightsToken] The token that you use in a * subsequent call to Visual Search API to get additional information about * the image. For information about using this token, see the * imageInsightsToken field inside the knowledgeRequest request parameter. - * @member {object} [image.insightsMetadata] A count of the number of + * @property {object} [image.insightsMetadata] A count of the number of * websites where you can shop or perform other actions related to the image. * For example, if the image is of an apple pie, this object includes a count * of the number of websites where you can buy an apple pie. To indicate the @@ -37,26 +38,26 @@ class Thing extends models['Response'] { * that contains the count. When the user clicks on the icon, use * imageInisghtsToken in a subsequent Visual Search API call to get the list * of shopping websites. - * @member {number} [image.insightsMetadata.shoppingSourcesCount] The number - * of websites that sell the products seen in the image. - * @member {number} [image.insightsMetadata.recipeSourcesCount] The number of - * websites that offer recipes of the food seen in the image. - * @member {object} [image.insightsMetadata.aggregateOffer] A summary of the - * online offers of products found in the image. For example, if the image is - * of a dress, the offer might identify the lowest price and the number of - * offers found. Only visually similar products insights include this field. - * The offer includes the following fields: Name, AggregateRating, - * OfferCount, and LowPrice. - * @member {array} [image.insightsMetadata.aggregateOffer.offers] A list of + * @property {number} [image.insightsMetadata.shoppingSourcesCount] The + * number of websites that sell the products seen in the image. + * @property {number} [image.insightsMetadata.recipeSourcesCount] The number + * of websites that offer recipes of the food seen in the image. + * @property {object} [image.insightsMetadata.aggregateOffer] A summary of + * the online offers of products found in the image. For example, if the + * image is of a dress, the offer might identify the lowest price and the + * number of offers found. Only visually similar products insights include + * this field. The offer includes the following fields: Name, + * AggregateRating, OfferCount, and LowPrice. + * @property {array} [image.insightsMetadata.aggregateOffer.offers] A list of * offers from merchants that have offerings related to the image. - * @member {string} [image.imageId] Unique Id for the image. - * @member {string} [image.accentColor] A three-byte hexadecimal number that - * represents the color that dominates the image. Use the color as the + * @property {string} [image.imageId] Unique Id for the image. + * @property {string} [image.accentColor] A three-byte hexadecimal number + * that represents the color that dominates the image. Use the color as the * temporary background in your client until the image is loaded. - * @member {string} [image.visualWords] For interal use only. - * @member {string} [description] A short description of the item. - * @member {string} [alternateName] An alias for the item. - * @member {string} [bingId] An ID that uniquely identifies this item. + * @property {string} [image.visualWords] For interal use only. + * @property {string} [description] A short description of the item. + * @property {string} [alternateName] An alias for the item. + * @property {string} [bingId] An ID that uniquely identifies this item. */ constructor() { super(); diff --git a/lib/services/visualSearch/lib/models/visualSearchRequest.js b/lib/services/visualSearch/lib/models/visualSearchRequest.js index 395746991d..4f1555b1f6 100644 --- a/lib/services/visualSearch/lib/models/visualSearchRequest.js +++ b/lib/services/visualSearch/lib/models/visualSearchRequest.js @@ -18,9 +18,9 @@ class VisualSearchRequest { /** * Create a VisualSearchRequest. - * @member {object} [imageInfo] A JSON object that identities the image to + * @property {object} [imageInfo] A JSON object that identities the image to * get insights of. - * @member {string} [imageInfo.imageInsightsToken] An image insights token. + * @property {string} [imageInfo.imageInsightsToken] An image insights token. * To get the insights token, call one of the Image Search APIs (for example, * /images/search). In the search results, the * [Image](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#image) @@ -29,36 +29,37 @@ class VisualSearchRequest { * field contains the token. The imageInsightsToken and url fields mutually * exclusive; do not specify both. Do not specify an insights token if the * request includes the image form data. - * @member {string} [imageInfo.url] The URL of the input image. The + * @property {string} [imageInfo.url] The URL of the input image. The * imageInsightsToken and url fields are mutually exclusive; do not specify * both. Do not specify the URL if the request includes the image form data. - * @member {object} [imageInfo.cropArea] A JSON object consisting of + * @property {object} [imageInfo.cropArea] A JSON object consisting of * coordinates specifying the four corners of a cropped rectangle within the * input image. Use the crop area to identify the region of interest in the * image. You can apply the crop area to the images specified using the * imageInsightsToken or url fields, or an image binary specified in an image * form data. - * @member {number} [imageInfo.cropArea.top] The top coordinate of the region - * to be cropped. The coordinate is a fractional value of the original - * image's height and is measured from the top edge of the image. Specify the - * coordinate as a value from 0.0 through 1.0. - * @member {number} [imageInfo.cropArea.bottom] The bottom coordinate of the + * @property {number} [imageInfo.cropArea.top] The top coordinate of the * region to be cropped. The coordinate is a fractional value of the original * image's height and is measured from the top edge of the image. Specify the * coordinate as a value from 0.0 through 1.0. - * @member {number} [imageInfo.cropArea.left] The left coordinate of the + * @property {number} [imageInfo.cropArea.bottom] The bottom coordinate of + * the region to be cropped. The coordinate is a fractional value of the + * original image's height and is measured from the top edge of the image. + * Specify the coordinate as a value from 0.0 through 1.0. + * @property {number} [imageInfo.cropArea.left] The left coordinate of the * region to be cropped. The coordinate is a fractional value of the original * image's width and is measured from the left edge of the image. Specify the * coordinate as a value from 0.0 through 1.0. - * @member {number} [imageInfo.cropArea.right] The right coordinate of the + * @property {number} [imageInfo.cropArea.right] The right coordinate of the * region to be cropped. The coordinate is a fractional value of the original * image's width and is measured from the left edge of the image. Specify the * coordinate as a value from 0.0 through 1.0. - * @member {object} [knowledgeRequest] A JSON object containing information + * @property {object} [knowledgeRequest] A JSON object containing information * about the request, such as filters, or a description. - * @member {object} [knowledgeRequest.filters] A key-value object consisting - * of filters that may be specified to limit the results returned by the API. - * @member {string} [knowledgeRequest.filters.site] The URL of the site to + * @property {object} [knowledgeRequest.filters] A key-value object + * consisting of filters that may be specified to limit the results returned + * by the API. + * @property {string} [knowledgeRequest.filters.site] The URL of the site to * return similar images and similar products from. (e.g., "www.bing.com", * "bing.com"). */ diff --git a/lib/services/visualSearch/lib/operations/images.js b/lib/services/visualSearch/lib/operations/images.js index 401f904bda..b43bef97d4 100644 --- a/lib/services/visualSearch/lib/operations/images.js +++ b/lib/services/visualSearch/lib/operations/images.js @@ -240,6 +240,9 @@ function _visualSearch(options, callback) { let xBingApisSDK = 'true'; // Validate try { + if (this.client.endpoint === null || this.client.endpoint === undefined || typeof this.client.endpoint.valueOf() !== 'string') { + throw new Error('this.client.endpoint cannot be null or undefined and it must be of type string.'); + } if (acceptLanguage !== null && acceptLanguage !== undefined && typeof acceptLanguage.valueOf() !== 'string') { throw new Error('acceptLanguage must be of type string.'); } @@ -280,6 +283,7 @@ function _visualSearch(options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'images/visualsearch'; + requestUrl = requestUrl.replace('{Endpoint}', this.client.endpoint); let queryParameters = []; if (market !== null && market !== undefined) { queryParameters.push('mkt=' + encodeURIComponent(market)); @@ -399,7 +403,7 @@ function _visualSearch(options, callback) { class Images { /** * Create a Images. - * @param {VisualSearchAPIClient} client Reference to the service client. + * @param {VisualSearchClient} client Reference to the service client. */ constructor(client) { this.client = client; diff --git a/lib/services/visualSearch/lib/operations/index.d.ts b/lib/services/visualSearch/lib/operations/index.d.ts index 7319aaaf59..767189344c 100644 --- a/lib/services/visualSearch/lib/operations/index.d.ts +++ b/lib/services/visualSearch/lib/operations/index.d.ts @@ -17,7 +17,7 @@ import * as models from '../models'; * @class * Images * __NOTE__: An instance of this class is automatically created for an - * instance of the VisualSearchAPIClient. + * instance of the VisualSearchClient. */ export interface Images { diff --git a/lib/services/visualSearch/lib/visualSearchAPIClient.d.ts b/lib/services/visualSearch/lib/visualSearchClient.d.ts similarity index 57% rename from lib/services/visualSearch/lib/visualSearchAPIClient.d.ts rename to lib/services/visualSearch/lib/visualSearchClient.d.ts index e47f67502e..90e410ff36 100644 --- a/lib/services/visualSearch/lib/visualSearchAPIClient.d.ts +++ b/lib/services/visualSearch/lib/visualSearchClient.d.ts @@ -12,16 +12,24 @@ import { ServiceClient, ServiceClientOptions, ServiceClientCredentials } from 'm import * as models from "./models"; import * as operations from "./operations"; -export default class VisualSearchAPIClient extends ServiceClient { +/** + * VisualSearchClientOptions for VisualSearchClient. + */ +declare interface VisualSearchClientOptions extends ServiceClientOptions { + /** + * @property {string} [endpoint] - Supported Cognitive Services endpoints (protocol and hostname, for example: "https://westus.api.cognitive.microsoft.com", "https://api.cognitive.microsoft.com"). + */ + endpoint?: string; +} + +export default class VisualSearchClient extends ServiceClient { /** * @class - * Initializes a new instance of the VisualSearchAPIClient class. + * Initializes a new instance of the VisualSearchClient class. * @constructor * * @param {credentials} credentials - Subscription credentials which uniquely identify client subscription. * - * @param {string} [baseUri] - The base URI of the service. - * * @param {object} [options] - The parameter options * * @param {Array} [options.filters] - Filters to be added to the request pipeline @@ -31,13 +39,17 @@ export default class VisualSearchAPIClient extends ServiceClient { * * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy * + * @param {string} [options.endpoint] - Supported Cognitive Services endpoints (protocol and hostname, for example: "https://westus.api.cognitive.microsoft.com", "https://api.cognitive.microsoft.com"). + * */ - constructor(credentials: ServiceClientCredentials, baseUri?: string, options?: ServiceClientOptions); + constructor(credentials: ServiceClientCredentials, options?: VisualSearchClientOptions); credentials: ServiceClientCredentials; + endpoint: string; + // Operation groups images: operations.Images; } -export { VisualSearchAPIClient, models as VisualSearchAPIModels }; +export { VisualSearchClient, models as VisualSearchModels }; diff --git a/lib/services/visualSearch/lib/visualSearchAPIClient.js b/lib/services/visualSearch/lib/visualSearchClient.js similarity index 67% rename from lib/services/visualSearch/lib/visualSearchAPIClient.js rename to lib/services/visualSearch/lib/visualSearchClient.js index 97d1ffd0f3..f1679033ec 100644 --- a/lib/services/visualSearch/lib/visualSearchAPIClient.js +++ b/lib/services/visualSearch/lib/visualSearchClient.js @@ -21,19 +21,19 @@ const models = require('./models'); const operations = require('./operations'); -/** Class representing a VisualSearchAPIClient. */ -class VisualSearchAPIClient extends ServiceClient { +/** Class representing a VisualSearchClient. */ +class VisualSearchClient extends ServiceClient { /** - * Create a VisualSearchAPIClient. + * Create a VisualSearchClient. * @param {credentials} credentials - Subscription credentials which uniquely identify client subscription. - * @param {string} [baseUri] - The base URI of the service. * @param {object} [options] - The parameter options * @param {Array} [options.filters] - Filters to be added to the request pipeline * @param {object} [options.requestOptions] - Options for the underlying request object * {@link https://github.com/request/request#requestoptions-callback Options doc} * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy + * @param {string} [options.endpoint] - Supported Cognitive Services endpoints (protocol and hostname, for example: "https://westus.api.cognitive.microsoft.com", "https://api.cognitive.microsoft.com"). */ - constructor(credentials, baseUri, options) { + constructor(credentials, options) { if (credentials === null || credentials === undefined) { throw new Error('\'credentials\' cannot be null.'); } @@ -42,14 +42,15 @@ class VisualSearchAPIClient extends ServiceClient { super(credentials, options); - this.baseUri = baseUri; - if (!this.baseUri) { - this.baseUri = 'https://api.cognitive.microsoft.com/bing/v7.0'; - } + this.endpoint = 'https://api.cognitive.microsoft.com'; + this.baseUri = '{Endpoint}/bing/v7.0'; this.credentials = credentials; let packageInfo = this.getPackageJsonInfo(__dirname); this.addUserAgentInfo(`${packageInfo.name}/${packageInfo.version}`); + if(options.endpoint !== null && options.endpoint !== undefined) { + this.endpoint = options.endpoint; + } this.images = new operations.Images(this); this.models = models; msRest.addSerializationMixin(this); @@ -57,7 +58,7 @@ class VisualSearchAPIClient extends ServiceClient { } -module.exports = VisualSearchAPIClient; -module.exports['default'] = VisualSearchAPIClient; -module.exports.VisualSearchAPIClient = VisualSearchAPIClient; -module.exports.VisualSearchAPIModels = models; +module.exports = VisualSearchClient; +module.exports['default'] = VisualSearchClient; +module.exports.VisualSearchClient = VisualSearchClient; +module.exports.VisualSearchModels = models; diff --git a/lib/services/visualSearch/package.json b/lib/services/visualSearch/package.json index 5220651a60..08d1e30b0a 100644 --- a/lib/services/visualSearch/package.json +++ b/lib/services/visualSearch/package.json @@ -1,8 +1,8 @@ { "name": "azure-cognitiveservices-visualsearch", "author": "Microsoft Corporation", - "description": "VisualSearchAPIClient Library with typescript type definitions for node", - "version": "1.3.0-preview", + "description": "VisualSearchClient Library with typescript type definitions for node", + "version": "2.0.0", "dependencies": { "ms-rest": "^2.3.3" }, @@ -11,8 +11,8 @@ "azure" ], "license": "MIT", - "main": "./lib/visualSearchAPIClient.js", - "types": "./lib/visualSearchAPIClient.d.ts", + "main": "./lib/visualSearchClient.js", + "types": "./lib/visualSearchClient.d.ts", "homepage": "https://github.com/azure/azure-sdk-for-node/tree/master/lib/services/visualSearch", "repository": { "type": "git", @@ -21,4 +21,4 @@ "bugs": { "url": "https://github.com/azure/azure-sdk-for-node/issues" } -} \ No newline at end of file +} diff --git a/runtime/ms-rest-azure/index.d.ts b/runtime/ms-rest-azure/index.d.ts index fc424da01c..781638020a 100644 --- a/runtime/ms-rest-azure/index.d.ts +++ b/runtime/ms-rest-azure/index.d.ts @@ -940,13 +940,13 @@ export interface MSIAppServiceOptions extends MSIOptions { * Either provide this parameter or set the environment varaible `MSI_ENDPOINT`. * For example: `export MSI_ENDPOINT="http://127.0.0.1:41741/MSI/token/"` */ - msiEndpoint: string; + msiEndpoint?: string; /** * @property {string} [msiSecret] - The secret used in communication between your code and the local MSI agent. * Either provide this parameter or set the environment varaible `MSI_SECRET`. * For example: `export MSI_SECRET="69418689F1E342DD946CB82994CDA3CB"` */ - msiSecret: string; + msiSecret?: string; /** * @property {string} [msiApiVersion] - The api-version of the local MSI agent. Default value is "2017-09-01". */ diff --git a/swagger_to_sdk_config.json b/swagger_to_sdk_config.json index a3acc96c3c..b6ca1a6455 100644 --- a/swagger_to_sdk_config.json +++ b/swagger_to_sdk_config.json @@ -5,7 +5,7 @@ "nodejs": "", "license-header": "MICROSOFT_MIT_NO_VERSION", "sdkrel:node-sdks-folder": ".", - "use": "@microsoft.azure/autorest.nodejs@2.1.119" + "use": "@microsoft.azure/autorest.nodejs@2.1.121" }, "advanced_options": { "clone_dir": "./azure-sdk-for-node" diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_add_a_pool_with_a_Data_Disk.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_add_a_pool_with_a_Data_Disk.nock.js index 17855e36ab..2cae1686ed 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_add_a_pool_with_a_Data_Disk.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_add_a_pool_with_a_Data_Disk.nock.js @@ -1,102 +1,102 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') +nock('http://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/pools?api-version=2018-08-01.7.0', '*') +.post('/pools?api-version=2018-12-01.8.0', '*') .reply(201, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:16:25 GMT', - etag: '0x8D607A2F88AD288', - location: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdkdatadiskpool', + 'last-modified': 'Tue, 11 Dec 2018 18:35:46 GMT', + etag: '0x8D65F9777899C68', + location: 'https://test3.westcentralus.batch.azure.com/pools/nodesdkdatadiskpool', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '6f31d928-5f1c-42c4-8c80-5d4b3e375120', + 'request-id': 'c2eca7f6-6004-4139-b490-d61cad4ab1c5', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdkdatadiskpool', - date: 'Tue, 21 Aug 2018 20:16:25 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/pools/nodesdkdatadiskpool', + date: 'Tue, 11 Dec 2018 18:35:46 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') +nock('https://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/pools?api-version=2018-08-01.7.0', '*') +.post('/pools?api-version=2018-12-01.8.0', '*') .reply(201, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:16:25 GMT', - etag: '0x8D607A2F88AD288', - location: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdkdatadiskpool', + 'last-modified': 'Tue, 11 Dec 2018 18:35:46 GMT', + etag: '0x8D65F9777899C68', + location: 'https://test3.westcentralus.batch.azure.com/pools/nodesdkdatadiskpool', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '6f31d928-5f1c-42c4-8c80-5d4b3e375120', + 'request-id': 'c2eca7f6-6004-4139-b490-d61cad4ab1c5', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdkdatadiskpool', - date: 'Tue, 21 Aug 2018 20:16:25 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/pools/nodesdkdatadiskpool', + date: 'Tue, 11 Dec 2018 18:35:46 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .get('/pools/nodesdkdatadiskpool?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#pools/@Element\",\"id\":\"nodesdkdatadiskpool\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/pools/nodesdkdatadiskpool\",\"eTag\":\"0x8D607A2F88AD288\",\"lastModified\":\"2018-08-21T20:16:25.5447688Z\",\"creationTime\":\"2018-08-21T20:16:25.5447688Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-08-21T20:16:25.5447688Z\",\"allocationState\":\"resizing\",\"allocationStateTransitionTime\":\"2018-08-21T20:16:25.5447688Z\",\"vmSize\":\"standard_a1\",\"resizeTimeout\":\"PT15M\",\"currentDedicatedNodes\":0,\"targetDedicatedNodes\":0,\"currentLowPriorityNodes\":0,\"targetLowPriorityNodes\":0,\"enableAutoScale\":false,\"enableInterNodeCommunication\":false,\"maxTasksPerNode\":1,\"taskSchedulingPolicy\":{\r\n \"nodeFillType\":\"Spread\"\r\n },\"virtualMachineConfiguration\":{\r\n \"imageReference\":{\r\n \"publisher\":\"Canonical\",\"offer\":\"UbuntuServer\",\"sku\":\"16.04-LTS\",\"version\":\"latest\"\r\n },\"nodeAgentSKUId\":\"batch.node.ubuntu 16.04\",\"dataDisks\":[\r\n {\r\n \"lun\":1,\"caching\":\"none\",\"diskSizeGB\":50,\"storageAccountType\":\"standard_lrs\"\r\n }\r\n ]\r\n }\r\n}", { 'transfer-encoding': 'chunked', +nock('http://test3.westcentralus.batch.azure.com:443') + .get('/pools/nodesdkdatadiskpool?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#pools/@Element\",\"id\":\"nodesdkdatadiskpool\",\"url\":\"https://test3.westcentralus.batch.azure.com/pools/nodesdkdatadiskpool\",\"eTag\":\"0x8D65F9777899C68\",\"lastModified\":\"2018-12-11T18:35:46.9711464Z\",\"creationTime\":\"2018-12-11T18:35:46.9711464Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-12-11T18:35:46.9711464Z\",\"allocationState\":\"resizing\",\"allocationStateTransitionTime\":\"2018-12-11T18:35:46.9711464Z\",\"vmSize\":\"standard_a1\",\"resizeTimeout\":\"PT15M\",\"currentDedicatedNodes\":0,\"targetDedicatedNodes\":0,\"currentLowPriorityNodes\":0,\"targetLowPriorityNodes\":0,\"enableAutoScale\":false,\"enableInterNodeCommunication\":false,\"maxTasksPerNode\":1,\"taskSchedulingPolicy\":{\r\n \"nodeFillType\":\"Spread\"\r\n },\"virtualMachineConfiguration\":{\r\n \"imageReference\":{\r\n \"publisher\":\"Canonical\",\"offer\":\"UbuntuServer\",\"sku\":\"16.04-LTS\",\"version\":\"latest\"\r\n },\"nodeAgentSKUId\":\"batch.node.ubuntu 16.04\",\"dataDisks\":[\r\n {\r\n \"lun\":1,\"caching\":\"none\",\"diskSizeGB\":50,\"storageAccountType\":\"standard_lrs\"\r\n }\r\n ]\r\n }\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', - 'last-modified': 'Tue, 21 Aug 2018 20:16:25 GMT', - etag: '0x8D607A2F88AD288', + 'last-modified': 'Tue, 11 Dec 2018 18:35:46 GMT', + etag: '0x8D65F9777899C68', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '0d063096-3873-4348-a001-2b3100b1ce89', + 'request-id': '1c141802-5276-440e-9c1c-b0946f3425ef', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:16:25 GMT', + date: 'Tue, 11 Dec 2018 18:35:47 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .get('/pools/nodesdkdatadiskpool?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#pools/@Element\",\"id\":\"nodesdkdatadiskpool\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/pools/nodesdkdatadiskpool\",\"eTag\":\"0x8D607A2F88AD288\",\"lastModified\":\"2018-08-21T20:16:25.5447688Z\",\"creationTime\":\"2018-08-21T20:16:25.5447688Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-08-21T20:16:25.5447688Z\",\"allocationState\":\"resizing\",\"allocationStateTransitionTime\":\"2018-08-21T20:16:25.5447688Z\",\"vmSize\":\"standard_a1\",\"resizeTimeout\":\"PT15M\",\"currentDedicatedNodes\":0,\"targetDedicatedNodes\":0,\"currentLowPriorityNodes\":0,\"targetLowPriorityNodes\":0,\"enableAutoScale\":false,\"enableInterNodeCommunication\":false,\"maxTasksPerNode\":1,\"taskSchedulingPolicy\":{\r\n \"nodeFillType\":\"Spread\"\r\n },\"virtualMachineConfiguration\":{\r\n \"imageReference\":{\r\n \"publisher\":\"Canonical\",\"offer\":\"UbuntuServer\",\"sku\":\"16.04-LTS\",\"version\":\"latest\"\r\n },\"nodeAgentSKUId\":\"batch.node.ubuntu 16.04\",\"dataDisks\":[\r\n {\r\n \"lun\":1,\"caching\":\"none\",\"diskSizeGB\":50,\"storageAccountType\":\"standard_lrs\"\r\n }\r\n ]\r\n }\r\n}", { 'transfer-encoding': 'chunked', +nock('https://test3.westcentralus.batch.azure.com:443') + .get('/pools/nodesdkdatadiskpool?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#pools/@Element\",\"id\":\"nodesdkdatadiskpool\",\"url\":\"https://test3.westcentralus.batch.azure.com/pools/nodesdkdatadiskpool\",\"eTag\":\"0x8D65F9777899C68\",\"lastModified\":\"2018-12-11T18:35:46.9711464Z\",\"creationTime\":\"2018-12-11T18:35:46.9711464Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-12-11T18:35:46.9711464Z\",\"allocationState\":\"resizing\",\"allocationStateTransitionTime\":\"2018-12-11T18:35:46.9711464Z\",\"vmSize\":\"standard_a1\",\"resizeTimeout\":\"PT15M\",\"currentDedicatedNodes\":0,\"targetDedicatedNodes\":0,\"currentLowPriorityNodes\":0,\"targetLowPriorityNodes\":0,\"enableAutoScale\":false,\"enableInterNodeCommunication\":false,\"maxTasksPerNode\":1,\"taskSchedulingPolicy\":{\r\n \"nodeFillType\":\"Spread\"\r\n },\"virtualMachineConfiguration\":{\r\n \"imageReference\":{\r\n \"publisher\":\"Canonical\",\"offer\":\"UbuntuServer\",\"sku\":\"16.04-LTS\",\"version\":\"latest\"\r\n },\"nodeAgentSKUId\":\"batch.node.ubuntu 16.04\",\"dataDisks\":[\r\n {\r\n \"lun\":1,\"caching\":\"none\",\"diskSizeGB\":50,\"storageAccountType\":\"standard_lrs\"\r\n }\r\n ]\r\n }\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', - 'last-modified': 'Tue, 21 Aug 2018 20:16:25 GMT', - etag: '0x8D607A2F88AD288', + 'last-modified': 'Tue, 11 Dec 2018 18:35:46 GMT', + etag: '0x8D65F9777899C68', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '0d063096-3873-4348-a001-2b3100b1ce89', + 'request-id': '1c141802-5276-440e-9c1c-b0946f3425ef', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:16:25 GMT', + date: 'Tue, 11 Dec 2018 18:35:47 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .delete('/pools/nodesdkdatadiskpool?api-version=2018-08-01.7.0') +nock('http://test3.westcentralus.batch.azure.com:443') + .delete('/pools/nodesdkdatadiskpool?api-version=2018-12-01.8.0') .reply(202, "", { 'transfer-encoding': 'chunked', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'a7c4a31b-0870-4ce3-9af7-61970a395c1f', + 'request-id': 'd401b919-e404-43a1-aebe-36954ab9d864', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:16:27 GMT', + date: 'Tue, 11 Dec 2018 18:35:46 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .delete('/pools/nodesdkdatadiskpool?api-version=2018-08-01.7.0') +nock('https://test3.westcentralus.batch.azure.com:443') + .delete('/pools/nodesdkdatadiskpool?api-version=2018-12-01.8.0') .reply(202, "", { 'transfer-encoding': 'chunked', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'a7c4a31b-0870-4ce3-9af7-61970a395c1f', + 'request-id': 'd401b919-e404-43a1-aebe-36954ab9d864', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:16:27 GMT', + date: 'Tue, 11 Dec 2018 18:35:46 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_add_a_pool_with_a_custom_image_and_get_expected_error.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_add_a_pool_with_a_custom_image_and_get_expected_error.nock.js index c02d5e4f13..9b5e57d269 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_add_a_pool_with_a_custom_image_and_get_expected_error.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_add_a_pool_with_a_custom_image_and_get_expected_error.nock.js @@ -1,38 +1,38 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') +nock('http://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/pools?api-version=2018-08-01.7.0', '*') - .reply(400, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element\",\"code\":\"InvalidPropertyValue\",\"message\":{\r\n \"lang\":\"en-US\",\"value\":\"The value provided for one of the properties in the request body is invalid.\\nRequestId:14df0f7d-179f-488c-942f-9ec1b6d12e5c\\nTime:2018-08-21T20:16:22.7758842Z\"\r\n },\"values\":[\r\n {\r\n \"key\":\"PropertyName\",\"value\":\"virtualMachineImageId\"\r\n },{\r\n \"key\":\"PropertyValue\",\"value\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test/providers/Microsoft.Compute/images/FakeImage\"\r\n },{\r\n \"key\":\"Reason\",\"value\":\"The specified virtualMachineImageId is in a different subscription and cannot be used with the current Batch account in subscription 3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05\"\r\n }\r\n ]\r\n}", { 'content-length': '852', +.post('/pools?api-version=2018-12-01.8.0', '*') + .reply(400, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element\",\"code\":\"InvalidPropertyValue\",\"message\":{\r\n \"lang\":\"en-US\",\"value\":\"The value provided for one of the properties in the request body is invalid.\\nRequestId:55bccad4-65eb-464a-b9db-73ce5fe322ca\\nTime:2018-12-11T18:35:45.1020145Z\"\r\n },\"values\":[\r\n {\r\n \"key\":\"PropertyName\",\"value\":\"virtualMachineImageId\"\r\n },{\r\n \"key\":\"PropertyValue\",\"value\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test/providers/Microsoft.Compute/images/FakeImage\"\r\n },{\r\n \"key\":\"Reason\",\"value\":\"The specified virtualMachineImageId is in a different subscription and cannot be used with the current Batch account in subscription f30ef677-64a9-4768-934f-5fbbc0e1ad27\"\r\n }\r\n ]\r\n}", { 'content-length': '849', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '14df0f7d-179f-488c-942f-9ec1b6d12e5c', + 'request-id': '55bccad4-65eb-464a-b9db-73ce5fe322ca', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:16:22 GMT', + date: 'Tue, 11 Dec 2018 18:35:45 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') +nock('https://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/pools?api-version=2018-08-01.7.0', '*') - .reply(400, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element\",\"code\":\"InvalidPropertyValue\",\"message\":{\r\n \"lang\":\"en-US\",\"value\":\"The value provided for one of the properties in the request body is invalid.\\nRequestId:14df0f7d-179f-488c-942f-9ec1b6d12e5c\\nTime:2018-08-21T20:16:22.7758842Z\"\r\n },\"values\":[\r\n {\r\n \"key\":\"PropertyName\",\"value\":\"virtualMachineImageId\"\r\n },{\r\n \"key\":\"PropertyValue\",\"value\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test/providers/Microsoft.Compute/images/FakeImage\"\r\n },{\r\n \"key\":\"Reason\",\"value\":\"The specified virtualMachineImageId is in a different subscription and cannot be used with the current Batch account in subscription 3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05\"\r\n }\r\n ]\r\n}", { 'content-length': '852', +.post('/pools?api-version=2018-12-01.8.0', '*') + .reply(400, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element\",\"code\":\"InvalidPropertyValue\",\"message\":{\r\n \"lang\":\"en-US\",\"value\":\"The value provided for one of the properties in the request body is invalid.\\nRequestId:55bccad4-65eb-464a-b9db-73ce5fe322ca\\nTime:2018-12-11T18:35:45.1020145Z\"\r\n },\"values\":[\r\n {\r\n \"key\":\"PropertyName\",\"value\":\"virtualMachineImageId\"\r\n },{\r\n \"key\":\"PropertyValue\",\"value\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test/providers/Microsoft.Compute/images/FakeImage\"\r\n },{\r\n \"key\":\"Reason\",\"value\":\"The specified virtualMachineImageId is in a different subscription and cannot be used with the current Batch account in subscription f30ef677-64a9-4768-934f-5fbbc0e1ad27\"\r\n }\r\n ]\r\n}", { 'content-length': '849', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '14df0f7d-179f-488c-942f-9ec1b6d12e5c', + 'request-id': '55bccad4-65eb-464a-b9db-73ce5fe322ca', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:16:22 GMT', + date: 'Tue, 11 Dec 2018 18:35:45 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_add_a_pool_with_an_osDisk.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_add_a_pool_with_an_osDisk.nock.js deleted file mode 100644 index 3b7a3f320d..0000000000 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_add_a_pool_with_an_osDisk.nock.js +++ /dev/null @@ -1,102 +0,0 @@ -// This file has been autogenerated. - -exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; -}; - -exports.scopes = [[function (nock) { -var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .filteringRequestBody(function (path) { return '*';}) -.post('/pools?api-version=2018-08-01.7.0', '*') - .reply(201, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:16:22 GMT', - etag: '0x8D607A2F6FFB2A6', - location: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdkosdiskpool', - server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '624a35c0-1e38-4695-99d2-4fd6e4ce6233', - 'strict-transport-security': 'max-age=31536000; includeSubDomains', - 'x-content-type-options': 'nosniff', - dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdkosdiskpool', - date: 'Tue, 21 Aug 2018 20:16:22 GMT', - connection: 'close' }); - return result; }, -function (nock) { -var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .filteringRequestBody(function (path) { return '*';}) -.post('/pools?api-version=2018-08-01.7.0', '*') - .reply(201, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:16:22 GMT', - etag: '0x8D607A2F6FFB2A6', - location: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdkosdiskpool', - server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '624a35c0-1e38-4695-99d2-4fd6e4ce6233', - 'strict-transport-security': 'max-age=31536000; includeSubDomains', - 'x-content-type-options': 'nosniff', - dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdkosdiskpool', - date: 'Tue, 21 Aug 2018 20:16:22 GMT', - connection: 'close' }); - return result; }, -function (nock) { -var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .get('/pools/nodesdkosdiskpool?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#pools/@Element\",\"id\":\"nodesdkosdiskpool\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/pools/nodesdkosdiskpool\",\"eTag\":\"0x8D607A2F6FFB2A6\",\"lastModified\":\"2018-08-21T20:16:22.9552806Z\",\"creationTime\":\"2018-08-21T20:16:22.9552806Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-08-21T20:16:22.9552806Z\",\"allocationState\":\"resizing\",\"allocationStateTransitionTime\":\"2018-08-21T20:16:22.9552806Z\",\"vmSize\":\"standard_a1\",\"resizeTimeout\":\"PT15M\",\"currentDedicatedNodes\":0,\"targetDedicatedNodes\":0,\"currentLowPriorityNodes\":0,\"targetLowPriorityNodes\":0,\"enableAutoScale\":false,\"enableInterNodeCommunication\":false,\"maxTasksPerNode\":1,\"taskSchedulingPolicy\":{\r\n \"nodeFillType\":\"Spread\"\r\n },\"virtualMachineConfiguration\":{\r\n \"imageReference\":{\r\n \"publisher\":\"Canonical\",\"offer\":\"UbuntuServer\",\"sku\":\"16.04-LTS\",\"version\":\"latest\"\r\n },\"osDisk\":{\r\n \"caching\":\"ReadWrite\"\r\n },\"nodeAgentSKUId\":\"batch.node.ubuntu 16.04\"\r\n }\r\n}", { 'transfer-encoding': 'chunked', - 'content-type': 'application/json;odata=minimalmetadata', - 'last-modified': 'Tue, 21 Aug 2018 20:16:22 GMT', - etag: '0x8D607A2F6FFB2A6', - server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '7a76d427-dd68-44bd-be62-ec4b950e7825', - 'strict-transport-security': 'max-age=31536000; includeSubDomains', - 'x-content-type-options': 'nosniff', - dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:16:23 GMT', - connection: 'close' }); - return result; }, -function (nock) { -var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .get('/pools/nodesdkosdiskpool?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#pools/@Element\",\"id\":\"nodesdkosdiskpool\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/pools/nodesdkosdiskpool\",\"eTag\":\"0x8D607A2F6FFB2A6\",\"lastModified\":\"2018-08-21T20:16:22.9552806Z\",\"creationTime\":\"2018-08-21T20:16:22.9552806Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-08-21T20:16:22.9552806Z\",\"allocationState\":\"resizing\",\"allocationStateTransitionTime\":\"2018-08-21T20:16:22.9552806Z\",\"vmSize\":\"standard_a1\",\"resizeTimeout\":\"PT15M\",\"currentDedicatedNodes\":0,\"targetDedicatedNodes\":0,\"currentLowPriorityNodes\":0,\"targetLowPriorityNodes\":0,\"enableAutoScale\":false,\"enableInterNodeCommunication\":false,\"maxTasksPerNode\":1,\"taskSchedulingPolicy\":{\r\n \"nodeFillType\":\"Spread\"\r\n },\"virtualMachineConfiguration\":{\r\n \"imageReference\":{\r\n \"publisher\":\"Canonical\",\"offer\":\"UbuntuServer\",\"sku\":\"16.04-LTS\",\"version\":\"latest\"\r\n },\"osDisk\":{\r\n \"caching\":\"ReadWrite\"\r\n },\"nodeAgentSKUId\":\"batch.node.ubuntu 16.04\"\r\n }\r\n}", { 'transfer-encoding': 'chunked', - 'content-type': 'application/json;odata=minimalmetadata', - 'last-modified': 'Tue, 21 Aug 2018 20:16:22 GMT', - etag: '0x8D607A2F6FFB2A6', - server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '7a76d427-dd68-44bd-be62-ec4b950e7825', - 'strict-transport-security': 'max-age=31536000; includeSubDomains', - 'x-content-type-options': 'nosniff', - dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:16:23 GMT', - connection: 'close' }); - return result; }, -function (nock) { -var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .delete('/pools/nodesdkosdiskpool?api-version=2018-08-01.7.0') - .reply(202, "", { 'transfer-encoding': 'chunked', - server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '3bc45c53-0418-412c-920f-c8c29d907bb5', - 'strict-transport-security': 'max-age=31536000; includeSubDomains', - 'x-content-type-options': 'nosniff', - dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:16:25 GMT', - connection: 'close' }); - return result; }, -function (nock) { -var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .delete('/pools/nodesdkosdiskpool?api-version=2018-08-01.7.0') - .reply(202, "", { 'transfer-encoding': 'chunked', - server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '3bc45c53-0418-412c-920f-c8c29d907bb5', - 'strict-transport-security': 'max-age=31536000; includeSubDomains', - 'x-content-type-options': 'nosniff', - dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:16:25 GMT', - connection: 'close' }); - return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_add_a_pool_with_inbound_endpoint_configuration_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_add_a_pool_with_inbound_endpoint_configuration_successfully.nock.js index 529a4afea9..e800ab795e 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_add_a_pool_with_inbound_endpoint_configuration_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_add_a_pool_with_inbound_endpoint_configuration_successfully.nock.js @@ -1,44 +1,44 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') +nock('http://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/pools?api-version=2018-08-01.7.0', '*') +.post('/pools?api-version=2018-12-01.8.0', '*') .reply(201, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:16:28 GMT', - etag: '0x8D607A2FA29DA10', - location: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdkinboundendpointpool', + 'last-modified': 'Tue, 11 Dec 2018 18:35:49 GMT', + etag: '0x8D65F9778F109AA', + location: 'https://test3.westcentralus.batch.azure.com/pools/nodesdkinboundendpointpool', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'fd4c1f89-0345-4ea1-859c-8fae1153e10d', + 'request-id': 'ca8e14cf-187d-4642-829c-739a2d5c94ac', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdkinboundendpointpool', - date: 'Tue, 21 Aug 2018 20:16:28 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/pools/nodesdkinboundendpointpool', + date: 'Tue, 11 Dec 2018 18:35:49 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') +nock('https://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/pools?api-version=2018-08-01.7.0', '*') +.post('/pools?api-version=2018-12-01.8.0', '*') .reply(201, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:16:28 GMT', - etag: '0x8D607A2FA29DA10', - location: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdkinboundendpointpool', + 'last-modified': 'Tue, 11 Dec 2018 18:35:49 GMT', + etag: '0x8D65F9778F109AA', + location: 'https://test3.westcentralus.batch.azure.com/pools/nodesdkinboundendpointpool', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'fd4c1f89-0345-4ea1-859c-8fae1153e10d', + 'request-id': 'ca8e14cf-187d-4642-829c-739a2d5c94ac', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdkinboundendpointpool', - date: 'Tue, 21 Aug 2018 20:16:28 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/pools/nodesdkinboundendpointpool', + date: 'Tue, 11 Dec 2018 18:35:49 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_add_a_pool_with_vnet_and_get_expected_error.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_add_a_pool_with_vnet_and_get_expected_error.nock.js index 880aa2bc92..1bb102dac3 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_add_a_pool_with_vnet_and_get_expected_error.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_add_a_pool_with_vnet_and_get_expected_error.nock.js @@ -1,38 +1,38 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') +nock('http://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/pools?api-version=2018-08-01.7.0', '*') - .reply(403, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element\",\"code\":\"Forbidden\",\"message\":{\r\n \"lang\":\"en-US\",\"value\":\"Access is Forbidden\\nRequestId:6f9e6709-7ff8-490d-9572-add29e5fe3b0\\nTime:2018-08-21T20:16:22.3010945Z\"\r\n },\"values\":[\r\n {\r\n \"key\":\"Reason\",\"value\":\"Property subnetId with value /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1 is not enabled for current account\"\r\n }\r\n ]\r\n}", { 'content-length': '582', +.post('/pools?api-version=2018-12-01.8.0', '*') + .reply(403, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element\",\"code\":\"Forbidden\",\"message\":{\r\n \"lang\":\"en-US\",\"value\":\"Access is Forbidden\\nRequestId:6754efd4-151c-493a-bfa7-707392f575cf\\nTime:2018-12-11T18:35:44.2066794Z\"\r\n },\"values\":[\r\n {\r\n \"key\":\"Reason\",\"value\":\"Property subnetId with value /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1 is not enabled for current account\"\r\n }\r\n ]\r\n}", { 'content-length': '579', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '6f9e6709-7ff8-490d-9572-add29e5fe3b0', + 'request-id': '6754efd4-151c-493a-bfa7-707392f575cf', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:16:21 GMT', + date: 'Tue, 11 Dec 2018 18:35:44 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') +nock('https://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/pools?api-version=2018-08-01.7.0', '*') - .reply(403, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element\",\"code\":\"Forbidden\",\"message\":{\r\n \"lang\":\"en-US\",\"value\":\"Access is Forbidden\\nRequestId:6f9e6709-7ff8-490d-9572-add29e5fe3b0\\nTime:2018-08-21T20:16:22.3010945Z\"\r\n },\"values\":[\r\n {\r\n \"key\":\"Reason\",\"value\":\"Property subnetId with value /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1 is not enabled for current account\"\r\n }\r\n ]\r\n}", { 'content-length': '582', +.post('/pools?api-version=2018-12-01.8.0', '*') + .reply(403, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element\",\"code\":\"Forbidden\",\"message\":{\r\n \"lang\":\"en-US\",\"value\":\"Access is Forbidden\\nRequestId:6754efd4-151c-493a-bfa7-707392f575cf\\nTime:2018-12-11T18:35:44.2066794Z\"\r\n },\"values\":[\r\n {\r\n \"key\":\"Reason\",\"value\":\"Property subnetId with value /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1 is not enabled for current account\"\r\n }\r\n ]\r\n}", { 'content-length': '579', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '6f9e6709-7ff8-490d-9572-add29e5fe3b0', + 'request-id': '6754efd4-151c-493a-bfa7-707392f575cf', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:16:21 GMT', + date: 'Tue, 11 Dec 2018 18:35:44 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_add_a_task_with_an_application_package_reference_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_add_a_task_with_an_application_package_reference_successfully.nock.js index 4c0935ff41..d04fc2c6ee 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_add_a_task_with_an_application_package_reference_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_add_a_task_with_an_application_package_reference_successfully.nock.js @@ -1,76 +1,76 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') +nock('http://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/jobs/HelloWorldJobNodeSDKTest/tasks?api-version=2018-08-01.7.0', '*') +.post('/jobs/HelloWorldJobNodeSDKTest/tasks?api-version=2018-12-01.8.0', '*') .reply(201, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:31:00 GMT', - etag: '0x8D607A5021DEA9B', - location: 'https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/ApplicationPacakgeReferenceTask', + 'last-modified': 'Tue, 11 Dec 2018 18:48:34 GMT', + etag: '0x8D65F994130DD32', + location: 'https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/ApplicationPacakgeReferenceTask', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '999e4662-f9cf-44ef-9944-da6f9560e349', + 'request-id': '1fd4c185-74b7-4fa5-ac7a-17076272d11a', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/ApplicationPacakgeReferenceTask', - date: 'Tue, 21 Aug 2018 20:31:00 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/ApplicationPacakgeReferenceTask', + date: 'Tue, 11 Dec 2018 18:48:34 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') +nock('https://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/jobs/HelloWorldJobNodeSDKTest/tasks?api-version=2018-08-01.7.0', '*') +.post('/jobs/HelloWorldJobNodeSDKTest/tasks?api-version=2018-12-01.8.0', '*') .reply(201, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:31:00 GMT', - etag: '0x8D607A5021DEA9B', - location: 'https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/ApplicationPacakgeReferenceTask', + 'last-modified': 'Tue, 11 Dec 2018 18:48:34 GMT', + etag: '0x8D65F994130DD32', + location: 'https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/ApplicationPacakgeReferenceTask', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '999e4662-f9cf-44ef-9944-da6f9560e349', + 'request-id': '1fd4c185-74b7-4fa5-ac7a-17076272d11a', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/ApplicationPacakgeReferenceTask', - date: 'Tue, 21 Aug 2018 20:31:00 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/ApplicationPacakgeReferenceTask', + date: 'Tue, 11 Dec 2018 18:48:34 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .get('/jobs/HelloWorldJobNodeSDKTest/tasks/ApplicationPacakgeReferenceTask?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#tasks/@Element\",\"id\":\"ApplicationPacakgeReferenceTask\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/ApplicationPacakgeReferenceTask\",\"eTag\":\"0x8D607A5021DEA9B\",\"creationTime\":\"2018-08-21T20:31:00.6017179Z\",\"lastModified\":\"2018-08-21T20:31:00.6017179Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-08-21T20:31:00.6017179Z\",\"commandLine\":\"cmd /c echo hello world\",\"applicationPackageReferences\":[\r\n {\r\n \"applicationId\":\"my_application_id\"\r\n }\r\n ],\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"constraints\":{\r\n \"maxWallClockTime\":\"P10675199DT2H48M5.4775807S\",\"retentionTime\":\"P10675199DT2H48M5.4775807S\",\"maxTaskRetryCount\":3\r\n },\"executionInfo\":{\r\n \"retryCount\":0,\"requeueCount\":0\r\n }\r\n}", { 'transfer-encoding': 'chunked', +nock('http://test3.westcentralus.batch.azure.com:443') + .get('/jobs/HelloWorldJobNodeSDKTest/tasks/ApplicationPacakgeReferenceTask?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#tasks/@Element\",\"id\":\"ApplicationPacakgeReferenceTask\",\"url\":\"https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/ApplicationPacakgeReferenceTask\",\"eTag\":\"0x8D65F994130DD32\",\"creationTime\":\"2018-12-11T18:48:34.7860274Z\",\"lastModified\":\"2018-12-11T18:48:34.7860274Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-12-11T18:48:34.7860274Z\",\"commandLine\":\"cmd /c echo hello world\",\"applicationPackageReferences\":[\r\n {\r\n \"applicationId\":\"my_application_id\"\r\n }\r\n ],\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"constraints\":{\r\n \"maxWallClockTime\":\"P10675199DT2H48M5.4775807S\",\"retentionTime\":\"P7D\",\"maxTaskRetryCount\":3\r\n },\"executionInfo\":{\r\n \"retryCount\":0,\"requeueCount\":0\r\n }\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', - 'last-modified': 'Tue, 21 Aug 2018 20:31:00 GMT', - etag: '0x8D607A5021DEA9B', + 'last-modified': 'Tue, 11 Dec 2018 18:48:34 GMT', + etag: '0x8D65F994130DD32', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '96578e5a-3034-4627-badf-60697ad65cad', + 'request-id': '9dc264e5-d0dd-4bb2-b185-018c0b5e9a26', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:31:00 GMT', + date: 'Tue, 11 Dec 2018 18:48:34 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .get('/jobs/HelloWorldJobNodeSDKTest/tasks/ApplicationPacakgeReferenceTask?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#tasks/@Element\",\"id\":\"ApplicationPacakgeReferenceTask\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/ApplicationPacakgeReferenceTask\",\"eTag\":\"0x8D607A5021DEA9B\",\"creationTime\":\"2018-08-21T20:31:00.6017179Z\",\"lastModified\":\"2018-08-21T20:31:00.6017179Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-08-21T20:31:00.6017179Z\",\"commandLine\":\"cmd /c echo hello world\",\"applicationPackageReferences\":[\r\n {\r\n \"applicationId\":\"my_application_id\"\r\n }\r\n ],\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"constraints\":{\r\n \"maxWallClockTime\":\"P10675199DT2H48M5.4775807S\",\"retentionTime\":\"P10675199DT2H48M5.4775807S\",\"maxTaskRetryCount\":3\r\n },\"executionInfo\":{\r\n \"retryCount\":0,\"requeueCount\":0\r\n }\r\n}", { 'transfer-encoding': 'chunked', +nock('https://test3.westcentralus.batch.azure.com:443') + .get('/jobs/HelloWorldJobNodeSDKTest/tasks/ApplicationPacakgeReferenceTask?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#tasks/@Element\",\"id\":\"ApplicationPacakgeReferenceTask\",\"url\":\"https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/ApplicationPacakgeReferenceTask\",\"eTag\":\"0x8D65F994130DD32\",\"creationTime\":\"2018-12-11T18:48:34.7860274Z\",\"lastModified\":\"2018-12-11T18:48:34.7860274Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-12-11T18:48:34.7860274Z\",\"commandLine\":\"cmd /c echo hello world\",\"applicationPackageReferences\":[\r\n {\r\n \"applicationId\":\"my_application_id\"\r\n }\r\n ],\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"constraints\":{\r\n \"maxWallClockTime\":\"P10675199DT2H48M5.4775807S\",\"retentionTime\":\"P7D\",\"maxTaskRetryCount\":3\r\n },\"executionInfo\":{\r\n \"retryCount\":0,\"requeueCount\":0\r\n }\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', - 'last-modified': 'Tue, 21 Aug 2018 20:31:00 GMT', - etag: '0x8D607A5021DEA9B', + 'last-modified': 'Tue, 11 Dec 2018 18:48:34 GMT', + etag: '0x8D65F994130DD32', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '96578e5a-3034-4627-badf-60697ad65cad', + 'request-id': '9dc264e5-d0dd-4bb2-b185-018c0b5e9a26', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:31:00 GMT', + date: 'Tue, 11 Dec 2018 18:48:34 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_add_a_user_to_a_compute_node_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_add_a_user_to_a_compute_node_successfully.nock.js index 0559f60881..bf26076fdf 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_add_a_user_to_a_compute_node_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_add_a_user_to_a_compute_node_successfully.nock.js @@ -1,40 +1,40 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') +nock('http://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/pools/nodesdktestpool1/nodes/tvm-14141481_1-20180821t200555z/users?api-version=2018-08-01.7.0', '*') +.post('/pools/nodesdktestpool1/nodes/tvmps_13cf4cee9dd1594f9da06399ef98ede3e5a4010f3233627c3837a43dbeff5868_d/users?api-version=2018-12-01.8.0', '*') .reply(201, "", { 'transfer-encoding': 'chunked', - location: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvm-14141481_1-20180821t200555z/users/NodeSDKTestUser', + location: 'https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvmps_13cf4cee9dd1594f9da06399ef98ede3e5a4010f3233627c3837a43dbeff5868_d/users/NodeSDKTestUser', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'fbcb8ab0-34ee-4caf-94e4-8be65b9e3a7d', + 'request-id': 'd3104aac-2e4d-4735-99c4-48e9a8de2d79', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvm-14141481_1-20180821t200555z/users/NodeSDKTestUser', - date: 'Tue, 21 Aug 2018 20:23:10 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvmps_13cf4cee9dd1594f9da06399ef98ede3e5a4010f3233627c3837a43dbeff5868_d/users/NodeSDKTestUser', + date: 'Tue, 11 Dec 2018 18:42:31 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') +nock('https://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/pools/nodesdktestpool1/nodes/tvm-14141481_1-20180821t200555z/users?api-version=2018-08-01.7.0', '*') +.post('/pools/nodesdktestpool1/nodes/tvmps_13cf4cee9dd1594f9da06399ef98ede3e5a4010f3233627c3837a43dbeff5868_d/users?api-version=2018-12-01.8.0', '*') .reply(201, "", { 'transfer-encoding': 'chunked', - location: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvm-14141481_1-20180821t200555z/users/NodeSDKTestUser', + location: 'https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvmps_13cf4cee9dd1594f9da06399ef98ede3e5a4010f3233627c3837a43dbeff5868_d/users/NodeSDKTestUser', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'fbcb8ab0-34ee-4caf-94e4-8be65b9e3a7d', + 'request-id': 'd3104aac-2e4d-4735-99c4-48e9a8de2d79', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvm-14141481_1-20180821t200555z/users/NodeSDKTestUser', - date: 'Tue, 21 Aug 2018 20:23:10 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvmps_13cf4cee9dd1594f9da06399ef98ede3e5a4010f3233627c3837a43dbeff5868_d/users/NodeSDKTestUser', + date: 'Tue, 11 Dec 2018 18:42:31 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_add_new_certificate_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_add_new_certificate_successfully.nock.js index e8afadeb8b..6684a563a8 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_add_new_certificate_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_add_new_certificate_successfully.nock.js @@ -1,40 +1,40 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') +nock('http://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/certificates?api-version=2018-08-01.7.0', '*') +.post('/certificates?api-version=2018-12-01.8.0', '*') .reply(201, "", { 'transfer-encoding': 'chunked', - location: 'https://lchency4.westcentralus.batch.azure.com/certificates(ThumbprintAlgorithm=sha1,Thumbprint=cff2ab63c8c955aaf71989efa641b906558d9fb7)', + location: 'https://test3.westcentralus.batch.azure.com/certificates(ThumbprintAlgorithm=sha1,Thumbprint=cff2ab63c8c955aaf71989efa641b906558d9fb7)', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '0b81a406-bf7f-4fd0-b6d2-79b02e3bea15', + 'request-id': 'c6385cff-c836-4d26-8f95-1cb3f71ca542', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/certificates(ThumbprintAlgorithm=sha1,Thumbprint=cff2ab63c8c955aaf71989efa641b906558d9fb7)', - date: 'Tue, 21 Aug 2018 20:05:03 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/certificates(ThumbprintAlgorithm=sha1,Thumbprint=cff2ab63c8c955aaf71989efa641b906558d9fb7)', + date: 'Tue, 11 Dec 2018 18:27:20 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') +nock('https://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/certificates?api-version=2018-08-01.7.0', '*') +.post('/certificates?api-version=2018-12-01.8.0', '*') .reply(201, "", { 'transfer-encoding': 'chunked', - location: 'https://lchency4.westcentralus.batch.azure.com/certificates(ThumbprintAlgorithm=sha1,Thumbprint=cff2ab63c8c955aaf71989efa641b906558d9fb7)', + location: 'https://test3.westcentralus.batch.azure.com/certificates(ThumbprintAlgorithm=sha1,Thumbprint=cff2ab63c8c955aaf71989efa641b906558d9fb7)', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '0b81a406-bf7f-4fd0-b6d2-79b02e3bea15', + 'request-id': 'c6385cff-c836-4d26-8f95-1cb3f71ca542', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/certificates(ThumbprintAlgorithm=sha1,Thumbprint=cff2ab63c8c955aaf71989efa641b906558d9fb7)', - date: 'Tue, 21 Aug 2018 20:05:03 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/certificates(ThumbprintAlgorithm=sha1,Thumbprint=cff2ab63c8c955aaf71989efa641b906558d9fb7)', + date: 'Tue, 11 Dec 2018 18:27:20 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_check_if_a_job_schedule_exists_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_check_if_a_job_schedule_exists_successfully.nock.js index dd2f769c79..5d45888dc9 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_check_if_a_job_schedule_exists_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_check_if_a_job_schedule_exists_successfully.nock.js @@ -1,38 +1,38 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .head('/jobschedules/NodeSDKTestSchedule?api-version=2018-08-01.7.0') +nock('http://test3.westcentralus.batch.azure.com:443') + .head('/jobschedules/NodeSDKTestSchedule?api-version=2018-12-01.8.0') .reply(200, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:31:03 GMT', - etag: '0x8D607A503E9DDB3', + 'last-modified': 'Tue, 11 Dec 2018 21:04:05 GMT', + etag: '0x8D65FAC2F4D7E17', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '04390025-2fe6-44de-a4f6-2de4912d0575', + 'request-id': '94cca740-16fd-499f-bc6f-915a129c849e', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:31:04 GMT', + date: 'Tue, 11 Dec 2018 21:04:05 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .head('/jobschedules/NodeSDKTestSchedule?api-version=2018-08-01.7.0') +nock('https://test3.westcentralus.batch.azure.com:443') + .head('/jobschedules/NodeSDKTestSchedule?api-version=2018-12-01.8.0') .reply(200, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:31:03 GMT', - etag: '0x8D607A503E9DDB3', + 'last-modified': 'Tue, 11 Dec 2018 21:04:05 GMT', + etag: '0x8D65FAC2F4D7E17', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '04390025-2fe6-44de-a4f6-2de4912d0575', + 'request-id': '94cca740-16fd-499f-bc6f-915a129c849e', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:31:04 GMT', + date: 'Tue, 11 Dec 2018 21:04:05 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_check_that_pool_exists_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_check_that_pool_exists_successfully.nock.js index 48605ba68a..c398c15bc6 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_check_that_pool_exists_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_check_that_pool_exists_successfully.nock.js @@ -1,38 +1,38 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .head('/pools/nodesdktestpool1?api-version=2018-08-01.7.0') +nock('http://test3.westcentralus.batch.azure.com:443') + .head('/pools/nodesdktestpool1?api-version=2018-12-01.8.0') .reply(200, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:25:21 GMT', - etag: '0x8D607A437BD2FE0', + 'last-modified': 'Tue, 11 Dec 2018 18:44:44 GMT', + etag: '0x8D65F98B81717BC', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'f6fc5f3d-6d20-434a-9927-7045eb0c906d', + 'request-id': 'c0330b36-20e2-4aa8-9c6f-0e31eee60126', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:25:22 GMT', + date: 'Tue, 11 Dec 2018 18:44:47 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .head('/pools/nodesdktestpool1?api-version=2018-08-01.7.0') +nock('https://test3.westcentralus.batch.azure.com:443') + .head('/pools/nodesdktestpool1?api-version=2018-12-01.8.0') .reply(200, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:25:21 GMT', - etag: '0x8D607A437BD2FE0', + 'last-modified': 'Tue, 11 Dec 2018 18:44:44 GMT', + etag: '0x8D65F98B81717BC', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'f6fc5f3d-6d20-434a-9927-7045eb0c906d', + 'request-id': 'c0330b36-20e2-4aa8-9c6f-0e31eee60126', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:25:22 GMT', + date: 'Tue, 11 Dec 2018 18:44:47 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_count_tasks_sucessfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_count_tasks_sucessfully.nock.js index 4cadeef872..03768646cf 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_count_tasks_sucessfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_count_tasks_sucessfully.nock.js @@ -1,36 +1,36 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .get('/jobs/HelloWorldJobNodeSDKTest/taskcounts?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#taskcounts/@Element\",\"active\":0,\"running\":0,\"completed\":4,\"succeeded\":3,\"failed\":1\r\n}", { 'transfer-encoding': 'chunked', +nock('http://test3.westcentralus.batch.azure.com:443') + .get('/jobs/HelloWorldJobNodeSDKTest/taskcounts?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#taskcounts/@Element\",\"active\":0,\"running\":0,\"completed\":4,\"succeeded\":3,\"failed\":1\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '0af66760-8534-4760-b64a-03a825aa9c5f', + 'request-id': 'c937f965-551e-4bc1-a2fc-a6856061b465', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:27:23 GMT', + date: 'Tue, 11 Dec 2018 18:46:48 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .get('/jobs/HelloWorldJobNodeSDKTest/taskcounts?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#taskcounts/@Element\",\"active\":0,\"running\":0,\"completed\":4,\"succeeded\":3,\"failed\":1\r\n}", { 'transfer-encoding': 'chunked', +nock('https://test3.westcentralus.batch.azure.com:443') + .get('/jobs/HelloWorldJobNodeSDKTest/taskcounts?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#taskcounts/@Element\",\"active\":0,\"running\":0,\"completed\":4,\"succeeded\":3,\"failed\":1\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '0af66760-8534-4760-b64a-03a825aa9c5f', + 'request-id': 'c937f965-551e-4bc1-a2fc-a6856061b465', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:27:23 GMT', + date: 'Tue, 11 Dec 2018 18:46:48 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_create_a_job_schdule_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_create_a_job_schdule_successfully.nock.js index e0fc8b4f2c..1788f0956f 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_create_a_job_schdule_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_create_a_job_schdule_successfully.nock.js @@ -1,44 +1,44 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') +nock('http://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/jobschedules?api-version=2018-08-01.7.0', '*') +.post('/jobschedules?api-version=2018-12-01.8.0', '*') .reply(201, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:31:03 GMT', - etag: '0x8D607A503E9DDB3', - location: 'https://lchency4.westcentralus.batch.azure.com/jobschedules/NodeSDKTestSchedule', + 'last-modified': 'Tue, 11 Dec 2018 21:04:05 GMT', + etag: '0x8D65FAC2F4D7E17', + location: 'https://test3.westcentralus.batch.azure.com/jobschedules/NodeSDKTestSchedule', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '50d586c2-ace8-438c-8a95-d0c4d27da08c', + 'request-id': '5a1e209e-5a9d-4328-8f6c-395854d964b2', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobschedules/NodeSDKTestSchedule', - date: 'Tue, 21 Aug 2018 20:31:03 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobschedules/NodeSDKTestSchedule', + date: 'Tue, 11 Dec 2018 21:04:05 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') +nock('https://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/jobschedules?api-version=2018-08-01.7.0', '*') +.post('/jobschedules?api-version=2018-12-01.8.0', '*') .reply(201, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:31:03 GMT', - etag: '0x8D607A503E9DDB3', - location: 'https://lchency4.westcentralus.batch.azure.com/jobschedules/NodeSDKTestSchedule', + 'last-modified': 'Tue, 11 Dec 2018 21:04:05 GMT', + etag: '0x8D65FAC2F4D7E17', + location: 'https://test3.westcentralus.batch.azure.com/jobschedules/NodeSDKTestSchedule', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '50d586c2-ace8-438c-8a95-d0c4d27da08c', + 'request-id': '5a1e209e-5a9d-4328-8f6c-395854d964b2', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobschedules/NodeSDKTestSchedule', - date: 'Tue, 21 Aug 2018 20:31:03 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobschedules/NodeSDKTestSchedule', + date: 'Tue, 11 Dec 2018 21:04:05 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_create_a_job_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_create_a_job_successfully.nock.js index 38aba3c651..3bf47a14a9 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_create_a_job_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_create_a_job_successfully.nock.js @@ -1,44 +1,44 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') +nock('http://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/jobs?api-version=2018-08-01.7.0', '*') +.post('/jobs?api-version=2018-12-01.8.0', '*') .reply(201, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:25:23 GMT', - etag: '0x8D607A43940B4CA', - location: 'https://lchency4.westcentralus.batch.azure.com/jobs/job-1', + 'last-modified': 'Tue, 11 Dec 2018 18:44:48 GMT', + etag: '0x8D65F98BA6B5D6F', + location: 'https://test3.westcentralus.batch.azure.com/jobs/job-1', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '7ae4eb31-4043-4d75-9b70-0af18ce2f990', + 'request-id': '0dbc31d9-4154-4552-a6e7-2a74832b078f', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobs/job-1', - date: 'Tue, 21 Aug 2018 20:25:23 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobs/job-1', + date: 'Tue, 11 Dec 2018 18:44:48 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') +nock('https://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/jobs?api-version=2018-08-01.7.0', '*') +.post('/jobs?api-version=2018-12-01.8.0', '*') .reply(201, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:25:23 GMT', - etag: '0x8D607A43940B4CA', - location: 'https://lchency4.westcentralus.batch.azure.com/jobs/job-1', + 'last-modified': 'Tue, 11 Dec 2018 18:44:48 GMT', + etag: '0x8D65F98BA6B5D6F', + location: 'https://test3.westcentralus.batch.azure.com/jobs/job-1', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '7ae4eb31-4043-4d75-9b70-0af18ce2f990', + 'request-id': '0dbc31d9-4154-4552-a6e7-2a74832b078f', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobs/job-1', - date: 'Tue, 21 Aug 2018 20:25:23 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobs/job-1', + date: 'Tue, 11 Dec 2018 18:44:48 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_create_a_new_pool_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_create_a_new_pool_successfully.nock.js index af3f5ad670..608e5859da 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_create_a_new_pool_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_create_a_new_pool_successfully.nock.js @@ -1,44 +1,44 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') +nock('http://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/pools?api-version=2018-08-01.7.0', '*') +.post('/pools?api-version=2018-12-01.8.0', '*') .reply(201, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:05:04 GMT', - etag: '0x8D607A1628D0655', - location: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1', + 'last-modified': 'Tue, 11 Dec 2018 18:27:21 GMT', + etag: '0x8D65F964A038F60', + location: 'https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '32251087-3df7-4803-8a01-dcab5967bc2d', + 'request-id': '0390abe2-2925-481a-b8ce-f0f3f1e3ee3b', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1', - date: 'Tue, 21 Aug 2018 20:05:03 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1', + date: 'Tue, 11 Dec 2018 18:27:21 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') +nock('https://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/pools?api-version=2018-08-01.7.0', '*') +.post('/pools?api-version=2018-12-01.8.0', '*') .reply(201, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:05:04 GMT', - etag: '0x8D607A1628D0655', - location: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1', + 'last-modified': 'Tue, 11 Dec 2018 18:27:21 GMT', + etag: '0x8D65F964A038F60', + location: 'https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '32251087-3df7-4803-8a01-dcab5967bc2d', + 'request-id': '0390abe2-2925-481a-b8ce-f0f3f1e3ee3b', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1', - date: 'Tue, 21 Aug 2018 20:05:03 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1', + date: 'Tue, 11 Dec 2018 18:27:21 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_create_a_pool_with_application_licenses_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_create_a_pool_with_application_licenses_successfully.nock.js index 15033655cc..c44d66a6b7 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_create_a_pool_with_application_licenses_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_create_a_pool_with_application_licenses_successfully.nock.js @@ -1,126 +1,70 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') +nock('http://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/pools?api-version=2018-08-01.7.0', '*') +.post('/pools?api-version=2018-12-01.8.0', '*') .reply(201, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:06:44 GMT', - etag: '0x8D607A19E6D47A0', - location: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool_licenses', + 'last-modified': 'Tue, 11 Dec 2018 18:29:01 GMT', + etag: '0x8D65F968601F028', + location: 'https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool_licenses', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '8087a61e-23db-4262-860d-e075c3348c35', + 'request-id': '70802976-d774-4410-b514-ec24c928d132', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool_licenses', - date: 'Tue, 21 Aug 2018 20:06:44 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool_licenses', + date: 'Tue, 11 Dec 2018 18:29:01 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') +nock('https://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/pools?api-version=2018-08-01.7.0', '*') +.post('/pools?api-version=2018-12-01.8.0', '*') .reply(201, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:06:44 GMT', - etag: '0x8D607A19E6D47A0', - location: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool_licenses', + 'last-modified': 'Tue, 11 Dec 2018 18:29:01 GMT', + etag: '0x8D65F968601F028', + location: 'https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool_licenses', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '8087a61e-23db-4262-860d-e075c3348c35', + 'request-id': '70802976-d774-4410-b514-ec24c928d132', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool_licenses', - date: 'Tue, 21 Aug 2018 20:06:44 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool_licenses', + date: 'Tue, 11 Dec 2018 18:29:01 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .delete('/pools/nodesdktestpool_licenses?api-version=2018-08-01.7.0') - .reply(500, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element\",\"code\":\"OperationTimedOut\",\"message\":{\r\n \"lang\":\"en-US\",\"value\":\"Operation could not be completed within the specified time.\\nRequestId:d3fd4578-4696-4ae8-9de2-8cb8d6eaf23c\\nTime:2018-08-21T20:07:11.6718362Z\"\r\n }\r\n}", { 'content-length': '366', - 'content-type': 'application/json;odata=minimalmetadata', - server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'd3fd4578-4696-4ae8-9de2-8cb8d6eaf23c', - 'strict-transport-security': 'max-age=31536000; includeSubDomains', - 'x-content-type-options': 'nosniff', - dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:07:11 GMT', - connection: 'close' }); - return result; }, -function (nock) { -var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .delete('/pools/nodesdktestpool_licenses?api-version=2018-08-01.7.0') - .reply(500, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element\",\"code\":\"OperationTimedOut\",\"message\":{\r\n \"lang\":\"en-US\",\"value\":\"Operation could not be completed within the specified time.\\nRequestId:d3fd4578-4696-4ae8-9de2-8cb8d6eaf23c\\nTime:2018-08-21T20:07:11.6718362Z\"\r\n }\r\n}", { 'content-length': '366', - 'content-type': 'application/json;odata=minimalmetadata', - server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'd3fd4578-4696-4ae8-9de2-8cb8d6eaf23c', - 'strict-transport-security': 'max-age=31536000; includeSubDomains', - 'x-content-type-options': 'nosniff', - dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:07:11 GMT', - connection: 'close' }); - return result; }, -function (nock) { -var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .delete('/pools/nodesdktestpool_licenses?api-version=2018-08-01.7.0') - .reply(500, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element\",\"code\":\"OperationTimedOut\",\"message\":{\r\n \"lang\":\"en-US\",\"value\":\"Operation could not be completed within the specified time.\\nRequestId:130afc43-b7cf-4039-8985-b9f697033107\\nTime:2018-08-21T20:08:10.3146589Z\"\r\n }\r\n}", { 'content-length': '366', - 'content-type': 'application/json;odata=minimalmetadata', - server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '130afc43-b7cf-4039-8985-b9f697033107', - 'strict-transport-security': 'max-age=31536000; includeSubDomains', - 'x-content-type-options': 'nosniff', - dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:08:10 GMT', - connection: 'close' }); - return result; }, -function (nock) { -var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .delete('/pools/nodesdktestpool_licenses?api-version=2018-08-01.7.0') - .reply(500, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element\",\"code\":\"OperationTimedOut\",\"message\":{\r\n \"lang\":\"en-US\",\"value\":\"Operation could not be completed within the specified time.\\nRequestId:130afc43-b7cf-4039-8985-b9f697033107\\nTime:2018-08-21T20:08:10.3146589Z\"\r\n }\r\n}", { 'content-length': '366', - 'content-type': 'application/json;odata=minimalmetadata', - server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '130afc43-b7cf-4039-8985-b9f697033107', - 'strict-transport-security': 'max-age=31536000; includeSubDomains', - 'x-content-type-options': 'nosniff', - dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:08:10 GMT', - connection: 'close' }); - return result; }, -function (nock) { -var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .delete('/pools/nodesdktestpool_licenses?api-version=2018-08-01.7.0') +nock('http://test3.westcentralus.batch.azure.com:443') + .delete('/pools/nodesdktestpool_licenses?api-version=2018-12-01.8.0') .reply(202, "", { 'transfer-encoding': 'chunked', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'efb1b63e-0afe-4fc5-b453-2b914d4b21d6', + 'request-id': '074a1b53-3a3c-4009-b149-499e944e90b1', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:09:40 GMT', + date: 'Tue, 11 Dec 2018 18:29:02 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .delete('/pools/nodesdktestpool_licenses?api-version=2018-08-01.7.0') +nock('https://test3.westcentralus.batch.azure.com:443') + .delete('/pools/nodesdktestpool_licenses?api-version=2018-12-01.8.0') .reply(202, "", { 'transfer-encoding': 'chunked', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'efb1b63e-0afe-4fc5-b453-2b914d4b21d6', + 'request-id': '074a1b53-3a3c-4009-b149-499e944e90b1', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:09:40 GMT', + date: 'Tue, 11 Dec 2018 18:29:02 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_create_a_second_pool_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_create_a_second_pool_successfully.nock.js index aff348c131..1c225dd9fd 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_create_a_second_pool_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_create_a_second_pool_successfully.nock.js @@ -1,44 +1,44 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') +nock('http://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/pools?api-version=2018-08-01.7.0', '*') +.post('/pools?api-version=2018-12-01.8.0', '*') .reply(201, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:25:21 GMT', - etag: '0x8D607A437D63893', - location: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool2', + 'last-modified': 'Tue, 11 Dec 2018 18:44:45 GMT', + etag: '0x8D65F98B8A68220', + location: 'https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool2', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '8886d2df-71fe-4c78-a5b8-2200ef938896', + 'request-id': 'f7bc543d-2356-4c75-93a2-3e041d602eed', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool2', - date: 'Tue, 21 Aug 2018 20:25:21 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool2', + date: 'Tue, 11 Dec 2018 18:44:45 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') +nock('https://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/pools?api-version=2018-08-01.7.0', '*') +.post('/pools?api-version=2018-12-01.8.0', '*') .reply(201, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:25:21 GMT', - etag: '0x8D607A437D63893', - location: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool2', + 'last-modified': 'Tue, 11 Dec 2018 18:44:45 GMT', + etag: '0x8D65F98B8A68220', + location: 'https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool2', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '8886d2df-71fe-4c78-a5b8-2200ef938896', + 'request-id': 'f7bc543d-2356-4c75-93a2-3e041d602eed', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool2', - date: 'Tue, 21 Aug 2018 20:25:21 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool2', + date: 'Tue, 11 Dec 2018 18:44:45 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_create_a_second_task_with_output_files_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_create_a_second_task_with_output_files_successfully.nock.js index f9ff3ff3ab..7f825bdace 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_create_a_second_task_with_output_files_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_create_a_second_task_with_output_files_successfully.nock.js @@ -1,44 +1,44 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') +nock('http://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/jobs/HelloWorldJobNodeSDKTest/tasks?api-version=2018-08-01.7.0', '*') +.post('/jobs/HelloWorldJobNodeSDKTest/tasks?api-version=2018-12-01.8.0', '*') .reply(201, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:25:25 GMT', - etag: '0x8D607A43A9B7793', - location: 'https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2', + 'last-modified': 'Tue, 11 Dec 2018 18:44:51 GMT', + etag: '0x8D65F98BC1940CF', + location: 'https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '902900e1-9808-427b-9e7c-d14c7cd254c4', + 'request-id': '5ca1cf23-f047-49c6-86a0-b1ed539bd7bd', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2', - date: 'Tue, 21 Aug 2018 20:25:25 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2', + date: 'Tue, 11 Dec 2018 18:44:51 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') +nock('https://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/jobs/HelloWorldJobNodeSDKTest/tasks?api-version=2018-08-01.7.0', '*') +.post('/jobs/HelloWorldJobNodeSDKTest/tasks?api-version=2018-12-01.8.0', '*') .reply(201, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:25:25 GMT', - etag: '0x8D607A43A9B7793', - location: 'https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2', + 'last-modified': 'Tue, 11 Dec 2018 18:44:51 GMT', + etag: '0x8D65F98BC1940CF', + location: 'https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '902900e1-9808-427b-9e7c-d14c7cd254c4', + 'request-id': '5ca1cf23-f047-49c6-86a0-b1ed539bd7bd', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2', - date: 'Tue, 21 Aug 2018 20:25:25 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2', + date: 'Tue, 11 Dec 2018 18:44:51 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_create_a_task_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_create_a_task_successfully.nock.js index 4ce1ce9686..dfca8db363 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_create_a_task_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_create_a_task_successfully.nock.js @@ -1,44 +1,44 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') +nock('http://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/jobs/HelloWorldJobNodeSDKTest/tasks?api-version=2018-08-01.7.0', '*') +.post('/jobs/HelloWorldJobNodeSDKTest/tasks?api-version=2018-12-01.8.0', '*') .reply(201, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:25:24 GMT', - etag: '0x8D607A43984F282', - location: 'https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask', + 'last-modified': 'Tue, 11 Dec 2018 18:44:49 GMT', + etag: '0x8D65F98BABE5E84', + location: 'https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'b1ba862b-3984-481b-bc32-773401937f59', + 'request-id': '988a17f3-a9fc-4274-bdf9-d1494520af0b', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask', - date: 'Tue, 21 Aug 2018 20:25:24 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask', + date: 'Tue, 11 Dec 2018 18:44:49 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') +nock('https://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/jobs/HelloWorldJobNodeSDKTest/tasks?api-version=2018-08-01.7.0', '*') +.post('/jobs/HelloWorldJobNodeSDKTest/tasks?api-version=2018-12-01.8.0', '*') .reply(201, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:25:24 GMT', - etag: '0x8D607A43984F282', - location: 'https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask', + 'last-modified': 'Tue, 11 Dec 2018 18:44:49 GMT', + etag: '0x8D65F98BABE5E84', + location: 'https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'b1ba862b-3984-481b-bc32-773401937f59', + 'request-id': '988a17f3-a9fc-4274-bdf9-d1494520af0b', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask', - date: 'Tue, 21 Aug 2018 20:25:24 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask', + date: 'Tue, 11 Dec 2018 18:44:49 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_create_a_task_with_a_user_identity_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_create_a_task_with_a_user_identity_successfully.nock.js index 0b0d8e58f9..1423f83325 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_create_a_task_with_a_user_identity_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_create_a_task_with_a_user_identity_successfully.nock.js @@ -1,76 +1,76 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') +nock('http://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/jobs/HelloWorldJobNodeSDKTest/tasks?api-version=2018-08-01.7.0', '*') +.post('/jobs/HelloWorldJobNodeSDKTest/tasks?api-version=2018-12-01.8.0', '*') .reply(201, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:27:07 GMT', - etag: '0x8D607A477151458', - location: 'https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/TaskWithUserIdentity', + 'last-modified': 'Tue, 11 Dec 2018 18:46:33 GMT', + etag: '0x8D65F98F8B53EB6', + location: 'https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/TaskWithUserIdentity', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'd58be13c-7af6-4948-acc7-4003b0349307', + 'request-id': '790d6772-ec58-4f71-af3c-b0ff7bb1d1f2', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/TaskWithUserIdentity', - date: 'Tue, 21 Aug 2018 20:27:07 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/TaskWithUserIdentity', + date: 'Tue, 11 Dec 2018 18:46:33 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') +nock('https://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/jobs/HelloWorldJobNodeSDKTest/tasks?api-version=2018-08-01.7.0', '*') +.post('/jobs/HelloWorldJobNodeSDKTest/tasks?api-version=2018-12-01.8.0', '*') .reply(201, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:27:07 GMT', - etag: '0x8D607A477151458', - location: 'https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/TaskWithUserIdentity', + 'last-modified': 'Tue, 11 Dec 2018 18:46:33 GMT', + etag: '0x8D65F98F8B53EB6', + location: 'https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/TaskWithUserIdentity', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'd58be13c-7af6-4948-acc7-4003b0349307', + 'request-id': '790d6772-ec58-4f71-af3c-b0ff7bb1d1f2', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/TaskWithUserIdentity', - date: 'Tue, 21 Aug 2018 20:27:07 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/TaskWithUserIdentity', + date: 'Tue, 11 Dec 2018 18:46:33 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .get('/jobs/HelloWorldJobNodeSDKTest/tasks/TaskWithUserIdentity?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#tasks/@Element\",\"id\":\"TaskWithUserIdentity\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/TaskWithUserIdentity\",\"eTag\":\"0x8D607A477151458\",\"creationTime\":\"2018-08-21T20:27:07.3405016Z\",\"lastModified\":\"2018-08-21T20:27:07.3405016Z\",\"state\":\"completed\",\"stateTransitionTime\":\"2018-08-21T20:27:18.5296295Z\",\"previousState\":\"running\",\"previousStateTransitionTime\":\"2018-08-21T20:27:18.4686303Z\",\"commandLine\":\"cmd /c net session >nul 2>&1\",\"userIdentity\":{\r\n \"username\":\"nonAdminUser\"\r\n },\"constraints\":{\r\n \"maxWallClockTime\":\"P10675199DT2H48M5.4775807S\",\"retentionTime\":\"P10675199DT2H48M5.4775807S\",\"maxTaskRetryCount\":3\r\n },\"executionInfo\":{\r\n \"startTime\":\"2018-08-21T20:27:18.4686303Z\",\"endTime\":\"2018-08-21T20:27:18.5296295Z\",\"exitCode\":2,\"failureInfo\":{\r\n \"category\":\"UserError\",\"code\":\"FailureExitCode\",\"message\":\"The task exited with an exit code representing a failure\",\"details\":[\r\n {\r\n \"name\":\"Message\",\"value\":\"The task exited with an exit code representing a failure\"\r\n }\r\n ]\r\n },\"result\":\"Failure\",\"retryCount\":3,\"lastRetryTime\":\"2018-08-21T20:27:16.7229929Z\",\"requeueCount\":0\r\n },\"nodeInfo\":{\r\n \"affinityId\":\"TVM:tvm-14141481_3-20180821t200555z\",\"nodeUrl\":\"https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvm-14141481_3-20180821t200555z\",\"poolId\":\"nodesdktestpool1\",\"nodeId\":\"tvm-14141481_3-20180821t200555z\",\"taskRootDirectory\":\"workitems\\\\helloworldjobnodesdktest\\\\job-1\\\\taskwithuseridentity\",\"taskRootDirectoryUrl\":\"https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvm-14141481_3-20180821t200555z/files/workitems/helloworldjobnodesdktest/job-1/taskwithuseridentity\"\r\n }\r\n}", { 'transfer-encoding': 'chunked', +nock('http://test3.westcentralus.batch.azure.com:443') + .get('/jobs/HelloWorldJobNodeSDKTest/tasks/TaskWithUserIdentity?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#tasks/@Element\",\"id\":\"TaskWithUserIdentity\",\"url\":\"https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/TaskWithUserIdentity\",\"eTag\":\"0x8D65F98F8B53EB6\",\"creationTime\":\"2018-12-11T18:46:33.1799222Z\",\"lastModified\":\"2018-12-11T18:46:33.1799222Z\",\"state\":\"completed\",\"stateTransitionTime\":\"2018-12-11T18:46:38.769842Z\",\"previousState\":\"running\",\"previousStateTransitionTime\":\"2018-12-11T18:46:37.733419Z\",\"commandLine\":\"cmd /c net session >nul 2>&1\",\"userIdentity\":{\r\n \"username\":\"nonAdminUser\"\r\n },\"constraints\":{\r\n \"maxWallClockTime\":\"P10675199DT2H48M5.4775807S\",\"retentionTime\":\"P7D\",\"maxTaskRetryCount\":3\r\n },\"executionInfo\":{\r\n \"startTime\":\"2018-12-11T18:46:38.534064Z\",\"endTime\":\"2018-12-11T18:46:38.769842Z\",\"exitCode\":2,\"failureInfo\":{\r\n \"category\":\"UserError\",\"code\":\"FailureExitCode\",\"message\":\"The task exited with an exit code representing a failure\",\"details\":[\r\n {\r\n \"name\":\"Message\",\"value\":\"The task exited with an exit code representing a failure\"\r\n }\r\n ]\r\n },\"result\":\"failure\",\"retryCount\":3,\"lastRetryTime\":\"2018-12-11T18:46:38.534064Z\",\"requeueCount\":0\r\n },\"nodeInfo\":{\r\n \"affinityId\":\"TVM:tvmps_bc8f91eb73db7fd10d852ff323ee06ef51abb84fc93e7dae4e18fa0b0b95b030_d\",\"nodeUrl\":\"https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvmps_bc8f91eb73db7fd10d852ff323ee06ef51abb84fc93e7dae4e18fa0b0b95b030_d\",\"poolId\":\"nodesdktestpool1\",\"nodeId\":\"tvmps_bc8f91eb73db7fd10d852ff323ee06ef51abb84fc93e7dae4e18fa0b0b95b030_d\",\"taskRootDirectory\":\"workitems\\\\HelloWorldJobNodeSDKTest\\\\job-1\\\\TaskWithUserIdentity\",\"taskRootDirectoryUrl\":\"https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvmps_bc8f91eb73db7fd10d852ff323ee06ef51abb84fc93e7dae4e18fa0b0b95b030_d/files/workitems/HelloWorldJobNodeSDKTest/job-1/TaskWithUserIdentity\"\r\n }\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', - 'last-modified': 'Tue, 21 Aug 2018 20:27:07 GMT', - etag: '0x8D607A477151458', + 'last-modified': 'Tue, 11 Dec 2018 18:46:33 GMT', + etag: '0x8D65F98F8B53EB6', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '6b3ca097-cb5d-4045-bff7-12a3ef657f30', + 'request-id': '181cc80d-68df-471c-91ff-904f7a4a6e64', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:27:21 GMT', + date: 'Tue, 11 Dec 2018 18:46:48 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .get('/jobs/HelloWorldJobNodeSDKTest/tasks/TaskWithUserIdentity?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#tasks/@Element\",\"id\":\"TaskWithUserIdentity\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/TaskWithUserIdentity\",\"eTag\":\"0x8D607A477151458\",\"creationTime\":\"2018-08-21T20:27:07.3405016Z\",\"lastModified\":\"2018-08-21T20:27:07.3405016Z\",\"state\":\"completed\",\"stateTransitionTime\":\"2018-08-21T20:27:18.5296295Z\",\"previousState\":\"running\",\"previousStateTransitionTime\":\"2018-08-21T20:27:18.4686303Z\",\"commandLine\":\"cmd /c net session >nul 2>&1\",\"userIdentity\":{\r\n \"username\":\"nonAdminUser\"\r\n },\"constraints\":{\r\n \"maxWallClockTime\":\"P10675199DT2H48M5.4775807S\",\"retentionTime\":\"P10675199DT2H48M5.4775807S\",\"maxTaskRetryCount\":3\r\n },\"executionInfo\":{\r\n \"startTime\":\"2018-08-21T20:27:18.4686303Z\",\"endTime\":\"2018-08-21T20:27:18.5296295Z\",\"exitCode\":2,\"failureInfo\":{\r\n \"category\":\"UserError\",\"code\":\"FailureExitCode\",\"message\":\"The task exited with an exit code representing a failure\",\"details\":[\r\n {\r\n \"name\":\"Message\",\"value\":\"The task exited with an exit code representing a failure\"\r\n }\r\n ]\r\n },\"result\":\"Failure\",\"retryCount\":3,\"lastRetryTime\":\"2018-08-21T20:27:16.7229929Z\",\"requeueCount\":0\r\n },\"nodeInfo\":{\r\n \"affinityId\":\"TVM:tvm-14141481_3-20180821t200555z\",\"nodeUrl\":\"https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvm-14141481_3-20180821t200555z\",\"poolId\":\"nodesdktestpool1\",\"nodeId\":\"tvm-14141481_3-20180821t200555z\",\"taskRootDirectory\":\"workitems\\\\helloworldjobnodesdktest\\\\job-1\\\\taskwithuseridentity\",\"taskRootDirectoryUrl\":\"https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvm-14141481_3-20180821t200555z/files/workitems/helloworldjobnodesdktest/job-1/taskwithuseridentity\"\r\n }\r\n}", { 'transfer-encoding': 'chunked', +nock('https://test3.westcentralus.batch.azure.com:443') + .get('/jobs/HelloWorldJobNodeSDKTest/tasks/TaskWithUserIdentity?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#tasks/@Element\",\"id\":\"TaskWithUserIdentity\",\"url\":\"https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/TaskWithUserIdentity\",\"eTag\":\"0x8D65F98F8B53EB6\",\"creationTime\":\"2018-12-11T18:46:33.1799222Z\",\"lastModified\":\"2018-12-11T18:46:33.1799222Z\",\"state\":\"completed\",\"stateTransitionTime\":\"2018-12-11T18:46:38.769842Z\",\"previousState\":\"running\",\"previousStateTransitionTime\":\"2018-12-11T18:46:37.733419Z\",\"commandLine\":\"cmd /c net session >nul 2>&1\",\"userIdentity\":{\r\n \"username\":\"nonAdminUser\"\r\n },\"constraints\":{\r\n \"maxWallClockTime\":\"P10675199DT2H48M5.4775807S\",\"retentionTime\":\"P7D\",\"maxTaskRetryCount\":3\r\n },\"executionInfo\":{\r\n \"startTime\":\"2018-12-11T18:46:38.534064Z\",\"endTime\":\"2018-12-11T18:46:38.769842Z\",\"exitCode\":2,\"failureInfo\":{\r\n \"category\":\"UserError\",\"code\":\"FailureExitCode\",\"message\":\"The task exited with an exit code representing a failure\",\"details\":[\r\n {\r\n \"name\":\"Message\",\"value\":\"The task exited with an exit code representing a failure\"\r\n }\r\n ]\r\n },\"result\":\"failure\",\"retryCount\":3,\"lastRetryTime\":\"2018-12-11T18:46:38.534064Z\",\"requeueCount\":0\r\n },\"nodeInfo\":{\r\n \"affinityId\":\"TVM:tvmps_bc8f91eb73db7fd10d852ff323ee06ef51abb84fc93e7dae4e18fa0b0b95b030_d\",\"nodeUrl\":\"https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvmps_bc8f91eb73db7fd10d852ff323ee06ef51abb84fc93e7dae4e18fa0b0b95b030_d\",\"poolId\":\"nodesdktestpool1\",\"nodeId\":\"tvmps_bc8f91eb73db7fd10d852ff323ee06ef51abb84fc93e7dae4e18fa0b0b95b030_d\",\"taskRootDirectory\":\"workitems\\\\HelloWorldJobNodeSDKTest\\\\job-1\\\\TaskWithUserIdentity\",\"taskRootDirectoryUrl\":\"https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvmps_bc8f91eb73db7fd10d852ff323ee06ef51abb84fc93e7dae4e18fa0b0b95b030_d/files/workitems/HelloWorldJobNodeSDKTest/job-1/TaskWithUserIdentity\"\r\n }\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', - 'last-modified': 'Tue, 21 Aug 2018 20:27:07 GMT', - etag: '0x8D607A477151458', + 'last-modified': 'Tue, 11 Dec 2018 18:46:33 GMT', + etag: '0x8D65F98F8B53EB6', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '6b3ca097-cb5d-4045-bff7-12a3ef657f30', + 'request-id': '181cc80d-68df-471c-91ff-904f7a4a6e64', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:27:21 GMT', + date: 'Tue, 11 Dec 2018 18:46:48 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_create_a_task_with_authentication_token_settings_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_create_a_task_with_authentication_token_settings_successfully.nock.js index 16f74a712e..55cf4575f4 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_create_a_task_with_authentication_token_settings_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_create_a_task_with_authentication_token_settings_successfully.nock.js @@ -1,76 +1,76 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') +nock('http://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/jobs/HelloWorldJobNodeSDKTest/tasks?api-version=2018-08-01.7.0', '*') +.post('/jobs/HelloWorldJobNodeSDKTest/tasks?api-version=2018-12-01.8.0', '*') .reply(201, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:27:06 GMT', - etag: '0x8D607A476DDB5B0', - location: 'https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/TaskWithAuthTokenSettings', + 'last-modified': 'Tue, 11 Dec 2018 18:46:32 GMT', + etag: '0x8D65F98F8749CB1', + location: 'https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/TaskWithAuthTokenSettings', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'c1bb3115-1da7-48e7-99c0-23d10e9f51ac', + 'request-id': '6be8cecd-0b5f-4367-8330-f3d85a26a651', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/TaskWithAuthTokenSettings', - date: 'Tue, 21 Aug 2018 20:27:07 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/TaskWithAuthTokenSettings', + date: 'Tue, 11 Dec 2018 18:46:32 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') +nock('https://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/jobs/HelloWorldJobNodeSDKTest/tasks?api-version=2018-08-01.7.0', '*') +.post('/jobs/HelloWorldJobNodeSDKTest/tasks?api-version=2018-12-01.8.0', '*') .reply(201, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:27:06 GMT', - etag: '0x8D607A476DDB5B0', - location: 'https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/TaskWithAuthTokenSettings', + 'last-modified': 'Tue, 11 Dec 2018 18:46:32 GMT', + etag: '0x8D65F98F8749CB1', + location: 'https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/TaskWithAuthTokenSettings', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'c1bb3115-1da7-48e7-99c0-23d10e9f51ac', + 'request-id': '6be8cecd-0b5f-4367-8330-f3d85a26a651', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/TaskWithAuthTokenSettings', - date: 'Tue, 21 Aug 2018 20:27:07 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/TaskWithAuthTokenSettings', + date: 'Tue, 11 Dec 2018 18:46:32 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .get('/jobs/HelloWorldJobNodeSDKTest/tasks/TaskWithAuthTokenSettings?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#tasks/@Element\",\"id\":\"TaskWithAuthTokenSettings\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/TaskWithAuthTokenSettings\",\"eTag\":\"0x8D607A476DDB5B0\",\"creationTime\":\"2018-08-21T20:27:06.9776304Z\",\"lastModified\":\"2018-08-21T20:27:06.9776304Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-08-21T20:27:06.9776304Z\",\"commandLine\":\"cmd /c echo Hello World\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"authenticationTokenSettings\":{\r\n \"access\":[\r\n \"job\"\r\n ]\r\n },\"constraints\":{\r\n \"maxWallClockTime\":\"P10675199DT2H48M5.4775807S\",\"retentionTime\":\"P10675199DT2H48M5.4775807S\",\"maxTaskRetryCount\":3\r\n },\"executionInfo\":{\r\n \"retryCount\":0,\"requeueCount\":0\r\n }\r\n}", { 'transfer-encoding': 'chunked', +nock('http://test3.westcentralus.batch.azure.com:443') + .get('/jobs/HelloWorldJobNodeSDKTest/tasks/TaskWithAuthTokenSettings?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#tasks/@Element\",\"id\":\"TaskWithAuthTokenSettings\",\"url\":\"https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/TaskWithAuthTokenSettings\",\"eTag\":\"0x8D65F98F8749CB1\",\"creationTime\":\"2018-12-11T18:46:32.7563441Z\",\"lastModified\":\"2018-12-11T18:46:32.7563441Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-12-11T18:46:32.7563441Z\",\"commandLine\":\"cmd /c echo Hello World\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"authenticationTokenSettings\":{\r\n \"access\":[\r\n \"job\"\r\n ]\r\n },\"constraints\":{\r\n \"maxWallClockTime\":\"P10675199DT2H48M5.4775807S\",\"retentionTime\":\"P7D\",\"maxTaskRetryCount\":3\r\n },\"executionInfo\":{\r\n \"retryCount\":0,\"requeueCount\":0\r\n }\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', - 'last-modified': 'Tue, 21 Aug 2018 20:27:06 GMT', - etag: '0x8D607A476DDB5B0', + 'last-modified': 'Tue, 11 Dec 2018 18:46:32 GMT', + etag: '0x8D65F98F8749CB1', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'f15e1fea-ce4e-432b-b85c-55cf1ca2d5e8', + 'request-id': 'b059884b-ecc0-4ab4-8c99-0d89590f8029', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:27:07 GMT', + date: 'Tue, 11 Dec 2018 18:46:32 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .get('/jobs/HelloWorldJobNodeSDKTest/tasks/TaskWithAuthTokenSettings?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#tasks/@Element\",\"id\":\"TaskWithAuthTokenSettings\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/TaskWithAuthTokenSettings\",\"eTag\":\"0x8D607A476DDB5B0\",\"creationTime\":\"2018-08-21T20:27:06.9776304Z\",\"lastModified\":\"2018-08-21T20:27:06.9776304Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-08-21T20:27:06.9776304Z\",\"commandLine\":\"cmd /c echo Hello World\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"authenticationTokenSettings\":{\r\n \"access\":[\r\n \"job\"\r\n ]\r\n },\"constraints\":{\r\n \"maxWallClockTime\":\"P10675199DT2H48M5.4775807S\",\"retentionTime\":\"P10675199DT2H48M5.4775807S\",\"maxTaskRetryCount\":3\r\n },\"executionInfo\":{\r\n \"retryCount\":0,\"requeueCount\":0\r\n }\r\n}", { 'transfer-encoding': 'chunked', +nock('https://test3.westcentralus.batch.azure.com:443') + .get('/jobs/HelloWorldJobNodeSDKTest/tasks/TaskWithAuthTokenSettings?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#tasks/@Element\",\"id\":\"TaskWithAuthTokenSettings\",\"url\":\"https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/TaskWithAuthTokenSettings\",\"eTag\":\"0x8D65F98F8749CB1\",\"creationTime\":\"2018-12-11T18:46:32.7563441Z\",\"lastModified\":\"2018-12-11T18:46:32.7563441Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-12-11T18:46:32.7563441Z\",\"commandLine\":\"cmd /c echo Hello World\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"authenticationTokenSettings\":{\r\n \"access\":[\r\n \"job\"\r\n ]\r\n },\"constraints\":{\r\n \"maxWallClockTime\":\"P10675199DT2H48M5.4775807S\",\"retentionTime\":\"P7D\",\"maxTaskRetryCount\":3\r\n },\"executionInfo\":{\r\n \"retryCount\":0,\"requeueCount\":0\r\n }\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', - 'last-modified': 'Tue, 21 Aug 2018 20:27:06 GMT', - etag: '0x8D607A476DDB5B0', + 'last-modified': 'Tue, 11 Dec 2018 18:46:32 GMT', + etag: '0x8D65F98F8749CB1', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'f15e1fea-ce4e-432b-b85c-55cf1ca2d5e8', + 'request-id': 'b059884b-ecc0-4ab4-8c99-0d89590f8029', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:27:07 GMT', + date: 'Tue, 11 Dec 2018 18:46:32 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_create_a_task_with_container_settings_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_create_a_task_with_container_settings_successfully.nock.js index 06c3a7fd20..61080f2b83 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_create_a_task_with_container_settings_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_create_a_task_with_container_settings_successfully.nock.js @@ -1,106 +1,106 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') +nock('http://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/jobs?api-version=2018-08-01.7.0', '*') +.post('/jobs?api-version=2018-12-01.8.0', '*') .reply(201, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:25:24 GMT', - etag: '0x8D607A439A76693', - location: 'https://lchency4.westcentralus.batch.azure.com/jobs/job-1', + 'last-modified': 'Tue, 11 Dec 2018 18:44:49 GMT', + etag: '0x8D65F98BAE83F5F', + location: 'https://test3.westcentralus.batch.azure.com/jobs/job-1', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '8c1629a1-6b0a-41a8-b07a-908a6cb46b51', + 'request-id': 'de3f7dbd-8e11-4df0-b2b6-5062763a2e39', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobs/job-1', - date: 'Tue, 21 Aug 2018 20:25:23 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobs/job-1', + date: 'Tue, 11 Dec 2018 18:44:49 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') +nock('https://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/jobs?api-version=2018-08-01.7.0', '*') +.post('/jobs?api-version=2018-12-01.8.0', '*') .reply(201, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:25:24 GMT', - etag: '0x8D607A439A76693', - location: 'https://lchency4.westcentralus.batch.azure.com/jobs/job-1', + 'last-modified': 'Tue, 11 Dec 2018 18:44:49 GMT', + etag: '0x8D65F98BAE83F5F', + location: 'https://test3.westcentralus.batch.azure.com/jobs/job-1', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '8c1629a1-6b0a-41a8-b07a-908a6cb46b51', + 'request-id': 'de3f7dbd-8e11-4df0-b2b6-5062763a2e39', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobs/job-1', - date: 'Tue, 21 Aug 2018 20:25:23 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobs/job-1', + date: 'Tue, 11 Dec 2018 18:44:49 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') +nock('http://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/jobs/ContainerJobNodeSDKTest/tasks?api-version=2018-08-01.7.0', '*') +.post('/jobs/ContainerJobNodeSDKTest/tasks?api-version=2018-12-01.8.0', '*') .reply(201, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:25:24 GMT', - etag: '0x8D607A439BE4963', - location: 'https://lchency4.westcentralus.batch.azure.com/jobs/ContainerJobNodeSDKTest/tasks/ContainerNodeSDKTestTask', + 'last-modified': 'Tue, 11 Dec 2018 18:44:49 GMT', + etag: '0x8D65F98BAFC9ECB', + location: 'https://test3.westcentralus.batch.azure.com/jobs/ContainerJobNodeSDKTest/tasks/ContainerNodeSDKTestTask', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '8ed01ce5-ca1b-4a8d-91bf-a5eb7d28e89e', + 'request-id': 'fb0811c1-02f1-4461-b184-1ada4d3833b5', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobs/ContainerJobNodeSDKTest/tasks/ContainerNodeSDKTestTask', - date: 'Tue, 21 Aug 2018 20:25:24 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobs/ContainerJobNodeSDKTest/tasks/ContainerNodeSDKTestTask', + date: 'Tue, 11 Dec 2018 18:44:49 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') +nock('https://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/jobs/ContainerJobNodeSDKTest/tasks?api-version=2018-08-01.7.0', '*') +.post('/jobs/ContainerJobNodeSDKTest/tasks?api-version=2018-12-01.8.0', '*') .reply(201, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:25:24 GMT', - etag: '0x8D607A439BE4963', - location: 'https://lchency4.westcentralus.batch.azure.com/jobs/ContainerJobNodeSDKTest/tasks/ContainerNodeSDKTestTask', + 'last-modified': 'Tue, 11 Dec 2018 18:44:49 GMT', + etag: '0x8D65F98BAFC9ECB', + location: 'https://test3.westcentralus.batch.azure.com/jobs/ContainerJobNodeSDKTest/tasks/ContainerNodeSDKTestTask', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '8ed01ce5-ca1b-4a8d-91bf-a5eb7d28e89e', + 'request-id': 'fb0811c1-02f1-4461-b184-1ada4d3833b5', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobs/ContainerJobNodeSDKTest/tasks/ContainerNodeSDKTestTask', - date: 'Tue, 21 Aug 2018 20:25:24 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobs/ContainerJobNodeSDKTest/tasks/ContainerNodeSDKTestTask', + date: 'Tue, 11 Dec 2018 18:44:49 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .delete('/jobs/ContainerJobNodeSDKTest?api-version=2018-08-01.7.0') +nock('http://test3.westcentralus.batch.azure.com:443') + .delete('/jobs/ContainerJobNodeSDKTest?api-version=2018-12-01.8.0') .reply(202, "", { 'transfer-encoding': 'chunked', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '615df23b-468d-404f-938f-089d90517196', + 'request-id': '4195276c-dba1-4b81-961f-4b9be278423e', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:25:24 GMT', + date: 'Tue, 11 Dec 2018 18:44:49 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .delete('/jobs/ContainerJobNodeSDKTest?api-version=2018-08-01.7.0') +nock('https://test3.westcentralus.batch.azure.com:443') + .delete('/jobs/ContainerJobNodeSDKTest?api-version=2018-12-01.8.0') .reply(202, "", { 'transfer-encoding': 'chunked', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '615df23b-468d-404f-938f-089d90517196', + 'request-id': '4195276c-dba1-4b81-961f-4b9be278423e', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:25:24 GMT', + date: 'Tue, 11 Dec 2018 18:44:49 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_create_a_task_with_exit_conditions_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_create_a_task_with_exit_conditions_successfully.nock.js index d94a06614f..fa21707762 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_create_a_task_with_exit_conditions_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_create_a_task_with_exit_conditions_successfully.nock.js @@ -1,138 +1,138 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') +nock('http://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/jobs?api-version=2018-08-01.7.0', '*') +.post('/jobs?api-version=2018-12-01.8.0', '*') .reply(201, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:25:24 GMT', - etag: '0x8D607A439F0E665', - location: 'https://lchency4.westcentralus.batch.azure.com/jobs/job-1', + 'last-modified': 'Tue, 11 Dec 2018 18:44:49 GMT', + etag: '0x8D65F98BB3206E7', + location: 'https://test3.westcentralus.batch.azure.com/jobs/job-1', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '061f2b6e-4927-4d9f-a0c2-f30801bb9ded', + 'request-id': 'cd6c84d3-205b-4ec2-a27b-ea4de22dea34', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobs/job-1', - date: 'Tue, 21 Aug 2018 20:25:24 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobs/job-1', + date: 'Tue, 11 Dec 2018 18:44:49 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') +nock('https://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/jobs?api-version=2018-08-01.7.0', '*') +.post('/jobs?api-version=2018-12-01.8.0', '*') .reply(201, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:25:24 GMT', - etag: '0x8D607A439F0E665', - location: 'https://lchency4.westcentralus.batch.azure.com/jobs/job-1', + 'last-modified': 'Tue, 11 Dec 2018 18:44:49 GMT', + etag: '0x8D65F98BB3206E7', + location: 'https://test3.westcentralus.batch.azure.com/jobs/job-1', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '061f2b6e-4927-4d9f-a0c2-f30801bb9ded', + 'request-id': 'cd6c84d3-205b-4ec2-a27b-ea4de22dea34', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobs/job-1', - date: 'Tue, 21 Aug 2018 20:25:24 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobs/job-1', + date: 'Tue, 11 Dec 2018 18:44:49 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') +nock('http://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/jobs/JobWithAutoComplete/tasks?api-version=2018-08-01.7.0', '*') +.post('/jobs/JobWithAutoComplete/tasks?api-version=2018-12-01.8.0', '*') .reply(201, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:25:24 GMT', - etag: '0x8D607A43A086071', - location: 'https://lchency4.westcentralus.batch.azure.com/jobs/JobWithAutoComplete/tasks/TaskWithAutoComplete', + 'last-modified': 'Tue, 11 Dec 2018 18:44:50 GMT', + etag: '0x8D65F98BB48BB75', + location: 'https://test3.westcentralus.batch.azure.com/jobs/JobWithAutoComplete/tasks/TaskWithAutoComplete', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'c10b9b66-0700-4a75-ba16-41575acee491', + 'request-id': 'f1819e58-d8bf-40f4-a491-3cc9cb419027', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobs/JobWithAutoComplete/tasks/TaskWithAutoComplete', - date: 'Tue, 21 Aug 2018 20:25:24 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobs/JobWithAutoComplete/tasks/TaskWithAutoComplete', + date: 'Tue, 11 Dec 2018 18:44:49 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') +nock('https://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/jobs/JobWithAutoComplete/tasks?api-version=2018-08-01.7.0', '*') +.post('/jobs/JobWithAutoComplete/tasks?api-version=2018-12-01.8.0', '*') .reply(201, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:25:24 GMT', - etag: '0x8D607A43A086071', - location: 'https://lchency4.westcentralus.batch.azure.com/jobs/JobWithAutoComplete/tasks/TaskWithAutoComplete', + 'last-modified': 'Tue, 11 Dec 2018 18:44:50 GMT', + etag: '0x8D65F98BB48BB75', + location: 'https://test3.westcentralus.batch.azure.com/jobs/JobWithAutoComplete/tasks/TaskWithAutoComplete', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'c10b9b66-0700-4a75-ba16-41575acee491', + 'request-id': 'f1819e58-d8bf-40f4-a491-3cc9cb419027', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobs/JobWithAutoComplete/tasks/TaskWithAutoComplete', - date: 'Tue, 21 Aug 2018 20:25:24 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobs/JobWithAutoComplete/tasks/TaskWithAutoComplete', + date: 'Tue, 11 Dec 2018 18:44:49 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .get('/jobs/JobWithAutoComplete/tasks/TaskWithAutoComplete?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#tasks/@Element\",\"id\":\"TaskWithAutoComplete\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/jobs/JobWithAutoComplete/tasks/TaskWithAutoComplete\",\"eTag\":\"0x8D607A43A086071\",\"creationTime\":\"2018-08-21T20:25:24.9162353Z\",\"lastModified\":\"2018-08-21T20:25:24.9162353Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-08-21T20:25:24.9162353Z\",\"commandLine\":\"echo Hello World\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"exitConditions\":{\r\n \"exitCodes\":[\r\n {\r\n \"code\":1,\"exitOptions\":{\r\n \"jobAction\":\"none\",\"dependencyAction\":\"block\"\r\n }\r\n }\r\n ],\"default\":{\r\n \"jobAction\":\"terminate\",\"dependencyAction\":\"satisfy\"\r\n }\r\n },\"constraints\":{\r\n \"maxWallClockTime\":\"P10675199DT2H48M5.4775807S\",\"retentionTime\":\"P10675199DT2H48M5.4775807S\",\"maxTaskRetryCount\":0\r\n },\"executionInfo\":{\r\n \"retryCount\":0,\"requeueCount\":0\r\n }\r\n}", { 'transfer-encoding': 'chunked', +nock('http://test3.westcentralus.batch.azure.com:443') + .get('/jobs/JobWithAutoComplete/tasks/TaskWithAutoComplete?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#tasks/@Element\",\"id\":\"TaskWithAutoComplete\",\"url\":\"https://test3.westcentralus.batch.azure.com/jobs/JobWithAutoComplete/tasks/TaskWithAutoComplete\",\"eTag\":\"0x8D65F98BB48BB75\",\"creationTime\":\"2018-12-11T18:44:50.1277557Z\",\"lastModified\":\"2018-12-11T18:44:50.1277557Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-12-11T18:44:50.1277557Z\",\"commandLine\":\"echo Hello World\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"exitConditions\":{\r\n \"exitCodes\":[\r\n {\r\n \"code\":1,\"exitOptions\":{\r\n \"jobAction\":\"none\",\"dependencyAction\":\"block\"\r\n }\r\n }\r\n ],\"default\":{\r\n \"jobAction\":\"terminate\",\"dependencyAction\":\"satisfy\"\r\n }\r\n },\"constraints\":{\r\n \"maxWallClockTime\":\"P10675199DT2H48M5.4775807S\",\"retentionTime\":\"P7D\",\"maxTaskRetryCount\":0\r\n },\"executionInfo\":{\r\n \"retryCount\":0,\"requeueCount\":0\r\n }\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', - 'last-modified': 'Tue, 21 Aug 2018 20:25:24 GMT', - etag: '0x8D607A43A086071', + 'last-modified': 'Tue, 11 Dec 2018 18:44:50 GMT', + etag: '0x8D65F98BB48BB75', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '513f53d1-530c-4c25-b7d3-118871a27902', + 'request-id': '24aa50b3-a5b8-4488-a392-ffadf3bba014', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:25:25 GMT', + date: 'Tue, 11 Dec 2018 18:44:50 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .get('/jobs/JobWithAutoComplete/tasks/TaskWithAutoComplete?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#tasks/@Element\",\"id\":\"TaskWithAutoComplete\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/jobs/JobWithAutoComplete/tasks/TaskWithAutoComplete\",\"eTag\":\"0x8D607A43A086071\",\"creationTime\":\"2018-08-21T20:25:24.9162353Z\",\"lastModified\":\"2018-08-21T20:25:24.9162353Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-08-21T20:25:24.9162353Z\",\"commandLine\":\"echo Hello World\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"exitConditions\":{\r\n \"exitCodes\":[\r\n {\r\n \"code\":1,\"exitOptions\":{\r\n \"jobAction\":\"none\",\"dependencyAction\":\"block\"\r\n }\r\n }\r\n ],\"default\":{\r\n \"jobAction\":\"terminate\",\"dependencyAction\":\"satisfy\"\r\n }\r\n },\"constraints\":{\r\n \"maxWallClockTime\":\"P10675199DT2H48M5.4775807S\",\"retentionTime\":\"P10675199DT2H48M5.4775807S\",\"maxTaskRetryCount\":0\r\n },\"executionInfo\":{\r\n \"retryCount\":0,\"requeueCount\":0\r\n }\r\n}", { 'transfer-encoding': 'chunked', +nock('https://test3.westcentralus.batch.azure.com:443') + .get('/jobs/JobWithAutoComplete/tasks/TaskWithAutoComplete?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#tasks/@Element\",\"id\":\"TaskWithAutoComplete\",\"url\":\"https://test3.westcentralus.batch.azure.com/jobs/JobWithAutoComplete/tasks/TaskWithAutoComplete\",\"eTag\":\"0x8D65F98BB48BB75\",\"creationTime\":\"2018-12-11T18:44:50.1277557Z\",\"lastModified\":\"2018-12-11T18:44:50.1277557Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-12-11T18:44:50.1277557Z\",\"commandLine\":\"echo Hello World\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"exitConditions\":{\r\n \"exitCodes\":[\r\n {\r\n \"code\":1,\"exitOptions\":{\r\n \"jobAction\":\"none\",\"dependencyAction\":\"block\"\r\n }\r\n }\r\n ],\"default\":{\r\n \"jobAction\":\"terminate\",\"dependencyAction\":\"satisfy\"\r\n }\r\n },\"constraints\":{\r\n \"maxWallClockTime\":\"P10675199DT2H48M5.4775807S\",\"retentionTime\":\"P7D\",\"maxTaskRetryCount\":0\r\n },\"executionInfo\":{\r\n \"retryCount\":0,\"requeueCount\":0\r\n }\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', - 'last-modified': 'Tue, 21 Aug 2018 20:25:24 GMT', - etag: '0x8D607A43A086071', + 'last-modified': 'Tue, 11 Dec 2018 18:44:50 GMT', + etag: '0x8D65F98BB48BB75', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '513f53d1-530c-4c25-b7d3-118871a27902', + 'request-id': '24aa50b3-a5b8-4488-a392-ffadf3bba014', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:25:25 GMT', + date: 'Tue, 11 Dec 2018 18:44:50 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .delete('/jobs/JobWithAutoComplete?api-version=2018-08-01.7.0') +nock('http://test3.westcentralus.batch.azure.com:443') + .delete('/jobs/JobWithAutoComplete?api-version=2018-12-01.8.0') .reply(202, "", { 'transfer-encoding': 'chunked', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '615d3e8e-b7d7-45e2-a729-7385e8555aec', + 'request-id': 'e1af0f40-708b-4b85-bf5c-ea07a35a747f', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:25:25 GMT', + date: 'Tue, 11 Dec 2018 18:44:49 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .delete('/jobs/JobWithAutoComplete?api-version=2018-08-01.7.0') +nock('https://test3.westcentralus.batch.azure.com:443') + .delete('/jobs/JobWithAutoComplete?api-version=2018-12-01.8.0') .reply(202, "", { 'transfer-encoding': 'chunked', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '615d3e8e-b7d7-45e2-a729-7385e8555aec', + 'request-id': 'e1af0f40-708b-4b85-bf5c-ea07a35a747f', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:25:25 GMT', + date: 'Tue, 11 Dec 2018 18:44:49 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_delete_a_certificate_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_delete_a_certificate_successfully.nock.js index e4be1ca179..a7fb3c2af4 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_delete_a_certificate_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_delete_a_certificate_successfully.nock.js @@ -1,34 +1,34 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .delete('/certificates(thumbprintAlgorithm=sha1,thumbprint=cff2ab63c8c955aaf71989efa641b906558d9fb7)?api-version=2018-08-01.7.0') +nock('http://test3.westcentralus.batch.azure.com:443') + .delete('/certificates(thumbprintAlgorithm=sha1,thumbprint=cff2ab63c8c955aaf71989efa641b906558d9fb7)?api-version=2018-12-01.8.0') .reply(202, "", { 'transfer-encoding': 'chunked', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '5c0ecf4f-b035-4e3a-99ff-a594a41282a9', + 'request-id': '72c4deb8-6133-426b-942a-a7623b100e5c', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:31:07 GMT', + date: 'Tue, 11 Dec 2018 18:48:41 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .delete('/certificates(thumbprintAlgorithm=sha1,thumbprint=cff2ab63c8c955aaf71989efa641b906558d9fb7)?api-version=2018-08-01.7.0') +nock('https://test3.westcentralus.batch.azure.com:443') + .delete('/certificates(thumbprintAlgorithm=sha1,thumbprint=cff2ab63c8c955aaf71989efa641b906558d9fb7)?api-version=2018-12-01.8.0') .reply(202, "", { 'transfer-encoding': 'chunked', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '5c0ecf4f-b035-4e3a-99ff-a594a41282a9', + 'request-id': '72c4deb8-6133-426b-942a-a7623b100e5c', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:31:07 GMT', + date: 'Tue, 11 Dec 2018 18:48:41 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_delete_a_compute_node_user_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_delete_a_compute_node_user_successfully.nock.js index 8930c1a409..d4d6057ab1 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_delete_a_compute_node_user_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_delete_a_compute_node_user_successfully.nock.js @@ -1,34 +1,34 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .delete('/pools/nodesdktestpool1/nodes/tvm-14141481_1-20180821t200555z/users/NodeSDKTestUser?api-version=2018-08-01.7.0') +nock('http://test3.westcentralus.batch.azure.com:443') + .delete('/pools/nodesdktestpool1/nodes/tvmps_13cf4cee9dd1594f9da06399ef98ede3e5a4010f3233627c3837a43dbeff5868_d/users/NodeSDKTestUser?api-version=2018-12-01.8.0') .reply(200, "", { 'transfer-encoding': 'chunked', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '6cbfc50b-3a4e-4489-aee1-bcd88041a203', + 'request-id': '8e5c02f1-1c6d-4e89-a016-f2519fa00342', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:23:10 GMT', + date: 'Tue, 11 Dec 2018 18:42:32 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .delete('/pools/nodesdktestpool1/nodes/tvm-14141481_1-20180821t200555z/users/NodeSDKTestUser?api-version=2018-08-01.7.0') +nock('https://test3.westcentralus.batch.azure.com:443') + .delete('/pools/nodesdktestpool1/nodes/tvmps_13cf4cee9dd1594f9da06399ef98ede3e5a4010f3233627c3837a43dbeff5868_d/users/NodeSDKTestUser?api-version=2018-12-01.8.0') .reply(200, "", { 'transfer-encoding': 'chunked', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '6cbfc50b-3a4e-4489-aee1-bcd88041a203', + 'request-id': '8e5c02f1-1c6d-4e89-a016-f2519fa00342', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:23:10 GMT', + date: 'Tue, 11 Dec 2018 18:42:32 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_delete_a_job_schedule_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_delete_a_job_schedule_successfully.nock.js index e752eb3cb9..54bdab3129 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_delete_a_job_schedule_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_delete_a_job_schedule_successfully.nock.js @@ -1,34 +1,34 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .delete('/jobschedules/NodeSDKTestSchedule?api-version=2018-08-01.7.0') +nock('http://test3.westcentralus.batch.azure.com:443') + .delete('/jobschedules/NodeSDKTestSchedule?api-version=2018-12-01.8.0') .reply(202, "", { 'transfer-encoding': 'chunked', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '5a06a9d9-e0d5-4d09-a5a6-75545ebf34f9', + 'request-id': 'bac8b4a5-e762-43e6-9869-5040bd3dbb9a', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:31:06 GMT', + date: 'Tue, 11 Dec 2018 21:04:06 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .delete('/jobschedules/NodeSDKTestSchedule?api-version=2018-08-01.7.0') +nock('https://test3.westcentralus.batch.azure.com:443') + .delete('/jobschedules/NodeSDKTestSchedule?api-version=2018-12-01.8.0') .reply(202, "", { 'transfer-encoding': 'chunked', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '5a06a9d9-e0d5-4d09-a5a6-75545ebf34f9', + 'request-id': 'bac8b4a5-e762-43e6-9869-5040bd3dbb9a', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:31:06 GMT', + date: 'Tue, 11 Dec 2018 21:04:06 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_delete_a_job_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_delete_a_job_successfully.nock.js index 3656041f18..be26a91d6a 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_delete_a_job_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_delete_a_job_successfully.nock.js @@ -1,34 +1,34 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .delete('/jobs/HelloWorldJobNodeSDKTest?api-version=2018-08-01.7.0') +nock('http://test3.westcentralus.batch.azure.com:443') + .delete('/jobs/HelloWorldJobNodeSDKTest?api-version=2018-12-01.8.0') .reply(202, "", { 'transfer-encoding': 'chunked', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '003f73cb-58f9-4ed5-a740-5e4da580f463', + 'request-id': '8b7e949e-b167-4d65-b73b-3e06888ff0ea', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:31:03 GMT', + date: 'Tue, 11 Dec 2018 18:48:36 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .delete('/jobs/HelloWorldJobNodeSDKTest?api-version=2018-08-01.7.0') +nock('https://test3.westcentralus.batch.azure.com:443') + .delete('/jobs/HelloWorldJobNodeSDKTest?api-version=2018-12-01.8.0') .reply(202, "", { 'transfer-encoding': 'chunked', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '003f73cb-58f9-4ed5-a740-5e4da580f463', + 'request-id': '8b7e949e-b167-4d65-b73b-3e06888ff0ea', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:31:03 GMT', + date: 'Tue, 11 Dec 2018 18:48:36 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_delete_a_pool_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_delete_a_pool_successfully.nock.js index adb3cdd37b..b516e23f17 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_delete_a_pool_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_delete_a_pool_successfully.nock.js @@ -1,34 +1,34 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .delete('/pools/nodesdktestpool1?api-version=2018-08-01.7.0') +nock('http://test3.westcentralus.batch.azure.com:443') + .delete('/pools/nodesdktestpool1?api-version=2018-12-01.8.0') .reply(202, "", { 'transfer-encoding': 'chunked', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'd8d278b8-e296-4200-891a-a8f74f5a9329', + 'request-id': 'b9e46059-ef78-4f14-8f64-4c4cea33e9b9', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:31:06 GMT', + date: 'Tue, 11 Dec 2018 18:48:40 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .delete('/pools/nodesdktestpool1?api-version=2018-08-01.7.0') +nock('https://test3.westcentralus.batch.azure.com:443') + .delete('/pools/nodesdktestpool1?api-version=2018-12-01.8.0') .reply(202, "", { 'transfer-encoding': 'chunked', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'd8d278b8-e296-4200-891a-a8f74f5a9329', + 'request-id': 'b9e46059-ef78-4f14-8f64-4c4cea33e9b9', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:31:06 GMT', + date: 'Tue, 11 Dec 2018 18:48:40 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_delete_a_second_pool_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_delete_a_second_pool_successfully.nock.js index 0861148893..a5a8fcd45e 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_delete_a_second_pool_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_delete_a_second_pool_successfully.nock.js @@ -1,34 +1,34 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .delete('/pools/nodesdktestpool2?api-version=2018-08-01.7.0') +nock('http://test3.westcentralus.batch.azure.com:443') + .delete('/pools/nodesdktestpool2?api-version=2018-12-01.8.0') .reply(202, "", { 'transfer-encoding': 'chunked', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '6863b390-6c25-4109-ac9f-9ec25e56f8fe', + 'request-id': '375ab53e-c622-49be-a893-ac11cf51442b', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:31:07 GMT', + date: 'Tue, 11 Dec 2018 18:48:41 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .delete('/pools/nodesdktestpool2?api-version=2018-08-01.7.0') +nock('https://test3.westcentralus.batch.azure.com:443') + .delete('/pools/nodesdktestpool2?api-version=2018-12-01.8.0') .reply(202, "", { 'transfer-encoding': 'chunked', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '6863b390-6c25-4109-ac9f-9ec25e56f8fe', + 'request-id': '375ab53e-c622-49be-a893-ac11cf51442b', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:31:07 GMT', + date: 'Tue, 11 Dec 2018 18:48:41 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_delete_a_second_task_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_delete_a_second_task_successfully.nock.js index b308143786..7828239529 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_delete_a_second_task_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_delete_a_second_task_successfully.nock.js @@ -1,34 +1,34 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .delete('/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2?api-version=2018-08-01.7.0') +nock('http://test3.westcentralus.batch.azure.com:443') + .delete('/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2?api-version=2018-12-01.8.0') .reply(200, "", { 'transfer-encoding': 'chunked', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'b563b69a-d063-48bb-b2db-88f0a40c9c2b', + 'request-id': '891badfb-c16c-491d-ada3-23cf096a1bdb', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:31:00 GMT', + date: 'Tue, 11 Dec 2018 18:48:35 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .delete('/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2?api-version=2018-08-01.7.0') +nock('https://test3.westcentralus.batch.azure.com:443') + .delete('/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2?api-version=2018-12-01.8.0') .reply(200, "", { 'transfer-encoding': 'chunked', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'b563b69a-d063-48bb-b2db-88f0a40c9c2b', + 'request-id': '891badfb-c16c-491d-ada3-23cf096a1bdb', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:31:00 GMT', + date: 'Tue, 11 Dec 2018 18:48:35 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_delete_a_task_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_delete_a_task_successfully.nock.js index 3e1cd4d32b..f780252f8d 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_delete_a_task_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_delete_a_task_successfully.nock.js @@ -1,34 +1,34 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .delete('/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask?api-version=2018-08-01.7.0') +nock('http://test3.westcentralus.batch.azure.com:443') + .delete('/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask?api-version=2018-12-01.8.0') .reply(200, "", { 'transfer-encoding': 'chunked', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'b1d70dcb-848a-46b0-8e63-f8e47969b697', + 'request-id': '83d42e80-48f3-416f-b406-c8d40187819a', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:31:00 GMT', + date: 'Tue, 11 Dec 2018 18:48:34 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .delete('/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask?api-version=2018-08-01.7.0') +nock('https://test3.westcentralus.batch.azure.com:443') + .delete('/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask?api-version=2018-12-01.8.0') .reply(200, "", { 'transfer-encoding': 'chunked', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'b1d70dcb-848a-46b0-8e63-f8e47969b697', + 'request-id': '83d42e80-48f3-416f-b406-c8d40187819a', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:31:00 GMT', + date: 'Tue, 11 Dec 2018 18:48:34 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_delete_file_from_node_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_delete_file_from_node_successfully.nock.js index 410814404e..a547ef4789 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_delete_file_from_node_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_delete_file_from_node_successfully.nock.js @@ -1,34 +1,34 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .delete('/pools/nodesdktestpool1/nodes/tvm-14141481_2-20180821t200555z/files/startup%2Fwd%2Fhello.txt?api-version=2018-08-01.7.0') +nock('http://test3.westcentralus.batch.azure.com:443') + .delete('/pools/nodesdktestpool1/nodes/tvmps_15c61fea08a34e0fe431ba70cdf2156682bec1e01fdda442f2dccde21908ed91_d/files/startup%2Fwd%2Fhello.txt?api-version=2018-12-01.8.0') .reply(200, "", { 'transfer-encoding': 'chunked', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '65fbd261-481c-42a7-9c5d-3dfd5656c70f', + 'request-id': '1be337dc-3314-48df-917b-18970dc377a4', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:30:58 GMT', + date: 'Tue, 11 Dec 2018 18:48:32 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .delete('/pools/nodesdktestpool1/nodes/tvm-14141481_2-20180821t200555z/files/startup%2Fwd%2Fhello.txt?api-version=2018-08-01.7.0') +nock('https://test3.westcentralus.batch.azure.com:443') + .delete('/pools/nodesdktestpool1/nodes/tvmps_15c61fea08a34e0fe431ba70cdf2156682bec1e01fdda442f2dccde21908ed91_d/files/startup%2Fwd%2Fhello.txt?api-version=2018-12-01.8.0') .reply(200, "", { 'transfer-encoding': 'chunked', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '65fbd261-481c-42a7-9c5d-3dfd5656c70f', + 'request-id': '1be337dc-3314-48df-917b-18970dc377a4', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:30:58 GMT', + date: 'Tue, 11 Dec 2018 18:48:32 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_delete_file_from_task_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_delete_file_from_task_successfully.nock.js index 7a3ccc4e42..4a81adc41b 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_delete_file_from_task_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_delete_file_from_task_successfully.nock.js @@ -1,34 +1,34 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .delete('/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2/files/stderr.txt?api-version=2018-08-01.7.0') +nock('http://test3.westcentralus.batch.azure.com:443') + .delete('/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2/files/stderr.txt?api-version=2018-12-01.8.0') .reply(200, "", { 'transfer-encoding': 'chunked', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '36ed6a02-3d5b-4a8d-a4ca-ebbc474ccb0f', + 'request-id': '9f032891-2c6b-4dbf-b917-1882ad92f135', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:27:24 GMT', + date: 'Tue, 11 Dec 2018 18:46:49 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .delete('/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2/files/stderr.txt?api-version=2018-08-01.7.0') +nock('https://test3.westcentralus.batch.azure.com:443') + .delete('/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2/files/stderr.txt?api-version=2018-12-01.8.0') .reply(200, "", { 'transfer-encoding': 'chunked', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '36ed6a02-3d5b-4a8d-a4ca-ebbc474ccb0f', + 'request-id': '9f032891-2c6b-4dbf-b917-1882ad92f135', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:27:24 GMT', + date: 'Tue, 11 Dec 2018 18:46:49 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_disable_a_job_schedule_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_disable_a_job_schedule_successfully.nock.js index 2f2b4a6b21..7e7828e487 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_disable_a_job_schedule_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_disable_a_job_schedule_successfully.nock.js @@ -1,40 +1,40 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .post('/jobschedules/NodeSDKTestSchedule/disable?api-version=2018-08-01.7.0') +nock('http://test3.westcentralus.batch.azure.com:443') + .post('/jobschedules/NodeSDKTestSchedule/disable?api-version=2018-12-01.8.0') .reply(204, "", { 'content-length': '0', - 'last-modified': 'Tue, 21 Aug 2018 20:31:04 GMT', - etag: '0x8D607A5048EEBD1', + 'last-modified': 'Tue, 11 Dec 2018 21:04:06 GMT', + etag: '0x8D65FAC30113642', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'b290831d-fe21-4b17-bb5e-86cbbaa1d795', + 'request-id': '55ecf4ec-ff76-476b-a6eb-8363421f9c21', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobschedules/NodeSDKTestSchedule/disable', - date: 'Tue, 21 Aug 2018 20:31:04 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobschedules/NodeSDKTestSchedule/disable', + date: 'Tue, 11 Dec 2018 21:04:06 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .post('/jobschedules/NodeSDKTestSchedule/disable?api-version=2018-08-01.7.0') +nock('https://test3.westcentralus.batch.azure.com:443') + .post('/jobschedules/NodeSDKTestSchedule/disable?api-version=2018-12-01.8.0') .reply(204, "", { 'content-length': '0', - 'last-modified': 'Tue, 21 Aug 2018 20:31:04 GMT', - etag: '0x8D607A5048EEBD1', + 'last-modified': 'Tue, 11 Dec 2018 21:04:06 GMT', + etag: '0x8D65FAC30113642', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'b290831d-fe21-4b17-bb5e-86cbbaa1d795', + 'request-id': '55ecf4ec-ff76-476b-a6eb-8363421f9c21', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobschedules/NodeSDKTestSchedule/disable', - date: 'Tue, 21 Aug 2018 20:31:04 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobschedules/NodeSDKTestSchedule/disable', + date: 'Tue, 11 Dec 2018 21:04:06 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_disable_a_job_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_disable_a_job_successfully.nock.js index fcbc489887..02215b271c 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_disable_a_job_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_disable_a_job_successfully.nock.js @@ -1,42 +1,42 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') +nock('http://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/jobs/HelloWorldJobNodeSDKTest/disable?api-version=2018-08-01.7.0', '*') +.post('/jobs/HelloWorldJobNodeSDKTest/disable?api-version=2018-12-01.8.0', '*') .reply(202, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:31:01 GMT', - etag: '0x8D607A502BF5C97', + 'last-modified': 'Tue, 11 Dec 2018 18:48:36 GMT', + etag: '0x8D65F9941FAA6F4', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '4b884dbd-a80c-4820-bc5a-9428e386579a', + 'request-id': '63398dd8-137f-4be3-b19e-4fce63053d10', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/disable', - date: 'Tue, 21 Aug 2018 20:31:01 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/disable', + date: 'Tue, 11 Dec 2018 18:48:35 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') +nock('https://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/jobs/HelloWorldJobNodeSDKTest/disable?api-version=2018-08-01.7.0', '*') +.post('/jobs/HelloWorldJobNodeSDKTest/disable?api-version=2018-12-01.8.0', '*') .reply(202, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:31:01 GMT', - etag: '0x8D607A502BF5C97', + 'last-modified': 'Tue, 11 Dec 2018 18:48:36 GMT', + etag: '0x8D65F9941FAA6F4', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '4b884dbd-a80c-4820-bc5a-9428e386579a', + 'request-id': '63398dd8-137f-4be3-b19e-4fce63053d10', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/disable', - date: 'Tue, 21 Aug 2018 20:31:01 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/disable', + date: 'Tue, 11 Dec 2018 18:48:35 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_disable_autoscale_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_disable_autoscale_successfully.nock.js index fa37a0aed9..6560d42c2e 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_disable_autoscale_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_disable_autoscale_successfully.nock.js @@ -1,40 +1,40 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .post('/pools/nodesdktestpool1/disableautoscale?api-version=2018-08-01.7.0') +nock('http://test3.westcentralus.batch.azure.com:443') + .post('/pools/nodesdktestpool1/disableautoscale?api-version=2018-12-01.8.0') .reply(200, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:25:21 GMT', - etag: '0x8D607A437BD2FE0', + 'last-modified': 'Tue, 11 Dec 2018 18:44:44 GMT', + etag: '0x8D65F98B81717BC', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '1b43fef9-22e1-442c-9c36-87f83b210a02', + 'request-id': '4a5016f0-1b97-4c33-9a6a-10167b8de721', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/disableautoscale', - date: 'Tue, 21 Aug 2018 20:25:20 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/disableautoscale', + date: 'Tue, 11 Dec 2018 18:44:45 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .post('/pools/nodesdktestpool1/disableautoscale?api-version=2018-08-01.7.0') +nock('https://test3.westcentralus.batch.azure.com:443') + .post('/pools/nodesdktestpool1/disableautoscale?api-version=2018-12-01.8.0') .reply(200, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:25:21 GMT', - etag: '0x8D607A437BD2FE0', + 'last-modified': 'Tue, 11 Dec 2018 18:44:44 GMT', + etag: '0x8D65F98B81717BC', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '1b43fef9-22e1-442c-9c36-87f83b210a02', + 'request-id': '4a5016f0-1b97-4c33-9a6a-10167b8de721', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/disableautoscale', - date: 'Tue, 21 Aug 2018 20:25:20 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/disableautoscale', + date: 'Tue, 11 Dec 2018 18:44:45 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_disable_scheduling_on_a_compute_node_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_disable_scheduling_on_a_compute_node_successfully.nock.js index fd02617129..8e7f24bca7 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_disable_scheduling_on_a_compute_node_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_disable_scheduling_on_a_compute_node_successfully.nock.js @@ -1,36 +1,36 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .post('/pools/nodesdktestpool1/nodes/tvm-14141481_2-20180821t200555z/disablescheduling?api-version=2018-08-01.7.0') +nock('http://test3.westcentralus.batch.azure.com:443') + .post('/pools/nodesdktestpool1/nodes/tvmps_15c61fea08a34e0fe431ba70cdf2156682bec1e01fdda442f2dccde21908ed91_d/disablescheduling?api-version=2018-12-01.8.0') .reply(200, "", { 'transfer-encoding': 'chunked', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '30419b15-4a2e-4dac-9930-8bd28f4c102c', + 'request-id': '5759ea29-ca2a-4729-8a51-cd83e7c543ef', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvm-14141481_2-20180821t200555z/disablescheduling', - date: 'Tue, 21 Aug 2018 20:23:11 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvmps_15c61fea08a34e0fe431ba70cdf2156682bec1e01fdda442f2dccde21908ed91_d/disablescheduling', + date: 'Tue, 11 Dec 2018 18:42:33 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .post('/pools/nodesdktestpool1/nodes/tvm-14141481_2-20180821t200555z/disablescheduling?api-version=2018-08-01.7.0') +nock('https://test3.westcentralus.batch.azure.com:443') + .post('/pools/nodesdktestpool1/nodes/tvmps_15c61fea08a34e0fe431ba70cdf2156682bec1e01fdda442f2dccde21908ed91_d/disablescheduling?api-version=2018-12-01.8.0') .reply(200, "", { 'transfer-encoding': 'chunked', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '30419b15-4a2e-4dac-9930-8bd28f4c102c', + 'request-id': '5759ea29-ca2a-4729-8a51-cd83e7c543ef', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvm-14141481_2-20180821t200555z/disablescheduling', - date: 'Tue, 21 Aug 2018 20:23:11 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvmps_15c61fea08a34e0fe431ba70cdf2156682bec1e01fdda442f2dccde21908ed91_d/disablescheduling', + date: 'Tue, 11 Dec 2018 18:42:33 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_enable_a_job_schedule_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_enable_a_job_schedule_successfully.nock.js index 4ddb2edf90..43aa1dba3f 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_enable_a_job_schedule_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_enable_a_job_schedule_successfully.nock.js @@ -1,40 +1,40 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .post('/jobschedules/NodeSDKTestSchedule/enable?api-version=2018-08-01.7.0') +nock('http://test3.westcentralus.batch.azure.com:443') + .post('/jobschedules/NodeSDKTestSchedule/enable?api-version=2018-12-01.8.0') .reply(204, "", { 'content-length': '0', - 'last-modified': 'Tue, 21 Aug 2018 20:31:04 GMT', - etag: '0x8D607A504A591BE', + 'last-modified': 'Tue, 11 Dec 2018 21:04:06 GMT', + etag: '0x8D65FAC302C5BA6', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'b6ac06dc-fe6c-4acb-a072-23a7bc4ce1c3', + 'request-id': 'bd219aec-7dd9-4551-979f-6805a2a1c40d', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobschedules/NodeSDKTestSchedule/enable', - date: 'Tue, 21 Aug 2018 20:31:04 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobschedules/NodeSDKTestSchedule/enable', + date: 'Tue, 11 Dec 2018 21:04:06 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .post('/jobschedules/NodeSDKTestSchedule/enable?api-version=2018-08-01.7.0') +nock('https://test3.westcentralus.batch.azure.com:443') + .post('/jobschedules/NodeSDKTestSchedule/enable?api-version=2018-12-01.8.0') .reply(204, "", { 'content-length': '0', - 'last-modified': 'Tue, 21 Aug 2018 20:31:04 GMT', - etag: '0x8D607A504A591BE', + 'last-modified': 'Tue, 11 Dec 2018 21:04:06 GMT', + etag: '0x8D65FAC302C5BA6', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'b6ac06dc-fe6c-4acb-a072-23a7bc4ce1c3', + 'request-id': 'bd219aec-7dd9-4551-979f-6805a2a1c40d', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobschedules/NodeSDKTestSchedule/enable', - date: 'Tue, 21 Aug 2018 20:31:04 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobschedules/NodeSDKTestSchedule/enable', + date: 'Tue, 11 Dec 2018 21:04:06 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_enable_a_job_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_enable_a_job_successfully.nock.js index e62fde1d6a..875dd6d564 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_enable_a_job_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_enable_a_job_successfully.nock.js @@ -1,40 +1,40 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .post('/jobs/HelloWorldJobNodeSDKTest/enable?api-version=2018-08-01.7.0') +nock('http://test3.westcentralus.batch.azure.com:443') + .post('/jobs/HelloWorldJobNodeSDKTest/enable?api-version=2018-12-01.8.0') .reply(202, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:31:01 GMT', - etag: '0x8D607A502D514A5', + 'last-modified': 'Tue, 11 Dec 2018 18:48:36 GMT', + etag: '0x8D65F99420F8F8A', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '2dc16cc0-fef2-4a87-afdf-a044b317fe8b', + 'request-id': 'd87c5101-196e-48c0-a8da-66485e890579', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/enable', - date: 'Tue, 21 Aug 2018 20:31:01 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/enable', + date: 'Tue, 11 Dec 2018 18:48:35 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .post('/jobs/HelloWorldJobNodeSDKTest/enable?api-version=2018-08-01.7.0') +nock('https://test3.westcentralus.batch.azure.com:443') + .post('/jobs/HelloWorldJobNodeSDKTest/enable?api-version=2018-12-01.8.0') .reply(202, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:31:01 GMT', - etag: '0x8D607A502D514A5', + 'last-modified': 'Tue, 11 Dec 2018 18:48:36 GMT', + etag: '0x8D65F99420F8F8A', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '2dc16cc0-fef2-4a87-afdf-a044b317fe8b', + 'request-id': 'd87c5101-196e-48c0-a8da-66485e890579', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/enable', - date: 'Tue, 21 Aug 2018 20:31:01 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/enable', + date: 'Tue, 11 Dec 2018 18:48:35 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_enable_autoscale_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_enable_autoscale_successfully.nock.js index 0cfe9d3167..8ee55a09d2 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_enable_autoscale_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_enable_autoscale_successfully.nock.js @@ -1,42 +1,42 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') +nock('http://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/pools/nodesdktestpool1/enableautoscale?api-version=2018-08-01.7.0', '*') +.post('/pools/nodesdktestpool1/enableautoscale?api-version=2018-12-01.8.0', '*') .reply(200, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:25:20 GMT', - etag: '0x8D607A4376A073D', + 'last-modified': 'Tue, 11 Dec 2018 18:44:44 GMT', + etag: '0x8D65F98B81717BC', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'bb882132-96ac-4530-a7bb-a91d2f5c25c5', + 'request-id': '110fc616-674c-4469-adfa-f8230a1fafd4', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/enableautoscale', - date: 'Tue, 21 Aug 2018 20:25:20 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/enableautoscale', + date: 'Tue, 11 Dec 2018 18:44:44 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') +nock('https://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/pools/nodesdktestpool1/enableautoscale?api-version=2018-08-01.7.0', '*') +.post('/pools/nodesdktestpool1/enableautoscale?api-version=2018-12-01.8.0', '*') .reply(200, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:25:20 GMT', - etag: '0x8D607A4376A073D', + 'last-modified': 'Tue, 11 Dec 2018 18:44:44 GMT', + etag: '0x8D65F98B81717BC', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'bb882132-96ac-4530-a7bb-a91d2f5c25c5', + 'request-id': '110fc616-674c-4469-adfa-f8230a1fafd4', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/enableautoscale', - date: 'Tue, 21 Aug 2018 20:25:20 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/enableautoscale', + date: 'Tue, 11 Dec 2018 18:44:44 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_enable_scheduling_on_a_compute_node_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_enable_scheduling_on_a_compute_node_successfully.nock.js index 42da13e99b..c503d6288b 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_enable_scheduling_on_a_compute_node_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_enable_scheduling_on_a_compute_node_successfully.nock.js @@ -1,36 +1,36 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .post('/pools/nodesdktestpool1/nodes/tvm-14141481_2-20180821t200555z/enablescheduling?api-version=2018-08-01.7.0') +nock('http://test3.westcentralus.batch.azure.com:443') + .post('/pools/nodesdktestpool1/nodes/tvmps_15c61fea08a34e0fe431ba70cdf2156682bec1e01fdda442f2dccde21908ed91_d/enablescheduling?api-version=2018-12-01.8.0') .reply(200, "", { 'transfer-encoding': 'chunked', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '42717acb-2c95-4ecc-a9c6-22c6bc4b4b6d', + 'request-id': '7f029f37-71f1-4ef0-92f5-fbcf75285ac3', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvm-14141481_2-20180821t200555z/enablescheduling', - date: 'Tue, 21 Aug 2018 20:23:10 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvmps_15c61fea08a34e0fe431ba70cdf2156682bec1e01fdda442f2dccde21908ed91_d/enablescheduling', + date: 'Tue, 11 Dec 2018 18:42:34 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .post('/pools/nodesdktestpool1/nodes/tvm-14141481_2-20180821t200555z/enablescheduling?api-version=2018-08-01.7.0') +nock('https://test3.westcentralus.batch.azure.com:443') + .post('/pools/nodesdktestpool1/nodes/tvmps_15c61fea08a34e0fe431ba70cdf2156682bec1e01fdda442f2dccde21908ed91_d/enablescheduling?api-version=2018-12-01.8.0') .reply(200, "", { 'transfer-encoding': 'chunked', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '42717acb-2c95-4ecc-a9c6-22c6bc4b4b6d', + 'request-id': '7f029f37-71f1-4ef0-92f5-fbcf75285ac3', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvm-14141481_2-20180821t200555z/enablescheduling', - date: 'Tue, 21 Aug 2018 20:23:10 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvmps_15c61fea08a34e0fe431ba70cdf2156682bec1e01fdda442f2dccde21908ed91_d/enablescheduling', + date: 'Tue, 11 Dec 2018 18:42:34 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_evaluate_pool_autoscale_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_evaluate_pool_autoscale_successfully.nock.js index 18ecfafb92..78c477b43f 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_evaluate_pool_autoscale_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_evaluate_pool_autoscale_successfully.nock.js @@ -1,40 +1,40 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') +nock('http://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/pools/nodesdktestpool1/evaluateautoscale?api-version=2018-08-01.7.0', '*') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.AutoScaleRun\",\"timestamp\":\"2018-08-21T20:25:20.7341237Z\",\"results\":\"$TargetDedicatedNodes=3;$TargetLowPriorityNodes=0;$NodeDeallocationOption=requeue\"\r\n}", { 'transfer-encoding': 'chunked', +.post('/pools/nodesdktestpool1/evaluateautoscale?api-version=2018-12-01.8.0', '*') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.AutoScaleRun\",\"timestamp\":\"2018-12-11T18:44:45.069648Z\",\"results\":\"$TargetDedicatedNodes=3;$TargetLowPriorityNodes=0;$NodeDeallocationOption=requeue\"\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '1c7147f6-079d-465c-abba-39c5065cc622', + 'request-id': '744f0e99-e824-43c4-860d-a903c69bd9a5', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/evaluateautoscale', - date: 'Tue, 21 Aug 2018 20:25:20 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/evaluateautoscale', + date: 'Tue, 11 Dec 2018 18:44:44 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') +nock('https://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/pools/nodesdktestpool1/evaluateautoscale?api-version=2018-08-01.7.0', '*') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.AutoScaleRun\",\"timestamp\":\"2018-08-21T20:25:20.7341237Z\",\"results\":\"$TargetDedicatedNodes=3;$TargetLowPriorityNodes=0;$NodeDeallocationOption=requeue\"\r\n}", { 'transfer-encoding': 'chunked', +.post('/pools/nodesdktestpool1/evaluateautoscale?api-version=2018-12-01.8.0', '*') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.AutoScaleRun\",\"timestamp\":\"2018-12-11T18:44:45.069648Z\",\"results\":\"$TargetDedicatedNodes=3;$TargetLowPriorityNodes=0;$NodeDeallocationOption=requeue\"\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '1c7147f6-079d-465c-abba-39c5065cc622', + 'request-id': '744f0e99-e824-43c4-860d-a903c69bd9a5', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/evaluateautoscale', - date: 'Tue, 21 Aug 2018 20:25:20 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/evaluateautoscale', + date: 'Tue, 11 Dec 2018 18:44:44 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_fail_to_cancel_deleting_a_certificate.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_fail_to_cancel_deleting_a_certificate.nock.js index 1aa892a29b..8c15498e8b 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_fail_to_cancel_deleting_a_certificate.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_fail_to_cancel_deleting_a_certificate.nock.js @@ -1,36 +1,36 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .post('/certificates(thumbprintAlgorithm=sha1,thumbprint=cff2ab63c8c955aaf71989efa641b906558d9fb7)/canceldelete?api-version=2018-08-01.7.0') - .reply(409, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element\",\"code\":\"CertificateBeingDeleted\",\"message\":{\r\n \"lang\":\"en-US\",\"value\":\"The specified certificate has been marked for deletion and is being deleted.\\nRequestId:76d451c9-e77a-4f9f-8862-33cf52f7b89c\\nTime:2018-08-21T20:31:07.5117080Z\"\r\n }\r\n}", { 'content-length': '389', +nock('http://test3.westcentralus.batch.azure.com:443') + .post('/certificates(thumbprintAlgorithm=sha1,thumbprint=cff2ab63c8c955aaf71989efa641b906558d9fb7)/canceldelete?api-version=2018-12-01.8.0') + .reply(409, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element\",\"code\":\"CertificateBeingDeleted\",\"message\":{\r\n \"lang\":\"en-US\",\"value\":\"The specified certificate has been marked for deletion and is being deleted.\\nRequestId:8246f5bc-d5bc-4cda-a329-e5198fc619e3\\nTime:2018-12-11T18:48:41.6929178Z\"\r\n }\r\n}", { 'content-length': '386', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '76d451c9-e77a-4f9f-8862-33cf52f7b89c', + 'request-id': '8246f5bc-d5bc-4cda-a329-e5198fc619e3', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:31:07 GMT', + date: 'Tue, 11 Dec 2018 18:48:41 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .post('/certificates(thumbprintAlgorithm=sha1,thumbprint=cff2ab63c8c955aaf71989efa641b906558d9fb7)/canceldelete?api-version=2018-08-01.7.0') - .reply(409, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element\",\"code\":\"CertificateBeingDeleted\",\"message\":{\r\n \"lang\":\"en-US\",\"value\":\"The specified certificate has been marked for deletion and is being deleted.\\nRequestId:76d451c9-e77a-4f9f-8862-33cf52f7b89c\\nTime:2018-08-21T20:31:07.5117080Z\"\r\n }\r\n}", { 'content-length': '389', +nock('https://test3.westcentralus.batch.azure.com:443') + .post('/certificates(thumbprintAlgorithm=sha1,thumbprint=cff2ab63c8c955aaf71989efa641b906558d9fb7)/canceldelete?api-version=2018-12-01.8.0') + .reply(409, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element\",\"code\":\"CertificateBeingDeleted\",\"message\":{\r\n \"lang\":\"en-US\",\"value\":\"The specified certificate has been marked for deletion and is being deleted.\\nRequestId:8246f5bc-d5bc-4cda-a329-e5198fc619e3\\nTime:2018-12-11T18:48:41.6929178Z\"\r\n }\r\n}", { 'content-length': '386', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '76d451c9-e77a-4f9f-8862-33cf52f7b89c', + 'request-id': '8246f5bc-d5bc-4cda-a329-e5198fc619e3', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:31:07 GMT', + date: 'Tue, 11 Dec 2018 18:48:41 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_fail_to_delete_a_non-existant_pool.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_fail_to_delete_a_non-existant_pool.nock.js index 844cff7015..92d1612ccc 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_fail_to_delete_a_non-existant_pool.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_fail_to_delete_a_non-existant_pool.nock.js @@ -1,36 +1,36 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .delete('/pools/nodesdktestpool1?api-version=2018-08-01.7.0') - .reply(409, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element\",\"code\":\"PoolBeingDeleted\",\"message\":{\r\n \"lang\":\"en-US\",\"value\":\"The specified pool has been marked for deletion and is being reclaimed.\\nRequestId:0061979e-1130-4d93-a3ae-ccd26e802420\\nTime:2018-08-21T20:31:07.1465526Z\"\r\n }\r\n}", { 'content-length': '377', +nock('http://test3.westcentralus.batch.azure.com:443') + .delete('/pools/nodesdktestpool1?api-version=2018-12-01.8.0') + .reply(409, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element\",\"code\":\"PoolBeingDeleted\",\"message\":{\r\n \"lang\":\"en-US\",\"value\":\"The specified pool has been marked for deletion and is being reclaimed.\\nRequestId:40e1b546-ca6e-463e-902b-45abb39179c0\\nTime:2018-12-11T18:48:41.2592323Z\"\r\n }\r\n}", { 'content-length': '374', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '0061979e-1130-4d93-a3ae-ccd26e802420', + 'request-id': '40e1b546-ca6e-463e-902b-45abb39179c0', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:31:07 GMT', + date: 'Tue, 11 Dec 2018 18:48:40 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .delete('/pools/nodesdktestpool1?api-version=2018-08-01.7.0') - .reply(409, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element\",\"code\":\"PoolBeingDeleted\",\"message\":{\r\n \"lang\":\"en-US\",\"value\":\"The specified pool has been marked for deletion and is being reclaimed.\\nRequestId:0061979e-1130-4d93-a3ae-ccd26e802420\\nTime:2018-08-21T20:31:07.1465526Z\"\r\n }\r\n}", { 'content-length': '377', +nock('https://test3.westcentralus.batch.azure.com:443') + .delete('/pools/nodesdktestpool1?api-version=2018-12-01.8.0') + .reply(409, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element\",\"code\":\"PoolBeingDeleted\",\"message\":{\r\n \"lang\":\"en-US\",\"value\":\"The specified pool has been marked for deletion and is being reclaimed.\\nRequestId:40e1b546-ca6e-463e-902b-45abb39179c0\\nTime:2018-12-11T18:48:41.2592323Z\"\r\n }\r\n}", { 'content-length': '374', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '0061979e-1130-4d93-a3ae-ccd26e802420', + 'request-id': '40e1b546-ca6e-463e-902b-45abb39179c0', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:31:07 GMT', + date: 'Tue, 11 Dec 2018 18:48:40 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_fail_to_evaluate_invalid_autoscale_formula.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_fail_to_evaluate_invalid_autoscale_formula.nock.js index 5bb64128d7..5fc7bb5b14 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_fail_to_evaluate_invalid_autoscale_formula.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_fail_to_evaluate_invalid_autoscale_formula.nock.js @@ -1,40 +1,40 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') +nock('http://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/pools/nodesdktestpool1/evaluateautoscale?api-version=2018-08-01.7.0', '*') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.AutoScaleRun\",\"timestamp\":\"2018-08-21T20:25:20.8851144Z\",\"results\":\"$TargetDedicatedNodes=2;$TargetLowPriorityNodes=0;$NodeDeallocationOption=requeue\",\"error\":{\r\n \"code\":\"AutoScalingFormulaEvaluationError\",\"message\":\"The specified auto-scaling formula has evaluation error\",\"values\":[\r\n {\r\n \"name\":\"Message\",\"value\":\"Line 1, Col 1: Undefined symbol: something_useless\"\r\n }\r\n ]\r\n }\r\n}", { 'transfer-encoding': 'chunked', +.post('/pools/nodesdktestpool1/evaluateautoscale?api-version=2018-12-01.8.0', '*') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.AutoScaleRun\",\"timestamp\":\"2018-12-11T18:44:45.3073458Z\",\"results\":\"$TargetDedicatedNodes=2;$TargetLowPriorityNodes=0;$NodeDeallocationOption=requeue\",\"error\":{\r\n \"code\":\"AutoScalingFormulaEvaluationError\",\"message\":\"The specified auto-scaling formula has evaluation error\",\"values\":[\r\n {\r\n \"name\":\"Message\",\"value\":\"Line 1, Col 1: Undefined symbol: something_useless\"\r\n }\r\n ]\r\n }\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '7c59b462-0e1b-461f-9f50-d5e306427691', + 'request-id': '6dba54ba-7761-4ef7-a6c3-0ff226d83cb8', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/evaluateautoscale', - date: 'Tue, 21 Aug 2018 20:25:20 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/evaluateautoscale', + date: 'Tue, 11 Dec 2018 18:44:45 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') +nock('https://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/pools/nodesdktestpool1/evaluateautoscale?api-version=2018-08-01.7.0', '*') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.AutoScaleRun\",\"timestamp\":\"2018-08-21T20:25:20.8851144Z\",\"results\":\"$TargetDedicatedNodes=2;$TargetLowPriorityNodes=0;$NodeDeallocationOption=requeue\",\"error\":{\r\n \"code\":\"AutoScalingFormulaEvaluationError\",\"message\":\"The specified auto-scaling formula has evaluation error\",\"values\":[\r\n {\r\n \"name\":\"Message\",\"value\":\"Line 1, Col 1: Undefined symbol: something_useless\"\r\n }\r\n ]\r\n }\r\n}", { 'transfer-encoding': 'chunked', +.post('/pools/nodesdktestpool1/evaluateautoscale?api-version=2018-12-01.8.0', '*') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.AutoScaleRun\",\"timestamp\":\"2018-12-11T18:44:45.3073458Z\",\"results\":\"$TargetDedicatedNodes=2;$TargetLowPriorityNodes=0;$NodeDeallocationOption=requeue\",\"error\":{\r\n \"code\":\"AutoScalingFormulaEvaluationError\",\"message\":\"The specified auto-scaling formula has evaluation error\",\"values\":[\r\n {\r\n \"name\":\"Message\",\"value\":\"Line 1, Col 1: Undefined symbol: something_useless\"\r\n }\r\n ]\r\n }\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '7c59b462-0e1b-461f-9f50-d5e306427691', + 'request-id': '6dba54ba-7761-4ef7-a6c3-0ff226d83cb8', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/evaluateautoscale', - date: 'Tue, 21 Aug 2018 20:25:20 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/evaluateautoscale', + date: 'Tue, 11 Dec 2018 18:44:45 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_fail_to_job_preprelease_status.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_fail_to_job_preprelease_status.nock.js index aa160a79c0..a5f9efa662 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_fail_to_job_preprelease_status.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_fail_to_job_preprelease_status.nock.js @@ -1,36 +1,36 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .get('/jobs/HelloWorldJobNodeSDKTest/jobpreparationandreleasetaskstatus?api-version=2018-08-01.7.0') - .reply(409, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element\",\"code\":\"JobPreparationTaskOrReleaseTaskNotSpecified\",\"message\":{\r\n \"lang\":\"en-US\",\"value\":\"The specified job does not have either job preparation task or job release task.\\nRequestId:c64b5386-cf38-44c7-ba9c-d6a280b6eb02\\nTime:2018-08-21T20:31:01.4981668Z\"\r\n }\r\n}", { 'content-length': '413', +nock('http://test3.westcentralus.batch.azure.com:443') + .get('/jobs/HelloWorldJobNodeSDKTest/jobpreparationandreleasetaskstatus?api-version=2018-12-01.8.0') + .reply(409, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element\",\"code\":\"JobPreparationTaskOrReleaseTaskNotSpecified\",\"message\":{\r\n \"lang\":\"en-US\",\"value\":\"The specified job does not have either job preparation task or job release task.\\nRequestId:d4dd885f-3013-4875-bf69-51e77c83c72b\\nTime:2018-12-11T18:48:35.9505776Z\"\r\n }\r\n}", { 'content-length': '410', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'c64b5386-cf38-44c7-ba9c-d6a280b6eb02', + 'request-id': 'd4dd885f-3013-4875-bf69-51e77c83c72b', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:31:01 GMT', + date: 'Tue, 11 Dec 2018 18:48:35 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .get('/jobs/HelloWorldJobNodeSDKTest/jobpreparationandreleasetaskstatus?api-version=2018-08-01.7.0') - .reply(409, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element\",\"code\":\"JobPreparationTaskOrReleaseTaskNotSpecified\",\"message\":{\r\n \"lang\":\"en-US\",\"value\":\"The specified job does not have either job preparation task or job release task.\\nRequestId:c64b5386-cf38-44c7-ba9c-d6a280b6eb02\\nTime:2018-08-21T20:31:01.4981668Z\"\r\n }\r\n}", { 'content-length': '413', +nock('https://test3.westcentralus.batch.azure.com:443') + .get('/jobs/HelloWorldJobNodeSDKTest/jobpreparationandreleasetaskstatus?api-version=2018-12-01.8.0') + .reply(409, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element\",\"code\":\"JobPreparationTaskOrReleaseTaskNotSpecified\",\"message\":{\r\n \"lang\":\"en-US\",\"value\":\"The specified job does not have either job preparation task or job release task.\\nRequestId:d4dd885f-3013-4875-bf69-51e77c83c72b\\nTime:2018-12-11T18:48:35.9505776Z\"\r\n }\r\n}", { 'content-length': '410', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'c64b5386-cf38-44c7-ba9c-d6a280b6eb02', + 'request-id': 'd4dd885f-3013-4875-bf69-51e77c83c72b', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:31:01 GMT', + date: 'Tue, 11 Dec 2018 18:48:35 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_fail_to_list_pools_with_invalid_max.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_fail_to_list_pools_with_invalid_max.nock.js index 32cc0863e7..eff3b14bb4 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_fail_to_list_pools_with_invalid_max.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_fail_to_list_pools_with_invalid_max.nock.js @@ -1,36 +1,36 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .get('/pools?api-version=2018-08-01.7.0&maxresults=-5') - .reply(400, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element\",\"code\":\"InvalidQueryParameterValue\",\"message\":{\r\n \"lang\":\"en-US\",\"value\":\"Value for one of the query parameters specified in the request URI is invalid.\\nRequestId:9c8bd763-12ba-4354-9cd2-f2ce11352b50\\nTime:2018-08-21T20:25:22.0719531Z\"\r\n },\"values\":[\r\n {\r\n \"key\":\"QueryParameterName\",\"value\":\"maxresults\"\r\n },{\r\n \"key\":\"QueryParameterValue\",\"value\":\"-5\"\r\n },{\r\n \"key\":\"Reason\",\"value\":\"MaxResults cannot be less than 1\"\r\n }\r\n ]\r\n}", { 'content-length': '610', +nock('http://test3.westcentralus.batch.azure.com:443') + .get('/pools?api-version=2018-12-01.8.0&maxresults=-5') + .reply(400, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element\",\"code\":\"InvalidQueryParameterValue\",\"message\":{\r\n \"lang\":\"en-US\",\"value\":\"Value for one of the query parameters specified in the request URI is invalid.\\nRequestId:dbb3ca33-2810-49c3-9928-49ef30a95355\\nTime:2018-12-11T18:44:46.7402817Z\"\r\n },\"values\":[\r\n {\r\n \"key\":\"QueryParameterName\",\"value\":\"maxresults\"\r\n },{\r\n \"key\":\"QueryParameterValue\",\"value\":\"-5\"\r\n },{\r\n \"key\":\"Reason\",\"value\":\"MaxResults cannot be less than 1\"\r\n }\r\n ]\r\n}", { 'content-length': '607', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '9c8bd763-12ba-4354-9cd2-f2ce11352b50', + 'request-id': 'dbb3ca33-2810-49c3-9928-49ef30a95355', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:25:21 GMT', + date: 'Tue, 11 Dec 2018 18:44:46 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .get('/pools?api-version=2018-08-01.7.0&maxresults=-5') - .reply(400, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element\",\"code\":\"InvalidQueryParameterValue\",\"message\":{\r\n \"lang\":\"en-US\",\"value\":\"Value for one of the query parameters specified in the request URI is invalid.\\nRequestId:9c8bd763-12ba-4354-9cd2-f2ce11352b50\\nTime:2018-08-21T20:25:22.0719531Z\"\r\n },\"values\":[\r\n {\r\n \"key\":\"QueryParameterName\",\"value\":\"maxresults\"\r\n },{\r\n \"key\":\"QueryParameterValue\",\"value\":\"-5\"\r\n },{\r\n \"key\":\"Reason\",\"value\":\"MaxResults cannot be less than 1\"\r\n }\r\n ]\r\n}", { 'content-length': '610', +nock('https://test3.westcentralus.batch.azure.com:443') + .get('/pools?api-version=2018-12-01.8.0&maxresults=-5') + .reply(400, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element\",\"code\":\"InvalidQueryParameterValue\",\"message\":{\r\n \"lang\":\"en-US\",\"value\":\"Value for one of the query parameters specified in the request URI is invalid.\\nRequestId:dbb3ca33-2810-49c3-9928-49ef30a95355\\nTime:2018-12-11T18:44:46.7402817Z\"\r\n },\"values\":[\r\n {\r\n \"key\":\"QueryParameterName\",\"value\":\"maxresults\"\r\n },{\r\n \"key\":\"QueryParameterValue\",\"value\":\"-5\"\r\n },{\r\n \"key\":\"Reason\",\"value\":\"MaxResults cannot be less than 1\"\r\n }\r\n ]\r\n}", { 'content-length': '607', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '9c8bd763-12ba-4354-9cd2-f2ce11352b50', + 'request-id': 'dbb3ca33-2810-49c3-9928-49ef30a95355', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:25:21 GMT', + date: 'Tue, 11 Dec 2018 18:44:46 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_fail_to_upload_pool_node_logs_at_paas_pool.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_fail_to_upload_pool_node_logs_at_paas_pool.nock.js index 78ea4e7a8f..9793d2342d 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_fail_to_upload_pool_node_logs_at_paas_pool.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_fail_to_upload_pool_node_logs_at_paas_pool.nock.js @@ -1,38 +1,38 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') +nock('http://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/pools/nodesdktestpool1/nodes/tvm-14141481_2-20180821t200555z/uploadbatchservicelogs?api-version=2018-08-01.7.0', '*') - .reply(403, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element\",\"code\":\"TVMCurrentOperationUnsupported\",\"message\":{\r\n \"lang\":\"en-US\",\"value\":\"The specified compute node does not support the current operation.\\nRequestId:62a7e811-f7c3-45fd-86e2-93bfc52af41c\\nTime:2018-08-21T20:23:12.4967814Z\"\r\n }\r\n}", { 'content-length': '386', +.post('/pools/nodesdktestpool1/nodes/tvmps_15c61fea08a34e0fe431ba70cdf2156682bec1e01fdda442f2dccde21908ed91_d/uploadbatchservicelogs?api-version=2018-12-01.8.0', '*') + .reply(403, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element\",\"code\":\"TVMCurrentOperationUnsupported\",\"message\":{\r\n \"lang\":\"en-US\",\"value\":\"The specified compute node does not support the current operation.\\nRequestId:991757a2-23ff-42b7-bb4e-e3e8e7c42382\\nTime:2018-12-11T18:42:35.4037350Z\"\r\n }\r\n}", { 'content-length': '386', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '62a7e811-f7c3-45fd-86e2-93bfc52af41c', + 'request-id': '991757a2-23ff-42b7-bb4e-e3e8e7c42382', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:23:12 GMT', + date: 'Tue, 11 Dec 2018 18:42:35 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') +nock('https://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/pools/nodesdktestpool1/nodes/tvm-14141481_2-20180821t200555z/uploadbatchservicelogs?api-version=2018-08-01.7.0', '*') - .reply(403, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element\",\"code\":\"TVMCurrentOperationUnsupported\",\"message\":{\r\n \"lang\":\"en-US\",\"value\":\"The specified compute node does not support the current operation.\\nRequestId:62a7e811-f7c3-45fd-86e2-93bfc52af41c\\nTime:2018-08-21T20:23:12.4967814Z\"\r\n }\r\n}", { 'content-length': '386', +.post('/pools/nodesdktestpool1/nodes/tvmps_15c61fea08a34e0fe431ba70cdf2156682bec1e01fdda442f2dccde21908ed91_d/uploadbatchservicelogs?api-version=2018-12-01.8.0', '*') + .reply(403, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element\",\"code\":\"TVMCurrentOperationUnsupported\",\"message\":{\r\n \"lang\":\"en-US\",\"value\":\"The specified compute node does not support the current operation.\\nRequestId:991757a2-23ff-42b7-bb4e-e3e8e7c42382\\nTime:2018-12-11T18:42:35.4037350Z\"\r\n }\r\n}", { 'content-length': '386', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '62a7e811-f7c3-45fd-86e2-93bfc52af41c', + 'request-id': '991757a2-23ff-42b7-bb4e-e3e8e7c42382', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:23:12 GMT', + date: 'Tue, 11 Dec 2018 18:42:35 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_get_a_compute_node_reference.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_get_a_compute_node_reference.nock.js index aad66de8d1..ca27852a6c 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_get_a_compute_node_reference.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_get_a_compute_node_reference.nock.js @@ -1,36 +1,36 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .get('/pools/nodesdktestpool1/nodes/tvm-14141481_1-20180821t200555z?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#nodes/@Element\",\"id\":\"tvm-14141481_1-20180821t200555z\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvm-14141481_1-20180821t200555z\",\"state\":\"idle\",\"schedulingState\":\"enabled\",\"stateTransitionTime\":\"2018-08-21T20:11:08.719254Z\",\"lastBootTime\":\"2018-08-21T20:11:06.8907256Z\",\"allocationTime\":\"2018-08-21T20:05:55.1606562Z\",\"ipAddress\":\"10.0.0.4\",\"affinityId\":\"TVM:tvm-14141481_1-20180821t200555z\",\"vmSize\":\"small\",\"totalTasksRun\":0,\"totalTasksSucceeded\":0,\"runningTasksCount\":0,\"startTask\":{\r\n \"commandLine\":\"cmd /c echo hello > hello.txt\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"maxTaskRetryCount\":0,\"waitForSuccess\":false\r\n },\"startTaskInfo\":{\r\n \"state\":\"completed\",\"startTime\":\"2018-08-21T20:11:08.719254Z\",\"endTime\":\"2018-08-21T20:11:08.863251Z\",\"exitCode\":0,\"result\":\"Success\",\"retryCount\":0\r\n },\"isDedicated\":true\r\n}", { 'transfer-encoding': 'chunked', +nock('http://test3.westcentralus.batch.azure.com:443') + .get('/pools/nodesdktestpool1/nodes/tvmps_13cf4cee9dd1594f9da06399ef98ede3e5a4010f3233627c3837a43dbeff5868_d?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#nodes/@Element\",\"id\":\"tvmps_13cf4cee9dd1594f9da06399ef98ede3e5a4010f3233627c3837a43dbeff5868_d\",\"url\":\"https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvmps_13cf4cee9dd1594f9da06399ef98ede3e5a4010f3233627c3837a43dbeff5868_d\",\"state\":\"idle\",\"schedulingState\":\"enabled\",\"stateTransitionTime\":\"2018-12-11T18:31:53.241665Z\",\"lastBootTime\":\"2018-12-11T18:31:51.8606Z\",\"allocationTime\":\"2018-12-11T18:28:36.9291366Z\",\"ipAddress\":\"10.0.0.4\",\"affinityId\":\"TVM:tvmps_13cf4cee9dd1594f9da06399ef98ede3e5a4010f3233627c3837a43dbeff5868_d\",\"vmSize\":\"small\",\"totalTasksRun\":0,\"totalTasksSucceeded\":0,\"runningTasksCount\":0,\"startTask\":{\r\n \"commandLine\":\"cmd /c echo hello > hello.txt\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"maxTaskRetryCount\":0,\"waitForSuccess\":false\r\n },\"startTaskInfo\":{\r\n \"state\":\"completed\",\"startTime\":\"2018-12-11T18:31:53.224154Z\",\"endTime\":\"2018-12-11T18:31:53.920595Z\",\"exitCode\":0,\"result\":\"success\",\"retryCount\":0\r\n },\"certificateReferences\":[\r\n \r\n ],\"isDedicated\":true,\"endpointConfiguration\":{\r\n \"inboundEndpoints\":[\r\n {\r\n \"name\":\"Microsoft.WindowsAzure.Plugins.RemoteForwarder.RdpInput\",\"protocol\":\"tcp\",\"publicIPAddress\":\"13.77.205.84\",\"frontendPort\":3389,\"backendPort\":20000\r\n }\r\n ]\r\n },\"nodeAgentInfo\":{\r\n \"lastUpdateTime\":\"2018-12-11T18:31:51.8606Z\",\"version\":\"1.4.7\"\r\n }\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '18f30c3b-238a-42e2-a7a4-4982aab6b0bb', + 'request-id': '78403841-058d-4b1e-8327-b1c4d0c15d4f', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:23:09 GMT', + date: 'Tue, 11 Dec 2018 18:42:30 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .get('/pools/nodesdktestpool1/nodes/tvm-14141481_1-20180821t200555z?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#nodes/@Element\",\"id\":\"tvm-14141481_1-20180821t200555z\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvm-14141481_1-20180821t200555z\",\"state\":\"idle\",\"schedulingState\":\"enabled\",\"stateTransitionTime\":\"2018-08-21T20:11:08.719254Z\",\"lastBootTime\":\"2018-08-21T20:11:06.8907256Z\",\"allocationTime\":\"2018-08-21T20:05:55.1606562Z\",\"ipAddress\":\"10.0.0.4\",\"affinityId\":\"TVM:tvm-14141481_1-20180821t200555z\",\"vmSize\":\"small\",\"totalTasksRun\":0,\"totalTasksSucceeded\":0,\"runningTasksCount\":0,\"startTask\":{\r\n \"commandLine\":\"cmd /c echo hello > hello.txt\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"maxTaskRetryCount\":0,\"waitForSuccess\":false\r\n },\"startTaskInfo\":{\r\n \"state\":\"completed\",\"startTime\":\"2018-08-21T20:11:08.719254Z\",\"endTime\":\"2018-08-21T20:11:08.863251Z\",\"exitCode\":0,\"result\":\"Success\",\"retryCount\":0\r\n },\"isDedicated\":true\r\n}", { 'transfer-encoding': 'chunked', +nock('https://test3.westcentralus.batch.azure.com:443') + .get('/pools/nodesdktestpool1/nodes/tvmps_13cf4cee9dd1594f9da06399ef98ede3e5a4010f3233627c3837a43dbeff5868_d?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#nodes/@Element\",\"id\":\"tvmps_13cf4cee9dd1594f9da06399ef98ede3e5a4010f3233627c3837a43dbeff5868_d\",\"url\":\"https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvmps_13cf4cee9dd1594f9da06399ef98ede3e5a4010f3233627c3837a43dbeff5868_d\",\"state\":\"idle\",\"schedulingState\":\"enabled\",\"stateTransitionTime\":\"2018-12-11T18:31:53.241665Z\",\"lastBootTime\":\"2018-12-11T18:31:51.8606Z\",\"allocationTime\":\"2018-12-11T18:28:36.9291366Z\",\"ipAddress\":\"10.0.0.4\",\"affinityId\":\"TVM:tvmps_13cf4cee9dd1594f9da06399ef98ede3e5a4010f3233627c3837a43dbeff5868_d\",\"vmSize\":\"small\",\"totalTasksRun\":0,\"totalTasksSucceeded\":0,\"runningTasksCount\":0,\"startTask\":{\r\n \"commandLine\":\"cmd /c echo hello > hello.txt\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"maxTaskRetryCount\":0,\"waitForSuccess\":false\r\n },\"startTaskInfo\":{\r\n \"state\":\"completed\",\"startTime\":\"2018-12-11T18:31:53.224154Z\",\"endTime\":\"2018-12-11T18:31:53.920595Z\",\"exitCode\":0,\"result\":\"success\",\"retryCount\":0\r\n },\"certificateReferences\":[\r\n \r\n ],\"isDedicated\":true,\"endpointConfiguration\":{\r\n \"inboundEndpoints\":[\r\n {\r\n \"name\":\"Microsoft.WindowsAzure.Plugins.RemoteForwarder.RdpInput\",\"protocol\":\"tcp\",\"publicIPAddress\":\"13.77.205.84\",\"frontendPort\":3389,\"backendPort\":20000\r\n }\r\n ]\r\n },\"nodeAgentInfo\":{\r\n \"lastUpdateTime\":\"2018-12-11T18:31:51.8606Z\",\"version\":\"1.4.7\"\r\n }\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '18f30c3b-238a-42e2-a7a4-4982aab6b0bb', + 'request-id': '78403841-058d-4b1e-8327-b1c4d0c15d4f', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:23:09 GMT', + date: 'Tue, 11 Dec 2018 18:42:30 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_get_a_job_reference_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_get_a_job_reference_successfully.nock.js index f70216ad68..f86bd86f69 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_get_a_job_reference_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_get_a_job_reference_successfully.nock.js @@ -1,40 +1,40 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .get('/jobs/HelloWorldJobNodeSDKTest?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#jobs/@Element\",\"id\":\"HelloWorldJobNodeSDKTest\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest\",\"eTag\":\"0x8D607A4396C0D8C\",\"lastModified\":\"2018-08-21T20:25:23.8917516Z\",\"creationTime\":\"2018-08-21T20:25:23.5846713Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-08-21T20:25:23.6076746Z\",\"priority\":500,\"usesTaskDependencies\":false,\"constraints\":{\r\n \"maxWallClockTime\":\"P10675199DT2H48M5.4775807S\",\"maxTaskRetryCount\":3\r\n },\"poolInfo\":{\r\n \"poolId\":\"nodesdktestpool1\"\r\n },\"executionInfo\":{\r\n \"startTime\":\"2018-08-21T20:25:23.6076746Z\",\"poolId\":\"nodesdktestpool1\"\r\n },\"onAllTasksComplete\":\"noaction\",\"onTaskFailure\":\"noaction\"\r\n}", { 'transfer-encoding': 'chunked', +nock('http://test3.westcentralus.batch.azure.com:443') + .get('/jobs/HelloWorldJobNodeSDKTest?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#jobs/@Element\",\"id\":\"HelloWorldJobNodeSDKTest\",\"url\":\"https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest\",\"eTag\":\"0x8D65F98BAA7B3B8\",\"lastModified\":\"2018-12-11T18:44:49.072428Z\",\"creationTime\":\"2018-12-11T18:44:48.660002Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-12-11T18:44:48.6770031Z\",\"priority\":500,\"usesTaskDependencies\":false,\"constraints\":{\r\n \"maxWallClockTime\":\"P10675199DT2H48M5.4775807S\",\"maxTaskRetryCount\":3\r\n },\"poolInfo\":{\r\n \"poolId\":\"nodesdktestpool1\"\r\n },\"executionInfo\":{\r\n \"startTime\":\"2018-12-11T18:44:48.6770031Z\",\"poolId\":\"nodesdktestpool1\"\r\n },\"onAllTasksComplete\":\"noaction\",\"onTaskFailure\":\"noaction\"\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', - 'last-modified': 'Tue, 21 Aug 2018 20:25:23 GMT', - etag: '0x8D607A4396C0D8C', + 'last-modified': 'Tue, 11 Dec 2018 18:44:49 GMT', + etag: '0x8D65F98BAA7B3B8', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '48237bb7-af49-462c-8793-11c154c658b9', + 'request-id': 'df0ba959-923e-419b-9921-a5301163ace1', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:31:01 GMT', + date: 'Tue, 11 Dec 2018 18:48:35 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .get('/jobs/HelloWorldJobNodeSDKTest?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#jobs/@Element\",\"id\":\"HelloWorldJobNodeSDKTest\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest\",\"eTag\":\"0x8D607A4396C0D8C\",\"lastModified\":\"2018-08-21T20:25:23.8917516Z\",\"creationTime\":\"2018-08-21T20:25:23.5846713Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-08-21T20:25:23.6076746Z\",\"priority\":500,\"usesTaskDependencies\":false,\"constraints\":{\r\n \"maxWallClockTime\":\"P10675199DT2H48M5.4775807S\",\"maxTaskRetryCount\":3\r\n },\"poolInfo\":{\r\n \"poolId\":\"nodesdktestpool1\"\r\n },\"executionInfo\":{\r\n \"startTime\":\"2018-08-21T20:25:23.6076746Z\",\"poolId\":\"nodesdktestpool1\"\r\n },\"onAllTasksComplete\":\"noaction\",\"onTaskFailure\":\"noaction\"\r\n}", { 'transfer-encoding': 'chunked', +nock('https://test3.westcentralus.batch.azure.com:443') + .get('/jobs/HelloWorldJobNodeSDKTest?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#jobs/@Element\",\"id\":\"HelloWorldJobNodeSDKTest\",\"url\":\"https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest\",\"eTag\":\"0x8D65F98BAA7B3B8\",\"lastModified\":\"2018-12-11T18:44:49.072428Z\",\"creationTime\":\"2018-12-11T18:44:48.660002Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-12-11T18:44:48.6770031Z\",\"priority\":500,\"usesTaskDependencies\":false,\"constraints\":{\r\n \"maxWallClockTime\":\"P10675199DT2H48M5.4775807S\",\"maxTaskRetryCount\":3\r\n },\"poolInfo\":{\r\n \"poolId\":\"nodesdktestpool1\"\r\n },\"executionInfo\":{\r\n \"startTime\":\"2018-12-11T18:44:48.6770031Z\",\"poolId\":\"nodesdktestpool1\"\r\n },\"onAllTasksComplete\":\"noaction\",\"onTaskFailure\":\"noaction\"\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', - 'last-modified': 'Tue, 21 Aug 2018 20:25:23 GMT', - etag: '0x8D607A4396C0D8C', + 'last-modified': 'Tue, 11 Dec 2018 18:44:49 GMT', + etag: '0x8D65F98BAA7B3B8', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '48237bb7-af49-462c-8793-11c154c658b9', + 'request-id': 'df0ba959-923e-419b-9921-a5301163ace1', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:31:01 GMT', + date: 'Tue, 11 Dec 2018 18:48:35 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_get_a_job_schedule_reference_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_get_a_job_schedule_reference_successfully.nock.js index 0308a04fa2..cb144cd067 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_get_a_job_schedule_reference_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_get_a_job_schedule_reference_successfully.nock.js @@ -1,40 +1,40 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .get('/jobschedules/NodeSDKTestSchedule?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#jobschedules/@Element\",\"id\":\"NodeSDKTestSchedule\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/jobschedules/NodeSDKTestSchedule\",\"eTag\":\"0x8D607A503E9DDB3\",\"lastModified\":\"2018-08-21T20:31:03.6160435Z\",\"creationTime\":\"2018-08-21T20:31:03.6160435Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-08-21T20:31:03.6160435Z\",\"schedule\":{\r\n \"doNotRunUntil\":\"2018-08-25T07:00:00Z\",\"startWindow\":\"PT6M\"\r\n },\"jobSpecification\":{\r\n \"priority\":0,\"usesTaskDependencies\":false,\"onAllTasksComplete\":\"noaction\",\"onTaskFailure\":\"noaction\",\"constraints\":{\r\n \"maxWallClockTime\":\"P10675199DT2H48M5.4775807S\",\"maxTaskRetryCount\":0\r\n },\"poolInfo\":{\r\n \"poolId\":\"nodesdktestpool1\"\r\n }\r\n },\"executionInfo\":{\r\n \"nextRunTime\":\"2018-08-25T07:00:00Z\"\r\n }\r\n}", { 'transfer-encoding': 'chunked', +nock('http://test3.westcentralus.batch.azure.com:443') + .get('/jobschedules/NodeSDKTestSchedule?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#jobschedules/@Element\",\"id\":\"NodeSDKTestSchedule\",\"url\":\"https://test3.westcentralus.batch.azure.com/jobschedules/NodeSDKTestSchedule\",\"eTag\":\"0x8D65FAC2F4D7E17\",\"lastModified\":\"2018-12-11T21:04:05.2125207Z\",\"creationTime\":\"2018-12-11T21:04:05.2125207Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-12-11T21:04:05.2125207Z\",\"schedule\":{\r\n \"doNotRunUntil\":\"2018-12-25T08:00:00Z\",\"startWindow\":\"PT6M\"\r\n },\"jobSpecification\":{\r\n \"priority\":0,\"usesTaskDependencies\":false,\"onAllTasksComplete\":\"noaction\",\"onTaskFailure\":\"noaction\",\"constraints\":{\r\n \"maxWallClockTime\":\"P10675199DT2H48M5.4775807S\",\"maxTaskRetryCount\":0\r\n },\"poolInfo\":{\r\n \"poolId\":\"nodesdktestpool1\"\r\n }\r\n },\"executionInfo\":{\r\n \"nextRunTime\":\"2018-12-25T08:00:00Z\"\r\n }\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', - 'last-modified': 'Tue, 21 Aug 2018 20:31:03 GMT', - etag: '0x8D607A503E9DDB3', + 'last-modified': 'Tue, 11 Dec 2018 21:04:05 GMT', + etag: '0x8D65FAC2F4D7E17', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'eb116f71-2e08-43c7-bc1e-2a83e7985922', + 'request-id': '35dc5414-970d-4178-945b-57507a31f4d9', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:31:03 GMT', + date: 'Tue, 11 Dec 2018 21:04:05 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .get('/jobschedules/NodeSDKTestSchedule?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#jobschedules/@Element\",\"id\":\"NodeSDKTestSchedule\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/jobschedules/NodeSDKTestSchedule\",\"eTag\":\"0x8D607A503E9DDB3\",\"lastModified\":\"2018-08-21T20:31:03.6160435Z\",\"creationTime\":\"2018-08-21T20:31:03.6160435Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-08-21T20:31:03.6160435Z\",\"schedule\":{\r\n \"doNotRunUntil\":\"2018-08-25T07:00:00Z\",\"startWindow\":\"PT6M\"\r\n },\"jobSpecification\":{\r\n \"priority\":0,\"usesTaskDependencies\":false,\"onAllTasksComplete\":\"noaction\",\"onTaskFailure\":\"noaction\",\"constraints\":{\r\n \"maxWallClockTime\":\"P10675199DT2H48M5.4775807S\",\"maxTaskRetryCount\":0\r\n },\"poolInfo\":{\r\n \"poolId\":\"nodesdktestpool1\"\r\n }\r\n },\"executionInfo\":{\r\n \"nextRunTime\":\"2018-08-25T07:00:00Z\"\r\n }\r\n}", { 'transfer-encoding': 'chunked', +nock('https://test3.westcentralus.batch.azure.com:443') + .get('/jobschedules/NodeSDKTestSchedule?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#jobschedules/@Element\",\"id\":\"NodeSDKTestSchedule\",\"url\":\"https://test3.westcentralus.batch.azure.com/jobschedules/NodeSDKTestSchedule\",\"eTag\":\"0x8D65FAC2F4D7E17\",\"lastModified\":\"2018-12-11T21:04:05.2125207Z\",\"creationTime\":\"2018-12-11T21:04:05.2125207Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-12-11T21:04:05.2125207Z\",\"schedule\":{\r\n \"doNotRunUntil\":\"2018-12-25T08:00:00Z\",\"startWindow\":\"PT6M\"\r\n },\"jobSpecification\":{\r\n \"priority\":0,\"usesTaskDependencies\":false,\"onAllTasksComplete\":\"noaction\",\"onTaskFailure\":\"noaction\",\"constraints\":{\r\n \"maxWallClockTime\":\"P10675199DT2H48M5.4775807S\",\"maxTaskRetryCount\":0\r\n },\"poolInfo\":{\r\n \"poolId\":\"nodesdktestpool1\"\r\n }\r\n },\"executionInfo\":{\r\n \"nextRunTime\":\"2018-12-25T08:00:00Z\"\r\n }\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', - 'last-modified': 'Tue, 21 Aug 2018 20:31:03 GMT', - etag: '0x8D607A503E9DDB3', + 'last-modified': 'Tue, 11 Dec 2018 21:04:05 GMT', + etag: '0x8D65FAC2F4D7E17', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'eb116f71-2e08-43c7-bc1e-2a83e7985922', + 'request-id': '35dc5414-970d-4178-945b-57507a31f4d9', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:31:03 GMT', + date: 'Tue, 11 Dec 2018 21:04:05 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_get_a_pool_reference_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_get_a_pool_reference_successfully.nock.js index 958beabbb4..725fea72cf 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_get_a_pool_reference_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_get_a_pool_reference_successfully.nock.js @@ -1,40 +1,40 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .get('/pools/nodesdktestpool1?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#pools/@Element\",\"id\":\"nodesdktestpool1\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1\",\"eTag\":\"0x8D607A20760C002\",\"lastModified\":\"2018-08-21T20:09:40.9381378Z\",\"creationTime\":\"2018-08-21T20:05:04.4042325Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-08-21T20:05:04.4042325Z\",\"allocationState\":\"steady\",\"allocationStateTransitionTime\":\"2018-08-21T20:05:58.6896528Z\",\"vmSize\":\"small\",\"resizeTimeout\":\"PT15M\",\"currentDedicatedNodes\":3,\"targetDedicatedNodes\":3,\"currentLowPriorityNodes\":0,\"targetLowPriorityNodes\":0,\"enableAutoScale\":false,\"enableInterNodeCommunication\":false,\"startTask\":{\r\n \"commandLine\":\"cmd /c echo hello > hello.txt\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"maxTaskRetryCount\":0,\"waitForSuccess\":false\r\n },\"userAccounts\":[\r\n {\r\n \"name\":\"nonAdminUser\",\"elevationLevel\":\"nonadmin\"\r\n }\r\n ],\"metadata\":[\r\n {\r\n \"name\":\"foo2\",\"value\":\"bar2\"\r\n }\r\n ],\"maxTasksPerNode\":1,\"taskSchedulingPolicy\":{\r\n \"nodeFillType\":\"Spread\"\r\n },\"cloudServiceConfiguration\":{\r\n \"osFamily\":\"4\",\"targetOSVersion\":\"*\",\"currentOSVersion\":\"*\"\r\n }\r\n}", { 'transfer-encoding': 'chunked', +nock('http://test3.westcentralus.batch.azure.com:443') + .get('/pools/nodesdktestpool1?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#pools/@Element\",\"id\":\"nodesdktestpool1\",\"url\":\"https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1\",\"eTag\":\"0x8D65F9686C8060D\",\"lastModified\":\"2018-12-11T18:29:03.0492685Z\",\"creationTime\":\"2018-12-11T18:27:21.0984288Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-12-11T18:27:21.0984288Z\",\"allocationState\":\"steady\",\"allocationStateTransitionTime\":\"2018-12-11T18:28:37.5483444Z\",\"vmSize\":\"small\",\"resizeTimeout\":\"PT15M\",\"currentDedicatedNodes\":3,\"targetDedicatedNodes\":3,\"currentLowPriorityNodes\":0,\"targetLowPriorityNodes\":0,\"enableAutoScale\":false,\"enableInterNodeCommunication\":false,\"startTask\":{\r\n \"commandLine\":\"cmd /c echo hello > hello.txt\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"maxTaskRetryCount\":0,\"waitForSuccess\":false\r\n },\"userAccounts\":[\r\n {\r\n \"name\":\"nonAdminUser\",\"elevationLevel\":\"nonadmin\",\"windowsUserConfiguration\":{\r\n \"loginMode\":\"interactive\"\r\n }\r\n }\r\n ],\"certificateReferences\":[\r\n \r\n ],\"metadata\":[\r\n {\r\n \"name\":\"foo2\",\"value\":\"bar2\"\r\n }\r\n ],\"maxTasksPerNode\":1,\"taskSchedulingPolicy\":{\r\n \"nodeFillType\":\"Spread\"\r\n },\"cloudServiceConfiguration\":{\r\n \"osFamily\":\"4\",\"osVersion\":\"*\"\r\n }\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', - 'last-modified': 'Tue, 21 Aug 2018 20:09:40 GMT', - etag: '0x8D607A20760C002', + 'last-modified': 'Tue, 11 Dec 2018 18:29:03 GMT', + etag: '0x8D65F9686C8060D', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '6cb51182-165a-43a7-bc2e-6bfc7350748f', + 'request-id': '27cf0b23-b600-430b-a8d4-05662dcc8615', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:16:21 GMT', + date: 'Tue, 11 Dec 2018 18:35:43 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .get('/pools/nodesdktestpool1?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#pools/@Element\",\"id\":\"nodesdktestpool1\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1\",\"eTag\":\"0x8D607A20760C002\",\"lastModified\":\"2018-08-21T20:09:40.9381378Z\",\"creationTime\":\"2018-08-21T20:05:04.4042325Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-08-21T20:05:04.4042325Z\",\"allocationState\":\"steady\",\"allocationStateTransitionTime\":\"2018-08-21T20:05:58.6896528Z\",\"vmSize\":\"small\",\"resizeTimeout\":\"PT15M\",\"currentDedicatedNodes\":3,\"targetDedicatedNodes\":3,\"currentLowPriorityNodes\":0,\"targetLowPriorityNodes\":0,\"enableAutoScale\":false,\"enableInterNodeCommunication\":false,\"startTask\":{\r\n \"commandLine\":\"cmd /c echo hello > hello.txt\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"maxTaskRetryCount\":0,\"waitForSuccess\":false\r\n },\"userAccounts\":[\r\n {\r\n \"name\":\"nonAdminUser\",\"elevationLevel\":\"nonadmin\"\r\n }\r\n ],\"metadata\":[\r\n {\r\n \"name\":\"foo2\",\"value\":\"bar2\"\r\n }\r\n ],\"maxTasksPerNode\":1,\"taskSchedulingPolicy\":{\r\n \"nodeFillType\":\"Spread\"\r\n },\"cloudServiceConfiguration\":{\r\n \"osFamily\":\"4\",\"targetOSVersion\":\"*\",\"currentOSVersion\":\"*\"\r\n }\r\n}", { 'transfer-encoding': 'chunked', +nock('https://test3.westcentralus.batch.azure.com:443') + .get('/pools/nodesdktestpool1?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#pools/@Element\",\"id\":\"nodesdktestpool1\",\"url\":\"https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1\",\"eTag\":\"0x8D65F9686C8060D\",\"lastModified\":\"2018-12-11T18:29:03.0492685Z\",\"creationTime\":\"2018-12-11T18:27:21.0984288Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-12-11T18:27:21.0984288Z\",\"allocationState\":\"steady\",\"allocationStateTransitionTime\":\"2018-12-11T18:28:37.5483444Z\",\"vmSize\":\"small\",\"resizeTimeout\":\"PT15M\",\"currentDedicatedNodes\":3,\"targetDedicatedNodes\":3,\"currentLowPriorityNodes\":0,\"targetLowPriorityNodes\":0,\"enableAutoScale\":false,\"enableInterNodeCommunication\":false,\"startTask\":{\r\n \"commandLine\":\"cmd /c echo hello > hello.txt\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"maxTaskRetryCount\":0,\"waitForSuccess\":false\r\n },\"userAccounts\":[\r\n {\r\n \"name\":\"nonAdminUser\",\"elevationLevel\":\"nonadmin\",\"windowsUserConfiguration\":{\r\n \"loginMode\":\"interactive\"\r\n }\r\n }\r\n ],\"certificateReferences\":[\r\n \r\n ],\"metadata\":[\r\n {\r\n \"name\":\"foo2\",\"value\":\"bar2\"\r\n }\r\n ],\"maxTasksPerNode\":1,\"taskSchedulingPolicy\":{\r\n \"nodeFillType\":\"Spread\"\r\n },\"cloudServiceConfiguration\":{\r\n \"osFamily\":\"4\",\"osVersion\":\"*\"\r\n }\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', - 'last-modified': 'Tue, 21 Aug 2018 20:09:40 GMT', - etag: '0x8D607A20760C002', + 'last-modified': 'Tue, 11 Dec 2018 18:29:03 GMT', + etag: '0x8D65F9686C8060D', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '6cb51182-165a-43a7-bc2e-6bfc7350748f', + 'request-id': '27cf0b23-b600-430b-a8d4-05662dcc8615', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:16:21 GMT', + date: 'Tue, 11 Dec 2018 18:35:43 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_get_a_pool_reference_with_odata_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_get_a_pool_reference_with_odata_successfully.nock.js index 575f18dd17..b798960877 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_get_a_pool_reference_with_odata_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_get_a_pool_reference_with_odata_successfully.nock.js @@ -1,40 +1,40 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .get('/pools/nodesdktestpool1?api-version=2018-08-01.7.0&$select=id%2Cstate&$expand=stats') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#pools/@Element\",\"id\":\"nodesdktestpool1\",\"state\":\"active\"\r\n}", { 'transfer-encoding': 'chunked', +nock('http://test3.westcentralus.batch.azure.com:443') + .get('/pools/nodesdktestpool1?api-version=2018-12-01.8.0&$select=id%2Cstate&$expand=stats') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#pools/@Element\",\"id\":\"nodesdktestpool1\",\"state\":\"active\"\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', - 'last-modified': 'Tue, 21 Aug 2018 20:09:40 GMT', - etag: '0x8D607A20760C002', + 'last-modified': 'Tue, 11 Dec 2018 18:29:03 GMT', + etag: '0x8D65F9686C8060D', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '7f270ebd-6b11-432f-8334-f28d091456f1', + 'request-id': 'fa62e98d-9045-4cb5-9c04-a118cc9f36f0', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:16:21 GMT', + date: 'Tue, 11 Dec 2018 18:35:43 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .get('/pools/nodesdktestpool1?api-version=2018-08-01.7.0&$select=id%2Cstate&$expand=stats') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#pools/@Element\",\"id\":\"nodesdktestpool1\",\"state\":\"active\"\r\n}", { 'transfer-encoding': 'chunked', +nock('https://test3.westcentralus.batch.azure.com:443') + .get('/pools/nodesdktestpool1?api-version=2018-12-01.8.0&$select=id%2Cstate&$expand=stats') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#pools/@Element\",\"id\":\"nodesdktestpool1\",\"state\":\"active\"\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', - 'last-modified': 'Tue, 21 Aug 2018 20:09:40 GMT', - etag: '0x8D607A20760C002', + 'last-modified': 'Tue, 11 Dec 2018 18:29:03 GMT', + etag: '0x8D65F9686C8060D', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '7f270ebd-6b11-432f-8334-f28d091456f1', + 'request-id': 'fa62e98d-9045-4cb5-9c04-a118cc9f36f0', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:16:21 GMT', + date: 'Tue, 11 Dec 2018 18:35:43 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_get_a_remote_desktop_file_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_get_a_remote_desktop_file_successfully.nock.js index 2145debb62..bbc847dfae 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_get_a_remote_desktop_file_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_get_a_remote_desktop_file_successfully.nock.js @@ -1,36 +1,36 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .get('/pools/nodesdktestpool1/nodes/tvm-14141481_1-20180821t200555z/rdp?api-version=2018-08-01.7.0') - .reply(200, "full address:s:13.78.131.204\r\nLoadBalanceInfo:s:Cookie: mstshash=TVM#TVM_IN_0", { 'transfer-encoding': 'chunked', +nock('http://test3.westcentralus.batch.azure.com:443') + .get('/pools/nodesdktestpool1/nodes/tvmps_13cf4cee9dd1594f9da06399ef98ede3e5a4010f3233627c3837a43dbeff5868_d/rdp?api-version=2018-12-01.8.0') + .reply(200, "full address:s:13.77.205.84\r\nLoadBalanceInfo:s:Cookie: mstshash=TVM#TVM_IN_0", { 'transfer-encoding': 'chunked', 'content-type': 'application/octet-stream', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '8151ec16-4fb1-47a3-b0ed-901d2939016c', + 'request-id': '8498df38-0513-47ba-b3e6-fcf75e60092b', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:23:10 GMT', + date: 'Tue, 11 Dec 2018 18:42:31 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .get('/pools/nodesdktestpool1/nodes/tvm-14141481_1-20180821t200555z/rdp?api-version=2018-08-01.7.0') - .reply(200, "full address:s:13.78.131.204\r\nLoadBalanceInfo:s:Cookie: mstshash=TVM#TVM_IN_0", { 'transfer-encoding': 'chunked', +nock('https://test3.westcentralus.batch.azure.com:443') + .get('/pools/nodesdktestpool1/nodes/tvmps_13cf4cee9dd1594f9da06399ef98ede3e5a4010f3233627c3837a43dbeff5868_d/rdp?api-version=2018-12-01.8.0') + .reply(200, "full address:s:13.77.205.84\r\nLoadBalanceInfo:s:Cookie: mstshash=TVM#TVM_IN_0", { 'transfer-encoding': 'chunked', 'content-type': 'application/octet-stream', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '8151ec16-4fb1-47a3-b0ed-901d2939016c', + 'request-id': '8498df38-0513-47ba-b3e6-fcf75e60092b', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:23:10 GMT', + date: 'Tue, 11 Dec 2018 18:42:31 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_get_all_job_statistics_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_get_all_job_statistics_successfully.nock.js index a62c93b30a..3b0621782b 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_get_all_job_statistics_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_get_all_job_statistics_successfully.nock.js @@ -1,36 +1,36 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .get('/lifetimejobstats?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#jobstats/@Element\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/lifetimejobstats\",\"startTime\":\"2017-10-23T18:57:56.5958966Z\",\"lastUpdateTime\":\"2018-08-21T19:30:00Z\",\"userCPUTime\":\"PT6M17.075S\",\"kernelCPUTime\":\"PT0.563S\",\"wallClockTime\":\"PT6M17.075S\",\"readIOps\":\"130\",\"writeIOps\":\"260\",\"readIOGiB\":6.650388240814209E-05,\"writeIOGiB\":1.6363337635993958E-05,\"numTaskRetries\":\"14\",\"numSucceededTasks\":\"12\",\"numFailedTasks\":\"10\",\"waitTime\":\"PT2H59.09S\"\r\n}", { 'transfer-encoding': 'chunked', +nock('http://test3.westcentralus.batch.azure.com:443') + .get('/lifetimejobstats?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#jobstats/@Element\",\"url\":\"https://test3.westcentralus.batch.azure.com/lifetimejobstats\",\"startTime\":\"2018-12-11T17:38:45.439192Z\",\"lastUpdateTime\":\"2018-12-11T17:38:45.439192Z\",\"userCPUTime\":\"PT0S\",\"kernelCPUTime\":\"PT0S\",\"wallClockTime\":\"PT0S\",\"readIOps\":\"0\",\"writeIOps\":\"0\",\"readIOGiB\":0.0,\"writeIOGiB\":0.0,\"numTaskRetries\":\"0\",\"numSucceededTasks\":\"0\",\"numFailedTasks\":\"0\",\"waitTime\":\"PT0S\"\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '9e5d6186-c118-4673-b335-cf53e3e8deb4', + 'request-id': '025eca35-9e99-4971-93ff-7100ca85bf49', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:31:03 GMT', + date: 'Tue, 11 Dec 2018 18:48:37 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .get('/lifetimejobstats?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#jobstats/@Element\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/lifetimejobstats\",\"startTime\":\"2017-10-23T18:57:56.5958966Z\",\"lastUpdateTime\":\"2018-08-21T19:30:00Z\",\"userCPUTime\":\"PT6M17.075S\",\"kernelCPUTime\":\"PT0.563S\",\"wallClockTime\":\"PT6M17.075S\",\"readIOps\":\"130\",\"writeIOps\":\"260\",\"readIOGiB\":6.650388240814209E-05,\"writeIOGiB\":1.6363337635993958E-05,\"numTaskRetries\":\"14\",\"numSucceededTasks\":\"12\",\"numFailedTasks\":\"10\",\"waitTime\":\"PT2H59.09S\"\r\n}", { 'transfer-encoding': 'chunked', +nock('https://test3.westcentralus.batch.azure.com:443') + .get('/lifetimejobstats?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#jobstats/@Element\",\"url\":\"https://test3.westcentralus.batch.azure.com/lifetimejobstats\",\"startTime\":\"2018-12-11T17:38:45.439192Z\",\"lastUpdateTime\":\"2018-12-11T17:38:45.439192Z\",\"userCPUTime\":\"PT0S\",\"kernelCPUTime\":\"PT0S\",\"wallClockTime\":\"PT0S\",\"readIOps\":\"0\",\"writeIOps\":\"0\",\"readIOGiB\":0.0,\"writeIOGiB\":0.0,\"numTaskRetries\":\"0\",\"numSucceededTasks\":\"0\",\"numFailedTasks\":\"0\",\"waitTime\":\"PT0S\"\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '9e5d6186-c118-4673-b335-cf53e3e8deb4', + 'request-id': '025eca35-9e99-4971-93ff-7100ca85bf49', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:31:03 GMT', + date: 'Tue, 11 Dec 2018 18:48:37 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_get_application_reference_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_get_application_reference_successfully.nock.js index de7c7263e0..4601325f67 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_get_application_reference_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_get_application_reference_successfully.nock.js @@ -1,36 +1,36 @@ -// This file has been autogenerated. - -exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; -}; - +// This file has been autogenerated. + +exports.setEnvironment = function() { + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; +}; + exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .get('/applications/my_application_id?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#getapplicationsummaryresponse/@Element\",\"id\":\"my_application_id\",\"versions\":[\r\n \"v1.0\"\r\n ],\"displayName\":\"my_updated_name\"\r\n}", { 'transfer-encoding': 'chunked', +nock('http://test3.westcentralus.batch.azure.com:443') + .get('/applications/my_application_id?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#getapplicationsummaryresponse/@Element\",\"id\":\"my_application_id\",\"versions\":[\r\n \"1.0\"\r\n ]\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'f5d26ac0-5953-4ac0-97bc-a9893a43ec35', + 'request-id': '752ac876-9fcf-4147-a7ab-6edffffa8381', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:31:00 GMT', + date: 'Tue, 11 Dec 2018 18:48:34 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .get('/applications/my_application_id?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#getapplicationsummaryresponse/@Element\",\"id\":\"my_application_id\",\"versions\":[\r\n \"v1.0\"\r\n ],\"displayName\":\"my_updated_name\"\r\n}", { 'transfer-encoding': 'chunked', +nock('https://test3.westcentralus.batch.azure.com:443') + .get('/applications/my_application_id?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#getapplicationsummaryresponse/@Element\",\"id\":\"my_application_id\",\"versions\":[\r\n \"1.0\"\r\n ]\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'f5d26ac0-5953-4ac0-97bc-a9893a43ec35', + 'request-id': '752ac876-9fcf-4147-a7ab-6edffffa8381', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:31:00 GMT', + date: 'Tue, 11 Dec 2018 18:48:34 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_get_certificate_reference_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_get_certificate_reference_successfully.nock.js index bfba8b42ce..80e02b6594 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_get_certificate_reference_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_get_certificate_reference_successfully.nock.js @@ -1,36 +1,36 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .get('/certificates(thumbprintAlgorithm=sha1,thumbprint=cff2ab63c8c955aaf71989efa641b906558d9fb7)?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#certificates/@Element\",\"thumbprint\":\"cff2ab63c8c955aaf71989efa641b906558d9fb7\",\"thumbprintAlgorithm\":\"sha1\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/certificates(thumbprintAlgorithm=sha1,thumbprint=cff2ab63c8c955aaf71989efa641b906558d9fb7)\",\"state\":\"active\",\"stateTransitionTime\":\"2018-08-21T20:05:03.6975129Z\",\"publicData\":\"MIIBrzCCAV2gAwIBAgIQHZGt2k0LCLFKYYCFxlJnkTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC1Jvb3QgQWdlbmN5MB4XDTE2MDEwMTA3MDAwMFoXDTE4MDEwMTA3MDAwMFowEjEQMA4GA1UEAxMHbm9kZXNkazCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAuX4XMWyR8cQRCA81TjHOerNOFOpOBj2O8jEdZvqwRlUYgMleEY2OlPd+nalxwlQ9+qbNkNGfjnhIMgiJ5CMlXgdRMF3E6DnMnktmHFG9L0VmQ6Lgt7bhXR8IitRHeYlvy5LJlw6Lcle5Kas2j4ThYjLQbjBMDSXD4HvZNe4UYEUCAwEAAaNLMEkwRwYDVR0BBEAwPoAQEuQJLQYdHU8AjWEh3BZkY6EYMBYxFDASBgNVBAMTC1Jvb3QgQWdlbmN5ghAGN2wAqgBkihHPuNSqXDX0MAkGBSsOAwIdBQADQQB5djPe0G6c3Z8DuR6EQbIhBMTnC0zYPhigq+x1LG83761Ir8PiSy+6oxwCHOaYZyvheW0PByntC/WFwUipfn78\"\r\n}", { 'transfer-encoding': 'chunked', +nock('http://test3.westcentralus.batch.azure.com:443') + .get('/certificates(thumbprintAlgorithm=sha1,thumbprint=cff2ab63c8c955aaf71989efa641b906558d9fb7)?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#certificates/@Element\",\"thumbprint\":\"cff2ab63c8c955aaf71989efa641b906558d9fb7\",\"thumbprintAlgorithm\":\"sha1\",\"url\":\"https://test3.westcentralus.batch.azure.com/certificates(thumbprintAlgorithm=sha1,thumbprint=cff2ab63c8c955aaf71989efa641b906558d9fb7)\",\"state\":\"active\",\"stateTransitionTime\":\"2018-12-11T18:27:20.1209305Z\",\"publicData\":\"MIIBrzCCAV2gAwIBAgIQHZGt2k0LCLFKYYCFxlJnkTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC1Jvb3QgQWdlbmN5MB4XDTE2MDEwMTA3MDAwMFoXDTE4MDEwMTA3MDAwMFowEjEQMA4GA1UEAxMHbm9kZXNkazCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAuX4XMWyR8cQRCA81TjHOerNOFOpOBj2O8jEdZvqwRlUYgMleEY2OlPd+nalxwlQ9+qbNkNGfjnhIMgiJ5CMlXgdRMF3E6DnMnktmHFG9L0VmQ6Lgt7bhXR8IitRHeYlvy5LJlw6Lcle5Kas2j4ThYjLQbjBMDSXD4HvZNe4UYEUCAwEAAaNLMEkwRwYDVR0BBEAwPoAQEuQJLQYdHU8AjWEh3BZkY6EYMBYxFDASBgNVBAMTC1Jvb3QgQWdlbmN5ghAGN2wAqgBkihHPuNSqXDX0MAkGBSsOAwIdBQADQQB5djPe0G6c3Z8DuR6EQbIhBMTnC0zYPhigq+x1LG83761Ir8PiSy+6oxwCHOaYZyvheW0PByntC/WFwUipfn78\"\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '9fb112e5-cb9a-445c-b5da-2d2dbee0c77c', + 'request-id': 'ceaf8ee0-156c-4655-920b-baf3ee14e661', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:05:04 GMT', + date: 'Tue, 11 Dec 2018 18:27:20 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .get('/certificates(thumbprintAlgorithm=sha1,thumbprint=cff2ab63c8c955aaf71989efa641b906558d9fb7)?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#certificates/@Element\",\"thumbprint\":\"cff2ab63c8c955aaf71989efa641b906558d9fb7\",\"thumbprintAlgorithm\":\"sha1\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/certificates(thumbprintAlgorithm=sha1,thumbprint=cff2ab63c8c955aaf71989efa641b906558d9fb7)\",\"state\":\"active\",\"stateTransitionTime\":\"2018-08-21T20:05:03.6975129Z\",\"publicData\":\"MIIBrzCCAV2gAwIBAgIQHZGt2k0LCLFKYYCFxlJnkTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC1Jvb3QgQWdlbmN5MB4XDTE2MDEwMTA3MDAwMFoXDTE4MDEwMTA3MDAwMFowEjEQMA4GA1UEAxMHbm9kZXNkazCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAuX4XMWyR8cQRCA81TjHOerNOFOpOBj2O8jEdZvqwRlUYgMleEY2OlPd+nalxwlQ9+qbNkNGfjnhIMgiJ5CMlXgdRMF3E6DnMnktmHFG9L0VmQ6Lgt7bhXR8IitRHeYlvy5LJlw6Lcle5Kas2j4ThYjLQbjBMDSXD4HvZNe4UYEUCAwEAAaNLMEkwRwYDVR0BBEAwPoAQEuQJLQYdHU8AjWEh3BZkY6EYMBYxFDASBgNVBAMTC1Jvb3QgQWdlbmN5ghAGN2wAqgBkihHPuNSqXDX0MAkGBSsOAwIdBQADQQB5djPe0G6c3Z8DuR6EQbIhBMTnC0zYPhigq+x1LG83761Ir8PiSy+6oxwCHOaYZyvheW0PByntC/WFwUipfn78\"\r\n}", { 'transfer-encoding': 'chunked', +nock('https://test3.westcentralus.batch.azure.com:443') + .get('/certificates(thumbprintAlgorithm=sha1,thumbprint=cff2ab63c8c955aaf71989efa641b906558d9fb7)?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#certificates/@Element\",\"thumbprint\":\"cff2ab63c8c955aaf71989efa641b906558d9fb7\",\"thumbprintAlgorithm\":\"sha1\",\"url\":\"https://test3.westcentralus.batch.azure.com/certificates(thumbprintAlgorithm=sha1,thumbprint=cff2ab63c8c955aaf71989efa641b906558d9fb7)\",\"state\":\"active\",\"stateTransitionTime\":\"2018-12-11T18:27:20.1209305Z\",\"publicData\":\"MIIBrzCCAV2gAwIBAgIQHZGt2k0LCLFKYYCFxlJnkTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC1Jvb3QgQWdlbmN5MB4XDTE2MDEwMTA3MDAwMFoXDTE4MDEwMTA3MDAwMFowEjEQMA4GA1UEAxMHbm9kZXNkazCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAuX4XMWyR8cQRCA81TjHOerNOFOpOBj2O8jEdZvqwRlUYgMleEY2OlPd+nalxwlQ9+qbNkNGfjnhIMgiJ5CMlXgdRMF3E6DnMnktmHFG9L0VmQ6Lgt7bhXR8IitRHeYlvy5LJlw6Lcle5Kas2j4ThYjLQbjBMDSXD4HvZNe4UYEUCAwEAAaNLMEkwRwYDVR0BBEAwPoAQEuQJLQYdHU8AjWEh3BZkY6EYMBYxFDASBgNVBAMTC1Jvb3QgQWdlbmN5ghAGN2wAqgBkihHPuNSqXDX0MAkGBSsOAwIdBQADQQB5djPe0G6c3Z8DuR6EQbIhBMTnC0zYPhigq+x1LG83761Ir8PiSy+6oxwCHOaYZyvheW0PByntC/WFwUipfn78\"\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '9fb112e5-cb9a-445c-b5da-2d2dbee0c77c', + 'request-id': 'ceaf8ee0-156c-4655-920b-baf3ee14e661', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:05:04 GMT', + date: 'Tue, 11 Dec 2018 18:27:20 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_get_file_from_node_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_get_file_from_node_successfully.nock.js index 8cc82ee06b..30d94128c1 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_get_file_from_node_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_get_file_from_node_successfully.nock.js @@ -1,44 +1,44 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .get('/pools/nodesdktestpool1/nodes/tvm-14141481_2-20180821t200555z/files/startup%2Fwd%2Fhello.txt?api-version=2018-08-01.7.0') +nock('http://test3.westcentralus.batch.azure.com:443') + .get('/pools/nodesdktestpool1/nodes/tvmps_15c61fea08a34e0fe431ba70cdf2156682bec1e01fdda442f2dccde21908ed91_d/files/startup%2Fwd%2Fhello.txt?api-version=2018-12-01.8.0') .reply(200, "hello \r\n", { 'transfer-encoding': 'chunked', - 'content-type': 'application/octet-stream', - 'last-modified': 'Tue, 21 Aug 2018 20:30:11 GMT', + 'content-type': 'text/plain', + 'last-modified': 'Tue, 11 Dec 2018 18:47:36 GMT', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'e09cb7e8-8ca2-4d38-9c32-c80c18543751', + 'request-id': '929b13f1-0701-4006-b997-d12b5c17b502', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - 'ocp-creation-time': 'Tue, 21 Aug 2018 20:30:11 GMT', + 'ocp-creation-time': 'Tue, 11 Dec 2018 18:47:36 GMT', 'ocp-batch-file-isdirectory': 'False', - 'ocp-batch-file-url': 'https%3A%2F%2Flchency4.westcentralus.batch.azure.com%2Fpools%2Fnodesdktestpool1%2Fnodes%2Ftvm-14141481_2-20180821t200555z%2Ffiles%2Fstartup%2Fwd%2Fhello.txt', - date: 'Tue, 21 Aug 2018 20:30:58 GMT', + 'ocp-batch-file-url': 'https%3A%2F%2Ftest3.westcentralus.batch.azure.com%2Fpools%2Fnodesdktestpool1%2Fnodes%2Ftvmps_15c61fea08a34e0fe431ba70cdf2156682bec1e01fdda442f2dccde21908ed91_d%2Ffiles%2Fstartup%2Fwd%2Fhello.txt', + date: 'Tue, 11 Dec 2018 18:48:31 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .get('/pools/nodesdktestpool1/nodes/tvm-14141481_2-20180821t200555z/files/startup%2Fwd%2Fhello.txt?api-version=2018-08-01.7.0') +nock('https://test3.westcentralus.batch.azure.com:443') + .get('/pools/nodesdktestpool1/nodes/tvmps_15c61fea08a34e0fe431ba70cdf2156682bec1e01fdda442f2dccde21908ed91_d/files/startup%2Fwd%2Fhello.txt?api-version=2018-12-01.8.0') .reply(200, "hello \r\n", { 'transfer-encoding': 'chunked', - 'content-type': 'application/octet-stream', - 'last-modified': 'Tue, 21 Aug 2018 20:30:11 GMT', + 'content-type': 'text/plain', + 'last-modified': 'Tue, 11 Dec 2018 18:47:36 GMT', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'e09cb7e8-8ca2-4d38-9c32-c80c18543751', + 'request-id': '929b13f1-0701-4006-b997-d12b5c17b502', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - 'ocp-creation-time': 'Tue, 21 Aug 2018 20:30:11 GMT', + 'ocp-creation-time': 'Tue, 11 Dec 2018 18:47:36 GMT', 'ocp-batch-file-isdirectory': 'False', - 'ocp-batch-file-url': 'https%3A%2F%2Flchency4.westcentralus.batch.azure.com%2Fpools%2Fnodesdktestpool1%2Fnodes%2Ftvm-14141481_2-20180821t200555z%2Ffiles%2Fstartup%2Fwd%2Fhello.txt', - date: 'Tue, 21 Aug 2018 20:30:58 GMT', + 'ocp-batch-file-url': 'https%3A%2F%2Ftest3.westcentralus.batch.azure.com%2Fpools%2Fnodesdktestpool1%2Fnodes%2Ftvmps_15c61fea08a34e0fe431ba70cdf2156682bec1e01fdda442f2dccde21908ed91_d%2Ffiles%2Fstartup%2Fwd%2Fhello.txt', + date: 'Tue, 11 Dec 2018 18:48:31 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_get_file_from_task_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_get_file_from_task_successfully.nock.js index 3218a62e38..c7c186e81f 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_get_file_from_task_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_get_file_from_task_successfully.nock.js @@ -1,44 +1,44 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .get('/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2/files/stdout.txt?api-version=2018-08-01.7.0') +nock('http://test3.westcentralus.batch.azure.com:443') + .get('/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2/files/stdout.txt?api-version=2018-12-01.8.0') .reply(200, "hello world\r\n", { 'transfer-encoding': 'chunked', - 'content-type': 'application/octet-stream', - 'last-modified': 'Tue, 21 Aug 2018 20:25:27 GMT', + 'content-type': 'text/plain', + 'last-modified': 'Tue, 11 Dec 2018 18:44:54 GMT', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '93444d00-6dc1-44b9-bcf8-79b2f432315c', + 'request-id': 'e064a74e-2386-42b7-beb3-aad16d9fd556', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - 'ocp-creation-time': 'Tue, 21 Aug 2018 20:25:27 GMT', + 'ocp-creation-time': 'Tue, 11 Dec 2018 18:44:53 GMT', 'ocp-batch-file-isdirectory': 'False', - 'ocp-batch-file-url': 'https%3A%2F%2Flchency4.westcentralus.batch.azure.com%2Fjobs%2FHelloWorldJobNodeSDKTest%2Ftasks%2FHelloWorldNodeSDKTestTask2%2Ffiles%2Fstdout.txt', - date: 'Tue, 21 Aug 2018 20:27:24 GMT', + 'ocp-batch-file-url': 'https%3A%2F%2Ftest3.westcentralus.batch.azure.com%2Fjobs%2FHelloWorldJobNodeSDKTest%2Ftasks%2FHelloWorldNodeSDKTestTask2%2Ffiles%2Fstdout.txt', + date: 'Tue, 11 Dec 2018 18:46:49 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .get('/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2/files/stdout.txt?api-version=2018-08-01.7.0') +nock('https://test3.westcentralus.batch.azure.com:443') + .get('/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2/files/stdout.txt?api-version=2018-12-01.8.0') .reply(200, "hello world\r\n", { 'transfer-encoding': 'chunked', - 'content-type': 'application/octet-stream', - 'last-modified': 'Tue, 21 Aug 2018 20:25:27 GMT', + 'content-type': 'text/plain', + 'last-modified': 'Tue, 11 Dec 2018 18:44:54 GMT', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '93444d00-6dc1-44b9-bcf8-79b2f432315c', + 'request-id': 'e064a74e-2386-42b7-beb3-aad16d9fd556', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - 'ocp-creation-time': 'Tue, 21 Aug 2018 20:25:27 GMT', + 'ocp-creation-time': 'Tue, 11 Dec 2018 18:44:53 GMT', 'ocp-batch-file-isdirectory': 'False', - 'ocp-batch-file-url': 'https%3A%2F%2Flchency4.westcentralus.batch.azure.com%2Fjobs%2FHelloWorldJobNodeSDKTest%2Ftasks%2FHelloWorldNodeSDKTestTask2%2Ffiles%2Fstdout.txt', - date: 'Tue, 21 Aug 2018 20:27:24 GMT', + 'ocp-batch-file-url': 'https%3A%2F%2Ftest3.westcentralus.batch.azure.com%2Fjobs%2FHelloWorldJobNodeSDKTest%2Ftasks%2FHelloWorldNodeSDKTestTask2%2Ffiles%2Fstdout.txt', + date: 'Tue, 11 Dec 2018 18:46:49 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_get_file_properties_from_node_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_get_file_properties_from_node_successfully.nock.js index 5b6e13d492..dccb5ff0ec 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_get_file_properties_from_node_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_get_file_properties_from_node_successfully.nock.js @@ -1,96 +1,44 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .head('/pools/nodesdktestpool1/nodes/tvm-14141481_2-20180821t200555z/files/startup%2Fwd%2Fhello.txt?api-version=2018-08-01.7.0') - .reply(503, "", { 'transfer-encoding': 'chunked', - server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'eea76181-49b0-4ba2-9214-76b37a428550', - 'strict-transport-security': 'max-age=31536000; includeSubDomains', - 'x-content-type-options': 'nosniff', - dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:29:05 GMT', - connection: 'close' }); - return result; }, -function (nock) { -var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .head('/pools/nodesdktestpool1/nodes/tvm-14141481_2-20180821t200555z/files/startup%2Fwd%2Fhello.txt?api-version=2018-08-01.7.0') - .reply(503, "", { 'transfer-encoding': 'chunked', - server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'eea76181-49b0-4ba2-9214-76b37a428550', - 'strict-transport-security': 'max-age=31536000; includeSubDomains', - 'x-content-type-options': 'nosniff', - dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:29:05 GMT', - connection: 'close' }); - return result; }, -function (nock) { -var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .head('/pools/nodesdktestpool1/nodes/tvm-14141481_2-20180821t200555z/files/startup%2Fwd%2Fhello.txt?api-version=2018-08-01.7.0') - .reply(503, "", { 'transfer-encoding': 'chunked', - server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '8f018830-bbfe-4e1c-aa66-e0da10fd020b', - 'strict-transport-security': 'max-age=31536000; includeSubDomains', - 'x-content-type-options': 'nosniff', - dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:29:33 GMT', - connection: 'close' }); - return result; }, -function (nock) { -var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .head('/pools/nodesdktestpool1/nodes/tvm-14141481_2-20180821t200555z/files/startup%2Fwd%2Fhello.txt?api-version=2018-08-01.7.0') - .reply(503, "", { 'transfer-encoding': 'chunked', - server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '8f018830-bbfe-4e1c-aa66-e0da10fd020b', - 'strict-transport-security': 'max-age=31536000; includeSubDomains', - 'x-content-type-options': 'nosniff', - dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:29:33 GMT', - connection: 'close' }); - return result; }, -function (nock) { -var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .head('/pools/nodesdktestpool1/nodes/tvm-14141481_2-20180821t200555z/files/startup%2Fwd%2Fhello.txt?api-version=2018-08-01.7.0') +nock('http://test3.westcentralus.batch.azure.com:443') + .head('/pools/nodesdktestpool1/nodes/tvmps_15c61fea08a34e0fe431ba70cdf2156682bec1e01fdda442f2dccde21908ed91_d/files/startup%2Fwd%2Fhello.txt?api-version=2018-12-01.8.0') .reply(200, "", { 'content-length': '8', - 'content-type': 'application/octet-stream', - 'last-modified': 'Tue, 21 Aug 2018 20:30:11 GMT', + 'content-type': 'text/plain', + 'last-modified': 'Tue, 11 Dec 2018 18:47:36 GMT', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'b490723d-3d62-4e80-b0a1-22109f1adcf0', + 'request-id': '8e069f25-67e1-4417-976e-6a8b895456a0', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - 'ocp-creation-time': 'Tue, 21 Aug 2018 20:30:11 GMT', + 'ocp-creation-time': 'Tue, 11 Dec 2018 18:47:36 GMT', 'ocp-batch-file-isdirectory': 'False', - 'ocp-batch-file-url': 'https%3A%2F%2Flchency4.westcentralus.batch.azure.com%2Fpools%2Fnodesdktestpool1%2Fnodes%2Ftvm-14141481_2-20180821t200555z%2Ffiles%2Fstartup%2Fwd%2Fhello.txt', - date: 'Tue, 21 Aug 2018 20:30:57 GMT', + 'ocp-batch-file-url': 'https%3A%2F%2Ftest3.westcentralus.batch.azure.com%2Fpools%2Fnodesdktestpool1%2Fnodes%2Ftvmps_15c61fea08a34e0fe431ba70cdf2156682bec1e01fdda442f2dccde21908ed91_d%2Ffiles%2Fstartup%2Fwd%2Fhello.txt', + date: 'Tue, 11 Dec 2018 18:48:31 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .head('/pools/nodesdktestpool1/nodes/tvm-14141481_2-20180821t200555z/files/startup%2Fwd%2Fhello.txt?api-version=2018-08-01.7.0') +nock('https://test3.westcentralus.batch.azure.com:443') + .head('/pools/nodesdktestpool1/nodes/tvmps_15c61fea08a34e0fe431ba70cdf2156682bec1e01fdda442f2dccde21908ed91_d/files/startup%2Fwd%2Fhello.txt?api-version=2018-12-01.8.0') .reply(200, "", { 'content-length': '8', - 'content-type': 'application/octet-stream', - 'last-modified': 'Tue, 21 Aug 2018 20:30:11 GMT', + 'content-type': 'text/plain', + 'last-modified': 'Tue, 11 Dec 2018 18:47:36 GMT', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'b490723d-3d62-4e80-b0a1-22109f1adcf0', + 'request-id': '8e069f25-67e1-4417-976e-6a8b895456a0', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - 'ocp-creation-time': 'Tue, 21 Aug 2018 20:30:11 GMT', + 'ocp-creation-time': 'Tue, 11 Dec 2018 18:47:36 GMT', 'ocp-batch-file-isdirectory': 'False', - 'ocp-batch-file-url': 'https%3A%2F%2Flchency4.westcentralus.batch.azure.com%2Fpools%2Fnodesdktestpool1%2Fnodes%2Ftvm-14141481_2-20180821t200555z%2Ffiles%2Fstartup%2Fwd%2Fhello.txt', - date: 'Tue, 21 Aug 2018 20:30:57 GMT', + 'ocp-batch-file-url': 'https%3A%2F%2Ftest3.westcentralus.batch.azure.com%2Fpools%2Fnodesdktestpool1%2Fnodes%2Ftvmps_15c61fea08a34e0fe431ba70cdf2156682bec1e01fdda442f2dccde21908ed91_d%2Ffiles%2Fstartup%2Fwd%2Fhello.txt', + date: 'Tue, 11 Dec 2018 18:48:31 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_get_file_properties_from_task_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_get_file_properties_from_task_successfully.nock.js index 9ddf557e91..39a7e659ed 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_get_file_properties_from_task_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_get_file_properties_from_task_successfully.nock.js @@ -1,44 +1,44 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .head('/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2/files/stderr.txt?api-version=2018-08-01.7.0') +nock('http://test3.westcentralus.batch.azure.com:443') + .head('/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2/files/stderr.txt?api-version=2018-12-01.8.0') .reply(200, "", { 'content-length': '0', - 'content-type': 'application/octet-stream', - 'last-modified': 'Tue, 21 Aug 2018 20:25:27 GMT', + 'content-type': 'text/plain', + 'last-modified': 'Tue, 11 Dec 2018 18:44:53 GMT', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'a1e31a8b-b4d6-42f8-88aa-a1c807a22af4', + 'request-id': '99d4682c-ae97-4e07-a634-9562e565faa0', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - 'ocp-creation-time': 'Tue, 21 Aug 2018 20:25:27 GMT', + 'ocp-creation-time': 'Tue, 11 Dec 2018 18:44:53 GMT', 'ocp-batch-file-isdirectory': 'False', - 'ocp-batch-file-url': 'https%3A%2F%2Flchency4.westcentralus.batch.azure.com%2Fjobs%2FHelloWorldJobNodeSDKTest%2Ftasks%2FHelloWorldNodeSDKTestTask2%2Ffiles%2Fstderr.txt', - date: 'Tue, 21 Aug 2018 20:27:23 GMT', + 'ocp-batch-file-url': 'https%3A%2F%2Ftest3.westcentralus.batch.azure.com%2Fjobs%2FHelloWorldJobNodeSDKTest%2Ftasks%2FHelloWorldNodeSDKTestTask2%2Ffiles%2Fstderr.txt', + date: 'Tue, 11 Dec 2018 18:46:49 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .head('/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2/files/stderr.txt?api-version=2018-08-01.7.0') +nock('https://test3.westcentralus.batch.azure.com:443') + .head('/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2/files/stderr.txt?api-version=2018-12-01.8.0') .reply(200, "", { 'content-length': '0', - 'content-type': 'application/octet-stream', - 'last-modified': 'Tue, 21 Aug 2018 20:25:27 GMT', + 'content-type': 'text/plain', + 'last-modified': 'Tue, 11 Dec 2018 18:44:53 GMT', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'a1e31a8b-b4d6-42f8-88aa-a1c807a22af4', + 'request-id': '99d4682c-ae97-4e07-a634-9562e565faa0', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - 'ocp-creation-time': 'Tue, 21 Aug 2018 20:25:27 GMT', + 'ocp-creation-time': 'Tue, 11 Dec 2018 18:44:53 GMT', 'ocp-batch-file-isdirectory': 'False', - 'ocp-batch-file-url': 'https%3A%2F%2Flchency4.westcentralus.batch.azure.com%2Fjobs%2FHelloWorldJobNodeSDKTest%2Ftasks%2FHelloWorldNodeSDKTestTask2%2Ffiles%2Fstderr.txt', - date: 'Tue, 21 Aug 2018 20:27:23 GMT', + 'ocp-batch-file-url': 'https%3A%2F%2Ftest3.westcentralus.batch.azure.com%2Fjobs%2FHelloWorldJobNodeSDKTest%2Ftasks%2FHelloWorldNodeSDKTestTask2%2Ffiles%2Fstderr.txt', + date: 'Tue, 11 Dec 2018 18:46:49 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_get_pool_lifetime_statistics.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_get_pool_lifetime_statistics.nock.js index b6556ed6e3..5e40dee134 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_get_pool_lifetime_statistics.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_get_pool_lifetime_statistics.nock.js @@ -1,36 +1,36 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .get('/lifetimepoolstats?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#poolstats/@Element\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/lifetimepoolstats\",\"usageStats\":{\r\n \"startTime\":\"2017-10-23T18:57:56.5958966Z\",\"lastUpdateTime\":\"2018-08-21T19:30:00Z\",\"dedicatedCoreTime\":\"P842DT15H44M4.782S\"\r\n },\"resourceStats\":{\r\n \"startTime\":\"2017-10-23T18:57:56.5958966Z\",\"diskReadIOps\":\"4333098\",\"diskWriteIOps\":\"217500288\",\"lastUpdateTime\":\"2018-08-21T19:30:00Z\",\"avgCPUPercentage\":0.11879342572208607,\"avgMemoryGiB\":0.76116733185640628,\"peakMemoryGiB\":3.8065605163574219,\"avgDiskGiB\":2.4733423606074521,\"peakDiskGiB\":16.662128448486328,\"diskReadGiB\":159.07264709472656,\"diskWriteGiB\":2209.7888917922974,\"networkReadGiB\":323.3932627197355,\"networkWriteGiB\":219.14907851628959\r\n }\r\n}", { 'transfer-encoding': 'chunked', +nock('http://test3.westcentralus.batch.azure.com:443') + .get('/lifetimepoolstats?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#poolstats/@Element\",\"url\":\"https://test3.westcentralus.batch.azure.com/lifetimepoolstats\",\"usageStats\":{\r\n \"startTime\":\"2018-12-11T17:38:45.439192Z\",\"lastUpdateTime\":\"2018-12-11T17:38:45.439192Z\",\"dedicatedCoreTime\":\"PT0S\"\r\n },\"resourceStats\":{\r\n \"startTime\":\"2018-12-11T17:38:45.439192Z\",\"diskReadIOps\":\"0\",\"diskWriteIOps\":\"0\",\"lastUpdateTime\":\"2018-12-11T17:38:45.439192Z\",\"avgCPUPercentage\":0.0,\"avgMemoryGiB\":0.0,\"peakMemoryGiB\":0.0,\"avgDiskGiB\":0.0,\"peakDiskGiB\":0.0,\"diskReadGiB\":0.0,\"diskWriteGiB\":0.0,\"networkReadGiB\":0.0,\"networkWriteGiB\":0.0\r\n }\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'cebbd73e-dba3-4693-9362-1dd4bcddc0da', + 'request-id': '6c5a0b8e-d08b-4e2e-9554-822f4031f712', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:25:23 GMT', + date: 'Tue, 11 Dec 2018 18:44:48 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .get('/lifetimepoolstats?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#poolstats/@Element\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/lifetimepoolstats\",\"usageStats\":{\r\n \"startTime\":\"2017-10-23T18:57:56.5958966Z\",\"lastUpdateTime\":\"2018-08-21T19:30:00Z\",\"dedicatedCoreTime\":\"P842DT15H44M4.782S\"\r\n },\"resourceStats\":{\r\n \"startTime\":\"2017-10-23T18:57:56.5958966Z\",\"diskReadIOps\":\"4333098\",\"diskWriteIOps\":\"217500288\",\"lastUpdateTime\":\"2018-08-21T19:30:00Z\",\"avgCPUPercentage\":0.11879342572208607,\"avgMemoryGiB\":0.76116733185640628,\"peakMemoryGiB\":3.8065605163574219,\"avgDiskGiB\":2.4733423606074521,\"peakDiskGiB\":16.662128448486328,\"diskReadGiB\":159.07264709472656,\"diskWriteGiB\":2209.7888917922974,\"networkReadGiB\":323.3932627197355,\"networkWriteGiB\":219.14907851628959\r\n }\r\n}", { 'transfer-encoding': 'chunked', +nock('https://test3.westcentralus.batch.azure.com:443') + .get('/lifetimepoolstats?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#poolstats/@Element\",\"url\":\"https://test3.westcentralus.batch.azure.com/lifetimepoolstats\",\"usageStats\":{\r\n \"startTime\":\"2018-12-11T17:38:45.439192Z\",\"lastUpdateTime\":\"2018-12-11T17:38:45.439192Z\",\"dedicatedCoreTime\":\"PT0S\"\r\n },\"resourceStats\":{\r\n \"startTime\":\"2018-12-11T17:38:45.439192Z\",\"diskReadIOps\":\"0\",\"diskWriteIOps\":\"0\",\"lastUpdateTime\":\"2018-12-11T17:38:45.439192Z\",\"avgCPUPercentage\":0.0,\"avgMemoryGiB\":0.0,\"peakMemoryGiB\":0.0,\"avgDiskGiB\":0.0,\"peakDiskGiB\":0.0,\"diskReadGiB\":0.0,\"diskWriteGiB\":0.0,\"networkReadGiB\":0.0,\"networkWriteGiB\":0.0\r\n }\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'cebbd73e-dba3-4693-9362-1dd4bcddc0da', + 'request-id': '6c5a0b8e-d08b-4e2e-9554-822f4031f712', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:25:23 GMT', + date: 'Tue, 11 Dec 2018 18:44:48 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_get_pool_node_counts_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_get_pool_node_counts_successfully.nock.js index 311024ec6f..d563063be6 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_get_pool_node_counts_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_get_pool_node_counts_successfully.nock.js @@ -1,36 +1,36 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .get('/nodecounts?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#poolnodecounts\",\"value\":[\r\n {\r\n \"poolId\":\"nodesdkinboundendpointpool\",\"dedicated\":{\r\n \"creating\":0,\"idle\":1,\"leavingPool\":0,\"offline\":0,\"preempted\":0,\"rebooting\":0,\"reimaging\":0,\"running\":0,\"starting\":0,\"startTaskFailed\":0,\"unusable\":0,\"unknown\":0,\"waitingForStartTask\":0,\"total\":1\r\n },\"lowPriority\":{\r\n \"creating\":0,\"idle\":0,\"leavingPool\":0,\"offline\":0,\"preempted\":0,\"rebooting\":0,\"reimaging\":0,\"running\":0,\"starting\":0,\"startTaskFailed\":0,\"unusable\":0,\"unknown\":0,\"waitingForStartTask\":0,\"total\":0\r\n }\r\n },{\r\n \"poolId\":\"nodesdktestpool1\",\"dedicated\":{\r\n \"creating\":0,\"idle\":3,\"leavingPool\":0,\"offline\":0,\"preempted\":0,\"rebooting\":0,\"reimaging\":0,\"running\":0,\"starting\":0,\"startTaskFailed\":0,\"unusable\":0,\"unknown\":0,\"waitingForStartTask\":0,\"total\":3\r\n },\"lowPriority\":{\r\n \"creating\":0,\"idle\":0,\"leavingPool\":0,\"offline\":0,\"preempted\":0,\"rebooting\":0,\"reimaging\":0,\"running\":0,\"starting\":0,\"startTaskFailed\":0,\"unusable\":0,\"unknown\":0,\"waitingForStartTask\":0,\"total\":0\r\n }\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', +nock('http://test3.westcentralus.batch.azure.com:443') + .get('/nodecounts?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#poolnodecounts\",\"value\":[\r\n {\r\n \"poolId\":\"nodesdkinboundendpointpool\",\"dedicated\":{\r\n \"creating\":0,\"idle\":1,\"leavingPool\":0,\"offline\":0,\"preempted\":0,\"rebooting\":0,\"reimaging\":0,\"running\":0,\"starting\":0,\"startTaskFailed\":0,\"unusable\":0,\"unknown\":0,\"waitingForStartTask\":0,\"total\":1\r\n },\"lowPriority\":{\r\n \"creating\":0,\"idle\":0,\"leavingPool\":0,\"offline\":0,\"preempted\":0,\"rebooting\":0,\"reimaging\":0,\"running\":0,\"starting\":0,\"startTaskFailed\":0,\"unusable\":0,\"unknown\":0,\"waitingForStartTask\":0,\"total\":0\r\n }\r\n },{\r\n \"poolId\":\"nodesdkosdiskpool\",\"dedicated\":{\r\n \"creating\":0,\"idle\":0,\"leavingPool\":0,\"offline\":0,\"preempted\":0,\"rebooting\":0,\"reimaging\":0,\"running\":0,\"starting\":0,\"startTaskFailed\":0,\"unusable\":0,\"unknown\":0,\"waitingForStartTask\":0,\"total\":0\r\n },\"lowPriority\":{\r\n \"creating\":0,\"idle\":0,\"leavingPool\":0,\"offline\":0,\"preempted\":0,\"rebooting\":0,\"reimaging\":0,\"running\":0,\"starting\":0,\"startTaskFailed\":0,\"unusable\":0,\"unknown\":0,\"waitingForStartTask\":0,\"total\":0\r\n }\r\n },{\r\n \"poolId\":\"nodesdktestpool1\",\"dedicated\":{\r\n \"creating\":0,\"idle\":3,\"leavingPool\":0,\"offline\":0,\"preempted\":0,\"rebooting\":0,\"reimaging\":0,\"running\":0,\"starting\":0,\"startTaskFailed\":0,\"unusable\":0,\"unknown\":0,\"waitingForStartTask\":0,\"total\":3\r\n },\"lowPriority\":{\r\n \"creating\":0,\"idle\":0,\"leavingPool\":0,\"offline\":0,\"preempted\":0,\"rebooting\":0,\"reimaging\":0,\"running\":0,\"starting\":0,\"startTaskFailed\":0,\"unusable\":0,\"unknown\":0,\"waitingForStartTask\":0,\"total\":0\r\n }\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '2993c141-50cd-466a-a20e-fb7b2ee542dd', + 'request-id': '7c10e64e-0406-4d1f-bf03-8b1acb48326f', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:23:08 GMT', + date: 'Tue, 11 Dec 2018 18:42:29 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .get('/nodecounts?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#poolnodecounts\",\"value\":[\r\n {\r\n \"poolId\":\"nodesdkinboundendpointpool\",\"dedicated\":{\r\n \"creating\":0,\"idle\":1,\"leavingPool\":0,\"offline\":0,\"preempted\":0,\"rebooting\":0,\"reimaging\":0,\"running\":0,\"starting\":0,\"startTaskFailed\":0,\"unusable\":0,\"unknown\":0,\"waitingForStartTask\":0,\"total\":1\r\n },\"lowPriority\":{\r\n \"creating\":0,\"idle\":0,\"leavingPool\":0,\"offline\":0,\"preempted\":0,\"rebooting\":0,\"reimaging\":0,\"running\":0,\"starting\":0,\"startTaskFailed\":0,\"unusable\":0,\"unknown\":0,\"waitingForStartTask\":0,\"total\":0\r\n }\r\n },{\r\n \"poolId\":\"nodesdktestpool1\",\"dedicated\":{\r\n \"creating\":0,\"idle\":3,\"leavingPool\":0,\"offline\":0,\"preempted\":0,\"rebooting\":0,\"reimaging\":0,\"running\":0,\"starting\":0,\"startTaskFailed\":0,\"unusable\":0,\"unknown\":0,\"waitingForStartTask\":0,\"total\":3\r\n },\"lowPriority\":{\r\n \"creating\":0,\"idle\":0,\"leavingPool\":0,\"offline\":0,\"preempted\":0,\"rebooting\":0,\"reimaging\":0,\"running\":0,\"starting\":0,\"startTaskFailed\":0,\"unusable\":0,\"unknown\":0,\"waitingForStartTask\":0,\"total\":0\r\n }\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', +nock('https://test3.westcentralus.batch.azure.com:443') + .get('/nodecounts?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#poolnodecounts\",\"value\":[\r\n {\r\n \"poolId\":\"nodesdkinboundendpointpool\",\"dedicated\":{\r\n \"creating\":0,\"idle\":1,\"leavingPool\":0,\"offline\":0,\"preempted\":0,\"rebooting\":0,\"reimaging\":0,\"running\":0,\"starting\":0,\"startTaskFailed\":0,\"unusable\":0,\"unknown\":0,\"waitingForStartTask\":0,\"total\":1\r\n },\"lowPriority\":{\r\n \"creating\":0,\"idle\":0,\"leavingPool\":0,\"offline\":0,\"preempted\":0,\"rebooting\":0,\"reimaging\":0,\"running\":0,\"starting\":0,\"startTaskFailed\":0,\"unusable\":0,\"unknown\":0,\"waitingForStartTask\":0,\"total\":0\r\n }\r\n },{\r\n \"poolId\":\"nodesdkosdiskpool\",\"dedicated\":{\r\n \"creating\":0,\"idle\":0,\"leavingPool\":0,\"offline\":0,\"preempted\":0,\"rebooting\":0,\"reimaging\":0,\"running\":0,\"starting\":0,\"startTaskFailed\":0,\"unusable\":0,\"unknown\":0,\"waitingForStartTask\":0,\"total\":0\r\n },\"lowPriority\":{\r\n \"creating\":0,\"idle\":0,\"leavingPool\":0,\"offline\":0,\"preempted\":0,\"rebooting\":0,\"reimaging\":0,\"running\":0,\"starting\":0,\"startTaskFailed\":0,\"unusable\":0,\"unknown\":0,\"waitingForStartTask\":0,\"total\":0\r\n }\r\n },{\r\n \"poolId\":\"nodesdktestpool1\",\"dedicated\":{\r\n \"creating\":0,\"idle\":3,\"leavingPool\":0,\"offline\":0,\"preempted\":0,\"rebooting\":0,\"reimaging\":0,\"running\":0,\"starting\":0,\"startTaskFailed\":0,\"unusable\":0,\"unknown\":0,\"waitingForStartTask\":0,\"total\":3\r\n },\"lowPriority\":{\r\n \"creating\":0,\"idle\":0,\"leavingPool\":0,\"offline\":0,\"preempted\":0,\"rebooting\":0,\"reimaging\":0,\"running\":0,\"starting\":0,\"startTaskFailed\":0,\"unusable\":0,\"unknown\":0,\"waitingForStartTask\":0,\"total\":0\r\n }\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '2993c141-50cd-466a-a20e-fb7b2ee542dd', + 'request-id': '7c10e64e-0406-4d1f-bf03-8b1acb48326f', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:23:08 GMT', + date: 'Tue, 11 Dec 2018 18:42:29 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_get_task_reference_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_get_task_reference_successfully.nock.js index 37e2fa4db5..eac1672bbf 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_get_task_reference_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_get_task_reference_successfully.nock.js @@ -1,40 +1,40 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .get('/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#tasks/@Element\",\"id\":\"HelloWorldNodeSDKTestTask\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask\",\"eTag\":\"0x8D607A43AB500D1\",\"creationTime\":\"2018-08-21T20:25:24.0548994Z\",\"lastModified\":\"2018-08-21T20:25:26.0475601Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-08-21T20:25:26.0475601Z\",\"previousState\":\"completed\",\"previousStateTransitionTime\":\"2018-08-21T20:25:25.7617271Z\",\"commandLine\":\"ping 127.0.0.1 -n 20\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"constraints\":{\r\n \"maxWallClockTime\":\"P10675199DT2H48M5.4775807S\",\"retentionTime\":\"P10675199DT2H48M5.4775807S\",\"maxTaskRetryCount\":3\r\n },\"executionInfo\":{\r\n \"retryCount\":0,\"requeueCount\":0\r\n }\r\n}", { 'transfer-encoding': 'chunked', +nock('http://test3.westcentralus.batch.azure.com:443') + .get('/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#tasks/@Element\",\"id\":\"HelloWorldNodeSDKTestTask\",\"url\":\"https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask\",\"eTag\":\"0x8D65F98BC3C1AEF\",\"creationTime\":\"2018-12-11T18:44:49.2209796Z\",\"lastModified\":\"2018-12-11T18:44:51.7227247Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-12-11T18:44:51.7227247Z\",\"previousState\":\"completed\",\"previousStateTransitionTime\":\"2018-12-11T18:44:50.992308Z\",\"commandLine\":\"ping 127.0.0.1 -n 20\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"constraints\":{\r\n \"maxWallClockTime\":\"P10675199DT2H48M5.4775807S\",\"retentionTime\":\"P7D\",\"maxTaskRetryCount\":3\r\n },\"executionInfo\":{\r\n \"retryCount\":0,\"requeueCount\":0\r\n }\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', - 'last-modified': 'Tue, 21 Aug 2018 20:25:26 GMT', - etag: '0x8D607A43AB500D1', + 'last-modified': 'Tue, 11 Dec 2018 18:44:51 GMT', + etag: '0x8D65F98BC3C1AEF', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'e986c5f3-0389-4276-b6d0-487d6f5e0486', + 'request-id': 'b851a346-6175-4728-a369-59b8819a6d2a', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:25:25 GMT', + date: 'Tue, 11 Dec 2018 18:44:51 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .get('/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#tasks/@Element\",\"id\":\"HelloWorldNodeSDKTestTask\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask\",\"eTag\":\"0x8D607A43AB500D1\",\"creationTime\":\"2018-08-21T20:25:24.0548994Z\",\"lastModified\":\"2018-08-21T20:25:26.0475601Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-08-21T20:25:26.0475601Z\",\"previousState\":\"completed\",\"previousStateTransitionTime\":\"2018-08-21T20:25:25.7617271Z\",\"commandLine\":\"ping 127.0.0.1 -n 20\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"constraints\":{\r\n \"maxWallClockTime\":\"P10675199DT2H48M5.4775807S\",\"retentionTime\":\"P10675199DT2H48M5.4775807S\",\"maxTaskRetryCount\":3\r\n },\"executionInfo\":{\r\n \"retryCount\":0,\"requeueCount\":0\r\n }\r\n}", { 'transfer-encoding': 'chunked', +nock('https://test3.westcentralus.batch.azure.com:443') + .get('/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#tasks/@Element\",\"id\":\"HelloWorldNodeSDKTestTask\",\"url\":\"https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask\",\"eTag\":\"0x8D65F98BC3C1AEF\",\"creationTime\":\"2018-12-11T18:44:49.2209796Z\",\"lastModified\":\"2018-12-11T18:44:51.7227247Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-12-11T18:44:51.7227247Z\",\"previousState\":\"completed\",\"previousStateTransitionTime\":\"2018-12-11T18:44:50.992308Z\",\"commandLine\":\"ping 127.0.0.1 -n 20\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"constraints\":{\r\n \"maxWallClockTime\":\"P10675199DT2H48M5.4775807S\",\"retentionTime\":\"P7D\",\"maxTaskRetryCount\":3\r\n },\"executionInfo\":{\r\n \"retryCount\":0,\"requeueCount\":0\r\n }\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', - 'last-modified': 'Tue, 21 Aug 2018 20:25:26 GMT', - etag: '0x8D607A43AB500D1', + 'last-modified': 'Tue, 11 Dec 2018 18:44:51 GMT', + etag: '0x8D65F98BC3C1AEF', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'e986c5f3-0389-4276-b6d0-487d6f5e0486', + 'request-id': 'b851a346-6175-4728-a369-59b8819a6d2a', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:25:25 GMT', + date: 'Tue, 11 Dec 2018 18:44:51 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_get_the_details_of_a_pool_with_endpoint_configuration_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_get_the_details_of_a_pool_with_endpoint_configuration_successfully.nock.js index b5befe2152..6a5a3f7038 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_get_the_details_of_a_pool_with_endpoint_configuration_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_get_the_details_of_a_pool_with_endpoint_configuration_successfully.nock.js @@ -1,36 +1,36 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .get('/pools/nodesdkinboundendpointpool/nodes?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#nodes\",\"value\":[\r\n {\r\n \"id\":\"tvm-3687402588_1-20180821t201808z\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/pools/nodesdkinboundendpointpool/nodes/tvm-3687402588_1-20180821t201808z\",\"state\":\"idle\",\"schedulingState\":\"enabled\",\"stateTransitionTime\":\"2018-08-21T20:20:05.186449Z\",\"lastBootTime\":\"2018-08-21T20:20:05.045751Z\",\"allocationTime\":\"2018-08-21T20:18:08.3355857Z\",\"ipAddress\":\"10.0.0.4\",\"affinityId\":\"TVM:tvm-3687402588_1-20180821t201808z\",\"vmSize\":\"standard_a1\",\"totalTasksRun\":0,\"totalTasksSucceeded\":0,\"runningTasksCount\":0,\"isDedicated\":true,\"endpointConfiguration\":{\r\n \"inboundEndpoints\":[\r\n {\r\n \"name\":\"TestEndpointConfig.0\",\"protocol\":\"udp\",\"publicIPAddress\":\"13.78.128.240\",\"publicFQDN\":\"dns5b4ff48a-d902-4150-8825-baf7617ed29c-azurebatch-cloudservice.westcentralus.cloudapp.azure.com\",\"frontendPort\":60000,\"backendPort\":64444\r\n },{\r\n \"name\":\"SSHRule.0\",\"protocol\":\"tcp\",\"publicIPAddress\":\"13.78.128.240\",\"publicFQDN\":\"dns5b4ff48a-d902-4150-8825-baf7617ed29c-azurebatch-cloudservice.westcentralus.cloudapp.azure.com\",\"frontendPort\":50000,\"backendPort\":22\r\n }\r\n ]\r\n },\"nodeAgentInfo\":{\r\n \"lastUpdateTime\":\"2018-08-21T20:20:05.045751Z\",\"version\":\"1.3.0.8\"\r\n }\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', +nock('http://test3.westcentralus.batch.azure.com:443') + .get('/pools/nodesdkinboundendpointpool/nodes?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#nodes\",\"value\":[\r\n {\r\n \"id\":\"tvmps_fb7c40f0fc6b0bc4514118971d4fd729a5f168d282947e9935f70cb9475a4665_d\",\"url\":\"https://test3.westcentralus.batch.azure.com/pools/nodesdkinboundendpointpool/nodes/tvmps_fb7c40f0fc6b0bc4514118971d4fd729a5f168d282947e9935f70cb9475a4665_d\",\"state\":\"idle\",\"schedulingState\":\"enabled\",\"stateTransitionTime\":\"2018-12-11T18:38:39.161531Z\",\"lastBootTime\":\"2018-12-11T18:38:38.843981Z\",\"allocationTime\":\"2018-12-11T18:37:15.0570813Z\",\"ipAddress\":\"10.0.0.4\",\"affinityId\":\"TVM:tvmps_fb7c40f0fc6b0bc4514118971d4fd729a5f168d282947e9935f70cb9475a4665_d\",\"vmSize\":\"standard_a1\",\"totalTasksRun\":0,\"totalTasksSucceeded\":0,\"runningTasksCount\":0,\"isDedicated\":true,\"endpointConfiguration\":{\r\n \"inboundEndpoints\":[\r\n {\r\n \"name\":\"TestEndpointConfig.0\",\"protocol\":\"udp\",\"publicIPAddress\":\"13.78.145.35\",\"publicFQDN\":\"dns50c5a4a8-abfb-4b94-b687-0389fef3fe8a-azurebatch-cloudservice.westcentralus.cloudapp.azure.com\",\"frontendPort\":60000,\"backendPort\":64444\r\n },{\r\n \"name\":\"SSHRule.0\",\"protocol\":\"tcp\",\"publicIPAddress\":\"13.78.145.35\",\"publicFQDN\":\"dns50c5a4a8-abfb-4b94-b687-0389fef3fe8a-azurebatch-cloudservice.westcentralus.cloudapp.azure.com\",\"frontendPort\":50000,\"backendPort\":22\r\n }\r\n ]\r\n },\"nodeAgentInfo\":{\r\n \"lastUpdateTime\":\"2018-12-11T18:38:38.843981Z\",\"version\":\"1.4.7\"\r\n }\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '65c94270-05eb-4d2d-9dba-c233920c9ac8', + 'request-id': '032dd45a-dcf9-4a81-96ef-165e709308c2', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:23:08 GMT', + date: 'Tue, 11 Dec 2018 18:42:29 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .get('/pools/nodesdkinboundendpointpool/nodes?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#nodes\",\"value\":[\r\n {\r\n \"id\":\"tvm-3687402588_1-20180821t201808z\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/pools/nodesdkinboundendpointpool/nodes/tvm-3687402588_1-20180821t201808z\",\"state\":\"idle\",\"schedulingState\":\"enabled\",\"stateTransitionTime\":\"2018-08-21T20:20:05.186449Z\",\"lastBootTime\":\"2018-08-21T20:20:05.045751Z\",\"allocationTime\":\"2018-08-21T20:18:08.3355857Z\",\"ipAddress\":\"10.0.0.4\",\"affinityId\":\"TVM:tvm-3687402588_1-20180821t201808z\",\"vmSize\":\"standard_a1\",\"totalTasksRun\":0,\"totalTasksSucceeded\":0,\"runningTasksCount\":0,\"isDedicated\":true,\"endpointConfiguration\":{\r\n \"inboundEndpoints\":[\r\n {\r\n \"name\":\"TestEndpointConfig.0\",\"protocol\":\"udp\",\"publicIPAddress\":\"13.78.128.240\",\"publicFQDN\":\"dns5b4ff48a-d902-4150-8825-baf7617ed29c-azurebatch-cloudservice.westcentralus.cloudapp.azure.com\",\"frontendPort\":60000,\"backendPort\":64444\r\n },{\r\n \"name\":\"SSHRule.0\",\"protocol\":\"tcp\",\"publicIPAddress\":\"13.78.128.240\",\"publicFQDN\":\"dns5b4ff48a-d902-4150-8825-baf7617ed29c-azurebatch-cloudservice.westcentralus.cloudapp.azure.com\",\"frontendPort\":50000,\"backendPort\":22\r\n }\r\n ]\r\n },\"nodeAgentInfo\":{\r\n \"lastUpdateTime\":\"2018-08-21T20:20:05.045751Z\",\"version\":\"1.3.0.8\"\r\n }\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', +nock('https://test3.westcentralus.batch.azure.com:443') + .get('/pools/nodesdkinboundendpointpool/nodes?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#nodes\",\"value\":[\r\n {\r\n \"id\":\"tvmps_fb7c40f0fc6b0bc4514118971d4fd729a5f168d282947e9935f70cb9475a4665_d\",\"url\":\"https://test3.westcentralus.batch.azure.com/pools/nodesdkinboundendpointpool/nodes/tvmps_fb7c40f0fc6b0bc4514118971d4fd729a5f168d282947e9935f70cb9475a4665_d\",\"state\":\"idle\",\"schedulingState\":\"enabled\",\"stateTransitionTime\":\"2018-12-11T18:38:39.161531Z\",\"lastBootTime\":\"2018-12-11T18:38:38.843981Z\",\"allocationTime\":\"2018-12-11T18:37:15.0570813Z\",\"ipAddress\":\"10.0.0.4\",\"affinityId\":\"TVM:tvmps_fb7c40f0fc6b0bc4514118971d4fd729a5f168d282947e9935f70cb9475a4665_d\",\"vmSize\":\"standard_a1\",\"totalTasksRun\":0,\"totalTasksSucceeded\":0,\"runningTasksCount\":0,\"isDedicated\":true,\"endpointConfiguration\":{\r\n \"inboundEndpoints\":[\r\n {\r\n \"name\":\"TestEndpointConfig.0\",\"protocol\":\"udp\",\"publicIPAddress\":\"13.78.145.35\",\"publicFQDN\":\"dns50c5a4a8-abfb-4b94-b687-0389fef3fe8a-azurebatch-cloudservice.westcentralus.cloudapp.azure.com\",\"frontendPort\":60000,\"backendPort\":64444\r\n },{\r\n \"name\":\"SSHRule.0\",\"protocol\":\"tcp\",\"publicIPAddress\":\"13.78.145.35\",\"publicFQDN\":\"dns50c5a4a8-abfb-4b94-b687-0389fef3fe8a-azurebatch-cloudservice.westcentralus.cloudapp.azure.com\",\"frontendPort\":50000,\"backendPort\":22\r\n }\r\n ]\r\n },\"nodeAgentInfo\":{\r\n \"lastUpdateTime\":\"2018-12-11T18:38:38.843981Z\",\"version\":\"1.4.7\"\r\n }\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '65c94270-05eb-4d2d-9dba-c233920c9ac8', + 'request-id': '032dd45a-dcf9-4a81-96ef-165e709308c2', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:23:08 GMT', + date: 'Tue, 11 Dec 2018 18:42:29 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_list_a_maximum_number_of_pools.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_list_a_maximum_number_of_pools.nock.js index 64c522e7f4..d9647a32ee 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_list_a_maximum_number_of_pools.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_list_a_maximum_number_of_pools.nock.js @@ -1,64 +1,64 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .get('/pools?api-version=2018-08-01.7.0&maxresults=1') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#pools\",\"value\":[\r\n {\r\n \"id\":\"nodesdkinboundendpointpool\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/pools/nodesdkinboundendpointpool\",\"eTag\":\"0x8D607A2FA29DA10\",\"lastModified\":\"2018-08-21T20:16:28.2647056Z\",\"creationTime\":\"2018-08-21T20:16:28.2647056Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-08-21T20:16:28.2647056Z\",\"allocationState\":\"steady\",\"allocationStateTransitionTime\":\"2018-08-21T20:18:10.9689835Z\",\"vmSize\":\"standard_a1\",\"resizeTimeout\":\"PT15M\",\"currentDedicatedNodes\":1,\"targetDedicatedNodes\":1,\"currentLowPriorityNodes\":0,\"targetLowPriorityNodes\":0,\"enableAutoScale\":false,\"enableInterNodeCommunication\":false,\"maxTasksPerNode\":1,\"taskSchedulingPolicy\":{\r\n \"nodeFillType\":\"Spread\"\r\n },\"virtualMachineConfiguration\":{\r\n \"imageReference\":{\r\n \"publisher\":\"Canonical\",\"offer\":\"UbuntuServer\",\"sku\":\"16.04-LTS\",\"version\":\"latest\"\r\n },\"nodeAgentSKUId\":\"batch.node.ubuntu 16.04\"\r\n },\"networkConfiguration\":{\r\n \"endpointConfiguration\":{\r\n \"inboundNATPools\":[\r\n {\r\n \"name\":\"TestEndpointConfig\",\"protocol\":\"udp\",\"backendPort\":64444,\"frontendPortRangeStart\":60000,\"frontendPortRangeEnd\":61000\r\n }\r\n ]\r\n }\r\n }\r\n }\r\n ],\"odata.nextLink\":\"https://lchency4.westcentralus.batch.azure.com/pools?api-version=2018-08-01.7.0&maxresults=1&$skiptoken=WATV2:eCinib1p8ymm8mMqiNz3Wrsmzu1MV0tNnD7vb1K8ix63zzBYpQt8rSEaNFjUaVcwLUPB8mh/KHfFNqe1sl%5EwbUnwefQHvR666nStghj%5E4RyeIYMXrCVszuXexL2M2xE46VMRye8no6mCp1A2nF3%5E61KI2APbciMWa99n5lSxStX7EWaSO0EDGQz42t1Vl32lIqXRwioWaGdu59ncYpW3vCpoHu9dLyURLacM8HURFz01i5Kam63t9bD0uO5iEgDm97YGoad%5EqxpTlH14iCj%5EyQ==:1$1\"\r\n}", { 'transfer-encoding': 'chunked', +nock('http://test3.westcentralus.batch.azure.com:443') + .get('/pools?api-version=2018-12-01.8.0&maxresults=1') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#pools\",\"value\":[\r\n {\r\n \"id\":\"nodesdkinboundendpointpool\",\"url\":\"https://test3.westcentralus.batch.azure.com/pools/nodesdkinboundendpointpool\",\"eTag\":\"0x8D65F9778F109AA\",\"lastModified\":\"2018-12-11T18:35:49.3266858Z\",\"creationTime\":\"2018-12-11T18:35:49.3266858Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-12-11T18:35:49.3266858Z\",\"allocationState\":\"steady\",\"allocationStateTransitionTime\":\"2018-12-11T18:37:15.7227081Z\",\"vmSize\":\"standard_a1\",\"resizeTimeout\":\"PT15M\",\"currentDedicatedNodes\":1,\"targetDedicatedNodes\":1,\"currentLowPriorityNodes\":0,\"targetLowPriorityNodes\":0,\"enableAutoScale\":false,\"enableInterNodeCommunication\":false,\"maxTasksPerNode\":1,\"taskSchedulingPolicy\":{\r\n \"nodeFillType\":\"Spread\"\r\n },\"virtualMachineConfiguration\":{\r\n \"imageReference\":{\r\n \"publisher\":\"Canonical\",\"offer\":\"UbuntuServer\",\"sku\":\"16.04-LTS\",\"version\":\"latest\"\r\n },\"nodeAgentSKUId\":\"batch.node.ubuntu 16.04\"\r\n },\"networkConfiguration\":{\r\n \"endpointConfiguration\":{\r\n \"inboundNATPools\":[\r\n {\r\n \"name\":\"TestEndpointConfig\",\"protocol\":\"udp\",\"backendPort\":64444,\"frontendPortRangeStart\":60000,\"frontendPortRangeEnd\":61000\r\n }\r\n ]\r\n }\r\n }\r\n }\r\n ],\"odata.nextLink\":\"https://test3.westcentralus.batch.azure.com/pools?api-version=2018-12-01.8.0&maxresults=1&$skiptoken=WATV2:xXTnx8aYHbmAN4GZ35TF7f3jZee9yHbM9quAZHeSpZL7ZKnwc27X5/icmfiPuypc4pHLn9Vh80uomeDu1c98gVtTwVPXMW8jsyO44HoYTQj5vKsNOV8wdG6ZRRCv9lNQh55Ka1k2C9Ujf5B3PZahiW65D8eGqtKQ5CMPVpLJSDmKDcLZoILMFOADcj42z8OTY4X81oJ38rTL1a8bKdZ0tvutule4sVdN8kc7HBdO6R43/e/kQQIhe0SJVY6u2qdRuNkyt5kLcvggG0ifEfLJXQ==:1$1\"\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '69c37e01-027c-45bf-a26b-448165c3d374', + 'request-id': 'd95435d2-5100-4cca-8999-23a89f4a4144', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:25:21 GMT', + date: 'Tue, 11 Dec 2018 18:44:46 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .get('/pools?api-version=2018-08-01.7.0&maxresults=1') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#pools\",\"value\":[\r\n {\r\n \"id\":\"nodesdkinboundendpointpool\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/pools/nodesdkinboundendpointpool\",\"eTag\":\"0x8D607A2FA29DA10\",\"lastModified\":\"2018-08-21T20:16:28.2647056Z\",\"creationTime\":\"2018-08-21T20:16:28.2647056Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-08-21T20:16:28.2647056Z\",\"allocationState\":\"steady\",\"allocationStateTransitionTime\":\"2018-08-21T20:18:10.9689835Z\",\"vmSize\":\"standard_a1\",\"resizeTimeout\":\"PT15M\",\"currentDedicatedNodes\":1,\"targetDedicatedNodes\":1,\"currentLowPriorityNodes\":0,\"targetLowPriorityNodes\":0,\"enableAutoScale\":false,\"enableInterNodeCommunication\":false,\"maxTasksPerNode\":1,\"taskSchedulingPolicy\":{\r\n \"nodeFillType\":\"Spread\"\r\n },\"virtualMachineConfiguration\":{\r\n \"imageReference\":{\r\n \"publisher\":\"Canonical\",\"offer\":\"UbuntuServer\",\"sku\":\"16.04-LTS\",\"version\":\"latest\"\r\n },\"nodeAgentSKUId\":\"batch.node.ubuntu 16.04\"\r\n },\"networkConfiguration\":{\r\n \"endpointConfiguration\":{\r\n \"inboundNATPools\":[\r\n {\r\n \"name\":\"TestEndpointConfig\",\"protocol\":\"udp\",\"backendPort\":64444,\"frontendPortRangeStart\":60000,\"frontendPortRangeEnd\":61000\r\n }\r\n ]\r\n }\r\n }\r\n }\r\n ],\"odata.nextLink\":\"https://lchency4.westcentralus.batch.azure.com/pools?api-version=2018-08-01.7.0&maxresults=1&$skiptoken=WATV2:eCinib1p8ymm8mMqiNz3Wrsmzu1MV0tNnD7vb1K8ix63zzBYpQt8rSEaNFjUaVcwLUPB8mh/KHfFNqe1sl%5EwbUnwefQHvR666nStghj%5E4RyeIYMXrCVszuXexL2M2xE46VMRye8no6mCp1A2nF3%5E61KI2APbciMWa99n5lSxStX7EWaSO0EDGQz42t1Vl32lIqXRwioWaGdu59ncYpW3vCpoHu9dLyURLacM8HURFz01i5Kam63t9bD0uO5iEgDm97YGoad%5EqxpTlH14iCj%5EyQ==:1$1\"\r\n}", { 'transfer-encoding': 'chunked', +nock('https://test3.westcentralus.batch.azure.com:443') + .get('/pools?api-version=2018-12-01.8.0&maxresults=1') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#pools\",\"value\":[\r\n {\r\n \"id\":\"nodesdkinboundendpointpool\",\"url\":\"https://test3.westcentralus.batch.azure.com/pools/nodesdkinboundendpointpool\",\"eTag\":\"0x8D65F9778F109AA\",\"lastModified\":\"2018-12-11T18:35:49.3266858Z\",\"creationTime\":\"2018-12-11T18:35:49.3266858Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-12-11T18:35:49.3266858Z\",\"allocationState\":\"steady\",\"allocationStateTransitionTime\":\"2018-12-11T18:37:15.7227081Z\",\"vmSize\":\"standard_a1\",\"resizeTimeout\":\"PT15M\",\"currentDedicatedNodes\":1,\"targetDedicatedNodes\":1,\"currentLowPriorityNodes\":0,\"targetLowPriorityNodes\":0,\"enableAutoScale\":false,\"enableInterNodeCommunication\":false,\"maxTasksPerNode\":1,\"taskSchedulingPolicy\":{\r\n \"nodeFillType\":\"Spread\"\r\n },\"virtualMachineConfiguration\":{\r\n \"imageReference\":{\r\n \"publisher\":\"Canonical\",\"offer\":\"UbuntuServer\",\"sku\":\"16.04-LTS\",\"version\":\"latest\"\r\n },\"nodeAgentSKUId\":\"batch.node.ubuntu 16.04\"\r\n },\"networkConfiguration\":{\r\n \"endpointConfiguration\":{\r\n \"inboundNATPools\":[\r\n {\r\n \"name\":\"TestEndpointConfig\",\"protocol\":\"udp\",\"backendPort\":64444,\"frontendPortRangeStart\":60000,\"frontendPortRangeEnd\":61000\r\n }\r\n ]\r\n }\r\n }\r\n }\r\n ],\"odata.nextLink\":\"https://test3.westcentralus.batch.azure.com/pools?api-version=2018-12-01.8.0&maxresults=1&$skiptoken=WATV2:xXTnx8aYHbmAN4GZ35TF7f3jZee9yHbM9quAZHeSpZL7ZKnwc27X5/icmfiPuypc4pHLn9Vh80uomeDu1c98gVtTwVPXMW8jsyO44HoYTQj5vKsNOV8wdG6ZRRCv9lNQh55Ka1k2C9Ujf5B3PZahiW65D8eGqtKQ5CMPVpLJSDmKDcLZoILMFOADcj42z8OTY4X81oJ38rTL1a8bKdZ0tvutule4sVdN8kc7HBdO6R43/e/kQQIhe0SJVY6u2qdRuNkyt5kLcvggG0ifEfLJXQ==:1$1\"\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '69c37e01-027c-45bf-a26b-448165c3d374', + 'request-id': 'd95435d2-5100-4cca-8999-23a89f4a4144', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:25:21 GMT', + date: 'Tue, 11 Dec 2018 18:44:46 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .get('/pools?api-version=2018-08-01.7.0&maxresults=1&$skiptoken=WATV2:eCinib1p8ymm8mMqiNz3Wrsmzu1MV0tNnD7vb1K8ix63zzBYpQt8rSEaNFjUaVcwLUPB8mh/KHfFNqe1sl%5EwbUnwefQHvR666nStghj%5E4RyeIYMXrCVszuXexL2M2xE46VMRye8no6mCp1A2nF3%5E61KI2APbciMWa99n5lSxStX7EWaSO0EDGQz42t1Vl32lIqXRwioWaGdu59ncYpW3vCpoHu9dLyURLacM8HURFz01i5Kam63t9bD0uO5iEgDm97YGoad%5EqxpTlH14iCj%5EyQ==:1$1') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#pools\",\"value\":[\r\n {\r\n \"id\":\"nodesdktestpool1\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1\",\"eTag\":\"0x8D607A437BD2FE0\",\"lastModified\":\"2018-08-21T20:25:21.0680288Z\",\"creationTime\":\"2018-08-21T20:05:04.4042325Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-08-21T20:05:04.4042325Z\",\"allocationState\":\"stopping\",\"allocationStateTransitionTime\":\"2018-08-21T20:25:21.0680288Z\",\"vmSize\":\"small\",\"resizeTimeout\":\"PT15M\",\"currentDedicatedNodes\":3,\"targetDedicatedNodes\":2,\"currentLowPriorityNodes\":0,\"targetLowPriorityNodes\":0,\"enableAutoScale\":false,\"enableInterNodeCommunication\":false,\"startTask\":{\r\n \"commandLine\":\"cmd /c echo hello > hello.txt\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"maxTaskRetryCount\":0,\"waitForSuccess\":false\r\n },\"userAccounts\":[\r\n {\r\n \"name\":\"nonAdminUser\",\"elevationLevel\":\"nonadmin\"\r\n }\r\n ],\"metadata\":[\r\n {\r\n \"name\":\"foo2\",\"value\":\"bar2\"\r\n }\r\n ],\"maxTasksPerNode\":1,\"taskSchedulingPolicy\":{\r\n \"nodeFillType\":\"Spread\"\r\n },\"cloudServiceConfiguration\":{\r\n \"osFamily\":\"4\",\"targetOSVersion\":\"*\",\"currentOSVersion\":\"*\"\r\n }\r\n }\r\n ],\"odata.nextLink\":\"https://lchency4.westcentralus.batch.azure.com/pools?api-version=2018-08-01.7.0&maxresults=1&$skiptoken=WATV2:PQFgS3ENlQlwds40%5E7uYOKDzwaZBB9m2eCCzqo4yyCYqYUUcaHHWRRGF2QxPFPbRIs9ieKcy8pXJRvrFrE/LfERgbwn0qDIpGeQUtRuCCzUkxLdjVR4JI%5EqOEu%5E4qWKjEMz/UFNZh6IJZssFaB25H4meeYwalq%5EOhgubOwHGNP8FgquCDtUYiU8rqDP9Mm8sl6xVWqwjvsXh5uNDV2oqCYTIJYecHeDQbQfMB0sZ2sqkHPLlbvCD3oAmH3Tr62gByV/Q28zuPJHrzzqn1SSrzg==:1$1\"\r\n}", { 'transfer-encoding': 'chunked', +nock('http://test3.westcentralus.batch.azure.com:443') + .get('/pools?api-version=2018-12-01.8.0&maxresults=1&$skiptoken=WATV2:xXTnx8aYHbmAN4GZ35TF7f3jZee9yHbM9quAZHeSpZL7ZKnwc27X5/icmfiPuypc4pHLn9Vh80uomeDu1c98gVtTwVPXMW8jsyO44HoYTQj5vKsNOV8wdG6ZRRCv9lNQh55Ka1k2C9Ujf5B3PZahiW65D8eGqtKQ5CMPVpLJSDmKDcLZoILMFOADcj42z8OTY4X81oJ38rTL1a8bKdZ0tvutule4sVdN8kc7HBdO6R43/e/kQQIhe0SJVY6u2qdRuNkyt5kLcvggG0ifEfLJXQ==:1$1') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#pools\",\"value\":[\r\n {\r\n \"id\":\"nodesdkosdiskpool\",\"url\":\"https://test3.westcentralus.batch.azure.com/pools/nodesdkosdiskpool\",\"eTag\":\"0x8D65F97770B2ED1\",\"lastModified\":\"2018-12-11T18:35:46.1425873Z\",\"creationTime\":\"2018-12-11T18:35:46.1425873Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-12-11T18:35:46.1425873Z\",\"allocationState\":\"steady\",\"allocationStateTransitionTime\":\"2018-12-11T18:35:46.5651472Z\",\"vmSize\":\"standard_a1\",\"resizeTimeout\":\"PT15M\",\"currentDedicatedNodes\":0,\"targetDedicatedNodes\":0,\"currentLowPriorityNodes\":0,\"targetLowPriorityNodes\":0,\"enableAutoScale\":false,\"enableInterNodeCommunication\":false,\"maxTasksPerNode\":1,\"taskSchedulingPolicy\":{\r\n \"nodeFillType\":\"Spread\"\r\n },\"virtualMachineConfiguration\":{\r\n \"imageReference\":{\r\n \"publisher\":\"Canonical\",\"offer\":\"UbuntuServer\",\"sku\":\"16.04-LTS\",\"version\":\"latest\"\r\n },\"nodeAgentSKUId\":\"batch.node.ubuntu 16.04\"\r\n }\r\n }\r\n ],\"odata.nextLink\":\"https://test3.westcentralus.batch.azure.com/pools?api-version=2018-12-01.8.0&maxresults=1&$skiptoken=WATV2:A6ur9/pk0mRSAwHGWDWq47cLv5wW9C4n5Dw3Nf2nEOie8%5ED13Z6GCrPf4oCldYZ0n1Ri1LE6oEU408r83oetGznQuFNm1z/p1zMixyiOWKnaZCmyNoOszGLjGKXP%5EsJ2u%5EruLKD8XyOuopXpk8/t1mOwAUVMCBy6gJ7HvYHq49TbYSCRw6vNfdVFhLgyQUS4U2DXT5bghCWUkaeUS6NgHT8im712eY7Hjx1UoYPJ1fnIivVDXFzuswbr5MyW7bHnKqVw/lqMvf5hSzfwj3dSxg==:1$1\"\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '9cb6fb66-9157-47f5-9b8c-1896d1441162', + 'request-id': 'e1bc24c0-e5b7-4132-ab31-f70d15a4d848', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:25:21 GMT', + date: 'Tue, 11 Dec 2018 18:44:46 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .get('/pools?api-version=2018-08-01.7.0&maxresults=1&$skiptoken=WATV2:eCinib1p8ymm8mMqiNz3Wrsmzu1MV0tNnD7vb1K8ix63zzBYpQt8rSEaNFjUaVcwLUPB8mh/KHfFNqe1sl%5EwbUnwefQHvR666nStghj%5E4RyeIYMXrCVszuXexL2M2xE46VMRye8no6mCp1A2nF3%5E61KI2APbciMWa99n5lSxStX7EWaSO0EDGQz42t1Vl32lIqXRwioWaGdu59ncYpW3vCpoHu9dLyURLacM8HURFz01i5Kam63t9bD0uO5iEgDm97YGoad%5EqxpTlH14iCj%5EyQ==:1$1') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#pools\",\"value\":[\r\n {\r\n \"id\":\"nodesdktestpool1\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1\",\"eTag\":\"0x8D607A437BD2FE0\",\"lastModified\":\"2018-08-21T20:25:21.0680288Z\",\"creationTime\":\"2018-08-21T20:05:04.4042325Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-08-21T20:05:04.4042325Z\",\"allocationState\":\"stopping\",\"allocationStateTransitionTime\":\"2018-08-21T20:25:21.0680288Z\",\"vmSize\":\"small\",\"resizeTimeout\":\"PT15M\",\"currentDedicatedNodes\":3,\"targetDedicatedNodes\":2,\"currentLowPriorityNodes\":0,\"targetLowPriorityNodes\":0,\"enableAutoScale\":false,\"enableInterNodeCommunication\":false,\"startTask\":{\r\n \"commandLine\":\"cmd /c echo hello > hello.txt\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"maxTaskRetryCount\":0,\"waitForSuccess\":false\r\n },\"userAccounts\":[\r\n {\r\n \"name\":\"nonAdminUser\",\"elevationLevel\":\"nonadmin\"\r\n }\r\n ],\"metadata\":[\r\n {\r\n \"name\":\"foo2\",\"value\":\"bar2\"\r\n }\r\n ],\"maxTasksPerNode\":1,\"taskSchedulingPolicy\":{\r\n \"nodeFillType\":\"Spread\"\r\n },\"cloudServiceConfiguration\":{\r\n \"osFamily\":\"4\",\"targetOSVersion\":\"*\",\"currentOSVersion\":\"*\"\r\n }\r\n }\r\n ],\"odata.nextLink\":\"https://lchency4.westcentralus.batch.azure.com/pools?api-version=2018-08-01.7.0&maxresults=1&$skiptoken=WATV2:PQFgS3ENlQlwds40%5E7uYOKDzwaZBB9m2eCCzqo4yyCYqYUUcaHHWRRGF2QxPFPbRIs9ieKcy8pXJRvrFrE/LfERgbwn0qDIpGeQUtRuCCzUkxLdjVR4JI%5EqOEu%5E4qWKjEMz/UFNZh6IJZssFaB25H4meeYwalq%5EOhgubOwHGNP8FgquCDtUYiU8rqDP9Mm8sl6xVWqwjvsXh5uNDV2oqCYTIJYecHeDQbQfMB0sZ2sqkHPLlbvCD3oAmH3Tr62gByV/Q28zuPJHrzzqn1SSrzg==:1$1\"\r\n}", { 'transfer-encoding': 'chunked', +nock('https://test3.westcentralus.batch.azure.com:443') + .get('/pools?api-version=2018-12-01.8.0&maxresults=1&$skiptoken=WATV2:xXTnx8aYHbmAN4GZ35TF7f3jZee9yHbM9quAZHeSpZL7ZKnwc27X5/icmfiPuypc4pHLn9Vh80uomeDu1c98gVtTwVPXMW8jsyO44HoYTQj5vKsNOV8wdG6ZRRCv9lNQh55Ka1k2C9Ujf5B3PZahiW65D8eGqtKQ5CMPVpLJSDmKDcLZoILMFOADcj42z8OTY4X81oJ38rTL1a8bKdZ0tvutule4sVdN8kc7HBdO6R43/e/kQQIhe0SJVY6u2qdRuNkyt5kLcvggG0ifEfLJXQ==:1$1') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#pools\",\"value\":[\r\n {\r\n \"id\":\"nodesdkosdiskpool\",\"url\":\"https://test3.westcentralus.batch.azure.com/pools/nodesdkosdiskpool\",\"eTag\":\"0x8D65F97770B2ED1\",\"lastModified\":\"2018-12-11T18:35:46.1425873Z\",\"creationTime\":\"2018-12-11T18:35:46.1425873Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-12-11T18:35:46.1425873Z\",\"allocationState\":\"steady\",\"allocationStateTransitionTime\":\"2018-12-11T18:35:46.5651472Z\",\"vmSize\":\"standard_a1\",\"resizeTimeout\":\"PT15M\",\"currentDedicatedNodes\":0,\"targetDedicatedNodes\":0,\"currentLowPriorityNodes\":0,\"targetLowPriorityNodes\":0,\"enableAutoScale\":false,\"enableInterNodeCommunication\":false,\"maxTasksPerNode\":1,\"taskSchedulingPolicy\":{\r\n \"nodeFillType\":\"Spread\"\r\n },\"virtualMachineConfiguration\":{\r\n \"imageReference\":{\r\n \"publisher\":\"Canonical\",\"offer\":\"UbuntuServer\",\"sku\":\"16.04-LTS\",\"version\":\"latest\"\r\n },\"nodeAgentSKUId\":\"batch.node.ubuntu 16.04\"\r\n }\r\n }\r\n ],\"odata.nextLink\":\"https://test3.westcentralus.batch.azure.com/pools?api-version=2018-12-01.8.0&maxresults=1&$skiptoken=WATV2:A6ur9/pk0mRSAwHGWDWq47cLv5wW9C4n5Dw3Nf2nEOie8%5ED13Z6GCrPf4oCldYZ0n1Ri1LE6oEU408r83oetGznQuFNm1z/p1zMixyiOWKnaZCmyNoOszGLjGKXP%5EsJ2u%5EruLKD8XyOuopXpk8/t1mOwAUVMCBy6gJ7HvYHq49TbYSCRw6vNfdVFhLgyQUS4U2DXT5bghCWUkaeUS6NgHT8im712eY7Hjx1UoYPJ1fnIivVDXFzuswbr5MyW7bHnKqVw/lqMvf5hSzfwj3dSxg==:1$1\"\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '9cb6fb66-9157-47f5-9b8c-1896d1441162', + 'request-id': 'e1bc24c0-e5b7-4132-ab31-f70d15a4d848', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:25:21 GMT', + date: 'Tue, 11 Dec 2018 18:44:46 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_list_all_tasks_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_list_all_tasks_successfully.nock.js index 7d2a8285c7..9c10c775b6 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_list_all_tasks_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_list_all_tasks_successfully.nock.js @@ -1,36 +1,36 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .get('/jobs/HelloWorldJobNodeSDKTest/tasks?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#tasks\",\"value\":[\r\n {\r\n \"id\":\"HelloWorldNodeSDKTestTask\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask\",\"eTag\":\"0x8D607A43AB500D1\",\"creationTime\":\"2018-08-21T20:25:24.0548994Z\",\"lastModified\":\"2018-08-21T20:25:26.0475601Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-08-21T20:25:26.0475601Z\",\"previousState\":\"completed\",\"previousStateTransitionTime\":\"2018-08-21T20:25:25.7617271Z\",\"commandLine\":\"ping 127.0.0.1 -n 20\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"constraints\":{\r\n \"maxWallClockTime\":\"P10675199DT2H48M5.4775807S\",\"retentionTime\":\"P10675199DT2H48M5.4775807S\",\"maxTaskRetryCount\":3\r\n },\"executionInfo\":{\r\n \"retryCount\":0,\"requeueCount\":0\r\n }\r\n },{\r\n \"id\":\"HelloWorldNodeSDKTestTask2\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2\",\"eTag\":\"0x8D607A43AD67EAE\",\"creationTime\":\"2018-08-21T20:25:25.8802067Z\",\"lastModified\":\"2018-08-21T20:25:26.267051Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-08-21T20:25:25.8802067Z\",\"commandLine\":\"cmd /c echo hello world\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"constraints\":{\r\n \"maxWallClockTime\":\"P10675199DT2H48M5.4775807S\",\"retentionTime\":\"P10675199DT2H48M5.4775807S\",\"maxTaskRetryCount\":3\r\n },\"executionInfo\":{\r\n \"retryCount\":0,\"requeueCount\":0\r\n }\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', +nock('http://test3.westcentralus.batch.azure.com:443') + .get('/jobs/HelloWorldJobNodeSDKTest/tasks?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#tasks\",\"value\":[\r\n {\r\n \"id\":\"HelloWorldNodeSDKTestTask\",\"url\":\"https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask\",\"eTag\":\"0x8D65F98BC3C1AEF\",\"creationTime\":\"2018-12-11T18:44:49.2209796Z\",\"lastModified\":\"2018-12-11T18:44:51.7227247Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-12-11T18:44:51.7227247Z\",\"previousState\":\"completed\",\"previousStateTransitionTime\":\"2018-12-11T18:44:50.992308Z\",\"commandLine\":\"ping 127.0.0.1 -n 20\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"constraints\":{\r\n \"maxWallClockTime\":\"P10675199DT2H48M5.4775807S\",\"retentionTime\":\"P7D\",\"maxTaskRetryCount\":3\r\n },\"executionInfo\":{\r\n \"retryCount\":0,\"requeueCount\":0\r\n }\r\n },{\r\n \"id\":\"HelloWorldNodeSDKTestTask2\",\"url\":\"https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2\",\"eTag\":\"0x8D65F98BC678828\",\"creationTime\":\"2018-12-11T18:44:51.4943183Z\",\"lastModified\":\"2018-12-11T18:44:52.0073256Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-12-11T18:44:51.4943183Z\",\"commandLine\":\"cmd /c echo hello world\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"constraints\":{\r\n \"maxWallClockTime\":\"P10675199DT2H48M5.4775807S\",\"retentionTime\":\"P7D\",\"maxTaskRetryCount\":3\r\n },\"executionInfo\":{\r\n \"retryCount\":0,\"requeueCount\":0\r\n }\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'b58729e6-7df8-4ab6-a8f1-f0b16916183a', + 'request-id': 'cdd1c784-ea2c-4c9e-bedd-c50bcf12fa0e', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:25:25 GMT', + date: 'Tue, 11 Dec 2018 18:44:52 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .get('/jobs/HelloWorldJobNodeSDKTest/tasks?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#tasks\",\"value\":[\r\n {\r\n \"id\":\"HelloWorldNodeSDKTestTask\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask\",\"eTag\":\"0x8D607A43AB500D1\",\"creationTime\":\"2018-08-21T20:25:24.0548994Z\",\"lastModified\":\"2018-08-21T20:25:26.0475601Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-08-21T20:25:26.0475601Z\",\"previousState\":\"completed\",\"previousStateTransitionTime\":\"2018-08-21T20:25:25.7617271Z\",\"commandLine\":\"ping 127.0.0.1 -n 20\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"constraints\":{\r\n \"maxWallClockTime\":\"P10675199DT2H48M5.4775807S\",\"retentionTime\":\"P10675199DT2H48M5.4775807S\",\"maxTaskRetryCount\":3\r\n },\"executionInfo\":{\r\n \"retryCount\":0,\"requeueCount\":0\r\n }\r\n },{\r\n \"id\":\"HelloWorldNodeSDKTestTask2\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2\",\"eTag\":\"0x8D607A43AD67EAE\",\"creationTime\":\"2018-08-21T20:25:25.8802067Z\",\"lastModified\":\"2018-08-21T20:25:26.267051Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-08-21T20:25:25.8802067Z\",\"commandLine\":\"cmd /c echo hello world\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"constraints\":{\r\n \"maxWallClockTime\":\"P10675199DT2H48M5.4775807S\",\"retentionTime\":\"P10675199DT2H48M5.4775807S\",\"maxTaskRetryCount\":3\r\n },\"executionInfo\":{\r\n \"retryCount\":0,\"requeueCount\":0\r\n }\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', +nock('https://test3.westcentralus.batch.azure.com:443') + .get('/jobs/HelloWorldJobNodeSDKTest/tasks?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#tasks\",\"value\":[\r\n {\r\n \"id\":\"HelloWorldNodeSDKTestTask\",\"url\":\"https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask\",\"eTag\":\"0x8D65F98BC3C1AEF\",\"creationTime\":\"2018-12-11T18:44:49.2209796Z\",\"lastModified\":\"2018-12-11T18:44:51.7227247Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-12-11T18:44:51.7227247Z\",\"previousState\":\"completed\",\"previousStateTransitionTime\":\"2018-12-11T18:44:50.992308Z\",\"commandLine\":\"ping 127.0.0.1 -n 20\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"constraints\":{\r\n \"maxWallClockTime\":\"P10675199DT2H48M5.4775807S\",\"retentionTime\":\"P7D\",\"maxTaskRetryCount\":3\r\n },\"executionInfo\":{\r\n \"retryCount\":0,\"requeueCount\":0\r\n }\r\n },{\r\n \"id\":\"HelloWorldNodeSDKTestTask2\",\"url\":\"https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2\",\"eTag\":\"0x8D65F98BC678828\",\"creationTime\":\"2018-12-11T18:44:51.4943183Z\",\"lastModified\":\"2018-12-11T18:44:52.0073256Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-12-11T18:44:51.4943183Z\",\"commandLine\":\"cmd /c echo hello world\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"constraints\":{\r\n \"maxWallClockTime\":\"P10675199DT2H48M5.4775807S\",\"retentionTime\":\"P7D\",\"maxTaskRetryCount\":3\r\n },\"executionInfo\":{\r\n \"retryCount\":0,\"requeueCount\":0\r\n }\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'b58729e6-7df8-4ab6-a8f1-f0b16916183a', + 'request-id': 'cdd1c784-ea2c-4c9e-bedd-c50bcf12fa0e', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:25:25 GMT', + date: 'Tue, 11 Dec 2018 18:44:52 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_list_applications_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_list_applications_successfully.nock.js index 64c10c6477..3aeb5e457d 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_list_applications_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_list_applications_successfully.nock.js @@ -1,36 +1,36 @@ -// This file has been autogenerated. - -exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; -}; - +// This file has been autogenerated. + +exports.setEnvironment = function() { + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; +}; + exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .get('/applications?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#listapplicationsummariesresponses\",\"value\":[\r\n {\r\n \"id\":\"my_application_id\",\"versions\":[\r\n \"v1.0\"\r\n ],\"displayName\":\"my_updated_name\"\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', +nock('http://test3.westcentralus.batch.azure.com:443') + .get('/applications?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#listapplicationsummariesresponses\",\"value\":[\r\n {\r\n \"id\":\"my_application_id\",\"versions\":[\r\n \"1.0\"\r\n ]\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '9ece1c35-c5d2-404e-940b-570b30f9117f', + 'request-id': 'a8baccc6-fc95-4525-bd2b-dcee276de021', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:30:58 GMT', + date: 'Tue, 11 Dec 2018 18:48:32 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .get('/applications?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#listapplicationsummariesresponses\",\"value\":[\r\n {\r\n \"id\":\"my_application_id\",\"versions\":[\r\n \"v1.0\"\r\n ],\"displayName\":\"my_updated_name\"\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', +nock('https://test3.westcentralus.batch.azure.com:443') + .get('/applications?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#listapplicationsummariesresponses\",\"value\":[\r\n {\r\n \"id\":\"my_application_id\",\"versions\":[\r\n \"1.0\"\r\n ]\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '9ece1c35-c5d2-404e-940b-570b30f9117f', + 'request-id': 'a8baccc6-fc95-4525-bd2b-dcee276de021', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:30:58 GMT', + date: 'Tue, 11 Dec 2018 18:48:32 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_list_certificates_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_list_certificates_successfully.nock.js index effb728e40..31d3447249 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_list_certificates_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_list_certificates_successfully.nock.js @@ -1,36 +1,36 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .get('/certificates?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#certificates\",\"value\":[\r\n {\r\n \"thumbprint\":\"cff2ab63c8c955aaf71989efa641b906558d9fb7\",\"thumbprintAlgorithm\":\"sha1\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/certificates(thumbprintAlgorithm=sha1,thumbprint=cff2ab63c8c955aaf71989efa641b906558d9fb7)\",\"state\":\"active\",\"stateTransitionTime\":\"2018-08-21T20:05:03.6975129Z\",\"publicData\":\"MIIBrzCCAV2gAwIBAgIQHZGt2k0LCLFKYYCFxlJnkTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC1Jvb3QgQWdlbmN5MB4XDTE2MDEwMTA3MDAwMFoXDTE4MDEwMTA3MDAwMFowEjEQMA4GA1UEAxMHbm9kZXNkazCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAuX4XMWyR8cQRCA81TjHOerNOFOpOBj2O8jEdZvqwRlUYgMleEY2OlPd+nalxwlQ9+qbNkNGfjnhIMgiJ5CMlXgdRMF3E6DnMnktmHFG9L0VmQ6Lgt7bhXR8IitRHeYlvy5LJlw6Lcle5Kas2j4ThYjLQbjBMDSXD4HvZNe4UYEUCAwEAAaNLMEkwRwYDVR0BBEAwPoAQEuQJLQYdHU8AjWEh3BZkY6EYMBYxFDASBgNVBAMTC1Jvb3QgQWdlbmN5ghAGN2wAqgBkihHPuNSqXDX0MAkGBSsOAwIdBQADQQB5djPe0G6c3Z8DuR6EQbIhBMTnC0zYPhigq+x1LG83761Ir8PiSy+6oxwCHOaYZyvheW0PByntC/WFwUipfn78\"\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', +nock('http://test3.westcentralus.batch.azure.com:443') + .get('/certificates?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#certificates\",\"value\":[\r\n {\r\n \"thumbprint\":\"cff2ab63c8c955aaf71989efa641b906558d9fb7\",\"thumbprintAlgorithm\":\"sha1\",\"url\":\"https://test3.westcentralus.batch.azure.com/certificates(thumbprintAlgorithm=sha1,thumbprint=cff2ab63c8c955aaf71989efa641b906558d9fb7)\",\"state\":\"active\",\"stateTransitionTime\":\"2018-12-11T18:27:20.1209305Z\",\"publicData\":\"MIIBrzCCAV2gAwIBAgIQHZGt2k0LCLFKYYCFxlJnkTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC1Jvb3QgQWdlbmN5MB4XDTE2MDEwMTA3MDAwMFoXDTE4MDEwMTA3MDAwMFowEjEQMA4GA1UEAxMHbm9kZXNkazCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAuX4XMWyR8cQRCA81TjHOerNOFOpOBj2O8jEdZvqwRlUYgMleEY2OlPd+nalxwlQ9+qbNkNGfjnhIMgiJ5CMlXgdRMF3E6DnMnktmHFG9L0VmQ6Lgt7bhXR8IitRHeYlvy5LJlw6Lcle5Kas2j4ThYjLQbjBMDSXD4HvZNe4UYEUCAwEAAaNLMEkwRwYDVR0BBEAwPoAQEuQJLQYdHU8AjWEh3BZkY6EYMBYxFDASBgNVBAMTC1Jvb3QgQWdlbmN5ghAGN2wAqgBkihHPuNSqXDX0MAkGBSsOAwIdBQADQQB5djPe0G6c3Z8DuR6EQbIhBMTnC0zYPhigq+x1LG83761Ir8PiSy+6oxwCHOaYZyvheW0PByntC/WFwUipfn78\"\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '816e866e-48c4-423b-8691-1b96db584d1e', + 'request-id': '6eda449c-272d-48f6-b414-bbde9bf34f18', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:05:03 GMT', + date: 'Tue, 11 Dec 2018 18:27:19 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .get('/certificates?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#certificates\",\"value\":[\r\n {\r\n \"thumbprint\":\"cff2ab63c8c955aaf71989efa641b906558d9fb7\",\"thumbprintAlgorithm\":\"sha1\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/certificates(thumbprintAlgorithm=sha1,thumbprint=cff2ab63c8c955aaf71989efa641b906558d9fb7)\",\"state\":\"active\",\"stateTransitionTime\":\"2018-08-21T20:05:03.6975129Z\",\"publicData\":\"MIIBrzCCAV2gAwIBAgIQHZGt2k0LCLFKYYCFxlJnkTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC1Jvb3QgQWdlbmN5MB4XDTE2MDEwMTA3MDAwMFoXDTE4MDEwMTA3MDAwMFowEjEQMA4GA1UEAxMHbm9kZXNkazCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAuX4XMWyR8cQRCA81TjHOerNOFOpOBj2O8jEdZvqwRlUYgMleEY2OlPd+nalxwlQ9+qbNkNGfjnhIMgiJ5CMlXgdRMF3E6DnMnktmHFG9L0VmQ6Lgt7bhXR8IitRHeYlvy5LJlw6Lcle5Kas2j4ThYjLQbjBMDSXD4HvZNe4UYEUCAwEAAaNLMEkwRwYDVR0BBEAwPoAQEuQJLQYdHU8AjWEh3BZkY6EYMBYxFDASBgNVBAMTC1Jvb3QgQWdlbmN5ghAGN2wAqgBkihHPuNSqXDX0MAkGBSsOAwIdBQADQQB5djPe0G6c3Z8DuR6EQbIhBMTnC0zYPhigq+x1LG83761Ir8PiSy+6oxwCHOaYZyvheW0PByntC/WFwUipfn78\"\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', +nock('https://test3.westcentralus.batch.azure.com:443') + .get('/certificates?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#certificates\",\"value\":[\r\n {\r\n \"thumbprint\":\"cff2ab63c8c955aaf71989efa641b906558d9fb7\",\"thumbprintAlgorithm\":\"sha1\",\"url\":\"https://test3.westcentralus.batch.azure.com/certificates(thumbprintAlgorithm=sha1,thumbprint=cff2ab63c8c955aaf71989efa641b906558d9fb7)\",\"state\":\"active\",\"stateTransitionTime\":\"2018-12-11T18:27:20.1209305Z\",\"publicData\":\"MIIBrzCCAV2gAwIBAgIQHZGt2k0LCLFKYYCFxlJnkTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC1Jvb3QgQWdlbmN5MB4XDTE2MDEwMTA3MDAwMFoXDTE4MDEwMTA3MDAwMFowEjEQMA4GA1UEAxMHbm9kZXNkazCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAuX4XMWyR8cQRCA81TjHOerNOFOpOBj2O8jEdZvqwRlUYgMleEY2OlPd+nalxwlQ9+qbNkNGfjnhIMgiJ5CMlXgdRMF3E6DnMnktmHFG9L0VmQ6Lgt7bhXR8IitRHeYlvy5LJlw6Lcle5Kas2j4ThYjLQbjBMDSXD4HvZNe4UYEUCAwEAAaNLMEkwRwYDVR0BBEAwPoAQEuQJLQYdHU8AjWEh3BZkY6EYMBYxFDASBgNVBAMTC1Jvb3QgQWdlbmN5ghAGN2wAqgBkihHPuNSqXDX0MAkGBSsOAwIdBQADQQB5djPe0G6c3Z8DuR6EQbIhBMTnC0zYPhigq+x1LG83761Ir8PiSy+6oxwCHOaYZyvheW0PByntC/WFwUipfn78\"\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '816e866e-48c4-423b-8691-1b96db584d1e', + 'request-id': '6eda449c-272d-48f6-b414-bbde9bf34f18', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:05:03 GMT', + date: 'Tue, 11 Dec 2018 18:27:19 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_list_compute_nodes_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_list_compute_nodes_successfully.nock.js index 623e9edd49..c317d80646 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_list_compute_nodes_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_list_compute_nodes_successfully.nock.js @@ -1,36 +1,36 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .get('/pools/nodesdktestpool1/nodes?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#nodes\",\"value\":[\r\n {\r\n \"id\":\"tvm-14141481_1-20180821t200555z\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvm-14141481_1-20180821t200555z\",\"state\":\"idle\",\"schedulingState\":\"enabled\",\"stateTransitionTime\":\"2018-08-21T20:11:08.719254Z\",\"lastBootTime\":\"2018-08-21T20:11:06.8907256Z\",\"allocationTime\":\"2018-08-21T20:05:55.1606562Z\",\"ipAddress\":\"10.0.0.4\",\"affinityId\":\"TVM:tvm-14141481_1-20180821t200555z\",\"vmSize\":\"small\",\"totalTasksRun\":0,\"totalTasksSucceeded\":0,\"runningTasksCount\":0,\"startTask\":{\r\n \"commandLine\":\"cmd /c echo hello > hello.txt\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"maxTaskRetryCount\":0,\"waitForSuccess\":false\r\n },\"startTaskInfo\":{\r\n \"state\":\"completed\",\"startTime\":\"2018-08-21T20:11:08.719254Z\",\"endTime\":\"2018-08-21T20:11:08.863251Z\",\"exitCode\":0,\"result\":\"Success\",\"retryCount\":0\r\n },\"isDedicated\":true\r\n },{\r\n \"id\":\"tvm-14141481_2-20180821t200555z\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvm-14141481_2-20180821t200555z\",\"state\":\"idle\",\"schedulingState\":\"enabled\",\"stateTransitionTime\":\"2018-08-21T20:11:11.1383506Z\",\"lastBootTime\":\"2018-08-21T20:11:08.5252994Z\",\"allocationTime\":\"2018-08-21T20:05:55.1606562Z\",\"ipAddress\":\"10.0.0.6\",\"affinityId\":\"TVM:tvm-14141481_2-20180821t200555z\",\"vmSize\":\"small\",\"totalTasksRun\":0,\"totalTasksSucceeded\":0,\"runningTasksCount\":0,\"startTask\":{\r\n \"commandLine\":\"cmd /c echo hello > hello.txt\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"maxTaskRetryCount\":0,\"waitForSuccess\":false\r\n },\"startTaskInfo\":{\r\n \"state\":\"completed\",\"startTime\":\"2018-08-21T20:11:11.1383506Z\",\"endTime\":\"2018-08-21T20:11:11.2845899Z\",\"exitCode\":0,\"result\":\"Success\",\"retryCount\":0\r\n },\"isDedicated\":true\r\n },{\r\n \"id\":\"tvm-14141481_3-20180821t200555z\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvm-14141481_3-20180821t200555z\",\"state\":\"idle\",\"schedulingState\":\"enabled\",\"stateTransitionTime\":\"2018-08-21T20:11:14.1474938Z\",\"lastBootTime\":\"2018-08-21T20:11:11.1369007Z\",\"allocationTime\":\"2018-08-21T20:05:55.1606562Z\",\"ipAddress\":\"10.0.0.5\",\"affinityId\":\"TVM:tvm-14141481_3-20180821t200555z\",\"vmSize\":\"small\",\"totalTasksRun\":0,\"totalTasksSucceeded\":0,\"runningTasksCount\":0,\"startTask\":{\r\n \"commandLine\":\"cmd /c echo hello > hello.txt\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"maxTaskRetryCount\":0,\"waitForSuccess\":false\r\n },\"startTaskInfo\":{\r\n \"state\":\"completed\",\"startTime\":\"2018-08-21T20:11:14.1474938Z\",\"endTime\":\"2018-08-21T20:11:14.2844393Z\",\"exitCode\":0,\"result\":\"Success\",\"retryCount\":0\r\n },\"isDedicated\":true\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', +nock('http://test3.westcentralus.batch.azure.com:443') + .get('/pools/nodesdktestpool1/nodes?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#nodes\",\"value\":[\r\n {\r\n \"id\":\"tvmps_13cf4cee9dd1594f9da06399ef98ede3e5a4010f3233627c3837a43dbeff5868_d\",\"url\":\"https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvmps_13cf4cee9dd1594f9da06399ef98ede3e5a4010f3233627c3837a43dbeff5868_d\",\"state\":\"idle\",\"schedulingState\":\"enabled\",\"stateTransitionTime\":\"2018-12-11T18:31:53.241665Z\",\"lastBootTime\":\"2018-12-11T18:31:51.8606Z\",\"allocationTime\":\"2018-12-11T18:28:36.9291366Z\",\"ipAddress\":\"10.0.0.4\",\"affinityId\":\"TVM:tvmps_13cf4cee9dd1594f9da06399ef98ede3e5a4010f3233627c3837a43dbeff5868_d\",\"vmSize\":\"small\",\"totalTasksRun\":0,\"totalTasksSucceeded\":0,\"runningTasksCount\":0,\"startTask\":{\r\n \"commandLine\":\"cmd /c echo hello > hello.txt\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"maxTaskRetryCount\":0,\"waitForSuccess\":false\r\n },\"startTaskInfo\":{\r\n \"state\":\"completed\",\"startTime\":\"2018-12-11T18:31:53.224154Z\",\"endTime\":\"2018-12-11T18:31:53.920595Z\",\"exitCode\":0,\"result\":\"success\",\"retryCount\":0\r\n },\"certificateReferences\":[\r\n \r\n ],\"isDedicated\":true,\"endpointConfiguration\":{\r\n \"inboundEndpoints\":[\r\n {\r\n \"name\":\"Microsoft.WindowsAzure.Plugins.RemoteForwarder.RdpInput\",\"protocol\":\"tcp\",\"publicIPAddress\":\"13.77.205.84\",\"frontendPort\":3389,\"backendPort\":20000\r\n }\r\n ]\r\n },\"nodeAgentInfo\":{\r\n \"lastUpdateTime\":\"2018-12-11T18:31:51.8606Z\",\"version\":\"1.4.7\"\r\n }\r\n },{\r\n \"id\":\"tvmps_15c61fea08a34e0fe431ba70cdf2156682bec1e01fdda442f2dccde21908ed91_d\",\"url\":\"https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvmps_15c61fea08a34e0fe431ba70cdf2156682bec1e01fdda442f2dccde21908ed91_d\",\"state\":\"idle\",\"schedulingState\":\"enabled\",\"stateTransitionTime\":\"2018-12-11T18:32:15.009062Z\",\"lastBootTime\":\"2018-12-11T18:32:13.820626Z\",\"allocationTime\":\"2018-12-11T18:28:36.9291366Z\",\"ipAddress\":\"10.0.0.6\",\"affinityId\":\"TVM:tvmps_15c61fea08a34e0fe431ba70cdf2156682bec1e01fdda442f2dccde21908ed91_d\",\"vmSize\":\"small\",\"totalTasksRun\":0,\"totalTasksSucceeded\":0,\"runningTasksCount\":0,\"startTask\":{\r\n \"commandLine\":\"cmd /c echo hello > hello.txt\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"maxTaskRetryCount\":0,\"waitForSuccess\":false\r\n },\"startTaskInfo\":{\r\n \"state\":\"completed\",\"startTime\":\"2018-12-11T18:32:14.993407Z\",\"endTime\":\"2018-12-11T18:32:15.698035Z\",\"exitCode\":0,\"result\":\"success\",\"retryCount\":0\r\n },\"certificateReferences\":[\r\n \r\n ],\"isDedicated\":true,\"endpointConfiguration\":{\r\n \"inboundEndpoints\":[\r\n {\r\n \"name\":\"Microsoft.WindowsAzure.Plugins.RemoteForwarder.RdpInput\",\"protocol\":\"tcp\",\"publicIPAddress\":\"13.77.205.84\",\"frontendPort\":3389,\"backendPort\":20000\r\n }\r\n ]\r\n },\"nodeAgentInfo\":{\r\n \"lastUpdateTime\":\"2018-12-11T18:32:13.820626Z\",\"version\":\"1.4.7\"\r\n }\r\n },{\r\n \"id\":\"tvmps_bc8f91eb73db7fd10d852ff323ee06ef51abb84fc93e7dae4e18fa0b0b95b030_d\",\"url\":\"https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvmps_bc8f91eb73db7fd10d852ff323ee06ef51abb84fc93e7dae4e18fa0b0b95b030_d\",\"state\":\"idle\",\"schedulingState\":\"enabled\",\"stateTransitionTime\":\"2018-12-11T18:31:54.456912Z\",\"lastBootTime\":\"2018-12-11T18:31:51.947806Z\",\"allocationTime\":\"2018-12-11T18:28:36.9291366Z\",\"ipAddress\":\"10.0.0.5\",\"affinityId\":\"TVM:tvmps_bc8f91eb73db7fd10d852ff323ee06ef51abb84fc93e7dae4e18fa0b0b95b030_d\",\"vmSize\":\"small\",\"totalTasksRun\":0,\"totalTasksSucceeded\":0,\"runningTasksCount\":0,\"startTask\":{\r\n \"commandLine\":\"cmd /c echo hello > hello.txt\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"maxTaskRetryCount\":0,\"waitForSuccess\":false\r\n },\"startTaskInfo\":{\r\n \"state\":\"completed\",\"startTime\":\"2018-12-11T18:31:54.456912Z\",\"endTime\":\"2018-12-11T18:31:55.082974Z\",\"exitCode\":0,\"result\":\"success\",\"retryCount\":0\r\n },\"certificateReferences\":[\r\n \r\n ],\"isDedicated\":true,\"endpointConfiguration\":{\r\n \"inboundEndpoints\":[\r\n {\r\n \"name\":\"Microsoft.WindowsAzure.Plugins.RemoteForwarder.RdpInput\",\"protocol\":\"tcp\",\"publicIPAddress\":\"13.77.205.84\",\"frontendPort\":3389,\"backendPort\":20000\r\n }\r\n ]\r\n },\"nodeAgentInfo\":{\r\n \"lastUpdateTime\":\"2018-12-11T18:31:51.947806Z\",\"version\":\"1.4.7\"\r\n }\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'a9e5fce0-64ea-4e02-8e13-029c46d60d39', + 'request-id': 'e6c1703d-e2b2-4148-9089-a5c58ff27c35', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:23:08 GMT', + date: 'Tue, 11 Dec 2018 18:42:30 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .get('/pools/nodesdktestpool1/nodes?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#nodes\",\"value\":[\r\n {\r\n \"id\":\"tvm-14141481_1-20180821t200555z\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvm-14141481_1-20180821t200555z\",\"state\":\"idle\",\"schedulingState\":\"enabled\",\"stateTransitionTime\":\"2018-08-21T20:11:08.719254Z\",\"lastBootTime\":\"2018-08-21T20:11:06.8907256Z\",\"allocationTime\":\"2018-08-21T20:05:55.1606562Z\",\"ipAddress\":\"10.0.0.4\",\"affinityId\":\"TVM:tvm-14141481_1-20180821t200555z\",\"vmSize\":\"small\",\"totalTasksRun\":0,\"totalTasksSucceeded\":0,\"runningTasksCount\":0,\"startTask\":{\r\n \"commandLine\":\"cmd /c echo hello > hello.txt\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"maxTaskRetryCount\":0,\"waitForSuccess\":false\r\n },\"startTaskInfo\":{\r\n \"state\":\"completed\",\"startTime\":\"2018-08-21T20:11:08.719254Z\",\"endTime\":\"2018-08-21T20:11:08.863251Z\",\"exitCode\":0,\"result\":\"Success\",\"retryCount\":0\r\n },\"isDedicated\":true\r\n },{\r\n \"id\":\"tvm-14141481_2-20180821t200555z\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvm-14141481_2-20180821t200555z\",\"state\":\"idle\",\"schedulingState\":\"enabled\",\"stateTransitionTime\":\"2018-08-21T20:11:11.1383506Z\",\"lastBootTime\":\"2018-08-21T20:11:08.5252994Z\",\"allocationTime\":\"2018-08-21T20:05:55.1606562Z\",\"ipAddress\":\"10.0.0.6\",\"affinityId\":\"TVM:tvm-14141481_2-20180821t200555z\",\"vmSize\":\"small\",\"totalTasksRun\":0,\"totalTasksSucceeded\":0,\"runningTasksCount\":0,\"startTask\":{\r\n \"commandLine\":\"cmd /c echo hello > hello.txt\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"maxTaskRetryCount\":0,\"waitForSuccess\":false\r\n },\"startTaskInfo\":{\r\n \"state\":\"completed\",\"startTime\":\"2018-08-21T20:11:11.1383506Z\",\"endTime\":\"2018-08-21T20:11:11.2845899Z\",\"exitCode\":0,\"result\":\"Success\",\"retryCount\":0\r\n },\"isDedicated\":true\r\n },{\r\n \"id\":\"tvm-14141481_3-20180821t200555z\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvm-14141481_3-20180821t200555z\",\"state\":\"idle\",\"schedulingState\":\"enabled\",\"stateTransitionTime\":\"2018-08-21T20:11:14.1474938Z\",\"lastBootTime\":\"2018-08-21T20:11:11.1369007Z\",\"allocationTime\":\"2018-08-21T20:05:55.1606562Z\",\"ipAddress\":\"10.0.0.5\",\"affinityId\":\"TVM:tvm-14141481_3-20180821t200555z\",\"vmSize\":\"small\",\"totalTasksRun\":0,\"totalTasksSucceeded\":0,\"runningTasksCount\":0,\"startTask\":{\r\n \"commandLine\":\"cmd /c echo hello > hello.txt\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"maxTaskRetryCount\":0,\"waitForSuccess\":false\r\n },\"startTaskInfo\":{\r\n \"state\":\"completed\",\"startTime\":\"2018-08-21T20:11:14.1474938Z\",\"endTime\":\"2018-08-21T20:11:14.2844393Z\",\"exitCode\":0,\"result\":\"Success\",\"retryCount\":0\r\n },\"isDedicated\":true\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', +nock('https://test3.westcentralus.batch.azure.com:443') + .get('/pools/nodesdktestpool1/nodes?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#nodes\",\"value\":[\r\n {\r\n \"id\":\"tvmps_13cf4cee9dd1594f9da06399ef98ede3e5a4010f3233627c3837a43dbeff5868_d\",\"url\":\"https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvmps_13cf4cee9dd1594f9da06399ef98ede3e5a4010f3233627c3837a43dbeff5868_d\",\"state\":\"idle\",\"schedulingState\":\"enabled\",\"stateTransitionTime\":\"2018-12-11T18:31:53.241665Z\",\"lastBootTime\":\"2018-12-11T18:31:51.8606Z\",\"allocationTime\":\"2018-12-11T18:28:36.9291366Z\",\"ipAddress\":\"10.0.0.4\",\"affinityId\":\"TVM:tvmps_13cf4cee9dd1594f9da06399ef98ede3e5a4010f3233627c3837a43dbeff5868_d\",\"vmSize\":\"small\",\"totalTasksRun\":0,\"totalTasksSucceeded\":0,\"runningTasksCount\":0,\"startTask\":{\r\n \"commandLine\":\"cmd /c echo hello > hello.txt\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"maxTaskRetryCount\":0,\"waitForSuccess\":false\r\n },\"startTaskInfo\":{\r\n \"state\":\"completed\",\"startTime\":\"2018-12-11T18:31:53.224154Z\",\"endTime\":\"2018-12-11T18:31:53.920595Z\",\"exitCode\":0,\"result\":\"success\",\"retryCount\":0\r\n },\"certificateReferences\":[\r\n \r\n ],\"isDedicated\":true,\"endpointConfiguration\":{\r\n \"inboundEndpoints\":[\r\n {\r\n \"name\":\"Microsoft.WindowsAzure.Plugins.RemoteForwarder.RdpInput\",\"protocol\":\"tcp\",\"publicIPAddress\":\"13.77.205.84\",\"frontendPort\":3389,\"backendPort\":20000\r\n }\r\n ]\r\n },\"nodeAgentInfo\":{\r\n \"lastUpdateTime\":\"2018-12-11T18:31:51.8606Z\",\"version\":\"1.4.7\"\r\n }\r\n },{\r\n \"id\":\"tvmps_15c61fea08a34e0fe431ba70cdf2156682bec1e01fdda442f2dccde21908ed91_d\",\"url\":\"https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvmps_15c61fea08a34e0fe431ba70cdf2156682bec1e01fdda442f2dccde21908ed91_d\",\"state\":\"idle\",\"schedulingState\":\"enabled\",\"stateTransitionTime\":\"2018-12-11T18:32:15.009062Z\",\"lastBootTime\":\"2018-12-11T18:32:13.820626Z\",\"allocationTime\":\"2018-12-11T18:28:36.9291366Z\",\"ipAddress\":\"10.0.0.6\",\"affinityId\":\"TVM:tvmps_15c61fea08a34e0fe431ba70cdf2156682bec1e01fdda442f2dccde21908ed91_d\",\"vmSize\":\"small\",\"totalTasksRun\":0,\"totalTasksSucceeded\":0,\"runningTasksCount\":0,\"startTask\":{\r\n \"commandLine\":\"cmd /c echo hello > hello.txt\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"maxTaskRetryCount\":0,\"waitForSuccess\":false\r\n },\"startTaskInfo\":{\r\n \"state\":\"completed\",\"startTime\":\"2018-12-11T18:32:14.993407Z\",\"endTime\":\"2018-12-11T18:32:15.698035Z\",\"exitCode\":0,\"result\":\"success\",\"retryCount\":0\r\n },\"certificateReferences\":[\r\n \r\n ],\"isDedicated\":true,\"endpointConfiguration\":{\r\n \"inboundEndpoints\":[\r\n {\r\n \"name\":\"Microsoft.WindowsAzure.Plugins.RemoteForwarder.RdpInput\",\"protocol\":\"tcp\",\"publicIPAddress\":\"13.77.205.84\",\"frontendPort\":3389,\"backendPort\":20000\r\n }\r\n ]\r\n },\"nodeAgentInfo\":{\r\n \"lastUpdateTime\":\"2018-12-11T18:32:13.820626Z\",\"version\":\"1.4.7\"\r\n }\r\n },{\r\n \"id\":\"tvmps_bc8f91eb73db7fd10d852ff323ee06ef51abb84fc93e7dae4e18fa0b0b95b030_d\",\"url\":\"https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvmps_bc8f91eb73db7fd10d852ff323ee06ef51abb84fc93e7dae4e18fa0b0b95b030_d\",\"state\":\"idle\",\"schedulingState\":\"enabled\",\"stateTransitionTime\":\"2018-12-11T18:31:54.456912Z\",\"lastBootTime\":\"2018-12-11T18:31:51.947806Z\",\"allocationTime\":\"2018-12-11T18:28:36.9291366Z\",\"ipAddress\":\"10.0.0.5\",\"affinityId\":\"TVM:tvmps_bc8f91eb73db7fd10d852ff323ee06ef51abb84fc93e7dae4e18fa0b0b95b030_d\",\"vmSize\":\"small\",\"totalTasksRun\":0,\"totalTasksSucceeded\":0,\"runningTasksCount\":0,\"startTask\":{\r\n \"commandLine\":\"cmd /c echo hello > hello.txt\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"maxTaskRetryCount\":0,\"waitForSuccess\":false\r\n },\"startTaskInfo\":{\r\n \"state\":\"completed\",\"startTime\":\"2018-12-11T18:31:54.456912Z\",\"endTime\":\"2018-12-11T18:31:55.082974Z\",\"exitCode\":0,\"result\":\"success\",\"retryCount\":0\r\n },\"certificateReferences\":[\r\n \r\n ],\"isDedicated\":true,\"endpointConfiguration\":{\r\n \"inboundEndpoints\":[\r\n {\r\n \"name\":\"Microsoft.WindowsAzure.Plugins.RemoteForwarder.RdpInput\",\"protocol\":\"tcp\",\"publicIPAddress\":\"13.77.205.84\",\"frontendPort\":3389,\"backendPort\":20000\r\n }\r\n ]\r\n },\"nodeAgentInfo\":{\r\n \"lastUpdateTime\":\"2018-12-11T18:31:51.947806Z\",\"version\":\"1.4.7\"\r\n }\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'a9e5fce0-64ea-4e02-8e13-029c46d60d39', + 'request-id': 'e6c1703d-e2b2-4148-9089-a5c58ff27c35', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:23:08 GMT', + date: 'Tue, 11 Dec 2018 18:42:30 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_list_files_from_compute_node_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_list_files_from_compute_node_successfully.nock.js index 8c62bcfccf..c86e80d55a 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_list_files_from_compute_node_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_list_files_from_compute_node_successfully.nock.js @@ -1,36 +1,36 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .get('/pools/nodesdktestpool1/nodes/tvm-14141481_3-20180821t200555z/files?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#files\",\"value\":[\r\n {\r\n \"name\":\"applications\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvm-14141481_3-20180821t200555z/files/applications\",\"isDirectory\":true\r\n },{\r\n \"name\":\"shared\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvm-14141481_3-20180821t200555z/files/shared\",\"isDirectory\":true\r\n },{\r\n \"name\":\"startup\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvm-14141481_3-20180821t200555z/files/startup\",\"isDirectory\":true\r\n },{\r\n \"name\":\"workitems\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvm-14141481_3-20180821t200555z/files/workitems\",\"isDirectory\":true\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', +nock('http://test3.westcentralus.batch.azure.com:443') + .get('/pools/nodesdktestpool1/nodes/tvmps_bc8f91eb73db7fd10d852ff323ee06ef51abb84fc93e7dae4e18fa0b0b95b030_d/files?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#files\",\"value\":[\r\n {\r\n \"name\":\"applications\",\"url\":\"https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvmps_bc8f91eb73db7fd10d852ff323ee06ef51abb84fc93e7dae4e18fa0b0b95b030_d/files/applications\",\"isDirectory\":true\r\n },{\r\n \"name\":\"shared\",\"url\":\"https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvmps_bc8f91eb73db7fd10d852ff323ee06ef51abb84fc93e7dae4e18fa0b0b95b030_d/files/shared\",\"isDirectory\":true\r\n },{\r\n \"name\":\"startup\",\"url\":\"https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvmps_bc8f91eb73db7fd10d852ff323ee06ef51abb84fc93e7dae4e18fa0b0b95b030_d/files/startup\",\"isDirectory\":true\r\n },{\r\n \"name\":\"volatile\",\"url\":\"https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvmps_bc8f91eb73db7fd10d852ff323ee06ef51abb84fc93e7dae4e18fa0b0b95b030_d/files/volatile\",\"isDirectory\":true\r\n },{\r\n \"name\":\"workitems\",\"url\":\"https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvmps_bc8f91eb73db7fd10d852ff323ee06ef51abb84fc93e7dae4e18fa0b0b95b030_d/files/workitems\",\"isDirectory\":true\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '69646b9b-fb7f-4c17-b5c8-f3f812d2e9c7', + 'request-id': '90b2ba1c-4031-4746-b54f-fd3ed5982e54', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:29:05 GMT', + date: 'Tue, 11 Dec 2018 18:48:30 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .get('/pools/nodesdktestpool1/nodes/tvm-14141481_3-20180821t200555z/files?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#files\",\"value\":[\r\n {\r\n \"name\":\"applications\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvm-14141481_3-20180821t200555z/files/applications\",\"isDirectory\":true\r\n },{\r\n \"name\":\"shared\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvm-14141481_3-20180821t200555z/files/shared\",\"isDirectory\":true\r\n },{\r\n \"name\":\"startup\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvm-14141481_3-20180821t200555z/files/startup\",\"isDirectory\":true\r\n },{\r\n \"name\":\"workitems\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvm-14141481_3-20180821t200555z/files/workitems\",\"isDirectory\":true\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', +nock('https://test3.westcentralus.batch.azure.com:443') + .get('/pools/nodesdktestpool1/nodes/tvmps_bc8f91eb73db7fd10d852ff323ee06ef51abb84fc93e7dae4e18fa0b0b95b030_d/files?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#files\",\"value\":[\r\n {\r\n \"name\":\"applications\",\"url\":\"https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvmps_bc8f91eb73db7fd10d852ff323ee06ef51abb84fc93e7dae4e18fa0b0b95b030_d/files/applications\",\"isDirectory\":true\r\n },{\r\n \"name\":\"shared\",\"url\":\"https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvmps_bc8f91eb73db7fd10d852ff323ee06ef51abb84fc93e7dae4e18fa0b0b95b030_d/files/shared\",\"isDirectory\":true\r\n },{\r\n \"name\":\"startup\",\"url\":\"https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvmps_bc8f91eb73db7fd10d852ff323ee06ef51abb84fc93e7dae4e18fa0b0b95b030_d/files/startup\",\"isDirectory\":true\r\n },{\r\n \"name\":\"volatile\",\"url\":\"https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvmps_bc8f91eb73db7fd10d852ff323ee06ef51abb84fc93e7dae4e18fa0b0b95b030_d/files/volatile\",\"isDirectory\":true\r\n },{\r\n \"name\":\"workitems\",\"url\":\"https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvmps_bc8f91eb73db7fd10d852ff323ee06ef51abb84fc93e7dae4e18fa0b0b95b030_d/files/workitems\",\"isDirectory\":true\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '69646b9b-fb7f-4c17-b5c8-f3f812d2e9c7', + 'request-id': '90b2ba1c-4031-4746-b54f-fd3ed5982e54', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:29:05 GMT', + date: 'Tue, 11 Dec 2018 18:48:30 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_list_files_from_task_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_list_files_from_task_successfully.nock.js index 915ad16924..29c4a2ac33 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_list_files_from_task_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_list_files_from_task_successfully.nock.js @@ -1,36 +1,36 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .get('/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2/files?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#files\",\"value\":[\r\n {\r\n \"name\":\"ProcessEnv.cmd\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2/files/ProcessEnv.cmd\",\"isDirectory\":false,\"properties\":{\r\n \"creationTime\":\"2018-08-21T20:25:27.7083523Z\",\"lastModified\":\"2018-08-21T20:25:27.7083523Z\",\"contentLength\":\"2680\",\"contentType\":\"application/octet-stream\"\r\n }\r\n },{\r\n \"name\":\"stderr.txt\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2/files/stderr.txt\",\"isDirectory\":false,\"properties\":{\r\n \"creationTime\":\"2018-08-21T20:25:27.6369719Z\",\"lastModified\":\"2018-08-21T20:25:27.6369719Z\",\"contentLength\":\"0\",\"contentType\":\"application/octet-stream\"\r\n }\r\n },{\r\n \"name\":\"stdout.txt\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2/files/stdout.txt\",\"isDirectory\":false,\"properties\":{\r\n \"creationTime\":\"2018-08-21T20:25:27.635964Z\",\"lastModified\":\"2018-08-21T20:25:27.7183537Z\",\"contentLength\":\"13\",\"contentType\":\"application/octet-stream\"\r\n }\r\n },{\r\n \"name\":\"wd\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2/files/wd\",\"isDirectory\":true\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', +nock('http://test3.westcentralus.batch.azure.com:443') + .get('/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2/files?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#files\",\"value\":[\r\n {\r\n \"name\":\"stderr.txt\",\"url\":\"https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2/files/stderr.txt\",\"isDirectory\":false,\"properties\":{\r\n \"creationTime\":\"2018-12-11T18:44:53.841353Z\",\"lastModified\":\"2018-12-11T18:44:53.841353Z\",\"contentLength\":\"0\",\"contentType\":\"text/plain\"\r\n }\r\n },{\r\n \"name\":\"stdout.txt\",\"url\":\"https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2/files/stdout.txt\",\"isDirectory\":false,\"properties\":{\r\n \"creationTime\":\"2018-12-11T18:44:53.841353Z\",\"lastModified\":\"2018-12-11T18:44:54.191572Z\",\"contentLength\":\"13\",\"contentType\":\"text/plain\"\r\n }\r\n },{\r\n \"name\":\"wd\",\"url\":\"https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2/files/wd\",\"isDirectory\":true\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '42a49005-97a8-4e6c-a872-4ee8cf6d0b7c', + 'request-id': 'ac0fb613-653b-43d2-891b-a959ec2f1ec3', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:27:23 GMT', + date: 'Tue, 11 Dec 2018 18:46:49 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .get('/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2/files?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#files\",\"value\":[\r\n {\r\n \"name\":\"ProcessEnv.cmd\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2/files/ProcessEnv.cmd\",\"isDirectory\":false,\"properties\":{\r\n \"creationTime\":\"2018-08-21T20:25:27.7083523Z\",\"lastModified\":\"2018-08-21T20:25:27.7083523Z\",\"contentLength\":\"2680\",\"contentType\":\"application/octet-stream\"\r\n }\r\n },{\r\n \"name\":\"stderr.txt\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2/files/stderr.txt\",\"isDirectory\":false,\"properties\":{\r\n \"creationTime\":\"2018-08-21T20:25:27.6369719Z\",\"lastModified\":\"2018-08-21T20:25:27.6369719Z\",\"contentLength\":\"0\",\"contentType\":\"application/octet-stream\"\r\n }\r\n },{\r\n \"name\":\"stdout.txt\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2/files/stdout.txt\",\"isDirectory\":false,\"properties\":{\r\n \"creationTime\":\"2018-08-21T20:25:27.635964Z\",\"lastModified\":\"2018-08-21T20:25:27.7183537Z\",\"contentLength\":\"13\",\"contentType\":\"application/octet-stream\"\r\n }\r\n },{\r\n \"name\":\"wd\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2/files/wd\",\"isDirectory\":true\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', +nock('https://test3.westcentralus.batch.azure.com:443') + .get('/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2/files?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#files\",\"value\":[\r\n {\r\n \"name\":\"stderr.txt\",\"url\":\"https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2/files/stderr.txt\",\"isDirectory\":false,\"properties\":{\r\n \"creationTime\":\"2018-12-11T18:44:53.841353Z\",\"lastModified\":\"2018-12-11T18:44:53.841353Z\",\"contentLength\":\"0\",\"contentType\":\"text/plain\"\r\n }\r\n },{\r\n \"name\":\"stdout.txt\",\"url\":\"https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2/files/stdout.txt\",\"isDirectory\":false,\"properties\":{\r\n \"creationTime\":\"2018-12-11T18:44:53.841353Z\",\"lastModified\":\"2018-12-11T18:44:54.191572Z\",\"contentLength\":\"13\",\"contentType\":\"text/plain\"\r\n }\r\n },{\r\n \"name\":\"wd\",\"url\":\"https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2/files/wd\",\"isDirectory\":true\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '42a49005-97a8-4e6c-a872-4ee8cf6d0b7c', + 'request-id': 'ac0fb613-653b-43d2-891b-a959ec2f1ec3', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:27:23 GMT', + date: 'Tue, 11 Dec 2018 18:46:49 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_list_job_schedules_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_list_job_schedules_successfully.nock.js index fc49a64740..363d7f06e4 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_list_job_schedules_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_list_job_schedules_successfully.nock.js @@ -1,36 +1,36 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .get('/jobschedules?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#jobschedules\",\"value\":[\r\n {\r\n \"id\":\"NodeSDKTestSchedule\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/jobschedules/NodeSDKTestSchedule\",\"eTag\":\"0x8D607A503E9DDB3\",\"lastModified\":\"2018-08-21T20:31:03.6160435Z\",\"creationTime\":\"2018-08-21T20:31:03.6160435Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-08-21T20:31:03.6160435Z\",\"schedule\":{\r\n \"doNotRunUntil\":\"2018-08-25T07:00:00Z\",\"startWindow\":\"PT6M\"\r\n },\"jobSpecification\":{\r\n \"priority\":0,\"usesTaskDependencies\":false,\"onAllTasksComplete\":\"noaction\",\"onTaskFailure\":\"noaction\",\"constraints\":{\r\n \"maxWallClockTime\":\"P10675199DT2H48M5.4775807S\",\"maxTaskRetryCount\":0\r\n },\"poolInfo\":{\r\n \"poolId\":\"nodesdktestpool1\"\r\n }\r\n },\"executionInfo\":{\r\n \"nextRunTime\":\"2018-08-25T07:00:00Z\"\r\n }\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', +nock('http://test3.westcentralus.batch.azure.com:443') + .get('/jobschedules?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#jobschedules\",\"value\":[\r\n {\r\n \"id\":\"NodeSDKTestSchedule\",\"url\":\"https://test3.westcentralus.batch.azure.com/jobschedules/NodeSDKTestSchedule\",\"eTag\":\"0x8D65FAC2F4D7E17\",\"lastModified\":\"2018-12-11T21:04:05.2125207Z\",\"creationTime\":\"2018-12-11T21:04:05.2125207Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-12-11T21:04:05.2125207Z\",\"schedule\":{\r\n \"doNotRunUntil\":\"2018-12-25T08:00:00Z\",\"startWindow\":\"PT6M\"\r\n },\"jobSpecification\":{\r\n \"priority\":0,\"usesTaskDependencies\":false,\"onAllTasksComplete\":\"noaction\",\"onTaskFailure\":\"noaction\",\"constraints\":{\r\n \"maxWallClockTime\":\"P10675199DT2H48M5.4775807S\",\"maxTaskRetryCount\":0\r\n },\"poolInfo\":{\r\n \"poolId\":\"nodesdktestpool1\"\r\n }\r\n },\"executionInfo\":{\r\n \"nextRunTime\":\"2018-12-25T08:00:00Z\"\r\n }\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'ac4ef5c1-9da8-4b41-a8d0-3041d4834c50', + 'request-id': 'daf2f920-6a5f-4cdc-8755-5e81dea9797f', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:31:03 GMT', + date: 'Tue, 11 Dec 2018 21:04:05 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .get('/jobschedules?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#jobschedules\",\"value\":[\r\n {\r\n \"id\":\"NodeSDKTestSchedule\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/jobschedules/NodeSDKTestSchedule\",\"eTag\":\"0x8D607A503E9DDB3\",\"lastModified\":\"2018-08-21T20:31:03.6160435Z\",\"creationTime\":\"2018-08-21T20:31:03.6160435Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-08-21T20:31:03.6160435Z\",\"schedule\":{\r\n \"doNotRunUntil\":\"2018-08-25T07:00:00Z\",\"startWindow\":\"PT6M\"\r\n },\"jobSpecification\":{\r\n \"priority\":0,\"usesTaskDependencies\":false,\"onAllTasksComplete\":\"noaction\",\"onTaskFailure\":\"noaction\",\"constraints\":{\r\n \"maxWallClockTime\":\"P10675199DT2H48M5.4775807S\",\"maxTaskRetryCount\":0\r\n },\"poolInfo\":{\r\n \"poolId\":\"nodesdktestpool1\"\r\n }\r\n },\"executionInfo\":{\r\n \"nextRunTime\":\"2018-08-25T07:00:00Z\"\r\n }\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', +nock('https://test3.westcentralus.batch.azure.com:443') + .get('/jobschedules?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#jobschedules\",\"value\":[\r\n {\r\n \"id\":\"NodeSDKTestSchedule\",\"url\":\"https://test3.westcentralus.batch.azure.com/jobschedules/NodeSDKTestSchedule\",\"eTag\":\"0x8D65FAC2F4D7E17\",\"lastModified\":\"2018-12-11T21:04:05.2125207Z\",\"creationTime\":\"2018-12-11T21:04:05.2125207Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-12-11T21:04:05.2125207Z\",\"schedule\":{\r\n \"doNotRunUntil\":\"2018-12-25T08:00:00Z\",\"startWindow\":\"PT6M\"\r\n },\"jobSpecification\":{\r\n \"priority\":0,\"usesTaskDependencies\":false,\"onAllTasksComplete\":\"noaction\",\"onTaskFailure\":\"noaction\",\"constraints\":{\r\n \"maxWallClockTime\":\"P10675199DT2H48M5.4775807S\",\"maxTaskRetryCount\":0\r\n },\"poolInfo\":{\r\n \"poolId\":\"nodesdktestpool1\"\r\n }\r\n },\"executionInfo\":{\r\n \"nextRunTime\":\"2018-12-25T08:00:00Z\"\r\n }\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'ac4ef5c1-9da8-4b41-a8d0-3041d4834c50', + 'request-id': 'daf2f920-6a5f-4cdc-8755-5e81dea9797f', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:31:03 GMT', + date: 'Tue, 11 Dec 2018 21:04:05 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_list_jobs_from_job_schedule_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_list_jobs_from_job_schedule_successfully.nock.js index acd08a80ce..9ef7368fd5 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_list_jobs_from_job_schedule_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_list_jobs_from_job_schedule_successfully.nock.js @@ -1,36 +1,36 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .get('/jobschedules/NodeSDKTestSchedule/jobs?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#jobs\",\"value\":[\r\n \r\n ]\r\n}", { 'transfer-encoding': 'chunked', +nock('http://test3.westcentralus.batch.azure.com:443') + .get('/jobschedules/NodeSDKTestSchedule/jobs?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#jobs\",\"value\":[\r\n \r\n ]\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'a7ed87e9-6378-45e6-b57c-7ae5c287a590', + 'request-id': '39fee38a-45a0-419f-b02a-84259197c7aa', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:31:03 GMT', + date: 'Tue, 11 Dec 2018 21:04:05 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .get('/jobschedules/NodeSDKTestSchedule/jobs?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#jobs\",\"value\":[\r\n \r\n ]\r\n}", { 'transfer-encoding': 'chunked', +nock('https://test3.westcentralus.batch.azure.com:443') + .get('/jobschedules/NodeSDKTestSchedule/jobs?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#jobs\",\"value\":[\r\n \r\n ]\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'a7ed87e9-6378-45e6-b57c-7ae5c287a590', + 'request-id': '39fee38a-45a0-419f-b02a-84259197c7aa', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:31:03 GMT', + date: 'Tue, 11 Dec 2018 21:04:05 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_list_jobs_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_list_jobs_successfully.nock.js index de9f392dba..cdf797501d 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_list_jobs_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_list_jobs_successfully.nock.js @@ -1,36 +1,36 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .get('/jobs?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#jobs\",\"value\":[\r\n {\r\n \"id\":\"HelloWorldJobNodeSDKTest\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest\",\"eTag\":\"0x8D607A4396C0D8C\",\"lastModified\":\"2018-08-21T20:25:23.8917516Z\",\"creationTime\":\"2018-08-21T20:25:23.5846713Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-08-21T20:25:23.6076746Z\",\"priority\":500,\"usesTaskDependencies\":false,\"constraints\":{\r\n \"maxWallClockTime\":\"P10675199DT2H48M5.4775807S\",\"maxTaskRetryCount\":3\r\n },\"poolInfo\":{\r\n \"poolId\":\"nodesdktestpool1\"\r\n },\"executionInfo\":{\r\n \"startTime\":\"2018-08-21T20:25:23.6076746Z\",\"poolId\":\"nodesdktestpool1\"\r\n },\"onAllTasksComplete\":\"noaction\",\"onTaskFailure\":\"noaction\"\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', +nock('http://test3.westcentralus.batch.azure.com:443') + .get('/jobs?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#jobs\",\"value\":[\r\n {\r\n \"id\":\"HelloWorldJobNodeSDKTest\",\"url\":\"https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest\",\"eTag\":\"0x8D65F98BAA7B3B8\",\"lastModified\":\"2018-12-11T18:44:49.072428Z\",\"creationTime\":\"2018-12-11T18:44:48.660002Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-12-11T18:44:48.6770031Z\",\"priority\":500,\"usesTaskDependencies\":false,\"constraints\":{\r\n \"maxWallClockTime\":\"P10675199DT2H48M5.4775807S\",\"maxTaskRetryCount\":3\r\n },\"poolInfo\":{\r\n \"poolId\":\"nodesdktestpool1\"\r\n },\"executionInfo\":{\r\n \"startTime\":\"2018-12-11T18:44:48.6770031Z\",\"poolId\":\"nodesdktestpool1\"\r\n },\"onAllTasksComplete\":\"noaction\",\"onTaskFailure\":\"noaction\"\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '7dd3d03b-fda2-4e8d-bb8f-e05bfee639c4', + 'request-id': '374e5776-2036-4824-b880-5a38d453fd25', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:31:01 GMT', + date: 'Tue, 11 Dec 2018 18:48:35 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .get('/jobs?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#jobs\",\"value\":[\r\n {\r\n \"id\":\"HelloWorldJobNodeSDKTest\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest\",\"eTag\":\"0x8D607A4396C0D8C\",\"lastModified\":\"2018-08-21T20:25:23.8917516Z\",\"creationTime\":\"2018-08-21T20:25:23.5846713Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-08-21T20:25:23.6076746Z\",\"priority\":500,\"usesTaskDependencies\":false,\"constraints\":{\r\n \"maxWallClockTime\":\"P10675199DT2H48M5.4775807S\",\"maxTaskRetryCount\":3\r\n },\"poolInfo\":{\r\n \"poolId\":\"nodesdktestpool1\"\r\n },\"executionInfo\":{\r\n \"startTime\":\"2018-08-21T20:25:23.6076746Z\",\"poolId\":\"nodesdktestpool1\"\r\n },\"onAllTasksComplete\":\"noaction\",\"onTaskFailure\":\"noaction\"\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', +nock('https://test3.westcentralus.batch.azure.com:443') + .get('/jobs?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#jobs\",\"value\":[\r\n {\r\n \"id\":\"HelloWorldJobNodeSDKTest\",\"url\":\"https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest\",\"eTag\":\"0x8D65F98BAA7B3B8\",\"lastModified\":\"2018-12-11T18:44:49.072428Z\",\"creationTime\":\"2018-12-11T18:44:48.660002Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-12-11T18:44:48.6770031Z\",\"priority\":500,\"usesTaskDependencies\":false,\"constraints\":{\r\n \"maxWallClockTime\":\"P10675199DT2H48M5.4775807S\",\"maxTaskRetryCount\":3\r\n },\"poolInfo\":{\r\n \"poolId\":\"nodesdktestpool1\"\r\n },\"executionInfo\":{\r\n \"startTime\":\"2018-12-11T18:44:48.6770031Z\",\"poolId\":\"nodesdktestpool1\"\r\n },\"onAllTasksComplete\":\"noaction\",\"onTaskFailure\":\"noaction\"\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '7dd3d03b-fda2-4e8d-bb8f-e05bfee639c4', + 'request-id': '374e5776-2036-4824-b880-5a38d453fd25', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:31:01 GMT', + date: 'Tue, 11 Dec 2018 18:48:35 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_list_node_agent_sku_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_list_node_agent_sku_successfully.nock.js index 613c5cddf3..ec6c6bb31b 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_list_node_agent_sku_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_list_node_agent_sku_successfully.nock.js @@ -1,36 +1,36 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .get('/nodeagentskus?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#nodeagentskus\",\"value\":[\r\n {\r\n \"id\":\"batch.node.centos 7\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"OpenLogic\",\"offer\":\"CentOS\",\"sku\":\"7.5\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"OpenLogic\",\"offer\":\"CentOS-HPC\",\"sku\":\"7.4\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"OpenLogic\",\"offer\":\"CentOS-HPC\",\"sku\":\"7.3\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"OpenLogic\",\"offer\":\"CentOS-HPC\",\"sku\":\"7.1\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"Oracle\",\"offer\":\"Oracle-Linux\",\"sku\":\"7.4\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"microsoft-ads\",\"offer\":\"linux-data-science-vm\",\"sku\":\"linuxdsvm\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"batch\",\"offer\":\"rendering-centos73\",\"sku\":\"rendering\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"microsoft-azure-batch\",\"offer\":\"centos-container\",\"sku\":\"7-5\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"microsoft-azure-batch\",\"offer\":\"centos-container-rdma\",\"sku\":\"7-4\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.debian 8\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"Credativ\",\"offer\":\"Debian\",\"sku\":\"8\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.debian 9\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"Credativ\",\"offer\":\"Debian\",\"sku\":\"9\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.ubuntu 14.04\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"Canonical\",\"offer\":\"UbuntuServer\",\"sku\":\"14.04.5-LTS\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.ubuntu 16.04\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"Canonical\",\"offer\":\"UbuntuServer\",\"sku\":\"16.04-LTS\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"microsoft-azure-batch\",\"offer\":\"ubuntu-server-container\",\"sku\":\"16-04-lts\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"microsoft-azure-batch\",\"offer\":\"ubuntu-server-container-rdma\",\"sku\":\"16-04-lts\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.ubuntu 18.04\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"Canonical\",\"offer\":\"UbuntuServer\",\"sku\":\"18.04-LTS\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.windows amd64\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2008-R2-SP1\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2008-R2-SP1-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2012-Datacenter\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2012-Datacenter-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2012-R2-Datacenter\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2012-R2-Datacenter-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2016-Datacenter\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2016-Datacenter-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2016-Datacenter-with-Containers\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"microsoft-dsvm\",\"offer\":\"dsvm-windows\",\"sku\":\"server-2016\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"batch\",\"offer\":\"rendering-windows2016\",\"sku\":\"rendering\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"windows\"\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', +nock('http://test3.westcentralus.batch.azure.com:443') + .get('/nodeagentskus?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#nodeagentskus\",\"value\":[\r\n {\r\n \"id\":\"batch.node.centos 7\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"OpenLogic\",\"offer\":\"CentOS\",\"sku\":\"7.5\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"OpenLogic\",\"offer\":\"CentOS-HPC\",\"sku\":\"7.4\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"OpenLogic\",\"offer\":\"CentOS-HPC\",\"sku\":\"7.3\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"OpenLogic\",\"offer\":\"CentOS-HPC\",\"sku\":\"7.1\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"Oracle\",\"offer\":\"Oracle-Linux\",\"sku\":\"7.5\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"microsoft-ads\",\"offer\":\"linux-data-science-vm\",\"sku\":\"linuxdsvm\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"batch\",\"offer\":\"rendering-centos73\",\"sku\":\"rendering\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"microsoft-azure-batch\",\"offer\":\"centos-container\",\"sku\":\"7-5\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"microsoft-azure-batch\",\"offer\":\"centos-container-rdma\",\"sku\":\"7-4\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.debian 8\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"Credativ\",\"offer\":\"Debian\",\"sku\":\"8\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.debian 9\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"Credativ\",\"offer\":\"Debian\",\"sku\":\"9\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.ubuntu 14.04\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"Canonical\",\"offer\":\"UbuntuServer\",\"sku\":\"14.04.5-LTS\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.ubuntu 16.04\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"Canonical\",\"offer\":\"UbuntuServer\",\"sku\":\"16.04-LTS\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"microsoft-dsvm\",\"offer\":\"linux-data-science-vm-ubuntu\",\"sku\":\"linuxdsvmubuntu\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"microsoft-azure-batch\",\"offer\":\"ubuntu-server-container\",\"sku\":\"16-04-lts\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"microsoft-azure-batch\",\"offer\":\"ubuntu-server-container-rdma\",\"sku\":\"16-04-lts\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.ubuntu 18.04\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"Canonical\",\"offer\":\"UbuntuServer\",\"sku\":\"18.04-LTS\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.windows amd64\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2019-Datacenter\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2019-Datacenter-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2019-Datacenter-Core\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2019-Datacenter-Core-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2016-Datacenter\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2016-Datacenter-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2012-R2-Datacenter\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2012-R2-Datacenter-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2012-Datacenter\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2012-Datacenter-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2008-R2-SP1\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2008-R2-SP1-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2019-Datacenter-with-Containers\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2019-Datacenter-with-Containers-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2019-Datacenter-Core-with-Containers\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2019-Datacenter-Core-with-Containers-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2016-Datacenter-with-Containers\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"microsoft-dsvm\",\"offer\":\"dsvm-windows\",\"sku\":\"server-2016\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"batch\",\"offer\":\"rendering-windows2016\",\"sku\":\"rendering\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"windows\"\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '2b1581ec-c30a-473b-a0e2-d386872d169b', + 'request-id': '7b8d03c0-251f-4ade-bd7f-c673d65828d4', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:05:02 GMT', + date: 'Tue, 11 Dec 2018 21:04:04 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .get('/nodeagentskus?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#nodeagentskus\",\"value\":[\r\n {\r\n \"id\":\"batch.node.centos 7\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"OpenLogic\",\"offer\":\"CentOS\",\"sku\":\"7.5\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"OpenLogic\",\"offer\":\"CentOS-HPC\",\"sku\":\"7.4\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"OpenLogic\",\"offer\":\"CentOS-HPC\",\"sku\":\"7.3\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"OpenLogic\",\"offer\":\"CentOS-HPC\",\"sku\":\"7.1\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"Oracle\",\"offer\":\"Oracle-Linux\",\"sku\":\"7.4\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"microsoft-ads\",\"offer\":\"linux-data-science-vm\",\"sku\":\"linuxdsvm\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"batch\",\"offer\":\"rendering-centos73\",\"sku\":\"rendering\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"microsoft-azure-batch\",\"offer\":\"centos-container\",\"sku\":\"7-5\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"microsoft-azure-batch\",\"offer\":\"centos-container-rdma\",\"sku\":\"7-4\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.debian 8\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"Credativ\",\"offer\":\"Debian\",\"sku\":\"8\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.debian 9\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"Credativ\",\"offer\":\"Debian\",\"sku\":\"9\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.ubuntu 14.04\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"Canonical\",\"offer\":\"UbuntuServer\",\"sku\":\"14.04.5-LTS\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.ubuntu 16.04\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"Canonical\",\"offer\":\"UbuntuServer\",\"sku\":\"16.04-LTS\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"microsoft-azure-batch\",\"offer\":\"ubuntu-server-container\",\"sku\":\"16-04-lts\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"microsoft-azure-batch\",\"offer\":\"ubuntu-server-container-rdma\",\"sku\":\"16-04-lts\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.ubuntu 18.04\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"Canonical\",\"offer\":\"UbuntuServer\",\"sku\":\"18.04-LTS\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.windows amd64\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2008-R2-SP1\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2008-R2-SP1-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2012-Datacenter\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2012-Datacenter-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2012-R2-Datacenter\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2012-R2-Datacenter-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2016-Datacenter\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2016-Datacenter-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2016-Datacenter-with-Containers\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"microsoft-dsvm\",\"offer\":\"dsvm-windows\",\"sku\":\"server-2016\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"batch\",\"offer\":\"rendering-windows2016\",\"sku\":\"rendering\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"windows\"\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', +nock('https://test3.westcentralus.batch.azure.com:443') + .get('/nodeagentskus?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#nodeagentskus\",\"value\":[\r\n {\r\n \"id\":\"batch.node.centos 7\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"OpenLogic\",\"offer\":\"CentOS\",\"sku\":\"7.5\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"OpenLogic\",\"offer\":\"CentOS-HPC\",\"sku\":\"7.4\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"OpenLogic\",\"offer\":\"CentOS-HPC\",\"sku\":\"7.3\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"OpenLogic\",\"offer\":\"CentOS-HPC\",\"sku\":\"7.1\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"Oracle\",\"offer\":\"Oracle-Linux\",\"sku\":\"7.5\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"microsoft-ads\",\"offer\":\"linux-data-science-vm\",\"sku\":\"linuxdsvm\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"batch\",\"offer\":\"rendering-centos73\",\"sku\":\"rendering\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"microsoft-azure-batch\",\"offer\":\"centos-container\",\"sku\":\"7-5\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"microsoft-azure-batch\",\"offer\":\"centos-container-rdma\",\"sku\":\"7-4\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.debian 8\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"Credativ\",\"offer\":\"Debian\",\"sku\":\"8\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.debian 9\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"Credativ\",\"offer\":\"Debian\",\"sku\":\"9\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.ubuntu 14.04\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"Canonical\",\"offer\":\"UbuntuServer\",\"sku\":\"14.04.5-LTS\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.ubuntu 16.04\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"Canonical\",\"offer\":\"UbuntuServer\",\"sku\":\"16.04-LTS\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"microsoft-dsvm\",\"offer\":\"linux-data-science-vm-ubuntu\",\"sku\":\"linuxdsvmubuntu\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"microsoft-azure-batch\",\"offer\":\"ubuntu-server-container\",\"sku\":\"16-04-lts\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"microsoft-azure-batch\",\"offer\":\"ubuntu-server-container-rdma\",\"sku\":\"16-04-lts\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.ubuntu 18.04\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"Canonical\",\"offer\":\"UbuntuServer\",\"sku\":\"18.04-LTS\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.windows amd64\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2019-Datacenter\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2019-Datacenter-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2019-Datacenter-Core\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2019-Datacenter-Core-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2016-Datacenter\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2016-Datacenter-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2012-R2-Datacenter\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2012-R2-Datacenter-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2012-Datacenter\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2012-Datacenter-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2008-R2-SP1\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2008-R2-SP1-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2019-Datacenter-with-Containers\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2019-Datacenter-with-Containers-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2019-Datacenter-Core-with-Containers\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2019-Datacenter-Core-with-Containers-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2016-Datacenter-with-Containers\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"microsoft-dsvm\",\"offer\":\"dsvm-windows\",\"sku\":\"server-2016\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"batch\",\"offer\":\"rendering-windows2016\",\"sku\":\"rendering\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"windows\"\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '2b1581ec-c30a-473b-a0e2-d386872d169b', + 'request-id': '7b8d03c0-251f-4ade-bd7f-c673d65828d4', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:05:02 GMT', + date: 'Tue, 11 Dec 2018 21:04:04 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_list_pools_according_to_filter.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_list_pools_according_to_filter.nock.js index 3089c58ca1..ffffea6d24 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_list_pools_according_to_filter.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_list_pools_according_to_filter.nock.js @@ -1,36 +1,36 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .get('/pools?api-version=2018-08-01.7.0&$filter=startswith(id%2C%27nodesdktestpool1%27)&$select=id%2Cstate&$expand=stats') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#pools\",\"value\":[\r\n {\r\n \"id\":\"nodesdktestpool1\",\"state\":\"active\"\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', +nock('http://test3.westcentralus.batch.azure.com:443') + .get('/pools?api-version=2018-12-01.8.0&$filter=startswith(id%2C%27nodesdktestpool1%27)&$select=id%2Cstate&$expand=stats') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#pools\",\"value\":[\r\n {\r\n \"id\":\"nodesdktestpool1\",\"state\":\"active\"\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '7c3f99a8-ba01-4ed0-bf2a-cba025c00215', + 'request-id': '1da5ae9c-2c7e-4ffe-ac35-73a9dc7ef1aa', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:25:21 GMT', + date: 'Tue, 11 Dec 2018 18:44:46 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .get('/pools?api-version=2018-08-01.7.0&$filter=startswith(id%2C%27nodesdktestpool1%27)&$select=id%2Cstate&$expand=stats') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#pools\",\"value\":[\r\n {\r\n \"id\":\"nodesdktestpool1\",\"state\":\"active\"\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', +nock('https://test3.westcentralus.batch.azure.com:443') + .get('/pools?api-version=2018-12-01.8.0&$filter=startswith(id%2C%27nodesdktestpool1%27)&$select=id%2Cstate&$expand=stats') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#pools\",\"value\":[\r\n {\r\n \"id\":\"nodesdktestpool1\",\"state\":\"active\"\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '7c3f99a8-ba01-4ed0-bf2a-cba025c00215', + 'request-id': '1da5ae9c-2c7e-4ffe-ac35-73a9dc7ef1aa', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:25:21 GMT', + date: 'Tue, 11 Dec 2018 18:44:46 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_list_pools_usage_metrics.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_list_pools_usage_metrics.nock.js index 5e154f0401..95f00435e8 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_list_pools_usage_metrics.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_list_pools_usage_metrics.nock.js @@ -1,36 +1,36 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .get('/poolusagemetrics?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#poolusagemetrics\",\"value\":[\r\n {\r\n \"poolId\":\"nodesdkinboundendpointpool\",\"startTime\":\"2018-08-21T17:30:00Z\",\"endTime\":\"2018-08-21T18:00:00Z\",\"vmSize\":\"standard_a1\",\"totalCoreHours\":0.49999999997222216,\"dataIngressGiB\":0.0,\"dataEgressGiB\":0.0\r\n },{\r\n \"poolId\":\"nodesdktestpool1\",\"startTime\":\"2018-08-21T17:30:00Z\",\"endTime\":\"2018-08-21T18:00:00Z\",\"vmSize\":\"small\",\"totalCoreHours\":1.4999999999166673,\"dataIngressGiB\":0.0,\"dataEgressGiB\":0.0\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', +nock('http://test3.westcentralus.batch.azure.com:443') + .get('/poolusagemetrics?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#poolusagemetrics\",\"value\":[\r\n {\r\n \"poolId\":\"nodesdkinboundendpointpool\",\"startTime\":\"2018-08-21T17:30:00Z\",\"endTime\":\"2018-08-21T18:00:00Z\",\"vmSize\":\"standard_a1\",\"totalCoreHours\":0.49999999997222216\r\n },{\r\n \"poolId\":\"nodesdktestpool1\",\"startTime\":\"2018-08-21T17:30:00Z\",\"endTime\":\"2018-08-21T18:00:00Z\",\"vmSize\":\"small\",\"totalCoreHours\":1.4999999999166673\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'd24622e1-96c9-4b99-8f89-cb92bb63bb0b', + 'request-id': '7b11544b-0111-47c8-85c0-752e6def8eeb', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:25:23 GMT', + date: 'Tue, 11 Dec 2018 18:44:48 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .get('/poolusagemetrics?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#poolusagemetrics\",\"value\":[\r\n {\r\n \"poolId\":\"nodesdkinboundendpointpool\",\"startTime\":\"2018-08-21T17:30:00Z\",\"endTime\":\"2018-08-21T18:00:00Z\",\"vmSize\":\"standard_a1\",\"totalCoreHours\":0.49999999997222216,\"dataIngressGiB\":0.0,\"dataEgressGiB\":0.0\r\n },{\r\n \"poolId\":\"nodesdktestpool1\",\"startTime\":\"2018-08-21T17:30:00Z\",\"endTime\":\"2018-08-21T18:00:00Z\",\"vmSize\":\"small\",\"totalCoreHours\":1.4999999999166673,\"dataIngressGiB\":0.0,\"dataEgressGiB\":0.0\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', +nock('https://test3.westcentralus.batch.azure.com:443') + .get('/poolusagemetrics?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#poolusagemetrics\",\"value\":[\r\n {\r\n \"poolId\":\"nodesdkinboundendpointpool\",\"startTime\":\"2018-08-21T17:30:00Z\",\"endTime\":\"2018-08-21T18:00:00Z\",\"vmSize\":\"standard_a1\",\"totalCoreHours\":0.49999999997222216\r\n },{\r\n \"poolId\":\"nodesdktestpool1\",\"startTime\":\"2018-08-21T17:30:00Z\",\"endTime\":\"2018-08-21T18:00:00Z\",\"vmSize\":\"small\",\"totalCoreHours\":1.4999999999166673\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'd24622e1-96c9-4b99-8f89-cb92bb63bb0b', + 'request-id': '7b11544b-0111-47c8-85c0-752e6def8eeb', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:25:23 GMT', + date: 'Tue, 11 Dec 2018 18:44:48 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_list_pools_without_filters.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_list_pools_without_filters.nock.js index 3ff6f63546..75e7d5121f 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_list_pools_without_filters.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_list_pools_without_filters.nock.js @@ -1,36 +1,36 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .get('/pools?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#pools\",\"value\":[\r\n {\r\n \"id\":\"nodesdkinboundendpointpool\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/pools/nodesdkinboundendpointpool\",\"eTag\":\"0x8D607A2FA29DA10\",\"lastModified\":\"2018-08-21T20:16:28.2647056Z\",\"creationTime\":\"2018-08-21T20:16:28.2647056Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-08-21T20:16:28.2647056Z\",\"allocationState\":\"steady\",\"allocationStateTransitionTime\":\"2018-08-21T20:18:10.9689835Z\",\"vmSize\":\"standard_a1\",\"resizeTimeout\":\"PT15M\",\"currentDedicatedNodes\":1,\"targetDedicatedNodes\":1,\"currentLowPriorityNodes\":0,\"targetLowPriorityNodes\":0,\"enableAutoScale\":false,\"enableInterNodeCommunication\":false,\"maxTasksPerNode\":1,\"taskSchedulingPolicy\":{\r\n \"nodeFillType\":\"Spread\"\r\n },\"virtualMachineConfiguration\":{\r\n \"imageReference\":{\r\n \"publisher\":\"Canonical\",\"offer\":\"UbuntuServer\",\"sku\":\"16.04-LTS\",\"version\":\"latest\"\r\n },\"nodeAgentSKUId\":\"batch.node.ubuntu 16.04\"\r\n },\"networkConfiguration\":{\r\n \"endpointConfiguration\":{\r\n \"inboundNATPools\":[\r\n {\r\n \"name\":\"TestEndpointConfig\",\"protocol\":\"udp\",\"backendPort\":64444,\"frontendPortRangeStart\":60000,\"frontendPortRangeEnd\":61000\r\n }\r\n ]\r\n }\r\n }\r\n },{\r\n \"id\":\"nodesdktestpool1\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1\",\"eTag\":\"0x8D607A437BD2FE0\",\"lastModified\":\"2018-08-21T20:25:21.0680288Z\",\"creationTime\":\"2018-08-21T20:05:04.4042325Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-08-21T20:05:04.4042325Z\",\"allocationState\":\"stopping\",\"allocationStateTransitionTime\":\"2018-08-21T20:25:21.0680288Z\",\"vmSize\":\"small\",\"resizeTimeout\":\"PT15M\",\"currentDedicatedNodes\":3,\"targetDedicatedNodes\":2,\"currentLowPriorityNodes\":0,\"targetLowPriorityNodes\":0,\"enableAutoScale\":false,\"enableInterNodeCommunication\":false,\"startTask\":{\r\n \"commandLine\":\"cmd /c echo hello > hello.txt\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"maxTaskRetryCount\":0,\"waitForSuccess\":false\r\n },\"userAccounts\":[\r\n {\r\n \"name\":\"nonAdminUser\",\"elevationLevel\":\"nonadmin\"\r\n }\r\n ],\"metadata\":[\r\n {\r\n \"name\":\"foo2\",\"value\":\"bar2\"\r\n }\r\n ],\"maxTasksPerNode\":1,\"taskSchedulingPolicy\":{\r\n \"nodeFillType\":\"Spread\"\r\n },\"cloudServiceConfiguration\":{\r\n \"osFamily\":\"4\",\"targetOSVersion\":\"*\",\"currentOSVersion\":\"*\"\r\n }\r\n },{\r\n \"id\":\"nodesdktestpool2\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool2\",\"eTag\":\"0x8D607A437F1E152\",\"lastModified\":\"2018-08-21T20:25:21.4133586Z\",\"creationTime\":\"2018-08-21T20:25:21.2320915Z\",\"state\":\"upgrading\",\"stateTransitionTime\":\"2018-08-21T20:25:21.4133586Z\",\"allocationState\":\"steady\",\"allocationStateTransitionTime\":\"2018-08-21T20:25:21.3450583Z\",\"vmSize\":\"small\",\"resizeTimeout\":\"PT15M\",\"currentDedicatedNodes\":0,\"targetDedicatedNodes\":0,\"currentLowPriorityNodes\":0,\"targetLowPriorityNodes\":0,\"enableAutoScale\":false,\"enableInterNodeCommunication\":false,\"maxTasksPerNode\":1,\"taskSchedulingPolicy\":{\r\n \"nodeFillType\":\"Spread\"\r\n },\"cloudServiceConfiguration\":{\r\n \"osFamily\":\"4\",\"targetOSVersion\":\"WA-GUEST-OS-4.32_201605-01\",\"currentOSVersion\":\"*\"\r\n }\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', +nock('http://test3.westcentralus.batch.azure.com:443') + .get('/pools?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#pools\",\"value\":[\r\n {\r\n \"id\":\"nodesdkinboundendpointpool\",\"url\":\"https://test3.westcentralus.batch.azure.com/pools/nodesdkinboundendpointpool\",\"eTag\":\"0x8D65F9778F109AA\",\"lastModified\":\"2018-12-11T18:35:49.3266858Z\",\"creationTime\":\"2018-12-11T18:35:49.3266858Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-12-11T18:35:49.3266858Z\",\"allocationState\":\"steady\",\"allocationStateTransitionTime\":\"2018-12-11T18:37:15.7227081Z\",\"vmSize\":\"standard_a1\",\"resizeTimeout\":\"PT15M\",\"currentDedicatedNodes\":1,\"targetDedicatedNodes\":1,\"currentLowPriorityNodes\":0,\"targetLowPriorityNodes\":0,\"enableAutoScale\":false,\"enableInterNodeCommunication\":false,\"maxTasksPerNode\":1,\"taskSchedulingPolicy\":{\r\n \"nodeFillType\":\"Spread\"\r\n },\"virtualMachineConfiguration\":{\r\n \"imageReference\":{\r\n \"publisher\":\"Canonical\",\"offer\":\"UbuntuServer\",\"sku\":\"16.04-LTS\",\"version\":\"latest\"\r\n },\"nodeAgentSKUId\":\"batch.node.ubuntu 16.04\"\r\n },\"networkConfiguration\":{\r\n \"endpointConfiguration\":{\r\n \"inboundNATPools\":[\r\n {\r\n \"name\":\"TestEndpointConfig\",\"protocol\":\"udp\",\"backendPort\":64444,\"frontendPortRangeStart\":60000,\"frontendPortRangeEnd\":61000\r\n }\r\n ]\r\n }\r\n }\r\n },{\r\n \"id\":\"nodesdkosdiskpool\",\"url\":\"https://test3.westcentralus.batch.azure.com/pools/nodesdkosdiskpool\",\"eTag\":\"0x8D65F97770B2ED1\",\"lastModified\":\"2018-12-11T18:35:46.1425873Z\",\"creationTime\":\"2018-12-11T18:35:46.1425873Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-12-11T18:35:46.1425873Z\",\"allocationState\":\"steady\",\"allocationStateTransitionTime\":\"2018-12-11T18:35:46.5651472Z\",\"vmSize\":\"standard_a1\",\"resizeTimeout\":\"PT15M\",\"currentDedicatedNodes\":0,\"targetDedicatedNodes\":0,\"currentLowPriorityNodes\":0,\"targetLowPriorityNodes\":0,\"enableAutoScale\":false,\"enableInterNodeCommunication\":false,\"maxTasksPerNode\":1,\"taskSchedulingPolicy\":{\r\n \"nodeFillType\":\"Spread\"\r\n },\"virtualMachineConfiguration\":{\r\n \"imageReference\":{\r\n \"publisher\":\"Canonical\",\"offer\":\"UbuntuServer\",\"sku\":\"16.04-LTS\",\"version\":\"latest\"\r\n },\"nodeAgentSKUId\":\"batch.node.ubuntu 16.04\"\r\n }\r\n },{\r\n \"id\":\"nodesdktestpool1\",\"url\":\"https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1\",\"eTag\":\"0x8D65F98B81717BC\",\"lastModified\":\"2018-12-11T18:44:44.7692732Z\",\"creationTime\":\"2018-12-11T18:27:21.0984288Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-12-11T18:27:21.0984288Z\",\"allocationState\":\"stopping\",\"allocationStateTransitionTime\":\"2018-12-11T18:44:45.5105772Z\",\"vmSize\":\"small\",\"resizeTimeout\":\"PT15M\",\"currentDedicatedNodes\":3,\"targetDedicatedNodes\":2,\"currentLowPriorityNodes\":0,\"targetLowPriorityNodes\":0,\"enableAutoScale\":false,\"enableInterNodeCommunication\":false,\"startTask\":{\r\n \"commandLine\":\"cmd /c echo hello > hello.txt\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"maxTaskRetryCount\":0,\"waitForSuccess\":false\r\n },\"userAccounts\":[\r\n {\r\n \"name\":\"nonAdminUser\",\"elevationLevel\":\"nonadmin\",\"windowsUserConfiguration\":{\r\n \"loginMode\":\"interactive\"\r\n }\r\n }\r\n ],\"certificateReferences\":[\r\n \r\n ],\"metadata\":[\r\n {\r\n \"name\":\"foo2\",\"value\":\"bar2\"\r\n }\r\n ],\"maxTasksPerNode\":1,\"taskSchedulingPolicy\":{\r\n \"nodeFillType\":\"Spread\"\r\n },\"cloudServiceConfiguration\":{\r\n \"osFamily\":\"4\",\"osVersion\":\"*\"\r\n }\r\n },{\r\n \"id\":\"nodesdktestpool2\",\"url\":\"https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool2\",\"eTag\":\"0x8D65F98B8A68220\",\"lastModified\":\"2018-12-11T18:44:45.7091616Z\",\"creationTime\":\"2018-12-11T18:44:45.7091616Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-12-11T18:44:45.7091616Z\",\"allocationState\":\"resizing\",\"allocationStateTransitionTime\":\"2018-12-11T18:44:45.7091616Z\",\"vmSize\":\"small\",\"resizeTimeout\":\"PT15M\",\"currentDedicatedNodes\":0,\"targetDedicatedNodes\":0,\"currentLowPriorityNodes\":0,\"targetLowPriorityNodes\":0,\"enableAutoScale\":false,\"enableInterNodeCommunication\":false,\"maxTasksPerNode\":1,\"taskSchedulingPolicy\":{\r\n \"nodeFillType\":\"Spread\"\r\n },\"cloudServiceConfiguration\":{\r\n \"osFamily\":\"4\",\"osVersion\":\"*\"\r\n }\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '95739a3c-e0a1-4c4b-89ce-e57cc8d8682e', + 'request-id': 'ee0891fd-b4cd-4c26-931f-dbbead3f6d5f', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:25:21 GMT', + date: 'Tue, 11 Dec 2018 18:44:46 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .get('/pools?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#pools\",\"value\":[\r\n {\r\n \"id\":\"nodesdkinboundendpointpool\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/pools/nodesdkinboundendpointpool\",\"eTag\":\"0x8D607A2FA29DA10\",\"lastModified\":\"2018-08-21T20:16:28.2647056Z\",\"creationTime\":\"2018-08-21T20:16:28.2647056Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-08-21T20:16:28.2647056Z\",\"allocationState\":\"steady\",\"allocationStateTransitionTime\":\"2018-08-21T20:18:10.9689835Z\",\"vmSize\":\"standard_a1\",\"resizeTimeout\":\"PT15M\",\"currentDedicatedNodes\":1,\"targetDedicatedNodes\":1,\"currentLowPriorityNodes\":0,\"targetLowPriorityNodes\":0,\"enableAutoScale\":false,\"enableInterNodeCommunication\":false,\"maxTasksPerNode\":1,\"taskSchedulingPolicy\":{\r\n \"nodeFillType\":\"Spread\"\r\n },\"virtualMachineConfiguration\":{\r\n \"imageReference\":{\r\n \"publisher\":\"Canonical\",\"offer\":\"UbuntuServer\",\"sku\":\"16.04-LTS\",\"version\":\"latest\"\r\n },\"nodeAgentSKUId\":\"batch.node.ubuntu 16.04\"\r\n },\"networkConfiguration\":{\r\n \"endpointConfiguration\":{\r\n \"inboundNATPools\":[\r\n {\r\n \"name\":\"TestEndpointConfig\",\"protocol\":\"udp\",\"backendPort\":64444,\"frontendPortRangeStart\":60000,\"frontendPortRangeEnd\":61000\r\n }\r\n ]\r\n }\r\n }\r\n },{\r\n \"id\":\"nodesdktestpool1\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1\",\"eTag\":\"0x8D607A437BD2FE0\",\"lastModified\":\"2018-08-21T20:25:21.0680288Z\",\"creationTime\":\"2018-08-21T20:05:04.4042325Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-08-21T20:05:04.4042325Z\",\"allocationState\":\"stopping\",\"allocationStateTransitionTime\":\"2018-08-21T20:25:21.0680288Z\",\"vmSize\":\"small\",\"resizeTimeout\":\"PT15M\",\"currentDedicatedNodes\":3,\"targetDedicatedNodes\":2,\"currentLowPriorityNodes\":0,\"targetLowPriorityNodes\":0,\"enableAutoScale\":false,\"enableInterNodeCommunication\":false,\"startTask\":{\r\n \"commandLine\":\"cmd /c echo hello > hello.txt\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"maxTaskRetryCount\":0,\"waitForSuccess\":false\r\n },\"userAccounts\":[\r\n {\r\n \"name\":\"nonAdminUser\",\"elevationLevel\":\"nonadmin\"\r\n }\r\n ],\"metadata\":[\r\n {\r\n \"name\":\"foo2\",\"value\":\"bar2\"\r\n }\r\n ],\"maxTasksPerNode\":1,\"taskSchedulingPolicy\":{\r\n \"nodeFillType\":\"Spread\"\r\n },\"cloudServiceConfiguration\":{\r\n \"osFamily\":\"4\",\"targetOSVersion\":\"*\",\"currentOSVersion\":\"*\"\r\n }\r\n },{\r\n \"id\":\"nodesdktestpool2\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool2\",\"eTag\":\"0x8D607A437F1E152\",\"lastModified\":\"2018-08-21T20:25:21.4133586Z\",\"creationTime\":\"2018-08-21T20:25:21.2320915Z\",\"state\":\"upgrading\",\"stateTransitionTime\":\"2018-08-21T20:25:21.4133586Z\",\"allocationState\":\"steady\",\"allocationStateTransitionTime\":\"2018-08-21T20:25:21.3450583Z\",\"vmSize\":\"small\",\"resizeTimeout\":\"PT15M\",\"currentDedicatedNodes\":0,\"targetDedicatedNodes\":0,\"currentLowPriorityNodes\":0,\"targetLowPriorityNodes\":0,\"enableAutoScale\":false,\"enableInterNodeCommunication\":false,\"maxTasksPerNode\":1,\"taskSchedulingPolicy\":{\r\n \"nodeFillType\":\"Spread\"\r\n },\"cloudServiceConfiguration\":{\r\n \"osFamily\":\"4\",\"targetOSVersion\":\"WA-GUEST-OS-4.32_201605-01\",\"currentOSVersion\":\"*\"\r\n }\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', +nock('https://test3.westcentralus.batch.azure.com:443') + .get('/pools?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#pools\",\"value\":[\r\n {\r\n \"id\":\"nodesdkinboundendpointpool\",\"url\":\"https://test3.westcentralus.batch.azure.com/pools/nodesdkinboundendpointpool\",\"eTag\":\"0x8D65F9778F109AA\",\"lastModified\":\"2018-12-11T18:35:49.3266858Z\",\"creationTime\":\"2018-12-11T18:35:49.3266858Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-12-11T18:35:49.3266858Z\",\"allocationState\":\"steady\",\"allocationStateTransitionTime\":\"2018-12-11T18:37:15.7227081Z\",\"vmSize\":\"standard_a1\",\"resizeTimeout\":\"PT15M\",\"currentDedicatedNodes\":1,\"targetDedicatedNodes\":1,\"currentLowPriorityNodes\":0,\"targetLowPriorityNodes\":0,\"enableAutoScale\":false,\"enableInterNodeCommunication\":false,\"maxTasksPerNode\":1,\"taskSchedulingPolicy\":{\r\n \"nodeFillType\":\"Spread\"\r\n },\"virtualMachineConfiguration\":{\r\n \"imageReference\":{\r\n \"publisher\":\"Canonical\",\"offer\":\"UbuntuServer\",\"sku\":\"16.04-LTS\",\"version\":\"latest\"\r\n },\"nodeAgentSKUId\":\"batch.node.ubuntu 16.04\"\r\n },\"networkConfiguration\":{\r\n \"endpointConfiguration\":{\r\n \"inboundNATPools\":[\r\n {\r\n \"name\":\"TestEndpointConfig\",\"protocol\":\"udp\",\"backendPort\":64444,\"frontendPortRangeStart\":60000,\"frontendPortRangeEnd\":61000\r\n }\r\n ]\r\n }\r\n }\r\n },{\r\n \"id\":\"nodesdkosdiskpool\",\"url\":\"https://test3.westcentralus.batch.azure.com/pools/nodesdkosdiskpool\",\"eTag\":\"0x8D65F97770B2ED1\",\"lastModified\":\"2018-12-11T18:35:46.1425873Z\",\"creationTime\":\"2018-12-11T18:35:46.1425873Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-12-11T18:35:46.1425873Z\",\"allocationState\":\"steady\",\"allocationStateTransitionTime\":\"2018-12-11T18:35:46.5651472Z\",\"vmSize\":\"standard_a1\",\"resizeTimeout\":\"PT15M\",\"currentDedicatedNodes\":0,\"targetDedicatedNodes\":0,\"currentLowPriorityNodes\":0,\"targetLowPriorityNodes\":0,\"enableAutoScale\":false,\"enableInterNodeCommunication\":false,\"maxTasksPerNode\":1,\"taskSchedulingPolicy\":{\r\n \"nodeFillType\":\"Spread\"\r\n },\"virtualMachineConfiguration\":{\r\n \"imageReference\":{\r\n \"publisher\":\"Canonical\",\"offer\":\"UbuntuServer\",\"sku\":\"16.04-LTS\",\"version\":\"latest\"\r\n },\"nodeAgentSKUId\":\"batch.node.ubuntu 16.04\"\r\n }\r\n },{\r\n \"id\":\"nodesdktestpool1\",\"url\":\"https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1\",\"eTag\":\"0x8D65F98B81717BC\",\"lastModified\":\"2018-12-11T18:44:44.7692732Z\",\"creationTime\":\"2018-12-11T18:27:21.0984288Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-12-11T18:27:21.0984288Z\",\"allocationState\":\"stopping\",\"allocationStateTransitionTime\":\"2018-12-11T18:44:45.5105772Z\",\"vmSize\":\"small\",\"resizeTimeout\":\"PT15M\",\"currentDedicatedNodes\":3,\"targetDedicatedNodes\":2,\"currentLowPriorityNodes\":0,\"targetLowPriorityNodes\":0,\"enableAutoScale\":false,\"enableInterNodeCommunication\":false,\"startTask\":{\r\n \"commandLine\":\"cmd /c echo hello > hello.txt\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"maxTaskRetryCount\":0,\"waitForSuccess\":false\r\n },\"userAccounts\":[\r\n {\r\n \"name\":\"nonAdminUser\",\"elevationLevel\":\"nonadmin\",\"windowsUserConfiguration\":{\r\n \"loginMode\":\"interactive\"\r\n }\r\n }\r\n ],\"certificateReferences\":[\r\n \r\n ],\"metadata\":[\r\n {\r\n \"name\":\"foo2\",\"value\":\"bar2\"\r\n }\r\n ],\"maxTasksPerNode\":1,\"taskSchedulingPolicy\":{\r\n \"nodeFillType\":\"Spread\"\r\n },\"cloudServiceConfiguration\":{\r\n \"osFamily\":\"4\",\"osVersion\":\"*\"\r\n }\r\n },{\r\n \"id\":\"nodesdktestpool2\",\"url\":\"https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool2\",\"eTag\":\"0x8D65F98B8A68220\",\"lastModified\":\"2018-12-11T18:44:45.7091616Z\",\"creationTime\":\"2018-12-11T18:44:45.7091616Z\",\"state\":\"active\",\"stateTransitionTime\":\"2018-12-11T18:44:45.7091616Z\",\"allocationState\":\"resizing\",\"allocationStateTransitionTime\":\"2018-12-11T18:44:45.7091616Z\",\"vmSize\":\"small\",\"resizeTimeout\":\"PT15M\",\"currentDedicatedNodes\":0,\"targetDedicatedNodes\":0,\"currentLowPriorityNodes\":0,\"targetLowPriorityNodes\":0,\"enableAutoScale\":false,\"enableInterNodeCommunication\":false,\"maxTasksPerNode\":1,\"taskSchedulingPolicy\":{\r\n \"nodeFillType\":\"Spread\"\r\n },\"cloudServiceConfiguration\":{\r\n \"osFamily\":\"4\",\"osVersion\":\"*\"\r\n }\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '95739a3c-e0a1-4c4b-89ce-e57cc8d8682e', + 'request-id': 'ee0891fd-b4cd-4c26-931f-dbbead3f6d5f', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:25:21 GMT', + date: 'Tue, 11 Dec 2018 18:44:46 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_list_sub_tasks_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_list_sub_tasks_successfully.nock.js index 69c0c449bb..9d79bed775 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_list_sub_tasks_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_list_sub_tasks_successfully.nock.js @@ -1,36 +1,36 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .get('/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask/subtasksinfo?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#subtaskinfo\",\"value\":[\r\n \r\n ]\r\n}", { 'transfer-encoding': 'chunked', +nock('http://test3.westcentralus.batch.azure.com:443') + .get('/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask/subtasksinfo?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#subtaskinfo\",\"value\":[\r\n \r\n ]\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '683c90ad-5dc0-4c8e-985e-4e4324fa4669', + 'request-id': '8c80ec4f-eaf6-4a31-864f-b7f6235a3af6', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:27:06 GMT', + date: 'Tue, 11 Dec 2018 18:46:32 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .get('/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask/subtasksinfo?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#subtaskinfo\",\"value\":[\r\n \r\n ]\r\n}", { 'transfer-encoding': 'chunked', +nock('https://test3.westcentralus.batch.azure.com:443') + .get('/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask/subtasksinfo?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#subtaskinfo\",\"value\":[\r\n \r\n ]\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '683c90ad-5dc0-4c8e-985e-4e4324fa4669', + 'request-id': '8c80ec4f-eaf6-4a31-864f-b7f6235a3af6', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:27:06 GMT', + date: 'Tue, 11 Dec 2018 18:46:32 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_patch_a_job_schedule_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_patch_a_job_schedule_successfully.nock.js index 29ea6cbf2f..15a1ff4835 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_patch_a_job_schedule_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_patch_a_job_schedule_successfully.nock.js @@ -1,42 +1,42 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') +nock('http://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.patch('/jobschedules/NodeSDKTestSchedule?api-version=2018-08-01.7.0', '*') +.patch('/jobschedules/NodeSDKTestSchedule?api-version=2018-12-01.8.0', '*') .reply(200, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:31:04 GMT', - etag: '0x8D607A5047874D7', + 'last-modified': 'Tue, 11 Dec 2018 21:04:06 GMT', + etag: '0x8D65FAC2FF98FA6', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'd4ef5c86-6370-429a-b416-6df9ab0f466e', + 'request-id': 'c155f487-2c11-4113-a358-0ef8df1583bf', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobschedules/NodeSDKTestSchedule', - date: 'Tue, 21 Aug 2018 20:31:04 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobschedules/NodeSDKTestSchedule', + date: 'Tue, 11 Dec 2018 21:04:06 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') +nock('https://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.patch('/jobschedules/NodeSDKTestSchedule?api-version=2018-08-01.7.0', '*') +.patch('/jobschedules/NodeSDKTestSchedule?api-version=2018-12-01.8.0', '*') .reply(200, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:31:04 GMT', - etag: '0x8D607A5047874D7', + 'last-modified': 'Tue, 11 Dec 2018 21:04:06 GMT', + etag: '0x8D65FAC2FF98FA6', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'd4ef5c86-6370-429a-b416-6df9ab0f466e', + 'request-id': 'c155f487-2c11-4113-a358-0ef8df1583bf', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobschedules/NodeSDKTestSchedule', - date: 'Tue, 21 Aug 2018 20:31:04 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobschedules/NodeSDKTestSchedule', + date: 'Tue, 11 Dec 2018 21:04:06 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_patch_a_job_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_patch_a_job_successfully.nock.js index 2d68483899..e396c08a42 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_patch_a_job_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_patch_a_job_successfully.nock.js @@ -1,42 +1,42 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') +nock('http://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.put('/jobs/HelloWorldJobNodeSDKTest?api-version=2018-08-01.7.0', '*') +.put('/jobs/HelloWorldJobNodeSDKTest?api-version=2018-12-01.8.0', '*') .reply(200, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:25:23 GMT', - etag: '0x8D607A4396C0D8C', + 'last-modified': 'Tue, 11 Dec 2018 18:44:49 GMT', + etag: '0x8D65F98BAA7B3B8', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'a8773a06-15e9-4f40-ab7e-28f0246705bd', + 'request-id': 'f9cc23ad-d664-445a-8ae7-13a200a1ecc6', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest', - date: 'Tue, 21 Aug 2018 20:25:23 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest', + date: 'Tue, 11 Dec 2018 18:44:48 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') +nock('https://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.put('/jobs/HelloWorldJobNodeSDKTest?api-version=2018-08-01.7.0', '*') +.put('/jobs/HelloWorldJobNodeSDKTest?api-version=2018-12-01.8.0', '*') .reply(200, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:25:23 GMT', - etag: '0x8D607A4396C0D8C', + 'last-modified': 'Tue, 11 Dec 2018 18:44:49 GMT', + etag: '0x8D65F98BAA7B3B8', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'a8773a06-15e9-4f40-ab7e-28f0246705bd', + 'request-id': 'f9cc23ad-d664-445a-8ae7-13a200a1ecc6', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest', - date: 'Tue, 21 Aug 2018 20:25:23 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest', + date: 'Tue, 11 Dec 2018 18:44:48 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_patch_pool_parameters_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_patch_pool_parameters_successfully.nock.js index 697542f8b1..2ed3a50380 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_patch_pool_parameters_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_patch_pool_parameters_successfully.nock.js @@ -1,42 +1,42 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') +nock('http://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.patch('/pools/nodesdktestpool1?api-version=2018-08-01.7.0', '*') +.patch('/pools/nodesdktestpool1?api-version=2018-12-01.8.0', '*') .reply(200, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:09:40 GMT', - etag: '0x8D607A20760C002', + 'last-modified': 'Tue, 11 Dec 2018 18:29:03 GMT', + etag: '0x8D65F9686C8060D', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'a3b592cd-74a7-4348-bcee-12efd8d4f562', + 'request-id': 'fe1a22a6-9557-4ab1-93be-f439c5a14ab8', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1', - date: 'Tue, 21 Aug 2018 20:09:40 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1', + date: 'Tue, 11 Dec 2018 18:29:03 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') +nock('https://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.patch('/pools/nodesdktestpool1?api-version=2018-08-01.7.0', '*') +.patch('/pools/nodesdktestpool1?api-version=2018-12-01.8.0', '*') .reply(200, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:09:40 GMT', - etag: '0x8D607A20760C002', + 'last-modified': 'Tue, 11 Dec 2018 18:29:03 GMT', + etag: '0x8D65F9686C8060D', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'a3b592cd-74a7-4348-bcee-12efd8d4f562', + 'request-id': 'fe1a22a6-9557-4ab1-93be-f439c5a14ab8', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1', - date: 'Tue, 21 Aug 2018 20:09:40 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1', + date: 'Tue, 11 Dec 2018 18:29:03 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_perform_AAD_authentication_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_perform_AAD_authentication_successfully.nock.js index 98d1bed70a..f4ff4924be 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_perform_AAD_authentication_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_perform_AAD_authentication_successfully.nock.js @@ -1,36 +1,36 @@ -// This file has been autogenerated. - -exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; -}; - +// This file has been autogenerated. + +exports.setEnvironment = function() { + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; +}; + exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .get('/nodeagentskus?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#nodeagentskus\",\"value\":[\r\n {\r\n \"id\":\"batch.node.centos 7\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"OpenLogic\",\"offer\":\"CentOS\",\"sku\":\"7.4\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"OpenLogic\",\"offer\":\"CentOS-HPC\",\"sku\":\"7.3\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"OpenLogic\",\"offer\":\"CentOS-HPC\",\"sku\":\"7.1\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"Oracle\",\"offer\":\"Oracle-Linux\",\"sku\":\"7.4\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"microsoft-ads\",\"offer\":\"linux-data-science-vm\",\"sku\":\"linuxdsvm\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"batch\",\"offer\":\"rendering-centos73\",\"sku\":\"rendering\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.debian 8\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"Credativ\",\"offer\":\"Debian\",\"sku\":\"8\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.debian 9\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"Credativ\",\"offer\":\"Debian\",\"sku\":\"9\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.opensuse 42.1\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"SUSE\",\"offer\":\"SLES\",\"sku\":\"12-SP2\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.ubuntu 14.04\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"Canonical\",\"offer\":\"UbuntuServer\",\"sku\":\"14.04.5-LTS\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.ubuntu 16.04\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"Canonical\",\"offer\":\"UbuntuServer\",\"sku\":\"16.04-LTS\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.windows amd64\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2008-R2-SP1\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2008-R2-SP1-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2012-Datacenter\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2012-Datacenter-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2012-R2-Datacenter\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2012-R2-Datacenter-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2016-Datacenter\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2016-Datacenter-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2016-Datacenter-with-Containers\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"microsoft-ads\",\"offer\":\"standard-data-science-vm\",\"sku\":\"standard-data-science-vm\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"batch\",\"offer\":\"rendering-windows2016\",\"sku\":\"rendering\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"windows\"\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', +nock('http://test3.westcentralus.batch.azure.com:443') + .get('/nodeagentskus?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#nodeagentskus\",\"value\":[\r\n {\r\n \"id\":\"batch.node.centos 7\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"OpenLogic\",\"offer\":\"CentOS\",\"sku\":\"7.5\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"OpenLogic\",\"offer\":\"CentOS-HPC\",\"sku\":\"7.4\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"OpenLogic\",\"offer\":\"CentOS-HPC\",\"sku\":\"7.3\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"OpenLogic\",\"offer\":\"CentOS-HPC\",\"sku\":\"7.1\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"Oracle\",\"offer\":\"Oracle-Linux\",\"sku\":\"7.5\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"microsoft-ads\",\"offer\":\"linux-data-science-vm\",\"sku\":\"linuxdsvm\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"batch\",\"offer\":\"rendering-centos73\",\"sku\":\"rendering\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"microsoft-azure-batch\",\"offer\":\"centos-container\",\"sku\":\"7-5\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"microsoft-azure-batch\",\"offer\":\"centos-container-rdma\",\"sku\":\"7-4\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.debian 8\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"Credativ\",\"offer\":\"Debian\",\"sku\":\"8\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.debian 9\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"Credativ\",\"offer\":\"Debian\",\"sku\":\"9\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.ubuntu 14.04\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"Canonical\",\"offer\":\"UbuntuServer\",\"sku\":\"14.04.5-LTS\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.ubuntu 16.04\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"Canonical\",\"offer\":\"UbuntuServer\",\"sku\":\"16.04-LTS\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"microsoft-dsvm\",\"offer\":\"linux-data-science-vm-ubuntu\",\"sku\":\"linuxdsvmubuntu\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"microsoft-azure-batch\",\"offer\":\"ubuntu-server-container\",\"sku\":\"16-04-lts\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"microsoft-azure-batch\",\"offer\":\"ubuntu-server-container-rdma\",\"sku\":\"16-04-lts\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.ubuntu 18.04\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"Canonical\",\"offer\":\"UbuntuServer\",\"sku\":\"18.04-LTS\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.windows amd64\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2019-Datacenter\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2019-Datacenter-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2019-Datacenter-Core\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2019-Datacenter-Core-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2016-Datacenter\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2016-Datacenter-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2012-R2-Datacenter\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2012-R2-Datacenter-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2012-Datacenter\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2012-Datacenter-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2008-R2-SP1\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2008-R2-SP1-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2019-Datacenter-with-Containers\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2019-Datacenter-with-Containers-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2019-Datacenter-Core-with-Containers\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2019-Datacenter-Core-with-Containers-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2016-Datacenter-with-Containers\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"microsoft-dsvm\",\"offer\":\"dsvm-windows\",\"sku\":\"server-2016\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"batch\",\"offer\":\"rendering-windows2016\",\"sku\":\"rendering\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"windows\"\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'd24622e1-96c9-4b99-8f89-cb92bb63bb0b', + 'request-id': '179d6383-4e7d-4d63-9cc2-4eecbdc2dcf1', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:25:23 GMT', + date: 'Tue, 11 Dec 2018 21:04:05 GMT', connection: 'close' }); - return result; }, + return result; }, function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .get('/nodeagentskus?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#nodeagentskus\",\"value\":[\r\n {\r\n \"id\":\"batch.node.centos 7\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"OpenLogic\",\"offer\":\"CentOS\",\"sku\":\"7.4\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"OpenLogic\",\"offer\":\"CentOS-HPC\",\"sku\":\"7.3\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"OpenLogic\",\"offer\":\"CentOS-HPC\",\"sku\":\"7.1\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"Oracle\",\"offer\":\"Oracle-Linux\",\"sku\":\"7.4\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"microsoft-ads\",\"offer\":\"linux-data-science-vm\",\"sku\":\"linuxdsvm\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"batch\",\"offer\":\"rendering-centos73\",\"sku\":\"rendering\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.debian 8\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"Credativ\",\"offer\":\"Debian\",\"sku\":\"8\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.debian 9\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"Credativ\",\"offer\":\"Debian\",\"sku\":\"9\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.opensuse 42.1\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"SUSE\",\"offer\":\"SLES\",\"sku\":\"12-SP2\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.ubuntu 14.04\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"Canonical\",\"offer\":\"UbuntuServer\",\"sku\":\"14.04.5-LTS\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.ubuntu 16.04\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"Canonical\",\"offer\":\"UbuntuServer\",\"sku\":\"16.04-LTS\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.windows amd64\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2008-R2-SP1\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2008-R2-SP1-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2012-Datacenter\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2012-Datacenter-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2012-R2-Datacenter\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2012-R2-Datacenter-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2016-Datacenter\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2016-Datacenter-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2016-Datacenter-with-Containers\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"microsoft-ads\",\"offer\":\"standard-data-science-vm\",\"sku\":\"standard-data-science-vm\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"batch\",\"offer\":\"rendering-windows2016\",\"sku\":\"rendering\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"windows\"\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', +nock('https://test3.westcentralus.batch.azure.com:443') + .get('/nodeagentskus?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#nodeagentskus\",\"value\":[\r\n {\r\n \"id\":\"batch.node.centos 7\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"OpenLogic\",\"offer\":\"CentOS\",\"sku\":\"7.5\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"OpenLogic\",\"offer\":\"CentOS-HPC\",\"sku\":\"7.4\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"OpenLogic\",\"offer\":\"CentOS-HPC\",\"sku\":\"7.3\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"OpenLogic\",\"offer\":\"CentOS-HPC\",\"sku\":\"7.1\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"Oracle\",\"offer\":\"Oracle-Linux\",\"sku\":\"7.5\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"microsoft-ads\",\"offer\":\"linux-data-science-vm\",\"sku\":\"linuxdsvm\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"batch\",\"offer\":\"rendering-centos73\",\"sku\":\"rendering\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"microsoft-azure-batch\",\"offer\":\"centos-container\",\"sku\":\"7-5\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"microsoft-azure-batch\",\"offer\":\"centos-container-rdma\",\"sku\":\"7-4\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.debian 8\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"Credativ\",\"offer\":\"Debian\",\"sku\":\"8\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.debian 9\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"Credativ\",\"offer\":\"Debian\",\"sku\":\"9\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.ubuntu 14.04\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"Canonical\",\"offer\":\"UbuntuServer\",\"sku\":\"14.04.5-LTS\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.ubuntu 16.04\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"Canonical\",\"offer\":\"UbuntuServer\",\"sku\":\"16.04-LTS\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"microsoft-dsvm\",\"offer\":\"linux-data-science-vm-ubuntu\",\"sku\":\"linuxdsvmubuntu\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"microsoft-azure-batch\",\"offer\":\"ubuntu-server-container\",\"sku\":\"16-04-lts\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"microsoft-azure-batch\",\"offer\":\"ubuntu-server-container-rdma\",\"sku\":\"16-04-lts\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.ubuntu 18.04\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"Canonical\",\"offer\":\"UbuntuServer\",\"sku\":\"18.04-LTS\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"linux\"\r\n },{\r\n \"id\":\"batch.node.windows amd64\",\"verifiedImageReferences\":[\r\n {\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2019-Datacenter\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2019-Datacenter-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2019-Datacenter-Core\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2019-Datacenter-Core-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2016-Datacenter\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2016-Datacenter-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2012-R2-Datacenter\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2012-R2-Datacenter-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2012-Datacenter\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2012-Datacenter-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2008-R2-SP1\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2008-R2-SP1-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2019-Datacenter-with-Containers\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2019-Datacenter-with-Containers-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2019-Datacenter-Core-with-Containers\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2019-Datacenter-Core-with-Containers-smalldisk\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"MicrosoftWindowsServer\",\"offer\":\"WindowsServer\",\"sku\":\"2016-Datacenter-with-Containers\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"microsoft-dsvm\",\"offer\":\"dsvm-windows\",\"sku\":\"server-2016\",\"version\":\"latest\"\r\n },{\r\n \"publisher\":\"batch\",\"offer\":\"rendering-windows2016\",\"sku\":\"rendering\",\"version\":\"latest\"\r\n }\r\n ],\"osType\":\"windows\"\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'd24622e1-96c9-4b99-8f89-cb92bb63bb0b', + 'request-id': '179d6383-4e7d-4d63-9cc2-4eecbdc2dcf1', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:25:23 GMT', + date: 'Tue, 11 Dec 2018 21:04:05 GMT', connection: 'close' }); - return result; }]]; \ No newline at end of file + return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_re-list_compute_nodes_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_re-list_compute_nodes_successfully.nock.js index 04a463bb15..b764050b24 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_re-list_compute_nodes_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_re-list_compute_nodes_successfully.nock.js @@ -1,36 +1,36 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .get('/pools/nodesdktestpool1/nodes?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#nodes\",\"value\":[\r\n {\r\n \"id\":\"tvm-14141481_2-20180821t200555z\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvm-14141481_2-20180821t200555z\",\"state\":\"reimaging\",\"schedulingState\":\"enabled\",\"stateTransitionTime\":\"2018-08-21T20:23:12.2970717Z\",\"lastBootTime\":\"2018-08-21T20:11:08.5252994Z\",\"allocationTime\":\"2018-08-21T20:05:55.1606562Z\",\"ipAddress\":\"10.0.0.6\",\"affinityId\":\"TVM:tvm-14141481_2-20180821t200555z\",\"vmSize\":\"small\",\"totalTasksRun\":0,\"totalTasksSucceeded\":0,\"runningTasksCount\":0,\"startTask\":{\r\n \"commandLine\":\"cmd /c echo hello > hello.txt\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"maxTaskRetryCount\":0,\"waitForSuccess\":false\r\n },\"startTaskInfo\":{\r\n \"state\":\"completed\",\"startTime\":\"2018-08-21T20:11:11.1383506Z\",\"endTime\":\"2018-08-21T20:11:11.2845899Z\",\"exitCode\":0,\"result\":\"Success\",\"retryCount\":0\r\n },\"isDedicated\":true\r\n },{\r\n \"id\":\"tvm-14141481_3-20180821t200555z\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvm-14141481_3-20180821t200555z\",\"state\":\"idle\",\"schedulingState\":\"enabled\",\"stateTransitionTime\":\"2018-08-21T20:11:14.1474938Z\",\"lastBootTime\":\"2018-08-21T20:11:11.1369007Z\",\"allocationTime\":\"2018-08-21T20:05:55.1606562Z\",\"ipAddress\":\"10.0.0.5\",\"affinityId\":\"TVM:tvm-14141481_3-20180821t200555z\",\"vmSize\":\"small\",\"totalTasksRun\":6,\"totalTasksSucceeded\":3,\"runningTasksCount\":0,\"recentTasks\":[\r\n {\r\n \"taskUrl\":\"https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/helloworldnodesdktesttask2\",\"jobId\":\"HelloWorldJobNodeSDKTest\",\"taskId\":\"helloworldnodesdktesttask2\",\"subtaskId\":0,\"taskState\":\"completed\",\"executionInfo\":{\r\n \"startTime\":\"2018-08-21T20:25:27.6289624Z\",\"endTime\":\"2018-08-21T20:25:27.7293535Z\",\"exitCode\":0,\"result\":\"Success\",\"retryCount\":0,\"requeueCount\":0\r\n }\r\n },{\r\n \"taskUrl\":\"https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/helloworldnodesdktesttask\",\"jobId\":\"HelloWorldJobNodeSDKTest\",\"taskId\":\"helloworldnodesdktesttask\",\"subtaskId\":0,\"taskState\":\"completed\",\"executionInfo\":{\r\n \"startTime\":\"2018-08-21T20:25:30.2637708Z\",\"endTime\":\"2018-08-21T20:25:49.4037464Z\",\"exitCode\":0,\"result\":\"Success\",\"retryCount\":0,\"requeueCount\":0\r\n }\r\n },{\r\n \"taskUrl\":\"https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/taskwithauthtokensettings\",\"jobId\":\"HelloWorldJobNodeSDKTest\",\"taskId\":\"taskwithauthtokensettings\",\"subtaskId\":0,\"taskState\":\"completed\",\"executionInfo\":{\r\n \"startTime\":\"2018-08-21T20:27:13.8577921Z\",\"endTime\":\"2018-08-21T20:27:13.9827838Z\",\"exitCode\":0,\"result\":\"Success\",\"retryCount\":0,\"requeueCount\":0\r\n }\r\n },{\r\n \"taskUrl\":\"https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/taskwithuseridentity\",\"jobId\":\"HelloWorldJobNodeSDKTest\",\"taskId\":\"taskwithuseridentity\",\"subtaskId\":0,\"taskState\":\"completed\",\"executionInfo\":{\r\n \"startTime\":\"2018-08-21T20:27:18.4686303Z\",\"endTime\":\"2018-08-21T20:27:18.5296295Z\",\"exitCode\":0,\"result\":\"Success\",\"retryCount\":3,\"lastRetryTime\":\"2018-08-21T20:27:16.7229929Z\",\"requeueCount\":0\r\n }\r\n }\r\n ],\"startTask\":{\r\n \"commandLine\":\"cmd /c echo hello > hello.txt\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"maxTaskRetryCount\":0,\"waitForSuccess\":false\r\n },\"startTaskInfo\":{\r\n \"state\":\"completed\",\"startTime\":\"2018-08-21T20:11:14.1474938Z\",\"endTime\":\"2018-08-21T20:11:14.2844393Z\",\"exitCode\":0,\"result\":\"Success\",\"retryCount\":0\r\n },\"isDedicated\":true\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', +nock('http://test3.westcentralus.batch.azure.com:443') + .get('/pools/nodesdktestpool1/nodes?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#nodes\",\"value\":[\r\n {\r\n \"id\":\"tvmps_15c61fea08a34e0fe431ba70cdf2156682bec1e01fdda442f2dccde21908ed91_d\",\"url\":\"https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvmps_15c61fea08a34e0fe431ba70cdf2156682bec1e01fdda442f2dccde21908ed91_d\",\"state\":\"reimaging\",\"schedulingState\":\"enabled\",\"stateTransitionTime\":\"2018-12-11T18:42:34.9601236Z\",\"lastBootTime\":\"2018-12-11T18:32:13.820626Z\",\"allocationTime\":\"2018-12-11T18:28:36.9291366Z\",\"ipAddress\":\"10.0.0.6\",\"affinityId\":\"TVM:tvmps_15c61fea08a34e0fe431ba70cdf2156682bec1e01fdda442f2dccde21908ed91_d\",\"vmSize\":\"small\",\"totalTasksRun\":0,\"totalTasksSucceeded\":0,\"runningTasksCount\":0,\"startTask\":{\r\n \"commandLine\":\"cmd /c echo hello > hello.txt\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"maxTaskRetryCount\":0,\"waitForSuccess\":false\r\n },\"startTaskInfo\":{\r\n \"state\":\"completed\",\"startTime\":\"2018-12-11T18:32:14.993407Z\",\"endTime\":\"2018-12-11T18:32:15.698035Z\",\"exitCode\":0,\"result\":\"success\",\"retryCount\":0\r\n },\"certificateReferences\":[\r\n \r\n ],\"isDedicated\":true,\"endpointConfiguration\":{\r\n \"inboundEndpoints\":[\r\n {\r\n \"name\":\"Microsoft.WindowsAzure.Plugins.RemoteForwarder.RdpInput\",\"protocol\":\"tcp\",\"publicIPAddress\":\"13.77.205.84\",\"frontendPort\":3389,\"backendPort\":20000\r\n }\r\n ]\r\n },\"nodeAgentInfo\":{\r\n \"lastUpdateTime\":\"2018-12-11T18:32:13.820626Z\",\"version\":\"1.4.7\"\r\n }\r\n },{\r\n \"id\":\"tvmps_bc8f91eb73db7fd10d852ff323ee06ef51abb84fc93e7dae4e18fa0b0b95b030_d\",\"url\":\"https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvmps_bc8f91eb73db7fd10d852ff323ee06ef51abb84fc93e7dae4e18fa0b0b95b030_d\",\"state\":\"idle\",\"schedulingState\":\"enabled\",\"stateTransitionTime\":\"2018-12-11T18:46:38.81119Z\",\"lastBootTime\":\"2018-12-11T18:31:51.947806Z\",\"allocationTime\":\"2018-12-11T18:28:36.9291366Z\",\"ipAddress\":\"10.0.0.5\",\"affinityId\":\"TVM:tvmps_bc8f91eb73db7fd10d852ff323ee06ef51abb84fc93e7dae4e18fa0b0b95b030_d\",\"vmSize\":\"small\",\"totalTasksRun\":8,\"totalTasksSucceeded\":3,\"runningTasksCount\":0,\"recentTasks\":[\r\n {\r\n \"taskUrl\":\"https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2\",\"jobId\":\"HelloWorldJobNodeSDKTest\",\"taskId\":\"HelloWorldNodeSDKTestTask2\",\"taskState\":\"completed\",\"executionInfo\":{\r\n \"startTime\":\"2018-12-11T18:44:53.418485Z\",\"endTime\":\"2018-12-11T18:44:54.22158Z\",\"exitCode\":0,\"result\":\"success\",\"retryCount\":0,\"requeueCount\":0\r\n }\r\n },{\r\n \"taskUrl\":\"https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask\",\"jobId\":\"HelloWorldJobNodeSDKTest\",\"taskId\":\"HelloWorldNodeSDKTestTask\",\"taskState\":\"completed\",\"executionInfo\":{\r\n \"startTime\":\"2018-12-11T18:44:55.467713Z\",\"endTime\":\"2018-12-11T18:45:15.176746Z\",\"exitCode\":0,\"result\":\"success\",\"retryCount\":0,\"requeueCount\":0\r\n }\r\n },{\r\n \"taskUrl\":\"https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/TaskWithAuthTokenSettings\",\"jobId\":\"HelloWorldJobNodeSDKTest\",\"taskId\":\"TaskWithAuthTokenSettings\",\"taskState\":\"completed\",\"executionInfo\":{\r\n \"startTime\":\"2018-12-11T18:46:36.128274Z\",\"endTime\":\"2018-12-11T18:46:36.705399Z\",\"exitCode\":0,\"result\":\"success\",\"retryCount\":0,\"requeueCount\":0\r\n }\r\n },{\r\n \"taskUrl\":\"https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/TaskWithUserIdentity\",\"jobId\":\"HelloWorldJobNodeSDKTest\",\"taskId\":\"TaskWithUserIdentity\",\"taskState\":\"completed\",\"executionInfo\":{\r\n \"startTime\":\"2018-12-11T18:46:38.534064Z\",\"endTime\":\"2018-12-11T18:46:38.769842Z\",\"exitCode\":2,\"failureInfo\":{\r\n \"category\":\"UserError\",\"code\":\"FailureExitCode\",\"message\":\"The task exited with an exit code representing a failure\",\"details\":[\r\n {\r\n \"name\":\"Message\",\"value\":\"The task exited with an exit code representing a failure\"\r\n }\r\n ]\r\n },\"result\":\"failure\",\"retryCount\":3,\"lastRetryTime\":\"2018-12-11T18:46:38.534064Z\",\"requeueCount\":0\r\n }\r\n }\r\n ],\"startTask\":{\r\n \"commandLine\":\"cmd /c echo hello > hello.txt\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"maxTaskRetryCount\":0,\"waitForSuccess\":false\r\n },\"startTaskInfo\":{\r\n \"state\":\"completed\",\"startTime\":\"2018-12-11T18:31:54.456912Z\",\"endTime\":\"2018-12-11T18:31:55.082974Z\",\"exitCode\":0,\"result\":\"success\",\"retryCount\":0\r\n },\"certificateReferences\":[\r\n \r\n ],\"isDedicated\":true,\"endpointConfiguration\":{\r\n \"inboundEndpoints\":[\r\n {\r\n \"name\":\"Microsoft.WindowsAzure.Plugins.RemoteForwarder.RdpInput\",\"protocol\":\"tcp\",\"publicIPAddress\":\"13.77.205.84\",\"frontendPort\":3389,\"backendPort\":20000\r\n }\r\n ]\r\n },\"nodeAgentInfo\":{\r\n \"lastUpdateTime\":\"2018-12-11T18:31:51.947806Z\",\"version\":\"1.4.7\"\r\n }\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '91d46541-a5cf-48d3-9e5a-5a292e3e3ef4', + 'request-id': '13fa96c6-5ae6-4a42-80bd-4558814c3d22', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:27:24 GMT', + date: 'Tue, 11 Dec 2018 18:46:50 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .get('/pools/nodesdktestpool1/nodes?api-version=2018-08-01.7.0') - .reply(200, "{\r\n \"odata.metadata\":\"https://lchency4.westcentralus.batch.azure.com/$metadata#nodes\",\"value\":[\r\n {\r\n \"id\":\"tvm-14141481_2-20180821t200555z\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvm-14141481_2-20180821t200555z\",\"state\":\"reimaging\",\"schedulingState\":\"enabled\",\"stateTransitionTime\":\"2018-08-21T20:23:12.2970717Z\",\"lastBootTime\":\"2018-08-21T20:11:08.5252994Z\",\"allocationTime\":\"2018-08-21T20:05:55.1606562Z\",\"ipAddress\":\"10.0.0.6\",\"affinityId\":\"TVM:tvm-14141481_2-20180821t200555z\",\"vmSize\":\"small\",\"totalTasksRun\":0,\"totalTasksSucceeded\":0,\"runningTasksCount\":0,\"startTask\":{\r\n \"commandLine\":\"cmd /c echo hello > hello.txt\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"maxTaskRetryCount\":0,\"waitForSuccess\":false\r\n },\"startTaskInfo\":{\r\n \"state\":\"completed\",\"startTime\":\"2018-08-21T20:11:11.1383506Z\",\"endTime\":\"2018-08-21T20:11:11.2845899Z\",\"exitCode\":0,\"result\":\"Success\",\"retryCount\":0\r\n },\"isDedicated\":true\r\n },{\r\n \"id\":\"tvm-14141481_3-20180821t200555z\",\"url\":\"https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvm-14141481_3-20180821t200555z\",\"state\":\"idle\",\"schedulingState\":\"enabled\",\"stateTransitionTime\":\"2018-08-21T20:11:14.1474938Z\",\"lastBootTime\":\"2018-08-21T20:11:11.1369007Z\",\"allocationTime\":\"2018-08-21T20:05:55.1606562Z\",\"ipAddress\":\"10.0.0.5\",\"affinityId\":\"TVM:tvm-14141481_3-20180821t200555z\",\"vmSize\":\"small\",\"totalTasksRun\":6,\"totalTasksSucceeded\":3,\"runningTasksCount\":0,\"recentTasks\":[\r\n {\r\n \"taskUrl\":\"https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/helloworldnodesdktesttask2\",\"jobId\":\"HelloWorldJobNodeSDKTest\",\"taskId\":\"helloworldnodesdktesttask2\",\"subtaskId\":0,\"taskState\":\"completed\",\"executionInfo\":{\r\n \"startTime\":\"2018-08-21T20:25:27.6289624Z\",\"endTime\":\"2018-08-21T20:25:27.7293535Z\",\"exitCode\":0,\"result\":\"Success\",\"retryCount\":0,\"requeueCount\":0\r\n }\r\n },{\r\n \"taskUrl\":\"https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/helloworldnodesdktesttask\",\"jobId\":\"HelloWorldJobNodeSDKTest\",\"taskId\":\"helloworldnodesdktesttask\",\"subtaskId\":0,\"taskState\":\"completed\",\"executionInfo\":{\r\n \"startTime\":\"2018-08-21T20:25:30.2637708Z\",\"endTime\":\"2018-08-21T20:25:49.4037464Z\",\"exitCode\":0,\"result\":\"Success\",\"retryCount\":0,\"requeueCount\":0\r\n }\r\n },{\r\n \"taskUrl\":\"https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/taskwithauthtokensettings\",\"jobId\":\"HelloWorldJobNodeSDKTest\",\"taskId\":\"taskwithauthtokensettings\",\"subtaskId\":0,\"taskState\":\"completed\",\"executionInfo\":{\r\n \"startTime\":\"2018-08-21T20:27:13.8577921Z\",\"endTime\":\"2018-08-21T20:27:13.9827838Z\",\"exitCode\":0,\"result\":\"Success\",\"retryCount\":0,\"requeueCount\":0\r\n }\r\n },{\r\n \"taskUrl\":\"https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/taskwithuseridentity\",\"jobId\":\"HelloWorldJobNodeSDKTest\",\"taskId\":\"taskwithuseridentity\",\"subtaskId\":0,\"taskState\":\"completed\",\"executionInfo\":{\r\n \"startTime\":\"2018-08-21T20:27:18.4686303Z\",\"endTime\":\"2018-08-21T20:27:18.5296295Z\",\"exitCode\":0,\"result\":\"Success\",\"retryCount\":3,\"lastRetryTime\":\"2018-08-21T20:27:16.7229929Z\",\"requeueCount\":0\r\n }\r\n }\r\n ],\"startTask\":{\r\n \"commandLine\":\"cmd /c echo hello > hello.txt\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"maxTaskRetryCount\":0,\"waitForSuccess\":false\r\n },\"startTaskInfo\":{\r\n \"state\":\"completed\",\"startTime\":\"2018-08-21T20:11:14.1474938Z\",\"endTime\":\"2018-08-21T20:11:14.2844393Z\",\"exitCode\":0,\"result\":\"Success\",\"retryCount\":0\r\n },\"isDedicated\":true\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', +nock('https://test3.westcentralus.batch.azure.com:443') + .get('/pools/nodesdktestpool1/nodes?api-version=2018-12-01.8.0') + .reply(200, "{\r\n \"odata.metadata\":\"https://test3.westcentralus.batch.azure.com/$metadata#nodes\",\"value\":[\r\n {\r\n \"id\":\"tvmps_15c61fea08a34e0fe431ba70cdf2156682bec1e01fdda442f2dccde21908ed91_d\",\"url\":\"https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvmps_15c61fea08a34e0fe431ba70cdf2156682bec1e01fdda442f2dccde21908ed91_d\",\"state\":\"reimaging\",\"schedulingState\":\"enabled\",\"stateTransitionTime\":\"2018-12-11T18:42:34.9601236Z\",\"lastBootTime\":\"2018-12-11T18:32:13.820626Z\",\"allocationTime\":\"2018-12-11T18:28:36.9291366Z\",\"ipAddress\":\"10.0.0.6\",\"affinityId\":\"TVM:tvmps_15c61fea08a34e0fe431ba70cdf2156682bec1e01fdda442f2dccde21908ed91_d\",\"vmSize\":\"small\",\"totalTasksRun\":0,\"totalTasksSucceeded\":0,\"runningTasksCount\":0,\"startTask\":{\r\n \"commandLine\":\"cmd /c echo hello > hello.txt\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"maxTaskRetryCount\":0,\"waitForSuccess\":false\r\n },\"startTaskInfo\":{\r\n \"state\":\"completed\",\"startTime\":\"2018-12-11T18:32:14.993407Z\",\"endTime\":\"2018-12-11T18:32:15.698035Z\",\"exitCode\":0,\"result\":\"success\",\"retryCount\":0\r\n },\"certificateReferences\":[\r\n \r\n ],\"isDedicated\":true,\"endpointConfiguration\":{\r\n \"inboundEndpoints\":[\r\n {\r\n \"name\":\"Microsoft.WindowsAzure.Plugins.RemoteForwarder.RdpInput\",\"protocol\":\"tcp\",\"publicIPAddress\":\"13.77.205.84\",\"frontendPort\":3389,\"backendPort\":20000\r\n }\r\n ]\r\n },\"nodeAgentInfo\":{\r\n \"lastUpdateTime\":\"2018-12-11T18:32:13.820626Z\",\"version\":\"1.4.7\"\r\n }\r\n },{\r\n \"id\":\"tvmps_bc8f91eb73db7fd10d852ff323ee06ef51abb84fc93e7dae4e18fa0b0b95b030_d\",\"url\":\"https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvmps_bc8f91eb73db7fd10d852ff323ee06ef51abb84fc93e7dae4e18fa0b0b95b030_d\",\"state\":\"idle\",\"schedulingState\":\"enabled\",\"stateTransitionTime\":\"2018-12-11T18:46:38.81119Z\",\"lastBootTime\":\"2018-12-11T18:31:51.947806Z\",\"allocationTime\":\"2018-12-11T18:28:36.9291366Z\",\"ipAddress\":\"10.0.0.5\",\"affinityId\":\"TVM:tvmps_bc8f91eb73db7fd10d852ff323ee06ef51abb84fc93e7dae4e18fa0b0b95b030_d\",\"vmSize\":\"small\",\"totalTasksRun\":8,\"totalTasksSucceeded\":3,\"runningTasksCount\":0,\"recentTasks\":[\r\n {\r\n \"taskUrl\":\"https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2\",\"jobId\":\"HelloWorldJobNodeSDKTest\",\"taskId\":\"HelloWorldNodeSDKTestTask2\",\"taskState\":\"completed\",\"executionInfo\":{\r\n \"startTime\":\"2018-12-11T18:44:53.418485Z\",\"endTime\":\"2018-12-11T18:44:54.22158Z\",\"exitCode\":0,\"result\":\"success\",\"retryCount\":0,\"requeueCount\":0\r\n }\r\n },{\r\n \"taskUrl\":\"https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask\",\"jobId\":\"HelloWorldJobNodeSDKTest\",\"taskId\":\"HelloWorldNodeSDKTestTask\",\"taskState\":\"completed\",\"executionInfo\":{\r\n \"startTime\":\"2018-12-11T18:44:55.467713Z\",\"endTime\":\"2018-12-11T18:45:15.176746Z\",\"exitCode\":0,\"result\":\"success\",\"retryCount\":0,\"requeueCount\":0\r\n }\r\n },{\r\n \"taskUrl\":\"https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/TaskWithAuthTokenSettings\",\"jobId\":\"HelloWorldJobNodeSDKTest\",\"taskId\":\"TaskWithAuthTokenSettings\",\"taskState\":\"completed\",\"executionInfo\":{\r\n \"startTime\":\"2018-12-11T18:46:36.128274Z\",\"endTime\":\"2018-12-11T18:46:36.705399Z\",\"exitCode\":0,\"result\":\"success\",\"retryCount\":0,\"requeueCount\":0\r\n }\r\n },{\r\n \"taskUrl\":\"https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/TaskWithUserIdentity\",\"jobId\":\"HelloWorldJobNodeSDKTest\",\"taskId\":\"TaskWithUserIdentity\",\"taskState\":\"completed\",\"executionInfo\":{\r\n \"startTime\":\"2018-12-11T18:46:38.534064Z\",\"endTime\":\"2018-12-11T18:46:38.769842Z\",\"exitCode\":2,\"failureInfo\":{\r\n \"category\":\"UserError\",\"code\":\"FailureExitCode\",\"message\":\"The task exited with an exit code representing a failure\",\"details\":[\r\n {\r\n \"name\":\"Message\",\"value\":\"The task exited with an exit code representing a failure\"\r\n }\r\n ]\r\n },\"result\":\"failure\",\"retryCount\":3,\"lastRetryTime\":\"2018-12-11T18:46:38.534064Z\",\"requeueCount\":0\r\n }\r\n }\r\n ],\"startTask\":{\r\n \"commandLine\":\"cmd /c echo hello > hello.txt\",\"userIdentity\":{\r\n \"autoUser\":{\r\n \"elevationLevel\":\"nonadmin\"\r\n }\r\n },\"maxTaskRetryCount\":0,\"waitForSuccess\":false\r\n },\"startTaskInfo\":{\r\n \"state\":\"completed\",\"startTime\":\"2018-12-11T18:31:54.456912Z\",\"endTime\":\"2018-12-11T18:31:55.082974Z\",\"exitCode\":0,\"result\":\"success\",\"retryCount\":0\r\n },\"certificateReferences\":[\r\n \r\n ],\"isDedicated\":true,\"endpointConfiguration\":{\r\n \"inboundEndpoints\":[\r\n {\r\n \"name\":\"Microsoft.WindowsAzure.Plugins.RemoteForwarder.RdpInput\",\"protocol\":\"tcp\",\"publicIPAddress\":\"13.77.205.84\",\"frontendPort\":3389,\"backendPort\":20000\r\n }\r\n ]\r\n },\"nodeAgentInfo\":{\r\n \"lastUpdateTime\":\"2018-12-11T18:31:51.947806Z\",\"version\":\"1.4.7\"\r\n }\r\n }\r\n ]\r\n}", { 'transfer-encoding': 'chunked', 'content-type': 'application/json;odata=minimalmetadata', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '91d46541-a5cf-48d3-9e5a-5a292e3e3ef4', + 'request-id': '13fa96c6-5ae6-4a42-80bd-4558814c3d22', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:27:24 GMT', + date: 'Tue, 11 Dec 2018 18:46:50 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_reactivate_a_task_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_reactivate_a_task_successfully.nock.js index 7ed6a2f68d..05dd1f1757 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_reactivate_a_task_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_reactivate_a_task_successfully.nock.js @@ -1,38 +1,38 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .post('/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask/reactivate?api-version=2018-08-01.7.0') +nock('http://test3.westcentralus.batch.azure.com:443') + .post('/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask/reactivate?api-version=2018-12-01.8.0') .reply(204, "", { 'content-length': '0', - 'last-modified': 'Tue, 21 Aug 2018 20:25:26 GMT', - etag: '0x8D607A43AB500D1', + 'last-modified': 'Tue, 11 Dec 2018 18:44:51 GMT', + etag: '0x8D65F98BC3C1AEF', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '94b3ebde-7b04-4ef5-8d7e-207831ebc2a4', + 'request-id': 'fe863012-84d1-43aa-84da-53d462d844f2', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:25:26 GMT', + date: 'Tue, 11 Dec 2018 18:44:51 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .post('/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask/reactivate?api-version=2018-08-01.7.0') +nock('https://test3.westcentralus.batch.azure.com:443') + .post('/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask/reactivate?api-version=2018-12-01.8.0') .reply(204, "", { 'content-length': '0', - 'last-modified': 'Tue, 21 Aug 2018 20:25:26 GMT', - etag: '0x8D607A43AB500D1', + 'last-modified': 'Tue, 11 Dec 2018 18:44:51 GMT', + etag: '0x8D65F98BC3C1AEF', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '94b3ebde-7b04-4ef5-8d7e-207831ebc2a4', + 'request-id': 'fe863012-84d1-43aa-84da-53d462d844f2', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - date: 'Tue, 21 Aug 2018 20:25:26 GMT', + date: 'Tue, 11 Dec 2018 18:44:51 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_reboot_a_compute_node_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_reboot_a_compute_node_successfully.nock.js index 65734611e0..47ecd68eff 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_reboot_a_compute_node_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_reboot_a_compute_node_successfully.nock.js @@ -1,36 +1,36 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .post('/pools/nodesdktestpool1/nodes/tvm-14141481_1-20180821t200555z/reboot?api-version=2018-08-01.7.0') +nock('http://test3.westcentralus.batch.azure.com:443') + .post('/pools/nodesdktestpool1/nodes/tvmps_13cf4cee9dd1594f9da06399ef98ede3e5a4010f3233627c3837a43dbeff5868_d/reboot?api-version=2018-12-01.8.0') .reply(202, "", { 'transfer-encoding': 'chunked', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '6151433e-d0df-4043-9c5d-24c489df5986', + 'request-id': '006dfd59-3c3a-4a3b-8c31-b7e66652b7ce', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvm-14141481_1-20180821t200555z/reboot', - date: 'Tue, 21 Aug 2018 20:23:11 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvmps_13cf4cee9dd1594f9da06399ef98ede3e5a4010f3233627c3837a43dbeff5868_d/reboot', + date: 'Tue, 11 Dec 2018 18:42:34 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .post('/pools/nodesdktestpool1/nodes/tvm-14141481_1-20180821t200555z/reboot?api-version=2018-08-01.7.0') +nock('https://test3.westcentralus.batch.azure.com:443') + .post('/pools/nodesdktestpool1/nodes/tvmps_13cf4cee9dd1594f9da06399ef98ede3e5a4010f3233627c3837a43dbeff5868_d/reboot?api-version=2018-12-01.8.0') .reply(202, "", { 'transfer-encoding': 'chunked', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '6151433e-d0df-4043-9c5d-24c489df5986', + 'request-id': '006dfd59-3c3a-4a3b-8c31-b7e66652b7ce', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvm-14141481_1-20180821t200555z/reboot', - date: 'Tue, 21 Aug 2018 20:23:11 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvmps_13cf4cee9dd1594f9da06399ef98ede3e5a4010f3233627c3837a43dbeff5868_d/reboot', + date: 'Tue, 11 Dec 2018 18:42:34 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_reimage_a_compute_node_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_reimage_a_compute_node_successfully.nock.js index 41206f7c47..42d46c1354 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_reimage_a_compute_node_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_reimage_a_compute_node_successfully.nock.js @@ -1,36 +1,36 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .post('/pools/nodesdktestpool1/nodes/tvm-14141481_2-20180821t200555z/reimage?api-version=2018-08-01.7.0') +nock('http://test3.westcentralus.batch.azure.com:443') + .post('/pools/nodesdktestpool1/nodes/tvmps_15c61fea08a34e0fe431ba70cdf2156682bec1e01fdda442f2dccde21908ed91_d/reimage?api-version=2018-12-01.8.0') .reply(202, "", { 'transfer-encoding': 'chunked', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '47dbf3c4-a3ed-4455-ab36-a2323620a271', + 'request-id': '850d8c98-413e-4aef-b7af-f74db73eba0f', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvm-14141481_2-20180821t200555z/reimage', - date: 'Tue, 21 Aug 2018 20:23:12 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvmps_15c61fea08a34e0fe431ba70cdf2156682bec1e01fdda442f2dccde21908ed91_d/reimage', + date: 'Tue, 11 Dec 2018 18:42:34 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .post('/pools/nodesdktestpool1/nodes/tvm-14141481_2-20180821t200555z/reimage?api-version=2018-08-01.7.0') +nock('https://test3.westcentralus.batch.azure.com:443') + .post('/pools/nodesdktestpool1/nodes/tvmps_15c61fea08a34e0fe431ba70cdf2156682bec1e01fdda442f2dccde21908ed91_d/reimage?api-version=2018-12-01.8.0') .reply(202, "", { 'transfer-encoding': 'chunked', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '47dbf3c4-a3ed-4455-ab36-a2323620a271', + 'request-id': '850d8c98-413e-4aef-b7af-f74db73eba0f', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvm-14141481_2-20180821t200555z/reimage', - date: 'Tue, 21 Aug 2018 20:23:12 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/nodes/tvmps_15c61fea08a34e0fe431ba70cdf2156682bec1e01fdda442f2dccde21908ed91_d/reimage', + date: 'Tue, 11 Dec 2018 18:42:34 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_remove_nodes_in_pool_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_remove_nodes_in_pool_successfully.nock.js index 8004e9d429..a5ddce732a 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_remove_nodes_in_pool_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_remove_nodes_in_pool_successfully.nock.js @@ -1,42 +1,42 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') +nock('http://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/pools/nodesdktestpool1/removenodes?api-version=2018-08-01.7.0', '*') +.post('/pools/nodesdktestpool1/removenodes?api-version=2018-12-01.8.0', '*') .reply(202, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:31:06 GMT', - etag: '0x8D607A505B3BFE8', + 'last-modified': 'Tue, 11 Dec 2018 18:48:40 GMT', + etag: '0x8D65F9944AE7C2B', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '31581979-81c1-472f-a0eb-602a84c68aec', + 'request-id': '4841eb42-b41c-48cb-9f9e-00a1168af58e', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/removenodes', - date: 'Tue, 21 Aug 2018 20:31:06 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/removenodes', + date: 'Tue, 11 Dec 2018 18:48:40 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') +nock('https://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/pools/nodesdktestpool1/removenodes?api-version=2018-08-01.7.0', '*') +.post('/pools/nodesdktestpool1/removenodes?api-version=2018-12-01.8.0', '*') .reply(202, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:31:06 GMT', - etag: '0x8D607A505B3BFE8', + 'last-modified': 'Tue, 11 Dec 2018 18:48:40 GMT', + etag: '0x8D65F9944AE7C2B', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '31581979-81c1-472f-a0eb-602a84c68aec', + 'request-id': '4841eb42-b41c-48cb-9f9e-00a1168af58e', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/removenodes', - date: 'Tue, 21 Aug 2018 20:31:06 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/removenodes', + date: 'Tue, 11 Dec 2018 18:48:40 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_start_pool_resizing_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_start_pool_resizing_successfully.nock.js index d5c0ab74b5..bb6b945f43 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_start_pool_resizing_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_start_pool_resizing_successfully.nock.js @@ -1,42 +1,42 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') +nock('http://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/pools/nodesdktestpool2/resize?api-version=2018-08-01.7.0', '*') +.post('/pools/nodesdktestpool2/resize?api-version=2018-12-01.8.0', '*') .reply(202, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:25:22 GMT', - etag: '0x8D607A4389CE6FD', + 'last-modified': 'Tue, 11 Dec 2018 18:44:47 GMT', + etag: '0x8D65F98B9A168BC', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'f2ceedbf-aa0e-4233-8917-ddffaea2e83f', + 'request-id': '312ff6d3-2703-4d24-b820-57a8be3ad8fc', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool2/resize', - date: 'Tue, 21 Aug 2018 20:25:22 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool2/resize', + date: 'Tue, 11 Dec 2018 18:44:47 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') +nock('https://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/pools/nodesdktestpool2/resize?api-version=2018-08-01.7.0', '*') +.post('/pools/nodesdktestpool2/resize?api-version=2018-12-01.8.0', '*') .reply(202, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:25:22 GMT', - etag: '0x8D607A4389CE6FD', + 'last-modified': 'Tue, 11 Dec 2018 18:44:47 GMT', + etag: '0x8D65F98B9A168BC', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'f2ceedbf-aa0e-4233-8917-ddffaea2e83f', + 'request-id': '312ff6d3-2703-4d24-b820-57a8be3ad8fc', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool2/resize', - date: 'Tue, 21 Aug 2018 20:25:22 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool2/resize', + date: 'Tue, 11 Dec 2018 18:44:47 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_stop_pool_resizing_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_stop_pool_resizing_successfully.nock.js index 43e282e5af..7e070c72e5 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_stop_pool_resizing_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_stop_pool_resizing_successfully.nock.js @@ -1,40 +1,40 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .post('/pools/nodesdktestpool2/stopresize?api-version=2018-08-01.7.0') +nock('http://test3.westcentralus.batch.azure.com:443') + .post('/pools/nodesdktestpool2/stopresize?api-version=2018-12-01.8.0') .reply(202, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:25:22 GMT', - etag: '0x8D607A438B8854D', + 'last-modified': 'Tue, 11 Dec 2018 18:44:47 GMT', + etag: '0x8D65F98B9A168BC', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '8fcf26c8-b739-4a0a-91c9-062ebe5f00c1', + 'request-id': '98e2c7e5-c98c-48bc-9b4f-44fc5374b46a', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool2/stopresize', - date: 'Tue, 21 Aug 2018 20:25:22 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool2/stopresize', + date: 'Tue, 11 Dec 2018 18:44:47 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .post('/pools/nodesdktestpool2/stopresize?api-version=2018-08-01.7.0') +nock('https://test3.westcentralus.batch.azure.com:443') + .post('/pools/nodesdktestpool2/stopresize?api-version=2018-12-01.8.0') .reply(202, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:25:22 GMT', - etag: '0x8D607A438B8854D', + 'last-modified': 'Tue, 11 Dec 2018 18:44:47 GMT', + etag: '0x8D65F98B9A168BC', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '8fcf26c8-b739-4a0a-91c9-062ebe5f00c1', + 'request-id': '98e2c7e5-c98c-48bc-9b4f-44fc5374b46a', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool2/stopresize', - date: 'Tue, 21 Aug 2018 20:25:22 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool2/stopresize', + date: 'Tue, 11 Dec 2018 18:44:47 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_terminate_a_job_schedule_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_terminate_a_job_schedule_successfully.nock.js index 29ce9427da..32b9b3ee08 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_terminate_a_job_schedule_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_terminate_a_job_schedule_successfully.nock.js @@ -1,40 +1,40 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .post('/jobschedules/NodeSDKTestSchedule/terminate?api-version=2018-08-01.7.0') +nock('http://test3.westcentralus.batch.azure.com:443') + .post('/jobschedules/NodeSDKTestSchedule/terminate?api-version=2018-12-01.8.0') .reply(202, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:31:05 GMT', - etag: '0x8D607A504BD1C2C', + 'last-modified': 'Tue, 11 Dec 2018 21:04:06 GMT', + etag: '0x8D65FAC30442EEE', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '5e2afde0-868f-4dad-b2f2-fe480fc9b331', + 'request-id': '501b999b-868e-4d78-b7c5-764838cf48cb', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobschedules/NodeSDKTestSchedule/terminate', - date: 'Tue, 21 Aug 2018 20:31:05 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobschedules/NodeSDKTestSchedule/terminate', + date: 'Tue, 11 Dec 2018 21:04:06 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .post('/jobschedules/NodeSDKTestSchedule/terminate?api-version=2018-08-01.7.0') +nock('https://test3.westcentralus.batch.azure.com:443') + .post('/jobschedules/NodeSDKTestSchedule/terminate?api-version=2018-12-01.8.0') .reply(202, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:31:05 GMT', - etag: '0x8D607A504BD1C2C', + 'last-modified': 'Tue, 11 Dec 2018 21:04:06 GMT', + etag: '0x8D65FAC30442EEE', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '5e2afde0-868f-4dad-b2f2-fe480fc9b331', + 'request-id': '501b999b-868e-4d78-b7c5-764838cf48cb', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobschedules/NodeSDKTestSchedule/terminate', - date: 'Tue, 21 Aug 2018 20:31:05 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobschedules/NodeSDKTestSchedule/terminate', + date: 'Tue, 11 Dec 2018 21:04:06 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_terminate_a_job_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_terminate_a_job_successfully.nock.js index 63f91059df..1fa3d62f97 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_terminate_a_job_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_terminate_a_job_successfully.nock.js @@ -1,40 +1,40 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .post('/jobs/HelloWorldJobNodeSDKTest/terminate?api-version=2018-08-01.7.0') +nock('http://test3.westcentralus.batch.azure.com:443') + .post('/jobs/HelloWorldJobNodeSDKTest/terminate?api-version=2018-12-01.8.0') .reply(202, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:31:01 GMT', - etag: '0x8D607A502EB8DE1', + 'last-modified': 'Tue, 11 Dec 2018 18:48:36 GMT', + etag: '0x8D65F994225511C', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '1bd0af83-bafb-4191-a208-eae2d0037a25', + 'request-id': '56ab1807-3ad1-4548-9eed-2ece734ff2da', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/terminate', - date: 'Tue, 21 Aug 2018 20:31:01 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/terminate', + date: 'Tue, 11 Dec 2018 18:48:36 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .post('/jobs/HelloWorldJobNodeSDKTest/terminate?api-version=2018-08-01.7.0') +nock('https://test3.westcentralus.batch.azure.com:443') + .post('/jobs/HelloWorldJobNodeSDKTest/terminate?api-version=2018-12-01.8.0') .reply(202, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:31:01 GMT', - etag: '0x8D607A502EB8DE1', + 'last-modified': 'Tue, 11 Dec 2018 18:48:36 GMT', + etag: '0x8D65F994225511C', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '1bd0af83-bafb-4191-a208-eae2d0037a25', + 'request-id': '56ab1807-3ad1-4548-9eed-2ece734ff2da', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/terminate', - date: 'Tue, 21 Aug 2018 20:31:01 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/terminate', + date: 'Tue, 11 Dec 2018 18:48:36 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_terminate_a_task_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_terminate_a_task_successfully.nock.js index eb9fb12dd4..65557dc1ff 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_terminate_a_task_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_terminate_a_task_successfully.nock.js @@ -1,40 +1,40 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .post('/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask/terminate?api-version=2018-08-01.7.0') +nock('http://test3.westcentralus.batch.azure.com:443') + .post('/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask/terminate?api-version=2018-12-01.8.0') .reply(204, "", { 'content-length': '0', - 'last-modified': 'Tue, 21 Aug 2018 20:25:25 GMT', - etag: '0x8D607A43A83710D', + 'last-modified': 'Tue, 11 Dec 2018 18:44:50 GMT', + etag: '0x8D65F98BBC7B072', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '4584a256-f4e5-4a80-b2ca-007e2a5e467f', + 'request-id': '9c674b27-2f95-40e4-9e41-f5d8bde368fc', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask/terminate', - date: 'Tue, 21 Aug 2018 20:25:25 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask/terminate', + date: 'Tue, 11 Dec 2018 18:44:51 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .post('/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask/terminate?api-version=2018-08-01.7.0') +nock('https://test3.westcentralus.batch.azure.com:443') + .post('/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask/terminate?api-version=2018-12-01.8.0') .reply(204, "", { 'content-length': '0', - 'last-modified': 'Tue, 21 Aug 2018 20:25:25 GMT', - etag: '0x8D607A43A83710D', + 'last-modified': 'Tue, 11 Dec 2018 18:44:50 GMT', + etag: '0x8D65F98BBC7B072', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '4584a256-f4e5-4a80-b2ca-007e2a5e467f', + 'request-id': '9c674b27-2f95-40e4-9e41-f5d8bde368fc', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask/terminate', - date: 'Tue, 21 Aug 2018 20:25:25 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask/terminate', + date: 'Tue, 11 Dec 2018 18:44:51 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_update_a_job_schedule_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_update_a_job_schedule_successfully.nock.js index b38a3b4d11..bc6bb7889f 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_update_a_job_schedule_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_update_a_job_schedule_successfully.nock.js @@ -1,42 +1,42 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') +nock('http://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.put('/jobschedules/NodeSDKTestSchedule?api-version=2018-08-01.7.0', '*') +.put('/jobschedules/NodeSDKTestSchedule?api-version=2018-12-01.8.0', '*') .reply(200, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:31:04 GMT', - etag: '0x8D607A504633F37', + 'last-modified': 'Tue, 11 Dec 2018 21:04:06 GMT', + etag: '0x8D65FAC2FDE32A1', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'b46b1796-20e7-4c7a-80fb-9ba2d0ba233c', + 'request-id': '55b87f1e-724a-457d-85d9-a521959f404c', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobschedules/NodeSDKTestSchedule', - date: 'Tue, 21 Aug 2018 20:31:04 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobschedules/NodeSDKTestSchedule', + date: 'Tue, 11 Dec 2018 21:04:06 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') +nock('https://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.put('/jobschedules/NodeSDKTestSchedule?api-version=2018-08-01.7.0', '*') +.put('/jobschedules/NodeSDKTestSchedule?api-version=2018-12-01.8.0', '*') .reply(200, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:31:04 GMT', - etag: '0x8D607A504633F37', + 'last-modified': 'Tue, 11 Dec 2018 21:04:06 GMT', + etag: '0x8D65FAC2FDE32A1', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'b46b1796-20e7-4c7a-80fb-9ba2d0ba233c', + 'request-id': '55b87f1e-724a-457d-85d9-a521959f404c', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobschedules/NodeSDKTestSchedule', - date: 'Tue, 21 Aug 2018 20:31:04 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobschedules/NodeSDKTestSchedule', + date: 'Tue, 11 Dec 2018 21:04:06 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_update_a_job_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_update_a_job_successfully.nock.js index 4a43471b63..d98495f31d 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_update_a_job_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_update_a_job_successfully.nock.js @@ -1,42 +1,42 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') +nock('http://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.put('/jobs/HelloWorldJobNodeSDKTest?api-version=2018-08-01.7.0', '*') +.put('/jobs/HelloWorldJobNodeSDKTest?api-version=2018-12-01.8.0', '*') .reply(200, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:25:23 GMT', - etag: '0x8D607A439556CD8', + 'last-modified': 'Tue, 11 Dec 2018 18:44:48 GMT', + etag: '0x8D65F98BA87DA55', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'bce42a29-ad74-4a13-8c63-e2fd6e632f70', + 'request-id': '779424ed-d3a6-49c3-b9a5-d8ac2b5f30e6', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest', - date: 'Tue, 21 Aug 2018 20:25:23 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest', + date: 'Tue, 11 Dec 2018 18:44:48 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') +nock('https://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.put('/jobs/HelloWorldJobNodeSDKTest?api-version=2018-08-01.7.0', '*') +.put('/jobs/HelloWorldJobNodeSDKTest?api-version=2018-12-01.8.0', '*') .reply(200, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:25:23 GMT', - etag: '0x8D607A439556CD8', + 'last-modified': 'Tue, 11 Dec 2018 18:44:48 GMT', + etag: '0x8D65F98BA87DA55', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'bce42a29-ad74-4a13-8c63-e2fd6e632f70', + 'request-id': '779424ed-d3a6-49c3-b9a5-d8ac2b5f30e6', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest', - date: 'Tue, 21 Aug 2018 20:25:23 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest', + date: 'Tue, 11 Dec 2018 18:44:48 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_update_a_task_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_update_a_task_successfully.nock.js index c1735db2dd..e4f2ca776d 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_update_a_task_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_update_a_task_successfully.nock.js @@ -1,42 +1,42 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') +nock('http://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.put('/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2?api-version=2018-08-01.7.0', '*') +.put('/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2?api-version=2018-12-01.8.0', '*') .reply(200, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:25:26 GMT', - etag: '0x8D607A43AD67EAE', + 'last-modified': 'Tue, 11 Dec 2018 18:44:52 GMT', + etag: '0x8D65F98BC678828', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'a8732646-11ae-4395-b3a1-7f7bd54de8ef', + 'request-id': 'd380e5ed-4438-4111-b911-202f0ac6839c', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2', - date: 'Tue, 21 Aug 2018 20:25:26 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2', + date: 'Tue, 11 Dec 2018 18:44:51 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') +nock('https://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.put('/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2?api-version=2018-08-01.7.0', '*') +.put('/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2?api-version=2018-12-01.8.0', '*') .reply(200, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:25:26 GMT', - etag: '0x8D607A43AD67EAE', + 'last-modified': 'Tue, 11 Dec 2018 18:44:52 GMT', + etag: '0x8D65F98BC678828', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': 'a8732646-11ae-4395-b3a1-7f7bd54de8ef', + 'request-id': 'd380e5ed-4438-4111-b911-202f0ac6839c', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2', - date: 'Tue, 21 Aug 2018 20:25:26 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/jobs/HelloWorldJobNodeSDKTest/tasks/HelloWorldNodeSDKTestTask2', + date: 'Tue, 11 Dec 2018 18:44:51 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_update_pool_parameters_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_update_pool_parameters_successfully.nock.js index de97ad0d14..e6f6a61723 100644 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_update_pool_parameters_successfully.nock.js +++ b/test/recordings/batchservice-tests/Batch_Service_operations_should_update_pool_parameters_successfully.nock.js @@ -1,42 +1,42 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = [[function (nock) { var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') +nock('http://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/pools/nodesdktestpool1/updateproperties?api-version=2018-08-01.7.0', '*') +.post('/pools/nodesdktestpool1/updateproperties?api-version=2018-12-01.8.0', '*') .reply(204, "", { 'content-length': '0', - 'last-modified': 'Tue, 21 Aug 2018 20:09:40 GMT', - etag: '0x8D607A207416399', + 'last-modified': 'Tue, 11 Dec 2018 18:29:02 GMT', + etag: '0x8D65F968672F1C2', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '4374adc2-2e74-4e9c-bfdb-af083f8742fd', + 'request-id': '09bdb137-a587-4c52-8c73-5372d3643400', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/updateproperties', - date: 'Tue, 21 Aug 2018 20:09:40 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/updateproperties', + date: 'Tue, 11 Dec 2018 18:29:02 GMT', connection: 'close' }); return result; }, function (nock) { var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') +nock('https://test3.westcentralus.batch.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.post('/pools/nodesdktestpool1/updateproperties?api-version=2018-08-01.7.0', '*') +.post('/pools/nodesdktestpool1/updateproperties?api-version=2018-12-01.8.0', '*') .reply(204, "", { 'content-length': '0', - 'last-modified': 'Tue, 21 Aug 2018 20:09:40 GMT', - etag: '0x8D607A207416399', + 'last-modified': 'Tue, 11 Dec 2018 18:29:02 GMT', + etag: '0x8D65F968672F1C2', server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '4374adc2-2e74-4e9c-bfdb-af083f8742fd', + 'request-id': '09bdb137-a587-4c52-8c73-5372d3643400', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-content-type-options': 'nosniff', dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1/updateproperties', - date: 'Tue, 21 Aug 2018 20:09:40 GMT', + dataserviceid: 'https://test3.westcentralus.batch.azure.com/pools/nodesdktestpool1/updateproperties', + date: 'Tue, 11 Dec 2018 18:29:02 GMT', connection: 'close' }); return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/Batch_Service_operations_should_update_pool_target_OS_version_successfully.nock.js b/test/recordings/batchservice-tests/Batch_Service_operations_should_update_pool_target_OS_version_successfully.nock.js deleted file mode 100644 index faab851402..0000000000 --- a/test/recordings/batchservice-tests/Batch_Service_operations_should_update_pool_target_OS_version_successfully.nock.js +++ /dev/null @@ -1,42 +0,0 @@ -// This file has been autogenerated. - -exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; -}; - -exports.scopes = [[function (nock) { -var result = -nock('http://lchency4.westcentralus.batch.azure.com:443') - .filteringRequestBody(function (path) { return '*';}) -.post('/pools/nodesdktestpool2/upgradeos?api-version=2018-08-01.7.0', '*') - .reply(202, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:25:21 GMT', - etag: '0x8D607A437F1E152', - server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '5c74628c-5de0-4c56-8811-d0135b292044', - 'strict-transport-security': 'max-age=31536000; includeSubDomains', - 'x-content-type-options': 'nosniff', - dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool2/upgradeos', - date: 'Tue, 21 Aug 2018 20:25:21 GMT', - connection: 'close' }); - return result; }, -function (nock) { -var result = -nock('https://lchency4.westcentralus.batch.azure.com:443') - .filteringRequestBody(function (path) { return '*';}) -.post('/pools/nodesdktestpool2/upgradeos?api-version=2018-08-01.7.0', '*') - .reply(202, "", { 'transfer-encoding': 'chunked', - 'last-modified': 'Tue, 21 Aug 2018 20:25:21 GMT', - etag: '0x8D607A437F1E152', - server: 'Microsoft-HTTPAPI/2.0', - 'request-id': '5c74628c-5de0-4c56-8811-d0135b292044', - 'strict-transport-security': 'max-age=31536000; includeSubDomains', - 'x-content-type-options': 'nosniff', - dataserviceversion: '3.0', - dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool2/upgradeos', - date: 'Tue, 21 Aug 2018 20:25:21 GMT', - connection: 'close' }); - return result; }]]; \ No newline at end of file diff --git a/test/recordings/batchservice-tests/suite.batchservice-tests.nock.js b/test/recordings/batchservice-tests/suite.batchservice-tests.nock.js index ba44ceb1e4..b3a88b8cb7 100644 --- a/test/recordings/batchservice-tests/suite.batchservice-tests.nock.js +++ b/test/recordings/batchservice-tests/suite.batchservice-tests.nock.js @@ -1,9 +1,9 @@ // This file has been autogenerated. exports.setEnvironment = function() { - process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4'; - process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com'; - process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05'; + process.env['AZURE_BATCH_ACCOUNT'] = 'test3'; + process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com'; + process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27'; }; exports.scopes = []; diff --git a/test/services/batch/batchClient-tests.js b/test/services/batch/batchClient-tests.js index 6e1b851ea4..558b0df403 100644 --- a/test/services/batch/batchClient-tests.js +++ b/test/services/batch/batchClient-tests.js @@ -327,41 +327,6 @@ describe('Batch Service', function () { }); }); - it('should add a pool with an osDisk', function (done) { - var pool = { - id: 'nodesdkosdiskpool', - vmSize: 'Standard_A1', - virtualMachineConfiguration: { - imageReference: { - publisher: 'Canonical', - offer: 'UbuntuServer', - sku: '16.04-LTS' - }, - nodeAgentSKUId: 'batch.node.ubuntu 16.04', - osDisk: { - caching: 'readWrite' - } - }, - targetDedicatedNodes: 0 - }; - - client.pool.add(pool, function (err, result, request, response) { - should.not.exist(err); - response.statusCode.should.equal(201); - client.pool.get('nodesdkosdiskpool', function (err, result, request, response) { - should.not.exist(err); - should.exist(result); - result.virtualMachineConfiguration.osDisk.caching.should.equal('ReadWrite'); - client.pool.deleteMethod('nodesdkosdiskpool', function (err, result, request, response) { - should.not.exist(err); - should.not.exist(result); - response.statusCode.should.equal(202); - done(); - }); - }); - }); - }); - it('should add a pool with a Data Disk', function (done) { var pool = { id: 'nodesdkdatadiskpool', @@ -467,7 +432,7 @@ describe('Batch Service', function () { client.account.listPoolNodeCounts( function (err, result, request, response) { should.not.exist(err); should.exist(result); - result.length.should.equal(2); + result.length.should.equal(3); result[0].poolId.should.equal('nodesdkinboundendpointpool'); result[0].dedicated.idle.should.equal(1); result[0].lowPriority.total.should.equal(0); @@ -645,15 +610,6 @@ describe('Batch Service', function () { }); }); - it('should update pool target OS version successfully', function (done) { - client.pool.upgradeOS('nodesdktestpool2', 'WA-GUEST-OS-4.32_201605-01', function (err, result, request, response) { - should.not.exist(err); - should.not.exist(result); - response.statusCode.should.equal(202); - done(); - }); - }); - it('should list pools without filters', function (done) { client.pool.list(function (err, result, request, response) { should.not.exist(err); @@ -1029,7 +985,7 @@ describe('Batch Service', function () { should.exist(result.userIdentity); result.userIdentity.userName.should.equal(nonAdminPoolUser); should.exist(result.executionInfo); - result.executionInfo.result.should.equal('Failure'); + result.executionInfo.result.should.equal('failure'); result.executionInfo.exitCode.should.not.equal(0); done(); }); @@ -1287,7 +1243,7 @@ describe('Batch Service', function () { it('should create a job schdule successfully', function (done) { var options = { id: 'NodeSDKTestSchedule', jobSpecification: { id: 'HelloWorldJobNodeSDKTest', poolInfo: { poolId: 'nodesdktestpool1' } }, - schedule: { doNotRunUntil: "2018-08-25T00:00:00.00", startWindow: moment.duration({ minutes: 6 }) } + schedule: { doNotRunUntil: "2018-12-25T00:00:00.00", startWindow: moment.duration({ minutes: 6 }) } }; var requestModelMapper = new client.models['JobScheduleAddParameter']().mapper(); diff --git a/test/services/cognitiveServicesLanguage/spellCheckAPIClient-tests.js b/test/services/cognitiveServicesLanguage/spellCheckAPIClient-tests.js index 443a5c11ba..30a3ed4518 100644 --- a/test/services/cognitiveServicesLanguage/spellCheckAPIClient-tests.js +++ b/test/services/cognitiveServicesLanguage/spellCheckAPIClient-tests.js @@ -18,7 +18,7 @@ const CognitiveServicesCredentials = require('ms-rest-azure').CognitiveServicesCredentials; const SuiteBase = require('../../framework/suite-base'); -const SpellCheckAPIClient = require('../../../lib/services/spellCheck/lib/spellCheckAPIClient'); +const SpellCheckClient = require('../../../lib/services/spellCheck/lib/spellCheckClient'); const assert = require('assert'); var requiredEnvironment = [ @@ -35,7 +35,7 @@ describe('Spell Check', () => { suite = new SuiteBase(this, testPrefix, requiredEnvironment); suite.setupSuite(() => { credentials = new CognitiveServicesCredentials(process.env["AZURE_SPELL_CHECK_KEY"]); - client = new SpellCheckAPIClient(credentials); + client = new SpellCheckClient(credentials); done(); }); }); diff --git a/test/services/cognitiveServicesSearch/entitySearch-tests.js b/test/services/cognitiveServicesSearch/entitySearch-tests.js index 5e60d55491..2ee30ad8e1 100644 --- a/test/services/cognitiveServicesSearch/entitySearch-tests.js +++ b/test/services/cognitiveServicesSearch/entitySearch-tests.js @@ -4,7 +4,7 @@ * license information. */ -const EntitySearchAPIClient = require('../../../lib/services/entitySearch/lib/entitySearchAPIClient'); +const EntitySearchAPIClient = require('../../../lib/services/entitySearch/lib/entitySearchClient'); const CognitiveServicesCredentials = require('ms-rest-azure').CognitiveServicesCredentials; const SuiteBase = require('../../framework/suite-base'); diff --git a/test/services/cognitiveServicesSearch/imageSearch-tests.js b/test/services/cognitiveServicesSearch/imageSearch-tests.js index 0b3d24c261..c6ce779552 100644 --- a/test/services/cognitiveServicesSearch/imageSearch-tests.js +++ b/test/services/cognitiveServicesSearch/imageSearch-tests.js @@ -4,7 +4,7 @@ * license information. */ -const ImageSearchAPIClient = require('../../../lib/services/imageSearch/lib/imageSearchAPIClient'); +const ImageSearchAPIClient = require('../../../lib/services/imageSearch/lib/imageSearchClient'); const CognitiveServicesCredentials = require('ms-rest-azure').CognitiveServicesCredentials; const SuiteBase = require('../../framework/suite-base'); diff --git a/test/services/cognitiveServicesSearch/newsSearch-tests.js b/test/services/cognitiveServicesSearch/newsSearch-tests.js index 55771480ef..28a42c2f69 100644 --- a/test/services/cognitiveServicesSearch/newsSearch-tests.js +++ b/test/services/cognitiveServicesSearch/newsSearch-tests.js @@ -4,7 +4,7 @@ * license information. */ -const NewsSearchAPIClient = require('../../../lib/services/newsSearch/lib/newsSearchAPIClient'); +const NewsSearchClient = require('../../../lib/services/newsSearch/lib/newsSearchClient'); const CognitiveServicesCredentials = require('ms-rest-azure').CognitiveServicesCredentials; const SuiteBase = require('../../framework/suite-base'); @@ -23,7 +23,7 @@ describe('Cognitive Services Search', function () { suite = new SuiteBase(this, testPrefix, requiredEnvironment); suite.setupSuite(function () { let credentials = new CognitiveServicesCredentials(process.env["AZURE_NEWS_SEARCH_KEY"]); - client = new NewsSearchAPIClient(credentials); + client = new NewsSearchClient(credentials); done(); }); }); diff --git a/test/services/cognitiveServicesSearch/videoSearch-tests.js b/test/services/cognitiveServicesSearch/videoSearch-tests.js index 5ea4c05596..f562ed3bc2 100644 --- a/test/services/cognitiveServicesSearch/videoSearch-tests.js +++ b/test/services/cognitiveServicesSearch/videoSearch-tests.js @@ -4,11 +4,10 @@ * license information. */ -const VideoSearchAPIClient = require('../../../lib/services/videoSearch/lib/videoSearchAPIClient'); +const VideoSearchClient = require('../../../lib/services/videoSearch/lib/videoSearchClient'); const CognitiveServicesCredentials = require('ms-rest-azure').CognitiveServicesCredentials; const SuiteBase = require('../../framework/suite-base'); -const should = require('should'); let requiredEnvironment = [ { name: 'AZURE_VIDEO_SEARCH_KEY', secure: true } @@ -23,7 +22,7 @@ describe('Cognitive Services Search', function () { suite = new SuiteBase(this, testPrefix, requiredEnvironment); suite.setupSuite(function () { let credentials = new CognitiveServicesCredentials(process.env["AZURE_VIDEO_SEARCH_KEY"]); - client = new VideoSearchAPIClient(credentials); + client = new VideoSearchClient(credentials); done(); }); }); diff --git a/test/services/cognitiveServicesSearch/webSearch-tests.js b/test/services/cognitiveServicesSearch/webSearch-tests.js index c1171b3d08..c698df8521 100644 --- a/test/services/cognitiveServicesSearch/webSearch-tests.js +++ b/test/services/cognitiveServicesSearch/webSearch-tests.js @@ -4,11 +4,10 @@ * license information. */ -const WebSearchAPIClient = require('../../../lib/services/cognitiveServicesWebSearch/lib/webSearchAPIClient'); +const WebSearchClient = require('../../../lib/services/cognitiveServicesWebSearch/lib/webSearchClient'); const CognitiveServicesCredentials = require('ms-rest-azure').CognitiveServicesCredentials; const SuiteBase = require('../../framework/suite-base'); -const should = require('should'); let requiredEnvironment = [ { name: 'AZURE_WEB_SEARCH_KEY', secure: true } @@ -23,7 +22,7 @@ describe('Cognitive Services Search', () => { suite = new SuiteBase(this, testPrefix, requiredEnvironment); suite.setupSuite(function () { let credentials = new CognitiveServicesCredentials(process.env["AZURE_WEB_SEARCH_KEY"]); - client = new WebSearchAPIClient(credentials); + client = new WebSearchClient(credentials); done(); }); });